Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
e245a2c
Add submodule, and add formulas
nfgallimore Jul 31, 2024
a4ee45f
Setup swagger and logging to database
nfgallimore Aug 1, 2024
1e246ff
updated .gitignore
Ahim-Gillamore Aug 2, 2024
ee715a8
Fix .env
nfgallimore Aug 2, 2024
882c801
Setup .gitignore and rename browser title and README title
nfgallimore Aug 2, 2024
5b2b86c
NFG-83 Add shared Git hooks directory and commit-msg hook requiring j…
nfgallimore Aug 2, 2024
1fec80f
NFG-212, NFG-269, NFG-211, NFG-263, NFG-268, NFG-264, NFG-266 setup s…
Ahim-Gillamore Aug 2, 2024
c16cfdc
conflict resolved
Ahim-Gillamore Aug 2, 2024
10077df
updating submodule
Ahim-Gillamore Aug 2, 2024
3db919a
NFG-304, NFG-305, NFG-306, NFG-307, NFG-308, NFG-310, NFG-304, NFG-23…
nfgallimore Aug 2, 2024
fa1de0d
NFG-304, NFG-305, NFG-306, NFG-307, NFG-308, NFG-310, NFG-304, NFG-23…
nfgallimore Aug 2, 2024
9233c34
NFG-304 create pr on push to feature branch into development
nfgallimore Aug 2, 2024
c6e591d
NFG-308, NFG-307, NFG-305, NFG-310 Add CI workflow and branch naming …
nfgallimore Aug 3, 2024
a2c3afe
NFG-300 Configure Jira Issue Fields
nfgallimore Aug 6, 2024
2fb8fc6
NFG-83 add git hooks
nfgallimore Aug 6, 2024
f177907
NFG-67 Add tests for view-inventory
nfgallimore Aug 6, 2024
be33082
NFG-67 manage inventory model and controller, add db json file
Ahim-Gillamore Aug 6, 2024
dc47a6a
Merge branch 'feature/NFG-83-Setup-Infrastructure' into feature/NFG-6…
Ahim-Gillamore Aug 6, 2024
23c3bcc
NFG-83 Merge infrastructure
nfgallimore Aug 9, 2024
97ce525
NFG-67 Update submodule
nfgallimore Aug 9, 2024
19d3807
NFG-67 inventory and its dependent models, controllers and routes
Ahim-Gillamore Aug 15, 2024
46b1475
NFG-67 changes made for vercel deployment
Ahim-Gillamore Aug 28, 2024
55c7d25
Merge branch 'production' into feature/NFG-67-Inventory-Management
Ahim-Gillamore Aug 28, 2024
e289ab9
Merge branch 'production' into feature/NFG-67-Inventory-Management
Ahim-Gillamore Aug 28, 2024
f60d3bc
Merge branch 'feature/NFG-67-Inventory-Management' of https://github.…
Ahim-Gillamore Aug 28, 2024
fcecd8a
NFG-67 added logs file for deployment
Ahim-Gillamore Aug 28, 2024
add52c6
NFG-67 added logs file for deployment
Ahim-Gillamore Aug 28, 2024
78ee59b
NFG-67 added logs file for deployment
Ahim-Gillamore Aug 28, 2024
75e4d15
NFG-67 node v upgrade in workflow
Ahim-Gillamore Aug 29, 2024
190831b
NFG-67 temporarily commented test and coverage report
Ahim-Gillamore Aug 29, 2024
e7bf9b0
NFG-67 temporarily commented test and coverage report
Ahim-Gillamore Aug 29, 2024
a822f7f
NFG-67 updated gitignore for security check pass
Ahim-Gillamore Aug 29, 2024
e0a83d7
Merge pull request #2 from Gallimore-Software/feature/NFG-67-Inventor…
Ahim-Gillamore Aug 29, 2024
109c506
Merge pull request #3 from Gallimore-Software/development
Ahim-Gillamore Aug 29, 2024
38cea9f
NFG-544, NFG-547 deployment in vercel solving winston file log error
Ahim-Gillamore Aug 29, 2024
6369067
Merge pull request #4 from Gallimore-Software/NFG-544-Deployment
Ahim-Gillamore Aug 29, 2024
075aba9
Merge pull request #5 from Gallimore-Software/development
Ahim-Gillamore Aug 29, 2024
1fce35f
NFG-544, NFG-547 updating auth verification link for prod
Ahim-Gillamore Aug 30, 2024
de424a2
Merge pull request #6 from Gallimore-Software/feature/NFG-544-Deployment
Ahim-Gillamore Aug 30, 2024
984dc78
NFG-76 updated batch record model to store product and formula schema
Ahim-Gillamore Sep 5, 2024
2fbff66
Merge pull request #11 from Gallimore-Software/feature/NFG-76-product…
Ahim-Gillamore Sep 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .env.dev

