@astrale-domains/services 0.2.3 → 0.2.5
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 +24 -0
- package/README.md +8 -7
- package/dist/schema/index.d.ts +3 -3
- package/dist/schema/index.js +2 -2
- package/dist/schema/modules/service/classes/cloudflare-worker.d.ts +6366 -0
- package/dist/schema/{service/cloudflare-worker-class.js → modules/service/classes/cloudflare-worker.js} +2 -2
- package/dist/schema/modules/service/classes/index.d.ts +3 -0
- package/dist/schema/modules/service/classes/index.js +3 -0
- package/dist/schema/{service/service-owned-by-edge-class.d.ts → modules/service/classes/service-owned-by.d.ts} +4 -4
- package/dist/schema/{service/service-owned-by-edge-class.js → modules/service/classes/service-owned-by.js} +4 -4
- package/dist/schema/{service/service-class.d.ts → modules/service/classes/service.d.ts} +84 -71
- package/dist/schema/modules/service/classes/service.js +37 -0
- package/dist/schema/{service/methods/delete-secret.d.ts → modules/service/functions/delete-service-secret.d.ts} +3 -3
- package/dist/schema/{service/methods/delete-secret.js → modules/service/functions/delete-service-secret.js} +4 -3
- package/dist/schema/{service/methods → modules/service/functions}/delete-service.d.ts +1 -1
- package/dist/schema/{service/methods → modules/service/functions}/delete-service.js +4 -2
- package/dist/schema/{deployment/request.d.ts → modules/service/functions/deploy-cloudflare-worker.d.ts} +100 -2
- package/dist/schema/{deployment/request.js → modules/service/functions/deploy-cloudflare-worker.js} +24 -10
- package/dist/schema/{service/methods → modules/service/functions}/index.d.ts +3 -2
- package/dist/schema/{service/methods → modules/service/functions}/index.js +2 -2
- package/dist/schema/{service/methods → modules/service/functions}/list-service-logs.d.ts +1 -1
- package/dist/schema/{service/methods → modules/service/functions}/list-service-logs.js +3 -1
- package/dist/schema/{service/methods → modules/service/functions}/list-service-schedules.d.ts +1 -1
- package/dist/schema/{service/methods → modules/service/functions}/list-service-schedules.js +3 -1
- package/dist/schema/{service/methods → modules/service/functions}/list-service-secret-names.d.ts +1 -1
- package/dist/schema/{service/methods → modules/service/functions}/list-service-secret-names.js +4 -2
- package/dist/schema/{service/methods → modules/service/functions}/replace-service-schedules.d.ts +1 -1
- package/dist/schema/{service/methods → modules/service/functions}/replace-service-schedules.js +3 -1
- package/dist/schema/{service/methods → modules/service/functions}/set-service-secret.d.ts +3 -3
- package/dist/schema/{service/methods → modules/service/functions}/set-service-secret.js +4 -3
- package/dist/schema/modules/service/index.d.ts +8 -0
- package/dist/schema/modules/service/index.js +5 -0
- package/dist/schema/modules/service/policies/index.d.ts +2 -0
- package/dist/schema/modules/service/policies/index.js +2 -0
- package/dist/schema/modules/service/policies/own-service.d.ts +2 -0
- package/dist/schema/modules/service/policies/own-service.js +7 -0
- package/dist/schema/{service/policies.d.ts → modules/service/policies/traverse-owned-service.d.ts} +0 -2
- package/dist/schema/modules/service/policies/traverse-owned-service.js +7 -0
- package/dist/schema/modules/service/states/index.d.ts +2 -0
- package/dist/schema/modules/service/states/index.js +1 -0
- package/dist/schema/modules/service/states/service-lifecycle.d.ts +25 -0
- package/dist/schema/modules/service/states/service-lifecycle.js +26 -0
- package/dist/schema/modules/service/types/index.d.ts +9 -0
- package/dist/schema/modules/service/types/index.js +6 -0
- package/dist/schema/{deployment/module.js → modules/service/types/service-deployment-artifact-module.js} +1 -1
- package/dist/schema/{deployment/asset.js → modules/service/types/service-deployment-assets.js} +1 -1
- package/dist/schema/modules/service/types/service-secret-name.d.ts +2 -0
- package/dist/schema/modules/service/types/service-secret-operation-rejection.d.ts +9 -0
- package/dist/schema/schema.d.ts +2602 -4250
- package/dist/schema/schema.js +2 -2
- package/package.json +6 -3
- package/dist/schema/deployment/deployment-rejection.d.ts +0 -11
- package/dist/schema/deployment/deployment-rejection.js +0 -6
- package/dist/schema/deployment/index.d.ts +0 -13
- package/dist/schema/deployment/index.js +0 -7
- package/dist/schema/deployment/result.d.ts +0 -74
- package/dist/schema/deployment/result.js +0 -24
- package/dist/schema/service/cloudflare-worker-class.d.ts +0 -8029
- package/dist/schema/service/index.d.ts +0 -5
- package/dist/schema/service/index.js +0 -5
- package/dist/schema/service/methods/deploy-cloudflare-worker.d.ts +0 -81
- package/dist/schema/service/methods/deploy-cloudflare-worker.js +0 -9
- package/dist/schema/service/policies.js +0 -12
- package/dist/schema/service/service-class.js +0 -46
- /package/dist/schema/{deployment/module.d.ts → modules/service/types/service-deployment-artifact-module.d.ts} +0 -0
- /package/dist/schema/{deployment/asset.d.ts → modules/service/types/service-deployment-assets.d.ts} +0 -0
- /package/dist/schema/{deployment/content.d.ts → modules/service/types/service-deployment-content.d.ts} +0 -0
- /package/dist/schema/{deployment/content.js → modules/service/types/service-deployment-content.js} +0 -0
- /package/dist/schema/{deployment/limits.d.ts → modules/service/types/service-deployment-resource-limits.d.ts} +0 -0
- /package/dist/schema/{deployment/limits.js → modules/service/types/service-deployment-resource-limits.js} +0 -0
- /package/dist/schema/{service/methods/secret-name.js → modules/service/types/service-secret-name.js} +0 -0
- /package/dist/schema/{service/methods/secret-operation-rejection.js → modules/service/types/service-secret-operation-rejection.js} +0 -0
package/dist/schema/schema.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KernelSchema, defineSchema, view } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { CloudflareWorker,
|
|
2
|
+
import { CloudflareWorker, OwnService, Service, TraverseOwnedService, service_owned_by, } from './modules/service/index.js';
|
|
3
3
|
export const schema = defineSchema('services.astrale.ai', {
|
|
4
4
|
dependencies: { kernel: KernelSchema },
|
|
5
5
|
classes: {
|
|
@@ -8,7 +8,7 @@ export const schema = defineSchema('services.astrale.ai', {
|
|
|
8
8
|
service_owned_by,
|
|
9
9
|
},
|
|
10
10
|
policies: {
|
|
11
|
-
|
|
11
|
+
OwnService,
|
|
12
12
|
TraverseOwnedService,
|
|
13
13
|
},
|
|
14
14
|
views: { application: view({}), service: view({ target: CloudflareWorker }) },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrale-domains/services",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/astrale-os/domains.git",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"registry": "https://registry.npmjs.org/"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@astrale-os/sdk": "0.5.0-beta.
|
|
31
|
+
"@astrale-os/sdk": "0.5.0-beta.82",
|
|
32
32
|
"zod": "^4.4.3"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@astrale-os/adapter-cloudflare": "0.5.0-beta.
|
|
35
|
+
"@astrale-os/adapter-cloudflare": "0.5.0-beta.85",
|
|
36
36
|
"@astrale-os/ox": ">=0.1.4 <1.0.0",
|
|
37
37
|
"@astrale-os/shell": "0.4.2-beta.8",
|
|
38
38
|
"@astrale-os/shell-react": "0.3.2-beta.5",
|
|
@@ -75,6 +75,9 @@
|
|
|
75
75
|
"lint:fix": "astrale-domain lint --fix",
|
|
76
76
|
"package": "astrale-domain package",
|
|
77
77
|
"provider:bootstrap": "bun providers/cloudflare/operator/provision/bootstrap.ts",
|
|
78
|
+
"provider:doctor": "bun providers/cloudflare/operator/maintenance/doctor.ts",
|
|
79
|
+
"provider:orphan-audit": "bun providers/cloudflare/operator/maintenance/orphan-audit.ts",
|
|
80
|
+
"provider:reclaim-service": "bun providers/cloudflare/operator/maintenance/reclaim-service.ts",
|
|
78
81
|
"provider:route-wildcard": "bun providers/cloudflare/operator/routing/wildcard.ts",
|
|
79
82
|
"provider:route-tenant": "bun providers/cloudflare/operator/routing/tenant.ts",
|
|
80
83
|
"typecheck": "tsc --noEmit && tsc --project providers/cloudflare/operator/dispatch/tsconfig.json",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const deploymentRejection: z.ZodObject<{
|
|
3
|
-
kind: z.ZodLiteral<"rejected">;
|
|
4
|
-
reason: z.ZodEnum<{
|
|
5
|
-
"artifact-mode-conflict": "artifact-mode-conflict";
|
|
6
|
-
"invalid-deployment": "invalid-deployment";
|
|
7
|
-
"service-unavailable": "service-unavailable";
|
|
8
|
-
}>;
|
|
9
|
-
message: z.ZodString;
|
|
10
|
-
}, z.core.$strict>;
|
|
11
|
-
export type DeploymentRejection = z.infer<typeof deploymentRejection>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export { assetBundle, assetFile } from './asset.js';
|
|
2
|
-
export type { AssetBundle } from './asset.js';
|
|
3
|
-
export { MAX_ASSET_BASE64_SIZE, MAX_MODULE_BASE64_SIZE, PORTABLE_BASE64_CHUNK_SIZE, } from './content.js';
|
|
4
|
-
export { resourceLimits } from './limits.js';
|
|
5
|
-
export type { ResourceLimits } from './limits.js';
|
|
6
|
-
export { deploymentRejection } from './deployment-rejection.js';
|
|
7
|
-
export type { DeploymentRejection } from './deployment-rejection.js';
|
|
8
|
-
export { artifactModule } from './module.js';
|
|
9
|
-
export type { ArtifactModule } from './module.js';
|
|
10
|
-
export { artifact, deployServiceInput, revisionedDeployment } from './request.js';
|
|
11
|
-
export type { DeployServiceInput } from './request.js';
|
|
12
|
-
export { deployedFunction, deployedService, deployServiceOutput, publishedApplication, } from './result.js';
|
|
13
|
-
export type { DeployServiceOutput } from './result.js';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { assetBundle, assetFile } from './asset.js';
|
|
2
|
-
export { MAX_ASSET_BASE64_SIZE, MAX_MODULE_BASE64_SIZE, PORTABLE_BASE64_CHUNK_SIZE, } from './content.js';
|
|
3
|
-
export { resourceLimits } from './limits.js';
|
|
4
|
-
export { deploymentRejection } from './deployment-rejection.js';
|
|
5
|
-
export { artifactModule } from './module.js';
|
|
6
|
-
export { artifact, deployServiceInput, revisionedDeployment } from './request.js';
|
|
7
|
-
export { deployedFunction, deployedService, deployServiceOutput, publishedApplication, } from './result.js';
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const deployedFunction: z.ZodObject<{
|
|
3
|
-
path: z.ZodString;
|
|
4
|
-
ref: z.ZodString;
|
|
5
|
-
}, z.core.$strict>;
|
|
6
|
-
export declare const publishedApplication: z.ZodObject<{
|
|
7
|
-
issuer: z.ZodString;
|
|
8
|
-
origin: z.ZodString;
|
|
9
|
-
revision: z.ZodString;
|
|
10
|
-
publicationEtag: z.ZodString;
|
|
11
|
-
functions: z.ZodArray<z.ZodObject<{
|
|
12
|
-
path: z.ZodString;
|
|
13
|
-
ref: z.ZodString;
|
|
14
|
-
}, z.core.$strict>>;
|
|
15
|
-
}, z.core.$strict>;
|
|
16
|
-
export declare const deployedService: z.ZodObject<{
|
|
17
|
-
id: z.ZodString;
|
|
18
|
-
serviceKey: z.ZodString;
|
|
19
|
-
url: z.ZodString;
|
|
20
|
-
digest: z.ZodString;
|
|
21
|
-
revision: z.ZodOptional<z.ZodString>;
|
|
22
|
-
state: z.ZodEnum<{
|
|
23
|
-
deleting: "deleting";
|
|
24
|
-
deploying: "deploying";
|
|
25
|
-
failed: "failed";
|
|
26
|
-
ready: "ready";
|
|
27
|
-
reconciling: "reconciling";
|
|
28
|
-
}>;
|
|
29
|
-
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
30
|
-
application: z.ZodOptional<z.ZodObject<{
|
|
31
|
-
issuer: z.ZodString;
|
|
32
|
-
origin: z.ZodString;
|
|
33
|
-
revision: z.ZodString;
|
|
34
|
-
publicationEtag: z.ZodString;
|
|
35
|
-
functions: z.ZodArray<z.ZodObject<{
|
|
36
|
-
path: z.ZodString;
|
|
37
|
-
ref: z.ZodString;
|
|
38
|
-
}, z.core.$strict>>;
|
|
39
|
-
}, z.core.$strict>>;
|
|
40
|
-
}, z.core.$strict>;
|
|
41
|
-
export declare const deployServiceOutput: z.ZodUnion<readonly [z.ZodObject<{
|
|
42
|
-
id: z.ZodString;
|
|
43
|
-
serviceKey: z.ZodString;
|
|
44
|
-
url: z.ZodString;
|
|
45
|
-
digest: z.ZodString;
|
|
46
|
-
revision: z.ZodOptional<z.ZodString>;
|
|
47
|
-
state: z.ZodEnum<{
|
|
48
|
-
deleting: "deleting";
|
|
49
|
-
deploying: "deploying";
|
|
50
|
-
failed: "failed";
|
|
51
|
-
ready: "ready";
|
|
52
|
-
reconciling: "reconciling";
|
|
53
|
-
}>;
|
|
54
|
-
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
55
|
-
application: z.ZodOptional<z.ZodObject<{
|
|
56
|
-
issuer: z.ZodString;
|
|
57
|
-
origin: z.ZodString;
|
|
58
|
-
revision: z.ZodString;
|
|
59
|
-
publicationEtag: z.ZodString;
|
|
60
|
-
functions: z.ZodArray<z.ZodObject<{
|
|
61
|
-
path: z.ZodString;
|
|
62
|
-
ref: z.ZodString;
|
|
63
|
-
}, z.core.$strict>>;
|
|
64
|
-
}, z.core.$strict>>;
|
|
65
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
66
|
-
kind: z.ZodLiteral<"rejected">;
|
|
67
|
-
reason: z.ZodEnum<{
|
|
68
|
-
"artifact-mode-conflict": "artifact-mode-conflict";
|
|
69
|
-
"invalid-deployment": "invalid-deployment";
|
|
70
|
-
"service-unavailable": "service-unavailable";
|
|
71
|
-
}>;
|
|
72
|
-
message: z.ZodString;
|
|
73
|
-
}, z.core.$strict>]>;
|
|
74
|
-
export type DeployServiceOutput = z.infer<typeof deployServiceOutput>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { deploymentRejection } from './deployment-rejection.js';
|
|
3
|
-
export const deployedFunction = z.strictObject({
|
|
4
|
-
path: z.string(),
|
|
5
|
-
ref: z.string(),
|
|
6
|
-
});
|
|
7
|
-
export const publishedApplication = z.strictObject({
|
|
8
|
-
issuer: z.string().min(1),
|
|
9
|
-
origin: z.string().min(1),
|
|
10
|
-
revision: z.string().min(1),
|
|
11
|
-
publicationEtag: z.string().min(1),
|
|
12
|
-
functions: z.array(deployedFunction),
|
|
13
|
-
});
|
|
14
|
-
export const deployedService = z.strictObject({
|
|
15
|
-
id: z.string().min(1),
|
|
16
|
-
serviceKey: z.string().min(1),
|
|
17
|
-
url: z.string(),
|
|
18
|
-
digest: z.string(),
|
|
19
|
-
revision: z.string().min(1).max(80).optional(),
|
|
20
|
-
state: z.enum(['deploying', 'reconciling', 'ready', 'failed', 'deleting']),
|
|
21
|
-
error: z.string().nullable().optional(),
|
|
22
|
-
application: publishedApplication.optional(),
|
|
23
|
-
});
|
|
24
|
-
export const deployServiceOutput = z.union([deployedService, deploymentRejection]);
|