wrangler 3.72.3 → 3.74.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wrangler",
3
- "version": "3.72.3",
3
+ "version": "3.74.0",
4
4
  "description": "Command-line interface for all things Cloudflare Workers",
5
5
  "keywords": [
6
6
  "wrangler",
@@ -62,12 +62,12 @@
62
62
  "resolve.exports": "^2.0.2",
63
63
  "selfsigned": "^2.0.1",
64
64
  "source-map": "^0.6.1",
65
- "unenv": "npm:unenv-nightly@1.10.0-1717606461.a117952",
65
+ "unenv": "npm:unenv-nightly@2.0.0-1724863496.70db6f1",
66
66
  "workerd": "1.20240821.1",
67
67
  "xxhash-wasm": "^1.0.1",
68
+ "@cloudflare/workers-shared": "0.4.1",
68
69
  "@cloudflare/kv-asset-handler": "0.3.4",
69
- "@cloudflare/workers-shared": "0.4.0",
70
- "miniflare": "3.20240821.0"
70
+ "miniflare": "3.20240821.1"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@cloudflare/types": "^6.18.4",
@@ -154,7 +154,7 @@
154
154
  "yoga-layout": "file:../../vendor/yoga-layout-2.0.0-beta.1.tgz",
155
155
  "@cloudflare/eslint-config-worker": "1.1.0",
156
156
  "@cloudflare/cli": "1.1.1",
157
- "@cloudflare/pages-shared": "^0.11.53",
157
+ "@cloudflare/pages-shared": "^0.11.54",
158
158
  "@cloudflare/workers-tsconfig": "0.0.0"
159
159
  },
160
160
  "peerDependencies": {
@@ -9,7 +9,21 @@ const scheduled: Middleware = async (request, env, _ctx, middlewareCtx) => {
9
9
 
10
10
  return new Response("Ran scheduled event");
11
11
  }
12
- return middlewareCtx.next(request, env);
12
+
13
+ const resp = await middlewareCtx.next(request, env);
14
+
15
+ // If you open the `/__scheduled` page in a browser, the browser will automatically make a request to `/favicon.ico`.
16
+ // For scheduled Workers _without_ a fetch handler, this will result in a 500 response that clutters the log with unhelpful error messages.
17
+ // To avoid this, inject a 404 response to favicon.ico loads on the `/__scheduled` page
18
+ if (
19
+ request.headers.get("referer")?.endsWith("/__scheduled") &&
20
+ url.pathname === "/favicon.ico" &&
21
+ resp.status === 500
22
+ ) {
23
+ return new Response(null, { status: 404 });
24
+ }
25
+
26
+ return resp;
13
27
  };
14
28
 
15
29
  export default scheduled;
@@ -1409,8 +1409,6 @@ declare type Entry = {
1409
1409
  format: CfScriptFormat;
1410
1410
  /** The directory that contains all of a `--no-bundle` worker's modules. Usually `${directory}/src`. Defaults to path.dirname(file) */
1411
1411
  moduleRoot: string;
1412
- /** Whether this is a no-op worker that will not ultimately be uploaded e.g. for assets*/
1413
- staticAssetsOnly?: boolean;
1414
1412
  /**
1415
1413
  * A worker's name
1416
1414
  */
@@ -2278,6 +2276,10 @@ declare type ExperimentalAssets = {
2278
2276
  binding?: string;
2279
2277
  };
2280
2278
 
2279
+ declare interface ExperimentalAssetsOptions extends ExperimentalAssets {
2280
+ routingConfig: RoutingConfig;
2281
+ }
2282
+
2281
2283
  declare function fetch (
2282
2284
  input: RequestInfo,
2283
2285
  init?: RequestInit
@@ -25756,6 +25758,10 @@ declare namespace RetryHandler {
25756
25758
 
25757
25759
  declare type Route = SimpleRoute | ZoneIdRoute | ZoneNameRoute | CustomDomainRoute;
25758
25760
 
25761
+ declare type RoutingConfig = {
25762
+ hasUserWorker: boolean;
25763
+ };
25764
+
25759
25765
  /**
25760
25766
  * A bundling resolver rule, defining the modules type for paths that match the specified globs.
25761
25767
  */
@@ -25932,7 +25938,7 @@ declare interface StartDevWorkerInput {
25932
25938
  };
25933
25939
  unsafe?: Omit<CfUnsafe, "bindings">;
25934
25940
  experimental?: {
25935
- assets?: Omit<ExperimentalAssets, "bindings">;
25941
+ assets?: Omit<ExperimentalAssetsOptions, "bindings">;
25936
25942
  };
25937
25943
  }
25938
25944