wrangler 4.47.0 → 4.48.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 +5 -5
- package/wrangler-dist/cli.d.ts +1 -0
- package/wrangler-dist/cli.js +1140 -938
- package/wrangler-dist/metafile-cjs.json +1 -1
package/wrangler-dist/cli.js
CHANGED
|
@@ -4,7 +4,7 @@ var fs25 = require('fs');
|
|
|
4
4
|
var path5 = require('path');
|
|
5
5
|
var Url = require('url');
|
|
6
6
|
var process8 = require('process');
|
|
7
|
-
var
|
|
7
|
+
var assert41 = require('assert');
|
|
8
8
|
var util2 = require('util');
|
|
9
9
|
var os8 = require('os');
|
|
10
10
|
var tty = require('tty');
|
|
@@ -56,7 +56,7 @@ var fs25__namespace = /*#__PURE__*/_interopNamespace(fs25);
|
|
|
56
56
|
var path5__namespace = /*#__PURE__*/_interopNamespace(path5);
|
|
57
57
|
var Url__default = /*#__PURE__*/_interopDefault(Url);
|
|
58
58
|
var process8__default = /*#__PURE__*/_interopDefault(process8);
|
|
59
|
-
var
|
|
59
|
+
var assert41__default = /*#__PURE__*/_interopDefault(assert41);
|
|
60
60
|
var util2__namespace = /*#__PURE__*/_interopNamespace(util2);
|
|
61
61
|
var os8__namespace = /*#__PURE__*/_interopNamespace(os8);
|
|
62
62
|
var tty__default = /*#__PURE__*/_interopDefault(tty);
|
|
@@ -183,6 +183,557 @@ var init_MultipartBody = __esm({
|
|
|
183
183
|
};
|
|
184
184
|
}
|
|
185
185
|
});
|
|
186
|
+
|
|
187
|
+
// ../workers-utils/dist/chunk-LFBFF6MG.mjs
|
|
188
|
+
function formatCompatibilityDate(date) {
|
|
189
|
+
return date.toISOString().slice(0, 10);
|
|
190
|
+
}
|
|
191
|
+
function assertNever(_value) {
|
|
192
|
+
}
|
|
193
|
+
function createFatalError(message, isJson, code, telemetryMessage) {
|
|
194
|
+
if (isJson) {
|
|
195
|
+
return new JsonFriendlyFatalError(
|
|
196
|
+
JSON.stringify(message),
|
|
197
|
+
code,
|
|
198
|
+
telemetryMessage
|
|
199
|
+
);
|
|
200
|
+
} else {
|
|
201
|
+
return new FatalError(`${message}`, code, telemetryMessage);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
function mapWorkerMetadataBindings(bindings) {
|
|
205
|
+
return bindings.filter((binding) => binding.type !== "secret_text").reduce((configObj, binding) => {
|
|
206
|
+
switch (binding.type) {
|
|
207
|
+
case "plain_text":
|
|
208
|
+
{
|
|
209
|
+
configObj.vars = {
|
|
210
|
+
...configObj.vars ?? {},
|
|
211
|
+
[binding.name]: binding.text
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
break;
|
|
215
|
+
case "json":
|
|
216
|
+
{
|
|
217
|
+
configObj.vars = {
|
|
218
|
+
...configObj.vars ?? {},
|
|
219
|
+
name: binding.name,
|
|
220
|
+
json: binding.json
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
break;
|
|
224
|
+
case "kv_namespace":
|
|
225
|
+
{
|
|
226
|
+
configObj.kv_namespaces = [
|
|
227
|
+
...configObj.kv_namespaces ?? [],
|
|
228
|
+
{ id: binding.namespace_id, binding: binding.name }
|
|
229
|
+
];
|
|
230
|
+
}
|
|
231
|
+
break;
|
|
232
|
+
case "durable_object_namespace":
|
|
233
|
+
{
|
|
234
|
+
configObj.durable_objects = {
|
|
235
|
+
bindings: [
|
|
236
|
+
...configObj.durable_objects?.bindings ?? [],
|
|
237
|
+
{
|
|
238
|
+
name: binding.name,
|
|
239
|
+
class_name: binding.class_name,
|
|
240
|
+
script_name: binding.script_name,
|
|
241
|
+
environment: binding.environment
|
|
242
|
+
}
|
|
243
|
+
]
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
break;
|
|
247
|
+
case "d1":
|
|
248
|
+
{
|
|
249
|
+
configObj.d1_databases = [
|
|
250
|
+
...configObj.d1_databases ?? [],
|
|
251
|
+
{
|
|
252
|
+
binding: binding.name,
|
|
253
|
+
database_id: binding.id
|
|
254
|
+
}
|
|
255
|
+
];
|
|
256
|
+
}
|
|
257
|
+
break;
|
|
258
|
+
case "browser":
|
|
259
|
+
{
|
|
260
|
+
configObj.browser = {
|
|
261
|
+
binding: binding.name
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
break;
|
|
265
|
+
case "ai":
|
|
266
|
+
{
|
|
267
|
+
configObj.ai = {
|
|
268
|
+
binding: binding.name
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
break;
|
|
272
|
+
case "images":
|
|
273
|
+
{
|
|
274
|
+
configObj.images = {
|
|
275
|
+
binding: binding.name
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
break;
|
|
279
|
+
case "media":
|
|
280
|
+
{
|
|
281
|
+
configObj.media = {
|
|
282
|
+
binding: binding.name
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
break;
|
|
286
|
+
case "r2_bucket":
|
|
287
|
+
{
|
|
288
|
+
configObj.r2_buckets = [
|
|
289
|
+
...configObj.r2_buckets ?? [],
|
|
290
|
+
{
|
|
291
|
+
binding: binding.name,
|
|
292
|
+
bucket_name: binding.bucket_name,
|
|
293
|
+
jurisdiction: binding.jurisdiction
|
|
294
|
+
}
|
|
295
|
+
];
|
|
296
|
+
}
|
|
297
|
+
break;
|
|
298
|
+
case "secrets_store_secret":
|
|
299
|
+
{
|
|
300
|
+
configObj.secrets_store_secrets = [
|
|
301
|
+
...configObj.secrets_store_secrets ?? [],
|
|
302
|
+
{
|
|
303
|
+
binding: binding.name,
|
|
304
|
+
store_id: binding.store_id,
|
|
305
|
+
secret_name: binding.secret_name
|
|
306
|
+
}
|
|
307
|
+
];
|
|
308
|
+
}
|
|
309
|
+
break;
|
|
310
|
+
case "unsafe_hello_world": {
|
|
311
|
+
configObj.unsafe_hello_world = [
|
|
312
|
+
...configObj.unsafe_hello_world ?? [],
|
|
313
|
+
{
|
|
314
|
+
binding: binding.name,
|
|
315
|
+
enable_timer: binding.enable_timer
|
|
316
|
+
}
|
|
317
|
+
];
|
|
318
|
+
break;
|
|
319
|
+
}
|
|
320
|
+
case "service":
|
|
321
|
+
{
|
|
322
|
+
configObj.services = [
|
|
323
|
+
...configObj.services ?? [],
|
|
324
|
+
{
|
|
325
|
+
binding: binding.name,
|
|
326
|
+
service: binding.service,
|
|
327
|
+
environment: binding.environment,
|
|
328
|
+
entrypoint: binding.entrypoint
|
|
329
|
+
}
|
|
330
|
+
];
|
|
331
|
+
}
|
|
332
|
+
break;
|
|
333
|
+
case "analytics_engine":
|
|
334
|
+
{
|
|
335
|
+
configObj.analytics_engine_datasets = [
|
|
336
|
+
...configObj.analytics_engine_datasets ?? [],
|
|
337
|
+
{ binding: binding.name, dataset: binding.dataset }
|
|
338
|
+
];
|
|
339
|
+
}
|
|
340
|
+
break;
|
|
341
|
+
case "dispatch_namespace":
|
|
342
|
+
{
|
|
343
|
+
configObj.dispatch_namespaces = [
|
|
344
|
+
...configObj.dispatch_namespaces ?? [],
|
|
345
|
+
{
|
|
346
|
+
binding: binding.name,
|
|
347
|
+
namespace: binding.namespace,
|
|
348
|
+
...binding.outbound && {
|
|
349
|
+
outbound: {
|
|
350
|
+
service: binding.outbound.worker.service,
|
|
351
|
+
environment: binding.outbound.worker.environment,
|
|
352
|
+
parameters: binding.outbound.params?.map((p7) => p7.name) ?? []
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
];
|
|
357
|
+
}
|
|
358
|
+
break;
|
|
359
|
+
case "logfwdr":
|
|
360
|
+
{
|
|
361
|
+
configObj.logfwdr = {
|
|
362
|
+
bindings: [
|
|
363
|
+
...configObj.logfwdr?.bindings ?? [],
|
|
364
|
+
{ name: binding.name, destination: binding.destination }
|
|
365
|
+
]
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
break;
|
|
369
|
+
case "wasm_module":
|
|
370
|
+
{
|
|
371
|
+
configObj.wasm_modules = {
|
|
372
|
+
...configObj.wasm_modules ?? {},
|
|
373
|
+
[binding.name]: binding.part
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
break;
|
|
377
|
+
case "text_blob":
|
|
378
|
+
{
|
|
379
|
+
configObj.text_blobs = {
|
|
380
|
+
...configObj.text_blobs ?? {},
|
|
381
|
+
[binding.name]: binding.part
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
break;
|
|
385
|
+
case "data_blob":
|
|
386
|
+
{
|
|
387
|
+
configObj.data_blobs = {
|
|
388
|
+
...configObj.data_blobs ?? {},
|
|
389
|
+
[binding.name]: binding.part
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
break;
|
|
393
|
+
case "secret_text":
|
|
394
|
+
break;
|
|
395
|
+
case "version_metadata": {
|
|
396
|
+
{
|
|
397
|
+
configObj.version_metadata = {
|
|
398
|
+
binding: binding.name
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
break;
|
|
402
|
+
}
|
|
403
|
+
case "send_email": {
|
|
404
|
+
configObj.send_email = [
|
|
405
|
+
...configObj.send_email ?? [],
|
|
406
|
+
{
|
|
407
|
+
name: binding.name,
|
|
408
|
+
destination_address: binding.destination_address,
|
|
409
|
+
allowed_destination_addresses: binding.allowed_destination_addresses,
|
|
410
|
+
allowed_sender_addresses: binding.allowed_sender_addresses
|
|
411
|
+
}
|
|
412
|
+
];
|
|
413
|
+
break;
|
|
414
|
+
}
|
|
415
|
+
case "queue":
|
|
416
|
+
configObj.queues ??= { producers: [] };
|
|
417
|
+
configObj.queues.producers = [
|
|
418
|
+
...configObj.queues.producers ?? [],
|
|
419
|
+
{
|
|
420
|
+
binding: binding.name,
|
|
421
|
+
queue: binding.queue_name,
|
|
422
|
+
delivery_delay: binding.delivery_delay
|
|
423
|
+
}
|
|
424
|
+
];
|
|
425
|
+
break;
|
|
426
|
+
case "vectorize":
|
|
427
|
+
configObj.vectorize = [
|
|
428
|
+
...configObj.vectorize ?? [],
|
|
429
|
+
{
|
|
430
|
+
binding: binding.name,
|
|
431
|
+
index_name: binding.index_name
|
|
432
|
+
}
|
|
433
|
+
];
|
|
434
|
+
break;
|
|
435
|
+
case "hyperdrive":
|
|
436
|
+
configObj.hyperdrive = [
|
|
437
|
+
...configObj.hyperdrive ?? [],
|
|
438
|
+
{
|
|
439
|
+
binding: binding.name,
|
|
440
|
+
id: binding.id
|
|
441
|
+
}
|
|
442
|
+
];
|
|
443
|
+
break;
|
|
444
|
+
case "mtls_certificate":
|
|
445
|
+
configObj.mtls_certificates = [
|
|
446
|
+
...configObj.mtls_certificates ?? [],
|
|
447
|
+
{
|
|
448
|
+
binding: binding.name,
|
|
449
|
+
certificate_id: binding.certificate_id
|
|
450
|
+
}
|
|
451
|
+
];
|
|
452
|
+
break;
|
|
453
|
+
case "pipelines":
|
|
454
|
+
configObj.pipelines = [
|
|
455
|
+
...configObj.pipelines ?? [],
|
|
456
|
+
{
|
|
457
|
+
binding: binding.name,
|
|
458
|
+
pipeline: binding.pipeline
|
|
459
|
+
}
|
|
460
|
+
];
|
|
461
|
+
break;
|
|
462
|
+
case "assets":
|
|
463
|
+
throw new FatalError(
|
|
464
|
+
"`wrangler init --from-dash` is not yet supported for Workers with Assets"
|
|
465
|
+
);
|
|
466
|
+
case "inherit":
|
|
467
|
+
configObj.unsafe = {
|
|
468
|
+
bindings: [...configObj.unsafe?.bindings ?? [], binding],
|
|
469
|
+
metadata: configObj.unsafe?.metadata ?? void 0
|
|
470
|
+
};
|
|
471
|
+
break;
|
|
472
|
+
case "workflow":
|
|
473
|
+
{
|
|
474
|
+
configObj.workflows = [
|
|
475
|
+
...configObj.workflows ?? [],
|
|
476
|
+
{
|
|
477
|
+
binding: binding.name,
|
|
478
|
+
name: binding.workflow_name,
|
|
479
|
+
class_name: binding.class_name,
|
|
480
|
+
script_name: binding.script_name
|
|
481
|
+
}
|
|
482
|
+
];
|
|
483
|
+
}
|
|
484
|
+
break;
|
|
485
|
+
case "worker_loader":
|
|
486
|
+
{
|
|
487
|
+
configObj.worker_loaders = [
|
|
488
|
+
...configObj.worker_loaders ?? [],
|
|
489
|
+
{
|
|
490
|
+
binding: binding.name
|
|
491
|
+
}
|
|
492
|
+
];
|
|
493
|
+
}
|
|
494
|
+
break;
|
|
495
|
+
case "ratelimit":
|
|
496
|
+
{
|
|
497
|
+
configObj.ratelimits = [
|
|
498
|
+
...configObj.ratelimits ?? [],
|
|
499
|
+
{
|
|
500
|
+
name: binding.name,
|
|
501
|
+
namespace_id: binding.namespace_id,
|
|
502
|
+
simple: {
|
|
503
|
+
limit: binding.simple.limit,
|
|
504
|
+
period: binding.simple.period
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
];
|
|
508
|
+
}
|
|
509
|
+
break;
|
|
510
|
+
case "vpc_service":
|
|
511
|
+
{
|
|
512
|
+
configObj.vpc_services = [
|
|
513
|
+
...configObj.vpc_services ?? [],
|
|
514
|
+
{
|
|
515
|
+
binding: binding.name,
|
|
516
|
+
service_id: binding.service_id
|
|
517
|
+
}
|
|
518
|
+
];
|
|
519
|
+
}
|
|
520
|
+
break;
|
|
521
|
+
default: {
|
|
522
|
+
configObj.unsafe = {
|
|
523
|
+
bindings: [...configObj.unsafe?.bindings ?? [], binding],
|
|
524
|
+
metadata: configObj.unsafe?.metadata ?? void 0
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
return configObj;
|
|
529
|
+
}, {});
|
|
530
|
+
}
|
|
531
|
+
function convertWorkerToWranglerConfig(config) {
|
|
532
|
+
const mappedBindings = mapWorkerMetadataBindings(config.bindings);
|
|
533
|
+
const durableObjectClassNames = config.bindings.filter(
|
|
534
|
+
(binding) => binding.type === "durable_object_namespace" && binding.script_name === config.name
|
|
535
|
+
).map(
|
|
536
|
+
(durableObject) => durableObject.class_name
|
|
537
|
+
);
|
|
538
|
+
const allRoutes = [
|
|
539
|
+
...config.routes.map((r8) => ({
|
|
540
|
+
pattern: r8.pattern,
|
|
541
|
+
zone_name: r8.zone_name
|
|
542
|
+
})),
|
|
543
|
+
...config.domains.map((c7) => ({
|
|
544
|
+
pattern: c7.hostname,
|
|
545
|
+
zone_name: c7.zone_name,
|
|
546
|
+
custom_domain: true
|
|
547
|
+
}))
|
|
548
|
+
];
|
|
549
|
+
return {
|
|
550
|
+
name: config.name,
|
|
551
|
+
main: config.entrypoint,
|
|
552
|
+
workers_dev: config.subdomain.enabled,
|
|
553
|
+
preview_urls: config.subdomain.previews_enabled,
|
|
554
|
+
compatibility_date: config.compatibility_date ?? formatCompatibilityDate(/* @__PURE__ */ new Date()),
|
|
555
|
+
compatibility_flags: config.compatibility_flags,
|
|
556
|
+
...allRoutes.length ? { routes: allRoutes } : {},
|
|
557
|
+
placement: config.placement?.mode === "smart" ? { mode: "smart" } : void 0,
|
|
558
|
+
limits: config.limits,
|
|
559
|
+
...durableObjectClassNames.length && config.migration_tag ? {
|
|
560
|
+
migrations: [
|
|
561
|
+
{
|
|
562
|
+
tag: config.migration_tag,
|
|
563
|
+
new_classes: durableObjectClassNames
|
|
564
|
+
}
|
|
565
|
+
]
|
|
566
|
+
} : {},
|
|
567
|
+
...config.schedules.length ? {
|
|
568
|
+
triggers: {
|
|
569
|
+
crons: config.schedules.map((scheduled) => scheduled.cron)
|
|
570
|
+
}
|
|
571
|
+
} : {},
|
|
572
|
+
tail_consumers: config.tail_consumers,
|
|
573
|
+
observability: config.observability,
|
|
574
|
+
...mappedBindings
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
function constructWranglerConfig(workerOrWorkers) {
|
|
578
|
+
let workers;
|
|
579
|
+
if (Array.isArray(workerOrWorkers)) {
|
|
580
|
+
workers = workerOrWorkers;
|
|
581
|
+
} else {
|
|
582
|
+
workers = [workerOrWorkers];
|
|
583
|
+
}
|
|
584
|
+
const topLevelEnv = workers.find(
|
|
585
|
+
(w7) => !w7.tags?.some((t8) => t8.startsWith(ENVIRONMENT_TAG_PREFIX))
|
|
586
|
+
);
|
|
587
|
+
const workerName = topLevelEnv?.name ?? workers[0].name;
|
|
588
|
+
const entrypoint = topLevelEnv?.entrypoint ?? workers[0].entrypoint;
|
|
589
|
+
let combinedConfig;
|
|
590
|
+
if (topLevelEnv) {
|
|
591
|
+
combinedConfig = convertWorkerToWranglerConfig(topLevelEnv);
|
|
592
|
+
} else {
|
|
593
|
+
combinedConfig = {
|
|
594
|
+
name: workerName,
|
|
595
|
+
main: entrypoint
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
for (const env6 of workers) {
|
|
599
|
+
const serviceTag = env6.tags?.find(
|
|
600
|
+
(t8) => t8 === `${SERVICE_TAG_PREFIX}${workerName}`
|
|
601
|
+
);
|
|
602
|
+
const envTag = env6.tags?.find((t8) => t8.startsWith(ENVIRONMENT_TAG_PREFIX));
|
|
603
|
+
if (serviceTag !== `${SERVICE_TAG_PREFIX}${workerName}` || envTag === void 0) {
|
|
604
|
+
continue;
|
|
605
|
+
}
|
|
606
|
+
const [_5, envName] = envTag.split("=");
|
|
607
|
+
combinedConfig.env ??= {};
|
|
608
|
+
combinedConfig.env[envName] = convertWorkerToWranglerConfig(env6);
|
|
609
|
+
}
|
|
610
|
+
return combinedConfig;
|
|
611
|
+
}
|
|
612
|
+
var __create2, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __getProtoOf2, __hasOwnProp2, __name2, __require2, __commonJS2, __copyProps2, __toESM2, INHERIT_SYMBOL, SERVICE_TAG_PREFIX, ENVIRONMENT_TAG_PREFIX, PATH_TO_DEPLOY_CONFIG, UserError, FatalError, CommandLineArgsError, JsonFriendlyFatalError, MissingConfigError;
|
|
613
|
+
var init_chunk_LFBFF6MG = __esm({
|
|
614
|
+
"../workers-utils/dist/chunk-LFBFF6MG.mjs"() {
|
|
615
|
+
init_import_meta_url();
|
|
616
|
+
__create2 = Object.create;
|
|
617
|
+
__defProp2 = Object.defineProperty;
|
|
618
|
+
__getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
619
|
+
__getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
620
|
+
__getProtoOf2 = Object.getPrototypeOf;
|
|
621
|
+
__hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
622
|
+
__name2 = /* @__PURE__ */ __name((target, value) => __defProp2(target, "name", { value, configurable: true }), "__name");
|
|
623
|
+
__require2 = /* @__PURE__ */ ((x7) => typeof __require !== "undefined" ? __require : typeof Proxy !== "undefined" ? new Proxy(x7, {
|
|
624
|
+
get: /* @__PURE__ */ __name((a6, b7) => (typeof __require !== "undefined" ? __require : a6)[b7], "get")
|
|
625
|
+
}) : x7)(function(x7) {
|
|
626
|
+
if (typeof __require !== "undefined") return __require.apply(this, arguments);
|
|
627
|
+
throw Error('Dynamic require of "' + x7 + '" is not supported');
|
|
628
|
+
});
|
|
629
|
+
__commonJS2 = /* @__PURE__ */ __name((cb2, mod) => /* @__PURE__ */ __name(function __require22() {
|
|
630
|
+
return mod || (0, cb2[__getOwnPropNames2(cb2)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
631
|
+
}, "__require2"), "__commonJS");
|
|
632
|
+
__copyProps2 = /* @__PURE__ */ __name((to, from, except, desc) => {
|
|
633
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
634
|
+
for (let key of __getOwnPropNames2(from))
|
|
635
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
636
|
+
__defProp2(to, key, { get: /* @__PURE__ */ __name(() => from[key], "get"), enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
637
|
+
}
|
|
638
|
+
return to;
|
|
639
|
+
}, "__copyProps");
|
|
640
|
+
__toESM2 = /* @__PURE__ */ __name((mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
641
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
642
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
643
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
644
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
645
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
646
|
+
mod
|
|
647
|
+
)), "__toESM");
|
|
648
|
+
INHERIT_SYMBOL = Symbol.for("inherit_binding");
|
|
649
|
+
SERVICE_TAG_PREFIX = "cf:service=";
|
|
650
|
+
ENVIRONMENT_TAG_PREFIX = "cf:environment=";
|
|
651
|
+
PATH_TO_DEPLOY_CONFIG = ".wrangler/deploy/config.json";
|
|
652
|
+
__name(formatCompatibilityDate, "formatCompatibilityDate");
|
|
653
|
+
__name2(formatCompatibilityDate, "formatCompatibilityDate");
|
|
654
|
+
__name(assertNever, "assertNever");
|
|
655
|
+
__name2(assertNever, "assertNever");
|
|
656
|
+
UserError = class extends Error {
|
|
657
|
+
static {
|
|
658
|
+
__name(this, "UserError");
|
|
659
|
+
}
|
|
660
|
+
static {
|
|
661
|
+
__name2(this, "UserError");
|
|
662
|
+
}
|
|
663
|
+
telemetryMessage;
|
|
664
|
+
constructor(message, options) {
|
|
665
|
+
super(message, options);
|
|
666
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
667
|
+
this.telemetryMessage = options?.telemetryMessage === true ? message : options?.telemetryMessage;
|
|
668
|
+
}
|
|
669
|
+
};
|
|
670
|
+
(class extends UserError {
|
|
671
|
+
static {
|
|
672
|
+
__name(this, "DeprecationError");
|
|
673
|
+
}
|
|
674
|
+
static {
|
|
675
|
+
__name2(this, "DeprecationError");
|
|
676
|
+
}
|
|
677
|
+
constructor(message, options) {
|
|
678
|
+
super(`Deprecation:
|
|
679
|
+
${message}`, options);
|
|
680
|
+
}
|
|
681
|
+
});
|
|
682
|
+
FatalError = class extends UserError {
|
|
683
|
+
static {
|
|
684
|
+
__name(this, "FatalError");
|
|
685
|
+
}
|
|
686
|
+
constructor(message, code, options) {
|
|
687
|
+
super(message, options);
|
|
688
|
+
this.code = code;
|
|
689
|
+
}
|
|
690
|
+
static {
|
|
691
|
+
__name2(this, "FatalError");
|
|
692
|
+
}
|
|
693
|
+
};
|
|
694
|
+
CommandLineArgsError = class extends UserError {
|
|
695
|
+
static {
|
|
696
|
+
__name(this, "CommandLineArgsError");
|
|
697
|
+
}
|
|
698
|
+
static {
|
|
699
|
+
__name2(this, "CommandLineArgsError");
|
|
700
|
+
}
|
|
701
|
+
};
|
|
702
|
+
JsonFriendlyFatalError = class extends FatalError {
|
|
703
|
+
static {
|
|
704
|
+
__name(this, "JsonFriendlyFatalError");
|
|
705
|
+
}
|
|
706
|
+
constructor(message, code, options) {
|
|
707
|
+
super(message, code, options);
|
|
708
|
+
this.code = code;
|
|
709
|
+
}
|
|
710
|
+
static {
|
|
711
|
+
__name2(this, "JsonFriendlyFatalError");
|
|
712
|
+
}
|
|
713
|
+
};
|
|
714
|
+
MissingConfigError = class extends Error {
|
|
715
|
+
static {
|
|
716
|
+
__name(this, "MissingConfigError");
|
|
717
|
+
}
|
|
718
|
+
static {
|
|
719
|
+
__name2(this, "MissingConfigError");
|
|
720
|
+
}
|
|
721
|
+
telemetryMessage;
|
|
722
|
+
constructor(key) {
|
|
723
|
+
super(`Missing config value for ${key}`);
|
|
724
|
+
this.telemetryMessage = `Missing config value for ${key}`;
|
|
725
|
+
}
|
|
726
|
+
};
|
|
727
|
+
__name(createFatalError, "createFatalError");
|
|
728
|
+
__name2(createFatalError, "createFatalError");
|
|
729
|
+
__name(mapWorkerMetadataBindings, "mapWorkerMetadataBindings");
|
|
730
|
+
__name2(mapWorkerMetadataBindings, "mapWorkerMetadataBindings");
|
|
731
|
+
__name(convertWorkerToWranglerConfig, "convertWorkerToWranglerConfig");
|
|
732
|
+
__name2(convertWorkerToWranglerConfig, "convertWorkerToWranglerConfig");
|
|
733
|
+
__name(constructWranglerConfig, "constructWranglerConfig");
|
|
734
|
+
__name2(constructWranglerConfig, "constructWranglerConfig");
|
|
735
|
+
}
|
|
736
|
+
});
|
|
186
737
|
function createScanner(text, ignoreTrivia = false) {
|
|
187
738
|
const len = text.length;
|
|
188
739
|
let pos = 0, value = "", tokenOffset = 0, token = 16, lineNumber = 0, lineStartOffset = 0, tokenLineStartOffset = 0, prevTokenLineStartOffset = 0, scanError = 0;
|
|
@@ -1435,17 +1986,6 @@ function applyEdits(text, edits) {
|
|
|
1435
1986
|
}
|
|
1436
1987
|
return text;
|
|
1437
1988
|
}
|
|
1438
|
-
function createFatalError(message, isJson, code, telemetryMessage) {
|
|
1439
|
-
if (isJson) {
|
|
1440
|
-
return new JsonFriendlyFatalError(
|
|
1441
|
-
JSON.stringify(message),
|
|
1442
|
-
code,
|
|
1443
|
-
telemetryMessage
|
|
1444
|
-
);
|
|
1445
|
-
} else {
|
|
1446
|
-
return new FatalError(`${message}`, code, telemetryMessage);
|
|
1447
|
-
}
|
|
1448
|
-
}
|
|
1449
1989
|
function parseTOML(input, file) {
|
|
1450
1990
|
try {
|
|
1451
1991
|
const normalizedInput = input.replace(/\r\n/g, "\n");
|
|
@@ -2028,7 +2568,7 @@ function normalizeAndValidateConfig(rawConfig, configPath, userConfigPath, args,
|
|
|
2028
2568
|
);
|
|
2029
2569
|
}
|
|
2030
2570
|
const envName = args.env;
|
|
2031
|
-
|
|
2571
|
+
assert41__default.default(envName === void 0 || typeof envName === "string");
|
|
2032
2572
|
let activeEnv = topLevelEnv;
|
|
2033
2573
|
if (envName) {
|
|
2034
2574
|
if (isRedirectedConfig) {
|
|
@@ -2231,21 +2771,21 @@ function normalizeAndValidatePagesBuildOutputDir(configPath, rawPagesDir) {
|
|
|
2231
2771
|
}
|
|
2232
2772
|
}
|
|
2233
2773
|
function normalizeAndValidateDev(diagnostics, rawDev, args) {
|
|
2234
|
-
|
|
2774
|
+
assert41__default.default(typeof args === "object" && args !== null && !Array.isArray(args));
|
|
2235
2775
|
const {
|
|
2236
2776
|
localProtocol: localProtocolArg,
|
|
2237
2777
|
upstreamProtocol: upstreamProtocolArg,
|
|
2238
2778
|
remote: remoteArg,
|
|
2239
2779
|
enableContainers: enableContainersArg
|
|
2240
2780
|
} = args;
|
|
2241
|
-
|
|
2781
|
+
assert41__default.default(
|
|
2242
2782
|
localProtocolArg === void 0 || localProtocolArg === "http" || localProtocolArg === "https"
|
|
2243
2783
|
);
|
|
2244
|
-
|
|
2784
|
+
assert41__default.default(
|
|
2245
2785
|
upstreamProtocolArg === void 0 || upstreamProtocolArg === "http" || upstreamProtocolArg === "https"
|
|
2246
2786
|
);
|
|
2247
|
-
|
|
2248
|
-
|
|
2787
|
+
assert41__default.default(remoteArg === void 0 || typeof remoteArg === "boolean");
|
|
2788
|
+
assert41__default.default(
|
|
2249
2789
|
enableContainersArg === void 0 || typeof enableContainersArg === "boolean"
|
|
2250
2790
|
);
|
|
2251
2791
|
const {
|
|
@@ -3638,470 +4178,12 @@ Pages requires Durable Object bindings to specify the name of the Worker where t
|
|
|
3638
4178
|
}
|
|
3639
4179
|
}
|
|
3640
4180
|
}
|
|
3641
|
-
|
|
3642
|
-
}
|
|
3643
|
-
function formatCompatibilityDate(date) {
|
|
3644
|
-
return date.toISOString().slice(0, 10);
|
|
3645
|
-
}
|
|
3646
|
-
function mapWorkerMetadataBindings(bindings) {
|
|
3647
|
-
return bindings.filter((binding) => binding.type !== "secret_text").reduce((configObj, binding) => {
|
|
3648
|
-
switch (binding.type) {
|
|
3649
|
-
case "plain_text":
|
|
3650
|
-
{
|
|
3651
|
-
configObj.vars = {
|
|
3652
|
-
...configObj.vars ?? {},
|
|
3653
|
-
[binding.name]: binding.text
|
|
3654
|
-
};
|
|
3655
|
-
}
|
|
3656
|
-
break;
|
|
3657
|
-
case "json":
|
|
3658
|
-
{
|
|
3659
|
-
configObj.vars = {
|
|
3660
|
-
...configObj.vars ?? {},
|
|
3661
|
-
name: binding.name,
|
|
3662
|
-
json: binding.json
|
|
3663
|
-
};
|
|
3664
|
-
}
|
|
3665
|
-
break;
|
|
3666
|
-
case "kv_namespace":
|
|
3667
|
-
{
|
|
3668
|
-
configObj.kv_namespaces = [
|
|
3669
|
-
...configObj.kv_namespaces ?? [],
|
|
3670
|
-
{ id: binding.namespace_id, binding: binding.name }
|
|
3671
|
-
];
|
|
3672
|
-
}
|
|
3673
|
-
break;
|
|
3674
|
-
case "durable_object_namespace":
|
|
3675
|
-
{
|
|
3676
|
-
configObj.durable_objects = {
|
|
3677
|
-
bindings: [
|
|
3678
|
-
...configObj.durable_objects?.bindings ?? [],
|
|
3679
|
-
{
|
|
3680
|
-
name: binding.name,
|
|
3681
|
-
class_name: binding.class_name,
|
|
3682
|
-
script_name: binding.script_name,
|
|
3683
|
-
environment: binding.environment
|
|
3684
|
-
}
|
|
3685
|
-
]
|
|
3686
|
-
};
|
|
3687
|
-
}
|
|
3688
|
-
break;
|
|
3689
|
-
case "d1":
|
|
3690
|
-
{
|
|
3691
|
-
configObj.d1_databases = [
|
|
3692
|
-
...configObj.d1_databases ?? [],
|
|
3693
|
-
{
|
|
3694
|
-
binding: binding.name,
|
|
3695
|
-
database_id: binding.id
|
|
3696
|
-
}
|
|
3697
|
-
];
|
|
3698
|
-
}
|
|
3699
|
-
break;
|
|
3700
|
-
case "browser":
|
|
3701
|
-
{
|
|
3702
|
-
configObj.browser = {
|
|
3703
|
-
binding: binding.name
|
|
3704
|
-
};
|
|
3705
|
-
}
|
|
3706
|
-
break;
|
|
3707
|
-
case "ai":
|
|
3708
|
-
{
|
|
3709
|
-
configObj.ai = {
|
|
3710
|
-
binding: binding.name
|
|
3711
|
-
};
|
|
3712
|
-
}
|
|
3713
|
-
break;
|
|
3714
|
-
case "images":
|
|
3715
|
-
{
|
|
3716
|
-
configObj.images = {
|
|
3717
|
-
binding: binding.name
|
|
3718
|
-
};
|
|
3719
|
-
}
|
|
3720
|
-
break;
|
|
3721
|
-
case "media":
|
|
3722
|
-
{
|
|
3723
|
-
configObj.media = {
|
|
3724
|
-
binding: binding.name
|
|
3725
|
-
};
|
|
3726
|
-
}
|
|
3727
|
-
break;
|
|
3728
|
-
case "r2_bucket":
|
|
3729
|
-
{
|
|
3730
|
-
configObj.r2_buckets = [
|
|
3731
|
-
...configObj.r2_buckets ?? [],
|
|
3732
|
-
{
|
|
3733
|
-
binding: binding.name,
|
|
3734
|
-
bucket_name: binding.bucket_name,
|
|
3735
|
-
jurisdiction: binding.jurisdiction
|
|
3736
|
-
}
|
|
3737
|
-
];
|
|
3738
|
-
}
|
|
3739
|
-
break;
|
|
3740
|
-
case "secrets_store_secret":
|
|
3741
|
-
{
|
|
3742
|
-
configObj.secrets_store_secrets = [
|
|
3743
|
-
...configObj.secrets_store_secrets ?? [],
|
|
3744
|
-
{
|
|
3745
|
-
binding: binding.name,
|
|
3746
|
-
store_id: binding.store_id,
|
|
3747
|
-
secret_name: binding.secret_name
|
|
3748
|
-
}
|
|
3749
|
-
];
|
|
3750
|
-
}
|
|
3751
|
-
break;
|
|
3752
|
-
case "unsafe_hello_world": {
|
|
3753
|
-
configObj.unsafe_hello_world = [
|
|
3754
|
-
...configObj.unsafe_hello_world ?? [],
|
|
3755
|
-
{
|
|
3756
|
-
binding: binding.name,
|
|
3757
|
-
enable_timer: binding.enable_timer
|
|
3758
|
-
}
|
|
3759
|
-
];
|
|
3760
|
-
break;
|
|
3761
|
-
}
|
|
3762
|
-
case "service":
|
|
3763
|
-
{
|
|
3764
|
-
configObj.services = [
|
|
3765
|
-
...configObj.services ?? [],
|
|
3766
|
-
{
|
|
3767
|
-
binding: binding.name,
|
|
3768
|
-
service: binding.service,
|
|
3769
|
-
environment: binding.environment,
|
|
3770
|
-
entrypoint: binding.entrypoint
|
|
3771
|
-
}
|
|
3772
|
-
];
|
|
3773
|
-
}
|
|
3774
|
-
break;
|
|
3775
|
-
case "analytics_engine":
|
|
3776
|
-
{
|
|
3777
|
-
configObj.analytics_engine_datasets = [
|
|
3778
|
-
...configObj.analytics_engine_datasets ?? [],
|
|
3779
|
-
{ binding: binding.name, dataset: binding.dataset }
|
|
3780
|
-
];
|
|
3781
|
-
}
|
|
3782
|
-
break;
|
|
3783
|
-
case "dispatch_namespace":
|
|
3784
|
-
{
|
|
3785
|
-
configObj.dispatch_namespaces = [
|
|
3786
|
-
...configObj.dispatch_namespaces ?? [],
|
|
3787
|
-
{
|
|
3788
|
-
binding: binding.name,
|
|
3789
|
-
namespace: binding.namespace,
|
|
3790
|
-
...binding.outbound && {
|
|
3791
|
-
outbound: {
|
|
3792
|
-
service: binding.outbound.worker.service,
|
|
3793
|
-
environment: binding.outbound.worker.environment,
|
|
3794
|
-
parameters: binding.outbound.params?.map((p7) => p7.name) ?? []
|
|
3795
|
-
}
|
|
3796
|
-
}
|
|
3797
|
-
}
|
|
3798
|
-
];
|
|
3799
|
-
}
|
|
3800
|
-
break;
|
|
3801
|
-
case "logfwdr":
|
|
3802
|
-
{
|
|
3803
|
-
configObj.logfwdr = {
|
|
3804
|
-
bindings: [
|
|
3805
|
-
...configObj.logfwdr?.bindings ?? [],
|
|
3806
|
-
{ name: binding.name, destination: binding.destination }
|
|
3807
|
-
]
|
|
3808
|
-
};
|
|
3809
|
-
}
|
|
3810
|
-
break;
|
|
3811
|
-
case "wasm_module":
|
|
3812
|
-
{
|
|
3813
|
-
configObj.wasm_modules = {
|
|
3814
|
-
...configObj.wasm_modules ?? {},
|
|
3815
|
-
[binding.name]: binding.part
|
|
3816
|
-
};
|
|
3817
|
-
}
|
|
3818
|
-
break;
|
|
3819
|
-
case "text_blob":
|
|
3820
|
-
{
|
|
3821
|
-
configObj.text_blobs = {
|
|
3822
|
-
...configObj.text_blobs ?? {},
|
|
3823
|
-
[binding.name]: binding.part
|
|
3824
|
-
};
|
|
3825
|
-
}
|
|
3826
|
-
break;
|
|
3827
|
-
case "data_blob":
|
|
3828
|
-
{
|
|
3829
|
-
configObj.data_blobs = {
|
|
3830
|
-
...configObj.data_blobs ?? {},
|
|
3831
|
-
[binding.name]: binding.part
|
|
3832
|
-
};
|
|
3833
|
-
}
|
|
3834
|
-
break;
|
|
3835
|
-
case "secret_text":
|
|
3836
|
-
break;
|
|
3837
|
-
case "version_metadata": {
|
|
3838
|
-
{
|
|
3839
|
-
configObj.version_metadata = {
|
|
3840
|
-
binding: binding.name
|
|
3841
|
-
};
|
|
3842
|
-
}
|
|
3843
|
-
break;
|
|
3844
|
-
}
|
|
3845
|
-
case "send_email": {
|
|
3846
|
-
configObj.send_email = [
|
|
3847
|
-
...configObj.send_email ?? [],
|
|
3848
|
-
{
|
|
3849
|
-
name: binding.name,
|
|
3850
|
-
destination_address: binding.destination_address,
|
|
3851
|
-
allowed_destination_addresses: binding.allowed_destination_addresses,
|
|
3852
|
-
allowed_sender_addresses: binding.allowed_sender_addresses
|
|
3853
|
-
}
|
|
3854
|
-
];
|
|
3855
|
-
break;
|
|
3856
|
-
}
|
|
3857
|
-
case "queue":
|
|
3858
|
-
configObj.queues ??= { producers: [] };
|
|
3859
|
-
configObj.queues.producers = [
|
|
3860
|
-
...configObj.queues.producers ?? [],
|
|
3861
|
-
{
|
|
3862
|
-
binding: binding.name,
|
|
3863
|
-
queue: binding.queue_name,
|
|
3864
|
-
delivery_delay: binding.delivery_delay
|
|
3865
|
-
}
|
|
3866
|
-
];
|
|
3867
|
-
break;
|
|
3868
|
-
case "vectorize":
|
|
3869
|
-
configObj.vectorize = [
|
|
3870
|
-
...configObj.vectorize ?? [],
|
|
3871
|
-
{
|
|
3872
|
-
binding: binding.name,
|
|
3873
|
-
index_name: binding.index_name
|
|
3874
|
-
}
|
|
3875
|
-
];
|
|
3876
|
-
break;
|
|
3877
|
-
case "hyperdrive":
|
|
3878
|
-
configObj.hyperdrive = [
|
|
3879
|
-
...configObj.hyperdrive ?? [],
|
|
3880
|
-
{
|
|
3881
|
-
binding: binding.name,
|
|
3882
|
-
id: binding.id
|
|
3883
|
-
}
|
|
3884
|
-
];
|
|
3885
|
-
break;
|
|
3886
|
-
case "mtls_certificate":
|
|
3887
|
-
configObj.mtls_certificates = [
|
|
3888
|
-
...configObj.mtls_certificates ?? [],
|
|
3889
|
-
{
|
|
3890
|
-
binding: binding.name,
|
|
3891
|
-
certificate_id: binding.certificate_id
|
|
3892
|
-
}
|
|
3893
|
-
];
|
|
3894
|
-
break;
|
|
3895
|
-
case "pipelines":
|
|
3896
|
-
configObj.pipelines = [
|
|
3897
|
-
...configObj.pipelines ?? [],
|
|
3898
|
-
{
|
|
3899
|
-
binding: binding.name,
|
|
3900
|
-
pipeline: binding.pipeline
|
|
3901
|
-
}
|
|
3902
|
-
];
|
|
3903
|
-
break;
|
|
3904
|
-
case "assets":
|
|
3905
|
-
throw new FatalError(
|
|
3906
|
-
"`wrangler init --from-dash` is not yet supported for Workers with Assets"
|
|
3907
|
-
);
|
|
3908
|
-
case "inherit":
|
|
3909
|
-
configObj.unsafe = {
|
|
3910
|
-
bindings: [...configObj.unsafe?.bindings ?? [], binding],
|
|
3911
|
-
metadata: configObj.unsafe?.metadata ?? void 0
|
|
3912
|
-
};
|
|
3913
|
-
break;
|
|
3914
|
-
case "workflow":
|
|
3915
|
-
{
|
|
3916
|
-
configObj.workflows = [
|
|
3917
|
-
...configObj.workflows ?? [],
|
|
3918
|
-
{
|
|
3919
|
-
binding: binding.name,
|
|
3920
|
-
name: binding.workflow_name,
|
|
3921
|
-
class_name: binding.class_name,
|
|
3922
|
-
script_name: binding.script_name
|
|
3923
|
-
}
|
|
3924
|
-
];
|
|
3925
|
-
}
|
|
3926
|
-
break;
|
|
3927
|
-
case "worker_loader":
|
|
3928
|
-
{
|
|
3929
|
-
configObj.worker_loaders = [
|
|
3930
|
-
...configObj.worker_loaders ?? [],
|
|
3931
|
-
{
|
|
3932
|
-
binding: binding.name
|
|
3933
|
-
}
|
|
3934
|
-
];
|
|
3935
|
-
}
|
|
3936
|
-
break;
|
|
3937
|
-
case "ratelimit":
|
|
3938
|
-
{
|
|
3939
|
-
configObj.ratelimits = [
|
|
3940
|
-
...configObj.ratelimits ?? [],
|
|
3941
|
-
{
|
|
3942
|
-
name: binding.name,
|
|
3943
|
-
namespace_id: binding.namespace_id,
|
|
3944
|
-
simple: {
|
|
3945
|
-
limit: binding.simple.limit,
|
|
3946
|
-
period: binding.simple.period
|
|
3947
|
-
}
|
|
3948
|
-
}
|
|
3949
|
-
];
|
|
3950
|
-
}
|
|
3951
|
-
break;
|
|
3952
|
-
case "vpc_service":
|
|
3953
|
-
{
|
|
3954
|
-
configObj.vpc_services = [
|
|
3955
|
-
...configObj.vpc_services ?? [],
|
|
3956
|
-
{
|
|
3957
|
-
binding: binding.name,
|
|
3958
|
-
service_id: binding.service_id
|
|
3959
|
-
}
|
|
3960
|
-
];
|
|
3961
|
-
}
|
|
3962
|
-
break;
|
|
3963
|
-
default: {
|
|
3964
|
-
configObj.unsafe = {
|
|
3965
|
-
bindings: [...configObj.unsafe?.bindings ?? [], binding],
|
|
3966
|
-
metadata: configObj.unsafe?.metadata ?? void 0
|
|
3967
|
-
};
|
|
3968
|
-
}
|
|
3969
|
-
}
|
|
3970
|
-
return configObj;
|
|
3971
|
-
}, {});
|
|
3972
|
-
}
|
|
3973
|
-
function convertWorkerToWranglerConfig(workerName, entrypoint, {
|
|
3974
|
-
bindings,
|
|
3975
|
-
routes,
|
|
3976
|
-
customDomains,
|
|
3977
|
-
subdomainStatus,
|
|
3978
|
-
serviceEnvMetadata,
|
|
3979
|
-
cronTriggers
|
|
3980
|
-
}) {
|
|
3981
|
-
const mappedBindings = mapWorkerMetadataBindings(bindings);
|
|
3982
|
-
const durableObjectClassNames = bindings.filter((binding) => binding.type === "durable_object_namespace").map(
|
|
3983
|
-
(durableObject) => durableObject.class_name
|
|
3984
|
-
);
|
|
3985
|
-
const allRoutes = [
|
|
3986
|
-
...routes.map((r8) => ({
|
|
3987
|
-
pattern: r8.pattern,
|
|
3988
|
-
zone_name: r8.zone_name
|
|
3989
|
-
})),
|
|
3990
|
-
...customDomains.map((c7) => ({
|
|
3991
|
-
pattern: c7.hostname,
|
|
3992
|
-
zone_name: c7.zone_name,
|
|
3993
|
-
custom_domain: true
|
|
3994
|
-
}))
|
|
3995
|
-
];
|
|
3996
|
-
return {
|
|
3997
|
-
name: workerName,
|
|
3998
|
-
main: entrypoint,
|
|
3999
|
-
workers_dev: subdomainStatus.enabled,
|
|
4000
|
-
preview_urls: subdomainStatus.previews_enabled,
|
|
4001
|
-
compatibility_date: serviceEnvMetadata.script.compatibility_date ?? formatCompatibilityDate(/* @__PURE__ */ new Date()),
|
|
4002
|
-
compatibility_flags: serviceEnvMetadata.script.compatibility_flags,
|
|
4003
|
-
...allRoutes.length ? { routes: allRoutes } : {},
|
|
4004
|
-
placement: serviceEnvMetadata.script.placement_mode === "smart" ? { mode: "smart" } : void 0,
|
|
4005
|
-
limits: serviceEnvMetadata.script.limits,
|
|
4006
|
-
...durableObjectClassNames.length ? {
|
|
4007
|
-
migrations: [
|
|
4008
|
-
{
|
|
4009
|
-
tag: serviceEnvMetadata.script.migration_tag,
|
|
4010
|
-
new_classes: durableObjectClassNames
|
|
4011
|
-
}
|
|
4012
|
-
]
|
|
4013
|
-
} : {},
|
|
4014
|
-
...cronTriggers.schedules.length ? {
|
|
4015
|
-
triggers: {
|
|
4016
|
-
crons: cronTriggers.schedules.map((scheduled) => scheduled.cron)
|
|
4017
|
-
}
|
|
4018
|
-
} : {},
|
|
4019
|
-
tail_consumers: serviceEnvMetadata.script.tail_consumers ?? void 0,
|
|
4020
|
-
observability: serviceEnvMetadata.script.observability,
|
|
4021
|
-
...mappedBindings
|
|
4022
|
-
};
|
|
4023
|
-
}
|
|
4024
|
-
function constructWranglerConfig(workerName, entrypoint, workerOrWorkers) {
|
|
4025
|
-
let workers;
|
|
4026
|
-
if (Array.isArray(workerOrWorkers)) {
|
|
4027
|
-
workers = workerOrWorkers;
|
|
4028
|
-
} else {
|
|
4029
|
-
workers = [workerOrWorkers];
|
|
4030
|
-
}
|
|
4031
|
-
const topLevelEnv = workers.find(
|
|
4032
|
-
(w7) => !w7.serviceEnvMetadata.script.tags?.some(
|
|
4033
|
-
(t8) => t8.startsWith(ENVIRONMENT_TAG_PREFIX)
|
|
4034
|
-
)
|
|
4035
|
-
);
|
|
4036
|
-
let combinedConfig;
|
|
4037
|
-
if (topLevelEnv) {
|
|
4038
|
-
combinedConfig = convertWorkerToWranglerConfig(
|
|
4039
|
-
workerName,
|
|
4040
|
-
entrypoint,
|
|
4041
|
-
topLevelEnv
|
|
4042
|
-
);
|
|
4043
|
-
} else {
|
|
4044
|
-
combinedConfig = {
|
|
4045
|
-
name: workerName,
|
|
4046
|
-
main: entrypoint
|
|
4047
|
-
};
|
|
4048
|
-
}
|
|
4049
|
-
for (const env6 of workers) {
|
|
4050
|
-
const serviceTag = env6.serviceEnvMetadata.script.tags?.find(
|
|
4051
|
-
(t8) => t8 === `${SERVICE_TAG_PREFIX}${workerName}`
|
|
4052
|
-
);
|
|
4053
|
-
const envTag = env6.serviceEnvMetadata.script.tags?.find(
|
|
4054
|
-
(t8) => t8.startsWith(ENVIRONMENT_TAG_PREFIX)
|
|
4055
|
-
);
|
|
4056
|
-
if (serviceTag !== workerName || envTag === void 0) {
|
|
4057
|
-
continue;
|
|
4058
|
-
}
|
|
4059
|
-
const [_5, envName] = envTag.split("=");
|
|
4060
|
-
combinedConfig.env ??= {};
|
|
4061
|
-
combinedConfig.env[envName] = convertWorkerToWranglerConfig(
|
|
4062
|
-
workerName,
|
|
4063
|
-
entrypoint,
|
|
4064
|
-
env6
|
|
4065
|
-
);
|
|
4066
|
-
}
|
|
4067
|
-
return combinedConfig;
|
|
4068
|
-
}
|
|
4069
|
-
var __create2, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __getProtoOf2, __hasOwnProp2, __name2, __require2, __commonJS2, __copyProps2, __toESM2, require_parser, require_create_datetime, require_format_num, require_create_datetime_float, require_create_date, require_create_time, require_toml_parser, require_parse_pretty_error, require_parse_string, require_parse_async, require_parse_stream, require_parse, require_stringify, require_toml, defaultWranglerConfig, import_toml2, import_toml, CharacterCodes, ParseOptions, ScanError, SyntaxKind, parse2, ParseErrorCode, UserError, FatalError, CommandLineArgsError, JsonFriendlyFatalError, MissingConfigError, ParseError, APIError, TOML_ERROR_NAME, TOML_ERROR_SUFFIX, units, UNSUPPORTED_BOMS, typeMappings, matchType, toPath, toPath2, findUpStop, esm_default, INHERIT_SYMBOL, SERVICE_TAG_PREFIX, ENVIRONMENT_TAG_PREFIX, PATH_TO_DEPLOY_CONFIG, parseRawConfigFile; exports.experimental_readRawConfig = void 0; var import_toml3; exports.experimental_patchConfig = void 0; var getJSONPath, PatchConfigError, ApplicationRollout, BadRequestWithCodeError, CreateApplicationRolloutRequest, DeploymentNotFoundError, ImageRegistryAlreadyExistsError, ImageRegistryIsPublic, ImageRegistryNotAllowedError, ImageRegistryNotFoundError, ImageRegistryProtocolAlreadyExists, ImageRegistryProtocolIsReferencedError, ImageRegistryProtocolNotFound, ProvisionerConfiguration, RolloutStep, SecretNameAlreadyExists, SecretNotFound, SSHPublicKeyNotFoundError, UpdateApplicationRolloutRequest, UserError2, isDockerfile, MAX_WORKFLOW_NAME_LENGTH, ALLOWED_STRING_ID_PATTERN, ALLOWED_WORKFLOW_INSTANCE_ID_REGEX, ALLOWED_WORKFLOW_NAME_REGEX, Diagnostics, appendEnvName, isString, isValidName, isValidDateTimeStringFormat, isStringArray, isOneOf, all, isMutuallyExclusiveWith, isBoolean, validateRequiredProperty, validateAtLeastOnePropertyRequired, validateOptionalProperty, validateTypedArray, validateOptionalTypedArray, isRequiredProperty, isOptionalProperty, hasProperty, validateAdditionalProperties, getBindingNames, isBindingList, isNamespaceList, isRecord, validateUniqueNameProperty, bucketFormatMessage, friendlyBindingNames, ENGLISH, ALLOWED_INSTANCE_TYPES, isRoute, isRouteArray, validateTailConsumers, validateAndNormalizeRules, validateTriggers, validateRules, validateRule, validateDefines, validateVars, validateBindingsProperty, validateUnsafeSettings, validateDurableObjectBinding, workflowNameFormatMessage, validateWorkflowBinding, validateCflogfwdrObject, validateCflogfwdrBinding, validateAssetsConfig, validateNamedSimpleBinding, validateAIBinding, validateVersionMetadataBinding, validateUnsafeBinding, validateBindingArray, validateCloudchamberConfig, validateKVBinding, validateSendEmailBinding, validateQueueBinding, validateR2Binding, validateD1Binding, validateVectorizeBinding, validateHyperdriveBinding, validateVpcServiceBinding, validateBindingsHaveUniqueNames, validateServiceBinding, validateAnalyticsEngineBinding, validateWorkerNamespaceBinding, validateMTlsCertificateBinding, validateConsumer, validateCompatibilityDate, validatePipelineBinding, validateSecretsStoreSecretBinding, validateHelloWorldBinding, validateWorkerLoaderBinding, validateRateLimitBinding, validateMigrations, validateObservability, validatePythonModules, supportedPagesConfigFields;
|
|
4181
|
+
var require_parser, require_create_datetime, require_format_num, require_create_datetime_float, require_create_date, require_create_time, require_toml_parser, require_parse_pretty_error, require_parse_string, require_parse_async, require_parse_stream, require_parse, require_stringify, require_toml, defaultWranglerConfig, import_toml2, import_toml, CharacterCodes, ParseOptions, ScanError, SyntaxKind, parse2, ParseErrorCode, ParseError, APIError, TOML_ERROR_NAME, TOML_ERROR_SUFFIX, units, UNSUPPORTED_BOMS, typeMappings, matchType, toPath, toPath2, findUpStop, esm_default, parseRawConfigFile; exports.experimental_readRawConfig = void 0; var import_toml3; exports.experimental_patchConfig = void 0; var getJSONPath, PatchConfigError, ApplicationRollout, BadRequestWithCodeError, CreateApplicationRolloutRequest, DeploymentNotFoundError, ImageRegistryAlreadyExistsError, ImageRegistryIsPublic, ImageRegistryNotAllowedError, ImageRegistryNotFoundError, ImageRegistryProtocolAlreadyExists, ImageRegistryProtocolIsReferencedError, ImageRegistryProtocolNotFound, ProvisionerConfiguration, RolloutStep, SecretNameAlreadyExists, SecretNotFound, SSHPublicKeyNotFoundError, UpdateApplicationRolloutRequest, UserError2, isDockerfile, MAX_WORKFLOW_NAME_LENGTH, ALLOWED_STRING_ID_PATTERN, ALLOWED_WORKFLOW_INSTANCE_ID_REGEX, ALLOWED_WORKFLOW_NAME_REGEX, Diagnostics, appendEnvName, isString, isValidName, isValidDateTimeStringFormat, isStringArray, isOneOf, all, isMutuallyExclusiveWith, isBoolean, validateRequiredProperty, validateAtLeastOnePropertyRequired, validateOptionalProperty, validateTypedArray, validateOptionalTypedArray, isRequiredProperty, isOptionalProperty, hasProperty, validateAdditionalProperties, getBindingNames, isBindingList, isNamespaceList, isRecord, validateUniqueNameProperty, bucketFormatMessage, friendlyBindingNames, ENGLISH, ALLOWED_INSTANCE_TYPES, isRoute, isRouteArray, validateTailConsumers, validateAndNormalizeRules, validateTriggers, validateRules, validateRule, validateDefines, validateVars, validateBindingsProperty, validateUnsafeSettings, validateDurableObjectBinding, workflowNameFormatMessage, validateWorkflowBinding, validateCflogfwdrObject, validateCflogfwdrBinding, validateAssetsConfig, validateNamedSimpleBinding, validateAIBinding, validateVersionMetadataBinding, validateUnsafeBinding, validateBindingArray, validateCloudchamberConfig, validateKVBinding, validateSendEmailBinding, validateQueueBinding, validateR2Binding, validateD1Binding, validateVectorizeBinding, validateHyperdriveBinding, validateVpcServiceBinding, validateBindingsHaveUniqueNames, validateServiceBinding, validateAnalyticsEngineBinding, validateWorkerNamespaceBinding, validateMTlsCertificateBinding, validateConsumer, validateCompatibilityDate, validatePipelineBinding, validateSecretsStoreSecretBinding, validateHelloWorldBinding, validateWorkerLoaderBinding, validateRateLimitBinding, validateMigrations, validateObservability, validatePythonModules, supportedPagesConfigFields;
|
|
4070
4182
|
var init_dist = __esm({
|
|
4071
4183
|
"../workers-utils/dist/index.mjs"() {
|
|
4072
4184
|
init_import_meta_url();
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
__getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
4076
|
-
__getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
4077
|
-
__getProtoOf2 = Object.getPrototypeOf;
|
|
4078
|
-
__hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
4079
|
-
__name2 = /* @__PURE__ */ __name((target, value) => __defProp2(target, "name", { value, configurable: true }), "__name");
|
|
4080
|
-
__require2 = /* @__PURE__ */ ((x7) => typeof __require !== "undefined" ? __require : typeof Proxy !== "undefined" ? new Proxy(x7, {
|
|
4081
|
-
get: /* @__PURE__ */ __name((a6, b7) => (typeof __require !== "undefined" ? __require : a6)[b7], "get")
|
|
4082
|
-
}) : x7)(function(x7) {
|
|
4083
|
-
if (typeof __require !== "undefined") return __require.apply(this, arguments);
|
|
4084
|
-
throw Error('Dynamic require of "' + x7 + '" is not supported');
|
|
4085
|
-
});
|
|
4086
|
-
__commonJS2 = /* @__PURE__ */ __name((cb2, mod) => /* @__PURE__ */ __name(function __require22() {
|
|
4087
|
-
return mod || (0, cb2[__getOwnPropNames2(cb2)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
4088
|
-
}, "__require2"), "__commonJS");
|
|
4089
|
-
__copyProps2 = /* @__PURE__ */ __name((to, from, except, desc) => {
|
|
4090
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
4091
|
-
for (let key of __getOwnPropNames2(from))
|
|
4092
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
4093
|
-
__defProp2(to, key, { get: /* @__PURE__ */ __name(() => from[key], "get"), enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
4094
|
-
}
|
|
4095
|
-
return to;
|
|
4096
|
-
}, "__copyProps");
|
|
4097
|
-
__toESM2 = /* @__PURE__ */ __name((mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
4098
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
4099
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
4100
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
4101
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
4102
|
-
!mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
4103
|
-
mod
|
|
4104
|
-
)), "__toESM");
|
|
4185
|
+
init_chunk_LFBFF6MG();
|
|
4186
|
+
init_chunk_LFBFF6MG();
|
|
4105
4187
|
require_parser = __commonJS2({
|
|
4106
4188
|
"../../node_modules/.pnpm/@iarna+toml@3.0.0/node_modules/@iarna/toml/lib/parser.js"(exports2, module22) {
|
|
4107
4189
|
var ParserEND = 1114112;
|
|
@@ -6527,79 +6609,6 @@ var init_dist = __esm({
|
|
|
6527
6609
|
__name2(modify, "modify");
|
|
6528
6610
|
__name(applyEdits, "applyEdits");
|
|
6529
6611
|
__name2(applyEdits, "applyEdits");
|
|
6530
|
-
UserError = class extends Error {
|
|
6531
|
-
static {
|
|
6532
|
-
__name(this, "UserError");
|
|
6533
|
-
}
|
|
6534
|
-
static {
|
|
6535
|
-
__name2(this, "UserError");
|
|
6536
|
-
}
|
|
6537
|
-
telemetryMessage;
|
|
6538
|
-
constructor(message, options) {
|
|
6539
|
-
super(message, options);
|
|
6540
|
-
Object.setPrototypeOf(this, new.target.prototype);
|
|
6541
|
-
this.telemetryMessage = options?.telemetryMessage === true ? message : options?.telemetryMessage;
|
|
6542
|
-
}
|
|
6543
|
-
};
|
|
6544
|
-
(class extends UserError {
|
|
6545
|
-
static {
|
|
6546
|
-
__name(this, "DeprecationError");
|
|
6547
|
-
}
|
|
6548
|
-
static {
|
|
6549
|
-
__name2(this, "DeprecationError");
|
|
6550
|
-
}
|
|
6551
|
-
constructor(message, options) {
|
|
6552
|
-
super(`Deprecation:
|
|
6553
|
-
${message}`, options);
|
|
6554
|
-
}
|
|
6555
|
-
});
|
|
6556
|
-
FatalError = class extends UserError {
|
|
6557
|
-
static {
|
|
6558
|
-
__name(this, "FatalError");
|
|
6559
|
-
}
|
|
6560
|
-
constructor(message, code, options) {
|
|
6561
|
-
super(message, options);
|
|
6562
|
-
this.code = code;
|
|
6563
|
-
}
|
|
6564
|
-
static {
|
|
6565
|
-
__name2(this, "FatalError");
|
|
6566
|
-
}
|
|
6567
|
-
};
|
|
6568
|
-
CommandLineArgsError = class extends UserError {
|
|
6569
|
-
static {
|
|
6570
|
-
__name(this, "CommandLineArgsError");
|
|
6571
|
-
}
|
|
6572
|
-
static {
|
|
6573
|
-
__name2(this, "CommandLineArgsError");
|
|
6574
|
-
}
|
|
6575
|
-
};
|
|
6576
|
-
JsonFriendlyFatalError = class extends FatalError {
|
|
6577
|
-
static {
|
|
6578
|
-
__name(this, "JsonFriendlyFatalError");
|
|
6579
|
-
}
|
|
6580
|
-
constructor(message, code, options) {
|
|
6581
|
-
super(message, code, options);
|
|
6582
|
-
this.code = code;
|
|
6583
|
-
}
|
|
6584
|
-
static {
|
|
6585
|
-
__name2(this, "JsonFriendlyFatalError");
|
|
6586
|
-
}
|
|
6587
|
-
};
|
|
6588
|
-
MissingConfigError = class extends Error {
|
|
6589
|
-
static {
|
|
6590
|
-
__name(this, "MissingConfigError");
|
|
6591
|
-
}
|
|
6592
|
-
static {
|
|
6593
|
-
__name2(this, "MissingConfigError");
|
|
6594
|
-
}
|
|
6595
|
-
telemetryMessage;
|
|
6596
|
-
constructor(key) {
|
|
6597
|
-
super(`Missing config value for ${key}`);
|
|
6598
|
-
this.telemetryMessage = `Missing config value for ${key}`;
|
|
6599
|
-
}
|
|
6600
|
-
};
|
|
6601
|
-
__name(createFatalError, "createFatalError");
|
|
6602
|
-
__name2(createFatalError, "createFatalError");
|
|
6603
6612
|
ParseError = class extends UserError {
|
|
6604
6613
|
static {
|
|
6605
6614
|
__name(this, "ParseError");
|
|
@@ -6757,10 +6766,6 @@ ${message}`, options);
|
|
|
6757
6766
|
__name(dedent, "dedent");
|
|
6758
6767
|
__name2(dedent, "dedent");
|
|
6759
6768
|
esm_default = dedent;
|
|
6760
|
-
INHERIT_SYMBOL = Symbol.for("inherit_binding");
|
|
6761
|
-
SERVICE_TAG_PREFIX = "cf:service=";
|
|
6762
|
-
ENVIRONMENT_TAG_PREFIX = "cf:environment=";
|
|
6763
|
-
PATH_TO_DEPLOY_CONFIG = ".wrangler/deploy/config.json";
|
|
6764
6769
|
__name(resolveWranglerConfigPath, "resolveWranglerConfigPath");
|
|
6765
6770
|
__name2(resolveWranglerConfigPath, "resolveWranglerConfigPath");
|
|
6766
6771
|
__name(findWranglerConfig, "findWranglerConfig");
|
|
@@ -9351,16 +9356,6 @@ ${resolution}`);
|
|
|
9351
9356
|
__name2(validateUnsupportedFields, "validateUnsupportedFields");
|
|
9352
9357
|
__name(validateDurableObjectBinding2, "validateDurableObjectBinding2");
|
|
9353
9358
|
__name2(validateDurableObjectBinding2, "validateDurableObjectBinding");
|
|
9354
|
-
__name(assertNever, "assertNever");
|
|
9355
|
-
__name2(assertNever, "assertNever");
|
|
9356
|
-
__name(formatCompatibilityDate, "formatCompatibilityDate");
|
|
9357
|
-
__name2(formatCompatibilityDate, "formatCompatibilityDate");
|
|
9358
|
-
__name(mapWorkerMetadataBindings, "mapWorkerMetadataBindings");
|
|
9359
|
-
__name2(mapWorkerMetadataBindings, "mapWorkerMetadataBindings");
|
|
9360
|
-
__name(convertWorkerToWranglerConfig, "convertWorkerToWranglerConfig");
|
|
9361
|
-
__name2(convertWorkerToWranglerConfig, "convertWorkerToWranglerConfig");
|
|
9362
|
-
__name(constructWranglerConfig, "constructWranglerConfig");
|
|
9363
|
-
__name2(constructWranglerConfig, "constructWranglerConfig");
|
|
9364
9359
|
}
|
|
9365
9360
|
});
|
|
9366
9361
|
|
|
@@ -11080,8 +11075,8 @@ var init_esm = __esm({
|
|
|
11080
11075
|
mainFilename = __dirname2.substring(0, __dirname2.lastIndexOf("node_modules"));
|
|
11081
11076
|
esm_default2 = {
|
|
11082
11077
|
assert: {
|
|
11083
|
-
notStrictEqual:
|
|
11084
|
-
strictEqual:
|
|
11078
|
+
notStrictEqual: assert41.notStrictEqual,
|
|
11079
|
+
strictEqual: assert41.strictEqual
|
|
11085
11080
|
},
|
|
11086
11081
|
cliui: ui,
|
|
11087
11082
|
findUp: sync_default,
|
|
@@ -12012,7 +12007,7 @@ var require_tree = __commonJS({
|
|
|
12012
12007
|
var require_util = __commonJS({
|
|
12013
12008
|
"../../node_modules/.pnpm/undici@7.14.0/node_modules/undici/lib/core/util.js"(exports2, module3) {
|
|
12014
12009
|
init_import_meta_url();
|
|
12015
|
-
var
|
|
12010
|
+
var assert49 = __require("assert");
|
|
12016
12011
|
var { kDestroyed, kBodyUsed, kListeners, kBody } = require_symbols();
|
|
12017
12012
|
var { IncomingMessage } = __require("http");
|
|
12018
12013
|
var stream2 = __require("stream");
|
|
@@ -12033,7 +12028,7 @@ var require_util = __commonJS({
|
|
|
12033
12028
|
this[kBodyUsed] = false;
|
|
12034
12029
|
}
|
|
12035
12030
|
async *[Symbol.asyncIterator]() {
|
|
12036
|
-
|
|
12031
|
+
assert49(!this[kBodyUsed], "disturbed");
|
|
12037
12032
|
this[kBodyUsed] = true;
|
|
12038
12033
|
yield* this[kBody];
|
|
12039
12034
|
}
|
|
@@ -12045,7 +12040,7 @@ var require_util = __commonJS({
|
|
|
12045
12040
|
if (isStream2(body)) {
|
|
12046
12041
|
if (bodyLength(body) === 0) {
|
|
12047
12042
|
body.on("data", function() {
|
|
12048
|
-
|
|
12043
|
+
assert49(false);
|
|
12049
12044
|
});
|
|
12050
12045
|
}
|
|
12051
12046
|
if (typeof body.readableDidRead !== "boolean") {
|
|
@@ -12159,7 +12154,7 @@ var require_util = __commonJS({
|
|
|
12159
12154
|
function getHostname(host) {
|
|
12160
12155
|
if (host[0] === "[") {
|
|
12161
12156
|
const idx2 = host.indexOf("]");
|
|
12162
|
-
|
|
12157
|
+
assert49(idx2 !== -1);
|
|
12163
12158
|
return host.substring(1, idx2);
|
|
12164
12159
|
}
|
|
12165
12160
|
const idx = host.indexOf(":");
|
|
@@ -12171,7 +12166,7 @@ var require_util = __commonJS({
|
|
|
12171
12166
|
if (!host) {
|
|
12172
12167
|
return null;
|
|
12173
12168
|
}
|
|
12174
|
-
|
|
12169
|
+
assert49(typeof host === "string");
|
|
12175
12170
|
const servername = getHostname(host);
|
|
12176
12171
|
if (net2.isIP(servername)) {
|
|
12177
12172
|
return "";
|
|
@@ -12478,7 +12473,7 @@ var require_util = __commonJS({
|
|
|
12478
12473
|
function errorRequest(client, request4, err) {
|
|
12479
12474
|
try {
|
|
12480
12475
|
request4.onError(err);
|
|
12481
|
-
|
|
12476
|
+
assert49(request4.aborted);
|
|
12482
12477
|
} catch (err2) {
|
|
12483
12478
|
client.emit("error", err2);
|
|
12484
12479
|
}
|
|
@@ -12851,7 +12846,7 @@ var require_request = __commonJS({
|
|
|
12851
12846
|
InvalidArgumentError,
|
|
12852
12847
|
NotSupportedError
|
|
12853
12848
|
} = require_errors();
|
|
12854
|
-
var
|
|
12849
|
+
var assert49 = __require("assert");
|
|
12855
12850
|
var {
|
|
12856
12851
|
isValidHTTPToken,
|
|
12857
12852
|
isValidHeaderValue,
|
|
@@ -13029,8 +13024,8 @@ var require_request = __commonJS({
|
|
|
13029
13024
|
}
|
|
13030
13025
|
}
|
|
13031
13026
|
onConnect(abort) {
|
|
13032
|
-
|
|
13033
|
-
|
|
13027
|
+
assert49(!this.aborted);
|
|
13028
|
+
assert49(!this.completed);
|
|
13034
13029
|
if (this.error) {
|
|
13035
13030
|
abort(this.error);
|
|
13036
13031
|
} else {
|
|
@@ -13042,8 +13037,8 @@ var require_request = __commonJS({
|
|
|
13042
13037
|
return this[kHandler].onResponseStarted?.();
|
|
13043
13038
|
}
|
|
13044
13039
|
onHeaders(statusCode, headers, resume, statusText) {
|
|
13045
|
-
|
|
13046
|
-
|
|
13040
|
+
assert49(!this.aborted);
|
|
13041
|
+
assert49(!this.completed);
|
|
13047
13042
|
if (channels.headers.hasSubscribers) {
|
|
13048
13043
|
channels.headers.publish({ request: this, response: { statusCode, headers, statusText } });
|
|
13049
13044
|
}
|
|
@@ -13054,8 +13049,8 @@ var require_request = __commonJS({
|
|
|
13054
13049
|
}
|
|
13055
13050
|
}
|
|
13056
13051
|
onData(chunk) {
|
|
13057
|
-
|
|
13058
|
-
|
|
13052
|
+
assert49(!this.aborted);
|
|
13053
|
+
assert49(!this.completed);
|
|
13059
13054
|
if (channels.bodyChunkReceived.hasSubscribers) {
|
|
13060
13055
|
channels.bodyChunkReceived.publish({ request: this, chunk });
|
|
13061
13056
|
}
|
|
@@ -13067,14 +13062,14 @@ var require_request = __commonJS({
|
|
|
13067
13062
|
}
|
|
13068
13063
|
}
|
|
13069
13064
|
onUpgrade(statusCode, headers, socket) {
|
|
13070
|
-
|
|
13071
|
-
|
|
13065
|
+
assert49(!this.aborted);
|
|
13066
|
+
assert49(!this.completed);
|
|
13072
13067
|
return this[kHandler].onUpgrade(statusCode, headers, socket);
|
|
13073
13068
|
}
|
|
13074
13069
|
onComplete(trailers) {
|
|
13075
13070
|
this.onFinally();
|
|
13076
|
-
|
|
13077
|
-
|
|
13071
|
+
assert49(!this.aborted);
|
|
13072
|
+
assert49(!this.completed);
|
|
13078
13073
|
this.completed = true;
|
|
13079
13074
|
if (channels.trailers.hasSubscribers) {
|
|
13080
13075
|
channels.trailers.publish({ request: this, trailers });
|
|
@@ -13539,7 +13534,7 @@ var require_connect = __commonJS({
|
|
|
13539
13534
|
"../../node_modules/.pnpm/undici@7.14.0/node_modules/undici/lib/core/connect.js"(exports2, module3) {
|
|
13540
13535
|
init_import_meta_url();
|
|
13541
13536
|
var net2 = __require("net");
|
|
13542
|
-
var
|
|
13537
|
+
var assert49 = __require("assert");
|
|
13543
13538
|
var util3 = require_util();
|
|
13544
13539
|
var { InvalidArgumentError } = require_errors();
|
|
13545
13540
|
var tls;
|
|
@@ -13588,7 +13583,7 @@ var require_connect = __commonJS({
|
|
|
13588
13583
|
}
|
|
13589
13584
|
servername = servername || options.servername || util3.getServerName(host) || null;
|
|
13590
13585
|
const sessionKey = servername || hostname2;
|
|
13591
|
-
|
|
13586
|
+
assert49(sessionKey);
|
|
13592
13587
|
const session = customSession || sessionCache.get(sessionKey) || null;
|
|
13593
13588
|
port = port || 443;
|
|
13594
13589
|
socket = tls.connect({
|
|
@@ -13608,7 +13603,7 @@ var require_connect = __commonJS({
|
|
|
13608
13603
|
sessionCache.set(sessionKey, session2);
|
|
13609
13604
|
});
|
|
13610
13605
|
} else {
|
|
13611
|
-
|
|
13606
|
+
assert49(!httpSocket, "httpSocket can only be sent on TLS update");
|
|
13612
13607
|
port = port || 80;
|
|
13613
13608
|
socket = net2.connect({
|
|
13614
13609
|
highWaterMark: 64 * 1024,
|
|
@@ -14551,14 +14546,14 @@ var require_global = __commonJS({
|
|
|
14551
14546
|
var require_data_url = __commonJS({
|
|
14552
14547
|
"../../node_modules/.pnpm/undici@7.14.0/node_modules/undici/lib/web/fetch/data-url.js"(exports2, module3) {
|
|
14553
14548
|
init_import_meta_url();
|
|
14554
|
-
var
|
|
14549
|
+
var assert49 = __require("assert");
|
|
14555
14550
|
var encoder = new TextEncoder();
|
|
14556
14551
|
var HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/;
|
|
14557
14552
|
var HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/;
|
|
14558
14553
|
var ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g;
|
|
14559
14554
|
var HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;
|
|
14560
14555
|
function dataURLProcessor(dataURL) {
|
|
14561
|
-
|
|
14556
|
+
assert49(dataURL.protocol === "data:");
|
|
14562
14557
|
let input = URLSerializer(dataURL, true);
|
|
14563
14558
|
input = input.slice(5);
|
|
14564
14559
|
const position = { position: 0 };
|
|
@@ -14769,7 +14764,7 @@ var require_data_url = __commonJS({
|
|
|
14769
14764
|
function collectAnHTTPQuotedString(input, position, extractValue = false) {
|
|
14770
14765
|
const positionStart = position.position;
|
|
14771
14766
|
let value = "";
|
|
14772
|
-
|
|
14767
|
+
assert49(input[position.position] === '"');
|
|
14773
14768
|
position.position++;
|
|
14774
14769
|
while (true) {
|
|
14775
14770
|
value += collectASequenceOfCodePoints(
|
|
@@ -14790,7 +14785,7 @@ var require_data_url = __commonJS({
|
|
|
14790
14785
|
value += input[position.position];
|
|
14791
14786
|
position.position++;
|
|
14792
14787
|
} else {
|
|
14793
|
-
|
|
14788
|
+
assert49(quoteOrBackslash === '"');
|
|
14794
14789
|
break;
|
|
14795
14790
|
}
|
|
14796
14791
|
}
|
|
@@ -14801,7 +14796,7 @@ var require_data_url = __commonJS({
|
|
|
14801
14796
|
}
|
|
14802
14797
|
__name(collectAnHTTPQuotedString, "collectAnHTTPQuotedString");
|
|
14803
14798
|
function serializeAMimeType(mimeType) {
|
|
14804
|
-
|
|
14799
|
+
assert49(mimeType !== "failure");
|
|
14805
14800
|
const { parameters, essence } = mimeType;
|
|
14806
14801
|
let serialization = essence;
|
|
14807
14802
|
for (let [name2, value] of parameters.entries()) {
|
|
@@ -15403,7 +15398,7 @@ var require_util2 = __commonJS({
|
|
|
15403
15398
|
var { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url();
|
|
15404
15399
|
var { performance: performance2 } = __require("perf_hooks");
|
|
15405
15400
|
var { ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util();
|
|
15406
|
-
var
|
|
15401
|
+
var assert49 = __require("assert");
|
|
15407
15402
|
var { isUint8Array } = __require("util/types");
|
|
15408
15403
|
var { webidl } = require_webidl();
|
|
15409
15404
|
var supportedHashes = [];
|
|
@@ -15613,7 +15608,7 @@ var require_util2 = __commonJS({
|
|
|
15613
15608
|
__name(clonePolicyContainer, "clonePolicyContainer");
|
|
15614
15609
|
function determineRequestsReferrer(request4) {
|
|
15615
15610
|
const policy = request4.referrerPolicy;
|
|
15616
|
-
|
|
15611
|
+
assert49(policy);
|
|
15617
15612
|
let referrerSource = null;
|
|
15618
15613
|
if (request4.referrer === "client") {
|
|
15619
15614
|
const globalOrigin = getGlobalOrigin();
|
|
@@ -15677,7 +15672,7 @@ var require_util2 = __commonJS({
|
|
|
15677
15672
|
}
|
|
15678
15673
|
__name(determineRequestsReferrer, "determineRequestsReferrer");
|
|
15679
15674
|
function stripURLForReferrer(url4, originOnly = false) {
|
|
15680
|
-
|
|
15675
|
+
assert49(webidl.is.URL(url4));
|
|
15681
15676
|
url4 = new URL(url4);
|
|
15682
15677
|
if (urlIsLocal(url4)) {
|
|
15683
15678
|
return "no-referrer";
|
|
@@ -15869,7 +15864,7 @@ var require_util2 = __commonJS({
|
|
|
15869
15864
|
if (result === void 0) {
|
|
15870
15865
|
throw new TypeError("Value is not JSON serializable");
|
|
15871
15866
|
}
|
|
15872
|
-
|
|
15867
|
+
assert49(typeof result === "string");
|
|
15873
15868
|
return result;
|
|
15874
15869
|
}
|
|
15875
15870
|
__name(serializeJavascriptValueToJSONString, "serializeJavascriptValueToJSONString");
|
|
@@ -16029,7 +16024,7 @@ var require_util2 = __commonJS({
|
|
|
16029
16024
|
__name(readableStreamClose, "readableStreamClose");
|
|
16030
16025
|
var invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/;
|
|
16031
16026
|
function isomorphicEncode(input) {
|
|
16032
|
-
|
|
16027
|
+
assert49(!invalidIsomorphicEncodeValueRegex.test(input));
|
|
16033
16028
|
return input;
|
|
16034
16029
|
}
|
|
16035
16030
|
__name(isomorphicEncode, "isomorphicEncode");
|
|
@@ -16056,7 +16051,7 @@ var require_util2 = __commonJS({
|
|
|
16056
16051
|
}
|
|
16057
16052
|
__name(readAllBytes, "readAllBytes");
|
|
16058
16053
|
function urlIsLocal(url4) {
|
|
16059
|
-
|
|
16054
|
+
assert49("protocol" in url4);
|
|
16060
16055
|
const protocol = url4.protocol;
|
|
16061
16056
|
return protocol === "about:" || protocol === "blob:" || protocol === "data:";
|
|
16062
16057
|
}
|
|
@@ -16066,7 +16061,7 @@ var require_util2 = __commonJS({
|
|
|
16066
16061
|
}
|
|
16067
16062
|
__name(urlHasHttpsScheme, "urlHasHttpsScheme");
|
|
16068
16063
|
function urlIsHttpHttpsScheme(url4) {
|
|
16069
|
-
|
|
16064
|
+
assert49("protocol" in url4);
|
|
16070
16065
|
const protocol = url4.protocol;
|
|
16071
16066
|
return protocol === "http:" || protocol === "https:";
|
|
16072
16067
|
}
|
|
@@ -16239,7 +16234,7 @@ var require_util2 = __commonJS({
|
|
|
16239
16234
|
continue;
|
|
16240
16235
|
}
|
|
16241
16236
|
} else {
|
|
16242
|
-
|
|
16237
|
+
assert49(input.charCodeAt(position.position) === 44);
|
|
16243
16238
|
position.position++;
|
|
16244
16239
|
}
|
|
16245
16240
|
}
|
|
@@ -16517,7 +16512,7 @@ var require_formdata_parser = __commonJS({
|
|
|
16517
16512
|
var { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = require_data_url();
|
|
16518
16513
|
var { makeEntry } = require_formdata();
|
|
16519
16514
|
var { webidl } = require_webidl();
|
|
16520
|
-
var
|
|
16515
|
+
var assert49 = __require("assert");
|
|
16521
16516
|
var formDataNameBuffer = Buffer.from('form-data; name="');
|
|
16522
16517
|
var filenameBuffer = Buffer.from("filename");
|
|
16523
16518
|
var dd = Buffer.from("--");
|
|
@@ -16546,7 +16541,7 @@ var require_formdata_parser = __commonJS({
|
|
|
16546
16541
|
}
|
|
16547
16542
|
__name(validateBoundary, "validateBoundary");
|
|
16548
16543
|
function multipartFormDataParser(input, mimeType) {
|
|
16549
|
-
|
|
16544
|
+
assert49(mimeType !== "failure" && mimeType.essence === "multipart/form-data");
|
|
16550
16545
|
const boundaryString = mimeType.parameters.get("boundary");
|
|
16551
16546
|
if (boundaryString === void 0) {
|
|
16552
16547
|
throw parsingError("missing boundary in content-type header");
|
|
@@ -16607,8 +16602,8 @@ var require_formdata_parser = __commonJS({
|
|
|
16607
16602
|
} else {
|
|
16608
16603
|
value = utf8DecodeBytes(Buffer.from(body));
|
|
16609
16604
|
}
|
|
16610
|
-
|
|
16611
|
-
|
|
16605
|
+
assert49(webidl.is.USVString(name2));
|
|
16606
|
+
assert49(typeof value === "string" && webidl.is.USVString(value) || webidl.is.File(value));
|
|
16612
16607
|
entryList.push(makeEntry(name2, value, filename));
|
|
16613
16608
|
}
|
|
16614
16609
|
}
|
|
@@ -16727,7 +16722,7 @@ var require_formdata_parser = __commonJS({
|
|
|
16727
16722
|
}
|
|
16728
16723
|
__name(parseMultipartFormDataHeaders, "parseMultipartFormDataHeaders");
|
|
16729
16724
|
function parseMultipartFormDataName(input, position) {
|
|
16730
|
-
|
|
16725
|
+
assert49(input[position.position - 1] === 34);
|
|
16731
16726
|
let name2 = collectASequenceOfBytes(
|
|
16732
16727
|
(char) => char !== 10 && char !== 13 && char !== 34,
|
|
16733
16728
|
input,
|
|
@@ -16819,7 +16814,7 @@ var require_body = __commonJS({
|
|
|
16819
16814
|
} = require_util2();
|
|
16820
16815
|
var { FormData: FormData13, setFormDataState } = require_formdata();
|
|
16821
16816
|
var { webidl } = require_webidl();
|
|
16822
|
-
var
|
|
16817
|
+
var assert49 = __require("assert");
|
|
16823
16818
|
var { isErrored, isDisturbed } = __require("stream");
|
|
16824
16819
|
var { isArrayBuffer: isArrayBuffer3 } = __require("util/types");
|
|
16825
16820
|
var { serializeAMimeType } = require_data_url();
|
|
@@ -16862,7 +16857,7 @@ var require_body = __commonJS({
|
|
|
16862
16857
|
type: "bytes"
|
|
16863
16858
|
});
|
|
16864
16859
|
}
|
|
16865
|
-
|
|
16860
|
+
assert49(webidl.is.ReadableStream(stream2));
|
|
16866
16861
|
let action = null;
|
|
16867
16862
|
let source = null;
|
|
16868
16863
|
let length = null;
|
|
@@ -16981,8 +16976,8 @@ Content-Type: ${value.type || "application/octet-stream"}\r
|
|
|
16981
16976
|
__name(extractBody, "extractBody");
|
|
16982
16977
|
function safelyExtractBody(object, keepalive = false) {
|
|
16983
16978
|
if (webidl.is.ReadableStream(object)) {
|
|
16984
|
-
|
|
16985
|
-
|
|
16979
|
+
assert49(!util3.isDisturbed(object), "The body has already been consumed.");
|
|
16980
|
+
assert49(!object.locked, "The stream is locked.");
|
|
16986
16981
|
}
|
|
16987
16982
|
return extractBody(object, keepalive);
|
|
16988
16983
|
}
|
|
@@ -17123,7 +17118,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r
|
|
|
17123
17118
|
var require_client_h1 = __commonJS({
|
|
17124
17119
|
"../../node_modules/.pnpm/undici@7.14.0/node_modules/undici/lib/dispatcher/client-h1.js"(exports2, module3) {
|
|
17125
17120
|
init_import_meta_url();
|
|
17126
|
-
var
|
|
17121
|
+
var assert49 = __require("assert");
|
|
17127
17122
|
var util3 = require_util();
|
|
17128
17123
|
var { channels } = require_diagnostics();
|
|
17129
17124
|
var timers = require_timers();
|
|
@@ -17204,7 +17199,7 @@ var require_client_h1 = __commonJS({
|
|
|
17204
17199
|
* @returns {number}
|
|
17205
17200
|
*/
|
|
17206
17201
|
wasm_on_status: /* @__PURE__ */ __name((p7, at3, len) => {
|
|
17207
|
-
|
|
17202
|
+
assert49(currentParser.ptr === p7);
|
|
17208
17203
|
const start = at3 - currentBufferPtr + currentBufferRef.byteOffset;
|
|
17209
17204
|
return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len));
|
|
17210
17205
|
}, "wasm_on_status"),
|
|
@@ -17213,7 +17208,7 @@ var require_client_h1 = __commonJS({
|
|
|
17213
17208
|
* @returns {number}
|
|
17214
17209
|
*/
|
|
17215
17210
|
wasm_on_message_begin: /* @__PURE__ */ __name((p7) => {
|
|
17216
|
-
|
|
17211
|
+
assert49(currentParser.ptr === p7);
|
|
17217
17212
|
return currentParser.onMessageBegin();
|
|
17218
17213
|
}, "wasm_on_message_begin"),
|
|
17219
17214
|
/**
|
|
@@ -17223,7 +17218,7 @@ var require_client_h1 = __commonJS({
|
|
|
17223
17218
|
* @returns {number}
|
|
17224
17219
|
*/
|
|
17225
17220
|
wasm_on_header_field: /* @__PURE__ */ __name((p7, at3, len) => {
|
|
17226
|
-
|
|
17221
|
+
assert49(currentParser.ptr === p7);
|
|
17227
17222
|
const start = at3 - currentBufferPtr + currentBufferRef.byteOffset;
|
|
17228
17223
|
return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len));
|
|
17229
17224
|
}, "wasm_on_header_field"),
|
|
@@ -17234,7 +17229,7 @@ var require_client_h1 = __commonJS({
|
|
|
17234
17229
|
* @returns {number}
|
|
17235
17230
|
*/
|
|
17236
17231
|
wasm_on_header_value: /* @__PURE__ */ __name((p7, at3, len) => {
|
|
17237
|
-
|
|
17232
|
+
assert49(currentParser.ptr === p7);
|
|
17238
17233
|
const start = at3 - currentBufferPtr + currentBufferRef.byteOffset;
|
|
17239
17234
|
return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len));
|
|
17240
17235
|
}, "wasm_on_header_value"),
|
|
@@ -17246,7 +17241,7 @@ var require_client_h1 = __commonJS({
|
|
|
17246
17241
|
* @returns {number}
|
|
17247
17242
|
*/
|
|
17248
17243
|
wasm_on_headers_complete: /* @__PURE__ */ __name((p7, statusCode, upgrade, shouldKeepAlive) => {
|
|
17249
|
-
|
|
17244
|
+
assert49(currentParser.ptr === p7);
|
|
17250
17245
|
return currentParser.onHeadersComplete(statusCode, upgrade === 1, shouldKeepAlive === 1);
|
|
17251
17246
|
}, "wasm_on_headers_complete"),
|
|
17252
17247
|
/**
|
|
@@ -17256,7 +17251,7 @@ var require_client_h1 = __commonJS({
|
|
|
17256
17251
|
* @returns {number}
|
|
17257
17252
|
*/
|
|
17258
17253
|
wasm_on_body: /* @__PURE__ */ __name((p7, at3, len) => {
|
|
17259
|
-
|
|
17254
|
+
assert49(currentParser.ptr === p7);
|
|
17260
17255
|
const start = at3 - currentBufferPtr + currentBufferRef.byteOffset;
|
|
17261
17256
|
return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len));
|
|
17262
17257
|
}, "wasm_on_body"),
|
|
@@ -17265,7 +17260,7 @@ var require_client_h1 = __commonJS({
|
|
|
17265
17260
|
* @returns {number}
|
|
17266
17261
|
*/
|
|
17267
17262
|
wasm_on_message_complete: /* @__PURE__ */ __name((p7) => {
|
|
17268
|
-
|
|
17263
|
+
assert49(currentParser.ptr === p7);
|
|
17269
17264
|
return currentParser.onMessageComplete();
|
|
17270
17265
|
}, "wasm_on_message_complete")
|
|
17271
17266
|
}
|
|
@@ -17340,10 +17335,10 @@ var require_client_h1 = __commonJS({
|
|
|
17340
17335
|
if (this.socket.destroyed || !this.paused) {
|
|
17341
17336
|
return;
|
|
17342
17337
|
}
|
|
17343
|
-
|
|
17344
|
-
|
|
17338
|
+
assert49(this.ptr != null);
|
|
17339
|
+
assert49(currentParser === null);
|
|
17345
17340
|
this.llhttp.llhttp_resume(this.ptr);
|
|
17346
|
-
|
|
17341
|
+
assert49(this.timeoutType === TIMEOUT_BODY);
|
|
17347
17342
|
if (this.timeout) {
|
|
17348
17343
|
if (this.timeout.refresh) {
|
|
17349
17344
|
this.timeout.refresh();
|
|
@@ -17366,9 +17361,9 @@ var require_client_h1 = __commonJS({
|
|
|
17366
17361
|
* @param {Buffer} chunk
|
|
17367
17362
|
*/
|
|
17368
17363
|
execute(chunk) {
|
|
17369
|
-
|
|
17370
|
-
|
|
17371
|
-
|
|
17364
|
+
assert49(currentParser === null);
|
|
17365
|
+
assert49(this.ptr != null);
|
|
17366
|
+
assert49(!this.paused);
|
|
17372
17367
|
const { socket, llhttp } = this;
|
|
17373
17368
|
if (chunk.length > currentBufferSize) {
|
|
17374
17369
|
if (currentBufferPtr) {
|
|
@@ -17412,8 +17407,8 @@ var require_client_h1 = __commonJS({
|
|
|
17412
17407
|
}
|
|
17413
17408
|
}
|
|
17414
17409
|
destroy() {
|
|
17415
|
-
|
|
17416
|
-
|
|
17410
|
+
assert49(currentParser === null);
|
|
17411
|
+
assert49(this.ptr != null);
|
|
17417
17412
|
this.llhttp.llhttp_free(this.ptr);
|
|
17418
17413
|
this.ptr = null;
|
|
17419
17414
|
this.timeout && timers.clearTimeout(this.timeout);
|
|
@@ -17499,14 +17494,14 @@ var require_client_h1 = __commonJS({
|
|
|
17499
17494
|
*/
|
|
17500
17495
|
onUpgrade(head) {
|
|
17501
17496
|
const { upgrade, client, socket, headers, statusCode } = this;
|
|
17502
|
-
|
|
17503
|
-
|
|
17504
|
-
|
|
17505
|
-
|
|
17506
|
-
|
|
17497
|
+
assert49(upgrade);
|
|
17498
|
+
assert49(client[kSocket] === socket);
|
|
17499
|
+
assert49(!socket.destroyed);
|
|
17500
|
+
assert49(!this.paused);
|
|
17501
|
+
assert49((headers.length & 1) === 0);
|
|
17507
17502
|
const request4 = client[kQueue][client[kRunningIdx]];
|
|
17508
|
-
|
|
17509
|
-
|
|
17503
|
+
assert49(request4);
|
|
17504
|
+
assert49(request4.upgrade || request4.method === "CONNECT");
|
|
17510
17505
|
this.statusCode = 0;
|
|
17511
17506
|
this.statusText = "";
|
|
17512
17507
|
this.shouldKeepAlive = false;
|
|
@@ -17544,8 +17539,8 @@ var require_client_h1 = __commonJS({
|
|
|
17544
17539
|
if (!request4) {
|
|
17545
17540
|
return -1;
|
|
17546
17541
|
}
|
|
17547
|
-
|
|
17548
|
-
|
|
17542
|
+
assert49(!this.upgrade);
|
|
17543
|
+
assert49(this.statusCode < 200);
|
|
17549
17544
|
if (statusCode === 100) {
|
|
17550
17545
|
util3.destroy(socket, new SocketError("bad response", util3.getSocketInfo(socket)));
|
|
17551
17546
|
return -1;
|
|
@@ -17554,7 +17549,7 @@ var require_client_h1 = __commonJS({
|
|
|
17554
17549
|
util3.destroy(socket, new SocketError("bad upgrade", util3.getSocketInfo(socket)));
|
|
17555
17550
|
return -1;
|
|
17556
17551
|
}
|
|
17557
|
-
|
|
17552
|
+
assert49(this.timeoutType === TIMEOUT_HEADERS);
|
|
17558
17553
|
this.statusCode = statusCode;
|
|
17559
17554
|
this.shouldKeepAlive = shouldKeepAlive || // Override llhttp value which does not allow keepAlive for HEAD.
|
|
17560
17555
|
request4.method === "HEAD" && !socket[kReset2] && this.connection.toLowerCase() === "keep-alive";
|
|
@@ -17567,16 +17562,16 @@ var require_client_h1 = __commonJS({
|
|
|
17567
17562
|
}
|
|
17568
17563
|
}
|
|
17569
17564
|
if (request4.method === "CONNECT") {
|
|
17570
|
-
|
|
17565
|
+
assert49(client[kRunning] === 1);
|
|
17571
17566
|
this.upgrade = true;
|
|
17572
17567
|
return 2;
|
|
17573
17568
|
}
|
|
17574
17569
|
if (upgrade) {
|
|
17575
|
-
|
|
17570
|
+
assert49(client[kRunning] === 1);
|
|
17576
17571
|
this.upgrade = true;
|
|
17577
17572
|
return 2;
|
|
17578
17573
|
}
|
|
17579
|
-
|
|
17574
|
+
assert49((this.headers.length & 1) === 0);
|
|
17580
17575
|
this.headers = [];
|
|
17581
17576
|
this.headersSize = 0;
|
|
17582
17577
|
if (this.shouldKeepAlive && client[kPipelining]) {
|
|
@@ -17623,14 +17618,14 @@ var require_client_h1 = __commonJS({
|
|
|
17623
17618
|
return -1;
|
|
17624
17619
|
}
|
|
17625
17620
|
const request4 = client[kQueue][client[kRunningIdx]];
|
|
17626
|
-
|
|
17627
|
-
|
|
17621
|
+
assert49(request4);
|
|
17622
|
+
assert49(this.timeoutType === TIMEOUT_BODY);
|
|
17628
17623
|
if (this.timeout) {
|
|
17629
17624
|
if (this.timeout.refresh) {
|
|
17630
17625
|
this.timeout.refresh();
|
|
17631
17626
|
}
|
|
17632
17627
|
}
|
|
17633
|
-
|
|
17628
|
+
assert49(statusCode >= 200);
|
|
17634
17629
|
if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) {
|
|
17635
17630
|
util3.destroy(socket, new ResponseExceededMaxSizeError());
|
|
17636
17631
|
return -1;
|
|
@@ -17652,10 +17647,10 @@ var require_client_h1 = __commonJS({
|
|
|
17652
17647
|
if (upgrade) {
|
|
17653
17648
|
return 0;
|
|
17654
17649
|
}
|
|
17655
|
-
|
|
17656
|
-
|
|
17650
|
+
assert49(statusCode >= 100);
|
|
17651
|
+
assert49((this.headers.length & 1) === 0);
|
|
17657
17652
|
const request4 = client[kQueue][client[kRunningIdx]];
|
|
17658
|
-
|
|
17653
|
+
assert49(request4);
|
|
17659
17654
|
this.statusCode = 0;
|
|
17660
17655
|
this.statusText = "";
|
|
17661
17656
|
this.bytesRead = 0;
|
|
@@ -17674,7 +17669,7 @@ var require_client_h1 = __commonJS({
|
|
|
17674
17669
|
request4.onComplete(headers);
|
|
17675
17670
|
client[kQueue][client[kRunningIdx]++] = null;
|
|
17676
17671
|
if (socket[kWriting]) {
|
|
17677
|
-
|
|
17672
|
+
assert49(client[kRunning] === 0);
|
|
17678
17673
|
util3.destroy(socket, new InformationalError("reset"));
|
|
17679
17674
|
return constants4.ERROR.PAUSED;
|
|
17680
17675
|
} else if (!shouldKeepAlive) {
|
|
@@ -17695,7 +17690,7 @@ var require_client_h1 = __commonJS({
|
|
|
17695
17690
|
const { socket, timeoutType, client, paused } = parser2.deref();
|
|
17696
17691
|
if (timeoutType === TIMEOUT_HEADERS) {
|
|
17697
17692
|
if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) {
|
|
17698
|
-
|
|
17693
|
+
assert49(!paused, "cannot be paused while waiting for headers");
|
|
17699
17694
|
util3.destroy(socket, new HeadersTimeoutError());
|
|
17700
17695
|
}
|
|
17701
17696
|
} else if (timeoutType === TIMEOUT_BODY) {
|
|
@@ -17703,7 +17698,7 @@ var require_client_h1 = __commonJS({
|
|
|
17703
17698
|
util3.destroy(socket, new BodyTimeoutError());
|
|
17704
17699
|
}
|
|
17705
17700
|
} else if (timeoutType === TIMEOUT_KEEP_ALIVE) {
|
|
17706
|
-
|
|
17701
|
+
assert49(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]);
|
|
17707
17702
|
util3.destroy(socket, new InformationalError("socket idle timeout"));
|
|
17708
17703
|
}
|
|
17709
17704
|
}
|
|
@@ -17782,7 +17777,7 @@ var require_client_h1 = __commonJS({
|
|
|
17782
17777
|
}
|
|
17783
17778
|
__name(connectH1, "connectH1");
|
|
17784
17779
|
function onHttpSocketError(err) {
|
|
17785
|
-
|
|
17780
|
+
assert49(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
|
|
17786
17781
|
const parser2 = this[kParser];
|
|
17787
17782
|
if (err.code === "ECONNRESET" && parser2.statusCode && !parser2.shouldKeepAlive) {
|
|
17788
17783
|
parser2.onMessageComplete();
|
|
@@ -17819,7 +17814,7 @@ var require_client_h1 = __commonJS({
|
|
|
17819
17814
|
client[kSocket] = null;
|
|
17820
17815
|
client[kHTTPContext] = null;
|
|
17821
17816
|
if (client.destroyed) {
|
|
17822
|
-
|
|
17817
|
+
assert49(client[kPending] === 0);
|
|
17823
17818
|
const requests = client[kQueue].splice(client[kRunningIdx]);
|
|
17824
17819
|
for (let i6 = 0; i6 < requests.length; i6++) {
|
|
17825
17820
|
const request4 = requests[i6];
|
|
@@ -17831,7 +17826,7 @@ var require_client_h1 = __commonJS({
|
|
|
17831
17826
|
util3.errorRequest(client, request4, err);
|
|
17832
17827
|
}
|
|
17833
17828
|
client[kPendingIdx] = client[kRunningIdx];
|
|
17834
|
-
|
|
17829
|
+
assert49(client[kRunning] === 0);
|
|
17835
17830
|
client.emit("disconnect", client[kUrl], [client], err);
|
|
17836
17831
|
client[kResume]();
|
|
17837
17832
|
}
|
|
@@ -17987,13 +17982,13 @@ upgrade: ${upgrade}\r
|
|
|
17987
17982
|
} else if (util3.isIterable(body)) {
|
|
17988
17983
|
writeIterable(abort, body, client, request4, socket, contentLength, header, expectsPayload);
|
|
17989
17984
|
} else {
|
|
17990
|
-
|
|
17985
|
+
assert49(false);
|
|
17991
17986
|
}
|
|
17992
17987
|
return true;
|
|
17993
17988
|
}
|
|
17994
17989
|
__name(writeH1, "writeH1");
|
|
17995
17990
|
function writeStream(abort, body, client, request4, socket, contentLength, header, expectsPayload) {
|
|
17996
|
-
|
|
17991
|
+
assert49(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
|
|
17997
17992
|
let finished = false;
|
|
17998
17993
|
const writer = new AsyncWriter({ abort, socket, request: request4, contentLength, client, expectsPayload, header });
|
|
17999
17994
|
const onData = /* @__PURE__ */ __name(function(chunk) {
|
|
@@ -18030,7 +18025,7 @@ upgrade: ${upgrade}\r
|
|
|
18030
18025
|
return;
|
|
18031
18026
|
}
|
|
18032
18027
|
finished = true;
|
|
18033
|
-
|
|
18028
|
+
assert49(socket.destroyed || socket[kWriting] && client[kRunning] <= 1);
|
|
18034
18029
|
socket.off("drain", onDrain).off("error", onFinished);
|
|
18035
18030
|
body.removeListener("data", onData).removeListener("end", onFinished).removeListener("close", onClose);
|
|
18036
18031
|
if (!err) {
|
|
@@ -18070,12 +18065,12 @@ upgrade: ${upgrade}\r
|
|
|
18070
18065
|
\r
|
|
18071
18066
|
`, "latin1");
|
|
18072
18067
|
} else {
|
|
18073
|
-
|
|
18068
|
+
assert49(contentLength === null, "no body must not have content length");
|
|
18074
18069
|
socket.write(`${header}\r
|
|
18075
18070
|
`, "latin1");
|
|
18076
18071
|
}
|
|
18077
18072
|
} else if (util3.isBuffer(body)) {
|
|
18078
|
-
|
|
18073
|
+
assert49(contentLength === body.byteLength, "buffer body must have content length");
|
|
18079
18074
|
socket.cork();
|
|
18080
18075
|
socket.write(`${header}content-length: ${contentLength}\r
|
|
18081
18076
|
\r
|
|
@@ -18095,7 +18090,7 @@ upgrade: ${upgrade}\r
|
|
|
18095
18090
|
}
|
|
18096
18091
|
__name(writeBuffer, "writeBuffer");
|
|
18097
18092
|
async function writeBlob(abort, body, client, request4, socket, contentLength, header, expectsPayload) {
|
|
18098
|
-
|
|
18093
|
+
assert49(contentLength === body.size, "blob body must have content length");
|
|
18099
18094
|
try {
|
|
18100
18095
|
if (contentLength != null && contentLength !== body.size) {
|
|
18101
18096
|
throw new RequestContentLengthMismatchError();
|
|
@@ -18119,7 +18114,7 @@ upgrade: ${upgrade}\r
|
|
|
18119
18114
|
}
|
|
18120
18115
|
__name(writeBlob, "writeBlob");
|
|
18121
18116
|
async function writeIterable(abort, body, client, request4, socket, contentLength, header, expectsPayload) {
|
|
18122
|
-
|
|
18117
|
+
assert49(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
|
|
18123
18118
|
let callback = null;
|
|
18124
18119
|
function onDrain() {
|
|
18125
18120
|
if (callback) {
|
|
@@ -18130,7 +18125,7 @@ upgrade: ${upgrade}\r
|
|
|
18130
18125
|
}
|
|
18131
18126
|
__name(onDrain, "onDrain");
|
|
18132
18127
|
const waitForDrain = /* @__PURE__ */ __name(() => new Promise((resolve28, reject) => {
|
|
18133
|
-
|
|
18128
|
+
assert49(callback === null);
|
|
18134
18129
|
if (socket[kError]) {
|
|
18135
18130
|
reject(socket[kError]);
|
|
18136
18131
|
} else {
|
|
@@ -18283,7 +18278,7 @@ ${len.toString(16)}\r
|
|
|
18283
18278
|
const { socket, client, abort } = this;
|
|
18284
18279
|
socket[kWriting] = false;
|
|
18285
18280
|
if (err) {
|
|
18286
|
-
|
|
18281
|
+
assert49(client[kRunning] <= 1, "pipeline should only contain this request");
|
|
18287
18282
|
abort(err);
|
|
18288
18283
|
}
|
|
18289
18284
|
}
|
|
@@ -18296,7 +18291,7 @@ ${len.toString(16)}\r
|
|
|
18296
18291
|
var require_client_h2 = __commonJS({
|
|
18297
18292
|
"../../node_modules/.pnpm/undici@7.14.0/node_modules/undici/lib/dispatcher/client-h2.js"(exports2, module3) {
|
|
18298
18293
|
init_import_meta_url();
|
|
18299
|
-
var
|
|
18294
|
+
var assert49 = __require("assert");
|
|
18300
18295
|
var { pipeline } = __require("stream");
|
|
18301
18296
|
var util3 = require_util();
|
|
18302
18297
|
var {
|
|
@@ -18426,7 +18421,7 @@ var require_client_h2 = __commonJS({
|
|
|
18426
18421
|
}
|
|
18427
18422
|
__name(resumeH2, "resumeH2");
|
|
18428
18423
|
function onHttp2SessionError(err) {
|
|
18429
|
-
|
|
18424
|
+
assert49(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
|
|
18430
18425
|
this[kSocket][kError] = err;
|
|
18431
18426
|
this[kClient][kOnError](err);
|
|
18432
18427
|
}
|
|
@@ -18459,7 +18454,7 @@ var require_client_h2 = __commonJS({
|
|
|
18459
18454
|
util3.errorRequest(client, request4, err);
|
|
18460
18455
|
client[kPendingIdx] = client[kRunningIdx];
|
|
18461
18456
|
}
|
|
18462
|
-
|
|
18457
|
+
assert49(client[kRunning] === 0);
|
|
18463
18458
|
client.emit("disconnect", client[kUrl], [client], err);
|
|
18464
18459
|
client.emit("connectionError", client[kUrl], [client], err);
|
|
18465
18460
|
client[kResume]();
|
|
@@ -18472,7 +18467,7 @@ var require_client_h2 = __commonJS({
|
|
|
18472
18467
|
client[kSocket] = null;
|
|
18473
18468
|
client[kHTTPContext] = null;
|
|
18474
18469
|
if (client.destroyed) {
|
|
18475
|
-
|
|
18470
|
+
assert49(client[kPending] === 0);
|
|
18476
18471
|
const requests = client[kQueue].splice(client[kRunningIdx]);
|
|
18477
18472
|
for (let i6 = 0; i6 < requests.length; i6++) {
|
|
18478
18473
|
const request4 = requests[i6];
|
|
@@ -18490,13 +18485,13 @@ var require_client_h2 = __commonJS({
|
|
|
18490
18485
|
this[kHTTP2Session].destroy(err);
|
|
18491
18486
|
}
|
|
18492
18487
|
client[kPendingIdx] = client[kRunningIdx];
|
|
18493
|
-
|
|
18488
|
+
assert49(client[kRunning] === 0);
|
|
18494
18489
|
client.emit("disconnect", client[kUrl], [client], err);
|
|
18495
18490
|
client[kResume]();
|
|
18496
18491
|
}
|
|
18497
18492
|
__name(onHttp2SocketClose, "onHttp2SocketClose");
|
|
18498
18493
|
function onHttp2SocketError(err) {
|
|
18499
|
-
|
|
18494
|
+
assert49(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
|
|
18500
18495
|
this[kError] = err;
|
|
18501
18496
|
this[kClient][kOnError](err);
|
|
18502
18497
|
}
|
|
@@ -18615,7 +18610,7 @@ var require_client_h2 = __commonJS({
|
|
|
18615
18610
|
process.emitWarning(new RequestContentLengthMismatchError());
|
|
18616
18611
|
}
|
|
18617
18612
|
if (contentLength != null) {
|
|
18618
|
-
|
|
18613
|
+
assert49(body, "no body must not have content length");
|
|
18619
18614
|
headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`;
|
|
18620
18615
|
}
|
|
18621
18616
|
session.ref();
|
|
@@ -18780,7 +18775,7 @@ var require_client_h2 = __commonJS({
|
|
|
18780
18775
|
expectsPayload
|
|
18781
18776
|
);
|
|
18782
18777
|
} else {
|
|
18783
|
-
|
|
18778
|
+
assert49(false);
|
|
18784
18779
|
}
|
|
18785
18780
|
}
|
|
18786
18781
|
}
|
|
@@ -18788,7 +18783,7 @@ var require_client_h2 = __commonJS({
|
|
|
18788
18783
|
function writeBuffer(abort, h2stream, body, client, request4, socket, contentLength, expectsPayload) {
|
|
18789
18784
|
try {
|
|
18790
18785
|
if (body != null && util3.isBuffer(body)) {
|
|
18791
|
-
|
|
18786
|
+
assert49(contentLength === body.byteLength, "buffer body must have content length");
|
|
18792
18787
|
h2stream.cork();
|
|
18793
18788
|
h2stream.write(body);
|
|
18794
18789
|
h2stream.uncork();
|
|
@@ -18806,7 +18801,7 @@ var require_client_h2 = __commonJS({
|
|
|
18806
18801
|
}
|
|
18807
18802
|
__name(writeBuffer, "writeBuffer");
|
|
18808
18803
|
function writeStream(abort, socket, expectsPayload, h2stream, body, client, request4, contentLength) {
|
|
18809
|
-
|
|
18804
|
+
assert49(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
|
|
18810
18805
|
const pipe = pipeline(
|
|
18811
18806
|
body,
|
|
18812
18807
|
h2stream,
|
|
@@ -18832,7 +18827,7 @@ var require_client_h2 = __commonJS({
|
|
|
18832
18827
|
}
|
|
18833
18828
|
__name(writeStream, "writeStream");
|
|
18834
18829
|
async function writeBlob(abort, h2stream, body, client, request4, socket, contentLength, expectsPayload) {
|
|
18835
|
-
|
|
18830
|
+
assert49(contentLength === body.size, "blob body must have content length");
|
|
18836
18831
|
try {
|
|
18837
18832
|
if (contentLength != null && contentLength !== body.size) {
|
|
18838
18833
|
throw new RequestContentLengthMismatchError();
|
|
@@ -18854,7 +18849,7 @@ var require_client_h2 = __commonJS({
|
|
|
18854
18849
|
}
|
|
18855
18850
|
__name(writeBlob, "writeBlob");
|
|
18856
18851
|
async function writeIterable(abort, h2stream, body, client, request4, socket, contentLength, expectsPayload) {
|
|
18857
|
-
|
|
18852
|
+
assert49(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
|
|
18858
18853
|
let callback = null;
|
|
18859
18854
|
function onDrain() {
|
|
18860
18855
|
if (callback) {
|
|
@@ -18865,7 +18860,7 @@ var require_client_h2 = __commonJS({
|
|
|
18865
18860
|
}
|
|
18866
18861
|
__name(onDrain, "onDrain");
|
|
18867
18862
|
const waitForDrain = /* @__PURE__ */ __name(() => new Promise((resolve28, reject) => {
|
|
18868
|
-
|
|
18863
|
+
assert49(callback === null);
|
|
18869
18864
|
if (socket[kError]) {
|
|
18870
18865
|
reject(socket[kError]);
|
|
18871
18866
|
} else {
|
|
@@ -18905,7 +18900,7 @@ var require_client_h2 = __commonJS({
|
|
|
18905
18900
|
var require_client = __commonJS({
|
|
18906
18901
|
"../../node_modules/.pnpm/undici@7.14.0/node_modules/undici/lib/dispatcher/client.js"(exports2, module3) {
|
|
18907
18902
|
init_import_meta_url();
|
|
18908
|
-
var
|
|
18903
|
+
var assert49 = __require("assert");
|
|
18909
18904
|
var net2 = __require("net");
|
|
18910
18905
|
var http6 = __require("http");
|
|
18911
18906
|
var util3 = require_util();
|
|
@@ -19194,25 +19189,25 @@ var require_client = __commonJS({
|
|
|
19194
19189
|
};
|
|
19195
19190
|
function onError(client, err) {
|
|
19196
19191
|
if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") {
|
|
19197
|
-
|
|
19192
|
+
assert49(client[kPendingIdx] === client[kRunningIdx]);
|
|
19198
19193
|
const requests = client[kQueue].splice(client[kRunningIdx]);
|
|
19199
19194
|
for (let i6 = 0; i6 < requests.length; i6++) {
|
|
19200
19195
|
const request4 = requests[i6];
|
|
19201
19196
|
util3.errorRequest(client, request4, err);
|
|
19202
19197
|
}
|
|
19203
|
-
|
|
19198
|
+
assert49(client[kSize] === 0);
|
|
19204
19199
|
}
|
|
19205
19200
|
}
|
|
19206
19201
|
__name(onError, "onError");
|
|
19207
19202
|
async function connect(client) {
|
|
19208
|
-
|
|
19209
|
-
|
|
19203
|
+
assert49(!client[kConnecting]);
|
|
19204
|
+
assert49(!client[kHTTPContext]);
|
|
19210
19205
|
let { host, hostname: hostname2, protocol, port } = client[kUrl];
|
|
19211
19206
|
if (hostname2[0] === "[") {
|
|
19212
19207
|
const idx = hostname2.indexOf("]");
|
|
19213
|
-
|
|
19208
|
+
assert49(idx !== -1);
|
|
19214
19209
|
const ip = hostname2.substring(1, idx);
|
|
19215
|
-
|
|
19210
|
+
assert49(net2.isIPv6(ip));
|
|
19216
19211
|
hostname2 = ip;
|
|
19217
19212
|
}
|
|
19218
19213
|
client[kConnecting] = true;
|
|
@@ -19251,7 +19246,7 @@ var require_client = __commonJS({
|
|
|
19251
19246
|
util3.destroy(socket.on("error", noop), new ClientDestroyedError());
|
|
19252
19247
|
return;
|
|
19253
19248
|
}
|
|
19254
|
-
|
|
19249
|
+
assert49(socket);
|
|
19255
19250
|
try {
|
|
19256
19251
|
client[kHTTPContext] = socket.alpnProtocol === "h2" ? await connectH2(client, socket) : await connectH1(client, socket);
|
|
19257
19252
|
} catch (err) {
|
|
@@ -19300,7 +19295,7 @@ var require_client = __commonJS({
|
|
|
19300
19295
|
});
|
|
19301
19296
|
}
|
|
19302
19297
|
if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") {
|
|
19303
|
-
|
|
19298
|
+
assert49(client[kRunning] === 0);
|
|
19304
19299
|
while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) {
|
|
19305
19300
|
const request4 = client[kQueue][client[kPendingIdx]++];
|
|
19306
19301
|
util3.errorRequest(client, request4, err);
|
|
@@ -19335,7 +19330,7 @@ var require_client = __commonJS({
|
|
|
19335
19330
|
function _resume(client, sync) {
|
|
19336
19331
|
while (true) {
|
|
19337
19332
|
if (client.destroyed) {
|
|
19338
|
-
|
|
19333
|
+
assert49(client[kPending] === 0);
|
|
19339
19334
|
return;
|
|
19340
19335
|
}
|
|
19341
19336
|
if (client[kClosedResolve] && !client[kSize]) {
|
|
@@ -20380,7 +20375,7 @@ var require_env_http_proxy_agent = __commonJS({
|
|
|
20380
20375
|
var require_retry_handler = __commonJS({
|
|
20381
20376
|
"../../node_modules/.pnpm/undici@7.14.0/node_modules/undici/lib/handler/retry-handler.js"(exports2, module3) {
|
|
20382
20377
|
init_import_meta_url();
|
|
20383
|
-
var
|
|
20378
|
+
var assert49 = __require("assert");
|
|
20384
20379
|
var { kRetryHandlerDefaultRetry } = require_symbols();
|
|
20385
20380
|
var { RequestRetryError } = require_errors();
|
|
20386
20381
|
var WrapHandler = require_wrap_handler();
|
|
@@ -20568,8 +20563,8 @@ var require_retry_handler = __commonJS({
|
|
|
20568
20563
|
});
|
|
20569
20564
|
}
|
|
20570
20565
|
const { start, size, end = size ? size - 1 : null } = contentRange;
|
|
20571
|
-
|
|
20572
|
-
|
|
20566
|
+
assert49(this.start === start, "content-range mismatch");
|
|
20567
|
+
assert49(this.end == null || this.end === end, "content-range mismatch");
|
|
20573
20568
|
return;
|
|
20574
20569
|
}
|
|
20575
20570
|
if (this.end == null) {
|
|
@@ -20586,11 +20581,11 @@ var require_retry_handler = __commonJS({
|
|
|
20586
20581
|
return;
|
|
20587
20582
|
}
|
|
20588
20583
|
const { start, size, end = size ? size - 1 : null } = range;
|
|
20589
|
-
|
|
20584
|
+
assert49(
|
|
20590
20585
|
start != null && Number.isFinite(start),
|
|
20591
20586
|
"content-range mismatch"
|
|
20592
20587
|
);
|
|
20593
|
-
|
|
20588
|
+
assert49(end != null && Number.isFinite(end), "invalid content-length");
|
|
20594
20589
|
this.start = start;
|
|
20595
20590
|
this.end = end;
|
|
20596
20591
|
}
|
|
@@ -20598,8 +20593,8 @@ var require_retry_handler = __commonJS({
|
|
|
20598
20593
|
const contentLength = headers["content-length"];
|
|
20599
20594
|
this.end = contentLength != null ? Number(contentLength) - 1 : null;
|
|
20600
20595
|
}
|
|
20601
|
-
|
|
20602
|
-
|
|
20596
|
+
assert49(Number.isFinite(this.start));
|
|
20597
|
+
assert49(
|
|
20603
20598
|
this.end == null || Number.isFinite(this.end),
|
|
20604
20599
|
"invalid content-length"
|
|
20605
20600
|
);
|
|
@@ -20832,7 +20827,7 @@ var require_h2c_client = __commonJS({
|
|
|
20832
20827
|
var require_readable = __commonJS({
|
|
20833
20828
|
"../../node_modules/.pnpm/undici@7.14.0/node_modules/undici/lib/api/readable.js"(exports2, module3) {
|
|
20834
20829
|
init_import_meta_url();
|
|
20835
|
-
var
|
|
20830
|
+
var assert49 = __require("assert");
|
|
20836
20831
|
var { Readable: Readable10 } = __require("stream");
|
|
20837
20832
|
var { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError: AbortError3 } = require_errors();
|
|
20838
20833
|
var util3 = require_util();
|
|
@@ -21029,7 +21024,7 @@ var require_readable = __commonJS({
|
|
|
21029
21024
|
this[kBody] = ReadableStreamFrom(this);
|
|
21030
21025
|
if (this[kConsume]) {
|
|
21031
21026
|
this[kBody].getReader();
|
|
21032
|
-
|
|
21027
|
+
assert49(this[kBody].locked);
|
|
21033
21028
|
}
|
|
21034
21029
|
}
|
|
21035
21030
|
return this[kBody];
|
|
@@ -21098,7 +21093,7 @@ var require_readable = __commonJS({
|
|
|
21098
21093
|
}
|
|
21099
21094
|
__name(isUnusable, "isUnusable");
|
|
21100
21095
|
function consume(stream2, type) {
|
|
21101
|
-
|
|
21096
|
+
assert49(!stream2[kConsume]);
|
|
21102
21097
|
return new Promise((resolve28, reject) => {
|
|
21103
21098
|
if (isUnusable(stream2)) {
|
|
21104
21099
|
const rState = stream2._readableState;
|
|
@@ -21244,7 +21239,7 @@ var require_readable = __commonJS({
|
|
|
21244
21239
|
var require_api_request = __commonJS({
|
|
21245
21240
|
"../../node_modules/.pnpm/undici@7.14.0/node_modules/undici/lib/api/api-request.js"(exports2, module3) {
|
|
21246
21241
|
init_import_meta_url();
|
|
21247
|
-
var
|
|
21242
|
+
var assert49 = __require("assert");
|
|
21248
21243
|
var { AsyncResource } = __require("async_hooks");
|
|
21249
21244
|
var { Readable: Readable10 } = require_readable();
|
|
21250
21245
|
var { InvalidArgumentError, RequestAbortedError } = require_errors();
|
|
@@ -21315,7 +21310,7 @@ var require_api_request = __commonJS({
|
|
|
21315
21310
|
abort(this.reason);
|
|
21316
21311
|
return;
|
|
21317
21312
|
}
|
|
21318
|
-
|
|
21313
|
+
assert49(this.callback);
|
|
21319
21314
|
this.abort = abort;
|
|
21320
21315
|
this.context = context2;
|
|
21321
21316
|
}
|
|
@@ -21473,7 +21468,7 @@ var require_abort_signal = __commonJS({
|
|
|
21473
21468
|
var require_api_stream = __commonJS({
|
|
21474
21469
|
"../../node_modules/.pnpm/undici@7.14.0/node_modules/undici/lib/api/api-stream.js"(exports2, module3) {
|
|
21475
21470
|
init_import_meta_url();
|
|
21476
|
-
var
|
|
21471
|
+
var assert49 = __require("assert");
|
|
21477
21472
|
var { finished } = __require("stream");
|
|
21478
21473
|
var { AsyncResource } = __require("async_hooks");
|
|
21479
21474
|
var { InvalidArgumentError, InvalidReturnValueError } = require_errors();
|
|
@@ -21536,7 +21531,7 @@ var require_api_stream = __commonJS({
|
|
|
21536
21531
|
abort(this.reason);
|
|
21537
21532
|
return;
|
|
21538
21533
|
}
|
|
21539
|
-
|
|
21534
|
+
assert49(this.callback);
|
|
21540
21535
|
this.abort = abort;
|
|
21541
21536
|
this.context = context2;
|
|
21542
21537
|
}
|
|
@@ -21644,7 +21639,7 @@ var require_api_pipeline = __commonJS({
|
|
|
21644
21639
|
Duplex: Duplex2,
|
|
21645
21640
|
PassThrough: PassThrough4
|
|
21646
21641
|
} = __require("stream");
|
|
21647
|
-
var
|
|
21642
|
+
var assert49 = __require("assert");
|
|
21648
21643
|
var { AsyncResource } = __require("async_hooks");
|
|
21649
21644
|
var {
|
|
21650
21645
|
InvalidArgumentError,
|
|
@@ -21768,7 +21763,7 @@ var require_api_pipeline = __commonJS({
|
|
|
21768
21763
|
abort(this.reason);
|
|
21769
21764
|
return;
|
|
21770
21765
|
}
|
|
21771
|
-
|
|
21766
|
+
assert49(!res, "pipeline cannot be retried");
|
|
21772
21767
|
this.abort = abort;
|
|
21773
21768
|
this.context = context2;
|
|
21774
21769
|
}
|
|
@@ -21853,7 +21848,7 @@ var require_api_upgrade = __commonJS({
|
|
|
21853
21848
|
init_import_meta_url();
|
|
21854
21849
|
var { InvalidArgumentError, SocketError } = require_errors();
|
|
21855
21850
|
var { AsyncResource } = __require("async_hooks");
|
|
21856
|
-
var
|
|
21851
|
+
var assert49 = __require("assert");
|
|
21857
21852
|
var util3 = require_util();
|
|
21858
21853
|
var { addSignal, removeSignal } = require_abort_signal();
|
|
21859
21854
|
var UpgradeHandler = class extends AsyncResource {
|
|
@@ -21884,7 +21879,7 @@ var require_api_upgrade = __commonJS({
|
|
|
21884
21879
|
abort(this.reason);
|
|
21885
21880
|
return;
|
|
21886
21881
|
}
|
|
21887
|
-
|
|
21882
|
+
assert49(this.callback);
|
|
21888
21883
|
this.abort = abort;
|
|
21889
21884
|
this.context = null;
|
|
21890
21885
|
}
|
|
@@ -21892,7 +21887,7 @@ var require_api_upgrade = __commonJS({
|
|
|
21892
21887
|
throw new SocketError("bad upgrade", null);
|
|
21893
21888
|
}
|
|
21894
21889
|
onUpgrade(statusCode, rawHeaders, socket) {
|
|
21895
|
-
|
|
21890
|
+
assert49(statusCode === 101);
|
|
21896
21891
|
const { callback, opaque, context: context2 } = this;
|
|
21897
21892
|
removeSignal(this);
|
|
21898
21893
|
this.callback = null;
|
|
@@ -21948,7 +21943,7 @@ var require_api_upgrade = __commonJS({
|
|
|
21948
21943
|
var require_api_connect = __commonJS({
|
|
21949
21944
|
"../../node_modules/.pnpm/undici@7.14.0/node_modules/undici/lib/api/api-connect.js"(exports2, module3) {
|
|
21950
21945
|
init_import_meta_url();
|
|
21951
|
-
var
|
|
21946
|
+
var assert49 = __require("assert");
|
|
21952
21947
|
var { AsyncResource } = __require("async_hooks");
|
|
21953
21948
|
var { InvalidArgumentError, SocketError } = require_errors();
|
|
21954
21949
|
var util3 = require_util();
|
|
@@ -21980,7 +21975,7 @@ var require_api_connect = __commonJS({
|
|
|
21980
21975
|
abort(this.reason);
|
|
21981
21976
|
return;
|
|
21982
21977
|
}
|
|
21983
|
-
|
|
21978
|
+
assert49(this.callback);
|
|
21984
21979
|
this.abort = abort;
|
|
21985
21980
|
this.context = context2;
|
|
21986
21981
|
}
|
|
@@ -24009,7 +24004,7 @@ var require_global2 = __commonJS({
|
|
|
24009
24004
|
var require_decorator_handler = __commonJS({
|
|
24010
24005
|
"../../node_modules/.pnpm/undici@7.14.0/node_modules/undici/lib/handler/decorator-handler.js"(exports2, module3) {
|
|
24011
24006
|
init_import_meta_url();
|
|
24012
|
-
var
|
|
24007
|
+
var assert49 = __require("assert");
|
|
24013
24008
|
var WrapHandler = require_wrap_handler();
|
|
24014
24009
|
module3.exports = class DecoratorHandler {
|
|
24015
24010
|
static {
|
|
@@ -24029,25 +24024,25 @@ var require_decorator_handler = __commonJS({
|
|
|
24029
24024
|
this.#handler.onRequestStart?.(...args);
|
|
24030
24025
|
}
|
|
24031
24026
|
onRequestUpgrade(...args) {
|
|
24032
|
-
|
|
24033
|
-
|
|
24027
|
+
assert49(!this.#onCompleteCalled);
|
|
24028
|
+
assert49(!this.#onErrorCalled);
|
|
24034
24029
|
return this.#handler.onRequestUpgrade?.(...args);
|
|
24035
24030
|
}
|
|
24036
24031
|
onResponseStart(...args) {
|
|
24037
|
-
|
|
24038
|
-
|
|
24039
|
-
|
|
24032
|
+
assert49(!this.#onCompleteCalled);
|
|
24033
|
+
assert49(!this.#onErrorCalled);
|
|
24034
|
+
assert49(!this.#onResponseStartCalled);
|
|
24040
24035
|
this.#onResponseStartCalled = true;
|
|
24041
24036
|
return this.#handler.onResponseStart?.(...args);
|
|
24042
24037
|
}
|
|
24043
24038
|
onResponseData(...args) {
|
|
24044
|
-
|
|
24045
|
-
|
|
24039
|
+
assert49(!this.#onCompleteCalled);
|
|
24040
|
+
assert49(!this.#onErrorCalled);
|
|
24046
24041
|
return this.#handler.onResponseData?.(...args);
|
|
24047
24042
|
}
|
|
24048
24043
|
onResponseEnd(...args) {
|
|
24049
|
-
|
|
24050
|
-
|
|
24044
|
+
assert49(!this.#onCompleteCalled);
|
|
24045
|
+
assert49(!this.#onErrorCalled);
|
|
24051
24046
|
this.#onCompleteCalled = true;
|
|
24052
24047
|
return this.#handler.onResponseEnd?.(...args);
|
|
24053
24048
|
}
|
|
@@ -24070,7 +24065,7 @@ var require_redirect_handler = __commonJS({
|
|
|
24070
24065
|
init_import_meta_url();
|
|
24071
24066
|
var util3 = require_util();
|
|
24072
24067
|
var { kBodyUsed } = require_symbols();
|
|
24073
|
-
var
|
|
24068
|
+
var assert49 = __require("assert");
|
|
24074
24069
|
var { InvalidArgumentError } = require_errors();
|
|
24075
24070
|
var EE = __require("events");
|
|
24076
24071
|
var redirectableStatusCodes = [300, 301, 302, 303, 307, 308];
|
|
@@ -24086,7 +24081,7 @@ var require_redirect_handler = __commonJS({
|
|
|
24086
24081
|
this[kBodyUsed] = false;
|
|
24087
24082
|
}
|
|
24088
24083
|
async *[Symbol.asyncIterator]() {
|
|
24089
|
-
|
|
24084
|
+
assert49(!this[kBodyUsed], "disturbed");
|
|
24090
24085
|
this[kBodyUsed] = true;
|
|
24091
24086
|
yield* this[kBody];
|
|
24092
24087
|
}
|
|
@@ -24116,7 +24111,7 @@ var require_redirect_handler = __commonJS({
|
|
|
24116
24111
|
if (util3.isStream(this.opts.body)) {
|
|
24117
24112
|
if (util3.bodyLength(this.opts.body) === 0) {
|
|
24118
24113
|
this.opts.body.on("data", function() {
|
|
24119
|
-
|
|
24114
|
+
assert49(false);
|
|
24120
24115
|
});
|
|
24121
24116
|
}
|
|
24122
24117
|
if (typeof this.opts.body.readableDidRead !== "boolean") {
|
|
@@ -24222,7 +24217,7 @@ var require_redirect_handler = __commonJS({
|
|
|
24222
24217
|
}
|
|
24223
24218
|
}
|
|
24224
24219
|
} else {
|
|
24225
|
-
|
|
24220
|
+
assert49(headers == null, "headers must be an object or an array");
|
|
24226
24221
|
}
|
|
24227
24222
|
return ret;
|
|
24228
24223
|
}
|
|
@@ -25745,7 +25740,7 @@ var require_memory_cache_store = __commonJS({
|
|
|
25745
25740
|
var require_cache_revalidation_handler = __commonJS({
|
|
25746
25741
|
"../../node_modules/.pnpm/undici@7.14.0/node_modules/undici/lib/handler/cache-revalidation-handler.js"(exports2, module3) {
|
|
25747
25742
|
init_import_meta_url();
|
|
25748
|
-
var
|
|
25743
|
+
var assert49 = __require("assert");
|
|
25749
25744
|
var CacheRevalidationHandler = class {
|
|
25750
25745
|
static {
|
|
25751
25746
|
__name(this, "CacheRevalidationHandler");
|
|
@@ -25785,7 +25780,7 @@ var require_cache_revalidation_handler = __commonJS({
|
|
|
25785
25780
|
this.#handler.onRequestUpgrade?.(controller, statusCode, headers, socket);
|
|
25786
25781
|
}
|
|
25787
25782
|
onResponseStart(controller, statusCode, headers, statusMessage) {
|
|
25788
|
-
|
|
25783
|
+
assert49(this.#callback != null);
|
|
25789
25784
|
this.#successful = statusCode === 304 || this.#allowErrorStatusCodes && statusCode >= 500 && statusCode <= 504;
|
|
25790
25785
|
this.#callback(this.#successful, this.#context);
|
|
25791
25786
|
this.#callback = null;
|
|
@@ -25835,7 +25830,7 @@ var require_cache_revalidation_handler = __commonJS({
|
|
|
25835
25830
|
var require_cache2 = __commonJS({
|
|
25836
25831
|
"../../node_modules/.pnpm/undici@7.14.0/node_modules/undici/lib/interceptor/cache.js"(exports2, module3) {
|
|
25837
25832
|
init_import_meta_url();
|
|
25838
|
-
var
|
|
25833
|
+
var assert49 = __require("assert");
|
|
25839
25834
|
var { Readable: Readable10 } = __require("stream");
|
|
25840
25835
|
var util3 = require_util();
|
|
25841
25836
|
var CacheHandler = require_cache_handler();
|
|
@@ -25900,8 +25895,8 @@ var require_cache2 = __commonJS({
|
|
|
25900
25895
|
__name(handleUncachedResponse, "handleUncachedResponse");
|
|
25901
25896
|
function sendCachedValue(handler, opts, result, age, context2, isStale) {
|
|
25902
25897
|
const stream2 = util3.isStream(result.body) ? result.body : Readable10.from(result.body ?? []);
|
|
25903
|
-
|
|
25904
|
-
|
|
25898
|
+
assert49(!stream2.destroyed, "stream should not be destroyed");
|
|
25899
|
+
assert49(!stream2.readableDidRead, "stream should not be readableDidRead");
|
|
25905
25900
|
const controller = {
|
|
25906
25901
|
resume() {
|
|
25907
25902
|
stream2.resume();
|
|
@@ -26458,7 +26453,7 @@ var require_headers = __commonJS({
|
|
|
26458
26453
|
isValidHeaderValue
|
|
26459
26454
|
} = require_util2();
|
|
26460
26455
|
var { webidl } = require_webidl();
|
|
26461
|
-
var
|
|
26456
|
+
var assert49 = __require("assert");
|
|
26462
26457
|
var util3 = __require("util");
|
|
26463
26458
|
function isHTTPWhiteSpaceCharCode(code) {
|
|
26464
26459
|
return code === 10 || code === 13 || code === 9 || code === 32;
|
|
@@ -26683,11 +26678,11 @@ var require_headers = __commonJS({
|
|
|
26683
26678
|
const iterator = this.headersMap[Symbol.iterator]();
|
|
26684
26679
|
const firstValue = iterator.next().value;
|
|
26685
26680
|
array[0] = [firstValue[0], firstValue[1].value];
|
|
26686
|
-
|
|
26681
|
+
assert49(firstValue[1].value !== null);
|
|
26687
26682
|
for (let i6 = 1, j7 = 0, right2 = 0, left2 = 0, pivot = 0, x7, value; i6 < size; ++i6) {
|
|
26688
26683
|
value = iterator.next().value;
|
|
26689
26684
|
x7 = array[i6] = [value[0], value[1].value];
|
|
26690
|
-
|
|
26685
|
+
assert49(x7[1] !== null);
|
|
26691
26686
|
left2 = 0;
|
|
26692
26687
|
right2 = i6;
|
|
26693
26688
|
while (left2 < right2) {
|
|
@@ -26714,7 +26709,7 @@ var require_headers = __commonJS({
|
|
|
26714
26709
|
let i6 = 0;
|
|
26715
26710
|
for (const { 0: name2, 1: { value } } of this.headersMap) {
|
|
26716
26711
|
array[i6++] = [name2, value];
|
|
26717
|
-
|
|
26712
|
+
assert49(value !== null);
|
|
26718
26713
|
}
|
|
26719
26714
|
return array.sort(compareHeaderName);
|
|
26720
26715
|
}
|
|
@@ -26944,7 +26939,7 @@ var require_response = __commonJS({
|
|
|
26944
26939
|
var { webidl } = require_webidl();
|
|
26945
26940
|
var { URLSerializer } = require_data_url();
|
|
26946
26941
|
var { kConstruct } = require_symbols();
|
|
26947
|
-
var
|
|
26942
|
+
var assert49 = __require("assert");
|
|
26948
26943
|
var { isArrayBuffer: isArrayBuffer3 } = nodeUtil.types;
|
|
26949
26944
|
var textEncoder = new TextEncoder("utf-8");
|
|
26950
26945
|
var Response11 = class _Response {
|
|
@@ -27208,7 +27203,7 @@ var require_response = __commonJS({
|
|
|
27208
27203
|
return p7 in state2 ? state2[p7] : target[p7];
|
|
27209
27204
|
},
|
|
27210
27205
|
set(target, p7, value) {
|
|
27211
|
-
|
|
27206
|
+
assert49(!(p7 in state2));
|
|
27212
27207
|
target[p7] = value;
|
|
27213
27208
|
return true;
|
|
27214
27209
|
}
|
|
@@ -27243,12 +27238,12 @@ var require_response = __commonJS({
|
|
|
27243
27238
|
body: null
|
|
27244
27239
|
});
|
|
27245
27240
|
} else {
|
|
27246
|
-
|
|
27241
|
+
assert49(false);
|
|
27247
27242
|
}
|
|
27248
27243
|
}
|
|
27249
27244
|
__name(filterResponse, "filterResponse");
|
|
27250
27245
|
function makeAppropriateNetworkError(fetchParams, err = null) {
|
|
27251
|
-
|
|
27246
|
+
assert49(isCancelled(fetchParams));
|
|
27252
27247
|
return isAborted2(fetchParams) ? makeNetworkError(Object.assign(new DOMException("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException("Request was cancelled."), { cause: err }));
|
|
27253
27248
|
}
|
|
27254
27249
|
__name(makeAppropriateNetworkError, "makeAppropriateNetworkError");
|
|
@@ -27382,7 +27377,7 @@ var require_request2 = __commonJS({
|
|
|
27382
27377
|
var { webidl } = require_webidl();
|
|
27383
27378
|
var { URLSerializer } = require_data_url();
|
|
27384
27379
|
var { kConstruct } = require_symbols();
|
|
27385
|
-
var
|
|
27380
|
+
var assert49 = __require("assert");
|
|
27386
27381
|
var { getMaxListeners, setMaxListeners, defaultMaxListeners } = __require("events");
|
|
27387
27382
|
var kAbortController = Symbol("abortController");
|
|
27388
27383
|
var requestFinalizer = new FinalizationRegistry(({ signal, abort }) => {
|
|
@@ -27462,7 +27457,7 @@ var require_request2 = __commonJS({
|
|
|
27462
27457
|
request4 = makeRequest({ urlList: [parsedURL] });
|
|
27463
27458
|
fallbackMode = "cors";
|
|
27464
27459
|
} else {
|
|
27465
|
-
|
|
27460
|
+
assert49(webidl.is.Request(input));
|
|
27466
27461
|
request4 = input.#state;
|
|
27467
27462
|
signal = input.#signal;
|
|
27468
27463
|
this.#dispatcher = init4.dispatcher || input.#dispatcher;
|
|
@@ -28158,7 +28153,7 @@ var require_fetch = __commonJS({
|
|
|
28158
28153
|
createInflate,
|
|
28159
28154
|
extractMimeType
|
|
28160
28155
|
} = require_util2();
|
|
28161
|
-
var
|
|
28156
|
+
var assert49 = __require("assert");
|
|
28162
28157
|
var { safelyExtractBody, extractBody } = require_body();
|
|
28163
28158
|
var {
|
|
28164
28159
|
redirectStatusSet,
|
|
@@ -28241,7 +28236,7 @@ var require_fetch = __commonJS({
|
|
|
28241
28236
|
requestObject.signal,
|
|
28242
28237
|
() => {
|
|
28243
28238
|
locallyAborted = true;
|
|
28244
|
-
|
|
28239
|
+
assert49(controller != null);
|
|
28245
28240
|
controller.abort(requestObject.signal.reason);
|
|
28246
28241
|
const realResponse = responseObject?.deref();
|
|
28247
28242
|
abortFetch(p7, request4, realResponse, requestObject.signal.reason);
|
|
@@ -28347,7 +28342,7 @@ var require_fetch = __commonJS({
|
|
|
28347
28342
|
dispatcher = getGlobalDispatcher2()
|
|
28348
28343
|
// undici
|
|
28349
28344
|
}) {
|
|
28350
|
-
|
|
28345
|
+
assert49(dispatcher);
|
|
28351
28346
|
let taskDestination = null;
|
|
28352
28347
|
let crossOriginIsolatedCapability = false;
|
|
28353
28348
|
if (request4.client != null) {
|
|
@@ -28370,7 +28365,7 @@ var require_fetch = __commonJS({
|
|
|
28370
28365
|
taskDestination,
|
|
28371
28366
|
crossOriginIsolatedCapability
|
|
28372
28367
|
};
|
|
28373
|
-
|
|
28368
|
+
assert49(!request4.body || request4.body.stream);
|
|
28374
28369
|
if (request4.window === "client") {
|
|
28375
28370
|
request4.window = request4.client?.globalObject?.constructor?.name === "Window" ? request4.client : "no-window";
|
|
28376
28371
|
}
|
|
@@ -28458,7 +28453,7 @@ var require_fetch = __commonJS({
|
|
|
28458
28453
|
} else if (request4.responseTainting === "opaque") {
|
|
28459
28454
|
response = filterResponse(response, "opaque");
|
|
28460
28455
|
} else {
|
|
28461
|
-
|
|
28456
|
+
assert49(false);
|
|
28462
28457
|
}
|
|
28463
28458
|
}
|
|
28464
28459
|
let internalResponse = response.status === 0 ? response : response.internalResponse;
|
|
@@ -28691,7 +28686,7 @@ var require_fetch = __commonJS({
|
|
|
28691
28686
|
} else if (request4.redirect === "follow") {
|
|
28692
28687
|
response = await httpRedirectFetch(fetchParams, response);
|
|
28693
28688
|
} else {
|
|
28694
|
-
|
|
28689
|
+
assert49(false);
|
|
28695
28690
|
}
|
|
28696
28691
|
}
|
|
28697
28692
|
response.timingInfo = timingInfo;
|
|
@@ -28745,7 +28740,7 @@ var require_fetch = __commonJS({
|
|
|
28745
28740
|
request4.headersList.delete("host", true);
|
|
28746
28741
|
}
|
|
28747
28742
|
if (request4.body != null) {
|
|
28748
|
-
|
|
28743
|
+
assert49(request4.body.source != null);
|
|
28749
28744
|
request4.body = safelyExtractBody(request4.body.source)[0];
|
|
28750
28745
|
}
|
|
28751
28746
|
const timingInfo = fetchParams.timingInfo;
|
|
@@ -28869,7 +28864,7 @@ var require_fetch = __commonJS({
|
|
|
28869
28864
|
}
|
|
28870
28865
|
__name(httpNetworkOrCacheFetch, "httpNetworkOrCacheFetch");
|
|
28871
28866
|
async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) {
|
|
28872
|
-
|
|
28867
|
+
assert49(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed);
|
|
28873
28868
|
fetchParams.controller.connection = {
|
|
28874
28869
|
abort: null,
|
|
28875
28870
|
destroyed: false,
|
|
@@ -29177,7 +29172,7 @@ var require_fetch = __commonJS({
|
|
|
29177
29172
|
var require_util3 = __commonJS({
|
|
29178
29173
|
"../../node_modules/.pnpm/undici@7.14.0/node_modules/undici/lib/web/cache/util.js"(exports2, module3) {
|
|
29179
29174
|
init_import_meta_url();
|
|
29180
|
-
var
|
|
29175
|
+
var assert49 = __require("assert");
|
|
29181
29176
|
var { URLSerializer } = require_data_url();
|
|
29182
29177
|
var { isValidHeaderName } = require_util2();
|
|
29183
29178
|
function urlEquals(A4, B4, excludeFragment = false) {
|
|
@@ -29187,7 +29182,7 @@ var require_util3 = __commonJS({
|
|
|
29187
29182
|
}
|
|
29188
29183
|
__name(urlEquals, "urlEquals");
|
|
29189
29184
|
function getFieldValues(header) {
|
|
29190
|
-
|
|
29185
|
+
assert49(header !== null);
|
|
29191
29186
|
const values = [];
|
|
29192
29187
|
for (let value of header.split(",")) {
|
|
29193
29188
|
value = value.trim();
|
|
@@ -29209,7 +29204,7 @@ var require_util3 = __commonJS({
|
|
|
29209
29204
|
var require_cache3 = __commonJS({
|
|
29210
29205
|
"../../node_modules/.pnpm/undici@7.14.0/node_modules/undici/lib/web/cache/cache.js"(exports2, module3) {
|
|
29211
29206
|
init_import_meta_url();
|
|
29212
|
-
var
|
|
29207
|
+
var assert49 = __require("assert");
|
|
29213
29208
|
var { kConstruct } = require_symbols();
|
|
29214
29209
|
var { urlEquals, getFieldValues } = require_util3();
|
|
29215
29210
|
var { kEnumerableProperty, isDisturbed } = require_util();
|
|
@@ -29462,7 +29457,7 @@ var require_cache3 = __commonJS({
|
|
|
29462
29457
|
return false;
|
|
29463
29458
|
}
|
|
29464
29459
|
} else {
|
|
29465
|
-
|
|
29460
|
+
assert49(typeof request4 === "string");
|
|
29466
29461
|
r8 = getRequestState(new Request7(request4));
|
|
29467
29462
|
}
|
|
29468
29463
|
const operations = [];
|
|
@@ -29573,7 +29568,7 @@ var require_cache3 = __commonJS({
|
|
|
29573
29568
|
}
|
|
29574
29569
|
for (const requestResponse of requestResponses) {
|
|
29575
29570
|
const idx = cache6.indexOf(requestResponse);
|
|
29576
|
-
|
|
29571
|
+
assert49(idx !== -1);
|
|
29577
29572
|
cache6.splice(idx, 1);
|
|
29578
29573
|
}
|
|
29579
29574
|
} else if (operation.type === "put") {
|
|
@@ -29605,7 +29600,7 @@ var require_cache3 = __commonJS({
|
|
|
29605
29600
|
requestResponses = this.#queryCache(operation.request);
|
|
29606
29601
|
for (const requestResponse of requestResponses) {
|
|
29607
29602
|
const idx = cache6.indexOf(requestResponse);
|
|
29608
|
-
|
|
29603
|
+
assert49(idx !== -1);
|
|
29609
29604
|
cache6.splice(idx, 1);
|
|
29610
29605
|
}
|
|
29611
29606
|
cache6.push([operation.request, operation.response]);
|
|
@@ -30068,7 +30063,7 @@ var require_parse2 = __commonJS({
|
|
|
30068
30063
|
var { maxNameValuePairSize, maxAttributeValueSize } = require_constants4();
|
|
30069
30064
|
var { isCTLExcludingHtab } = require_util4();
|
|
30070
30065
|
var { collectASequenceOfCodePointsFast } = require_data_url();
|
|
30071
|
-
var
|
|
30066
|
+
var assert49 = __require("assert");
|
|
30072
30067
|
var { unescape: unescape3 } = __require("querystring");
|
|
30073
30068
|
function parseSetCookie(header) {
|
|
30074
30069
|
if (isCTLExcludingHtab(header)) {
|
|
@@ -30112,7 +30107,7 @@ var require_parse2 = __commonJS({
|
|
|
30112
30107
|
if (unparsedAttributes.length === 0) {
|
|
30113
30108
|
return cookieAttributeList;
|
|
30114
30109
|
}
|
|
30115
|
-
|
|
30110
|
+
assert49(unparsedAttributes[0] === ";");
|
|
30116
30111
|
unparsedAttributes = unparsedAttributes.slice(1);
|
|
30117
30112
|
let cookieAv = "";
|
|
30118
30113
|
if (unparsedAttributes.includes(";")) {
|
|
@@ -30993,7 +30988,7 @@ var require_connection = __commonJS({
|
|
|
30993
30988
|
var { Headers: Headers5, getHeadersList } = require_headers();
|
|
30994
30989
|
var { getDecodeSplit } = require_util2();
|
|
30995
30990
|
var { WebsocketFrameSend } = require_frame();
|
|
30996
|
-
var
|
|
30991
|
+
var assert49 = __require("assert");
|
|
30997
30992
|
var crypto8;
|
|
30998
30993
|
try {
|
|
30999
30994
|
crypto8 = __require("crypto");
|
|
@@ -31093,7 +31088,7 @@ var require_connection = __commonJS({
|
|
|
31093
31088
|
if (reason.length !== 0 && code === null) {
|
|
31094
31089
|
code = 1e3;
|
|
31095
31090
|
}
|
|
31096
|
-
|
|
31091
|
+
assert49(code === null || Number.isInteger(code));
|
|
31097
31092
|
if (code === null && reason.length === 0) {
|
|
31098
31093
|
frame.frameData = emptyBuffer;
|
|
31099
31094
|
} else if (code !== null && reason === null) {
|
|
@@ -31196,7 +31191,7 @@ var require_receiver = __commonJS({
|
|
|
31196
31191
|
"../../node_modules/.pnpm/undici@7.14.0/node_modules/undici/lib/web/websocket/receiver.js"(exports2, module3) {
|
|
31197
31192
|
init_import_meta_url();
|
|
31198
31193
|
var { Writable: Writable5 } = __require("stream");
|
|
31199
|
-
var
|
|
31194
|
+
var assert49 = __require("assert");
|
|
31200
31195
|
var { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require_constants5();
|
|
31201
31196
|
var {
|
|
31202
31197
|
isValidStatusCode,
|
|
@@ -31436,7 +31431,7 @@ var require_receiver = __commonJS({
|
|
|
31436
31431
|
return output;
|
|
31437
31432
|
}
|
|
31438
31433
|
parseCloseBody(data) {
|
|
31439
|
-
|
|
31434
|
+
assert49(data.length !== 1);
|
|
31440
31435
|
let code;
|
|
31441
31436
|
if (data.length >= 2) {
|
|
31442
31437
|
code = data.readUInt16BE(0);
|
|
@@ -40581,7 +40576,7 @@ var require_signal_exit = __commonJS({
|
|
|
40581
40576
|
};
|
|
40582
40577
|
};
|
|
40583
40578
|
} else {
|
|
40584
|
-
|
|
40579
|
+
assert49 = __require("assert");
|
|
40585
40580
|
signals = require_signals();
|
|
40586
40581
|
isWin = /^win/i.test(process13.platform);
|
|
40587
40582
|
EE = __require("events");
|
|
@@ -40604,7 +40599,7 @@ var require_signal_exit = __commonJS({
|
|
|
40604
40599
|
return function() {
|
|
40605
40600
|
};
|
|
40606
40601
|
}
|
|
40607
|
-
|
|
40602
|
+
assert49.equal(typeof cb2, "function", "a callback must be provided for exit handler");
|
|
40608
40603
|
if (loaded === false) {
|
|
40609
40604
|
load();
|
|
40610
40605
|
}
|
|
@@ -40710,7 +40705,7 @@ var require_signal_exit = __commonJS({
|
|
|
40710
40705
|
}
|
|
40711
40706
|
}, "processEmit");
|
|
40712
40707
|
}
|
|
40713
|
-
var
|
|
40708
|
+
var assert49;
|
|
40714
40709
|
var signals;
|
|
40715
40710
|
var isWin;
|
|
40716
40711
|
var EE;
|
|
@@ -47872,7 +47867,7 @@ function getSourceMappingPrepareStackTrace(retrieveSourceMap) {
|
|
|
47872
47867
|
}
|
|
47873
47868
|
});
|
|
47874
47869
|
sourceMappingPrepareStackTrace = Error.prepareStackTrace;
|
|
47875
|
-
|
|
47870
|
+
assert41__default.default(sourceMappingPrepareStackTrace !== void 0);
|
|
47876
47871
|
Error.prepareStackTrace = originalPrepareStackTrace;
|
|
47877
47872
|
return sourceMappingPrepareStackTrace;
|
|
47878
47873
|
}
|
|
@@ -47915,7 +47910,7 @@ function getSourceMappedString(value, retrieveSourceMap) {
|
|
|
47915
47910
|
}
|
|
47916
47911
|
const callSiteLine = callSiteLines[i6][0];
|
|
47917
47912
|
const callSiteAtIndex = callSiteLine.indexOf("at");
|
|
47918
|
-
|
|
47913
|
+
assert41__default.default(callSiteAtIndex !== -1);
|
|
47919
47914
|
const callSiteLineLeftPad = callSiteLine.substring(0, callSiteAtIndex);
|
|
47920
47915
|
value = value.replace(
|
|
47921
47916
|
callSiteLine,
|
|
@@ -48666,7 +48661,7 @@ var require_rc = __commonJS({
|
|
|
48666
48661
|
"../../node_modules/.pnpm/rc@1.2.8/node_modules/rc/index.js"(exports2, module3) {
|
|
48667
48662
|
init_import_meta_url();
|
|
48668
48663
|
var cc2 = require_utils3();
|
|
48669
|
-
var
|
|
48664
|
+
var join28 = __require("path").join;
|
|
48670
48665
|
var deepExtend = require_deep_extend();
|
|
48671
48666
|
var etc = "/etc";
|
|
48672
48667
|
var win = process.platform === "win32";
|
|
@@ -48692,15 +48687,15 @@ var require_rc = __commonJS({
|
|
|
48692
48687
|
__name(addConfigFile, "addConfigFile");
|
|
48693
48688
|
if (!win)
|
|
48694
48689
|
[
|
|
48695
|
-
|
|
48696
|
-
|
|
48690
|
+
join28(etc, name2, "config"),
|
|
48691
|
+
join28(etc, name2 + "rc")
|
|
48697
48692
|
].forEach(addConfigFile);
|
|
48698
48693
|
if (home)
|
|
48699
48694
|
[
|
|
48700
|
-
|
|
48701
|
-
|
|
48702
|
-
|
|
48703
|
-
|
|
48695
|
+
join28(home, ".config", name2, "config"),
|
|
48696
|
+
join28(home, ".config", name2),
|
|
48697
|
+
join28(home, "." + name2, "config"),
|
|
48698
|
+
join28(home, "." + name2 + "rc")
|
|
48704
48699
|
].forEach(addConfigFile);
|
|
48705
48700
|
addConfigFile(cc2.find("." + name2 + "rc"));
|
|
48706
48701
|
if (env6.config) addConfigFile(env6.config);
|
|
@@ -48911,7 +48906,7 @@ var require_update_check = __commonJS({
|
|
|
48911
48906
|
"../../node_modules/.pnpm/update-check@1.5.4/node_modules/update-check/index.js"(exports2, module3) {
|
|
48912
48907
|
init_import_meta_url();
|
|
48913
48908
|
var { URL: URL8 } = __require("url");
|
|
48914
|
-
var { join:
|
|
48909
|
+
var { join: join28 } = __require("path");
|
|
48915
48910
|
var fs26 = __require("fs");
|
|
48916
48911
|
var { promisify: promisify3 } = __require("util");
|
|
48917
48912
|
var { tmpdir } = __require("os");
|
|
@@ -48923,7 +48918,7 @@ var require_update_check = __commonJS({
|
|
|
48923
48918
|
var encode2 = /* @__PURE__ */ __name((value) => encodeURIComponent(value).replace(/^%40/, "@"), "encode");
|
|
48924
48919
|
var getFile = /* @__PURE__ */ __name(async (details, distTag) => {
|
|
48925
48920
|
const rootDir = tmpdir();
|
|
48926
|
-
const subDir =
|
|
48921
|
+
const subDir = join28(rootDir, "update-check");
|
|
48927
48922
|
if (!fs26.existsSync(subDir)) {
|
|
48928
48923
|
await mkdir5(subDir);
|
|
48929
48924
|
}
|
|
@@ -48931,7 +48926,7 @@ var require_update_check = __commonJS({
|
|
|
48931
48926
|
if (details.scope) {
|
|
48932
48927
|
name2 = `${details.scope}-${name2}`;
|
|
48933
48928
|
}
|
|
48934
|
-
return
|
|
48929
|
+
return join28(subDir, name2);
|
|
48935
48930
|
}, "getFile");
|
|
48936
48931
|
var evaluateCache = /* @__PURE__ */ __name(async (file, time, interval) => {
|
|
48937
48932
|
if (fs26.existsSync(file)) {
|
|
@@ -49066,7 +49061,7 @@ var name, version;
|
|
|
49066
49061
|
var init_package = __esm({
|
|
49067
49062
|
"package.json"() {
|
|
49068
49063
|
name = "wrangler";
|
|
49069
|
-
version = "4.
|
|
49064
|
+
version = "4.48.0";
|
|
49070
49065
|
}
|
|
49071
49066
|
});
|
|
49072
49067
|
|
|
@@ -50330,7 +50325,7 @@ For more details, see https://developers.cloudflare.com/workers/configuration/cr
|
|
|
50330
50325
|
return options;
|
|
50331
50326
|
}
|
|
50332
50327
|
function getImageNameFromDOClassName(options) {
|
|
50333
|
-
|
|
50328
|
+
assert41__default.default(
|
|
50334
50329
|
options.containerBuildId,
|
|
50335
50330
|
"Build ID should be set if containers are defined and enabled"
|
|
50336
50331
|
);
|
|
@@ -50498,8 +50493,8 @@ function createDeferred(previousDeferred) {
|
|
|
50498
50493
|
resolve28 = _resolve;
|
|
50499
50494
|
reject = _reject;
|
|
50500
50495
|
});
|
|
50501
|
-
|
|
50502
|
-
|
|
50496
|
+
assert41__default.default(resolve28);
|
|
50497
|
+
assert41__default.default(reject);
|
|
50503
50498
|
previousDeferred?.resolve(newPromise);
|
|
50504
50499
|
return {
|
|
50505
50500
|
promise: newPromise,
|
|
@@ -51185,8 +51180,8 @@ function readConfig(args, options = {}) {
|
|
|
51185
51180
|
redirected
|
|
51186
51181
|
} = exports.experimental_readRawConfig(args, options);
|
|
51187
51182
|
if (redirected) {
|
|
51188
|
-
|
|
51189
|
-
|
|
51183
|
+
assert41__default.default(configPath, "Redirected config found without a configPath");
|
|
51184
|
+
assert41__default.default(
|
|
51190
51185
|
deployConfigPath,
|
|
51191
51186
|
"Redirected config found without a deployConfigPath"
|
|
51192
51187
|
);
|
|
@@ -51221,8 +51216,8 @@ function readPagesConfig(args, options = {}) {
|
|
|
51221
51216
|
try {
|
|
51222
51217
|
({ rawConfig, configPath, userConfigPath, deployConfigPath, redirected } = exports.experimental_readRawConfig(args, options));
|
|
51223
51218
|
if (redirected) {
|
|
51224
|
-
|
|
51225
|
-
|
|
51219
|
+
assert41__default.default(configPath, "Redirected config found without a configPath");
|
|
51220
|
+
assert41__default.default(
|
|
51226
51221
|
deployConfigPath,
|
|
51227
51222
|
"Redirected config found without a deployConfigPath"
|
|
51228
51223
|
);
|
|
@@ -56261,11 +56256,11 @@ var require_ci_info = __commonJS({
|
|
|
56261
56256
|
exports2.isPR = null;
|
|
56262
56257
|
vendors.forEach(function(vendor) {
|
|
56263
56258
|
const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env];
|
|
56264
|
-
const
|
|
56259
|
+
const isCI3 = envs.every(function(obj) {
|
|
56265
56260
|
return checkEnv(obj);
|
|
56266
56261
|
});
|
|
56267
|
-
exports2[vendor.constant] =
|
|
56268
|
-
if (!
|
|
56262
|
+
exports2[vendor.constant] = isCI3;
|
|
56263
|
+
if (!isCI3) {
|
|
56269
56264
|
return;
|
|
56270
56265
|
}
|
|
56271
56266
|
exports2.name = vendor.name;
|
|
@@ -121722,7 +121717,7 @@ function createCloudflareClient(complianceConfig) {
|
|
|
121722
121717
|
}
|
|
121723
121718
|
async function performApiFetch(complianceConfig, resource, init4 = {}, queryParams, abortSignal, apiToken) {
|
|
121724
121719
|
const method = init4.method ?? "GET";
|
|
121725
|
-
|
|
121720
|
+
assert41__default.default(
|
|
121726
121721
|
resource.startsWith("/"),
|
|
121727
121722
|
`CF API fetch - resource path must start with a "/" but got "${resource}"`
|
|
121728
121723
|
);
|
|
@@ -122273,7 +122268,7 @@ function isReturningFromAuthServer(query) {
|
|
|
122273
122268
|
);
|
|
122274
122269
|
throw new ErrorInvalidReturnedStateParam();
|
|
122275
122270
|
}
|
|
122276
|
-
|
|
122271
|
+
assert41__default.default(!Array.isArray(code));
|
|
122277
122272
|
state2.authorizationCode = code;
|
|
122278
122273
|
state2.hasAuthCodeBeenExchangedForAccessToken = false;
|
|
122279
122274
|
return true;
|
|
@@ -122494,13 +122489,13 @@ async function getOauthToken(options) {
|
|
|
122494
122489
|
if (error2 || closeErr) {
|
|
122495
122490
|
reject(error2 || closeErr);
|
|
122496
122491
|
} else {
|
|
122497
|
-
|
|
122492
|
+
assert41__default.default(token);
|
|
122498
122493
|
resolve28(token);
|
|
122499
122494
|
}
|
|
122500
122495
|
});
|
|
122501
122496
|
}
|
|
122502
122497
|
__name(finish, "finish");
|
|
122503
|
-
|
|
122498
|
+
assert41__default.default(req.url, "This request doesn't have a URL");
|
|
122504
122499
|
const { pathname, query } = Url__default.default.parse(req.url, true);
|
|
122505
122500
|
if (req.method !== "GET") {
|
|
122506
122501
|
return res.end("OK");
|
|
@@ -124756,7 +124751,7 @@ var init_esm6 = __esm({
|
|
|
124756
124751
|
function dedent3(strings, ...values) {
|
|
124757
124752
|
const raw = String.raw({ raw: strings }, ...values);
|
|
124758
124753
|
let lines = raw.split("\n");
|
|
124759
|
-
|
|
124754
|
+
assert41__default.default(lines.length > 0);
|
|
124760
124755
|
if (lines[lines.length - 1].trim() === "") {
|
|
124761
124756
|
lines = lines.slice(0, lines.length - 1);
|
|
124762
124757
|
}
|
|
@@ -124936,12 +124931,12 @@ function getEntryPointFromMetafile(entryFile, metafile) {
|
|
|
124936
124931
|
);
|
|
124937
124932
|
if (entryPoints.length !== 1) {
|
|
124938
124933
|
const entryPointList = entryPoints.map(([_input, output]) => output.entryPoint).join("\n");
|
|
124939
|
-
|
|
124934
|
+
assert41__default.default(
|
|
124940
124935
|
entryPoints.length > 0,
|
|
124941
124936
|
`Cannot find entry-point "${entryFile}" in generated bundle.
|
|
124942
124937
|
${entryPointList}`
|
|
124943
124938
|
);
|
|
124944
|
-
|
|
124939
|
+
assert41__default.default(
|
|
124945
124940
|
entryPoints.length < 2,
|
|
124946
124941
|
`More than one entry-point found for generated bundle.
|
|
124947
124942
|
${entryPointList}`
|
|
@@ -125202,9 +125197,9 @@ function handleNodeJSGlobals(build5, inject, polyfill2) {
|
|
|
125202
125197
|
}));
|
|
125203
125198
|
build5.onLoad({ filter: UNENV_VIRTUAL_MODULE_RE }, ({ path: path77 }) => {
|
|
125204
125199
|
const module3 = virtualModulePathToSpecifier.get(path77);
|
|
125205
|
-
|
|
125200
|
+
assert41__default.default(module3, `Expected ${path77} to be mapped to a module specifier`);
|
|
125206
125201
|
const injects = injectsByModule.get(module3);
|
|
125207
|
-
|
|
125202
|
+
assert41__default.default(injects, `Expected ${module3} to inject values`);
|
|
125208
125203
|
const imports = injects.map(
|
|
125209
125204
|
({ exportName, importName }) => importName === exportName ? exportName : `${exportName} as ${importName}`
|
|
125210
125205
|
);
|
|
@@ -129363,10 +129358,10 @@ var init_CommandRegistry = __esm({
|
|
|
129363
129358
|
* console.log(subtree); // Output: empty Map if 'wrangler hello' has no further subcommands
|
|
129364
129359
|
*/
|
|
129365
129360
|
#resolveDefinitionNode(node2) {
|
|
129366
|
-
|
|
129361
|
+
assert41__default.default(node2.definition);
|
|
129367
129362
|
const chain2 = this.#resolveDefinitionChain(node2.definition);
|
|
129368
129363
|
const resolvedDef = chain2.find((def) => def.type !== "alias");
|
|
129369
|
-
|
|
129364
|
+
assert41__default.default(resolvedDef);
|
|
129370
129365
|
const { subtree } = node2.definition.type !== "alias" ? node2 : this.#findNodeFor(resolvedDef.command) ?? node2;
|
|
129371
129366
|
const definition = {
|
|
129372
129367
|
// take all properties from the resolved alias
|
|
@@ -140103,7 +140098,7 @@ async function deployContainers(config, normalisedContainerConfig, { versionId,
|
|
|
140103
140098
|
"Could not deploy container application as durable object was not found in list of bindings"
|
|
140104
140099
|
);
|
|
140105
140100
|
}
|
|
140106
|
-
|
|
140101
|
+
assert41__default.default(
|
|
140107
140102
|
targetDurableObject.type === "durable_object_namespace" && targetDurableObject.namespace_id !== void 0
|
|
140108
140103
|
);
|
|
140109
140104
|
await apply(
|
|
@@ -140155,7 +140150,7 @@ var init_config5 = __esm({
|
|
|
140155
140150
|
}
|
|
140156
140151
|
const normalizedContainers = [];
|
|
140157
140152
|
for (const container of config.containers) {
|
|
140158
|
-
|
|
140153
|
+
assert41__default.default(container.name, "container name should have been set by validation");
|
|
140159
140154
|
const targetDurableObject = config.durable_objects.bindings.find(
|
|
140160
140155
|
(durableObject) => durableObject.class_name === container.class_name
|
|
140161
140156
|
);
|
|
@@ -140221,12 +140216,12 @@ var init_config5 = __esm({
|
|
|
140221
140216
|
}
|
|
140222
140217
|
const maybeDockerfile = isDockerfile2(container.image, config.configPath);
|
|
140223
140218
|
if (maybeDockerfile) {
|
|
140224
|
-
|
|
140219
|
+
assert41__default.default(
|
|
140225
140220
|
path5__namespace.default.isAbsolute(container.image),
|
|
140226
140221
|
"Dockerfile path should be absolute"
|
|
140227
140222
|
);
|
|
140228
140223
|
const imageBuildContext = container.image_build_context ?? path5.dirname(container.image);
|
|
140229
|
-
|
|
140224
|
+
assert41__default.default(
|
|
140230
140225
|
path5__namespace.default.isAbsolute(imageBuildContext),
|
|
140231
140226
|
"resolved image_build_context should be defined"
|
|
140232
140227
|
);
|
|
@@ -140842,7 +140837,7 @@ async function getKVNamespaceId({ preview, binding, "namespace-id": namespaceId
|
|
|
140842
140837
|
return namespaceId;
|
|
140843
140838
|
} else if (previewIsDefined) {
|
|
140844
140839
|
if (getFlag("RESOURCES_PROVISION")) {
|
|
140845
|
-
|
|
140840
|
+
assert41__default.default(binding);
|
|
140846
140841
|
return getIdFromSettings(config, binding, isLocal2);
|
|
140847
140842
|
}
|
|
140848
140843
|
throw new UserError(
|
|
@@ -140853,7 +140848,7 @@ async function getKVNamespaceId({ preview, binding, "namespace-id": namespaceId
|
|
|
140853
140848
|
if (bindingHasOnlyOneId) {
|
|
140854
140849
|
namespaceId = namespace.id || namespace.preview_id;
|
|
140855
140850
|
} else if (getFlag("RESOURCES_PROVISION") && !namespace.id && !namespace.preview_id) {
|
|
140856
|
-
|
|
140851
|
+
assert41__default.default(binding);
|
|
140857
140852
|
return getIdFromSettings(config, binding, isLocal2);
|
|
140858
140853
|
} else {
|
|
140859
140854
|
throw new UserError(
|
|
@@ -140933,10 +140928,11 @@ var init_helpers3 = __esm({
|
|
|
140933
140928
|
}
|
|
140934
140929
|
});
|
|
140935
140930
|
async function getPackageManager() {
|
|
140936
|
-
const [hasYarn, hasNpm, hasPnpm] = await Promise.all([
|
|
140931
|
+
const [hasYarn, hasNpm, hasPnpm, hasBun] = await Promise.all([
|
|
140937
140932
|
supportsYarn(),
|
|
140938
140933
|
supportsNpm(),
|
|
140939
|
-
supportsPnpm()
|
|
140934
|
+
supportsPnpm(),
|
|
140935
|
+
supportsBun()
|
|
140940
140936
|
]);
|
|
140941
140937
|
const userAgent = sniffUserAgent();
|
|
140942
140938
|
if (userAgent === "npm" && hasNpm) {
|
|
@@ -140948,6 +140944,9 @@ async function getPackageManager() {
|
|
|
140948
140944
|
} else if (userAgent === "yarn" && hasYarn) {
|
|
140949
140945
|
logger.log("Using yarn as package manager.");
|
|
140950
140946
|
return { ...YarnPackageManager };
|
|
140947
|
+
} else if (userAgent === "bun" && hasBun) {
|
|
140948
|
+
logger.log("Using bun as package manager.");
|
|
140949
|
+
return { ...BunPackageManager };
|
|
140951
140950
|
}
|
|
140952
140951
|
if (hasNpm) {
|
|
140953
140952
|
logger.log("Using npm as package manager.");
|
|
@@ -140958,9 +140957,12 @@ async function getPackageManager() {
|
|
|
140958
140957
|
} else if (hasPnpm) {
|
|
140959
140958
|
logger.log("Using pnpm as package manager.");
|
|
140960
140959
|
return { ...PnpmPackageManager };
|
|
140960
|
+
} else if (hasBun) {
|
|
140961
|
+
logger.log("Using bun as package manager.");
|
|
140962
|
+
return { ...BunPackageManager };
|
|
140961
140963
|
} else {
|
|
140962
140964
|
throw new UserError(
|
|
140963
|
-
"Unable to find a package manager. Supported managers are: npm, yarn, and
|
|
140965
|
+
"Unable to find a package manager. Supported managers are: npm, yarn, pnpm, and bun.",
|
|
140964
140966
|
{
|
|
140965
140967
|
telemetryMessage: true
|
|
140966
140968
|
}
|
|
@@ -140984,6 +140986,9 @@ function supportsNpm() {
|
|
|
140984
140986
|
function supportsPnpm() {
|
|
140985
140987
|
return supports("pnpm");
|
|
140986
140988
|
}
|
|
140989
|
+
function supportsBun() {
|
|
140990
|
+
return supports("bun");
|
|
140991
|
+
}
|
|
140987
140992
|
function sniffUserAgent() {
|
|
140988
140993
|
const userAgent = process8.env.npm_config_user_agent;
|
|
140989
140994
|
if (userAgent === void 0) {
|
|
@@ -140995,11 +141000,14 @@ function sniffUserAgent() {
|
|
|
140995
141000
|
if (userAgent.includes("pnpm")) {
|
|
140996
141001
|
return "pnpm";
|
|
140997
141002
|
}
|
|
141003
|
+
if (userAgent.includes("bun")) {
|
|
141004
|
+
return "bun";
|
|
141005
|
+
}
|
|
140998
141006
|
if (userAgent.includes("npm")) {
|
|
140999
141007
|
return "npm";
|
|
141000
141008
|
}
|
|
141001
141009
|
}
|
|
141002
|
-
var NpmPackageManager, PnpmPackageManager, YarnPackageManager;
|
|
141010
|
+
var NpmPackageManager, PnpmPackageManager, YarnPackageManager, BunPackageManager;
|
|
141003
141011
|
var init_package_manager = __esm({
|
|
141004
141012
|
"src/package-manager.ts"() {
|
|
141005
141013
|
init_import_meta_url();
|
|
@@ -141017,12 +141025,17 @@ var init_package_manager = __esm({
|
|
|
141017
141025
|
};
|
|
141018
141026
|
YarnPackageManager = {
|
|
141019
141027
|
type: "yarn",
|
|
141020
|
-
npx: "yarn"
|
|
141028
|
+
npx: "yarn dlx"
|
|
141029
|
+
};
|
|
141030
|
+
BunPackageManager = {
|
|
141031
|
+
type: "bun",
|
|
141032
|
+
npx: "bunx"
|
|
141021
141033
|
};
|
|
141022
141034
|
__name(supports, "supports");
|
|
141023
141035
|
__name(supportsYarn, "supportsYarn");
|
|
141024
141036
|
__name(supportsNpm, "supportsNpm");
|
|
141025
141037
|
__name(supportsPnpm, "supportsPnpm");
|
|
141038
|
+
__name(supportsBun, "supportsBun");
|
|
141026
141039
|
__name(sniffUserAgent, "sniffUserAgent");
|
|
141027
141040
|
}
|
|
141028
141041
|
});
|
|
@@ -142832,7 +142845,7 @@ async function provisionBindings(bindings, accountId, scriptName, autoCreate, co
|
|
|
142832
142845
|
requireRemote
|
|
142833
142846
|
);
|
|
142834
142847
|
if (pendingResources.length > 0) {
|
|
142835
|
-
|
|
142848
|
+
assert41__default.default(
|
|
142836
142849
|
configPath,
|
|
142837
142850
|
"Provisioning resources is not possible without a config file"
|
|
142838
142851
|
);
|
|
@@ -143117,7 +143130,7 @@ var init_bindings2 = __esm({
|
|
|
143117
143130
|
);
|
|
143118
143131
|
}
|
|
143119
143132
|
async isConnectedToExistingResource() {
|
|
143120
|
-
|
|
143133
|
+
assert41__default.default(typeof this.binding.bucket_name !== "symbol");
|
|
143121
143134
|
if (!this.binding.bucket_name) {
|
|
143122
143135
|
return false;
|
|
143123
143136
|
}
|
|
@@ -143197,7 +143210,7 @@ var init_bindings2 = __esm({
|
|
|
143197
143210
|
return false;
|
|
143198
143211
|
}
|
|
143199
143212
|
async isConnectedToExistingResource() {
|
|
143200
|
-
|
|
143213
|
+
assert41__default.default(typeof this.binding.database_name !== "symbol");
|
|
143201
143214
|
if (!this.binding.database_name) {
|
|
143202
143215
|
return false;
|
|
143203
143216
|
}
|
|
@@ -143880,7 +143893,7 @@ function createWorkerUploadForm(worker, options) {
|
|
|
143880
143893
|
const manifestModuleName = "__STATIC_CONTENT_MANIFEST";
|
|
143881
143894
|
const hasManifest = modules?.some(({ name: name2 }) => name2 === manifestModuleName);
|
|
143882
143895
|
if (hasManifest && main2.type === "esm") {
|
|
143883
|
-
|
|
143896
|
+
assert41__default.default(modules !== void 0);
|
|
143884
143897
|
const subDirs = new Set(
|
|
143885
143898
|
modules.map((module3) => path5__namespace.default.posix.dirname(module3.name))
|
|
143886
143899
|
);
|
|
@@ -144100,7 +144113,7 @@ var init_node_compat = __esm({
|
|
|
144100
144113
|
});
|
|
144101
144114
|
async function getMigrationsToUpload(scriptName, props) {
|
|
144102
144115
|
const { config, accountId } = props;
|
|
144103
|
-
|
|
144116
|
+
assert41__default.default(accountId, "Missing accountId");
|
|
144104
144117
|
let migrations;
|
|
144105
144118
|
if (config.migrations.length > 0) {
|
|
144106
144119
|
let script;
|
|
@@ -144373,7 +144386,7 @@ async function syncWorkersSite(complianceConfig, accountId, scriptName, siteAsse
|
|
|
144373
144386
|
logger.log("(Note: doing a dry run, not uploading or deleting anything.)");
|
|
144374
144387
|
return { manifest: void 0, namespace: void 0 };
|
|
144375
144388
|
}
|
|
144376
|
-
|
|
144389
|
+
assert41__default.default(accountId, "Missing accountId");
|
|
144377
144390
|
const title = `__${scriptName}-workers_sites_assets${preview ? "_preview" : ""}`;
|
|
144378
144391
|
const { id: namespace } = await createKVNamespaceIfNotAlreadyExisting(
|
|
144379
144392
|
complianceConfig,
|
|
@@ -145383,13 +145396,25 @@ async function downloadWorkerConfig(workerName, environment, entrypoint, account
|
|
|
145383
145396
|
serviceEnvMetadata,
|
|
145384
145397
|
cronTriggers
|
|
145385
145398
|
} = await fetchWorkerConfig(accountId, workerName, environment);
|
|
145386
|
-
return constructWranglerConfig(
|
|
145399
|
+
return constructWranglerConfig({
|
|
145400
|
+
name: workerName,
|
|
145401
|
+
entrypoint,
|
|
145402
|
+
compatibility_date: serviceEnvMetadata.script.compatibility_date,
|
|
145403
|
+
compatibility_flags: serviceEnvMetadata.script.compatibility_flags,
|
|
145404
|
+
tags: serviceEnvMetadata.script.tags,
|
|
145405
|
+
migration_tag: serviceEnvMetadata.script.migration_tag,
|
|
145406
|
+
tail_consumers: serviceEnvMetadata.script.tail_consumers,
|
|
145407
|
+
observability: serviceEnvMetadata.script.observability,
|
|
145408
|
+
limits: serviceEnvMetadata.script.limits,
|
|
145387
145409
|
bindings,
|
|
145388
145410
|
routes,
|
|
145389
|
-
customDomains,
|
|
145390
|
-
subdomainStatus,
|
|
145391
|
-
|
|
145392
|
-
|
|
145411
|
+
domains: customDomains,
|
|
145412
|
+
subdomain: subdomainStatus,
|
|
145413
|
+
schedules: cronTriggers.schedules.map((s6) => ({
|
|
145414
|
+
cron: s6.cron
|
|
145415
|
+
})),
|
|
145416
|
+
placement: serviceEnvMetadata.script.placement_mode ? { mode: serviceEnvMetadata.script.placement_mode } : void 0,
|
|
145417
|
+
logpush: void 0
|
|
145393
145418
|
});
|
|
145394
145419
|
}
|
|
145395
145420
|
var init_download_worker_config = __esm({
|
|
@@ -153543,33 +153568,14 @@ var init_apply = __esm({
|
|
|
153543
153568
|
}
|
|
153544
153569
|
});
|
|
153545
153570
|
|
|
153546
|
-
// src/
|
|
153571
|
+
// src/utils/strings.ts
|
|
153547
153572
|
function capitalize(str) {
|
|
153548
153573
|
return str.length > 0 ? str[0].toUpperCase() + str.substring(1) : str;
|
|
153549
153574
|
}
|
|
153550
|
-
|
|
153551
|
-
|
|
153552
|
-
return bgYellow("PLACING");
|
|
153553
|
-
}
|
|
153554
|
-
const mappings = {
|
|
153555
|
-
placed: bgYellow,
|
|
153556
|
-
running: bgGreen,
|
|
153557
|
-
stopped: bgYellow,
|
|
153558
|
-
stopping: bgYellow,
|
|
153559
|
-
failed: bgRed,
|
|
153560
|
-
unhealthy: bgRed
|
|
153561
|
-
};
|
|
153562
|
-
if (!(status2 in mappings)) {
|
|
153563
|
-
return bgYellow(status2);
|
|
153564
|
-
}
|
|
153565
|
-
return mappings[status2](status2.toUpperCase());
|
|
153566
|
-
}
|
|
153567
|
-
var init_util = __esm({
|
|
153568
|
-
"src/cloudchamber/cli/util.ts"() {
|
|
153575
|
+
var init_strings = __esm({
|
|
153576
|
+
"src/utils/strings.ts"() {
|
|
153569
153577
|
init_import_meta_url();
|
|
153570
|
-
init_colors();
|
|
153571
153578
|
__name(capitalize, "capitalize");
|
|
153572
|
-
__name(statusToColored, "statusToColored");
|
|
153573
153579
|
}
|
|
153574
153580
|
});
|
|
153575
153581
|
|
|
@@ -153860,9 +153866,9 @@ var init_cli2 = __esm({
|
|
|
153860
153866
|
init_interactive();
|
|
153861
153867
|
init_containers_shared();
|
|
153862
153868
|
init_dist();
|
|
153869
|
+
init_strings();
|
|
153863
153870
|
init_wrap();
|
|
153864
153871
|
init_locations7();
|
|
153865
|
-
init_util();
|
|
153866
153872
|
__name(pollRegistriesUntilCondition, "pollRegistriesUntilCondition");
|
|
153867
153873
|
__name(pollSSHKeysUntilCondition, "pollSSHKeysUntilCondition");
|
|
153868
153874
|
__name(pollDeploymentUntilCondition, "pollDeploymentUntilCondition");
|
|
@@ -154797,6 +154803,32 @@ var init_curl = __esm({
|
|
|
154797
154803
|
__name(requestFromCmd, "requestFromCmd");
|
|
154798
154804
|
}
|
|
154799
154805
|
});
|
|
154806
|
+
|
|
154807
|
+
// src/cloudchamber/cli/util.ts
|
|
154808
|
+
function statusToColored(status2) {
|
|
154809
|
+
if (!status2) {
|
|
154810
|
+
return bgYellow("PLACING");
|
|
154811
|
+
}
|
|
154812
|
+
const mappings = {
|
|
154813
|
+
placed: bgYellow,
|
|
154814
|
+
running: bgGreen,
|
|
154815
|
+
stopped: bgYellow,
|
|
154816
|
+
stopping: bgYellow,
|
|
154817
|
+
failed: bgRed,
|
|
154818
|
+
unhealthy: bgRed
|
|
154819
|
+
};
|
|
154820
|
+
if (!(status2 in mappings)) {
|
|
154821
|
+
return bgYellow(status2);
|
|
154822
|
+
}
|
|
154823
|
+
return mappings[status2](status2.toUpperCase());
|
|
154824
|
+
}
|
|
154825
|
+
var init_util = __esm({
|
|
154826
|
+
"src/cloudchamber/cli/util.ts"() {
|
|
154827
|
+
init_import_meta_url();
|
|
154828
|
+
init_colors();
|
|
154829
|
+
__name(statusToColored, "statusToColored");
|
|
154830
|
+
}
|
|
154831
|
+
});
|
|
154800
154832
|
function ipv6(placement) {
|
|
154801
154833
|
if (!placement) {
|
|
154802
154834
|
return yellow("no ipv6 yet");
|
|
@@ -155317,6 +155349,7 @@ var init_list2 = __esm({
|
|
|
155317
155349
|
init_containers_shared();
|
|
155318
155350
|
init_is_interactive();
|
|
155319
155351
|
init_logger();
|
|
155352
|
+
init_strings();
|
|
155320
155353
|
init_deployments3();
|
|
155321
155354
|
init_util();
|
|
155322
155355
|
init_common();
|
|
@@ -167409,7 +167442,7 @@ async function handleError(e8, args, subCommandParts) {
|
|
|
167409
167442
|
if (e8.cause instanceof ApiError) {
|
|
167410
167443
|
logger.error(e8.cause);
|
|
167411
167444
|
} else {
|
|
167412
|
-
|
|
167445
|
+
assert41__default.default(isAuthenticationError(e8));
|
|
167413
167446
|
logger.error(e8);
|
|
167414
167447
|
}
|
|
167415
167448
|
const envAuth = getAuthFromEnv();
|
|
@@ -168089,7 +168122,7 @@ async function executeLocally({
|
|
|
168089
168122
|
} finally {
|
|
168090
168123
|
await mf.dispose();
|
|
168091
168124
|
}
|
|
168092
|
-
|
|
168125
|
+
assert41__default.default(Array.isArray(results));
|
|
168093
168126
|
const allResults = results.map((result) => ({
|
|
168094
168127
|
results: (result.results ?? []).map(
|
|
168095
168128
|
(row) => Object.fromEntries(
|
|
@@ -170035,7 +170068,7 @@ var init_delete3 = __esm({
|
|
|
170035
170068
|
logger.log(`--dry-run: exiting now.`);
|
|
170036
170069
|
return;
|
|
170037
170070
|
}
|
|
170038
|
-
|
|
170071
|
+
assert41__default.default(accountId, "Missing accountId");
|
|
170039
170072
|
const confirmed = args.force || await confirm(
|
|
170040
170073
|
`Are you sure you want to delete ${scriptName}? This action cannot be undone.`
|
|
170041
170074
|
);
|
|
@@ -179771,9 +179804,9 @@ var require_bugsnag = __commonJS({
|
|
|
179771
179804
|
}, true);
|
|
179772
179805
|
}, "load")
|
|
179773
179806
|
};
|
|
179774
|
-
var ___require_29 = __require("path"),
|
|
179807
|
+
var ___require_29 = __require("path"), join28 = ___require_29.join, resolve28 = ___require_29.resolve;
|
|
179775
179808
|
var _$pathNormalizer_29 = /* @__PURE__ */ __name(function(p7) {
|
|
179776
|
-
return
|
|
179809
|
+
return join28(resolve28(p7), "/");
|
|
179777
179810
|
}, "_$pathNormalizer_29");
|
|
179778
179811
|
var _$inProject_44 = {
|
|
179779
179812
|
load: /* @__PURE__ */ __name(function(client) {
|
|
@@ -183497,6 +183530,7 @@ var init_frameworks2 = __esm({
|
|
|
183497
183530
|
get configured() {
|
|
183498
183531
|
return false;
|
|
183499
183532
|
}
|
|
183533
|
+
configurationDescription;
|
|
183500
183534
|
};
|
|
183501
183535
|
}
|
|
183502
183536
|
});
|
|
@@ -183522,7 +183556,7 @@ var init_astro2 = __esm({
|
|
|
183522
183556
|
`via \`${npx} astro add cloudflare\``
|
|
183523
183557
|
)}`
|
|
183524
183558
|
});
|
|
183525
|
-
|
|
183559
|
+
fs25.writeFileSync("public/.assetsignore", "_worker.js\n_routes.json");
|
|
183526
183560
|
return {
|
|
183527
183561
|
main: `${outputDir}/_worker.js/index.js`,
|
|
183528
183562
|
compatibility_flags: ["nodejs_compat", "global_fetch_strictly_public"],
|
|
@@ -183535,6 +183569,7 @@ var init_astro2 = __esm({
|
|
|
183535
183569
|
}
|
|
183536
183570
|
};
|
|
183537
183571
|
}
|
|
183572
|
+
configurationDescription = 'Configuring project for Astro with "astro add cloudflare"';
|
|
183538
183573
|
};
|
|
183539
183574
|
}
|
|
183540
183575
|
});
|
|
@@ -183747,13 +183782,15 @@ async function confirmAutoConfigDetails(autoConfigDetails) {
|
|
|
183747
183782
|
}
|
|
183748
183783
|
);
|
|
183749
183784
|
updatedAutoConfigDetails.outputDir = outputDir;
|
|
183750
|
-
|
|
183751
|
-
|
|
183752
|
-
|
|
183753
|
-
|
|
183754
|
-
|
|
183755
|
-
|
|
183756
|
-
|
|
183785
|
+
if (autoConfigDetails.buildCommand || autoConfigDetails.packageJson) {
|
|
183786
|
+
const buildCommand3 = await prompt(
|
|
183787
|
+
"What is your application's build command?",
|
|
183788
|
+
{
|
|
183789
|
+
defaultValue: autoConfigDetails.buildCommand ?? ""
|
|
183790
|
+
}
|
|
183791
|
+
);
|
|
183792
|
+
updatedAutoConfigDetails.buildCommand = buildCommand3;
|
|
183793
|
+
}
|
|
183757
183794
|
return updatedAutoConfigDetails;
|
|
183758
183795
|
}
|
|
183759
183796
|
var MultipleFrameworksError, invalidWorkerNameCharsRegex, invalidWorkerNameStartEndRegex, workerNameLengthLimit;
|
|
@@ -184017,7 +184054,7 @@ var init_packages2 = __esm({
|
|
|
184017
184054
|
const pkgJsonPath = path5__namespace.default.join(process.cwd(), "package.json");
|
|
184018
184055
|
const pkgJson = parsePackageJSON(readFileSync(pkgJsonPath), pkgJsonPath);
|
|
184019
184056
|
const deps = config.dev ? pkgJson.devDependencies : pkgJson.dependencies;
|
|
184020
|
-
|
|
184057
|
+
assert41__default.default(deps, "dependencies should be defined");
|
|
184021
184058
|
for (const pkg of packages) {
|
|
184022
184059
|
const versionMarker = pkg.lastIndexOf("@");
|
|
184023
184060
|
if (versionMarker > 0) {
|
|
@@ -184065,34 +184102,58 @@ async function runAutoConfig(autoConfigDetails) {
|
|
|
184065
184102
|
heading: "Updated Project Settings:"
|
|
184066
184103
|
});
|
|
184067
184104
|
}
|
|
184068
|
-
|
|
184069
|
-
"Do you want to proceed with the deployment using these settings?"
|
|
184070
|
-
);
|
|
184071
|
-
if (!deploy3) {
|
|
184072
|
-
throw new FatalError("Deployment aborted");
|
|
184073
|
-
}
|
|
184105
|
+
autoConfigDetails = updatedAutoConfigDetails;
|
|
184074
184106
|
if (!autoConfigDetails.outputDir) {
|
|
184075
184107
|
throw new FatalError("Cannot deploy project without an output directory");
|
|
184076
184108
|
}
|
|
184109
|
+
const baseWranglerConfig = {
|
|
184110
|
+
$schema: "node_modules/wrangler/config-schema.json",
|
|
184111
|
+
name: autoConfigDetails.workerName,
|
|
184112
|
+
compatibility_date: getDevCompatibilityDate(void 0),
|
|
184113
|
+
observability: {
|
|
184114
|
+
enabled: true
|
|
184115
|
+
}
|
|
184116
|
+
};
|
|
184117
|
+
const { confirmed, modifications } = await buildAndConfirmOperationsSummary(
|
|
184118
|
+
autoConfigDetails,
|
|
184119
|
+
baseWranglerConfig
|
|
184120
|
+
);
|
|
184121
|
+
if (!confirmed) {
|
|
184122
|
+
throw new FatalError("Deployment aborted");
|
|
184123
|
+
}
|
|
184077
184124
|
logger.debug(
|
|
184078
184125
|
`Running autoconfig with:
|
|
184079
184126
|
${JSON.stringify(autoConfigDetails, null, 2)}...`
|
|
184080
184127
|
);
|
|
184081
184128
|
startSection("Configuring your application for Cloudflare");
|
|
184082
|
-
|
|
184129
|
+
if (modifications.wranglerInstall) {
|
|
184130
|
+
await installWrangler();
|
|
184131
|
+
}
|
|
184132
|
+
if (modifications.typegenScriptAddition) {
|
|
184133
|
+
assert41__default.default(autoConfigDetails.packageJson);
|
|
184134
|
+
await fs13.writeFile(
|
|
184135
|
+
path5.resolve(autoConfigDetails.projectPath, "package.json"),
|
|
184136
|
+
JSON.stringify(
|
|
184137
|
+
{
|
|
184138
|
+
...autoConfigDetails.packageJson,
|
|
184139
|
+
scripts: {
|
|
184140
|
+
...autoConfigDetails.packageJson.scripts,
|
|
184141
|
+
[typeGenScript.key]: typeGenScript.value
|
|
184142
|
+
}
|
|
184143
|
+
},
|
|
184144
|
+
null,
|
|
184145
|
+
2
|
|
184146
|
+
)
|
|
184147
|
+
);
|
|
184148
|
+
}
|
|
184083
184149
|
const additionalConfigDetails = await autoConfigDetails.framework?.configure(
|
|
184084
184150
|
autoConfigDetails.outputDir
|
|
184085
184151
|
) ?? {};
|
|
184086
184152
|
await fs13.writeFile(
|
|
184087
|
-
path5.resolve("wrangler.jsonc"),
|
|
184153
|
+
path5.resolve(autoConfigDetails.projectPath, "wrangler.jsonc"),
|
|
184088
184154
|
JSON.stringify(
|
|
184089
184155
|
{
|
|
184090
|
-
|
|
184091
|
-
name: autoConfigDetails.workerName,
|
|
184092
|
-
compatibility_date: getDevCompatibilityDate(void 0),
|
|
184093
|
-
observability: {
|
|
184094
|
-
enabled: true
|
|
184095
|
-
},
|
|
184156
|
+
...baseWranglerConfig,
|
|
184096
184157
|
...additionalConfigDetails
|
|
184097
184158
|
},
|
|
184098
184159
|
null,
|
|
@@ -184126,6 +184187,46 @@ ${JSON.stringify(autoConfigDetails, null, 2)}...`
|
|
|
184126
184187
|
);
|
|
184127
184188
|
return;
|
|
184128
184189
|
}
|
|
184190
|
+
function usesTypescript(projectPath) {
|
|
184191
|
+
return fs25.existsSync(path5.join(projectPath, `tsconfig.json`));
|
|
184192
|
+
}
|
|
184193
|
+
async function buildAndConfirmOperationsSummary(autoConfigDetails, wranglerConfigToWrite) {
|
|
184194
|
+
const modifications = {
|
|
184195
|
+
wranglerInstall: false,
|
|
184196
|
+
typegenScriptAddition: false
|
|
184197
|
+
};
|
|
184198
|
+
if (autoConfigDetails.packageJson) {
|
|
184199
|
+
modifications.wranglerInstall = true;
|
|
184200
|
+
}
|
|
184201
|
+
logger.log("");
|
|
184202
|
+
if (modifications.wranglerInstall) {
|
|
184203
|
+
logger.log("\u{1F4E6} Install packages:");
|
|
184204
|
+
logger.log(` - wrangler (devDependency)`);
|
|
184205
|
+
logger.log("");
|
|
184206
|
+
}
|
|
184207
|
+
if (modifications.typegenScriptAddition) {
|
|
184208
|
+
logger.log("\u{1F4DD} Update package.json scripts:");
|
|
184209
|
+
logger.log(` - "${typeGenScript.key}": "${typeGenScript.value}"`);
|
|
184210
|
+
logger.log("");
|
|
184211
|
+
}
|
|
184212
|
+
logger.log("\u{1F4C4} Create wrangler.jsonc:");
|
|
184213
|
+
logger.log(
|
|
184214
|
+
" " + JSON.stringify(wranglerConfigToWrite, null, 2).replace(/\n/g, "\n ")
|
|
184215
|
+
);
|
|
184216
|
+
logger.log("");
|
|
184217
|
+
if (autoConfigDetails.framework && !(autoConfigDetails.framework instanceof Static) && !autoConfigDetails.framework.configured) {
|
|
184218
|
+
logger.log(
|
|
184219
|
+
`\u{1F6E0}\uFE0F ${autoConfigDetails.framework.configurationDescription ?? `Configuring project for ${capitalize(autoConfigDetails.framework.name)}`}`
|
|
184220
|
+
);
|
|
184221
|
+
logger.log("");
|
|
184222
|
+
}
|
|
184223
|
+
const proceedWithSetup = await confirm("Proceed with setup?");
|
|
184224
|
+
return {
|
|
184225
|
+
confirmed: proceedWithSetup,
|
|
184226
|
+
modifications
|
|
184227
|
+
};
|
|
184228
|
+
}
|
|
184229
|
+
var typeGenScript;
|
|
184129
184230
|
var init_run = __esm({
|
|
184130
184231
|
"src/autoconfig/run.ts"() {
|
|
184131
184232
|
init_import_meta_url();
|
|
@@ -184136,11 +184237,19 @@ var init_run = __esm({
|
|
|
184136
184237
|
init_logger();
|
|
184137
184238
|
init_metrics2();
|
|
184138
184239
|
init_compatibility_date();
|
|
184240
|
+
init_strings();
|
|
184139
184241
|
init_add_wrangler_assetsignore();
|
|
184140
184242
|
init_add_wrangler_gitignore();
|
|
184141
184243
|
init_packages2();
|
|
184142
184244
|
init_details2();
|
|
184245
|
+
init_static();
|
|
184143
184246
|
__name(runAutoConfig, "runAutoConfig");
|
|
184247
|
+
__name(usesTypescript, "usesTypescript");
|
|
184248
|
+
typeGenScript = {
|
|
184249
|
+
key: "cf-typegen",
|
|
184250
|
+
value: "wrangler typegen"
|
|
184251
|
+
};
|
|
184252
|
+
__name(buildAndConfirmOperationsSummary, "buildAndConfirmOperationsSummary");
|
|
184144
184253
|
}
|
|
184145
184254
|
});
|
|
184146
184255
|
async function guessWorkerFormat(entryFile, entryWorkingDirectory, tsconfig) {
|
|
@@ -184746,6 +184855,7 @@ var init_deploy4 = __esm({
|
|
|
184746
184855
|
describe: "Experimental: Enable The Deployment Remote Diff check",
|
|
184747
184856
|
type: "boolean",
|
|
184748
184857
|
hidden: true,
|
|
184858
|
+
default: true,
|
|
184749
184859
|
alias: ["x-remote-diff-check"]
|
|
184750
184860
|
},
|
|
184751
184861
|
strict: {
|
|
@@ -184850,7 +184960,7 @@ var init_deploy4 = __esm({
|
|
|
184850
184960
|
);
|
|
184851
184961
|
}
|
|
184852
184962
|
if (!args.dryRun) {
|
|
184853
|
-
|
|
184963
|
+
assert41__default.default(accountId, "Missing account ID");
|
|
184854
184964
|
await verifyWorkerMatchesCITag(
|
|
184855
184965
|
config,
|
|
184856
184966
|
accountId,
|
|
@@ -185127,8 +185237,8 @@ async function runSearch(searchTerm) {
|
|
|
185127
185237
|
hitsPerPage: "1",
|
|
185128
185238
|
getRankingInfo: "0"
|
|
185129
185239
|
});
|
|
185130
|
-
|
|
185131
|
-
|
|
185240
|
+
assert41__default.default(id, "Missing Algolia App ID");
|
|
185241
|
+
assert41__default.default(key, "Missing Algolia Key");
|
|
185132
185242
|
const searchResp = await (0, import_undici14.fetch)(
|
|
185133
185243
|
`https://${id}-dsn.algolia.net/1/indexes/${index}/query`,
|
|
185134
185244
|
{
|
|
@@ -186592,7 +186702,7 @@ This action is irreversible and will permanently delete all data in the KV names
|
|
|
186592
186702
|
}
|
|
186593
186703
|
namespaceId = namespace.id;
|
|
186594
186704
|
}
|
|
186595
|
-
|
|
186705
|
+
assert41.strict(namespaceId, "namespaceId should be defined");
|
|
186596
186706
|
logger.log(`Renaming KV namespace ${namespaceId} to "${args.newName}".`);
|
|
186597
186707
|
const updatedNamespace = await updateKVNamespace(
|
|
186598
186708
|
config,
|
|
@@ -227543,7 +227653,7 @@ async function generateR2ServiceToken(accountId, bucketName, pipelineName) {
|
|
|
227543
227653
|
const timeoutPromise = promises.setTimeout(12e4, "timeout", { signal });
|
|
227544
227654
|
const serverPromise = new Promise((resolve28, reject) => {
|
|
227545
227655
|
const server = http__namespace.default.createServer(async (request4, response) => {
|
|
227546
|
-
|
|
227656
|
+
assert41__default.default(request4.url, "This request doesn't have a URL");
|
|
227547
227657
|
if (request4.method !== "GET") {
|
|
227548
227658
|
response.writeHead(405);
|
|
227549
227659
|
response.end("Method not allowed.");
|
|
@@ -238151,13 +238261,13 @@ ${ZERO_WIDTH_SPACE} Message: ${version5.annotations?.["workers/message"]
|
|
|
238151
238261
|
},
|
|
238152
238262
|
renderers: {
|
|
238153
238263
|
submit({ value: versionIds }) {
|
|
238154
|
-
|
|
238264
|
+
assert41__default.default(Array.isArray(versionIds));
|
|
238155
238265
|
const label = brandColor(
|
|
238156
238266
|
`${versionIds.length} Worker Version(s) selected`
|
|
238157
238267
|
);
|
|
238158
238268
|
const versions2 = versionIds?.map((versionId, i6) => {
|
|
238159
238269
|
const version5 = versionCache.get(versionId);
|
|
238160
|
-
|
|
238270
|
+
assert41__default.default(version5);
|
|
238161
238271
|
return `${grayBar}
|
|
238162
238272
|
${leftT} ${white(` Worker Version ${i6 + 1}: `, version5.id)}
|
|
238163
238273
|
${grayBar} ${gray(" Created: ", version5.metadata.created_on)}
|
|
@@ -238779,7 +238889,7 @@ var init_list12 = __esm({
|
|
|
238779
238889
|
const formattedDeployments = deployments.map((deployment) => {
|
|
238780
238890
|
const formattedVersions = deployment.versions.map((traffic) => {
|
|
238781
238891
|
const version5 = versionCache.get(traffic.version_id);
|
|
238782
|
-
|
|
238892
|
+
assert41__default.default(version5);
|
|
238783
238893
|
const percentage = brandColor(`(${traffic.percentage}%)`);
|
|
238784
238894
|
const details = formatLabelledValues(
|
|
238785
238895
|
{
|
|
@@ -238884,7 +238994,7 @@ var init_status3 = __esm({
|
|
|
238884
238994
|
);
|
|
238885
238995
|
const formattedVersions = latestDeployment.versions.map((traffic) => {
|
|
238886
238996
|
const version5 = versionCache.get(traffic.version_id);
|
|
238887
|
-
|
|
238997
|
+
assert41__default.default(version5);
|
|
238888
238998
|
const percentage = brandColor(`(${traffic.percentage}%)`);
|
|
238889
238999
|
const details = formatLabelledValues(
|
|
238890
239000
|
{
|
|
@@ -239958,7 +240068,7 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
|
|
|
239958
240068
|
workerBundle = createWorkerUploadForm(worker);
|
|
239959
240069
|
printBindings({ ...bindings, vars: maskedVars }, config.tail_consumers);
|
|
239960
240070
|
} else {
|
|
239961
|
-
|
|
240071
|
+
assert41__default.default(accountId, "Missing accountId");
|
|
239962
240072
|
if (getFlag("RESOURCES_PROVISION")) {
|
|
239963
240073
|
await provisionBindings(
|
|
239964
240074
|
bindings,
|
|
@@ -240409,7 +240519,7 @@ var init_upload5 = __esm({
|
|
|
240409
240519
|
}
|
|
240410
240520
|
const previewAlias = args.previewAlias ?? (getCIGeneratePreviewAlias() === "true" ? generatePreviewAlias(name2) : void 0);
|
|
240411
240521
|
if (!args.dryRun) {
|
|
240412
|
-
|
|
240522
|
+
assert41__default.default(accountId, "Missing account ID");
|
|
240413
240523
|
await verifyWorkerMatchesCITag(
|
|
240414
240524
|
config,
|
|
240415
240525
|
accountId,
|
|
@@ -246882,10 +246992,10 @@ var require_difflib = __commonJS({
|
|
|
246882
246992
|
"../../node_modules/.pnpm/@ewoudenberg+difflib@0.1.0/node_modules/@ewoudenberg/difflib/lib/difflib.js"(exports2) {
|
|
246883
246993
|
init_import_meta_url();
|
|
246884
246994
|
(function() {
|
|
246885
|
-
var Differ, Heap, IS_CHARACTER_JUNK, IS_LINE_JUNK, SequenceMatcher, _any, _arrayCmp, _calculateRatio, _countLeading, _formatRangeContext, _formatRangeUnified, _has,
|
|
246995
|
+
var Differ, Heap, IS_CHARACTER_JUNK, IS_LINE_JUNK, SequenceMatcher, _any, _arrayCmp, _calculateRatio, _countLeading, _formatRangeContext, _formatRangeUnified, _has, assert49, contextDiff, floor, getCloseMatches, max, min, ndiff, restore, unifiedDiff, indexOf = [].indexOf;
|
|
246886
246996
|
({ floor, max, min } = Math);
|
|
246887
246997
|
Heap = require_heap2();
|
|
246888
|
-
|
|
246998
|
+
assert49 = __require("assert");
|
|
246889
246999
|
_calculateRatio = /* @__PURE__ */ __name(function(matches, length) {
|
|
246890
247000
|
if (length) {
|
|
246891
247001
|
return 2 * matches / length;
|
|
@@ -247456,7 +247566,7 @@ var require_difflib = __commonJS({
|
|
|
247456
247566
|
}
|
|
247457
247567
|
_plainReplace(a6, alo, ahi, b7, blo, bhi) {
|
|
247458
247568
|
var first, g7, l7, len, len1, line, lines, m7, ref, second;
|
|
247459
|
-
|
|
247569
|
+
assert49(alo < ahi && blo < bhi);
|
|
247460
247570
|
if (bhi - blo < ahi - alo) {
|
|
247461
247571
|
first = this._dump("+", b7, blo, bhi);
|
|
247462
247572
|
second = this._dump("-", a6, alo, ahi);
|
|
@@ -249021,19 +249131,91 @@ function normalizeLocalResolvedConfigAsRemote(localResolvedConfig) {
|
|
|
249021
249131
|
localResolvedConfig.routes ?? []
|
|
249022
249132
|
);
|
|
249023
249133
|
const normalizedConfig = {
|
|
249024
|
-
...localResolvedConfig,
|
|
249134
|
+
...structuredClone(localResolvedConfig),
|
|
249025
249135
|
workers_dev: subdomainValues.workers_dev,
|
|
249026
249136
|
preview_urls: subdomainValues.preview_urls,
|
|
249027
249137
|
observability: normalizeObservability(localResolvedConfig.observability)
|
|
249028
249138
|
};
|
|
249139
|
+
removeRemoteConfigFieldFromBindings(normalizedConfig);
|
|
249029
249140
|
return normalizedConfig;
|
|
249030
249141
|
}
|
|
249142
|
+
function removeRemoteConfigFieldFromBindings(normalizedConfig) {
|
|
249143
|
+
for (const bindingField of [
|
|
249144
|
+
"kv_namespaces",
|
|
249145
|
+
"r2_buckets",
|
|
249146
|
+
"d1_databases"
|
|
249147
|
+
]) {
|
|
249148
|
+
if (normalizedConfig[bindingField]?.length) {
|
|
249149
|
+
normalizedConfig[bindingField] = normalizedConfig[bindingField].map(
|
|
249150
|
+
({ remote: _5, ...binding }) => binding
|
|
249151
|
+
);
|
|
249152
|
+
}
|
|
249153
|
+
}
|
|
249154
|
+
if (normalizedConfig.services?.length) {
|
|
249155
|
+
normalizedConfig.services = normalizedConfig.services.map(
|
|
249156
|
+
({ remote: _5, ...binding }) => binding
|
|
249157
|
+
);
|
|
249158
|
+
}
|
|
249159
|
+
if (normalizedConfig.vpc_services?.length) {
|
|
249160
|
+
normalizedConfig.vpc_services = normalizedConfig.vpc_services.map(
|
|
249161
|
+
({ remote: _5, ...binding }) => binding
|
|
249162
|
+
);
|
|
249163
|
+
}
|
|
249164
|
+
if (normalizedConfig.workflows?.length) {
|
|
249165
|
+
normalizedConfig.workflows = normalizedConfig.workflows.map(
|
|
249166
|
+
({ remote: _5, ...binding }) => binding
|
|
249167
|
+
);
|
|
249168
|
+
}
|
|
249169
|
+
if (normalizedConfig.dispatch_namespaces?.length) {
|
|
249170
|
+
normalizedConfig.dispatch_namespaces = normalizedConfig.dispatch_namespaces.map(
|
|
249171
|
+
({ remote: _5, ...binding }) => binding
|
|
249172
|
+
);
|
|
249173
|
+
}
|
|
249174
|
+
if (normalizedConfig.mtls_certificates?.length) {
|
|
249175
|
+
normalizedConfig.mtls_certificates = normalizedConfig.mtls_certificates.map(
|
|
249176
|
+
({ remote: _5, ...binding }) => binding
|
|
249177
|
+
);
|
|
249178
|
+
}
|
|
249179
|
+
if (normalizedConfig.pipelines?.length) {
|
|
249180
|
+
normalizedConfig.pipelines = normalizedConfig.pipelines.map(
|
|
249181
|
+
({ remote: _5, ...binding }) => binding
|
|
249182
|
+
);
|
|
249183
|
+
}
|
|
249184
|
+
if (normalizedConfig.vectorize?.length) {
|
|
249185
|
+
normalizedConfig.vectorize = normalizedConfig.vectorize.map(
|
|
249186
|
+
({ remote: _5, ...binding }) => binding
|
|
249187
|
+
);
|
|
249188
|
+
}
|
|
249189
|
+
if (normalizedConfig.queues?.producers?.length) {
|
|
249190
|
+
normalizedConfig.queues.producers = normalizedConfig.queues.producers.map(
|
|
249191
|
+
({ remote: _5, ...binding }) => binding
|
|
249192
|
+
);
|
|
249193
|
+
}
|
|
249194
|
+
if (normalizedConfig.send_email) {
|
|
249195
|
+
normalizedConfig.send_email = normalizedConfig.send_email.map(
|
|
249196
|
+
({ remote: _5, ...binding }) => binding
|
|
249197
|
+
);
|
|
249198
|
+
}
|
|
249199
|
+
const singleBindingFields = ["browser", "ai", "images", "media"];
|
|
249200
|
+
for (const singleBindingField of singleBindingFields) {
|
|
249201
|
+
if (normalizedConfig[singleBindingField] && "remote" in normalizedConfig[singleBindingField]) {
|
|
249202
|
+
delete normalizedConfig[singleBindingField].remote;
|
|
249203
|
+
}
|
|
249204
|
+
}
|
|
249205
|
+
}
|
|
249031
249206
|
function normalizeObservability(obs) {
|
|
249032
249207
|
const normalized = structuredClone(obs);
|
|
249208
|
+
const enabled = obs?.enabled === true ? true : false;
|
|
249033
249209
|
const fullObservabilityDefaults = {
|
|
249034
|
-
enabled
|
|
249210
|
+
enabled,
|
|
249035
249211
|
head_sampling_rate: 1,
|
|
249036
|
-
logs: {
|
|
249212
|
+
logs: {
|
|
249213
|
+
enabled,
|
|
249214
|
+
head_sampling_rate: 1,
|
|
249215
|
+
invocation_logs: true,
|
|
249216
|
+
persist: true
|
|
249217
|
+
},
|
|
249218
|
+
traces: { enabled: false, persist: true, head_sampling_rate: 1 }
|
|
249037
249219
|
};
|
|
249038
249220
|
if (!normalized) {
|
|
249039
249221
|
return fullObservabilityDefaults;
|
|
@@ -249070,19 +249252,6 @@ function normalizeRemoteConfigAsResolvedLocal(remoteConfig, localResolvedConfig)
|
|
|
249070
249252
|
normalizedRemote[key] = value;
|
|
249071
249253
|
}
|
|
249072
249254
|
});
|
|
249073
|
-
if (normalizedRemote.observability) {
|
|
249074
|
-
if (normalizedRemote.observability.head_sampling_rate === 1 && localResolvedConfig.observability?.head_sampling_rate === void 0) {
|
|
249075
|
-
delete normalizedRemote.observability.head_sampling_rate;
|
|
249076
|
-
}
|
|
249077
|
-
if (normalizedRemote.observability.logs) {
|
|
249078
|
-
if (normalizedRemote.observability.logs.head_sampling_rate === 1 && localResolvedConfig.observability?.logs?.head_sampling_rate === void 0) {
|
|
249079
|
-
delete normalizedRemote.observability.logs.head_sampling_rate;
|
|
249080
|
-
}
|
|
249081
|
-
if (normalizedRemote.observability.logs.invocation_logs === true && localResolvedConfig.observability?.logs?.invocation_logs === void 0) {
|
|
249082
|
-
delete normalizedRemote.observability.logs.invocation_logs;
|
|
249083
|
-
}
|
|
249084
|
-
}
|
|
249085
|
-
}
|
|
249086
249255
|
normalizedRemote.observability = normalizeObservability(
|
|
249087
249256
|
normalizedRemote.observability
|
|
249088
249257
|
);
|
|
@@ -249134,10 +249303,10 @@ function populateConfigPatch(diff, patchObj, targetEnvironment) {
|
|
|
249134
249303
|
return;
|
|
249135
249304
|
}
|
|
249136
249305
|
if (Array.isArray(diff)) {
|
|
249137
|
-
|
|
249306
|
+
assert41__default.default(Array.isArray(patchObj));
|
|
249138
249307
|
return populateConfigPatchArray(diff, patchObj);
|
|
249139
249308
|
}
|
|
249140
|
-
|
|
249309
|
+
assert41__default.default(!Array.isArray(patchObj));
|
|
249141
249310
|
return populateConfigPatchObject(diff, patchObj, targetEnvironment);
|
|
249142
249311
|
}
|
|
249143
249312
|
function populateConfigPatchArray(diff, patchArray) {
|
|
@@ -249219,6 +249388,7 @@ var init_config_diffs = __esm({
|
|
|
249219
249388
|
init_diff_json();
|
|
249220
249389
|
__name(getRemoteConfigDiff, "getRemoteConfigDiff");
|
|
249221
249390
|
__name(normalizeLocalResolvedConfigAsRemote, "normalizeLocalResolvedConfigAsRemote");
|
|
249391
|
+
__name(removeRemoteConfigFieldFromBindings, "removeRemoteConfigFieldFromBindings");
|
|
249222
249392
|
__name(normalizeObservability, "normalizeObservability");
|
|
249223
249393
|
__name(normalizeRemoteConfigAsResolvedLocal, "normalizeRemoteConfigAsResolvedLocal");
|
|
249224
249394
|
__name(orderObjectFields, "orderObjectFields");
|
|
@@ -249452,7 +249622,7 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
|
|
|
249452
249622
|
);
|
|
249453
249623
|
}
|
|
249454
249624
|
const scriptName = props.name;
|
|
249455
|
-
|
|
249625
|
+
assert41__default.default(
|
|
249456
249626
|
!config.site || config.site.bucket,
|
|
249457
249627
|
"A [site] definition requires a `bucket` field with a path to the site's assets directory."
|
|
249458
249628
|
);
|
|
@@ -249730,7 +249900,7 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
|
|
|
249730
249900
|
{ warnIfNoBindings: true }
|
|
249731
249901
|
);
|
|
249732
249902
|
} else {
|
|
249733
|
-
|
|
249903
|
+
assert41__default.default(accountId, "Missing accountId");
|
|
249734
249904
|
if (getFlag("RESOURCES_PROVISION")) {
|
|
249735
249905
|
await provisionBindings(
|
|
249736
249906
|
bindings,
|
|
@@ -249923,7 +250093,7 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
|
|
|
249923
250093
|
return { versionId, workerTag };
|
|
249924
250094
|
}
|
|
249925
250095
|
if (normalisedContainerConfig.length) {
|
|
249926
|
-
|
|
250096
|
+
assert41__default.default(versionId && accountId);
|
|
249927
250097
|
await deployContainers(config, normalisedContainerConfig, {
|
|
249928
250098
|
versionId,
|
|
249929
250099
|
accountId,
|
|
@@ -250442,7 +250612,7 @@ var init_assets5 = __esm({
|
|
|
250442
250612
|
MAX_UPLOAD_GATEWAY_ERRORS2 = 5;
|
|
250443
250613
|
MAX_DIFF_LINES2 = 100;
|
|
250444
250614
|
syncAssets = /* @__PURE__ */ __name(async (complianceConfig, accountId, assetDirectory, scriptName, dispatchNamespace) => {
|
|
250445
|
-
|
|
250615
|
+
assert41__default.default(accountId, "Missing accountId");
|
|
250446
250616
|
logger.info("\u{1F300} Building list of assets...");
|
|
250447
250617
|
const manifest = await buildAssetManifest(assetDirectory);
|
|
250448
250618
|
const url4 = dispatchNamespace ? `/accounts/${accountId}/workers/dispatch/namespaces/${dispatchNamespace}/scripts/${scriptName}/assets-upload-session` : `/accounts/${accountId}/workers/scripts/${scriptName}/assets-upload-session`;
|
|
@@ -251181,7 +251351,7 @@ var init_dev2 = __esm({
|
|
|
251181
251351
|
},
|
|
251182
251352
|
async handler(args) {
|
|
251183
251353
|
const devInstance = await startDev(args);
|
|
251184
|
-
|
|
251354
|
+
assert41__default.default(devInstance.devEnv !== void 0);
|
|
251185
251355
|
await events__default.default.once(devInstance.devEnv, "teardown");
|
|
251186
251356
|
await Promise.all(devInstance.secondary.map((d7) => d7.teardown()));
|
|
251187
251357
|
if (devInstance.teardownRegistryPromise) {
|
|
@@ -251253,7 +251423,7 @@ function runBuild({
|
|
|
251253
251423
|
async function updateBundle() {
|
|
251254
251424
|
const newAdditionalModules = await getAdditionalModules();
|
|
251255
251425
|
setBundle((previousBundle) => {
|
|
251256
|
-
|
|
251426
|
+
assert41__default.default(
|
|
251257
251427
|
previousBundle,
|
|
251258
251428
|
"Rebuild triggered with no previous build available"
|
|
251259
251429
|
);
|
|
@@ -251403,7 +251573,7 @@ var init_BundlerController = __esm({
|
|
|
251403
251573
|
if (buildAborter.signal.aborted) {
|
|
251404
251574
|
return;
|
|
251405
251575
|
}
|
|
251406
|
-
|
|
251576
|
+
assert41__default.default(this.#tmpDir);
|
|
251407
251577
|
if (!config.build?.bundle) {
|
|
251408
251578
|
const destinationDir = this.#tmpDir.path;
|
|
251409
251579
|
fs25.writeFileSync(
|
|
@@ -251514,7 +251684,7 @@ var init_BundlerController = __esm({
|
|
|
251514
251684
|
return;
|
|
251515
251685
|
}
|
|
251516
251686
|
const pathsToWatch = config.build.custom.watch;
|
|
251517
|
-
|
|
251687
|
+
assert41__default.default(pathsToWatch, "config.build.custom.watch");
|
|
251518
251688
|
this.#customBuildWatcher = watch(pathsToWatch, {
|
|
251519
251689
|
persistent: true,
|
|
251520
251690
|
// The initial custom build is always done in getEntry()
|
|
@@ -251538,7 +251708,7 @@ var init_BundlerController = __esm({
|
|
|
251538
251708
|
if (config.build?.custom?.command) {
|
|
251539
251709
|
return;
|
|
251540
251710
|
}
|
|
251541
|
-
|
|
251711
|
+
assert41__default.default(this.#tmpDir);
|
|
251542
251712
|
const entry = {
|
|
251543
251713
|
file: config.entrypoint,
|
|
251544
251714
|
projectRoot: config.projectRoot,
|
|
@@ -251810,7 +251980,27 @@ async function getPorts(options) {
|
|
|
251810
251980
|
}
|
|
251811
251981
|
throw new Error("No available ports found");
|
|
251812
251982
|
}
|
|
251813
|
-
|
|
251983
|
+
function portNumbers(from, to) {
|
|
251984
|
+
if (!Number.isInteger(from) || !Number.isInteger(to)) {
|
|
251985
|
+
throw new TypeError("`from` and `to` must be integer numbers");
|
|
251986
|
+
}
|
|
251987
|
+
if (from < minPort || from > maxPort) {
|
|
251988
|
+
throw new RangeError(`'from' must be between ${minPort} and ${maxPort}`);
|
|
251989
|
+
}
|
|
251990
|
+
if (to < minPort || to > maxPort) {
|
|
251991
|
+
throw new RangeError(`'to' must be between ${minPort} and ${maxPort}`);
|
|
251992
|
+
}
|
|
251993
|
+
if (from > to) {
|
|
251994
|
+
throw new RangeError("`to` must be greater than or equal to `from`");
|
|
251995
|
+
}
|
|
251996
|
+
const generator = /* @__PURE__ */ __name(function* (from2, to2) {
|
|
251997
|
+
for (let port = from2; port <= to2; port++) {
|
|
251998
|
+
yield port;
|
|
251999
|
+
}
|
|
252000
|
+
}, "generator");
|
|
252001
|
+
return generator(from, to);
|
|
252002
|
+
}
|
|
252003
|
+
var Locked, lockedPorts, releaseOldLockedPortsIntervalMs, minPort, maxPort, timeout, getLocalHosts, checkAvailablePort, getAvailablePort, portCheckSequence;
|
|
251814
252004
|
var init_get_port = __esm({
|
|
251815
252005
|
"../../node_modules/.pnpm/get-port@7.0.0/node_modules/get-port/index.js"() {
|
|
251816
252006
|
init_import_meta_url();
|
|
@@ -251827,6 +252017,8 @@ var init_get_port = __esm({
|
|
|
251827
252017
|
young: /* @__PURE__ */ new Set()
|
|
251828
252018
|
};
|
|
251829
252019
|
releaseOldLockedPortsIntervalMs = 1e3 * 15;
|
|
252020
|
+
minPort = 1024;
|
|
252021
|
+
maxPort = 65535;
|
|
251830
252022
|
getLocalHosts = /* @__PURE__ */ __name(() => {
|
|
251831
252023
|
const interfaces = os8__namespace.default.networkInterfaces();
|
|
251832
252024
|
const results = /* @__PURE__ */ new Set([void 0, "0.0.0.0"]);
|
|
@@ -251870,6 +252062,7 @@ var init_get_port = __esm({
|
|
|
251870
252062
|
yield 0;
|
|
251871
252063
|
}, "portCheckSequence");
|
|
251872
252064
|
__name(getPorts, "getPorts");
|
|
252065
|
+
__name(portNumbers, "portNumbers");
|
|
251873
252066
|
}
|
|
251874
252067
|
});
|
|
251875
252068
|
|
|
@@ -251882,14 +252075,23 @@ function memoizeGetPort(defaultPort, host) {
|
|
|
251882
252075
|
portValue = void 0;
|
|
251883
252076
|
cachedHost = forHost;
|
|
251884
252077
|
}
|
|
251885
|
-
portValue = portValue ?? await getPorts({
|
|
252078
|
+
portValue = portValue ?? await getPorts({
|
|
252079
|
+
port: portNumbers(
|
|
252080
|
+
defaultPort,
|
|
252081
|
+
defaultPort + NUM_CONSECUTIVE_PORTS_TO_PROBE
|
|
252082
|
+
),
|
|
252083
|
+
host
|
|
252084
|
+
});
|
|
251886
252085
|
return portValue;
|
|
251887
252086
|
};
|
|
251888
252087
|
}
|
|
252088
|
+
var import_is_ci4, NUM_CONSECUTIVE_PORTS_TO_PROBE;
|
|
251889
252089
|
var init_memoizeGetPort = __esm({
|
|
251890
252090
|
"src/utils/memoizeGetPort.ts"() {
|
|
251891
252091
|
init_import_meta_url();
|
|
251892
252092
|
init_get_port();
|
|
252093
|
+
import_is_ci4 = __toESM(require_is_ci());
|
|
252094
|
+
NUM_CONSECUTIVE_PORTS_TO_PROBE = import_is_ci4.default ? 0 : 10;
|
|
251893
252095
|
__name(memoizeGetPort, "memoizeGetPort");
|
|
251894
252096
|
}
|
|
251895
252097
|
});
|
|
@@ -251927,7 +252129,7 @@ async function resolveDevConfig(config, input) {
|
|
|
251927
252129
|
);
|
|
251928
252130
|
if (input.dev?.remote) {
|
|
251929
252131
|
const { accountId } = await auth();
|
|
251930
|
-
|
|
252132
|
+
assert41__default.default(accountId, "Account ID must be provided for remote dev");
|
|
251931
252133
|
await getZoneIdForPreview(config, { host, routes, accountId });
|
|
251932
252134
|
}
|
|
251933
252135
|
const initialIp = input.dev?.server?.hostname ?? config.dev.ip;
|
|
@@ -252246,7 +252448,7 @@ var init_ConfigController = __esm({
|
|
|
252246
252448
|
return;
|
|
252247
252449
|
}
|
|
252248
252450
|
logger.debug(`${path5__namespace.default.basename(configPath)} changed...`);
|
|
252249
|
-
|
|
252451
|
+
assert41__default.default(
|
|
252250
252452
|
this.latestInput,
|
|
252251
252453
|
"Cannot be watching config without having first set an input"
|
|
252252
252454
|
);
|
|
@@ -252272,7 +252474,7 @@ var init_ConfigController = __esm({
|
|
|
252272
252474
|
}
|
|
252273
252475
|
patch(input) {
|
|
252274
252476
|
logger.debug("patching config");
|
|
252275
|
-
|
|
252477
|
+
assert41__default.default(
|
|
252276
252478
|
this.latestInput,
|
|
252277
252479
|
"Cannot call updateConfig without previously calling setConfig"
|
|
252278
252480
|
);
|
|
@@ -252435,7 +252637,7 @@ function maybeGetSourceMappingURL(sourcePath) {
|
|
|
252435
252637
|
return;
|
|
252436
252638
|
}
|
|
252437
252639
|
const sourceMappingURLMatch = source.substring(sourceMappingURLIndex).match(/^\/\/# sourceMappingURL=(.+)/);
|
|
252438
|
-
|
|
252640
|
+
assert41__default.default(sourceMappingURLMatch !== null);
|
|
252439
252641
|
const sourceMappingURLSpecifier = sourceMappingURLMatch[1];
|
|
252440
252642
|
const sourceURL = Url.pathToFileURL(sourcePath);
|
|
252441
252643
|
try {
|
|
@@ -271003,7 +271205,7 @@ var init_ProxyController = __esm({
|
|
|
271003
271205
|
if (this._torndown) {
|
|
271004
271206
|
return;
|
|
271005
271207
|
}
|
|
271006
|
-
|
|
271208
|
+
assert41__default.default(this.latestConfig !== void 0);
|
|
271007
271209
|
const cert = this.latestConfig.dev?.server?.secure || this.inspectorEnabled && this.latestConfig.dev?.inspector && this.latestConfig.dev?.inspector?.secure ? getHttpsOptions(
|
|
271008
271210
|
this.latestConfig.dev.server?.httpsKeyPath,
|
|
271009
271211
|
this.latestConfig.dev.server?.httpsCertPath
|
|
@@ -271062,7 +271264,7 @@ var init_ProxyController = __esm({
|
|
|
271062
271264
|
liveReload: false
|
|
271063
271265
|
};
|
|
271064
271266
|
if (this.inspectorEnabled) {
|
|
271065
|
-
|
|
271267
|
+
assert41__default.default(this.latestConfig.dev?.inspector);
|
|
271066
271268
|
proxyWorkerOptions.workers.push({
|
|
271067
271269
|
name: "InspectorProxyWorker",
|
|
271068
271270
|
compatibilityDate: "2023-12-18",
|
|
@@ -271126,7 +271328,7 @@ var init_ProxyController = __esm({
|
|
|
271126
271328
|
inspectorUrl
|
|
271127
271329
|
]);
|
|
271128
271330
|
}).then(([url4, inspectorUrl]) => {
|
|
271129
|
-
|
|
271331
|
+
assert41__default.default(url4);
|
|
271130
271332
|
this.emitReadyEvent(proxyWorker, url4, inspectorUrl);
|
|
271131
271333
|
}).catch((error2) => {
|
|
271132
271334
|
if (this._torndown) {
|
|
@@ -271143,7 +271345,7 @@ var init_ProxyController = __esm({
|
|
|
271143
271345
|
if (this._torndown) {
|
|
271144
271346
|
return;
|
|
271145
271347
|
}
|
|
271146
|
-
|
|
271348
|
+
assert41__default.default(
|
|
271147
271349
|
this.latestConfig?.dev.inspector !== false,
|
|
271148
271350
|
"Trying to reconnect with inspector proxy worker when inspector is disabled"
|
|
271149
271351
|
);
|
|
@@ -271154,7 +271356,7 @@ var init_ProxyController = __esm({
|
|
|
271154
271356
|
this.inspectorProxyWorkerWebSocket = createDeferred();
|
|
271155
271357
|
let webSocket = null;
|
|
271156
271358
|
try {
|
|
271157
|
-
|
|
271359
|
+
assert41__default.default(this.proxyWorker);
|
|
271158
271360
|
const inspectorProxyWorkerUrl = await this.proxyWorker.unsafeGetDirectURL(
|
|
271159
271361
|
"InspectorProxyWorker"
|
|
271160
271362
|
);
|
|
@@ -271173,12 +271375,12 @@ var init_ProxyController = __esm({
|
|
|
271173
271375
|
this.emitErrorEvent("Could not connect to InspectorProxyWorker", error2);
|
|
271174
271376
|
return;
|
|
271175
271377
|
}
|
|
271176
|
-
|
|
271378
|
+
assert41__default.default(
|
|
271177
271379
|
webSocket,
|
|
271178
271380
|
"Expected webSocket on response from inspectorProxyWorker"
|
|
271179
271381
|
);
|
|
271180
271382
|
webSocket.addEventListener("message", (event) => {
|
|
271181
|
-
|
|
271383
|
+
assert41__default.default(typeof event.data === "string");
|
|
271182
271384
|
this.onInspectorProxyWorkerMessage(JSON.parse(event.data));
|
|
271183
271385
|
});
|
|
271184
271386
|
webSocket.addEventListener("close", () => {
|
|
@@ -271233,13 +271435,13 @@ var init_ProxyController = __esm({
|
|
|
271233
271435
|
if (this._torndown) {
|
|
271234
271436
|
return;
|
|
271235
271437
|
}
|
|
271236
|
-
|
|
271438
|
+
assert41__default.default(
|
|
271237
271439
|
this.latestConfig?.dev.inspector !== false,
|
|
271238
271440
|
"Trying to send message to inspector proxy worker when inspector is disabled"
|
|
271239
271441
|
);
|
|
271240
271442
|
try {
|
|
271241
271443
|
const websocket = await this.reconnectInspectorProxyWorker();
|
|
271242
|
-
|
|
271444
|
+
assert41__default.default(websocket);
|
|
271243
271445
|
websocket.send(JSON.stringify(message));
|
|
271244
271446
|
} catch (cause) {
|
|
271245
271447
|
if (this._torndown) {
|
|
@@ -271309,7 +271511,7 @@ var init_ProxyController = __esm({
|
|
|
271309
271511
|
}
|
|
271310
271512
|
}
|
|
271311
271513
|
onInspectorProxyWorkerMessage(message) {
|
|
271312
|
-
|
|
271514
|
+
assert41__default.default(
|
|
271313
271515
|
this.latestConfig?.dev.inspector !== false,
|
|
271314
271516
|
"Trying to handle inspector message when inspector is disabled"
|
|
271315
271517
|
);
|
|
@@ -271332,7 +271534,7 @@ var init_ProxyController = __esm({
|
|
|
271332
271534
|
}
|
|
271333
271535
|
}
|
|
271334
271536
|
async onInspectorProxyWorkerRequest(message) {
|
|
271335
|
-
|
|
271537
|
+
assert41__default.default(
|
|
271336
271538
|
this.latestConfig?.dev.inspector !== false,
|
|
271337
271539
|
"Trying to handle inspector request when inspector is disabled"
|
|
271338
271540
|
);
|
|
@@ -271353,8 +271555,8 @@ var init_ProxyController = __esm({
|
|
|
271353
271555
|
logger.debug("[InspectorProxyWorker]", ...message.args);
|
|
271354
271556
|
break;
|
|
271355
271557
|
case "load-network-resource": {
|
|
271356
|
-
|
|
271357
|
-
|
|
271558
|
+
assert41__default.default(this.latestConfig !== void 0);
|
|
271559
|
+
assert41__default.default(this.latestBundle !== void 0);
|
|
271358
271560
|
let maybeContents;
|
|
271359
271561
|
if (message.url.startsWith("wrangler-file:")) {
|
|
271360
271562
|
maybeContents = maybeHandleNetworkLoadResource(
|
|
@@ -271618,7 +271820,7 @@ var init_create_worker_preview = __esm({
|
|
|
271618
271820
|
}
|
|
271619
271821
|
});
|
|
271620
271822
|
function handlePreviewSessionUploadError(err, accountId) {
|
|
271621
|
-
|
|
271823
|
+
assert41__default.default(err && typeof err === "object");
|
|
271622
271824
|
if (!isAbortError(err)) {
|
|
271623
271825
|
if ("code" in err && err.code === 10049) {
|
|
271624
271826
|
logger.log("Preview token expired, fetching a new one");
|
|
@@ -271630,7 +271832,7 @@ function handlePreviewSessionUploadError(err, accountId) {
|
|
|
271630
271832
|
return false;
|
|
271631
271833
|
}
|
|
271632
271834
|
function handlePreviewSessionCreationError(err, accountId) {
|
|
271633
|
-
|
|
271835
|
+
assert41__default.default(err && typeof err === "object");
|
|
271634
271836
|
if ("code" in err && err.code === 10063) {
|
|
271635
271837
|
logger.error(
|
|
271636
271838
|
`You need to register a workers.dev subdomain before running the dev command in remote mode. You can either enable local mode by pressing l, or register a workers.dev subdomain here: https://dash.cloudflare.com/${accountId}/workers/onboarding`
|
|
@@ -272131,7 +272333,7 @@ function createWorkerObject(devEnv) {
|
|
|
272131
272333
|
return devEnv.proxy.ready.promise.then((ev) => ev.inspectorUrl);
|
|
272132
272334
|
},
|
|
272133
272335
|
get config() {
|
|
272134
|
-
|
|
272336
|
+
assert41__default.default(devEnv.config.latestConfig);
|
|
272135
272337
|
return devEnv.config.latestConfig;
|
|
272136
272338
|
},
|
|
272137
272339
|
async setConfig(config, throwErrors) {
|
|
@@ -272146,7 +272348,7 @@ function createWorkerObject(devEnv) {
|
|
|
272146
272348
|
return proxyWorker.dispatchFetch(...args);
|
|
272147
272349
|
},
|
|
272148
272350
|
async queue(...args) {
|
|
272149
|
-
|
|
272351
|
+
assert41__default.default(
|
|
272150
272352
|
this.config.name,
|
|
272151
272353
|
"Worker name must be defined to use `Worker.queue()`"
|
|
272152
272354
|
);
|
|
@@ -272155,7 +272357,7 @@ function createWorkerObject(devEnv) {
|
|
|
272155
272357
|
return w7.queue(...args);
|
|
272156
272358
|
},
|
|
272157
272359
|
async scheduled(...args) {
|
|
272158
|
-
|
|
272360
|
+
assert41__default.default(
|
|
272159
272361
|
this.config.name,
|
|
272160
272362
|
"Worker name must be defined to use `Worker.scheduled()`"
|
|
272161
272363
|
);
|
|
@@ -272488,7 +272690,7 @@ function getAuthHook(auth, config) {
|
|
|
272488
272690
|
}
|
|
272489
272691
|
function deepStrictEqual(source, target) {
|
|
272490
272692
|
try {
|
|
272491
|
-
|
|
272693
|
+
assert41__default.default.deepStrictEqual(source, target);
|
|
272492
272694
|
return true;
|
|
272493
272695
|
} catch {
|
|
272494
272696
|
return false;
|
|
@@ -272717,7 +272919,7 @@ var init_LocalRuntimeController = __esm({
|
|
|
272717
272919
|
}
|
|
272718
272920
|
if (data.config.containers?.length && data.config.dev.enableContainers && this.#currentContainerBuildId !== data.config.dev.containerBuildId) {
|
|
272719
272921
|
this.dockerPath = data.config.dev?.dockerPath ?? getDockerPath();
|
|
272720
|
-
|
|
272922
|
+
assert41__default.default(
|
|
272721
272923
|
data.config.dev.containerBuildId,
|
|
272722
272924
|
"Build ID should be set if containers are enabled and defined"
|
|
272723
272925
|
);
|
|
@@ -272846,7 +273048,7 @@ var init_LocalRuntimeController = __esm({
|
|
|
272846
273048
|
if (!this.containerImageTagsSeen.size) {
|
|
272847
273049
|
return;
|
|
272848
273050
|
}
|
|
272849
|
-
|
|
273051
|
+
assert41__default.default(
|
|
272850
273052
|
this.dockerPath,
|
|
272851
273053
|
"Docker path should have been set if containers are enabled"
|
|
272852
273054
|
);
|
|
@@ -272955,7 +273157,7 @@ var init_MultiworkerRuntimeController = __esm({
|
|
|
272955
273157
|
}
|
|
272956
273158
|
#mergedMfOptions() {
|
|
272957
273159
|
const primary = [...this.#options.values()].find((o6) => o6.primary);
|
|
272958
|
-
|
|
273160
|
+
assert41__default.default(primary !== void 0);
|
|
272959
273161
|
const secondary = [...this.#options.values()].filter((o6) => !o6.primary);
|
|
272960
273162
|
return {
|
|
272961
273163
|
...primary.options,
|
|
@@ -272990,7 +273192,7 @@ var init_MultiworkerRuntimeController = __esm({
|
|
|
272990
273192
|
}
|
|
272991
273193
|
if (data.config.containers?.length && this.#currentContainerBuildId !== data.config.dev.containerBuildId) {
|
|
272992
273194
|
logger.log(source_default.dim("\u2394 Preparing container image(s)..."));
|
|
272993
|
-
|
|
273195
|
+
assert41__default.default(
|
|
272994
273196
|
data.config.dev.containerBuildId,
|
|
272995
273197
|
"Build ID should be set if containers are enabled and defined"
|
|
272996
273198
|
);
|
|
@@ -275626,12 +275828,12 @@ var init_assets6 = __esm({
|
|
|
275626
275828
|
* by the `fetch()` function before calling `dispatcher.dispatch()`.
|
|
275627
275829
|
*/
|
|
275628
275830
|
static reinstateHostHeader(headers, host) {
|
|
275629
|
-
|
|
275630
|
-
|
|
275831
|
+
assert41__default.default(headers, "Expected all proxy requests to contain headers.");
|
|
275832
|
+
assert41__default.default(
|
|
275631
275833
|
!Array.isArray(headers),
|
|
275632
275834
|
"Expected proxy request headers to be a hash object"
|
|
275633
275835
|
);
|
|
275634
|
-
|
|
275836
|
+
assert41__default.default(
|
|
275635
275837
|
Object.keys(headers).every((h7) => h7.toLowerCase() !== "host"),
|
|
275636
275838
|
"Expected Host header to have been deleted."
|
|
275637
275839
|
);
|
|
@@ -275663,7 +275865,7 @@ async function startDev(args) {
|
|
|
275663
275865
|
unregisterHotKeys?.();
|
|
275664
275866
|
accountId = await requireAuth(config);
|
|
275665
275867
|
if (hotkeysDisplayed) {
|
|
275666
|
-
|
|
275868
|
+
assert41__default.default(devEnv !== void 0);
|
|
275667
275869
|
unregisterHotKeys = registerDevHotKeys(
|
|
275668
275870
|
Array.isArray(devEnv) ? devEnv : [devEnv],
|
|
275669
275871
|
args,
|