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