From 85f37acd5730e19323d295a10d7c56ec229715d3 Mon Sep 17 00:00:00 2001 From: Henry Bell Date: Fri, 26 Apr 2024 08:53:09 +0100 Subject: [PATCH] feat: Add npm run command for end-to-end tests, sort list (#279) --- package.json | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index e7a7c5d7..49b57e74 100644 --- a/package.json +++ b/package.json @@ -7,25 +7,27 @@ "author": "Google Inc.", "main": "src/functions.js", "scripts": { + "check-format": "prettier --check .", + "check-update-all": "ncu", + "debug-poller-function": "node --inspect node_modules/@google-cloud/functions-framework --target=checkSpannerScaleMetricsHTTP", + "debug-scaler-function": "node --inspect node_modules/@google-cloud/functions-framework --target=scaleSpannerInstanceHTTP --port=8081", + "debug-forwarder-function": "node --inspect node_modules/@google-cloud/functions-framework --target=forwardFromHTTP", "eslint": "eslint .", "eslint-fix": "eslint --fix .", - "check-format": "prettier --check .", "format": "prettier --write .", - "prettier": "prettier --write .", - "typecheck": "tsc --project jsconfig.json --maxNodeModuleJsDepth 0 --noEmit", - "mdlint": "markdownlint '**/*.md' --config .mdl.json --ignore '**/node_modules/**' --ignore 'code-of-conduct.md' --ignore 'CHANGELOG.md'", "install-all": "npm install --save", - "test": "NODE_ENV=test nyc --reporter=text mocha --recursive src --extension=.test.js", - "unified-job": "node -e \"require('./src/unifiedScaler').main()\"", + "mdlint": "markdownlint '**/*.md' --config .mdl.json --ignore '**/node_modules/**' --ignore 'code-of-conduct.md' --ignore 'CHANGELOG.md'", "poller-job": "node -e \"require('./src/poller/index').main()\"", - "scaler-service": "node -e \"require('./src/scaler/index').main()\"", - "poller-function": "functions-framework --target=checkSpannerScaleMetricsHTTP", - "scaler-function": "functions-framework --target=scaleSpannerInstanceHTTP --port=8081", - "forwarder-function": "functions-framework --target=forwardFromHTTP", - "debug-poller-function": "node --inspect node_modules/@google-cloud/functions-framework --target=checkSpannerScaleMetricsHTTP", - "debug-scaler-function": "node --inspect node_modules/@google-cloud/functions-framework --target=scaleSpannerInstanceHTTP --port=8081", - "debug-forwarder-function": "node --inspect node_modules/@google-cloud/functions-framework --target=forwardFromHTTP", "prepare": "{ git rev-parse --is-inside-work-tree >/dev/null 2>/dev/null && test \"$NODE_ENV\" != production -a \"$CI\" != true && husky ; } || true", + "prettier": "prettier --write .", + "scaler-service": "node -e \"require('./src/scaler/index').main()\"", + "start-forwarder-function": "functions-framework --target=forwardFromHTTP", + "start-poller-function": "functions-framework --target=checkSpannerScaleMetricsHTTP", + "start-scaler-function": "functions-framework --target=scaleSpannerInstanceHTTP --port=8081", + "test": "NODE_ENV=test nyc --reporter=text mocha --recursive src --extension=.test.js", + "test-e2e": "pushd terraform/cloud-functions/per-project/test && go test -run . -timeout 60m --tags=e2e && popd", + "typecheck": "tsc --project jsconfig.json --maxNodeModuleJsDepth 0 --noEmit", + "unified-job": "node -e \"require('./src/unifiedScaler').main()\"", "update-all": "ncu -u" }, "dependencies": {