From 9135ca8500b163ce8f83f7701cc8e95b1cd44da7 Mon Sep 17 00:00:00 2001 From: Jason Caldwell Date: Wed, 6 Mar 2024 12:15:40 -0500 Subject: [PATCH] Project update. [p][robotic] --- .browserslistrc | 2 +- .dockerignore | 2 +- .env.vault | 8 +++--- .gitattributes | 2 +- .gitignore | 2 +- .npmignore | 2 +- .prettierignore | 2 +- .vscode/settings.json | 2 +- .vscodeignore | 2 +- package-lock.json | 61 +++++++++++++++++++++++++++++-------------- package.json | 4 +-- src/proxy.ts | 7 ++--- tsconfig.json | 2 +- wrangler.toml | 2 +- 14 files changed, 62 insertions(+), 38 deletions(-) diff --git a/.browserslistrc b/.browserslistrc index e6fbaa9..1ff6fcf 100644 --- a/.browserslistrc +++ b/.browserslistrc @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 6, 2024 3:09 PM UTC. +# Last generated Mar 6, 2024 5:15 PM UTC. [production] node >= 20.9.0 diff --git a/.dockerignore b/.dockerignore index 20082cf..c36d31b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 6, 2024 3:09 PM UTC. +# Last generated Mar 6, 2024 5:15 PM UTC. # Locals diff --git a/.env.vault b/.env.vault index 2a6a3aa..a19c9e4 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="xHca0KBPB5T5REB6ji3ghs0+l4POJffpYmq6v3ts4V7JQInNMb7KUuaDkeBZAQNRWXNZuLdPsftxfB89xu28jqLXDla66jHqBQL7A7SFq2aodFLaIalZGRKVzwon6iqkcgmIYcEUGO7mvj+dt1O7uYEJ65qrf2qmk2jatzXkfGsCBkfteTK+M1SD7GaBkQy7frcjClRp3ntfKvcE8xnnOCyWZpzSnDhZ9uViEnwWFpacFtbPxE2J6TP8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D1Jp2m/UxCqq6xo0WUU1DXeHIR7DXc7DWEO3FtCz5twK41mUYr9vaL5I/zmYIrMI+0V32X4TJG/ciQfpiAKXCczc/hQQzcS+tVXN8Slmf1C9nhf2Cm3NxDUuVC7cI26GwWCXKhlUTEitx6ol6+0i/neSFASlpkvK+2sg5IAaLjgU8q+6pYMcOVn8kbx8q1EFUlM4YDtAElRSOAOFzkndlG2ADNlqf/r2/jF9" +DOTENV_VAULT_CI_VERSION=251 # stage DOTENV_VAULT_STAGE="bfqZYD8oVLWMZ0JR5LICV+sB/btaXavszxZLxTfwSH8U5fg=" diff --git a/.gitattributes b/.gitattributes index 045550b..15040e8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 6, 2024 3:09 PM UTC. +# Last generated Mar 6, 2024 5:15 PM UTC. # Default diff --git a/.gitignore b/.gitignore index 1add941..6e761ad 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 6, 2024 3:09 PM UTC. +# Last generated Mar 6, 2024 5:15 PM UTC. # Locals diff --git a/.npmignore b/.npmignore index 09cc26b..414c955 100644 --- a/.npmignore +++ b/.npmignore @@ -25,7 +25,7 @@ # Generated data. # -# Last generated Mar 6, 2024 3:09 PM UTC. +# Last generated Mar 6, 2024 5:15 PM UTC. # Locals diff --git a/.prettierignore b/.prettierignore index c10fe6c..20501ca 100644 --- a/.prettierignore +++ b/.prettierignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 6, 2024 3:09 PM UTC. +# Last generated Mar 6, 2024 5:15 PM UTC. # Packages diff --git a/.vscode/settings.json b/.vscode/settings.json index 8d0302b..68cff8e 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 6, 2024 3:09 PM UTC. + * Last generated using `./settings.mjs` Mar 6, 2024 5:15 PM UTC. */ { "editor.formatOnType": false, diff --git a/.vscodeignore b/.vscodeignore index 87e43c8..fe89077 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 6, 2024 3:09 PM UTC. +# Last generated Mar 6, 2024 5:15 PM UTC. # Locals diff --git a/package-lock.json b/package-lock.json index ced0c64..665abff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@clevercanyon/utilities.cfw", - "version": "1.0.277", + "version": "1.0.278", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@clevercanyon/utilities.cfw", - "version": "1.0.277", + "version": "1.0.278", "cpu": [ "x64", "arm64" @@ -27,7 +27,7 @@ "url": "https://github.com/sponsors/clevercanyon" }, "peerDependencies": { - "@clevercanyon/utilities": "^1.0.886", + "@clevercanyon/utilities": "^1.0.887", "@cloudflare/ai": "1.0.53", "@upstash/ratelimit": "1.0.0", "@upstash/redis": "1.28.0" @@ -1017,9 +1017,9 @@ } }, "node_modules/@clevercanyon/utilities": { - "version": "1.0.886", - "resolved": "https://registry.npmjs.org/@clevercanyon/utilities/-/utilities-1.0.886.tgz", - "integrity": "sha512-9K29/P6L8blTU84KUcI/htnvDK1/UbvfsaQhe/6EVdU4Ge+NKZNn5EtxG/q67dPOTbB89/QVtnU/l+8YHPPYcg==", + "version": "1.0.887", + "resolved": "https://registry.npmjs.org/@clevercanyon/utilities/-/utilities-1.0.887.tgz", + "integrity": "sha512-JsJof9A2ba2je/Ns0oj/SpDc3REdWrJ9v8ooGelfKvBl0fnXyh8OyYaZP5QevWiVh1W2SB1goup53ekI6onHmA==", "cpu": [ "x64", "arm64" @@ -1103,9 +1103,9 @@ } }, "node_modules/@clevercanyon/utilities.cfw": { - "version": "1.0.277", - "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.cfw/-/utilities.cfw-1.0.277.tgz", - "integrity": "sha512-PlggOYhKbhghPh6AkaSm/3tPf3OUeQ2mPE2dgx6jYThAD3jqcez+oFT3qQWNkG6xFTlkHZF7eQHk1k+Y2dEPdg==", + "version": "1.0.278", + "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.cfw/-/utilities.cfw-1.0.278.tgz", + "integrity": "sha512-zFSx8tiRltCX4iR1viEzv5+rMchT0Oy+pcMWJXYkVm+KR65vgAPAc/z+deuDAFGlQTQuMD0HJn+awimxqCq8oA==", "cpu": [ "x64", "arm64" @@ -1124,7 +1124,7 @@ "url": "https://github.com/sponsors/clevercanyon" }, "peerDependencies": { - "@clevercanyon/utilities": "^1.0.885", + "@clevercanyon/utilities": "^1.0.886", "@cloudflare/ai": "1.0.53", "@upstash/ratelimit": "1.0.0", "@upstash/redis": "1.28.0" @@ -3612,9 +3612,9 @@ } }, "node_modules/@mdn/browser-compat-data": { - "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==", + "version": "5.5.14", + "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-5.5.14.tgz", + "integrity": "sha512-K7e35i4XtNWpiOr+aPiy3UccAhFop0HsfVz9RSzlcgaaHb2aD/nN0J3uPPLedyTokMiebxN0gxkL/WXpzNQuKg==", "dev": true }, "node_modules/@mdx-js/esbuild": { @@ -18511,9 +18511,9 @@ } }, "node_modules/mdast-util-mdx-jsx": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.1.0.tgz", - "integrity": "sha512-A8AJHlR7/wPQ3+Jre1+1rq040fX9A4Q1jG8JxmSNp/PLPHg80A6475wxTp3KzHpApFH6yWxFotHrJQA3dXP6/w==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.1.1.tgz", + "integrity": "sha512-Di63TQEHbiApe6CFp/qQXCORHMHnmW2JFdr5PYH57LuEIPjijRHicAmL5wQu+B0/Q4p0qJaEOE1EkhiwxiNmAQ==", "dev": true, "dependencies": { "@types/estree-jsx": "^1.0.0", @@ -21922,9 +21922,9 @@ } }, "node_modules/postcss-nesting": { - "version": "12.0.4", - "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-12.0.4.tgz", - "integrity": "sha512-WuCe0KnP4vKjLZK8VNoUWKL8ZLOv/5jiM94mHcI3VszLropHwmjotdUyP/ObzqZpXuQKP2Jf9R12vIHKFSStKw==", + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-12.1.0.tgz", + "integrity": "sha512-QOYnosaZ+mlP6plQrAxFw09UUp2Sgtxj1BVHN+rSVbtV0Yx48zRt9/9F/ZOoxOKBBEsaJk2MYhhVRjeRRw5yuw==", "dev": true, "funding": [ { @@ -21937,6 +21937,7 @@ } ], "dependencies": { + "@csstools/selector-resolve-nested": "^1.1.0", "@csstools/selector-specificity": "^3.0.2", "postcss-selector-parser": "^6.0.13" }, @@ -21947,6 +21948,28 @@ "postcss": "^8.4" } }, + "node_modules/postcss-nesting/node_modules/@csstools/selector-resolve-nested": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-resolve-nested/-/selector-resolve-nested-1.1.0.tgz", + "integrity": "sha512-uWvSaeRcHyeNenKg8tp17EVDRkpflmdyvbE0DHo6D/GdBb6PDnCYYU6gRpXhtICMGMcahQmj2zGxwFM/WC8hCg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "engines": { + "node": "^14 || ^16 || >=18" + }, + "peerDependencies": { + "postcss-selector-parser": "^6.0.13" + } + }, "node_modules/postcss-nesting/node_modules/@csstools/selector-specificity": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.0.2.tgz", diff --git a/package.json b/package.json index 63aea42..76235d5 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "publishConfig": { "access": "public" }, - "version": "1.0.278", + "version": "1.0.279", "license": "GPL-3.0-or-later", "name": "@clevercanyon/utilities.cfw", "description": "Utilities for JavaScript apps running in a Cloudflare Worker environment.", @@ -64,7 +64,7 @@ }, "dependencies": {}, "peerDependencies": { - "@clevercanyon/utilities": "^1.0.886", + "@clevercanyon/utilities": "^1.0.887", "@cloudflare/ai": "1.0.53", "@upstash/ratelimit": "1.0.0", "@upstash/redis": "1.28.0" diff --git a/src/proxy.ts b/src/proxy.ts index 1345efd..35f584b 100644 --- a/src/proxy.ts +++ b/src/proxy.ts @@ -112,13 +112,14 @@ export const fetch = async (rcData: $cfw.StdRequestContextData, parseable: $type * @returns Promise of response from worker using another worker as a proxy. */ export const fetchWorker = async (rcData: $cfw.StdRequestContextData, requestInfo: $type.cfw.RequestInfo, requestInit?: $type.cfw.RequestInit): Promise<$type.cfw.Response> => { - const { fetch, Request } = cfw; + const { fetch, Request } = cfw, + proxyRoute = 'https://worker-proxy.c10n.workers.dev/'; if ($is.string(requestInfo) || $is.url(requestInfo)) { - requestInfo = 'https://worker-proxy.c10n.workers.dev/?url=' + $url.encode(requestInfo.toString()); + requestInfo = $url.addQueryVar('url', requestInfo.toString(), proxyRoute); // } else if (requestInfo instanceof Request) { - requestInfo = new Request('https://worker-proxy.c10n.workers.dev/?url=' + $url.encode(requestInfo.url), requestInfo); + requestInfo = new Request($url.addQueryVar('url', requestInfo.url, proxyRoute), requestInfo); } return fetch(requestInfo, requestInit); }; diff --git a/tsconfig.json b/tsconfig.json index 466e3fd..cad67cd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,7 @@ * @note This entire file will be updated automatically. * @note Instead of editing here, please review `./tsconfig.mjs`. * - * Last generated using `./tsconfig.mjs` Mar 6, 2024 3:09 PM UTC. + * Last generated using `./tsconfig.mjs` Mar 6, 2024 5:15 PM UTC. */ { "include": ["./src/**/*", "./dev-types.d.ts"], diff --git a/wrangler.toml b/wrangler.toml index d1f8fd5..b5d7547 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -7,7 +7,7 @@ # @note This entire file will be updated automatically. # @note Instead of editing here, please review `./wrangler.mjs`. # -# Last generated using `./wrangler.mjs` Mar 6, 2024 3:09 PM UTC. +# Last generated using `./wrangler.mjs` Mar 6, 2024 5:15 PM UTC. ## send_metrics = false