@astrale-domains/services 0.2.0 → 0.2.2
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/CHANGELOG.md +83 -0
- package/README.md +12 -5
- package/dist/schema/deployment/deployment-rejection.d.ts +11 -0
- package/dist/schema/deployment/deployment-rejection.js +6 -0
- package/dist/schema/deployment/index.d.ts +3 -1
- package/dist/schema/deployment/index.js +2 -1
- package/dist/schema/deployment/request.d.ts +3 -45
- package/dist/schema/deployment/request.js +11 -4
- package/dist/schema/deployment/result.d.ts +51 -2
- package/dist/schema/deployment/result.js +13 -3
- package/dist/schema/index.d.ts +4 -4
- package/dist/schema/index.js +3 -3
- package/dist/schema/schema.d.ts +7035 -0
- package/dist/schema/schema.js +19 -0
- package/dist/schema/service/cloudflare-worker-class.d.ts +6759 -0
- package/dist/schema/service/cloudflare-worker-class.js +18 -0
- package/dist/schema/service/hosted-by-service-edge-class.d.ts +19 -0
- package/dist/schema/service/hosted-by-service-edge-class.js +14 -0
- package/dist/schema/service/index.d.ts +7 -4
- package/dist/schema/service/index.js +7 -4
- package/dist/schema/service/methods/delete-secret.d.ts +11 -0
- package/dist/schema/service/methods/delete-secret.js +10 -0
- package/dist/schema/service/methods/delete-service.d.ts +9 -0
- package/dist/schema/service/methods/delete-service.js +14 -0
- package/dist/schema/service/methods/deploy-cloudflare-worker.d.ts +82 -0
- package/dist/schema/service/methods/deploy-cloudflare-worker.js +9 -0
- package/dist/schema/service/methods/index.d.ts +8 -0
- package/dist/schema/service/methods/index.js +8 -0
- package/dist/schema/service/methods/list-service-logs.d.ts +12 -0
- package/dist/schema/service/methods/list-service-logs.js +11 -0
- package/dist/schema/service/methods/list-service-schedules.d.ts +4 -0
- package/dist/schema/service/methods/list-service-schedules.js +8 -0
- package/dist/schema/service/methods/list-service-secret-names.d.ts +4 -0
- package/dist/schema/service/methods/list-service-secret-names.js +9 -0
- package/dist/schema/service/methods/replace-service-schedules.d.ts +11 -0
- package/dist/schema/service/methods/replace-service-schedules.js +14 -0
- package/dist/schema/service/methods/secret-name.js +2 -0
- package/dist/schema/service/methods/secret-operation-rejection.js +5 -0
- package/dist/schema/service/methods/set-service-secret.d.ts +12 -0
- package/dist/schema/service/methods/set-service-secret.js +16 -0
- package/dist/schema/service/policies.d.ts +3 -0
- package/dist/schema/service/policies.js +12 -1
- package/dist/schema/service/{class.d.ts → service-class.d.ts} +48 -175
- package/dist/schema/service/service-class.js +40 -0
- package/dist/schema/service/service-hosts-domain-edge-class.d.ts +16 -0
- package/dist/schema/service/service-hosts-domain-edge-class.js +9 -0
- package/dist/schema/service/{relationships.js → service-owned-by-edge-class.js} +2 -2
- package/package.json +15 -9
- package/dist/schema/application/functions.js +0 -20
- package/dist/schema/application/index.d.ts +0 -391
- package/dist/schema/application/index.js +0 -10
- package/dist/schema/service/class.js +0 -22
- package/dist/schema/service/methods.d.ts +0 -135
- package/dist/schema/service/methods.js +0 -64
- /package/dist/schema/service/{relationships.d.ts → service-owned-by-edge-class.d.ts} +0 -0
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const serviceLifecycle: z.ZodEnum<{
|
|
3
|
+
deleting: "deleting";
|
|
4
|
+
deploying: "deploying";
|
|
5
|
+
failed: "failed";
|
|
6
|
+
ready: "ready";
|
|
7
|
+
reconciling: "reconciling";
|
|
8
|
+
}>;
|
|
9
|
+
/** Provider-neutral deployed resource. Provider implementation versions are deliberately external. */
|
|
10
|
+
export declare const Service: import("@astrale-os/sdk/schema").NodeClass<{
|
|
2
11
|
readonly depth: 1;
|
|
3
|
-
readonly abstract:
|
|
12
|
+
readonly abstract: true;
|
|
4
13
|
readonly extends: readonly [import("@astrale-os/sdk/schema").ClassProjection<"node", import("@astrale-os/sdk/schema").NodeClassDefinition & {
|
|
5
14
|
readonly ref: import("@astrale-os/sdk/schema").ClassRef<"Named"> & {
|
|
6
15
|
readonly origin: "kernel.astrale.ai";
|
|
@@ -53,98 +62,19 @@ export declare const CloudflareWorker: import("@astrale-os/sdk/schema").NodeClas
|
|
|
53
62
|
readonly properties: {
|
|
54
63
|
readonly providerKey: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "providerKey", "self">;
|
|
55
64
|
readonly providerName: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "providerName", "self">;
|
|
56
|
-
readonly
|
|
65
|
+
readonly serviceKey: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "serviceKey", "self">;
|
|
57
66
|
readonly url: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "url", "self">;
|
|
58
|
-
readonly state: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<"deploying" | "failed" | "ready", "deploying" | "failed" | "ready", true, "state", "self">;
|
|
67
|
+
readonly state: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<"deleting" | "deploying" | "failed" | "ready" | "reconciling", "deleting" | "deploying" | "failed" | "ready" | "reconciling", true, "state", "self">;
|
|
59
68
|
readonly digest: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "digest", "self">;
|
|
60
69
|
readonly revision: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "revision", "self">;
|
|
61
|
-
readonly coordinate: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "coordinate", "self">;
|
|
62
70
|
readonly deploymentReceipt: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "deploymentReceipt", "self">;
|
|
71
|
+
readonly operationExpiresAt: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<import("@astrale-os/sdk/schema").Value, import("@astrale-os/sdk/schema").Value, false, "operationExpiresAt", "self">;
|
|
72
|
+
readonly hostedOrigin: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "hostedOrigin", "self">;
|
|
73
|
+
readonly hostedRevision: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "hostedRevision", "self">;
|
|
74
|
+
readonly hostedPublicationEtag: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "hostedPublicationEtag", "self">;
|
|
63
75
|
readonly error: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "error", "self">;
|
|
64
76
|
};
|
|
65
77
|
readonly methods: {
|
|
66
|
-
readonly deploy: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
67
|
-
path: string;
|
|
68
|
-
name?: string | undefined;
|
|
69
|
-
entry?: string | undefined;
|
|
70
|
-
modules?: ({
|
|
71
|
-
contentBase64: string;
|
|
72
|
-
name: string;
|
|
73
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
74
|
-
} | {
|
|
75
|
-
contentBase64Chunks: string[];
|
|
76
|
-
name: string;
|
|
77
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
78
|
-
})[] | undefined;
|
|
79
|
-
revisioned?: {
|
|
80
|
-
revision: string;
|
|
81
|
-
release: {
|
|
82
|
-
entry: string;
|
|
83
|
-
modules: ({
|
|
84
|
-
contentBase64: string;
|
|
85
|
-
name: string;
|
|
86
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
87
|
-
} | {
|
|
88
|
-
contentBase64Chunks: string[];
|
|
89
|
-
name: string;
|
|
90
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
91
|
-
})[];
|
|
92
|
-
};
|
|
93
|
-
gateway: {
|
|
94
|
-
entry: string;
|
|
95
|
-
modules: ({
|
|
96
|
-
contentBase64: string;
|
|
97
|
-
name: string;
|
|
98
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
99
|
-
} | {
|
|
100
|
-
contentBase64Chunks: string[];
|
|
101
|
-
name: string;
|
|
102
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
103
|
-
})[];
|
|
104
|
-
};
|
|
105
|
-
} | undefined;
|
|
106
|
-
compatibilityDate?: string | undefined;
|
|
107
|
-
compatibilityFlags?: string[] | undefined;
|
|
108
|
-
serviceBindings?: {
|
|
109
|
-
name: string;
|
|
110
|
-
service: string;
|
|
111
|
-
}[] | undefined;
|
|
112
|
-
vars?: Record<string, string> | undefined;
|
|
113
|
-
secrets?: Record<string, string> | undefined;
|
|
114
|
-
assets?: {
|
|
115
|
-
files: ({
|
|
116
|
-
contentBase64: string;
|
|
117
|
-
path: string;
|
|
118
|
-
contentType?: string | undefined;
|
|
119
|
-
} | {
|
|
120
|
-
contentBase64Chunks: string[];
|
|
121
|
-
path: string;
|
|
122
|
-
contentType?: string | undefined;
|
|
123
|
-
})[];
|
|
124
|
-
notFound?: "404-page" | "none" | "single-page-application" | undefined;
|
|
125
|
-
runWorkerFirst?: boolean | undefined;
|
|
126
|
-
htmlHandling?: "none" | undefined;
|
|
127
|
-
} | undefined;
|
|
128
|
-
limits?: {
|
|
129
|
-
cpuMs?: number | undefined;
|
|
130
|
-
subrequests?: number | undefined;
|
|
131
|
-
} | undefined;
|
|
132
|
-
}, {
|
|
133
|
-
readonly mode: 'value';
|
|
134
|
-
readonly value: {
|
|
135
|
-
path: string;
|
|
136
|
-
url: string;
|
|
137
|
-
digest: string;
|
|
138
|
-
revision?: string | undefined;
|
|
139
|
-
state: "deploying" | "failed" | "ready";
|
|
140
|
-
error?: string | null | undefined;
|
|
141
|
-
functions: {
|
|
142
|
-
id: string;
|
|
143
|
-
path: string;
|
|
144
|
-
ref: string;
|
|
145
|
-
}[];
|
|
146
|
-
};
|
|
147
|
-
}, "authenticated", true, "default">>;
|
|
148
78
|
readonly setSecret: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
149
79
|
name: string;
|
|
150
80
|
value: string;
|
|
@@ -152,6 +82,9 @@ export declare const CloudflareWorker: import("@astrale-os/sdk/schema").NodeClas
|
|
|
152
82
|
readonly mode: 'value';
|
|
153
83
|
readonly value: {
|
|
154
84
|
name: string;
|
|
85
|
+
} | {
|
|
86
|
+
kind: "rejected";
|
|
87
|
+
reason: "binding-unavailable" | "invalid-secret-name" | "service-unavailable";
|
|
155
88
|
};
|
|
156
89
|
}, "authenticated", false, "default">>;
|
|
157
90
|
readonly deleteSecret: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
@@ -159,6 +92,9 @@ export declare const CloudflareWorker: import("@astrale-os/sdk/schema").NodeClas
|
|
|
159
92
|
}, {
|
|
160
93
|
readonly mode: 'value';
|
|
161
94
|
readonly value: {
|
|
95
|
+
kind: "rejected";
|
|
96
|
+
reason: "binding-unavailable" | "invalid-secret-name" | "service-unavailable";
|
|
97
|
+
} | {
|
|
162
98
|
ok: true;
|
|
163
99
|
};
|
|
164
100
|
}, "authenticated", false, "default">>;
|
|
@@ -172,6 +108,9 @@ export declare const CloudflareWorker: import("@astrale-os/sdk/schema").NodeClas
|
|
|
172
108
|
readonly mode: 'value';
|
|
173
109
|
readonly value: {
|
|
174
110
|
crons: string[];
|
|
111
|
+
} | {
|
|
112
|
+
kind: "rejected";
|
|
113
|
+
reason: "invalid-schedule" | "service-unavailable";
|
|
175
114
|
};
|
|
176
115
|
}, "authenticated", false, "default">>;
|
|
177
116
|
readonly schedules: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
@@ -193,19 +132,22 @@ export declare const CloudflareWorker: import("@astrale-os/sdk/schema").NodeClas
|
|
|
193
132
|
readonly delete: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
194
133
|
readonly mode: 'value';
|
|
195
134
|
readonly value: {
|
|
196
|
-
|
|
135
|
+
kind: "deleted";
|
|
136
|
+
} | {
|
|
137
|
+
kind: "deleting";
|
|
138
|
+
retryAfterMs: number;
|
|
197
139
|
};
|
|
198
140
|
}, "authenticated", false, "default">>;
|
|
199
141
|
};
|
|
200
|
-
readonly effectiveProperties: (import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string,
|
|
142
|
+
readonly effectiveProperties: (import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "deploymentReceipt", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "digest", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "error", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "hostedOrigin", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "hostedPublicationEtag", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "hostedRevision", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<import("@astrale-os/sdk/schema").Value, import("@astrale-os/sdk/schema").Value, false, "operationExpiresAt", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "providerKey", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "providerName", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "revision", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "serviceKey", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<"deleting" | "deploying" | "failed" | "ready" | "reconciling", "deleting" | "deploying" | "failed" | "ready" | "reconciling", true, "state", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "url", "self">) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, false> & {
|
|
201
143
|
readonly name: "description";
|
|
202
144
|
readonly key: "kernel.astrale.ai:class.Descriptable.property.description";
|
|
203
|
-
}) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
|
|
204
|
-
readonly name: "createdAt";
|
|
205
|
-
readonly key: "kernel.astrale.ai:class.Timestamped.property.createdAt";
|
|
206
145
|
}) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
|
|
207
146
|
readonly name: "name";
|
|
208
147
|
readonly key: "kernel.astrale.ai:class.Named.property.name";
|
|
148
|
+
}) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
|
|
149
|
+
readonly name: "createdAt";
|
|
150
|
+
readonly key: "kernel.astrale.ai:class.Timestamped.property.createdAt";
|
|
209
151
|
}) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
|
|
210
152
|
readonly name: "updatedAt";
|
|
211
153
|
readonly key: "kernel.astrale.ai:class.Timestamped.property.updatedAt";
|
|
@@ -219,7 +161,10 @@ export declare const CloudflareWorker: import("@astrale-os/sdk/schema").NodeClas
|
|
|
219
161
|
}, "authenticated", false, "default">>, "secrets", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
220
162
|
readonly mode: 'value';
|
|
221
163
|
readonly value: {
|
|
222
|
-
|
|
164
|
+
kind: "deleted";
|
|
165
|
+
} | {
|
|
166
|
+
kind: "deleting";
|
|
167
|
+
retryAfterMs: number;
|
|
223
168
|
};
|
|
224
169
|
}, "authenticated", false, "default">>, "delete", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
225
170
|
name: string;
|
|
@@ -228,12 +173,18 @@ export declare const CloudflareWorker: import("@astrale-os/sdk/schema").NodeClas
|
|
|
228
173
|
readonly mode: 'value';
|
|
229
174
|
readonly value: {
|
|
230
175
|
name: string;
|
|
176
|
+
} | {
|
|
177
|
+
kind: "rejected";
|
|
178
|
+
reason: "binding-unavailable" | "invalid-secret-name" | "service-unavailable";
|
|
231
179
|
};
|
|
232
180
|
}, "authenticated", false, "default">>, "setSecret", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
233
181
|
name: string;
|
|
234
182
|
}, {
|
|
235
183
|
readonly mode: 'value';
|
|
236
184
|
readonly value: {
|
|
185
|
+
kind: "rejected";
|
|
186
|
+
reason: "binding-unavailable" | "invalid-secret-name" | "service-unavailable";
|
|
187
|
+
} | {
|
|
237
188
|
ok: true;
|
|
238
189
|
};
|
|
239
190
|
}, "authenticated", false, "default">>, "deleteSecret", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
@@ -242,6 +193,9 @@ export declare const CloudflareWorker: import("@astrale-os/sdk/schema").NodeClas
|
|
|
242
193
|
readonly mode: 'value';
|
|
243
194
|
readonly value: {
|
|
244
195
|
crons: string[];
|
|
196
|
+
} | {
|
|
197
|
+
kind: "rejected";
|
|
198
|
+
reason: "invalid-schedule" | "service-unavailable";
|
|
245
199
|
};
|
|
246
200
|
}, "authenticated", false, "default">>, "setSchedule", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
247
201
|
tail?: number | undefined;
|
|
@@ -255,86 +209,5 @@ export declare const CloudflareWorker: import("@astrale-os/sdk/schema").NodeClas
|
|
|
255
209
|
line: string;
|
|
256
210
|
}[];
|
|
257
211
|
}, "authenticated", false, "default">>, "logs", "self">;
|
|
258
|
-
readonly effectiveStaticMethods:
|
|
259
|
-
path: string;
|
|
260
|
-
name?: string | undefined;
|
|
261
|
-
entry?: string | undefined;
|
|
262
|
-
modules?: ({
|
|
263
|
-
contentBase64: string;
|
|
264
|
-
name: string;
|
|
265
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
266
|
-
} | {
|
|
267
|
-
contentBase64Chunks: string[];
|
|
268
|
-
name: string;
|
|
269
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
270
|
-
})[] | undefined;
|
|
271
|
-
revisioned?: {
|
|
272
|
-
revision: string;
|
|
273
|
-
release: {
|
|
274
|
-
entry: string;
|
|
275
|
-
modules: ({
|
|
276
|
-
contentBase64: string;
|
|
277
|
-
name: string;
|
|
278
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
279
|
-
} | {
|
|
280
|
-
contentBase64Chunks: string[];
|
|
281
|
-
name: string;
|
|
282
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
283
|
-
})[];
|
|
284
|
-
};
|
|
285
|
-
gateway: {
|
|
286
|
-
entry: string;
|
|
287
|
-
modules: ({
|
|
288
|
-
contentBase64: string;
|
|
289
|
-
name: string;
|
|
290
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
291
|
-
} | {
|
|
292
|
-
contentBase64Chunks: string[];
|
|
293
|
-
name: string;
|
|
294
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
295
|
-
})[];
|
|
296
|
-
};
|
|
297
|
-
} | undefined;
|
|
298
|
-
compatibilityDate?: string | undefined;
|
|
299
|
-
compatibilityFlags?: string[] | undefined;
|
|
300
|
-
serviceBindings?: {
|
|
301
|
-
name: string;
|
|
302
|
-
service: string;
|
|
303
|
-
}[] | undefined;
|
|
304
|
-
vars?: Record<string, string> | undefined;
|
|
305
|
-
secrets?: Record<string, string> | undefined;
|
|
306
|
-
assets?: {
|
|
307
|
-
files: ({
|
|
308
|
-
contentBase64: string;
|
|
309
|
-
path: string;
|
|
310
|
-
contentType?: string | undefined;
|
|
311
|
-
} | {
|
|
312
|
-
contentBase64Chunks: string[];
|
|
313
|
-
path: string;
|
|
314
|
-
contentType?: string | undefined;
|
|
315
|
-
})[];
|
|
316
|
-
notFound?: "404-page" | "none" | "single-page-application" | undefined;
|
|
317
|
-
runWorkerFirst?: boolean | undefined;
|
|
318
|
-
htmlHandling?: "none" | undefined;
|
|
319
|
-
} | undefined;
|
|
320
|
-
limits?: {
|
|
321
|
-
cpuMs?: number | undefined;
|
|
322
|
-
subrequests?: number | undefined;
|
|
323
|
-
} | undefined;
|
|
324
|
-
}, {
|
|
325
|
-
readonly mode: 'value';
|
|
326
|
-
readonly value: {
|
|
327
|
-
path: string;
|
|
328
|
-
url: string;
|
|
329
|
-
digest: string;
|
|
330
|
-
revision?: string | undefined;
|
|
331
|
-
state: "deploying" | "failed" | "ready";
|
|
332
|
-
error?: string | null | undefined;
|
|
333
|
-
functions: {
|
|
334
|
-
id: string;
|
|
335
|
-
path: string;
|
|
336
|
-
ref: string;
|
|
337
|
-
}[];
|
|
338
|
-
};
|
|
339
|
-
}, "authenticated", true, "default">>, "deploy", "self">;
|
|
212
|
+
readonly effectiveStaticMethods: never;
|
|
340
213
|
}>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { K, nodeClass, property, schema as valueSchema } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { deleteService, deleteServiceSecret, listServiceLogs, listServiceSchedules, listServiceSecretNames, replaceServiceSchedules, setServiceSecret, } from './methods/index.js';
|
|
4
|
+
import { ObserveService } from './policies.js';
|
|
5
|
+
export const serviceLifecycle = z.enum(['deploying', 'reconciling', 'ready', 'failed', 'deleting']);
|
|
6
|
+
const digest = z
|
|
7
|
+
.string()
|
|
8
|
+
.length(71)
|
|
9
|
+
.regex(/sha256:[0-9a-f]{64}/);
|
|
10
|
+
/** Provider-neutral deployed resource. Provider implementation versions are deliberately external. */
|
|
11
|
+
export const Service = nodeClass({
|
|
12
|
+
abstract: true,
|
|
13
|
+
description: 'One caller-owned provider-neutral deployed Service.',
|
|
14
|
+
extends: [K.classes.Named, K.classes.Descriptable, K.classes.Timestamped],
|
|
15
|
+
properties: {
|
|
16
|
+
providerKey: z.string().min(1).max(80),
|
|
17
|
+
providerName: z.string().min(1).max(120),
|
|
18
|
+
serviceKey: z.string().min(1).max(63),
|
|
19
|
+
url: property(z.string().min(1).max(2_048), { required: false }),
|
|
20
|
+
state: serviceLifecycle,
|
|
21
|
+
digest: property(z.string().min(1).max(256), { required: false }),
|
|
22
|
+
revision: property(digest, { required: false }),
|
|
23
|
+
deploymentReceipt: property(z.string().min(1).max(128), { required: false }),
|
|
24
|
+
operationExpiresAt: property(valueSchema.values.instant, { required: false }),
|
|
25
|
+
hostedOrigin: property(z.string().min(1).max(512), { required: false }),
|
|
26
|
+
hostedRevision: property(digest, { required: false }),
|
|
27
|
+
hostedPublicationEtag: property(digest, { required: false }),
|
|
28
|
+
error: property(z.string().max(5_000), { required: false }),
|
|
29
|
+
},
|
|
30
|
+
methods: {
|
|
31
|
+
setSecret: setServiceSecret,
|
|
32
|
+
deleteSecret: deleteServiceSecret,
|
|
33
|
+
secrets: listServiceSecretNames,
|
|
34
|
+
setSchedule: replaceServiceSchedules,
|
|
35
|
+
schedules: listServiceSchedules,
|
|
36
|
+
logs: listServiceLogs,
|
|
37
|
+
delete: deleteService,
|
|
38
|
+
},
|
|
39
|
+
policies: { read: () => ObserveService },
|
|
40
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const service_hosts_domain: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
|
|
2
|
+
readonly depth: 0;
|
|
3
|
+
readonly abstract: false;
|
|
4
|
+
readonly extends: readonly [];
|
|
5
|
+
readonly properties: never;
|
|
6
|
+
readonly source: {
|
|
7
|
+
readonly as: "service";
|
|
8
|
+
readonly outgoing: "0..1";
|
|
9
|
+
};
|
|
10
|
+
readonly target: {
|
|
11
|
+
readonly as: "domain";
|
|
12
|
+
readonly incoming: "0..1";
|
|
13
|
+
};
|
|
14
|
+
readonly constraints: Record<never, never>;
|
|
15
|
+
readonly effectiveProperties: never;
|
|
16
|
+
}>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { K, edgeClass } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { TraverseHostedDomain } from './policies.js';
|
|
3
|
+
import { Service } from './service-class.js';
|
|
4
|
+
export const service_hosts_domain = edgeClass.directed({
|
|
5
|
+
description: 'The installed Astrale Domain currently hosted by one Service.',
|
|
6
|
+
source: { as: 'service', accepts: [() => Service], outgoing: '0..1' },
|
|
7
|
+
target: { as: 'domain', accepts: [K.classes.Domain], incoming: '0..1' },
|
|
8
|
+
policies: { traverse: () => TraverseHostedDomain },
|
|
9
|
+
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { K, edgeClass } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { CloudflareWorker } from './class.js';
|
|
3
2
|
import { TraverseOwnedService } from './policies.js';
|
|
3
|
+
import { Service } from './service-class.js';
|
|
4
4
|
export const service_owned_by = edgeClass.directed({
|
|
5
5
|
description: 'The Identity that owns and may manage one Service.',
|
|
6
6
|
source: { as: 'owner', accepts: [K.classes.Identity], outgoing: '0..*' },
|
|
7
|
-
target: { as: 'service', accepts: [() =>
|
|
7
|
+
target: { as: 'service', accepts: [() => Service], incoming: '1' },
|
|
8
8
|
policies: { traverse: () => TraverseOwnedService },
|
|
9
9
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrale-domains/services",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/astrale-os/domains.git",
|
|
@@ -24,25 +24,31 @@
|
|
|
24
24
|
"./package.json": "./package.json"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
|
-
"access": "public"
|
|
27
|
+
"access": "public",
|
|
28
|
+
"registry": "https://registry.npmjs.org/"
|
|
28
29
|
},
|
|
29
30
|
"dependencies": {
|
|
30
|
-
"@astrale-os/sdk": "0.5.0-beta.
|
|
31
|
+
"@astrale-os/sdk": "0.5.0-beta.65",
|
|
31
32
|
"zod": "^4.4.3"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
|
-
"@astrale-os/adapter-
|
|
35
|
-
"@astrale-os/adapter-cloudflare": "0.5.0-beta.48",
|
|
35
|
+
"@astrale-os/adapter-cloudflare": "0.5.0-beta.68",
|
|
36
36
|
"@astrale-os/ox": ">=0.1.3 <1.0.0",
|
|
37
|
-
"@astrale-os/shell": "0.4.2-beta.
|
|
38
|
-
"@astrale-os/shell-react": "0.3.2-beta.
|
|
37
|
+
"@astrale-os/shell": "0.4.2-beta.7",
|
|
38
|
+
"@astrale-os/shell-react": "0.3.2-beta.5",
|
|
39
|
+
"@astrale-os/ui": "0.3.0-beta.9",
|
|
40
|
+
"@cloudflare/workers-types": "5.20260819.1",
|
|
39
41
|
"@tailwindcss/vite": "^4.0.6",
|
|
40
42
|
"@tanstack/react-router": "1.170.17",
|
|
41
43
|
"@tanstack/router-plugin": "1.168.19",
|
|
44
|
+
"@testing-library/jest-dom": "7.0.1",
|
|
45
|
+
"@testing-library/react": "16.3.2",
|
|
46
|
+
"@testing-library/user-event": "14.6.1",
|
|
42
47
|
"@types/node": "^22.0.0",
|
|
43
48
|
"@types/react": "^19.2.0",
|
|
44
49
|
"@types/react-dom": "^19.2.0",
|
|
45
50
|
"@vitejs/plugin-react": "^6.0.5",
|
|
51
|
+
"jsdom": "30.0.1",
|
|
46
52
|
"oxlint": ">=1.78.0 <2.0.0",
|
|
47
53
|
"react": "^19.2.0",
|
|
48
54
|
"react-dom": "^19.2.0",
|
|
@@ -62,6 +68,7 @@
|
|
|
62
68
|
"scripts": {
|
|
63
69
|
"dev": "astrale-domain dev",
|
|
64
70
|
"prod": "astrale-domain deploy prod",
|
|
71
|
+
"beta": "astrale-domain deploy beta",
|
|
65
72
|
"deploy": "astrale-domain deploy",
|
|
66
73
|
"build": "astrale-domain build",
|
|
67
74
|
"lint": "astrale-domain lint",
|
|
@@ -70,8 +77,7 @@
|
|
|
70
77
|
"provider:bootstrap": "bun providers/cloudflare/operator/provision/bootstrap.ts",
|
|
71
78
|
"provider:route-wildcard": "bun providers/cloudflare/operator/routing/wildcard.ts",
|
|
72
79
|
"provider:route-tenant": "bun providers/cloudflare/operator/routing/tenant.ts",
|
|
73
|
-
"
|
|
74
|
-
"typecheck": "tsc --noEmit",
|
|
80
|
+
"typecheck": "tsc --noEmit && tsc --project providers/cloudflare/operator/dispatch/tsconfig.json",
|
|
75
81
|
"test": "vitest run --config vitest.config.ts",
|
|
76
82
|
"frontend:dev": "vite",
|
|
77
83
|
"frontend:build": "vite build"
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { func } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
export const serviceRecord = z.strictObject({
|
|
4
|
-
id: z.string().min(1),
|
|
5
|
-
name: z.string().min(1),
|
|
6
|
-
description: z.string(),
|
|
7
|
-
providerName: z.string().min(1),
|
|
8
|
-
coordinate: z.string().min(1),
|
|
9
|
-
url: z.string().min(1).optional(),
|
|
10
|
-
state: z.enum(['deploying', 'ready', 'failed']),
|
|
11
|
-
digest: z.string().min(1).optional(),
|
|
12
|
-
revision: z.string().optional(),
|
|
13
|
-
error: z.string().optional(),
|
|
14
|
-
});
|
|
15
|
-
export const listServices = func({
|
|
16
|
-
description: 'List Services visible to the authenticated caller.',
|
|
17
|
-
auth: 'authenticated',
|
|
18
|
-
input: z.strictObject({}),
|
|
19
|
-
output: z.array(serviceRecord),
|
|
20
|
-
});
|