wrangler 3.89.0 → 3.91.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/README.md +1 -1
- package/config-schema.json +19 -4
- package/package.json +5 -5
- package/wrangler-dist/cli.d.ts +25 -21
- package/wrangler-dist/cli.js +15788 -15458
- package/wrangler-dist/cli.js.map +7 -0
package/README.md
CHANGED
@@ -43,7 +43,7 @@ $ npm install wrangler --save-dev
|
|
43
43
|
|
44
44
|
## Configuration:
|
45
45
|
|
46
|
-
Wrangler is configured via a `wrangler.toml` file in the project root. When utilizing the `wrangler init` command, a `wrangler.toml` file will be created for you.
|
46
|
+
Wrangler is configured via a `wrangler.json` or `wrangler.toml` file in the project root. When utilizing the `wrangler init` command, a `wrangler.toml` file will be created for you.
|
47
47
|
|
48
48
|
Example:
|
49
49
|
|
package/config-schema.json
CHANGED
@@ -93,7 +93,7 @@
|
|
93
93
|
"properties": {
|
94
94
|
"dir": {
|
95
95
|
"deprecated": true,
|
96
|
-
"description": "The directory you wish to upload your Worker from, relative to the
|
96
|
+
"description": "The directory you wish to upload your Worker from, relative to the Wrangler configuration file.\n\nDefaults to the directory containing the Wrangler configuration file.",
|
97
97
|
"type": "string"
|
98
98
|
},
|
99
99
|
"format": {
|
@@ -655,6 +655,11 @@
|
|
655
655
|
"description": "Determines whether Wrangler will preserve bundled file names. Defaults to false. If left unset, files will be named using the pattern ${fileHash}-${basename}, for example, `34de60b44167af5c5a709e62a4e20c4f18c9e3b6-favicon.ico`.",
|
656
656
|
"type": "boolean"
|
657
657
|
},
|
658
|
+
"preview_urls": {
|
659
|
+
"default": "`true`",
|
660
|
+
"description": "Whether we use <version>-<name>.<subdomain>.workers.dev to serve Preview URLs for your Worker.",
|
661
|
+
"type": "boolean"
|
662
|
+
},
|
658
663
|
"queues": {
|
659
664
|
"additionalProperties": false,
|
660
665
|
"default": "`{consumers:[],producers:[]}`",
|
@@ -1440,7 +1445,7 @@
|
|
1440
1445
|
},
|
1441
1446
|
"keep_vars": {
|
1442
1447
|
"default": false,
|
1443
|
-
"description": "By default,
|
1448
|
+
"description": "By default, the Wrangler configuration file is the source of truth for your environment configuration, like a terraform file.\n\nIf you change your vars in the dashboard, wrangler *will* override/delete them on its next deploy.\n\nIf you want to keep your dashboard vars when wrangler deploys, set this field to true.",
|
1444
1449
|
"type": "boolean"
|
1445
1450
|
},
|
1446
1451
|
"kv-namespaces": {
|
@@ -1620,7 +1625,7 @@
|
|
1620
1625
|
"description": "Specify the observability behavior of the Worker."
|
1621
1626
|
},
|
1622
1627
|
"pages_build_output_dir": {
|
1623
|
-
"description": "The directory of static assets to serve.\n\nThe presence of this field in
|
1628
|
+
"description": "The directory of static assets to serve.\n\nThe presence of this field in a Wrangler configuration file indicates a Pages project, and will prompt the handling of the configuration file according to the Pages-specific validation rules.",
|
1624
1629
|
"type": "string"
|
1625
1630
|
},
|
1626
1631
|
"pipelines": {
|
@@ -1670,6 +1675,11 @@
|
|
1670
1675
|
"description": "Determines whether Wrangler will preserve bundled file names. Defaults to false. If left unset, files will be named using the pattern ${fileHash}-${basename}, for example, `34de60b44167af5c5a709e62a4e20c4f18c9e3b6-favicon.ico`.",
|
1671
1676
|
"type": "boolean"
|
1672
1677
|
},
|
1678
|
+
"preview_urls": {
|
1679
|
+
"default": "`true`",
|
1680
|
+
"description": "Whether we use <version>-<name>.<subdomain>.workers.dev to serve Preview URLs for your Worker.",
|
1681
|
+
"type": "boolean"
|
1682
|
+
},
|
1673
1683
|
"queues": {
|
1674
1684
|
"additionalProperties": false,
|
1675
1685
|
"default": "`{consumers:[],producers:[]}`",
|
@@ -1874,7 +1884,7 @@
|
|
1874
1884
|
"description": "The definition of a Worker Site, a feature that lets you upload static assets with your Worker.\n\nMore details at https://developers.cloudflare.com/workers/platform/sites",
|
1875
1885
|
"properties": {
|
1876
1886
|
"bucket": {
|
1877
|
-
"description": "The directory containing your static assets.\n\nIt must be a path relative to your
|
1887
|
+
"description": "The directory containing your static assets.\n\nIt must be a path relative to your Wrangler configuration file. Example: bucket = \"./public\"\n\nIf there is a `site` field then it must contain this `bucket` field.",
|
1878
1888
|
"type": "string"
|
1879
1889
|
},
|
1880
1890
|
"entry-point": {
|
@@ -2621,6 +2631,11 @@
|
|
2621
2631
|
"description": "Determines whether Wrangler will preserve bundled file names. Defaults to false. If left unset, files will be named using the pattern ${fileHash}-${basename}, for example, `34de60b44167af5c5a709e62a4e20c4f18c9e3b6-favicon.ico`.",
|
2622
2632
|
"type": "boolean"
|
2623
2633
|
},
|
2634
|
+
"preview_urls": {
|
2635
|
+
"default": "`true`",
|
2636
|
+
"description": "Whether we use <version>-<name>.<subdomain>.workers.dev to serve Preview URLs for your Worker.",
|
2637
|
+
"type": "boolean"
|
2638
|
+
},
|
2624
2639
|
"queues": {
|
2625
2640
|
"additionalProperties": false,
|
2626
2641
|
"default": "`{consumers:[],producers:[]}`",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "wrangler",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.91.0",
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
5
5
|
"keywords": [
|
6
6
|
"wrangler",
|
@@ -63,11 +63,11 @@
|
|
63
63
|
"resolve.exports": "^2.0.2",
|
64
64
|
"selfsigned": "^2.0.1",
|
65
65
|
"source-map": "^0.6.1",
|
66
|
-
"unenv": "npm:unenv-nightly@2.0.0-
|
66
|
+
"unenv": "npm:unenv-nightly@2.0.0-20241121-161142-806b5c0",
|
67
67
|
"workerd": "1.20241106.1",
|
68
68
|
"xxhash-wasm": "^1.0.1",
|
69
69
|
"@cloudflare/kv-asset-handler": "0.3.4",
|
70
|
-
"@cloudflare/workers-shared": "0.
|
70
|
+
"@cloudflare/workers-shared": "0.9.0",
|
71
71
|
"miniflare": "3.20241106.1"
|
72
72
|
},
|
73
73
|
"devDependencies": {
|
@@ -141,8 +141,8 @@
|
|
141
141
|
"yargs": "^17.7.2",
|
142
142
|
"@cloudflare/cli": "1.1.1",
|
143
143
|
"@cloudflare/pages-shared": "^0.11.69",
|
144
|
-
"@cloudflare/
|
145
|
-
"@cloudflare/
|
144
|
+
"@cloudflare/workers-tsconfig": "0.0.0",
|
145
|
+
"@cloudflare/eslint-config-worker": "1.1.0"
|
146
146
|
},
|
147
147
|
"peerDependencies": {
|
148
148
|
"@cloudflare/workers-types": "^4.20241106.0"
|
package/wrangler-dist/cli.d.ts
CHANGED
@@ -762,7 +762,7 @@ declare type CloudchamberConfig = {
|
|
762
762
|
/**
|
763
763
|
* This is the static type definition for the configuration object.
|
764
764
|
*
|
765
|
-
* It reflects a normalized and validated version of the configuration that you can write in
|
765
|
+
* It reflects a normalized and validated version of the configuration that you can write in a Wrangler configuration file,
|
766
766
|
* and optionally augment with arguments passed directly to wrangler.
|
767
767
|
*
|
768
768
|
* For more information about the configuration object, see the
|
@@ -773,7 +773,7 @@ declare type CloudchamberConfig = {
|
|
773
773
|
* - Fields that are only specified in `ConfigFields` and not `Environment` can only appear
|
774
774
|
* in the top level config and should not appear in any environments.
|
775
775
|
* - Fields that are specified in `PagesConfigFields` are only relevant for Pages projects
|
776
|
-
* - All top level fields in config and environments are optional in the
|
776
|
+
* - All top level fields in config and environments are optional in the Wrangler configuration file.
|
777
777
|
*
|
778
778
|
* Legend for the annotations:
|
779
779
|
*
|
@@ -826,7 +826,7 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
|
|
826
826
|
/**
|
827
827
|
* The directory containing your static assets.
|
828
828
|
*
|
829
|
-
* It must be a path relative to your
|
829
|
+
* It must be a path relative to your Wrangler configuration file.
|
830
830
|
* Example: bucket = "./public"
|
831
831
|
*
|
832
832
|
* If there is a `site` field then it must contain this `bucket` field.
|
@@ -904,7 +904,7 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
|
|
904
904
|
[key: string]: string;
|
905
905
|
} | undefined;
|
906
906
|
/**
|
907
|
-
* By default,
|
907
|
+
* By default, the Wrangler configuration file is the source of truth for your environment configuration, like a terraform file.
|
908
908
|
*
|
909
909
|
* If you change your vars in the dashboard, wrangler *will* override/delete them on its next deploy.
|
910
910
|
*
|
@@ -1056,9 +1056,9 @@ declare interface DeprecatedUpload {
|
|
1056
1056
|
format?: "modules" | "service-worker";
|
1057
1057
|
/**
|
1058
1058
|
* The directory you wish to upload your Worker from,
|
1059
|
-
* relative to the
|
1059
|
+
* relative to the Wrangler configuration file.
|
1060
1060
|
*
|
1061
|
-
* Defaults to the directory containing the
|
1061
|
+
* Defaults to the directory containing the Wrangler configuration file.
|
1062
1062
|
*
|
1063
1063
|
* @deprecated
|
1064
1064
|
*/
|
@@ -1468,7 +1468,7 @@ declare interface EnablePagesAssetsServiceBindingOptions {
|
|
1468
1468
|
declare type Entry = {
|
1469
1469
|
/** A worker's entrypoint */
|
1470
1470
|
file: string;
|
1471
|
-
/** A worker's directory. Usually where the
|
1471
|
+
/** A worker's directory. Usually where the Wrangler configuration file is located */
|
1472
1472
|
projectRoot: string;
|
1473
1473
|
/** Is this a module worker or a service worker? */
|
1474
1474
|
format: CfScriptFormat;
|
@@ -1572,6 +1572,14 @@ declare interface EnvironmentInheritable {
|
|
1572
1572
|
* @inheritable
|
1573
1573
|
*/
|
1574
1574
|
workers_dev: boolean | undefined;
|
1575
|
+
/**
|
1576
|
+
* Whether we use <version>-<name>.<subdomain>.workers.dev to
|
1577
|
+
* serve Preview URLs for your Worker.
|
1578
|
+
*
|
1579
|
+
* @default `true`
|
1580
|
+
* @inheritable
|
1581
|
+
*/
|
1582
|
+
preview_urls: boolean | undefined;
|
1575
1583
|
/**
|
1576
1584
|
* A list of routes that your Worker should be published to.
|
1577
1585
|
* Only one of `routes` or `route` is required.
|
@@ -2540,7 +2548,7 @@ declare class FormData_2 {
|
|
2540
2548
|
declare type FormDataEntryValue = string | File
|
2541
2549
|
|
2542
2550
|
/**
|
2543
|
-
* By reading from a
|
2551
|
+
* By reading from a Wrangler configuration file this function generates proxy binding objects that can be
|
2544
2552
|
* used to simulate the interaction with bindings during local development in a Node.js environment
|
2545
2553
|
*
|
2546
2554
|
* @deprecated use `getPlatformProxy` instead
|
@@ -2560,7 +2568,7 @@ declare function getGlobalDispatcher(): Dispatcher;
|
|
2560
2568
|
declare function getGlobalOrigin(): URL | undefined;
|
2561
2569
|
|
2562
2570
|
/**
|
2563
|
-
* By reading from a
|
2571
|
+
* By reading from a Wrangler configuration file this function generates proxy objects that can be
|
2564
2572
|
* used to simulate the interaction with the Cloudflare platform during local development
|
2565
2573
|
* in a Node.js environment
|
2566
2574
|
*
|
@@ -2580,19 +2588,12 @@ export declare type GetPlatformProxyOptions = {
|
|
2580
2588
|
/**
|
2581
2589
|
* The path to the config file to use.
|
2582
2590
|
* If no path is specified the default behavior is to search from the
|
2583
|
-
* current directory up the filesystem for a
|
2591
|
+
* current directory up the filesystem for a Wrangler configuration file to use.
|
2584
2592
|
*
|
2585
2593
|
* Note: this field is optional but if a path is specified it must
|
2586
2594
|
* point to a valid file on the filesystem
|
2587
2595
|
*/
|
2588
2596
|
configPath?: string;
|
2589
|
-
/**
|
2590
|
-
* Flag to indicate the utility to read a json config file (`wrangler.json`/`wrangler.jsonc`)
|
2591
|
-
* instead of the toml one (`wrangler.toml`)
|
2592
|
-
*
|
2593
|
-
* Note: this feature is experimental
|
2594
|
-
*/
|
2595
|
-
experimentalJsonConfig?: boolean;
|
2596
2597
|
/**
|
2597
2598
|
* Indicates if and where to persist the bindings data, if not present or `true` it defaults to the same location
|
2598
2599
|
* used by wrangler v3: `.wrangler/state/v3` (so that the same data can be easily used by the caller and wrangler).
|
@@ -2946,7 +2947,7 @@ declare interface PagesConfigFields {
|
|
2946
2947
|
/**
|
2947
2948
|
* The directory of static assets to serve.
|
2948
2949
|
*
|
2949
|
-
* The presence of this field in
|
2950
|
+
* The presence of this field in a Wrangler configuration file indicates a Pages project,
|
2950
2951
|
* and will prompt the handling of the configuration file according to the
|
2951
2952
|
* Pages-specific validation rules.
|
2952
2953
|
*/
|
@@ -2957,7 +2958,7 @@ declare interface PagesConfigFields {
|
|
2957
2958
|
/**
|
2958
2959
|
* The directory of static assets to serve.
|
2959
2960
|
*
|
2960
|
-
* The presence of this field in
|
2961
|
+
* The presence of this field in a Wrangler configuration file indicates a Pages project,
|
2961
2962
|
* and will prompt the handling of the configuration file according to the
|
2962
2963
|
* Pages-specific validation rules.
|
2963
2964
|
*/
|
@@ -25870,10 +25871,13 @@ declare type RoutingConfig = z.infer<typeof RoutingConfigSchema>;
|
|
25870
25871
|
|
25871
25872
|
declare const RoutingConfigSchema: z.ZodObject<{
|
25872
25873
|
has_user_worker: z.ZodOptional<z.ZodBoolean>;
|
25874
|
+
invoke_user_worker_ahead_of_assets: z.ZodOptional<z.ZodBoolean>;
|
25873
25875
|
}, "strip", z.ZodTypeAny, {
|
25874
25876
|
has_user_worker?: boolean;
|
25877
|
+
invoke_user_worker_ahead_of_assets?: boolean;
|
25875
25878
|
}, {
|
25876
25879
|
has_user_worker?: boolean;
|
25880
|
+
invoke_user_worker_ahead_of_assets?: boolean;
|
25877
25881
|
}>;
|
25878
25882
|
|
25879
25883
|
/**
|
@@ -25952,7 +25956,7 @@ declare interface StartDevWorkerInput {
|
|
25952
25956
|
name?: string;
|
25953
25957
|
/**
|
25954
25958
|
* The javascript or typescript entry-point of the worker.
|
25955
|
-
* This is the `main` property of a
|
25959
|
+
* This is the `main` property of a Wrangler configuration file.
|
25956
25960
|
* You can specify a file path or provide the contents directly.
|
25957
25961
|
*/
|
25958
25962
|
entrypoint?: string;
|
@@ -26058,7 +26062,7 @@ declare interface StartDevWorkerInput {
|
|
26058
26062
|
}
|
26059
26063
|
|
26060
26064
|
declare type StartDevWorkerOptions = Omit<StartDevWorkerInput, "assets"> & {
|
26061
|
-
/** A worker's directory. Usually where the
|
26065
|
+
/** A worker's directory. Usually where the Wrangler configuration file is located */
|
26062
26066
|
projectRoot: string;
|
26063
26067
|
build: StartDevWorkerInput["build"] & {
|
26064
26068
|
nodejsCompatMode: NodeJSCompatMode;
|