wrangler 3.34.0 → 3.34.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wrangler",
3
- "version": "3.34.0",
3
+ "version": "3.34.2",
4
4
  "description": "Command-line interface for all things Cloudflare Workers",
5
5
  "keywords": [
6
6
  "wrangler",
@@ -96,7 +96,7 @@
96
96
  "source-map": "0.6.1",
97
97
  "xxhash-wasm": "^1.0.1",
98
98
  "@cloudflare/kv-asset-handler": "0.3.1",
99
- "miniflare": "3.20240304.1"
99
+ "miniflare": "3.20240304.2"
100
100
  },
101
101
  "devDependencies": {
102
102
  "@cloudflare/ai": "^1.0.35",
@@ -187,7 +187,7 @@
187
187
  "yargs": "^17.7.2",
188
188
  "yoga-layout": "file:../../vendor/yoga-layout-2.0.0-beta.1.tgz",
189
189
  "@cloudflare/cli": "1.1.1",
190
- "@cloudflare/pages-shared": "^0.11.18",
190
+ "@cloudflare/pages-shared": "^0.11.19",
191
191
  "@cloudflare/workers-tsconfig": "0.0.0"
192
192
  },
193
193
  "optionalDependencies": {
@@ -119644,7 +119644,7 @@ var import_node_assert2 = __toESM(require("node:assert"));
119644
119644
  var import_undici3 = __toESM(require_undici());
119645
119645
 
119646
119646
  // package.json
119647
- var version = "3.34.0";
119647
+ var version = "3.34.2";
119648
119648
  var package_default = {
119649
119649
  name: "wrangler",
119650
119650
  version,
@@ -128771,7 +128771,8 @@ function createWorkerUploadForm(worker) {
128771
128771
  logpush,
128772
128772
  placement,
128773
128773
  tail_consumers,
128774
- limits
128774
+ limits,
128775
+ annotations
128775
128776
  } = worker;
128776
128777
  let { modules } = worker;
128777
128778
  const metadataBindings = [];
@@ -129027,7 +129028,8 @@ function createWorkerUploadForm(worker) {
129027
129028
  ...logpush !== void 0 && { logpush },
129028
129029
  ...placement && { placement },
129029
129030
  ...tail_consumers && { tail_consumers },
129030
- ...limits && { limits }
129031
+ ...limits && { limits },
129032
+ ...annotations && { annotations }
129031
129033
  };
129032
129034
  if (bindings.unsafe?.metadata !== void 0) {
129033
129035
  for (const key of Object.keys(bindings.unsafe.metadata)) {
@@ -162910,6 +162912,7 @@ async function versionsListHandler(args) {
162910
162912
  Message: version3.annotations?.["workers/message"] || BLANK_INPUT2
162911
162913
  });
162912
162914
  logRaw(formattedVersion);
162915
+ logRaw(``);
162913
162916
  }
162914
162917
  }
162915
162918
  __name(versionsListHandler, "versionsListHandler");
@@ -163061,7 +163064,7 @@ async function versionsUpload(props) {
163061
163064
  const { default_environment } = serviceMetaData;
163062
163065
  if (default_environment.script.last_deployed_from === "dash") {
163063
163066
  logger.warn(
163064
- `You are about to publish a Workers Service that was last published via the Cloudflare Dashboard.
163067
+ `You are about to upload a Worker Version that was last published via the Cloudflare Dashboard.
163065
163068
  Edits that have been made via the dashboard will be overridden by your local code and config.`
163066
163069
  );
163067
163070
  if (!await confirm("Would you like to continue?")) {
@@ -163069,8 +163072,8 @@ Edits that have been made via the dashboard will be overridden by your local cod
163069
163072
  }
163070
163073
  } else if (default_environment.script.last_deployed_from === "api") {
163071
163074
  logger.warn(
163072
- `You are about to publish a Workers Service that was last updated via the script API.
163073
- Edits that have been made via the script API will be overridden by your local code and config.`
163075
+ `You are about to upload a Workers Version that was last updated via the API.
163076
+ Edits that have been made via the API will be overridden by your local code and config.`
163074
163077
  );
163075
163078
  if (!await confirm("Would you like to continue?")) {
163076
163079
  return;
@@ -163084,7 +163087,7 @@ Edits that have been made via the script API will be overridden by your local co
163084
163087
  }
163085
163088
  if (!(props.compatibilityDate || config.compatibility_date)) {
163086
163089
  const compatibilityDateStr = `${(/* @__PURE__ */ new Date()).getFullYear()}-${((/* @__PURE__ */ new Date()).getMonth() + 1 + "").padStart(2, "0")}-${((/* @__PURE__ */ new Date()).getDate() + "").padStart(2, "0")}`;
163087
- throw new UserError(`A compatibility_date is required when publishing. Add the following to your wrangler.toml file:.
163090
+ throw new UserError(`A compatibility_date is required when uploading a Worker Version. Add the following to your wrangler.toml file:.
163088
163091
  \`\`\`
163089
163092
  compatibility_date = "${compatibilityDateStr}"
163090
163093
  \`\`\`
@@ -163093,7 +163096,6 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
163093
163096
  }
163094
163097
  const jsxFactory = props.jsxFactory || config.jsx_factory;
163095
163098
  const jsxFragment = props.jsxFragment || config.jsx_fragment;
163096
- const keepVars = props.keepVars || config.keep_vars;
163097
163099
  const minify = props.minify ?? config.minify;
163098
163100
  const legacyNodeCompat = props.nodeCompat ?? config.node_compat;
163099
163101
  if (legacyNodeCompat) {
@@ -163121,7 +163123,7 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
163121
163123
  const scriptName = props.name;
163122
163124
  if (!scriptName) {
163123
163125
  throw new UserError(
163124
- 'You need to provide a name when publishing a worker. Either pass it as a cli arg with `--name <name>` or in your config file as `name = "<name>"`'
163126
+ 'You need to provide a name when uploading a Worker Version. Either pass it as a cli arg with `--name <name>` or in your config file as `name = "<name>"`'
163125
163127
  );
163126
163128
  }
163127
163129
  if (config.site && !config.site.bucket) {
@@ -163273,11 +163275,15 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
163273
163275
  compatibility_date: props.compatibilityDate ?? config.compatibility_date,
163274
163276
  compatibility_flags: compatibilityFlags,
163275
163277
  usage_model: config.usage_model,
163276
- keepVars,
163278
+ keepVars: false,
163277
163279
  logpush: void 0,
163278
163280
  placement,
163279
163281
  tail_consumers: config.tail_consumers,
163280
- limits: config.limits
163282
+ limits: config.limits,
163283
+ annotations: {
163284
+ "workers/message": props.message,
163285
+ "workers/tag": props.tag
163286
+ }
163281
163287
  };
163282
163288
  const bundleSizePromise = printBundleSize(
163283
163289
  { name: import_node_path46.default.basename(resolvedEntryPointPath), content },
@@ -163303,14 +163309,6 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
163303
163309
  await ensureQueuesExist(config);
163304
163310
  try {
163305
163311
  const body = createWorkerUploadForm(worker);
163306
- body.set(
163307
- "annotations",
163308
- JSON.stringify({
163309
- "workers/message": props.message,
163310
- "workers/tag": props.tag,
163311
- "workers/triggered_by": "wrangler"
163312
- })
163313
- );
163314
163312
  const result = await fetchResult(
163315
163313
  workerUrl,
163316
163314
  {
@@ -163558,10 +163556,6 @@ function versionsUploadOptions(yargs) {
163558
163556
  }).option("dry-run", {
163559
163557
  describe: "Don't actually deploy",
163560
163558
  type: "boolean"
163561
- }).option("keep-vars", {
163562
- describe: "Stop wrangler from deleting vars that are not present in the wrangler.toml\nBy default Wrangler will remove all vars and replace them with those found in the wrangler.toml configuration.\nIf your development approach is to modify vars after deployment via the dashboard you may wish to set this flag.",
163563
- default: false,
163564
- type: "boolean"
163565
163559
  }).option("tag", {
163566
163560
  describe: "A tag for this Worker Gradual Rollouts Version",
163567
163561
  type: "string",
@@ -163618,7 +163612,7 @@ async function versionsUploadHandler(args) {
163618
163612
  outDir: args.outdir,
163619
163613
  dryRun: args.dryRun,
163620
163614
  noBundle: !(args.bundle ?? !config.no_bundle),
163621
- keepVars: args.keepVars,
163615
+ keepVars: false,
163622
163616
  projectRoot,
163623
163617
  tag: args.tag,
163624
163618
  message: args.message