feat: 更新 worker.js,添加 pnpm 环境设置命令

This commit is contained in:
严浩
2025-08-13 14:19:17 +08:00
parent 010bafc235
commit b7849cc236
3 changed files with 55 additions and 62 deletions
+2 -2
View File
@@ -8,6 +8,6 @@
"start": "wrangler dev" "start": "wrangler dev"
}, },
"devDependencies": { "devDependencies": {
"wrangler": "^4.24.3" "wrangler": "^4.29.0"
} }
} }
+52 -60
View File
@@ -9,8 +9,8 @@ importers:
.: .:
devDependencies: devDependencies:
wrangler: wrangler:
specifier: ^4.24.3 specifier: ^4.29.0
version: 4.24.3 version: 4.29.0
packages: packages:
@@ -18,41 +18,41 @@ packages:
resolution: {integrity: sha512-+tv3z+SPp+gqTIcImN9o0hqE9xyfQjI1XD9pL6NuKjua9B1y7mNYv0S9cP+QEbA4ppVgGZEmKOvHX5G5Ei1CVA==} resolution: {integrity: sha512-+tv3z+SPp+gqTIcImN9o0hqE9xyfQjI1XD9pL6NuKjua9B1y7mNYv0S9cP+QEbA4ppVgGZEmKOvHX5G5Ei1CVA==}
engines: {node: '>=18.0.0'} engines: {node: '>=18.0.0'}
'@cloudflare/unenv-preset@2.3.3': '@cloudflare/unenv-preset@2.6.1':
resolution: {integrity: sha512-/M3MEcj3V2WHIRSW1eAQBPRJ6JnGQHc6JKMAPLkDb7pLs3m6X9ES/+K3ceGqxI6TKeF32AWAi7ls0AYzVxCP0A==} resolution: {integrity: sha512-48rC6jo9CkSRkImfu5KU4zKyoPJx7b9GTUpZn0Emr6J+jkmrLhwCY3BI10QS+fhOt1NkJNlxIcYrBgvWeCpKOw==}
peerDependencies: peerDependencies:
unenv: 2.0.0-rc.17 unenv: 2.0.0-rc.19
workerd: ^1.20250508.0 workerd: ^1.20250802.0
peerDependenciesMeta: peerDependenciesMeta:
workerd: workerd:
optional: true optional: true
'@cloudflare/workerd-darwin-64@1.20250709.0': '@cloudflare/workerd-darwin-64@1.20250803.0':
resolution: {integrity: sha512-VqwcvnbI8FNCP87ZWNHA3/sAC5U9wMbNnjBG0sHEYzM7B9RPHKYHdVKdBEWhzZXnkQYMK81IHm4CZsK16XxAuQ==} resolution: {integrity: sha512-6QciMnJp1p3F1qUiN0LaLfmw7SuZA/gfUBOe8Ft81pw16JYZ3CyiqIKPJvc1SV8jgDx8r+gz/PRi1NwOMt329A==}
engines: {node: '>=16'} engines: {node: '>=16'}
cpu: [x64] cpu: [x64]
os: [darwin] os: [darwin]
'@cloudflare/workerd-darwin-arm64@1.20250709.0': '@cloudflare/workerd-darwin-arm64@1.20250803.0':
resolution: {integrity: sha512-A54ttSgXMM4huChPTThhkieOjpDxR+srVOO9zjTHVIyoQxA8zVsku4CcY/GQ95RczMV+yCKVVu/tAME7vwBFuA==} resolution: {integrity: sha512-DoIgghDowtqoNhL6OoN/F92SKtrk7mRQKc4YSs/Dst8IwFZq+pCShOlWfB0MXqHKPSoiz5xLSrUKR9H6gQMPvw==}
engines: {node: '>=16'} engines: {node: '>=16'}
cpu: [arm64] cpu: [arm64]
os: [darwin] os: [darwin]
'@cloudflare/workerd-linux-64@1.20250709.0': '@cloudflare/workerd-linux-64@1.20250803.0':
resolution: {integrity: sha512-no4O3OK+VXINIxv99OHJDpIgML2ZssrSvImwLtULzqm+cl4t1PIfXNRUqj89ujTkmad+L9y4G6dBQMPCLnmlGg==} resolution: {integrity: sha512-mYdz4vNWX3+PoqRjssepVQqgh42IBiSrl+wb7vbh7VVWUVzBnQKtW3G+UFiBF62hohCLexGIEi7L0cFfRlcKSQ==}
engines: {node: '>=16'} engines: {node: '>=16'}
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
'@cloudflare/workerd-linux-arm64@1.20250709.0': '@cloudflare/workerd-linux-arm64@1.20250803.0':
resolution: {integrity: sha512-7cNICk2Qd+m4QGrcmWyAuZJXTHt1ud6isA+dic7Yk42WZmwXhlcUATyvFD9FSQNFcldjuRB4n8JlWEFqZBn+lw==} resolution: {integrity: sha512-RmrtUYLRUg6djKU7Z6yebS6YGJVnaDVY6bbXca+2s26vw4ibJDOTPLuBHFQF62Grw3fAfsNbjQh5i14vG2mqUg==}
engines: {node: '>=16'} engines: {node: '>=16'}
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
'@cloudflare/workerd-windows-64@1.20250709.0': '@cloudflare/workerd-windows-64@1.20250803.0':
resolution: {integrity: sha512-j1AyO8V/62Q23EJplWgzBlRCqo/diXgox58AbDqSqgyzCBAlvUzXQRDBab/FPNG/erRqt7I1zQhahrBhrM0uLA==} resolution: {integrity: sha512-uLV8gdudz36o9sUaAKbBxxTwZwLFz1KyW7QpBvOo4+r3Ib8yVKXGiySIMWGD7A0urSMrjf3e5LlLcJKgZUOjMA==}
engines: {node: '>=16'} engines: {node: '>=16'}
cpu: [x64] cpu: [x64]
os: [win32] os: [win32]
@@ -214,10 +214,6 @@ packages:
cpu: [x64] cpu: [x64]
os: [win32] os: [win32]
'@fastify/busboy@2.1.1':
resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==}
engines: {node: '>=14'}
'@img/sharp-darwin-arm64@0.33.5': '@img/sharp-darwin-arm64@0.33.5':
resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==} resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
@@ -421,8 +417,8 @@ packages:
engines: {node: '>=10.0.0'} engines: {node: '>=10.0.0'}
hasBin: true hasBin: true
miniflare@4.20250709.0: miniflare@4.20250803.1:
resolution: {integrity: sha512-dRGXi6Do9ArQZt7205QGWZ1tD6k6xQNY/mAZBAtiaQYvKxFuNyiHYlFnSN8Co4AFCVOozo/U52sVAaHvlcmnew==} resolution: {integrity: sha512-9ddfJ6GRg3DFZDgLu6BpfwFVZWIJywVE9N9dYzjLZDvp/azXKiB4Pi9BYK7TqsOJb8YIpxsuwNT03RBvOC8B6g==}
engines: {node: '>=18.0.0'} engines: {node: '>=18.0.0'}
hasBin: true hasBin: true
@@ -461,24 +457,24 @@ packages:
ufo@1.6.1: ufo@1.6.1:
resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==} resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==}
undici@5.29.0: undici@7.13.0:
resolution: {integrity: sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==} resolution: {integrity: sha512-l+zSMssRqrzDcb3fjMkjjLGmuiiK2pMIcV++mJaAc9vhjSGpvM7h43QgP+OAMb1GImHmbPyG2tBXeuyG5iY4gA==}
engines: {node: '>=14.0'} engines: {node: '>=20.18.1'}
unenv@2.0.0-rc.17: unenv@2.0.0-rc.19:
resolution: {integrity: sha512-B06u0wXkEd+o5gOCMl/ZHl5cfpYbDZKAT+HWTL+Hws6jWu7dCiqBBXXXzMFcFVJb8D4ytAnYmxJA83uwOQRSsg==} resolution: {integrity: sha512-t/OMHBNAkknVCI7bVB9OWjUUAwhVv9vsPIAGnNUxnu3FxPQN11rjh0sksLMzc3g7IlTgvHmOTl4JM7JHpcv5wA==}
workerd@1.20250709.0: workerd@1.20250803.0:
resolution: {integrity: sha512-BqLPpmvRN+TYUSG61OkWamsGdEuMwgvabP8m0QOHIfofnrD2YVyWqE1kXJ0GH5EsVEuWamE5sR8XpTfsGBmIpg==} resolution: {integrity: sha512-oYH29mE/wNolPc32NHHQbySaNorj6+KASUtOvQHySxB5mO1NWdGuNv49woxNCF5971UYceGQndY+OLT+24C3wQ==}
engines: {node: '>=16'} engines: {node: '>=16'}
hasBin: true hasBin: true
wrangler@4.24.3: wrangler@4.29.0:
resolution: {integrity: sha512-stB1Wfs5NKlspsAzz8SBujBKsDqT5lpCyrL+vSUMy3uueEtI1A5qyORbKoJhIguEbwHfWS39mBsxzm6Vm1J2cg==} resolution: {integrity: sha512-RBVgBBD1++EYbcAp19TK8i7bHIt6dnjbFULeWRPplQ0pAHegWKKY2MEkZNL8PfsCrycrZt2J/ShgXFE7xdoy7w==}
engines: {node: '>=18.0.0'} engines: {node: '>=18.0.0'}
hasBin: true hasBin: true
peerDependencies: peerDependencies:
'@cloudflare/workers-types': ^4.20250709.0 '@cloudflare/workers-types': ^4.20250803.0
peerDependenciesMeta: peerDependenciesMeta:
'@cloudflare/workers-types': '@cloudflare/workers-types':
optional: true optional: true
@@ -510,25 +506,25 @@ snapshots:
dependencies: dependencies:
mime: 3.0.0 mime: 3.0.0
'@cloudflare/unenv-preset@2.3.3(unenv@2.0.0-rc.17)(workerd@1.20250709.0)': '@cloudflare/unenv-preset@2.6.1(unenv@2.0.0-rc.19)(workerd@1.20250803.0)':
dependencies: dependencies:
unenv: 2.0.0-rc.17 unenv: 2.0.0-rc.19
optionalDependencies: optionalDependencies:
workerd: 1.20250709.0 workerd: 1.20250803.0
'@cloudflare/workerd-darwin-64@1.20250709.0': '@cloudflare/workerd-darwin-64@1.20250803.0':
optional: true optional: true
'@cloudflare/workerd-darwin-arm64@1.20250709.0': '@cloudflare/workerd-darwin-arm64@1.20250803.0':
optional: true optional: true
'@cloudflare/workerd-linux-64@1.20250709.0': '@cloudflare/workerd-linux-64@1.20250803.0':
optional: true optional: true
'@cloudflare/workerd-linux-arm64@1.20250709.0': '@cloudflare/workerd-linux-arm64@1.20250803.0':
optional: true optional: true
'@cloudflare/workerd-windows-64@1.20250709.0': '@cloudflare/workerd-windows-64@1.20250803.0':
optional: true optional: true
'@cspotcode/source-map-support@0.8.1': '@cspotcode/source-map-support@0.8.1':
@@ -615,8 +611,6 @@ snapshots:
'@esbuild/win32-x64@0.25.4': '@esbuild/win32-x64@0.25.4':
optional: true optional: true
'@fastify/busboy@2.1.1': {}
'@img/sharp-darwin-arm64@0.33.5': '@img/sharp-darwin-arm64@0.33.5':
optionalDependencies: optionalDependencies:
'@img/sharp-libvips-darwin-arm64': 1.0.4 '@img/sharp-libvips-darwin-arm64': 1.0.4
@@ -790,7 +784,7 @@ snapshots:
mime@3.0.0: {} mime@3.0.0: {}
miniflare@4.20250709.0: miniflare@4.20250803.1:
dependencies: dependencies:
'@cspotcode/source-map-support': 0.8.1 '@cspotcode/source-map-support': 0.8.1
acorn: 8.14.0 acorn: 8.14.0
@@ -799,8 +793,8 @@ snapshots:
glob-to-regexp: 0.4.1 glob-to-regexp: 0.4.1
sharp: 0.33.5 sharp: 0.33.5
stoppable: 1.1.0 stoppable: 1.1.0
undici: 5.29.0 undici: 7.13.0
workerd: 1.20250709.0 workerd: 1.20250803.0
ws: 8.18.0 ws: 8.18.0
youch: 4.1.0-beta.10 youch: 4.1.0-beta.10
zod: 3.22.3 zod: 3.22.3
@@ -855,11 +849,9 @@ snapshots:
ufo@1.6.1: {} ufo@1.6.1: {}
undici@5.29.0: undici@7.13.0: {}
dependencies:
'@fastify/busboy': 2.1.1
unenv@2.0.0-rc.17: unenv@2.0.0-rc.19:
dependencies: dependencies:
defu: 6.1.4 defu: 6.1.4
exsolve: 1.0.7 exsolve: 1.0.7
@@ -867,24 +859,24 @@ snapshots:
pathe: 2.0.3 pathe: 2.0.3
ufo: 1.6.1 ufo: 1.6.1
workerd@1.20250709.0: workerd@1.20250803.0:
optionalDependencies: optionalDependencies:
'@cloudflare/workerd-darwin-64': 1.20250709.0 '@cloudflare/workerd-darwin-64': 1.20250803.0
'@cloudflare/workerd-darwin-arm64': 1.20250709.0 '@cloudflare/workerd-darwin-arm64': 1.20250803.0
'@cloudflare/workerd-linux-64': 1.20250709.0 '@cloudflare/workerd-linux-64': 1.20250803.0
'@cloudflare/workerd-linux-arm64': 1.20250709.0 '@cloudflare/workerd-linux-arm64': 1.20250803.0
'@cloudflare/workerd-windows-64': 1.20250709.0 '@cloudflare/workerd-windows-64': 1.20250803.0
wrangler@4.24.3: wrangler@4.29.0:
dependencies: dependencies:
'@cloudflare/kv-asset-handler': 0.4.0 '@cloudflare/kv-asset-handler': 0.4.0
'@cloudflare/unenv-preset': 2.3.3(unenv@2.0.0-rc.17)(workerd@1.20250709.0) '@cloudflare/unenv-preset': 2.6.1(unenv@2.0.0-rc.19)(workerd@1.20250803.0)
blake3-wasm: 2.1.5 blake3-wasm: 2.1.5
esbuild: 0.25.4 esbuild: 0.25.4
miniflare: 4.20250709.0 miniflare: 4.20250803.1
path-to-regexp: 6.3.0 path-to-regexp: 6.3.0
unenv: 2.0.0-rc.17 unenv: 2.0.0-rc.19
workerd: 1.20250709.0 workerd: 1.20250803.0
optionalDependencies: optionalDependencies:
fsevents: 2.3.3 fsevents: 2.3.3
transitivePeerDependencies: transitivePeerDependencies:
+1
View File
@@ -6,6 +6,7 @@ export default {
return new Response(`curl -fsSL ${url.origin}/install.sh | sh - return new Response(`curl -fsSL ${url.origin}/install.sh | sh -
iwr ${url.origin}/install.ps1 -useb | iex iwr ${url.origin}/install.ps1 -useb | iex
pnpm env use --global lts
pnpm config get registry pnpm config get registry
pnpm config set registry https://registry.npmmirror.com pnpm config set registry https://registry.npmmirror.com
`); `);