From e924650f9d0fabd4c6ef75cb3755e6078770259c Mon Sep 17 00:00:00 2001 From: Jason Caldwell Date: Tue, 12 Mar 2024 04:19:28 -0400 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 | 28 +++++++++---------- package.json | 2 +- src/resources/classes/fetcher.ts | 2 +- .../apis/iso/ex-imports/routes/lazy.tsx | 10 +++---- tsconfig.json | 2 +- wrangler.toml | 2 +- 15 files changed, 35 insertions(+), 35 deletions(-) diff --git a/.browserslistrc b/.browserslistrc index 3b69a63d..df5c739c 100644 --- a/.browserslistrc +++ b/.browserslistrc @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 12, 2024 7:32 AM UTC. +# Last generated Mar 12, 2024 8:18 AM UTC. [production] node >= 20.9.0 diff --git a/.dockerignore b/.dockerignore index 5abe05b3..ccb5a34b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 12, 2024 7:32 AM UTC. +# Last generated Mar 12, 2024 8:18 AM UTC. # Locals diff --git a/.env.vault b/.env.vault index 9f373ea8..792e382c 100644 --- a/.env.vault +++ b/.env.vault @@ -8,12 +8,12 @@ DOTENV_VAULT_MAIN="7GW98NfL4hM4N6HbfeDXCKreVxKvcVPupFRnZ8XJ+pomaQ==" DOTENV_VAULT_MAIN_VERSION=1 # dev -DOTENV_VAULT_DEV="f6fvCuMULB5G5/CefqOhtat3tZGZdFI+zXmmt48YZxUIIaHyoY9pnr/VDIvq/Knt46NWB6ozn+uT+IkC9To2fxvZGlBG19iZqhCDBPrNAqmP2pPdXGBDSsJmrbadVkuYygeEDXqm1oTlr2dT7+vvDcrr6NwfGJ+9NxQhPOtpC9GfZvFqv7rzr4+4OOkC71hRzRdNSNbidWNsZYrXg3EpoVavyZ7hXSjbfB3pYgzLADjPYS2eZDy8y/Tt3vyw4cLdxw==" -DOTENV_VAULT_DEV_VERSION=427 +DOTENV_VAULT_DEV="2ZfaY0xpL+veG1Iyx1G58+gzVQQzc/mT7y+XBwVBQRiSsIFlS/JxZsElq9kwLKKIKoroI9KiBYB+5uE3AIcS1F9rcFOWbZ2JrtiZmqPBx/9N7JRfuhhKlJftceni1NXex1Wcl/WQtf/nMmdc/EwXf+rKn/fMz9uzcU57ybZsEL2B4VpJQeTGiVvQfgzWXNKDPE/eEua4tRMfLFjyTpnsfoMK8A24jggpltQwl7o90Rohq+4MX9O+6ASaL+XgCfCryg==" +DOTENV_VAULT_DEV_VERSION=429 # ci -DOTENV_VAULT_CI="EMQzntgl/21t/qxdkJzTDxV/P54bWaUcbJ05DZq8kTmtBlMoMqySQVOSZ+0IivvyOxMYO392SRPF7l00rsMhAwwzBM1rkkwPDX/5GYd0PWDAOyFTQwUKCaaLY5ICJ3VI8u2Rzct7ZDJ4MSdpfzYo7ql6605ZmUJscxEwTd5xDg==" -DOTENV_VAULT_CI_VERSION=427 +DOTENV_VAULT_CI="36VuTdYCqb3Q3u54vvJckLH0UVTkOw9jBJ6FFGm7g8HY5rLsixA6RQt6BRNVZWvjDyKqbNRczjDU93KFSlAQN+DMcpVzhOQ2gG6bJfeVwxICgH5vsAl4IFAFYIHkEDfDmUkb1+eLBMed3RzMGHpiwF2Jq8Z+XoQyy5KeSJwcnQ==" +DOTENV_VAULT_CI_VERSION=429 # stage DOTENV_VAULT_STAGE="aRP8su2YV4jZu3w1HZ/SLaots0IwJDFw75TCpvXEFeNp7tw=" diff --git a/.gitattributes b/.gitattributes index f4efba17..c1096a87 100644 --- a/.gitattributes +++ b/.gitattributes @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 12, 2024 7:32 AM UTC. +# Last generated Mar 12, 2024 8:18 AM UTC. # Default diff --git a/.gitignore b/.gitignore index eb5784b2..32aa5b97 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 12, 2024 7:32 AM UTC. +# Last generated Mar 12, 2024 8:18 AM UTC. # Locals diff --git a/.npmignore b/.npmignore index fd2a5f65..dffa9d6b 100644 --- a/.npmignore +++ b/.npmignore @@ -25,7 +25,7 @@ # Generated data. # -# Last generated Mar 12, 2024 7:32 AM UTC. +# Last generated Mar 12, 2024 8:18 AM UTC. # Locals diff --git a/.prettierignore b/.prettierignore index 5ef2c622..11dccfba 100644 --- a/.prettierignore +++ b/.prettierignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 12, 2024 7:32 AM UTC. +# Last generated Mar 12, 2024 8:18 AM UTC. # Packages diff --git a/.vscode/settings.json b/.vscode/settings.json index 8f8134ed..a38ec27f 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 12, 2024 7:32 AM UTC. + * Last generated using `./settings.mjs` Mar 12, 2024 8:18 AM UTC. */ { "editor.formatOnType": false, diff --git a/.vscodeignore b/.vscodeignore index ef2f2e8f..97ecb179 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 12, 2024 7:32 AM UTC. +# Last generated Mar 12, 2024 8:18 AM UTC. # Locals diff --git a/package-lock.json b/package-lock.json index ec0b6fd6..40c3a7e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@clevercanyon/utilities", - "version": "1.0.899", + "version": "1.0.900", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@clevercanyon/utilities", - "version": "1.0.899", + "version": "1.0.900", "cpu": [ "x64", "arm64" @@ -1026,9 +1026,9 @@ } }, "node_modules/@clevercanyon/utilities": { - "version": "1.0.899", - "resolved": "https://registry.npmjs.org/@clevercanyon/utilities/-/utilities-1.0.899.tgz", - "integrity": "sha512-hpl3cibLc1i8BZMVydkUfr6X1hyvGsBgZkmwMSVU4Wwo3x2L13FEE7WMgbxojd5hfkK+b3nQTBItLjg8UFM/gQ==", + "version": "1.0.900", + "resolved": "https://registry.npmjs.org/@clevercanyon/utilities/-/utilities-1.0.900.tgz", + "integrity": "sha512-IZQhnTyPBUHxAm7Y86QLj8W3DFzuU/75rlZc33e+Ih96uPAD32i/vkc7X8J/1ZOEVE8X+famdEgDeX7+YM/aAw==", "cpu": [ "x64", "arm64" @@ -1087,9 +1087,9 @@ } }, "node_modules/@clevercanyon/utilities.cfp": { - "version": "1.0.236", - "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.cfp/-/utilities.cfp-1.0.236.tgz", - "integrity": "sha512-VfqDzHC8jsPwfTCyBxpNyV2JcsiWUwVN3unNqQfwMFg1X6vCam+HuLXRQ7Mx4EtJE2C19GHa6Lc0d+KqBUXexg==", + "version": "1.0.237", + "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.cfp/-/utilities.cfp-1.0.237.tgz", + "integrity": "sha512-F6GOqWS7XNrfYTRYKZZJMcx4a7avzoCiN6G5sMzQXlQlgSkBuMCwKBnONcJGlcB+LTxzylK/wg3NA2SO6jZC0Q==", "cpu": [ "x64", "arm64" @@ -1107,15 +1107,15 @@ "url": "https://github.com/sponsors/clevercanyon" }, "peerDependencies": { - "@clevercanyon/utilities": "^1.0.898", - "@clevercanyon/utilities.cfw": "^1.0.290", + "@clevercanyon/utilities": "^1.0.900", + "@clevercanyon/utilities.cfw": "^1.0.292", "@clevercanyon/utilities.web": "^1.0.152" } }, "node_modules/@clevercanyon/utilities.cfw": { - "version": "1.0.291", - "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.cfw/-/utilities.cfw-1.0.291.tgz", - "integrity": "sha512-KbrXHswoRcHhXlJn96c144BTW+tUtTP+3TES0+1VZwxiMNLPQQai9RnTA5ecw3vkEseszmYVeah2JBVyUyul5g==", + "version": "1.0.292", + "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.cfw/-/utilities.cfw-1.0.292.tgz", + "integrity": "sha512-nBFb+N0rcc0AJuu0hM5v89fLX6NbnBV1IMF5AENxfyZoLjTXA/ox/KBmxI6yvS0SDL/Kia8DQQXQUjabf5yDNA==", "cpu": [ "x64", "arm64" @@ -1134,7 +1134,7 @@ "url": "https://github.com/sponsors/clevercanyon" }, "peerDependencies": { - "@clevercanyon/utilities": "^1.0.898", + "@clevercanyon/utilities": "^1.0.900", "@cloudflare/ai": "1.0.53", "@upstash/ratelimit": "1.0.0", "@upstash/redis": "1.28.0" diff --git a/package.json b/package.json index 476a4375..07b496a3 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "publishConfig": { "access": "public" }, - "version": "1.0.900", + "version": "1.0.901", "license": "GPL-3.0-or-later", "name": "@clevercanyon/utilities", "description": "Utilities for JavaScript apps running in any environment.", diff --git a/src/resources/classes/fetcher.ts b/src/resources/classes/fetcher.ts index 453b9f49..a5a14b77 100644 --- a/src/resources/classes/fetcher.ts +++ b/src/resources/classes/fetcher.ts @@ -157,7 +157,7 @@ export const getClass = (): Constructor => { * @returns {@see fetch()} Same as global native fetch. */ protected async fetcher(...args: Parameters): ReturnType { - const fetch = (this.cfw?.fetch || globalThis.fetch) as typeof globalThis.fetch; + const fetch = (this.cfw ? this.cfw.fetch : globalThis.fetch) as typeof globalThis.fetch; if (!this.isCacheableRequest(args[1])) { return fetch(...args); // Uses native fetch. diff --git a/src/tests/preact/apis/iso/ex-imports/routes/lazy.tsx b/src/tests/preact/apis/iso/ex-imports/routes/lazy.tsx index e24dea6f..789d2b59 100644 --- a/src/tests/preact/apis/iso/ex-imports/routes/lazy.tsx +++ b/src/tests/preact/apis/iso/ex-imports/routes/lazy.tsx @@ -25,12 +25,12 @@ export type ComponentProps = $preact.Props<{ * @note {@see globalThis.fetch()} is stubbed out in the main test file. */ export const Component = $preact.lazyComponent(async (props: ComponentProps): Promise<$preact.VNode> => { - const fetcher = $preact.useFetcher(); + const { fetch } = $preact.useFetcher(); - await fetcher.fetch('http://x.tld/a'); - await fetcher.fetch('http://x.tld/b'); - await fetcher.fetch('http://x.tld/c'); - await fetcher.fetch('http://x.tld/d'); + await fetch('http://x.tld/a'); + await fetch('http://x.tld/b'); + await fetch('http://x.tld/c'); + await fetch('http://x.tld/d'); await (async () => null)(); await (async () => undefined)(); diff --git a/tsconfig.json b/tsconfig.json index 27b5300c..134e2035 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 12, 2024 7:32 AM UTC. + * Last generated using `./tsconfig.mjs` Mar 12, 2024 8:18 AM UTC. */ { "include": ["./src/**/*", "./dev-types.d.ts"], diff --git a/wrangler.toml b/wrangler.toml index 6477bf6c..1d247ad7 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 12, 2024 7:32 AM UTC. +# Last generated using `./wrangler.mjs` Mar 12, 2024 8:18 AM UTC. ## send_metrics = false