wrangler 3.80.5 → 3.82.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.80.5",
3
+ "version": "3.82.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.20241018.1",
66
68
  "xxhash-wasm": "^1.0.1",
67
- "miniflare": "3.20241011.0",
68
69
  "@cloudflare/kv-asset-handler": "0.3.4",
70
+ "miniflare": "3.20241018.0",
69
71
  "@cloudflare/workers-shared": "0.6.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.20241018.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",
155
- "@cloudflare/pages-shared": "^0.11.65",
156
157
  "@cloudflare/eslint-config-worker": "1.1.0",
158
+ "@cloudflare/pages-shared": "^0.11.66",
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.20241018.0"
161
163
  },
162
164
  "peerDependenciesMeta": {
163
165
  "@cloudflare/workers-types": {
@@ -155,6 +155,8 @@ declare type Binding = {
155
155
  } | ({
156
156
  type: "durable_object_namespace";
157
157
  } & BindingOmit<CfDurableObject>) | ({
158
+ type: "workflow";
159
+ } & BindingOmit<CfWorkflow>) | ({
158
160
  type: "queue";
159
161
  } & BindingOmit<CfQueue>) | ({
160
162
  type: "r2_bucket";
@@ -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
  *
@@ -25967,7 +25986,7 @@ declare interface StartDevWorkerInput {
25967
25986
  /** Whether the worker runs on the edge or locally. */
25968
25987
  remote?: boolean;
25969
25988
  /** Cloudflare Account credentials. Can be provided upfront or as a function which will be called only when required. */
25970
- auth?: AsyncHook<CfAccount>;
25989
+ auth?: AsyncHook<CfAccount, [Pick<Config, "account_id">]>;
25971
25990
  /** Whether local storage (KV, Durable Objects, R2, D1, etc) is persisted. You can also specify the directory to persist data to. */
25972
25991
  persist?: string;
25973
25992
  /** Controls which logs are logged 🤙. */
@@ -26024,6 +26043,7 @@ declare type StartDevWorkerOptions = Omit<StartDevWorkerInput, "assets"> & {
26024
26043
  };
26025
26044
  dev: StartDevWorkerInput["dev"] & {
26026
26045
  persist: string;
26046
+ auth?: AsyncHook<CfAccount>;
26027
26047
  };
26028
26048
  entrypoint: string;
26029
26049
  assets?: AssetsOptions;
@@ -26450,6 +26470,17 @@ declare type WorkerEntrypointsDefinition = Record<"default" | string, {
26450
26470
 
26451
26471
  declare type WorkerRegistry = Record<string, WorkerDefinition>;
26452
26472
 
26473
+ declare type WorkflowBinding = {
26474
+ /** The name of the binding used to refer to the Workflow */
26475
+ binding: string;
26476
+ /** The name of the Workflow */
26477
+ name: string;
26478
+ /** The exported class name of the Workflow */
26479
+ class_name: string;
26480
+ /** The script where the Workflow is defined (if it's external to this Worker) */
26481
+ script_name?: string;
26482
+ };
26483
+
26453
26484
  declare type ZoneIdRoute = {
26454
26485
  pattern: string;
26455
26486
  zone_id: string;