wrangler 0.0.0-e72a5794 → 0.0.0-e75c5812f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/wrangler.js +5 -28
- package/config-schema.json +3067 -0
- package/package.json +197 -195
- package/templates/checked-fetch.js +1 -1
- package/templates/facade.d.ts +7 -5
- package/templates/gitignore +2 -4
- package/templates/init-tests/test-vitest-new-worker.js +1 -1
- package/templates/init-tests/test-vitest-new-worker.ts +1 -1
- package/templates/middleware/loader-modules.ts +92 -95
- package/templates/middleware/loader-sw.ts +4 -3
- package/templates/middleware/middleware-ensure-req-body-drained.ts +18 -0
- package/templates/middleware/middleware-serve-static-assets.ts +5 -5
- package/templates/modules-watch-stub.js +4 -0
- package/templates/no-op-assets-worker.ts +33 -0
- package/templates/pages-dev-pipeline.ts +2 -1
- package/templates/pages-template-plugin.ts +2 -2
- package/templates/pages-template-worker.ts +1 -1
- package/templates/startDevWorker/InspectorProxyWorker.ts +664 -0
- package/templates/startDevWorker/ProxyWorker.ts +336 -0
- package/templates/tsconfig.init.json +4 -87
- package/wrangler-dist/InspectorProxyWorker.js +464 -0
- package/wrangler-dist/InspectorProxyWorker.js.map +6 -0
- package/wrangler-dist/ProxyWorker.js +241 -0
- package/wrangler-dist/ProxyWorker.js.map +6 -0
- package/wrangler-dist/cli.d.ts +24878 -212
- package/wrangler-dist/cli.js +156427 -93691
- package/wrangler-dist/wasm-sync.wasm +0 -0
- package/Cloudflare_CA.pem +0 -18
- package/templates/middleware/middleware-d1-beta.d.ts +0 -3
- package/templates/middleware/middleware-d1-beta.ts +0 -244
- package/templates/middleware/middleware-multiworker-dev.d.ts +0 -4
- package/templates/middleware/middleware-multiworker-dev.ts +0 -59
package/package.json
CHANGED
|
@@ -1,196 +1,198 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
2
|
+
"name": "wrangler",
|
|
3
|
+
"version": "0.0.0-e75c5812f",
|
|
4
|
+
"description": "Command-line interface for all things Cloudflare Workers",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"wrangler",
|
|
7
|
+
"cloudflare",
|
|
8
|
+
"workers",
|
|
9
|
+
"cloudflare workers",
|
|
10
|
+
"edge",
|
|
11
|
+
"compute",
|
|
12
|
+
"serverless",
|
|
13
|
+
"serverless application",
|
|
14
|
+
"serverless module",
|
|
15
|
+
"wasm",
|
|
16
|
+
"web",
|
|
17
|
+
"assembly",
|
|
18
|
+
"webassembly",
|
|
19
|
+
"rust",
|
|
20
|
+
"emscripten",
|
|
21
|
+
"typescript",
|
|
22
|
+
"graphql",
|
|
23
|
+
"router",
|
|
24
|
+
"http",
|
|
25
|
+
"cli"
|
|
26
|
+
],
|
|
27
|
+
"homepage": "https://github.com/cloudflare/workers-sdk#readme",
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/cloudflare/workers-sdk/issues"
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "https://github.com/cloudflare/workers-sdk.git",
|
|
34
|
+
"directory": "packages/wrangler"
|
|
35
|
+
},
|
|
36
|
+
"license": "MIT OR Apache-2.0",
|
|
37
|
+
"author": "wrangler@cloudflare.com",
|
|
38
|
+
"main": "wrangler-dist/cli.js",
|
|
39
|
+
"types": "wrangler-dist/cli.d.ts",
|
|
40
|
+
"bin": {
|
|
41
|
+
"wrangler": "./bin/wrangler.js",
|
|
42
|
+
"wrangler2": "./bin/wrangler.js"
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"bin",
|
|
46
|
+
"miniflare-dist",
|
|
47
|
+
"wrangler-dist",
|
|
48
|
+
"templates",
|
|
49
|
+
"kv-asset-handler.js",
|
|
50
|
+
"config-schema.json"
|
|
51
|
+
],
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
|
54
|
+
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
|
55
|
+
"blake3-wasm": "^2.1.5",
|
|
56
|
+
"chokidar": "^3.5.3",
|
|
57
|
+
"date-fns": "^3.6.0",
|
|
58
|
+
"esbuild": "0.17.19",
|
|
59
|
+
"nanoid": "^3.3.3",
|
|
60
|
+
"path-to-regexp": "^6.2.0",
|
|
61
|
+
"resolve": "^1.22.8",
|
|
62
|
+
"resolve.exports": "^2.0.2",
|
|
63
|
+
"selfsigned": "^2.0.1",
|
|
64
|
+
"source-map": "^0.6.1",
|
|
65
|
+
"unenv": "npm:unenv-nightly@1.10.0-1717606461.a117952",
|
|
66
|
+
"workerd": "1.20240806.0",
|
|
67
|
+
"xxhash-wasm": "^1.0.1",
|
|
68
|
+
"@cloudflare/workers-shared": "0.0.0-e75c5812f",
|
|
69
|
+
"miniflare": "3.20240806.1",
|
|
70
|
+
"@cloudflare/kv-asset-handler": "0.3.4"
|
|
71
|
+
},
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"@cloudflare/types": "^6.18.4",
|
|
74
|
+
"@cloudflare/workers-types": "^4.20240806.0",
|
|
75
|
+
"@cspotcode/source-map-support": "0.8.1",
|
|
76
|
+
"@iarna/toml": "^3.0.0",
|
|
77
|
+
"@microsoft/api-extractor": "^7.47.0",
|
|
78
|
+
"@sentry/node": "^7.86.0",
|
|
79
|
+
"@sentry/types": "^7.86.0",
|
|
80
|
+
"@sentry/utils": "^7.86.0",
|
|
81
|
+
"@types/body-parser": "^1.19.2",
|
|
82
|
+
"@types/command-exists": "^1.2.0",
|
|
83
|
+
"@types/express": "^4.17.13",
|
|
84
|
+
"@types/glob-to-regexp": "^0.4.1",
|
|
85
|
+
"@types/is-ci": "^3.0.0",
|
|
86
|
+
"@types/javascript-time-ago": "^2.0.3",
|
|
87
|
+
"@types/mime": "^3.0.4",
|
|
88
|
+
"@types/minimatch": "^5.1.2",
|
|
89
|
+
"@types/prompts": "^2.0.14",
|
|
90
|
+
"@types/react": "^18.3.3",
|
|
91
|
+
"@types/resolve": "^1.20.6",
|
|
92
|
+
"@types/serve-static": "^1.13.10",
|
|
93
|
+
"@types/shell-quote": "^1.7.2",
|
|
94
|
+
"@types/signal-exit": "^3.0.1",
|
|
95
|
+
"@types/supports-color": "^8.1.1",
|
|
96
|
+
"@types/ws": "^8.5.7",
|
|
97
|
+
"@types/yargs": "^17.0.22",
|
|
98
|
+
"@vitest/ui": "^1.6.0",
|
|
99
|
+
"@webcontainer/env": "^1.1.0",
|
|
100
|
+
"body-parser": "^1.20.0",
|
|
101
|
+
"chalk": "^5.2.0",
|
|
102
|
+
"cli-table3": "^0.6.3",
|
|
103
|
+
"clipboardy": "^3.0.0",
|
|
104
|
+
"cmd-shim": "^4.1.0",
|
|
105
|
+
"command-exists": "^1.2.9",
|
|
106
|
+
"concurrently": "^8.2.2",
|
|
107
|
+
"devtools-protocol": "^0.0.1182435",
|
|
108
|
+
"dotenv": "^16.0.0",
|
|
109
|
+
"es-module-lexer": "^1.3.0",
|
|
110
|
+
"execa": "^6.1.0",
|
|
111
|
+
"express": "^4.18.1",
|
|
112
|
+
"find-up": "^6.3.0",
|
|
113
|
+
"get-port": "^7.0.0",
|
|
114
|
+
"glob-to-regexp": "^0.4.1",
|
|
115
|
+
"http-terminator": "^3.2.0",
|
|
116
|
+
"https-proxy-agent": "7.0.2",
|
|
117
|
+
"ignore": "^5.2.0",
|
|
118
|
+
"ink": "^3.2.0",
|
|
119
|
+
"ink-select-input": "^4.2.1",
|
|
120
|
+
"ink-spinner": "^4.0.3",
|
|
121
|
+
"ink-table": "^3.0.0",
|
|
122
|
+
"is-ci": "^3.0.1",
|
|
123
|
+
"javascript-time-ago": "^2.5.4",
|
|
124
|
+
"md5-file": "5.0.0",
|
|
125
|
+
"mime": "^3.0.0",
|
|
126
|
+
"minimatch": "^5.1.0",
|
|
127
|
+
"mock-socket": "^9.3.1",
|
|
128
|
+
"msw": "^2.3.0",
|
|
129
|
+
"open": "^8.4.0",
|
|
130
|
+
"p-queue": "^7.2.0",
|
|
131
|
+
"patch-console": "^1.0.0",
|
|
132
|
+
"pretty-bytes": "^6.0.0",
|
|
133
|
+
"prompts": "^2.4.2",
|
|
134
|
+
"ps-list": "^8.1.1",
|
|
135
|
+
"react": "^18.3.1",
|
|
136
|
+
"react-error-boundary": "^3.1.4",
|
|
137
|
+
"semiver": "^1.1.0",
|
|
138
|
+
"serve-static": "^1.15.0",
|
|
139
|
+
"shell-quote": "^1.8.1",
|
|
140
|
+
"shellac": "^0.8.0",
|
|
141
|
+
"signal-exit": "^3.0.7",
|
|
142
|
+
"strip-ansi": "^7.1.0",
|
|
143
|
+
"supports-color": "^9.2.2",
|
|
144
|
+
"timeago.js": "^4.0.2",
|
|
145
|
+
"ts-dedent": "^2.2.0",
|
|
146
|
+
"ts-json-schema-generator": "^1.5.0",
|
|
147
|
+
"undici": "^5.28.4",
|
|
148
|
+
"update-check": "^1.5.4",
|
|
149
|
+
"vitest": "^1.6.0",
|
|
150
|
+
"vitest-websocket-mock": "^0.3.0",
|
|
151
|
+
"ws": "^8.17.1",
|
|
152
|
+
"xdg-app-paths": "^8.3.0",
|
|
153
|
+
"yargs": "^17.7.2",
|
|
154
|
+
"yoga-layout": "file:../../vendor/yoga-layout-2.0.0-beta.1.tgz",
|
|
155
|
+
"@cloudflare/pages-shared": "^0.11.52",
|
|
156
|
+
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
157
|
+
"@cloudflare/cli": "1.1.1",
|
|
158
|
+
"@cloudflare/eslint-config-worker": "1.1.0"
|
|
159
|
+
},
|
|
160
|
+
"peerDependencies": {
|
|
161
|
+
"@cloudflare/workers-types": "^4.20240806.0"
|
|
162
|
+
},
|
|
163
|
+
"peerDependenciesMeta": {
|
|
164
|
+
"@cloudflare/workers-types": {
|
|
165
|
+
"optional": true
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"optionalDependencies": {
|
|
169
|
+
"fsevents": "~2.3.2"
|
|
170
|
+
},
|
|
171
|
+
"engines": {
|
|
172
|
+
"node": ">=16.17.0"
|
|
173
|
+
},
|
|
174
|
+
"volta": {
|
|
175
|
+
"extends": "../../package.json"
|
|
176
|
+
},
|
|
177
|
+
"workers-sdk": {
|
|
178
|
+
"prerelease": true
|
|
179
|
+
},
|
|
180
|
+
"scripts": {
|
|
181
|
+
"assert-git-version": "node -r esbuild-register scripts/assert-git-version.ts",
|
|
182
|
+
"build": "pnpm run clean && pnpm run bundle && pnpm run emit-types && pnpm run generate-json-schema",
|
|
183
|
+
"bundle": "node -r esbuild-register scripts/bundle.ts",
|
|
184
|
+
"check:lint": "eslint . --max-warnings=0",
|
|
185
|
+
"check:type": "tsc",
|
|
186
|
+
"clean": "rimraf wrangler-dist miniflare-dist emitted-types",
|
|
187
|
+
"dev": "pnpm run clean && concurrently -c black,blue --kill-others-on-fail false \"pnpm run bundle --watch\" \"pnpm run check:type --watch --preserveWatchOutput\"",
|
|
188
|
+
"emit-types": "tsc -p tsconfig.emit.json && node -r esbuild-register scripts/emit-types.ts",
|
|
189
|
+
"generate-json-schema": "pnpm exec ts-json-schema-generator --no-type-check --path src/config/config.ts --type RawConfig --out config-schema.json",
|
|
190
|
+
"start": "pnpm run bundle && cross-env NODE_OPTIONS=--enable-source-maps ./bin/wrangler.js",
|
|
191
|
+
"test": "pnpm run assert-git-version && vitest",
|
|
192
|
+
"test:ci": "pnpm run test run",
|
|
193
|
+
"test:debug": "pnpm run test --silent=false --verbose=true",
|
|
194
|
+
"test:e2e": "vitest -c ./e2e/vitest.config.mts",
|
|
195
|
+
"test:watch": "pnpm run test --testTimeout=50000 --watch",
|
|
196
|
+
"type:tests": "tsc -p ./src/__tests__/tsconfig.json && tsc -p ./e2e/tsconfig.json"
|
|
197
|
+
}
|
|
198
|
+
}
|
package/templates/facade.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
declare module "__ENTRY_POINT__" {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { Middleware } from "./middleware/common";
|
|
3
|
+
import { WorkerEntrypoint } from "cloudflare:workers";
|
|
4
|
+
|
|
5
|
+
export type WorkerEntrypointConstructor = typeof WorkerEntrypoint;
|
|
6
|
+
|
|
7
|
+
const worker: ExportedHandler | WorkerEntrypointConstructor;
|
|
7
8
|
export default worker;
|
|
9
|
+
export const __INTERNAL_WRANGLER_MIDDLEWARE__: Middleware[];
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
declare module "__KV_ASSET_HANDLER__" {
|
package/templates/gitignore
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
1
2
|
import { unstable_dev } from "wrangler";
|
|
2
3
|
import type { UnstableDevWorker } from "wrangler";
|
|
3
|
-
import { describe, expect, it, beforeAll, afterAll } from "vitest";
|
|
4
4
|
|
|
5
5
|
describe("Worker", () => {
|
|
6
6
|
let worker: UnstableDevWorker;
|