diff --git a/.githooks/post-receive b/.githooks/post-receive index 8f98dab..4a3d206 100644 --- a/.githooks/post-receive +++ b/.githooks/post-receive @@ -74,8 +74,8 @@ # Restart service (only for actual deployments) [[ -z "$custom_path" ]] && systemctl --user restart express-blog@"$branch".service - fi # End of branch check - set +x # Disable command tracing + fi # End of branch check + # set +x # Disable command tracing } update_node_pkgs() { @@ -172,10 +172,10 @@ } combine_css() { - set +e + set +u oldrev="$1" newrev="$2" - set -e + set -u # For live deployments, pass the oldrev, newrev, and MAIN_APP_BARE_REPO yarn --production=false combine:css "$oldrev" "$newrev" "$MAIN_APP_BARE_REPO" || { diff --git a/.githooks/pre-push b/.githooks/pre-push index af335e1..9b953a5 100755 --- a/.githooks/pre-push +++ b/.githooks/pre-push @@ -7,7 +7,7 @@ #export GIT_SSH_COMMAND="ssh -vvv" set -euo pipefail -set -x +# set -x npm run test:prepush @@ -19,3 +19,4 @@ cd content git push "$remote" main cd .. +# set +x diff --git a/package-lock.json b/package-lock.json index e4c539b..0a99081 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "": { "name": "express-blog", "version": "1.0.0", + "hasInstallScript": true, "license": "ISC", "dependencies": { "better-sqlite3": "^12.2.0", @@ -27,7 +28,6 @@ "marked": "^15.0.11", "morgan": "^1.10.0", "node-disk-info": "^1.3.0", - "node-fetch": "^2.7.0", "nodemailer": "^7.0.3", "nodemon": "^3.1.10", "path": "^0.12.7", @@ -46,6 +46,7 @@ "@faker-js/faker": "^9.8.0", "chai": "^5.2.1", "mocha": "^11.7.1", + "node-fetch": "^2.7.0", "pm2": "^6.0.6", "postcss": "^8.5.6", "postcss-import": "^16.1.1" @@ -5375,6 +5376,7 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, "license": "MIT", "dependencies": { "whatwg-url": "^5.0.0" @@ -7801,6 +7803,7 @@ "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true, "license": "MIT" }, "node_modules/triple-beam": { @@ -8075,12 +8078,14 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true, "license": "BSD-2-Clause" }, "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, "license": "MIT", "dependencies": { "tr46": "~0.0.3",