Skip to content

Sequelize #70

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
14 changes: 9 additions & 5 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# Run commitlint with npx (no need for install)
npx --no-install commitlint --edit $1

# Section for git-secrets
if ! command -v git-secrets &> /dev/null 2>&1
then
GIT_SECRETS_PATH=$(which git-secrets 2>/dev/null)

if [ ! -x "$GIT_SECRETS_PATH" ]; then
echo "git-secrets is not installed. Please run 'brew install git-secrets' or visit https://github.com/awslabs/git-secrets#installing-git-secrets"
exit 1
fi

echo "Using git-secrets at: $GIT_SECRETS_PATH"

# Initialise git-secrets configuration
git-secrets --register-aws > /dev/null
$GIT_SECRETS_PATH --register-aws > /dev/null

echo "Running git-secrets..."
# Scans the commit message.
git-secrets --commit_msg_hook -- "$@"
# Scans the commit message
$GIT_SECRETS_PATH --commit_msg_hook -- "$@"
23 changes: 13 additions & 10 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# Section for git-secrets
if ! command -v git-secrets &> /dev/null 2>&1
then
echo "git-secrets is not installed. Please run 'brew install git-secrets' or visit https://github.com/awslabs/git-secrets#installing-git-secrets"
exit 1
# Dynamically find where git-secrets is
GIT_SECRETS_PATH=$(which git-secrets 2>/dev/null)

if [ ! -x "$GIT_SECRETS_PATH" ]; then
echo "git-secrets is not installed or not found in PATH."
echo "Install it: https://github.com/awslabs/git-secrets#installing-git-secrets"
exit 1
fi

# Initialise git-secrets configuration
git-secrets --register-aws > /dev/null
echo "Using git-secrets at: $GIT_SECRETS_PATH"

# Register AWS patterns (safe to run multiple times)
$GIT_SECRETS_PATH --register-aws > /dev/null

echo "Running git-secrets..."
# Scans all files that are about to be committed.
git-secrets --pre_commit_hook -- "$@"
$GIT_SECRETS_PATH --pre_commit_hook -- "$@"

npm test
npm test
18 changes: 11 additions & 7 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# Run commitizen to generate conventional commits
exec < /dev/tty && npx cz --hook || true

# Section for git-secrets
if ! command -v git-secrets &> /dev/null 2>&1
then
GIT_SECRETS_PATH=$(which git-secrets 2>/dev/null)

if [ ! -x "$GIT_SECRETS_PATH" ]; then
echo "git-secrets is not installed. Please run 'brew install git-secrets' or visit https://github.com/awslabs/git-secrets#installing-git-secrets"
exit 1
fi

# Initialise git-secrets configuration
git-secrets --register-aws > /dev/null
echo "Using git-secrets at: $GIT_SECRETS_PATH"

# Register AWS secrets patterns (safe to run multiple times)
$GIT_SECRETS_PATH --register-aws > /dev/null

echo "Running git-secrets..."
# Determines if merging in a commit will introduce tainted history.
git-secrets --prepare_commit_msg_hook -- "$@"
echo "Running git-secrets (prepare-commit-msg)..."
# Scans the commit message that is being prepared (e.g., merges, rebases)
$GIT_SECRETS_PATH --prepare_commit_msg_hook -- "$@"
179 changes: 177 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions services/subscription-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"@loopback/repository": "^7.0.9",
"@loopback/rest": "^14.0.9",
"@loopback/rest-explorer": "^7.0.9",
"@loopback/sequelize": "^0.6.12",
"@loopback/service-proxy": "^7.0.9",
"@opentelemetry/exporter-jaeger": "^1.15.0",
"@opentelemetry/plugin-dns": "^0.15.0",
Expand All @@ -88,6 +89,7 @@
"loopback4-authentication": "^12.1.1",
"loopback4-authorization": "^7.0.3",
"loopback4-billing": "^1.0.0",
"sequelize": "^6.37.7",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this optional dep

"swagger-stats": "^0.99.5",
"symlink-resolver": "0.2.1",
"tslib": "^2.6.2"
Expand All @@ -98,6 +100,7 @@
"@loopback/eslint-config": "^15.0.4",
"@loopback/testlab": "^7.0.8",
"@types/node": "^20.12.7",
"@types/sequelize": "^4.28.20",
"eslint": "^8.57.0",
"mochawesome": "^7.1.3",
"nodemon": "^2.0.21",
Expand Down
Loading
Loading