diff --git a/.browserslistrc b/.browserslistrc index 313d3fe..aca1763 100644 --- a/.browserslistrc +++ b/.browserslistrc @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 1, 2024 2:58 PM UTC. +# Last generated Mar 2, 2024 12:30 PM UTC. [production] node >= 20.9.0 diff --git a/.dockerignore b/.dockerignore index cd37dbb..83c5b5c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 1, 2024 2:58 PM UTC. +# Last generated Mar 2, 2024 12:30 PM UTC. # Locals diff --git a/.env.vault b/.env.vault index 9352551..ccab532 100644 --- a/.env.vault +++ b/.env.vault @@ -8,12 +8,12 @@ DOTENV_VAULT_MAIN="3rfi+ClkONvfHPiU9FTBcC1+Um/L8QeM9dRw1jFzEqzZXw==" DOTENV_VAULT_MAIN_VERSION=1 # dev -DOTENV_VAULT_DEV="MuNQA1TmqImnzc8LuBwL8poHjYJqxObTjA6ELk+nqP8VcbgPoz3q7K+NpdN6A0mHreUKHE1bQPtqEGofg3eUofFZSNLZm4lssfqknq7SX7i0iCKytM1DLp4/PNDCZTjE5ZWW0hND2MIYozHp+YaHSCKixL6wHRVBxm6rpLDGYlffFQ0fGnAc4rUMjuqoEAe2QJtJeVBST3IpG+9kMVK3YC3fvq6WlkSYyjlGTWNFEicEa3WI6IIPhO17u2P42Y9cBgXtc3UhHhGabuZ7AMDvrmKRs5SKjfAlHymxbECv6VRmw/c2My4Ca/IxzT1pGR8iprm6cn460HCpAaCo/Ix4AN2X3bmBlAZZk0bgDL+GSe6nlFDyJJcXcQPQJyrKQgKbav/DB1WLt4Ua1O92D5desuiC7QeOSsTFGk8k1C6gsC+XRZ4QteS0H41IBAqQX8Uwnm9z2xDbQQX/Y2/290QxMTk/ebX9KJZkUqCsWn6LbBOWjEsH0AsxPxwe/vPSOd6zcViBpV/3QoL0Fl+giSgYEQx7sl55vHiLUVFmleLDbH0Ccd7G6A15Bo4/B5g5a/7WgZw+RtesJrzS+d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iZ15HcV0b0NdU3XKHH" -DOTENV_VAULT_CI_VERSION=221 +DOTENV_VAULT_CI="13iaUzjv+k4GqND5Bm9qer2INUdm3RELOKPRGpTHDQbN6zgJMbXdSTOzPmotH0TNsq6oYsXcsdZBfuM9iPZtTxcpXAXdutAi1M3ZItEOOsiocCzpab4phK3nfh4RYPRiW0OxC/9nvGMCatn2z7f8LAQB7ZfHFQJ2CZ/L3s8S0P+eW4F7lEmgm1kzWJ43QGnMJ9LqI6Xq5taxbWrMuItI+iTShr5mp6l1H6zCPM/d7et3/zR/zu/Ml6vjV/FZ3z96DHOaSOM11bcL+iWtH9ZmLRndF6LgN+C3ueCWdhLlxGNNCowACFRMgf+fZHHCzHTdct48vcOhvVt0y0aBAz/Am3glYpNGaFcIp38zfMYscK129LhqBrdH/ZJi4UuuxiYlHCBRRi59nG9vlH/cPmr9dWldBwW9+G7h0jrFo3hV+cpaAC2EC1wIcjSuzAVroNmRDOq/2q5AyV3f6Vwz0zLNijTuR2utoDa1nAeNROJBFKK+VzdxpaqqrLbIedqxRb7pYqysVjhVSejrPZUfe09RrnFzA6n9QwrdQ16N6ULesm6X3i5by4nk4bxEGprcqXrPs3h6u1myneEsEy9WQXzs16ix8+bvZrXSFr/SeUppaIYA39+1uab1Jz3L/NANUi6KzmreSe5z4f1WCoVTpdX+v3YJEdCqE+lx99/0ItqF9o1ic/aBpwkQKRRw+vlKlHjwybfX6HoUgTORc0CyontxY6DzsOv9CVtQPIMP2lqiSFN49q9sboT/44YlYN5blXdtBmI7l7L/RpJGQRYkly+pPqF28Uyj2fdrnM7SXpaVwa6G6O4RFWUkkjqa6OQsCpILwh1eHMBlr/3JjrEPJhIC0P5GiEnuU245xR1+lV+8BbrEvKyxvKIkn6V3HMXd" +DOTENV_VAULT_CI_VERSION=223 # stage DOTENV_VAULT_STAGE="bfqZYD8oVLWMZ0JR5LICV+sB/btaXavszxZLxTfwSH8U5fg=" diff --git a/.gitattributes b/.gitattributes index c59f97b..633ea20 100644 --- a/.gitattributes +++ b/.gitattributes @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 1, 2024 2:58 PM UTC. +# Last generated Mar 2, 2024 12:30 PM UTC. # Default diff --git a/.gitignore b/.gitignore index 729133e..ab22cc0 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 1, 2024 2:58 PM UTC. +# Last generated Mar 2, 2024 12:30 PM UTC. # Locals diff --git a/.npmignore b/.npmignore index fc64a79..f284eaa 100644 --- a/.npmignore +++ b/.npmignore @@ -25,7 +25,7 @@ # Generated data. # -# Last generated Mar 1, 2024 2:58 PM UTC. +# Last generated Mar 2, 2024 12:30 PM UTC. # Locals diff --git a/.prettierignore b/.prettierignore index a2208e3..3e763e7 100644 --- a/.prettierignore +++ b/.prettierignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 1, 2024 2:58 PM UTC. +# Last generated Mar 2, 2024 12:30 PM UTC. # Packages diff --git a/.vscode/settings.json b/.vscode/settings.json index 51b9092..c1dd9bb 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,7 +7,7 @@ * @note This entire file will be updated automatically. * @note Instead of editing here, please review `./settings.mjs`. * - * Last generated using `./settings.mjs` Mar 1, 2024 2:58 PM UTC. + * Last generated using `./settings.mjs` Mar 2, 2024 12:30 PM UTC. */ { "editor.formatOnType": false, diff --git a/.vscodeignore b/.vscodeignore index 37015b0..433a627 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 1, 2024 2:58 PM UTC. +# Last generated Mar 2, 2024 12:30 PM UTC. # Locals diff --git a/dev/.files/wrangler/settings.mjs b/dev/.files/wrangler/settings.mjs index b300a01..dff15ae 100755 --- a/dev/.files/wrangler/settings.mjs +++ b/dev/.files/wrangler/settings.mjs @@ -57,7 +57,7 @@ export default async () => { defaultWorkersDevZoneName: 'c10n.workers.dev', defaultWorkersDomain: 'workers.' + hop.hostname, - defaultWorkerName: pkgSlug.replace(/^workers-/iu, ''), + defaultWorkerName: pkgSlug, // e.g., `workers-hop-gdn-utilities`. defaultWorkerShortName: pkgSlug.replace(/^workers-hop-gdn-/iu, ''), defaultWorkerStageShortName: 'stage.' + pkgSlug.replace(/^workers-hop-gdn-/iu, ''), diff --git a/package-lock.json b/package-lock.json index f402441..754ebbd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@clevercanyon/utilities.cfw", - "version": "1.0.263", + "version": "1.0.264", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@clevercanyon/utilities.cfw", - "version": "1.0.263", + "version": "1.0.264", "cpu": [ "x64", "arm64" @@ -17,7 +17,7 @@ "linux" ], "devDependencies": { - "@clevercanyon/dev-deps": "^1.0.364" + "@clevercanyon/dev-deps": "^1.0.365" }, "engines": { "node": "^20.5.0 || ^20.9.0 || ^21.6.2", @@ -27,7 +27,7 @@ "url": "https://github.com/sponsors/clevercanyon" }, "peerDependencies": { - "@clevercanyon/utilities": "^1.0.876", + "@clevercanyon/utilities": "^1.0.877", "@upstash/ratelimit": "1.0.0", "@upstash/redis": "1.28.0" } @@ -837,9 +837,9 @@ "dev": true }, "node_modules/@clevercanyon/dev-deps": { - "version": "1.0.364", - "resolved": "https://registry.npmjs.org/@clevercanyon/dev-deps/-/dev-deps-1.0.364.tgz", - "integrity": "sha512-FCsiGgdeuW8jydIdvbVCEJxgsA6J1mIxs4ZWAV7ZAb0ewfm3sQPxRZF7Ud9+QtDZnLTRFNevzO3iLsR6h+gKhg==", + "version": "1.0.365", + "resolved": "https://registry.npmjs.org/@clevercanyon/dev-deps/-/dev-deps-1.0.365.tgz", + "integrity": "sha512-Fz8vDwiubaYtfCG6taISWHnVZgJ2BEBinnZx5+yoqIBtI5/XWajEeh0AN+ZPHGs1FLifBhgCopEnF3+tIc+dxA==", "cpu": [ "x64", "arm64" @@ -850,11 +850,11 @@ "linux" ], "dependencies": { - "@clevercanyon/madrun": "^1.0.184", - "@clevercanyon/utilities": "^1.0.875", - "@clevercanyon/utilities.bash": "^1.0.198", - "@clevercanyon/utilities.cfp": "^1.0.221", - "@clevercanyon/utilities.node": "^1.0.193", + "@clevercanyon/madrun": "^1.0.185", + "@clevercanyon/utilities": "^1.0.876", + "@clevercanyon/utilities.bash": "^1.0.199", + "@clevercanyon/utilities.cfp": "^1.0.222", + "@clevercanyon/utilities.node": "^1.0.194", "@cloudflare/workers-types": "4.20240208.0", "@eslint/js": "8.48.0", "@iarna/toml": "2.2.5", @@ -966,9 +966,9 @@ } }, "node_modules/@clevercanyon/madrun": { - "version": "1.0.185", - "resolved": "https://registry.npmjs.org/@clevercanyon/madrun/-/madrun-1.0.185.tgz", - "integrity": "sha512-W21iWYhqTScTduYm7MISrJ3WHFoGP70KSKAlGQB9ilmBd7CNfZD5NS3X4FDU+IdyDAZVr7eGnQOF7AMAQoZZ0A==", + "version": "1.0.186", + "resolved": "https://registry.npmjs.org/@clevercanyon/madrun/-/madrun-1.0.186.tgz", + "integrity": "sha512-9+C3+351DtvpnHPprafxUHTdLScRngj/xfmEp1jrrjX6pVsHfQCGv3fG2y2FvhbRwkctQ2HEWrHSHA3hbS/s/Q==", "cpu": [ "x64", "arm64" @@ -979,8 +979,8 @@ "linux" ], "dependencies": { - "@clevercanyon/utilities": "^1.0.875", - "@clevercanyon/utilities.node": "^1.0.193" + "@clevercanyon/utilities": "^1.0.876", + "@clevercanyon/utilities.node": "^1.0.194" }, "bin": { "madrun": "dist/bin/cli.js" @@ -1016,9 +1016,9 @@ } }, "node_modules/@clevercanyon/utilities": { - "version": "1.0.876", - "resolved": "https://registry.npmjs.org/@clevercanyon/utilities/-/utilities-1.0.876.tgz", - "integrity": "sha512-tdHFc6MwsavobQJ3wPO9Tx5KuKr5rQqbNsS9UKCzzQOiHyH/HpTNbRcg1GbT357sJ+ejAJw/X5nvRN9yaoglGw==", + "version": "1.0.877", + "resolved": "https://registry.npmjs.org/@clevercanyon/utilities/-/utilities-1.0.877.tgz", + "integrity": "sha512-oAh+JPL4f5fGumMYeahsRAhmyPFU/sb5D1t6OPu228FuSaKl8PESunuRr8LXzHaPp9PPstk5yoAuHg2S9Qq6Ng==", "cpu": [ "x64", "arm64" @@ -1051,9 +1051,9 @@ } }, "node_modules/@clevercanyon/utilities.bash": { - "version": "1.0.198", - "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.bash/-/utilities.bash-1.0.198.tgz", - "integrity": "sha512-XxKi3wY8+ORoFIWfixgQiSk/evWlNrHRseOh7JshzBqcgtFLOv8ieHy4M17h43GKk/mW2yhqEJX3xPYFrTwo1A==", + "version": "1.0.199", + "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.bash/-/utilities.bash-1.0.199.tgz", + "integrity": "sha512-ZB0AMWe1v3WSSJQXzbTLOrB4NvJySLRYDLBrwvjaGGXJdIqzz9CByxgGKHrIYUgWvAexVZEkxcTVxDcAtEaF9g==", "cpu": [ "x64", "arm64" @@ -1071,14 +1071,14 @@ "url": "https://github.com/sponsors/clevercanyon" }, "peerDependencies": { - "@clevercanyon/utilities": "^1.0.871", - "@clevercanyon/utilities.node": "^1.0.193" + "@clevercanyon/utilities": "^1.0.876", + "@clevercanyon/utilities.node": "^1.0.194" } }, "node_modules/@clevercanyon/utilities.cfp": { - "version": "1.0.221", - "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.cfp/-/utilities.cfp-1.0.221.tgz", - "integrity": "sha512-JDx08hj6bQHrnOnS6EPgvWnXtR0VYteirmpqLZ6J/FBXVkOShhLkScoA0Br5WQYUv1jc1je33L/toGwsizh4Rw==", + "version": "1.0.222", + "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.cfp/-/utilities.cfp-1.0.222.tgz", + "integrity": "sha512-i9ky436K2AgTDhCeX+Z8y1nEcQnpKOAKvRF8LkJB+0EcuOku/pyjCJLRHrjSE/xykKU1AAubfS2dxnP8sQ18CA==", "cpu": [ "x64", "arm64" @@ -1096,15 +1096,15 @@ "url": "https://github.com/sponsors/clevercanyon" }, "peerDependencies": { - "@clevercanyon/utilities": "^1.0.871", - "@clevercanyon/utilities.cfw": "^1.0.259", - "@clevercanyon/utilities.web": "^1.0.146" + "@clevercanyon/utilities": "^1.0.876", + "@clevercanyon/utilities.cfw": "^1.0.264", + "@clevercanyon/utilities.web": "^1.0.147" } }, "node_modules/@clevercanyon/utilities.cfw": { - "version": "1.0.263", - "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.cfw/-/utilities.cfw-1.0.263.tgz", - "integrity": "sha512-s1HutrOKYgpHCX4G8KBpaqzmzJ0ivC8m1LVs5gqXGLgXrSVQKZkR+mzRi+AFS/1WS/S4NPwy+HTvezUVYJ8HHA==", + "version": "1.0.264", + "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.cfw/-/utilities.cfw-1.0.264.tgz", + "integrity": "sha512-8mxxkZpxAWFj1fgmphHteXhHVO120O/CKDn/h9IWkoT7OQoelIa+n/T7xqOavf2cxEbHWm+lNdR8ekb9a6X5gg==", "cpu": [ "x64", "arm64" @@ -1123,15 +1123,15 @@ "url": "https://github.com/sponsors/clevercanyon" }, "peerDependencies": { - "@clevercanyon/utilities": "^1.0.873", + "@clevercanyon/utilities": "^1.0.876", "@upstash/ratelimit": "1.0.0", "@upstash/redis": "1.28.0" } }, "node_modules/@clevercanyon/utilities.node": { - "version": "1.0.194", - "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.node/-/utilities.node-1.0.194.tgz", - "integrity": "sha512-kyjbPkgKETGeyn71XcMtno/yGq1zn3DbXeN3w874PSltdbIjalcVGPy4i/ALKclXbJjSURHF2hS7OQgCLYrgPQ==", + "version": "1.0.195", + "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.node/-/utilities.node-1.0.195.tgz", + "integrity": "sha512-lC1B7PfrZZeNCG7qTYlnsApHVcBYPy814fRZiQttj5wu8CgxyOxNk4a/guYItkSSggUhdwgqjroj/ZUn0tzXMA==", "cpu": [ "x64", "arm64" @@ -1150,7 +1150,7 @@ }, "peerDependencies": { "@clevercanyon/split-cmd.fork": "^1.0.132", - "@clevercanyon/utilities": "^1.0.876", + "@clevercanyon/utilities": "^1.0.877", "@upstash/ratelimit": "1.0.0", "@upstash/redis": "1.28.0", "archiver": "6.0.1", @@ -1170,9 +1170,9 @@ } }, "node_modules/@clevercanyon/utilities.web": { - "version": "1.0.147", - "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.web/-/utilities.web-1.0.147.tgz", - "integrity": "sha512-x3qWnIzz04aXuv+F8cGAA1FzciQ4dXzIT5vPgsXwiiKpjSxctViKlli12lIEl6O7n5J64IughvTMcpiejWMGGg==", + "version": "1.0.148", + "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.web/-/utilities.web-1.0.148.tgz", + "integrity": "sha512-vqYas4gkSL7cUgG64GIOxyBofFprO51vTJU7xQmvVuhHROGkrJsOX2phdzsek5O89UYotmk84cB72LemUZWImg==", "cpu": [ "x64", "arm64" @@ -1191,7 +1191,7 @@ "url": "https://github.com/sponsors/clevercanyon" }, "peerDependencies": { - "@clevercanyon/utilities": "^1.0.871" + "@clevercanyon/utilities": "^1.0.876" } }, "node_modules/@cloudflare/kv-asset-handler": { @@ -3595,18 +3595,18 @@ "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.24", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.24.tgz", - "integrity": "sha512-+VaWXDa6+l6MhflBvVXjIEAzb59nQ2JUK3bwRp2zRpPtU+8TFRy9Gg/5oIcNlkEL5PGlBFGfemUVvIgLnTzq7Q==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@mdn/browser-compat-data": { - "version": "5.5.12", - "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-5.5.12.tgz", - "integrity": "sha512-/AHFqy6OeNHS2NNZGFVRgQh+pnW8iAoV3d1fiO9b2PuQ3HzZpC30MrMrHtq1uOGy1/zcK4uPQEyI31jkM0NNAA==", + "version": "5.5.13", + "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-5.5.13.tgz", + "integrity": "sha512-TebJo+nW4mfxxHcCoYC+3GgSitQGwjp6sAT/b6tqfKifyLfn9jlf3xa0tE/fnhGFerLzGauFrTf1HCTuVyYysQ==", "dev": true }, "node_modules/@mdx-js/esbuild": { @@ -3710,9 +3710,9 @@ } }, "node_modules/@microsoft/api-extractor": { - "version": "7.42.1", - "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.42.1.tgz", - "integrity": "sha512-eswRJCfiscDDcgu+0DPBdpYKRCVXaeFOOp9h4Y4ixoCCeGoEwgNi/P9zp39O+61pLWxZ3pAShTY0pe8vw5LtrQ==", + "version": "7.42.2", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.42.2.tgz", + "integrity": "sha512-HYiOQDO4WR+Pj4XQZZE5qK5R6e3MF6Ut5s+Hi2IkeI6MiCXkdmRugQH6ppc9YzTUiydRqZ+jshZD7UWNGSA8bg==", "dev": true, "dependencies": { "@microsoft/api-extractor-model": "7.28.13", @@ -3721,7 +3721,7 @@ "@rushstack/node-core-library": "4.0.2", "@rushstack/rig-package": "0.5.2", "@rushstack/terminal": "0.10.0", - "@rushstack/ts-command-line": "4.18.1", + "@rushstack/ts-command-line": "4.19.0", "lodash": "~4.17.15", "minimatch": "~3.0.3", "resolve": "~1.22.1", @@ -5718,9 +5718,9 @@ } }, "node_modules/@rushstack/ts-command-line": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-4.18.1.tgz", - "integrity": "sha512-A3x3ARWzoW4ARU1XS87wFVJvdywzo2j27aRm5SIFY3Nwl5vQqo0hvzaQDYCq/hEGBxAdBGW8q6N5clNk36H34A==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-4.19.0.tgz", + "integrity": "sha512-0sIHWOFGLFb6tC1zk2R0aM79ic3CF0XGzVBvhf6ytMyjDwt03DVb1qe5/5NQ0FGcvB5YyQ2WVfGsnxG6SANvHA==", "dev": true, "dependencies": { "@rushstack/terminal": "0.10.0", @@ -7491,9 +7491,9 @@ } }, "node_modules/autoprefixer": { - "version": "10.4.17", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.17.tgz", - "integrity": "sha512-/cpVNRLSfhOtcGflT13P2794gVSgmPgTR+erw5ifnMLZb0UnSlkK4tquLmkd3BhA+nLo5tX8Cu0upUsGKvKbmg==", + "version": "10.4.18", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.18.tgz", + "integrity": "sha512-1DKbDfsr6KUElM6wg+0zRNkB/Q7WcKYAaK+pzXn+Xqmszm/5Xa9coeNdtP88Vi+dPzZnMjhge8GIV49ZQkDa+g==", "dev": true, "funding": [ { @@ -7510,8 +7510,8 @@ } ], "dependencies": { - "browserslist": "^4.22.2", - "caniuse-lite": "^1.0.30001578", + "browserslist": "^4.23.0", + "caniuse-lite": "^1.0.30001591", "fraction.js": "^4.3.7", "normalize-range": "^0.1.2", "picocolors": "^1.0.0", @@ -9510,9 +9510,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.689", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.689.tgz", - "integrity": "sha512-GatzRKnGPS1go29ep25reM94xxd1Wj8ritU0yRhCJ/tr1Bg8gKnm6R9O/yPOhGQBoLMZ9ezfrpghNaTw97C/PQ==", + "version": "1.4.690", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.690.tgz", + "integrity": "sha512-+2OAGjUx68xElQhydpcbqH50hE8Vs2K6TkAeLhICYfndb67CVH0UsZaijmRUE3rHlIxU1u0jxwhgVe6fK3YANA==", "dev": true }, "node_modules/emittery": { diff --git a/package.json b/package.json index 703e019..9ac67b3 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "publishConfig": { "access": "public" }, - "version": "1.0.264", + "version": "1.0.265", "license": "GPL-3.0-or-later", "name": "@clevercanyon/utilities.cfw", "description": "Utilities for JavaScript apps running in a Cloudflare Worker environment.", @@ -59,7 +59,7 @@ }, "dependencies": {}, "peerDependencies": { - "@clevercanyon/utilities": "^1.0.876", + "@clevercanyon/utilities": "^1.0.877", "@upstash/ratelimit": "1.0.0", "@upstash/redis": "1.28.0" }, @@ -67,7 +67,7 @@ "optionalDependencies": {}, "bundleDependencies": [], "devDependencies": { - "@clevercanyon/dev-deps": "^1.0.364" + "@clevercanyon/dev-deps": "^1.0.365" }, "overrides": {}, "cpu": ["x64", "arm64"], diff --git a/src/cfw.ts b/src/cfw.ts index d486c93..61106f8 100644 --- a/src/cfw.ts +++ b/src/cfw.ts @@ -45,8 +45,8 @@ export type StdExecutionContext = Readonly< > >; export type StdEnvironment = Readonly<{ - UT: $type.cfw.Fetcher; - UT_KV: $type.cfw.KVNamespace; + RT: $type.cfw.Fetcher; + RT_KV: $type.cfw.KVNamespace; D1: $type.cfw.D1Database; R2: $type.cfw.R2Bucket; KV: $type.cfw.KVNamespace; diff --git a/src/proxy.ts b/src/proxy.ts index 1854777..86fa72a 100644 --- a/src/proxy.ts +++ b/src/proxy.ts @@ -28,6 +28,9 @@ type RequiredFetchOptions = Required & { proxy: Required; headers: $type.cfw.Headers; }; +export type UAHeaderOptions = { + randomIndex?: number; +}; export type UAHeaders = $type.ReadonlyDeep<{ 'user-agent': string; @@ -261,17 +264,22 @@ const fetchꓺviaSocket = async (rcData: $cfw.StdRequestContextData, url: $type. /** * Fetches UA headers. * - * @param rcData Request context data; {@see $cfw.StdRequestContextData}. + * @param rcData Request context data; {@see $cfw.StdRequestContextData}. + * @param options All optional; {@see UAHeaderOptions}. * - * @returns Promise of UA headers. + * @returns Promise of UA headers. */ -export const uaHeaders = async (rcData: $cfw.StdRequestContextData): Promise => { +export const uaHeaders = async (rcData: $cfw.StdRequestContextData, options?: UAHeaderOptions): Promise => { const { fetch } = cfw, { url, env, auditLogger } = rcData, // + opts = $obj.defaults({}, options || {}, { + randomIndex: $crypto.randomNumber(1, 100), + }) as Required, + // apiRoute = $url.addQueryVars( - { random_index: String($crypto.randomNumber(1, 100)) }, // - 'https://workers.hop.gdn/utilities/api/ua-headers/v1', + { random_index: String(opts.randomIndex) }, // + new URL('https://workers.hop.gdn/api/ua-headers/v1'), ), defaultHeaders = { 'upgrade-insecure-requests': '1', @@ -286,9 +294,9 @@ export const uaHeaders = async (rcData: $cfw.StdRequestContextData): Promise => { return $to.plainObject(await response.json()) as UAHeadersResponsePayload; }) @@ -310,7 +318,7 @@ export const uaHeaders = async (rcData: $cfw.StdRequestContextData): Promise => { return $to.plainObject(await response.json()) as UAHeadersResponsePayload; @@ -326,3 +334,4 @@ export const uaHeaders = async (rcData: $cfw.StdRequestContextData): Promise