devflare 1.0.0-next.42 → 1.0.0-next.44
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/LLM.md +1342 -1
- package/dist/_chunks/{account-BtWcv3X9.js → account-Cdo_cRNv.js} +1 -1
- package/dist/_chunks/{build-D1l6a5Il.js → build-MzQbenXE.js} +1 -1
- package/dist/_chunks/{build-artifacts-BUaq16e4.js → build-artifacts-tD45Rwmx.js} +4 -4
- package/dist/_chunks/{cli-CgFqrDZd.js → cli-BiDDz-RY.js} +12 -12
- package/dist/_chunks/{command-utils-BsfkmTqh.js → command-utils-C48hJMln.js} +1 -1
- package/dist/_chunks/{compiler-uoyAQ8zW.js → compiler-Dc97FkBg.js} +80 -15
- package/dist/_chunks/{config-D5u-bEkn.js → config-DQ_uWv37.js} +3 -3
- package/dist/_chunks/{config-path-DCPto4XB.js → config-path-ePwIvHNX.js} +1 -1
- package/dist/_chunks/{deploy-DIDoW5u1.js → deploy-BmtstRbc.js} +6 -6
- package/dist/_chunks/{dev-BTSSETUX.js → dev-wVHYCbZF.js} +19 -10
- package/dist/_chunks/{doctor-C0g8X36G.js → doctor-lFlh-olK.js} +2 -2
- package/dist/_chunks/{family-DXC5SdFK.js → family-Dfb9VR9g.js} +1 -1
- package/dist/_chunks/{loader-DLXO60RO.js → loader-RZhqzsRJ.js} +4 -4
- package/dist/_chunks/{local-secrets-DMmEOygL.js → local-secrets-DMPkmOn3.js} +1 -1
- package/dist/_chunks/{local-workflow-entrypoints-Wip3o1u8.js → local-workflow-entrypoints-Cq_WJajd.js} +1 -1
- package/dist/_chunks/{login-BmnDzDlH.js → login-DnyfffOC.js} +1 -1
- package/dist/_chunks/{preview-BhqDmq8I.js → preview-C3Cdr8an.js} +9 -3
- package/dist/_chunks/{preview-resources-DdXj8LMM.js → preview-resources-xziKCynb.js} +5 -4
- package/dist/_chunks/{previews-Dlr13x5M.js → previews-wI-pW6HM.js} +7 -7
- package/dist/_chunks/{productions-D3AnOHac.js → productions-BpROdhLN.js} +3 -3
- package/dist/_chunks/{routes-BWi7h2xb.js → routes-5OnFhKR2.js} +18 -5
- package/dist/_chunks/{schema-normalization-DWVleVxo.js → schema-normalization-BCwTLTGp.js} +196 -13
- package/dist/_chunks/{secrets-70eN0Q6C.js → secrets-DIpJGe6C.js} +1 -1
- package/dist/_chunks/{types-BgA5Hb4B.js → types-Zn9vyUGA.js} +11 -3
- package/dist/_chunks/{vite-BszZvrKL.js → vite-DLUELS0D.js} +5 -5
- package/dist/_chunks/{worker-CS1jgNFE.js → worker-rL5udcl9.js} +4 -4
- package/dist/bridge/miniflare.d.ts.map +1 -1
- package/dist/browser.d.ts +818 -36
- package/dist/browser.d.ts.map +1 -1
- package/dist/cli/commands/type-generation/generator.d.ts +12 -3
- package/dist/cli/commands/type-generation/generator.d.ts.map +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/config/compiler/bindings.d.ts.map +1 -1
- package/dist/config/compiler/do-workers.d.ts.map +1 -1
- package/dist/config/compiler/types.d.ts +28 -0
- package/dist/config/compiler/types.d.ts.map +1 -1
- package/dist/config/deploy-resources.d.ts.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/preview-resources.d.ts +1 -1
- package/dist/config/preview-resources.d.ts.map +1 -1
- package/dist/config/preview.d.ts.map +1 -1
- package/dist/config/schema-bindings.d.ts +544 -14
- package/dist/config/schema-bindings.d.ts.map +1 -1
- package/dist/config/schema-env.d.ts +572 -24
- package/dist/config/schema-env.d.ts.map +1 -1
- package/dist/config/schema-normalization.d.ts +82 -1
- package/dist/config/schema-normalization.d.ts.map +1 -1
- package/dist/config/schema-types-bindings-platform.d.ts +130 -0
- package/dist/config/schema-types-bindings-platform.d.ts.map +1 -1
- package/dist/config/schema-types-bindings-resources.d.ts +220 -3
- package/dist/config/schema-types-bindings-resources.d.ts.map +1 -1
- package/dist/config/schema-types-bindings.d.ts +42 -3
- package/dist/config/schema-types-bindings.d.ts.map +1 -1
- package/dist/config/schema.d.ts +1035 -57
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config-entry.js +1 -1
- package/dist/dev-server/miniflare-bindings.d.ts +6 -0
- package/dist/dev-server/miniflare-bindings.d.ts.map +1 -1
- package/dist/dev-server/miniflare-dev-config.d.ts.map +1 -1
- package/dist/dev-server/miniflare-worker-config.d.ts +5 -1
- package/dist/dev-server/miniflare-worker-config.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/sveltekit/index.js +3 -3
- package/dist/test/index.d.ts +1 -1
- package/dist/test/index.d.ts.map +1 -1
- package/dist/test/index.js +168 -10
- package/dist/test/offline-bindings.d.ts +5 -3
- package/dist/test/offline-bindings.d.ts.map +1 -1
- package/dist/test/resolve-service-bindings.d.ts.map +1 -1
- package/dist/test/simple-context-mfconfig.d.ts.map +1 -1
- package/dist/test/utilities/stream-flagship.d.ts +27 -0
- package/dist/test/utilities/stream-flagship.d.ts.map +1 -0
- package/dist/test/utilities.d.ts +1 -0
- package/dist/test/utilities.d.ts.map +1 -1
- package/dist/vite/index.js +1 -1
- package/package.json +1 -1
|
@@ -23,10 +23,18 @@ const queueConsumerSchema = z.object({
|
|
|
23
23
|
retryDelay: z.number().optional()
|
|
24
24
|
});
|
|
25
25
|
/**
|
|
26
|
+
* Queue producer binding schema.
|
|
27
|
+
* Accepts the queue-name string shorthand or an object form exposing `remote`.
|
|
28
|
+
*/
|
|
29
|
+
const queueProducerSchema = z.union([z.string(), z.object({
|
|
30
|
+
queue: z.string().min(1),
|
|
31
|
+
remote: z.boolean().optional()
|
|
32
|
+
}).strict()]);
|
|
33
|
+
/**
|
|
26
34
|
* Queues configuration for producers and consumers.
|
|
27
35
|
*/
|
|
28
36
|
const queuesConfigSchema = z.object({
|
|
29
|
-
producers: z.record(z.string(),
|
|
37
|
+
producers: z.record(z.string(), queueProducerSchema).optional(),
|
|
30
38
|
consumers: z.array(queueConsumerSchema).optional()
|
|
31
39
|
});
|
|
32
40
|
/**
|
|
@@ -67,6 +75,7 @@ const serviceBindingKeys = new Set([
|
|
|
67
75
|
"service",
|
|
68
76
|
"environment",
|
|
69
77
|
"entrypoint",
|
|
78
|
+
"remote",
|
|
70
79
|
"__ref"
|
|
71
80
|
]);
|
|
72
81
|
function isServiceBindingValue(val) {
|
|
@@ -75,12 +84,13 @@ function isServiceBindingValue(val) {
|
|
|
75
84
|
if (typeof obj.service !== "string" || obj.service.trim().length === 0) return false;
|
|
76
85
|
if (obj.environment !== void 0 && (typeof obj.environment !== "string" || obj.environment.trim().length === 0)) return false;
|
|
77
86
|
if (obj.entrypoint !== void 0 && (typeof obj.entrypoint !== "string" || obj.entrypoint.trim().length === 0)) return false;
|
|
87
|
+
if (obj.remote !== void 0 && typeof obj.remote !== "boolean") return false;
|
|
78
88
|
if (typeof val === "object") {
|
|
79
89
|
for (const key of Object.keys(obj)) if (!serviceBindingKeys.has(key)) return false;
|
|
80
90
|
}
|
|
81
91
|
return true;
|
|
82
92
|
}
|
|
83
|
-
const serviceBindingSchema = z.custom(isServiceBindingValue, { message: "Expected service binding object with { service: string, environment?: string, entrypoint?: string } or ref().worker" });
|
|
93
|
+
const serviceBindingSchema = z.custom(isServiceBindingValue, { message: "Expected service binding object with { service: string, environment?: string, entrypoint?: string, remote?: boolean } or ref().worker" });
|
|
84
94
|
/**
|
|
85
95
|
* AI binding configuration.
|
|
86
96
|
* Provides access to Cloudflare Workers AI for inference.
|
|
@@ -173,20 +183,56 @@ const sendEmailBindingSchema = z.object({
|
|
|
173
183
|
message: "sendEmail bindings must use either destinationAddress or allowedDestinationAddresses, not both",
|
|
174
184
|
path: ["allowedDestinationAddresses"]
|
|
175
185
|
});
|
|
176
|
-
|
|
177
|
-
const
|
|
186
|
+
/** Preview, migration, and remote-development fields shared by D1 binding forms. */
|
|
187
|
+
const d1BindingExtraShape = {
|
|
188
|
+
previewDatabaseId: z.string().optional(),
|
|
189
|
+
migrationsTable: z.string().optional(),
|
|
190
|
+
migrationsDir: z.string().optional(),
|
|
191
|
+
remote: z.boolean().optional()
|
|
192
|
+
};
|
|
193
|
+
const d1BindingByIdSchema = z.object({
|
|
194
|
+
id: z.string(),
|
|
195
|
+
...d1BindingExtraShape
|
|
196
|
+
}).strict();
|
|
197
|
+
const d1BindingByNameSchema = z.object({
|
|
198
|
+
name: z.string(),
|
|
199
|
+
...d1BindingExtraShape
|
|
200
|
+
}).strict();
|
|
178
201
|
const d1BindingSchema = z.union([
|
|
179
202
|
z.string(),
|
|
180
203
|
d1BindingByIdSchema,
|
|
181
204
|
d1BindingByNameSchema
|
|
182
205
|
]);
|
|
183
|
-
|
|
184
|
-
const
|
|
206
|
+
/** Preview and remote-development fields shared by KV binding forms. */
|
|
207
|
+
const kvBindingExtraShape = {
|
|
208
|
+
previewId: z.string().optional(),
|
|
209
|
+
remote: z.boolean().optional()
|
|
210
|
+
};
|
|
211
|
+
const kvBindingByIdSchema = z.object({
|
|
212
|
+
id: z.string(),
|
|
213
|
+
...kvBindingExtraShape
|
|
214
|
+
}).strict();
|
|
215
|
+
const kvBindingByNameSchema = z.object({
|
|
216
|
+
name: z.string(),
|
|
217
|
+
...kvBindingExtraShape
|
|
218
|
+
}).strict();
|
|
185
219
|
const kvBindingSchema = z.union([
|
|
186
220
|
z.string(),
|
|
187
221
|
kvBindingByIdSchema,
|
|
188
222
|
kvBindingByNameSchema
|
|
189
223
|
]);
|
|
224
|
+
/**
|
|
225
|
+
* R2 bucket binding schema.
|
|
226
|
+
* Accepts the bucket-name string shorthand or an object form exposing
|
|
227
|
+
* `remote`, `previewBucketName`, and `jurisdiction`.
|
|
228
|
+
*/
|
|
229
|
+
const r2BindingObjectSchema = z.object({
|
|
230
|
+
bucketName: z.string().min(1),
|
|
231
|
+
previewBucketName: z.string().optional(),
|
|
232
|
+
jurisdiction: z.string().optional(),
|
|
233
|
+
remote: z.boolean().optional()
|
|
234
|
+
}).strict();
|
|
235
|
+
const r2BindingSchema = z.union([z.string(), r2BindingObjectSchema]);
|
|
190
236
|
const mtlsCertificateBindingByIdSchema = z.object({
|
|
191
237
|
certificateId: z.string().min(1),
|
|
192
238
|
remote: z.boolean().optional()
|
|
@@ -250,13 +296,52 @@ const artifactsBindingSchema = z.union([z.string().min(1), z.object({
|
|
|
250
296
|
remote: z.boolean().optional()
|
|
251
297
|
}).strict()]);
|
|
252
298
|
/**
|
|
299
|
+
* CF-2 — Cloudflare Stream binding (video upload/playback service).
|
|
300
|
+
* Mirrors the Images/Media singleton shape: `true` shorthand or `{ remote? }`.
|
|
301
|
+
*/
|
|
302
|
+
const streamBindingSchema = z.object({ remote: z.boolean().optional() }).strict().or(z.literal(true));
|
|
303
|
+
/**
|
|
304
|
+
* CF-2 — VPC service binding. Connects the Worker to a private service through
|
|
305
|
+
* a Cloudflare VPC connectivity service. Compiles to wrangler's `vpc_services`.
|
|
306
|
+
*/
|
|
307
|
+
const vpcServiceBindingSchema = z.object({
|
|
308
|
+
serviceId: z.string().min(1),
|
|
309
|
+
remote: z.boolean().optional()
|
|
310
|
+
}).strict();
|
|
311
|
+
/**
|
|
312
|
+
* CF-2 — VPC network binding routed through a Cloudflare Tunnel (`tunnelId`).
|
|
313
|
+
*/
|
|
314
|
+
const vpcNetworkByTunnelSchema = z.object({
|
|
315
|
+
tunnelId: z.string().min(1),
|
|
316
|
+
remote: z.boolean().optional()
|
|
317
|
+
}).strict();
|
|
318
|
+
/**
|
|
319
|
+
* CF-2 — VPC network binding routed through a network ID (`networkId`).
|
|
320
|
+
*/
|
|
321
|
+
const vpcNetworkByNetworkSchema = z.object({
|
|
322
|
+
networkId: z.string().min(1),
|
|
323
|
+
remote: z.boolean().optional()
|
|
324
|
+
}).strict();
|
|
325
|
+
/**
|
|
326
|
+
* CF-2 — VPC network binding. Use exactly one of `tunnelId` or `networkId`.
|
|
327
|
+
*/
|
|
328
|
+
const vpcNetworkBindingSchema = z.union([vpcNetworkByTunnelSchema, vpcNetworkByNetworkSchema]);
|
|
329
|
+
/**
|
|
330
|
+
* CF-2 — Flagship feature-flag binding. Compiles to wrangler's `flagship`
|
|
331
|
+
* array (`app_id`).
|
|
332
|
+
*/
|
|
333
|
+
const flagshipBindingSchema = z.object({
|
|
334
|
+
appId: z.string().min(1),
|
|
335
|
+
remote: z.boolean().optional()
|
|
336
|
+
}).strict();
|
|
337
|
+
/**
|
|
253
338
|
* All worker bindings configuration.
|
|
254
339
|
* Defines connections to Cloudflare services and resources.
|
|
255
340
|
*/
|
|
256
341
|
const bindingsSchema = z.object({
|
|
257
342
|
kv: z.record(z.string(), kvBindingSchema).optional(),
|
|
258
343
|
d1: z.record(z.string(), d1BindingSchema).optional(),
|
|
259
|
-
r2: z.record(z.string(),
|
|
344
|
+
r2: z.record(z.string(), r2BindingSchema).optional(),
|
|
260
345
|
durableObjects: z.record(z.string(), durableObjectBindingSchema).optional(),
|
|
261
346
|
queues: queuesConfigSchema.optional(),
|
|
262
347
|
rateLimits: z.record(z.string(), rateLimitBindingSchema).optional(),
|
|
@@ -290,7 +375,17 @@ const bindingsSchema = z.object({
|
|
|
290
375
|
message: "Wrangler currently supports one Media Transformations binding per Worker"
|
|
291
376
|
});
|
|
292
377
|
}),
|
|
293
|
-
artifacts: z.record(z.string(), artifactsBindingSchema).optional()
|
|
378
|
+
artifacts: z.record(z.string(), artifactsBindingSchema).optional(),
|
|
379
|
+
stream: z.record(z.string(), streamBindingSchema).optional().superRefine((bindings, ctx) => {
|
|
380
|
+
if (!bindings || Object.keys(bindings).length <= 1) return;
|
|
381
|
+
ctx.addIssue({
|
|
382
|
+
code: z.ZodIssueCode.custom,
|
|
383
|
+
message: "Wrangler currently supports one Stream binding per Worker"
|
|
384
|
+
});
|
|
385
|
+
}),
|
|
386
|
+
vpcServices: z.record(z.string(), vpcServiceBindingSchema).optional(),
|
|
387
|
+
vpcNetworks: z.record(z.string(), vpcNetworkBindingSchema).optional(),
|
|
388
|
+
flagship: z.record(z.string(), flagshipBindingSchema).optional()
|
|
294
389
|
}).optional();
|
|
295
390
|
//#endregion
|
|
296
391
|
//#region src/config/schema-normalization.ts
|
|
@@ -334,8 +429,20 @@ function normalizeDOBinding(config) {
|
|
|
334
429
|
*/
|
|
335
430
|
function normalizeD1Binding(config) {
|
|
336
431
|
if (typeof config === "string") return { name: config };
|
|
337
|
-
|
|
338
|
-
|
|
432
|
+
const extras = {
|
|
433
|
+
...config.previewDatabaseId !== void 0 && { previewDatabaseId: config.previewDatabaseId },
|
|
434
|
+
...config.migrationsTable !== void 0 && { migrationsTable: config.migrationsTable },
|
|
435
|
+
...config.migrationsDir !== void 0 && { migrationsDir: config.migrationsDir },
|
|
436
|
+
...config.remote !== void 0 && { remote: config.remote }
|
|
437
|
+
};
|
|
438
|
+
if ("id" in config) return {
|
|
439
|
+
databaseId: config.id,
|
|
440
|
+
...extras
|
|
441
|
+
};
|
|
442
|
+
return {
|
|
443
|
+
name: config.name,
|
|
444
|
+
...extras
|
|
445
|
+
};
|
|
339
446
|
}
|
|
340
447
|
/**
|
|
341
448
|
* Normalize a KV binding to a consistent object form.
|
|
@@ -343,8 +450,42 @@ function normalizeD1Binding(config) {
|
|
|
343
450
|
*/
|
|
344
451
|
function normalizeKVBinding(config) {
|
|
345
452
|
if (typeof config === "string") return { name: config };
|
|
346
|
-
|
|
347
|
-
|
|
453
|
+
const extras = {
|
|
454
|
+
...config.previewId !== void 0 && { previewId: config.previewId },
|
|
455
|
+
...config.remote !== void 0 && { remote: config.remote }
|
|
456
|
+
};
|
|
457
|
+
if ("id" in config) return {
|
|
458
|
+
namespaceId: config.id,
|
|
459
|
+
...extras
|
|
460
|
+
};
|
|
461
|
+
return {
|
|
462
|
+
name: config.name,
|
|
463
|
+
...extras
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Normalize an R2 binding to a consistent object form.
|
|
468
|
+
* String bindings are treated as bucket names.
|
|
469
|
+
*/
|
|
470
|
+
function normalizeR2Binding(config) {
|
|
471
|
+
if (typeof config === "string") return { bucketName: config };
|
|
472
|
+
return {
|
|
473
|
+
bucketName: config.bucketName,
|
|
474
|
+
...config.previewBucketName !== void 0 && { previewBucketName: config.previewBucketName },
|
|
475
|
+
...config.jurisdiction !== void 0 && { jurisdiction: config.jurisdiction },
|
|
476
|
+
...config.remote !== void 0 && { remote: config.remote }
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Normalize a queue producer binding to a consistent object form.
|
|
481
|
+
* String bindings are treated as queue names.
|
|
482
|
+
*/
|
|
483
|
+
function normalizeQueueProducer(config) {
|
|
484
|
+
if (typeof config === "string") return { queue: config };
|
|
485
|
+
return {
|
|
486
|
+
queue: config.queue,
|
|
487
|
+
...config.remote !== void 0 && { remote: config.remote }
|
|
488
|
+
};
|
|
348
489
|
}
|
|
349
490
|
/**
|
|
350
491
|
* Normalize a Hyperdrive binding to a consistent object form.
|
|
@@ -444,6 +585,48 @@ function normalizeArtifactsBinding(config) {
|
|
|
444
585
|
};
|
|
445
586
|
}
|
|
446
587
|
/**
|
|
588
|
+
* Normalize a Stream binding to Wrangler's singleton binding object.
|
|
589
|
+
*/
|
|
590
|
+
function normalizeStreamBinding(binding, config) {
|
|
591
|
+
if (config === true) return { binding };
|
|
592
|
+
return {
|
|
593
|
+
binding,
|
|
594
|
+
...config.remote !== void 0 && { remote: config.remote }
|
|
595
|
+
};
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* Normalize a VPC service binding to its object form.
|
|
599
|
+
*/
|
|
600
|
+
function normalizeVpcServiceBinding(config) {
|
|
601
|
+
return {
|
|
602
|
+
serviceId: config.serviceId,
|
|
603
|
+
...config.remote !== void 0 && { remote: config.remote }
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* Normalize a VPC network binding to its object form. Exactly one of
|
|
608
|
+
* `tunnelId`/`networkId` is set, mirroring the wrangler `anyOf` schema.
|
|
609
|
+
*/
|
|
610
|
+
function normalizeVpcNetworkBinding(config) {
|
|
611
|
+
if ("tunnelId" in config) return {
|
|
612
|
+
tunnelId: config.tunnelId,
|
|
613
|
+
...config.remote !== void 0 && { remote: config.remote }
|
|
614
|
+
};
|
|
615
|
+
return {
|
|
616
|
+
networkId: config.networkId,
|
|
617
|
+
...config.remote !== void 0 && { remote: config.remote }
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
/**
|
|
621
|
+
* Normalize a Flagship binding to its object form.
|
|
622
|
+
*/
|
|
623
|
+
function normalizeFlagshipBinding(config) {
|
|
624
|
+
return {
|
|
625
|
+
appId: config.appId,
|
|
626
|
+
...config.remote !== void 0 && { remote: config.remote }
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
447
630
|
* Normalize a Secrets Store binding to its explicit store/name form.
|
|
448
631
|
*/
|
|
449
632
|
function normalizeSecretsStoreBinding(config, defaultStoreId, bindingName = "unknown") {
|
|
@@ -474,4 +657,4 @@ function getLocalD1DatabaseIdentifier(config) {
|
|
|
474
657
|
return normalized.databaseId ?? normalized.name ?? "";
|
|
475
658
|
}
|
|
476
659
|
//#endregion
|
|
477
|
-
export { browserBindingSchema as _, normalizeD1Binding as a,
|
|
660
|
+
export { browserBindingSchema as C, bindingsSchema as S, normalizeSecretsStoreBinding as _, normalizeD1Binding as a, normalizeVpcServiceBinding as b, normalizeFlagshipBinding as c, normalizeKVBinding as d, normalizeMediaBinding as f, normalizeR2Binding as g, normalizeQueueProducer as h, normalizeArtifactsBinding as i, normalizeHyperdriveBinding as l, normalizePipelineBinding as m, getLocalKVNamespaceIdentifier as n, normalizeDOBinding as o, normalizeMtlsCertificateBinding as p, getSingleBrowserBindingName as r, normalizeDispatchNamespaceBinding as s, getLocalD1DatabaseIdentifier as t, normalizeImagesBinding as u, normalizeStreamBinding as v, normalizeWorkflowBinding as x, normalizeVpcNetworkBinding as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as listLocalSecrets, o as writeLocalSecret, r as deleteLocalSecret } from "./local-secrets-
|
|
1
|
+
import { i as listLocalSecrets, o as writeLocalSecret, r as deleteLocalSecret } from "./local-secrets-DMPkmOn3.js";
|
|
2
2
|
//#region src/cli/commands/secrets.ts
|
|
3
3
|
function getStringOption(options, key) {
|
|
4
4
|
const value = options[key];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { r as loadConfig } from "./loader-
|
|
2
|
-
import { o as normalizeDOBinding } from "./schema-normalization-
|
|
1
|
+
import { r as loadConfig } from "./loader-RZhqzsRJ.js";
|
|
2
|
+
import { o as normalizeDOBinding } from "./schema-normalization-BCwTLTGp.js";
|
|
3
3
|
import { n as bold, o as dim, r as createCliTheme } from "./ui-BUoZApvE.js";
|
|
4
4
|
import { n as findDurableObjectClasses } from "./durable-object-DMtH0XYX.js";
|
|
5
5
|
import { i as findFiles, n as DEFAULT_ENTRYPOINT_PATTERN, t as DEFAULT_DO_PATTERN } from "./glob-CmQOvunB.js";
|
|
6
6
|
import { n as discoverEntrypointsAsync, t as resolvePackageSpecifier } from "./resolve-package-qizBfCIm.js";
|
|
7
7
|
import { t as getDependencies } from "./dependencies-C2oxFjU_.js";
|
|
8
|
-
import { r as resolveConfigCandidatePath } from "./config-path-
|
|
8
|
+
import { r as resolveConfigCandidatePath } from "./config-path-ePwIvHNX.js";
|
|
9
9
|
import { readFile } from "node:fs/promises";
|
|
10
10
|
import { dirname, relative, resolve } from "pathe";
|
|
11
11
|
//#region src/cli/commands/type-generation/discovery.ts
|
|
@@ -235,6 +235,10 @@ function generateBindingMembers(config, doClassMap, crossWorkerDOMap, serviceBin
|
|
|
235
235
|
}
|
|
236
236
|
if (config.bindings.images) for (const binding of Object.keys(config.bindings.images)) lines.push(`${indent}${binding}: ImagesBinding`);
|
|
237
237
|
if (config.bindings.media) for (const binding of Object.keys(config.bindings.media)) lines.push(`${indent}${binding}: MediaBinding`);
|
|
238
|
+
if (config.bindings.stream) for (const binding of Object.keys(config.bindings.stream)) lines.push(`${indent}${binding}: StreamBinding`);
|
|
239
|
+
if (config.bindings.flagship) for (const binding of Object.keys(config.bindings.flagship)) lines.push(`${indent}${binding}: Flagship`);
|
|
240
|
+
if (config.bindings.vpcServices) for (const binding of Object.keys(config.bindings.vpcServices)) lines.push(`${indent}${binding}: Fetcher`);
|
|
241
|
+
if (config.bindings.vpcNetworks) for (const binding of Object.keys(config.bindings.vpcNetworks)) lines.push(`${indent}${binding}: Fetcher`);
|
|
238
242
|
if (config.bindings.artifacts) for (const binding of Object.keys(config.bindings.artifacts)) lines.push(`${indent}${binding}: Artifacts`);
|
|
239
243
|
if (config.bindings.secretsStore) for (const binding of Object.keys(config.bindings.secretsStore)) lines.push(`${indent}${binding}: SecretsStoreSecret`);
|
|
240
244
|
if (config.bindings.services) for (const binding of Object.keys(config.bindings.services)) {
|
|
@@ -315,6 +319,10 @@ function generateBindingTypes(config, discoveredDOs, discoveredEntrypoints, refe
|
|
|
315
319
|
if (config.bindings.workflows && Object.keys(config.bindings.workflows).length > 0) usedTypes.add("Workflow");
|
|
316
320
|
if (config.bindings.images && Object.keys(config.bindings.images).length > 0) usedTypes.add("ImagesBinding");
|
|
317
321
|
if (config.bindings.media && Object.keys(config.bindings.media).length > 0) usedTypes.add("MediaBinding");
|
|
322
|
+
if (config.bindings.stream && Object.keys(config.bindings.stream).length > 0) usedTypes.add("StreamBinding");
|
|
323
|
+
if (config.bindings.flagship && Object.keys(config.bindings.flagship).length > 0) usedTypes.add("Flagship");
|
|
324
|
+
if (config.bindings.vpcServices && Object.keys(config.bindings.vpcServices).length > 0) usedTypes.add("Fetcher");
|
|
325
|
+
if (config.bindings.vpcNetworks && Object.keys(config.bindings.vpcNetworks).length > 0) usedTypes.add("Fetcher");
|
|
318
326
|
if (config.bindings.artifacts && Object.keys(config.bindings.artifacts).length > 0) usedTypes.add("Artifacts");
|
|
319
327
|
if (config.bindings.secretsStore && Object.keys(config.bindings.secretsStore).length > 0) usedTypes.add("SecretsStoreSecret");
|
|
320
328
|
if (config.bindings.services) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { d as resolveConfigEnvVars } from "./preview-
|
|
2
|
-
import { i as resolveConfigPath, o as loadResolvedConfig, r as loadConfig, s as resolveResources, u as resolveConfigForEnvironment } from "./loader-
|
|
3
|
-
import { o as normalizeDOBinding } from "./schema-normalization-
|
|
4
|
-
import { c as writeWranglerConfig, i as isolateViteBuildOutputPaths, n as compileConfig, o as rebaseWranglerConfigPaths, r as compileToProgrammaticConfig, t as compileBuildConfig } from "./compiler-
|
|
5
|
-
import { s as resolveServiceBindings, t as discoverRoutes } from "./routes-
|
|
1
|
+
import { d as resolveConfigEnvVars } from "./preview-C3Cdr8an.js";
|
|
2
|
+
import { i as resolveConfigPath, o as loadResolvedConfig, r as loadConfig, s as resolveResources, u as resolveConfigForEnvironment } from "./loader-RZhqzsRJ.js";
|
|
3
|
+
import { o as normalizeDOBinding } from "./schema-normalization-BCwTLTGp.js";
|
|
4
|
+
import { c as writeWranglerConfig, i as isolateViteBuildOutputPaths, n as compileConfig, o as rebaseWranglerConfigPaths, r as compileToProgrammaticConfig, t as compileBuildConfig } from "./compiler-Dc97FkBg.js";
|
|
5
|
+
import { s as resolveServiceBindings, t as discoverRoutes } from "./routes-5OnFhKR2.js";
|
|
6
6
|
import { n as findDurableObjectClasses } from "./durable-object-DMtH0XYX.js";
|
|
7
7
|
import { r as SUPPORTED_WORKER_EXTENSIONS } from "./worker-entrypoint-CQW77lG8.js";
|
|
8
8
|
import { i as findFiles, t as DEFAULT_DO_PATTERN } from "./glob-CmQOvunB.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { r as loadConfig } from "./loader-
|
|
2
|
-
import { o as normalizeDOBinding } from "./schema-normalization-
|
|
1
|
+
import { r as loadConfig } from "./loader-RZhqzsRJ.js";
|
|
2
|
+
import { o as normalizeDOBinding } from "./schema-normalization-BCwTLTGp.js";
|
|
3
3
|
import { t as account } from "./cloudflare-BaloqI3H.js";
|
|
4
4
|
import { d as green, f as logLine, g as yellow, h as whiteDim, n as bold, o as dim, r as createCliTheme } from "./ui-BUoZApvE.js";
|
|
5
|
-
import { r as resolveCloudflareAccountId, t as asOptionalString } from "./command-utils-
|
|
6
|
-
import { n as formatSupportedConfigFilenames, r as resolveConfigCandidatePath, t as findConfigPathsUnderDirectory } from "./config-path-
|
|
5
|
+
import { r as resolveCloudflareAccountId, t as asOptionalString } from "./command-utils-C48hJMln.js";
|
|
6
|
+
import { n as formatSupportedConfigFilenames, r as resolveConfigCandidatePath, t as findConfigPathsUnderDirectory } from "./config-path-ePwIvHNX.js";
|
|
7
7
|
import { basename, dirname, relative, resolve } from "pathe";
|
|
8
8
|
import MagicString from "magic-string";
|
|
9
9
|
//#region src/cli/commands/worker.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"miniflare.d.ts","sourceRoot":"","sources":["../../src/bridge/miniflare.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,WAAW,CAAA;AAC3D,OAAO,EACN,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"miniflare.d.ts","sourceRoot":"","sources":["../../src/bridge/miniflare.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,WAAW,CAAA;AAC3D,OAAO,EACN,KAAK,cAAc,EAcnB,MAAM,WAAW,CAAA;AAGlB,OAAO,EACN,KAAK,+BAA+B,EAGpC,MAAM,0BAA0B,CAAA;AAQjC,MAAM,WAAW,iBAAiB;IACjC,uDAAuD;IACvD,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;IACpB,qCAAqC;IACrC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACxB,2CAA2C;IAC3C,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IAC/C,kDAAkD;IAClD,cAAc,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAA;IAC/C,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