This file was deleted.

6 changes: 0 additions & 6 deletions .env.example

This file was deleted.

3 changes: 0 additions & 3 deletions .env.production

This file was deleted.

3 changes: 0 additions & 3 deletions .env.staging

This file was deleted.

4 changes: 4 additions & 0 deletions .env.testing
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DB_URI=mongodb://localhost:27017/nufacturing-local-db
JWT_SECRET=c551591808a16b19a0c2cf7956aef9009ce27295d25bce18b2953690786e9359
EMAIL_USER=ahim@brcodex.com.np
EMAIL_PASS=Iamlocked_11
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
45 changes: 45 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI

on:
push:
branches:
- development
- staging
- production
pull_request:
branches:
- development
- staging
- production

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "20"

- name: Install dependencies
run: npm install

# - name: Run tests
# run: npm test

deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/production'

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Deploy to Production
run: |
# Add your deployment script here
23 changes: 23 additions & 0 deletions .github/workflows/enforce-branch-naming.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Enforce Branch Naming

on:
push:
branches:
- "*"

jobs:
check-branch-name:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Enforce branch naming convention
run: |
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
PATTERN="^(feature|bugfix|hotfix|improvement)/NFG-[0-9]+-.+"
if [[ ! $BRANCH_NAME =~ $PATTERN ]]; then
echo "Error: Branch name '$BRANCH_NAME' does not follow the naming convention."
exit 1
fi
28 changes: 28 additions & 0 deletions .github/workflows/node-test-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Node.js CI with Test Coverage

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "20"

- name: Install dependencies
run: npm install

# - name: Run tests with coverage
# run: npm run coverage

# - name: Upload coverage report
# uses: actions/upload-artifact@v2
# with:
# name: coverage-report
# path: coverage/
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14, 16, 20]

# steps:
# - name: Checkout repository
# uses: actions/checkout@v2

# - name: Setup Node.js
# uses: actions/setup-node@v2
# with:
# node-version: ${{ matrix.node-version }}

# - name: Install dependencies
# run: npm install

# - name: Run unit tests
# run: npm test

# - name: Run integration tests
# run: npm run integration-test

# - name: Run Cypress tests
# run: npm run cypress:run

# - name: Generate coverage report
# run: npm run coverage
161 changes: 160 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,161 @@
# Created by https://www.gitignore.io/api/node,vim,git,macos,linux,sublimetext
logs/**

### Git ###
*.orig

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### macOS ###
*.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Node ###
# Logs
# logs
#*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
/node_modules
.env.testing
.env.production
.env.development
.env.staging
.env.local
.env.*

### SublimeText ###
# cache files for sublime text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache

# workspace files are user-specific
*.sublime-workspace

# project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using SublimeText
# *.sublime-project

# sftp configuration file
sftp-config.json

# Package control specific files
Package Control.last-run
Package Control.ca-list
Package Control.ca-bundle
Package Control.system-ca-bundle
Package Control.cache/
Package Control.ca-certs/
Package Control.merged-ca-bundle
Package Control.user-ca-bundle
oscrypto-ca-bundle.crt
bh_unicode_properties.cache

# Sublime-github package stores a github token in this file
# https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings

### Vim ###
# swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-v][a-z]
[._]sw[a-p]
# session
Session.vim
# temporary
.netrwhist
# auto-generated tag files
tags

# End of https://www.gitignore.io/api/node,vim,git,macos,linux,sublimetext
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "nufacturing"]
path = nufacturing
url = https://github.com/gallimore-software/nufacturing
[submodule "clients/nufacturing"]
path = clients/nufacturing
url = https://github.com/gallimore-software/nufacturing
16 changes: 16 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

# Commit message file passed by Git
commit_msg_file="$1"

# Read the commit message
commit_msg=$(cat "$commit_msg_file")

# Define a regex pattern for the issue ID (adjust this pattern to match your issue IDs)
issue_id_pattern="NFG-[0-9]+"

# Check if the commit message matches the issue ID pattern
if ! echo "$commit_msg" | grep -qE "$issue_id_pattern"; then
echo "Error: Commit message must contain a valid issue ID (e.g., NFG-123)."
exit 1
fi
15 changes: 15 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
# This hook checks that branches are named according to the convention.

current_branch=$(git rev-parse --abbrev-ref HEAD)
branch_regex="^(feature|bugfix|hotfix|release)/NFG-[0-9]+-.+$"

if ! echo "$current_branch" | grep -Eq "$branch_regex"; then
echo "Error: Branch name '$current_branch' does not follow the naming convention."
echo "Please rename your branch to follow the convention: (feature|bugfix|hotfix|release)/NFG-123-description."
exit 1
fi

# Lint staged files
prettier $(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g') --write --ignore-unknown
git update-index --again
Loading