@astrale-domains/services 0.5.1 → 0.7.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.
Files changed (58) hide show
  1. package/README.md +115 -51
  2. package/dist/scaffold/create-service.mjs +94 -0
  3. package/dist/scaffold/template/.env.example +4 -0
  4. package/dist/scaffold/template/README.md +75 -0
  5. package/dist/scaffold/template/gitignore +6 -0
  6. package/dist/scaffold/template/scripts/build.mjs +20 -0
  7. package/dist/scaffold/template/scripts/deploy.mjs +65 -0
  8. package/dist/scaffold/template/scripts/service.mjs +69 -0
  9. package/dist/scaffold/template/src/account.js +31 -0
  10. package/dist/scaffold/template/src/index.js +50 -0
  11. package/dist/scaffold/template/src/job.js +22 -0
  12. package/dist/schema/index.d.ts +2 -2
  13. package/dist/schema/index.js +1 -1
  14. package/dist/schema/modules/deployment/classes/cloudflare-deployment.d.ts +15 -56
  15. package/dist/schema/modules/deployment/classes/deployment.d.ts +24 -61
  16. package/dist/schema/modules/deployment/classes/deployment.js +16 -9
  17. package/dist/schema/modules/deployment/index.d.ts +2 -2
  18. package/dist/schema/modules/deployment/index.js +1 -1
  19. package/dist/schema/modules/deployment/types/deployment-hosting.d.ts +19 -49
  20. package/dist/schema/modules/deployment/types/deployment-hosting.js +10 -10
  21. package/dist/schema/modules/deployment/types/deployment-request.d.ts +45 -93
  22. package/dist/schema/modules/deployment/types/deployment-request.js +60 -30
  23. package/dist/schema/modules/deployment/types/deployment-response.d.ts +14 -22
  24. package/dist/schema/modules/deployment/types/deployment-response.js +5 -2
  25. package/dist/schema/modules/deployment/types/deployment-secret.d.ts +2 -2
  26. package/dist/schema/modules/deployment/types/deployment-secret.js +2 -2
  27. package/dist/schema/modules/deployment/types/deployment-summary.d.ts +13 -112
  28. package/dist/schema/modules/deployment/types/deployment-summary.js +16 -18
  29. package/dist/schema/modules/deployment/types/index.d.ts +6 -12
  30. package/dist/schema/modules/deployment/types/index.js +3 -6
  31. package/dist/schema/modules/deployment/types/worker-configuration.d.ts +21 -0
  32. package/dist/schema/modules/deployment/types/worker-configuration.js +21 -0
  33. package/dist/schema/modules/deployment/types/worker-record.d.ts +12 -0
  34. package/dist/schema/modules/deployment/types/worker-record.js +15 -0
  35. package/dist/schema/modules/service/classes/cloudflare-service.d.ts +56 -135
  36. package/dist/schema/modules/service/classes/cloudflare-service.js +4 -1
  37. package/dist/schema/modules/service/classes/service.d.ts +8 -7
  38. package/dist/schema/modules/service/classes/service.js +8 -7
  39. package/dist/schema/modules/service/functions/deploy-service.d.ts +44 -100
  40. package/dist/schema/modules/service/functions/deploy-service.js +6 -5
  41. package/dist/schema/modules/service/functions/describe-hosting.d.ts +0 -1
  42. package/dist/schema/modules/service/functions/list-service-deployments.d.ts +12 -36
  43. package/dist/schema/schema.d.ts +83 -247
  44. package/package.json +11 -7
  45. package/dist/schema/modules/deployment/types/content/index.d.ts +0 -1
  46. package/dist/schema/modules/deployment/types/content/index.js +0 -1
  47. package/dist/schema/modules/deployment/types/content/limits.d.ts +0 -7
  48. package/dist/schema/modules/deployment/types/content/limits.js +0 -7
  49. package/dist/schema/modules/deployment/types/deployment-record.d.ts +0 -35
  50. package/dist/schema/modules/deployment/types/deployment-record.js +0 -31
  51. package/dist/schema/modules/deployment/types/frozen-configuration.d.ts +0 -52
  52. package/dist/schema/modules/deployment/types/frozen-configuration.js +0 -55
  53. package/dist/schema/modules/deployment/types/service-deployment-artifact-module.d.ts +0 -26
  54. package/dist/schema/modules/deployment/types/service-deployment-artifact-module.js +0 -10
  55. package/dist/schema/modules/deployment/types/service-deployment-assets.d.ts +0 -49
  56. package/dist/schema/modules/deployment/types/service-deployment-assets.js +0 -16
  57. package/dist/schema/modules/deployment/types/service-deployment-content.d.ts +0 -19
  58. package/dist/schema/modules/deployment/types/service-deployment-content.js +0 -24
