diff --git a/.husky/pre-commit b/.husky/pre-commit index ce909794..23e7e477 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,3 +1,11 @@ +if [ -z "${CI:-}" ]; then + if ! command -v ggshield >/dev/null 2>&1; then + echo "ggshield is not installed - secret scanning is skipped. Setup: https://contentstack.atlassian.net/wiki/x/FIDVEwE" >&2 + else + ggshield secret scan pre-commit || exit 1 + fi +fi + npm run prepack && npm run lint-staged && \ echo "\n\n Running secrets scan (Talisman + trufflehog)..." && \ sh .husky/secrets-scan.sh pre-commit && \ diff --git a/.husky/pre-push b/.husky/pre-push index afada158..29ed31a8 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1 +1,11 @@ -sh .husky/secrets-scan.sh pre-push "$@" && npm run test +PUSH_REFS=$(cat) + +if [ -z "${CI:-}" ]; then + if ! command -v ggshield >/dev/null 2>&1; then + echo "ggshield is not installed - secret scanning is skipped. Setup: https://contentstack.atlassian.net/wiki/x/FIDVEwE" >&2 + else + printf '%s\n' "$PUSH_REFS" | ggshield secret scan pre-push "$@" || exit 1 + fi +fi + +printf '%s\n' "$PUSH_REFS" | sh .husky/secrets-scan.sh pre-push "$@" && npm run test diff --git a/.talismanrc b/.talismanrc index 4c986bc9..94226f3d 100644 --- a/.talismanrc +++ b/.talismanrc @@ -1,4 +1,10 @@ fileignoreconfig: +- filename: src/uploads/upload.archive.test.ts + checksum: acb351da519f0882e49c776bc80309d238ab2c8a7c78b67e7c8e60f050466f13 +- filename: .husky/pre-commit + checksum: 3218c6bfcee49d16217ea6d6348845cf242c9a69f90e3404570e17c9b0bd6940 +- filename: .husky/pre-push + checksum: 99ff9e76815cab7d7789118492e57d225f3490d11aea30b199464b5a6e0fb073 - filename: src/logs/logs.inputs.test.ts checksum: 0cff0288003a5ef8aeefe7175f3b46232f97215925b62498ef610225cbee9fa4 - filename: test/integration/logs-get.test.ts @@ -487,7 +493,7 @@ fileignoreconfig: - filename: src/commands/launch/secrets/list.test.ts checksum: 109d1165d7ce16943b50955f60fd8a753a870115fdf5501fb2a5e4a1cf436eaa - filename: package.json - checksum: 0b0b5e1591470d46665b0f06f7cc422e87a438064a9aa3967b52778e3a994268 + checksum: e063972c712cf5d0a50d090e09218362e303273817b4544fa884912b0e392d93 - filename: test/integration/secrets-set.test.ts checksum: 2527d5d35198cc08e1859ab79941338392b6d4fcbc87506adef6d7b096089963 - filename: src/secrets/secret.rules.test.ts diff --git a/package-lock.json b/package-lock.json index 48ca4cf6..de617672 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@contentstack/cli-command": "^2.0.2", "@contentstack/cli-utilities": "^2.0.2", - "@oclif/core": "^4.2.7", + "@oclif/core": "^4.14.0", "@oclif/plugin-help": "^6.2.25", "@rollup/plugin-commonjs": "^28.0.9", "@rollup/plugin-json": "^6.1.0", @@ -2323,9 +2323,9 @@ } }, "node_modules/@isaacs/nonrecursive-glob-match": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@isaacs/nonrecursive-glob-match/-/nonrecursive-glob-match-1.0.3.tgz", - "integrity": "sha512-SI7kyKHq4XXDRozw+r9GlRZkia1ZkFrpLW98r2IC2Bpr8YkFGE3fvjzmxCG0x78A++69HmDNrDvSMYBZmHGpKA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@isaacs/nonrecursive-glob-match/-/nonrecursive-glob-match-1.1.0.tgz", + "integrity": "sha512-GPm/Dbvk5RLmhRnxXIa7nTpK0xtl4E0wj0MslsuNiJ1FIROU+2+9lgUC/dgF7Ey4QCWhfEsgxilMRMCdHPfDfw==", "license": "BlueOak-1.0.0" }, "node_modules/@istanbuljs/load-nyc-config": { @@ -3926,15 +3926,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.63.0", + "version": "8.74.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.74.0.tgz", + "integrity": "sha512-z3KXk1+Vm+d82ZRplOoC89ho4Rf1da5ju6sx8//92GnN532U62DGPjECXkkVqtYzIv0zoJlpO39SX2Z9tk6LVw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.63.0", - "@typescript-eslint/type-utils": "8.63.0", - "@typescript-eslint/utils": "8.63.0", - "@typescript-eslint/visitor-keys": "8.63.0", + "@typescript-eslint/scope-manager": "8.74.0", + "@typescript-eslint/type-utils": "8.74.0", + "@typescript-eslint/utils": "8.74.0", + "@typescript-eslint/visitor-keys": "8.74.0", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.5.0" @@ -3947,7 +3949,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.63.0", + "@typescript-eslint/parser": "^8.74.0", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } @@ -3961,14 +3963,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.63.0", + "version": "8.74.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.74.0.tgz", + "integrity": "sha512-ecr8AYdig7avVkxaHdQvxHnIJ/mOyliO4Gv/uWF8q69vBew/z3sexqBwHUZX5Vql+Ns0w4sH6gBLkICGbOvJkA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.63.0", - "@typescript-eslint/types": "8.63.0", - "@typescript-eslint/typescript-estree": "8.63.0", - "@typescript-eslint/visitor-keys": "8.63.0", + "@typescript-eslint/scope-manager": "8.74.0", + "@typescript-eslint/types": "8.74.0", + "@typescript-eslint/typescript-estree": "8.74.0", + "@typescript-eslint/visitor-keys": "8.74.0", "debug": "^4.4.3" }, "engines": { @@ -3984,12 +3988,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.63.0", + "version": "8.74.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.74.0.tgz", + "integrity": "sha512-z/mymuE+JlEeSFIv3Mo70EvgG1Zz74Hl0IDfExfXutARAP834bt+MppTD7mVAwmZO0GdxdOAi0jbTam749eH6g==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.63.0", - "@typescript-eslint/types": "^8.63.0", + "@typescript-eslint/tsconfig-utils": "^8.74.0", + "@typescript-eslint/types": "^8.74.0", "debug": "^4.4.3" }, "engines": { @@ -4004,12 +4010,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.63.0", + "version": "8.74.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.74.0.tgz", + "integrity": "sha512-kpOdpu4CpWN5U38ox3f727DwWRBtUAVhyUJtqTBYe5gf2wYoxac7PgKP14txrxN7ICVtcjlLdzjqfRgpSnDKvQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.63.0", - "@typescript-eslint/visitor-keys": "8.63.0" + "@typescript-eslint/types": "8.74.0", + "@typescript-eslint/visitor-keys": "8.74.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4020,7 +4028,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.63.0", + "version": "8.74.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.74.0.tgz", + "integrity": "sha512-p07wAuaS6BjCYgOSXKJi4YhvTnAf7fiG37e9THcpnYaQEt2QiTTYZWKwUFNgeRiywiMudazhzgddAirZ0GgHtQ==", "dev": true, "license": "MIT", "engines": { @@ -4035,13 +4045,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.63.0", + "version": "8.74.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.74.0.tgz", + "integrity": "sha512-CV3Y3la8l3F9ANfxcfpgSSiQgJTe4IeLEoZV4O/gcW86Ugp8X6SKiQ0vm+QegXaRIbbDMokZZSF3A1CgiU/kPw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.63.0", - "@typescript-eslint/typescript-estree": "8.63.0", - "@typescript-eslint/utils": "8.63.0", + "@typescript-eslint/types": "8.74.0", + "@typescript-eslint/typescript-estree": "8.74.0", + "@typescript-eslint/utils": "8.74.0", "debug": "^4.4.3", "ts-api-utils": "^2.5.0" }, @@ -4058,7 +4070,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.63.0", + "version": "8.74.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.74.0.tgz", + "integrity": "sha512-MpnMrJCVNpP1iVL8NiHkQZgQqIMBH5ewDGUPBh1pqQXwFtMFjsl1M03QcYPXmv6stCKEiF0PN7CGbU1ZbXFzEA==", "dev": true, "license": "MIT", "engines": { @@ -4070,16 +4084,18 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.63.0", + "version": "8.74.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.74.0.tgz", + "integrity": "sha512-wL348k6l92DNG+kPP5rVpKwNBoz7a3xRZy3TPKc1uymQttd7u7gcMv3eENmcuh4CjC4mO3FTM0DYstFXMyDLuw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.63.0", - "@typescript-eslint/tsconfig-utils": "8.63.0", - "@typescript-eslint/types": "8.63.0", - "@typescript-eslint/visitor-keys": "8.63.0", + "@typescript-eslint/project-service": "8.74.0", + "@typescript-eslint/tsconfig-utils": "8.74.0", + "@typescript-eslint/types": "8.74.0", + "@typescript-eslint/visitor-keys": "8.74.0", "debug": "^4.4.3", - "minimatch": "^10.2.2", + "minimatch": "^11.0.1", "semver": "^7.7.3", "tinyglobby": "^0.2.15", "ts-api-utils": "^2.5.0" @@ -4092,18 +4108,26 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { + "@typescript/native": "npm:typescript@>=7.1.0-dev.20261009.1 || >=7.1.0-beta <7.1.0-dev", "typescript": ">=4.8.4 <6.1.0" + }, + "peerDependenciesMeta": { + "@typescript/native": { + "optional": true + } } }, "node_modules/@typescript-eslint/utils": { - "version": "8.63.0", + "version": "8.74.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.74.0.tgz", + "integrity": "sha512-IpWXPxXXomzxyTcvjhZJexgdvtTR1TooLAPpuxzaGqQ8BHll1lf4Ysp/BTE/l0U5TJ+x1j7B4bEM8pLRrvY+XA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.63.0", - "@typescript-eslint/types": "8.63.0", - "@typescript-eslint/typescript-estree": "8.63.0" + "@typescript-eslint/scope-manager": "8.74.0", + "@typescript-eslint/types": "8.74.0", + "@typescript-eslint/typescript-estree": "8.74.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4118,11 +4142,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.63.0", + "version": "8.74.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.74.0.tgz", + "integrity": "sha512-XSZmOtMUbWCBIM+2BK134FyMFxmll1mW2mPLk/PSwYQYzGIPMgJAqL929U4qXVizLv7Xq5b7r41/o7Ombuwk0g==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.63.0", + "@typescript-eslint/types": "8.74.0", "eslint-visitor-keys": "^5.0.0" }, "engines": { @@ -4135,6 +4161,8 @@ }, "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -6543,7 +6571,9 @@ } }, "node_modules/eslint-config-oclif": { - "version": "6.0.176", + "version": "6.0.179", + "resolved": "https://registry.npmjs.org/eslint-config-oclif/-/eslint-config-oclif-6.0.179.tgz", + "integrity": "sha512-V0FZS3LpawI3slJIL0/Z1Qhs11ufhcVeQs4t1y8MDSw43UWAXGiRxByMO4xNLCdAwTDrC6dY4MsX7XEKiw6euA==", "dev": true, "license": "MIT", "dependencies": { @@ -6562,7 +6592,7 @@ "eslint-plugin-n": "^17.24.0", "eslint-plugin-perfectionist": "^4", "eslint-plugin-unicorn": "^56.0.1", - "typescript-eslint": "^8.63.0" + "typescript-eslint": "^8.65.0" }, "engines": { "node": ">=18.18.0" @@ -7901,11 +7931,13 @@ "license": "MIT" }, "node_modules/handlebars": { - "version": "4.7.9", + "version": "4.7.10", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.10.tgz", + "integrity": "sha512-P5VJMVM7qgBn6vjXMw8WG9uVI+ncf2pi72j4de4yz5ZULLj2RGqLYaKOYGsgyrViQ0tePOVlN1tDCCXXtFqXKg==", "dev": true, "license": "MIT", "dependencies": { - "minimist": "^1.2.5", + "minimist": "^1.2.8", "neo-async": "^2.6.2", "source-map": "^0.6.1", "wordwrap": "^1.0.0" @@ -10801,23 +10833,26 @@ } }, "node_modules/minimatch": { - "version": "10.2.5", + "version": "11.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.9.tgz", + "integrity": "sha512-KCFkfyjqerNlSstjlhIGNXIKZGA/6O4V4RlhZ+Dsr621SPPw0mzlypE9D9ZOoPiVefHID+j7/XuMMlqfD/F60Q==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^5.0.5" + "@isaacs/nonrecursive-glob-match": "^1.1.0", + "brace-expansion": "^5.0.12" }, "engines": { - "node": "18 || 20 || >=22" + "node": "20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/minimatch/node_modules/brace-expansion": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", - "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.1.0.tgz", + "integrity": "sha512-aa11Dv491GKnYqxaul3aRJ0szew7yMJMfZPnqD44NjGrZXoj62l41OEDDpdpC4eE2P88vBFfLuSyRhpG91NUvg==", "dev": true, "license": "MIT", "dependencies": { @@ -13054,11 +13089,13 @@ } }, "node_modules/source-map-js": { - "version": "1.2.1", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.4.tgz", + "integrity": "sha512-J7ZjMvHd9O1fcT/5V09QWaaSl2BbWx3F6O08spde82Namf9UB0GxRVIPiNbVsdKkoizHiSpTodo3vp2bAy91MA==", "dev": true, "license": "BSD-3-Clause", "engines": { - "node": ">=0.10.0" + "node": ">=6.0.0" } }, "node_modules/source-map-support": { @@ -13846,14 +13883,16 @@ } }, "node_modules/typescript-eslint": { - "version": "8.63.0", + "version": "8.74.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.74.0.tgz", + "integrity": "sha512-OsWQlsedt1ZpZXfZZMNK3m4SoQONFFcy4h/uRznsCeRfVuEic3gh4KGUs2pJJ5o0Jj0Jr7keUHQGN1Ns9aDw7Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.63.0", - "@typescript-eslint/parser": "8.63.0", - "@typescript-eslint/typescript-estree": "8.63.0", - "@typescript-eslint/utils": "8.63.0" + "@typescript-eslint/eslint-plugin": "8.74.0", + "@typescript-eslint/parser": "8.74.0", + "@typescript-eslint/typescript-estree": "8.74.0", + "@typescript-eslint/utils": "8.74.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" diff --git a/package.json b/package.json index e5d12754..bdc79183 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "dependencies": { "@contentstack/cli-command": "^2.0.2", "@contentstack/cli-utilities": "^2.0.2", - "@oclif/core": "^4.2.7", + "@oclif/core": "^4.14.0", "@oclif/plugin-help": "^6.2.25", "@rollup/plugin-commonjs": "^28.0.9", "@rollup/plugin-json": "^6.1.0",