@astrale-domains/services 0.4.5 → 0.4.7
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/README.md +278 -12
- package/dist/schema/index.d.ts +2 -0
- package/dist/schema/index.js +1 -0
- package/dist/schema/modules/deployment/classes/cloudflare-deployment.d.ts +463 -0
- package/dist/schema/modules/deployment/classes/cloudflare-deployment.js +30 -0
- package/dist/schema/modules/deployment/classes/deployment-line.d.ts +23 -0
- package/dist/schema/modules/deployment/classes/deployment-line.js +24 -0
- package/dist/schema/modules/deployment/classes/deployment-on-line.d.ts +17 -0
- package/dist/schema/modules/deployment/classes/deployment-on-line.js +11 -0
- package/dist/schema/modules/deployment/classes/deployment.d.ts +189 -0
- package/dist/schema/modules/deployment/classes/deployment.js +56 -0
- package/dist/schema/modules/deployment/classes/index.d.ts +5 -0
- package/dist/schema/modules/deployment/classes/index.js +5 -0
- package/dist/schema/modules/deployment/classes/line-owned-by.d.ts +26 -0
- package/dist/schema/modules/deployment/classes/line-owned-by.js +19 -0
- package/dist/schema/modules/deployment/errors/deployment-hosting-unavailable.d.ts +7 -0
- package/dist/schema/modules/deployment/errors/deployment-hosting-unavailable.js +8 -0
- package/dist/schema/modules/deployment/errors/deployment-label-not-found.d.ts +12 -0
- package/dist/schema/modules/deployment/errors/deployment-label-not-found.js +11 -0
- package/dist/schema/modules/deployment/errors/deployment-not-found.d.ts +10 -0
- package/dist/schema/modules/deployment/errors/deployment-not-found.js +11 -0
- package/dist/schema/modules/deployment/errors/deployment-registry-only.d.ts +11 -0
- package/dist/schema/modules/deployment/errors/deployment-registry-only.js +12 -0
- package/dist/schema/modules/deployment/errors/index.d.ts +4 -0
- package/dist/schema/modules/deployment/errors/index.js +4 -0
- package/dist/schema/modules/deployment/functions/deploy-cloudflare-deployment.d.ts +170 -0
- package/dist/schema/modules/deployment/functions/deploy-cloudflare-deployment.js +14 -0
- package/dist/schema/modules/deployment/functions/describe-deployment-hosting.d.ts +8 -0
- package/dist/schema/modules/deployment/functions/describe-deployment-hosting.js +11 -0
- package/dist/schema/modules/deployment/functions/expire-deployment-previews.d.ts +16 -0
- package/dist/schema/modules/deployment/functions/expire-deployment-previews.js +14 -0
- package/dist/schema/modules/deployment/functions/index.d.ts +11 -0
- package/dist/schema/modules/deployment/functions/index.js +11 -0
- package/dist/schema/modules/deployment/functions/list-cloudflare-deployment-secret-names.d.ts +5 -0
- package/dist/schema/modules/deployment/functions/list-cloudflare-deployment-secret-names.js +4 -0
- package/dist/schema/modules/deployment/functions/list-cloudflare-deployments.d.ts +58 -0
- package/dist/schema/modules/deployment/functions/list-cloudflare-deployments.js +10 -0
- package/dist/schema/modules/deployment/functions/list-deployment-secret-names.d.ts +4 -0
- package/dist/schema/modules/deployment/functions/list-deployment-secret-names.js +6 -0
- package/dist/schema/modules/deployment/functions/read-deployment-last-calls.d.ts +10 -0
- package/dist/schema/modules/deployment/functions/read-deployment-last-calls.js +13 -0
- package/dist/schema/modules/deployment/functions/retain-deployment.d.ts +12 -0
- package/dist/schema/modules/deployment/functions/retain-deployment.js +13 -0
- package/dist/schema/modules/deployment/functions/retire-deployment.d.ts +23 -0
- package/dist/schema/modules/deployment/functions/retire-deployment.js +17 -0
- package/dist/schema/modules/deployment/functions/set-cloudflare-deployment-secret.d.ts +18 -0
- package/dist/schema/modules/deployment/functions/set-cloudflare-deployment-secret.js +7 -0
- package/dist/schema/modules/deployment/functions/set-deployment-secret.d.ts +14 -0
- package/dist/schema/modules/deployment/functions/set-deployment-secret.js +3 -0
- package/dist/schema/modules/deployment/index.d.ts +8 -0
- package/dist/schema/modules/deployment/index.js +6 -0
- package/dist/schema/modules/deployment/policies/act-for-organization.d.ts +6 -0
- package/dist/schema/modules/deployment/policies/act-for-organization.js +10 -0
- package/dist/schema/modules/deployment/policies/index.d.ts +5 -0
- package/dist/schema/modules/deployment/policies/index.js +5 -0
- package/dist/schema/modules/deployment/policies/own-deployment.d.ts +2 -0
- package/dist/schema/modules/deployment/policies/own-deployment.js +12 -0
- package/dist/schema/modules/deployment/policies/own-line.d.ts +5 -0
- package/dist/schema/modules/deployment/policies/own-line.js +10 -0
- package/dist/schema/modules/deployment/policies/traverse-owned-line-deployment.d.ts +2 -0
- package/dist/schema/modules/deployment/policies/traverse-owned-line-deployment.js +7 -0
- package/dist/schema/modules/deployment/policies/traverse-owned-line.d.ts +2 -0
- package/dist/schema/modules/deployment/policies/traverse-owned-line.js +7 -0
- package/dist/schema/modules/deployment/states/deployment-lifecycle.d.ts +30 -0
- package/dist/schema/modules/deployment/states/deployment-lifecycle.js +19 -0
- package/dist/schema/modules/deployment/states/index.d.ts +2 -0
- package/dist/schema/modules/deployment/states/index.js +1 -0
- package/dist/schema/modules/deployment/types/deployment-hosting.d.ts +94 -0
- package/dist/schema/modules/deployment/types/deployment-hosting.js +19 -0
- package/dist/schema/modules/deployment/types/deployment-record.d.ts +35 -0
- package/dist/schema/modules/deployment/types/deployment-record.js +31 -0
- package/dist/schema/modules/deployment/types/deployment-request.d.ts +161 -0
- package/dist/schema/modules/deployment/types/deployment-request.js +40 -0
- package/dist/schema/modules/deployment/types/deployment-response.d.ts +109 -0
- package/dist/schema/modules/deployment/types/deployment-response.js +36 -0
- package/dist/schema/modules/deployment/types/deployment-retention.d.ts +49 -0
- package/dist/schema/modules/deployment/types/deployment-retention.js +45 -0
- package/dist/schema/modules/deployment/types/deployment-retire.d.ts +30 -0
- package/dist/schema/modules/deployment/types/deployment-retire.js +18 -0
- package/dist/schema/modules/deployment/types/deployment-secret-digest.d.ts +17 -0
- package/dist/schema/modules/deployment/types/deployment-secret-digest.js +14 -0
- package/dist/schema/modules/deployment/types/deployment-secret.d.ts +59 -0
- package/dist/schema/modules/deployment/types/deployment-secret.js +52 -0
- package/dist/schema/modules/deployment/types/deployment-summary.d.ts +165 -0
- package/dist/schema/modules/deployment/types/deployment-summary.js +38 -0
- package/dist/schema/modules/deployment/types/frozen-configuration.d.ts +52 -0
- package/dist/schema/modules/deployment/types/frozen-configuration.js +55 -0
- package/dist/schema/modules/deployment/types/index.d.ts +20 -0
- package/dist/schema/modules/deployment/types/index.js +10 -0
- package/dist/schema/modules/service/classes/cloudflare-worker.d.ts +60 -24
- package/dist/schema/modules/service/classes/service.d.ts +7 -7
- package/dist/schema/modules/service/functions/delete-service-secret.d.ts +1 -1
- package/dist/schema/modules/service/functions/delete-service.d.ts +1 -1
- package/dist/schema/modules/service/functions/delete-worker-secret.d.ts +1 -1
- package/dist/schema/modules/service/functions/delete-worker.d.ts +1 -1
- package/dist/schema/modules/service/functions/deploy-cloudflare-worker.d.ts +37 -1
- package/dist/schema/modules/service/functions/list-service-logs.d.ts +1 -1
- package/dist/schema/modules/service/functions/list-service-schedules.d.ts +1 -1
- package/dist/schema/modules/service/functions/list-service-secret-names.d.ts +1 -1
- package/dist/schema/modules/service/functions/list-worker-logs.d.ts +1 -1
- package/dist/schema/modules/service/functions/list-worker-schedules.d.ts +1 -1
- package/dist/schema/modules/service/functions/list-worker-secret-names.d.ts +1 -1
- package/dist/schema/modules/service/functions/migrate-worker-ingress.d.ts +1 -1
- package/dist/schema/modules/service/functions/replace-service-schedules.d.ts +1 -1
- package/dist/schema/modules/service/functions/replace-worker-schedules.d.ts +1 -1
- package/dist/schema/modules/service/functions/set-service-secret.d.ts +1 -1
- package/dist/schema/modules/service/functions/set-worker-secret.d.ts +3 -3
- package/dist/schema/modules/service/index.d.ts +2 -2
- package/dist/schema/modules/service/index.js +1 -1
- package/dist/schema/modules/service/types/content/index.d.ts +1 -0
- package/dist/schema/modules/service/types/content/index.js +1 -0
- package/dist/schema/modules/service/types/content/limits.d.ts +7 -0
- package/dist/schema/modules/service/types/content/limits.js +7 -0
- package/dist/schema/modules/service/types/deploy-cloudflare-worker.d.ts +110 -0
- package/dist/schema/modules/service/types/index.d.ts +2 -1
- package/dist/schema/modules/service/types/index.js +1 -1
- package/dist/schema/modules/service/types/legacy/service-deployment-content.js +22 -0
- package/dist/schema/modules/service/types/service-deployment-artifact-module.d.ts +23 -0
- package/dist/schema/modules/service/types/service-deployment-artifact-module.js +5 -3
- package/dist/schema/modules/service/types/service-deployment-assets.d.ts +36 -0
- package/dist/schema/modules/service/types/service-deployment-assets.js +5 -3
- package/dist/schema/modules/service/types/service-deployment-content.d.ts +18 -11
- package/dist/schema/modules/service/types/service-deployment-content.js +17 -8
- package/dist/schema/schema.d.ts +740 -23
- package/dist/schema/schema.js +11 -0
- package/package.json +15 -11
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
export declare const CloudflareDeployment: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
|
|
2
|
+
readonly description: "One Deployment uploaded as the Workers for Platforms script its label names.";
|
|
3
|
+
readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
|
|
4
|
+
readonly extends: readonly [import("@astrale-os/sdk/schema").AuthoredNodeClass<{
|
|
5
|
+
readonly abstract: true;
|
|
6
|
+
readonly description: "One immutable deployment of a release on a publisher line.";
|
|
7
|
+
readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
|
|
8
|
+
readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Timestamped">];
|
|
9
|
+
readonly properties: {
|
|
10
|
+
label: import("zod").ZodString;
|
|
11
|
+
url: import("zod").ZodString;
|
|
12
|
+
state: import("@astrale-os/sdk/schema").StateProperty<import("@astrale-os/sdk/schema").StateMachine<{
|
|
13
|
+
readonly deploying: {
|
|
14
|
+
readonly activate: "active";
|
|
15
|
+
readonly fail: "failed";
|
|
16
|
+
};
|
|
17
|
+
readonly active: {
|
|
18
|
+
readonly retire: "retiring";
|
|
19
|
+
};
|
|
20
|
+
readonly retiring: {
|
|
21
|
+
readonly completeRetirement: "retired";
|
|
22
|
+
};
|
|
23
|
+
readonly retired: {
|
|
24
|
+
readonly revive: "deploying";
|
|
25
|
+
};
|
|
26
|
+
readonly failed: {
|
|
27
|
+
readonly retry: "deploying";
|
|
28
|
+
readonly retire: "retiring";
|
|
29
|
+
};
|
|
30
|
+
}, "deploying">, {
|
|
31
|
+
required?: boolean;
|
|
32
|
+
description?: string;
|
|
33
|
+
}>;
|
|
34
|
+
retention: import("zod").ZodEnum<{
|
|
35
|
+
preview: "preview";
|
|
36
|
+
published: "published";
|
|
37
|
+
}>;
|
|
38
|
+
record: import("zod").ZodObject<{
|
|
39
|
+
format: import("zod").ZodLiteral<"astrale.deployment-record">;
|
|
40
|
+
version: import("zod").ZodLiteral<1>;
|
|
41
|
+
origin: import("zod").ZodString;
|
|
42
|
+
environment: import("zod").ZodString;
|
|
43
|
+
releaseDigest: import("zod").ZodString;
|
|
44
|
+
buildDigest: import("zod").ZodString;
|
|
45
|
+
schemaRevision: import("zod").ZodString;
|
|
46
|
+
configuration: import("zod").ZodString;
|
|
47
|
+
providerScript: import("zod").ZodString;
|
|
48
|
+
commit: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
49
|
+
sha: import("zod").ZodString;
|
|
50
|
+
dirty: import("zod").ZodBoolean;
|
|
51
|
+
base: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
52
|
+
version: import("zod").ZodString;
|
|
53
|
+
distance: import("zod").ZodNumber;
|
|
54
|
+
}, import("zod/v4/core").$strict>>;
|
|
55
|
+
}, import("zod/v4/core").$strict>>;
|
|
56
|
+
}, import("zod/v4/core").$strict>;
|
|
57
|
+
configuration: import("zod").ZodObject<{
|
|
58
|
+
format: import("zod").ZodLiteral<"astrale.deployment.configuration">;
|
|
59
|
+
version: import("zod").ZodLiteral<1>;
|
|
60
|
+
vars: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
|
|
61
|
+
settings: import("zod").ZodObject<{
|
|
62
|
+
maximumRequestBytes: import("zod").ZodNumber;
|
|
63
|
+
invocationTimeoutMs: import("zod").ZodNumber;
|
|
64
|
+
tokenExchange: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<false>, import("zod").ZodObject<{
|
|
65
|
+
maximumLifetimeSeconds: import("zod").ZodNumber;
|
|
66
|
+
}, import("zod/v4/core").$strict>]>;
|
|
67
|
+
durableOptions: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
68
|
+
retentionMs: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
69
|
+
retry: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
70
|
+
initialIntervalMs: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
71
|
+
maxAttempts: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
72
|
+
maxIntervalMs: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
73
|
+
}, import("zod/v4/core").$strict>>;
|
|
74
|
+
stepTimeoutMs: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
75
|
+
}, import("zod/v4/core").$strict>>;
|
|
76
|
+
}, import("zod/v4/core").$strict>;
|
|
77
|
+
runtime: import("zod").ZodObject<{
|
|
78
|
+
compatibilityDate: import("zod").ZodString;
|
|
79
|
+
compatibilityFlags: import("zod").ZodArray<import("zod").ZodString>;
|
|
80
|
+
}, import("zod/v4/core").$strict>;
|
|
81
|
+
bindings: import("zod").ZodObject<{
|
|
82
|
+
services: import("zod").ZodArray<import("zod").ZodObject<{
|
|
83
|
+
name: import("zod").ZodString;
|
|
84
|
+
service: import("zod").ZodString;
|
|
85
|
+
}, import("zod/v4/core").$strict>>;
|
|
86
|
+
dispatchNamespaces: import("zod").ZodArray<import("zod").ZodObject<{
|
|
87
|
+
name: import("zod").ZodString;
|
|
88
|
+
namespace: import("zod").ZodString;
|
|
89
|
+
}, import("zod/v4/core").$strict>>;
|
|
90
|
+
secrets: import("zod").ZodArray<import("zod").ZodString>;
|
|
91
|
+
}, import("zod/v4/core").$strict>;
|
|
92
|
+
router: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<false>, import("zod").ZodObject<{
|
|
93
|
+
service: import("zod").ZodString;
|
|
94
|
+
hostSuffix: import("zod").ZodString;
|
|
95
|
+
minLabels: import("zod").ZodNumber;
|
|
96
|
+
}, import("zod/v4/core").$strict>]>;
|
|
97
|
+
}, import("zod/v4/core").$strict>;
|
|
98
|
+
secretDigests: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodArray<import("zod").ZodObject<{
|
|
99
|
+
name: import("zod").ZodString;
|
|
100
|
+
digest: import("zod").ZodString;
|
|
101
|
+
}, import("zod/v4/core").$strict>>, {
|
|
102
|
+
readonly required: false;
|
|
103
|
+
}>;
|
|
104
|
+
scriptEtag: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodString, {
|
|
105
|
+
readonly required: false;
|
|
106
|
+
}>;
|
|
107
|
+
signingKeyId: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodString, {
|
|
108
|
+
readonly required: false;
|
|
109
|
+
}>;
|
|
110
|
+
activatedAt: import("@astrale-os/sdk/schema").AuthoredProperty<Readonly<{
|
|
111
|
+
readonly type: 'string';
|
|
112
|
+
readonly 'x-astrale-value-kind': 'instant';
|
|
113
|
+
}>, {
|
|
114
|
+
readonly required: false;
|
|
115
|
+
}>;
|
|
116
|
+
lastCallAt: import("@astrale-os/sdk/schema").AuthoredProperty<Readonly<{
|
|
117
|
+
readonly type: 'string';
|
|
118
|
+
readonly 'x-astrale-value-kind': 'instant';
|
|
119
|
+
}>, {
|
|
120
|
+
readonly required: false;
|
|
121
|
+
}>;
|
|
122
|
+
expiresAt: import("@astrale-os/sdk/schema").AuthoredProperty<Readonly<{
|
|
123
|
+
readonly type: 'string';
|
|
124
|
+
readonly 'x-astrale-value-kind': 'instant';
|
|
125
|
+
}>, {
|
|
126
|
+
readonly required: false;
|
|
127
|
+
}>;
|
|
128
|
+
retiredAt: import("@astrale-os/sdk/schema").AuthoredProperty<Readonly<{
|
|
129
|
+
readonly type: 'string';
|
|
130
|
+
readonly 'x-astrale-value-kind': 'instant';
|
|
131
|
+
}>, {
|
|
132
|
+
readonly required: false;
|
|
133
|
+
}>;
|
|
134
|
+
retirement: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodEnum<{
|
|
135
|
+
expired: "expired";
|
|
136
|
+
withdrawn: "withdrawn";
|
|
137
|
+
}>, {
|
|
138
|
+
readonly required: false;
|
|
139
|
+
}>;
|
|
140
|
+
operationReceipt: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodString, {
|
|
141
|
+
readonly required: false;
|
|
142
|
+
}>;
|
|
143
|
+
operationExpiresAt: import("@astrale-os/sdk/schema").AuthoredProperty<Readonly<{
|
|
144
|
+
readonly type: 'string';
|
|
145
|
+
readonly 'x-astrale-value-kind': 'instant';
|
|
146
|
+
}>, {
|
|
147
|
+
readonly required: false;
|
|
148
|
+
}>;
|
|
149
|
+
};
|
|
150
|
+
readonly methods: {
|
|
151
|
+
setSecret: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
152
|
+
name: string;
|
|
153
|
+
value: string;
|
|
154
|
+
}, {
|
|
155
|
+
readonly mode: 'value';
|
|
156
|
+
readonly value: {
|
|
157
|
+
name: string;
|
|
158
|
+
} | {
|
|
159
|
+
kind: "rejected";
|
|
160
|
+
reason: "secret-undeclared" | "service-unavailable";
|
|
161
|
+
message: string;
|
|
162
|
+
retryAfter?: string | undefined;
|
|
163
|
+
};
|
|
164
|
+
}, "authenticated", false, true, undefined>>;
|
|
165
|
+
secrets: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
166
|
+
readonly mode: 'value';
|
|
167
|
+
readonly value: string[];
|
|
168
|
+
}, "authenticated", false, true, undefined>>;
|
|
169
|
+
};
|
|
170
|
+
}>];
|
|
171
|
+
readonly methods: {
|
|
172
|
+
deploy: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
173
|
+
format: "astrale.services.deployment-request";
|
|
174
|
+
version: 1;
|
|
175
|
+
organization?: string | undefined;
|
|
176
|
+
origin: string;
|
|
177
|
+
environment: string;
|
|
178
|
+
addressing: "opaque" | "readable";
|
|
179
|
+
label: string;
|
|
180
|
+
buildDigest: string;
|
|
181
|
+
configuration: {
|
|
182
|
+
format: "astrale.deployment.configuration";
|
|
183
|
+
version: 1;
|
|
184
|
+
vars: Record<string, string>;
|
|
185
|
+
settings: {
|
|
186
|
+
maximumRequestBytes: number;
|
|
187
|
+
invocationTimeoutMs: number;
|
|
188
|
+
tokenExchange: false | {
|
|
189
|
+
maximumLifetimeSeconds: number;
|
|
190
|
+
};
|
|
191
|
+
durableOptions?: {
|
|
192
|
+
retentionMs?: number | undefined;
|
|
193
|
+
retry?: {
|
|
194
|
+
initialIntervalMs?: number | undefined;
|
|
195
|
+
maxAttempts?: number | undefined;
|
|
196
|
+
maxIntervalMs?: number | undefined;
|
|
197
|
+
} | undefined;
|
|
198
|
+
stepTimeoutMs?: number | undefined;
|
|
199
|
+
} | undefined;
|
|
200
|
+
};
|
|
201
|
+
runtime: {
|
|
202
|
+
compatibilityDate: string;
|
|
203
|
+
compatibilityFlags: string[];
|
|
204
|
+
};
|
|
205
|
+
bindings: {
|
|
206
|
+
services: {
|
|
207
|
+
name: string;
|
|
208
|
+
service: string;
|
|
209
|
+
}[];
|
|
210
|
+
dispatchNamespaces: {
|
|
211
|
+
name: string;
|
|
212
|
+
namespace: string;
|
|
213
|
+
}[];
|
|
214
|
+
secrets: string[];
|
|
215
|
+
};
|
|
216
|
+
router: false | {
|
|
217
|
+
service: string;
|
|
218
|
+
hostSuffix: string;
|
|
219
|
+
minLabels: number;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
record: {
|
|
223
|
+
releaseDigest: string;
|
|
224
|
+
schemaRevision: string;
|
|
225
|
+
schemaBundle: string;
|
|
226
|
+
commit: {
|
|
227
|
+
sha: string;
|
|
228
|
+
dirty: boolean;
|
|
229
|
+
base?: {
|
|
230
|
+
version: string;
|
|
231
|
+
distance: number;
|
|
232
|
+
} | undefined;
|
|
233
|
+
} | null;
|
|
234
|
+
};
|
|
235
|
+
bundle: {
|
|
236
|
+
entrypoint: string;
|
|
237
|
+
modules: ({
|
|
238
|
+
name: string;
|
|
239
|
+
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
240
|
+
content: {
|
|
241
|
+
encoding: "gzip" | "identity";
|
|
242
|
+
decodedSize: number;
|
|
243
|
+
contentBase64: string;
|
|
244
|
+
} | {
|
|
245
|
+
encoding: "gzip" | "identity";
|
|
246
|
+
decodedSize: number;
|
|
247
|
+
contentBase64Chunks: string[];
|
|
248
|
+
};
|
|
249
|
+
} | {
|
|
250
|
+
contentBase64: string;
|
|
251
|
+
name: string;
|
|
252
|
+
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
253
|
+
} | {
|
|
254
|
+
contentBase64Chunks: string[];
|
|
255
|
+
name: string;
|
|
256
|
+
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
257
|
+
})[];
|
|
258
|
+
assets?: {
|
|
259
|
+
files: ({
|
|
260
|
+
path: string;
|
|
261
|
+
contentType?: string | undefined;
|
|
262
|
+
content: {
|
|
263
|
+
encoding: "gzip" | "identity";
|
|
264
|
+
decodedSize: number;
|
|
265
|
+
contentBase64: string;
|
|
266
|
+
} | {
|
|
267
|
+
encoding: "gzip" | "identity";
|
|
268
|
+
decodedSize: number;
|
|
269
|
+
contentBase64Chunks: string[];
|
|
270
|
+
};
|
|
271
|
+
} | {
|
|
272
|
+
contentBase64: string;
|
|
273
|
+
path: string;
|
|
274
|
+
contentType?: string | undefined;
|
|
275
|
+
} | {
|
|
276
|
+
contentBase64Chunks: string[];
|
|
277
|
+
path: string;
|
|
278
|
+
contentType?: string | undefined;
|
|
279
|
+
})[];
|
|
280
|
+
notFound?: "404-page" | "none" | "single-page-application" | undefined;
|
|
281
|
+
runWorkerFirst?: boolean | undefined;
|
|
282
|
+
htmlHandling?: "none" | undefined;
|
|
283
|
+
} | undefined;
|
|
284
|
+
};
|
|
285
|
+
secrets: Record<string, string>;
|
|
286
|
+
readiness?: {
|
|
287
|
+
paths: string[];
|
|
288
|
+
} | undefined;
|
|
289
|
+
}, {
|
|
290
|
+
readonly mode: 'value';
|
|
291
|
+
readonly value: {
|
|
292
|
+
kind: "rejected";
|
|
293
|
+
reason: "address-mismatch" | "build-mismatch" | "deployment-conflict" | "deployment-retired" | "hosting-unavailable" | "invalid-deployment" | "line-owned-elsewhere" | "service-unavailable";
|
|
294
|
+
message: string;
|
|
295
|
+
retryAfter?: string | undefined;
|
|
296
|
+
} | {
|
|
297
|
+
kind: "deployed";
|
|
298
|
+
state: "created" | "reused";
|
|
299
|
+
secrets: {
|
|
300
|
+
state: "bound" | "unchanged" | "updated";
|
|
301
|
+
};
|
|
302
|
+
deployment: {
|
|
303
|
+
id: string;
|
|
304
|
+
url: string;
|
|
305
|
+
label: string;
|
|
306
|
+
line: string;
|
|
307
|
+
owner: string;
|
|
308
|
+
state: "active" | "deploying" | "failed" | "retired" | "retiring";
|
|
309
|
+
retention: "preview" | "published";
|
|
310
|
+
createdAt: string;
|
|
311
|
+
lastCallAt?: string | undefined;
|
|
312
|
+
expiresAt?: string | undefined;
|
|
313
|
+
retiredAt?: string | undefined;
|
|
314
|
+
retirement?: "expired" | "withdrawn" | undefined;
|
|
315
|
+
signingKeyId: string;
|
|
316
|
+
record: {
|
|
317
|
+
format: "astrale.deployment-record";
|
|
318
|
+
version: 1;
|
|
319
|
+
origin: string;
|
|
320
|
+
environment: string;
|
|
321
|
+
releaseDigest: string;
|
|
322
|
+
buildDigest: string;
|
|
323
|
+
schemaRevision: string;
|
|
324
|
+
configuration: string;
|
|
325
|
+
providerScript: string;
|
|
326
|
+
commit: {
|
|
327
|
+
sha: string;
|
|
328
|
+
dirty: boolean;
|
|
329
|
+
base?: {
|
|
330
|
+
version: string;
|
|
331
|
+
distance: number;
|
|
332
|
+
} | undefined;
|
|
333
|
+
} | null;
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
}, "authenticated", true, false, undefined>>;
|
|
338
|
+
hosting: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
339
|
+
readonly mode: 'value';
|
|
340
|
+
readonly value: {
|
|
341
|
+
routingDomain: string;
|
|
342
|
+
addressing: "opaque" | "readable";
|
|
343
|
+
};
|
|
344
|
+
}, "authenticated", true, false, undefined>>;
|
|
345
|
+
list: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
346
|
+
origin?: string | undefined;
|
|
347
|
+
environment?: string | undefined;
|
|
348
|
+
}, {
|
|
349
|
+
readonly mode: 'value';
|
|
350
|
+
readonly value: {
|
|
351
|
+
deployments: ({
|
|
352
|
+
id: string;
|
|
353
|
+
url: string;
|
|
354
|
+
label: string;
|
|
355
|
+
line: string;
|
|
356
|
+
owner: string;
|
|
357
|
+
state: "active" | "deploying" | "failed" | "retired" | "retiring";
|
|
358
|
+
retention: "preview" | "published";
|
|
359
|
+
createdAt: string;
|
|
360
|
+
lastCallAt?: string | undefined;
|
|
361
|
+
expiresAt?: string | undefined;
|
|
362
|
+
retiredAt?: string | undefined;
|
|
363
|
+
retirement?: "expired" | "withdrawn" | undefined;
|
|
364
|
+
signingKeyId: string;
|
|
365
|
+
record: {
|
|
366
|
+
format: "astrale.deployment-record";
|
|
367
|
+
version: 1;
|
|
368
|
+
origin: string;
|
|
369
|
+
environment: string;
|
|
370
|
+
releaseDigest: string;
|
|
371
|
+
buildDigest: string;
|
|
372
|
+
schemaRevision: string;
|
|
373
|
+
configuration: string;
|
|
374
|
+
providerScript: string;
|
|
375
|
+
commit: {
|
|
376
|
+
sha: string;
|
|
377
|
+
dirty: boolean;
|
|
378
|
+
base?: {
|
|
379
|
+
version: string;
|
|
380
|
+
distance: number;
|
|
381
|
+
} | undefined;
|
|
382
|
+
} | null;
|
|
383
|
+
};
|
|
384
|
+
} | {
|
|
385
|
+
id: string;
|
|
386
|
+
url: string;
|
|
387
|
+
label: string;
|
|
388
|
+
line: string;
|
|
389
|
+
owner: string;
|
|
390
|
+
state: "active" | "deploying" | "failed" | "retired" | "retiring";
|
|
391
|
+
retention: "preview" | "published";
|
|
392
|
+
createdAt: string;
|
|
393
|
+
lastCallAt?: string | undefined;
|
|
394
|
+
expiresAt?: string | undefined;
|
|
395
|
+
retiredAt?: string | undefined;
|
|
396
|
+
retirement?: "expired" | "withdrawn" | undefined;
|
|
397
|
+
signingKeyId: string;
|
|
398
|
+
record: unknown;
|
|
399
|
+
})[];
|
|
400
|
+
};
|
|
401
|
+
}, "authenticated", true, false, undefined>>;
|
|
402
|
+
setSecret: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
403
|
+
name: string;
|
|
404
|
+
value: string;
|
|
405
|
+
}, {
|
|
406
|
+
readonly mode: 'value';
|
|
407
|
+
readonly value: {
|
|
408
|
+
name: string;
|
|
409
|
+
} | {
|
|
410
|
+
kind: "rejected";
|
|
411
|
+
reason: "secret-undeclared" | "service-unavailable";
|
|
412
|
+
message: string;
|
|
413
|
+
retryAfter?: string | undefined;
|
|
414
|
+
};
|
|
415
|
+
}, "authenticated", false, false, undefined>>;
|
|
416
|
+
secrets: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
417
|
+
readonly mode: 'value';
|
|
418
|
+
readonly value: string[];
|
|
419
|
+
}, "authenticated", false, false, undefined>>;
|
|
420
|
+
lastCalls: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
421
|
+
labels: string[];
|
|
422
|
+
}, {
|
|
423
|
+
readonly mode: 'value';
|
|
424
|
+
readonly value: Record<string, string | null>;
|
|
425
|
+
}, "authenticated", true, false, undefined>>;
|
|
426
|
+
expirePreviews: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
427
|
+
limit?: number | undefined;
|
|
428
|
+
apply?: boolean | undefined;
|
|
429
|
+
}, {
|
|
430
|
+
readonly mode: 'value';
|
|
431
|
+
readonly value: {
|
|
432
|
+
planned: string[];
|
|
433
|
+
retired: string[];
|
|
434
|
+
pending: string[];
|
|
435
|
+
};
|
|
436
|
+
}, "authenticated", true, false, undefined>>;
|
|
437
|
+
retain: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
438
|
+
label: string;
|
|
439
|
+
}, {
|
|
440
|
+
readonly mode: 'value';
|
|
441
|
+
readonly value: {
|
|
442
|
+
retention: "published";
|
|
443
|
+
};
|
|
444
|
+
}, "authenticated", true, false, undefined>>;
|
|
445
|
+
retire: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
446
|
+
readonly mode: 'value';
|
|
447
|
+
readonly value: {
|
|
448
|
+
kind: "retired";
|
|
449
|
+
} | {
|
|
450
|
+
kind: "retiring";
|
|
451
|
+
retryAfterMs: number;
|
|
452
|
+
} | {
|
|
453
|
+
kind: "rejected";
|
|
454
|
+
reason: "address-mismatch" | "build-mismatch" | "deployment-conflict" | "deployment-retired" | "hosting-unavailable" | "invalid-deployment" | "line-owned-elsewhere" | "service-unavailable";
|
|
455
|
+
message: string;
|
|
456
|
+
retryAfter?: string | undefined;
|
|
457
|
+
};
|
|
458
|
+
}, "authenticated", false, false, undefined>>;
|
|
459
|
+
};
|
|
460
|
+
readonly policies: {
|
|
461
|
+
read: () => import("@astrale-os/sdk/schema").Policy;
|
|
462
|
+
};
|
|
463
|
+
}>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { classIcon, nodeClass } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { CloudUpload } from '@astrale-os/sdk/schema/icons';
|
|
3
|
+
import { deployCloudflareDeployment } from '../functions/deploy-cloudflare-deployment.js';
|
|
4
|
+
import { describeDeploymentHosting } from '../functions/describe-deployment-hosting.js';
|
|
5
|
+
import { expireDeploymentPreviews } from '../functions/expire-deployment-previews.js';
|
|
6
|
+
import { listCloudflareDeploymentSecretNames } from '../functions/list-cloudflare-deployment-secret-names.js';
|
|
7
|
+
import { listCloudflareDeployments } from '../functions/list-cloudflare-deployments.js';
|
|
8
|
+
import { readDeploymentLastCalls } from '../functions/read-deployment-last-calls.js';
|
|
9
|
+
import { retainDeployment } from '../functions/retain-deployment.js';
|
|
10
|
+
import { retireDeployment } from '../functions/retire-deployment.js';
|
|
11
|
+
import { setCloudflareDeploymentSecret } from '../functions/set-cloudflare-deployment-secret.js';
|
|
12
|
+
import { OwnDeployment } from '../policies/own-deployment.js';
|
|
13
|
+
import { Deployment } from './deployment.js';
|
|
14
|
+
export const CloudflareDeployment = nodeClass({
|
|
15
|
+
description: 'One Deployment uploaded as the Workers for Platforms script its label names.',
|
|
16
|
+
icon: classIcon.lucide(CloudUpload),
|
|
17
|
+
extends: [Deployment],
|
|
18
|
+
methods: {
|
|
19
|
+
deploy: deployCloudflareDeployment,
|
|
20
|
+
hosting: describeDeploymentHosting,
|
|
21
|
+
list: listCloudflareDeployments,
|
|
22
|
+
setSecret: setCloudflareDeploymentSecret,
|
|
23
|
+
secrets: listCloudflareDeploymentSecretNames,
|
|
24
|
+
lastCalls: readDeploymentLastCalls,
|
|
25
|
+
expirePreviews: expireDeploymentPreviews,
|
|
26
|
+
retain: retainDeployment,
|
|
27
|
+
retire: retireDeployment,
|
|
28
|
+
},
|
|
29
|
+
policies: { read: () => OwnDeployment },
|
|
30
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The line every deployment of one origin in one environment shares. The first organisation that
|
|
4
|
+
* deploys on it holds it, and only an operator transfer gives it to another: it stays registered
|
|
5
|
+
* and refused to every other organisation after its organisation, that organisation's Services or
|
|
6
|
+
* every deployment on it are deleted.
|
|
7
|
+
*/
|
|
8
|
+
export declare const DeploymentLine: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
|
|
9
|
+
readonly description: "The deployment line of one origin in one environment, held by one organisation.";
|
|
10
|
+
readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
|
|
11
|
+
readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Timestamped">];
|
|
12
|
+
readonly properties: {
|
|
13
|
+
origin: z.ZodString;
|
|
14
|
+
environment: z.ZodString;
|
|
15
|
+
/** The 16-character fingerprint of `(origin, environment)`; it alone identifies the line. */
|
|
16
|
+
fingerprint: z.ZodString;
|
|
17
|
+
/** How the line reads in its deployments' labels: readable, or the fingerprint alone. */
|
|
18
|
+
line: z.ZodString;
|
|
19
|
+
};
|
|
20
|
+
readonly policies: {
|
|
21
|
+
read: () => import("@astrale-os/sdk/schema").Policy;
|
|
22
|
+
};
|
|
23
|
+
}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { classIcon, fullMatch, K, nodeClass } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { GitBranch } from '@astrale-os/sdk/schema/icons';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { OwnLine } from '../policies/own-line.js';
|
|
5
|
+
/**
|
|
6
|
+
* The line every deployment of one origin in one environment shares. The first organisation that
|
|
7
|
+
* deploys on it holds it, and only an operator transfer gives it to another: it stays registered
|
|
8
|
+
* and refused to every other organisation after its organisation, that organisation's Services or
|
|
9
|
+
* every deployment on it are deleted.
|
|
10
|
+
*/
|
|
11
|
+
export const DeploymentLine = nodeClass({
|
|
12
|
+
description: 'The deployment line of one origin in one environment, held by one organisation.',
|
|
13
|
+
icon: classIcon.lucide(GitBranch),
|
|
14
|
+
extends: [K.classes.Timestamped],
|
|
15
|
+
properties: {
|
|
16
|
+
origin: z.string().min(1).max(253),
|
|
17
|
+
environment: z.string().min(1).max(63),
|
|
18
|
+
/** The 16-character fingerprint of `(origin, environment)`; it alone identifies the line. */
|
|
19
|
+
fingerprint: z.string().check(fullMatch('[a-z2-7]{16}')),
|
|
20
|
+
/** How the line reads in its deployments' labels: readable, or the fingerprint alone. */
|
|
21
|
+
line: z.string().min(16).max(40),
|
|
22
|
+
},
|
|
23
|
+
policies: { read: () => OwnLine },
|
|
24
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** The line one deployment was made on; a deployment never moves to another line. */
|
|
2
|
+
export declare const deployment_on_line: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
|
|
3
|
+
readonly depth: 0;
|
|
4
|
+
readonly abstract: false;
|
|
5
|
+
readonly extends: readonly [];
|
|
6
|
+
readonly properties: never;
|
|
7
|
+
readonly source: {
|
|
8
|
+
readonly as: "deployment";
|
|
9
|
+
readonly outgoing: "1";
|
|
10
|
+
};
|
|
11
|
+
readonly target: {
|
|
12
|
+
readonly as: "line";
|
|
13
|
+
readonly incoming: "0..*";
|
|
14
|
+
};
|
|
15
|
+
readonly constraints: Record<never, never>;
|
|
16
|
+
readonly effectiveProperties: never;
|
|
17
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { edgeClass } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { TraverseOwnedLineDeployment } from '../policies/traverse-owned-line-deployment.js';
|
|
3
|
+
import { DeploymentLine } from './deployment-line.js';
|
|
4
|
+
import { Deployment } from './deployment.js';
|
|
5
|
+
/** The line one deployment was made on; a deployment never moves to another line. */
|
|
6
|
+
export const deployment_on_line = edgeClass.directed({
|
|
7
|
+
description: 'The deployment line one Deployment belongs to.',
|
|
8
|
+
source: { as: 'deployment', accepts: [() => Deployment], outgoing: '1' },
|
|
9
|
+
target: { as: 'line', accepts: [() => DeploymentLine], incoming: '0..*' },
|
|
10
|
+
policies: { traverse: () => TraverseOwnedLineDeployment },
|
|
11
|
+
});
|