wrangler 3.114.3 → 3.114.4
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 +1 -2
- package/package.json +7 -7
- package/wrangler-dist/cli.d.ts +2 -2
- package/wrangler-dist/cli.js +55 -24
package/config-schema.json
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "wrangler",
|
3
|
-
"version": "3.114.
|
3
|
+
"version": "3.114.4",
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
5
5
|
"keywords": [
|
6
6
|
"wrangler",
|
@@ -58,8 +58,8 @@
|
|
58
58
|
"path-to-regexp": "6.3.0",
|
59
59
|
"unenv": "2.0.0-rc.14",
|
60
60
|
"workerd": "1.20250310.0",
|
61
|
-
"
|
62
|
-
"
|
61
|
+
"@cloudflare/kv-asset-handler": "0.3.4",
|
62
|
+
"miniflare": "3.20250310.2"
|
63
63
|
},
|
64
64
|
"devDependencies": {
|
65
65
|
"@aws-sdk/client-s3": "^3.721.0",
|
@@ -137,11 +137,11 @@
|
|
137
137
|
"xdg-app-paths": "^8.3.0",
|
138
138
|
"xxhash-wasm": "^1.0.1",
|
139
139
|
"yargs": "^17.7.2",
|
140
|
-
"@cloudflare/eslint-config-worker": "1.1.0",
|
141
|
-
"@cloudflare/pages-shared": "0.13.14",
|
142
140
|
"@cloudflare/cli": "1.1.1",
|
143
|
-
"@cloudflare/
|
144
|
-
"@cloudflare/
|
141
|
+
"@cloudflare/eslint-config-worker": "1.1.0",
|
142
|
+
"@cloudflare/pages-shared": "0.13.15",
|
143
|
+
"@cloudflare/workers-shared": "0.15.0",
|
144
|
+
"@cloudflare/workers-tsconfig": "0.0.0"
|
145
145
|
},
|
146
146
|
"peerDependencies": {
|
147
147
|
"@cloudflare/workers-types": "^4.20250310.0"
|
package/wrangler-dist/cli.d.ts
CHANGED
@@ -680,7 +680,7 @@ declare interface CfModule {
|
|
680
680
|
/**
|
681
681
|
* A module type.
|
682
682
|
*/
|
683
|
-
declare type CfModuleType = "esm" | "commonjs" | "compiled-wasm" | "text" | "buffer" | "python" | "python-requirement"
|
683
|
+
declare type CfModuleType = "esm" | "commonjs" | "compiled-wasm" | "text" | "buffer" | "python" | "python-requirement";
|
684
684
|
|
685
685
|
declare interface CfMTlsCertificate {
|
686
686
|
binding: string;
|
@@ -1045,7 +1045,7 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
|
|
1045
1045
|
/**
|
1046
1046
|
* The possible types for a `Rule`.
|
1047
1047
|
*/
|
1048
|
-
declare type ConfigModuleRuleType = "ESModule" | "CommonJS" | "CompiledWasm" | "Text" | "Data" | "PythonModule" | "PythonRequirement"
|
1048
|
+
declare type ConfigModuleRuleType = "ESModule" | "CommonJS" | "CompiledWasm" | "Text" | "Data" | "PythonModule" | "PythonRequirement";
|
1049
1049
|
|
1050
1050
|
declare type ConfigUpdateEvent = {
|
1051
1051
|
type: "configUpdate";
|
package/wrangler-dist/cli.js
CHANGED
@@ -81450,7 +81450,7 @@ var import_undici3 = __toESM(require_undici());
|
|
81450
81450
|
|
81451
81451
|
// package.json
|
81452
81452
|
var name = "wrangler";
|
81453
|
-
var version = "3.114.
|
81453
|
+
var version = "3.114.4";
|
81454
81454
|
|
81455
81455
|
// src/environment-variables/misc-variables.ts
|
81456
81456
|
init_import_meta_url();
|
@@ -90767,11 +90767,14 @@ function hasCursor(result_info) {
|
|
90767
90767
|
}
|
90768
90768
|
__name(hasCursor, "hasCursor");
|
90769
90769
|
function renderError(err, level = 0) {
|
90770
|
+
const indent = " ".repeat(level);
|
90770
90771
|
const chainedMessages = err.error_chain?.map(
|
90771
90772
|
(chainedError) => `
|
90772
|
-
|
90773
|
+
|
90774
|
+
${indent}- ${renderError(chainedError, level + 1)}`
|
90773
90775
|
).join("\n") ?? "";
|
90774
|
-
return (err.code ? `${err.message} [code: ${err.code}]` : err.message) +
|
90776
|
+
return (err.code ? `${err.message} [code: ${err.code}]` : err.message) + (err.documentation_url ? `
|
90777
|
+
${indent}To learn more about this error, visit: ${err.documentation_url}` : "") + chainedMessages;
|
90775
90778
|
}
|
90776
90779
|
__name(renderError, "renderError");
|
90777
90780
|
|
@@ -92183,8 +92186,7 @@ var RuleTypeToModuleType = {
|
|
92183
92186
|
Data: "buffer",
|
92184
92187
|
Text: "text",
|
92185
92188
|
PythonModule: "python",
|
92186
|
-
PythonRequirement: "python-requirement"
|
92187
|
-
NodeJsCompatModule: "nodejs-compat-module"
|
92189
|
+
PythonRequirement: "python-requirement"
|
92188
92190
|
};
|
92189
92191
|
var ModuleTypeToRuleType = flipObject(RuleTypeToModuleType);
|
92190
92192
|
var modulesWatchRegexp = /^wrangler:modules-watch$/;
|
@@ -104382,8 +104384,7 @@ var moduleTypeMimeType = {
|
|
104382
104384
|
buffer: "application/octet-stream",
|
104383
104385
|
text: "text/plain",
|
104384
104386
|
python: "text/x-python",
|
104385
|
-
"python-requirement": "text/x-python-requirement"
|
104386
|
-
"nodejs-compat-module": void 0
|
104387
|
+
"python-requirement": "text/x-python-requirement"
|
104387
104388
|
};
|
104388
104389
|
function toMimeType(type) {
|
104389
104390
|
const mimeType = moduleTypeMimeType[type];
|
@@ -120083,12 +120084,7 @@ async function getEntry(args, config, command2) {
|
|
120083
120084
|
args.format ?? config.build?.upload?.format,
|
120084
120085
|
config.tsconfig
|
120085
120086
|
);
|
120086
|
-
const { localBindings
|
120087
|
-
if (command2 === "dev" && remoteBindings.length > 0) {
|
120088
|
-
logger.warn(
|
120089
|
-
"WARNING: You have Durable Object bindings that are not defined locally in the worker being developed.\nBe aware that changes to the data stored in these Durable Objects will be permanent and affect the live instances.\nRemote Durable Objects that are affected:\n" + remoteBindings.map((b6) => `- ${JSON.stringify(b6)}`).join("\n")
|
120090
|
-
);
|
120091
|
-
}
|
120087
|
+
const { localBindings } = partitionDurableObjectBindings(config);
|
120092
120088
|
if (format11 === "service-worker" && localBindings.length > 0) {
|
120093
120089
|
const errorMessage = "You seem to be trying to use Durable Objects in a Worker written as a service-worker.";
|
120094
120090
|
const addScriptName = `You can use Durable Objects defined in other Workers by specifying a \`script_name\` in your ${configFileName(config.configPath)} file, where \`script_name\` is the name of the Worker that implements that Durable Object. For example:`;
|
@@ -120117,7 +120113,7 @@ function partitionDurableObjectBindings(config) {
|
|
120117
120113
|
const localBindings = [];
|
120118
120114
|
const remoteBindings = [];
|
120119
120115
|
for (const binding of config.durable_objects.bindings) {
|
120120
|
-
if (binding.script_name === void 0) {
|
120116
|
+
if (binding.script_name === void 0 || binding.script_name === config.name) {
|
120121
120117
|
localBindings.push(binding);
|
120122
120118
|
} else {
|
120123
120119
|
remoteBindings.push(binding);
|
@@ -122456,6 +122452,31 @@ __name(handler6, "handler");
|
|
122456
122452
|
|
122457
122453
|
// src/hyperdrive/list.ts
|
122458
122454
|
init_import_meta_url();
|
122455
|
+
|
122456
|
+
// src/hyperdrive/shared.ts
|
122457
|
+
init_import_meta_url();
|
122458
|
+
function formatCachingOptions(cachingOptions) {
|
122459
|
+
switch (cachingOptions?.disabled) {
|
122460
|
+
case false: {
|
122461
|
+
if (cachingOptions.stale_while_revalidate === 0) {
|
122462
|
+
return `max_age: ${cachingOptions.max_age}, stale_while_revalidate: disabled`;
|
122463
|
+
} else {
|
122464
|
+
return `max_age: ${cachingOptions.max_age}, stale_while_revalidate: ${cachingOptions.stale_while_revalidate}`;
|
122465
|
+
}
|
122466
|
+
}
|
122467
|
+
case void 0: {
|
122468
|
+
return "enabled";
|
122469
|
+
}
|
122470
|
+
case true: {
|
122471
|
+
return "disabled";
|
122472
|
+
}
|
122473
|
+
default:
|
122474
|
+
return JSON.stringify(cachingOptions);
|
122475
|
+
}
|
122476
|
+
}
|
122477
|
+
__name(formatCachingOptions, "formatCachingOptions");
|
122478
|
+
|
122479
|
+
// src/hyperdrive/list.ts
|
122459
122480
|
function options7(yargs) {
|
122460
122481
|
return yargs;
|
122461
122482
|
}
|
@@ -122472,7 +122493,7 @@ async function handler7(args) {
|
|
122472
122493
|
host: database.origin.host ?? "",
|
122473
122494
|
port: database.origin.port?.toString() ?? "",
|
122474
122495
|
database: database.origin.database ?? "",
|
122475
|
-
caching:
|
122496
|
+
caching: formatCachingOptions(database.caching)
|
122476
122497
|
}))
|
122477
122498
|
);
|
122478
122499
|
}
|
@@ -128822,9 +128843,8 @@ var secretBulkCommand = createCommand({
|
|
128822
128843
|
logger.log(`\u2728 ${upsertBindings.length} secrets successfully uploaded`);
|
128823
128844
|
} catch (err) {
|
128824
128845
|
logger.log("");
|
128825
|
-
logger.log(
|
128826
|
-
|
128827
|
-
throw new Error(`\u{1F6A8} ${upsertBindings.length} secrets failed to upload`);
|
128846
|
+
logger.log(`\u{1F6A8} Secrets failed to upload`);
|
128847
|
+
throw err;
|
128828
128848
|
}
|
128829
128849
|
}
|
128830
128850
|
});
|
@@ -129057,11 +129077,8 @@ var secret = /* @__PURE__ */ __name((secretYargs, subHelp) => {
|
|
129057
129077
|
`\u2728 ${Object.keys(upsertBindings).length} secrets successfully uploaded`
|
129058
129078
|
);
|
129059
129079
|
} catch (err) {
|
129060
|
-
logger.log(
|
129061
|
-
|
129062
|
-
throw new FatalError(
|
129063
|
-
`\u{1F6A8} ${Object.keys(upsertBindings).length} secrets failed to upload`
|
129064
|
-
);
|
129080
|
+
logger.log(`\u{1F6A8} Secrets failed to upload`);
|
129081
|
+
throw err;
|
129065
129082
|
}
|
129066
129083
|
}
|
129067
129084
|
).command(
|
@@ -158071,13 +158088,26 @@ async function getPlatformProxy(options32 = {}) {
|
|
158071
158088
|
__name(getPlatformProxy, "getPlatformProxy");
|
158072
158089
|
async function getMiniflareOptionsFromConfig(rawConfig, env6, options32) {
|
158073
158090
|
const bindings = getBindings2(rawConfig, env6, true, {});
|
158091
|
+
if (rawConfig["durable_objects"]) {
|
158092
|
+
const { localBindings } = partitionDurableObjectBindings(rawConfig);
|
158093
|
+
if (localBindings.length > 0) {
|
158094
|
+
logger.warn(dedent2`
|
158095
|
+
You have defined bindings to the following internal Durable Objects:
|
158096
|
+
${localBindings.map((b6) => `- ${JSON.stringify(b6)}`).join("\n")}
|
158097
|
+
These will not work in local development, but they should work in production.
|
158098
|
+
|
158099
|
+
If you want to develop these locally, you can define your DO in a separate Worker, with a separate configuration file.
|
158100
|
+
For detailed instructions, refer to the Durable Objects section here: https://developers.cloudflare.com/workers/wrangler/api#supported-bindings
|
158101
|
+
`);
|
158102
|
+
}
|
158103
|
+
}
|
158074
158104
|
const workerDefinitions = await getBoundRegisteredWorkers({
|
158075
158105
|
name: rawConfig.name,
|
158076
158106
|
services: bindings.services,
|
158077
158107
|
durableObjects: rawConfig["durable_objects"]
|
158078
158108
|
});
|
158079
158109
|
const { bindingOptions, externalWorkers } = buildMiniflareBindingOptions({
|
158080
|
-
name:
|
158110
|
+
name: rawConfig.name,
|
158081
158111
|
bindings,
|
158082
158112
|
workerDefinitions,
|
158083
158113
|
queueConsumers: void 0,
|
@@ -158093,6 +158123,7 @@ async function getMiniflareOptionsFromConfig(rawConfig, env6, options32) {
|
|
158093
158123
|
{
|
158094
158124
|
script: "",
|
158095
158125
|
modules: true,
|
158126
|
+
name: rawConfig.name,
|
158096
158127
|
...bindingOptions,
|
158097
158128
|
serviceBindings: {
|
158098
158129
|
...serviceBindings,
|