wrangler 4.106.0 → 4.107.1
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/bin/wrangler.js +0 -1
- package/config-schema.json +198 -5
- package/package.json +13 -14
- package/wrangler-dist/cli.d.ts +84 -9
- package/wrangler-dist/cli.js +10558 -4534
- package/wrangler-dist/experimental-config.d.mts +128 -40
- package/wrangler-dist/experimental-config.d.mts.map +1 -1
- package/wrangler-dist/experimental-config.mjs +21 -5
- package/wrangler-dist/experimental-config.mjs.map +1 -1
- package/wrangler-dist/metafile-cjs.json +1 -1
package/bin/wrangler.js
CHANGED
|
@@ -25,7 +25,6 @@ Consider using a Node.js version manager such as https://volta.sh/ or https://gi
|
|
|
25
25
|
process.execPath,
|
|
26
26
|
[
|
|
27
27
|
"--no-warnings",
|
|
28
|
-
"--experimental-vm-modules",
|
|
29
28
|
...process.execArgv,
|
|
30
29
|
path.join(__dirname, "../wrangler-dist/cli.js"),
|
|
31
30
|
...process.argv.slice(2),
|
package/config-schema.json
CHANGED
|
@@ -113,6 +113,12 @@
|
|
|
113
113
|
"markdownDescription": "A list of migrations that should be uploaded with your Worker.\n\nThese define changes in your Durable Object declarations.\n\nMore details at https://developers.cloudflare.com/workers/learning/using-durable-objects#configuring-durable-object-classes-with-migrations",
|
|
114
114
|
"default": []
|
|
115
115
|
},
|
|
116
|
+
"exports": {
|
|
117
|
+
"$ref": "#/definitions/Exports",
|
|
118
|
+
"description": "Declarative exports configuration — a map of class name to export configuration.\n\nThe configuration of Durable Objects via `exports` is mutually exclusive with `migrations`.",
|
|
119
|
+
"markdownDescription": "Declarative exports configuration — a map of class name to export configuration.\n\nThe configuration of Durable Objects via `exports` is mutually exclusive with `migrations`.",
|
|
120
|
+
"default": {}
|
|
121
|
+
},
|
|
116
122
|
"triggers": {
|
|
117
123
|
"type": "object",
|
|
118
124
|
"properties": {
|
|
@@ -1825,6 +1831,12 @@
|
|
|
1825
1831
|
"markdownDescription": "A list of migrations that should be uploaded with your Worker.\n\nThese define changes in your Durable Object declarations.\n\nMore details at https://developers.cloudflare.com/workers/learning/using-durable-objects#configuring-durable-object-classes-with-migrations",
|
|
1826
1832
|
"default": []
|
|
1827
1833
|
},
|
|
1834
|
+
"exports": {
|
|
1835
|
+
"$ref": "#/definitions/Exports",
|
|
1836
|
+
"description": "Declarative exports configuration — a map of class name to export configuration.\n\nThe configuration of Durable Objects via `exports` is mutually exclusive with `migrations`.",
|
|
1837
|
+
"markdownDescription": "Declarative exports configuration — a map of class name to export configuration.\n\nThe configuration of Durable Objects via `exports` is mutually exclusive with `migrations`.",
|
|
1838
|
+
"default": {}
|
|
1839
|
+
},
|
|
1828
1840
|
"triggers": {
|
|
1829
1841
|
"type": "object",
|
|
1830
1842
|
"properties": {
|
|
@@ -3481,6 +3493,175 @@
|
|
|
3481
3493
|
"description": "Configuration in wrangler for Durable Object Migrations",
|
|
3482
3494
|
"markdownDescription": "Configuration in wrangler for Durable Object Migrations"
|
|
3483
3495
|
},
|
|
3496
|
+
"Exports": {
|
|
3497
|
+
"type": "object",
|
|
3498
|
+
"additionalProperties": {
|
|
3499
|
+
"$ref": "#/definitions/ConfiguredExport"
|
|
3500
|
+
},
|
|
3501
|
+
"description": "The declarative `exports` map keyed by export name. Durable Object exports are mutually exclusive with `migrations` at the wrangler config layer.",
|
|
3502
|
+
"markdownDescription": "The declarative `exports` map keyed by export name. Durable Object exports\nare mutually exclusive with `migrations` at the wrangler config layer."
|
|
3503
|
+
},
|
|
3504
|
+
"ConfiguredExport": {
|
|
3505
|
+
"anyOf": [
|
|
3506
|
+
{
|
|
3507
|
+
"$ref": "#/definitions/DurableObjectExport"
|
|
3508
|
+
},
|
|
3509
|
+
{
|
|
3510
|
+
"$ref": "#/definitions/WorkerEntrypointExport"
|
|
3511
|
+
}
|
|
3512
|
+
]
|
|
3513
|
+
},
|
|
3514
|
+
"DurableObjectExport": {
|
|
3515
|
+
"anyOf": [
|
|
3516
|
+
{
|
|
3517
|
+
"type": "object",
|
|
3518
|
+
"properties": {
|
|
3519
|
+
"type": {
|
|
3520
|
+
"type": "string",
|
|
3521
|
+
"const": "durable-object"
|
|
3522
|
+
},
|
|
3523
|
+
"state": {
|
|
3524
|
+
"type": "string",
|
|
3525
|
+
"const": "created"
|
|
3526
|
+
},
|
|
3527
|
+
"storage": {
|
|
3528
|
+
"$ref": "#/definitions/DurableObjectExportStorage"
|
|
3529
|
+
}
|
|
3530
|
+
},
|
|
3531
|
+
"required": [
|
|
3532
|
+
"type",
|
|
3533
|
+
"storage"
|
|
3534
|
+
],
|
|
3535
|
+
"additionalProperties": false
|
|
3536
|
+
},
|
|
3537
|
+
{
|
|
3538
|
+
"type": "object",
|
|
3539
|
+
"properties": {
|
|
3540
|
+
"type": {
|
|
3541
|
+
"type": "string",
|
|
3542
|
+
"const": "durable-object"
|
|
3543
|
+
},
|
|
3544
|
+
"state": {
|
|
3545
|
+
"type": "string",
|
|
3546
|
+
"const": "deleted"
|
|
3547
|
+
}
|
|
3548
|
+
},
|
|
3549
|
+
"required": [
|
|
3550
|
+
"type",
|
|
3551
|
+
"state"
|
|
3552
|
+
],
|
|
3553
|
+
"additionalProperties": false
|
|
3554
|
+
},
|
|
3555
|
+
{
|
|
3556
|
+
"type": "object",
|
|
3557
|
+
"properties": {
|
|
3558
|
+
"type": {
|
|
3559
|
+
"type": "string",
|
|
3560
|
+
"const": "durable-object"
|
|
3561
|
+
},
|
|
3562
|
+
"state": {
|
|
3563
|
+
"type": "string",
|
|
3564
|
+
"const": "renamed"
|
|
3565
|
+
},
|
|
3566
|
+
"renamed_to": {
|
|
3567
|
+
"type": "string"
|
|
3568
|
+
}
|
|
3569
|
+
},
|
|
3570
|
+
"required": [
|
|
3571
|
+
"type",
|
|
3572
|
+
"state",
|
|
3573
|
+
"renamed_to"
|
|
3574
|
+
],
|
|
3575
|
+
"additionalProperties": false
|
|
3576
|
+
},
|
|
3577
|
+
{
|
|
3578
|
+
"type": "object",
|
|
3579
|
+
"properties": {
|
|
3580
|
+
"type": {
|
|
3581
|
+
"type": "string",
|
|
3582
|
+
"const": "durable-object"
|
|
3583
|
+
},
|
|
3584
|
+
"state": {
|
|
3585
|
+
"type": "string",
|
|
3586
|
+
"const": "transferred"
|
|
3587
|
+
},
|
|
3588
|
+
"transferred_to": {
|
|
3589
|
+
"type": "string"
|
|
3590
|
+
}
|
|
3591
|
+
},
|
|
3592
|
+
"required": [
|
|
3593
|
+
"type",
|
|
3594
|
+
"state",
|
|
3595
|
+
"transferred_to"
|
|
3596
|
+
],
|
|
3597
|
+
"additionalProperties": false
|
|
3598
|
+
},
|
|
3599
|
+
{
|
|
3600
|
+
"type": "object",
|
|
3601
|
+
"properties": {
|
|
3602
|
+
"type": {
|
|
3603
|
+
"type": "string",
|
|
3604
|
+
"const": "durable-object"
|
|
3605
|
+
},
|
|
3606
|
+
"state": {
|
|
3607
|
+
"type": "string",
|
|
3608
|
+
"const": "expecting-transfer"
|
|
3609
|
+
},
|
|
3610
|
+
"storage": {
|
|
3611
|
+
"$ref": "#/definitions/DurableObjectExportStorage"
|
|
3612
|
+
},
|
|
3613
|
+
"transfer_from": {
|
|
3614
|
+
"type": "string"
|
|
3615
|
+
}
|
|
3616
|
+
},
|
|
3617
|
+
"required": [
|
|
3618
|
+
"type",
|
|
3619
|
+
"state",
|
|
3620
|
+
"storage",
|
|
3621
|
+
"transfer_from"
|
|
3622
|
+
],
|
|
3623
|
+
"additionalProperties": false
|
|
3624
|
+
}
|
|
3625
|
+
],
|
|
3626
|
+
"description": "A single declarative Durable Object export entry in the `exports` config map. `type` is reserved for the export kind. `state` carries the Durable Object lifecycle and defaults to `\"created\"` (live) when omitted.\n\nMutually exclusive with {@link DurableObjectMigration } at the config- validation boundary.\n\n - `created` (default, live): `storage` is required. - `deleted` (tombstone): retire a provisioned namespace whose class has been removed from code. - `renamed` (tombstone): rewrite a provisioned namespace's class name to `renamed_to`. The target name must also appear as a live (state `\"created\"`) `durable-object` entry in the same map. - `transferred` (tombstone): hand ownership of the namespace to another script in the same account (`transferred_to`). Two-phase commit; the target must first deploy an `expecting-transfer` entry naming this script via `transfer_from`. - `expecting-transfer` (live): receiving side of a two-phase transfer; `storage` and `transfer_from` are both required.",
|
|
3627
|
+
"markdownDescription": "A single declarative Durable Object export entry in the `exports` config\nmap. `type` is reserved for the export kind. `state` carries the Durable\nObject lifecycle and defaults to `\"created\"` (live) when omitted.\n\nMutually exclusive with {@link DurableObjectMigration } at the config-\nvalidation boundary.\n\n - `created` (default, live): `storage` is required.\n - `deleted` (tombstone): retire a provisioned namespace whose class has\n been removed from code.\n - `renamed` (tombstone): rewrite a provisioned namespace's class name to\n `renamed_to`. The target name must also appear as a live (state\n `\"created\"`) `durable-object` entry in the same map.\n - `transferred` (tombstone): hand ownership of the namespace to another\n script in the same account (`transferred_to`). Two-phase commit;\n the target must first deploy an `expecting-transfer` entry naming this\n script via `transfer_from`.\n - `expecting-transfer` (live): receiving side of a two-phase transfer;\n `storage` and `transfer_from` are both required."
|
|
3628
|
+
},
|
|
3629
|
+
"DurableObjectExportStorage": {
|
|
3630
|
+
"type": "string",
|
|
3631
|
+
"enum": [
|
|
3632
|
+
"sqlite",
|
|
3633
|
+
"legacy-kv"
|
|
3634
|
+
],
|
|
3635
|
+
"description": "Storage backend for a declarative Durable Object export. See {@link DurableObjectExport } .",
|
|
3636
|
+
"markdownDescription": "Storage backend for a declarative Durable Object export. See\n {@link DurableObjectExport } ."
|
|
3637
|
+
},
|
|
3638
|
+
"WorkerEntrypointExport": {
|
|
3639
|
+
"type": "object",
|
|
3640
|
+
"properties": {
|
|
3641
|
+
"type": {
|
|
3642
|
+
"type": "string",
|
|
3643
|
+
"const": "worker"
|
|
3644
|
+
},
|
|
3645
|
+
"cache": {
|
|
3646
|
+
"type": "object",
|
|
3647
|
+
"properties": {
|
|
3648
|
+
"enabled": {
|
|
3649
|
+
"type": "boolean",
|
|
3650
|
+
"description": "Whether cache is enabled for this entrypoint.",
|
|
3651
|
+
"markdownDescription": "Whether cache is enabled for this entrypoint."
|
|
3652
|
+
}
|
|
3653
|
+
},
|
|
3654
|
+
"required": [
|
|
3655
|
+
"enabled"
|
|
3656
|
+
],
|
|
3657
|
+
"additionalProperties": false
|
|
3658
|
+
}
|
|
3659
|
+
},
|
|
3660
|
+
"required": [
|
|
3661
|
+
"type"
|
|
3662
|
+
],
|
|
3663
|
+
"additionalProperties": false
|
|
3664
|
+
},
|
|
3484
3665
|
"UserLimits": {
|
|
3485
3666
|
"type": "object",
|
|
3486
3667
|
"properties": {
|
|
@@ -3673,6 +3854,11 @@
|
|
|
3673
3854
|
"type": "boolean",
|
|
3674
3855
|
"description": "If cache is enabled for this Worker",
|
|
3675
3856
|
"markdownDescription": "If cache is enabled for this Worker"
|
|
3857
|
+
},
|
|
3858
|
+
"cross_version_cache": {
|
|
3859
|
+
"type": "boolean",
|
|
3860
|
+
"description": "Whether cached assets may be reused across Worker versions.",
|
|
3861
|
+
"markdownDescription": "Whether cached assets may be reused across Worker versions."
|
|
3676
3862
|
}
|
|
3677
3863
|
},
|
|
3678
3864
|
"required": [
|
|
@@ -3685,16 +3871,16 @@
|
|
|
3685
3871
|
"additionalProperties": false,
|
|
3686
3872
|
"properties": {
|
|
3687
3873
|
"logpush": {
|
|
3688
|
-
"$ref": "#/definitions/interface-769040647-
|
|
3874
|
+
"$ref": "#/definitions/interface-769040647-10589-20711-769040647-0-526752004818536"
|
|
3689
3875
|
},
|
|
3690
3876
|
"observability": {
|
|
3691
|
-
"$ref": "#/definitions/interface-769040647-
|
|
3877
|
+
"$ref": "#/definitions/interface-769040647-10589-20711-769040647-0-526752004818536"
|
|
3692
3878
|
},
|
|
3693
3879
|
"limits": {
|
|
3694
|
-
"$ref": "#/definitions/interface-769040647-
|
|
3880
|
+
"$ref": "#/definitions/interface-769040647-10589-20711-769040647-0-526752004818536"
|
|
3695
3881
|
},
|
|
3696
3882
|
"cache": {
|
|
3697
|
-
"$ref": "#/definitions/interface-769040647-
|
|
3883
|
+
"$ref": "#/definitions/interface-769040647-10589-20711-769040647-0-526752004818536"
|
|
3698
3884
|
},
|
|
3699
3885
|
"define": {
|
|
3700
3886
|
"type": "object",
|
|
@@ -4956,7 +5142,7 @@
|
|
|
4956
5142
|
"description": "Configuration for Worker Previews.\n\nThis defines the settings used when creating Preview deployments. Previews are branches of your Worker's main instance used to test features during feature development outside of production.\n\nThe `previews` block contains any intentionally divergent configuration intended solely for Previews, including:\n- All non-inheritable properties (environment variables and bindings like KV, D1, R2, etc.)\n- Select inheritable properties: `logpush`, `observability`, `limits`, `cache`",
|
|
4957
5143
|
"markdownDescription": "Configuration for Worker Previews.\n\nThis defines the settings used when creating Preview deployments.\nPreviews are branches of your Worker's main instance used to test features\nduring feature development outside of production.\n\nThe `previews` block contains any intentionally divergent configuration intended solely for Previews, including:\n- All non-inheritable properties (environment variables and bindings like KV, D1, R2, etc.)\n- Select inheritable properties: `logpush`, `observability`, `limits`, `cache`"
|
|
4958
5144
|
},
|
|
4959
|
-
"interface-769040647-
|
|
5145
|
+
"interface-769040647-10589-20711-769040647-0-526752004818536": {
|
|
4960
5146
|
"type": "object",
|
|
4961
5147
|
"properties": {
|
|
4962
5148
|
"name": {
|
|
@@ -5054,6 +5240,12 @@
|
|
|
5054
5240
|
"markdownDescription": "A list of migrations that should be uploaded with your Worker.\n\nThese define changes in your Durable Object declarations.\n\nMore details at https://developers.cloudflare.com/workers/learning/using-durable-objects#configuring-durable-object-classes-with-migrations",
|
|
5055
5241
|
"default": []
|
|
5056
5242
|
},
|
|
5243
|
+
"exports": {
|
|
5244
|
+
"$ref": "#/definitions/Exports",
|
|
5245
|
+
"description": "Declarative exports configuration — a map of class name to export configuration.\n\nThe configuration of Durable Objects via `exports` is mutually exclusive with `migrations`.",
|
|
5246
|
+
"markdownDescription": "Declarative exports configuration — a map of class name to export configuration.\n\nThe configuration of Durable Objects via `exports` is mutually exclusive with `migrations`.",
|
|
5247
|
+
"default": {}
|
|
5248
|
+
},
|
|
5057
5249
|
"triggers": {
|
|
5058
5250
|
"type": "object",
|
|
5059
5251
|
"properties": {
|
|
@@ -5318,6 +5510,7 @@
|
|
|
5318
5510
|
"jsx_factory",
|
|
5319
5511
|
"jsx_fragment",
|
|
5320
5512
|
"migrations",
|
|
5513
|
+
"exports",
|
|
5321
5514
|
"triggers",
|
|
5322
5515
|
"rules",
|
|
5323
5516
|
"build",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wrangler",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.107.1",
|
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"assembly",
|
|
@@ -66,16 +66,16 @@
|
|
|
66
66
|
"esbuild": "0.28.1",
|
|
67
67
|
"path-to-regexp": "6.3.0",
|
|
68
68
|
"unenv": "2.0.0-rc.24",
|
|
69
|
-
"workerd": "1.
|
|
70
|
-
"
|
|
69
|
+
"workerd": "1.20260702.1",
|
|
70
|
+
"miniflare": "4.20260702.0",
|
|
71
71
|
"@cloudflare/unenv-preset": "2.16.1",
|
|
72
|
-
"
|
|
72
|
+
"@cloudflare/kv-asset-handler": "0.5.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@aws-sdk/client-s3": "^3.721.0",
|
|
76
76
|
"@bomb.sh/tab": "^0.0.12",
|
|
77
77
|
"@cloudflare/types": "6.18.4",
|
|
78
|
-
"@cloudflare/workers-types": "^4.
|
|
78
|
+
"@cloudflare/workers-types": "^4.20260702.1",
|
|
79
79
|
"@cspotcode/source-map-support": "0.8.1",
|
|
80
80
|
"@netlify/build-info": "^10.5.1",
|
|
81
81
|
"@sentry/node": "^7.86.0",
|
|
@@ -92,7 +92,6 @@
|
|
|
92
92
|
"@types/prompts": "^2.0.14",
|
|
93
93
|
"@types/resolve": "^1.20.6",
|
|
94
94
|
"@types/shell-quote": "^1.7.2",
|
|
95
|
-
"@types/signal-exit": "^3.0.1",
|
|
96
95
|
"@types/supports-color": "^8.1.1",
|
|
97
96
|
"@types/ws": "^8.5.7",
|
|
98
97
|
"@types/yargs": "^17.0.22",
|
|
@@ -138,7 +137,7 @@
|
|
|
138
137
|
"rosie-skills": "^0.8.1",
|
|
139
138
|
"semiver": "^1.1.0",
|
|
140
139
|
"shell-quote": "^1.8.1",
|
|
141
|
-
"signal-exit": "
|
|
140
|
+
"signal-exit": "4.1.0",
|
|
142
141
|
"smol-toml": "1.5.2",
|
|
143
142
|
"supports-color": "^9.2.2",
|
|
144
143
|
"timeago.js": "4.0.2",
|
|
@@ -156,21 +155,21 @@
|
|
|
156
155
|
"yaml": "^2.8.1",
|
|
157
156
|
"yargs": "^17.7.2",
|
|
158
157
|
"zod": "^4.4.3",
|
|
159
|
-
"@cloudflare/autoconfig": "0.1.
|
|
160
|
-
"@cloudflare/cli-shared-helpers": "0.1.
|
|
158
|
+
"@cloudflare/autoconfig": "0.1.3",
|
|
159
|
+
"@cloudflare/cli-shared-helpers": "0.1.12",
|
|
161
160
|
"@cloudflare/codemod": "1.1.0",
|
|
162
161
|
"@cloudflare/config": "0.0.0",
|
|
163
162
|
"@cloudflare/containers-shared": "0.16.0",
|
|
164
|
-
"@cloudflare/deploy-helpers": "0.
|
|
165
|
-
"@cloudflare/pages-shared": "^0.13.
|
|
166
|
-
"@cloudflare/workers-auth": "0.
|
|
163
|
+
"@cloudflare/deploy-helpers": "0.3.1",
|
|
164
|
+
"@cloudflare/pages-shared": "^0.13.153",
|
|
165
|
+
"@cloudflare/workers-auth": "0.4.1",
|
|
167
166
|
"@cloudflare/workers-shared": "0.19.7",
|
|
168
|
-
"@cloudflare/workers-utils": "0.24.0",
|
|
169
167
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
168
|
+
"@cloudflare/workers-utils": "0.25.1",
|
|
170
169
|
"@cloudflare/workflows-shared": "0.11.2"
|
|
171
170
|
},
|
|
172
171
|
"peerDependencies": {
|
|
173
|
-
"@cloudflare/workers-types": "^4.
|
|
172
|
+
"@cloudflare/workers-types": "^4.20260702.1"
|
|
174
173
|
},
|
|
175
174
|
"peerDependenciesMeta": {
|
|
176
175
|
"@cloudflare/workers-types": {
|
package/wrangler-dist/cli.d.ts
CHANGED
|
@@ -1008,12 +1008,12 @@ type ReadConfigOptions = ResolveConfigPathOptions & {
|
|
|
1008
1008
|
declare function readConfig(args: ReadConfigCommandArgs, options?: ReadConfigOptions): Config$1;
|
|
1009
1009
|
|
|
1010
1010
|
/**
|
|
1011
|
-
*
|
|
1012
|
-
*
|
|
1013
|
-
*
|
|
1014
|
-
*
|
|
1011
|
+
* Infer Durable Object class names and storage backends from migrations and
|
|
1012
|
+
* live declarative `exports` entries.
|
|
1013
|
+
*
|
|
1014
|
+
* In practice only one of `migrations` or `exports` will have the Durable Object configuration.
|
|
1015
1015
|
*/
|
|
1016
|
-
declare function getDurableObjectClassNameToUseSQLiteMap(migrations: Config$1["migrations"] | undefined): Map<string, boolean>;
|
|
1016
|
+
declare function getDurableObjectClassNameToUseSQLiteMap(migrations: Config$1["migrations"] | undefined, exports?: Config$1["exports"] | undefined): Map<string, boolean>;
|
|
1017
1017
|
|
|
1018
1018
|
/**
|
|
1019
1019
|
* Note about this file:
|
|
@@ -1374,6 +1374,66 @@ type DurableObjectMigration = {
|
|
|
1374
1374
|
/** The Durable Objects being removed. */
|
|
1375
1375
|
deleted_classes?: string[];
|
|
1376
1376
|
};
|
|
1377
|
+
/**
|
|
1378
|
+
* Storage backend for a declarative Durable Object export. See
|
|
1379
|
+
* {@link DurableObjectExport}.
|
|
1380
|
+
*/
|
|
1381
|
+
type DurableObjectExportStorage = "sqlite" | "legacy-kv";
|
|
1382
|
+
/**
|
|
1383
|
+
* A single declarative Durable Object export entry in the `exports` config
|
|
1384
|
+
* map. `type` is reserved for the export kind. `state` carries the Durable
|
|
1385
|
+
* Object lifecycle and defaults to `"created"` (live) when omitted.
|
|
1386
|
+
*
|
|
1387
|
+
* Mutually exclusive with {@link DurableObjectMigration} at the config-
|
|
1388
|
+
* validation boundary.
|
|
1389
|
+
*
|
|
1390
|
+
* - `created` (default, live): `storage` is required.
|
|
1391
|
+
* - `deleted` (tombstone): retire a provisioned namespace whose class has
|
|
1392
|
+
* been removed from code.
|
|
1393
|
+
* - `renamed` (tombstone): rewrite a provisioned namespace's class name to
|
|
1394
|
+
* `renamed_to`. The target name must also appear as a live (state
|
|
1395
|
+
* `"created"`) `durable-object` entry in the same map.
|
|
1396
|
+
* - `transferred` (tombstone): hand ownership of the namespace to another
|
|
1397
|
+
* script in the same account (`transferred_to`). Two-phase commit;
|
|
1398
|
+
* the target must first deploy an `expecting-transfer` entry naming this
|
|
1399
|
+
* script via `transfer_from`.
|
|
1400
|
+
* - `expecting-transfer` (live): receiving side of a two-phase transfer;
|
|
1401
|
+
* `storage` and `transfer_from` are both required.
|
|
1402
|
+
*/
|
|
1403
|
+
type DurableObjectExport = {
|
|
1404
|
+
type: "durable-object";
|
|
1405
|
+
state?: "created";
|
|
1406
|
+
storage: DurableObjectExportStorage;
|
|
1407
|
+
} | {
|
|
1408
|
+
type: "durable-object";
|
|
1409
|
+
state: "deleted";
|
|
1410
|
+
} | {
|
|
1411
|
+
type: "durable-object";
|
|
1412
|
+
state: "renamed";
|
|
1413
|
+
renamed_to: string;
|
|
1414
|
+
} | {
|
|
1415
|
+
type: "durable-object";
|
|
1416
|
+
state: "transferred";
|
|
1417
|
+
transferred_to: string;
|
|
1418
|
+
} | {
|
|
1419
|
+
type: "durable-object";
|
|
1420
|
+
state: "expecting-transfer";
|
|
1421
|
+
storage: DurableObjectExportStorage;
|
|
1422
|
+
transfer_from: string;
|
|
1423
|
+
};
|
|
1424
|
+
interface WorkerEntrypointExport {
|
|
1425
|
+
type: "worker";
|
|
1426
|
+
cache?: {
|
|
1427
|
+
/** Whether cache is enabled for this entrypoint. */
|
|
1428
|
+
enabled: boolean;
|
|
1429
|
+
};
|
|
1430
|
+
}
|
|
1431
|
+
type ConfiguredExport = DurableObjectExport | WorkerEntrypointExport;
|
|
1432
|
+
/**
|
|
1433
|
+
* The declarative `exports` map keyed by export name. Durable Object exports
|
|
1434
|
+
* are mutually exclusive with `migrations` at the wrangler config layer.
|
|
1435
|
+
*/
|
|
1436
|
+
type Exports = Record<string, ConfiguredExport>;
|
|
1377
1437
|
/**
|
|
1378
1438
|
* The `EnvironmentInheritable` interface declares all the configuration fields for an environment
|
|
1379
1439
|
* that can be inherited (and overridden) from the top-level environment.
|
|
@@ -1515,6 +1575,15 @@ interface EnvironmentInheritable {
|
|
|
1515
1575
|
* @inheritable
|
|
1516
1576
|
*/
|
|
1517
1577
|
migrations: DurableObjectMigration[];
|
|
1578
|
+
/**
|
|
1579
|
+
* Declarative exports configuration — a map of class name to export configuration.
|
|
1580
|
+
*
|
|
1581
|
+
* The configuration of Durable Objects via `exports` is mutually exclusive with `migrations`.
|
|
1582
|
+
*
|
|
1583
|
+
* @default {}
|
|
1584
|
+
* @inheritable
|
|
1585
|
+
*/
|
|
1586
|
+
exports: Exports;
|
|
1518
1587
|
/**
|
|
1519
1588
|
* "Cron" definitions to trigger a Worker's "scheduled" function.
|
|
1520
1589
|
*
|
|
@@ -2598,6 +2667,8 @@ interface Observability {
|
|
|
2598
2667
|
interface CacheOptions {
|
|
2599
2668
|
/** If cache is enabled for this Worker */
|
|
2600
2669
|
enabled: boolean;
|
|
2670
|
+
/** Whether cached assets may be reused across Worker versions. */
|
|
2671
|
+
cross_version_cache?: boolean;
|
|
2601
2672
|
}
|
|
2602
2673
|
type DockerConfiguration = {
|
|
2603
2674
|
/** Socket used by miniflare to communicate with Docker */
|
|
@@ -2895,9 +2966,12 @@ type VarBinding = Extract<Binding, {
|
|
|
2895
2966
|
* Any values in these files (all formatted like `.env` files) will add to or override `vars`
|
|
2896
2967
|
* bindings provided in the Wrangler configuration file.
|
|
2897
2968
|
*
|
|
2898
|
-
* When `secrets` is defined in the config,
|
|
2899
|
-
*
|
|
2900
|
-
*
|
|
2969
|
+
* When `secrets` is defined in the config, `.dev.vars` values will still
|
|
2970
|
+
* override existing config `vars` (so that local development overrides always
|
|
2971
|
+
* take effect). Additionally, any `required` secret keys that are not already
|
|
2972
|
+
* in the config vars will also be loaded from `.dev.vars`. Keys in `.dev.vars`
|
|
2973
|
+
* that are neither existing config vars nor declared required secrets are
|
|
2974
|
+
* excluded. A warning is emitted for any required secrets that are missing.
|
|
2901
2975
|
*
|
|
2902
2976
|
* @param configPath - The path to the Wrangler configuration file, if defined.
|
|
2903
2977
|
* @param envFiles - An array of paths to .env files to load; if `undefined` the default .env files will be used (see `getDefaultEnvFiles()`).
|
|
@@ -3267,7 +3341,8 @@ type Teams =
|
|
|
3267
3341
|
| "Product: Tunnels"
|
|
3268
3342
|
| "Product: Email Service"
|
|
3269
3343
|
| "Product: Browser Run"
|
|
3270
|
-
| "Product: Artifacts"
|
|
3344
|
+
| "Product: Artifacts"
|
|
3345
|
+
| "Product: Flagship";
|
|
3271
3346
|
|
|
3272
3347
|
/** Convert literal string types like 'foo-bar' to 'FooBar' */
|
|
3273
3348
|
type PascalCase<S extends string> = string extends S ? string : S extends `${infer T}-${infer U}` ? `${Capitalize<T>}${PascalCase<U>}` : Capitalize<S>;
|