wrangler 3.81.0 → 3.83.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.
@@ -1016,6 +1016,14 @@
1016
1016
  "description": "Whether we use <name>.<subdomain>.workers.dev to test and deploy your Worker.\n\n// Carmen according to our tests the default is undefined // warning: you must force \"workers_dev: true\" in tests to match expected behavior",
1017
1017
  "type": "boolean"
1018
1018
  },
1019
+ "workflows": {
1020
+ "default": "`[]`",
1021
+ "description": "A list of workflows that your Worker should be bound to.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
1022
+ "items": {
1023
+ "$ref": "#/definitions/WorkflowBinding"
1024
+ },
1025
+ "type": "array"
1026
+ },
1019
1027
  "zone_id": {
1020
1028
  "description": "TODO: remove this as it has been deprecated.\n\nThis is just here for now because the `route` commands use it. So we need to include it in this type so it is available.",
1021
1029
  "type": "string"
@@ -1045,7 +1053,8 @@
1045
1053
  "triggers",
1046
1054
  "unsafe",
1047
1055
  "vars",
1048
- "vectorize"
1056
+ "vectorize",
1057
+ "workflows"
1049
1058
  ],
1050
1059
  "type": "object"
1051
1060
  },
@@ -2070,6 +2079,14 @@
2070
2079
  "description": "Whether we use <name>.<subdomain>.workers.dev to test and deploy your Worker.\n\n// Carmen according to our tests the default is undefined // warning: you must force \"workers_dev: true\" in tests to match expected behavior",
2071
2080
  "type": "boolean"
2072
2081
  },
2082
+ "workflows": {
2083
+ "default": "`[]`",
2084
+ "description": "A list of workflows that your Worker should be bound to.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
2085
+ "items": {
2086
+ "$ref": "#/definitions/WorkflowBinding"
2087
+ },
2088
+ "type": "array"
2089
+ },
2073
2090
  "zone_id": {
2074
2091
  "description": "TODO: remove this as it has been deprecated.\n\nThis is just here for now because the `route` commands use it. So we need to include it in this type so it is available.",
2075
2092
  "type": "string"
@@ -2945,6 +2962,14 @@
2945
2962
  "description": "Whether we use <name>.<subdomain>.workers.dev to test and deploy your Worker.\n\n// Carmen according to our tests the default is undefined // warning: you must force \"workers_dev: true\" in tests to match expected behavior",
2946
2963
  "type": "boolean"
2947
2964
  },
2965
+ "workflows": {
2966
+ "default": "`[]`",
2967
+ "description": "A list of workflows that your Worker should be bound to.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
2968
+ "items": {
2969
+ "$ref": "#/definitions/WorkflowBinding"
2970
+ },
2971
+ "type": "array"
2972
+ },
2948
2973
  "zone_id": {
2949
2974
  "description": "TODO: remove this as it has been deprecated.\n\nThis is just here for now because the `route` commands use it. So we need to include it in this type so it is available.",
2950
2975
  "type": "string"
@@ -3032,6 +3057,33 @@
3032
3057
  ],
3033
3058
  "type": "object"
3034
3059
  },
