wrangler 4.140.0 → 4.142.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/config-schema.json +98 -92
- package/package.json +18 -18
- package/wrangler-dist/cli.d.ts +29 -6
- package/wrangler-dist/cli.js +428 -72
- package/wrangler-dist/experimental-config.d.mts +24 -11
- package/wrangler-dist/experimental-config.d.mts.map +1 -1
- package/wrangler-dist/experimental-config.mjs +6 -2
- package/wrangler-dist/experimental-config.mjs.map +1 -1
package/wrangler-dist/cli.js
CHANGED
|
@@ -3173,6 +3173,19 @@ function indexLocation(file3, index) {
|
|
|
3173
3173
|
}
|
|
3174
3174
|
return { lineText, line, column, ...file3 };
|
|
3175
3175
|
}
|
|
3176
|
+
function parseHumanDuration(s8) {
|
|
3177
|
+
const unitsMap = new Map(Object.entries(units));
|
|
3178
|
+
s8 = s8.trim().toLowerCase();
|
|
3179
|
+
let base = 1;
|
|
3180
|
+
for (const [name2, _5] of unitsMap) {
|
|
3181
|
+
if (s8.endsWith(name2)) {
|
|
3182
|
+
s8 = s8.substring(0, s8.length - name2.length);
|
|
3183
|
+
base = unitsMap.get(name2) || 1;
|
|
3184
|
+
break;
|
|
3185
|
+
}
|
|
3186
|
+
}
|
|
3187
|
+
return Number(s8) * base;
|
|
3188
|
+
}
|
|
3176
3189
|
function parseNonHyphenedUuid(uuid3) {
|
|
3177
3190
|
if (uuid3 == null || uuid3.includes("-")) {
|
|
3178
3191
|
return uuid3;
|
|
@@ -3242,7 +3255,7 @@ function removeBOMAndValidate(buffer, file3) {
|
|
|
3242
3255
|
}
|
|
3243
3256
|
return content;
|
|
3244
3257
|
}
|
|
3245
|
-
var ParseError, APIError, UNSUPPORTED_BOMS;
|
|
3258
|
+
var ParseError, APIError, units, UNSUPPORTED_BOMS;
|
|
3246
3259
|
var init_parse2 = __esm({
|
|
3247
3260
|
"../workers-utils/src/parse.ts"() {
|
|
3248
3261
|
init_import_meta_url();
|
|
@@ -3322,6 +3335,48 @@ var init_parse2 = __esm({
|
|
|
3322
3335
|
__name(readFileSyncToBuffer, "readFileSyncToBuffer");
|
|
3323
3336
|
__name(readFileSync, "readFileSync");
|
|
3324
3337
|
__name(indexLocation, "indexLocation");
|
|
3338
|
+
units = {
|
|
3339
|
+
nanoseconds: 1e-9,
|
|
3340
|
+
nanosecond: 1e-9,
|
|
3341
|
+
microseconds: 1e-6,
|
|
3342
|
+
microsecond: 1e-6,
|
|
3343
|
+
milliseconds: 1e-3,
|
|
3344
|
+
millisecond: 1e-3,
|
|
3345
|
+
seconds: 1,
|
|
3346
|
+
second: 1,
|
|
3347
|
+
minutes: 60,
|
|
3348
|
+
minute: 60,
|
|
3349
|
+
hours: 3600,
|
|
3350
|
+
hour: 3600,
|
|
3351
|
+
days: 86400,
|
|
3352
|
+
day: 86400,
|
|
3353
|
+
weeks: 604800,
|
|
3354
|
+
week: 604800,
|
|
3355
|
+
month: 18144e3,
|
|
3356
|
+
year: 220752e3,
|
|
3357
|
+
nsecs: 1e-9,
|
|
3358
|
+
nsec: 1e-9,
|
|
3359
|
+
usecs: 1e-6,
|
|
3360
|
+
usec: 1e-6,
|
|
3361
|
+
msecs: 1e-3,
|
|
3362
|
+
msec: 1e-3,
|
|
3363
|
+
secs: 1,
|
|
3364
|
+
sec: 1,
|
|
3365
|
+
mins: 60,
|
|
3366
|
+
min: 60,
|
|
3367
|
+
ns: 1e-9,
|
|
3368
|
+
us: 1e-6,
|
|
3369
|
+
ms: 1e-3,
|
|
3370
|
+
mo: 18144e3,
|
|
3371
|
+
yr: 220752e3,
|
|
3372
|
+
s: 1,
|
|
3373
|
+
m: 60,
|
|
3374
|
+
h: 3600,
|
|
3375
|
+
d: 86400,
|
|
3376
|
+
w: 604800,
|
|
3377
|
+
y: 220752e3
|
|
3378
|
+
};
|
|
3379
|
+
__name(parseHumanDuration, "parseHumanDuration");
|
|
3325
3380
|
__name(parseNonHyphenedUuid, "parseNonHyphenedUuid");
|
|
3326
3381
|
__name(parseByteSize, "parseByteSize");
|
|
3327
3382
|
UNSUPPORTED_BOMS = [
|
|
@@ -21205,18 +21260,22 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
|
|
|
21205
21260
|
validateDefines(envName),
|
|
21206
21261
|
{}
|
|
21207
21262
|
),
|
|
21208
|
-
durable_objects:
|
|
21209
|
-
|
|
21210
|
-
|
|
21211
|
-
|
|
21212
|
-
|
|
21213
|
-
|
|
21214
|
-
|
|
21215
|
-
|
|
21216
|
-
|
|
21217
|
-
bindings: []
|
|
21218
|
-
|
|
21219
|
-
|
|
21263
|
+
durable_objects: (() => {
|
|
21264
|
+
const durableObjects = notInheritable(
|
|
21265
|
+
diagnostics,
|
|
21266
|
+
topLevelEnv,
|
|
21267
|
+
rawConfig,
|
|
21268
|
+
rawEnv,
|
|
21269
|
+
envName,
|
|
21270
|
+
"durable_objects",
|
|
21271
|
+
validateDurableObjectsProperty(envName, true),
|
|
21272
|
+
{ bindings: [] }
|
|
21273
|
+
);
|
|
21274
|
+
return {
|
|
21275
|
+
...durableObjects,
|
|
21276
|
+
bindings: durableObjects.bindings ?? []
|
|
21277
|
+
};
|
|
21278
|
+
})(),
|
|
21220
21279
|
workflows: notInheritable(
|
|
21221
21280
|
diagnostics,
|
|
21222
21281
|
topLevelEnv,
|
|
@@ -23222,7 +23281,7 @@ function isDockerfile(imagePath, configPath) {
|
|
|
23222
23281
|
}
|
|
23223
23282
|
return false;
|
|
23224
23283
|
}
|
|
23225
|
-
var bucketFormatMessage, friendlyBindingNames, bindingTypeFriendlyNames, ENGLISH, ALLOWED_INSTANCE_TYPES, isRoute, isRouteArray, validateTailConsumers, validateStreamingTailConsumers, validateAndNormalizeRules, ARTIFACTS_EVENT_TYPE_SET, validateTriggers, validateRules, validateRule, validateDefines, validateVars, validateSecrets, validateBindingsProperty, validateUnsafeSettings, validateDurableObjectBinding, workflowNameFormatMessage, validateWorkflowBinding, validateCflogfwdrObject, validateCflogfwdrBinding, validateAssetsConfig, validateNamedSimpleBinding, validateAIBinding, validateVersionMetadataBinding, validateUnsafeBinding, validateBindingArray, validateCloudchamberConfig, validateKVBinding, validateSendEmailBinding, validateQueueBinding, validateR2Binding, validateD1Binding, validateVectorizeBinding, validateAISearchNamespaceBinding, validateAISearchBinding, validateAgentMemoryBinding, validateHyperdriveBinding, validateVpcServiceBinding, validateVpcNetworkBinding, validateBindingsHaveUniqueNames, validateServiceBinding, validateAnalyticsEngineBinding, validateWorkerNamespaceBinding, validateMTlsCertificateBinding, validateConsumer, validateConnectHandler, validateCompatibilityDate, validatePipelineBinding, validateSecretsStoreSecretBinding, validateArtifactsBinding, validateHelloWorldBinding, validateFlagshipBinding, validateWorkerLoaderBinding, validateRateLimitBinding, validatePreviewsConfig, validateMigrations, VALID_EXPORT_STORAGES, JS_IDENTIFIER_RE, validateExports, CONTAINER_OBSERVABILITY_TARGET_INSTANCE_PERCENTAGE_MIN, CONTAINER_OBSERVABILITY_TARGET_INSTANCE_PERCENTAGE_MAX, CONTAINER_OBSERVABILITY_TARGET_INSTANCE_COUNT_MIN, validateContainerObservability, validateObservability, validateAccess, validateCache, validatePythonModules;
|
|
23284
|
+
var bucketFormatMessage, friendlyBindingNames, bindingTypeFriendlyNames, ENGLISH, ALLOWED_INSTANCE_TYPES, isRoute, isRouteArray, validateTailConsumers, validateStreamingTailConsumers, validateAndNormalizeRules, ARTIFACTS_EVENT_TYPE_SET, validateTriggers, validateRules, validateRule, validateDefines, validateVars, validateSecrets, validateBindingsProperty, DURABLE_OBJECTS_CODE_UPDATE_MAX_DELAY_SECONDS, MILLISECOND_PRECISION_TOLERANCE, validateDurableObjectsProperty, validateUnsafeSettings, validateDurableObjectBinding, workflowNameFormatMessage, validateWorkflowBinding, validateCflogfwdrObject, validateCflogfwdrBinding, validateAssetsConfig, validateNamedSimpleBinding, validateAIBinding, validateVersionMetadataBinding, validateUnsafeBinding, validateBindingArray, validateCloudchamberConfig, validateKVBinding, validateSendEmailBinding, validateQueueBinding, validateR2Binding, validateD1Binding, validateVectorizeBinding, validateAISearchNamespaceBinding, validateAISearchBinding, validateAgentMemoryBinding, validateHyperdriveBinding, validateVpcServiceBinding, validateVpcNetworkBinding, validateBindingsHaveUniqueNames, validateServiceBinding, validateAnalyticsEngineBinding, validateWorkerNamespaceBinding, validateMTlsCertificateBinding, validateConsumer, validateConnectHandler, validateCompatibilityDate, validatePipelineBinding, validateSecretsStoreSecretBinding, validateArtifactsBinding, validateHelloWorldBinding, validateFlagshipBinding, validateWorkerLoaderBinding, validateRateLimitBinding, validatePreviewsConfig, validateMigrations, VALID_EXPORT_STORAGES, JS_IDENTIFIER_RE, validateExports, CONTAINER_OBSERVABILITY_TARGET_INSTANCE_PERCENTAGE_MIN, CONTAINER_OBSERVABILITY_TARGET_INSTANCE_PERCENTAGE_MAX, CONTAINER_OBSERVABILITY_TARGET_INSTANCE_COUNT_MIN, validateContainerObservability, validateObservability, validateAccess, validateCache, validatePythonModules;
|
|
23226
23285
|
var init_validation = __esm({
|
|
23227
23286
|
"../workers-utils/src/config/validation.ts"() {
|
|
23228
23287
|
init_import_meta_url();
|
|
@@ -23765,6 +23824,85 @@ Please add a binding for each to "${fieldPath}.bindings":
|
|
|
23765
23824
|
}
|
|
23766
23825
|
return isValid;
|
|
23767
23826
|
}, "validateBindingsProperty");
|
|
23827
|
+
DURABLE_OBJECTS_CODE_UPDATE_MAX_DELAY_SECONDS = 24 * 60 * 60;
|
|
23828
|
+
MILLISECOND_PRECISION_TOLERANCE = 1e-6;
|
|
23829
|
+
validateDurableObjectsProperty = /* @__PURE__ */ __name((envName, allowMissingBindings = false, allowCodeUpdateStrategy = true) => (diagnostics, field, value, config2) => {
|
|
23830
|
+
const fieldPath = config2 === void 0 ? `${field}` : `env.${envName}.${field}`;
|
|
23831
|
+
if (value === void 0) {
|
|
23832
|
+
return true;
|
|
23833
|
+
}
|
|
23834
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
23835
|
+
diagnostics.errors.push(
|
|
23836
|
+
`The field "${fieldPath}" should be an object but got ${JSON.stringify(value)}.`
|
|
23837
|
+
);
|
|
23838
|
+
return false;
|
|
23839
|
+
}
|
|
23840
|
+
validateAdditionalProperties(
|
|
23841
|
+
diagnostics,
|
|
23842
|
+
fieldPath,
|
|
23843
|
+
Object.keys(value),
|
|
23844
|
+
allowCodeUpdateStrategy ? ["bindings", "code_update_strategy"] : ["bindings"]
|
|
23845
|
+
);
|
|
23846
|
+
const bindingsContainer = allowMissingBindings && !hasProperty(value, "bindings") ? { ...value, bindings: [] } : value;
|
|
23847
|
+
let isValid = validateBindingsProperty(
|
|
23848
|
+
envName,
|
|
23849
|
+
validateDurableObjectBinding
|
|
23850
|
+
)(diagnostics, field, bindingsContainer, config2);
|
|
23851
|
+
if (!allowCodeUpdateStrategy) {
|
|
23852
|
+
return isValid;
|
|
23853
|
+
}
|
|
23854
|
+
if (!hasProperty(value, "code_update_strategy") || value.code_update_strategy === void 0) {
|
|
23855
|
+
return isValid;
|
|
23856
|
+
}
|
|
23857
|
+
const strategy = value.code_update_strategy;
|
|
23858
|
+
const strategyPath = `${fieldPath}.code_update_strategy`;
|
|
23859
|
+
if (typeof strategy !== "object" || strategy === null || Array.isArray(strategy)) {
|
|
23860
|
+
diagnostics.errors.push(
|
|
23861
|
+
`The field "${strategyPath}" should be an object but got ${JSON.stringify(strategy)}.`
|
|
23862
|
+
);
|
|
23863
|
+
return false;
|
|
23864
|
+
}
|
|
23865
|
+
validateAdditionalProperties(
|
|
23866
|
+
diagnostics,
|
|
23867
|
+
strategyPath,
|
|
23868
|
+
Object.keys(strategy),
|
|
23869
|
+
["mode", "max_delay"]
|
|
23870
|
+
);
|
|
23871
|
+
isValid = validateRequiredProperty(
|
|
23872
|
+
diagnostics,
|
|
23873
|
+
strategyPath,
|
|
23874
|
+
"mode",
|
|
23875
|
+
hasProperty(strategy, "mode") ? strategy.mode : void 0,
|
|
23876
|
+
"string",
|
|
23877
|
+
["immediate", "deferred"]
|
|
23878
|
+
) && isValid;
|
|
23879
|
+
const maxDelay = hasProperty(strategy, "max_delay") ? strategy.max_delay : void 0;
|
|
23880
|
+
const maxDelayHasValidType = validateOptionalProperty(
|
|
23881
|
+
diagnostics,
|
|
23882
|
+
strategyPath,
|
|
23883
|
+
"max_delay",
|
|
23884
|
+
maxDelay,
|
|
23885
|
+
"number"
|
|
23886
|
+
);
|
|
23887
|
+
isValid = maxDelayHasValidType && isValid;
|
|
23888
|
+
if (maxDelayHasValidType && typeof maxDelay === "number" && (!Number.isFinite(maxDelay) || maxDelay < 0 || maxDelay > DURABLE_OBJECTS_CODE_UPDATE_MAX_DELAY_SECONDS)) {
|
|
23889
|
+
diagnostics.errors.push(
|
|
23890
|
+
`Expected "${strategyPath}.max_delay" to be between 0 and ${DURABLE_OBJECTS_CODE_UPDATE_MAX_DELAY_SECONDS} seconds but got ${JSON.stringify(maxDelay)}.`
|
|
23891
|
+
);
|
|
23892
|
+
isValid = false;
|
|
23893
|
+
}
|
|
23894
|
+
if (maxDelayHasValidType && typeof maxDelay === "number" && Number.isFinite(maxDelay) && maxDelay >= 0 && maxDelay <= DURABLE_OBJECTS_CODE_UPDATE_MAX_DELAY_SECONDS) {
|
|
23895
|
+
const milliseconds = maxDelay * 1e3;
|
|
23896
|
+
const roundedMilliseconds = Math.round(milliseconds);
|
|
23897
|
+
if (maxDelay > 0 && roundedMilliseconds === 0 || Math.abs(milliseconds - roundedMilliseconds) > MILLISECOND_PRECISION_TOLERANCE) {
|
|
23898
|
+
diagnostics.errors.push(
|
|
23899
|
+
`Expected "${strategyPath}.max_delay" to use millisecond precision but got ${JSON.stringify(maxDelay)}.`
|
|
23900
|
+
);
|
|
23901
|
+
isValid = false;
|
|
23902
|
+
}
|
|
23903
|
+
}
|
|
23904
|
+
return isValid;
|
|
23905
|
+
}, "validateDurableObjectsProperty");
|
|
23768
23906
|
validateUnsafeSettings = /* @__PURE__ */ __name((envName) => (diagnostics, field, value, config2) => {
|
|
23769
23907
|
const fieldPath = config2 === void 0 ? `${field}` : `env.${envName}.${field}`;
|
|
23770
23908
|
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
@@ -25630,7 +25768,7 @@ ${resolution}`);
|
|
|
25630
25768
|
previews,
|
|
25631
25769
|
`${field}.placement`
|
|
25632
25770
|
);
|
|
25633
|
-
isValid =
|
|
25771
|
+
isValid = validateDurableObjectsProperty(envName, false, false)(
|
|
25634
25772
|
diagnostics,
|
|
25635
25773
|
`${field}.durable_objects`,
|
|
25636
25774
|
previews.durable_objects,
|
|
@@ -27183,7 +27321,7 @@ var DEFAULT_COMPAT_DATE;
|
|
|
27183
27321
|
var init_default_compat_date = __esm({
|
|
27184
27322
|
"../workers-utils/src/default-compat-date.ts"() {
|
|
27185
27323
|
init_import_meta_url();
|
|
27186
|
-
DEFAULT_COMPAT_DATE = "2026-09-
|
|
27324
|
+
DEFAULT_COMPAT_DATE = "2026-09-26";
|
|
27187
27325
|
}
|
|
27188
27326
|
});
|
|
27189
27327
|
|
|
@@ -62486,7 +62624,7 @@ var name, version2;
|
|
|
62486
62624
|
var init_package = __esm({
|
|
62487
62625
|
"package.json"() {
|
|
62488
62626
|
name = "wrangler";
|
|
62489
|
-
version2 = "4.
|
|
62627
|
+
version2 = "4.142.0";
|
|
62490
62628
|
}
|
|
62491
62629
|
});
|
|
62492
62630
|
|
|
@@ -124313,12 +124451,11 @@ var init_cloudflare = __esm({
|
|
|
124313
124451
|
cloudflare_default = Cloudflare;
|
|
124314
124452
|
}
|
|
124315
124453
|
});
|
|
124316
|
-
|
|
124317
|
-
// ../workers-auth/dist/chunk-O6YSETKJ.mjs
|
|
124318
124454
|
var __defProp2, __name2;
|
|
124319
|
-
var
|
|
124320
|
-
"../workers-auth/dist/chunk-
|
|
124455
|
+
var init_chunk_VAZEJK55 = __esm({
|
|
124456
|
+
"../workers-auth/dist/chunk-VAZEJK55.mjs"() {
|
|
124321
124457
|
init_import_meta_url();
|
|
124458
|
+
nodeModule.createRequire(import_meta_url || (typeof __filename === "string" ? __filename : "/"));
|
|
124322
124459
|
__defProp2 = Object.defineProperty;
|
|
124323
124460
|
__name2 = /* @__PURE__ */ __name((target, value) => __defProp2(target, "name", { value, configurable: true }), "__name");
|
|
124324
124461
|
}
|
|
@@ -126814,12 +126951,13 @@ function scrubEncryptedCredentials(options) {
|
|
|
126814
126951
|
return { backendAvailable: false, encryptedFileExisted };
|
|
126815
126952
|
}
|
|
126816
126953
|
var import_undici3, hasWarnedAboutDeprecatedV1ApiToken, getCloudflareAPITokenFromEnv, getCloudflareGlobalAuthKeyFromEnv, getCloudflareGlobalAuthEmailFromEnv, ACCOUNT_ID_PATTERN, getAuthDomainFromEnv, getAuthUrlFromEnv, getTokenUrlFromEnv, getRevokeUrlFromEnv, readCloudflareAccountIdFromEnv, DEVICE_AUTH_PATH, getAccessClientIdFromEnv, getAccessClientSecretFromEnv, getCfAuthorizationTokenFromEnv, getCloudflareAuthUseKeyringFromEnv, headersCache, usesAccessCache, RECOMMENDED_CODE_VERIFIER_LENGTH, RECOMMENDED_STATE_LENGTH, PKCE_CHARSET, generateVerificationUrl, generateAuthUrl, POW_MAX_ITERATIONS, TEMPORARY_TERMS_URLS, TEMPORARY_TERMS_PROMPT, TEMPORARY_TERMS_NOTICE, TEMPORARY_TERMS_ERROR, EVENT_ACCOUNT_ERRORS, esm_default3, ErrorOAuth2, ErrorUnknown, ErrorNoAuthCode, ErrorInvalidReturnedStateParam, ErrorInvalidJson, ErrorInvalidScope, ErrorInvalidRequest, ErrorInvalidToken, ErrorAuthenticationGrant, ErrorUnauthorizedClient, ErrorAccessDenied, ErrorUnsupportedResponseType, ErrorServerError, ErrorTemporarilyUnavailable, ErrorAccessTokenResponse, ErrorInvalidClient, ErrorInvalidGrant, ErrorUnsupportedGrantType, DEVICE_FLOW_MAX_DURATION_SECONDS, DEVICE_FLOW_MIN_POLL_INTERVAL_SECONDS, RESERVED_PROFILE_NAMES, BARE_KEY2, HAS_WELLFORMED2, FILE_FORMATS, USER_AUTH_CONFIG_PATH, FileCredentialStore, KEY_LENGTH_BYTES, IV_LENGTH_BYTES, TAG_LENGTH_BYTES, ALGORITHM_LABEL, CIPHER_NAME, EncryptedFileCredentialStore, PINNED_KEYRING_VERSION, npmRunner, cachedBindingPathByDir, entryFactoryOverride, runner, cachedProbeResult, LinuxSecretToolKeyProvider, SECURITY_EXIT_ITEM_NOT_FOUND, runner2, MacSecurityKeyProvider, NapiKeyringKeyProvider, testProviderFactory, sessionFlags;
|
|
126817
|
-
var
|
|
126818
|
-
"../workers-auth/dist/chunk-
|
|
126954
|
+
var init_chunk_RV27PEH3 = __esm({
|
|
126955
|
+
"../workers-auth/dist/chunk-RV27PEH3.mjs"() {
|
|
126819
126956
|
init_import_meta_url();
|
|
126820
|
-
|
|
126957
|
+
init_chunk_VAZEJK55();
|
|
126821
126958
|
init_src();
|
|
126822
126959
|
import_undici3 = __toESM(require_undici(), 1);
|
|
126960
|
+
nodeModule.createRequire(import_meta_url || (typeof __filename === "string" ? __filename : "/"));
|
|
126823
126961
|
hasWarnedAboutDeprecatedV1ApiToken = false;
|
|
126824
126962
|
__name(readStoredAuthState, "readStoredAuthState");
|
|
126825
126963
|
__name2(readStoredAuthState, "readStoredAuthState");
|
|
@@ -127790,12 +127928,11 @@ var init_chunk_WMSASLDV = __esm({
|
|
|
127790
127928
|
__name2(scrubEncryptedCredentials, "scrubEncryptedCredentials");
|
|
127791
127929
|
}
|
|
127792
127930
|
});
|
|
127793
|
-
|
|
127794
|
-
// ../workers-auth/dist/index.mjs
|
|
127795
127931
|
var init_dist2 = __esm({
|
|
127796
127932
|
"../workers-auth/dist/index.mjs"() {
|
|
127797
127933
|
init_import_meta_url();
|
|
127798
|
-
|
|
127934
|
+
init_chunk_RV27PEH3();
|
|
127935
|
+
nodeModule.createRequire(import_meta_url || (typeof __filename === "string" ? __filename : "/"));
|
|
127799
127936
|
}
|
|
127800
127937
|
});
|
|
127801
127938
|
function createPreferences(getConfigPath2) {
|
|
@@ -128703,12 +128840,13 @@ function createAuthConfigFileHelpers(deps) {
|
|
|
128703
128840
|
};
|
|
128704
128841
|
}
|
|
128705
128842
|
var millisecondsInMinute, minutesInYear, minutesInMonth, minutesInDay, constructFromSymbol, defaultOptions2, formatDistanceLocale, formatDistance, dateFormats, timeFormats, dateTimeFormats, formatLong, formatRelativeLocale, formatRelative, eraValues, quarterValues, monthValues, dayValues, dayPeriodValues, formattingDayPeriodValues, ordinalNumber, localize, matchOrdinalNumberPattern, parseOrdinalNumberPattern, matchEraPatterns, parseEraPatterns, matchQuarterPatterns, parseQuarterPatterns, matchMonthPatterns, parseMonthPatterns, matchDayPatterns, parseDayPatterns, matchDayPeriodPatterns, parseDayPeriodPatterns, match, enUS, MEMBERSHIPS_INACCESSIBLE_CODES, DIRECTORY_BINDINGS_FILE, ENCRYPTED_PROFILE_CONFIG_EXTENSION;
|
|
128706
|
-
var
|
|
128707
|
-
"../workers-auth/dist/chunk-
|
|
128843
|
+
var init_chunk_2JQZNT7W = __esm({
|
|
128844
|
+
"../workers-auth/dist/chunk-2JQZNT7W.mjs"() {
|
|
128708
128845
|
init_import_meta_url();
|
|
128709
|
-
|
|
128710
|
-
|
|
128846
|
+
init_chunk_RV27PEH3();
|
|
128847
|
+
init_chunk_VAZEJK55();
|
|
128711
128848
|
init_src();
|
|
128849
|
+
nodeModule.createRequire(import_meta_url || (typeof __filename === "string" ? __filename : "/"));
|
|
128712
128850
|
__name(createPreferences, "createPreferences");
|
|
128713
128851
|
__name2(createPreferences, "createPreferences");
|
|
128714
128852
|
millisecondsInMinute = 6e4;
|
|
@@ -129220,9 +129358,10 @@ var DefaultScopes, DefaultScopeKeys, WRANGLER_KEYRING_SERVICE_NAME, WRANGLER_CLI
|
|
|
129220
129358
|
var init_wrangler = __esm({
|
|
129221
129359
|
"../workers-auth/dist/wrangler/index.mjs"() {
|
|
129222
129360
|
init_import_meta_url();
|
|
129223
|
-
|
|
129224
|
-
|
|
129361
|
+
init_chunk_2JQZNT7W();
|
|
129362
|
+
init_chunk_VAZEJK55();
|
|
129225
129363
|
init_src();
|
|
129364
|
+
nodeModule.createRequire(import_meta_url || (typeof __filename === "string" ? __filename : "/"));
|
|
129226
129365
|
DefaultScopes = {
|
|
129227
129366
|
"account:read": "See your account info such as account details, analytics, and memberships.",
|
|
129228
129367
|
"user:read": "See your user info such as name, email address, and account memberships.",
|
|
@@ -135458,6 +135597,14 @@ function convertBindingsAndAssets(config2, result) {
|
|
|
135458
135597
|
case "worker-loader":
|
|
135459
135598
|
workerLoaders.push({ binding: name2 });
|
|
135460
135599
|
break;
|
|
135600
|
+
case "workflow":
|
|
135601
|
+
workflows.push({
|
|
135602
|
+
binding: name2,
|
|
135603
|
+
name: binding.name,
|
|
135604
|
+
class_name: binding.exportName,
|
|
135605
|
+
script_name: binding.worker
|
|
135606
|
+
});
|
|
135607
|
+
break;
|
|
135461
135608
|
}
|
|
135462
135609
|
}
|
|
135463
135610
|
if (kvNamespaces.length) result.kv_namespaces = kvNamespaces;
|
|
@@ -135509,10 +135656,21 @@ function convertExports(config2, result) {
|
|
|
135509
135656
|
const converted = {};
|
|
135510
135657
|
const unknownExports = {};
|
|
135511
135658
|
for (const [exportName, value] of Object.entries(exports$2)) {
|
|
135512
|
-
if (value.type === "worker"
|
|
135659
|
+
if (value.type === "worker") {
|
|
135513
135660
|
converted[exportName] = value;
|
|
135514
135661
|
continue;
|
|
135515
135662
|
}
|
|
135663
|
+
if (value.type === "workflow") {
|
|
135664
|
+
const { defaultRetention, ...workflow } = value;
|
|
135665
|
+
converted[exportName] = {
|
|
135666
|
+
...workflow,
|
|
135667
|
+
...defaultRetention !== void 0 && { default_retention: {
|
|
135668
|
+
...defaultRetention.successRetention !== void 0 && { success_retention: defaultRetention.successRetention },
|
|
135669
|
+
...defaultRetention.errorRetention !== void 0 && { error_retention: defaultRetention.errorRetention }
|
|
135670
|
+
} }
|
|
135671
|
+
};
|
|
135672
|
+
continue;
|
|
135673
|
+
}
|
|
135516
135674
|
if (value.type !== "durable-object") {
|
|
135517
135675
|
unknownExports[exportName] = value;
|
|
135518
135676
|
continue;
|
|
@@ -135902,7 +136060,7 @@ async function loadAndParseConfig(configPath, ctx) {
|
|
|
135902
136060
|
dependencies
|
|
135903
136061
|
};
|
|
135904
136062
|
}
|
|
135905
|
-
var __getOwnPropNames2, __commonJS2, RemoteBindingDevSchema, AssetsSchema, BrowserBindingSchema, WorkerBindingSchema, D1BindingSchema, KVBindingSchema, QueueBindingSchema, R2BindingSchema, AnalyticsEngineDatasetBindingSchema, FlagshipBindingSchema, HyperdriveBindingSchema, KnownBindingSchema, UnsafeBindingSchema, BindingSchema, CacheSchema, SINGLETON_BINDING_TYPES, listFormatter, EnvSchema, ContainerImageDockerfileSchema, ContainerImageReferenceSchema, ContainerImageLocalReferenceSchema, InputContainerImageSchema, OutputContainerImageSchema, VALID_ROLLOUT_STEP_PERCENTAGES, ContainerRolloutStepPercentageSchema, ContainerObservabilityBaseSchema, StandardContainerObservabilitySchema, BaseContainerSchema, StandardContainerBaseSchema, DurableObjectContainerBaseSchema, InputContainerSchema, DurableObjectCreatedExportSchema, DurableObjectDeletedExportSchema, DurableObjectRenamedExportSchema, DurableObjectTransferredExportSchema, DurableObjectExpectingTransferExportSchema, WorkerEntrypointExportSchema, WorkflowRetentionSchema, WorkflowExportSchema, DurableObjectCreatedSqliteExportSchema, DurableObjectCreatedLegacyKvExportSchema, DurableObjectExpectingTransferSqliteExportSchema, DurableObjectExpectingTransferLegacyKvExportSchema, ExportSchema, LimitsSchema, ObservabilitySchema, PlacementSchema, TailConsumerSchema, TriggerSchema, UnsafeSchema, BaseWorkerSchema, InputWorkerSchema, InputSettingsSchema, InputConfigSchema, BuildContextSchema, ModuleTypeSchema, ManifestModulesSchema, ManifestSchema, require_dist2, import_dist, __defProp3, __name3, UserError2, FatalError2, JsonFriendlyFatalError2, ROLLOUT_KIND_MAP, CF_WORKER_SCHEME, CF_WORKER_TYPE, CF_ATTR, CF_NO_CACHE_VALUE, CF_NO_CACHE_QUERY_KEY, RE_NODE_MODULES, depsStore, deregister, CROSS_WORKER_BINDING_TYPES;
|
|
136063
|
+
var __getOwnPropNames2, __commonJS2, RemoteBindingDevSchema, AssetsSchema, BrowserBindingSchema, WorkerBindingSchema, WorkflowBindingSchema, D1BindingSchema, KVBindingSchema, QueueBindingSchema, R2BindingSchema, AnalyticsEngineDatasetBindingSchema, FlagshipBindingSchema, HyperdriveBindingSchema, KnownBindingSchema, UnsafeBindingSchema, BindingSchema, CacheSchema, SINGLETON_BINDING_TYPES, listFormatter, EnvSchema, ContainerImageDockerfileSchema, ContainerImageReferenceSchema, ContainerImageLocalReferenceSchema, InputContainerImageSchema, OutputContainerImageSchema, VALID_ROLLOUT_STEP_PERCENTAGES, ContainerRolloutStepPercentageSchema, ContainerObservabilityBaseSchema, StandardContainerObservabilitySchema, BaseContainerSchema, StandardContainerBaseSchema, DurableObjectContainerBaseSchema, InputContainerSchema, DurableObjectCreatedExportSchema, DurableObjectDeletedExportSchema, DurableObjectRenamedExportSchema, DurableObjectTransferredExportSchema, DurableObjectExpectingTransferExportSchema, WorkerEntrypointExportSchema, WorkflowRetentionSchema, WorkflowExportSchema, DurableObjectCreatedSqliteExportSchema, DurableObjectCreatedLegacyKvExportSchema, DurableObjectExpectingTransferSqliteExportSchema, DurableObjectExpectingTransferLegacyKvExportSchema, ExportSchema, LimitsSchema, ObservabilitySchema, PlacementSchema, TailConsumerSchema, TriggerSchema, UnsafeSchema, BaseWorkerSchema, InputWorkerSchema, InputSettingsSchema, InputConfigSchema, BuildContextSchema, ModuleTypeSchema, ManifestModulesSchema, ManifestSchema, require_dist2, import_dist, __defProp3, __name3, UserError2, FatalError2, JsonFriendlyFatalError2, ROLLOUT_KIND_MAP, CF_WORKER_SCHEME, CF_WORKER_TYPE, CF_ATTR, CF_NO_CACHE_VALUE, CF_NO_CACHE_QUERY_KEY, RE_NODE_MODULES, depsStore, deregister, CROSS_WORKER_BINDING_TYPES;
|
|
135906
136064
|
var init_dist3 = __esm({
|
|
135907
136065
|
"../config/dist/index.mjs"() {
|
|
135908
136066
|
init_import_meta_url();
|
|
@@ -135937,6 +136095,12 @@ var init_dist3 = __esm({
|
|
|
135937
136095
|
props: record(string2(), unknown()).optional(),
|
|
135938
136096
|
dev: RemoteBindingDevSchema.optional()
|
|
135939
136097
|
});
|
|
136098
|
+
WorkflowBindingSchema = strictObject({
|
|
136099
|
+
type: literal("workflow"),
|
|
136100
|
+
name: string2(),
|
|
136101
|
+
worker: string2(),
|
|
136102
|
+
exportName: string2()
|
|
136103
|
+
});
|
|
135940
136104
|
D1BindingSchema = strictObject({
|
|
135941
136105
|
type: literal("d1"),
|
|
135942
136106
|
name: string2().optional(),
|
|
@@ -136101,7 +136265,8 @@ var init_dist3 = __esm({
|
|
|
136101
136265
|
return value.tunnelId !== void 0 && value.networkId !== void 0 ? `"vpc-network" bindings must specify exactly one of "tunnelId" or "networkId", not both` : `"vpc-network" bindings must specify either "tunnelId" or "networkId"`;
|
|
136102
136266
|
}, "error") }),
|
|
136103
136267
|
WorkerBindingSchema,
|
|
136104
|
-
strictObject({ type: literal("worker-loader") })
|
|
136268
|
+
strictObject({ type: literal("worker-loader") }),
|
|
136269
|
+
WorkflowBindingSchema
|
|
136105
136270
|
]);
|
|
136106
136271
|
UnsafeBindingSchema = looseObject({
|
|
136107
136272
|
type: templateLiteral(["unsafe:", string2().min(1)]),
|
|
@@ -136292,9 +136457,9 @@ var init_dist3 = __esm({
|
|
|
136292
136457
|
limits: strictObject({ steps: number2().int().min(1).optional() }).optional(),
|
|
136293
136458
|
concurrency: strictObject({ limit: number2().int().min(1).optional() }).optional(),
|
|
136294
136459
|
schedules: union([string2().min(1), array(string2().min(1)).min(1)]).optional(),
|
|
136295
|
-
|
|
136296
|
-
|
|
136297
|
-
|
|
136460
|
+
defaultRetention: strictObject({
|
|
136461
|
+
successRetention: WorkflowRetentionSchema.optional(),
|
|
136462
|
+
errorRetention: WorkflowRetentionSchema.optional()
|
|
136298
136463
|
}).optional()
|
|
136299
136464
|
});
|
|
136300
136465
|
DurableObjectCreatedSqliteExportSchema = DurableObjectCreatedExportSchema.extend({ storage: literal("sqlite") });
|
|
@@ -136516,11 +136681,13 @@ var init_dist3 = __esm({
|
|
|
136516
136681
|
}, "../../node_modules/.pnpm/ts-dedent@2.2.0/node_modules/ts-dedent/dist/index.js") });
|
|
136517
136682
|
import_dist = require_dist2();
|
|
136518
136683
|
__name(generateTypes, "generateTypes");
|
|
136684
|
+
nodeModule.createRequire(import_meta_url || (typeof __filename === "string" ? __filename : "/"));
|
|
136519
136685
|
__defProp3 = Object.defineProperty;
|
|
136520
136686
|
__name3 = /* @__PURE__ */ __name((target, value) => __defProp3(target, "name", {
|
|
136521
136687
|
value,
|
|
136522
136688
|
configurable: true
|
|
136523
136689
|
}), "__name");
|
|
136690
|
+
nodeModule.createRequire(import_meta_url || (typeof __filename === "string" ? __filename : "/"));
|
|
136524
136691
|
UserError2 = class extends Error {
|
|
136525
136692
|
static {
|
|
136526
136693
|
__name(this, "UserError");
|
|
@@ -136780,11 +136947,13 @@ var init_dist4 = __esm({
|
|
|
136780
136947
|
__name(getWorkerConfigPath, "getWorkerConfigPath");
|
|
136781
136948
|
__name(getWorkerBundleDir, "getWorkerBundleDir");
|
|
136782
136949
|
__name(getWorkerAssetsDir, "getWorkerAssetsDir");
|
|
136950
|
+
nodeModule.createRequire(import_meta_url || (typeof __filename === "string" ? __filename : "/"));
|
|
136783
136951
|
__defProp4 = Object.defineProperty;
|
|
136784
136952
|
__name4 = /* @__PURE__ */ __name((target, value) => __defProp4(target, "name", {
|
|
136785
136953
|
value,
|
|
136786
136954
|
configurable: true
|
|
136787
136955
|
}), "__name");
|
|
136956
|
+
nodeModule.createRequire(import_meta_url || (typeof __filename === "string" ? __filename : "/"));
|
|
136788
136957
|
__name(isDirectory2, "isDirectory");
|
|
136789
136958
|
__name4(isDirectory2, "isDirectory");
|
|
136790
136959
|
__name(removeDir2, "removeDir");
|
|
@@ -141851,7 +142020,7 @@ async function getCreds(permissions, complianceConfig) {
|
|
|
141851
142020
|
function isValidImageTag(value) {
|
|
141852
142021
|
return IMAGE_TAG_REGEXP.test(value);
|
|
141853
142022
|
}
|
|
141854
|
-
var require$
|
|
142023
|
+
var require$13, __create2, __defProp5, __getOwnPropDesc2, __getOwnPropNames3, __getProtoOf2, __hasOwnProp2, __name5, __require2, __commonJS3, __copyProps2, __toESM2, require_constants7, require_buffer_util, require_limiter, require_permessage_deflate2, require_validation, require_receiver2, require_sender2, require_event_target, require_extension, require_websocket2, require_stream, require_subprotocol, require_websocket_server, ApiError, CancelError2, CancelablePromise, OpenAPI, isDefined, isString2, isStringWithValue, isBlob3, isErrorResponse, base643, getQueryString, getUrl, getFormData, resolve10, getHeaders2, getRequestBody, isResponseSchemaV4, parseResponseSchemaV4, sendRequest, getResponseHeader, getResponseBody, catchErrorCodes, executeRequest, buildApiResult, request, requestPaginated, debugLogRequest, debugLogResponse, ApplicationRollout, AssignIPv4, AssignIPv6, BadRequestWithCodeError, ContainerImagePreparationStatus, CreateApplicationRolloutRequest, DeploymentMutationError, DeploymentNotFoundError, ExternalRegistryKind, ImageRegistryAlreadyExistsError, ImageRegistryIsPublic, ImageRegistryNotAllowedError, ImageRegistryNotFoundError, ImageRegistryProtocolAlreadyExists, ImageRegistryProtocolIsReferencedError, ImageRegistryProtocolNotFound, InstanceType, ProvisionerConfiguration, RolloutStep, SchedulingPolicy, SecretNameAlreadyExists, SecretNotFound, SSHPublicKeyNotFoundError, UpdateApplicationRolloutRequest, AccountService, ApplicationsService, ContainerImagePreparationsService, DeploymentsService, ImageRegistriesService, PlacementsService, RolloutsService, SshPublicKeysService, noop, logger3, fetchResult3, fetchPagedListResult3, getCloudflareRegistryWithAccountNamespace, MF_DEV_CONTAINER_PREFIX, getDevContainerImageName, runDockerCmd, runDockerCmdWithOutput, isDockerRunning, verifyDockerInstalled, cleanupContainers, getContainerIdsFromImage, DEFAULT_CONTAINER_EGRESS_INTERCEPTOR_IMAGE, getAndValidateRegistryType, MB, MiB, instanceTypes, LEGACY_TO_CANONICAL, MAX_DOCKER_REPOSITORY_NAME_LENGTH, DIGEST_SUFFIX_REGEXP, DIGEST_VALUE_REGEXP, TAG_SUFFIX_REGEXP, BUILD_OUTPUT_IMAGE_NAMESPACE, DOCKER_REPOSITORY_NAME_LENGTH, Diff, doAction, configRolloutStepsToAPI, MAX_DOCKER_REPOSITORY_NAME_LENGTH2, MAX_NAMED_IMAGE_SLUG_LENGTH, IMAGE_ID_HASH_LENGTH, import_websocket, containersSshOptions, MAX_REPOSITORY_LENGTH, REPOSITORY_COMPONENT_REGEXP, TAG_REGEXP, IMAGE_TAG_REGEXP;
|
|
141855
142024
|
var init_dist9 = __esm({
|
|
141856
142025
|
"../containers-shared/dist/index.mjs"() {
|
|
141857
142026
|
init_import_meta_url();
|
|
@@ -141864,7 +142033,7 @@ var init_dist9 = __esm({
|
|
|
141864
142033
|
init_colors();
|
|
141865
142034
|
init_src();
|
|
141866
142035
|
init_interactive();
|
|
141867
|
-
require$
|
|
142036
|
+
require$13 = nodeModule.createRequire(import_meta_url || (typeof __filename === "string" ? __filename : "/"));
|
|
141868
142037
|
__create2 = Object.create;
|
|
141869
142038
|
__defProp5 = Object.defineProperty;
|
|
141870
142039
|
__getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -141872,10 +142041,10 @@ var init_dist9 = __esm({
|
|
|
141872
142041
|
__getProtoOf2 = Object.getPrototypeOf;
|
|
141873
142042
|
__hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
141874
142043
|
__name5 = /* @__PURE__ */ __name((target, value) => __defProp5(target, "name", { value, configurable: true }), "__name");
|
|
141875
|
-
__require2 = /* @__PURE__ */ ((x7) => typeof require$
|
|
141876
|
-
get: /* @__PURE__ */ __name((a8, b11) => (typeof require$
|
|
142044
|
+
__require2 = /* @__PURE__ */ ((x7) => typeof require$13 !== "undefined" ? require$13 : typeof Proxy !== "undefined" ? new Proxy(x7, {
|
|
142045
|
+
get: /* @__PURE__ */ __name((a8, b11) => (typeof require$13 !== "undefined" ? require$13 : a8)[b11], "get")
|
|
141877
142046
|
}) : x7)(function(x7) {
|
|
141878
|
-
if (typeof require$
|
|
142047
|
+
if (typeof require$13 !== "undefined") return require$13.apply(this, arguments);
|
|
141879
142048
|
throw Error('Dynamic require of "' + x7 + '" is not supported');
|
|
141880
142049
|
});
|
|
141881
142050
|
__commonJS3 = /* @__PURE__ */ __name((cb2, mod2) => /* @__PURE__ */ __name(function __require22() {
|
|
@@ -162523,7 +162692,7 @@ async function fetchDeployableVersions(complianceConfig, accountId, workerName,
|
|
|
162523
162692
|
}
|
|
162524
162693
|
return versions2;
|
|
162525
162694
|
}
|
|
162526
|
-
async function createDeployment(complianceConfig, accountId, workerName, versionTraffic, message, force) {
|
|
162695
|
+
async function createDeployment(complianceConfig, accountId, workerName, versionTraffic, message, force, codeUpdateStrategy) {
|
|
162527
162696
|
return await fetchResult(
|
|
162528
162697
|
complianceConfig,
|
|
162529
162698
|
`/accounts/${accountId}/workers/scripts/${workerName}/deployments${force ? "?force=true" : ""}`,
|
|
@@ -162537,7 +162706,8 @@ async function createDeployment(complianceConfig, accountId, workerName, version
|
|
|
162537
162706
|
),
|
|
162538
162707
|
annotations: {
|
|
162539
162708
|
"workers/message": message
|
|
162540
|
-
}
|
|
162709
|
+
},
|
|
162710
|
+
code_update_strategy: codeUpdateStrategy
|
|
162541
162711
|
})
|
|
162542
162712
|
}
|
|
162543
162713
|
);
|
|
@@ -162822,6 +162992,7 @@ function createWorkerUploadForm(worker, bindings, options) {
|
|
|
162822
162992
|
main: main2,
|
|
162823
162993
|
sourceMaps,
|
|
162824
162994
|
migrations,
|
|
162995
|
+
code_update_strategy,
|
|
162825
162996
|
exports: configuredExports,
|
|
162826
162997
|
compatibility_date,
|
|
162827
162998
|
compatibility_flags,
|
|
@@ -163504,6 +163675,7 @@ function createWorkerUploadForm(worker, bindings, options) {
|
|
|
163504
163675
|
compatibility_flags
|
|
163505
163676
|
},
|
|
163506
163677
|
...migrations && { migrations },
|
|
163678
|
+
...code_update_strategy && { code_update_strategy },
|
|
163507
163679
|
...configuredExports && Object.keys(configuredExports).length > 0 && {
|
|
163508
163680
|
exports: configuredExports
|
|
163509
163681
|
},
|
|
@@ -175129,6 +175301,9 @@ async function deployWorker(props, config2, buildResult, callbacks) {
|
|
|
175129
175301
|
printBundleSize(bundleSize);
|
|
175130
175302
|
const canUseNewVersionsDeploymentsApi = workerExists && props.dispatchNamespace === void 0 && format9 === "modules" && migrations === void 0 && !hasDurableObjectExports(config2.exports) && !config2.first_party_worker && props.containers.source === void 0 && // Rollout skip can recover Container metadata absent from local config.
|
|
175131
175303
|
containerMetadata === void 0;
|
|
175304
|
+
if (!canUseNewVersionsDeploymentsApi) {
|
|
175305
|
+
worker.code_update_strategy = props.durableObjectsCodeUpdateStrategy;
|
|
175306
|
+
}
|
|
175132
175307
|
let workerBundle;
|
|
175133
175308
|
const dockerPath = getDockerPath();
|
|
175134
175309
|
if (isDryRun) {
|
|
@@ -175201,13 +175376,16 @@ async function deployWorker(props, config2, buildResult, callbacks) {
|
|
|
175201
175376
|
);
|
|
175202
175377
|
const versionMap = /* @__PURE__ */ new Map();
|
|
175203
175378
|
versionMap.set(versionResult.id, 100);
|
|
175379
|
+
const unsafeMetadata = config2.unsafe?.metadata;
|
|
175380
|
+
const codeUpdateStrategy = unsafeMetadata !== void 0 && "code_update_strategy" in unsafeMetadata ? unsafeMetadata.code_update_strategy : props.durableObjectsCodeUpdateStrategy;
|
|
175204
175381
|
await createDeployment(
|
|
175205
175382
|
config2,
|
|
175206
175383
|
accountId,
|
|
175207
175384
|
scriptName,
|
|
175208
175385
|
versionMap,
|
|
175209
175386
|
props.message,
|
|
175210
|
-
void 0
|
|
175387
|
+
void 0,
|
|
175388
|
+
codeUpdateStrategy
|
|
175211
175389
|
);
|
|
175212
175390
|
const nextTags = applyServiceAndEnvironmentTags(config2, tags);
|
|
175213
175391
|
try {
|
|
@@ -178818,9 +178996,10 @@ var CF_KEYRING_SERVICE_NAME, CF_CLI_NAME, CF_DISPLAY_NAME, CF_OAUTH_CALLBACK_URL
|
|
|
178818
178996
|
var init_cf = __esm({
|
|
178819
178997
|
"../workers-auth/dist/cf/index.mjs"() {
|
|
178820
178998
|
init_import_meta_url();
|
|
178821
|
-
|
|
178822
|
-
|
|
178999
|
+
init_chunk_2JQZNT7W();
|
|
179000
|
+
init_chunk_VAZEJK55();
|
|
178823
179001
|
init_src();
|
|
179002
|
+
nodeModule.createRequire(import_meta_url || (typeof __filename === "string" ? __filename : "/"));
|
|
178824
179003
|
CF_KEYRING_SERVICE_NAME = "cloudflare";
|
|
178825
179004
|
CF_CLI_NAME = "cf";
|
|
178826
179005
|
CF_DISPLAY_NAME = "cf";
|
|
@@ -179823,7 +180002,7 @@ var init_dist14 = __esm({
|
|
|
179823
180002
|
init_wrapper();
|
|
179824
180003
|
init_create_worker_upload_form();
|
|
179825
180004
|
import_undici13 = __toESM(require_undici(), 1);
|
|
179826
|
-
version3 = "0.0.
|
|
180005
|
+
version3 = "0.0.37";
|
|
179827
180006
|
NoDefaultValueProvided2 = class extends UserError {
|
|
179828
180007
|
static {
|
|
179829
180008
|
__name(this, "NoDefaultValueProvided");
|
|
@@ -212787,6 +212966,98 @@ var init_collectKeyValues = __esm({
|
|
|
212787
212966
|
}
|
|
212788
212967
|
});
|
|
212789
212968
|
|
|
212969
|
+
// src/versions/deployment-args.ts
|
|
212970
|
+
function parseDurableObjectsCodeUpdateMode(value) {
|
|
212971
|
+
if (typeof value !== "string") {
|
|
212972
|
+
throwInvalidCodeUpdateMode();
|
|
212973
|
+
}
|
|
212974
|
+
const [mode, duration3, ...extraValues] = value.trim().split(/\s+/);
|
|
212975
|
+
if (mode === "immediate" && duration3 === void 0) {
|
|
212976
|
+
return { mode };
|
|
212977
|
+
}
|
|
212978
|
+
if (mode === "deferred" && duration3 !== void 0 && extraValues.length === 0) {
|
|
212979
|
+
const seconds = parseHumanDuration(duration3);
|
|
212980
|
+
if (/\d/.test(duration3) && Number.isFinite(seconds) && seconds >= 0 && seconds <= MAX_DURABLE_OBJECTS_CODE_UPDATE_DELAY_SECONDS && hasMillisecondPrecision(seconds)) {
|
|
212981
|
+
return { mode, max_delay: seconds };
|
|
212982
|
+
}
|
|
212983
|
+
throw new CommandLineArgsError(
|
|
212984
|
+
'The duration passed to "--durable-objects-code-update-mode deferred" must be between 0 seconds and 24 hours and use millisecond precision.',
|
|
212985
|
+
{ telemetryMessage: "durable objects code update delay invalid" }
|
|
212986
|
+
);
|
|
212987
|
+
}
|
|
212988
|
+
throwInvalidCodeUpdateMode();
|
|
212989
|
+
}
|
|
212990
|
+
function hasMillisecondPrecision(seconds) {
|
|
212991
|
+
const milliseconds = seconds * 1e3;
|
|
212992
|
+
const roundedMilliseconds = Math.round(milliseconds);
|
|
212993
|
+
return (seconds === 0 || roundedMilliseconds > 0) && Math.abs(milliseconds - roundedMilliseconds) <= 1e-6;
|
|
212994
|
+
}
|
|
212995
|
+
function throwInvalidCodeUpdateMode() {
|
|
212996
|
+
throw new CommandLineArgsError(
|
|
212997
|
+
'The argument "--durable-objects-code-update-mode" must be either "immediate" or "deferred <duration>".',
|
|
212998
|
+
{ telemetryMessage: "durable objects code update mode invalid" }
|
|
212999
|
+
);
|
|
213000
|
+
}
|
|
213001
|
+
function normalizeDurableObjectsCodeUpdateModeArgs(argv) {
|
|
213002
|
+
const normalizedArgv = [];
|
|
213003
|
+
for (let i8 = 0; i8 < argv.length; i8++) {
|
|
213004
|
+
const arg = argv[i8];
|
|
213005
|
+
if (arg === "--") {
|
|
213006
|
+
normalizedArgv.push(...argv.slice(i8));
|
|
213007
|
+
break;
|
|
213008
|
+
}
|
|
213009
|
+
const separateMode = arg === DURABLE_OBJECTS_CODE_UPDATE_MODE_FLAG;
|
|
213010
|
+
const inlineMode = arg.startsWith(
|
|
213011
|
+
`${DURABLE_OBJECTS_CODE_UPDATE_MODE_FLAG}=`
|
|
213012
|
+
) ? arg.slice(DURABLE_OBJECTS_CODE_UPDATE_MODE_FLAG.length + 1) : void 0;
|
|
213013
|
+
const mode = separateMode ? argv[i8 + 1] : inlineMode;
|
|
213014
|
+
const durationIndex = i8 + (separateMode ? 2 : 1);
|
|
213015
|
+
const duration3 = argv[durationIndex];
|
|
213016
|
+
if (mode === "deferred" && duration3 !== void 0 && (!duration3.startsWith("-") || Number.isFinite(parseHumanDuration(duration3)))) {
|
|
213017
|
+
normalizedArgv.push(
|
|
213018
|
+
`${DURABLE_OBJECTS_CODE_UPDATE_MODE_FLAG}=deferred ${duration3}`
|
|
213019
|
+
);
|
|
213020
|
+
i8 = durationIndex;
|
|
213021
|
+
continue;
|
|
213022
|
+
}
|
|
213023
|
+
normalizedArgv.push(arg);
|
|
213024
|
+
}
|
|
213025
|
+
return normalizedArgv;
|
|
213026
|
+
}
|
|
213027
|
+
function resolveDurableObjectsCodeUpdateStrategy(codeUpdateMode, codeUpdateStrategy) {
|
|
213028
|
+
const strategy = codeUpdateMode ?? codeUpdateStrategy ?? DEFAULT_DURABLE_OBJECTS_CODE_UPDATE_STRATEGY;
|
|
213029
|
+
return strategy.mode === "immediate" ? { mode: "immediate" } : {
|
|
213030
|
+
mode: "deferred",
|
|
213031
|
+
max_delay: strategy.max_delay ?? DEFAULT_DURABLE_OBJECTS_CODE_UPDATE_STRATEGY.max_delay
|
|
213032
|
+
};
|
|
213033
|
+
}
|
|
213034
|
+
var DEFAULT_DURABLE_OBJECTS_CODE_UPDATE_STRATEGY, MAX_DURABLE_OBJECTS_CODE_UPDATE_DELAY_SECONDS, DURABLE_OBJECTS_CODE_UPDATE_MODE_FLAG, durableObjectsCodeUpdateModeArg;
|
|
213035
|
+
var init_deployment_args = __esm({
|
|
213036
|
+
"src/versions/deployment-args.ts"() {
|
|
213037
|
+
init_import_meta_url();
|
|
213038
|
+
init_src();
|
|
213039
|
+
DEFAULT_DURABLE_OBJECTS_CODE_UPDATE_STRATEGY = {
|
|
213040
|
+
mode: "deferred",
|
|
213041
|
+
max_delay: 300
|
|
213042
|
+
};
|
|
213043
|
+
MAX_DURABLE_OBJECTS_CODE_UPDATE_DELAY_SECONDS = 24 * 60 * 60;
|
|
213044
|
+
DURABLE_OBJECTS_CODE_UPDATE_MODE_FLAG = "--durable-objects-code-update-mode";
|
|
213045
|
+
__name(parseDurableObjectsCodeUpdateMode, "parseDurableObjectsCodeUpdateMode");
|
|
213046
|
+
__name(hasMillisecondPrecision, "hasMillisecondPrecision");
|
|
213047
|
+
__name(throwInvalidCodeUpdateMode, "throwInvalidCodeUpdateMode");
|
|
213048
|
+
__name(normalizeDurableObjectsCodeUpdateModeArgs, "normalizeDurableObjectsCodeUpdateModeArgs");
|
|
213049
|
+
__name(resolveDurableObjectsCodeUpdateStrategy, "resolveDurableObjectsCodeUpdateStrategy");
|
|
213050
|
+
durableObjectsCodeUpdateModeArg = {
|
|
213051
|
+
"durable-objects-code-update-mode": {
|
|
213052
|
+
describe: "How to update Durable Object code: immediate, or deferred followed by a maximum delay (for example, deferred 30s)",
|
|
213053
|
+
type: "string",
|
|
213054
|
+
requiresArg: true,
|
|
213055
|
+
coerce: parseDurableObjectsCodeUpdateMode
|
|
213056
|
+
}
|
|
213057
|
+
};
|
|
213058
|
+
}
|
|
213059
|
+
});
|
|
213060
|
+
|
|
212790
213061
|
// src/deployment-bundle/merge-config-args.ts
|
|
212791
213062
|
async function mergeSharedConfigArgs(command2, args, config2) {
|
|
212792
213063
|
const entry = await getEntry(args, config2, command2);
|
|
@@ -212892,6 +213163,10 @@ async function mergeDeployConfigArgs(args, config2) {
|
|
|
212892
213163
|
dispatchNamespace: args.dispatchNamespace,
|
|
212893
213164
|
oldAssetTtl: args.oldAssetTtl,
|
|
212894
213165
|
containersRollout: args.containersRollout,
|
|
213166
|
+
durableObjectsCodeUpdateStrategy: resolveDurableObjectsCodeUpdateStrategy(
|
|
213167
|
+
args.durableObjectsCodeUpdateMode,
|
|
213168
|
+
config2.durable_objects.code_update_strategy
|
|
213169
|
+
),
|
|
212895
213170
|
containers: {
|
|
212896
213171
|
...shared.containers,
|
|
212897
213172
|
standard: {
|
|
@@ -212975,6 +213250,7 @@ var init_merge_config_args = __esm({
|
|
|
212975
213250
|
init_user3();
|
|
212976
213251
|
init_collectKeyValues();
|
|
212977
213252
|
init_getScriptName();
|
|
213253
|
+
init_deployment_args();
|
|
212978
213254
|
init_entry();
|
|
212979
213255
|
init_route_zone_args();
|
|
212980
213256
|
__name(mergeSharedConfigArgs, "mergeSharedConfigArgs");
|
|
@@ -264463,6 +264739,7 @@ var init_dist15 = __esm({
|
|
|
264463
264739
|
__toESM(require_main4(), 1);
|
|
264464
264740
|
esprimaParser = __toESM(require_esprima3(), 1);
|
|
264465
264741
|
typescriptParser = __toESM(require_typescript2(), 1);
|
|
264742
|
+
nodeModule.createRequire(import_meta_url || (typeof __filename === "string" ? __filename : "/"));
|
|
264466
264743
|
__defProp6 = Object.defineProperty;
|
|
264467
264744
|
__name6 = /* @__PURE__ */ __name((target, value) => __defProp6(target, "name", { value, configurable: true }), "__name");
|
|
264468
264745
|
__name(parseJs, "parseJs");
|
|
@@ -265302,7 +265579,7 @@ var init_packages3 = __esm({
|
|
|
265302
265579
|
init_command2();
|
|
265303
265580
|
init_src();
|
|
265304
265581
|
installPackages = /* @__PURE__ */ __name(async (packageManager, packages, config2 = {}) => {
|
|
265305
|
-
const { force, dev: dev2, startText, doneText } = config2;
|
|
265582
|
+
const { cwd: cwd2 = process.cwd(), force, dev: dev2, startText, doneText } = config2;
|
|
265306
265583
|
const isWorkspaceRoot = config2.isWorkspaceRoot ?? false;
|
|
265307
265584
|
if (packages.length === 0) {
|
|
265308
265585
|
let cmd$1;
|
|
@@ -265324,7 +265601,7 @@ var init_packages3 = __esm({
|
|
|
265324
265601
|
...force === true ? ["--force"] : [],
|
|
265325
265602
|
...getWorkspaceInstallRootFlag(packageManager, isWorkspaceRoot)
|
|
265326
265603
|
], {
|
|
265327
|
-
cwd:
|
|
265604
|
+
cwd: cwd2,
|
|
265328
265605
|
startText,
|
|
265329
265606
|
doneText,
|
|
265330
265607
|
silent: true
|
|
@@ -265358,12 +265635,13 @@ var init_packages3 = __esm({
|
|
|
265358
265635
|
...force === true ? ["--force"] : [],
|
|
265359
265636
|
...getWorkspaceInstallRootFlag(packageManager, isWorkspaceRoot)
|
|
265360
265637
|
], {
|
|
265638
|
+
cwd: cwd2,
|
|
265361
265639
|
startText,
|
|
265362
265640
|
doneText,
|
|
265363
265641
|
silent: true
|
|
265364
265642
|
});
|
|
265365
265643
|
if (packageManager === "npm") {
|
|
265366
|
-
const pkgJsonPath = path28__namespace.default.join(
|
|
265644
|
+
const pkgJsonPath = path28__namespace.default.join(cwd2, "package.json");
|
|
265367
265645
|
const pkgJson = parsePackageJSON(readFileSync(pkgJsonPath), pkgJsonPath);
|
|
265368
265646
|
const deps = config2.dev ? pkgJson.devDependencies : pkgJson.dependencies;
|
|
265369
265647
|
assert38__default.default(deps, "dependencies should be defined");
|
|
@@ -266198,8 +266476,10 @@ var init_vite_config = __esm({
|
|
|
266198
266476
|
async function installCloudflareVitePlugin({
|
|
266199
266477
|
packageManager,
|
|
266200
266478
|
projectPath,
|
|
266201
|
-
isWorkspaceRoot
|
|
266479
|
+
isWorkspaceRoot,
|
|
266480
|
+
version: version7
|
|
266202
266481
|
}) {
|
|
266482
|
+
const packageSpecifier = `@cloudflare/vite-plugin${version7 ? `@${version7}` : ""}`;
|
|
266203
266483
|
const viteVersion = getInstalledPackageVersion("vite", projectPath);
|
|
266204
266484
|
if (viteVersion && semiver_default(viteVersion, "6.0.0") >= 0 && semiver_default(viteVersion, "6.1.0") < 0) {
|
|
266205
266485
|
await installPackages(packageManager, ["vite@^6.1.0"], {
|
|
@@ -266209,10 +266489,10 @@ async function installCloudflareVitePlugin({
|
|
|
266209
266489
|
isWorkspaceRoot
|
|
266210
266490
|
});
|
|
266211
266491
|
}
|
|
266212
|
-
await installPackages(packageManager, [
|
|
266492
|
+
await installPackages(packageManager, [packageSpecifier], {
|
|
266213
266493
|
dev: true,
|
|
266214
266494
|
startText: "Installing the Cloudflare Vite plugin",
|
|
266215
|
-
doneText: `${brandColor2(`installed`)} ${dim2(
|
|
266495
|
+
doneText: `${brandColor2(`installed`)} ${dim2(packageSpecifier)}`,
|
|
266216
266496
|
isWorkspaceRoot
|
|
266217
266497
|
});
|
|
266218
266498
|
}
|
|
@@ -266559,7 +266839,8 @@ var init_react_router = __esm({
|
|
|
266559
266839
|
projectPath,
|
|
266560
266840
|
packageManager,
|
|
266561
266841
|
isWorkspaceRoot,
|
|
266562
|
-
context: context2
|
|
266842
|
+
context: context2,
|
|
266843
|
+
target
|
|
266563
266844
|
}) {
|
|
266564
266845
|
const useMiddlewarePattern = hasV8MiddlewareFlag(
|
|
266565
266846
|
projectPath,
|
|
@@ -266569,7 +266850,8 @@ var init_react_router = __esm({
|
|
|
266569
266850
|
await installCloudflareVitePlugin({
|
|
266570
266851
|
packageManager: packageManager.type,
|
|
266571
266852
|
projectPath,
|
|
266572
|
-
isWorkspaceRoot
|
|
266853
|
+
isWorkspaceRoot,
|
|
266854
|
+
version: target === "cf" ? "beta" : void 0
|
|
266573
266855
|
});
|
|
266574
266856
|
fs14.mkdirSync("workers");
|
|
266575
266857
|
writeAppTs(useMiddlewarePattern);
|
|
@@ -266808,13 +267090,15 @@ var init_tanstack = __esm({
|
|
|
266808
267090
|
dryRun,
|
|
266809
267091
|
projectPath,
|
|
266810
267092
|
packageManager,
|
|
266811
|
-
isWorkspaceRoot
|
|
267093
|
+
isWorkspaceRoot,
|
|
267094
|
+
target
|
|
266812
267095
|
}) {
|
|
266813
267096
|
if (!dryRun) {
|
|
266814
267097
|
await installCloudflareVitePlugin({
|
|
266815
267098
|
packageManager: packageManager.type,
|
|
266816
267099
|
isWorkspaceRoot,
|
|
266817
|
-
projectPath
|
|
267100
|
+
projectPath,
|
|
267101
|
+
version: target === "cf" ? "beta" : void 0
|
|
266818
267102
|
});
|
|
266819
267103
|
transformViteConfig(projectPath, { viteEnvironmentName: "ssr" });
|
|
266820
267104
|
}
|
|
@@ -267062,13 +267346,15 @@ var init_vite = __esm({
|
|
|
267062
267346
|
dryRun,
|
|
267063
267347
|
projectPath,
|
|
267064
267348
|
packageManager,
|
|
267065
|
-
isWorkspaceRoot
|
|
267349
|
+
isWorkspaceRoot,
|
|
267350
|
+
target
|
|
267066
267351
|
}) {
|
|
267067
267352
|
if (!dryRun) {
|
|
267068
267353
|
await installCloudflareVitePlugin({
|
|
267069
267354
|
packageManager: packageManager.type,
|
|
267070
267355
|
isWorkspaceRoot,
|
|
267071
|
-
projectPath
|
|
267356
|
+
projectPath,
|
|
267357
|
+
version: target === "cf" ? "beta" : void 0
|
|
267072
267358
|
});
|
|
267073
267359
|
if (hasViteConfig(projectPath)) {
|
|
267074
267360
|
transformViteConfig(projectPath);
|
|
@@ -267301,6 +267587,7 @@ var init_all_frameworks = __esm({
|
|
|
267301
267587
|
minimumVersion: "2.0.0",
|
|
267302
267588
|
maximumKnownMajorVersion: "2"
|
|
267303
267589
|
},
|
|
267590
|
+
supportsCf: false,
|
|
267304
267591
|
supported: true
|
|
267305
267592
|
},
|
|
267306
267593
|
{
|
|
@@ -267317,6 +267604,7 @@ var init_all_frameworks = __esm({
|
|
|
267317
267604
|
minimumVersion: "19.0.0",
|
|
267318
267605
|
maximumKnownMajorVersion: "22"
|
|
267319
267606
|
},
|
|
267607
|
+
supportsCf: false,
|
|
267320
267608
|
supported: true
|
|
267321
267609
|
},
|
|
267322
267610
|
{
|
|
@@ -267331,6 +267619,7 @@ var init_all_frameworks = __esm({
|
|
|
267331
267619
|
minimumVersion: "4.0.0",
|
|
267332
267620
|
maximumKnownMajorVersion: "7"
|
|
267333
267621
|
},
|
|
267622
|
+
supportsCf: true,
|
|
267334
267623
|
supported: true
|
|
267335
267624
|
},
|
|
267336
267625
|
{
|
|
@@ -267349,6 +267638,7 @@ var init_all_frameworks = __esm({
|
|
|
267349
267638
|
minimumVersion: "14.2.35",
|
|
267350
267639
|
maximumKnownMajorVersion: "16"
|
|
267351
267640
|
},
|
|
267641
|
+
supportsCf: true,
|
|
267352
267642
|
supported: true
|
|
267353
267643
|
},
|
|
267354
267644
|
{
|
|
@@ -267364,6 +267654,7 @@ var init_all_frameworks = __esm({
|
|
|
267364
267654
|
minimumVersion: "3.21.0",
|
|
267365
267655
|
maximumKnownMajorVersion: "4"
|
|
267366
267656
|
},
|
|
267657
|
+
supportsCf: false,
|
|
267367
267658
|
supported: true
|
|
267368
267659
|
},
|
|
267369
267660
|
{
|
|
@@ -267378,6 +267669,7 @@ var init_all_frameworks = __esm({
|
|
|
267378
267669
|
minimumVersion: "1.1.0",
|
|
267379
267670
|
maximumKnownMajorVersion: "1"
|
|
267380
267671
|
},
|
|
267672
|
+
supportsCf: false,
|
|
267381
267673
|
supported: true
|
|
267382
267674
|
},
|
|
267383
267675
|
{
|
|
@@ -267392,6 +267684,7 @@ var init_all_frameworks = __esm({
|
|
|
267392
267684
|
minimumVersion: "7.0.0",
|
|
267393
267685
|
maximumKnownMajorVersion: "8"
|
|
267394
267686
|
},
|
|
267687
|
+
supportsCf: true,
|
|
267395
267688
|
supported: true
|
|
267396
267689
|
},
|
|
267397
267690
|
{
|
|
@@ -267405,6 +267698,7 @@ var init_all_frameworks = __esm({
|
|
|
267405
267698
|
minimumVersion: "1.0.0",
|
|
267406
267699
|
maximumKnownMajorVersion: "2"
|
|
267407
267700
|
},
|
|
267701
|
+
supportsCf: false,
|
|
267408
267702
|
supported: true
|
|
267409
267703
|
},
|
|
267410
267704
|
{
|
|
@@ -267419,6 +267713,7 @@ var init_all_frameworks = __esm({
|
|
|
267419
267713
|
minimumVersion: "2.20.3",
|
|
267420
267714
|
maximumKnownMajorVersion: "2"
|
|
267421
267715
|
},
|
|
267716
|
+
supportsCf: false,
|
|
267422
267717
|
supported: true
|
|
267423
267718
|
},
|
|
267424
267719
|
{
|
|
@@ -267432,6 +267727,7 @@ var init_all_frameworks = __esm({
|
|
|
267432
267727
|
minimumVersion: "1.132.0",
|
|
267433
267728
|
maximumKnownMajorVersion: "1"
|
|
267434
267729
|
},
|
|
267730
|
+
supportsCf: true,
|
|
267435
267731
|
supported: true
|
|
267436
267732
|
},
|
|
267437
267733
|
{
|
|
@@ -267448,6 +267744,7 @@ var init_all_frameworks = __esm({
|
|
|
267448
267744
|
minimumVersion: "6.0.0",
|
|
267449
267745
|
maximumKnownMajorVersion: "8"
|
|
267450
267746
|
},
|
|
267747
|
+
supportsCf: true,
|
|
267451
267748
|
supported: true
|
|
267452
267749
|
},
|
|
267453
267750
|
{
|
|
@@ -267459,6 +267756,7 @@ var init_all_frameworks = __esm({
|
|
|
267459
267756
|
minimumVersion: "0.0.0",
|
|
267460
267757
|
maximumKnownMajorVersion: "0"
|
|
267461
267758
|
},
|
|
267759
|
+
supportsCf: false,
|
|
267462
267760
|
supported: true
|
|
267463
267761
|
},
|
|
267464
267762
|
{
|
|
@@ -267474,6 +267772,7 @@ var init_all_frameworks = __esm({
|
|
|
267474
267772
|
minimumVersion: "1.0.0-alpha.4",
|
|
267475
267773
|
maximumKnownMajorVersion: "1"
|
|
267476
267774
|
},
|
|
267775
|
+
supportsCf: false,
|
|
267477
267776
|
supported: true
|
|
267478
267777
|
},
|
|
267479
267778
|
{
|
|
@@ -267492,6 +267791,7 @@ var init_all_frameworks = __esm({
|
|
|
267492
267791
|
id: "static",
|
|
267493
267792
|
name: "Static",
|
|
267494
267793
|
class: Static,
|
|
267794
|
+
supportsCf: true,
|
|
267495
267795
|
supported: true
|
|
267496
267796
|
};
|
|
267497
267797
|
allFrameworksInfos = [
|
|
@@ -267541,10 +267841,26 @@ function isFrameworkSupported(frameworkId) {
|
|
|
267541
267841
|
);
|
|
267542
267842
|
return targetedFramework.supported;
|
|
267543
267843
|
}
|
|
267844
|
+
function validateFrameworkTargetSupport(framework, target) {
|
|
267845
|
+
if (target !== "cf") {
|
|
267846
|
+
return;
|
|
267847
|
+
}
|
|
267848
|
+
const frameworkInfo = allFrameworksInfos.find(
|
|
267849
|
+
({ id }) => id === framework.id
|
|
267850
|
+
);
|
|
267851
|
+
if (frameworkInfo?.supported !== true || frameworkInfo.supportsCf) {
|
|
267852
|
+
return;
|
|
267853
|
+
}
|
|
267854
|
+
throw new AutoConfigFrameworkConfigurationError(
|
|
267855
|
+
`cf does not support ${framework.name} projects yet. You can still use Wrangler to develop and deploy this project.`,
|
|
267856
|
+
{ telemetryMessage: "autoconfig framework unsupported for cf" }
|
|
267857
|
+
);
|
|
267858
|
+
}
|
|
267544
267859
|
var allKnownFrameworksIds;
|
|
267545
267860
|
var init_frameworks = __esm({
|
|
267546
267861
|
"../autoconfig/src/frameworks/index.ts"() {
|
|
267547
267862
|
init_import_meta_url();
|
|
267863
|
+
init_errors7();
|
|
267548
267864
|
init_all_frameworks();
|
|
267549
267865
|
init_no_op();
|
|
267550
267866
|
allKnownFrameworksIds = new Set(
|
|
@@ -267553,6 +267869,7 @@ var init_frameworks = __esm({
|
|
|
267553
267869
|
__name(isKnownFramework, "isKnownFramework");
|
|
267554
267870
|
__name(getFrameworkClassInstance, "getFrameworkClassInstance");
|
|
267555
267871
|
__name(isFrameworkSupported, "isFrameworkSupported");
|
|
267872
|
+
__name(validateFrameworkTargetSupport, "validateFrameworkTargetSupport");
|
|
267556
267873
|
}
|
|
267557
267874
|
});
|
|
267558
267875
|
|
|
@@ -287522,6 +287839,7 @@ async function runAutoConfig(autoConfigDetails, autoConfigOptions) {
|
|
|
287522
287839
|
}
|
|
287523
287840
|
autoConfigDetails = updatedAutoConfigDetails;
|
|
287524
287841
|
assertNonConfigured(autoConfigDetails);
|
|
287842
|
+
validateFrameworkTargetSupport(autoConfigDetails.framework, target);
|
|
287525
287843
|
if (isKnownFramework(autoConfigDetails.framework.id)) {
|
|
287526
287844
|
const frameworkIsSupported = isFrameworkSupported(
|
|
287527
287845
|
autoConfigDetails.framework.id
|
|
@@ -287801,7 +288119,9 @@ async function buildOperationsSummary(autoConfigDetails, workerConfig, configura
|
|
|
287801
288119
|
packagesToInstall.add(target);
|
|
287802
288120
|
}
|
|
287803
288121
|
if (configurationResults.buildTool === "vite") {
|
|
287804
|
-
packagesToInstall.add(
|
|
288122
|
+
packagesToInstall.add(
|
|
288123
|
+
target === "cf" ? "@cloudflare/vite-plugin@beta" : "@cloudflare/vite-plugin"
|
|
288124
|
+
);
|
|
287805
288125
|
} else if (target === "cf" && configurationResults.buildTool === "wrangler") {
|
|
287806
288126
|
packagesToInstall.add("wrangler");
|
|
287807
288127
|
}
|
|
@@ -288538,6 +288858,7 @@ var init_deploy3 = __esm({
|
|
|
288538
288858
|
init_sites2();
|
|
288539
288859
|
init_detect_agent();
|
|
288540
288860
|
init_getScriptName();
|
|
288861
|
+
init_deployment_args();
|
|
288541
288862
|
init_autoconfig2();
|
|
288542
288863
|
init_open_next();
|
|
288543
288864
|
__name(parseEventCode, "parseEventCode");
|
|
@@ -288552,6 +288873,7 @@ var init_deploy3 = __esm({
|
|
|
288552
288873
|
args: {
|
|
288553
288874
|
...experimentalNewConfigArg,
|
|
288554
288875
|
...sharedDeployVersionsArgs,
|
|
288876
|
+
...durableObjectsCodeUpdateModeArg,
|
|
288555
288877
|
"event-code": {
|
|
288556
288878
|
describe: "Create a temporary account for an event",
|
|
288557
288879
|
type: "string",
|
|
@@ -299345,6 +299667,7 @@ async function runPagesToWorkersDeploy(delegation) {
|
|
|
299345
299667
|
oldAssetTtl: void 0,
|
|
299346
299668
|
dispatchNamespace: void 0,
|
|
299347
299669
|
containersRollout: void 0,
|
|
299670
|
+
durableObjectsCodeUpdateMode: void 0,
|
|
299348
299671
|
path: void 0,
|
|
299349
299672
|
script: void 0,
|
|
299350
299673
|
name: void 0,
|
|
@@ -302637,6 +302960,7 @@ async function toEnvironment(deploymentConfig, accountId) {
|
|
|
302637
302960
|
deploymentConfig.durable_object_namespaces ?? {}
|
|
302638
302961
|
)) {
|
|
302639
302962
|
configObj.durable_objects ??= { bindings: [] };
|
|
302963
|
+
configObj.durable_objects.bindings ??= [];
|
|
302640
302964
|
if (ns.class_name && ns.class_name !== "") {
|
|
302641
302965
|
configObj.durable_objects.bindings.push({
|
|
302642
302966
|
name: name2,
|
|
@@ -342844,6 +343168,7 @@ var init_subscription_types = __esm({
|
|
|
342844
343168
|
EventSourceType = /* @__PURE__ */ ((EventSourceType2) => {
|
|
342845
343169
|
EventSourceType2["ARTIFACTS"] = "artifacts";
|
|
342846
343170
|
EventSourceType2["ARTIFACTS_REPO"] = "artifacts.repo";
|
|
343171
|
+
EventSourceType2["BROWSER_RUN"] = "browserRun";
|
|
342847
343172
|
EventSourceType2["EMAIL_SENDING"] = "email.sending";
|
|
342848
343173
|
EventSourceType2["IMAGES"] = "images";
|
|
342849
343174
|
EventSourceType2["KV"] = "kv";
|
|
@@ -342866,6 +343191,8 @@ function parseSourceArgument(source, args) {
|
|
|
342866
343191
|
return { type: "artifacts" /* ARTIFACTS */ };
|
|
342867
343192
|
case "artifacts.repo" /* ARTIFACTS_REPO */:
|
|
342868
343193
|
return { type: "artifacts.repo" /* ARTIFACTS_REPO */ };
|
|
343194
|
+
case "browserRun" /* BROWSER_RUN */:
|
|
343195
|
+
return { type: "browserRun" /* BROWSER_RUN */ };
|
|
342869
343196
|
case "email.sending" /* EMAIL_SENDING */:
|
|
342870
343197
|
if (!args.zoneId) {
|
|
342871
343198
|
throw new UserError(
|
|
@@ -352165,14 +352492,15 @@ async function fetchDeployableVersions2(complianceConfig, accountId, workerName,
|
|
|
352165
352492
|
versionCache
|
|
352166
352493
|
);
|
|
352167
352494
|
}
|
|
352168
|
-
async function createDeployment2(complianceConfig, accountId, workerName, versionTraffic, message, force) {
|
|
352495
|
+
async function createDeployment2(complianceConfig, accountId, workerName, versionTraffic, message, force, codeUpdateStrategy) {
|
|
352169
352496
|
return createDeployment(
|
|
352170
352497
|
complianceConfig,
|
|
352171
352498
|
accountId,
|
|
352172
352499
|
workerName,
|
|
352173
352500
|
versionTraffic,
|
|
352174
352501
|
message,
|
|
352175
|
-
force
|
|
352502
|
+
force,
|
|
352503
|
+
codeUpdateStrategy
|
|
352176
352504
|
);
|
|
352177
352505
|
}
|
|
352178
352506
|
async function patchNonVersionedScriptSettings2(complianceConfig, accountId, workerName, settings) {
|
|
@@ -352631,6 +352959,7 @@ var init_deploy6 = __esm({
|
|
|
352631
352959
|
init_user3();
|
|
352632
352960
|
init_render_labelled_values();
|
|
352633
352961
|
init_api4();
|
|
352962
|
+
init_deployment_args();
|
|
352634
352963
|
init_src3();
|
|
352635
352964
|
EPSILON = 1e-3;
|
|
352636
352965
|
BLANK_INPUT2 = "-";
|
|
@@ -352649,6 +352978,7 @@ var init_deploy6 = __esm({
|
|
|
352649
352978
|
},
|
|
352650
352979
|
args: {
|
|
352651
352980
|
...experimentalNewConfigArg,
|
|
352981
|
+
...durableObjectsCodeUpdateModeArg,
|
|
352652
352982
|
name: {
|
|
352653
352983
|
describe: "Name of the worker",
|
|
352654
352984
|
type: "string",
|
|
@@ -352810,7 +353140,12 @@ var init_deploy6 = __esm({
|
|
|
352810
353140
|
accountId,
|
|
352811
353141
|
workerName,
|
|
352812
353142
|
confirmedVersionTraffic,
|
|
352813
|
-
message
|
|
353143
|
+
message,
|
|
353144
|
+
void 0,
|
|
353145
|
+
resolveDurableObjectsCodeUpdateStrategy(
|
|
353146
|
+
args.durableObjectsCodeUpdateMode,
|
|
353147
|
+
config2.durable_objects.code_update_strategy
|
|
353148
|
+
)
|
|
352814
353149
|
);
|
|
352815
353150
|
}
|
|
352816
353151
|
});
|
|
@@ -353327,9 +353662,11 @@ var init_rollback = __esm({
|
|
|
353327
353662
|
init_user3();
|
|
353328
353663
|
init_api4();
|
|
353329
353664
|
init_deploy6();
|
|
353665
|
+
init_deployment_args();
|
|
353330
353666
|
CANNOT_ROLLBACK_WITH_MODIFIED_SECERT_CODE = 10220;
|
|
353331
353667
|
versionsRollbackCommand = createCommand({
|
|
353332
353668
|
args: {
|
|
353669
|
+
...durableObjectsCodeUpdateModeArg,
|
|
353333
353670
|
"version-id": {
|
|
353334
353671
|
describe: "The ID of the Worker Version to rollback to",
|
|
353335
353672
|
type: "string",
|
|
@@ -353414,7 +353751,12 @@ Rolling back to a previous deployment will not rollback any of the bound resourc
|
|
|
353414
353751
|
accountId,
|
|
353415
353752
|
workerName,
|
|
353416
353753
|
rollbackTraffic,
|
|
353417
|
-
message
|
|
353754
|
+
message,
|
|
353755
|
+
void 0,
|
|
353756
|
+
resolveDurableObjectsCodeUpdateStrategy(
|
|
353757
|
+
args.durableObjectsCodeUpdateMode,
|
|
353758
|
+
config2.durable_objects.code_update_strategy
|
|
353759
|
+
)
|
|
353418
353760
|
);
|
|
353419
353761
|
} catch (e11) {
|
|
353420
353762
|
if (e11 instanceof APIError && e11.code === CANNOT_ROLLBACK_WITH_MODIFIED_SECERT_CODE) {
|
|
@@ -353435,7 +353777,11 @@ Rolling back to a previous deployment will not rollback any of the bound resourc
|
|
|
353435
353777
|
workerName,
|
|
353436
353778
|
rollbackTraffic,
|
|
353437
353779
|
message,
|
|
353438
|
-
true
|
|
353780
|
+
true,
|
|
353781
|
+
resolveDurableObjectsCodeUpdateStrategy(
|
|
353782
|
+
args.durableObjectsCodeUpdateMode,
|
|
353783
|
+
config2.durable_objects.code_update_strategy
|
|
353784
|
+
)
|
|
353439
353785
|
);
|
|
353440
353786
|
} else {
|
|
353441
353787
|
cancel("Aborting rollback...");
|
|
@@ -359338,7 +359684,9 @@ function createCLIParser(argv) {
|
|
|
359338
359684
|
requiresArg: true
|
|
359339
359685
|
}
|
|
359340
359686
|
};
|
|
359341
|
-
const wrangler = yargs_default(
|
|
359687
|
+
const wrangler = yargs_default(
|
|
359688
|
+
normalizeDurableObjectsCodeUpdateModeArgs(argv)
|
|
359689
|
+
).strict().showHelpOnFail(false).fail((msg, error53) => {
|
|
359342
359690
|
if (!error53 || error53.name === "YError") {
|
|
359343
359691
|
error53 = new CommandLineArgsError(msg, {
|
|
359344
359692
|
telemetryMessage: "yargs validation error"
|
|
@@ -361565,6 +361913,7 @@ var init_src7 = __esm({
|
|
|
361565
361913
|
init_upsert();
|
|
361566
361914
|
init_versions8();
|
|
361567
361915
|
init_deploy6();
|
|
361916
|
+
init_deployment_args();
|
|
361568
361917
|
init_deployments5();
|
|
361569
361918
|
init_list32();
|
|
361570
361919
|
init_status3();
|
|
@@ -362839,10 +363188,11 @@ var init_DevEnv = __esm({
|
|
|
362839
363188
|
`, event.cause);
|
|
362840
363189
|
logger2.debug("=> Error contextual data:", event.data);
|
|
362841
363190
|
} else if (event.source === "ProxyController" && event.reason.startsWith("Error inside ProxyWorker")) {
|
|
362842
|
-
const detail = event.cause.message || event.cause.cause?.message || "unknown error";
|
|
362843
363191
|
logger2.error(
|
|
362844
|
-
`${event.reason} (the affected request failed; the dev server continues): ${
|
|
363192
|
+
`${event.reason} (the affected request failed; the dev server continues): ${event.cause.message || "unknown error"}`
|
|
362845
363193
|
);
|
|
363194
|
+
logger2.debug(`Error in ${event.source}: ${event.reason}
|
|
363195
|
+
`, event.cause);
|
|
362846
363196
|
logger2.debug("=> Error contextual data:", event.data);
|
|
362847
363197
|
} else if (event.source === "ConfigController" && event.cause instanceof ParseError) {
|
|
362848
363198
|
logger2.error(event.cause);
|
|
@@ -369504,7 +369854,13 @@ async function getMiniflareOptionsFromConfig(args) {
|
|
|
369504
369854
|
bindings,
|
|
369505
369855
|
queueConsumers: void 0,
|
|
369506
369856
|
migrations: config2.migrations,
|
|
369507
|
-
|
|
369857
|
+
// The platform proxy doesn't run the Worker's code, so it can't run the
|
|
369858
|
+
// Workflows the Worker exports.
|
|
369859
|
+
exports: config2.exports && Object.fromEntries(
|
|
369860
|
+
Object.entries(config2.exports).filter(
|
|
369861
|
+
([, exported]) => exported.type !== "workflow"
|
|
369862
|
+
)
|
|
369863
|
+
),
|
|
369508
369864
|
tails: [],
|
|
369509
369865
|
streamingTails: [],
|
|
369510
369866
|
// Platform proxy does not prepare local Container images.
|