wrangler 3.78.8 → 3.78.9

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.
@@ -2,6 +2,39 @@
2
2
  "$ref": "#/definitions/RawConfig",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "definitions": {
5
+ "Assets": {
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "binding": {
9
+ "type": "string"
10
+ },
11
+ "directory": {
12
+ "description": "Absolute path to assets directory",
13
+ "type": "string"
14
+ },
15
+ "html_handling": {
16
+ "enum": [
17
+ "auto-trailing-slash",
18
+ "force-trailing-slash",
19
+ "drop-trailing-slash",
20
+ "none"
21
+ ],
22
+ "type": "string"
23
+ },
24
+ "not_found_handling": {
25
+ "enum": [
26
+ "single-page-application",
27
+ "404-page",
28
+ "none"
29
+ ],
30
+ "type": "string"
31
+ }
32
+ },
33
+ "required": [
34
+ "directory"
35
+ ],
36
+ "type": "object"
37
+ },
5
38
  "CloudchamberConfig": {
6
39
  "additionalProperties": false,
7
40
  "description": "Configuration in wrangler for Cloudchamber",
@@ -239,6 +272,10 @@
239
272
  },
240
273
  "type": "array"
241
274
  },
275
+ "assets": {
276
+ "$ref": "#/definitions/Assets",
277
+ "description": "Specify the directory of static assets to deploy/serve\n\nMore details at https://developers.cloudflare.com/workers/frameworks/"
278
+ },
242
279
  "base_dir": {
243
280
  "description": "The directory in which module rules should be evaluated when including additional files into a Worker deployment. This defaults to the directory containing the `main` entry point of the Worker if not specified.",
244
281
  "type": "string"
@@ -404,10 +441,6 @@
404
441
  ],
405
442
  "type": "object"
406
443
  },
407
- "experimental_assets": {
408
- "$ref": "#/definitions/ExperimentalAssets",
409
- "description": "Specify the directory of static assets to deploy/serve"
410
- },
411
444
  "find_additional_modules": {
412
445
  "description": "If true then Wrangler will traverse the file tree below `base_dir`; Any files that match `rules` will be included in the deployed Worker. Defaults to true if `no_bundle` is true, otherwise false.",
413
446
  "type": "boolean"
@@ -1016,39 +1049,6 @@
1016
1049
  ],
1017
1050
  "type": "object"
1018
1051
  },
1019
- "ExperimentalAssets": {
1020
- "additionalProperties": false,
1021
- "properties": {
1022
- "binding": {
1023
- "type": "string"
1024
- },
1025
- "directory": {
1026
- "description": "Absolute path to assets directory",
1027
- "type": "string"
1028
- },
1029
- "html_handling": {
1030
- "enum": [
1031
- "auto-trailing-slash",
1032
- "force-trailing-slash",
1033
- "drop-trailing-slash",
1034
- "none"
1035
- ],
1036
- "type": "string"
1037
- },
1038
- "not_found_handling": {
1039
- "enum": [
1040
- "single-page-application",
1041
- "404-page",
1042
- "none"
1043
- ],
1044
- "type": "string"
1045
- }
1046
- },
1047
- "required": [
1048
- "directory"
1049
- ],
1050
- "type": "object"
1051
- },
1052
1052
  "Json": {
1053
1053
  "anyOf": [
1054
1054
  {
@@ -1145,45 +1145,8 @@
1145
1145
  "type": "array"
1146
1146
  },
1147
1147
  "assets": {
1148
- "anyOf": [
1149
- {
1150
- "additionalProperties": false,
1151
- "properties": {
1152
- "browser_TTL": {
1153
- "type": "number"
1154
- },
1155
- "bucket": {
1156
- "type": "string"
1157
- },
1158
- "exclude": {
1159
- "items": {
1160
- "type": "string"
1161
- },
1162
- "type": "array"
1163
- },
1164
- "include": {
1165
- "items": {
1166
- "type": "string"
1167
- },
1168
- "type": "array"
1169
- },
1170
- "serve_single_page_app": {
1171
- "type": "boolean"
1172
- }
1173
- },
1174
- "required": [
1175
- "bucket",
1176
- "include",
1177
- "exclude",
1178
- "serve_single_page_app"
1179
- ],
1180
- "type": "object"
1181
- },
1182
- {
1183
- "type": "string"
1184
- }
1185
- ],
1186
- "description": "Serve a folder of static assets with your Worker, without any additional code. This can either be a string, or an object with additional config fields. Only one of assets and legacy_assets can be used."
1148
+ "$ref": "#/definitions/Assets",
1149
+ "description": "Specify the directory of static assets to deploy/serve\n\nMore details at https://developers.cloudflare.com/workers/frameworks/"
1187
1150
  },
1188
1151
  "base_dir": {
1189
1152
  "description": "The directory in which module rules should be evaluated when including additional files into a Worker deployment. This defaults to the directory containing the `main` entry point of the Worker if not specified.",
@@ -1372,10 +1335,6 @@
1372
1335
  "description": "The `env` section defines overrides for the configuration for different environments.\n\nAll environment fields can be specified at the top level of the config indicating the default environment settings.\n\n- Some fields are inherited and overridable in each environment.\n- But some are not inherited and must be explicitly specified in every environment, if they are specified at the top level.\n\nFor more information, see the documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration#environments",
1373
1336
  "type": "object"
1374
1337
  },
1375
- "experimental_assets": {
1376
- "$ref": "#/definitions/ExperimentalAssets",
1377
- "description": "Specify the directory of static assets to deploy/serve"
1378
- },
1379
1338
  "experimental_services": {
1380
1339
  "default": "`[]`",
1381
1340
  "deprecated": "DO NOT USE. We'd added this to test the new service binding system, but the proper way to test experimental features is to use `unsafe.bindings` configuration.",
@@ -1526,7 +1485,7 @@
1526
1485
  "type": "string"
1527
1486
  }
1528
1487
  ],
1529
- "description": "Serve a folder of static assets with your Worker, without any additional code. This can either be a string, or an object with additional config fields. Only one of assets and legacy_assets can be used."
1488
+ "description": "Old behaviour of serving a folder of static assets with your Worker, without any additional code. This can either be a string, or an object with additional config fields. Will be deprecated in the near future in favor of `assets`."
1530
1489
  },
