@astrale-domains/services 0.5.0 → 0.6.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/README.md +149 -51
- package/dist/scaffold/create-service.mjs +94 -0
- package/dist/scaffold/template/.env.example +4 -0
- package/dist/scaffold/template/README.md +75 -0
- package/dist/scaffold/template/gitignore +6 -0
- package/dist/scaffold/template/scripts/build.mjs +20 -0
- package/dist/scaffold/template/scripts/deploy.mjs +65 -0
- package/dist/scaffold/template/scripts/service.mjs +69 -0
- package/dist/scaffold/template/src/account.js +31 -0
- package/dist/scaffold/template/src/index.js +50 -0
- package/dist/scaffold/template/src/job.js +22 -0
- package/dist/schema/index.d.ts +2 -2
- package/dist/schema/index.js +1 -1
- package/dist/schema/modules/deployment/classes/cloudflare-deployment.d.ts +41 -20
- package/dist/schema/modules/deployment/classes/deployment.d.ts +54 -25
- package/dist/schema/modules/deployment/classes/deployment.js +20 -9
- package/dist/schema/modules/deployment/functions/retire-deployment.d.ts +5 -5
- package/dist/schema/modules/deployment/index.d.ts +2 -2
- package/dist/schema/modules/deployment/index.js +1 -1
- package/dist/schema/modules/deployment/types/deployment-hosting.d.ts +19 -49
- package/dist/schema/modules/deployment/types/deployment-hosting.js +10 -10
- package/dist/schema/modules/deployment/types/deployment-request.d.ts +45 -93
- package/dist/schema/modules/deployment/types/deployment-request.js +60 -30
- package/dist/schema/modules/deployment/types/deployment-response.d.ts +14 -22
- package/dist/schema/modules/deployment/types/deployment-response.js +5 -2
- package/dist/schema/modules/deployment/types/deployment-secret.d.ts +2 -2
- package/dist/schema/modules/deployment/types/deployment-secret.js +2 -2
- package/dist/schema/modules/deployment/types/deployment-summary.d.ts +13 -112
- package/dist/schema/modules/deployment/types/deployment-summary.js +16 -18
- package/dist/schema/modules/deployment/types/index.d.ts +10 -12
- package/dist/schema/modules/deployment/types/index.js +5 -6
- package/dist/schema/modules/deployment/types/{frozen-configuration.d.ts → legacy-deployment.d.ts} +24 -11
- package/dist/schema/modules/deployment/types/{frozen-configuration.js → legacy-deployment.js} +34 -10
- package/dist/schema/modules/deployment/types/legacy-migration.d.ts +17 -0
- package/dist/schema/modules/deployment/types/legacy-migration.js +17 -0
- package/dist/schema/modules/deployment/types/worker-configuration.d.ts +21 -0
- package/dist/schema/modules/deployment/types/worker-configuration.js +21 -0
- package/dist/schema/modules/deployment/types/worker-record.d.ts +12 -0
- package/dist/schema/modules/deployment/types/worker-record.js +15 -0
- package/dist/schema/modules/service/classes/cloudflare-service.d.ts +72 -135
- package/dist/schema/modules/service/classes/cloudflare-service.js +6 -1
- package/dist/schema/modules/service/classes/service.d.ts +17 -7
- package/dist/schema/modules/service/classes/service.js +14 -8
- package/dist/schema/modules/service/functions/deploy-service.d.ts +44 -100
- package/dist/schema/modules/service/functions/deploy-service.js +6 -5
- package/dist/schema/modules/service/functions/describe-hosting.d.ts +0 -1
- package/dist/schema/modules/service/functions/index.d.ts +1 -0
- package/dist/schema/modules/service/functions/index.js +1 -0
- package/dist/schema/modules/service/functions/list-service-deployments.d.ts +12 -36
- package/dist/schema/modules/service/functions/migrate-legacy-deployments.d.ts +17 -0
- package/dist/schema/modules/service/functions/migrate-legacy-deployments.js +15 -0
- package/dist/schema/modules/service/functions/promote-service.d.ts +2 -2
- package/dist/schema/modules/service/functions/set-service-secret.d.ts +2 -2
- package/dist/schema/modules/service/functions/transfer-service.d.ts +2 -2
- package/dist/schema/modules/service/index.d.ts +1 -1
- package/dist/schema/modules/service/index.js +1 -1
- package/dist/schema/schema.d.ts +158 -177
- package/package.json +11 -7
- package/dist/schema/modules/deployment/types/content/index.d.ts +0 -1
- package/dist/schema/modules/deployment/types/content/index.js +0 -1
- package/dist/schema/modules/deployment/types/content/limits.d.ts +0 -7
- package/dist/schema/modules/deployment/types/content/limits.js +0 -7
- package/dist/schema/modules/deployment/types/deployment-record.d.ts +0 -35
- package/dist/schema/modules/deployment/types/deployment-record.js +0 -31
- package/dist/schema/modules/deployment/types/service-deployment-artifact-module.d.ts +0 -26
- package/dist/schema/modules/deployment/types/service-deployment-artifact-module.js +0 -10
- package/dist/schema/modules/deployment/types/service-deployment-assets.d.ts +0 -49
- package/dist/schema/modules/deployment/types/service-deployment-assets.js +0 -16
- package/dist/schema/modules/deployment/types/service-deployment-content.d.ts +0 -19
- package/dist/schema/modules/deployment/types/service-deployment-content.js +0 -24
package/dist/schema/schema.d.ts
CHANGED
|
@@ -8,7 +8,12 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"se
|
|
|
8
8
|
readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
|
|
9
9
|
readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Timestamped">];
|
|
10
10
|
readonly properties: {
|
|
11
|
-
|
|
11
|
+
project: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodString, {
|
|
12
|
+
readonly required: false;
|
|
13
|
+
}>;
|
|
14
|
+
origin: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodString, {
|
|
15
|
+
readonly required: false;
|
|
16
|
+
}>;
|
|
12
17
|
environment: import("zod").ZodString;
|
|
13
18
|
fingerprint: import("zod").ZodString;
|
|
14
19
|
url: import("zod").ZodString;
|
|
@@ -32,7 +37,12 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"se
|
|
|
32
37
|
readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
|
|
33
38
|
readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Timestamped">];
|
|
34
39
|
readonly properties: {
|
|
35
|
-
|
|
40
|
+
project: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodString, {
|
|
41
|
+
readonly required: false;
|
|
42
|
+
}>;
|
|
43
|
+
origin: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodString, {
|
|
44
|
+
readonly required: false;
|
|
45
|
+
}>;
|
|
36
46
|
environment: import("zod").ZodString;
|
|
37
47
|
fingerprint: import("zod").ZodString;
|
|
38
48
|
url: import("zod").ZodString;
|
|
@@ -49,73 +59,30 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"se
|
|
|
49
59
|
}>];
|
|
50
60
|
readonly methods: {
|
|
51
61
|
deploy: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
52
|
-
format: "astrale.
|
|
62
|
+
format: "astrale.worker.deployment-request";
|
|
53
63
|
version: 1;
|
|
54
64
|
owner?: string | undefined;
|
|
55
|
-
|
|
65
|
+
project: string;
|
|
56
66
|
environment: string;
|
|
57
|
-
addressing: "opaque";
|
|
58
67
|
label: string;
|
|
59
68
|
buildDigest: string;
|
|
60
69
|
configuration: {
|
|
61
|
-
format: "astrale.
|
|
70
|
+
format: "astrale.worker.configuration";
|
|
62
71
|
version: 1;
|
|
72
|
+
compatibilityDate: string;
|
|
73
|
+
compatibilityFlags: string[];
|
|
63
74
|
vars: Record<string, string>;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
maximumLifetimeSeconds: number;
|
|
69
|
-
};
|
|
70
|
-
durableOptions?: {
|
|
71
|
-
retentionMs?: number | undefined;
|
|
72
|
-
retry?: {
|
|
73
|
-
initialIntervalMs?: number | undefined;
|
|
74
|
-
maxAttempts?: number | undefined;
|
|
75
|
-
maxIntervalMs?: number | undefined;
|
|
76
|
-
} | undefined;
|
|
77
|
-
stepTimeoutMs?: number | undefined;
|
|
78
|
-
} | undefined;
|
|
79
|
-
};
|
|
80
|
-
runtime: {
|
|
81
|
-
compatibilityDate: string;
|
|
82
|
-
compatibilityFlags: string[];
|
|
83
|
-
};
|
|
84
|
-
bindings: {
|
|
85
|
-
services: {
|
|
86
|
-
name: string;
|
|
87
|
-
service: string;
|
|
88
|
-
}[];
|
|
89
|
-
dispatchNamespaces: {
|
|
90
|
-
name: string;
|
|
91
|
-
namespace: string;
|
|
92
|
-
}[];
|
|
93
|
-
secrets: string[];
|
|
94
|
-
};
|
|
95
|
-
router: false | {
|
|
96
|
-
service: string;
|
|
97
|
-
hostSuffix: string;
|
|
98
|
-
minLabels: number;
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
record: {
|
|
102
|
-
releaseDigest: string;
|
|
103
|
-
schemaRevision: string;
|
|
104
|
-
schemaBundle: string;
|
|
105
|
-
commit: {
|
|
106
|
-
sha: string;
|
|
107
|
-
dirty: boolean;
|
|
108
|
-
base?: {
|
|
109
|
-
version: string;
|
|
110
|
-
distance: number;
|
|
111
|
-
} | undefined;
|
|
112
|
-
} | null;
|
|
75
|
+
secrets: string[];
|
|
76
|
+
record: boolean;
|
|
77
|
+
signingIdentity: boolean;
|
|
78
|
+
router: boolean;
|
|
113
79
|
};
|
|
114
|
-
|
|
115
|
-
|
|
80
|
+
worker: {
|
|
81
|
+
manifest: Record<string, unknown>;
|
|
82
|
+
mainModule: string;
|
|
116
83
|
modules: {
|
|
117
84
|
name: string;
|
|
118
|
-
kind
|
|
85
|
+
kind: "data" | "esm" | "text" | "wasm";
|
|
119
86
|
content: {
|
|
120
87
|
encoding: "gzip" | "identity";
|
|
121
88
|
decodedSize: number;
|
|
@@ -127,29 +94,26 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"se
|
|
|
127
94
|
};
|
|
128
95
|
}[];
|
|
129
96
|
assets?: {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}[];
|
|
143
|
-
notFound?: "404-page" | "none" | "single-page-application" | undefined;
|
|
144
|
-
runWorkerFirst?: boolean | undefined;
|
|
145
|
-
htmlHandling?: "none" | undefined;
|
|
146
|
-
} | undefined;
|
|
97
|
+
path: string;
|
|
98
|
+
contentType?: string | undefined;
|
|
99
|
+
content: {
|
|
100
|
+
encoding: "gzip" | "identity";
|
|
101
|
+
decodedSize: number;
|
|
102
|
+
contentBase64: string;
|
|
103
|
+
} | {
|
|
104
|
+
encoding: "gzip" | "identity";
|
|
105
|
+
decodedSize: number;
|
|
106
|
+
contentBase64Chunks: string[];
|
|
107
|
+
};
|
|
108
|
+
}[] | undefined;
|
|
147
109
|
};
|
|
110
|
+
record?: {
|
|
111
|
+
contentType: string;
|
|
112
|
+
contentBase64: string;
|
|
113
|
+
} | undefined;
|
|
114
|
+
readiness?: string[] | undefined;
|
|
148
115
|
secrets: Record<string, string>;
|
|
149
116
|
promote?: boolean | undefined;
|
|
150
|
-
readiness?: {
|
|
151
|
-
paths: string[];
|
|
152
|
-
} | undefined;
|
|
153
117
|
}, {
|
|
154
118
|
readonly mode: 'value';
|
|
155
119
|
readonly value: {
|
|
@@ -169,31 +133,20 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"se
|
|
|
169
133
|
label: string;
|
|
170
134
|
serviceId: string;
|
|
171
135
|
service: string;
|
|
136
|
+
project: string;
|
|
137
|
+
environment: string;
|
|
172
138
|
owner: string;
|
|
173
139
|
state: "active" | "deploying" | "failed" | "retired" | "retiring";
|
|
174
140
|
current: boolean;
|
|
175
141
|
createdAt: string;
|
|
176
142
|
retiredAt?: string | undefined;
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
buildDigest: string;
|
|
185
|
-
schemaRevision: string;
|
|
186
|
-
configuration: string;
|
|
187
|
-
providerScript: string;
|
|
188
|
-
commit: {
|
|
189
|
-
sha: string;
|
|
190
|
-
dirty: boolean;
|
|
191
|
-
base?: {
|
|
192
|
-
version: string;
|
|
193
|
-
distance: number;
|
|
194
|
-
} | undefined;
|
|
195
|
-
} | null;
|
|
196
|
-
};
|
|
143
|
+
buildDigest: string;
|
|
144
|
+
configuration: string;
|
|
145
|
+
signingKeyId?: string | undefined;
|
|
146
|
+
record?: {
|
|
147
|
+
contentType: string;
|
|
148
|
+
contentBase64: string;
|
|
149
|
+
} | undefined;
|
|
197
150
|
};
|
|
198
151
|
};
|
|
199
152
|
}, "authenticated", true, false, undefined>>;
|
|
@@ -201,60 +154,35 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"se
|
|
|
201
154
|
readonly mode: 'value';
|
|
202
155
|
readonly value: {
|
|
203
156
|
routingDomain: string;
|
|
204
|
-
addressing: "opaque";
|
|
205
157
|
};
|
|
206
158
|
}, "authenticated", true, false, undefined>>;
|
|
207
159
|
list: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
208
|
-
|
|
160
|
+
project?: string | undefined;
|
|
209
161
|
environment?: string | undefined;
|
|
210
162
|
}, {
|
|
211
163
|
readonly mode: 'value';
|
|
212
164
|
readonly value: {
|
|
213
|
-
deployments:
|
|
165
|
+
deployments: {
|
|
214
166
|
id: string;
|
|
215
167
|
url: string;
|
|
216
168
|
label: string;
|
|
217
169
|
serviceId: string;
|
|
218
170
|
service: string;
|
|
171
|
+
project: string;
|
|
172
|
+
environment: string;
|
|
219
173
|
owner: string;
|
|
220
174
|
state: "active" | "deploying" | "failed" | "retired" | "retiring";
|
|
221
175
|
current: boolean;
|
|
222
176
|
createdAt: string;
|
|
223
177
|
retiredAt?: string | undefined;
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
schemaRevision: string;
|
|
233
|
-
configuration: string;
|
|
234
|
-
providerScript: string;
|
|
235
|
-
commit: {
|
|
236
|
-
sha: string;
|
|
237
|
-
dirty: boolean;
|
|
238
|
-
base?: {
|
|
239
|
-
version: string;
|
|
240
|
-
distance: number;
|
|
241
|
-
} | undefined;
|
|
242
|
-
} | null;
|
|
243
|
-
};
|
|
244
|
-
} | {
|
|
245
|
-
id: string;
|
|
246
|
-
url: string;
|
|
247
|
-
label: string;
|
|
248
|
-
serviceId: string;
|
|
249
|
-
service: string;
|
|
250
|
-
owner: string;
|
|
251
|
-
state: "active" | "deploying" | "failed" | "retired" | "retiring";
|
|
252
|
-
current: boolean;
|
|
253
|
-
createdAt: string;
|
|
254
|
-
retiredAt?: string | undefined;
|
|
255
|
-
signingKeyId: string;
|
|
256
|
-
record: unknown;
|
|
257
|
-
})[];
|
|
178
|
+
buildDigest: string;
|
|
179
|
+
configuration: string;
|
|
180
|
+
signingKeyId?: string | undefined;
|
|
181
|
+
record?: {
|
|
182
|
+
contentType: string;
|
|
183
|
+
contentBase64: string;
|
|
184
|
+
} | undefined;
|
|
185
|
+
}[];
|
|
258
186
|
};
|
|
259
187
|
}, "authenticated", true, false, undefined>>;
|
|
260
188
|
promote: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
@@ -262,12 +190,12 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"se
|
|
|
262
190
|
}, {
|
|
263
191
|
readonly mode: 'value';
|
|
264
192
|
readonly value: {
|
|
193
|
+
current: string;
|
|
194
|
+
} | {
|
|
265
195
|
kind: "rejected";
|
|
266
196
|
reason: "address-mismatch" | "build-mismatch" | "deployment-conflict" | "deployment-retired" | "hosting-unavailable" | "invalid-deployment" | "service-owned-elsewhere" | "service-unavailable";
|
|
267
197
|
message: string;
|
|
268
198
|
retryAfter?: string | undefined;
|
|
269
|
-
} | {
|
|
270
|
-
current: string;
|
|
271
199
|
};
|
|
272
200
|
}, "authenticated", false, false, undefined>>;
|
|
273
201
|
transfer: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
@@ -338,6 +266,17 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"se
|
|
|
338
266
|
retryAfterMs: number;
|
|
339
267
|
};
|
|
340
268
|
}, "authenticated", false, false, undefined>>;
|
|
269
|
+
migrate: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
270
|
+
readonly mode: 'value';
|
|
271
|
+
readonly value: {
|
|
272
|
+
services: number;
|
|
273
|
+
deployments: number;
|
|
274
|
+
unconverted: {
|
|
275
|
+
id: string;
|
|
276
|
+
reason: string;
|
|
277
|
+
}[];
|
|
278
|
+
};
|
|
279
|
+
}, "authorized", true, false, undefined>>;
|
|
341
280
|
};
|
|
342
281
|
readonly policies: {
|
|
343
282
|
read: () => import("@astrale-os/sdk/schema").Policy;
|
|
@@ -387,26 +326,20 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"se
|
|
|
387
326
|
required?: boolean;
|
|
388
327
|
description?: string;
|
|
389
328
|
}>;
|
|
390
|
-
|
|
391
|
-
|
|
329
|
+
buildDigest: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodString, {
|
|
330
|
+
readonly required: false;
|
|
331
|
+
}>;
|
|
332
|
+
configuration: import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
333
|
+
format: import("zod").ZodLiteral<"astrale.worker.configuration">;
|
|
392
334
|
version: import("zod").ZodLiteral<1>;
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
sha: import("zod").ZodString;
|
|
402
|
-
dirty: import("zod").ZodBoolean;
|
|
403
|
-
base: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
404
|
-
version: import("zod").ZodString;
|
|
405
|
-
distance: import("zod").ZodNumber;
|
|
406
|
-
}, import("zod/v4/core").$strict>>;
|
|
407
|
-
}, import("zod/v4/core").$strict>>;
|
|
408
|
-
}, import("zod/v4/core").$strict>;
|
|
409
|
-
configuration: import("zod").ZodObject<{
|
|
335
|
+
compatibilityDate: import("zod").ZodString;
|
|
336
|
+
compatibilityFlags: import("zod").ZodArray<import("zod").ZodString>;
|
|
337
|
+
vars: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
|
|
338
|
+
secrets: import("zod").ZodArray<import("zod").ZodString>;
|
|
339
|
+
record: import("zod").ZodBoolean;
|
|
340
|
+
signingIdentity: import("zod").ZodBoolean;
|
|
341
|
+
router: import("zod").ZodBoolean;
|
|
342
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
410
343
|
format: import("zod").ZodLiteral<"astrale.deployment.configuration">;
|
|
411
344
|
version: import("zod").ZodLiteral<1>;
|
|
412
345
|
vars: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
|
|
@@ -446,7 +379,34 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"se
|
|
|
446
379
|
hostSuffix: import("zod").ZodString;
|
|
447
380
|
minLabels: import("zod").ZodNumber;
|
|
448
381
|
}, import("zod/v4/core").$strict>]>;
|
|
449
|
-
}, import("zod/v4/core").$strict>;
|
|
382
|
+
}, import("zod/v4/core").$strict>]>;
|
|
383
|
+
configurationDigest: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodString, {
|
|
384
|
+
readonly required: false;
|
|
385
|
+
}>;
|
|
386
|
+
record: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
387
|
+
contentType: import("zod").ZodString;
|
|
388
|
+
contentBase64: import("zod").ZodString;
|
|
389
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
390
|
+
format: import("zod").ZodLiteral<"astrale.deployment-record">;
|
|
391
|
+
version: import("zod").ZodLiteral<1>;
|
|
392
|
+
origin: import("zod").ZodString;
|
|
393
|
+
environment: import("zod").ZodString;
|
|
394
|
+
releaseDigest: import("zod").ZodString;
|
|
395
|
+
buildDigest: import("zod").ZodString;
|
|
396
|
+
schemaRevision: import("zod").ZodString;
|
|
397
|
+
configuration: import("zod").ZodString;
|
|
398
|
+
providerScript: import("zod").ZodString;
|
|
399
|
+
commit: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
400
|
+
sha: import("zod").ZodString;
|
|
401
|
+
dirty: import("zod").ZodBoolean;
|
|
402
|
+
base: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
403
|
+
version: import("zod").ZodString;
|
|
404
|
+
distance: import("zod").ZodNumber;
|
|
405
|
+
}, import("zod/v4/core").$strict>>;
|
|
406
|
+
}, import("zod/v4/core").$strict>>;
|
|
407
|
+
}, import("zod/v4/core").$strict>]>, {
|
|
408
|
+
readonly required: false;
|
|
409
|
+
}>;
|
|
450
410
|
secretDigests: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodArray<import("zod").ZodObject<{
|
|
451
411
|
name: import("zod").ZodString;
|
|
452
412
|
digest: import("zod").ZodString;
|
|
@@ -513,26 +473,20 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"se
|
|
|
513
473
|
required?: boolean;
|
|
514
474
|
description?: string;
|
|
515
475
|
}>;
|
|
516
|
-
|
|
517
|
-
|
|
476
|
+
buildDigest: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodString, {
|
|
477
|
+
readonly required: false;
|
|
478
|
+
}>;
|
|
479
|
+
configuration: import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
480
|
+
format: import("zod").ZodLiteral<"astrale.worker.configuration">;
|
|
518
481
|
version: import("zod").ZodLiteral<1>;
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
sha: import("zod").ZodString;
|
|
528
|
-
dirty: import("zod").ZodBoolean;
|
|
529
|
-
base: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
530
|
-
version: import("zod").ZodString;
|
|
531
|
-
distance: import("zod").ZodNumber;
|
|
532
|
-
}, import("zod/v4/core").$strict>>;
|
|
533
|
-
}, import("zod/v4/core").$strict>>;
|
|
534
|
-
}, import("zod/v4/core").$strict>;
|
|
535
|
-
configuration: import("zod").ZodObject<{
|
|
482
|
+
compatibilityDate: import("zod").ZodString;
|
|
483
|
+
compatibilityFlags: import("zod").ZodArray<import("zod").ZodString>;
|
|
484
|
+
vars: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
|
|
485
|
+
secrets: import("zod").ZodArray<import("zod").ZodString>;
|
|
486
|
+
record: import("zod").ZodBoolean;
|
|
487
|
+
signingIdentity: import("zod").ZodBoolean;
|
|
488
|
+
router: import("zod").ZodBoolean;
|
|
489
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
536
490
|
format: import("zod").ZodLiteral<"astrale.deployment.configuration">;
|
|
537
491
|
version: import("zod").ZodLiteral<1>;
|
|
538
492
|
vars: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
|
|
@@ -572,7 +526,34 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"se
|
|
|
572
526
|
hostSuffix: import("zod").ZodString;
|
|
573
527
|
minLabels: import("zod").ZodNumber;
|
|
574
528
|
}, import("zod/v4/core").$strict>]>;
|
|
575
|
-
}, import("zod/v4/core").$strict>;
|
|
529
|
+
}, import("zod/v4/core").$strict>]>;
|
|
530
|
+
configurationDigest: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodString, {
|
|
531
|
+
readonly required: false;
|
|
532
|
+
}>;
|
|
533
|
+
record: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
534
|
+
contentType: import("zod").ZodString;
|
|
535
|
+
contentBase64: import("zod").ZodString;
|
|
536
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
537
|
+
format: import("zod").ZodLiteral<"astrale.deployment-record">;
|
|
538
|
+
version: import("zod").ZodLiteral<1>;
|
|
539
|
+
origin: import("zod").ZodString;
|
|
540
|
+
environment: import("zod").ZodString;
|
|
541
|
+
releaseDigest: import("zod").ZodString;
|
|
542
|
+
buildDigest: import("zod").ZodString;
|
|
543
|
+
schemaRevision: import("zod").ZodString;
|
|
544
|
+
configuration: import("zod").ZodString;
|
|
545
|
+
providerScript: import("zod").ZodString;
|
|
546
|
+
commit: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
547
|
+
sha: import("zod").ZodString;
|
|
548
|
+
dirty: import("zod").ZodBoolean;
|
|
549
|
+
base: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
550
|
+
version: import("zod").ZodString;
|
|
551
|
+
distance: import("zod").ZodNumber;
|
|
552
|
+
}, import("zod/v4/core").$strict>>;
|
|
553
|
+
}, import("zod/v4/core").$strict>>;
|
|
554
|
+
}, import("zod/v4/core").$strict>]>, {
|
|
555
|
+
readonly required: false;
|
|
556
|
+
}>;
|
|
576
557
|
secretDigests: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodArray<import("zod").ZodObject<{
|
|
577
558
|
name: import("zod").ZodString;
|
|
578
559
|
digest: import("zod").ZodString;
|
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrale-domains/services",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/astrale-os/domains.git",
|
|
7
7
|
"directory": "services"
|
|
8
8
|
},
|
|
9
|
+
"bin": {
|
|
10
|
+
"create-astrale-service": "./dist/scaffold/create-service.mjs"
|
|
11
|
+
},
|
|
9
12
|
"files": [
|
|
10
13
|
"dist"
|
|
11
14
|
],
|
|
@@ -28,11 +31,12 @@
|
|
|
28
31
|
"registry": "https://registry.npmjs.org/"
|
|
29
32
|
},
|
|
30
33
|
"dependencies": {
|
|
31
|
-
"@astrale-os/sdk": "0.6.0-beta.
|
|
34
|
+
"@astrale-os/sdk": "0.6.0-beta.23",
|
|
32
35
|
"zod": "4.4.3"
|
|
33
36
|
},
|
|
34
37
|
"devDependencies": {
|
|
35
|
-
"@astrale-os/adapter-
|
|
38
|
+
"@astrale-os/adapter-astrale": "0.5.0-beta.171",
|
|
39
|
+
"@astrale-os/adapter-cloudflare": "0.5.0-beta.178",
|
|
36
40
|
"@astrale-os/ox": ">=0.1.4 <1.0.0",
|
|
37
41
|
"@astrale-os/shell": "0.6.0-beta.8",
|
|
38
42
|
"@astrale-os/shell-react": "0.5.0-beta.8",
|
|
@@ -49,6 +53,8 @@
|
|
|
49
53
|
"@types/react-dom": "^19.2.4",
|
|
50
54
|
"@vitejs/plugin-react": "^6.1.0",
|
|
51
55
|
"bun": "1.4.2",
|
|
56
|
+
"esbuild": "0.28.1",
|
|
57
|
+
"jose": "6.2.9",
|
|
52
58
|
"jsdom": "30.0.1",
|
|
53
59
|
"oxlint": ">=1.79.0 <2.0.0",
|
|
54
60
|
"react": "^19.2.8",
|
|
@@ -72,16 +78,14 @@
|
|
|
72
78
|
"build": "astrale-domain build",
|
|
73
79
|
"lint": "astrale-domain lint",
|
|
74
80
|
"lint:fix": "astrale-domain lint --fix",
|
|
75
|
-
"package": "astrale-domain package",
|
|
81
|
+
"package": "astrale-domain package && node tooling/package-scaffolder.mjs",
|
|
76
82
|
"provider:bootstrap": "bun providers/cloudflare/operator/provision/bootstrap.ts",
|
|
77
83
|
"provider:deployment-audit": "bun providers/cloudflare/operator/maintenance/deployment-audit.ts",
|
|
78
84
|
"provider:doctor": "bun providers/cloudflare/operator/maintenance/doctor.ts",
|
|
79
85
|
"provider:platform-bootstrap": "bun providers/cloudflare/operator/platform-namespace/bootstrap.ts",
|
|
80
|
-
"provider:platform-expiry": "bun scripts/platform-namespace/expiry.ts",
|
|
81
86
|
"provider:platform-retire": "bun scripts/platform-namespace/retire.ts",
|
|
82
87
|
"provider:platform-secret": "bun providers/cloudflare/operator/platform-namespace/secret.ts",
|
|
83
|
-
"
|
|
84
|
-
"typecheck": "tsc --noEmit && tsc --project providers/cloudflare/operator/dispatch/tsconfig.json",
|
|
88
|
+
"typecheck": "tsc --noEmit && tsc --project providers/cloudflare/legacy/tsconfig.json",
|
|
85
89
|
"test": "vitest run --config vitest.config.ts && pnpm run accessibility:check",
|
|
86
90
|
"accessibility:check": "oxlint ui views frontend/src --jsx-a11y-plugin --react-plugin --deny-warnings",
|
|
87
91
|
"frontend:build": "vite build",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { PORTABLE_BASE64_CHUNK_SIZE, MAX_MODULE_BASE64_SIZE, MAX_ASSET_BASE64_SIZE, MAX_MODULE_DECODED_SIZE, MAX_ASSET_DECODED_SIZE, MAX_DEPLOYMENT_DECODED_SIZE, } from './limits.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { PORTABLE_BASE64_CHUNK_SIZE, MAX_MODULE_BASE64_SIZE, MAX_ASSET_BASE64_SIZE, MAX_MODULE_DECODED_SIZE, MAX_ASSET_DECODED_SIZE, MAX_DEPLOYMENT_DECODED_SIZE, } from './limits.js';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const PORTABLE_BASE64_CHUNK_SIZE: number;
|
|
2
|
-
export declare const MAX_MODULE_BASE64_SIZE: number;
|
|
3
|
-
export declare const MAX_ASSET_BASE64_SIZE: number;
|
|
4
|
-
export declare const MAX_MODULE_DECODED_SIZE: number;
|
|
5
|
-
export declare const MAX_ASSET_DECODED_SIZE: number;
|
|
6
|
-
/** Bound retained deployment material independently of its compressed request size. */
|
|
7
|
-
export declare const MAX_DEPLOYMENT_DECODED_SIZE: number;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export const PORTABLE_BASE64_CHUNK_SIZE = 512 * 1024;
|
|
2
|
-
export const MAX_MODULE_BASE64_SIZE = 10 * 1024 * 1024;
|
|
3
|
-
export const MAX_ASSET_BASE64_SIZE = 16 * 1024 * 1024;
|
|
4
|
-
export const MAX_MODULE_DECODED_SIZE = (MAX_MODULE_BASE64_SIZE / 4) * 3;
|
|
5
|
-
export const MAX_ASSET_DECODED_SIZE = (MAX_ASSET_BASE64_SIZE / 4) * 3;
|
|
6
|
-
/** Bound retained deployment material independently of its compressed request size. */
|
|
7
|
-
export const MAX_DEPLOYMENT_DECODED_SIZE = 32 * 1024 * 1024;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
/** The commit a deployment was built from, as its deployer declared it. */
|
|
3
|
-
export declare const deploymentCommit: z.ZodObject<{
|
|
4
|
-
sha: z.ZodString;
|
|
5
|
-
dirty: z.ZodBoolean;
|
|
6
|
-
base: z.ZodOptional<z.ZodObject<{
|
|
7
|
-
version: z.ZodString;
|
|
8
|
-
distance: z.ZodNumber;
|
|
9
|
-
}, z.core.$strict>>;
|
|
10
|
-
}, z.core.$strict>;
|
|
11
|
-
/**
|
|
12
|
-
* The `DeploymentRecordV1` one deploy declares, stored as declared beside the facts Services
|
|
13
|
-
* knows itself. Services admits it with the SDK's `acceptDeploymentRecord` before storing it, so
|
|
14
|
-
* this shape only bounds what the graph holds; any extension is a new record version.
|
|
15
|
-
*/
|
|
16
|
-
export declare const deploymentRecord: z.ZodObject<{
|
|
17
|
-
format: z.ZodLiteral<"astrale.deployment-record">;
|
|
18
|
-
version: z.ZodLiteral<1>;
|
|
19
|
-
origin: z.ZodString;
|
|
20
|
-
environment: z.ZodString;
|
|
21
|
-
releaseDigest: z.ZodString;
|
|
22
|
-
buildDigest: z.ZodString;
|
|
23
|
-
schemaRevision: z.ZodString;
|
|
24
|
-
configuration: z.ZodString;
|
|
25
|
-
providerScript: z.ZodString;
|
|
26
|
-
commit: z.ZodNullable<z.ZodObject<{
|
|
27
|
-
sha: z.ZodString;
|
|
28
|
-
dirty: z.ZodBoolean;
|
|
29
|
-
base: z.ZodOptional<z.ZodObject<{
|
|
30
|
-
version: z.ZodString;
|
|
31
|
-
distance: z.ZodNumber;
|
|
32
|
-
}, z.core.$strict>>;
|
|
33
|
-
}, z.core.$strict>>;
|
|
34
|
-
}, z.core.$strict>;
|
|
35
|
-
export type DeploymentRecord = z.output<typeof deploymentRecord>;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { fullMatch } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
const digest = z.string().check(fullMatch('sha256:[0-9a-f]{64}'));
|
|
4
|
-
/** The commit a deployment was built from, as its deployer declared it. */
|
|
5
|
-
export const deploymentCommit = z.strictObject({
|
|
6
|
-
sha: z.string().check(fullMatch('[0-9a-fA-F]{40}')),
|
|
7
|
-
dirty: z.boolean(),
|
|
8
|
-
base: z
|
|
9
|
-
.strictObject({
|
|
10
|
-
version: z.string().min(1).max(256),
|
|
11
|
-
distance: z.number().int().min(0),
|
|
12
|
-
})
|
|
13
|
-
.optional(),
|
|
14
|
-
});
|
|
15
|
-
/**
|
|
16
|
-
* The `DeploymentRecordV1` one deploy declares, stored as declared beside the facts Services
|
|
17
|
-
* knows itself. Services admits it with the SDK's `acceptDeploymentRecord` before storing it, so
|
|
18
|
-
* this shape only bounds what the graph holds; any extension is a new record version.
|
|
19
|
-
*/
|
|
20
|
-
export const deploymentRecord = z.strictObject({
|
|
21
|
-
format: z.literal('astrale.deployment-record'),
|
|
22
|
-
version: z.literal(1),
|
|
23
|
-
origin: z.string().min(1).max(253),
|
|
24
|
-
environment: z.string().min(1).max(63),
|
|
25
|
-
releaseDigest: digest,
|
|
26
|
-
buildDigest: digest,
|
|
27
|
-
schemaRevision: digest,
|
|
28
|
-
configuration: digest,
|
|
29
|
-
providerScript: z.string().min(1).max(57),
|
|
30
|
-
commit: deploymentCommit.nullable(),
|
|
31
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const artifactModule: z.ZodObject<{
|
|
3
|
-
name: z.ZodString;
|
|
4
|
-
kind: z.ZodOptional<z.ZodEnum<{
|
|
5
|
-
data: "data";
|
|
6
|
-
esm: "esm";
|
|
7
|
-
text: "text";
|
|
8
|
-
wasm: "wasm";
|
|
9
|
-
}>>;
|
|
10
|
-
content: z.ZodUnion<readonly [z.ZodObject<{
|
|
11
|
-
encoding: z.ZodEnum<{
|
|
12
|
-
gzip: "gzip";
|
|
13
|
-
identity: "identity";
|
|
14
|
-
}>;
|
|
15
|
-
decodedSize: z.ZodNumber;
|
|
16
|
-
contentBase64: z.ZodString;
|
|
17
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
18
|
-
encoding: z.ZodEnum<{
|
|
19
|
-
gzip: "gzip";
|
|
20
|
-
identity: "identity";
|
|
21
|
-
}>;
|
|
22
|
-
decodedSize: z.ZodNumber;
|
|
23
|
-
contentBase64Chunks: z.ZodArray<z.ZodString>;
|
|
24
|
-
}, z.core.$strict>]>;
|
|
25
|
-
}, z.core.$strict>;
|
|
26
|
-
export type ArtifactModule = z.infer<typeof artifactModule>;
|