wrangler 2.8.0 → 2.9.0
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/package.json +1 -1
- package/src/__tests__/d1/d1.test.ts +24 -62
- package/src/__tests__/d1/migrate.test.ts +48 -0
- package/src/__tests__/deployments.test.ts +4 -4
- package/src/__tests__/dev.test.tsx +5 -4
- package/src/__tests__/helpers/msw/handlers/deployments.ts +10 -18
- package/src/__tests__/helpers/msw/handlers/namespaces.ts +18 -41
- package/src/__tests__/helpers/msw/handlers/r2.ts +14 -34
- package/src/__tests__/helpers/msw/handlers/script.ts +9 -28
- package/src/__tests__/helpers/msw/handlers/user.ts +13 -24
- package/src/__tests__/helpers/msw/handlers/zones.ts +6 -8
- package/src/__tests__/index.test.ts +35 -28
- package/src/__tests__/kv.test.ts +55 -44
- package/src/__tests__/pages.test.ts +61 -57
- package/src/__tests__/parse.test.ts +106 -0
- package/src/__tests__/publish.test.ts +126 -0
- package/src/__tests__/pubsub.test.ts +15 -12
- package/src/__tests__/queues.test.ts +35 -28
- package/src/__tests__/r2.test.ts +36 -55
- package/src/__tests__/tail.test.ts +6 -18
- package/src/__tests__/tsconfig.tsbuildinfo +1 -1
- package/src/__tests__/user.test.ts +0 -1
- package/src/__tests__/whoami.test.tsx +6 -17
- package/src/__tests__/worker-namespace.test.ts +81 -68
- package/src/api/dev.ts +80 -11
- package/src/api/index.ts +1 -0
- package/src/api/pages/index.ts +5 -0
- package/src/api/pages/publish.tsx +324 -0
- package/src/bundle.ts +63 -11
- package/src/cli.ts +2 -2
- package/src/config/config.ts +7 -0
- package/src/config/environment.ts +12 -10
- package/src/config/index.ts +24 -20
- package/src/d1/backups.tsx +20 -24
- package/src/d1/create.tsx +6 -5
- package/src/d1/delete.ts +7 -10
- package/src/d1/execute.tsx +82 -84
- package/src/d1/index.ts +5 -6
- package/src/d1/list.tsx +21 -9
- package/src/d1/migrations/apply.tsx +7 -5
- package/src/d1/migrations/create.tsx +7 -10
- package/src/d1/migrations/list.tsx +7 -5
- package/src/d1/migrations/options.ts +2 -2
- package/src/d1/options.ts +3 -3
- package/src/d1/utils.ts +1 -1
- package/src/delete.ts +5 -8
- package/src/deployments.ts +16 -6
- package/src/deprecated/index.ts +7 -8
- package/src/dev/local.tsx +1 -10
- package/src/dev/start-server.ts +5 -10
- package/src/dev/use-esbuild.ts +1 -0
- package/src/dev.tsx +42 -80
- package/src/dispatch-namespace.ts +20 -16
- package/src/docs/index.ts +7 -8
- package/src/entry.ts +1 -2
- package/src/generate/index.ts +5 -7
- package/src/index.ts +23 -22
- package/src/init.ts +5 -7
- package/src/kv/index.ts +15 -17
- package/src/metrics/send-event.ts +2 -1
- package/src/pages/build.ts +9 -127
- package/src/pages/buildFunctions.ts +129 -0
- package/src/pages/deployment-tails.ts +7 -10
- package/src/pages/deployments.tsx +6 -4
- package/src/pages/dev.ts +27 -19
- package/src/pages/functions/buildPlugin.ts +1 -0
- package/src/pages/functions/buildWorker.ts +8 -2
- package/src/pages/functions/tsconfig.tsbuildinfo +1 -1
- package/src/pages/functions.ts +8 -4
- package/src/pages/index.ts +3 -3
- package/src/pages/projects.tsx +7 -12
- package/src/pages/publish.tsx +15 -239
- package/src/pages/types.ts +5 -0
- package/src/pages/upload.tsx +6 -4
- package/src/parse.ts +23 -1
- package/src/publish/index.ts +19 -15
- package/src/publish/publish.ts +3 -2
- package/src/pubsub/pubsub-commands.ts +18 -19
- package/src/queues/cli/commands/consumer/add.ts +18 -24
- package/src/queues/cli/commands/consumer/index.ts +3 -6
- package/src/queues/cli/commands/consumer/remove.ts +11 -18
- package/src/queues/cli/commands/create.ts +8 -8
- package/src/queues/cli/commands/delete.ts +8 -8
- package/src/queues/cli/commands/index.ts +3 -4
- package/src/queues/cli/commands/list.ts +8 -8
- package/src/r2/index.ts +28 -28
- package/src/secret/index.ts +9 -14
- package/src/tail/index.ts +6 -8
- package/src/yargs-types.ts +18 -5
- package/templates/checked-fetch.js +9 -1
- package/templates/d1-beta-facade.js +1 -1
- package/templates/middleware/loader-modules.ts +2 -0
- package/templates/tsconfig.tsbuildinfo +1 -1
- package/wrangler-dist/cli.d.ts +132 -10
- package/wrangler-dist/cli.js +2474 -1635
|
@@ -4,6 +4,7 @@ import { getUserInfo } from "../whoami";
|
|
|
4
4
|
import { mockConsoleMethods } from "./helpers/mock-console";
|
|
5
5
|
import { useMockIsTTY } from "./helpers/mock-istty";
|
|
6
6
|
import {
|
|
7
|
+
createFetchResult,
|
|
7
8
|
msw,
|
|
8
9
|
mswSuccessOauthHandlers,
|
|
9
10
|
mswSuccessUserHandlers,
|
|
@@ -44,18 +45,14 @@ describe("getUserInfo()", () => {
|
|
|
44
45
|
msw.use(
|
|
45
46
|
rest.get("*/user", (_, res, ctx) => {
|
|
46
47
|
return res.once(
|
|
47
|
-
ctx.
|
|
48
|
-
|
|
49
|
-
success: false,
|
|
50
|
-
errors: [
|
|
48
|
+
ctx.json(
|
|
49
|
+
createFetchResult({}, false, [
|
|
51
50
|
{
|
|
52
51
|
code: 9109,
|
|
53
52
|
message: "Uauthorized to access requested resource",
|
|
54
53
|
},
|
|
55
|
-
]
|
|
56
|
-
|
|
57
|
-
result: {},
|
|
58
|
-
})
|
|
54
|
+
])
|
|
55
|
+
)
|
|
59
56
|
);
|
|
60
57
|
}),
|
|
61
58
|
rest.get("*/accounts", (request, res, ctx) => {
|
|
@@ -71,15 +68,7 @@ describe("getUserInfo()", () => {
|
|
|
71
68
|
"host": "api.cloudflare.com",
|
|
72
69
|
}
|
|
73
70
|
`);
|
|
74
|
-
return res.once(
|
|
75
|
-
ctx.status(200),
|
|
76
|
-
ctx.json({
|
|
77
|
-
success: true,
|
|
78
|
-
errors: [],
|
|
79
|
-
messages: [],
|
|
80
|
-
result: [],
|
|
81
|
-
})
|
|
82
|
-
);
|
|
71
|
+
return res.once(ctx.json(createFetchResult([])));
|
|
83
72
|
})
|
|
84
73
|
);
|
|
85
74
|
const userInfo = await getUserInfo();
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { rest } from "msw";
|
|
2
2
|
import { mockAccountId, mockApiToken } from "./helpers/mock-account-id";
|
|
3
3
|
import { mockConsoleMethods } from "./helpers/mock-console";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
createFetchResult,
|
|
6
|
+
msw,
|
|
7
|
+
mswSuccessNamespacesHandlers,
|
|
8
|
+
} from "./helpers/msw";
|
|
5
9
|
import { runInTempDir } from "./helpers/run-in-tmp";
|
|
6
10
|
import { runWrangler } from "./helpers/run-wrangler";
|
|
7
11
|
|
|
@@ -35,10 +39,11 @@ describe("dispatch-namespace", () => {
|
|
|
35
39
|
wrangler dispatch-namespace rename <old-name> <new-name> Rename a dispatch namespace
|
|
36
40
|
|
|
37
41
|
Flags:
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
+
-j, --experimental-json-config Experimental: Support wrangler.json [boolean]
|
|
43
|
+
-c, --config Path to .toml configuration file [string]
|
|
44
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
45
|
+
-h, --help Show help [boolean]
|
|
46
|
+
-v, --version Show version number [boolean]",
|
|
42
47
|
"warn": "",
|
|
43
48
|
}
|
|
44
49
|
`);
|
|
@@ -49,22 +54,23 @@ describe("dispatch-namespace", () => {
|
|
|
49
54
|
let counter = 0;
|
|
50
55
|
msw.use(
|
|
51
56
|
rest.post(
|
|
52
|
-
"
|
|
53
|
-
(req, res,
|
|
57
|
+
"*/accounts/:accountId/workers/dispatch/namespaces/:namespaceNameParam",
|
|
58
|
+
(req, res, ctx) => {
|
|
54
59
|
counter++;
|
|
55
60
|
const { namespaceNameParam } = req.params;
|
|
56
61
|
expect(counter).toBe(1);
|
|
57
62
|
expect(namespaceNameParam).toBe(namespaceName);
|
|
58
63
|
return res.once(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
ctx.json(
|
|
65
|
+
createFetchResult({
|
|
66
|
+
namespace_id: "some-namespace-id",
|
|
67
|
+
namespace_name: "namespace-name",
|
|
68
|
+
created_on: "2022-06-29T14:30:08.16152Z",
|
|
69
|
+
created_by: "1fc1df98cc4420fe00367c3ab68c1639",
|
|
70
|
+
modified_on: "2022-06-29T14:30:08.16152Z",
|
|
71
|
+
modified_by: "1fc1df98cc4420fe00367c3ab68c1639",
|
|
72
|
+
})
|
|
73
|
+
)
|
|
68
74
|
);
|
|
69
75
|
}
|
|
70
76
|
)
|
|
@@ -87,10 +93,11 @@ describe("dispatch-namespace", () => {
|
|
|
87
93
|
name Name of the dispatch namespace [string] [required]
|
|
88
94
|
|
|
89
95
|
Flags:
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
96
|
+
-j, --experimental-json-config Experimental: Support wrangler.json [boolean]
|
|
97
|
+
-c, --config Path to .toml configuration file [string]
|
|
98
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
99
|
+
-h, --help Show help [boolean]
|
|
100
|
+
-v, --version Show version number [boolean]"
|
|
94
101
|
`);
|
|
95
102
|
});
|
|
96
103
|
|
|
@@ -108,13 +115,13 @@ describe("dispatch-namespace", () => {
|
|
|
108
115
|
let counter = 0;
|
|
109
116
|
msw.use(
|
|
110
117
|
rest.delete(
|
|
111
|
-
"
|
|
112
|
-
(req, res,
|
|
118
|
+
"*/accounts/:accountId/workers/dispatch/namespaces/:namespaceNameParam",
|
|
119
|
+
(req, res, ctx) => {
|
|
113
120
|
counter++;
|
|
114
121
|
const { namespaceNameParam } = req.params;
|
|
115
122
|
expect(counter).toBe(1);
|
|
116
123
|
expect(namespaceNameParam).toBe(namespaceName);
|
|
117
|
-
return res.once(
|
|
124
|
+
return res.once(ctx.json(null));
|
|
118
125
|
}
|
|
119
126
|
)
|
|
120
127
|
);
|
|
@@ -136,10 +143,11 @@ describe("dispatch-namespace", () => {
|
|
|
136
143
|
name Name of the dispatch namespace [string] [required]
|
|
137
144
|
|
|
138
145
|
Flags:
|
|
139
|
-
-
|
|
140
|
-
-
|
|
141
|
-
-
|
|
142
|
-
-
|
|
146
|
+
-j, --experimental-json-config Experimental: Support wrangler.json [boolean]
|
|
147
|
+
-c, --config Path to .toml configuration file [string]
|
|
148
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
149
|
+
-h, --help Show help [boolean]
|
|
150
|
+
-v, --version Show version number [boolean]"
|
|
143
151
|
`);
|
|
144
152
|
});
|
|
145
153
|
|
|
@@ -157,22 +165,23 @@ describe("dispatch-namespace", () => {
|
|
|
157
165
|
let counter = 0;
|
|
158
166
|
msw.use(
|
|
159
167
|
rest.get(
|
|
160
|
-
"
|
|
161
|
-
(req, res,
|
|
168
|
+
"*/accounts/:accountId/workers/dispatch/namespaces/:namespaceNameParam",
|
|
169
|
+
(req, res, ctx) => {
|
|
162
170
|
counter++;
|
|
163
171
|
const { namespaceNameParam } = req.params;
|
|
164
172
|
expect(counter).toBe(1);
|
|
165
173
|
expect(namespaceNameParam).toBe(namespaceName);
|
|
166
174
|
return res.once(
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
175
|
+
ctx.json(
|
|
176
|
+
createFetchResult({
|
|
177
|
+
namespace_id: "some-namespace-id",
|
|
178
|
+
namespace_name: "namespace-name",
|
|
179
|
+
created_on: "2022-06-29T14:30:08.16152Z",
|
|
180
|
+
created_by: "1fc1df98cc4420fe00367c3ab68c1639",
|
|
181
|
+
modified_on: "2022-06-29T14:30:08.16152Z",
|
|
182
|
+
modified_by: "1fc1df98cc4420fe00367c3ab68c1639",
|
|
183
|
+
})
|
|
184
|
+
)
|
|
176
185
|
);
|
|
177
186
|
}
|
|
178
187
|
)
|
|
@@ -195,10 +204,11 @@ describe("dispatch-namespace", () => {
|
|
|
195
204
|
name Name of the dispatch namespace [string] [required]
|
|
196
205
|
|
|
197
206
|
Flags:
|
|
198
|
-
-
|
|
199
|
-
-
|
|
200
|
-
-
|
|
201
|
-
-
|
|
207
|
+
-j, --experimental-json-config Experimental: Support wrangler.json [boolean]
|
|
208
|
+
-c, --config Path to .toml configuration file [string]
|
|
209
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
210
|
+
-h, --help Show help [boolean]
|
|
211
|
+
-v, --version Show version number [boolean]"
|
|
202
212
|
`);
|
|
203
213
|
});
|
|
204
214
|
|
|
@@ -223,22 +233,23 @@ describe("dispatch-namespace", () => {
|
|
|
223
233
|
let counter = 0;
|
|
224
234
|
msw.use(
|
|
225
235
|
rest.get(
|
|
226
|
-
"
|
|
227
|
-
(req, res,
|
|
236
|
+
"*/accounts/:accountId/workers/dispatch/namespaces/:namespaceNameParam",
|
|
237
|
+
(req, res, ctx) => {
|
|
228
238
|
counter++;
|
|
229
239
|
const { namespaceNameParam } = req.params;
|
|
230
240
|
expect(counter).toBe(1);
|
|
231
241
|
expect(namespaceNameParam).toBe(namespaceName);
|
|
232
242
|
return res.once(
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
243
|
+
ctx.json(
|
|
244
|
+
createFetchResult({
|
|
245
|
+
namespace_id: "some-namespace-id",
|
|
246
|
+
namespace_name: "namespace-name",
|
|
247
|
+
created_on: "2022-06-29T14:30:08.16152Z",
|
|
248
|
+
created_by: "1fc1df98cc4420fe00367c3ab68c1639",
|
|
249
|
+
modified_on: "2022-06-29T14:30:08.16152Z",
|
|
250
|
+
modified_by: "1fc1df98cc4420fe00367c3ab68c1639",
|
|
251
|
+
})
|
|
252
|
+
)
|
|
242
253
|
);
|
|
243
254
|
}
|
|
244
255
|
)
|
|
@@ -266,22 +277,23 @@ describe("dispatch-namespace", () => {
|
|
|
266
277
|
let counter = 0;
|
|
267
278
|
msw.use(
|
|
268
279
|
rest.put(
|
|
269
|
-
"
|
|
270
|
-
(req, res,
|
|
280
|
+
"*/accounts/:accountId/workers/dispatch/namespaces/:namespaceNameParam",
|
|
281
|
+
(req, res, ctx) => {
|
|
271
282
|
counter++;
|
|
272
283
|
const { namespaceNameParam } = req.params;
|
|
273
284
|
expect(counter).toBe(1);
|
|
274
285
|
expect(namespaceNameParam).toBe(namespaceName);
|
|
275
286
|
return res.once(
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
287
|
+
ctx.json(
|
|
288
|
+
createFetchResult({
|
|
289
|
+
namespace_id: "some-namespace-id",
|
|
290
|
+
namespace_name: "namespace-name",
|
|
291
|
+
created_on: "2022-06-29T14:30:08.16152Z",
|
|
292
|
+
created_by: "1fc1df98cc4420fe00367c3ab68c1639",
|
|
293
|
+
modified_on: "2022-06-29T14:30:08.16152Z",
|
|
294
|
+
modified_by: "1fc1df98cc4420fe00367c3ab68c1639",
|
|
295
|
+
})
|
|
296
|
+
)
|
|
285
297
|
);
|
|
286
298
|
}
|
|
287
299
|
)
|
|
@@ -305,10 +317,11 @@ describe("dispatch-namespace", () => {
|
|
|
305
317
|
new-name New name of the dispatch namespace [string] [required]
|
|
306
318
|
|
|
307
319
|
Flags:
|
|
308
|
-
-
|
|
309
|
-
-
|
|
310
|
-
-
|
|
311
|
-
-
|
|
320
|
+
-j, --experimental-json-config Experimental: Support wrangler.json [boolean]
|
|
321
|
+
-c, --config Path to .toml configuration file [string]
|
|
322
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
323
|
+
-h, --help Show help [boolean]
|
|
324
|
+
-v, --version Show version number [boolean]"
|
|
312
325
|
`);
|
|
313
326
|
});
|
|
314
327
|
|
package/src/api/dev.ts
CHANGED
|
@@ -100,7 +100,6 @@ export async function unstable_dev(
|
|
|
100
100
|
showInteractiveDevSession,
|
|
101
101
|
testMode,
|
|
102
102
|
testScheduled,
|
|
103
|
-
watch,
|
|
104
103
|
// 2. options for alpha/beta products/libs
|
|
105
104
|
d1Databases,
|
|
106
105
|
experimentalLocal,
|
|
@@ -139,20 +138,54 @@ export async function unstable_dev(
|
|
|
139
138
|
local: true,
|
|
140
139
|
d1Databases,
|
|
141
140
|
disableDevRegistry,
|
|
142
|
-
testScheduled,
|
|
143
|
-
experimentalLocal,
|
|
144
|
-
experimentalLocalRemoteKv,
|
|
141
|
+
testScheduled: testScheduled ?? false,
|
|
142
|
+
experimentalLocal: experimentalLocal ?? false,
|
|
143
|
+
experimentalLocalRemoteKv: experimentalLocalRemoteKv ?? false,
|
|
145
144
|
enablePagesAssetsServiceBinding,
|
|
146
145
|
liveReload,
|
|
147
146
|
showInteractiveDevSession,
|
|
148
147
|
forceLocal,
|
|
149
|
-
watch,
|
|
150
|
-
...options,
|
|
151
148
|
onReady: (address, port) => {
|
|
152
149
|
readyPort = port;
|
|
153
150
|
readyAddress = address;
|
|
154
151
|
ready(devServer);
|
|
155
152
|
},
|
|
153
|
+
config: options?.config,
|
|
154
|
+
env: options?.env,
|
|
155
|
+
bundle: options?.bundle,
|
|
156
|
+
compatibilityDate: options?.compatibilityDate,
|
|
157
|
+
compatibilityFlags: options?.compatibilityFlags,
|
|
158
|
+
ip: options?.ip,
|
|
159
|
+
inspectorPort: options?.inspectorPort,
|
|
160
|
+
v: undefined,
|
|
161
|
+
localProtocol: options?.localProtocol,
|
|
162
|
+
assets: options?.assets,
|
|
163
|
+
site: options?.site, // Root folder of static assets for Workers Sites
|
|
164
|
+
siteInclude: options?.siteInclude, // Array of .gitignore-style patterns that match file or directory names from the sites directory. Only matched items will be uploaded.
|
|
165
|
+
siteExclude: options?.siteExclude, // Array of .gitignore-style patterns that match file or directory names from the sites directory. Matched items will not be uploaded.
|
|
166
|
+
nodeCompat: options?.nodeCompat, // Enable node.js compatibility
|
|
167
|
+
persist: options?.persist, // Enable persistence for local mode, using default path: .wrangler/state
|
|
168
|
+
persistTo: options?.persistTo, // Specify directory to use for local persistence (implies --persist)
|
|
169
|
+
experimentalJsonConfig: undefined,
|
|
170
|
+
name: undefined,
|
|
171
|
+
noBundle: false,
|
|
172
|
+
format: undefined,
|
|
173
|
+
latest: false,
|
|
174
|
+
routes: undefined,
|
|
175
|
+
host: undefined,
|
|
176
|
+
localUpstream: undefined,
|
|
177
|
+
experimentalPublic: undefined,
|
|
178
|
+
upstreamProtocol: undefined,
|
|
179
|
+
var: undefined,
|
|
180
|
+
define: undefined,
|
|
181
|
+
jsxFactory: undefined,
|
|
182
|
+
jsxFragment: undefined,
|
|
183
|
+
tsconfig: undefined,
|
|
184
|
+
minify: undefined,
|
|
185
|
+
experimentalEnableLocalPersistence: undefined,
|
|
186
|
+
legacyEnv: undefined,
|
|
187
|
+
public: undefined,
|
|
188
|
+
...options,
|
|
156
189
|
});
|
|
157
190
|
}).then((devServer) => {
|
|
158
191
|
// now that the inner promise has resolved, we can resolve the outer promise
|
|
@@ -190,22 +223,58 @@ export async function unstable_dev(
|
|
|
190
223
|
inspect: false,
|
|
191
224
|
_: [],
|
|
192
225
|
$0: "",
|
|
226
|
+
logLevel: options?.logLevel ?? "log",
|
|
227
|
+
port: options?.port ?? 0,
|
|
193
228
|
local: true,
|
|
194
229
|
showInteractiveDevSession,
|
|
195
230
|
d1Databases,
|
|
196
231
|
disableDevRegistry,
|
|
197
|
-
testScheduled,
|
|
198
|
-
experimentalLocal,
|
|
199
|
-
experimentalLocalRemoteKv,
|
|
232
|
+
testScheduled: testScheduled ?? false,
|
|
233
|
+
experimentalLocal: experimentalLocal ?? false,
|
|
234
|
+
experimentalLocalRemoteKv: experimentalLocalRemoteKv ?? false,
|
|
200
235
|
enablePagesAssetsServiceBinding,
|
|
201
236
|
liveReload,
|
|
202
|
-
watch,
|
|
203
|
-
...options,
|
|
204
237
|
onReady: (address, port) => {
|
|
205
238
|
readyPort = port;
|
|
206
239
|
readyAddress = address;
|
|
207
240
|
ready(devServer);
|
|
208
241
|
},
|
|
242
|
+
config: options?.config,
|
|
243
|
+
env: options?.env,
|
|
244
|
+
bundle: options?.bundle,
|
|
245
|
+
compatibilityDate: options?.compatibilityDate,
|
|
246
|
+
compatibilityFlags: options?.compatibilityFlags,
|
|
247
|
+
ip: options?.ip,
|
|
248
|
+
inspectorPort: options?.inspectorPort,
|
|
249
|
+
v: undefined,
|
|
250
|
+
localProtocol: options?.localProtocol,
|
|
251
|
+
assets: options?.assets,
|
|
252
|
+
site: options?.site, // Root folder of static assets for Workers Sites
|
|
253
|
+
siteInclude: options?.siteInclude, // Array of .gitignore-style patterns that match file or directory names from the sites directory. Only matched items will be uploaded.
|
|
254
|
+
siteExclude: options?.siteExclude, // Array of .gitignore-style patterns that match file or directory names from the sites directory. Matched items will not be uploaded.
|
|
255
|
+
nodeCompat: options?.nodeCompat, // Enable node.js compatibility
|
|
256
|
+
persist: options?.persist, // Enable persistence for local mode, using default path: .wrangler/state
|
|
257
|
+
persistTo: options?.persistTo, // Specify directory to use for local persistence (implies --persist)
|
|
258
|
+
experimentalJsonConfig: undefined,
|
|
259
|
+
name: undefined,
|
|
260
|
+
noBundle: false,
|
|
261
|
+
format: undefined,
|
|
262
|
+
latest: false,
|
|
263
|
+
routes: undefined,
|
|
264
|
+
host: undefined,
|
|
265
|
+
localUpstream: undefined,
|
|
266
|
+
experimentalPublic: undefined,
|
|
267
|
+
upstreamProtocol: undefined,
|
|
268
|
+
var: undefined,
|
|
269
|
+
define: undefined,
|
|
270
|
+
jsxFactory: undefined,
|
|
271
|
+
jsxFragment: undefined,
|
|
272
|
+
tsconfig: undefined,
|
|
273
|
+
minify: undefined,
|
|
274
|
+
experimentalEnableLocalPersistence: undefined,
|
|
275
|
+
legacyEnv: undefined,
|
|
276
|
+
public: undefined,
|
|
277
|
+
...options,
|
|
209
278
|
});
|
|
210
279
|
}).then((devServer) => {
|
|
211
280
|
resolve({
|
package/src/api/index.ts
CHANGED