Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 14 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
GIT_SECRETS_PATH=$(which git-secrets)

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

git-secrets --register-aws > /dev/null
git-secrets --pre_commit_hook -- "$@"
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

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

The flag should be '--pre-commit-hook' (with hyphens) not '--pre_commit_hook' (with underscores). This is the correct flag name according to git-secrets documentation.

Suggested change
git-secrets --pre_commit_hook -- "$@"
git-secrets --pre-commit-hook -- "$@"

Copilot uses AI. Check for mistakes.

npm run fix
npm run check
npm test -- --run tests/unit
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we not do this - there's no reason to have this run as part of pre-commit.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is not the entire suite only the fast unit tests, I can remove but commits will still be red, I also moved it to pre-push, instead

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

as discussed offline I've removed tests and left only git-secrets we can revisit it later

40 changes: 40 additions & 0 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"scripts": {
"start": "node dist/index.js --transport http --loggers stderr mcp",
"start:stdio": "node dist/index.js --transport stdio --loggers stderr mcp",
"prepare": "npm run build",
"prepare": "husky",
"build:clean": "rm -rf dist",
"build:update-package-version": "tsx scripts/updatePackageVersion.ts",
"build:esm": "tsc --project tsconfig.esm.json && chmod +x dist/esm/index.js",
Expand Down Expand Up @@ -84,6 +84,7 @@
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.4",
"globals": "^16.3.0",
"husky": "^9.1.7",
"knip": "^5.63.1",
"mongodb": "^6.19.0",
"mongodb-runner": "^5.9.2",
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/fixtures/httpsServerProxyTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export class HTTPServerProxyTestSetup {
}

requests: IncomingMessage[];

// note: these are self-signed certs for testing purposes, DO NOT use in production
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@blva is this enough?

tlsOptions = Object.freeze({
key: readFileSync(path.resolve(__dirname, "server.key")),
cert: readFileSync(path.resolve(__dirname, "server.pem")),
Expand Down
Loading