wrangler 4.139.0 → 4.140.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +10 -10
- package/wrangler-dist/cli.js +51 -26
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wrangler",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.140.0",
|
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"assembly",
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
"path-to-regexp": "6.3.0",
|
|
73
73
|
"unenv": "2.0.0-rc.24",
|
|
74
74
|
"workerd": "1.20260923.1",
|
|
75
|
-
"@cloudflare/unenv-preset": "2.16.2",
|
|
76
75
|
"@cloudflare/kv-asset-handler": "0.5.0",
|
|
77
|
-
"miniflare": "5.20260923.0-alpha"
|
|
76
|
+
"miniflare": "5.20260923.0-alpha",
|
|
77
|
+
"@cloudflare/unenv-preset": "2.16.2"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@aws-sdk/client-s3": "^3.721.0",
|
|
@@ -161,21 +161,21 @@
|
|
|
161
161
|
"yaml": "^2.8.1",
|
|
162
162
|
"yargs": "^17.7.2",
|
|
163
163
|
"zod": "4.4.3",
|
|
164
|
-
"@cloudflare/autoconfig": "0.6.
|
|
164
|
+
"@cloudflare/autoconfig": "0.6.5",
|
|
165
165
|
"@cloudflare/build-output-utils": "0.8.0",
|
|
166
|
-
"@cloudflare/cli-shared-helpers": "0.1.
|
|
166
|
+
"@cloudflare/cli-shared-helpers": "0.1.39",
|
|
167
167
|
"@cloudflare/config": "0.18.0",
|
|
168
|
-
"@cloudflare/containers-shared": "0.20.
|
|
168
|
+
"@cloudflare/containers-shared": "0.20.1",
|
|
169
|
+
"@cloudflare/deploy-helpers": "0.17.0",
|
|
169
170
|
"@cloudflare/pages-functions": "0.1.0",
|
|
170
|
-
"@cloudflare/
|
|
171
|
+
"@cloudflare/remote-bindings": "0.0.35",
|
|
171
172
|
"@cloudflare/pages-shared": "^0.13.188",
|
|
172
|
-
"@cloudflare/remote-bindings": "0.0.34",
|
|
173
173
|
"@cloudflare/runtime-types": "0.1.2",
|
|
174
174
|
"@cloudflare/shared-ast-primitives": "1.1.0",
|
|
175
|
+
"@cloudflare/workers-auth": "0.9.3",
|
|
175
176
|
"@cloudflare/workers-shared": "0.20.0",
|
|
176
|
-
"@cloudflare/workers-auth": "0.9.2",
|
|
177
|
-
"@cloudflare/workers-utils": "0.42.0",
|
|
178
177
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
178
|
+
"@cloudflare/workers-utils": "0.43.0",
|
|
179
179
|
"@cloudflare/workflows-shared": "0.14.0"
|
|
180
180
|
},
|
|
181
181
|
"peerDependencies": {
|
package/wrangler-dist/cli.js
CHANGED
|
@@ -235,6 +235,10 @@ var init_exports = __esm({
|
|
|
235
235
|
});
|
|
236
236
|
|
|
237
237
|
// ../workers-utils/src/config/durable-object-exports.ts
|
|
238
|
+
function isLiveDurableObjectExport(exportConfig) {
|
|
239
|
+
const state3 = exportConfig.state ?? "created";
|
|
240
|
+
return state3 === "created" || state3 === "expecting-transfer";
|
|
241
|
+
}
|
|
238
242
|
function getDurableObjectExports(exports$1) {
|
|
239
243
|
return partitionExports(exports$1)["durable-object"];
|
|
240
244
|
}
|
|
@@ -245,6 +249,7 @@ var init_durable_object_exports = __esm({
|
|
|
245
249
|
"../workers-utils/src/config/durable-object-exports.ts"() {
|
|
246
250
|
init_import_meta_url();
|
|
247
251
|
init_exports();
|
|
252
|
+
__name(isLiveDurableObjectExport, "isLiveDurableObjectExport");
|
|
248
253
|
__name(getDurableObjectExports, "getDurableObjectExports");
|
|
249
254
|
__name(hasDurableObjectExports, "hasDurableObjectExports");
|
|
250
255
|
}
|
|
@@ -402,7 +407,7 @@ function getDurableObjectClassNameToUseSQLiteMap(migrations, exports$1) {
|
|
|
402
407
|
if (entry.type !== "durable-object") {
|
|
403
408
|
continue;
|
|
404
409
|
}
|
|
405
|
-
if (entry
|
|
410
|
+
if (isLiveDurableObjectExport(entry)) {
|
|
406
411
|
durableObjectClassNameToUseSQLiteMap.set(
|
|
407
412
|
className,
|
|
408
413
|
entry.storage === "sqlite"
|
|
@@ -22995,8 +23000,7 @@ function warnIfDurableObjectsHaveNoLifecycleConfig(diagnostics, durableObjects,
|
|
|
22995
23000
|
if (entry === void 0 || entry.type !== "durable-object") {
|
|
22996
23001
|
return false;
|
|
22997
23002
|
}
|
|
22998
|
-
|
|
22999
|
-
return state3 === "created" || state3 === "expecting-transfer";
|
|
23003
|
+
return isLiveDurableObjectExport(entry);
|
|
23000
23004
|
}, "exportsCovers");
|
|
23001
23005
|
const uncoveredByExports = exportedDurableObjects.filter(
|
|
23002
23006
|
(binding) => typeof binding.class_name !== "string" || !exportsCovers(binding.class_name)
|
|
@@ -62482,7 +62486,7 @@ var name, version2;
|
|
|
62482
62486
|
var init_package = __esm({
|
|
62483
62487
|
"package.json"() {
|
|
62484
62488
|
name = "wrangler";
|
|
62485
|
-
version2 = "4.
|
|
62489
|
+
version2 = "4.140.0";
|
|
62486
62490
|
}
|
|
62487
62491
|
});
|
|
62488
62492
|
|
|
@@ -140144,10 +140148,12 @@ async function pushImageIfChanged({
|
|
|
140144
140148
|
const parsedRemoteManifest = JSON.parse(remoteManifest);
|
|
140145
140149
|
if (parsedRemoteManifest.Descriptor.digest === hash2) {
|
|
140146
140150
|
logger3.log("Image already exists remotely, skipping push");
|
|
140147
|
-
|
|
140148
|
-
|
|
140149
|
-
|
|
140150
|
-
|
|
140151
|
+
if (cleanupSourceTag !== false) {
|
|
140152
|
+
logger3.debug(
|
|
140153
|
+
`Untagging built image: ${sourceTag} since there was no change.`
|
|
140154
|
+
);
|
|
140155
|
+
await runDockerCmd(pathToDocker, ["image", "rm", sourceTag]);
|
|
140156
|
+
}
|
|
140151
140157
|
return { remoteDigest: remoteDigest2 };
|
|
140152
140158
|
}
|
|
140153
140159
|
} catch (error53) {
|
|
@@ -175401,12 +175407,16 @@ async function deployWorker(props, config2, buildResult, callbacks) {
|
|
|
175401
175407
|
});
|
|
175402
175408
|
}
|
|
175403
175409
|
}
|
|
175404
|
-
await deployContainers(
|
|
175405
|
-
|
|
175406
|
-
|
|
175407
|
-
|
|
175408
|
-
|
|
175409
|
-
|
|
175410
|
+
await deployContainers(
|
|
175411
|
+
{ ...config2, containers: props.containers.source },
|
|
175412
|
+
containerDeployments,
|
|
175413
|
+
{
|
|
175414
|
+
versionId,
|
|
175415
|
+
accountId,
|
|
175416
|
+
scriptName,
|
|
175417
|
+
dispatchNamespace: props.dispatchNamespace
|
|
175418
|
+
}
|
|
175419
|
+
);
|
|
175410
175420
|
}
|
|
175411
175421
|
if (!skipContainerChanges && durableObjectContainerConfig.length > 0) {
|
|
175412
175422
|
assert38__default.default(versionId && accountId);
|
|
@@ -176630,7 +176640,7 @@ function getDeclaredDOClassNames(config2) {
|
|
|
176630
176640
|
for (const [className, entry] of Object.entries(
|
|
176631
176641
|
getDurableObjectExports(config2.exports)
|
|
176632
176642
|
)) {
|
|
176633
|
-
if (entry
|
|
176643
|
+
if (isLiveDurableObjectExport(entry)) {
|
|
176634
176644
|
declared.add(className);
|
|
176635
176645
|
}
|
|
176636
176646
|
}
|
|
@@ -176762,7 +176772,7 @@ function getPreviewExports(exports$1) {
|
|
|
176762
176772
|
}
|
|
176763
176773
|
return previewExports;
|
|
176764
176774
|
}
|
|
176765
|
-
async function prepareContainersForPreview(config2, workerName, previewSlug, callbacks) {
|
|
176775
|
+
async function prepareContainersForPreview(config2, workerName, previewSlug, callbacks, localImageReferences) {
|
|
176766
176776
|
const previewContainers = config2.previews?.containers ?? [];
|
|
176767
176777
|
if (previewContainers.length === 0 || !callbacks.getNormalizedContainerOptions) {
|
|
176768
176778
|
return { scopedContainerConfig: void 0, normalisedContainerConfig: [] };
|
|
@@ -176782,11 +176792,11 @@ async function prepareContainersForPreview(config2, workerName, previewSlug, cal
|
|
|
176782
176792
|
const containersNeedingDocker = normalisedContainerConfig.filter(
|
|
176783
176793
|
(container) => "dockerfile" in container
|
|
176784
176794
|
);
|
|
176785
|
-
if (containersNeedingDocker.length > 0) {
|
|
176795
|
+
if (containersNeedingDocker.length > 0 || localImageReferences.size > 0) {
|
|
176786
176796
|
await verifyDockerInstalled({
|
|
176787
176797
|
dockerPath: getDockerPath(),
|
|
176788
176798
|
operation: "creating a preview",
|
|
176789
|
-
imageNoun: containersNeedingDocker.length !== 1 ? "the configured images" : "the configured image",
|
|
176799
|
+
imageNoun: containersNeedingDocker.length + localImageReferences.size !== 1 ? "the configured images" : "the configured image",
|
|
176790
176800
|
hint: 'If you cannot run Docker locally, set "image" to a prebuilt registry image instead of a Dockerfile path for the affected entries in "previews.containers".'
|
|
176791
176801
|
});
|
|
176792
176802
|
}
|
|
@@ -177207,7 +177217,7 @@ async function provisionParentWorker(config2, accountId, workerName, json2) {
|
|
|
177207
177217
|
preview_urls ?? workers_dev
|
|
177208
177218
|
);
|
|
177209
177219
|
}
|
|
177210
|
-
async function runPreview(accountId, args, config2, buildResult, assetsOptions, callbacks, workerName, replaceTailConsumersAfterCreate = false) {
|
|
177220
|
+
async function runPreview(accountId, args, config2, buildResult, assetsOptions, callbacks, workerName, replaceTailConsumersAfterCreate = false, localImageReferences = /* @__PURE__ */ new Map()) {
|
|
177211
177221
|
let secrets;
|
|
177212
177222
|
if (args.secretsFile) {
|
|
177213
177223
|
secrets = (await parseBulkInputToObject(args.secretsFile))?.content;
|
|
@@ -177286,7 +177296,8 @@ async function runPreview(accountId, args, config2, buildResult, assetsOptions,
|
|
|
177286
177296
|
config2,
|
|
177287
177297
|
workerName,
|
|
177288
177298
|
previewResource.slug,
|
|
177289
|
-
callbacks
|
|
177299
|
+
callbacks,
|
|
177300
|
+
localImageReferences
|
|
177290
177301
|
);
|
|
177291
177302
|
const deploymentRequest = await assemblePreviewDeploymentSettings(
|
|
177292
177303
|
config2,
|
|
@@ -177324,7 +177335,7 @@ async function runPreview(accountId, args, config2, buildResult, assetsOptions,
|
|
|
177324
177335
|
normalisedContainerConfig,
|
|
177325
177336
|
deployment,
|
|
177326
177337
|
accountId,
|
|
177327
|
-
{ quiet: args.json === true }
|
|
177338
|
+
{ quiet: args.json === true, localImageReferences }
|
|
177328
177339
|
);
|
|
177329
177340
|
} catch (error53) {
|
|
177330
177341
|
logger.warn(
|
|
@@ -179812,7 +179823,7 @@ var init_dist14 = __esm({
|
|
|
179812
179823
|
init_wrapper();
|
|
179813
179824
|
init_create_worker_upload_form();
|
|
179814
179825
|
import_undici13 = __toESM(require_undici(), 1);
|
|
179815
|
-
version3 = "0.0.
|
|
179826
|
+
version3 = "0.0.35";
|
|
179816
179827
|
NoDefaultValueProvided2 = class extends UserError {
|
|
179817
179828
|
static {
|
|
179818
179829
|
__name(this, "NoDefaultValueProvided");
|
|
@@ -340275,7 +340286,8 @@ async function deployPreviewContainers(scopedConfig, normalisedContainerConfig,
|
|
|
340275
340286
|
scopedConfig,
|
|
340276
340287
|
normalisedContainerConfig,
|
|
340277
340288
|
deployment,
|
|
340278
|
-
accountId
|
|
340289
|
+
accountId,
|
|
340290
|
+
options.localImageReferences
|
|
340279
340291
|
);
|
|
340280
340292
|
}
|
|
340281
340293
|
const previousLogLevel = getLogLevel();
|
|
@@ -340287,14 +340299,15 @@ async function deployPreviewContainers(scopedConfig, normalisedContainerConfig,
|
|
|
340287
340299
|
scopedConfig,
|
|
340288
340300
|
normalisedContainerConfig,
|
|
340289
340301
|
deployment,
|
|
340290
|
-
accountId
|
|
340302
|
+
accountId,
|
|
340303
|
+
options.localImageReferences
|
|
340291
340304
|
)
|
|
340292
340305
|
);
|
|
340293
340306
|
} finally {
|
|
340294
340307
|
setLogLevel(previousLogLevel);
|
|
340295
340308
|
}
|
|
340296
340309
|
}
|
|
340297
|
-
async function applyPreviewContainers(scopedConfig, normalisedContainerConfig, deployment, accountId) {
|
|
340310
|
+
async function applyPreviewContainers(scopedConfig, normalisedContainerConfig, deployment, accountId, localImageReferences) {
|
|
340298
340311
|
initContainersSharedContext({ logger: logger2, fetchPagedListResult: fetchPagedListResult2, fetchResult: fetchResult2 });
|
|
340299
340312
|
await fillOpenAPIConfiguration(scopedConfig, containersScope);
|
|
340300
340313
|
const dockerPath = getDockerPath();
|
|
@@ -340322,7 +340335,19 @@ async function applyPreviewContainers(scopedConfig, normalisedContainerConfig, d
|
|
|
340322
340335
|
);
|
|
340323
340336
|
}
|
|
340324
340337
|
let imageRef;
|
|
340325
|
-
|
|
340338
|
+
const localImageReference = localImageReferences?.get(container.class_name);
|
|
340339
|
+
if (localImageReference !== void 0) {
|
|
340340
|
+
imageRef = await pushImageIfChanged({
|
|
340341
|
+
pathToDocker: dockerPath,
|
|
340342
|
+
sourceTag: localImageReference,
|
|
340343
|
+
targetTag: localImageReference,
|
|
340344
|
+
accountId,
|
|
340345
|
+
complianceConfig: scopedConfig,
|
|
340346
|
+
containerConfig: container,
|
|
340347
|
+
// Build Output can be uploaded again without rebuilding the image.
|
|
340348
|
+
cleanupSourceTag: false
|
|
340349
|
+
});
|
|
340350
|
+
} else if ("dockerfile" in container) {
|
|
340326
340351
|
imageRef = await buildContainer(
|
|
340327
340352
|
{ ...container, name: container.name.toLowerCase() },
|
|
340328
340353
|
deployment.id,
|