3060
+ "WorkflowBinding": {
3061
+ "additionalProperties": false,
3062
+ "properties": {
3063
+ "binding": {
3064
+ "description": "The name of the binding used to refer to the Workflow",
3065
+ "type": "string"
3066
+ },
3067
+ "class_name": {
3068
+ "description": "The exported class name of the Workflow",
3069
+ "type": "string"
3070
+ },
3071
+ "name": {
3072
+ "description": "The name of the Workflow",
3073
+ "type": "string"
3074
+ },
3075
+ "script_name": {
3076
+ "description": "The script where the Workflow is defined (if it's external to this Worker)",
3077
+ "type": "string"
3078
+ }
3079
+ },
3080
+ "required": [
3081
+ "binding",
3082
+ "name",
3083
+ "class_name"
3084
+ ],
3085
+ "type": "object"
3086
+ },
3035
3087
  "ZoneIdRoute": {
3036
3088
  "additionalProperties": false,
3037
3089
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wrangler",
3
- "version": "3.81.0",
3
+ "version": "3.83.0",
4
4
  "description": "Command-line interface for all things Cloudflare Workers",
5
5
  "keywords": [
6
6
  "wrangler",
@@ -54,23 +54,25 @@
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": "^4.1.0",
57
58
  "esbuild": "0.17.19",
59
+ "itty-time": "^1.0.6",
58
60
  "nanoid": "^3.3.3",
59
61
  "path-to-regexp": "^6.3.0",
60
62
  "resolve": "^1.22.8",
61
63
  "resolve.exports": "^2.0.2",
62
64
  "selfsigned": "^2.0.1",
63
65
  "source-map": "^0.6.1",
64
- "unenv": "npm:unenv-nightly@2.0.0-20241009-125958-e8ea22f",
65
- "workerd": "1.20241011.1",
66
+ "unenv": "npm:unenv-nightly@2.0.0-20241018-011344-e666fcf",
67
+ "workerd": "1.20241022.0",
66
68
  "xxhash-wasm": "^1.0.1",
67
69
  "@cloudflare/kv-asset-handler": "0.3.4",
68
- "@cloudflare/workers-shared": "0.6.0",
69
- "miniflare": "3.20241011.0"
70
+ "@cloudflare/workers-shared": "0.7.0",
71
+ "miniflare": "3.20241022.0"
70
72
  },
71
73
  "devDependencies": {
72
74
  "@cloudflare/types": "6.18.4",
73
- "@cloudflare/workers-types": "^4.20241011.0",
75
+ "@cloudflare/workers-types": "^4.20241022.0",
74
76
  "@cspotcode/source-map-support": "0.8.1",
75
77
  "@iarna/toml": "^3.0.0",
76
78
  "@microsoft/api-extractor": "^7.47.0",
@@ -152,12 +154,12 @@
152
154
  "yargs": "^17.7.2",
153
155
  "yoga-layout": "file:../../vendor/yoga-layout-2.0.0-beta.1.tgz",
154
156
  "@cloudflare/cli": "1.1.1",
157
+ "@cloudflare/pages-shared": "^0.11.67",
155
158
  "@cloudflare/eslint-config-worker": "1.1.0",
156
- "@cloudflare/pages-shared": "^0.11.65",
157
159
  "@cloudflare/workers-tsconfig": "0.0.0"
158
160
  },
159
161
  "peerDependencies": {
160
- "@cloudflare/workers-types": "^4.20241011.0"
162
+ "@cloudflare/workers-types": "^4.20241022.0"
161
163
  },
162
164
  "peerDependenciesMeta": {
163
165
  "@cloudflare/workers-types": {
@@ -137,7 +137,7 @@ declare type Binding = {
137
137
  type: "kv_namespace";
138
138
  } & BindingOmit<CfKvNamespace>) | ({
139
139
  type: "send_email";
140
- } & BindingOmit<CfSendEmailBindings>) | {
140
+ } & NameOmit<CfSendEmailBindings>) | {
141
141
  type: "wasm_module";
142
142
  source: BinaryFile;
143
143
  } | {
@@ -154,7 +154,9 @@ declare type Binding = {
154
154
  source: BinaryFile;
155
155
  } | ({
156
156
  type: "durable_object_namespace";
157
- } & BindingOmit<CfDurableObject>) | ({
157
+ } & NameOmit<CfDurableObject>) | ({
158
+ type: "workflow";
159
+ } & BindingOmit<CfWorkflow>) | ({
158
160
  type: "queue";
159
161
  } & BindingOmit<CfQueue>) | ({
160
162
  type: "r2_bucket";
@@ -179,13 +181,13 @@ declare type Binding = {
179
181
  type: "pipeline";
180
182
  } & Omit<CfPipeline, "binding">) | ({
181
183
  type: "logfwdr";
182
- } & Omit<CfLogfwdrBinding, "name">) | {
184
+ } & NameOmit<CfLogfwdrBinding>) | {
183
185
  type: `unsafe_${string}`;
184
186
  } | {
185
187
  type: "assets";
186
188
  };
187
189
 
188
- declare type BindingOmit<T> = Omit<T, "binding" | "name">;
190
+ declare type BindingOmit<T> = Omit<T, "binding">;
189
191
 
190
192
  /**
191
193
  * Result of the `getBindingsProxy` utility
@@ -631,6 +633,13 @@ declare interface CfWorkerSourceMap {
631
633
  content: string | Buffer;
632
634
  }
633
635
 
636
+ declare interface CfWorkflow {
637
+ name: string;
638
+ class_name: string;
639
+ binding: string;
640
+ script_name?: string;
641
+ }
642
+
634
643
  /**
635
644
  * A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
636
645
  */
@@ -998,13 +1007,13 @@ declare function deploy({ directory, accountId, projectName, branch, skipCaching
998
1007
  };
999
1008
  latest_stage: {
1000
1009
  name: "queued" | "build" | "deploy" | "initialize" | "clone_repo";
1001
- status: "active" | "idle" | "canceled" | "success" | "failure" | "skipped";
1010
+ status: "active" | "idle" | "success" | "canceled" | "failure" | "skipped";
1002
1011
  started_on: string | null;
1003
1012
  ended_on: string | null;
1004
1013
  };
1005
1014
  stages: {
1006
1015
  name: "queued" | "build" | "deploy" | "initialize" | "clone_repo";
1007
- status: "active" | "idle" | "canceled" | "success" | "failure" | "skipped";
1016
+ status: "active" | "idle" | "success" | "canceled" | "failure" | "skipped";
1008
1017
  started_on: string | null;
1009
1018
  ended_on: string | null;
1010
1019
  }[];
@@ -1801,6 +1810,16 @@ declare interface EnvironmentNonInheritable {
1801
1810
  durable_objects: {
1802
1811
  bindings: DurableObjectBindings;
1803
1812
  };
1813
+ /**
1814
+ * A list of workflows that your Worker should be bound to.
1815
+ *
1816
+ * NOTE: This field is not automatically inherited from the top level environment,
1817
+ * and so must be specified in every named environment.
1818
+ *
1819
+ * @default `[]`
1820
+ * @nonInheritable
1821
+ */
1822
+ workflows: WorkflowBinding[];
1804
1823
  /**
1805
1824
  * Cloudchamber configuration
1806
1825
  *
@@ -2670,6 +2689,8 @@ declare class Logger {
2670
2689
  error: (...args: unknown[]) => void;
2671
2690
  table<Keys extends string>(data: TableRow<Keys>[]): void;
2672
2691
  console<M extends Exclude<keyof Console, "Console">>(method: M, ...args: Parameters<Console[M]>): void;
2692
+ static warnOnceHistory: Set<unknown>;
2693
+ warnOnce(message: string): void;
2673
2694
  private doLog;
2674
2695
  static registerBeforeLogHook(callback: (() => void) | undefined): void;
2675
2696
  static registerAfterLogHook(callback: (() => void) | undefined): void;
@@ -2886,6 +2907,8 @@ declare interface MultiCacheQueryOptions extends CacheQueryOptions {
2886
2907
  cacheName?: string
2887
2908
  }
2888
2909
 
2910
+ declare type NameOmit<T> = Omit<T, "name">;
2911
+
2889
2912
  declare interface Observability {
2890
2913
  /** If observability is enabled for this Worker */
2891
2914
  enabled: boolean;
@@ -26451,6 +26474,17 @@ declare type WorkerEntrypointsDefinition = Record<"default" | string, {
26451
26474
 
26452
26475
  declare type WorkerRegistry = Record<string, WorkerDefinition>;
26453
26476
 
26477
+ declare type WorkflowBinding = {
26478
+ /** The name of the binding used to refer to the Workflow */
26479
+ binding: string;
26480
+ /** The name of the Workflow */
26481
+ name: string;
26482
+ /** The exported class name of the Workflow */
26483
+ class_name: string;
26484
+ /** The script where the Workflow is defined (if it's external to this Worker) */
26485
+ script_name?: string;
26486
+ };
26487
+
26454
26488
  declare type ZoneIdRoute = {
26455
26489
  pattern: string;
26456
26490
  zone_id: string;