@void/deploy-cloudflare 0.20.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/LICENSE +21 -0
- package/README.md +28 -0
- package/dist/index.d.mts +322 -0
- package/dist/index.mjs +1926 -0
- package/package.json +38 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026-present, Cloudflare, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# @void/deploy-cloudflare
|
|
2
|
+
|
|
3
|
+
Public Cloudflare target adapter primitives for Void deployments.
|
|
4
|
+
|
|
5
|
+
This package owns Wrangler JSON/JSONC config reads and the final verified
|
|
6
|
+
Cloudflare upload boundary. Source inference and app builds remain in `void`;
|
|
7
|
+
provider-neutral contracts and plans remain in `@void/deploy-core`.
|
|
8
|
+
|
|
9
|
+
Existing Worker handoffs read the active version, validate resource identities,
|
|
10
|
+
and check the uploaded bindings before activation. Traffic-only activation uses
|
|
11
|
+
an isolated config to retain Worker settings and triggers. Trigger snapshots
|
|
12
|
+
record when configuration was preserved, so rollback can keep those settings
|
|
13
|
+
for versions originally deployed outside Void.
|
|
14
|
+
|
|
15
|
+
Handoff verifiers can accept an explicit list of new KV binding identities.
|
|
16
|
+
Only those exact namespaces may be added; existing bindings, variables, secrets,
|
|
17
|
+
and handlers must remain unchanged. New bindings cannot alias an existing KV
|
|
18
|
+
namespace. The Void CLI uses this for the migration's explicit ISR cache choice.
|
|
19
|
+
|
|
20
|
+
First-deployment readiness allows up to one minute for the new Worker's public
|
|
21
|
+
route to propagate, with bounded requests and backoff. A successful check still
|
|
22
|
+
requires the ready response, and Cloudflare Access denials fail immediately.
|
|
23
|
+
Subsequent version previews retain the shorter retry window.
|
|
24
|
+
|
|
25
|
+
Failed version uploads and first-deployment bootstraps return a bounded diagnostic
|
|
26
|
+
alongside the exit status and Cloudflare error code. It retains validation messages
|
|
27
|
+
and stack locations, strips terminal formatting, excludes stdout binding tables,
|
|
28
|
+
and redacts common credential formats before callers display or log it.
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
import { AssetConfig, HeaderRule, RedirectRule } from "@void/deploy-core";
|
|
2
|
+
//#region src/execute.d.ts
|
|
3
|
+
type CloudflareCommandResult = {
|
|
4
|
+
stdout: string;
|
|
5
|
+
stderr: string;
|
|
6
|
+
status: number;
|
|
7
|
+
signal?: NodeJS.Signals | null;
|
|
8
|
+
error?: string | null;
|
|
9
|
+
};
|
|
10
|
+
type CloudflareCommandRunner = (args: Array<string>, options: {
|
|
11
|
+
capture: boolean;
|
|
12
|
+
}) => CloudflareCommandResult | Promise<CloudflareCommandResult>;
|
|
13
|
+
type CloudflareDeployExecution = {
|
|
14
|
+
ok: true;
|
|
15
|
+
} | {
|
|
16
|
+
ok: false;
|
|
17
|
+
reason: "uploader-changed";
|
|
18
|
+
} | {
|
|
19
|
+
ok: false;
|
|
20
|
+
reason: "deploy-failed";
|
|
21
|
+
status: number;
|
|
22
|
+
};
|
|
23
|
+
/** Upload the already-verified Worker artifact without Wrangler autoconfiguration. */
|
|
24
|
+
export declare function executeCloudflareDeploy(options: {
|
|
25
|
+
runWrangler: CloudflareCommandRunner;
|
|
26
|
+
verifyUploader: () => boolean;
|
|
27
|
+
configPath?: string;
|
|
28
|
+
}): Promise<CloudflareDeployExecution>;
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/existing.d.ts
|
|
31
|
+
type ExistingCloudflareWorker = {
|
|
32
|
+
versionId: string;
|
|
33
|
+
bindings: Array<Record<string, unknown>>;
|
|
34
|
+
runtime: Record<string, unknown>;
|
|
35
|
+
script: Record<string, unknown>;
|
|
36
|
+
};
|
|
37
|
+
/** Exact identities of new KV bindings explicitly approved before the build. */
|
|
38
|
+
type ApprovedCloudflareKvBinding = Readonly<{
|
|
39
|
+
binding: string;
|
|
40
|
+
id: string;
|
|
41
|
+
}>;
|
|
42
|
+
type CloudflareWorkerMigrationTagOptions = {
|
|
43
|
+
runWrangler: CloudflareCommandRunner;
|
|
44
|
+
accountId: string;
|
|
45
|
+
apiBaseUrl: string;
|
|
46
|
+
workerName: string;
|
|
47
|
+
};
|
|
48
|
+
/** Read the deployed version, not the most recently uploaded candidate. */
|
|
49
|
+
export declare function readExistingCloudflareWorker(options: {
|
|
50
|
+
runWrangler: CloudflareCommandRunner;
|
|
51
|
+
configPath: string;
|
|
52
|
+
workerName: string;
|
|
53
|
+
versionId?: string;
|
|
54
|
+
}): Promise<ExistingCloudflareWorker>;
|
|
55
|
+
/** Parse legacy version-detail shapes; this is not authoritative Worker migration state. */
|
|
56
|
+
export declare function readCloudflareVersionMigrationTag(version: unknown): string | null;
|
|
57
|
+
/** Read the authoritative migration tag from Worker script metadata. */
|
|
58
|
+
export declare function readCloudflareWorkerMigrationTag(options: CloudflareWorkerMigrationTagOptions): Promise<string | null>;
|
|
59
|
+
/**
|
|
60
|
+
* The Versions upload endpoint cannot safely apply a new Durable Object class migration to an
|
|
61
|
+
* existing Worker in the native beta. Reject that pending lifecycle change before the caller
|
|
62
|
+
* mutates a database or Worker secret; ordinary uploads whose migration tag is already active
|
|
63
|
+
* continue normally.
|
|
64
|
+
*/
|
|
65
|
+
export declare function assertCloudflareDurableObjectLifecycleSupported(options: {
|
|
66
|
+
runWrangler: CloudflareCommandRunner;
|
|
67
|
+
configPath: string;
|
|
68
|
+
workerName: string;
|
|
69
|
+
accountId: string;
|
|
70
|
+
apiBaseUrl: string;
|
|
71
|
+
readMigrationTag?: (options: CloudflareWorkerMigrationTagOptions) => Promise<string | null>;
|
|
72
|
+
}): Promise<void>;
|
|
73
|
+
export declare function assertCloudflareBindingsPreserved(before: ExistingCloudflareWorker, after: ExistingCloudflareWorker, approvedKv?: ReadonlyArray<ApprovedCloudflareKvBinding>): void;
|
|
74
|
+
/** Preserve the existing Worker, allowing only explicitly approved KV additions. */
|
|
75
|
+
export declare function assertExistingCloudflareConfig(existing: ExistingCloudflareWorker, config: Record<string, unknown>, built?: boolean, approvedKv?: ReadonlyArray<ApprovedCloudflareKvBinding>): void;
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region src/config.d.ts
|
|
78
|
+
/** Parse a root Wrangler JSON/JSONC config without accepting a partial parse. */
|
|
79
|
+
export declare function parseRootWranglerConfig(configPath: string): Record<string, unknown>;
|
|
80
|
+
export declare function readWranglerTopLevelString(config: Record<string, unknown>, field: string): string | undefined;
|
|
81
|
+
export declare function readStoredResourceName(config: Record<string, unknown>, field: string, binding: string, nameField: string): string | undefined;
|
|
82
|
+
export declare function readBindingFieldPresence(config: Record<string, unknown>, field: string, binding: string, key: string): {
|
|
83
|
+
present: boolean;
|
|
84
|
+
value: unknown;
|
|
85
|
+
};
|
|
86
|
+
export declare function readConfigEntryString(entry: unknown, field: string): string | undefined;
|
|
87
|
+
export declare function resolveD1MigrateTarget(config: Record<string, unknown>, binding: string): {
|
|
88
|
+
ok: true;
|
|
89
|
+
token: string;
|
|
90
|
+
} | {
|
|
91
|
+
ok: false;
|
|
92
|
+
reason: string;
|
|
93
|
+
};
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/framework.d.ts
|
|
96
|
+
type CloudflareFrameworkDeployConfig = Readonly<{
|
|
97
|
+
configPath: string;
|
|
98
|
+
deployPointerPath: string;
|
|
99
|
+
name: string;
|
|
100
|
+
accountId: string;
|
|
101
|
+
main: string;
|
|
102
|
+
assetsDirectory: string;
|
|
103
|
+
compatibilityDate: string;
|
|
104
|
+
compatibilityFlags?: ReadonlyArray<string>;
|
|
105
|
+
assetsIgnore?: ReadonlyArray<string>;
|
|
106
|
+
crons?: ReadonlyArray<string>;
|
|
107
|
+
requiredSecrets?: ReadonlyArray<string>;
|
|
108
|
+
}>;
|
|
109
|
+
/**
|
|
110
|
+
* Point a standalone framework Worker at the canonical root Cloudflare state.
|
|
111
|
+
*
|
|
112
|
+
* Resource ids and deployment history remain in the user's root wrangler
|
|
113
|
+
* config. The generated deploy pointer contains only a relative path back to
|
|
114
|
+
* that file, so Wrangler uploads the exact config Void verifies.
|
|
115
|
+
*/
|
|
116
|
+
export declare function writeCloudflareFrameworkDeployConfig(options: CloudflareFrameworkDeployConfig): boolean;
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region src/static.d.ts
|
|
119
|
+
type CloudflareStaticDeployConfig = Readonly<{
|
|
120
|
+
configPath: string;
|
|
121
|
+
name: string;
|
|
122
|
+
accountId: string;
|
|
123
|
+
main: string;
|
|
124
|
+
assetsDirectory: string;
|
|
125
|
+
compatibilityDate: string;
|
|
126
|
+
assetConfig: AssetConfig;
|
|
127
|
+
}>;
|
|
128
|
+
/** Generate the deterministic thin Worker entry bundled by Wrangler. */
|
|
129
|
+
export declare function renderCloudflareStaticEntry(options: {
|
|
130
|
+
runtimeImport?: string;
|
|
131
|
+
headerRules?: ReadonlyArray<HeaderRule>;
|
|
132
|
+
redirectRules?: ReadonlyArray<RedirectRule>;
|
|
133
|
+
fallbackRules?: ReadonlyArray<RedirectRule>;
|
|
134
|
+
}): string;
|
|
135
|
+
/**
|
|
136
|
+
* Copy static assets into Void's deploy area without Cloudflare's reserved routing files.
|
|
137
|
+
*
|
|
138
|
+
* Void has already compiled the root `_headers` and `_redirects` files into the thin edge
|
|
139
|
+
* Worker. Wrangler parses those files independently of `.assetsignore`, so uploading the source
|
|
140
|
+
* directory would apply every rule twice and can reject valid Void fallbacks as redirect loops.
|
|
141
|
+
*/
|
|
142
|
+
export declare function stageCloudflareStaticAssets(options: {
|
|
143
|
+
sourceDirectory: string;
|
|
144
|
+
destinationDirectory: string;
|
|
145
|
+
}): void;
|
|
146
|
+
/**
|
|
147
|
+
* Persist the mutable Cloudflare target state without replacing comments,
|
|
148
|
+
* Durable Object migrations, resource ids, or unrelated user configuration.
|
|
149
|
+
*/
|
|
150
|
+
export declare function writeCloudflareStaticDeployConfig(options: CloudflareStaticDeployConfig): boolean;
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region src/version.d.ts
|
|
153
|
+
type CloudflareVersionMetadata = Readonly<{
|
|
154
|
+
schema: 1;
|
|
155
|
+
migrations: ReadonlyArray<string>;
|
|
156
|
+
}> | Readonly<{
|
|
157
|
+
schema: 2;
|
|
158
|
+
migrations: ReadonlyArray<string>;
|
|
159
|
+
triggerConfig: CloudflareTriggerConfig;
|
|
160
|
+
}>;
|
|
161
|
+
type CloudflareTriggerConfig = Readonly<{
|
|
162
|
+
/** This version retained the existing triggers instead of publishing a snapshot. */
|
|
163
|
+
preserve?: boolean;
|
|
164
|
+
preserveRoutes?: boolean;
|
|
165
|
+
preserveWorkersDev?: boolean;
|
|
166
|
+
preservePreviewUrls?: boolean;
|
|
167
|
+
/** Fingerprint of explicit non-versioned settings while remote triggers stay opaque. */
|
|
168
|
+
settingsHash?: string;
|
|
169
|
+
workers_dev: boolean;
|
|
170
|
+
preview_urls: boolean;
|
|
171
|
+
routes: ReadonlyArray<unknown>;
|
|
172
|
+
crons: ReadonlyArray<unknown>;
|
|
173
|
+
queueConsumers: ReadonlyArray<unknown>;
|
|
174
|
+
workflows: ReadonlyArray<unknown>;
|
|
175
|
+
/**
|
|
176
|
+
* Email Routing addresses (`addresses` in Wrangler config). Wrangler 4.131 applies its
|
|
177
|
+
* Email Routing plan inside `triggers deploy` — `undefined` skips the plan entirely, while
|
|
178
|
+
* `[]` is a destructive plan that deletes every rule this Worker owns — so the two must stay
|
|
179
|
+
* distinct through the snapshot. Absent from annotations written before this field existed.
|
|
180
|
+
*/
|
|
181
|
+
addresses?: ReadonlyArray<string>;
|
|
182
|
+
}>;
|
|
183
|
+
type CloudflareTrafficConfig = Pick<CloudflareTriggerConfig, "workers_dev" | "preview_urls" | "routes">;
|
|
184
|
+
type CloudflareVersionActivation = {
|
|
185
|
+
ok: true;
|
|
186
|
+
versionId: string;
|
|
187
|
+
previewUrl: string;
|
|
188
|
+
previousVersionId: string | null;
|
|
189
|
+
workersDevSubdomain?: string;
|
|
190
|
+
preservedTriggers?: boolean;
|
|
191
|
+
trafficConfig?: CloudflareTrafficConfig;
|
|
192
|
+
} | {
|
|
193
|
+
ok: false;
|
|
194
|
+
reason: "uploader-changed" | "status-failed" | "deployment-changed" | "inheritance-source-unavailable" | "inheritance-source-changed" | "traffic-preservation-unavailable" | "traffic-split-unsupported" | "upload-failed" | "upload-output-invalid" | "preview-unavailable" | "readiness-staging-failed" | "readiness-failed" | "readiness-access-denied" | "bootstrap-failed" | "bootstrap-output-invalid" | "bootstrap-readiness-failed" | "bootstrap-readiness-access-denied" | "activation-failed" | "triggers-failed";
|
|
195
|
+
status?: number;
|
|
196
|
+
cloudflareErrorCode?: number;
|
|
197
|
+
/** Bounded uploader error text with terminal escapes removed and common credential formats redacted. */
|
|
198
|
+
diagnostic?: string;
|
|
199
|
+
/** Wrangler reached Cloudflare's Containers entitlement endpoint and received a 403. */
|
|
200
|
+
containersUnavailable?: boolean;
|
|
201
|
+
versionId?: string;
|
|
202
|
+
previousVersionId?: string | null;
|
|
203
|
+
rollback?: "not-needed" | "succeeded" | "failed" | "unavailable" | "unsafe";
|
|
204
|
+
/** Version that owned production after a concurrent operation superseded this command. */
|
|
205
|
+
activeVersionId?: string | null;
|
|
206
|
+
/** Whether Void restored the active version's immutable trigger snapshot. */
|
|
207
|
+
triggerRepair?: "succeeded" | "failed" | "unavailable";
|
|
208
|
+
};
|
|
209
|
+
/** Encode migration state into Cloudflare's version annotation for safe rollback diagnostics. */
|
|
210
|
+
export declare function encodeCloudflareVersionMessage(migrations: ReadonlyArray<string>, triggerConfig?: CloudflareTriggerConfig): string;
|
|
211
|
+
/** Read migration state written by {@link encodeCloudflareVersionMessage}. */
|
|
212
|
+
export declare function parseCloudflareVersionMessage(message: string | null | undefined): CloudflareVersionMetadata | null;
|
|
213
|
+
/**
|
|
214
|
+
* Capture every configuration surface mutated by `wrangler triggers deploy` — routes,
|
|
215
|
+
* workers.dev / preview flags, crons, queue consumers, workflows, and Email Routing addresses.
|
|
216
|
+
*/
|
|
217
|
+
export declare function readCloudflareTriggerConfig(configPath: string, sourceConfigPath?: string): CloudflareTriggerConfig;
|
|
218
|
+
/** Apply a version's persisted trigger state using an isolated temporary Wrangler config. */
|
|
219
|
+
export declare function deployCloudflareVersionTriggers(options: {
|
|
220
|
+
runWrangler: CloudflareCommandRunner;
|
|
221
|
+
workerName: string;
|
|
222
|
+
configPath?: string;
|
|
223
|
+
triggerConfig: CloudflareTriggerConfig;
|
|
224
|
+
/** Exact trigger state active before this transition, used to remove stale state. */
|
|
225
|
+
previousTriggerConfig?: CloudflareTriggerConfig;
|
|
226
|
+
/** Wrangler skips an empty Custom Domain set, so the caller may publish it directly. */
|
|
227
|
+
publishEmptyCustomDomains?: () => Promise<CloudflareCommandResult>;
|
|
228
|
+
manageRoutes?: boolean;
|
|
229
|
+
}): Promise<CloudflareCommandResult>;
|
|
230
|
+
type CloudflareTriggerStabilization = Readonly<{
|
|
231
|
+
ok: true;
|
|
232
|
+
activeVersionId: string;
|
|
233
|
+
targetOwnsTraffic: boolean;
|
|
234
|
+
}> | Readonly<{
|
|
235
|
+
ok: false;
|
|
236
|
+
reason: "status-failed" | "traffic-split" | "metadata-unavailable" | "triggers-failed";
|
|
237
|
+
status?: number;
|
|
238
|
+
activeVersionId?: string | null;
|
|
239
|
+
}>;
|
|
240
|
+
/**
|
|
241
|
+
* Reconcile triggers to the version that actually owns production traffic.
|
|
242
|
+
*
|
|
243
|
+
* Worker Version activation and `wrangler triggers deploy` are separate Cloudflare operations.
|
|
244
|
+
* Another deploy or rollback can therefore take ownership between them. Re-read ownership before
|
|
245
|
+
* and after every trigger publication and, when it changes, repair the new owner's immutable
|
|
246
|
+
* schema-2 snapshot. The bounded loop fails closed if traffic never stabilizes.
|
|
247
|
+
*/
|
|
248
|
+
export declare function stabilizeCloudflareVersionTriggers(options: {
|
|
249
|
+
runWrangler: CloudflareCommandRunner;
|
|
250
|
+
workerName: string;
|
|
251
|
+
configPath?: string;
|
|
252
|
+
targetVersionId: string;
|
|
253
|
+
targetTriggerConfig: CloudflareTriggerConfig;
|
|
254
|
+
previousTriggerConfig?: CloudflareTriggerConfig;
|
|
255
|
+
knownTriggerConfigs?: Readonly<Record<string, CloudflareTriggerConfig>>;
|
|
256
|
+
publishEmptyCustomDomains?: () => Promise<CloudflareCommandResult>;
|
|
257
|
+
manageRoutes?: boolean;
|
|
258
|
+
attempts?: number;
|
|
259
|
+
}): Promise<CloudflareTriggerStabilization>;
|
|
260
|
+
type CloudflareVersionActivationOptions = {
|
|
261
|
+
/** Reuse an inspected Worker without republishing its domains or other triggers. */
|
|
262
|
+
preserveTriggers?: boolean;
|
|
263
|
+
expectedPreviousVersionId?: string;
|
|
264
|
+
trustedInheritanceVersionIds?: ReadonlyArray<string>;
|
|
265
|
+
recordVerifiedCandidate?: (versionId: string) => void | Promise<void>;
|
|
266
|
+
validateUploadedVersion?: (versionId: string) => Promise<void>;
|
|
267
|
+
runWrangler: CloudflareCommandRunner;
|
|
268
|
+
verifyUploader: () => boolean;
|
|
269
|
+
workerName: string;
|
|
270
|
+
configPath?: string;
|
|
271
|
+
/** Override only the asset directory for this upload, leaving the persisted config intact. */
|
|
272
|
+
assetsDirectoryOverride?: string;
|
|
273
|
+
/** Optional Cloudflare Access headers used only by the readiness probe. */
|
|
274
|
+
readinessHeaders?: Readonly<Record<string, string>>;
|
|
275
|
+
/** Account workers.dev subdomain used when this Worker cannot expose version preview URLs. */
|
|
276
|
+
workersDevSubdomain?: string;
|
|
277
|
+
/**
|
|
278
|
+
* Operator-provided workers.dev subdomain that may receive readiness credentials even when
|
|
279
|
+
* Wrangler cannot report a preview URL. Cached/project-controlled values must not be used here.
|
|
280
|
+
*/
|
|
281
|
+
readinessHeadersWorkersDevSubdomain?: string;
|
|
282
|
+
message: string;
|
|
283
|
+
/** Direct empty-domain publisher for the Wrangler reconciliation gap. */
|
|
284
|
+
publishEmptyCustomDomains?: () => Promise<CloudflareCommandResult>;
|
|
285
|
+
/** Last successfully published traffic state, newer than immutable version annotations. */
|
|
286
|
+
previousTrafficConfig?: CloudflareTrafficConfig;
|
|
287
|
+
/** Explicitly Void-owned queue consumers retained for schema-1 cleanup and failed retries. */
|
|
288
|
+
queueConsumerCleanup?: ReadonlyArray<string>;
|
|
289
|
+
/**
|
|
290
|
+
* The caller proved that the Worker did not exist before this deploy provisioned its secrets.
|
|
291
|
+
* Wrangler creates an active placeholder version when attaching the first secret, so the status
|
|
292
|
+
* read below can legitimately observe a version even though no application was ever deployed.
|
|
293
|
+
*/
|
|
294
|
+
allowFirstDeploymentBootstrap?: boolean;
|
|
295
|
+
fetch?: typeof globalThis.fetch;
|
|
296
|
+
sleep?: (milliseconds: number) => Promise<void>;
|
|
297
|
+
readinessAttempts?: number;
|
|
298
|
+
/** Verify that omitted remote secrets come from the active Worker Version before uploading. */
|
|
299
|
+
verifyInheritedSecrets?: boolean;
|
|
300
|
+
/**
|
|
301
|
+
* Plaintext secrets to attach only to the uploaded candidate version. Supplying every remote
|
|
302
|
+
* `secret_text` binding lets a deployment recover safely when an inactive upload is newer than
|
|
303
|
+
* production; `secret_key` bindings cannot be replaced through this option.
|
|
304
|
+
*/
|
|
305
|
+
candidateSecrets?: Readonly<Record<string, string>>;
|
|
306
|
+
};
|
|
307
|
+
/** Upload, probe, and atomically activate a verified Worker Version. */
|
|
308
|
+
export declare function activateCloudflareVersion(options: CloudflareVersionActivationOptions): Promise<CloudflareVersionActivation>;
|
|
309
|
+
/** Change version traffic without synchronizing Worker settings from local config. */
|
|
310
|
+
export declare function deployCloudflareVersionTraffic(options: {
|
|
311
|
+
runWrangler: CloudflareCommandRunner;
|
|
312
|
+
configPath: string;
|
|
313
|
+
workerName: string;
|
|
314
|
+
percentages: Array<string>;
|
|
315
|
+
message: string;
|
|
316
|
+
}): Promise<CloudflareCommandResult>;
|
|
317
|
+
/** Normalize an account workers.dev subdomain supplied by config or the environment. */
|
|
318
|
+
export declare function normalizeWorkersDevSubdomain(value: string | undefined): string | undefined;
|
|
319
|
+
/** Extract the account subdomain from a Wrangler-reported workers.dev URL. */
|
|
320
|
+
export declare function extractWorkersDevSubdomain(url: string): string | undefined;
|
|
321
|
+
//#endregion
|
|
322
|
+
export type { ApprovedCloudflareKvBinding, CloudflareCommandResult, CloudflareCommandRunner, CloudflareDeployExecution, CloudflareFrameworkDeployConfig, CloudflareStaticDeployConfig, CloudflareTrafficConfig, CloudflareTriggerConfig, CloudflareTriggerStabilization, CloudflareVersionActivation, CloudflareVersionActivationOptions, CloudflareVersionMetadata, CloudflareWorkerMigrationTagOptions, ExistingCloudflareWorker };
|