@@ -1,54 +1,30 @@
1
1
  /** The deployments of the Services the caller owns, or acts as the owner of. */
2
2
  export declare const listServiceDeployments: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
3
- origin?: string | undefined;
3
+ project?: string | undefined;
4
4
  environment?: string | undefined;
5
5
  }, {
6
6
  readonly mode: 'value';
7
7
  readonly value: {
8
- deployments: ({
8
+ deployments: {
9
9
  id: string;
10
10
  url: string;
11
11
  label: string;
12
12
  serviceId: string;
13
13
  service: string;
14
+ project: string;
15
+ environment: string;
14
16
  owner: string;
15
17
  state: "active" | "deploying" | "failed" | "retired" | "retiring";
16
18
  current: boolean;
17
19
  createdAt: string;
18
20
  retiredAt?: string | undefined;
19
- signingKeyId: string;
20
- record: {
21
- format: "astrale.deployment-record";
22
- version: 1;
23
- origin: string;
24
- environment: string;
25
- releaseDigest: string;
26
- buildDigest: string;
27
- schemaRevision: string;
28
- configuration: string;
29
- providerScript: string;
30
- commit: {
31
- sha: string;
32
- dirty: boolean;
33
- base?: {
34
- version: string;
35
- distance: number;
36
- } | undefined;
37
- } | null;
38
- };
39
- } | {
40
- id: string;
41
- url: string;
42
- label: string;
43
- serviceId: string;
44
- service: string;
45
- owner: string;
46
- state: "active" | "deploying" | "failed" | "retired" | "retiring";
47
- current: boolean;
48
- createdAt: string;
49
- retiredAt?: string | undefined;
50
- signingKeyId: string;
51
- record: unknown;
52
- })[];
21
+ buildDigest: string;
22
+ configuration: string;
23
+ signingKeyId?: string | undefined;
24
+ record?: {
25
+ contentType: string;
26
+ contentBase64: string;
27
+ } | undefined;
28
+ }[];
53
29
  };
54
30
  }, "authenticated", true, false, undefined>>;
@@ -8,7 +8,7 @@ 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
- origin: import("zod").ZodString;
11
+ project: import("zod").ZodString;
12
12
  environment: import("zod").ZodString;
13
13
  fingerprint: import("zod").ZodString;
14
14
  url: import("zod").ZodString;
@@ -32,7 +32,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"se
32
32
  readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
33
33
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Timestamped">];
34
34
  readonly properties: {
35
- origin: import("zod").ZodString;
35
+ project: import("zod").ZodString;
36
36
  environment: import("zod").ZodString;
37
37
  fingerprint: import("zod").ZodString;
38
38
  url: import("zod").ZodString;
@@ -49,73 +49,30 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"se
49
49
  }>];
