wrangler 4.20.1 → 4.20.2
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 +38 -2
- package/package.json +6 -6
- package/wrangler-dist/cli.d.ts +19 -0
- package/wrangler-dist/cli.js +152 -58
- package/wrangler-dist/metafile-cjs.json +1 -1
package/config-schema.json
CHANGED
@@ -305,7 +305,7 @@
|
|
305
305
|
"items": {
|
306
306
|
"$ref": "#/definitions/ContainerApp"
|
307
307
|
},
|
308
|
-
"description": "Container related configuration",
|
308
|
+
"description": "Container related configuration\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
|
309
309
|
"default": []
|
310
310
|
},
|
311
311
|
"kv_namespaces": {
|
@@ -1311,7 +1311,7 @@
|
|
1311
1311
|
"items": {
|
1312
1312
|
"$ref": "#/definitions/ContainerApp"
|
1313
1313
|
},
|
1314
|
-
"description": "Container related configuration",
|
1314
|
+
"description": "Container related configuration\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
|
1315
1315
|
"default": []
|
1316
1316
|
},
|
1317
1317
|
"kv_namespaces": {
|
@@ -2557,9 +2557,45 @@
|
|
2557
2557
|
"type": "boolean",
|
2558
2558
|
"description": "When developing, whether to build and connect to containers. This requires a Docker daemon to be running. Defaults to `true`.",
|
2559
2559
|
"default": true
|
2560
|
+
},
|
2561
|
+
"container_engine": {
|
2562
|
+
"$ref": "#/definitions/ContainerEngine",
|
2563
|
+
"description": "Either the Docker unix socket i.e. `unix:/var/run/docker.sock` or a full configuration. Note that windows is only supported via WSL at the moment"
|
2560
2564
|
}
|
2561
2565
|
},
|
2562
2566
|
"additionalProperties": false
|
2567
|
+
},
|
2568
|
+
"ContainerEngine": {
|
2569
|
+
"anyOf": [
|
2570
|
+
{
|
2571
|
+
"type": "object",
|
2572
|
+
"properties": {
|
2573
|
+
"localDocker": {
|
2574
|
+
"$ref": "#/definitions/DockerConfiguration"
|
2575
|
+
}
|
2576
|
+
},
|
2577
|
+
"required": [
|
2578
|
+
"localDocker"
|
2579
|
+
],
|
2580
|
+
"additionalProperties": false
|
2581
|
+
},
|
2582
|
+
{
|
2583
|
+
"type": "string"
|
2584
|
+
}
|
2585
|
+
]
|
2586
|
+
},
|
2587
|
+
"DockerConfiguration": {
|
2588
|
+
"type": "object",
|
2589
|
+
"properties": {
|
2590
|
+
"socketPath": {
|
2591
|
+
"type": "string",
|
2592
|
+
"description": "Socket used by miniflare to communicate with Docker"
|
2593
|
+
}
|
2594
|
+
},
|
2595
|
+
"required": [
|
2596
|
+
"socketPath"
|
2597
|
+
],
|
2598
|
+
"additionalProperties": false
|
2563
2599
|
}
|
2564
2600
|
},
|
2565
2601
|
"allowTrailingCommas": true
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "wrangler",
|
3
|
-
"version": "4.20.
|
3
|
+
"version": "4.20.2",
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
5
5
|
"keywords": [
|
6
6
|
"wrangler",
|
@@ -55,14 +55,14 @@
|
|
55
55
|
"esbuild": "0.25.4",
|
56
56
|
"path-to-regexp": "6.3.0",
|
57
57
|
"unenv": "2.0.0-rc.17",
|
58
|
-
"workerd": "1.
|
58
|
+
"workerd": "1.20250617.0",
|
59
59
|
"@cloudflare/kv-asset-handler": "0.4.0",
|
60
|
-
"miniflare": "4.
|
60
|
+
"miniflare": "4.20250617.0"
|
61
61
|
},
|
62
62
|
"devDependencies": {
|
63
63
|
"@aws-sdk/client-s3": "^3.721.0",
|
64
64
|
"@cloudflare/types": "6.18.4",
|
65
|
-
"@cloudflare/workers-types": "^4.
|
65
|
+
"@cloudflare/workers-types": "^4.20250617.0",
|
66
66
|
"@cspotcode/source-map-support": "0.8.1",
|
67
67
|
"@iarna/toml": "^3.0.0",
|
68
68
|
"@sentry/node": "^7.86.0",
|
@@ -138,12 +138,12 @@
|
|
138
138
|
"@cloudflare/cli": "1.1.1",
|
139
139
|
"@cloudflare/containers-shared": "0.1.0",
|
140
140
|
"@cloudflare/eslint-config-worker": "1.1.0",
|
141
|
-
"@cloudflare/pages-shared": "^0.13.
|
141
|
+
"@cloudflare/pages-shared": "^0.13.47",
|
142
142
|
"@cloudflare/workers-shared": "0.17.6",
|
143
143
|
"@cloudflare/workers-tsconfig": "0.0.0"
|
144
144
|
},
|
145
145
|
"peerDependencies": {
|
146
|
-
"@cloudflare/workers-types": "^4.
|
146
|
+
"@cloudflare/workers-types": "^4.20250617.0"
|
147
147
|
},
|
148
148
|
"peerDependenciesMeta": {
|
149
149
|
"@cloudflare/workers-types": {
|
package/wrangler-dist/cli.d.ts
CHANGED
@@ -500,6 +500,9 @@ interface EnvironmentNonInheritable {
|
|
500
500
|
/**
|
501
501
|
* Container related configuration
|
502
502
|
*
|
503
|
+
* NOTE: This field is not automatically inherited from the top level environment,
|
504
|
+
* and so must be specified in every named environment.
|
505
|
+
*
|
503
506
|
* @default []
|
504
507
|
* @nonInheritable
|
505
508
|
*/
|
@@ -984,6 +987,13 @@ interface Observability {
|
|
984
987
|
invocation_logs?: boolean;
|
985
988
|
};
|
986
989
|
}
|
990
|
+
type DockerConfiguration = {
|
991
|
+
/** Socket used by miniflare to communicate with Docker */
|
992
|
+
socketPath: string;
|
993
|
+
};
|
994
|
+
type ContainerEngine = {
|
995
|
+
localDocker: DockerConfiguration;
|
996
|
+
} | string;
|
987
997
|
|
988
998
|
/**
|
989
999
|
* This is the static type definition for the configuration object.
|
@@ -1189,6 +1199,11 @@ interface DevConfig {
|
|
1189
1199
|
* @default true
|
1190
1200
|
*/
|
1191
1201
|
enable_containers: boolean;
|
1202
|
+
/**
|
1203
|
+
* Either the Docker unix socket i.e. `unix:/var/run/docker.sock` or a full configuration.
|
1204
|
+
* Note that windows is only supported via WSL at the moment
|
1205
|
+
*/
|
1206
|
+
container_engine: ContainerEngine | undefined;
|
1192
1207
|
}
|
1193
1208
|
type RawDevConfig = Partial<DevConfig>;
|
1194
1209
|
interface EnvironmentMap {
|
@@ -1223,6 +1238,7 @@ type NormalizeAndValidateConfigArgs = {
|
|
1223
1238
|
upstreamProtocol?: string;
|
1224
1239
|
script?: string;
|
1225
1240
|
enableContainers?: boolean;
|
1241
|
+
containerEngine?: ContainerEngine;
|
1226
1242
|
};
|
1227
1243
|
|
1228
1244
|
type ReadConfigCommandArgs = NormalizeAndValidateConfigArgs & {
|
@@ -1549,6 +1565,7 @@ interface Unstable_DevOptions {
|
|
1549
1565
|
enableIpc?: boolean;
|
1550
1566
|
enableContainers?: boolean;
|
1551
1567
|
dockerPath?: string;
|
1568
|
+
containerEngine?: string;
|
1552
1569
|
};
|
1553
1570
|
}
|
1554
1571
|
interface Unstable_DevWorker {
|
@@ -1940,6 +1957,8 @@ interface StartDevWorkerInput {
|
|
1940
1957
|
enableContainers?: boolean;
|
1941
1958
|
/** Path to the docker executable. Defaults to 'docker' */
|
1942
1959
|
dockerPath?: string;
|
1960
|
+
/** Options for the container engine */
|
1961
|
+
containerEngine?: ContainerEngine;
|
1943
1962
|
};
|
1944
1963
|
legacy?: {
|
1945
1964
|
site?: Hook<Config["site"], [Config]>;
|
package/wrangler-dist/cli.js
CHANGED
@@ -26020,7 +26020,7 @@ function getComplianceRegionSubdomain(complianceConfig) {
|
|
26020
26020
|
function getStagingSubdomain() {
|
26021
26021
|
return getCloudflareApiEnvironmentFromEnv() === "staging" ? ".staging" : "";
|
26022
26022
|
}
|
26023
|
-
var import_node_path2, getC3CommandFromEnv, getWranglerSendMetricsFromEnv, getCloudflareApiEnvironmentFromEnv, COMPLIANCE_REGION_CONFIG_PUBLIC, COMPLIANCE_REGION_CONFIG_UNKNOWN, getCloudflareComplianceRegionFromEnv, getCloudflareComplianceRegion, getCloudflareApiBaseUrlFromEnv, getCloudflareApiBaseUrl, getSanitizeLogs, getOutputFileDirectoryFromEnv, getOutputFilePathFromEnv, getCIMatchTag, getCIOverrideName, getCIOverrideNetworkModeHost, getCIGeneratePreviewAlias, getBuildConditionsFromEnv, getBuildPlatformFromEnv, getRegistryPath, getDockerPath;
|
26023
|
+
var import_node_path2, getC3CommandFromEnv, getWranglerSendMetricsFromEnv, getCloudflareApiEnvironmentFromEnv, COMPLIANCE_REGION_CONFIG_PUBLIC, COMPLIANCE_REGION_CONFIG_UNKNOWN, getCloudflareComplianceRegionFromEnv, getCloudflareComplianceRegion, getCloudflareApiBaseUrlFromEnv, getCloudflareApiBaseUrl, getSanitizeLogs, getOutputFileDirectoryFromEnv, getOutputFilePathFromEnv, getCIMatchTag, getCIOverrideName, getCIOverrideNetworkModeHost, getCIGeneratePreviewAlias, getBuildConditionsFromEnv, getBuildPlatformFromEnv, getRegistryPath, getDockerPath, getDockerHost;
|
26024
26024
|
var init_misc_variables = __esm({
|
26025
26025
|
"src/environment-variables/misc-variables.ts"() {
|
26026
26026
|
init_import_meta_url();
|
@@ -26115,6 +26115,12 @@ var init_misc_variables = __esm({
|
|
26115
26115
|
return "docker";
|
26116
26116
|
}
|
26117
26117
|
});
|
26118
|
+
getDockerHost = getEnvironmentVariableFactory({
|
26119
|
+
variableName: "WRANGLER_DOCKER_HOST",
|
26120
|
+
defaultValue() {
|
26121
|
+
return process.platform === "win32" ? "//./pipe/docker_engine" : "unix:/var/run/docker.sock";
|
26122
|
+
}
|
26123
|
+
});
|
26118
26124
|
}
|
26119
26125
|
});
|
26120
26126
|
|
@@ -26479,7 +26485,6 @@ var init_logger = __esm({
|
|
26479
26485
|
__name(getLoggerLevel, "getLoggerLevel");
|
26480
26486
|
overrideLoggerLevel = new import_node_async_hooks.AsyncLocalStorage();
|
26481
26487
|
runWithLogLevel = /* @__PURE__ */ __name((overrideLogLevel, cb2) => overrideLoggerLevel.run({ logLevel: overrideLogLevel }, cb2), "runWithLogLevel");
|
26482
|
-
overrideLoggerLevel.getStore;
|
26483
26488
|
__name(consoleMethodToLoggerLevel, "consoleMethodToLoggerLevel");
|
26484
26489
|
Logger = class _Logger {
|
26485
26490
|
static {
|
@@ -26905,7 +26910,7 @@ var name, version;
|
|
26905
26910
|
var init_package = __esm({
|
26906
26911
|
"package.json"() {
|
26907
26912
|
name = "wrangler";
|
26908
|
-
version = "4.20.
|
26913
|
+
version = "4.20.2";
|
26909
26914
|
}
|
26910
26915
|
});
|
26911
26916
|
|
@@ -35159,7 +35164,8 @@ function normalizeAndValidateDev(diagnostics, rawDev, args) {
|
|
35159
35164
|
localProtocol: localProtocolArg,
|
35160
35165
|
upstreamProtocol: upstreamProtocolArg,
|
35161
35166
|
remote: remoteArg,
|
35162
|
-
enableContainers: enableContainersArg
|
35167
|
+
enableContainers: enableContainersArg,
|
35168
|
+
containerEngine: containerEngineArg
|
35163
35169
|
} = args;
|
35164
35170
|
(0, import_node_assert.default)(
|
35165
35171
|
localProtocolArg === void 0 || localProtocolArg === "http" || localProtocolArg === "https"
|
@@ -35171,6 +35177,9 @@ function normalizeAndValidateDev(diagnostics, rawDev, args) {
|
|
35171
35177
|
(0, import_node_assert.default)(
|
35172
35178
|
enableContainersArg === void 0 || typeof enableContainersArg === "boolean"
|
35173
35179
|
);
|
35180
|
+
(0, import_node_assert.default)(
|
35181
|
+
containerEngineArg === void 0 || typeof containerEngineArg === "string" || typeof containerEngineArg?.localDocker?.socketPath === "string"
|
35182
|
+
);
|
35174
35183
|
const {
|
35175
35184
|
// On Windows, when specifying `localhost` as the socket hostname, `workerd`
|
35176
35185
|
// will only listen on the IPv4 loopback `127.0.0.1`, not the IPv6 `::1`:
|
@@ -35230,7 +35239,8 @@ function normalizeAndValidateDev(diagnostics, rawDev, args) {
|
|
35230
35239
|
local_protocol,
|
35231
35240
|
upstream_protocol,
|
35232
35241
|
host,
|
35233
|
-
enable_containers
|
35242
|
+
enable_containers,
|
35243
|
+
container_engine: containerEngineArg
|
35234
35244
|
};
|
35235
35245
|
}
|
35236
35246
|
function normalizeAndValidateAssets(diagnostics, topLevelEnv, rawEnv) {
|
@@ -37825,7 +37835,8 @@ var init_config = __esm({
|
|
37825
37835
|
upstream_protocol: "http",
|
37826
37836
|
host: void 0,
|
37827
37837
|
// Note this one is also workers only
|
37828
|
-
enable_containers: true
|
37838
|
+
enable_containers: true,
|
37839
|
+
container_engine: void 0
|
37829
37840
|
},
|
37830
37841
|
/** INHERITABLE ENVIRONMENT FIELDS **/
|
37831
37842
|
name: void 0,
|
@@ -51657,22 +51668,29 @@ function buildMiniflareBindingOptions(config, mixedModeConnectionString, mixedMo
|
|
51657
51668
|
const classNameToUseSQLite = getClassNamesWhichUseSQLite(config.migrations);
|
51658
51669
|
const internalObjects = [];
|
51659
51670
|
const externalObjects = [];
|
51660
|
-
const externalWorkers = [];
|
51661
51671
|
for (const binding of bindings.durable_objects?.bindings ?? []) {
|
51662
|
-
const
|
51663
|
-
|
51672
|
+
const isInternal = binding.script_name === void 0 || binding.script_name === config.name;
|
51673
|
+
if (isInternal) {
|
51674
|
+
internalObjects.push(binding);
|
51675
|
+
} else {
|
51676
|
+
externalObjects.push(binding);
|
51677
|
+
}
|
51664
51678
|
}
|
51679
|
+
const externalWorkers = [];
|
51665
51680
|
if (config.workerDefinitions !== null) {
|
51666
51681
|
externalWorkers.push({
|
51667
51682
|
name: EXTERNAL_SERVICE_WORKER_NAME,
|
51668
51683
|
// Bind all internal objects, so they're accessible by all other sessions
|
51669
51684
|
// that proxy requests for our objects to this worker
|
51670
51685
|
durableObjects: Object.fromEntries(
|
51671
|
-
internalObjects.map(({ class_name }) => {
|
51672
|
-
const useSQLite = classNameToUseSQLite.get(class_name);
|
51686
|
+
internalObjects.map(({ class_name: className }) => {
|
51673
51687
|
return [
|
51674
|
-
|
51675
|
-
{
|
51688
|
+
className,
|
51689
|
+
{
|
51690
|
+
className,
|
51691
|
+
scriptName: getName(config),
|
51692
|
+
useSQLite: classNameToUseSQLite.get(className)
|
51693
|
+
}
|
51676
51694
|
];
|
51677
51695
|
})
|
51678
51696
|
),
|
@@ -51894,40 +51912,42 @@ function buildMiniflareBindingOptions(config, mixedModeConnectionString, mixedMo
|
|
51894
51912
|
) ?? []
|
51895
51913
|
) : void 0,
|
51896
51914
|
durableObjects: Object.fromEntries([
|
51897
|
-
...internalObjects.map(({ name: name2, class_name }) => {
|
51898
|
-
const useSQLite = classNameToUseSQLite.get(class_name);
|
51915
|
+
...internalObjects.map(({ name: name2, class_name: className }) => {
|
51899
51916
|
return [
|
51900
51917
|
name2,
|
51901
51918
|
{
|
51902
|
-
className
|
51903
|
-
useSQLite
|
51919
|
+
className,
|
51920
|
+
useSQLite: classNameToUseSQLite.get(className),
|
51921
|
+
container: getContainerOptions(className, config.containers)
|
51904
51922
|
}
|
51905
51923
|
];
|
51906
51924
|
}),
|
51907
|
-
...externalObjects.map(
|
51908
|
-
|
51909
|
-
|
51910
|
-
|
51911
|
-
|
51912
|
-
|
51913
|
-
|
51914
|
-
|
51915
|
-
|
51916
|
-
|
51917
|
-
|
51918
|
-
|
51919
|
-
|
51920
|
-
|
51921
|
-
|
51922
|
-
|
51923
|
-
|
51924
|
-
|
51925
|
-
|
51926
|
-
|
51927
|
-
|
51928
|
-
|
51929
|
-
|
51930
|
-
|
51925
|
+
...externalObjects.map(
|
51926
|
+
({ name: name2, class_name: className, script_name: scriptName }) => {
|
51927
|
+
const identifier = getIdentifier(`do_${scriptName}_${className}`);
|
51928
|
+
const useSQLite = classNameToUseSQLite.get(className);
|
51929
|
+
return config.workerDefinitions === null ? [
|
51930
|
+
name2,
|
51931
|
+
{
|
51932
|
+
className,
|
51933
|
+
scriptName
|
51934
|
+
}
|
51935
|
+
] : [
|
51936
|
+
name2,
|
51937
|
+
{
|
51938
|
+
className: identifier,
|
51939
|
+
scriptName: EXTERNAL_SERVICE_WORKER_NAME,
|
51940
|
+
useSQLite,
|
51941
|
+
// Matches the unique key Miniflare will generate for this object in
|
51942
|
+
// the target session. We need to do this so workerd generates the
|
51943
|
+
// same IDs it would if this were part of the same process. workerd
|
51944
|
+
// doesn't allow IDs from Durable Objects with different unique keys
|
51945
|
+
// to be used with each other.
|
51946
|
+
unsafeUniqueKey: `${scriptName}-${className}`
|
51947
|
+
}
|
51948
|
+
];
|
51949
|
+
}
|
51950
|
+
)
|
51931
51951
|
]),
|
51932
51952
|
ratelimits: Object.fromEntries(
|
51933
51953
|
bindings.unsafe?.bindings?.filter((b6) => b6.type == "ratelimit").map(ratelimitEntry) ?? []
|
@@ -52137,7 +52157,16 @@ async function buildMiniflareOptions(log2, config, proxyToUserWorkerAuthenticati
|
|
52137
52157
|
};
|
52138
52158
|
return { options, internalObjects, entrypointNames };
|
52139
52159
|
}
|
52140
|
-
|
52160
|
+
function getContainerOptions(className, containers2) {
|
52161
|
+
if (!containers2 || !(className in containers2)) {
|
52162
|
+
return void 0;
|
52163
|
+
}
|
52164
|
+
const container = containers2[className];
|
52165
|
+
return {
|
52166
|
+
imageName: `${CONTAINER_IMAGE_PREFIX}/${container.name}`
|
52167
|
+
};
|
52168
|
+
}
|
52169
|
+
var import_node_assert5, import_node_crypto4, import_node_path17, import_miniflare8, EXTERNAL_SERVICE_WORKER_NAME, EXTERNAL_SERVICE_WORKER_SCRIPT, WranglerLog, DEFAULT_WORKER_NAME, IDENTIFIER_UNSAFE_REGEXP, didWarnMiniflareCronSupport, didWarnMiniflareVectorizeSupport, didWarnAiAccountUsage, CONTAINER_IMAGE_PREFIX;
|
52141
52170
|
var init_miniflare = __esm({
|
52142
52171
|
"src/dev/miniflare.ts"() {
|
52143
52172
|
init_import_meta_url();
|
@@ -52318,6 +52347,8 @@ export default {
|
|
52318
52347
|
didWarnMiniflareVectorizeSupport = false;
|
52319
52348
|
didWarnAiAccountUsage = false;
|
52320
52349
|
__name(buildMiniflareOptions, "buildMiniflareOptions");
|
52350
|
+
CONTAINER_IMAGE_PREFIX = "cloudflare-dev";
|
52351
|
+
__name(getContainerOptions, "getContainerOptions");
|
52321
52352
|
}
|
52322
52353
|
});
|
52323
52354
|
|
@@ -59002,7 +59033,14 @@ var init_client2 = __esm({
|
|
59002
59033
|
// ../containers-shared/src/build.ts
|
59003
59034
|
async function constructBuildCommand(options, logger4) {
|
59004
59035
|
const platform3 = options.platform ?? "linux/amd64";
|
59005
|
-
const buildCmd = [
|
59036
|
+
const buildCmd = [
|
59037
|
+
"build",
|
59038
|
+
"-t",
|
59039
|
+
options.tag,
|
59040
|
+
"--platform",
|
59041
|
+
platform3,
|
59042
|
+
"--provenance=false"
|
59043
|
+
];
|
59006
59044
|
if (options.args) {
|
59007
59045
|
for (const arg in options.args) {
|
59008
59046
|
buildCmd.push("--build-arg", `${arg}=${options.args[arg]}`);
|
@@ -59072,7 +59110,7 @@ async function dockerLoginManagedRegistry(pathToDocker) {
|
|
59072
59110
|
getCloudflareContainerRegistry(),
|
59073
59111
|
{
|
59074
59112
|
expiration_minutes: expirationMinutes,
|
59075
|
-
permissions: ["push"]
|
59113
|
+
permissions: ["push", "pull"]
|
59076
59114
|
}
|
59077
59115
|
);
|
59078
59116
|
const child = (0, import_node_child_process.spawn)(
|
@@ -59233,6 +59271,34 @@ var init_registry = __esm({
|
|
59233
59271
|
}
|
59234
59272
|
});
|
59235
59273
|
|
59274
|
+
// ../containers-shared/src/images.ts
|
59275
|
+
async function getDockerImageDigest(dockerPath, imageTag) {
|
59276
|
+
return new Promise((resolve24, reject) => {
|
59277
|
+
(0, import_child_process5.execFile)(
|
59278
|
+
dockerPath,
|
59279
|
+
["images", "--digests", "--format", "{{.Digest}}", imageTag],
|
59280
|
+
(error2, stdout2, stderr2) => {
|
59281
|
+
if (error2) {
|
59282
|
+
return reject(
|
59283
|
+
new Error(
|
59284
|
+
`Failed getting docker image digest for image: ${imageTag} with error: ${error2}.`
|
59285
|
+
)
|
59286
|
+
);
|
59287
|
+
}
|
59288
|
+
return resolve24(stdout2.trim());
|
59289
|
+
}
|
59290
|
+
);
|
59291
|
+
});
|
59292
|
+
}
|
59293
|
+
var import_child_process5;
|
59294
|
+
var init_images = __esm({
|
59295
|
+
"../containers-shared/src/images.ts"() {
|
59296
|
+
init_import_meta_url();
|
59297
|
+
import_child_process5 = require("child_process");
|
59298
|
+
__name(getDockerImageDigest, "getDockerImageDigest");
|
59299
|
+
}
|
59300
|
+
});
|
59301
|
+
|
59236
59302
|
// ../containers-shared/index.ts
|
59237
59303
|
var init_containers_shared = __esm({
|
59238
59304
|
"../containers-shared/index.ts"() {
|
@@ -59245,6 +59311,7 @@ var init_containers_shared = __esm({
|
|
59245
59311
|
init_types3();
|
59246
59312
|
init_inspect();
|
59247
59313
|
init_registry();
|
59314
|
+
init_images();
|
59248
59315
|
}
|
59249
59316
|
});
|
59250
59317
|
|
@@ -59557,7 +59624,7 @@ async function fillOpenAPIConfiguration(config, json) {
|
|
59557
59624
|
if (json && err instanceof ApiError) {
|
59558
59625
|
message = JSON.stringify(err);
|
59559
59626
|
}
|
59560
|
-
throw new UserError("
|
59627
|
+
throw new UserError("Loading account failed: " + message);
|
59561
59628
|
}
|
59562
59629
|
}
|
59563
59630
|
function interactWithUser(config) {
|
@@ -60325,11 +60392,14 @@ async function apply(args, config) {
|
|
60325
60392
|
const actions = [];
|
60326
60393
|
log(dim("Container application changes\n"));
|
60327
60394
|
for (const appConfigNoDefaults of config.containers) {
|
60395
|
+
const application = applicationByNames[appConfigNoDefaults.name];
|
60396
|
+
if (!appConfigNoDefaults.configuration.image && application) {
|
60397
|
+
appConfigNoDefaults.configuration.image = application.configuration.image;
|
60398
|
+
}
|
60328
60399
|
const appConfig = containerAppToCreateApplication(
|
60329
60400
|
appConfigNoDefaults,
|
60330
60401
|
args.skipDefaults
|
60331
60402
|
);
|
60332
|
-
const application = applicationByNames[appConfig.name];
|
60333
60403
|
if (application !== void 0 && application !== null) {
|
60334
60404
|
const prevApp = sortObjectRecursive(
|
60335
60405
|
stripUndefined(applicationToCreateApplication(application))
|
@@ -60710,7 +60780,25 @@ async function buildAndMaybePush(args, pathToDocker, push, containerConfig) {
|
|
60710
60780
|
});
|
60711
60781
|
if (push) {
|
60712
60782
|
await dockerLoginManagedRegistry(pathToDocker);
|
60713
|
-
|
60783
|
+
try {
|
60784
|
+
const repositoryOnly = imageTag.split(":")[0];
|
60785
|
+
const localDigest = await getDockerImageDigest(pathToDocker, imageTag);
|
60786
|
+
const digest = repositoryOnly + "@" + localDigest;
|
60787
|
+
await runDockerCmd(
|
60788
|
+
pathToDocker,
|
60789
|
+
["manifest", "inspect", digest],
|
60790
|
+
"ignore"
|
60791
|
+
);
|
60792
|
+
logger.log("Image already exists remotely, skipping push");
|
60793
|
+
logger.debug(
|
60794
|
+
`Untagging built image: ${imageTag} since there was no change.`
|
60795
|
+
);
|
60796
|
+
await runDockerCmd(pathToDocker, ["image", "rm", imageTag]);
|
60797
|
+
return "";
|
60798
|
+
} catch (error2) {
|
60799
|
+
logger.log(`Image does not exist remotely, pushing: ${imageTag}`);
|
60800
|
+
await runDockerCmd(pathToDocker, ["push", imageTag]);
|
60801
|
+
}
|
60714
60802
|
}
|
60715
60803
|
return imageTag;
|
60716
60804
|
} catch (error2) {
|
@@ -76262,7 +76350,7 @@ async function handleConfigureImageRegistryCommand(args, _config) {
|
|
76262
76350
|
);
|
76263
76351
|
}
|
76264
76352
|
var registriesCommand;
|
76265
|
-
var
|
76353
|
+
var init_images2 = __esm({
|
76266
76354
|
"src/cloudchamber/images/images.ts"() {
|
76267
76355
|
init_import_meta_url();
|
76268
76356
|
init_cli();
|
@@ -76975,7 +77063,7 @@ var init_cloudchamber = __esm({
|
|
76975
77063
|
init_create2();
|
76976
77064
|
init_curl();
|
76977
77065
|
init_delete();
|
76978
|
-
|
77066
|
+
init_images2();
|
76979
77067
|
init_list2();
|
76980
77068
|
init_list3();
|
76981
77069
|
init_modify();
|
@@ -118863,12 +118951,12 @@ var init_getValidatedProcessCredentials = __esm({
|
|
118863
118951
|
});
|
118864
118952
|
|
118865
118953
|
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.716.0/node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js
|
118866
|
-
var
|
118954
|
+
var import_child_process6, import_util14, resolveProcessCredentials;
|
118867
118955
|
var init_resolveProcessCredentials = __esm({
|
118868
118956
|
"../../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.716.0/node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js"() {
|
118869
118957
|
init_import_meta_url();
|
118870
118958
|
init_dist_es17();
|
118871
|
-
|
118959
|
+
import_child_process6 = require("child_process");
|
118872
118960
|
import_util14 = require("util");
|
118873
118961
|
init_getValidatedProcessCredentials();
|
118874
118962
|
resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles, logger4) => {
|
@@ -118876,7 +118964,7 @@ var init_resolveProcessCredentials = __esm({
|
|
118876
118964
|
if (profiles[profileName]) {
|
118877
118965
|
const credentialProcess = profile["credential_process"];
|
118878
118966
|
if (credentialProcess !== void 0) {
|
118879
|
-
const execPromise = (0, import_util14.promisify)(
|
118967
|
+
const execPromise = (0, import_util14.promisify)(import_child_process6.exec);
|
118880
118968
|
try {
|
118881
118969
|
const { stdout: stdout2 } = await execPromise(credentialProcess);
|
118882
118970
|
let data;
|
@@ -139505,7 +139593,7 @@ async function getDarwinInfo() {
|
|
139505
139593
|
};
|
139506
139594
|
try {
|
139507
139595
|
const output = await new Promise((resolve24, reject) => {
|
139508
|
-
(0,
|
139596
|
+
(0, import_child_process7.execFile)("/usr/bin/sw_vers", (error2, stdout2) => {
|
139509
139597
|
if (error2) {
|
139510
139598
|
reject(error2);
|
139511
139599
|
return;
|
@@ -139599,12 +139687,12 @@ function getCloudResourceContext() {
|
|
139599
139687
|
return void 0;
|
139600
139688
|
}
|
139601
139689
|
}
|
139602
|
-
var
|
139690
|
+
var import_child_process7, import_fs23, os8, import_path22, import_util16, readFileAsync, readDirAsync, Context, PLATFORM_NAMES, LINUX_DISTROS, LINUX_VERSIONS;
|
139603
139691
|
var init_context = __esm({
|
139604
139692
|
"../../node_modules/.pnpm/@sentry+node@7.87.0_supports-color@9.2.2/node_modules/@sentry/node/esm/integrations/context.js"() {
|
139605
139693
|
init_import_meta_url();
|
139606
139694
|
init_esm6();
|
139607
|
-
|
139695
|
+
import_child_process7 = require("child_process");
|
139608
139696
|
import_fs23 = require("fs");
|
139609
139697
|
os8 = __toESM(require("os"));
|
139610
139698
|
import_path22 = require("path");
|
@@ -153052,7 +153140,8 @@ async function resolveDevConfig(config, input) {
|
|
153052
153140
|
imagesLocalMode: input.dev?.imagesLocalMode ?? false,
|
153053
153141
|
experimentalMixedMode: input.dev?.experimentalMixedMode ?? getFlag("MIXED_MODE"),
|
153054
153142
|
enableContainers: input.dev?.enableContainers ?? config.dev.enable_containers,
|
153055
|
-
dockerPath: input.dev?.dockerPath ?? getDockerPath()
|
153143
|
+
dockerPath: input.dev?.dockerPath ?? getDockerPath(),
|
153144
|
+
containerEngine: input.dev?.containerEngine ?? getDockerHost()
|
153056
153145
|
};
|
153057
153146
|
}
|
153058
153147
|
async function resolveBindings(config, input) {
|
@@ -153257,6 +153346,9 @@ If you are trying to develop Pages and Workers together, please use \`wrangler p
|
|
153257
153346
|
}
|
153258
153347
|
function resolveContainerConfig(config) {
|
153259
153348
|
const containers2 = {};
|
153349
|
+
if (!config.dev.enable_containers) {
|
153350
|
+
return containers2;
|
153351
|
+
}
|
153260
153352
|
for (const container of config.containers ?? []) {
|
153261
153353
|
containers2[container.class_name] = {
|
153262
153354
|
image: container.image ?? container.configuration.image,
|
@@ -173592,7 +173684,8 @@ async function convertToConfigBundle(event) {
|
|
173592
173684
|
tails: event.config.tailConsumers,
|
173593
173685
|
containers: event.config.containers ?? {},
|
173594
173686
|
enableContainers: event.config.dev.enableContainers ?? true,
|
173595
|
-
dockerPath: event.config.dev.dockerPath ?? "docker"
|
173687
|
+
dockerPath: event.config.dev.dockerPath ?? "docker",
|
173688
|
+
containerEngine: event.config.dev.containerEngine
|
173596
173689
|
};
|
173597
173690
|
}
|
173598
173691
|
var import_node_crypto14, import_promises37, import_miniflare26, LocalRuntimeController;
|
@@ -177606,7 +177699,8 @@ unstable_dev()'s behaviour will likely change in future releases`
|
|
177606
177699
|
enableIpc: options?.experimental?.enableIpc,
|
177607
177700
|
nodeCompat: void 0,
|
177608
177701
|
enableContainers: options?.experimental?.enableContainers ?? false,
|
177609
|
-
dockerPath: options?.experimental?.dockerPath ?? getDockerPath()
|
177702
|
+
dockerPath: options?.experimental?.dockerPath ?? getDockerPath(),
|
177703
|
+
containerEngine: options?.experimental?.containerEngine ?? getDockerHost()
|
177610
177704
|
};
|
177611
177705
|
const devServer = await run(
|
177612
177706
|
{
|