From 946597f9d178d8859453740a39c0db24b60cefdf Mon Sep 17 00:00:00 2001 From: Franklin Tina <76698025+franklin-tina@users.noreply.github.com> Date: Wed, 8 Jan 2025 00:58:45 -0600 Subject: [PATCH 1/2] chore(deps): update wrangler to version 3.100.0 fix: support multiple config file formats for Cloudflare --- package.json | 2 +- pnpm-lock.yaml | 188 ++++++++++++++++++++++++++++++++++++++----------- src/index.ts | 13 ++-- 3 files changed, 156 insertions(+), 47 deletions(-) diff --git a/package.json b/package.json index 6fbabbb..e3d8559 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "prettier": "^3.3.3", "typescript": "^5.6.3", "unbuild": "^2.0.0", - "wrangler": "^3.81.0" + "wrangler": "^3.100.0" }, "packageManager": "pnpm@9.12.2" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ca4bc8f..d1e4d51 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -50,7 +50,7 @@ importers: version: 2.9.7(magicast@0.3.5)(webpack-sources@3.2.3) nuxt: specifier: ^3.13.2 - version: 3.13.2(@parcel/watcher@2.4.1)(@types/node@22.7.8)(eslint@9.13.0(jiti@2.3.3))(ioredis@5.4.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@3.29.5)(terser@5.36.0)(typescript@5.6.3)(vite@5.4.8(@types/node@22.7.8)(terser@5.36.0))(webpack-sources@3.2.3) + version: 3.13.2(@parcel/watcher@2.4.1)(@types/node@22.7.8)(eslint@9.13.0(jiti@2.3.3))(ioredis@5.4.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@3.29.5)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3) prettier: specifier: ^3.3.3 version: 3.3.3 @@ -61,8 +61,8 @@ importers: specifier: ^2.0.0 version: 2.0.0(typescript@5.6.3) wrangler: - specifier: ^3.81.0 - version: 3.81.0(@cloudflare/workers-types@4.20241018.0) + specifier: ^3.100.0 + version: 3.100.0(@cloudflare/workers-types@4.20241018.0) examples/nitro: devDependencies: @@ -272,33 +272,59 @@ packages: cpu: [x64] os: [darwin] + '@cloudflare/workerd-darwin-64@1.20241230.0': + resolution: {integrity: sha512-BZHLg4bbhNQoaY1Uan81O3FV/zcmWueC55juhnaI7NAobiQth9RppadPNpxNAmS9fK2mR5z8xrwMQSQrHmztyQ==} + engines: {node: '>=16'} + cpu: [x64] + os: [darwin] + '@cloudflare/workerd-darwin-arm64@1.20241011.1': resolution: {integrity: sha512-c26TYtS0e3WZ09nL/a8YaEqveCsTlgDm12ehPMNua9u68sh1KzETMl2G45O934m8UrI3Rhpv2TTecO0S5b9exA==} engines: {node: '>=16'} cpu: [arm64] os: [darwin] + '@cloudflare/workerd-darwin-arm64@1.20241230.0': + resolution: {integrity: sha512-lllxycj7EzYoJ0VOJh8M3palUgoonVrILnzGrgsworgWlIpgjfXGS7b41tEGCw6AxSxL9prmTIGtfSPUvn/rjg==} + engines: {node: '>=16'} + cpu: [arm64] + os: [darwin] + '@cloudflare/workerd-linux-64@1.20241011.1': resolution: {integrity: sha512-pl4xvHNXnm3cYh5GwHadOTQRWt4Ih/gzCOb6RW4n78oNQQydFvpwqYAjbYk32y485feLhdTKXut/MgZAyWnKyQ==} engines: {node: '>=16'} cpu: [x64] os: [linux] + '@cloudflare/workerd-linux-64@1.20241230.0': + resolution: {integrity: sha512-Y3mHcW0KghOmWdNZyHYpEOG4Ba/ga8tht5vj1a+WXfagEjMO8Y98XhZUlCaYa9yB7Wh5jVcK5LM2jlO/BLgqpA==} + engines: {node: '>=16'} + cpu: [x64] + os: [linux] + '@cloudflare/workerd-linux-arm64@1.20241011.1': resolution: {integrity: sha512-I4HAF2Qe8xgIjAdE53viT2fDdHXkrb3Be0L3eWeeP5SEkOtQ4cHLqsOV7yhUWOJpHiI1XCDcf+wdfn0PB/EngQ==} engines: {node: '>=16'} cpu: [arm64] os: [linux] + '@cloudflare/workerd-linux-arm64@1.20241230.0': + resolution: {integrity: sha512-IAjhsWPlHzhhkJ6I49sDG6XfMnhPvv0szKGXxTWQK/IWMrbGdHm4RSfNKBSoLQm67jGMIzbmcrX9UIkms27Y1g==} + engines: {node: '>=16'} + cpu: [arm64] + os: [linux] + '@cloudflare/workerd-windows-64@1.20241011.1': resolution: {integrity: sha512-oVr1Cb7NkDpukd7v68FdxOH8vaHRSzHkX9uE/IttHd2yPK6mwOS220nIxK9UMcx5CwZmrgphRwtZwSYVk/lREQ==} engines: {node: '>=16'} cpu: [x64] os: [win32] - '@cloudflare/workers-shared@0.6.0': - resolution: {integrity: sha512-rfUCvb3hx4AsvdUZsxgk9lmgEnQehqV3jdtXLP/Xr0+P56n11T/0nXNMzmn7Nnv+IJFOV6X9NmFhuMz4sBPw7w==} - engines: {node: '>=16.7.0'} + '@cloudflare/workerd-windows-64@1.20241230.0': + resolution: {integrity: sha512-y5SPIk9iOb2gz+yWtHxoeMnjPnkYQswiCJ480oHC6zexnJLlKTpcmBCjDH1nWCT4pQi8F25gaH8thgElf4NvXQ==} + engines: {node: '>=16'} + cpu: [x64] + os: [win32] '@cloudflare/workers-types@4.20241018.0': resolution: {integrity: sha512-gGWumpaaqnjN/G6SI7CZQ13G4SpIUV+EM8QqvuN2D3cGDF6mKIm+ov7H4x7V/c+AdY90v0FCc8B5nmEEt90MvQ==} @@ -1784,6 +1810,11 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} + engines: {node: '>=0.4.0'} + hasBin: true + agent-base@6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} @@ -1989,6 +2020,10 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} + chokidar@4.0.3: + resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} + engines: {node: '>= 14.16.0'} + chownr@2.0.0: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} engines: {node: '>=10'} @@ -2191,6 +2226,9 @@ packages: data-uri-to-buffer@2.0.2: resolution: {integrity: sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA==} + date-fns@4.1.0: + resolution: {integrity: sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==} + db0@0.1.4: resolution: {integrity: sha512-Ft6eCwONYxlwLjBXSJxw0t0RYtA5gW9mq8JfBXn9TtC0nDPlqePAhpv9v4g9aONBi6JI1OXHTKKkUYGd+BOrCA==} peerDependencies: @@ -2913,6 +2951,9 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + itty-time@1.0.6: + resolution: {integrity: sha512-+P8IZaLLBtFv8hCkIjcymZOp4UJ+xW6bSlQsXGqrkmJh7vSiMFSlNne0mCYagEE0N7HDNR5jJBRxwN0oYv61Rw==} + jackspeak@3.4.3: resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} @@ -3109,6 +3150,11 @@ packages: engines: {node: '>=16.13'} hasBin: true + miniflare@3.20241230.0: + resolution: {integrity: sha512-ZtWNoNAIj5Q0Vb3B4SPEKr7DDmVG8a0Stsp/AuRkYXoJniA5hsbKjFNIGhTXGMIHVP5bvDrKJWt/POIDGfpiKg==} + engines: {node: '>=16.13'} + hasBin: true + minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} @@ -3165,6 +3211,9 @@ packages: mlly@1.7.2: resolution: {integrity: sha512-tN3dvVHYVz4DhSXinXIk7u9syPYaJvio118uomkovAtWBT+RdbP6Lfh/5Lvo519YMmwBafwlh20IPTXIStscpA==} + mlly@1.7.3: + resolution: {integrity: sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A==} + mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -3713,6 +3762,10 @@ packages: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} + readdirp@4.0.2: + resolution: {integrity: sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==} + engines: {node: '>= 14.16.0'} + redis-errors@1.2.0: resolution: {integrity: sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==} engines: {node: '>=4'} @@ -3741,10 +3794,6 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} - resolve.exports@2.0.2: - resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==} - engines: {node: '>=10'} - resolve@1.22.8: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true @@ -4148,8 +4197,8 @@ packages: resolution: {integrity: sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==} engines: {node: '>=14.0'} - unenv-nightly@2.0.0-20241009-125958-e8ea22f: - resolution: {integrity: sha512-hRxmKz1iSVRmuFx/vBdPsx7rX4o7Cas9vdjDNeUeWpQTK2LzU3Xy3Jz0zbo7MJX0bpqo/LEFCA+GPwsbl6zKEQ==} + unenv-nightly@2.0.0-20241218-183400-5d6aec3: + resolution: {integrity: sha512-7Xpi29CJRbOV1/IrC03DawMJ0hloklDLq/cigSe+J2jkcC+iDres2Cy0r4ltj5f0x7DqsaGaB4/dLuCPPFZnZA==} unenv@1.10.0: resolution: {integrity: sha512-wY5bskBQFL9n3Eca5XnhH6KbUo/tfvkwm9OpcdCvLaeA7piBNbavbOKJySEwQ1V0RH6HvNlSAFRTpvTqgKRQXQ==} @@ -4438,12 +4487,17 @@ packages: engines: {node: '>=16'} hasBin: true - wrangler@3.81.0: - resolution: {integrity: sha512-sa5dhLJAMmYtl/dJWDJ92sdnKj0VUC0DYBfGqbhd5xn7CDdn1oGhICDXtx2E6BNhQ1L+4d9oAcP/oQvOs5gKLA==} + workerd@1.20241230.0: + resolution: {integrity: sha512-EgixXP0JGXGq6J9lz17TKIZtfNDUvJNG+cl9paPMfZuYWT920fFpBx+K04YmnbQRLnglsivF1GT9pxh1yrlWhg==} + engines: {node: '>=16'} + hasBin: true + + wrangler@3.100.0: + resolution: {integrity: sha512-+nsZK374Xnp2BEQQuB/18pnObgsOey0AHVlg75pAdwNaKAmB2aa0/E5rFb7i89DiiwFYoZMz3cARY1UKcm/WQQ==} engines: {node: '>=16.17.0'} hasBin: true peerDependencies: - '@cloudflare/workers-types': ^4.20241011.0 + '@cloudflare/workers-types': ^4.20241230.0 peerDependenciesMeta: '@cloudflare/workers-types': optional: true @@ -4820,22 +4874,32 @@ snapshots: '@cloudflare/workerd-darwin-64@1.20241011.1': optional: true + '@cloudflare/workerd-darwin-64@1.20241230.0': + optional: true + '@cloudflare/workerd-darwin-arm64@1.20241011.1': optional: true + '@cloudflare/workerd-darwin-arm64@1.20241230.0': + optional: true + '@cloudflare/workerd-linux-64@1.20241011.1': optional: true + '@cloudflare/workerd-linux-64@1.20241230.0': + optional: true + '@cloudflare/workerd-linux-arm64@1.20241011.1': optional: true + '@cloudflare/workerd-linux-arm64@1.20241230.0': + optional: true + '@cloudflare/workerd-windows-64@1.20241011.1': optional: true - '@cloudflare/workers-shared@0.6.0': - dependencies: - mime: 3.0.0 - zod: 3.23.8 + '@cloudflare/workerd-windows-64@1.20241230.0': + optional: true '@cloudflare/workers-types@4.20241018.0': {} @@ -5408,12 +5472,11 @@ snapshots: '@nuxt/devalue@2.0.2': {} - '@nuxt/devtools-kit@1.5.2(magicast@0.3.5)(rollup@3.29.5)(vite@5.4.8(@types/node@22.7.8)(terser@5.36.0))(webpack-sources@3.2.3)': + '@nuxt/devtools-kit@1.5.2(magicast@0.3.5)(rollup@3.29.5)(webpack-sources@3.2.3)': dependencies: '@nuxt/kit': 3.13.2(magicast@0.3.5)(rollup@3.29.5)(webpack-sources@3.2.3) '@nuxt/schema': 3.13.2(rollup@3.29.5)(webpack-sources@3.2.3) execa: 7.2.0 - vite: 5.4.8(@types/node@22.7.8)(terser@5.36.0) transitivePeerDependencies: - magicast - rollup @@ -5445,10 +5508,10 @@ snapshots: rc9: 2.1.2 semver: 7.6.3 - '@nuxt/devtools@1.5.2(rollup@3.29.5)(vite@5.4.8(@types/node@22.7.8)(terser@5.36.0))(vue@3.5.11(typescript@5.6.3))(webpack-sources@3.2.3)': + '@nuxt/devtools@1.5.2(rollup@3.29.5)(vue@3.5.11(typescript@5.6.3))(webpack-sources@3.2.3)': dependencies: '@antfu/utils': 0.7.10 - '@nuxt/devtools-kit': 1.5.2(magicast@0.3.5)(rollup@3.29.5)(vite@5.4.8(@types/node@22.7.8)(terser@5.36.0))(webpack-sources@3.2.3) + '@nuxt/devtools-kit': 1.5.2(magicast@0.3.5)(rollup@3.29.5)(webpack-sources@3.2.3) '@nuxt/devtools-wizard': 1.5.2 '@nuxt/kit': 3.13.2(magicast@0.3.5)(rollup@3.29.5)(webpack-sources@3.2.3) '@vue/devtools-core': 7.4.4(vite@5.4.8(@types/node@22.7.8)(terser@5.36.0))(vue@3.5.11(typescript@5.6.3)) @@ -5480,8 +5543,7 @@ snapshots: sirv: 2.0.4 tinyglobby: 0.2.6 unimport: 3.13.1(rollup@3.29.5)(webpack-sources@3.2.3) - vite: 5.4.8(@types/node@22.7.8)(terser@5.36.0) - vite-plugin-inspect: 0.8.7(@nuxt/kit@3.13.2(magicast@0.3.5)(rollup@3.29.5)(webpack-sources@3.2.3))(rollup@3.29.5)(vite@5.4.8(@types/node@22.7.8)(terser@5.36.0)) + vite-plugin-inspect: 0.8.7(@nuxt/kit@3.13.2(magicast@0.3.5)(rollup@3.29.5)(webpack-sources@3.2.3))(rollup@3.29.5) vite-plugin-vue-inspector: 5.1.3(vite@5.4.8(@types/node@22.7.8)(terser@5.36.0)) which: 3.0.1 ws: 8.18.0 @@ -6052,7 +6114,7 @@ snapshots: '@types/node-forge@1.3.11': dependencies: - '@types/node': 22.7.5 + '@types/node': 22.7.8 '@types/node@22.7.5': dependencies: @@ -6398,6 +6460,8 @@ snapshots: acorn@8.13.0: {} + acorn@8.14.0: {} + agent-base@6.0.2: dependencies: debug: 4.3.5 @@ -6645,6 +6709,10 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + chokidar@4.0.3: + dependencies: + readdirp: 4.0.2 + chownr@2.0.0: {} ci-info@4.0.0: {} @@ -6840,6 +6908,8 @@ snapshots: data-uri-to-buffer@2.0.2: {} + date-fns@4.1.0: {} + db0@0.1.4: {} debug@2.6.9: @@ -7278,7 +7348,7 @@ snapshots: externality@1.0.2: dependencies: enhanced-resolve: 5.17.0 - mlly: 1.7.1 + mlly: 1.7.2 pathe: 1.1.2 ufo: 1.5.4 @@ -7683,6 +7753,8 @@ snapshots: isexe@2.0.0: {} + itty-time@1.0.6: {} + jackspeak@3.4.3: dependencies: '@isaacs/cliui': 8.0.2 @@ -7888,6 +7960,25 @@ snapshots: - supports-color - utf-8-validate + miniflare@3.20241230.0: + dependencies: + '@cspotcode/source-map-support': 0.8.1 + acorn: 8.13.0 + acorn-walk: 8.3.4 + capnp-ts: 0.7.0 + exit-hook: 2.2.1 + glob-to-regexp: 0.4.1 + stoppable: 1.1.0 + undici: 5.28.4 + workerd: 1.20241230.0 + ws: 8.18.0 + youch: 3.3.4 + zod: 3.23.8 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + minimatch@3.1.2: dependencies: brace-expansion: 1.1.11 @@ -7949,6 +8040,13 @@ snapshots: pkg-types: 1.2.1 ufo: 1.5.4 + mlly@1.7.3: + dependencies: + acorn: 8.14.0 + pathe: 1.1.2 + pkg-types: 1.2.1 + ufo: 1.5.4 + mri@1.2.0: {} mrmime@2.0.0: {} @@ -8111,10 +8209,10 @@ snapshots: nuxi@3.14.0: {} - nuxt@3.13.2(@parcel/watcher@2.4.1)(@types/node@22.7.8)(eslint@9.13.0(jiti@2.3.3))(ioredis@5.4.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@3.29.5)(terser@5.36.0)(typescript@5.6.3)(vite@5.4.8(@types/node@22.7.8)(terser@5.36.0))(webpack-sources@3.2.3): + nuxt@3.13.2(@parcel/watcher@2.4.1)(@types/node@22.7.8)(eslint@9.13.0(jiti@2.3.3))(ioredis@5.4.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@3.29.5)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3): dependencies: '@nuxt/devalue': 2.0.2 - '@nuxt/devtools': 1.5.2(rollup@3.29.5)(vite@5.4.8(@types/node@22.7.8)(terser@5.36.0))(vue@3.5.11(typescript@5.6.3))(webpack-sources@3.2.3) + '@nuxt/devtools': 1.5.2(rollup@3.29.5)(vue@3.5.11(typescript@5.6.3))(webpack-sources@3.2.3) '@nuxt/kit': 3.13.2(magicast@0.3.5)(rollup@3.29.5)(webpack-sources@3.2.3) '@nuxt/schema': 3.13.2(rollup@3.29.5)(webpack-sources@3.2.3) '@nuxt/telemetry': 2.6.0(magicast@0.3.5)(rollup@3.29.5)(webpack-sources@3.2.3) @@ -8764,6 +8862,8 @@ snapshots: dependencies: picomatch: 2.3.1 + readdirp@4.0.2: {} + redis-errors@1.2.0: {} redis-parser@3.0.0: @@ -8782,8 +8882,6 @@ snapshots: resolve-from@5.0.0: {} - resolve.exports@2.0.2: {} - resolve@1.22.8: dependencies: is-core-module: 2.15.0 @@ -9233,9 +9331,10 @@ snapshots: dependencies: '@fastify/busboy': 2.1.1 - unenv-nightly@2.0.0-20241009-125958-e8ea22f: + unenv-nightly@2.0.0-20241218-183400-5d6aec3: dependencies: defu: 6.1.4 + mlly: 1.7.3 ohash: 1.1.4 pathe: 1.1.2 ufo: 1.5.4 @@ -9470,7 +9569,7 @@ snapshots: optionator: 0.9.4 typescript: 5.6.3 - vite-plugin-inspect@0.8.7(@nuxt/kit@3.13.2(magicast@0.3.5)(rollup@3.29.5)(webpack-sources@3.2.3))(rollup@3.29.5)(vite@5.4.8(@types/node@22.7.8)(terser@5.36.0)): + vite-plugin-inspect@0.8.7(@nuxt/kit@3.13.2(magicast@0.3.5)(rollup@3.29.5)(webpack-sources@3.2.3))(rollup@3.29.5): dependencies: '@antfu/utils': 0.7.10 '@rollup/pluginutils': 5.1.2(rollup@3.29.5) @@ -9481,7 +9580,6 @@ snapshots: perfect-debounce: 1.0.0 picocolors: 1.1.0 sirv: 2.0.4 - vite: 5.4.8(@types/node@22.7.8)(terser@5.36.0) optionalDependencies: '@nuxt/kit': 3.13.2(magicast@0.3.5)(rollup@3.29.5)(webpack-sources@3.2.3) transitivePeerDependencies: @@ -9609,24 +9707,32 @@ snapshots: '@cloudflare/workerd-linux-arm64': 1.20241011.1 '@cloudflare/workerd-windows-64': 1.20241011.1 - wrangler@3.81.0(@cloudflare/workers-types@4.20241018.0): + workerd@1.20241230.0: + optionalDependencies: + '@cloudflare/workerd-darwin-64': 1.20241230.0 + '@cloudflare/workerd-darwin-arm64': 1.20241230.0 + '@cloudflare/workerd-linux-64': 1.20241230.0 + '@cloudflare/workerd-linux-arm64': 1.20241230.0 + '@cloudflare/workerd-windows-64': 1.20241230.0 + + wrangler@3.100.0(@cloudflare/workers-types@4.20241018.0): dependencies: '@cloudflare/kv-asset-handler': 0.3.4 - '@cloudflare/workers-shared': 0.6.0 '@esbuild-plugins/node-globals-polyfill': 0.2.3(esbuild@0.17.19) '@esbuild-plugins/node-modules-polyfill': 0.2.2(esbuild@0.17.19) blake3-wasm: 2.1.5 - chokidar: 3.6.0 + chokidar: 4.0.3 + date-fns: 4.1.0 esbuild: 0.17.19 - miniflare: 3.20241011.0 + itty-time: 1.0.6 + miniflare: 3.20241230.0 nanoid: 3.3.7 path-to-regexp: 6.3.0 resolve: 1.22.8 - resolve.exports: 2.0.2 selfsigned: 2.4.1 source-map: 0.6.1 - unenv: unenv-nightly@2.0.0-20241009-125958-e8ea22f - workerd: 1.20241011.1 + unenv: unenv-nightly@2.0.0-20241218-183400-5d6aec3 + workerd: 1.20241230.0 xxhash-wasm: 1.0.2 optionalDependencies: '@cloudflare/workers-types': 4.20241018.0 diff --git a/src/index.ts b/src/index.ts index 14ed1ca..cf40bfb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -25,12 +25,15 @@ async function nitroModule(nitro: Nitro) { return; // Production doesn't need this } - // Find wrangler.toml + // Find wrangler.toml, wrangler.json, or wrangler.jsonc let configPath = nitro.options.cloudflareDev?.configPath; if (!configPath) { - configPath = await findFile("wrangler.toml", { - startingFrom: nitro.options.srcDir, - }).catch(() => undefined); + configPath = await findFile( + ["wrangler.toml", "wrangler.json", "wrangler.jsonc"], + { + startingFrom: nitro.options.srcDir, + }, + ).catch(() => undefined); } // Resolve the persist dir @@ -60,7 +63,7 @@ async function nitroModule(nitro: Nitro) { [ "🔥 Cloudflare context bindings enabled for dev server", "", - `Config path: \`${configPath ? relative(".", configPath) : colorize("yellow", "cannot find `wrangler.toml`")}\``, + `Config path: \`${configPath ? relative(".", configPath) : colorize("yellow", "cannot find `wrangler` config file")}\``, `Persist dir: \`${relative(".", persistDir)}\` ${addedToGitIgnore ? colorize("green", "(added to `.gitignore`)") : ""}`, ].join("\n"), ); From d30922387f3902cbf6149e2a747fc2e0e819c6e3 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Thu, 6 Mar 2025 12:30:42 +0100 Subject: [PATCH 2/2] update order --- src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index cf40bfb..22a75b3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -25,11 +25,11 @@ async function nitroModule(nitro: Nitro) { return; // Production doesn't need this } - // Find wrangler.toml, wrangler.json, or wrangler.jsonc + // Find wrangler.json > wrangler.jsonc > wrangler.toml let configPath = nitro.options.cloudflareDev?.configPath; if (!configPath) { configPath = await findFile( - ["wrangler.toml", "wrangler.json", "wrangler.jsonc"], + ["wrangler.json", "wrangler.jsonc", "wrangler.toml"], { startingFrom: nitro.options.srcDir, }, @@ -63,7 +63,7 @@ async function nitroModule(nitro: Nitro) { [ "🔥 Cloudflare context bindings enabled for dev server", "", - `Config path: \`${configPath ? relative(".", configPath) : colorize("yellow", "cannot find `wrangler` config file")}\``, + `Config path: \`${configPath ? relative(".", configPath) : colorize("yellow", "cannot find `wrangler.json`, `wrangler.jsonc`, or `wrangler.toml`")}\``, `Persist dir: \`${relative(".", persistDir)}\` ${addedToGitIgnore ? colorize("green", "(added to `.gitignore`)") : ""}`, ].join("\n"), );