50
50
  readonly methods: {
51
51
  deploy: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
52
- format: "astrale.services.deployment-request";
52
+ format: "astrale.worker.deployment-request";
53
53
  version: 1;
54
54
  owner?: string | undefined;
55
- origin: string;
55
+ project: string;
56
56
  environment: string;
57
- addressing: "opaque";
58
57
  label: string;
59
58
  buildDigest: string;
60
59
  configuration: {
61
- format: "astrale.deployment.configuration";
60
+ format: "astrale.worker.configuration";
62
61
  version: 1;
62
+ compatibilityDate: string;
63
+ compatibilityFlags: string[];
63
64
  vars: Record<string, string>;
64
- settings: {
65
- maximumRequestBytes: number;
66
- invocationTimeoutMs: number;
67
- tokenExchange: false | {
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
- };
65
+ secrets: string[];
66
+ record: boolean;
67
+ signingIdentity: boolean;
68
+ router: boolean;
100
69
  };
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;
113
- };
114
- bundle: {
115
- entrypoint: string;
70
+ worker: {
71
+ manifest: Record<string, unknown>;
72
+ mainModule: string;
116
73
  modules: {
117
74
  name: string;
118
- kind?: "data" | "esm" | "text" | "wasm" | undefined;
75
+ kind: "data" | "esm" | "text" | "wasm";
119
76
  content: {
120
77
  encoding: "gzip" | "identity";
121
78
  decodedSize: number;
@@ -127,29 +84,26 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"se
127
84
  };
128
85
  }[];
129
86
  assets?: {
130
- files: {
131
- path: string;
132
- contentType?: string | undefined;
133
- content: {
134
- encoding: "gzip" | "identity";
135
- decodedSize: number;
136
- contentBase64: string;
137
- } | {
138
- encoding: "gzip" | "identity";
139
- decodedSize: number;
140
- contentBase64Chunks: string[];
141
- };
142
- }[];
143
- notFound?: "404-page" | "none" | "single-page-application" | undefined;
144
- runWorkerFirst?: boolean | undefined;
145
- htmlHandling?: "none" | undefined;
146
- } | undefined;
87
+ path: string;
88
+ contentType?: string | undefined;
89
+ content: {
90
+ encoding: "gzip" | "identity";
91
+ decodedSize: number;
92
+ contentBase64: string;
93
+ } | {
94
+ encoding: "gzip" | "identity";
95
+ decodedSize: number;
96
+ contentBase64Chunks: string[];
97
+ };
98
+ }[] | undefined;
147
99
  };
100
+ record?: {
101
+ contentType: string;
102
+ contentBase64: string;
103
+ } | undefined;
104
+ readiness?: string[] | undefined;
148
105
  secrets: Record<string, string>;
149
106
  promote?: boolean | undefined;
150
- readiness?: {
151
- paths: string[];
152
- } | undefined;
153
107
  }, {
154
108
  readonly mode: 'value';
155
109
  readonly value: {
@@ -169,31 +123,20 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"se
169
123
  label: string;
170
124
  serviceId: string;
171
125
  service: string;
126
+ project: string;
127
+ environment: string;
172
128
  owner: string;
173
129
  state: "active" | "deploying" | "failed" | "retired" | "retiring";
174
130
  current: boolean;
175
131
  createdAt: string;
176
132
  retiredAt?: string | undefined;
177
- signingKeyId: string;
178
- record: {
179
- format: "astrale.deployment-record";
180
- version: 1;
181
- origin: string;
182
- environment: string;
183
- releaseDigest: string;
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
- };
133
+ buildDigest: string;
134
+ configuration: string;
135
+ signingKeyId?: string | undefined;
136
+ record?: {
137
+ contentType: string;
138
+ contentBase64: string;
139
+ } | undefined;
197
140
  };
198
141
  };
199
142
  }, "authenticated", true, false, undefined>>;
@@ -201,60 +144,35 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"se
201
144
  readonly mode: 'value';
202
145
  readonly value: {
203
146
  routingDomain: string;
204
- addressing: "opaque";
205
147
  };
206
148
  }, "authenticated", true, false, undefined>>;
207
149
  list: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
208
- origin?: string | undefined;
150
+ project?: string | undefined;
209
151
  environment?: string | undefined;
210
152
  }, {
211
153
  readonly mode: 'value';
212
154
  readonly value: {
213
- deployments: ({
155
+ deployments: {
214
156
  id: string;
215
157
  url: string;
216
158
  label: string;
217
159
  serviceId: string;
218
160
  service: string;
161
+ project: string;
162
+ environment: string;
219
163
  owner: string;
220
164
  state: "active" | "deploying" | "failed" | "retired" | "retiring";
221
165
  current: boolean;
222
166
  createdAt: string;
223
167
  retiredAt?: string | undefined;
224
- signingKeyId: string;
225
- record: {
226
- format: "astrale.deployment-record";
227
- version: 1;
228
- origin: string;
229
- environment: string;
230
- releaseDigest: string;
231
- buildDigest: string;
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
- })[];
168
+ buildDigest: string;
169
+ configuration: string;
170
+ signingKeyId?: string | undefined;
171
+ record?: {
172
+ contentType: string;
173
+ contentBase64: string;
174
+ } | undefined;
175
+ }[];
258
176
  };
259
177
  }, "authenticated", true, false, undefined>>;
260
178
  promote: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
@@ -387,66 +305,25 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"se
387
305
  required?: boolean;
388
306
  description?: string;
389
307
  }>;
