From 32ba91104382cda759ecdf1a7ea0b7f05121695e Mon Sep 17 00:00:00 2001 From: Jason Caldwell Date: Fri, 8 Mar 2024 17:52: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 | 12 ++++++------ package.json | 2 +- src/cfw.ts | 5 +++-- tsconfig.json | 2 +- wrangler.toml | 2 +- 14 files changed, 24 insertions(+), 23 deletions(-) diff --git a/.browserslistrc b/.browserslistrc index 0edd668..70a5ac6 100644 --- a/.browserslistrc +++ b/.browserslistrc @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 8, 2024 10:49 PM UTC. +# Last generated Mar 8, 2024 10:52 PM UTC. [production] node >= 20.9.0 diff --git a/.dockerignore b/.dockerignore index 4c95089..6ec80c4 100644 --- a/.dockerignore +++ b/.dockerignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 8, 2024 10:49 PM UTC. +# Last generated Mar 8, 2024 10:52 PM UTC. # Locals diff --git a/.env.vault b/.env.vault index 48b44b1..e45646e 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="8wFgSA71pNNzKURW0n4zwLyUrmKQLbrgMJFoyLosPmlnQM9rAVvwQC0z07TmUPgzF1Ix9caQhKUC0xETYSSJE/9AgCeG4m29KbGHb1lYXiKdOIDZteKNnsr0XUSni5AJPAHO+vim1fJjCkIA7tIJ1gSzNNsBlykvWevVKcGkk2dsP0e/x6bsik53EbveIeS7rB0ZMNLh098npyEGb3sbinW2F0qORELmKc0T+ejQ5U3hz85AXpZRuh/cTWA9q0gMgaFHDCPY4Q+FR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RheMLg7kjNFAUj3CUuzPvKHWVV/SzODqiEHfHylYluIsjXaylZci4sHtLy1KkspA7sH1U6kA8MUm3yqXD6vwd9O3lbvdN11DW2zQEUtqrG1MJhmjrBKkBPF6GK33mQsboErW+bbxM6aI3KOdIRawKvmcIw3mTtwmgV9xGAtNp+9wSTfHPxl7PjBDfXc" +DOTENV_VAULT_CI_VERSION=263 # stage DOTENV_VAULT_STAGE="bfqZYD8oVLWMZ0JR5LICV+sB/btaXavszxZLxTfwSH8U5fg=" diff --git a/.gitattributes b/.gitattributes index 1287884..2436209 100644 --- a/.gitattributes +++ b/.gitattributes @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 8, 2024 10:49 PM UTC. +# Last generated Mar 8, 2024 10:52 PM UTC. # Default diff --git a/.gitignore b/.gitignore index f361920..72001db 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 8, 2024 10:49 PM UTC. +# Last generated Mar 8, 2024 10:52 PM UTC. # Locals diff --git a/.npmignore b/.npmignore index c812030..d77bb4c 100644 --- a/.npmignore +++ b/.npmignore @@ -25,7 +25,7 @@ # Generated data. # -# Last generated Mar 8, 2024 10:49 PM UTC. +# Last generated Mar 8, 2024 10:52 PM UTC. # Locals diff --git a/.prettierignore b/.prettierignore index 3198e38..39d2227 100644 --- a/.prettierignore +++ b/.prettierignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 8, 2024 10:49 PM UTC. +# Last generated Mar 8, 2024 10:52 PM UTC. # Packages diff --git a/.vscode/settings.json b/.vscode/settings.json index 28d6498..9ab2221 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 8, 2024 10:49 PM UTC. + * Last generated using `./settings.mjs` Mar 8, 2024 10:52 PM UTC. */ { "editor.formatOnType": false, diff --git a/.vscodeignore b/.vscodeignore index d085bde..587f503 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 8, 2024 10:49 PM UTC. +# Last generated Mar 8, 2024 10:52 PM UTC. # Locals diff --git a/package-lock.json b/package-lock.json index 208973b..c4e9293 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@clevercanyon/utilities.cfw", - "version": "1.0.283", + "version": "1.0.284", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@clevercanyon/utilities.cfw", - "version": "1.0.283", + "version": "1.0.284", "cpu": [ "x64", "arm64" @@ -1103,9 +1103,9 @@ } }, "node_modules/@clevercanyon/utilities.cfw": { - "version": "1.0.283", - "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.cfw/-/utilities.cfw-1.0.283.tgz", - "integrity": "sha512-v3awd9Nwl8dJJwOIWjmkzokxoN8Z/6KvJo+5m39//wHa+ySyfl3h28A6O7ETszENXfsDoW7I+G4q5GJBu2JuPQ==", + "version": "1.0.284", + "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.cfw/-/utilities.cfw-1.0.284.tgz", + "integrity": "sha512-vjN7R7pDtViIJJE9vegskvovv98fJf40l1deEsJfRQ1yll5N6FZoprH2HETQcTYMTU3CnV65kTQN5F79pGPFhA==", "cpu": [ "x64", "arm64" @@ -1124,7 +1124,7 @@ "url": "https://github.com/sponsors/clevercanyon" }, "peerDependencies": { - "@clevercanyon/utilities": "^1.0.890", + "@clevercanyon/utilities": "^1.0.891", "@cloudflare/ai": "1.0.53", "@upstash/ratelimit": "1.0.0", "@upstash/redis": "1.28.0" diff --git a/package.json b/package.json index 0890312..ff992a5 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "publishConfig": { "access": "public" }, - "version": "1.0.284", + "version": "1.0.285", "license": "GPL-3.0-or-later", "name": "@clevercanyon/utilities.cfw", "description": "Utilities for JavaScript apps running in a Cloudflare Worker environment.", diff --git a/src/cfw.ts b/src/cfw.ts index fa9ba4d..50413c5 100644 --- a/src/cfw.ts +++ b/src/cfw.ts @@ -106,7 +106,8 @@ const maybeInitializeGlobals = async (ircData: InitialRequestContextData): Promi * @returns Response promise. */ export const handleFetchEvent = async (ircData: InitialRequestContextData): Promise<$type.cfw.Response> => { - let { request } = ircData; // Extracts writable data. + let { request } = ircData; + const { scheduledEvent, ctx, env, routes } = ircData, subrequestCounter = { value: 0 }; @@ -126,7 +127,7 @@ export const handleFetchEvent = async (ircData: InitialRequestContextData): Prom let originalRequest = request; // Potentially rewritten. request = (await $http.prepareRequest(request, {})) as $type.cfw.Request; - if (request !== originalRequest /* Reinitializes using rewritten request. */) { + if (request !== originalRequest /* Reinitializes audit logger. */) { auditLogger = baseAuditLogger.withContext({}, { request }); } const url = $url.parse(request.url) as $type.cfw.URL, diff --git a/tsconfig.json b/tsconfig.json index 6dd5ffd..b1f27d3 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 8, 2024 10:49 PM UTC. + * Last generated using `./tsconfig.mjs` Mar 8, 2024 10:52 PM UTC. */ { "include": ["./src/**/*", "./dev-types.d.ts"], diff --git a/wrangler.toml b/wrangler.toml index 9f89cec..e9ac005 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 8, 2024 10:49 PM UTC. +# Last generated using `./wrangler.mjs` Mar 8, 2024 10:52 PM UTC. ## send_metrics = false