1531
1490
  "legacy_env": {
1532
1491
  "description": "A boolean to enable \"legacy\" style wrangler environments (from Wrangler v1). These have been superseded by Services, but there may be projects that won't (or can't) use them. If you're using a legacy environment, you can set this to `true` to enable it.",
@@ -2208,6 +2167,10 @@
2208
2167
  },
2209
2168
  "type": "array"
2210
2169
  },
2170
+ "assets": {
2171
+ "$ref": "#/definitions/Assets",
2172
+ "description": "Specify the directory of static assets to deploy/serve\n\nMore details at https://developers.cloudflare.com/workers/frameworks/"
2173
+ },
2211
2174
  "base_dir": {
2212
2175
  "description": "The directory in which module rules should be evaluated when including additional files into a Worker deployment. This defaults to the directory containing the `main` entry point of the Worker if not specified.",
2213
2176
  "type": "string"
@@ -2373,10 +2336,6 @@
2373
2336
  ],
2374
2337
  "type": "object"
2375
2338
  },
2376
- "experimental_assets": {
2377
- "$ref": "#/definitions/ExperimentalAssets",
2378
- "description": "Specify the directory of static assets to deploy/serve"
2379
- },
2380
2339
  "experimental_services": {
2381
2340
  "default": "`[]`",
2382
2341
  "deprecated": "DO NOT USE. We'd added this to test the new service binding system, but the proper way to test experimental features is to use `unsafe.bindings` configuration.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wrangler",
3
- "version": "3.78.8",
3
+ "version": "3.78.9",
4
4
  "description": "Command-line interface for all things Cloudflare Workers",
5
5
  "keywords": [
6
6
  "wrangler",
@@ -54,7 +54,6 @@
54
54
  "@esbuild-plugins/node-modules-polyfill": "^0.2.2",
55
55
  "blake3-wasm": "^2.1.5",
56
56
  "chokidar": "^3.5.3",
57
- "date-fns": "^3.6.0",
58
57
  "esbuild": "0.17.19",
59
58
  "nanoid": "^3.3.3",
60
59
  "path-to-regexp": "^6.3.0",
@@ -152,9 +151,9 @@
152
151
  "xdg-app-paths": "^8.3.0",
153
152
  "yargs": "^17.7.2",
154
153
  "yoga-layout": "file:../../vendor/yoga-layout-2.0.0-beta.1.tgz",
154
+ "@cloudflare/eslint-config-worker": "1.1.0",
155
155
  "@cloudflare/cli": "1.1.1",
156
156
  "@cloudflare/pages-shared": "^0.11.61",
157
- "@cloudflare/eslint-config-worker": "1.1.0",
158
157
  "@cloudflare/workers-tsconfig": "0.0.0"
159
158
  },
160
159
  "peerDependencies": {
@@ -86,6 +86,19 @@ declare const AssetConfigSchema: z.ZodObject<{
86
86
  not_found_handling?: "none" | "single-page-application" | "404-page";
87
87
  }>;
88
88
 
89
+ declare type Assets = {
90
+ /** Absolute path to assets directory */
91
+ directory: string;
92
+ binding?: string;
93
+ html_handling?: "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | "none";
94
+ not_found_handling?: "single-page-application" | "404-page" | "none";
95
+ };
96
+
97
+ declare type AssetsOptions = Pick<Assets, "directory" | "binding"> & {
98
+ routingConfig: RoutingConfig;
99
+ assetConfig: AssetConfig;
100
+ };
101
+
89
102
  declare type AsyncHook<T extends HookValues, Args extends unknown[] = []> = Hook<T, Args> | Hook<Promise<T>, Args>;
90
103
 
91
104
  declare class BalancedPool extends Dispatcher {
@@ -836,9 +849,11 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
836
849
  exclude?: string[];
837
850
  } | undefined;
838
851
  /**
839
- * Serve a folder of static assets with your Worker, without any additional code.
840
- * This can either be a string, or an object with additional config fields.
841
- * Only one of assets and legacy_assets can be used.
852
+ * Old behaviour of serving a folder of static assets with your Worker,
853
+ * without any additional code.
854
+ * This can either be a string, or an object with additional config
855
+ * fields.
856
+ * Will be deprecated in the near future in favor of `assets`.
842
857
  */
843
858
  legacy_assets: {
844
859
  bucket: string;
@@ -1729,9 +1744,11 @@ declare interface EnvironmentInheritable {
1729
1744
  /**
1730
1745
  * Specify the directory of static assets to deploy/serve
1731
1746
  *
1747
+ * More details at https://developers.cloudflare.com/workers/frameworks/
1748
+ *
1732
1749
  * @inheritable
1733
1750
  */
1734
- experimental_assets: ExperimentalAssets | undefined;
1751
+ assets: Assets | undefined;
1735
1752
  /**
1736
1753
  * Specify the observability behavior of the Worker.
1737
1754
  *
@@ -2321,19 +2338,6 @@ declare class ExecutionContext {
2321
2338
  passThroughOnException(): void;
2322
2339
  }
2323
2340
 
2324
- declare type ExperimentalAssets = {
2325
- /** Absolute path to assets directory */
2326
- directory: string;
2327
- binding?: string;
2328
- html_handling?: "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | "none";
2329
- not_found_handling?: "single-page-application" | "404-page" | "none";
2330
- };
2331
-
2332
- declare type ExperimentalAssetsOptions = Pick<ExperimentalAssets, "directory" | "binding"> & {
2333
- routingConfig: RoutingConfig;
2334
- assetConfig: AssetConfig;
2335
- };
2336
-
2337
2341
  declare function fetch (
2338
2342
  input: RequestInfo,
2339
2343
  init?: RequestInit
@@ -26006,9 +26010,7 @@ declare interface StartDevWorkerInput {
26006
26010
  enableServiceEnvironments?: boolean;
26007
26011
  };
26008
26012
  unsafe?: Omit<CfUnsafe, "bindings">;
26009
- experimental?: {
26010
- assets?: Omit<ExperimentalAssetsOptions, "bindings">;
26011
- };
26013
+ assets?: Omit<AssetsOptions, "bindings">;
26012
26014
  }
26013
26015
 
26014
26016
  declare type StartDevWorkerOptions = StartDevWorkerInput & {
@@ -26263,7 +26265,7 @@ export declare interface UnstableDevOptions {
26263
26265
  localProtocol?: "http" | "https";
26264
26266
  httpsKeyPath?: string;
26265
26267
  httpsCertPath?: string;
26266
- experimentalAssets?: string;
26268
+ assets?: string;
26267
26269
  legacyAssets?: string;
26268
26270
  site?: string;
26269
26271
  siteInclude?: string[];