390
- record: import("zod").ZodObject<{
391
- format: import("zod").ZodLiteral<"astrale.deployment-record">;
392
- version: import("zod").ZodLiteral<1>;
393
- origin: import("zod").ZodString;
394
- environment: import("zod").ZodString;
395
- releaseDigest: import("zod").ZodString;
396
- buildDigest: import("zod").ZodString;
397
- schemaRevision: import("zod").ZodString;
398
- configuration: import("zod").ZodString;
399
- providerScript: import("zod").ZodString;
400
- commit: import("zod").ZodNullable<import("zod").ZodObject<{
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>;
308
+ buildDigest: import("zod").ZodString;
409
309
  configuration: import("zod").ZodObject<{
410
- format: import("zod").ZodLiteral<"astrale.deployment.configuration">;
310
+ format: import("zod").ZodLiteral<"astrale.worker.configuration">;
411
311
  version: import("zod").ZodLiteral<1>;
312
+ compatibilityDate: import("zod").ZodString;
313
+ compatibilityFlags: import("zod").ZodArray<import("zod").ZodString>;
412
314
  vars: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
413
- settings: import("zod").ZodObject<{
414
- maximumRequestBytes: import("zod").ZodNumber;
415
- invocationTimeoutMs: import("zod").ZodNumber;
416
- tokenExchange: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<false>, import("zod").ZodObject<{
417
- maximumLifetimeSeconds: import("zod").ZodNumber;
418
- }, import("zod/v4/core").$strict>]>;
419
- durableOptions: import("zod").ZodOptional<import("zod").ZodObject<{
420
- retentionMs: import("zod").ZodOptional<import("zod").ZodNumber>;
421
- retry: import("zod").ZodOptional<import("zod").ZodObject<{
422
- initialIntervalMs: import("zod").ZodOptional<import("zod").ZodNumber>;
423
- maxAttempts: import("zod").ZodOptional<import("zod").ZodNumber>;
424
- maxIntervalMs: import("zod").ZodOptional<import("zod").ZodNumber>;
425
- }, import("zod/v4/core").$strict>>;
426
- stepTimeoutMs: import("zod").ZodOptional<import("zod").ZodNumber>;
427
- }, import("zod/v4/core").$strict>>;
428
- }, import("zod/v4/core").$strict>;
429
- runtime: import("zod").ZodObject<{
430
- compatibilityDate: import("zod").ZodString;
431
- compatibilityFlags: import("zod").ZodArray<import("zod").ZodString>;
432
- }, import("zod/v4/core").$strict>;
433
- bindings: import("zod").ZodObject<{
434
- services: import("zod").ZodArray<import("zod").ZodObject<{
435
- name: import("zod").ZodString;
436
- service: import("zod").ZodString;
437
- }, import("zod/v4/core").$strict>>;
438
- dispatchNamespaces: import("zod").ZodArray<import("zod").ZodObject<{
439
- name: import("zod").ZodString;
440
- namespace: import("zod").ZodString;
441
- }, import("zod/v4/core").$strict>>;
442
- secrets: import("zod").ZodArray<import("zod").ZodString>;
443
- }, import("zod/v4/core").$strict>;
444
- router: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<false>, import("zod").ZodObject<{
445
- service: import("zod").ZodString;
446
- hostSuffix: import("zod").ZodString;
447
- minLabels: import("zod").ZodNumber;
448
- }, import("zod/v4/core").$strict>]>;
315
+ secrets: import("zod").ZodArray<import("zod").ZodString>;
316
+ record: import("zod").ZodBoolean;
317
+ signingIdentity: import("zod").ZodBoolean;
318
+ router: import("zod").ZodBoolean;
449
319
  }, import("zod/v4/core").$strict>;
320
+ configurationDigest: import("zod").ZodString;
321
+ record: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodObject<{
322
+ contentType: import("zod").ZodString;
323
+ contentBase64: import("zod").ZodString;
324
+ }, import("zod/v4/core").$strict>, {
325
+ readonly required: false;
326
+ }>;
450
327
  secretDigests: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodArray<import("zod").ZodObject<{
451
328
  name: import("zod").ZodString;
452
329
  digest: import("zod").ZodString;
@@ -513,66 +390,25 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"se
513
390
  required?: boolean;
514
391
  description?: string;
515
392
  }>;
