@cloudflare/deploy-helpers 0.27.2 → 0.28.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/dist/context-DOE6X8vr.d.mts +212 -0
- package/dist/context.d.mts +2 -3
- package/dist/context.mjs +38 -5
- package/dist/create-worker-upload-form-BlSu1EfR.mjs +578 -0
- package/dist/create-worker-upload-form.d.mts +11 -13
- package/dist/create-worker-upload-form.mjs +1 -5
- package/dist/index.d.mts +717 -613
- package/dist/index.mjs +16035 -33673
- package/dist/rolldown-runtime-BMUeFane.mjs +30 -0
- package/dist/startup-profile.d.mts +13 -13
- package/dist/startup-profile.mjs +492 -610
- package/package.json +10 -10
- package/dist/chunk-DSGVRFIS.mjs +0 -828
- package/dist/chunk-U6NEESU5.mjs +0 -41
- package/dist/chunk-Y4VATABS.mjs +0 -27
- package/dist/context-BY_xpg-t.d.mts +0 -211
- package/dist/metafile-esm.json +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,114 +1,115 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { FormData } from
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import Protocol from
|
|
9
|
-
|
|
10
|
-
import { ParsedBuildOutputWorkerConfig, ParsedBuildOutputRootConfig, ParsedBuildOutputContainerConfig } from '@cloudflare/config';
|
|
11
|
-
import { ContainerNormalizedConfig } from '@cloudflare/containers-shared';
|
|
12
|
-
|
|
1
|
+
import { createWorkerUploadForm, fromMimeType, moduleTypeMimeType } from "./create-worker-upload-form.mjs";
|
|
2
|
+
import { _ as TriggerProps, d as ContainerDeployConfig, f as ContainerlessConfig, g as TriggerDeployment, h as SharedDeployVersionsProps, m as DeployProps, o as initDeployHelpersContext, p as DeployHelpersContext, u as BuiltDurableObjectContainerImage, v as VersionsUploadProps, y as WorkerBuildResult } from "./context-DOE6X8vr.mjs";
|
|
3
|
+
import { ContainerNormalizedConfig } from "@cloudflare/containers-shared";
|
|
4
|
+
import { AssetsOptions, Binding as Binding$1, CacheOptions, CfCapnp, CfModule, CfPlacement, CfScriptFormat, CfUserLimits, CfWorkerInit, ComplianceConfig, Config, CustomDomainRoute, DurableObjectContainerApp, ExportsReconciliationErrorDetail, ExportsReconciliationResult, Json, LegacyAssetPaths, Observability, ParseError, PreviewsConfig, RawConfig, ResolvedDurableObjectContainerApp, Route, StartDevWorkerInput, StreamingTailConsumer, TailConsumer, WorkerMetadataBinding, ZoneIdRoute, ZoneNameRoute } from "@cloudflare/workers-utils";
|
|
5
|
+
import { FormData } from "undici";
|
|
6
|
+
import { NodeJSCompatMode } from "@cloudflare/workers-utils/node-compat";
|
|
7
|
+
import { ParsedBuildOutputContainerConfig, ParsedBuildOutputRootConfig, ParsedBuildOutputWorkerConfig } from "@cloudflare/config";
|
|
8
|
+
import Protocol$1 from "devtools-protocol";
|
|
9
|
+
//#region src/deploy/helpers/bundle-reporter.d.ts
|
|
13
10
|
interface BundleSize {
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
size: number;
|
|
12
|
+
gzipSize: number;
|
|
16
13
|
}
|
|
17
14
|
declare function getSize(modules: Pick<CfModule, "content">[]): Promise<BundleSize>;
|
|
18
15
|
declare function printBundleSize({ size, gzipSize }: BundleSize): void;
|
|
19
|
-
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/deploy/helpers/assets.d.ts
|
|
20
18
|
type AssetManifest = {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
[path: string]: {
|
|
20
|
+
hash: string;
|
|
21
|
+
size: number;
|
|
22
|
+
};
|
|
25
23
|
};
|
|
26
24
|
type AssetUploadStats = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
assetUploadDurationMs: number;
|
|
26
|
+
assetUploadIsBulk: boolean;
|
|
27
|
+
assetUploadFileCount: number;
|
|
28
|
+
assetUploadTotalBytes: number;
|
|
31
29
|
};
|
|
32
30
|
type AssetsUploadResult = {
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
jwt: string;
|
|
32
|
+
assetUploadStats: AssetUploadStats;
|
|
35
33
|
};
|
|
36
34
|
declare const syncAssets: (complianceConfig: ComplianceConfig, accountId: string | undefined, assetDirectory: string, scriptName: string, dispatchNamespace?: string) => Promise<AssetsUploadResult>;
|
|
37
35
|
declare function getEdgeKvUploadConcurrency(jwt: string): number;
|
|
38
36
|
declare const buildAssetManifest: (dir: string) => Promise<AssetManifest>;
|
|
39
37
|
declare function resolveAssetOptions({ assetsDir, main }: Pick<SharedDeployVersionsProps, "assetsDir" | "main">, config: Config): AssetsOptions | undefined;
|
|
40
|
-
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/deploy/deploy.d.ts
|
|
41
40
|
/**
|
|
42
41
|
* Consumer-specific values and integrations injected into `deploy()`.
|
|
43
42
|
*/
|
|
44
43
|
type DeployOptions = {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
44
|
+
deployCommand: string;
|
|
45
|
+
versionsDeployCommand: string;
|
|
46
|
+
d1ListCommand: string;
|
|
47
|
+
d1DeleteCommand: string;
|
|
48
|
+
queueCreateCommand: (queueName: string) => string;
|
|
49
|
+
secretPutCommand: string;
|
|
50
|
+
workersDevConfigFieldName: string;
|
|
51
|
+
workersDevConfigAssignment: (value: boolean) => string;
|
|
52
|
+
previewUrlsConfigFieldName: string;
|
|
53
|
+
previewUrlsConfigAssignment: (value: boolean) => string;
|
|
54
|
+
configFileName: string;
|
|
55
|
+
observabilityTargetPercentageField: string;
|
|
56
|
+
observabilityTargetCountField: string;
|
|
57
|
+
syncWorkersSite: ((complianceConfig: ComplianceConfig, accountId: string | undefined, scriptName: string, siteAssets: LegacyAssetPaths | undefined, preview: boolean, dryRun: boolean | undefined, oldAssetTTL: number | undefined) => Promise<{
|
|
58
|
+
manifest: {
|
|
59
|
+
[filePath: string]: string;
|
|
60
|
+
} | undefined;
|
|
61
|
+
namespace: string | undefined;
|
|
62
|
+
}>) | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* @deprecated Startup profiling is provided by deploy-helpers automatically.
|
|
65
|
+
*/
|
|
66
|
+
analyseBundle?: (workerBundle: string | FormData) => Promise<Record<string, unknown>>;
|
|
68
67
|
};
|
|
69
68
|
type DeployResult = {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
sourceMapSize?: number;
|
|
70
|
+
versionId: string | null;
|
|
71
|
+
workerTag: string | null;
|
|
72
|
+
assetUploadStats?: AssetUploadStats;
|
|
73
|
+
targets?: string[];
|
|
74
|
+
bundleSize?: BundleSize;
|
|
76
75
|
};
|
|
77
76
|
declare function deploy(props: DeployProps, config: ContainerlessConfig, buildResult: WorkerBuildResult, options: DeployOptions): Promise<DeployResult>;
|
|
78
|
-
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/deploy/versions-upload.d.ts
|
|
79
79
|
type VersionsUploadOptions = {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
80
|
+
deployCommand: string;
|
|
81
|
+
versionsUploadCommand: string;
|
|
82
|
+
versionsDeployCommand: string;
|
|
83
|
+
triggersDeployCommand: string;
|
|
84
|
+
d1ListCommand: string;
|
|
85
|
+
d1DeleteCommand: string;
|
|
86
|
+
queueCreateCommand: (queueName: string) => string;
|
|
87
|
+
versionsSecretPutCommand: string;
|
|
88
|
+
/**
|
|
89
|
+
* @deprecated Startup profiling is provided by deploy-helpers automatically.
|
|
90
|
+
*/
|
|
91
|
+
analyseBundle?: (workerBundle: string | FormData) => Promise<Record<string, unknown>>;
|
|
92
92
|
};
|
|
93
93
|
type VersionsUploadResult = {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
94
|
+
versionId: string | null;
|
|
95
|
+
workerTag: string | null;
|
|
96
|
+
assetUploadStats?: AssetUploadStats;
|
|
97
|
+
versionPreviewUrl?: string | undefined;
|
|
98
|
+
versionPreviewAliasUrl?: string | undefined;
|
|
99
|
+
bundleSize?: BundleSize;
|
|
100
100
|
};
|
|
101
101
|
declare function versionsUpload(props: VersionsUploadProps, config: ContainerlessConfig, buildResult: WorkerBuildResult, options: VersionsUploadOptions): Promise<VersionsUploadResult>;
|
|
102
|
-
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/triggers/deploy.d.ts
|
|
103
104
|
declare const PREVIEW_DOMAIN_PROVISIONING_NOTE = "Note: DNS and TLS certificate provisioning for Preview domains may continue after this deploy. If a new Preview URL does not work immediately, wait a few minutes and retry.";
|
|
104
105
|
declare function triggersDeploy(props: TriggerProps): Promise<string[] | void>;
|
|
105
106
|
declare function getSubdomainValues(config_workers_dev: boolean | undefined, config_preview_urls: boolean | undefined, routes: Route[]): {
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
workers_dev: boolean;
|
|
108
|
+
preview_urls?: boolean;
|
|
108
109
|
};
|
|
109
110
|
declare function getSubdomainValuesAPIMock(config_workers_dev: boolean | undefined, config_preview_urls: boolean | undefined, routes: Route[]): {
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
workers_dev: boolean;
|
|
112
|
+
preview_urls: boolean;
|
|
112
113
|
};
|
|
113
114
|
/**
|
|
114
115
|
* Renders the warning shown when the configured workers.dev state differs from
|
|
@@ -120,20 +121,21 @@ declare function getSubdomainValuesAPIMock(config_workers_dev: boolean | undefin
|
|
|
120
121
|
*/
|
|
121
122
|
declare function renderWorkersDevDefaultWarning(beforeEnabled: boolean, afterEnabled: boolean, configFile: string, workersDevConfigFieldName: string, workersDevConfigAssignment: (value: boolean) => string): string;
|
|
122
123
|
declare function validateEventTriggerTargets(config: Config, scriptName: string): void;
|
|
123
|
-
|
|
124
|
+
//#endregion
|
|
125
|
+
//#region src/triggers/subdomain.d.ts
|
|
124
126
|
type WorkersDevSubdomainRegistrationContext = "workers_dev" | "workflows";
|
|
125
127
|
type GetWorkersDevSubdomainOptions = {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
abortSignal?: AbortSignal | undefined;
|
|
129
|
+
autoRegisterSubdomain?: string | undefined;
|
|
130
|
+
configPath?: string | undefined;
|
|
131
|
+
registrationContext?: WorkersDevSubdomainRegistrationContext | undefined;
|
|
130
132
|
};
|
|
131
133
|
type WorkerSubdomain = {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
enabled: boolean;
|
|
135
|
+
previews_enabled: boolean;
|
|
136
|
+
url?: string;
|
|
137
|
+
/** Includes the leading "-" separator. */
|
|
138
|
+
preview_url_suffix?: string;
|
|
137
139
|
};
|
|
138
140
|
/**
|
|
139
141
|
* Gets the <user-subdomain>.(fed.)workers.dev URL for the given account.
|
|
@@ -149,15 +151,16 @@ declare function getWorkersDevSubdomain(complianceConfig: ComplianceConfig, acco
|
|
|
149
151
|
declare function getWorkersDevSubdomainIfAccessible(complianceConfig: ComplianceConfig, accountId: string, options?: GetWorkersDevSubdomainOptions): Promise<string | undefined>;
|
|
150
152
|
/** Gets the Worker-scoped subdomain configuration and routable URLs. */
|
|
151
153
|
declare function getWorkerSubdomain(complianceConfig: ComplianceConfig, accountId: string, workerName: string): Promise<WorkerSubdomain>;
|
|
152
|
-
|
|
154
|
+
//#endregion
|
|
155
|
+
//#region src/triggers/zones.d.ts
|
|
153
156
|
interface Zone {
|
|
154
|
-
|
|
155
|
-
|
|
157
|
+
id: string;
|
|
158
|
+
host: string;
|
|
156
159
|
}
|
|
157
160
|
type ZoneIdCache = Map<string, Promise<string | null>>;
|
|
158
161
|
declare function getZoneForRoute(complianceConfig: ComplianceConfig, from: {
|
|
159
|
-
|
|
160
|
-
|
|
162
|
+
route: Route;
|
|
163
|
+
accountId: string;
|
|
161
164
|
}, zoneIdCache?: ZoneIdCache): Promise<Zone | undefined>;
|
|
162
165
|
/**
|
|
163
166
|
* Given something that resembles a host, try to infer a zone id from it.
|
|
@@ -167,117 +170,119 @@ declare function getZoneForRoute(complianceConfig: ComplianceConfig, from: {
|
|
|
167
170
|
* lopping off subdomains until we get a hit from the API.
|
|
168
171
|
*/
|
|
169
172
|
declare function getZoneIdFromHost(complianceConfig: ComplianceConfig, from: {
|
|
170
|
-
|
|
171
|
-
|
|
173
|
+
host: string;
|
|
174
|
+
accountId: string;
|
|
172
175
|
}, zoneIdCache?: ZoneIdCache): Promise<string>;
|
|
173
|
-
|
|
176
|
+
//#endregion
|
|
177
|
+
//#region src/triggers/publish-routes.d.ts
|
|
174
178
|
type RouteObject = ZoneIdRoute | ZoneNameRoute | CustomDomainRoute;
|
|
175
179
|
type CustomDomain = {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
180
|
+
id: string;
|
|
181
|
+
zone_id: string;
|
|
182
|
+
zone_name: string;
|
|
183
|
+
hostname: string;
|
|
184
|
+
service: string;
|
|
185
|
+
environment: string;
|
|
186
|
+
enabled: boolean;
|
|
187
|
+
previews_enabled: boolean;
|
|
184
188
|
};
|
|
185
189
|
type UpdatedCustomDomain = CustomDomain & {
|
|
186
|
-
|
|
190
|
+
modified: boolean;
|
|
187
191
|
};
|
|
188
192
|
type ConflictingCustomDomain = CustomDomain & {
|
|
189
|
-
|
|
190
|
-
|
|
193
|
+
external_dns_record_id?: string | null;
|
|
194
|
+
external_cert_id?: string;
|
|
191
195
|
};
|
|
192
196
|
type CustomDomainChangeset = {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
+
added: CustomDomain[];
|
|
198
|
+
removed: CustomDomain[];
|
|
199
|
+
updated: UpdatedCustomDomain[];
|
|
200
|
+
conflicting: ConflictingCustomDomain[];
|
|
197
201
|
};
|
|
198
202
|
declare function renderRoute(route: Route): string;
|
|
199
203
|
/**
|
|
200
204
|
* Associate the newly deployed Worker with the given routes.
|
|
201
205
|
*/
|
|
202
|
-
declare function publishRoutes(complianceConfig: ComplianceConfig, routes: Route[], { workerUrl, scriptName, accountId
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
+
declare function publishRoutes(complianceConfig: ComplianceConfig, routes: Route[], { workerUrl, scriptName, accountId }: {
|
|
207
|
+
workerUrl: string;
|
|
208
|
+
scriptName: string;
|
|
209
|
+
accountId: string;
|
|
206
210
|
}): Promise<string[]>;
|
|
207
211
|
declare function publishCustomDomains(complianceConfig: ComplianceConfig, workerUrl: string, accountId: string, scriptName: string, domains: Array<RouteObject>): Promise<TriggerDeployment>;
|
|
208
|
-
|
|
212
|
+
//#endregion
|
|
213
|
+
//#region src/triggers/queue-consumers.d.ts
|
|
209
214
|
type QueueJurisdiction = "eu" | "us" | "fedramp";
|
|
210
215
|
interface PostQueueBody {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
216
|
+
queue_name: string;
|
|
217
|
+
jurisdiction?: QueueJurisdiction;
|
|
218
|
+
settings?: QueueSettings;
|
|
214
219
|
}
|
|
215
220
|
interface QueueSettings {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
221
|
+
delivery_delay?: number;
|
|
222
|
+
delivery_paused?: boolean;
|
|
223
|
+
message_retention_period?: number;
|
|
219
224
|
}
|
|
220
225
|
interface PostQueueResponse {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
+
queue_id: string;
|
|
227
|
+
queue_name: string;
|
|
228
|
+
settings?: QueueSettings;
|
|
229
|
+
created_on: string;
|
|
230
|
+
modified_on: string;
|
|
226
231
|
}
|
|
227
232
|
interface QueueResponse {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
233
|
+
queue_id: string;
|
|
234
|
+
queue_name: string;
|
|
235
|
+
jurisdiction?: QueueJurisdiction;
|
|
236
|
+
created_on: string;
|
|
237
|
+
modified_on: string;
|
|
238
|
+
producers: Producer[];
|
|
239
|
+
producers_total_count: number;
|
|
240
|
+
consumers: Consumer[];
|
|
241
|
+
consumers_total_count: number;
|
|
242
|
+
settings?: QueueSettings;
|
|
238
243
|
}
|
|
239
244
|
interface ScriptReference {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
245
|
+
namespace?: string;
|
|
246
|
+
script?: string;
|
|
247
|
+
service?: string;
|
|
248
|
+
environment?: string;
|
|
244
249
|
}
|
|
245
250
|
type Producer = ScriptReference & {
|
|
246
|
-
|
|
247
|
-
|
|
251
|
+
type: string;
|
|
252
|
+
bucket_name?: string;
|
|
248
253
|
};
|
|
249
254
|
type Consumer = ScriptReference & {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
+
dead_letter_queue?: string;
|
|
256
|
+
settings: ConsumerSettings;
|
|
257
|
+
consumer_id: string;
|
|
258
|
+
bucket_name?: string;
|
|
259
|
+
type: string;
|
|
255
260
|
};
|
|
256
261
|
interface TypedConsumerResponse extends Consumer {
|
|
257
|
-
|
|
258
|
-
|
|
262
|
+
queue_name: string;
|
|
263
|
+
created_on: string;
|
|
259
264
|
}
|
|
260
265
|
interface PostTypedConsumerBody {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
+
type: string;
|
|
267
|
+
script_name?: string;
|
|
268
|
+
environment_name?: string;
|
|
269
|
+
settings: ConsumerSettings;
|
|
270
|
+
dead_letter_queue?: string;
|
|
266
271
|
}
|
|
267
272
|
interface ConsumerSettings {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
273
|
+
batch_size?: number;
|
|
274
|
+
max_retries?: number;
|
|
275
|
+
max_wait_time_ms?: number;
|
|
276
|
+
max_concurrency?: number | null;
|
|
277
|
+
visibility_timeout_ms?: number;
|
|
278
|
+
retry_delay?: number;
|
|
274
279
|
}
|
|
275
280
|
interface PurgeQueueBody {
|
|
276
|
-
|
|
281
|
+
delete_messages_permanently: boolean;
|
|
277
282
|
}
|
|
278
283
|
interface PurgeQueueResponse {
|
|
279
|
-
|
|
280
|
-
|
|
284
|
+
started_at: string;
|
|
285
|
+
complete: boolean;
|
|
281
286
|
}
|
|
282
287
|
declare function listQueues(complianceConfig: ComplianceConfig, accountId: string, page?: number, name?: string): Promise<QueueResponse[]>;
|
|
283
288
|
declare function getQueue(complianceConfig: ComplianceConfig, accountId: string, queueName: string, queueCreateCommand?: (queueName: string) => string): Promise<QueueResponse>;
|
|
@@ -289,12 +294,14 @@ declare function listConsumers(complianceConfig: ComplianceConfig, accountId: st
|
|
|
289
294
|
declare function deleteWorkerConsumer(complianceConfig: ComplianceConfig, accountId: string, queueName: string, scriptName: string, envName: string | undefined, queueCreateCommand?: (queueName: string) => string): Promise<void>;
|
|
290
295
|
declare function updateQueueConsumers(complianceConfig: ComplianceConfig, accountId: string, scriptName: string, config: Config, queueCreateCommand: (queueName: string) => string): Promise<Promise<TriggerDeployment>[]>;
|
|
291
296
|
declare function ensureQueuesExistByConfig(config: Config, accountId: string, includeProducers?: boolean, scriptName?: string, queueCreateCommand?: (queueName: string) => string): Promise<void>;
|
|
292
|
-
|
|
297
|
+
//#endregion
|
|
298
|
+
//#region src/deploy/helpers/placement.d.ts
|
|
293
299
|
/**
|
|
294
300
|
* Parse placement out of a Config
|
|
295
301
|
*/
|
|
296
302
|
declare function parseConfigPlacement(placement: Config["placement"]): CfPlacement | undefined;
|
|
297
|
-
|
|
303
|
+
//#endregion
|
|
304
|
+
//#region src/deploy/helpers/worker-not-found-error.d.ts
|
|
298
305
|
/**
|
|
299
306
|
This is the error code from the Cloudflare API signaling that a worker could not be found on the target account
|
|
300
307
|
*/
|
|
@@ -314,7 +321,8 @@ declare const workerNotFoundErrorMessage = "This Worker does not exist on your a
|
|
|
314
321
|
* @returns true if the object represents an error from the Cloudflare API caused by a not found worker, false otherwise
|
|
315
322
|
*/
|
|
316
323
|
declare function isWorkerNotFoundError(error: unknown): boolean;
|
|
317
|
-
|
|
324
|
+
//#endregion
|
|
325
|
+
//#region src/deploy/helpers/error-codes.d.ts
|
|
318
326
|
/**
|
|
319
327
|
* Cloudflare API error codes used by deploy-helpers.
|
|
320
328
|
*/
|
|
@@ -353,21 +361,22 @@ declare const ACTOR_BINDING_DEPENDS_ON_EXPORT_CODE = 100406;
|
|
|
353
361
|
declare const WORKFLOW_CRON_REQUIRES_PAID_PLAN_CODE = 10208;
|
|
354
362
|
/** Workflows API code for `workflow.jurisdiction_immutable`. */
|
|
355
363
|
declare const WORKFLOW_JURISDICTION_IMMUTABLE_CODE = 10209;
|
|
356
|
-
|
|
364
|
+
//#endregion
|
|
365
|
+
//#region src/deploy/helpers/secrets-validation.d.ts
|
|
357
366
|
type SecretsValidationOptions = {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
367
|
+
type: "deploy";
|
|
368
|
+
workerExists: boolean;
|
|
369
|
+
secretPutCommand: string;
|
|
370
|
+
uploadCommand: string;
|
|
362
371
|
} | {
|
|
363
|
-
|
|
372
|
+
type: "upload";
|
|
364
373
|
};
|
|
365
374
|
type MissingSecretsOptions = Exclude<SecretsValidationOptions, {
|
|
366
|
-
|
|
375
|
+
type: "upload";
|
|
367
376
|
}> | {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
377
|
+
type: "upload";
|
|
378
|
+
secretPutCommand: string;
|
|
379
|
+
uploadCommand: string;
|
|
371
380
|
};
|
|
372
381
|
/**
|
|
373
382
|
* When `secrets.required` is defined in config, validate the secrets exist on the Worker.
|
|
@@ -385,9 +394,10 @@ declare function addRequiredSecretsInheritBindings(config: Config, bindings: Rec
|
|
|
385
394
|
* error in response.errors, which maps to individual err.notes entries.
|
|
386
395
|
*/
|
|
387
396
|
declare function handleMissingSecretsError(err: unknown, config: Config, options: MissingSecretsOptions): void;
|
|
388
|
-
|
|
397
|
+
//#endregion
|
|
398
|
+
//#region src/deploy/helpers/diff-json.d.ts
|
|
389
399
|
type JsonLike = string | number | boolean | null | JsonLike[] | undefined | {
|
|
390
|
-
|
|
400
|
+
[id: string]: JsonLike;
|
|
391
401
|
};
|
|
392
402
|
/**
|
|
393
403
|
* Given two objects A and B that are Json serializable this function computes the difference between them
|
|
@@ -425,22 +435,23 @@ declare function isNonDestructive(diff: JsonLike): boolean;
|
|
|
425
435
|
* @returns True if the value represents a value modified, false otherwise
|
|
426
436
|
*/
|
|
427
437
|
declare function isModifiedDiffValue<T extends JsonLike>(value: unknown): value is {
|
|
428
|
-
|
|
429
|
-
|
|
438
|
+
__old: T;
|
|
439
|
+
__new: T;
|
|
430
440
|
};
|
|
431
|
-
|
|
441
|
+
//#endregion
|
|
442
|
+
//#region src/deploy/helpers/config-diffs.d.ts
|
|
432
443
|
/**
|
|
433
444
|
* Object representing the difference of two configuration objects.
|
|
434
445
|
*/
|
|
435
446
|
type ConfigDiff = {
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
447
|
+
/** The actual (raw) computed diff of the two objects */
|
|
448
|
+
diff: Record<string, JsonLike> | null;
|
|
449
|
+
/**
|
|
450
|
+
* Flag indicating whether the difference includes some destructive changes.
|
|
451
|
+
*
|
|
452
|
+
* In other words, if the second config is not applying any change or only adding options, such diff is considered non destructive, on the other hand if the config is removing or modifying values it is considered destructive instead.
|
|
453
|
+
*/
|
|
454
|
+
nonDestructive: boolean;
|
|
444
455
|
};
|
|
445
456
|
/**
|
|
446
457
|
* Computes the difference between a remote representation of a Worker's config and a local configuration.
|
|
@@ -461,27 +472,28 @@ declare function getRemoteConfigDiff(remoteConfig: RawConfig, localResolvedConfi
|
|
|
461
472
|
* @returns The patch object to pass to `experimental_patchConfig` to revert the changes
|
|
462
473
|
*/
|
|
463
474
|
declare function getConfigPatch(configDiff: {
|
|
464
|
-
|
|
465
|
-
|
|
475
|
+
diff: Record<string, JsonLike> | null;
|
|
476
|
+
nonDestructive: boolean;
|
|
466
477
|
}["diff"], targetEnvironment?: string | undefined): RawConfig;
|
|
467
|
-
|
|
478
|
+
//#endregion
|
|
479
|
+
//#region src/deploy/helpers/parse-bulk-input.d.ts
|
|
468
480
|
type DotEnvParser = (contents: string) => Record<string, string>;
|
|
469
481
|
declare function validateFileSecrets(content: unknown, jsonFilePath: string): content is Record<string, string | null>;
|
|
470
482
|
/** Error thrown when no input is provided to parseBulkInputToObject */
|
|
471
483
|
declare class NoInputError extends Error {
|
|
472
|
-
|
|
484
|
+
constructor();
|
|
473
485
|
}
|
|
474
486
|
/** Result from parsing bulk secret input without nullable values, including metadata for analytics */
|
|
475
487
|
type BulkInputResult = {
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
488
|
+
content: Record<string, string>;
|
|
489
|
+
secretSource: "file" | "stdin";
|
|
490
|
+
secretFormat: "json" | "dotenv";
|
|
479
491
|
};
|
|
480
492
|
/** Result from parsing bulk secret input with nullable values, including metadata for analytics */
|
|
481
493
|
type BulkInputNullableResult = {
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
494
|
+
content: Record<string, string | null>;
|
|
495
|
+
secretSource: "file" | "stdin";
|
|
496
|
+
secretFormat: "json" | "dotenv";
|
|
485
497
|
};
|
|
486
498
|
/**
|
|
487
499
|
* Parses JSON or dotenv secrets from a file or stdin, excluding null values.
|
|
@@ -495,26 +507,31 @@ type BulkInputNullableResult = {
|
|
|
495
507
|
declare function parseBulkInputToObject(input?: string, includeNull?: false, parseDotEnv?: DotEnvParser): Promise<BulkInputResult | undefined>;
|
|
496
508
|
/** Override for callers that need nullable */
|
|
497
509
|
declare function parseBulkInputToObject(input?: string, includeNull?: true, parseDotEnv?: DotEnvParser): Promise<BulkInputNullableResult | undefined>;
|
|
498
|
-
|
|
510
|
+
//#endregion
|
|
511
|
+
//#region src/deploy/helpers/capnp.d.ts
|
|
499
512
|
declare function handleUnsafeCapnp(capnp: CfCapnp): Buffer;
|
|
500
|
-
|
|
513
|
+
//#endregion
|
|
514
|
+
//#region src/deploy/helpers/workers-sites-bindings.d.ts
|
|
501
515
|
/**
|
|
502
516
|
* Inject bindings into the Worker to support Workers Sites. These are injected at the last minute so that
|
|
503
517
|
* they don't display in the output of `printBindings()`
|
|
504
518
|
*/
|
|
505
519
|
declare function addWorkersSitesBindings(bindings: Record<string, Binding$1>, namespace: string | undefined, manifest: {
|
|
506
|
-
|
|
520
|
+
[filePath: string]: string;
|
|
507
521
|
} | undefined, format: CfScriptFormat): {
|
|
508
|
-
|
|
522
|
+
[x: string]: Binding$1;
|
|
509
523
|
};
|
|
510
|
-
|
|
524
|
+
//#endregion
|
|
525
|
+
//#region src/deploy/helpers/deploy-wfp.d.ts
|
|
511
526
|
declare function deployWfpUserWorker(dispatchNamespace: string, versionId: string | null): void;
|
|
512
|
-
|
|
527
|
+
//#endregion
|
|
528
|
+
//#region src/deploy/helpers/deploy-confirm.d.ts
|
|
513
529
|
declare function getDeployConfirmFunction(options: {
|
|
514
|
-
|
|
515
|
-
|
|
530
|
+
strictMode?: boolean;
|
|
531
|
+
strictModeAbortMessage?: string;
|
|
516
532
|
}): (text: string) => Promise<boolean>;
|
|
517
|
-
|
|
533
|
+
//#endregion
|
|
534
|
+
//#region src/deploy/helpers/preview-alias.d.ts
|
|
518
535
|
/**
|
|
519
536
|
* Sanitizes a branch name to create a valid DNS label alias.
|
|
520
537
|
* Converts to lowercase, replaces invalid chars with dashes, removes consecutive dashes.
|
|
@@ -531,12 +548,66 @@ declare function createTruncatedAlias(branchName: string, sanitizedAlias: string
|
|
|
531
548
|
* Returns undefined if not in a git directory or requirements cannot be met.
|
|
532
549
|
*/
|
|
533
550
|
declare function generatePreviewAlias(scriptName: string): string | undefined;
|
|
534
|
-
|
|
551
|
+
//#endregion
|
|
552
|
+
//#region ../../node_modules/.pnpm/@cspotcode+source-map-support@0.8.1/node_modules/@cspotcode/source-map-support/source-map-support.d.ts
|
|
553
|
+
// Type definitions for source-map-support 0.5
|
|
554
|
+
// Project: https://github.com/evanw/node-source-map-support
|
|
555
|
+
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
|
|
556
|
+
// Jason Cheatham <https://github.com/jason0x43>
|
|
557
|
+
// Alcedo Nathaniel De Guzman Jr <https://github.com/natealcedo>
|
|
558
|
+
// Griffin Yourick <https://github.com/tough-griff>
|
|
559
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
560
|
+
interface RawSourceMap {
|
|
561
|
+
version: 3;
|
|
562
|
+
sources: string[];
|
|
563
|
+
names: string[];
|
|
564
|
+
sourceRoot?: string;
|
|
565
|
+
sourcesContent?: string[];
|
|
566
|
+
mappings: string;
|
|
567
|
+
file: string;
|
|
568
|
+
}
|
|
569
|
+
/**
|
|
570
|
+
* Output of retrieveSourceMap().
|
|
571
|
+
* From source-map-support:
|
|
572
|
+
* The map field may be either a string or the parsed JSON object (i.e.,
|
|
573
|
+
* it must be a valid argument to the SourceMapConsumer constructor).
|
|
574
|
+
*/
|
|
575
|
+
interface UrlAndMap {
|
|
576
|
+
url: string;
|
|
577
|
+
map: string | RawSourceMap;
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* Options to install().
|
|
581
|
+
*/
|
|
582
|
+
interface Options {
|
|
583
|
+
handleUncaughtExceptions?: boolean | undefined;
|
|
584
|
+
hookRequire?: boolean | undefined;
|
|
585
|
+
emptyCacheBetweenOperations?: boolean | undefined;
|
|
586
|
+
environment?: 'auto' | 'browser' | 'node' | undefined;
|
|
587
|
+
overrideRetrieveFile?: boolean | undefined;
|
|
588
|
+
overrideRetrieveSourceMap?: boolean | undefined;
|
|
589
|
+
retrieveFile?(path: string): string;
|
|
590
|
+
retrieveSourceMap?(source: string): UrlAndMap | null;
|
|
591
|
+
/**
|
|
592
|
+
* Set false to disable redirection of require / import `source-map-support` to `@cspotcode/source-map-support`
|
|
593
|
+
*/
|
|
594
|
+
redirectConflictingLibrary?: boolean;
|
|
595
|
+
/**
|
|
596
|
+
* Callback will be called every time we redirect due to `redirectConflictingLibrary`
|
|
597
|
+
* This allows consumers to log helpful warnings if they choose.
|
|
598
|
+
* @param parent NodeJS.Module which made the require() or require.resolve() call
|
|
599
|
+
* @param options options object internally passed to node's `_resolveFilename` hook
|
|
600
|
+
*/
|
|
601
|
+
onConflictingLibraryRedirect?: (request: string, parent: any, isMain: boolean, options: any, redirectedRequest: string) => void;
|
|
602
|
+
}
|
|
603
|
+
//#endregion
|
|
604
|
+
//#region src/deploy/helpers/sourcemap.d.ts
|
|
535
605
|
type RetrieveSourceMapFunction = NonNullable<Options["retrieveSourceMap"]>;
|
|
536
606
|
declare function maybeRetrieveFileSourceMap(filePath?: string): ReturnType<RetrieveSourceMapFunction>;
|
|
537
|
-
declare function getSourceMappedStack(details: Protocol.Runtime.ExceptionDetails): string;
|
|
607
|
+
declare function getSourceMappedStack(details: Protocol$1.Runtime.ExceptionDetails): string;
|
|
538
608
|
declare function getSourceMappedString(value: string, retrieveSourceMap?: RetrieveSourceMapFunction): string;
|
|
539
|
-
|
|
609
|
+
//#endregion
|
|
610
|
+
//#region src/deploy/helpers/node-compat.d.ts
|
|
540
611
|
/**
|
|
541
612
|
* Computes and validates the Node.js compatibility mode we are running.
|
|
542
613
|
*
|
|
@@ -548,89 +619,94 @@ declare function getSourceMappedString(value: string, retrieveSourceMap?: Retrie
|
|
|
548
619
|
* @param compatibilityFlags The compatibility flags
|
|
549
620
|
* @param noBundle Whether to skip internal build steps and directly deploy script
|
|
550
621
|
*
|
|
551
|
-
*/ declare function validateNodeCompatMode(compatibilityDateStr: string | undefined
|
|
552
|
-
compatibilityFlags: string[], { noBundle
|
|
553
|
-
|
|
622
|
+
*/ declare function validateNodeCompatMode(compatibilityDateStr: string | undefined // Default to some arbitrary old date
|
|
623
|
+
, compatibilityFlags: string[], { noBundle }: {
|
|
624
|
+
noBundle?: boolean;
|
|
554
625
|
}): NodeJSCompatMode;
|
|
555
|
-
|
|
626
|
+
//#endregion
|
|
627
|
+
//#region src/deploy/helpers/validate-routes.d.ts
|
|
556
628
|
declare const validateRoutes: (routes: Route[], assets: AssetsOptions | undefined, workersDevEnabled?: boolean) => void;
|
|
557
|
-
|
|
629
|
+
//#endregion
|
|
630
|
+
//#region src/deploy/helpers/environments.d.ts
|
|
558
631
|
declare function hasDefinedEnvironments(config: Config): boolean;
|
|
559
632
|
declare function applyServiceAndEnvironmentTags(config: Config, tags: string[]): string[];
|
|
560
633
|
declare function warnOnErrorUpdatingServiceAndEnvironmentTags(): void;
|
|
561
634
|
declare function tagsAreEqual(a: string[], b: string[]): boolean;
|
|
562
|
-
|
|
635
|
+
//#endregion
|
|
636
|
+
//#region src/deploy/helpers/friendly-validator-errors.d.ts
|
|
563
637
|
type AnalyseBundle = (bundle: FormData | string) => Promise<unknown>;
|
|
564
638
|
declare function helpIfErrorIsSizeOrScriptStartup(err: unknown, dependencies: {
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
639
|
+
[path: string]: {
|
|
640
|
+
bytesInOutput: number;
|
|
641
|
+
};
|
|
568
642
|
}, workerBundle: FormData | string, projectRoot: string | undefined, analyseBundle?: AnalyseBundle): Promise<string | null>;
|
|
569
643
|
/**
|
|
570
644
|
* Returns a formatted error message that describes the script size error.
|
|
571
645
|
* It includes the largest dependencies if available.
|
|
572
646
|
*/
|
|
573
647
|
declare function diagnoseScriptSizeError(err: ParseError, dependencies: {
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
648
|
+
[path: string]: {
|
|
649
|
+
bytesInOutput: number;
|
|
650
|
+
};
|
|
577
651
|
}): string;
|
|
578
652
|
/**
|
|
579
653
|
* Returns a formatted error message that describes the startup error.
|
|
580
654
|
* If profiling is successful, it will include a link to the generated CPU profile.
|
|
581
655
|
*/
|
|
582
656
|
declare function diagnoseStartupError(err: ParseError, workerBundle: FormData | string, projectRoot: string | undefined, analyseBundle?: AnalyseBundle): Promise<string>;
|
|
583
|
-
|
|
657
|
+
//#endregion
|
|
658
|
+
//#region src/deploy/helpers/versions-types.d.ts
|
|
584
659
|
type Percentage = number;
|
|
585
660
|
type UUID = string;
|
|
586
661
|
type VersionId = UUID;
|
|
587
662
|
type ApiDeployment = {
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
663
|
+
id: string;
|
|
664
|
+
source: "api" | string;
|
|
665
|
+
strategy: "percentage" | string;
|
|
666
|
+
author_email: string;
|
|
667
|
+
annotations?: Record<string, string>;
|
|
668
|
+
created_on: string;
|
|
669
|
+
versions: Array<{
|
|
670
|
+
version_id: VersionId;
|
|
671
|
+
percentage: Percentage;
|
|
672
|
+
}>;
|
|
598
673
|
};
|
|
599
674
|
type ApiVersion = {
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
675
|
+
id: VersionId;
|
|
676
|
+
number: number;
|
|
677
|
+
metadata: {
|
|
678
|
+
created_on: string;
|
|
679
|
+
modified_on: string;
|
|
680
|
+
source: "api" | string;
|
|
681
|
+
author_id: string;
|
|
682
|
+
author_email: string;
|
|
683
|
+
};
|
|
684
|
+
annotations?: {
|
|
685
|
+
"workers/triggered_by"?: "upload" | string;
|
|
686
|
+
"workers/message"?: string;
|
|
687
|
+
"workers/tag"?: string;
|
|
688
|
+
};
|
|
689
|
+
resources: {
|
|
690
|
+
bindings: WorkerMetadataBinding[];
|
|
691
|
+
script: {
|
|
692
|
+
etag: string;
|
|
693
|
+
handlers: string[] | null;
|
|
694
|
+
placement_mode?: "smart";
|
|
695
|
+
last_deployed_from: string;
|
|
613
696
|
};
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
last_deployed_from: string;
|
|
621
|
-
};
|
|
622
|
-
script_runtime: {
|
|
623
|
-
compatibility_date?: string;
|
|
624
|
-
compatibility_flags?: string[];
|
|
625
|
-
usage_model: "bundled" | "unbound" | "standard";
|
|
626
|
-
limits: CfUserLimits;
|
|
627
|
-
containers?: CfWorkerInit["containers"];
|
|
628
|
-
};
|
|
697
|
+
script_runtime: {
|
|
698
|
+
compatibility_date?: string;
|
|
699
|
+
compatibility_flags?: string[];
|
|
700
|
+
usage_model: "bundled" | "unbound" | "standard";
|
|
701
|
+
limits: CfUserLimits;
|
|
702
|
+
containers?: CfWorkerInit["containers"];
|
|
629
703
|
};
|
|
630
|
-
|
|
704
|
+
};
|
|
705
|
+
startup_time_ms?: number;
|
|
631
706
|
};
|
|
632
707
|
type VersionCache = Map<VersionId, ApiVersion>;
|
|
633
|
-
|
|
708
|
+
//#endregion
|
|
709
|
+
//#region src/deploy/helpers/versions-api.d.ts
|
|
634
710
|
declare function fetchVersion(complianceConfig: ComplianceConfig, accountId: string, workerName: string, versionId: VersionId, versionCache: VersionCache | undefined): Promise<ApiVersion>;
|
|
635
711
|
declare function fetchVersions(complianceConfig: ComplianceConfig, accountId: string, workerName: string, versionCache: VersionCache | undefined, versionIds: VersionId[]): Promise<ApiVersion[]>;
|
|
636
712
|
declare function fetchLatestDeployments(complianceConfig: ComplianceConfig, accountId: string, workerName: string): Promise<ApiDeployment[]>;
|
|
@@ -638,153 +714,157 @@ declare function fetchLatestDeployment(complianceConfig: ComplianceConfig, accou
|
|
|
638
714
|
declare function fetchDeploymentVersions(complianceConfig: ComplianceConfig, accountId: string, workerName: string, deployment: ApiDeployment | undefined, versionCache: VersionCache): Promise<[ApiVersion[], Map<VersionId, Percentage>]>;
|
|
639
715
|
declare function fetchDeployableVersions(complianceConfig: ComplianceConfig, accountId: string, workerName: string, versionCache: VersionCache): Promise<ApiVersion[]>;
|
|
640
716
|
declare function createDeployment(complianceConfig: ComplianceConfig, accountId: string, workerName: string, versionTraffic: Map<VersionId, Percentage>, message: string | undefined, force: boolean | undefined, codeUpdateStrategy?: unknown): Promise<{
|
|
641
|
-
|
|
717
|
+
id: string;
|
|
642
718
|
}>;
|
|
643
719
|
type NonVersionedScriptSettings = {
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
720
|
+
logpush: boolean;
|
|
721
|
+
tags: string[] | null;
|
|
722
|
+
tail_consumers: TailConsumer[];
|
|
723
|
+
streaming_tail_consumers: StreamingTailConsumer[];
|
|
724
|
+
observability: Observability;
|
|
649
725
|
};
|
|
650
726
|
declare function patchNonVersionedScriptSettings(complianceConfig: ComplianceConfig, accountId: string, workerName: string, settings: Partial<NonVersionedScriptSettings>): Promise<Partial<NonVersionedScriptSettings>>;
|
|
651
|
-
|
|
727
|
+
//#endregion
|
|
728
|
+
//#region src/deploy/helpers/check-workflow-conflicts.d.ts
|
|
652
729
|
type Workflow = {
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
730
|
+
name: string;
|
|
731
|
+
id: string;
|
|
732
|
+
created_on: string;
|
|
733
|
+
modified_on: string;
|
|
734
|
+
script_name: string;
|
|
735
|
+
class_name: string;
|
|
736
|
+
jurisdiction?: string;
|
|
660
737
|
};
|
|
661
738
|
interface WorkflowConflict {
|
|
662
|
-
|
|
663
|
-
|
|
739
|
+
name: string;
|
|
740
|
+
currentOwner: string;
|
|
664
741
|
}
|
|
665
742
|
declare const WORKFLOW_NOT_FOUND_CODE = 10200;
|
|
666
743
|
declare function checkWorkflowConflicts(config: Config, accountId: string, scriptName: string): Promise<{
|
|
667
|
-
|
|
744
|
+
hasConflicts: false;
|
|
668
745
|
} | {
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
746
|
+
hasConflicts: true;
|
|
747
|
+
conflicts: WorkflowConflict[];
|
|
748
|
+
message: string;
|
|
672
749
|
}>;
|
|
673
|
-
|
|
750
|
+
//#endregion
|
|
751
|
+
//#region src/deploy/helpers/download-worker-config.d.ts
|
|
674
752
|
type CustomDomainsRes = {
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
753
|
+
id: string;
|
|
754
|
+
zone_id: string;
|
|
755
|
+
zone_name: string;
|
|
756
|
+
hostname: string;
|
|
757
|
+
service: string;
|
|
758
|
+
environment: string;
|
|
759
|
+
cert_id: string;
|
|
760
|
+
enabled: boolean;
|
|
761
|
+
previews_enabled: boolean;
|
|
684
762
|
}[];
|
|
685
763
|
type WorkerSubdomainRes = {
|
|
686
|
-
|
|
687
|
-
|
|
764
|
+
enabled: boolean;
|
|
765
|
+
previews_enabled: boolean;
|
|
688
766
|
};
|
|
689
767
|
type CronTriggersRes = {
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
768
|
+
schedules: {
|
|
769
|
+
cron: string;
|
|
770
|
+
created_on: Date;
|
|
771
|
+
modified_on: Date;
|
|
772
|
+
}[];
|
|
695
773
|
};
|
|
696
774
|
type RoutesRes = {
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
775
|
+
id: string;
|
|
776
|
+
pattern: string;
|
|
777
|
+
zone_name: string;
|
|
778
|
+
script: string;
|
|
701
779
|
}[];
|
|
702
780
|
/**
|
|
703
781
|
* Downloads the information required to construct a Wrangler config file for a Worker from the API.
|
|
704
782
|
*/
|
|
705
783
|
declare function fetchWorkerConfig(complianceConfig: ComplianceConfig, accountId: string, workerName: string, environment: string, fetchRoutes: boolean, fetchCustomDomains: boolean): Promise<{
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
};
|
|
784
|
+
bindings: import("@cloudflare/workers-utils").WorkerMetadataBinding[];
|
|
785
|
+
routes: RoutesRes;
|
|
786
|
+
customDomains: CustomDomainsRes;
|
|
787
|
+
subdomainStatus: WorkerSubdomainRes;
|
|
788
|
+
serviceEnvMetadata: {
|
|
789
|
+
environment: string;
|
|
790
|
+
created_on: string;
|
|
791
|
+
modified_on: string;
|
|
792
|
+
script: {
|
|
793
|
+
id: string;
|
|
794
|
+
tag: string;
|
|
795
|
+
tags: string[];
|
|
796
|
+
etag: string;
|
|
797
|
+
handlers: string[];
|
|
798
|
+
modified_on: string;
|
|
799
|
+
created_on: string;
|
|
800
|
+
migration_tag: string;
|
|
801
|
+
usage_model: "bundled" | "unbound";
|
|
802
|
+
limits: {
|
|
803
|
+
cpu_ms: number;
|
|
804
|
+
subrequests: number;
|
|
805
|
+
};
|
|
806
|
+
compatibility_date: string;
|
|
807
|
+
compatibility_flags: string[];
|
|
808
|
+
last_deployed_from?: "wrangler" | "dash" | "api";
|
|
809
|
+
placement_mode?: "smart";
|
|
810
|
+
tail_consumers?: import("@cloudflare/workers-utils").TailConsumer[];
|
|
811
|
+
observability?: import("@cloudflare/workers-utils").Observability;
|
|
735
812
|
};
|
|
736
|
-
|
|
813
|
+
};
|
|
814
|
+
cronTriggers: CronTriggersRes;
|
|
737
815
|
}>;
|
|
738
816
|
/**
|
|
739
817
|
* Downloads all the remote information we can gather for a worker and from them generates a raw configuration object that
|
|
740
818
|
* approximates what a wrangler config object for the worker was/would have been.
|
|
741
819
|
*/
|
|
742
820
|
declare function downloadWorkerConfig(complianceConfig: ComplianceConfig, workerName: string, environment: string, entrypoint: string, accountId: string, fetchRoutes: boolean, fetchCustomDomains: boolean): Promise<RawConfig>;
|
|
743
|
-
|
|
821
|
+
//#endregion
|
|
822
|
+
//#region src/deploy/helpers/durable.d.ts
|
|
744
823
|
/**
|
|
745
824
|
* For a given Worker + migrations config, figure out which migrations
|
|
746
825
|
* to upload based on the current migration tag of the deployed Worker.
|
|
747
826
|
*/
|
|
748
827
|
declare function getMigrationsToUpload(scriptName: string, props: {
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
828
|
+
accountId: string | undefined;
|
|
829
|
+
config: Config;
|
|
830
|
+
dispatchNamespace: string | undefined;
|
|
752
831
|
}): Promise<CfWorkerInit["migrations"]>;
|
|
753
832
|
/**
|
|
754
833
|
* Resolve which Durable Object lifecycle payload to send with the upload.
|
|
755
834
|
*/
|
|
756
835
|
declare function resolveDoLifecyclePayload(props: {
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
836
|
+
scriptName: string;
|
|
837
|
+
isDryRun: boolean | undefined;
|
|
838
|
+
accountId: string | undefined;
|
|
839
|
+
config: Config;
|
|
840
|
+
dispatchNamespace: string | undefined;
|
|
762
841
|
}): Promise<{
|
|
763
|
-
|
|
764
|
-
|
|
842
|
+
migrations: CfWorkerInit["migrations"];
|
|
843
|
+
exports: CfWorkerInit["exports"];
|
|
765
844
|
}>;
|
|
766
|
-
|
|
845
|
+
//#endregion
|
|
846
|
+
//#region src/deploy/helpers/durable-object-container-applications.d.ts
|
|
767
847
|
type DeployDurableObjectContainerApplicationsArgs = {
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
848
|
+
dispatchNamespace?: string;
|
|
849
|
+
versionId: string;
|
|
850
|
+
accountId: string;
|
|
851
|
+
scriptName: string;
|
|
852
|
+
/** Version uploads may initialize a missing application, but never update one. */
|
|
853
|
+
updateExisting?: boolean;
|
|
774
854
|
};
|
|
775
855
|
type PrepareDurableObjectContainerApplicationsArgs = {
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
856
|
+
accountId: string | undefined;
|
|
857
|
+
dispatchNamespace?: string;
|
|
858
|
+
dryRun: boolean;
|
|
859
|
+
scriptName: string;
|
|
860
|
+
/** Version uploads cannot initialize applications without named images. */
|
|
861
|
+
requireExistingImageLessApplications?: boolean;
|
|
862
|
+
deployCommand?: string;
|
|
863
|
+
versionsUploadCommand?: string;
|
|
784
864
|
};
|
|
785
865
|
type DurableObjectContainerApplication = Pick<ResolvedDurableObjectContainerApp, "class_name" | "name">;
|
|
786
866
|
type VersionedDurableObjectContainerApplication = DurableObjectContainerApplication & {
|
|
787
|
-
|
|
867
|
+
namespaceId?: string;
|
|
788
868
|
};
|
|
789
869
|
type PreparedContainerImages = Record<string, Record<string, string>>;
|
|
790
870
|
declare function createDurableObjectContainerApplication(application: DurableObjectContainerApplication, namespaceId: string): Promise<void>;
|
|
@@ -803,18 +883,18 @@ declare function getVersionedDurableObjectContainerApplications(versions: ApiVer
|
|
|
803
883
|
* These versions carry no managed-policy discriminator, so versions deploy
|
|
804
884
|
* cannot initialize their applications. A normal deploy must provision them first.
|
|
805
885
|
*/
|
|
806
|
-
declare function validateImageLessContainerApplicationsForUpload(config: ContainerlessConfig, containers: DurableObjectContainerApp[], { accountId, scriptName, deployCommand, versionsUploadCommand
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
886
|
+
declare function validateImageLessContainerApplicationsForUpload(config: ContainerlessConfig, containers: DurableObjectContainerApp[], { accountId, scriptName, deployCommand, versionsUploadCommand }: {
|
|
887
|
+
accountId: string;
|
|
888
|
+
scriptName: string;
|
|
889
|
+
deployCommand: string;
|
|
890
|
+
versionsUploadCommand: string;
|
|
811
891
|
}): Promise<void>;
|
|
812
892
|
/** Resolve every versioned application's namespace without creating applications. */
|
|
813
|
-
declare function resolveVersionedDurableObjectContainerApplications(config: Config, { applications, accountId, scriptName, allowMissingNamespaces
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
893
|
+
declare function resolveVersionedDurableObjectContainerApplications(config: Config, { applications, accountId, scriptName, allowMissingNamespaces }: {
|
|
894
|
+
applications: VersionedDurableObjectContainerApplication[];
|
|
895
|
+
accountId: string;
|
|
896
|
+
scriptName: string;
|
|
897
|
+
allowMissingNamespaces?: boolean;
|
|
818
898
|
}): Promise<VersionedDurableObjectContainerApplication[]>;
|
|
819
899
|
/**
|
|
820
900
|
* Ensure selected versions have applications after every namespace is resolved.
|
|
@@ -823,12 +903,12 @@ declare function resolveVersionedDurableObjectContainerApplications(config: Conf
|
|
|
823
903
|
* defaults, so rolling back a Worker never rolls back application-wide settings.
|
|
824
904
|
*/
|
|
825
905
|
declare function deployVersionedDurableObjectContainerApplications(config: Config, args: {
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
906
|
+
applications: VersionedDurableObjectContainerApplication[];
|
|
907
|
+
accountId: string;
|
|
908
|
+
scriptName: string;
|
|
829
909
|
}): Promise<void>;
|
|
830
910
|
/** Validate managed classes and prepare their named images before Worker upload. */
|
|
831
|
-
declare function prepareDurableObjectContainerApplications(config: ContainerlessConfig, durableObjectContainerConfig: DurableObjectContainerApp[], builtImages: BuiltDurableObjectContainerImage[], { accountId, dryRun, scriptName, dispatchNamespace, requireExistingImageLessApplications, deployCommand, versionsUploadCommand
|
|
911
|
+
declare function prepareDurableObjectContainerApplications(config: ContainerlessConfig, durableObjectContainerConfig: DurableObjectContainerApp[], builtImages: BuiltDurableObjectContainerImage[], { accountId, dryRun, scriptName, dispatchNamespace, requireExistingImageLessApplications, deployCommand, versionsUploadCommand }: PrepareDurableObjectContainerApplicationsArgs): Promise<PreparedContainerImages>;
|
|
832
912
|
/**
|
|
833
913
|
* Apply explicit application settings after an uploaded Worker's namespaces exist.
|
|
834
914
|
*
|
|
@@ -836,15 +916,17 @@ declare function prepareDurableObjectContainerApplications(config: Containerless
|
|
|
836
916
|
* applications and patch supplied changes; `updateExisting: false` makes version
|
|
837
917
|
* uploads create-only. Omitted settings and root Worker observability are ignored.
|
|
838
918
|
*/
|
|
839
|
-
declare function deployDurableObjectContainerApplications(config: ContainerlessConfig, durableObjectContainerConfig: DurableObjectContainerApp[], { versionId, accountId, scriptName, dispatchNamespace, updateExisting
|
|
840
|
-
|
|
919
|
+
declare function deployDurableObjectContainerApplications(config: ContainerlessConfig, durableObjectContainerConfig: DurableObjectContainerApp[], { versionId, accountId, scriptName, dispatchNamespace, updateExisting }: DeployDurableObjectContainerApplicationsArgs): Promise<void>;
|
|
920
|
+
//#endregion
|
|
921
|
+
//#region src/deploy/helpers/exports.d.ts
|
|
841
922
|
type ResolveExportsUploadPayloadProps = Parameters<typeof resolveDoLifecyclePayload>[0];
|
|
842
923
|
declare function resolveExportsUploadPayload(props: ResolveExportsUploadPayloadProps): Promise<{
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
924
|
+
migrations: CfWorkerInit["migrations"];
|
|
925
|
+
exports: CfWorkerInit["exports"];
|
|
926
|
+
headers: Record<string, string> | undefined;
|
|
846
927
|
}>;
|
|
847
|
-
|
|
928
|
+
//#endregion
|
|
929
|
+
//#region src/deploy/helpers/exports-reconciliation.d.ts
|
|
848
930
|
/**
|
|
849
931
|
* Render the success-side `exports_reconciliation` envelope to the logger.
|
|
850
932
|
* Emits nothing when the result has no entries to report (so a re-deploy
|
|
@@ -867,7 +949,8 @@ declare function renderExportsReconciliationError(details: ExportsReconciliation
|
|
|
867
949
|
* Validate the array shape so the renderer can rely on the typed fields.
|
|
868
950
|
*/
|
|
869
951
|
declare function isExportsReconciliationErrorDetails(value: unknown): value is ExportsReconciliationErrorDetail[];
|
|
870
|
-
|
|
952
|
+
//#endregion
|
|
953
|
+
//#region src/deploy/helpers/inconsistent-exports.d.ts
|
|
871
954
|
/**
|
|
872
955
|
* Build the user-facing error message for EWC code 100405
|
|
873
956
|
* (inconsistent declarative DO `exports` across versions in a
|
|
@@ -881,7 +964,8 @@ declare function isExportsReconciliationErrorDetails(value: unknown): value is E
|
|
|
881
964
|
* @returns The server message followed by consumer-specific recovery guidance.
|
|
882
965
|
*/
|
|
883
966
|
declare function renderInconsistentExportsAcrossVersionsError(serverMessage: string, versionsDeployAt100Command: string): string;
|
|
884
|
-
|
|
967
|
+
//#endregion
|
|
968
|
+
//#region src/deploy/helpers/binding-depends-on-export.d.ts
|
|
885
969
|
/**
|
|
886
970
|
* Build the user-facing error message for EWC code 100406
|
|
887
971
|
* (an actor binding references a Durable Object class declared in `exports`
|
|
@@ -894,40 +978,54 @@ declare function renderInconsistentExportsAcrossVersionsError(serverMessage: str
|
|
|
894
978
|
* only used in the unlikely event the server sends an empty message.
|
|
895
979
|
*/
|
|
896
980
|
declare function renderBindingDependsOnExportError(serverMessage: string): string;
|
|
897
|
-
|
|
981
|
+
//#endregion
|
|
982
|
+
//#region src/deploy/helpers/match-tag.d.ts
|
|
898
983
|
declare function verifyWorkerMatchesCITag(complianceConfig: ComplianceConfig, accountId: string, workerName: string, configPath: string | undefined): Promise<void>;
|
|
899
|
-
|
|
984
|
+
//#endregion
|
|
985
|
+
//#region src/deploy/helpers/check-remote-secrets-override.d.ts
|
|
900
986
|
declare function fetchSecrets(config: Config, scriptName: string, accountId: string): Promise<{
|
|
901
|
-
|
|
902
|
-
|
|
987
|
+
name: string;
|
|
988
|
+
type: string;
|
|
903
989
|
}[]>;
|
|
904
990
|
declare function checkRemoteSecretsOverride(config: Config, scriptName: string, accountId: string): Promise<{
|
|
905
|
-
|
|
991
|
+
override: false;
|
|
906
992
|
} | {
|
|
907
|
-
|
|
908
|
-
|
|
993
|
+
override: true;
|
|
994
|
+
deployErrorMessage: string;
|
|
909
995
|
}>;
|
|
910
|
-
|
|
996
|
+
//#endregion
|
|
997
|
+
//#region src/deploy/helpers/confirm-latest-deployment-overwrite.d.ts
|
|
911
998
|
/** Confirm replacement of the current deployment, preserving the public boolean API. */
|
|
912
999
|
declare function confirmLatestDeploymentOverwrite(config: Config, accountId: string, scriptName: string, deployCommand: string, versionsDeployCommand: string): Promise<boolean>;
|
|
913
1000
|
declare function printVersions(versions: ApiVersion[], traffic: Map<VersionId, Percentage>): void;
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
1001
|
+
//#endregion
|
|
1002
|
+
//#region src/deploy/helpers/hash.d.ts
|
|
1003
|
+
/**
|
|
1004
|
+
* Initialize a reusable hasher for asset manifest hashes.
|
|
1005
|
+
*
|
|
1006
|
+
* Finish WASM initialization before reading any assets, then hash each file
|
|
1007
|
+
* synchronously so concurrent callers only retain one file's contents at a time.
|
|
1008
|
+
*
|
|
1009
|
+
* @returns A function that hashes a file's base64 contents and extension.
|
|
1010
|
+
*/
|
|
1011
|
+
declare function createFileHasher(): Promise<(filepath: string) => string>;
|
|
1012
|
+
//#endregion
|
|
1013
|
+
//#region src/deploy/helpers/jwt.d.ts
|
|
917
1014
|
declare const decodeJwtPayload: (token: string) => any;
|
|
918
1015
|
declare const isJwtExpired: (token: string) => boolean | undefined;
|
|
919
|
-
|
|
1016
|
+
//#endregion
|
|
1017
|
+
//#region src/deploy/helpers/package-dependencies.d.ts
|
|
920
1018
|
/**
|
|
921
1019
|
* A single npm package dependency entry, matching the upload API schema
|
|
922
1020
|
* see: https://developers.cloudflare.com/api/resources/workers/subresources/scripts/methods/update.
|
|
923
1021
|
*/
|
|
924
1022
|
type PackageDependency = {
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
1023
|
+
/** The npm package name, e.g. "lodash" or "@cloudflare/workers-types". */
|
|
1024
|
+
name: string;
|
|
1025
|
+
/** The version constraint as written in package.json, e.g. "^4.17.21". */
|
|
1026
|
+
packageJsonVersion: string;
|
|
1027
|
+
/** The exact version resolved and installed by the package manager, e.g. "4.17.22". */
|
|
1028
|
+
installedVersion: string;
|
|
931
1029
|
};
|
|
932
1030
|
/**
|
|
933
1031
|
* Collects npm package dependency metadata from the project's package.json.
|
|
@@ -949,17 +1047,18 @@ type PackageDependency = {
|
|
|
949
1047
|
* cannot be read or no valid dependencies are found
|
|
950
1048
|
*/
|
|
951
1049
|
declare function collectPackageDependencies(projectPath: string, excludePackages?: string[]): Promise<PackageDependency[] | undefined>;
|
|
952
|
-
|
|
1050
|
+
//#endregion
|
|
1051
|
+
//#region src/deploy/helpers/provision-bindings.d.ts
|
|
953
1052
|
type Settings = {
|
|
954
|
-
|
|
1053
|
+
bindings: Array<WorkerMetadataBinding>;
|
|
955
1054
|
};
|
|
956
1055
|
type ProvisionBindingsResult = {
|
|
957
|
-
|
|
1056
|
+
warnOnSkippedProvisioning: () => void;
|
|
958
1057
|
};
|
|
959
1058
|
declare function provisionBindings(bindings: StartDevWorkerInput["bindings"], accountId: string, scriptName: string, autoCreate: boolean, config: Config, options: {
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
1059
|
+
skipConfigWriteback?: boolean;
|
|
1060
|
+
d1ListCommand: string;
|
|
1061
|
+
d1DeleteCommand: string;
|
|
963
1062
|
}): Promise<ProvisionBindingsResult>;
|
|
964
1063
|
declare function getSettings(complianceConfig: ComplianceConfig, accountId: string, scriptName: string): Promise<Settings>;
|
|
965
1064
|
/**
|
|
@@ -969,161 +1068,162 @@ declare function getSettings(complianceConfig: ComplianceConfig, accountId: stri
|
|
|
969
1068
|
* @returns Consumer-specific database listing and deletion guidance.
|
|
970
1069
|
*/
|
|
971
1070
|
declare function renderD1DatabaseLimitError(accountId: string, d1ListCommand: string, d1DeleteCommand: string): string;
|
|
972
|
-
|
|
1071
|
+
//#endregion
|
|
1072
|
+
//#region src/preview/api.d.ts
|
|
973
1073
|
interface Binding {
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
};
|
|
1002
|
-
params?: Array<{
|
|
1003
|
-
name: string;
|
|
1004
|
-
}>;
|
|
1074
|
+
type: string;
|
|
1075
|
+
text?: string;
|
|
1076
|
+
json?: Json;
|
|
1077
|
+
namespace_id?: string;
|
|
1078
|
+
workflow_name?: string;
|
|
1079
|
+
destination_address?: string;
|
|
1080
|
+
allowed_destination_addresses?: string[];
|
|
1081
|
+
allowed_sender_addresses?: string[];
|
|
1082
|
+
queue_name?: string;
|
|
1083
|
+
delivery_delay?: number;
|
|
1084
|
+
database_id?: string;
|
|
1085
|
+
database_name?: string;
|
|
1086
|
+
bucket_name?: string;
|
|
1087
|
+
jurisdiction?: string;
|
|
1088
|
+
index_name?: string;
|
|
1089
|
+
instance_name?: string;
|
|
1090
|
+
id?: string;
|
|
1091
|
+
service?: string;
|
|
1092
|
+
environment?: string;
|
|
1093
|
+
props?: Record<string, unknown>;
|
|
1094
|
+
cross_account_grant?: string;
|
|
1095
|
+
dataset?: string;
|
|
1096
|
+
namespace?: string;
|
|
1097
|
+
outbound?: {
|
|
1098
|
+
worker: {
|
|
1099
|
+
service: string;
|
|
1100
|
+
environment?: string;
|
|
1005
1101
|
};
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1102
|
+
params?: Array<{
|
|
1103
|
+
name: string;
|
|
1104
|
+
}>;
|
|
1105
|
+
};
|
|
1106
|
+
certificate_id?: string;
|
|
1107
|
+
pipeline?: string;
|
|
1108
|
+
stream?: string;
|
|
1109
|
+
store_id?: string;
|
|
1110
|
+
secret_name?: string;
|
|
1111
|
+
simple?: {
|
|
1112
|
+
limit: number;
|
|
1113
|
+
period: 10 | 60;
|
|
1114
|
+
};
|
|
1115
|
+
service_id?: string;
|
|
1116
|
+
tunnel_id?: string;
|
|
1117
|
+
network_id?: string;
|
|
1118
|
+
destination?: string;
|
|
1119
|
+
staging?: boolean;
|
|
1120
|
+
enable_timer?: boolean;
|
|
1121
|
+
app_id?: string;
|
|
1122
|
+
entrypoint?: string;
|
|
1123
|
+
class_name?: string;
|
|
1124
|
+
script_name?: string;
|
|
1025
1125
|
}
|
|
1026
1126
|
type EnvBindings = Record<string, Binding>;
|
|
1027
1127
|
interface PreviewResource {
|
|
1028
|
-
|
|
1128
|
+
id: string;
|
|
1129
|
+
name: string;
|
|
1130
|
+
slug: string;
|
|
1131
|
+
urls?: string[];
|
|
1132
|
+
tags?: string[];
|
|
1133
|
+
observability?: Observability;
|
|
1134
|
+
logpush?: boolean;
|
|
1135
|
+
tail_consumers?: Array<{
|
|
1029
1136
|
name: string;
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
observability?: Observability;
|
|
1034
|
-
logpush?: boolean;
|
|
1035
|
-
tail_consumers?: Array<{
|
|
1036
|
-
name: string;
|
|
1037
|
-
}>;
|
|
1038
|
-
created_on: string;
|
|
1039
|
-
updated_on: string;
|
|
1137
|
+
}>;
|
|
1138
|
+
created_on: string;
|
|
1139
|
+
updated_on: string;
|
|
1040
1140
|
}
|
|
1041
1141
|
interface DeploymentResource {
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1142
|
+
id: string;
|
|
1143
|
+
preview_id: string;
|
|
1144
|
+
preview_name: string;
|
|
1145
|
+
migration_tag?: string;
|
|
1146
|
+
urls?: string[];
|
|
1147
|
+
compatibility_date?: string;
|
|
1148
|
+
compatibility_flags?: string[];
|
|
1149
|
+
limits?: CfUserLimits;
|
|
1150
|
+
placement?: CfPlacement;
|
|
1151
|
+
cache?: CacheOptions;
|
|
1152
|
+
annotations?: {
|
|
1153
|
+
"workers/commit_sha"?: string;
|
|
1154
|
+
"workers/message"?: string;
|
|
1155
|
+
"workers/pull_request_number"?: string;
|
|
1156
|
+
"workers/pull_request_title"?: string;
|
|
1157
|
+
"workers/pull_request_url"?: string;
|
|
1158
|
+
"workers/repository_url"?: string;
|
|
1159
|
+
"workers/tag"?: string;
|
|
1160
|
+
};
|
|
1161
|
+
env?: EnvBindings;
|
|
1162
|
+
created_on: string;
|
|
1063
1163
|
}
|
|
1064
1164
|
type PreviewDeploymentModule = {
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1165
|
+
name: string;
|
|
1166
|
+
content_type: string;
|
|
1167
|
+
content: string | Uint8Array;
|
|
1068
1168
|
};
|
|
1069
1169
|
type CreatePreviewDeploymentRequestParams = {
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
};
|
|
1080
|
-
};
|
|
1081
|
-
compatibility_date?: string;
|
|
1082
|
-
compatibility_flags?: string[];
|
|
1083
|
-
exports?: CfWorkerInit["exports"];
|
|
1084
|
-
annotations?: {
|
|
1085
|
-
"workers/commit_sha"?: string;
|
|
1086
|
-
"workers/message"?: string;
|
|
1087
|
-
"workers/pull_request_number"?: string;
|
|
1088
|
-
"workers/pull_request_title"?: string;
|
|
1089
|
-
"workers/pull_request_url"?: string;
|
|
1090
|
-
"workers/repository_url"?: string;
|
|
1091
|
-
"workers/tag"?: string;
|
|
1170
|
+
main_module?: string;
|
|
1171
|
+
modules?: PreviewDeploymentModule[];
|
|
1172
|
+
assets?: {
|
|
1173
|
+
jwt: string;
|
|
1174
|
+
config: {
|
|
1175
|
+
html_handling?: string;
|
|
1176
|
+
not_found_handling?: string;
|
|
1177
|
+
base_path?: string;
|
|
1178
|
+
run_worker_first?: string[] | boolean;
|
|
1092
1179
|
};
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1180
|
+
};
|
|
1181
|
+
compatibility_date?: string;
|
|
1182
|
+
compatibility_flags?: string[];
|
|
1183
|
+
exports?: CfWorkerInit["exports"];
|
|
1184
|
+
annotations?: {
|
|
1185
|
+
"workers/commit_sha"?: string;
|
|
1186
|
+
"workers/message"?: string;
|
|
1187
|
+
"workers/pull_request_number"?: string;
|
|
1188
|
+
"workers/pull_request_title"?: string;
|
|
1189
|
+
"workers/pull_request_url"?: string;
|
|
1190
|
+
"workers/repository_url"?: string;
|
|
1191
|
+
"workers/tag"?: string;
|
|
1192
|
+
};
|
|
1193
|
+
migrations?: CfWorkerInit["migrations"];
|
|
1194
|
+
limits?: CfUserLimits;
|
|
1195
|
+
placement?: CfPlacement | null;
|
|
1196
|
+
cache?: CacheOptions;
|
|
1197
|
+
env?: EnvBindings;
|
|
1198
|
+
containers?: Array<{
|
|
1199
|
+
class_name: string;
|
|
1200
|
+
}>;
|
|
1101
1201
|
};
|
|
1102
1202
|
type CreatePreviewRequestParams = {
|
|
1203
|
+
name: string;
|
|
1204
|
+
observability?: Observability;
|
|
1205
|
+
logpush?: boolean;
|
|
1206
|
+
tail_consumers?: Array<{
|
|
1103
1207
|
name: string;
|
|
1104
|
-
|
|
1105
|
-
logpush?: boolean;
|
|
1106
|
-
tail_consumers?: Array<{
|
|
1107
|
-
name: string;
|
|
1108
|
-
}>;
|
|
1208
|
+
}>;
|
|
1109
1209
|
};
|
|
1110
1210
|
type UpdatePreviewRequestParams = Omit<CreatePreviewRequestParams, "name">;
|
|
1111
1211
|
type PreviewRequestOptions = {
|
|
1112
|
-
|
|
1212
|
+
ignoreBaseConfig?: boolean;
|
|
1113
1213
|
};
|
|
1114
1214
|
type PreviewBaseConfig = {
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1215
|
+
observability?: Observability;
|
|
1216
|
+
logpush?: boolean;
|
|
1217
|
+
limits?: CfUserLimits;
|
|
1218
|
+
placement?: CfPlacement;
|
|
1219
|
+
cache?: CacheOptions;
|
|
1220
|
+
tail_consumers?: Array<{
|
|
1221
|
+
name: string;
|
|
1222
|
+
}>;
|
|
1223
|
+
env?: EnvBindings;
|
|
1124
1224
|
};
|
|
1125
1225
|
type PreviewBaseConfigPatch = Partial<Omit<PreviewBaseConfig, "env">> & {
|
|
1126
|
-
|
|
1226
|
+
env?: Record<string, Binding | null>;
|
|
1127
1227
|
};
|
|
1128
1228
|
/** Create an undeployed Worker that can own Preview resources. */
|
|
1129
1229
|
declare function createPreviewParentWorker(config: Config, accountId: string, workerName: string, workersDevEnabled: boolean, previewsEnabled: boolean): Promise<void>;
|
|
@@ -1138,12 +1238,13 @@ declare function getPreviewDeployment(config: Config, accountId: string, workerN
|
|
|
1138
1238
|
declare function createPreviewDeploymentForm(request: Partial<CreatePreviewDeploymentRequestParams>): FormData;
|
|
1139
1239
|
declare function createPreviewDeployment(config: Config, accountId: string, workerName: string, previewIdentifier: string, request: Partial<CreatePreviewDeploymentRequestParams>): Promise<DeploymentResource>;
|
|
1140
1240
|
declare function patchPreviewDeployment(config: Config, accountId: string, workerName: string, previewIdentifier: string, env: Record<string, Binding | null>, annotations?: {
|
|
1141
|
-
|
|
1142
|
-
|
|
1241
|
+
"workers/message"?: string;
|
|
1242
|
+
"workers/tag"?: string;
|
|
1143
1243
|
}, deploymentIdentifier?: string): Promise<DeploymentResource>;
|
|
1144
1244
|
declare function getPreviewBaseConfig(config: Config, accountId: string, workerName: string): Promise<PreviewBaseConfig>;
|
|
1145
1245
|
declare function patchPreviewBaseConfig(config: Config, accountId: string, workerName: string, previewBaseConfig: PreviewBaseConfigPatch): Promise<PreviewBaseConfig>;
|
|
1146
|
-
|
|
1246
|
+
//#endregion
|
|
1247
|
+
//#region src/preview/shared.d.ts
|
|
1147
1248
|
declare function getBranchName(): string | undefined;
|
|
1148
1249
|
declare function shouldUseCIMetadataFallback(): boolean;
|
|
1149
1250
|
declare function getHeadCommitRef(): string | undefined;
|
|
@@ -1173,9 +1274,9 @@ declare function getRepositoryUrl(): string | undefined;
|
|
|
1173
1274
|
* provider exposes.
|
|
1174
1275
|
*/
|
|
1175
1276
|
type PullRequestMetadata = {
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1277
|
+
number?: string;
|
|
1278
|
+
url?: string;
|
|
1279
|
+
title?: string;
|
|
1179
1280
|
};
|
|
1180
1281
|
/**
|
|
1181
1282
|
* Detects the pull/merge request associated with the current CI run, trying
|
|
@@ -1186,8 +1287,8 @@ type PullRequestMetadata = {
|
|
|
1186
1287
|
*/
|
|
1187
1288
|
declare function getPullRequestMetadata(): PullRequestMetadata | undefined;
|
|
1188
1289
|
declare function resolveWorkerName(args: {
|
|
1189
|
-
|
|
1190
|
-
|
|
1290
|
+
workerName?: string;
|
|
1291
|
+
"worker-name"?: string;
|
|
1191
1292
|
}, config: Config): string;
|
|
1192
1293
|
/**
|
|
1193
1294
|
* Get a human-readable display value for a binding.
|
|
@@ -1225,71 +1326,72 @@ declare function getPreviewOwnedContainerClassNames(config: Config, previews: Pr
|
|
|
1225
1326
|
*/
|
|
1226
1327
|
declare function previewContainerAppName(parentWorkerName: string, previewSlug: string, className: string): string;
|
|
1227
1328
|
declare function assemblePreviewScriptSettings(config: Config): UpdatePreviewRequestParams;
|
|
1228
|
-
|
|
1329
|
+
//#endregion
|
|
1330
|
+
//#region src/preview/preview.d.ts
|
|
1229
1331
|
type PreviewArgs = {
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1332
|
+
script?: string;
|
|
1333
|
+
name?: string;
|
|
1334
|
+
tag?: string;
|
|
1335
|
+
message?: string;
|
|
1336
|
+
json?: boolean;
|
|
1337
|
+
ignoreBaseConfig: boolean;
|
|
1338
|
+
workerName?: string;
|
|
1339
|
+
"worker-name"?: string;
|
|
1340
|
+
secretsFile?: string;
|
|
1341
|
+
/** Parsed `--var` args. CLI-only vars; config vars flow separately via `extractConfigBindings(config)`. */
|
|
1342
|
+
cliVars?: Record<string, string>;
|
|
1241
1343
|
};
|
|
1242
1344
|
type PreviewAssetsOptions = {
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1345
|
+
directory: string;
|
|
1346
|
+
assetConfig: {
|
|
1347
|
+
html_handling?: string;
|
|
1348
|
+
not_found_handling?: string;
|
|
1349
|
+
base_path?: string;
|
|
1350
|
+
};
|
|
1351
|
+
run_worker_first?: string[] | boolean;
|
|
1352
|
+
_headers?: string;
|
|
1353
|
+
_redirects?: string;
|
|
1252
1354
|
};
|
|
1253
1355
|
type PreviewDeleteArgs = {
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1356
|
+
name?: string;
|
|
1357
|
+
skipConfirmation?: boolean;
|
|
1358
|
+
workerName?: string;
|
|
1359
|
+
"worker-name"?: string;
|
|
1258
1360
|
};
|
|
1259
1361
|
type PreviewResult = {
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1362
|
+
preview: PreviewResource;
|
|
1363
|
+
deployment: DeploymentResource;
|
|
1364
|
+
isNewPreview: boolean;
|
|
1263
1365
|
};
|
|
1264
1366
|
type PreviewBuildOutputRootConfig = ParsedBuildOutputRootConfig & {
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1367
|
+
buildContext: ParsedBuildOutputRootConfig["buildContext"] & {
|
|
1368
|
+
isPreview: true;
|
|
1369
|
+
};
|
|
1268
1370
|
};
|
|
1269
1371
|
type PreviewBuildOutput = {
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1372
|
+
workerConfig: ParsedBuildOutputWorkerConfig;
|
|
1373
|
+
rootConfig: PreviewBuildOutputRootConfig;
|
|
1374
|
+
buildResult?: WorkerBuildResult;
|
|
1375
|
+
assets?: Pick<PreviewAssetsOptions, "directory" | "_headers" | "_redirects">;
|
|
1376
|
+
containers?: ParsedBuildOutputContainerConfig[];
|
|
1275
1377
|
};
|
|
1276
1378
|
/** Verify that Build Output was produced with Preview configuration. */
|
|
1277
1379
|
declare function assertPreviewBuildOutputRootConfig(rootConfig: ParsedBuildOutputRootConfig | undefined): asserts rootConfig is PreviewBuildOutputRootConfig;
|
|
1278
1380
|
type PreviewOptions = {
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1381
|
+
deployCommand?: string;
|
|
1382
|
+
previewCommand?: string;
|
|
1383
|
+
productionBindingsExpectedInPreview?: Record<string, {
|
|
1384
|
+
type: string;
|
|
1385
|
+
}>;
|
|
1386
|
+
getNormalizedContainerOptions: ((config: Config, args: {
|
|
1387
|
+
containersRollout?: "gradual" | "immediate" | "none";
|
|
1388
|
+
dryRun?: boolean;
|
|
1389
|
+
}) => Promise<ContainerNormalizedConfig[]>) | undefined;
|
|
1390
|
+
deployPreviewContainers: ((scopedConfig: Config, normalisedContainerConfig: ContainerNormalizedConfig[], deployment: DeploymentResource, accountId: string, options: {
|
|
1391
|
+
quiet: boolean;
|
|
1392
|
+
localImageReferences?: Map<string, string>;
|
|
1393
|
+
}) => Promise<void>) | undefined;
|
|
1394
|
+
verifyContainersScope?: (scopedConfig: Config) => Promise<void>;
|
|
1293
1395
|
};
|
|
1294
1396
|
declare const NO_ACTIVE_PREVIEW_URLS_MESSAGE = "Note: This Preview deployment has no active URLs.";
|
|
1295
1397
|
declare function formatNoActivePreviewUrlsMessage(config: Config, deployCommand?: string, previewCommand?: string): string;
|
|
@@ -1311,23 +1413,25 @@ declare function preview(accountId: string, args: PreviewArgs, config: Config, b
|
|
|
1311
1413
|
* Upload a Preview from resolved Build Output configuration.
|
|
1312
1414
|
*
|
|
1313
1415
|
* @param accountId Account that owns the parent Worker.
|
|
1314
|
-
* @param args Preview name and
|
|
1416
|
+
* @param args Preview name, deployment annotations, and secrets file.
|
|
1315
1417
|
* @param buildOutput Exact configuration and artifacts emitted by the build.
|
|
1316
1418
|
*/
|
|
1317
|
-
declare function previewBuildOutput(accountId: string, args: Pick<PreviewArgs, "name" | "tag" | "message" | "json">, buildOutput: PreviewBuildOutput, options?: PreviewOptions): Promise<PreviewResult>;
|
|
1419
|
+
declare function previewBuildOutput(accountId: string, args: Pick<PreviewArgs, "name" | "tag" | "message" | "json" | "secretsFile">, buildOutput: PreviewBuildOutput, options?: PreviewOptions): Promise<PreviewResult>;
|
|
1318
1420
|
/**
|
|
1319
1421
|
* Delete a preview and all its deployments.
|
|
1320
1422
|
*/
|
|
1321
1423
|
declare function previewDelete(accountId: string, args: PreviewDeleteArgs, config: Config): Promise<void>;
|
|
1322
|
-
|
|
1424
|
+
//#endregion
|
|
1425
|
+
//#region src/preview/format.d.ts
|
|
1323
1426
|
type MergedBinding = Binding & {
|
|
1324
|
-
|
|
1427
|
+
fromConfig: boolean;
|
|
1325
1428
|
};
|
|
1326
1429
|
declare function formatAlignedRows(rows: Array<[string, string, boolean]>, indent?: string): string[];
|
|
1327
1430
|
declare function formatBindings(env: Record<string, MergedBinding>, indent?: string, options?: {
|
|
1328
|
-
|
|
1431
|
+
showSourceMarker?: boolean;
|
|
1329
1432
|
}): string[];
|
|
1330
|
-
|
|
1433
|
+
//#endregion
|
|
1434
|
+
//#region src/preview/box.d.ts
|
|
1331
1435
|
/**
|
|
1332
1436
|
* Remove ANSI escape codes from a string.
|
|
1333
1437
|
*/
|
|
@@ -1342,8 +1446,8 @@ declare function visibleLength(str: string): number;
|
|
|
1342
1446
|
*/
|
|
1343
1447
|
declare function padToVisibleWidth(str: string, width: number): string;
|
|
1344
1448
|
type DrawBoxOptions = {
|
|
1345
|
-
|
|
1346
|
-
|
|
1449
|
+
footerLines?: string[];
|
|
1450
|
+
connectToChild?: boolean;
|
|
1347
1451
|
};
|
|
1348
1452
|
/**
|
|
1349
1453
|
* Draw a standalone box around the provided lines.
|
|
@@ -1354,9 +1458,9 @@ type DrawBoxOptions = {
|
|
|
1354
1458
|
*/
|
|
1355
1459
|
declare function drawBox(contentLines: string[], options?: DrawBoxOptions): string;
|
|
1356
1460
|
type DrawConnectedChildBoxOptions = {
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1461
|
+
indent?: string;
|
|
1462
|
+
footerLines?: string[];
|
|
1463
|
+
connectorLineIndex?: number;
|
|
1360
1464
|
};
|
|
1361
1465
|
/**
|
|
1362
1466
|
* Draw a child box that visually connects to an upstream parent box.
|
|
@@ -1367,5 +1471,5 @@ type DrawConnectedChildBoxOptions = {
|
|
|
1367
1471
|
* - `connectorLineIndex`: line index where the horizontal connector joins the box
|
|
1368
1472
|
*/
|
|
1369
1473
|
declare function drawConnectedChildBox(contentLines: string[], options?: DrawConnectedChildBoxOptions): string;
|
|
1370
|
-
|
|
1371
|
-
export { ACTOR_BINDING_DEPENDS_ON_EXPORT_CODE,
|
|
1474
|
+
//#endregion
|
|
1475
|
+
export { ACTOR_BINDING_DEPENDS_ON_EXPORT_CODE, ApiDeployment, ApiVersion, AssetManifest, AssetUploadStats, AssetsUploadResult, Binding, BuiltDurableObjectContainerImage, BulkInputNullableResult, BulkInputResult, BundleSize, Consumer, ConsumerSettings, ContainerDeployConfig, ContainerlessConfig, CreatePreviewDeploymentRequestParams, CreatePreviewRequestParams, CustomDomain, CustomDomainChangeset, DeployHelpersContext, type DeployOptions, DeployProps, DeploymentResource, DurableObjectContainerApplication, EXPORTS_RECONCILIATION_ERROR_CODE, EnvBindings, INCONSISTENT_EXPORTS_ACROSS_VERSIONS_CODE, INVALID_INHERIT_BINDING_CODE, JsonLike, NO_ACTIVE_PREVIEW_URLS_MESSAGE, NoInputError, NonVersionedScriptSettings, PREVIEW_DOMAIN_PROVISIONING_NOTE, PackageDependency, Percentage, PostQueueBody, PostQueueResponse, PostTypedConsumerBody, PreparedContainerImages, PreviewArgs, PreviewAssetsOptions, PreviewBaseConfig, PreviewBaseConfigPatch, PreviewBuildOutput, PreviewBuildOutputRootConfig, PreviewDeleteArgs, PreviewDeploymentModule, PreviewOptions, PreviewRequestOptions, PreviewResource, PreviewResult, Producer, ProvisionBindingsResult, PullRequestMetadata, PurgeQueueBody, PurgeQueueResponse, QueueJurisdiction, QueueResponse, QueueSettings, RetrieveSourceMapFunction, RouteObject, ScriptReference, Settings, SharedDeployVersionsProps, TriggerDeployment, TriggerProps, TypedConsumerResponse, UpdatePreviewRequestParams, VersionCache, VersionId, VersionedDurableObjectContainerApplication, type VersionsUploadOptions, VersionsUploadProps, WORKER_LEGACY_ENVIRONMENT_NOT_FOUND_ERR_CODE, WORKER_NOT_FOUND_ERR_CODE, WORKFLOW_CRON_REQUIRES_PAID_PLAN_CODE, WORKFLOW_JURISDICTION_IMMUTABLE_CODE, WORKFLOW_NOT_FOUND_CODE, WorkerBuildResult, WorkerSubdomain, Workflow, WorkflowConflict, Zone, ZoneIdCache, addRequiredSecretsInheritBindings, addWorkersSitesBindings, applyServiceAndEnvironmentTags, assemblePreviewScriptSettings, assertPreviewBuildOutputRootConfig, buildAssetManifest, checkRemoteSecretsOverride, checkWorkflowConflicts, collectPackageDependencies, confirmLatestDeploymentOverwrite, createDeployment, createDurableObjectContainerApplication, createFileHasher, createPreview, createPreviewDeployment, createPreviewDeploymentForm, createPreviewParentWorker, createTruncatedAlias, createWorkerUploadForm, decodeJwtPayload, deletePreview, deletePullConsumer, deleteWorkerConsumer, deploy, deployDurableObjectContainerApplications, deployVersionedDurableObjectContainerApplications, deployWfpUserWorker, diagnoseScriptSizeError, diagnoseStartupError, diffJsonObjects, downloadWorkerConfig, drawBox, drawConnectedChildBox, editPreview, ensureQueuesExistByConfig, extractBuildOutputBindings, extractConfigBindings, fetchDeployableVersions, fetchDeploymentVersions, fetchLatestDeployment, fetchLatestDeployments, fetchSecrets, fetchVersion, fetchVersions, fetchWorkerConfig, formatAlignedRows, formatBindings, formatNoActivePreviewUrlsMessage, fromMimeType, generatePreviewAlias, getBindingValue, getBranchName, getCommitSha, getConfigPatch, getDeployConfirmFunction, getEdgeKvUploadConcurrency, getHeadCommitMessage, getHeadCommitRef, getMigrationsToUpload, getPreview, getPreviewBaseConfig, getPreviewDeployment, getPreviewOwnedContainerClassNames, getPullRequestMetadata, getQueue, getRemoteConfigDiff, getRepositoryUrl, getSettings, getSize, getSourceMappedStack, getSourceMappedString, getSubdomainValues, getSubdomainValuesAPIMock, getVersionedDurableObjectContainerApplications, getWorkerSubdomain, getWorkersDevSubdomain, getWorkersDevSubdomainIfAccessible, getZoneForRoute, getZoneIdFromHost, handleMissingSecretsError, handleUnsafeCapnp, hasDefinedEnvironments, helpIfErrorIsSizeOrScriptStartup, initDeployHelpersContext, isExportsReconciliationErrorDetails, isJwtExpired, isModifiedDiffValue, isNonDestructive, isWorkerNotFoundError, listConsumers, listQueues, maybeRetrieveFileSourceMap, moduleTypeMimeType, padToVisibleWidth, parseBulkInputToObject, parseConfigPlacement, patchNonVersionedScriptSettings, patchPreviewBaseConfig, patchPreviewDeployment, postConsumer, prepareDurableObjectContainerApplications, preview, previewBuildOutput, previewContainerAppName, previewDelete, printBundleSize, printVersions, provisionBindings, publishCustomDomains, publishRoutes, putConsumer, putConsumerById, renderBindingDependsOnExportError, renderD1DatabaseLimitError, renderExportsReconciliationError, renderExportsReconciliationSuccess, renderInconsistentExportsAcrossVersionsError, renderRoute, renderWorkersDevDefaultWarning, resolveAssetOptions, resolveDoLifecyclePayload, resolveExportsUploadPayload, resolveVersionedDurableObjectContainerApplications, resolveWorkerName, sanitizeBranchName, shouldUseCIMetadataFallback, stripAnsi, syncAssets, tagsAreEqual, triggersDeploy, updateQueueConsumers, validateEventTriggerTargets, validateFileSecrets, validateImageLessContainerApplicationsForUpload, validateNodeCompatMode, validateRoutes, verifyWorkerMatchesCITag, versionsUpload, visibleLength, warnOnErrorUpdatingServiceAndEnvironmentTags, workerNotFoundErrorMessage };
|