wrangler 3.114.2 → 3.114.3

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.114.2",
3
+ "version": "3.114.3",
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
- "@cloudflare/kv-asset-handler": "0.3.4",
62
- "miniflare": "3.20250310.1"
61
+ "miniflare": "3.20250310.1",
62
+ "@cloudflare/kv-asset-handler": "0.3.4"
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/cli": "1.1.1",
141
140
  "@cloudflare/eslint-config-worker": "1.1.0",
142
- "@cloudflare/pages-shared": "^0.13.14",
143
- "@cloudflare/workers-shared": "0.15.0",
144
- "@cloudflare/workers-tsconfig": "0.0.0"
141
+ "@cloudflare/pages-shared": "0.13.14",
142
+ "@cloudflare/cli": "1.1.1",
143
+ "@cloudflare/workers-tsconfig": "0.0.0",
144
+ "@cloudflare/workers-shared": "0.15.0"
145
145
  },
146
146
  "peerDependencies": {
147
147
  "@cloudflare/workers-types": "^4.20250310.0"
@@ -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.2";
81453
+ var version = "3.114.3";
81454
81454
 
81455
81455
  // src/environment-variables/misc-variables.ts
81456
81456
  init_import_meta_url();
@@ -120035,8 +120035,39 @@ async function getEntry(args, config, command2) {
120035
120035
  "It looks like you've run a Workers-specific command in a Pages project.\nFor Pages, please run `wrangler pages dev` instead."
120036
120036
  );
120037
120037
  }
120038
+ const compatibilityDateStr = [
120039
+ (/* @__PURE__ */ new Date()).getFullYear(),
120040
+ ((/* @__PURE__ */ new Date()).getMonth() + 1 + "").padStart(2, "0"),
120041
+ ((/* @__PURE__ */ new Date()).getDate() + "").padStart(2, "0")
120042
+ ].join("-");
120043
+ const updateConfigMessage = /* @__PURE__ */ __name((snippet) => esm_default2`
120044
+ ${config.configPath ? `add the following to your "${configFileName(config.configPath)}" file:` : `create a "wrangler.jsonc" file containing:`}
120045
+
120046
+ \`\`\`
120047
+ ${formatConfigSnippet(
120048
+ {
120049
+ ...config.name ? {} : { name: "worker-name" },
120050
+ ...config.compatibility_date ? {} : { compatibility_date: compatibilityDateStr },
120051
+ ...snippet
120052
+ },
120053
+ config.configPath
120054
+ )}
120055
+ \`\`\`
120056
+
120057
+ `, "updateConfigMessage");
120058
+ const fullCommand = `${getNpxEquivalent()} wrangler ${command2}`;
120038
120059
  throw new UserError(
120039
- `Missing entry-point: The entry-point should be specified via the command line (e.g. \`wrangler ${command2} path/to/script\`) or the \`main\` config field.`
120060
+ esm_default2`
120061
+ Missing entry-point to Worker script or to assets directory
120062
+
120063
+ If there is code to deploy, you can either:
120064
+ - Specify an entry-point to your Worker script via the command line (ex: \`${fullCommand} src/index.ts\`)
120065
+ - Or ${updateConfigMessage({ main: "src/index.ts" })}
120066
+
120067
+ If are uploading a directory of assets, you can either:
120068
+ - Specify the path to the directory of assets via the command line: (ex: \`${fullCommand} --assets=./dist\`)
120069
+ - Or ${updateConfigMessage({ assets: { directory: "./dist" } })}`,
120070
+ { telemetryMessage: "missing worker entrypoint or assets directory" }
120040
120071
  );
120041
120072
  }
120042
120073
  await runCustomBuild(
@@ -120108,6 +120139,18 @@ function generateAddScriptNameExamples(localBindings) {
120108
120139
  }).join("\n");
120109
120140
  }
120110
120141
  __name(generateAddScriptNameExamples, "generateAddScriptNameExamples");
120142
+ function getNpxEquivalent() {
120143
+ switch (sniffUserAgent()) {
120144
+ case "pnpm":
120145
+ return "pnpm";
120146
+ case "yarn":
120147
+ return "yarn";
120148
+ case "npm":
120149
+ default:
120150
+ return "npx";
120151
+ }
120152
+ }
120153
+ __name(getNpxEquivalent, "getNpxEquivalent");
120111
120154
 
120112
120155
  // src/match-tag.ts
120113
120156
  init_import_meta_url();
@@ -127366,7 +127409,7 @@ var Handler14 = /* @__PURE__ */ __name(async (args) => {
127366
127409
  }
127367
127410
  if (args.env) {
127368
127411
  throw new FatalError(
127369
- "Pages does not support targeting an environment with the --env flag. Use the --branch flag to target your production or preview branch",
127412
+ "Pages does not support targeting an environment with the --env flag during local development.",
127370
127413
  1
127371
127414
  );
127372
127415
  }