516
- record: import("zod").ZodObject<{
517
- format: import("zod").ZodLiteral<"astrale.deployment-record">;
518
- version: import("zod").ZodLiteral<1>;
519
- origin: import("zod").ZodString;
520
- environment: import("zod").ZodString;
521
- releaseDigest: import("zod").ZodString;
522
- buildDigest: import("zod").ZodString;
523
- schemaRevision: import("zod").ZodString;
524
- configuration: import("zod").ZodString;
525
- providerScript: import("zod").ZodString;
526
- commit: import("zod").ZodNullable<import("zod").ZodObject<{
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>;
393
+ buildDigest: import("zod").ZodString;
535
394
  configuration: import("zod").ZodObject<{
536
- format: import("zod").ZodLiteral<"astrale.deployment.configuration">;
395
+ format: import("zod").ZodLiteral<"astrale.worker.configuration">;
537
396
  version: import("zod").ZodLiteral<1>;
397
+ compatibilityDate: import("zod").ZodString;
398
+ compatibilityFlags: import("zod").ZodArray<import("zod").ZodString>;
538
399
  vars: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
539
- settings: import("zod").ZodObject<{
540
- maximumRequestBytes: import("zod").ZodNumber;
541
- invocationTimeoutMs: import("zod").ZodNumber;
542
- tokenExchange: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<false>, import("zod").ZodObject<{
543
- maximumLifetimeSeconds: import("zod").ZodNumber;
544
- }, import("zod/v4/core").$strict>]>;
545
- durableOptions: import("zod").ZodOptional<import("zod").ZodObject<{
546
- retentionMs: import("zod").ZodOptional<import("zod").ZodNumber>;
547
- retry: import("zod").ZodOptional<import("zod").ZodObject<{
548
- initialIntervalMs: import("zod").ZodOptional<import("zod").ZodNumber>;
549
- maxAttempts: import("zod").ZodOptional<import("zod").ZodNumber>;
550
- maxIntervalMs: import("zod").ZodOptional<import("zod").ZodNumber>;
551
- }, import("zod/v4/core").$strict>>;
552
- stepTimeoutMs: import("zod").ZodOptional<import("zod").ZodNumber>;
553
- }, import("zod/v4/core").$strict>>;
554
- }, import("zod/v4/core").$strict>;
555
- runtime: import("zod").ZodObject<{
556
- compatibilityDate: import("zod").ZodString;
557
- compatibilityFlags: import("zod").ZodArray<import("zod").ZodString>;
558
- }, import("zod/v4/core").$strict>;
559
- bindings: import("zod").ZodObject<{
560
- services: import("zod").ZodArray<import("zod").ZodObject<{
561
- name: import("zod").ZodString;
562
- service: import("zod").ZodString;
563
- }, import("zod/v4/core").$strict>>;
564
- dispatchNamespaces: import("zod").ZodArray<import("zod").ZodObject<{
565
- name: import("zod").ZodString;
566
- namespace: import("zod").ZodString;
567
- }, import("zod/v4/core").$strict>>;
568
- secrets: import("zod").ZodArray<import("zod").ZodString>;
569
- }, import("zod/v4/core").$strict>;
570
- router: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<false>, import("zod").ZodObject<{
571
- service: import("zod").ZodString;
572
- hostSuffix: import("zod").ZodString;
573
- minLabels: import("zod").ZodNumber;
574
- }, import("zod/v4/core").$strict>]>;
400
+ secrets: import("zod").ZodArray<import("zod").ZodString>;
401
+ record: import("zod").ZodBoolean;
402
+ signingIdentity: import("zod").ZodBoolean;
403
+ router: import("zod").ZodBoolean;
575
404
  }, import("zod/v4/core").$strict>;
405
+ configurationDigest: import("zod").ZodString;
406
+ record: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodObject<{
407
+ contentType: import("zod").ZodString;
408
+ contentBase64: import("zod").ZodString;
409
+ }, import("zod/v4/core").$strict>, {
410
+ readonly required: false;
411
+ }>;
576
412
  secretDigests: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodArray<import("zod").ZodObject<{
577
413
  name: import("zod").ZodString;
578
414
  digest: import("zod").ZodString;
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "@astrale-domains/services",
3
- "version": "0.5.1",
3
+ "version": "0.7.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.18",
34
+ "@astrale-os/sdk": "0.6.0-beta.23",
32
35
  "zod": "4.4.3"
33
36
  },
34
37
  "devDependencies": {
35
- "@astrale-os/adapter-cloudflare": "0.5.0-beta.173",
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
- "provider:route-wildcard": "bun providers/cloudflare/operator/routing/wildcard.ts",
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
- });