create-cloudflare 2.72.12 → 2.72.13
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/dist/cli.js +709 -531
- package/package.json +7 -7
- package/templates/analog/c3.ts +1 -0
- package/templates/angular/pages/c3.ts +1 -0
- package/templates/angular/workers/c3.ts +1 -0
- package/templates/docusaurus/pages/c3.ts +1 -0
- package/templates/docusaurus/workers/c3.ts +1 -0
- package/templates/gatsby/pages/c3.ts +1 -0
- package/templates/gatsby/workers/c3.ts +1 -0
- package/templates/hello-world-assets-only/c3.ts +1 -0
- package/templates/hono/pages/c3.ts +1 -0
- package/templates/hono/workers/c3.ts +1 -0
- package/templates/next/c3.ts +1 -0
- package/templates/next/experimental_c3.ts +1 -0
- package/templates/nuxt/pages/c3.ts +1 -0
- package/templates/nuxt/workers/c3.ts +1 -0
- package/templates/openapi/c3.ts +1 -0
- package/templates/pre-existing/c3.ts +1 -0
- package/templates/qwik/pages/c3.ts +1 -0
- package/templates/qwik/workers/c3.ts +1 -0
- package/templates/react/pages/c3.ts +1 -0
- package/templates/react-router/c3.ts +1 -0
- package/templates/redwood/c3.ts +1 -0
- package/templates/solid/c3.ts +1 -0
- package/templates/svelte/pages/c3.ts +1 -0
- package/templates/svelte/workers/c3.ts +1 -0
- package/templates/tanstack-start/c3.ts +1 -0
- package/templates/vike/c3.ts +1 -0
- package/templates/vike/experimental-c3.ts +1 -0
- package/templates/vue/pages/c3.ts +1 -0
- package/templates/waku/c3.ts +1 -0
- package/templates/waku/experimental-c3.ts +1 -0
package/dist/cli.js
CHANGED
|
@@ -43,11 +43,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
43
43
|
));
|
|
44
44
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
45
45
|
|
|
46
|
-
// ../workers-utils/dist/chunk-
|
|
47
|
-
var __create2, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __getProtoOf2, __hasOwnProp2, __name, __require, __commonJS2, __export2, __copyProps2, __toESM2;
|
|
48
|
-
var
|
|
49
|
-
"../workers-utils/dist/chunk-
|
|
46
|
+
// ../workers-utils/dist/chunk-U6NEESU5.mjs
|
|
47
|
+
var import_node_module, import_meta, require$1, __create2, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __getProtoOf2, __hasOwnProp2, __name, __require, __commonJS2, __export2, __copyProps2, __toESM2;
|
|
48
|
+
var init_chunk_U6NEESU5 = __esm({
|
|
49
|
+
"../workers-utils/dist/chunk-U6NEESU5.mjs"() {
|
|
50
50
|
"use strict";
|
|
51
|
+
import_node_module = require("node:module");
|
|
52
|
+
import_meta = {};
|
|
53
|
+
require$1 = (0, import_node_module.createRequire)(import_meta.url || (typeof __filename === "string" ? __filename : "/"));
|
|
51
54
|
__create2 = Object.create;
|
|
52
55
|
__defProp2 = Object.defineProperty;
|
|
53
56
|
__getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -55,10 +58,10 @@ var init_chunk_Q72B4Q5Z = __esm({
|
|
|
55
58
|
__getProtoOf2 = Object.getPrototypeOf;
|
|
56
59
|
__hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
57
60
|
__name = (target, value) => __defProp2(target, "name", { value, configurable: true });
|
|
58
|
-
__require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
59
|
-
get: (a, b2) => (typeof require !== "undefined" ? require : a)[b2]
|
|
61
|
+
__require = /* @__PURE__ */ ((x) => typeof require$1 !== "undefined" ? require$1 : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
62
|
+
get: (a, b2) => (typeof require$1 !== "undefined" ? require$1 : a)[b2]
|
|
60
63
|
}) : x)(function(x) {
|
|
61
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
64
|
+
if (typeof require$1 !== "undefined") return require$1.apply(this, arguments);
|
|
62
65
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
63
66
|
});
|
|
64
67
|
__commonJS2 = (cb, mod) => function __require2() {
|
|
@@ -26504,9 +26507,9 @@ ${captureLines}` : capture.stack;
|
|
|
26504
26507
|
}
|
|
26505
26508
|
});
|
|
26506
26509
|
|
|
26507
|
-
// ../workers-utils/dist/open-
|
|
26508
|
-
var
|
|
26509
|
-
__export(
|
|
26510
|
+
// ../workers-utils/dist/open-PCXX3ZDZ.mjs
|
|
26511
|
+
var open_PCXX3ZDZ_exports = {};
|
|
26512
|
+
__export(open_PCXX3ZDZ_exports, {
|
|
26510
26513
|
apps: () => apps,
|
|
26511
26514
|
default: () => open_default,
|
|
26512
26515
|
openApp: () => openApp
|
|
@@ -26648,11 +26651,12 @@ function detectPlatformBinary({ [platform]: platformBinary }, { wsl } = {}) {
|
|
|
26648
26651
|
}
|
|
26649
26652
|
return detectArchBinary(platformBinary);
|
|
26650
26653
|
}
|
|
26651
|
-
var import_node_process7, import_node_path4, import_node_url, import_node_child_process, import_promises, import_node_util2, import_node_os4, import_node_fs3, import_node_buffer,
|
|
26652
|
-
var
|
|
26653
|
-
"../workers-utils/dist/open-
|
|
26654
|
+
var import_node_module12, import_node_process7, import_node_path4, import_node_url, import_node_child_process, import_promises, import_node_util2, import_node_os4, import_node_fs3, import_node_buffer, import_meta12, isDockerCached, cachedResult, hasContainerEnv, isWsl, is_wsl_default, execFile, powerShellPath, executePowerShell, execFile2, wslDrivesMountPoint, powerShellPathFromWsl, powerShellPath2, canAccessPowerShellPromise, canAccessPowerShell, wslDefaultBrowser, convertWslPathToWindows, execFileAsync, execFileAsync2, execFileAsync3, windowsBrowserProgIds, _windowsBrowserProgIdMap, UnknownBrowserError, execFileAsync4, titleize, isInSsh, is_in_ssh_default, fallbackAttemptSymbol, __dirname$1, localXdgOpenPath, platform, arch, tryEachApp, baseOpen, open, openApp, apps, open_default;
|
|
26655
|
+
var init_open_PCXX3ZDZ = __esm({
|
|
26656
|
+
"../workers-utils/dist/open-PCXX3ZDZ.mjs"() {
|
|
26654
26657
|
"use strict";
|
|
26655
|
-
|
|
26658
|
+
import_node_module12 = require("node:module");
|
|
26659
|
+
init_chunk_U6NEESU5();
|
|
26656
26660
|
import_node_process7 = __toESM(require("node:process"), 1);
|
|
26657
26661
|
import_node_path4 = __toESM(require("node:path"), 1);
|
|
26658
26662
|
import_node_url = require("node:url");
|
|
@@ -26662,7 +26666,8 @@ var init_open_PBXRGS4R = __esm({
|
|
|
26662
26666
|
import_node_os4 = __toESM(require("node:os"), 1);
|
|
26663
26667
|
import_node_fs3 = __toESM(require("node:fs"), 1);
|
|
26664
26668
|
import_node_buffer = require("node:buffer");
|
|
26665
|
-
|
|
26669
|
+
import_meta12 = {};
|
|
26670
|
+
(0, import_node_module12.createRequire)(import_meta12.url || (typeof __filename === "string" ? __filename : "/"));
|
|
26666
26671
|
__name(hasDockerEnv, "hasDockerEnv");
|
|
26667
26672
|
__name(hasDockerCGroup, "hasDockerCGroup");
|
|
26668
26673
|
__name(isDocker, "isDocker");
|
|
@@ -26823,7 +26828,7 @@ var init_open_PBXRGS4R = __esm({
|
|
|
26823
26828
|
isInSsh = Boolean(import_node_process7.default.env.SSH_CONNECTION || import_node_process7.default.env.SSH_CLIENT || import_node_process7.default.env.SSH_TTY);
|
|
26824
26829
|
is_in_ssh_default = isInSsh;
|
|
26825
26830
|
fallbackAttemptSymbol = /* @__PURE__ */ Symbol("fallbackAttempt");
|
|
26826
|
-
__dirname$1 =
|
|
26831
|
+
__dirname$1 = import_meta12.url ? import_node_path4.default.dirname((0, import_node_url.fileURLToPath)(import_meta12.url)) : "";
|
|
26827
26832
|
localXdgOpenPath = import_node_path4.default.join(__dirname$1, "xdg-open");
|
|
26828
26833
|
({ platform, arch } = import_node_process7.default);
|
|
26829
26834
|
tryEachApp = /* @__PURE__ */ __name(async (apps22, opener) => {
|
|
@@ -75341,8 +75346,14 @@ var stderr = process.stderr;
|
|
|
75341
75346
|
// ../cli/dist/check-macos-version.mjs
|
|
75342
75347
|
var import_node_os2 = __toESM(require("node:os"), 1);
|
|
75343
75348
|
|
|
75344
|
-
// ../workers-utils/dist/
|
|
75345
|
-
|
|
75349
|
+
// ../workers-utils/dist/errors.mjs
|
|
75350
|
+
var import_node_module3 = require("node:module");
|
|
75351
|
+
|
|
75352
|
+
// ../workers-utils/dist/chunk-OWPFSLY6.mjs
|
|
75353
|
+
var import_node_module2 = require("node:module");
|
|
75354
|
+
init_chunk_U6NEESU5();
|
|
75355
|
+
var import_meta2 = {};
|
|
75356
|
+
(0, import_node_module2.createRequire)(import_meta2.url || (typeof __filename === "string" ? __filename : "/"));
|
|
75346
75357
|
var UserError = class extends Error {
|
|
75347
75358
|
static {
|
|
75348
75359
|
__name(this, "UserError");
|
|
@@ -75401,6 +75412,10 @@ function createFatalError(message, isJson, options) {
|
|
|
75401
75412
|
}
|
|
75402
75413
|
__name(createFatalError, "createFatalError");
|
|
75403
75414
|
|
|
75415
|
+
// ../workers-utils/dist/errors.mjs
|
|
75416
|
+
var import_meta3 = {};
|
|
75417
|
+
(0, import_node_module3.createRequire)(import_meta3.url || (typeof __filename === "string" ? __filename : "/"));
|
|
75418
|
+
|
|
75404
75419
|
// ../cli/dist/check-macos-version.mjs
|
|
75405
75420
|
var import_ci_info = __toESM(require_ci_info(), 1);
|
|
75406
75421
|
var MINIMUM_MACOS_VERSION = "13.5.0";
|
|
@@ -77418,8 +77433,14 @@ function isInteractive() {
|
|
|
77418
77433
|
var import_node_fs5 = require("node:fs");
|
|
77419
77434
|
var import_node_path6 = require("node:path");
|
|
77420
77435
|
|
|
77421
|
-
// ../workers-utils/dist/
|
|
77422
|
-
|
|
77436
|
+
// ../workers-utils/dist/index.mjs
|
|
77437
|
+
var import_node_module13 = require("node:module");
|
|
77438
|
+
|
|
77439
|
+
// ../workers-utils/dist/chunk-PWC7WAOU.mjs
|
|
77440
|
+
var import_node_module4 = require("node:module");
|
|
77441
|
+
init_chunk_U6NEESU5();
|
|
77442
|
+
var import_meta4 = {};
|
|
77443
|
+
(0, import_node_module4.createRequire)(import_meta4.url || (typeof __filename === "string" ? __filename : "/"));
|
|
77423
77444
|
var external_exports = {};
|
|
77424
77445
|
__export2(external_exports, {
|
|
77425
77446
|
$brand: () => $brand,
|
|
@@ -92227,8 +92248,14 @@ function formatZodError(error51) {
|
|
|
92227
92248
|
}
|
|
92228
92249
|
__name(formatZodError, "formatZodError");
|
|
92229
92250
|
|
|
92230
|
-
// ../workers-utils/dist/chunk-
|
|
92231
|
-
|
|
92251
|
+
// ../workers-utils/dist/chunk-AUSY7DKT.mjs
|
|
92252
|
+
var import_node_module6 = require("node:module");
|
|
92253
|
+
|
|
92254
|
+
// ../workers-utils/dist/chunk-M3RITKR3.mjs
|
|
92255
|
+
var import_node_module5 = require("node:module");
|
|
92256
|
+
init_chunk_U6NEESU5();
|
|
92257
|
+
var import_meta5 = {};
|
|
92258
|
+
(0, import_node_module5.createRequire)(import_meta5.url || (typeof __filename === "string" ? __filename : "/"));
|
|
92232
92259
|
function dedent(templ) {
|
|
92233
92260
|
var values = [];
|
|
92234
92261
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
@@ -92270,10 +92297,12 @@ function dedent(templ) {
|
|
|
92270
92297
|
__name(dedent, "dedent");
|
|
92271
92298
|
var esm_default = dedent;
|
|
92272
92299
|
|
|
92273
|
-
// ../workers-utils/dist/chunk-
|
|
92274
|
-
|
|
92300
|
+
// ../workers-utils/dist/chunk-AUSY7DKT.mjs
|
|
92301
|
+
init_chunk_U6NEESU5();
|
|
92275
92302
|
var import_node_fs = require("node:fs");
|
|
92276
92303
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
92304
|
+
var import_meta6 = {};
|
|
92305
|
+
(0, import_node_module6.createRequire)(import_meta6.url || (typeof __filename === "string" ? __filename : "/"));
|
|
92277
92306
|
function hasKnownExportType(entry) {
|
|
92278
92307
|
const type = entry?.type;
|
|
92279
92308
|
return type === "durable-object" || type === "worker" || type === "workflow";
|
|
@@ -92297,6 +92326,11 @@ function partitionExports(exports$1) {
|
|
|
92297
92326
|
return partitioned;
|
|
92298
92327
|
}
|
|
92299
92328
|
__name(partitionExports, "partitionExports");
|
|
92329
|
+
function isLiveDurableObjectExport(exportConfig) {
|
|
92330
|
+
const state = exportConfig.state ?? "created";
|
|
92331
|
+
return state === "created" || state === "expecting-transfer";
|
|
92332
|
+
}
|
|
92333
|
+
__name(isLiveDurableObjectExport, "isLiveDurableObjectExport");
|
|
92300
92334
|
function getDurableObjectExports(exports$1) {
|
|
92301
92335
|
return partitionExports(exports$1)["durable-object"];
|
|
92302
92336
|
}
|
|
@@ -92416,7 +92450,7 @@ function getDurableObjectClassNameToUseSQLiteMap(migrations, exports$1) {
|
|
|
92416
92450
|
if (entry.type !== "durable-object") {
|
|
92417
92451
|
continue;
|
|
92418
92452
|
}
|
|
92419
|
-
if (entry
|
|
92453
|
+
if (isLiveDurableObjectExport(entry)) {
|
|
92420
92454
|
durableObjectClassNameToUseSQLiteMap.set(
|
|
92421
92455
|
className,
|
|
92422
92456
|
entry.storage === "sqlite"
|
|
@@ -95324,469 +95358,12 @@ function formatConfigSnippet(snippet, configPath, formatted = true) {
|
|
|
95324
95358
|
}
|
|
95325
95359
|
__name(formatConfigSnippet, "formatConfigSnippet");
|
|
95326
95360
|
|
|
95327
|
-
// ../workers-utils/dist/chunk-
|
|
95328
|
-
|
|
95329
|
-
|
|
95330
|
-
function assertNever2(_value) {
|
|
95331
|
-
}
|
|
95332
|
-
__name(assertNever2, "assertNever");
|
|
95333
|
-
function mapWorkerMetadataBindings(bindings) {
|
|
95334
|
-
return bindings.filter((binding) => binding.type !== "secret_text").reduce((configObj, binding) => {
|
|
95335
|
-
switch (binding.type) {
|
|
95336
|
-
case "plain_text":
|
|
95337
|
-
{
|
|
95338
|
-
configObj.vars = {
|
|
95339
|
-
...configObj.vars ?? {},
|
|
95340
|
-
[binding.name]: binding.text
|
|
95341
|
-
};
|
|
95342
|
-
}
|
|
95343
|
-
break;
|
|
95344
|
-
case "json":
|
|
95345
|
-
{
|
|
95346
|
-
configObj.vars = {
|
|
95347
|
-
...configObj.vars ?? {},
|
|
95348
|
-
[binding.name]: binding.json
|
|
95349
|
-
};
|
|
95350
|
-
}
|
|
95351
|
-
break;
|
|
95352
|
-
case "kv_namespace":
|
|
95353
|
-
{
|
|
95354
|
-
configObj.kv_namespaces = [
|
|
95355
|
-
...configObj.kv_namespaces ?? [],
|
|
95356
|
-
{ id: binding.namespace_id, binding: binding.name }
|
|
95357
|
-
];
|
|
95358
|
-
}
|
|
95359
|
-
break;
|
|
95360
|
-
case "durable_object_namespace":
|
|
95361
|
-
{
|
|
95362
|
-
configObj.durable_objects = {
|
|
95363
|
-
bindings: [
|
|
95364
|
-
...configObj.durable_objects?.bindings ?? [],
|
|
95365
|
-
{
|
|
95366
|
-
name: binding.name,
|
|
95367
|
-
class_name: binding.class_name,
|
|
95368
|
-
script_name: binding.script_name,
|
|
95369
|
-
environment: binding.environment
|
|
95370
|
-
}
|
|
95371
|
-
]
|
|
95372
|
-
};
|
|
95373
|
-
}
|
|
95374
|
-
break;
|
|
95375
|
-
case "d1":
|
|
95376
|
-
{
|
|
95377
|
-
configObj.d1_databases = [
|
|
95378
|
-
...configObj.d1_databases ?? [],
|
|
95379
|
-
{
|
|
95380
|
-
binding: binding.name,
|
|
95381
|
-
database_id: binding.id
|
|
95382
|
-
}
|
|
95383
|
-
];
|
|
95384
|
-
}
|
|
95385
|
-
break;
|
|
95386
|
-
case "browser":
|
|
95387
|
-
{
|
|
95388
|
-
configObj.browser = {
|
|
95389
|
-
binding: binding.name
|
|
95390
|
-
};
|
|
95391
|
-
}
|
|
95392
|
-
break;
|
|
95393
|
-
case "ai":
|
|
95394
|
-
{
|
|
95395
|
-
configObj.ai = {
|
|
95396
|
-
binding: binding.name
|
|
95397
|
-
};
|
|
95398
|
-
}
|
|
95399
|
-
break;
|
|
95400
|
-
case "images":
|
|
95401
|
-
{
|
|
95402
|
-
configObj.images = {
|
|
95403
|
-
binding: binding.name
|
|
95404
|
-
};
|
|
95405
|
-
}
|
|
95406
|
-
break;
|
|
95407
|
-
case "stream":
|
|
95408
|
-
{
|
|
95409
|
-
configObj.stream = {
|
|
95410
|
-
binding: binding.name
|
|
95411
|
-
};
|
|
95412
|
-
}
|
|
95413
|
-
break;
|
|
95414
|
-
case "media":
|
|
95415
|
-
{
|
|
95416
|
-
configObj.media = {
|
|
95417
|
-
binding: binding.name
|
|
95418
|
-
};
|
|
95419
|
-
}
|
|
95420
|
-
break;
|
|
95421
|
-
case "r2_bucket":
|
|
95422
|
-
{
|
|
95423
|
-
configObj.r2_buckets = [
|
|
95424
|
-
...configObj.r2_buckets ?? [],
|
|
95425
|
-
{
|
|
95426
|
-
binding: binding.name,
|
|
95427
|
-
bucket_name: binding.bucket_name,
|
|
95428
|
-
jurisdiction: binding.jurisdiction
|
|
95429
|
-
}
|
|
95430
|
-
];
|
|
95431
|
-
}
|
|
95432
|
-
break;
|
|
95433
|
-
case "secrets_store_secret":
|
|
95434
|
-
{
|
|
95435
|
-
configObj.secrets_store_secrets = [
|
|
95436
|
-
...configObj.secrets_store_secrets ?? [],
|
|
95437
|
-
{
|
|
95438
|
-
binding: binding.name,
|
|
95439
|
-
store_id: binding.store_id,
|
|
95440
|
-
secret_name: binding.secret_name
|
|
95441
|
-
}
|
|
95442
|
-
];
|
|
95443
|
-
}
|
|
95444
|
-
break;
|
|
95445
|
-
case "artifacts":
|
|
95446
|
-
{
|
|
95447
|
-
configObj.artifacts = [
|
|
95448
|
-
...configObj.artifacts ?? [],
|
|
95449
|
-
{
|
|
95450
|
-
binding: binding.name,
|
|
95451
|
-
namespace: binding.namespace
|
|
95452
|
-
}
|
|
95453
|
-
];
|
|
95454
|
-
}
|
|
95455
|
-
break;
|
|
95456
|
-
case "unsafe_hello_world": {
|
|
95457
|
-
configObj.unsafe_hello_world = [
|
|
95458
|
-
...configObj.unsafe_hello_world ?? [],
|
|
95459
|
-
{
|
|
95460
|
-
binding: binding.name,
|
|
95461
|
-
enable_timer: binding.enable_timer
|
|
95462
|
-
}
|
|
95463
|
-
];
|
|
95464
|
-
break;
|
|
95465
|
-
}
|
|
95466
|
-
case "flagship": {
|
|
95467
|
-
configObj.flagship = [
|
|
95468
|
-
...configObj.flagship ?? [],
|
|
95469
|
-
{
|
|
95470
|
-
binding: binding.name,
|
|
95471
|
-
app_id: binding.app_id
|
|
95472
|
-
}
|
|
95473
|
-
];
|
|
95474
|
-
break;
|
|
95475
|
-
}
|
|
95476
|
-
case "service":
|
|
95477
|
-
{
|
|
95478
|
-
configObj.services = [
|
|
95479
|
-
...configObj.services ?? [],
|
|
95480
|
-
{
|
|
95481
|
-
binding: binding.name,
|
|
95482
|
-
service: binding.service,
|
|
95483
|
-
environment: binding.environment,
|
|
95484
|
-
entrypoint: binding.entrypoint
|
|
95485
|
-
}
|
|
95486
|
-
];
|
|
95487
|
-
}
|
|
95488
|
-
break;
|
|
95489
|
-
case "analytics_engine":
|
|
95490
|
-
{
|
|
95491
|
-
configObj.analytics_engine_datasets = [
|
|
95492
|
-
...configObj.analytics_engine_datasets ?? [],
|
|
95493
|
-
{ binding: binding.name, dataset: binding.dataset }
|
|
95494
|
-
];
|
|
95495
|
-
}
|
|
95496
|
-
break;
|
|
95497
|
-
case "dispatch_namespace":
|
|
95498
|
-
{
|
|
95499
|
-
configObj.dispatch_namespaces = [
|
|
95500
|
-
...configObj.dispatch_namespaces ?? [],
|
|
95501
|
-
{
|
|
95502
|
-
binding: binding.name,
|
|
95503
|
-
namespace: binding.namespace,
|
|
95504
|
-
...binding.outbound && {
|
|
95505
|
-
outbound: {
|
|
95506
|
-
service: binding.outbound.worker.service,
|
|
95507
|
-
environment: binding.outbound.worker.environment,
|
|
95508
|
-
parameters: binding.outbound.params?.map((p2) => p2.name) ?? []
|
|
95509
|
-
}
|
|
95510
|
-
}
|
|
95511
|
-
}
|
|
95512
|
-
];
|
|
95513
|
-
}
|
|
95514
|
-
break;
|
|
95515
|
-
case "logfwdr":
|
|
95516
|
-
{
|
|
95517
|
-
configObj.logfwdr = {
|
|
95518
|
-
bindings: [
|
|
95519
|
-
...configObj.logfwdr?.bindings ?? [],
|
|
95520
|
-
{ name: binding.name, destination: binding.destination }
|
|
95521
|
-
]
|
|
95522
|
-
};
|
|
95523
|
-
}
|
|
95524
|
-
break;
|
|
95525
|
-
case "wasm_module":
|
|
95526
|
-
{
|
|
95527
|
-
configObj.wasm_modules = {
|
|
95528
|
-
...configObj.wasm_modules ?? {},
|
|
95529
|
-
[binding.name]: binding.part
|
|
95530
|
-
};
|
|
95531
|
-
}
|
|
95532
|
-
break;
|
|
95533
|
-
case "text_blob":
|
|
95534
|
-
{
|
|
95535
|
-
configObj.text_blobs = {
|
|
95536
|
-
...configObj.text_blobs ?? {},
|
|
95537
|
-
[binding.name]: binding.part
|
|
95538
|
-
};
|
|
95539
|
-
}
|
|
95540
|
-
break;
|
|
95541
|
-
case "data_blob":
|
|
95542
|
-
{
|
|
95543
|
-
configObj.data_blobs = {
|
|
95544
|
-
...configObj.data_blobs ?? {},
|
|
95545
|
-
[binding.name]: binding.part
|
|
95546
|
-
};
|
|
95547
|
-
}
|
|
95548
|
-
break;
|
|
95549
|
-
case "secret_text":
|
|
95550
|
-
break;
|
|
95551
|
-
case "version_metadata": {
|
|
95552
|
-
{
|
|
95553
|
-
configObj.version_metadata = {
|
|
95554
|
-
binding: binding.name
|
|
95555
|
-
};
|
|
95556
|
-
}
|
|
95557
|
-
break;
|
|
95558
|
-
}
|
|
95559
|
-
case "send_email": {
|
|
95560
|
-
configObj.send_email = [
|
|
95561
|
-
...configObj.send_email ?? [],
|
|
95562
|
-
{
|
|
95563
|
-
name: binding.name,
|
|
95564
|
-
destination_address: binding.destination_address,
|
|
95565
|
-
allowed_destination_addresses: binding.allowed_destination_addresses,
|
|
95566
|
-
allowed_sender_addresses: binding.allowed_sender_addresses
|
|
95567
|
-
}
|
|
95568
|
-
];
|
|
95569
|
-
break;
|
|
95570
|
-
}
|
|
95571
|
-
case "queue":
|
|
95572
|
-
configObj.queues ??= { producers: [] };
|
|
95573
|
-
configObj.queues.producers = [
|
|
95574
|
-
...configObj.queues.producers ?? [],
|
|
95575
|
-
{
|
|
95576
|
-
binding: binding.name,
|
|
95577
|
-
queue: binding.queue_name,
|
|
95578
|
-
delivery_delay: binding.delivery_delay
|
|
95579
|
-
}
|
|
95580
|
-
];
|
|
95581
|
-
break;
|
|
95582
|
-
case "vectorize":
|
|
95583
|
-
configObj.vectorize = [
|
|
95584
|
-
...configObj.vectorize ?? [],
|
|
95585
|
-
{
|
|
95586
|
-
binding: binding.name,
|
|
95587
|
-
index_name: binding.index_name
|
|
95588
|
-
}
|
|
95589
|
-
];
|
|
95590
|
-
break;
|
|
95591
|
-
case "ai_search_namespace":
|
|
95592
|
-
configObj.ai_search_namespaces = [
|
|
95593
|
-
...configObj.ai_search_namespaces ?? [],
|
|
95594
|
-
{
|
|
95595
|
-
binding: binding.name,
|
|
95596
|
-
namespace: binding.namespace
|
|
95597
|
-
}
|
|
95598
|
-
];
|
|
95599
|
-
break;
|
|
95600
|
-
case "ai_search":
|
|
95601
|
-
configObj.ai_search = [
|
|
95602
|
-
...configObj.ai_search ?? [],
|
|
95603
|
-
{
|
|
95604
|
-
binding: binding.name,
|
|
95605
|
-
instance_name: binding.instance_name
|
|
95606
|
-
}
|
|
95607
|
-
];
|
|
95608
|
-
break;
|
|
95609
|
-
case "agent_memory": {
|
|
95610
|
-
configObj.agent_memory = [
|
|
95611
|
-
...configObj.agent_memory ?? [],
|
|
95612
|
-
{
|
|
95613
|
-
binding: binding.name,
|
|
95614
|
-
namespace: binding.namespace
|
|
95615
|
-
}
|
|
95616
|
-
];
|
|
95617
|
-
break;
|
|
95618
|
-
}
|
|
95619
|
-
case "hyperdrive":
|
|
95620
|
-
configObj.hyperdrive = [
|
|
95621
|
-
...configObj.hyperdrive ?? [],
|
|
95622
|
-
{
|
|
95623
|
-
binding: binding.name,
|
|
95624
|
-
id: binding.id
|
|
95625
|
-
}
|
|
95626
|
-
];
|
|
95627
|
-
break;
|
|
95628
|
-
case "mtls_certificate":
|
|
95629
|
-
configObj.mtls_certificates = [
|
|
95630
|
-
...configObj.mtls_certificates ?? [],
|
|
95631
|
-
{
|
|
95632
|
-
binding: binding.name,
|
|
95633
|
-
certificate_id: binding.certificate_id
|
|
95634
|
-
}
|
|
95635
|
-
];
|
|
95636
|
-
break;
|
|
95637
|
-
case "pipelines":
|
|
95638
|
-
configObj.pipelines = [
|
|
95639
|
-
...configObj.pipelines ?? [],
|
|
95640
|
-
{
|
|
95641
|
-
binding: binding.name,
|
|
95642
|
-
// NOTE: stream is the primary field, but we also support pipeline for backward compatibility
|
|
95643
|
-
...binding.stream && { stream: binding.stream },
|
|
95644
|
-
...binding.pipeline && { pipeline: binding.pipeline }
|
|
95645
|
-
}
|
|
95646
|
-
];
|
|
95647
|
-
break;
|
|
95648
|
-
case "assets":
|
|
95649
|
-
configObj.assets = {
|
|
95650
|
-
binding: binding.name
|
|
95651
|
-
// Note: we currently don't get all the assets information from the
|
|
95652
|
-
// API, so here we are only able to set the name of the binding
|
|
95653
|
-
// hopefully in the future we can properly fully support the binding
|
|
95654
|
-
};
|
|
95655
|
-
break;
|
|
95656
|
-
case "inherit":
|
|
95657
|
-
configObj.unsafe = {
|
|
95658
|
-
bindings: [...configObj.unsafe?.bindings ?? [], binding],
|
|
95659
|
-
metadata: configObj.unsafe?.metadata ?? void 0
|
|
95660
|
-
};
|
|
95661
|
-
break;
|
|
95662
|
-
case "workflow":
|
|
95663
|
-
{
|
|
95664
|
-
configObj.workflows = [
|
|
95665
|
-
...configObj.workflows ?? [],
|
|
95666
|
-
{
|
|
95667
|
-
binding: binding.name,
|
|
95668
|
-
name: binding.workflow_name,
|
|
95669
|
-
class_name: binding.class_name,
|
|
95670
|
-
script_name: binding.script_name
|
|
95671
|
-
}
|
|
95672
|
-
];
|
|
95673
|
-
}
|
|
95674
|
-
break;
|
|
95675
|
-
case "worker_loader":
|
|
95676
|
-
{
|
|
95677
|
-
configObj.worker_loaders = [
|
|
95678
|
-
...configObj.worker_loaders ?? [],
|
|
95679
|
-
{
|
|
95680
|
-
binding: binding.name
|
|
95681
|
-
}
|
|
95682
|
-
];
|
|
95683
|
-
}
|
|
95684
|
-
break;
|
|
95685
|
-
case "ratelimit":
|
|
95686
|
-
{
|
|
95687
|
-
configObj.ratelimits = [
|
|
95688
|
-
...configObj.ratelimits ?? [],
|
|
95689
|
-
{
|
|
95690
|
-
name: binding.name,
|
|
95691
|
-
namespace_id: binding.namespace_id,
|
|
95692
|
-
simple: {
|
|
95693
|
-
limit: binding.simple.limit,
|
|
95694
|
-
period: binding.simple.period
|
|
95695
|
-
}
|
|
95696
|
-
}
|
|
95697
|
-
];
|
|
95698
|
-
}
|
|
95699
|
-
break;
|
|
95700
|
-
case "vpc_service":
|
|
95701
|
-
{
|
|
95702
|
-
configObj.vpc_services = [
|
|
95703
|
-
...configObj.vpc_services ?? [],
|
|
95704
|
-
{
|
|
95705
|
-
binding: binding.name,
|
|
95706
|
-
service_id: binding.service_id
|
|
95707
|
-
}
|
|
95708
|
-
];
|
|
95709
|
-
}
|
|
95710
|
-
break;
|
|
95711
|
-
case "vpc_network":
|
|
95712
|
-
{
|
|
95713
|
-
if (binding.tunnel_id !== void 0) {
|
|
95714
|
-
configObj.vpc_networks = [
|
|
95715
|
-
...configObj.vpc_networks ?? [],
|
|
95716
|
-
{ binding: binding.name, tunnel_id: binding.tunnel_id }
|
|
95717
|
-
];
|
|
95718
|
-
} else if (binding.network_id !== void 0) {
|
|
95719
|
-
configObj.vpc_networks = [
|
|
95720
|
-
...configObj.vpc_networks ?? [],
|
|
95721
|
-
{ binding: binding.name, network_id: binding.network_id }
|
|
95722
|
-
];
|
|
95723
|
-
}
|
|
95724
|
-
}
|
|
95725
|
-
break;
|
|
95726
|
-
default: {
|
|
95727
|
-
configObj.unsafe = {
|
|
95728
|
-
bindings: [...configObj.unsafe?.bindings ?? [], binding],
|
|
95729
|
-
metadata: configObj.unsafe?.metadata ?? void 0
|
|
95730
|
-
};
|
|
95731
|
-
}
|
|
95732
|
-
}
|
|
95733
|
-
return configObj;
|
|
95734
|
-
}, {});
|
|
95735
|
-
}
|
|
95736
|
-
__name(mapWorkerMetadataBindings, "mapWorkerMetadataBindings");
|
|
95737
|
-
function constructWranglerConfig(config50) {
|
|
95738
|
-
const mappedBindings = mapWorkerMetadataBindings(config50.bindings);
|
|
95739
|
-
const durableObjectClassNames = config50.bindings.filter(
|
|
95740
|
-
(binding) => binding.type === "durable_object_namespace" && binding.script_name === config50.name
|
|
95741
|
-
).map(
|
|
95742
|
-
(durableObject) => durableObject.class_name
|
|
95743
|
-
);
|
|
95744
|
-
const allRoutes = [
|
|
95745
|
-
...config50.routes.map((r) => ({
|
|
95746
|
-
pattern: r.pattern,
|
|
95747
|
-
zone_name: r.zone_name
|
|
95748
|
-
})),
|
|
95749
|
-
...config50.domains.map((c2) => ({
|
|
95750
|
-
pattern: c2.hostname,
|
|
95751
|
-
zone_name: c2.zone_name,
|
|
95752
|
-
custom_domain: true,
|
|
95753
|
-
enabled: c2.enabled,
|
|
95754
|
-
previews_enabled: c2.previews_enabled
|
|
95755
|
-
}))
|
|
95756
|
-
];
|
|
95757
|
-
return {
|
|
95758
|
-
name: config50.name,
|
|
95759
|
-
main: config50.entrypoint,
|
|
95760
|
-
workers_dev: config50.subdomain.enabled,
|
|
95761
|
-
preview_urls: config50.subdomain.previews_enabled,
|
|
95762
|
-
compatibility_date: config50.compatibility_date ?? DEFAULT_COMPAT_DATE,
|
|
95763
|
-
compatibility_flags: config50.compatibility_flags,
|
|
95764
|
-
...allRoutes.length ? { routes: allRoutes } : {},
|
|
95765
|
-
placement: config50.placement?.mode === "smart" ? { mode: "smart" } : void 0,
|
|
95766
|
-
limits: config50.limits,
|
|
95767
|
-
...durableObjectClassNames.length && config50.migration_tag ? {
|
|
95768
|
-
migrations: [
|
|
95769
|
-
{
|
|
95770
|
-
tag: config50.migration_tag,
|
|
95771
|
-
new_classes: durableObjectClassNames
|
|
95772
|
-
}
|
|
95773
|
-
]
|
|
95774
|
-
} : {},
|
|
95775
|
-
...config50.schedules.length ? {
|
|
95776
|
-
triggers: {
|
|
95777
|
-
crons: config50.schedules.map((scheduled) => scheduled.cron)
|
|
95778
|
-
}
|
|
95779
|
-
} : {},
|
|
95780
|
-
tail_consumers: config50.tail_consumers ?? void 0,
|
|
95781
|
-
observability: config50.observability,
|
|
95782
|
-
...mappedBindings
|
|
95783
|
-
};
|
|
95784
|
-
}
|
|
95785
|
-
__name(constructWranglerConfig, "constructWranglerConfig");
|
|
95786
|
-
|
|
95787
|
-
// ../workers-utils/dist/chunk-C6O4ION7.mjs
|
|
95788
|
-
init_chunk_Q72B4Q5Z();
|
|
95361
|
+
// ../workers-utils/dist/chunk-2Q77CKVU.mjs
|
|
95362
|
+
var import_node_module7 = require("node:module");
|
|
95363
|
+
init_chunk_U6NEESU5();
|
|
95789
95364
|
var import_node_assert = __toESM(require("node:assert"), 1);
|
|
95365
|
+
var import_meta7 = {};
|
|
95366
|
+
(0, import_node_module7.createRequire)(import_meta7.url || (typeof __filename === "string" ? __filename : "/"));
|
|
95790
95367
|
function isCompatDate(str) {
|
|
95791
95368
|
return /^\d{4}-\d{2}-\d{2}$/.test(str);
|
|
95792
95369
|
}
|
|
@@ -95825,8 +95402,14 @@ function stripRedundantNodejsCompatFlags(compatibilityDate, compatibilityFlags)
|
|
|
95825
95402
|
}
|
|
95826
95403
|
__name(stripRedundantNodejsCompatFlags, "stripRedundantNodejsCompatFlags");
|
|
95827
95404
|
|
|
95828
|
-
// ../workers-utils/dist/chunk-
|
|
95829
|
-
|
|
95405
|
+
// ../workers-utils/dist/chunk-FR75DWDU.mjs
|
|
95406
|
+
var import_node_module11 = require("node:module");
|
|
95407
|
+
|
|
95408
|
+
// ../workers-utils/dist/chunk-QSRIB43D.mjs
|
|
95409
|
+
var import_node_module8 = require("node:module");
|
|
95410
|
+
init_chunk_U6NEESU5();
|
|
95411
|
+
var import_meta8 = {};
|
|
95412
|
+
(0, import_node_module8.createRequire)(import_meta8.url || (typeof __filename === "string" ? __filename : "/"));
|
|
95830
95413
|
function getBooleanEnvironmentVariableFactory(options) {
|
|
95831
95414
|
return () => {
|
|
95832
95415
|
if (!(options.variableName in process.env) || process.env[options.variableName] === void 0) {
|
|
@@ -95893,9 +95476,15 @@ var getDockerPath = getEnvironmentVariableFactory({
|
|
|
95893
95476
|
}
|
|
95894
95477
|
});
|
|
95895
95478
|
|
|
95896
|
-
// ../workers-utils/dist/chunk-
|
|
95897
|
-
|
|
95479
|
+
// ../workers-utils/dist/chunk-MV2OJK3L.mjs
|
|
95480
|
+
var import_node_module10 = require("node:module");
|
|
95481
|
+
|
|
95482
|
+
// ../workers-utils/dist/chunk-MIA26B4M.mjs
|
|
95483
|
+
var import_node_module9 = require("node:module");
|
|
95484
|
+
init_chunk_U6NEESU5();
|
|
95898
95485
|
var import_node_fs2 = __toESM(require("node:fs"), 1);
|
|
95486
|
+
var import_meta9 = {};
|
|
95487
|
+
(0, import_node_module9.createRequire)(import_meta9.url || (typeof __filename === "string" ? __filename : "/"));
|
|
95899
95488
|
function isDirectory(path9) {
|
|
95900
95489
|
return import_node_fs2.default.statSync(path9, { throwIfNoEntry: false })?.isDirectory() ?? false;
|
|
95901
95490
|
}
|
|
@@ -95925,10 +95514,12 @@ function removeDirSync(dirPath) {
|
|
|
95925
95514
|
}
|
|
95926
95515
|
__name(removeDirSync, "removeDirSync");
|
|
95927
95516
|
|
|
95928
|
-
// ../workers-utils/dist/chunk-
|
|
95929
|
-
|
|
95517
|
+
// ../workers-utils/dist/chunk-MV2OJK3L.mjs
|
|
95518
|
+
init_chunk_U6NEESU5();
|
|
95930
95519
|
var import_node_os3 = __toESM(require("node:os"), 1);
|
|
95931
95520
|
var import_node_path2 = __toESM(require("node:path"), 1);
|
|
95521
|
+
var import_meta10 = {};
|
|
95522
|
+
(0, import_node_module10.createRequire)(import_meta10.url || (typeof __filename === "string" ? __filename : "/"));
|
|
95932
95523
|
function isWindows() {
|
|
95933
95524
|
return /^win/i.test(process.platform);
|
|
95934
95525
|
}
|
|
@@ -96076,9 +95667,11 @@ function getGlobalWranglerCachePath() {
|
|
|
96076
95667
|
}
|
|
96077
95668
|
__name(getGlobalWranglerCachePath, "getGlobalWranglerCachePath");
|
|
96078
95669
|
|
|
96079
|
-
// ../workers-utils/dist/chunk-
|
|
96080
|
-
|
|
95670
|
+
// ../workers-utils/dist/chunk-FR75DWDU.mjs
|
|
95671
|
+
init_chunk_U6NEESU5();
|
|
96081
95672
|
var import_node_path3 = __toESM(require("node:path"), 1);
|
|
95673
|
+
var import_meta11 = {};
|
|
95674
|
+
(0, import_node_module11.createRequire)(import_meta11.url || (typeof __filename === "string" ? __filename : "/"));
|
|
96082
95675
|
var getC3CommandFromEnv = getEnvironmentVariableFactory({
|
|
96083
95676
|
variableName: "WRANGLER_C3_COMMAND",
|
|
96084
95677
|
defaultValue: /* @__PURE__ */ __name(() => "create cloudflare", "defaultValue")
|
|
@@ -96256,7 +95849,7 @@ var getCloudflaredPathFromEnv = getEnvironmentVariableFactory({
|
|
|
96256
95849
|
});
|
|
96257
95850
|
|
|
96258
95851
|
// ../workers-utils/dist/index.mjs
|
|
96259
|
-
|
|
95852
|
+
init_chunk_U6NEESU5();
|
|
96260
95853
|
var import_node_fs4 = __toESM(require("node:fs"), 1);
|
|
96261
95854
|
var import_node_assert2 = __toESM(require("node:assert"), 1);
|
|
96262
95855
|
var path5 = __toESM(require("node:path"), 1);
|
|
@@ -96269,6 +95862,8 @@ var import_node_crypto = require("node:crypto");
|
|
|
96269
95862
|
var import_node_os5 = require("node:os");
|
|
96270
95863
|
var timersPromises = __toESM(require("node:timers/promises"), 1);
|
|
96271
95864
|
var import_promises2 = require("node:timers/promises");
|
|
95865
|
+
var import_meta13 = {};
|
|
95866
|
+
(0, import_node_module13.createRequire)(import_meta13.url || (typeof __filename === "string" ? __filename : "/"));
|
|
96272
95867
|
var require_vendors2 = __commonJS2({
|
|
96273
95868
|
"../../node_modules/.pnpm/ci-info@4.4.0/node_modules/ci-info/vendors.json"(exports$1, module2) {
|
|
96274
95869
|
module2.exports = [
|
|
@@ -100346,18 +99941,22 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
|
|
|
100346
99941
|
validateDefines(envName),
|
|
100347
99942
|
{}
|
|
100348
99943
|
),
|
|
100349
|
-
durable_objects:
|
|
100350
|
-
|
|
100351
|
-
|
|
100352
|
-
|
|
100353
|
-
|
|
100354
|
-
|
|
100355
|
-
|
|
100356
|
-
|
|
100357
|
-
|
|
100358
|
-
bindings: []
|
|
100359
|
-
|
|
100360
|
-
|
|
99944
|
+
durable_objects: (() => {
|
|
99945
|
+
const durableObjects = notInheritable(
|
|
99946
|
+
diagnostics,
|
|
99947
|
+
topLevelEnv,
|
|
99948
|
+
rawConfig,
|
|
99949
|
+
rawEnv,
|
|
99950
|
+
envName,
|
|
99951
|
+
"durable_objects",
|
|
99952
|
+
validateDurableObjectsProperty(envName, true),
|
|
99953
|
+
{ bindings: [] }
|
|
99954
|
+
);
|
|
99955
|
+
return {
|
|
99956
|
+
...durableObjects,
|
|
99957
|
+
bindings: durableObjects.bindings ?? []
|
|
99958
|
+
};
|
|
99959
|
+
})(),
|
|
100361
99960
|
workflows: notInheritable(
|
|
100362
99961
|
diagnostics,
|
|
100363
99962
|
topLevelEnv,
|
|
@@ -101238,6 +100837,85 @@ Please add a binding for each to "${fieldPath}.bindings":
|
|
|
101238
100837
|
}
|
|
101239
100838
|
return isValid;
|
|
101240
100839
|
}, "validateBindingsProperty");
|
|
100840
|
+
var DURABLE_OBJECTS_CODE_UPDATE_MAX_DELAY_SECONDS = 24 * 60 * 60;
|
|
100841
|
+
var MILLISECOND_PRECISION_TOLERANCE = 1e-6;
|
|
100842
|
+
var validateDurableObjectsProperty = /* @__PURE__ */ __name((envName, allowMissingBindings = false, allowCodeUpdateStrategy = true) => (diagnostics, field, value, config50) => {
|
|
100843
|
+
const fieldPath = config50 === void 0 ? `${field}` : `env.${envName}.${field}`;
|
|
100844
|
+
if (value === void 0) {
|
|
100845
|
+
return true;
|
|
100846
|
+
}
|
|
100847
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
100848
|
+
diagnostics.errors.push(
|
|
100849
|
+
`The field "${fieldPath}" should be an object but got ${JSON.stringify(value)}.`
|
|
100850
|
+
);
|
|
100851
|
+
return false;
|
|
100852
|
+
}
|
|
100853
|
+
validateAdditionalProperties(
|
|
100854
|
+
diagnostics,
|
|
100855
|
+
fieldPath,
|
|
100856
|
+
Object.keys(value),
|
|
100857
|
+
allowCodeUpdateStrategy ? ["bindings", "code_update_strategy"] : ["bindings"]
|
|
100858
|
+
);
|
|
100859
|
+
const bindingsContainer = allowMissingBindings && !hasProperty(value, "bindings") ? { ...value, bindings: [] } : value;
|
|
100860
|
+
let isValid = validateBindingsProperty(
|
|
100861
|
+
envName,
|
|
100862
|
+
validateDurableObjectBinding
|
|
100863
|
+
)(diagnostics, field, bindingsContainer, config50);
|
|
100864
|
+
if (!allowCodeUpdateStrategy) {
|
|
100865
|
+
return isValid;
|
|
100866
|
+
}
|
|
100867
|
+
if (!hasProperty(value, "code_update_strategy") || value.code_update_strategy === void 0) {
|
|
100868
|
+
return isValid;
|
|
100869
|
+
}
|
|
100870
|
+
const strategy = value.code_update_strategy;
|
|
100871
|
+
const strategyPath = `${fieldPath}.code_update_strategy`;
|
|
100872
|
+
if (typeof strategy !== "object" || strategy === null || Array.isArray(strategy)) {
|
|
100873
|
+
diagnostics.errors.push(
|
|
100874
|
+
`The field "${strategyPath}" should be an object but got ${JSON.stringify(strategy)}.`
|
|
100875
|
+
);
|
|
100876
|
+
return false;
|
|
100877
|
+
}
|
|
100878
|
+
validateAdditionalProperties(
|
|
100879
|
+
diagnostics,
|
|
100880
|
+
strategyPath,
|
|
100881
|
+
Object.keys(strategy),
|
|
100882
|
+
["mode", "max_delay"]
|
|
100883
|
+
);
|
|
100884
|
+
isValid = validateRequiredProperty(
|
|
100885
|
+
diagnostics,
|
|
100886
|
+
strategyPath,
|
|
100887
|
+
"mode",
|
|
100888
|
+
hasProperty(strategy, "mode") ? strategy.mode : void 0,
|
|
100889
|
+
"string",
|
|
100890
|
+
["immediate", "deferred"]
|
|
100891
|
+
) && isValid;
|
|
100892
|
+
const maxDelay = hasProperty(strategy, "max_delay") ? strategy.max_delay : void 0;
|
|
100893
|
+
const maxDelayHasValidType = validateOptionalProperty(
|
|
100894
|
+
diagnostics,
|
|
100895
|
+
strategyPath,
|
|
100896
|
+
"max_delay",
|
|
100897
|
+
maxDelay,
|
|
100898
|
+
"number"
|
|
100899
|
+
);
|
|
100900
|
+
isValid = maxDelayHasValidType && isValid;
|
|
100901
|
+
if (maxDelayHasValidType && typeof maxDelay === "number" && (!Number.isFinite(maxDelay) || maxDelay < 0 || maxDelay > DURABLE_OBJECTS_CODE_UPDATE_MAX_DELAY_SECONDS)) {
|
|
100902
|
+
diagnostics.errors.push(
|
|
100903
|
+
`Expected "${strategyPath}.max_delay" to be between 0 and ${DURABLE_OBJECTS_CODE_UPDATE_MAX_DELAY_SECONDS} seconds but got ${JSON.stringify(maxDelay)}.`
|
|
100904
|
+
);
|
|
100905
|
+
isValid = false;
|
|
100906
|
+
}
|
|
100907
|
+
if (maxDelayHasValidType && typeof maxDelay === "number" && Number.isFinite(maxDelay) && maxDelay >= 0 && maxDelay <= DURABLE_OBJECTS_CODE_UPDATE_MAX_DELAY_SECONDS) {
|
|
100908
|
+
const milliseconds = maxDelay * 1e3;
|
|
100909
|
+
const roundedMilliseconds = Math.round(milliseconds);
|
|
100910
|
+
if (maxDelay > 0 && roundedMilliseconds === 0 || Math.abs(milliseconds - roundedMilliseconds) > MILLISECOND_PRECISION_TOLERANCE) {
|
|
100911
|
+
diagnostics.errors.push(
|
|
100912
|
+
`Expected "${strategyPath}.max_delay" to use millisecond precision but got ${JSON.stringify(maxDelay)}.`
|
|
100913
|
+
);
|
|
100914
|
+
isValid = false;
|
|
100915
|
+
}
|
|
100916
|
+
}
|
|
100917
|
+
return isValid;
|
|
100918
|
+
}, "validateDurableObjectsProperty");
|
|
101241
100919
|
var validateUnsafeSettings = /* @__PURE__ */ __name((envName) => (diagnostics, field, value, config50) => {
|
|
101242
100920
|
const fieldPath = config50 === void 0 ? `${field}` : `env.${envName}.${field}`;
|
|
101243
100921
|
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
@@ -104088,7 +103766,7 @@ var validatePreviewsConfig = /* @__PURE__ */ __name((envName, configPath) => (di
|
|
|
104088
103766
|
previews,
|
|
104089
103767
|
`${field}.placement`
|
|
104090
103768
|
);
|
|
104091
|
-
isValid =
|
|
103769
|
+
isValid = validateDurableObjectsProperty(envName, false, false)(
|
|
104092
103770
|
diagnostics,
|
|
104093
103771
|
`${field}.durable_objects`,
|
|
104094
103772
|
previews.durable_objects,
|
|
@@ -105098,8 +104776,7 @@ function warnIfDurableObjectsHaveNoLifecycleConfig(diagnostics, durableObjects,
|
|
|
105098
104776
|
if (entry === void 0 || entry.type !== "durable-object") {
|
|
105099
104777
|
return false;
|
|
105100
104778
|
}
|
|
105101
|
-
|
|
105102
|
-
return state === "created" || state === "expecting-transfer";
|
|
104779
|
+
return isLiveDurableObjectExport(entry);
|
|
105103
104780
|
}, "exportsCovers");
|
|
105104
104781
|
const uncoveredByExports = exportedDurableObjects.filter(
|
|
105105
104782
|
(binding) => typeof binding.class_name !== "string" || !exportsCovers(binding.class_name)
|
|
@@ -105346,6 +105023,9 @@ function isDockerfile(imagePath, configPath) {
|
|
|
105346
105023
|
return false;
|
|
105347
105024
|
}
|
|
105348
105025
|
__name(isDockerfile, "isDockerfile");
|
|
105026
|
+
function assertNever2(_value) {
|
|
105027
|
+
}
|
|
105028
|
+
__name(assertNever2, "assertNever");
|
|
105349
105029
|
var BINDING_LOCAL_SUPPORT = {
|
|
105350
105030
|
plain_text: "local-only",
|
|
105351
105031
|
secret_text: "local-only",
|
|
@@ -105443,8 +105123,6 @@ function validateBindingRemoteSetting(type, remote, warn2) {
|
|
|
105443
105123
|
);
|
|
105444
105124
|
}
|
|
105445
105125
|
return;
|
|
105446
|
-
default:
|
|
105447
|
-
assertNever2(support);
|
|
105448
105126
|
}
|
|
105449
105127
|
}
|
|
105450
105128
|
__name(validateBindingRemoteSetting, "validateBindingRemoteSetting");
|
|
@@ -105662,6 +105340,460 @@ function findFileUp(name3, startDir, lastDir) {
|
|
|
105662
105340
|
return void 0;
|
|
105663
105341
|
}
|
|
105664
105342
|
__name(findFileUp, "findFileUp");
|
|
105343
|
+
function mapWorkerMetadataBindings(bindings) {
|
|
105344
|
+
return bindings.filter((binding) => binding.type !== "secret_text").reduce((configObj, binding) => {
|
|
105345
|
+
switch (binding.type) {
|
|
105346
|
+
case "plain_text":
|
|
105347
|
+
{
|
|
105348
|
+
configObj.vars = {
|
|
105349
|
+
...configObj.vars ?? {},
|
|
105350
|
+
[binding.name]: binding.text
|
|
105351
|
+
};
|
|
105352
|
+
}
|
|
105353
|
+
break;
|
|
105354
|
+
case "json":
|
|
105355
|
+
{
|
|
105356
|
+
configObj.vars = {
|
|
105357
|
+
...configObj.vars ?? {},
|
|
105358
|
+
[binding.name]: binding.json
|
|
105359
|
+
};
|
|
105360
|
+
}
|
|
105361
|
+
break;
|
|
105362
|
+
case "kv_namespace":
|
|
105363
|
+
{
|
|
105364
|
+
configObj.kv_namespaces = [
|
|
105365
|
+
...configObj.kv_namespaces ?? [],
|
|
105366
|
+
{ id: binding.namespace_id, binding: binding.name }
|
|
105367
|
+
];
|
|
105368
|
+
}
|
|
105369
|
+
break;
|
|
105370
|
+
case "durable_object_namespace":
|
|
105371
|
+
{
|
|
105372
|
+
configObj.durable_objects = {
|
|
105373
|
+
bindings: [
|
|
105374
|
+
...configObj.durable_objects?.bindings ?? [],
|
|
105375
|
+
{
|
|
105376
|
+
name: binding.name,
|
|
105377
|
+
class_name: binding.class_name,
|
|
105378
|
+
script_name: binding.script_name,
|
|
105379
|
+
environment: binding.environment
|
|
105380
|
+
}
|
|
105381
|
+
]
|
|
105382
|
+
};
|
|
105383
|
+
}
|
|
105384
|
+
break;
|
|
105385
|
+
case "d1":
|
|
105386
|
+
{
|
|
105387
|
+
configObj.d1_databases = [
|
|
105388
|
+
...configObj.d1_databases ?? [],
|
|
105389
|
+
{
|
|
105390
|
+
binding: binding.name,
|
|
105391
|
+
database_id: binding.id
|
|
105392
|
+
}
|
|
105393
|
+
];
|
|
105394
|
+
}
|
|
105395
|
+
break;
|
|
105396
|
+
case "browser":
|
|
105397
|
+
{
|
|
105398
|
+
configObj.browser = {
|
|
105399
|
+
binding: binding.name
|
|
105400
|
+
};
|
|
105401
|
+
}
|
|
105402
|
+
break;
|
|
105403
|
+
case "ai":
|
|
105404
|
+
{
|
|
105405
|
+
configObj.ai = {
|
|
105406
|
+
binding: binding.name
|
|
105407
|
+
};
|
|
105408
|
+
}
|
|
105409
|
+
break;
|
|
105410
|
+
case "images":
|
|
105411
|
+
{
|
|
105412
|
+
configObj.images = {
|
|
105413
|
+
binding: binding.name
|
|
105414
|
+
};
|
|
105415
|
+
}
|
|
105416
|
+
break;
|
|
105417
|
+
case "stream":
|
|
105418
|
+
{
|
|
105419
|
+
configObj.stream = {
|
|
105420
|
+
binding: binding.name
|
|
105421
|
+
};
|
|
105422
|
+
}
|
|
105423
|
+
break;
|
|
105424
|
+
case "media":
|
|
105425
|
+
{
|
|
105426
|
+
configObj.media = {
|
|
105427
|
+
binding: binding.name
|
|
105428
|
+
};
|
|
105429
|
+
}
|
|
105430
|
+
break;
|
|
105431
|
+
case "r2_bucket":
|
|
105432
|
+
{
|
|
105433
|
+
configObj.r2_buckets = [
|
|
105434
|
+
...configObj.r2_buckets ?? [],
|
|
105435
|
+
{
|
|
105436
|
+
binding: binding.name,
|
|
105437
|
+
bucket_name: binding.bucket_name,
|
|
105438
|
+
jurisdiction: binding.jurisdiction
|
|
105439
|
+
}
|
|
105440
|
+
];
|
|
105441
|
+
}
|
|
105442
|
+
break;
|
|
105443
|
+
case "secrets_store_secret":
|
|
105444
|
+
{
|
|
105445
|
+
configObj.secrets_store_secrets = [
|
|
105446
|
+
...configObj.secrets_store_secrets ?? [],
|
|
105447
|
+
{
|
|
105448
|
+
binding: binding.name,
|
|
105449
|
+
store_id: binding.store_id,
|
|
105450
|
+
secret_name: binding.secret_name
|
|
105451
|
+
}
|
|
105452
|
+
];
|
|
105453
|
+
}
|
|
105454
|
+
break;
|
|
105455
|
+
case "artifacts":
|
|
105456
|
+
{
|
|
105457
|
+
configObj.artifacts = [
|
|
105458
|
+
...configObj.artifacts ?? [],
|
|
105459
|
+
{
|
|
105460
|
+
binding: binding.name,
|
|
105461
|
+
namespace: binding.namespace
|
|
105462
|
+
}
|
|
105463
|
+
];
|
|
105464
|
+
}
|
|
105465
|
+
break;
|
|
105466
|
+
case "unsafe_hello_world": {
|
|
105467
|
+
configObj.unsafe_hello_world = [
|
|
105468
|
+
...configObj.unsafe_hello_world ?? [],
|
|
105469
|
+
{
|
|
105470
|
+
binding: binding.name,
|
|
105471
|
+
enable_timer: binding.enable_timer
|
|
105472
|
+
}
|
|
105473
|
+
];
|
|
105474
|
+
break;
|
|
105475
|
+
}
|
|
105476
|
+
case "flagship": {
|
|
105477
|
+
configObj.flagship = [
|
|
105478
|
+
...configObj.flagship ?? [],
|
|
105479
|
+
{
|
|
105480
|
+
binding: binding.name,
|
|
105481
|
+
app_id: binding.app_id
|
|
105482
|
+
}
|
|
105483
|
+
];
|
|
105484
|
+
break;
|
|
105485
|
+
}
|
|
105486
|
+
case "service":
|
|
105487
|
+
{
|
|
105488
|
+
configObj.services = [
|
|
105489
|
+
...configObj.services ?? [],
|
|
105490
|
+
{
|
|
105491
|
+
binding: binding.name,
|
|
105492
|
+
service: binding.service,
|
|
105493
|
+
environment: binding.environment,
|
|
105494
|
+
entrypoint: binding.entrypoint
|
|
105495
|
+
}
|
|
105496
|
+
];
|
|
105497
|
+
}
|
|
105498
|
+
break;
|
|
105499
|
+
case "analytics_engine":
|
|
105500
|
+
{
|
|
105501
|
+
configObj.analytics_engine_datasets = [
|
|
105502
|
+
...configObj.analytics_engine_datasets ?? [],
|
|
105503
|
+
{ binding: binding.name, dataset: binding.dataset }
|
|
105504
|
+
];
|
|
105505
|
+
}
|
|
105506
|
+
break;
|
|
105507
|
+
case "dispatch_namespace":
|
|
105508
|
+
{
|
|
105509
|
+
configObj.dispatch_namespaces = [
|
|
105510
|
+
...configObj.dispatch_namespaces ?? [],
|
|
105511
|
+
{
|
|
105512
|
+
binding: binding.name,
|
|
105513
|
+
namespace: binding.namespace,
|
|
105514
|
+
...binding.outbound && {
|
|
105515
|
+
outbound: {
|
|
105516
|
+
service: binding.outbound.worker.service,
|
|
105517
|
+
environment: binding.outbound.worker.environment,
|
|
105518
|
+
parameters: binding.outbound.params?.map((p2) => p2.name) ?? []
|
|
105519
|
+
}
|
|
105520
|
+
}
|
|
105521
|
+
}
|
|
105522
|
+
];
|
|
105523
|
+
}
|
|
105524
|
+
break;
|
|
105525
|
+
case "logfwdr":
|
|
105526
|
+
{
|
|
105527
|
+
configObj.logfwdr = {
|
|
105528
|
+
bindings: [
|
|
105529
|
+
...configObj.logfwdr?.bindings ?? [],
|
|
105530
|
+
{ name: binding.name, destination: binding.destination }
|
|
105531
|
+
]
|
|
105532
|
+
};
|
|
105533
|
+
}
|
|
105534
|
+
break;
|
|
105535
|
+
case "wasm_module":
|
|
105536
|
+
{
|
|
105537
|
+
configObj.wasm_modules = {
|
|
105538
|
+
...configObj.wasm_modules ?? {},
|
|
105539
|
+
[binding.name]: binding.part
|
|
105540
|
+
};
|
|
105541
|
+
}
|
|
105542
|
+
break;
|
|
105543
|
+
case "text_blob":
|
|
105544
|
+
{
|
|
105545
|
+
configObj.text_blobs = {
|
|
105546
|
+
...configObj.text_blobs ?? {},
|
|
105547
|
+
[binding.name]: binding.part
|
|
105548
|
+
};
|
|
105549
|
+
}
|
|
105550
|
+
break;
|
|
105551
|
+
case "data_blob":
|
|
105552
|
+
{
|
|
105553
|
+
configObj.data_blobs = {
|
|
105554
|
+
...configObj.data_blobs ?? {},
|
|
105555
|
+
[binding.name]: binding.part
|
|
105556
|
+
};
|
|
105557
|
+
}
|
|
105558
|
+
break;
|
|
105559
|
+
case "secret_text":
|
|
105560
|
+
break;
|
|
105561
|
+
case "version_metadata": {
|
|
105562
|
+
{
|
|
105563
|
+
configObj.version_metadata = {
|
|
105564
|
+
binding: binding.name
|
|
105565
|
+
};
|
|
105566
|
+
}
|
|
105567
|
+
break;
|
|
105568
|
+
}
|
|
105569
|
+
case "send_email": {
|
|
105570
|
+
configObj.send_email = [
|
|
105571
|
+
...configObj.send_email ?? [],
|
|
105572
|
+
{
|
|
105573
|
+
name: binding.name,
|
|
105574
|
+
destination_address: binding.destination_address,
|
|
105575
|
+
allowed_destination_addresses: binding.allowed_destination_addresses,
|
|
105576
|
+
allowed_sender_addresses: binding.allowed_sender_addresses
|
|
105577
|
+
}
|
|
105578
|
+
];
|
|
105579
|
+
break;
|
|
105580
|
+
}
|
|
105581
|
+
case "queue":
|
|
105582
|
+
configObj.queues ??= { producers: [] };
|
|
105583
|
+
configObj.queues.producers = [
|
|
105584
|
+
...configObj.queues.producers ?? [],
|
|
105585
|
+
{
|
|
105586
|
+
binding: binding.name,
|
|
105587
|
+
queue: binding.queue_name,
|
|
105588
|
+
delivery_delay: binding.delivery_delay
|
|
105589
|
+
}
|
|
105590
|
+
];
|
|
105591
|
+
break;
|
|
105592
|
+
case "vectorize":
|
|
105593
|
+
configObj.vectorize = [
|
|
105594
|
+
...configObj.vectorize ?? [],
|
|
105595
|
+
{
|
|
105596
|
+
binding: binding.name,
|
|
105597
|
+
index_name: binding.index_name
|
|
105598
|
+
}
|
|
105599
|
+
];
|
|
105600
|
+
break;
|
|
105601
|
+
case "ai_search_namespace":
|
|
105602
|
+
configObj.ai_search_namespaces = [
|
|
105603
|
+
...configObj.ai_search_namespaces ?? [],
|
|
105604
|
+
{
|
|
105605
|
+
binding: binding.name,
|
|
105606
|
+
namespace: binding.namespace
|
|
105607
|
+
}
|
|
105608
|
+
];
|
|
105609
|
+
break;
|
|
105610
|
+
case "ai_search":
|
|
105611
|
+
configObj.ai_search = [
|
|
105612
|
+
...configObj.ai_search ?? [],
|
|
105613
|
+
{
|
|
105614
|
+
binding: binding.name,
|
|
105615
|
+
instance_name: binding.instance_name
|
|
105616
|
+
}
|
|
105617
|
+
];
|
|
105618
|
+
break;
|
|
105619
|
+
case "agent_memory": {
|
|
105620
|
+
configObj.agent_memory = [
|
|
105621
|
+
...configObj.agent_memory ?? [],
|
|
105622
|
+
{
|
|
105623
|
+
binding: binding.name,
|
|
105624
|
+
namespace: binding.namespace
|
|
105625
|
+
}
|
|
105626
|
+
];
|
|
105627
|
+
break;
|
|
105628
|
+
}
|
|
105629
|
+
case "hyperdrive":
|
|
105630
|
+
configObj.hyperdrive = [
|
|
105631
|
+
...configObj.hyperdrive ?? [],
|
|
105632
|
+
{
|
|
105633
|
+
binding: binding.name,
|
|
105634
|
+
id: binding.id
|
|
105635
|
+
}
|
|
105636
|
+
];
|
|
105637
|
+
break;
|
|
105638
|
+
case "mtls_certificate":
|
|
105639
|
+
configObj.mtls_certificates = [
|
|
105640
|
+
...configObj.mtls_certificates ?? [],
|
|
105641
|
+
{
|
|
105642
|
+
binding: binding.name,
|
|
105643
|
+
certificate_id: binding.certificate_id
|
|
105644
|
+
}
|
|
105645
|
+
];
|
|
105646
|
+
break;
|
|
105647
|
+
case "pipelines":
|
|
105648
|
+
configObj.pipelines = [
|
|
105649
|
+
...configObj.pipelines ?? [],
|
|
105650
|
+
{
|
|
105651
|
+
binding: binding.name,
|
|
105652
|
+
// NOTE: stream is the primary field, but we also support pipeline for backward compatibility
|
|
105653
|
+
...binding.stream && { stream: binding.stream },
|
|
105654
|
+
...binding.pipeline && { pipeline: binding.pipeline }
|
|
105655
|
+
}
|
|
105656
|
+
];
|
|
105657
|
+
break;
|
|
105658
|
+
case "assets":
|
|
105659
|
+
configObj.assets = {
|
|
105660
|
+
binding: binding.name
|
|
105661
|
+
// Note: we currently don't get all the assets information from the
|
|
105662
|
+
// API, so here we are only able to set the name of the binding
|
|
105663
|
+
// hopefully in the future we can properly fully support the binding
|
|
105664
|
+
};
|
|
105665
|
+
break;
|
|
105666
|
+
case "inherit":
|
|
105667
|
+
configObj.unsafe = {
|
|
105668
|
+
bindings: [...configObj.unsafe?.bindings ?? [], binding],
|
|
105669
|
+
metadata: configObj.unsafe?.metadata ?? void 0
|
|
105670
|
+
};
|
|
105671
|
+
break;
|
|
105672
|
+
case "workflow":
|
|
105673
|
+
{
|
|
105674
|
+
configObj.workflows = [
|
|
105675
|
+
...configObj.workflows ?? [],
|
|
105676
|
+
{
|
|
105677
|
+
binding: binding.name,
|
|
105678
|
+
name: binding.workflow_name,
|
|
105679
|
+
class_name: binding.class_name,
|
|
105680
|
+
script_name: binding.script_name
|
|
105681
|
+
}
|
|
105682
|
+
];
|
|
105683
|
+
}
|
|
105684
|
+
break;
|
|
105685
|
+
case "worker_loader":
|
|
105686
|
+
{
|
|
105687
|
+
configObj.worker_loaders = [
|
|
105688
|
+
...configObj.worker_loaders ?? [],
|
|
105689
|
+
{
|
|
105690
|
+
binding: binding.name
|
|
105691
|
+
}
|
|
105692
|
+
];
|
|
105693
|
+
}
|
|
105694
|
+
break;
|
|
105695
|
+
case "ratelimit":
|
|
105696
|
+
{
|
|
105697
|
+
configObj.ratelimits = [
|
|
105698
|
+
...configObj.ratelimits ?? [],
|
|
105699
|
+
{
|
|
105700
|
+
name: binding.name,
|
|
105701
|
+
namespace_id: binding.namespace_id,
|
|
105702
|
+
simple: {
|
|
105703
|
+
limit: binding.simple.limit,
|
|
105704
|
+
period: binding.simple.period
|
|
105705
|
+
}
|
|
105706
|
+
}
|
|
105707
|
+
];
|
|
105708
|
+
}
|
|
105709
|
+
break;
|
|
105710
|
+
case "vpc_service":
|
|
105711
|
+
{
|
|
105712
|
+
configObj.vpc_services = [
|
|
105713
|
+
...configObj.vpc_services ?? [],
|
|
105714
|
+
{
|
|
105715
|
+
binding: binding.name,
|
|
105716
|
+
service_id: binding.service_id
|
|
105717
|
+
}
|
|
105718
|
+
];
|
|
105719
|
+
}
|
|
105720
|
+
break;
|
|
105721
|
+
case "vpc_network":
|
|
105722
|
+
{
|
|
105723
|
+
if (binding.tunnel_id !== void 0) {
|
|
105724
|
+
configObj.vpc_networks = [
|
|
105725
|
+
...configObj.vpc_networks ?? [],
|
|
105726
|
+
{ binding: binding.name, tunnel_id: binding.tunnel_id }
|
|
105727
|
+
];
|
|
105728
|
+
} else if (binding.network_id !== void 0) {
|
|
105729
|
+
configObj.vpc_networks = [
|
|
105730
|
+
...configObj.vpc_networks ?? [],
|
|
105731
|
+
{ binding: binding.name, network_id: binding.network_id }
|
|
105732
|
+
];
|
|
105733
|
+
}
|
|
105734
|
+
}
|
|
105735
|
+
break;
|
|
105736
|
+
default: {
|
|
105737
|
+
configObj.unsafe = {
|
|
105738
|
+
bindings: [...configObj.unsafe?.bindings ?? [], binding],
|
|
105739
|
+
metadata: configObj.unsafe?.metadata ?? void 0
|
|
105740
|
+
};
|
|
105741
|
+
}
|
|
105742
|
+
}
|
|
105743
|
+
return configObj;
|
|
105744
|
+
}, {});
|
|
105745
|
+
}
|
|
105746
|
+
__name(mapWorkerMetadataBindings, "mapWorkerMetadataBindings");
|
|
105747
|
+
var DEFAULT_COMPAT_DATE = "2026-09-25";
|
|
105748
|
+
function constructWranglerConfig(config50) {
|
|
105749
|
+
const mappedBindings = mapWorkerMetadataBindings(config50.bindings);
|
|
105750
|
+
const durableObjectClassNames = config50.bindings.filter(
|
|
105751
|
+
(binding) => binding.type === "durable_object_namespace" && binding.script_name === config50.name
|
|
105752
|
+
).map(
|
|
105753
|
+
(durableObject) => durableObject.class_name
|
|
105754
|
+
);
|
|
105755
|
+
const allRoutes = [
|
|
105756
|
+
...config50.routes.map((r2) => ({
|
|
105757
|
+
pattern: r2.pattern,
|
|
105758
|
+
zone_name: r2.zone_name
|
|
105759
|
+
})),
|
|
105760
|
+
...config50.domains.map((c2) => ({
|
|
105761
|
+
pattern: c2.hostname,
|
|
105762
|
+
zone_name: c2.zone_name,
|
|
105763
|
+
custom_domain: true,
|
|
105764
|
+
enabled: c2.enabled,
|
|
105765
|
+
previews_enabled: c2.previews_enabled
|
|
105766
|
+
}))
|
|
105767
|
+
];
|
|
105768
|
+
return {
|
|
105769
|
+
name: config50.name,
|
|
105770
|
+
main: config50.entrypoint,
|
|
105771
|
+
workers_dev: config50.subdomain.enabled,
|
|
105772
|
+
preview_urls: config50.subdomain.previews_enabled,
|
|
105773
|
+
compatibility_date: config50.compatibility_date ?? DEFAULT_COMPAT_DATE,
|
|
105774
|
+
compatibility_flags: config50.compatibility_flags,
|
|
105775
|
+
...allRoutes.length ? { routes: allRoutes } : {},
|
|
105776
|
+
placement: config50.placement?.mode === "smart" ? { mode: "smart" } : void 0,
|
|
105777
|
+
limits: config50.limits,
|
|
105778
|
+
...durableObjectClassNames.length && config50.migration_tag ? {
|
|
105779
|
+
migrations: [
|
|
105780
|
+
{
|
|
105781
|
+
tag: config50.migration_tag,
|
|
105782
|
+
new_classes: durableObjectClassNames
|
|
105783
|
+
}
|
|
105784
|
+
]
|
|
105785
|
+
} : {},
|
|
105786
|
+
...config50.schedules.length ? {
|
|
105787
|
+
triggers: {
|
|
105788
|
+
crons: config50.schedules.map((scheduled) => scheduled.cron)
|
|
105789
|
+
}
|
|
105790
|
+
} : {},
|
|
105791
|
+
tail_consumers: config50.tail_consumers ?? void 0,
|
|
105792
|
+
observability: config50.observability,
|
|
105793
|
+
...mappedBindings
|
|
105794
|
+
};
|
|
105795
|
+
}
|
|
105796
|
+
__name(constructWranglerConfig, "constructWranglerConfig");
|
|
105665
105797
|
function assertNever22(_value) {
|
|
105666
105798
|
}
|
|
105667
105799
|
__name(assertNever22, "assertNever");
|
|
@@ -108548,7 +108680,7 @@ async function fetchLatestNpmVersion(name3, version4) {
|
|
|
108548
108680
|
__name(fetchLatestNpmVersion, "fetchLatestNpmVersion");
|
|
108549
108681
|
async function openInBrowser(url2, logger) {
|
|
108550
108682
|
try {
|
|
108551
|
-
const { default: open3 } = await Promise.resolve().then(() => (
|
|
108683
|
+
const { default: open3 } = await Promise.resolve().then(() => (init_open_PCXX3ZDZ(), open_PCXX3ZDZ_exports));
|
|
108552
108684
|
const childProcess5 = await open3(url2);
|
|
108553
108685
|
childProcess5.on("error", (err) => {
|
|
108554
108686
|
handleBrowserOpenError(url2, err, logger);
|
|
@@ -110440,12 +110572,12 @@ var y18n2 = (opts) => {
|
|
|
110440
110572
|
var y18n_default = y18n2;
|
|
110441
110573
|
|
|
110442
110574
|
// ../../node_modules/.pnpm/yargs@17.7.2/node_modules/yargs/lib/platform-shims/esm.mjs
|
|
110443
|
-
var
|
|
110575
|
+
var import_meta14 = {};
|
|
110444
110576
|
var REQUIRE_ERROR = "require is not supported by ESM";
|
|
110445
110577
|
var REQUIRE_DIRECTORY_ERROR = "loading a directory of commands is not supported yet for ESM";
|
|
110446
110578
|
var __dirname2;
|
|
110447
110579
|
try {
|
|
110448
|
-
__dirname2 = (0, import_url.fileURLToPath)(
|
|
110580
|
+
__dirname2 = (0, import_url.fileURLToPath)(import_meta14.url);
|
|
110449
110581
|
} catch (e) {
|
|
110450
110582
|
__dirname2 = process.cwd();
|
|
110451
110583
|
}
|
|
@@ -113772,7 +113904,7 @@ var Yargs = YargsFactory(esm_default2);
|
|
|
113772
113904
|
var yargs_default = Yargs;
|
|
113773
113905
|
|
|
113774
113906
|
// package.json
|
|
113775
|
-
var version2 = "2.72.
|
|
113907
|
+
var version2 = "2.72.13";
|
|
113776
113908
|
|
|
113777
113909
|
// src/metrics.ts
|
|
113778
113910
|
var import_node_async_hooks = require("node:async_hooks");
|
|
@@ -113782,6 +113914,13 @@ var import_promises3 = require("node:timers/promises");
|
|
|
113782
113914
|
var import_node_crypto2 = require("node:crypto");
|
|
113783
113915
|
var import_node_fs6 = require("node:fs");
|
|
113784
113916
|
var import_node_path7 = __toESM(require("node:path"));
|
|
113917
|
+
|
|
113918
|
+
// ../workers-utils/dist/global-wrangler-config-path.mjs
|
|
113919
|
+
var import_node_module14 = require("node:module");
|
|
113920
|
+
var import_meta15 = {};
|
|
113921
|
+
(0, import_node_module14.createRequire)(import_meta15.url || (typeof __filename === "string" ? __filename : "/"));
|
|
113922
|
+
|
|
113923
|
+
// src/helpers/metrics-config.ts
|
|
113785
113924
|
function writeMetricsConfig(config50) {
|
|
113786
113925
|
(0, import_node_fs6.mkdirSync)(import_node_path7.default.dirname(getMetricsConfigPath()), { recursive: true });
|
|
113787
113926
|
(0, import_node_fs6.writeFileSync)(
|
|
@@ -113901,6 +114040,11 @@ function quoteShellArgs(args) {
|
|
|
113901
114040
|
}).join(" ");
|
|
113902
114041
|
}
|
|
113903
114042
|
|
|
114043
|
+
// ../workers-utils/dist/fs-helpers.mjs
|
|
114044
|
+
var import_node_module15 = require("node:module");
|
|
114045
|
+
var import_meta16 = {};
|
|
114046
|
+
(0, import_node_module15.createRequire)(import_meta16.url || (typeof __filename === "string" ? __filename : "/"));
|
|
114047
|
+
|
|
113904
114048
|
// src/helpers/packageManagers.ts
|
|
113905
114049
|
var import_semver = __toESM(require_semver2());
|
|
113906
114050
|
var import_which_pm_runs = __toESM(require_which_pm_runs());
|
|
@@ -114316,7 +114460,7 @@ var import_node_path9 = __toESM(require("node:path"), 1);
|
|
|
114316
114460
|
var import_node_assert4 = __toESM(require("node:assert"), 1);
|
|
114317
114461
|
var import_promises4 = require("node:fs/promises");
|
|
114318
114462
|
var installPackages = async (packageManager, packages, config50 = {}) => {
|
|
114319
|
-
const { force, dev, startText, doneText } = config50;
|
|
114463
|
+
const { cwd = process.cwd(), force, dev, startText, doneText } = config50;
|
|
114320
114464
|
const isWorkspaceRoot = config50.isWorkspaceRoot ?? false;
|
|
114321
114465
|
if (packages.length === 0) {
|
|
114322
114466
|
let cmd$1;
|
|
@@ -114338,7 +114482,7 @@ var installPackages = async (packageManager, packages, config50 = {}) => {
|
|
|
114338
114482
|
...force === true ? ["--force"] : [],
|
|
114339
114483
|
...getWorkspaceInstallRootFlag(packageManager, isWorkspaceRoot)
|
|
114340
114484
|
], {
|
|
114341
|
-
cwd
|
|
114485
|
+
cwd,
|
|
114342
114486
|
startText,
|
|
114343
114487
|
doneText,
|
|
114344
114488
|
silent: true
|
|
@@ -114372,12 +114516,13 @@ var installPackages = async (packageManager, packages, config50 = {}) => {
|
|
|
114372
114516
|
...force === true ? ["--force"] : [],
|
|
114373
114517
|
...getWorkspaceInstallRootFlag(packageManager, isWorkspaceRoot)
|
|
114374
114518
|
], {
|
|
114519
|
+
cwd,
|
|
114375
114520
|
startText,
|
|
114376
114521
|
doneText,
|
|
114377
114522
|
silent: true
|
|
114378
114523
|
});
|
|
114379
114524
|
if (packageManager === "npm") {
|
|
114380
|
-
const pkgJsonPath = import_node_path9.default.join(
|
|
114525
|
+
const pkgJsonPath = import_node_path9.default.join(cwd, "package.json");
|
|
114381
114526
|
const pkgJson = parsePackageJSON(readFileSync(pkgJsonPath), pkgJsonPath);
|
|
114382
114527
|
const deps = config50.dev ? pkgJson.devDependencies : pkgJson.dependencies;
|
|
114383
114528
|
(0, import_node_assert4.default)(deps, "dependencies should be defined");
|
|
@@ -116014,9 +116159,9 @@ var isInSsh2 = Boolean(import_node_process13.default.env.SSH_CONNECTION || impor
|
|
|
116014
116159
|
var is_in_ssh_default2 = isInSsh2;
|
|
116015
116160
|
|
|
116016
116161
|
// ../../node_modules/.pnpm/open@11.0.0/node_modules/open/index.js
|
|
116017
|
-
var
|
|
116162
|
+
var import_meta17 = {};
|
|
116018
116163
|
var fallbackAttemptSymbol2 = /* @__PURE__ */ Symbol("fallbackAttempt");
|
|
116019
|
-
var __dirname3 =
|
|
116164
|
+
var __dirname3 = import_meta17.url ? import_node_path13.default.dirname((0, import_node_url3.fileURLToPath)(import_meta17.url)) : "";
|
|
116020
116165
|
var localXdgOpenPath2 = import_node_path13.default.join(__dirname3, "xdg-open");
|
|
116021
116166
|
var { platform: platform2, arch: arch3 } = import_node_process14.default;
|
|
116022
116167
|
var tryEachApp2 = async (apps3, opener) => {
|
|
@@ -116355,12 +116500,15 @@ var WRANGLER_DEFAULTS = {
|
|
|
116355
116500
|
};
|
|
116356
116501
|
|
|
116357
116502
|
// ../shared-ast-primitives/dist/index.mjs
|
|
116503
|
+
var import_node_module16 = require("node:module");
|
|
116358
116504
|
var import_node_fs15 = require("node:fs");
|
|
116359
116505
|
var import_node_path14 = __toESM(require("node:path"), 1);
|
|
116360
116506
|
var recast = __toESM(require_main2(), 1);
|
|
116361
116507
|
var import_recast = __toESM(require_main2(), 1);
|
|
116362
116508
|
var esprimaParser = __toESM(require_esprima3(), 1);
|
|
116363
116509
|
var typescriptParser = __toESM(require_typescript2(), 1);
|
|
116510
|
+
var import_meta18 = {};
|
|
116511
|
+
(0, import_node_module16.createRequire)(import_meta18.url || (typeof __filename === "string" ? __filename : "/"));
|
|
116364
116512
|
var __defProp3 = Object.defineProperty;
|
|
116365
116513
|
var __name2 = (target, value) => __defProp3(target, "name", { value, configurable: true });
|
|
116366
116514
|
function parseJs(src) {
|
|
@@ -116592,6 +116740,7 @@ var config2 = {
|
|
|
116592
116740
|
frameworkCli: "create-analog",
|
|
116593
116741
|
displayName: "Analog",
|
|
116594
116742
|
platform: "workers",
|
|
116743
|
+
languages: ["ts"],
|
|
116595
116744
|
copyFiles: {
|
|
116596
116745
|
path: "./templates"
|
|
116597
116746
|
},
|
|
@@ -116675,6 +116824,7 @@ var config3 = {
|
|
|
116675
116824
|
frameworkCli: "@angular/create",
|
|
116676
116825
|
displayName: "Angular",
|
|
116677
116826
|
platform: "pages",
|
|
116827
|
+
languages: ["ts"],
|
|
116678
116828
|
hidden: true,
|
|
116679
116829
|
copyFiles: {
|
|
116680
116830
|
path: "./templates"
|
|
@@ -116760,6 +116910,7 @@ var config4 = {
|
|
|
116760
116910
|
frameworkCli: "@angular/create",
|
|
116761
116911
|
displayName: "Angular",
|
|
116762
116912
|
platform: "workers",
|
|
116913
|
+
languages: ["ts"],
|
|
116763
116914
|
copyFiles: {
|
|
116764
116915
|
path: "./templates"
|
|
116765
116916
|
},
|
|
@@ -116969,6 +117120,7 @@ var config10 = {
|
|
|
116969
117120
|
id: "docusaurus",
|
|
116970
117121
|
frameworkCli: "create-docusaurus",
|
|
116971
117122
|
platform: "pages",
|
|
117123
|
+
languages: ["js", "ts"],
|
|
116972
117124
|
hidden: true,
|
|
116973
117125
|
displayName: "Docusaurus",
|
|
116974
117126
|
path: "templates/docusaurus/pages",
|
|
@@ -116996,6 +117148,7 @@ var config11 = {
|
|
|
116996
117148
|
id: "docusaurus",
|
|
116997
117149
|
frameworkCli: "create-docusaurus",
|
|
116998
117150
|
platform: "workers",
|
|
117151
|
+
languages: ["js", "ts"],
|
|
116999
117152
|
displayName: "Docusaurus",
|
|
117000
117153
|
copyFiles: {
|
|
117001
117154
|
path: "./templates"
|
|
@@ -117048,6 +117201,7 @@ var config13 = {
|
|
|
117048
117201
|
id: "gatsby",
|
|
117049
117202
|
frameworkCli: "gatsby",
|
|
117050
117203
|
platform: "pages",
|
|
117204
|
+
languages: ["js", "ts"],
|
|
117051
117205
|
hidden: true,
|
|
117052
117206
|
displayName: "Gatsby",
|
|
117053
117207
|
path: "templates/gatsby/pages",
|
|
@@ -117091,6 +117245,7 @@ var config14 = {
|
|
|
117091
117245
|
id: "gatsby",
|
|
117092
117246
|
frameworkCli: "gatsby",
|
|
117093
117247
|
platform: "workers",
|
|
117248
|
+
languages: ["js", "ts"],
|
|
117094
117249
|
displayName: "Gatsby",
|
|
117095
117250
|
copyFiles: {
|
|
117096
117251
|
path: "./templates"
|
|
@@ -117125,6 +117280,7 @@ var config16 = {
|
|
|
117125
117280
|
displayName: "Static site",
|
|
117126
117281
|
description: "For static sites or when using your own backend. Uses Workers Static Assets.",
|
|
117127
117282
|
platform: "workers",
|
|
117283
|
+
languages: ["js", "ts"],
|
|
117128
117284
|
copyFiles: {
|
|
117129
117285
|
path: "./templates"
|
|
117130
117286
|
}
|
|
@@ -117267,6 +117423,7 @@ var config20 = {
|
|
|
117267
117423
|
},
|
|
117268
117424
|
path: "templates/hono/pages",
|
|
117269
117425
|
platform: "pages",
|
|
117426
|
+
languages: ["ts"],
|
|
117270
117427
|
hidden: true,
|
|
117271
117428
|
generate: generate10,
|
|
117272
117429
|
transformPackageJson: async () => ({
|
|
@@ -117305,6 +117462,7 @@ var config21 = {
|
|
|
117305
117462
|
path: "./templates"
|
|
117306
117463
|
},
|
|
117307
117464
|
platform: "workers",
|
|
117465
|
+
languages: ["ts"],
|
|
117308
117466
|
path: "templates/hono/workers",
|
|
117309
117467
|
generate: generate11,
|
|
117310
117468
|
transformPackageJson: async () => ({
|
|
@@ -117411,6 +117569,7 @@ var c3_default24 = {
|
|
|
117411
117569
|
// remote template and does not invoke this CLI.
|
|
117412
117570
|
frameworkCli: "create-vinext-app",
|
|
117413
117571
|
platform: "workers",
|
|
117572
|
+
languages: ["ts"],
|
|
117414
117573
|
displayName: "Next.js",
|
|
117415
117574
|
generate: generate12,
|
|
117416
117575
|
transformPackageJson: async (_pkgJson, ctx) => {
|
|
@@ -117449,6 +117608,7 @@ var experimental_c3_default = {
|
|
|
117449
117608
|
id: "next",
|
|
117450
117609
|
frameworkCli: "create-next-app",
|
|
117451
117610
|
platform: "workers",
|
|
117611
|
+
languages: ["js", "ts"],
|
|
117452
117612
|
displayName: "Next.js",
|
|
117453
117613
|
generate: generate13,
|
|
117454
117614
|
devScript: "dev",
|
|
@@ -117533,6 +117693,7 @@ var config23 = {
|
|
|
117533
117693
|
id: "nuxt",
|
|
117534
117694
|
frameworkCli: "nuxi",
|
|
117535
117695
|
platform: "pages",
|
|
117696
|
+
languages: ["ts"],
|
|
117536
117697
|
hidden: true,
|
|
117537
117698
|
displayName: "Nuxt",
|
|
117538
117699
|
copyFiles: {
|
|
@@ -117629,6 +117790,7 @@ var config24 = {
|
|
|
117629
117790
|
id: "nuxt",
|
|
117630
117791
|
frameworkCli: "nuxi",
|
|
117631
117792
|
platform: "workers",
|
|
117793
|
+
languages: ["ts"],
|
|
117632
117794
|
displayName: "Nuxt",
|
|
117633
117795
|
copyFiles: {
|
|
117634
117796
|
path: "./templates"
|
|
@@ -117665,7 +117827,8 @@ var config26 = {
|
|
|
117665
117827
|
platform: "workers",
|
|
117666
117828
|
copyFiles: {
|
|
117667
117829
|
path: "./ts"
|
|
117668
|
-
}
|
|
117830
|
+
},
|
|
117831
|
+
languages: ["ts"]
|
|
117669
117832
|
};
|
|
117670
117833
|
var c3_default28 = config26;
|
|
117671
117834
|
|
|
@@ -117856,6 +118019,7 @@ var config27 = {
|
|
|
117856
118019
|
copyFiles: {
|
|
117857
118020
|
path: "./js"
|
|
117858
118021
|
},
|
|
118022
|
+
languages: ["js"],
|
|
117859
118023
|
configure: buildConfigure({
|
|
117860
118024
|
login: wranglerLogin,
|
|
117861
118025
|
chooseAccount,
|
|
@@ -117994,6 +118158,7 @@ var config29 = {
|
|
|
117994
118158
|
frameworkCli: "create-qwik",
|
|
117995
118159
|
displayName: "Qwik",
|
|
117996
118160
|
platform: "pages",
|
|
118161
|
+
languages: ["ts"],
|
|
117997
118162
|
hidden: true,
|
|
117998
118163
|
copyFiles: {
|
|
117999
118164
|
path: "./templates"
|
|
@@ -118082,6 +118247,7 @@ var config30 = {
|
|
|
118082
118247
|
frameworkCli: "create-qwik",
|
|
118083
118248
|
displayName: "Qwik",
|
|
118084
118249
|
platform: "workers",
|
|
118250
|
+
languages: ["ts"],
|
|
118085
118251
|
copyFiles: {
|
|
118086
118252
|
path: "./templates"
|
|
118087
118253
|
},
|
|
@@ -118148,6 +118314,7 @@ var config32 = {
|
|
|
118148
118314
|
copyFiles: {
|
|
118149
118315
|
path: "./ts"
|
|
118150
118316
|
},
|
|
118317
|
+
languages: ["ts"],
|
|
118151
118318
|
generate: generate18,
|
|
118152
118319
|
configure: configure10,
|
|
118153
118320
|
transformPackageJson: async () => ({
|
|
@@ -118220,6 +118387,7 @@ var config33 = {
|
|
|
118220
118387
|
frameworkCli: "create-vite",
|
|
118221
118388
|
displayName: "React",
|
|
118222
118389
|
platform: "pages",
|
|
118390
|
+
languages: ["js", "ts"],
|
|
118223
118391
|
hidden: true,
|
|
118224
118392
|
path: "templates/react/pages",
|
|
118225
118393
|
copyFiles: { path: "./templates" },
|
|
@@ -118404,6 +118572,7 @@ var config36 = {
|
|
|
118404
118572
|
configVersion: 1,
|
|
118405
118573
|
id: "redwood",
|
|
118406
118574
|
platform: "workers",
|
|
118575
|
+
languages: ["ts"],
|
|
118407
118576
|
frameworkCli: "create-rwsdk",
|
|
118408
118577
|
displayName: "RedwoodSDK",
|
|
118409
118578
|
generate: generate21,
|
|
@@ -118480,6 +118649,7 @@ var config38 = {
|
|
|
118480
118649
|
frameworkCli: "create-solid",
|
|
118481
118650
|
displayName: "SolidStart",
|
|
118482
118651
|
platform: "workers",
|
|
118652
|
+
languages: ["js", "ts"],
|
|
118483
118653
|
copyFiles: {
|
|
118484
118654
|
path: "./templates"
|
|
118485
118655
|
},
|
|
@@ -118597,6 +118767,7 @@ var config39 = {
|
|
|
118597
118767
|
frameworkCli: "sv",
|
|
118598
118768
|
displayName: "SvelteKit",
|
|
118599
118769
|
platform: "pages",
|
|
118770
|
+
languages: ["js", "ts"],
|
|
118600
118771
|
hidden: true,
|
|
118601
118772
|
copyFiles: {
|
|
118602
118773
|
path: "./templates"
|
|
@@ -118698,6 +118869,7 @@ var config40 = {
|
|
|
118698
118869
|
frameworkCli: "sv",
|
|
118699
118870
|
displayName: "SvelteKit",
|
|
118700
118871
|
platform: "workers",
|
|
118872
|
+
languages: ["js", "ts"],
|
|
118701
118873
|
copyFiles: {
|
|
118702
118874
|
path: "./templates"
|
|
118703
118875
|
},
|
|
@@ -118753,6 +118925,7 @@ var config42 = {
|
|
|
118753
118925
|
configVersion: 1,
|
|
118754
118926
|
id: "tanstack-start",
|
|
118755
118927
|
platform: "workers",
|
|
118928
|
+
languages: ["ts"],
|
|
118756
118929
|
frameworkCli: "@tanstack/cli",
|
|
118757
118930
|
displayName: "TanStack Start",
|
|
118758
118931
|
generate: generate25,
|
|
@@ -118783,6 +118956,7 @@ var config43 = {
|
|
|
118783
118956
|
configVersion: 1,
|
|
118784
118957
|
id: "vike",
|
|
118785
118958
|
platform: "workers",
|
|
118959
|
+
languages: ["ts"],
|
|
118786
118960
|
frameworkCli: "create-vike",
|
|
118787
118961
|
displayName: "Vike",
|
|
118788
118962
|
generate: generate26,
|
|
@@ -118813,6 +118987,7 @@ var config44 = {
|
|
|
118813
118987
|
configVersion: 1,
|
|
118814
118988
|
id: "vike",
|
|
118815
118989
|
platform: "workers",
|
|
118990
|
+
languages: ["ts"],
|
|
118816
118991
|
frameworkCli: "create-vike",
|
|
118817
118992
|
displayName: "Vike",
|
|
118818
118993
|
generate: generate27,
|
|
@@ -118833,6 +119008,7 @@ var config45 = {
|
|
|
118833
119008
|
frameworkCli: "create-vue",
|
|
118834
119009
|
displayName: "Vue",
|
|
118835
119010
|
platform: "pages",
|
|
119011
|
+
languages: ["js", "ts"],
|
|
118836
119012
|
hidden: true,
|
|
118837
119013
|
path: "templates/vue/pages",
|
|
118838
119014
|
copyFiles: { path: "./templates" },
|
|
@@ -118965,6 +119141,7 @@ var config48 = {
|
|
|
118965
119141
|
id: "waku",
|
|
118966
119142
|
frameworkCli: "create-waku",
|
|
118967
119143
|
platform: "workers",
|
|
119144
|
+
languages: ["ts"],
|
|
118968
119145
|
displayName: "Waku",
|
|
118969
119146
|
copyFiles: {
|
|
118970
119147
|
path: "./templates"
|
|
@@ -119003,6 +119180,7 @@ var config49 = {
|
|
|
119003
119180
|
id: "waku",
|
|
119004
119181
|
frameworkCli: "create-waku",
|
|
119005
119182
|
platform: "workers",
|
|
119183
|
+
languages: ["ts"],
|
|
119006
119184
|
displayName: "Waku",
|
|
119007
119185
|
generate: generate31,
|
|
119008
119186
|
devScript: "dev",
|
|
@@ -119080,7 +119258,7 @@ If the application uses Durable Objects or Workflows, refer to the relevant best
|
|
|
119080
119258
|
var import_node_assert7 = __toESM(require("node:assert"));
|
|
119081
119259
|
|
|
119082
119260
|
// ../wrangler/package.json
|
|
119083
|
-
var version3 = "4.
|
|
119261
|
+
var version3 = "4.141.0";
|
|
119084
119262
|
|
|
119085
119263
|
// src/git.ts
|
|
119086
119264
|
var offerGit = async (ctx) => {
|
|
@@ -119356,15 +119534,15 @@ var isAllowedExistingFile = (file3) => {
|
|
|
119356
119534
|
var defaultSelectVariant = async (ctx) => {
|
|
119357
119535
|
return ctx.args.lang;
|
|
119358
119536
|
};
|
|
119359
|
-
var
|
|
119537
|
+
var getTemplateLanguages = (config50) => {
|
|
119360
119538
|
const { copyFiles } = config50;
|
|
119361
|
-
if (
|
|
119362
|
-
return
|
|
119363
|
-
}
|
|
119364
|
-
if (copyFiles.variants && !copyFiles.variants[lang]) {
|
|
119365
|
-
return false;
|
|
119539
|
+
if (copyFiles && !isVariantInfo(copyFiles)) {
|
|
119540
|
+
return Object.keys(copyFiles.variants);
|
|
119366
119541
|
}
|
|
119367
|
-
return
|
|
119542
|
+
return config50.languages ?? [];
|
|
119543
|
+
};
|
|
119544
|
+
var templateSupportsLanguage = (config50, lang) => {
|
|
119545
|
+
return getTemplateLanguages(config50).includes(lang);
|
|
119368
119546
|
};
|
|
119369
119547
|
var filterTemplatesByLanguage = (templates, lang) => {
|
|
119370
119548
|
if (!lang) {
|