@void/deploy-cloudflare 0.22.0 → 0.24.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/index.d.mts +120 -3
- package/dist/index.mjs +526 -286
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,121 @@
|
|
|
1
1
|
import { AssetConfig, HeaderRule, RedirectRule } from "@void/deploy-core";
|
|
2
|
+
//#region src/operations.d.ts
|
|
3
|
+
/** Typed provider operations shared by app deployment and platform installation. */
|
|
4
|
+
type ConfigTarget = {
|
|
5
|
+
configPath?: string;
|
|
6
|
+
};
|
|
7
|
+
type WorkerTarget = ConfigTarget & {
|
|
8
|
+
workerName?: string;
|
|
9
|
+
};
|
|
10
|
+
type CloudflareOperation = ({
|
|
11
|
+
type: "auth.whoami" | "auth.login" | "auth.logout" | "auth.token";
|
|
12
|
+
} & ConfigTarget) | ({
|
|
13
|
+
type: "d1.list" | "kv.namespace.list" | "containers.list";
|
|
14
|
+
} & ConfigTarget) | ({
|
|
15
|
+
type: "d1.info";
|
|
16
|
+
name: string;
|
|
17
|
+
} & ConfigTarget) | {
|
|
18
|
+
type: "d1.create";
|
|
19
|
+
name: string;
|
|
20
|
+
binding: string;
|
|
21
|
+
configPath: string;
|
|
22
|
+
} | {
|
|
23
|
+
type: "d1.execute";
|
|
24
|
+
database: string;
|
|
25
|
+
sql: string;
|
|
26
|
+
configPath: string;
|
|
27
|
+
} | {
|
|
28
|
+
type: "d1.migrations.list" | "d1.migrations.apply";
|
|
29
|
+
database: string;
|
|
30
|
+
configPath: string;
|
|
31
|
+
} | {
|
|
32
|
+
type: "kv.namespace.create";
|
|
33
|
+
name: string;
|
|
34
|
+
binding: string;
|
|
35
|
+
configPath: string;
|
|
36
|
+
} | ({
|
|
37
|
+
type: "r2.bucket.info";
|
|
38
|
+
name: string;
|
|
39
|
+
} & ConfigTarget) | {
|
|
40
|
+
type: "r2.bucket.create";
|
|
41
|
+
name: string;
|
|
42
|
+
binding: string;
|
|
43
|
+
configPath: string;
|
|
44
|
+
} | {
|
|
45
|
+
type: "hyperdrive.create";
|
|
46
|
+
name: string;
|
|
47
|
+
binding: string;
|
|
48
|
+
configPath: string;
|
|
49
|
+
} | ({
|
|
50
|
+
type: "queues.info" | "queues.create";
|
|
51
|
+
name: string;
|
|
52
|
+
} & ConfigTarget) | ({
|
|
53
|
+
type: "queues.consumer.remove";
|
|
54
|
+
queueName: string;
|
|
55
|
+
workerName: string;
|
|
56
|
+
} & ConfigTarget) | ({
|
|
57
|
+
type: "email.routing.settings" | "email.routing.enable" | "email.routing.rules.list" | "email.sending.settings" | "email.sending.enable";
|
|
58
|
+
domain: string;
|
|
59
|
+
} & ConfigTarget) | ({
|
|
60
|
+
type: "secret.list" | "secret.bulk";
|
|
61
|
+
} & WorkerTarget) | ({
|
|
62
|
+
type: "secret.put" | "secret.delete";
|
|
63
|
+
name: string;
|
|
64
|
+
} & WorkerTarget) | ({
|
|
65
|
+
type: "deployments.status" | "deployments.list" | "versions.list";
|
|
66
|
+
} & WorkerTarget) | ({
|
|
67
|
+
type: "versions.view";
|
|
68
|
+
versionId: string;
|
|
69
|
+
includeSource?: boolean;
|
|
70
|
+
} & WorkerTarget) | ({
|
|
71
|
+
type: "versions.deploy";
|
|
72
|
+
versions: Array<{
|
|
73
|
+
versionId: string;
|
|
74
|
+
percentage: number;
|
|
75
|
+
}>;
|
|
76
|
+
message?: string;
|
|
77
|
+
} & WorkerTarget) | ({
|
|
78
|
+
type: "versions.upload" | "worker.deploy";
|
|
79
|
+
message?: string;
|
|
80
|
+
secretsFilePath?: string;
|
|
81
|
+
assetsDirectory?: string;
|
|
82
|
+
previewAlias?: string;
|
|
83
|
+
noBundle?: boolean;
|
|
84
|
+
} & WorkerTarget) | ({
|
|
85
|
+
type: "triggers.deploy";
|
|
86
|
+
assets?: boolean;
|
|
87
|
+
} & WorkerTarget) | ({
|
|
88
|
+
type: "triggers.clear-crons" | "triggers.clear-domains";
|
|
89
|
+
} & WorkerTarget) | ({
|
|
90
|
+
type: "tail";
|
|
91
|
+
search?: string;
|
|
92
|
+
versionId?: string;
|
|
93
|
+
status?: "error";
|
|
94
|
+
} & WorkerTarget);
|
|
95
|
+
type CloudflareUploadResult = {
|
|
96
|
+
versionId: string;
|
|
97
|
+
previewUrl?: string;
|
|
98
|
+
workersDevUrl?: string;
|
|
99
|
+
};
|
|
100
|
+
type CloudflareProviderError = {
|
|
101
|
+
code?: number;
|
|
102
|
+
message: string;
|
|
103
|
+
};
|
|
104
|
+
//#endregion
|
|
2
105
|
//#region src/execute.d.ts
|
|
3
106
|
type CloudflareCommandResult = {
|
|
107
|
+
/** Structured provider response. stdout is diagnostics only. */
|
|
108
|
+
data?: unknown;
|
|
109
|
+
errorCode?: number;
|
|
110
|
+
failure?: "not-found" | "durable-migration" | "containers-unavailable";
|
|
111
|
+
errors?: Array<CloudflareProviderError>;
|
|
4
112
|
stdout: string;
|
|
5
113
|
stderr: string;
|
|
6
114
|
status: number;
|
|
7
115
|
signal?: NodeJS.Signals | null;
|
|
8
116
|
error?: string | null;
|
|
9
117
|
};
|
|
10
|
-
type CloudflareCommandRunner = (
|
|
118
|
+
type CloudflareCommandRunner = (operation: CloudflareOperation, options: {
|
|
11
119
|
capture: boolean;
|
|
12
120
|
}) => CloudflareCommandResult | Promise<CloudflareCommandResult>;
|
|
13
121
|
type CloudflareDeployExecution = {
|
|
@@ -112,6 +220,7 @@ type CloudflareFrameworkDeployConfig = Readonly<{
|
|
|
112
220
|
assetsIgnore?: ReadonlyArray<string>;
|
|
113
221
|
crons?: ReadonlyArray<string>;
|
|
114
222
|
requiredSecrets?: ReadonlyArray<string>;
|
|
223
|
+
versionMetadataBinding?: string;
|
|
115
224
|
ai?: Readonly<{
|
|
116
225
|
binding: string;
|
|
117
226
|
gateway?: string;
|
|
@@ -142,6 +251,7 @@ export declare function renderCloudflareStaticEntry(options: {
|
|
|
142
251
|
headerRules?: ReadonlyArray<HeaderRule>;
|
|
143
252
|
redirectRules?: ReadonlyArray<RedirectRule>;
|
|
144
253
|
fallbackRules?: ReadonlyArray<RedirectRule>;
|
|
254
|
+
versionMetadataBinding?: string;
|
|
145
255
|
}): string;
|
|
146
256
|
/**
|
|
147
257
|
* Copy static assets into Void's deploy area without Cloudflare's reserved routing files.
|
|
@@ -314,9 +424,13 @@ type CloudflareVersionActivationOptions = {
|
|
|
314
424
|
fetch?: typeof globalThis.fetch;
|
|
315
425
|
sleep?: (milliseconds: number) => Promise<void>;
|
|
316
426
|
readinessAttempts?: number;
|
|
427
|
+
/** Require readiness to report the uploaded Worker's actual version UUID. */
|
|
428
|
+
requireVersionMetadata?: boolean;
|
|
429
|
+
/** A binding-preserving handoff without metadata may use only a genuine version preview. */
|
|
430
|
+
requirePreviewForReadiness?: boolean;
|
|
317
431
|
/** Verify that omitted remote secrets come from the active Worker Version before uploading. */
|
|
318
432
|
verifyInheritedSecrets?: boolean;
|
|
319
|
-
/** Pin opaque secret bindings to the live version
|
|
433
|
+
/** Pin inherited opaque secret bindings to the inspected live version before uploading. */
|
|
320
434
|
pinActiveSecrets?: (activeVersionId: string, bindings: ReadonlyArray<{
|
|
321
435
|
name: string;
|
|
322
436
|
type: "secret_text" | "secret_key";
|
|
@@ -364,4 +478,7 @@ export declare function createCloudflareMetadataRunner(options: {
|
|
|
364
478
|
env?: Readonly<Record<string, string | undefined>>;
|
|
365
479
|
}): CloudflareCommandRunner;
|
|
366
480
|
//#endregion
|
|
367
|
-
|
|
481
|
+
//#region src/secret-draft.d.ts
|
|
482
|
+
export declare const VOID_SECRET_DRAFT_SOURCE = "export default { fetch() { return new Response(\"\"); } };\n";
|
|
483
|
+
//#endregion
|
|
484
|
+
export type { ApprovedCloudflareKvBinding, CloudflareCommandResult, CloudflareCommandRunner, CloudflareDeployExecution, CloudflareFrameworkDeployConfig, CloudflareOperation, CloudflareProviderError, CloudflareStaticDeployConfig, CloudflareTrafficConfig, CloudflareTriggerConfig, CloudflareTriggerStabilization, CloudflareUploadResult, CloudflareVersionActivation, CloudflareVersionActivationOptions, CloudflareVersionMetadata, CloudflareWorkerMigrationTagOptions, ExistingCloudflareWorker };
|