From c69593133603ac8f73a3d0d406c90c5e41262856 Mon Sep 17 00:00:00 2001 From: Simon Hanukaev Date: Wed, 5 Jun 2024 23:53:37 +0300 Subject: [PATCH] fix: adds html injections to dev proxy [CRE-1203] (#6686) feat: [CRE-1203] added html injections to dev proxy --- package-lock.json | 905 ++++++------------ package.json | 8 +- src/commands/base-command.ts | 1 - src/commands/dev/dev.ts | 1 - src/commands/types.d.ts | 26 +- src/utils/proxy.ts | 78 +- .../commands/dev/responses.dev.test.js | 100 ++ 7 files changed, 488 insertions(+), 631 deletions(-) diff --git a/package-lock.json b/package-lock.json index 197befa52e0..527bbcf6432 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,13 +13,13 @@ "@bugsnag/js": "7.23.0", "@fastify/static": "7.0.4", "@netlify/blobs": "7.3.0", - "@netlify/build": "29.46.2", + "@netlify/build": "29.46.4", "@netlify/build-info": "7.13.2", - "@netlify/config": "20.13.2", + "@netlify/config": "20.14.1", "@netlify/edge-bundler": "12.0.1", "@netlify/edge-functions": "2.8.1", "@netlify/local-functions-proxy": "1.1.1", - "@netlify/zip-it-and-ship-it": "9.34.0", + "@netlify/zip-it-and-ship-it": "9.34.1", "@octokit/rest": "20.1.1", "@opentelemetry/api": "1.8.0", "ansi-escapes": "7.0.0", @@ -131,7 +131,7 @@ }, "devDependencies": { "@babel/preset-react": "7.24.6", - "@netlify/eslint-config-node": "7.0.0", + "@netlify/eslint-config-node": "7.0.1", "@netlify/functions": "2.7.0", "@sindresorhus/slugify": "2.2.1", "@types/fs-extra": "11.0.4", @@ -368,20 +368,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-annotate-as-pure/node_modules/@babel/types": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.6.tgz", - "integrity": "sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.24.6", - "@babel/helper-validator-identifier": "^7.24.6", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-compilation-targets": { "version": "7.22.15", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", @@ -468,20 +454,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-module-imports/node_modules/@babel/types": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.6.tgz", - "integrity": "sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.24.6", - "@babel/helper-validator-identifier": "^7.24.6", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-module-transforms": { "version": "7.23.0", "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz", @@ -712,20 +684,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-react-jsx/node_modules/@babel/types": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.6.tgz", - "integrity": "sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.24.6", - "@babel/helper-validator-identifier": "^7.24.6", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/plugin-transform-react-pure-annotations": { "version": "7.24.6", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.24.6.tgz", @@ -810,12 +768,12 @@ } }, "node_modules/@babel/types": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.5.tgz", - "integrity": "sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.6.tgz", + "integrity": "sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ==", "dependencies": { - "@babel/helper-string-parser": "^7.24.1", - "@babel/helper-validator-identifier": "^7.24.5", + "@babel/helper-string-parser": "^7.24.6", + "@babel/helper-validator-identifier": "^7.24.6", "to-fast-properties": "^2.0.0" }, "engines": { @@ -1546,12 +1504,12 @@ } }, "node_modules/@dependents/detective-less": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@dependents/detective-less/-/detective-less-4.0.0.tgz", - "integrity": "sha512-0udn+HKjGUzTX4Z+0vXdEJVsO28gxy5QxWjeChK4ZH+bwdvIXLuztiGZk8wLyAG1+LNZ5haVHKr5j1XfJnAkyQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@dependents/detective-less/-/detective-less-4.1.0.tgz", + "integrity": "sha512-KrkT6qO5NxqNfy68sBl6CTSoJ4SNDIS5iQArkibhlbGU4LaDukZ3q2HIkh8aUKDio6o4itU4xDR7t82Y2eP1Bg==", "dependencies": { "gonzales-pe": "^4.3.0", - "node-source-walk": "^6.0.0" + "node-source-walk": "^6.0.1" }, "engines": { "node": ">=14" @@ -2431,22 +2389,22 @@ } }, "node_modules/@netlify/build": { - "version": "29.46.2", - "resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.46.2.tgz", - "integrity": "sha512-xeQpYVEYK+1/vp9CQLFDPCaIgWlxHDaPOGMGs3c3xWyeNvjHOzeccESBY9GH39oO/ueEyFvq1dDa2i+blk5Nkg==", + "version": "29.46.4", + "resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.46.4.tgz", + "integrity": "sha512-BDewb88h9lQXHcTjaLl8j6RxTWhMMna9BfazcUBa4XkSWXDOlSxCln23x8XysssJV2o+teUaYsq5TRsHIEevRQ==", "dependencies": { "@bugsnag/js": "^7.0.0", "@netlify/blobs": "^7.3.0", "@netlify/cache-utils": "^5.1.5", - "@netlify/config": "^20.13.2", + "@netlify/config": "^20.14.1", "@netlify/edge-bundler": "12.0.1", "@netlify/framework-info": "^9.8.13", - "@netlify/functions-utils": "^5.2.60", + "@netlify/functions-utils": "^5.2.61", "@netlify/git-utils": "^5.1.1", "@netlify/opentelemetry-utils": "^1.2.1", "@netlify/plugins-list": "^6.80.0", "@netlify/run-utils": "^5.1.1", - "@netlify/zip-it-and-ship-it": "9.34.0", + "@netlify/zip-it-and-ship-it": "9.34.1", "@sindresorhus/slugify": "^2.0.0", "ansi-escapes": "^6.0.0", "chalk": "^5.0.0", @@ -2983,9 +2941,9 @@ } }, "node_modules/@netlify/config": { - "version": "20.13.2", - "resolved": "https://registry.npmjs.org/@netlify/config/-/config-20.13.2.tgz", - "integrity": "sha512-2LpzpnOQX7vALF+Q2efmgBrtbXWPqwKwI9Pmc3/tE9PxeaFfBvIyBDiknqMe/NozoeYgsznZV0WwLIzN3KgOzA==", + "version": "20.14.1", + "resolved": "https://registry.npmjs.org/@netlify/config/-/config-20.14.1.tgz", + "integrity": "sha512-AZxkQukahhtypCrOujc4RJTU9sSzNkWAqQVP/j5be2vsrhKqjoFp/88zjqHT0Sy5vhWbENaOv5nPAAaUG9hUHw==", "dependencies": { "@iarna/toml": "^2.2.5", "chalk": "^5.0.0", @@ -3858,9 +3816,9 @@ "integrity": "sha512-BoAz/gCWHLn9DVugGViORbWFDqaqrB/JHM+9N+ahk7U6C3EwaFojnnGKCMrQ65f2YOi6Wwlue1ZZO+8mq43RZA==" }, "node_modules/@netlify/eslint-config-node": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@netlify/eslint-config-node/-/eslint-config-node-7.0.0.tgz", - "integrity": "sha512-RLt38yqNWDEfznHYnuhbbzlAGlHzZoWLezQBKzFsyu7A5oHMphjHN6fGek/6TUj2zZZRTBPW9m6ETnzWsUDwcg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@netlify/eslint-config-node/-/eslint-config-node-7.0.1.tgz", + "integrity": "sha512-4xAE0lM3BaVOZu1Oil5Yy1FsiYjZwNS/uwE+4fY61Buuyv3An16mC9LbNCxQ5EFzo3g7U2SRyZdGBHM6ACRLpw==", "dev": true, "dependencies": { "@babel/core": "^7.13.8", @@ -3872,7 +3830,7 @@ "cross-env": "^7.0.2", "eslint": "^8.0.0", "eslint-config-prettier": "^8.0.0", - "eslint-config-standard": "^17.0.0-1", + "eslint-config-standard": "^17.0.0", "eslint-formatter-codeframe": "^7.32.1", "eslint-import-resolver-node": "^0.3.4", "eslint-import-resolver-typescript": "^3.0.0", @@ -3880,10 +3838,10 @@ "eslint-plugin-cypress": "^2.12.1", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-fp": "^2.3.0", - "eslint-plugin-html": "^6.1.0", + "eslint-plugin-html": "^7.0.0", "eslint-plugin-import": "^2.25.1", "eslint-plugin-markdown": "^3.0.0", - "eslint-plugin-n": "^14.0.0", + "eslint-plugin-n": "^15.2.4", "eslint-plugin-promise": "^6.0.0", "eslint-plugin-react": "^7.21.5", "eslint-plugin-unicorn": "^43.0.0", @@ -4133,11 +4091,11 @@ } }, "node_modules/@netlify/functions-utils": { - "version": "5.2.60", - "resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.2.60.tgz", - "integrity": "sha512-gTzrajMk4rkJgDQnKprVB/wanQja6vF8NRfL8KW5eiVDWKaLqNqWpZmYOp80uD2k9Oxvowt6+BjPupwkOORKWA==", + "version": "5.2.61", + "resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.2.61.tgz", + "integrity": "sha512-u0vikp0Gycg7d1vzNBGLn+fZiFmlKHtZQkAnCZszLFuYmZPRe1s7mx2QHnVNSnlgB9RwlzZh4/CMO5pgQhNrkw==", "dependencies": { - "@netlify/zip-it-and-ship-it": "9.34.0", + "@netlify/zip-it-and-ship-it": "9.34.1", "cpy": "^9.0.0", "path-exists": "^5.0.0" }, @@ -4611,12 +4569,12 @@ } }, "node_modules/@netlify/zip-it-and-ship-it": { - "version": "9.34.0", - "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-9.34.0.tgz", - "integrity": "sha512-nv3UVZGbZDaAmkqmBqpEAhKihBB3sHEJqu2GUHujSdRJ6oZy8J5/jCSz0kmWTdzKTrcF+Y74QnNRLU83sQMqxg==", + "version": "9.34.1", + "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-9.34.1.tgz", + "integrity": "sha512-6yOc8xKJB+zEdEwMKVmeUTaO8zE9bEvhOAB3L1ekavhGWESZ5EPe+kyzxc65C1GbEdOkfyN09I37cJZH/O3c0A==", "dependencies": { "@babel/parser": "^7.22.5", - "@babel/types": "7.24.5", + "@babel/types": "7.24.6", "@netlify/binary-info": "^1.0.0", "@netlify/serverless-functions-api": "^1.18.2", "@vercel/nft": "^0.23.0", @@ -7865,15 +7823,15 @@ } }, "node_modules/archiver-utils/node_modules/glob": { - "version": "10.3.16", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.16.tgz", - "integrity": "sha512-JDKXl1DiuuHJ6fVS2FXjownaavciiHNUU4mOvV/B793RLh05vZL1rcPnCSaOgv1hDT6RDlY7AB7ZUvFYAtPgAw==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", + "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", - "minimatch": "^9.0.1", - "minipass": "^7.0.4", - "path-scurry": "^1.11.0" + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" @@ -7928,9 +7886,9 @@ } }, "node_modules/archiver-utils/node_modules/minipass": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.1.tgz", - "integrity": "sha512-UZ7eQ+h8ywIRAW1hIEl2AqdwzJucU/Kp59+8kkZeSvafXhZjul247BvIJjEVFVeON6d7lM46XX1HXCduKAS8VA==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "engines": { "node": ">=16 || 14 >=14.17" } @@ -8669,9 +8627,9 @@ } }, "node_modules/builtins": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.0.tgz", - "integrity": "sha512-aizhtbxgT1Udg0Fj6GssXshAVK+nxbtCV+1OtTrMNy67jffDFBY6CUBAkhO4owbleAx6fdbnWdpsmmcXydbzNw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.1.0.tgz", + "integrity": "sha512-SW9lzGTLvWTP1AY8xeAMZimqDrIaSdLQUcVr9DMef51niJ022Ri87SwRRKYm4A6iHfkPaiVUu/Duw2Wc4J7kKg==", "dependencies": { "semver": "^7.0.0" } @@ -10202,57 +10160,6 @@ "url": "https://github.com/sponsors/fb55" } }, - "node_modules/css-select/node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/css-select/node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/css-select/node_modules/domutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", - "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/css-select/node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, "node_modules/css-tree": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", @@ -10470,12 +10377,13 @@ "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true }, "node_modules/deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "engines": { "node": ">=0.10.0" } @@ -10571,14 +10479,14 @@ } }, "node_modules/detective-amd": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/detective-amd/-/detective-amd-5.0.1.tgz", - "integrity": "sha512-e7n0E0Wte78U9lcpl3hsTh1ZJ+zp/rgEbdbzGLgTowSbbSemuHnM8olp4KHMF1eCaurrCE50IU9VkoV13ezK4A==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/detective-amd/-/detective-amd-5.0.2.tgz", + "integrity": "sha512-XFd/VEQ76HSpym80zxM68ieB77unNuoMwopU2TFT/ErUk5n4KvUTwW4beafAVUugrjV48l4BmmR0rh2MglBaiA==", "dependencies": { "ast-module-types": "^5.0.0", "escodegen": "^2.0.0", - "get-amd-module-type": "^5.0.0", - "node-source-walk": "^6.0.0" + "get-amd-module-type": "^5.0.1", + "node-source-walk": "^6.0.1" }, "bin": { "detective-amd": "bin/cli.js" @@ -10656,14 +10564,14 @@ } }, "node_modules/detective-typescript": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/detective-typescript/-/detective-typescript-11.0.1.tgz", - "integrity": "sha512-pVCuFWdEAyHI16zO3NBWSAULV8pevSkX3gwK8w3y9RrBGUrig6wDvwv6vUpnu+HfOr0MDmjMkmJGNWaTb6+HkA==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/detective-typescript/-/detective-typescript-11.2.0.tgz", + "integrity": "sha512-ARFxjzizOhPqs1fYC/2NMC3N4jrQ6HvVflnXBTRqNEqJuXwyKLRr9CrJwkRcV/SnZt1sNXgsF6FPm0x57Tq0rw==", "dependencies": { - "@typescript-eslint/typescript-estree": "^5.59.2", + "@typescript-eslint/typescript-estree": "^5.62.0", "ast-module-types": "^5.0.0", - "node-source-walk": "^6.0.0", - "typescript": "^5.0.4" + "node-source-walk": "^6.0.2", + "typescript": "^5.4.4" }, "engines": { "node": "^14.14.0 || >=16.0.0" @@ -10734,6 +10642,18 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/detective-typescript/node_modules/typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/diff": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", @@ -10776,28 +10696,18 @@ } }, "node_modules/dom-serializer": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", - "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", - "dev": true, + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" }, "funding": { "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" } }, - "node_modules/dom-serializer/node_modules/entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "dev": true, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, "node_modules/domelementtype": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", @@ -10810,12 +10720,11 @@ ] }, "node_modules/domhandler": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", - "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", - "dev": true, + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", "dependencies": { - "domelementtype": "^2.2.0" + "domelementtype": "^2.3.0" }, "engines": { "node": ">= 4" @@ -10825,14 +10734,13 @@ } }, "node_modules/domutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", - "dev": true, + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", + "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", "dependencies": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" }, "funding": { "url": "https://github.com/fb55/domutils?sponsor=1" @@ -10972,10 +10880,9 @@ } }, "node_modules/entities": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", - "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", - "dev": true, + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "engines": { "node": ">=0.12" }, @@ -11067,9 +10974,9 @@ } }, "node_modules/es-module-lexer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.0.3.tgz", - "integrity": "sha512-iC67eXHToclrlVhQfpRawDiF8D8sQxNxmbqw5oebegOaJkyx/w9C/k57/5e6yJR2zIByRt9OXdqX50DV2t6ZKw==" + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.3.tgz", + "integrity": "sha512-i1gCgmR9dCl6Vil6UKPI/trA69s08g/syhiDK9TG0Nf1RJjjFI+AzoWW7sPufzkgYAn861skuCwJa0pIIHYxvg==" }, "node_modules/es-to-primitive": { "version": "1.2.1", @@ -11167,14 +11074,13 @@ } }, "node_modules/escodegen": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", - "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", "dependencies": { "esprima": "^4.0.1", "estraverse": "^5.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1" + "esutils": "^2.0.2" }, "bin": { "escodegen": "bin/escodegen.js", @@ -11187,62 +11093,6 @@ "source-map": "~0.6.1" } }, - "node_modules/escodegen/node_modules/levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", - "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/escodegen/node_modules/type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", - "dependencies": { - "prelude-ls": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/eslint": { "version": "8.20.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz", @@ -11321,9 +11171,9 @@ } }, "node_modules/eslint-config-standard": { - "version": "17.0.0-1", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.0.0-1.tgz", - "integrity": "sha512-aqRG58dqoBNfOLN+PsitasxmW+W9Os4oQrx081B16T4E4WogsSbpUL6hnKSnyv35sSRYA2XjBtKMOrUboL6jgw==", + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.1.0.tgz", + "integrity": "sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q==", "dev": true, "funding": [ { @@ -11339,10 +11189,13 @@ "url": "https://feross.org/support" } ], + "engines": { + "node": ">=12.0.0" + }, "peerDependencies": { "eslint": "^8.0.1", "eslint-plugin-import": "^2.25.2", - "eslint-plugin-n": "^14.0.0", + "eslint-plugin-n": "^15.0.0 || ^16.0.0 ", "eslint-plugin-promise": "^6.0.0" } }, @@ -11725,12 +11578,12 @@ } }, "node_modules/eslint-plugin-html": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-6.2.0.tgz", - "integrity": "sha512-vi3NW0E8AJombTvt8beMwkL1R/fdRWl4QSNRNMhVQKWm36/X0KF0unGNAY4mqUF06mnwVWZcIcerrCnfn9025g==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-7.1.0.tgz", + "integrity": "sha512-fNLRraV/e6j8e3XYOC9xgND4j+U7b1Rq+OygMlLcMg+wI/IpVbF+ubQa3R78EjKB9njT6TQOlcK5rFKBVVtdfg==", "dev": true, "dependencies": { - "htmlparser2": "^7.1.2" + "htmlparser2": "^8.0.1" } }, "node_modules/eslint-plugin-import": { @@ -11820,18 +11673,19 @@ } }, "node_modules/eslint-plugin-n": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-14.0.0.tgz", - "integrity": "sha512-mNwplPLsbaKhHyA0fa/cy8j+oF6bF6l81hzBTWa6JOvPcMNAuIogk2ih6d9tYvWYzyUG+7ZFeChqbzdFpg2QrQ==", + "version": "15.7.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.7.0.tgz", + "integrity": "sha512-jDex9s7D/Qial8AGVIHq4W7NswpUD5DPDL2RH8Lzd9EloWUuvUkHfv4FRLMipH5q2UtyurorBkPeNi1wVWNh3Q==", "dev": true, "dependencies": { + "builtins": "^5.0.1", "eslint-plugin-es": "^4.1.0", "eslint-utils": "^3.0.0", "ignore": "^5.1.1", - "is-core-module": "^2.3.0", - "minimatch": "^3.0.4", - "resolve": "^1.10.1", - "semver": "^6.1.0" + "is-core-module": "^2.11.0", + "minimatch": "^3.1.2", + "resolve": "^1.22.1", + "semver": "^7.3.8" }, "engines": { "node": ">=12.22.0" @@ -11860,25 +11714,19 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/eslint-plugin-n/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/eslint-plugin-promise": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.0.tgz", - "integrity": "sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.2.0.tgz", + "integrity": "sha512-QmAqwizauvnKOlifxyDj2ObfULpHQawlg/zQdgEixur9vl0CvZGv/LCJV2rtj3210QCoeGBzVMfMXqGAOr/4fA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, + "funding": { + "url": "https://opencollective.com/eslint" + }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" } }, "node_modules/eslint-plugin-react": { @@ -12810,7 +12658,8 @@ "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true }, "node_modules/fast-querystring": { "version": "1.0.0", @@ -13955,15 +13804,6 @@ "uglify-js": "^3.1.4" } }, - "node_modules/handlebars/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/hard-rejection": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", @@ -14119,9 +13959,9 @@ "dev": true }, "node_modules/htmlparser2": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-7.2.0.tgz", - "integrity": "sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", + "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", "dev": true, "funding": [ "https://github.com/fb55/htmlparser2?sponsor=1", @@ -14131,10 +13971,10 @@ } ], "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.2", - "domutils": "^2.8.0", - "entities": "^3.0.1" + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "entities": "^4.4.0" } }, "node_modules/http-cache-semantics": { @@ -17600,9 +17440,9 @@ "dev": true }, "node_modules/node-source-walk": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/node-source-walk/-/node-source-walk-6.0.1.tgz", - "integrity": "sha512-QUlkJYzrNewUCp4c7CCPN8Mh8c+pwNs23JsQfHKUwIkCxYa6c0AFLuUJIZxU6BdnarfytPSGKm1YMAz06hj9cw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/node-source-walk/-/node-source-walk-6.0.2.tgz", + "integrity": "sha512-jn9vOIK/nfqoFCcpK89/VCVaLg1IHE6UVfDOzvqmANaJ/rWCTEdH8RZ1V278nv2jr36BJdyQXIAavBLXpzdlag==", "dependencies": { "@babel/parser": "^7.21.8" }, @@ -19051,22 +18891,22 @@ } }, "node_modules/precinct": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/precinct/-/precinct-11.0.2.tgz", - "integrity": "sha512-UuhB1q0nEFf80iMGcs7IoT0o1GnNFWT4CjZjcMsHDXAIsW/aiLovOSbeMJ2Ejg6raRsplsriZZkoBUh0h/IHlw==", + "version": "11.0.5", + "resolved": "https://registry.npmjs.org/precinct/-/precinct-11.0.5.tgz", + "integrity": "sha512-oHSWLC8cL/0znFhvln26D14KfCQFFn4KOLSw6hmLhd+LQ2SKt9Ljm89but76Pc7flM9Ty1TnXyrA2u16MfRV3w==", "dependencies": { - "@dependents/detective-less": "^4.0.0", + "@dependents/detective-less": "^4.1.0", "commander": "^10.0.1", - "detective-amd": "^5.0.1", + "detective-amd": "^5.0.2", "detective-cjs": "^5.0.1", - "detective-es6": "^4.0.0", + "detective-es6": "^4.0.1", "detective-postcss": "^6.1.3", - "detective-sass": "^5.0.0", - "detective-scss": "^4.0.0", + "detective-sass": "^5.0.3", + "detective-scss": "^4.0.3", "detective-stylus": "^4.0.0", - "detective-typescript": "^11.0.1", - "module-definition": "^5.0.0", - "node-source-walk": "^6.0.1" + "detective-typescript": "^11.1.0", + "module-definition": "^5.0.1", + "node-source-walk": "^6.0.2" }, "bin": { "precinct": "bin/cli.js" @@ -19910,7 +19750,7 @@ "node_modules/require-package-name": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/require-package-name/-/require-package-name-2.0.1.tgz", - "integrity": "sha1-wR6XJ2tluOKSP3Xav1+y7ww4Qbk=" + "integrity": "sha512-uuoJ1hU/k6M0779t3VMVIYpb2VMJk05cehCaABFhXaibcbvfgR8wKiozLjVFSzJPmQMRqIcO0HMyTFqfV09V6Q==" }, "node_modules/requires-port": { "version": "1.0.0", @@ -20571,6 +20411,14 @@ "node": ">=0.10.0" } }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map-js": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", @@ -20588,14 +20436,6 @@ "source-map": "^0.6.0" } }, - "node_modules/source-map-support/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", @@ -23373,14 +23213,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", @@ -23958,19 +23790,6 @@ "dev": true, "requires": { "@babel/types": "^7.24.6" - }, - "dependencies": { - "@babel/types": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.6.tgz", - "integrity": "sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ==", - "dev": true, - "requires": { - "@babel/helper-string-parser": "^7.24.6", - "@babel/helper-validator-identifier": "^7.24.6", - "to-fast-properties": "^2.0.0" - } - } } }, "@babel/helper-compilation-targets": { @@ -24041,19 +23860,6 @@ "dev": true, "requires": { "@babel/types": "^7.24.6" - }, - "dependencies": { - "@babel/types": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.6.tgz", - "integrity": "sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ==", - "dev": true, - "requires": { - "@babel/helper-string-parser": "^7.24.6", - "@babel/helper-validator-identifier": "^7.24.6", - "to-fast-properties": "^2.0.0" - } - } } }, "@babel/helper-module-transforms": { @@ -24202,19 +24008,6 @@ "@babel/helper-plugin-utils": "^7.24.6", "@babel/plugin-syntax-jsx": "^7.24.6", "@babel/types": "^7.24.6" - }, - "dependencies": { - "@babel/types": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.6.tgz", - "integrity": "sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ==", - "dev": true, - "requires": { - "@babel/helper-string-parser": "^7.24.6", - "@babel/helper-validator-identifier": "^7.24.6", - "to-fast-properties": "^2.0.0" - } - } } }, "@babel/plugin-transform-react-jsx-development": { @@ -24289,12 +24082,12 @@ } }, "@babel/types": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.5.tgz", - "integrity": "sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.6.tgz", + "integrity": "sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ==", "requires": { - "@babel/helper-string-parser": "^7.24.1", - "@babel/helper-validator-identifier": "^7.24.5", + "@babel/helper-string-parser": "^7.24.6", + "@babel/helper-validator-identifier": "^7.24.6", "to-fast-properties": "^2.0.0" } }, @@ -24865,12 +24658,12 @@ } }, "@dependents/detective-less": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@dependents/detective-less/-/detective-less-4.0.0.tgz", - "integrity": "sha512-0udn+HKjGUzTX4Z+0vXdEJVsO28gxy5QxWjeChK4ZH+bwdvIXLuztiGZk8wLyAG1+LNZ5haVHKr5j1XfJnAkyQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@dependents/detective-less/-/detective-less-4.1.0.tgz", + "integrity": "sha512-KrkT6qO5NxqNfy68sBl6CTSoJ4SNDIS5iQArkibhlbGU4LaDukZ3q2HIkh8aUKDio6o4itU4xDR7t82Y2eP1Bg==", "requires": { "gonzales-pe": "^4.3.0", - "node-source-walk": "^6.0.0" + "node-source-walk": "^6.0.1" } }, "@esbuild/aix-ppc64": { @@ -25422,22 +25215,22 @@ "integrity": "sha512-wN/kNTZo4xjlUM/C0WILOkJbe8p4AFquSGkZEIoIcgnsx5ikp2GyqGiq1WMLee7QdbnqeIV2g2hn/PjT324E5w==" }, "@netlify/build": { - "version": "29.46.2", - "resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.46.2.tgz", - "integrity": "sha512-xeQpYVEYK+1/vp9CQLFDPCaIgWlxHDaPOGMGs3c3xWyeNvjHOzeccESBY9GH39oO/ueEyFvq1dDa2i+blk5Nkg==", + "version": "29.46.4", + "resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.46.4.tgz", + "integrity": "sha512-BDewb88h9lQXHcTjaLl8j6RxTWhMMna9BfazcUBa4XkSWXDOlSxCln23x8XysssJV2o+teUaYsq5TRsHIEevRQ==", "requires": { "@bugsnag/js": "^7.0.0", "@netlify/blobs": "^7.3.0", "@netlify/cache-utils": "^5.1.5", - "@netlify/config": "^20.13.2", + "@netlify/config": "^20.14.1", "@netlify/edge-bundler": "12.0.1", "@netlify/framework-info": "^9.8.13", - "@netlify/functions-utils": "^5.2.60", + "@netlify/functions-utils": "^5.2.61", "@netlify/git-utils": "^5.1.1", "@netlify/opentelemetry-utils": "^1.2.1", "@netlify/plugins-list": "^6.80.0", "@netlify/run-utils": "^5.1.1", - "@netlify/zip-it-and-ship-it": "9.34.0", + "@netlify/zip-it-and-ship-it": "9.34.1", "@sindresorhus/slugify": "^2.0.0", "ansi-escapes": "^6.0.0", "chalk": "^5.0.0", @@ -25778,9 +25571,9 @@ } }, "@netlify/config": { - "version": "20.13.2", - "resolved": "https://registry.npmjs.org/@netlify/config/-/config-20.13.2.tgz", - "integrity": "sha512-2LpzpnOQX7vALF+Q2efmgBrtbXWPqwKwI9Pmc3/tE9PxeaFfBvIyBDiknqMe/NozoeYgsznZV0WwLIzN3KgOzA==", + "version": "20.14.1", + "resolved": "https://registry.npmjs.org/@netlify/config/-/config-20.14.1.tgz", + "integrity": "sha512-AZxkQukahhtypCrOujc4RJTU9sSzNkWAqQVP/j5be2vsrhKqjoFp/88zjqHT0Sy5vhWbENaOv5nPAAaUG9hUHw==", "requires": { "@iarna/toml": "^2.2.5", "chalk": "^5.0.0", @@ -26260,9 +26053,9 @@ "integrity": "sha512-BoAz/gCWHLn9DVugGViORbWFDqaqrB/JHM+9N+ahk7U6C3EwaFojnnGKCMrQ65f2YOi6Wwlue1ZZO+8mq43RZA==" }, "@netlify/eslint-config-node": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@netlify/eslint-config-node/-/eslint-config-node-7.0.0.tgz", - "integrity": "sha512-RLt38yqNWDEfznHYnuhbbzlAGlHzZoWLezQBKzFsyu7A5oHMphjHN6fGek/6TUj2zZZRTBPW9m6ETnzWsUDwcg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@netlify/eslint-config-node/-/eslint-config-node-7.0.1.tgz", + "integrity": "sha512-4xAE0lM3BaVOZu1Oil5Yy1FsiYjZwNS/uwE+4fY61Buuyv3An16mC9LbNCxQ5EFzo3g7U2SRyZdGBHM6ACRLpw==", "dev": true, "requires": { "@babel/core": "^7.13.8", @@ -26274,7 +26067,7 @@ "cross-env": "^7.0.2", "eslint": "^8.0.0", "eslint-config-prettier": "^8.0.0", - "eslint-config-standard": "^17.0.0-1", + "eslint-config-standard": "^17.0.0", "eslint-formatter-codeframe": "^7.32.1", "eslint-import-resolver-node": "^0.3.4", "eslint-import-resolver-typescript": "^3.0.0", @@ -26282,10 +26075,10 @@ "eslint-plugin-cypress": "^2.12.1", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-fp": "^2.3.0", - "eslint-plugin-html": "^6.1.0", + "eslint-plugin-html": "^7.0.0", "eslint-plugin-import": "^2.25.1", "eslint-plugin-markdown": "^3.0.0", - "eslint-plugin-n": "^14.0.0", + "eslint-plugin-n": "^15.2.4", "eslint-plugin-promise": "^6.0.0", "eslint-plugin-react": "^7.21.5", "eslint-plugin-unicorn": "^43.0.0", @@ -26449,11 +26242,11 @@ } }, "@netlify/functions-utils": { - "version": "5.2.60", - "resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.2.60.tgz", - "integrity": "sha512-gTzrajMk4rkJgDQnKprVB/wanQja6vF8NRfL8KW5eiVDWKaLqNqWpZmYOp80uD2k9Oxvowt6+BjPupwkOORKWA==", + "version": "5.2.61", + "resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.2.61.tgz", + "integrity": "sha512-u0vikp0Gycg7d1vzNBGLn+fZiFmlKHtZQkAnCZszLFuYmZPRe1s7mx2QHnVNSnlgB9RwlzZh4/CMO5pgQhNrkw==", "requires": { - "@netlify/zip-it-and-ship-it": "9.34.0", + "@netlify/zip-it-and-ship-it": "9.34.1", "cpy": "^9.0.0", "path-exists": "^5.0.0" }, @@ -26721,12 +26514,12 @@ } }, "@netlify/zip-it-and-ship-it": { - "version": "9.34.0", - "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-9.34.0.tgz", - "integrity": "sha512-nv3UVZGbZDaAmkqmBqpEAhKihBB3sHEJqu2GUHujSdRJ6oZy8J5/jCSz0kmWTdzKTrcF+Y74QnNRLU83sQMqxg==", + "version": "9.34.1", + "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-9.34.1.tgz", + "integrity": "sha512-6yOc8xKJB+zEdEwMKVmeUTaO8zE9bEvhOAB3L1ekavhGWESZ5EPe+kyzxc65C1GbEdOkfyN09I37cJZH/O3c0A==", "requires": { "@babel/parser": "^7.22.5", - "@babel/types": "7.24.5", + "@babel/types": "7.24.6", "@netlify/binary-info": "^1.0.0", "@netlify/serverless-functions-api": "^1.18.2", "@vercel/nft": "^0.23.0", @@ -29023,15 +28816,15 @@ } }, "glob": { - "version": "10.3.16", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.16.tgz", - "integrity": "sha512-JDKXl1DiuuHJ6fVS2FXjownaavciiHNUU4mOvV/B793RLh05vZL1rcPnCSaOgv1hDT6RDlY7AB7ZUvFYAtPgAw==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", + "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", "requires": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", - "minimatch": "^9.0.1", - "minipass": "^7.0.4", - "path-scurry": "^1.11.0" + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" } }, "is-stream": { @@ -29057,9 +28850,9 @@ } }, "minipass": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.1.tgz", - "integrity": "sha512-UZ7eQ+h8ywIRAW1hIEl2AqdwzJucU/Kp59+8kkZeSvafXhZjul247BvIJjEVFVeON6d7lM46XX1HXCduKAS8VA==" + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==" }, "readable-stream": { "version": "4.5.2", @@ -29541,9 +29334,9 @@ "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==" }, "builtins": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.0.tgz", - "integrity": "sha512-aizhtbxgT1Udg0Fj6GssXshAVK+nxbtCV+1OtTrMNy67jffDFBY6CUBAkhO4owbleAx6fdbnWdpsmmcXydbzNw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.1.0.tgz", + "integrity": "sha512-SW9lzGTLvWTP1AY8xeAMZimqDrIaSdLQUcVr9DMef51niJ022Ri87SwRRKYm4A6iHfkPaiVUu/Duw2Wc4J7kKg==", "requires": { "semver": "^7.0.0" } @@ -30603,41 +30396,6 @@ "domhandler": "^5.0.2", "domutils": "^3.0.1", "nth-check": "^2.0.1" - }, - "dependencies": { - "dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "requires": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - } - }, - "domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "requires": { - "domelementtype": "^2.3.0" - } - }, - "domutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", - "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", - "requires": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - } - }, - "entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==" - } } }, "css-tree": { @@ -30801,12 +30559,13 @@ "deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true }, "deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==" + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==" }, "defer-to-connect": { "version": "2.0.1", @@ -30874,14 +30633,14 @@ "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==" }, "detective-amd": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/detective-amd/-/detective-amd-5.0.1.tgz", - "integrity": "sha512-e7n0E0Wte78U9lcpl3hsTh1ZJ+zp/rgEbdbzGLgTowSbbSemuHnM8olp4KHMF1eCaurrCE50IU9VkoV13ezK4A==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/detective-amd/-/detective-amd-5.0.2.tgz", + "integrity": "sha512-XFd/VEQ76HSpym80zxM68ieB77unNuoMwopU2TFT/ErUk5n4KvUTwW4beafAVUugrjV48l4BmmR0rh2MglBaiA==", "requires": { "ast-module-types": "^5.0.0", "escodegen": "^2.0.0", - "get-amd-module-type": "^5.0.0", - "node-source-walk": "^6.0.0" + "get-amd-module-type": "^5.0.1", + "node-source-walk": "^6.0.1" } }, "detective-cjs": { @@ -30935,14 +30694,14 @@ "integrity": "sha512-TfPotjhszKLgFBzBhTOxNHDsutIxx9GTWjrL5Wh7Qx/ydxKhwUrlSFeLIn+ZaHPF+h0siVBkAQSuy6CADyTxgQ==" }, "detective-typescript": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/detective-typescript/-/detective-typescript-11.0.1.tgz", - "integrity": "sha512-pVCuFWdEAyHI16zO3NBWSAULV8pevSkX3gwK8w3y9RrBGUrig6wDvwv6vUpnu+HfOr0MDmjMkmJGNWaTb6+HkA==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/detective-typescript/-/detective-typescript-11.2.0.tgz", + "integrity": "sha512-ARFxjzizOhPqs1fYC/2NMC3N4jrQ6HvVflnXBTRqNEqJuXwyKLRr9CrJwkRcV/SnZt1sNXgsF6FPm0x57Tq0rw==", "requires": { - "@typescript-eslint/typescript-estree": "^5.59.2", + "@typescript-eslint/typescript-estree": "^5.62.0", "ast-module-types": "^5.0.0", - "node-source-walk": "^6.0.0", - "typescript": "^5.0.4" + "node-source-walk": "^6.0.2", + "typescript": "^5.4.4" }, "dependencies": { "@typescript-eslint/types": { @@ -30977,6 +30736,11 @@ "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" + }, + "typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==" } } }, @@ -31010,22 +30774,13 @@ } }, "dom-serializer": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", - "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", - "dev": true, + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" - }, - "dependencies": { - "entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "dev": true - } + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" } }, "domelementtype": { @@ -31034,23 +30789,21 @@ "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==" }, "domhandler": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", - "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", - "dev": true, + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", "requires": { - "domelementtype": "^2.2.0" + "domelementtype": "^2.3.0" } }, "domutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", - "dev": true, + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", + "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", "requires": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" } }, "dot-prop": { @@ -31162,10 +30915,9 @@ } }, "entities": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", - "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", - "dev": true + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==" }, "env-paths": { "version": "3.0.0", @@ -31227,9 +30979,9 @@ } }, "es-module-lexer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.0.3.tgz", - "integrity": "sha512-iC67eXHToclrlVhQfpRawDiF8D8sQxNxmbqw5oebegOaJkyx/w9C/k57/5e6yJR2zIByRt9OXdqX50DV2t6ZKw==" + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.3.tgz", + "integrity": "sha512-i1gCgmR9dCl6Vil6UKPI/trA69s08g/syhiDK9TG0Nf1RJjjFI+AzoWW7sPufzkgYAn861skuCwJa0pIIHYxvg==" }, "es-to-primitive": { "version": "1.2.1", @@ -31299,58 +31051,14 @@ "dev": true }, "escodegen": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", - "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", "requires": { "esprima": "^4.0.1", "estraverse": "^5.2.0", "esutils": "^2.0.2", - "optionator": "^0.8.1", "source-map": "~0.6.1" - }, - "dependencies": { - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "optional": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", - "requires": { - "prelude-ls": "~1.1.2" - } - } } }, "eslint": { @@ -31508,9 +31216,9 @@ "requires": {} }, "eslint-config-standard": { - "version": "17.0.0-1", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.0.0-1.tgz", - "integrity": "sha512-aqRG58dqoBNfOLN+PsitasxmW+W9Os4oQrx081B16T4E4WogsSbpUL6hnKSnyv35sSRYA2XjBtKMOrUboL6jgw==", + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.1.0.tgz", + "integrity": "sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q==", "dev": true, "requires": {} }, @@ -31793,12 +31501,12 @@ } }, "eslint-plugin-html": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-6.2.0.tgz", - "integrity": "sha512-vi3NW0E8AJombTvt8beMwkL1R/fdRWl4QSNRNMhVQKWm36/X0KF0unGNAY4mqUF06mnwVWZcIcerrCnfn9025g==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-7.1.0.tgz", + "integrity": "sha512-fNLRraV/e6j8e3XYOC9xgND4j+U7b1Rq+OygMlLcMg+wI/IpVbF+ubQa3R78EjKB9njT6TQOlcK5rFKBVVtdfg==", "dev": true, "requires": { - "htmlparser2": "^7.1.2" + "htmlparser2": "^8.0.1" } }, "eslint-plugin-import": { @@ -31869,18 +31577,19 @@ } }, "eslint-plugin-n": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-14.0.0.tgz", - "integrity": "sha512-mNwplPLsbaKhHyA0fa/cy8j+oF6bF6l81hzBTWa6JOvPcMNAuIogk2ih6d9tYvWYzyUG+7ZFeChqbzdFpg2QrQ==", + "version": "15.7.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.7.0.tgz", + "integrity": "sha512-jDex9s7D/Qial8AGVIHq4W7NswpUD5DPDL2RH8Lzd9EloWUuvUkHfv4FRLMipH5q2UtyurorBkPeNi1wVWNh3Q==", "dev": true, "requires": { + "builtins": "^5.0.1", "eslint-plugin-es": "^4.1.0", "eslint-utils": "^3.0.0", "ignore": "^5.1.1", - "is-core-module": "^2.3.0", - "minimatch": "^3.0.4", - "resolve": "^1.10.1", - "semver": "^6.1.0" + "is-core-module": "^2.11.0", + "minimatch": "^3.1.2", + "resolve": "^1.22.1", + "semver": "^7.3.8" }, "dependencies": { "resolve": { @@ -31893,19 +31602,13 @@ "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" } - }, - "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true } } }, "eslint-plugin-promise": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.0.tgz", - "integrity": "sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.2.0.tgz", + "integrity": "sha512-QmAqwizauvnKOlifxyDj2ObfULpHQawlg/zQdgEixur9vl0CvZGv/LCJV2rtj3210QCoeGBzVMfMXqGAOr/4fA==", "dev": true, "requires": {} }, @@ -32499,7 +32202,8 @@ "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true }, "fast-querystring": { "version": "1.0.0", @@ -33345,14 +33049,6 @@ "source-map": "^0.6.1", "uglify-js": "^3.1.4", "wordwrap": "^1.0.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } } }, "hard-rejection": { @@ -33463,15 +33159,15 @@ "dev": true }, "htmlparser2": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-7.2.0.tgz", - "integrity": "sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", + "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", "dev": true, "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.2", - "domutils": "^2.8.0", - "entities": "^3.0.1" + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "entities": "^4.4.0" } }, "http-cache-semantics": { @@ -35940,9 +35636,9 @@ "dev": true }, "node-source-walk": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/node-source-walk/-/node-source-walk-6.0.1.tgz", - "integrity": "sha512-QUlkJYzrNewUCp4c7CCPN8Mh8c+pwNs23JsQfHKUwIkCxYa6c0AFLuUJIZxU6BdnarfytPSGKm1YMAz06hj9cw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/node-source-walk/-/node-source-walk-6.0.2.tgz", + "integrity": "sha512-jn9vOIK/nfqoFCcpK89/VCVaLg1IHE6UVfDOzvqmANaJ/rWCTEdH8RZ1V278nv2jr36BJdyQXIAavBLXpzdlag==", "requires": { "@babel/parser": "^7.21.8" } @@ -36965,22 +36661,22 @@ } }, "precinct": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/precinct/-/precinct-11.0.2.tgz", - "integrity": "sha512-UuhB1q0nEFf80iMGcs7IoT0o1GnNFWT4CjZjcMsHDXAIsW/aiLovOSbeMJ2Ejg6raRsplsriZZkoBUh0h/IHlw==", + "version": "11.0.5", + "resolved": "https://registry.npmjs.org/precinct/-/precinct-11.0.5.tgz", + "integrity": "sha512-oHSWLC8cL/0znFhvln26D14KfCQFFn4KOLSw6hmLhd+LQ2SKt9Ljm89but76Pc7flM9Ty1TnXyrA2u16MfRV3w==", "requires": { - "@dependents/detective-less": "^4.0.0", + "@dependents/detective-less": "^4.1.0", "commander": "^10.0.1", - "detective-amd": "^5.0.1", + "detective-amd": "^5.0.2", "detective-cjs": "^5.0.1", - "detective-es6": "^4.0.0", + "detective-es6": "^4.0.1", "detective-postcss": "^6.1.3", - "detective-sass": "^5.0.0", - "detective-scss": "^4.0.0", + "detective-sass": "^5.0.3", + "detective-scss": "^4.0.3", "detective-stylus": "^4.0.0", - "detective-typescript": "^11.0.1", - "module-definition": "^5.0.0", - "node-source-walk": "^6.0.1" + "detective-typescript": "^11.1.0", + "module-definition": "^5.0.1", + "node-source-walk": "^6.0.2" } }, "precond": { @@ -37587,7 +37283,7 @@ "require-package-name": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/require-package-name/-/require-package-name-2.0.1.tgz", - "integrity": "sha1-wR6XJ2tluOKSP3Xav1+y7ww4Qbk=" + "integrity": "sha512-uuoJ1hU/k6M0779t3VMVIYpb2VMJk05cehCaABFhXaibcbvfgR8wKiozLjVFSzJPmQMRqIcO0HMyTFqfV09V6Q==" }, "requires-port": { "version": "1.0.0", @@ -38082,6 +37778,11 @@ "sort-keys": "^1.0.0" } }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, "source-map-js": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", @@ -38094,13 +37795,6 @@ "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - } } }, "spdx-correct": { @@ -40002,11 +39696,6 @@ "triple-beam": "^1.3.0" } }, - "word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==" - }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", diff --git a/package.json b/package.json index ba3d620dc06..09cf8d64224 100644 --- a/package.json +++ b/package.json @@ -73,13 +73,13 @@ "@bugsnag/js": "7.23.0", "@fastify/static": "7.0.4", "@netlify/blobs": "7.3.0", - "@netlify/build": "29.46.2", + "@netlify/build": "29.46.4", "@netlify/build-info": "7.13.2", - "@netlify/config": "20.13.2", + "@netlify/config": "20.14.1", "@netlify/edge-bundler": "12.0.1", "@netlify/edge-functions": "2.8.1", "@netlify/local-functions-proxy": "1.1.1", - "@netlify/zip-it-and-ship-it": "9.34.0", + "@netlify/zip-it-and-ship-it": "9.34.1", "@octokit/rest": "20.1.1", "@opentelemetry/api": "1.8.0", "ansi-escapes": "7.0.0", @@ -187,7 +187,7 @@ }, "devDependencies": { "@babel/preset-react": "7.24.6", - "@netlify/eslint-config-node": "7.0.0", + "@netlify/eslint-config-node": "7.0.1", "@netlify/functions": "2.7.0", "@sindresorhus/slugify": "2.2.1", "@types/fs-extra": "11.0.4", diff --git a/src/commands/base-command.ts b/src/commands/base-command.ts index 1f95e0b54e1..093fd5e1112 100644 --- a/src/commands/base-command.ts +++ b/src/commands/base-command.ts @@ -7,7 +7,6 @@ import { format } from 'util' import { DefaultLogger, Project } from '@netlify/build-info' import { NodeFS, NoopLogger } from '@netlify/build-info/node' -// @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module '@net... Remove this comment to see the full error message import { resolveConfig } from '@netlify/config' import { Command, Help, Option } from 'commander' // @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'debu... Remove this comment to see the full error message diff --git a/src/commands/dev/dev.ts b/src/commands/dev/dev.ts index aec80818528..9b102a05ca3 100644 --- a/src/commands/dev/dev.ts +++ b/src/commands/dev/dev.ts @@ -1,6 +1,5 @@ import process from 'process' -// @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module '@net... Remove this comment to see the full error message import { applyMutations } from '@netlify/config' import { Option, OptionValues } from 'commander' diff --git a/src/commands/types.d.ts b/src/commands/types.d.ts index 7a7434ce143..ccc22349032 100644 --- a/src/commands/types.d.ts +++ b/src/commands/types.d.ts @@ -1,4 +1,5 @@ -import { NetlifyTOML } from '@netlify/build-info' +import type { NetlifyConfig } from "@netlify/build"; +import type { NetlifyTOML } from '@netlify/build-info' import type { NetlifyAPI } from 'netlify' import StateConfig from '../utils/state-config.js' @@ -14,16 +15,37 @@ export type NetlifySite = { set id(id: string): void } -type PatchedConfig = NetlifyTOML & { +type PatchedConfig = NetlifyTOML & Pick & { functionsDirectory?: string build: NetlifyTOML['build'] & { functionsSource?: string } dev: NetlifyTOML['dev'] & { functions?: string + processing?: DevProcessing } } +type DevProcessing = { + html?: HTMLProcessing +} + +type HTMLProcessing = { + injections?: HTMLInjection[] +} + +type HTMLInjection = { + /** + * The location at which the `html` will be injected. + * Defaults to `before_closing_head_tag` which will inject the HTML before the tag. + */ + location?: 'before_closing_head_tag' | 'before_closing_body_tag', + /** + * The injected HTML code. + */ + html: string +} + type EnvironmentVariableScope = 'builds' | 'functions' | 'runtime' | 'post_processing' type EnvironmentVariableSource = 'account' | 'addons' | 'configFile' | 'general' | 'internal' | 'ui' diff --git a/src/utils/proxy.ts b/src/utils/proxy.ts index 85b0476c228..b8ec2d21bae 100644 --- a/src/utils/proxy.ts +++ b/src/utils/proxy.ts @@ -26,7 +26,7 @@ import pFilter from 'p-filter' import toReadableStream from 'to-readable-stream' import { BaseCommand } from '../commands/index.js' -import { $TSFixMe } from '../commands/types.js' +import { $TSFixMe, NetlifyOptions } from '../commands/types.js' import { handleProxyRequest, initializeProxy as initializeEdgeFunctionsProxy, @@ -47,8 +47,11 @@ import { signRedirect } from './sign-redirect.js' import { Request, Rewriter, ServerSettings } from './types.js' const gunzip = util.promisify(zlib.gunzip) +const gzip = util.promisify(zlib.gzip) const brotliDecompress = util.promisify(zlib.brotliDecompress) +const brotliCompress = util.promisify(zlib.brotliCompress) const deflate = util.promisify(zlib.deflate) +const inflate = util.promisify(zlib.inflate) const shouldGenerateETag = Symbol('Internal: response should generate ETag') const decompressResponseBody = async function (body: Buffer, contentEncoding = ''): Promise { @@ -58,12 +61,48 @@ const decompressResponseBody = async function (body: Buffer, contentEncoding = ' case 'br': return await brotliDecompress(body) case 'deflate': - return await deflate(body) + return await inflate(body) default: return body } } +const compressResponseBody = async function (body: string, contentEncoding = ''): Promise { + switch (contentEncoding) { + case 'gzip': + return await gzip(body) + case 'br': + return await brotliCompress(body) + case 'deflate': + return await deflate(body) + default: + return Buffer.from(body, 'utf8') + } +} + +type HTMLInjections = NonNullable['html']>['injections'] + +const injectHtml = async function ( + responseBody: Buffer, + proxyRes: http.IncomingMessage, + htmlInjections: HTMLInjections, +): Promise { + const decompressedBody: Buffer = await decompressResponseBody(responseBody, proxyRes.headers['content-encoding']) + const bodyWithInjections: string = (htmlInjections ?? []).reduce((accum, htmlInjection) => { + if (!htmlInjection.html || typeof htmlInjection.html !== 'string') { + return accum + } + const location = htmlInjection.location ?? 'before_closing_head_tag' + if (location === 'before_closing_head_tag') { + accum = accum.replace('', `${htmlInjection.html}`) + } else if (location === 'before_closing_body_tag') { + accum = accum.replace('', `${htmlInjection.html}`) + } + return accum + }, decompressedBody.toString()) + return await compressResponseBody(bodyWithInjections, proxyRes.headers['content-encoding']) +} + // @ts-expect-error TS(7006) FIXME: Parameter 'errorBuffer' implicitly has an 'any' ty... Remove this comment to see the full error message const formatEdgeFunctionError = (errorBuffer, acceptsHtml) => { const { @@ -416,25 +455,16 @@ const reqToURL = function (req, pathname) { const MILLISEC_TO_SEC = 1e3 const initializeProxy = async function ({ - // @ts-expect-error TS(7031) FIXME: Binding element 'configPath' implicitly has an 'any... Remove this comment to see the full error message config, - // @ts-expect-error TS(7031) FIXME: Binding element 'distDir' implicitly has an 'any... Remove this comment to see the full error message configPath, - // @ts-expect-error TS(7031) FIXME: Binding element 'env' implicitly has an 'any... Remove this comment to see the full error message distDir, - // @ts-expect-error TS(7031) FIXME: Binding element 'host' implicitly has an 'any... Remove this comment to see the full error message env, - // @ts-expect-error TS(7031) FIXME: Binding element 'imageProxy' implicitly has an 'any... Remove this comment to see the full error message host, - // @ts-expect-error TS(7031) FIXME: Binding element 'port' implicitly has an 'any... Remove this comment to see the full error message imageProxy, - // @ts-expect-error TS(7031) FIXME: Binding element 'projectDir' implicitly has an 'any... Remove this comment to see the full error message port, - // @ts-expect-error TS(7031) FIXME: Binding element 'siteInfo' implicitly has an 'any... Remove this comment to see the full error message projectDir, - // @ts-expect-error TS(7031) FIXME: Binding element 'config' implicitly has an 'any... Remove this comment to see the full error message siteInfo, -}) { +}: { config: NetlifyOptions['config'] } & Record) { const proxy = httpProxy.createProxyServer({ selfHandleResponse: true, target: { @@ -568,10 +598,18 @@ const initializeProxy = async function ({ const requestURL = new URL(req.url, `http://${req.headers.host || '127.0.0.1'}`) const headersRules = headersForPath(headers, requestURL.pathname) + const htmlInjections = + config.dev?.processing?.html?.injections && + config.dev.processing.html.injections.length !== 0 && + proxyRes.headers?.['content-type']?.startsWith('text/html') + ? config.dev.processing.html.injections + : undefined + // for streamed responses, we can't do etag generation nor error templates. // we'll just stream them through! + // when html_injections are present in dev config, we can't use streamed response const isStreamedResponse = proxyRes.headers['content-length'] === undefined - if (isStreamedResponse) { + if (isStreamedResponse && !htmlInjections) { Object.entries(headersRules).forEach(([key, val]) => { // @ts-expect-error TS(2345) FIXME: Argument of type 'unknown' is not assignable to pa... Remove this comment to see the full error message res.setHeader(key, val) @@ -596,7 +634,7 @@ const initializeProxy = async function ({ proxyRes.on('end', async function onEnd() { // @ts-expect-error TS(7005) FIXME: Variable 'responseData' implicitly has an 'any[]' ... Remove this comment to see the full error message - const responseBody = Buffer.concat(responseData) + let responseBody = Buffer.concat(responseData) // @ts-expect-error TS(2339) FIXME: Property 'proxyOptions' does not exist on type 'In... Remove this comment to see the full error message let responseStatus = req.proxyOptions.status || proxyRes.statusCode @@ -640,7 +678,17 @@ const initializeProxy = async function ({ return res.end() } - res.writeHead(responseStatus, proxyRes.headers) + let proxyResHeaders = proxyRes.headers + + if (htmlInjections) { + responseBody = await injectHtml(responseBody, proxyRes, htmlInjections) + proxyResHeaders = { + ...proxyResHeaders, + 'content-length': String(responseBody.byteLength), + } + } + + res.writeHead(responseStatus, proxyResHeaders) if (responseStatus !== 304) { res.write(responseBody) diff --git a/tests/integration/commands/dev/responses.dev.test.js b/tests/integration/commands/dev/responses.dev.test.js index 625adfbd5a3..9e797337c5c 100644 --- a/tests/integration/commands/dev/responses.dev.test.js +++ b/tests/integration/commands/dev/responses.dev.test.js @@ -297,4 +297,104 @@ describe.concurrent('commands/responses.dev', () => { }) }) }) + + test('should inject html snippet from dev.processing.html.injections before closing head tag', async (t) => { + await withSiteBuilder(t, async (builder) => { + const pageHtml = 'title

header

' + + builder + .withNetlifyToml({ + config: { + plugins: [{ package: './plugins/injector' }], + }, + }) + .withBuildPlugin({ + name: 'injector', + plugin: { + onPreDev: async ({ netlifyConfig }) => { + netlifyConfig.dev = { + ...netlifyConfig.dev, + processing: { + ...netlifyConfig.dev?.processing, + html: { + ...netlifyConfig.dev?.processing?.html, + injections: [ + ...(netlifyConfig.dev?.processing?.html?.injections ?? []), + { + location: 'before_closing_head_tag', + html: '', + }, + ], + }, + }, + } + }, + }, + }) + .withContentFile({ + path: 'index.html', + content: pageHtml, + }) + + await builder.build() + + await withDevServer({ cwd: builder.directory }, async (server) => { + const response = await fetch(server.url) + const htmlResponse = await response.text() + t.expect(htmlResponse).toEqual( + pageHtml.replace('', ``), + ) + }) + }) + }) + + test('should inject html snippet from dev.processing.html.injections before closing body tag', async (t) => { + await withSiteBuilder(t, async (builder) => { + const pageHtml = 'title

header

' + + builder + .withNetlifyToml({ + config: { + plugins: [{ package: './plugins/injector' }], + }, + }) + .withBuildPlugin({ + name: 'injector', + plugin: { + onPreDev: async ({ netlifyConfig }) => { + netlifyConfig.dev = { + ...netlifyConfig.dev, + processing: { + ...netlifyConfig.dev?.processing, + html: { + ...netlifyConfig.dev?.processing?.html, + injections: [ + ...(netlifyConfig.dev?.processing?.html?.injections ?? []), + { + location: 'before_closing_body_tag', + html: '', + }, + ], + }, + }, + } + }, + }, + }) + .withContentFile({ + path: 'index.html', + content: pageHtml, + }) + + await builder.build() + + await withDevServer({ cwd: builder.directory }, async (server) => { + const response = await fetch(server.url) + const htmlResponse = await response.text() + t.expect(htmlResponse).toEqual( + pageHtml.replace('', ``), + ) + }) + }) + }) })