@astrale-domains/services 0.4.9 → 0.5.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 +153 -816
- package/dist/schema/index.d.ts +4 -5
- package/dist/schema/index.js +2 -3
- package/dist/schema/modules/deployment/classes/cloudflare-deployment.d.ts +4 -321
- package/dist/schema/modules/deployment/classes/cloudflare-deployment.js +1 -19
- package/dist/schema/modules/deployment/classes/current-deployment.d.ts +20 -0
- package/dist/schema/modules/deployment/classes/current-deployment.js +13 -0
- package/dist/schema/modules/deployment/classes/{deployment-on-line.d.ts → deployment-of.d.ts} +3 -3
- package/dist/schema/modules/deployment/classes/deployment-of.js +11 -0
- package/dist/schema/modules/deployment/classes/deployment.d.ts +9 -57
- package/dist/schema/modules/deployment/classes/deployment.js +9 -23
- package/dist/schema/modules/deployment/classes/index.d.ts +2 -3
- package/dist/schema/modules/deployment/classes/index.js +2 -3
- package/dist/schema/modules/deployment/errors/deployment-not-found.d.ts +2 -5
- package/dist/schema/modules/deployment/errors/deployment-not-found.js +2 -5
- package/dist/schema/modules/deployment/errors/index.d.ts +0 -2
- package/dist/schema/modules/deployment/errors/index.js +0 -2
- package/dist/schema/modules/deployment/functions/index.d.ts +0 -10
- package/dist/schema/modules/deployment/functions/index.js +0 -10
- package/dist/schema/modules/deployment/functions/retire-deployment.d.ts +8 -7
- package/dist/schema/modules/deployment/functions/retire-deployment.js +8 -7
- package/dist/schema/modules/deployment/index.d.ts +6 -6
- package/dist/schema/modules/deployment/index.js +7 -5
- package/dist/schema/modules/deployment/policies/index.d.ts +1 -4
- package/dist/schema/modules/deployment/policies/index.js +1 -4
- package/dist/schema/modules/deployment/policies/own-deployment.d.ts +1 -1
- package/dist/schema/modules/deployment/policies/own-deployment.js +6 -7
- package/dist/schema/modules/deployment/policies/traverse-owned-service-deployment.d.ts +2 -0
- package/dist/schema/modules/deployment/policies/traverse-owned-service-deployment.js +7 -0
- package/dist/schema/modules/deployment/states/deployment-lifecycle.d.ts +6 -9
- package/dist/schema/modules/deployment/states/deployment-lifecycle.js +6 -7
- package/dist/schema/modules/deployment/types/deployment-hosting.d.ts +9 -28
- package/dist/schema/modules/deployment/types/deployment-hosting.js +3 -3
- package/dist/schema/modules/deployment/types/deployment-request.d.ts +12 -40
- package/dist/schema/modules/deployment/types/deployment-request.js +17 -9
- package/dist/schema/modules/deployment/types/deployment-response.d.ts +7 -15
- package/dist/schema/modules/deployment/types/deployment-response.js +2 -2
- package/dist/schema/modules/deployment/types/deployment-retire.d.ts +1 -1
- package/dist/schema/modules/deployment/types/deployment-secret.d.ts +0 -39
- package/dist/schema/modules/deployment/types/deployment-secret.js +0 -34
- package/dist/schema/modules/deployment/types/deployment-summary.d.ts +14 -45
- package/dist/schema/modules/deployment/types/deployment-summary.js +9 -8
- package/dist/schema/modules/deployment/types/index.d.ts +7 -3
- package/dist/schema/modules/deployment/types/index.js +4 -2
- package/dist/schema/modules/{service → deployment}/types/service-deployment-artifact-module.d.ts +2 -20
- package/dist/schema/modules/deployment/types/service-deployment-artifact-module.js +10 -0
- package/dist/schema/modules/{service → deployment}/types/service-deployment-assets.d.ts +4 -20
- package/dist/schema/modules/{service → deployment}/types/service-deployment-assets.js +4 -7
- package/dist/schema/modules/service/classes/cloudflare-service.d.ts +321 -0
- package/dist/schema/modules/service/classes/cloudflare-service.js +35 -0
- package/dist/schema/modules/service/classes/index.d.ts +1 -1
- package/dist/schema/modules/service/classes/index.js +1 -1
- package/dist/schema/modules/service/classes/service.d.ts +18 -107
- package/dist/schema/modules/service/classes/service.js +16 -27
- package/dist/schema/modules/service/errors/index.d.ts +1 -0
- package/dist/schema/modules/service/errors/index.js +1 -0
- package/dist/schema/modules/service/errors/service-not-found.d.ts +7 -0
- package/dist/schema/modules/service/errors/service-not-found.js +8 -0
- package/dist/schema/modules/service/functions/delete-service.d.ts +1 -1
- package/dist/schema/modules/service/functions/delete-service.js +1 -1
- package/dist/schema/modules/{deployment/functions/deploy-cloudflare-deployment.d.ts → service/functions/deploy-service.d.ts} +20 -35
- package/dist/schema/modules/service/functions/deploy-service.js +15 -0
- package/dist/schema/modules/service/functions/describe-hosting.d.ts +8 -0
- package/dist/schema/modules/service/functions/describe-hosting.js +11 -0
- package/dist/schema/modules/service/functions/index.d.ts +5 -10
- package/dist/schema/modules/service/functions/index.js +5 -10
- package/dist/schema/modules/{deployment/functions/list-cloudflare-deployments.d.ts → service/functions/list-service-deployments.d.ts} +8 -12
- package/dist/schema/modules/service/functions/list-service-deployments.js +10 -0
- package/dist/schema/modules/service/functions/list-service-logs.d.ts +2 -1
- package/dist/schema/modules/service/functions/list-service-logs.js +1 -1
- package/dist/schema/modules/service/functions/list-service-schedules.d.ts +1 -1
- package/dist/schema/modules/service/functions/list-service-schedules.js +1 -1
- package/dist/schema/modules/service/functions/list-service-secret-names.d.ts +1 -1
- package/dist/schema/modules/service/functions/list-service-secret-names.js +1 -1
- package/dist/schema/modules/service/functions/promote-service.d.ts +14 -0
- package/dist/schema/modules/service/functions/promote-service.js +4 -0
- package/dist/schema/modules/service/functions/replace-service-schedules.d.ts +1 -1
- package/dist/schema/modules/service/functions/replace-service-schedules.js +1 -4
- package/dist/schema/modules/service/functions/set-service-secret.d.ts +4 -2
- package/dist/schema/modules/service/functions/set-service-secret.js +1 -1
- package/dist/schema/modules/service/functions/transfer-service.d.ts +14 -0
- package/dist/schema/modules/service/functions/transfer-service.js +4 -0
- package/dist/schema/modules/service/index.d.ts +5 -5
- package/dist/schema/modules/service/index.js +5 -4
- package/dist/schema/modules/service/policies/act-as.d.ts +6 -0
- package/dist/schema/modules/service/policies/act-as.js +10 -0
- package/dist/schema/modules/service/policies/index.d.ts +1 -0
- package/dist/schema/modules/service/policies/index.js +1 -0
- package/dist/schema/modules/service/states/service-lifecycle.d.ts +7 -20
- package/dist/schema/modules/service/states/service-lifecycle.js +6 -21
- package/dist/schema/modules/service/types/index.d.ts +1 -13
- package/dist/schema/modules/service/types/index.js +1 -8
- package/dist/schema/modules/service/types/service-management.d.ts +65 -24
- package/dist/schema/modules/service/types/service-management.js +46 -21
- package/dist/schema/schema.d.ts +252 -758
- package/dist/schema/schema.js +7 -11
- package/package.json +2 -9
- package/dist/scaffold/create-service.mjs +0 -77
- package/dist/scaffold/template/.env.example +0 -2
- package/dist/scaffold/template/README.md +0 -37
- package/dist/scaffold/template/gitignore +0 -6
- package/dist/scaffold/template/scripts/build.mjs +0 -10
- package/dist/scaffold/template/scripts/deploy.mjs +0 -50
- package/dist/scaffold/template/src/account.js +0 -26
- package/dist/scaffold/template/src/index.js +0 -32
- package/dist/scaffold/template/src/job.js +0 -19
- package/dist/schema/modules/deployment/classes/deployment-line.d.ts +0 -23
- package/dist/schema/modules/deployment/classes/deployment-line.js +0 -24
- package/dist/schema/modules/deployment/classes/deployment-on-line.js +0 -11
- package/dist/schema/modules/deployment/classes/line-owned-by.d.ts +0 -26
- package/dist/schema/modules/deployment/classes/line-owned-by.js +0 -19
- package/dist/schema/modules/deployment/errors/deployment-label-not-found.d.ts +0 -12
- package/dist/schema/modules/deployment/errors/deployment-label-not-found.js +0 -11
- package/dist/schema/modules/deployment/errors/deployment-registry-only.d.ts +0 -11
- package/dist/schema/modules/deployment/errors/deployment-registry-only.js +0 -12
- package/dist/schema/modules/deployment/functions/deploy-cloudflare-deployment.js +0 -14
- package/dist/schema/modules/deployment/functions/describe-deployment-hosting.d.ts +0 -8
- package/dist/schema/modules/deployment/functions/describe-deployment-hosting.js +0 -11
- package/dist/schema/modules/deployment/functions/expire-deployment-previews.d.ts +0 -16
- package/dist/schema/modules/deployment/functions/expire-deployment-previews.js +0 -14
- package/dist/schema/modules/deployment/functions/list-cloudflare-deployment-secret-names.d.ts +0 -5
- package/dist/schema/modules/deployment/functions/list-cloudflare-deployment-secret-names.js +0 -4
- package/dist/schema/modules/deployment/functions/list-cloudflare-deployments.js +0 -10
- package/dist/schema/modules/deployment/functions/list-deployment-secret-names.d.ts +0 -4
- package/dist/schema/modules/deployment/functions/list-deployment-secret-names.js +0 -6
- package/dist/schema/modules/deployment/functions/read-deployment-last-calls.d.ts +0 -10
- package/dist/schema/modules/deployment/functions/read-deployment-last-calls.js +0 -13
- package/dist/schema/modules/deployment/functions/retain-deployment.d.ts +0 -12
- package/dist/schema/modules/deployment/functions/retain-deployment.js +0 -13
- package/dist/schema/modules/deployment/functions/set-cloudflare-deployment-secret.d.ts +0 -18
- package/dist/schema/modules/deployment/functions/set-cloudflare-deployment-secret.js +0 -7
- package/dist/schema/modules/deployment/functions/set-deployment-secret.d.ts +0 -14
- package/dist/schema/modules/deployment/functions/set-deployment-secret.js +0 -3
- package/dist/schema/modules/deployment/policies/act-for-organization.d.ts +0 -6
- package/dist/schema/modules/deployment/policies/act-for-organization.js +0 -10
- package/dist/schema/modules/deployment/policies/own-line.d.ts +0 -5
- package/dist/schema/modules/deployment/policies/own-line.js +0 -10
- package/dist/schema/modules/deployment/policies/traverse-owned-line-deployment.d.ts +0 -2
- package/dist/schema/modules/deployment/policies/traverse-owned-line-deployment.js +0 -7
- package/dist/schema/modules/deployment/policies/traverse-owned-line.d.ts +0 -2
- package/dist/schema/modules/deployment/policies/traverse-owned-line.js +0 -7
- package/dist/schema/modules/deployment/types/deployment-retention.d.ts +0 -49
- package/dist/schema/modules/deployment/types/deployment-retention.js +0 -45
- package/dist/schema/modules/service/classes/cloudflare-worker.d.ts +0 -352
- package/dist/schema/modules/service/classes/cloudflare-worker.js +0 -41
- package/dist/schema/modules/service/functions/delete-service-secret.d.ts +0 -11
- package/dist/schema/modules/service/functions/delete-service-secret.js +0 -3
- package/dist/schema/modules/service/functions/delete-worker-secret.d.ts +0 -11
- package/dist/schema/modules/service/functions/delete-worker-secret.js +0 -7
- package/dist/schema/modules/service/functions/delete-worker.d.ts +0 -9
- package/dist/schema/modules/service/functions/delete-worker.js +0 -7
- package/dist/schema/modules/service/functions/deploy-cloudflare-worker.d.ts +0 -109
- package/dist/schema/modules/service/functions/deploy-cloudflare-worker.js +0 -9
- package/dist/schema/modules/service/functions/list-worker-logs.d.ts +0 -12
- package/dist/schema/modules/service/functions/list-worker-logs.js +0 -7
- package/dist/schema/modules/service/functions/list-worker-schedules.d.ts +0 -4
- package/dist/schema/modules/service/functions/list-worker-schedules.js +0 -7
- package/dist/schema/modules/service/functions/list-worker-secret-names.d.ts +0 -4
- package/dist/schema/modules/service/functions/list-worker-secret-names.js +0 -7
- package/dist/schema/modules/service/functions/migrate-worker-ingress.d.ts +0 -24
- package/dist/schema/modules/service/functions/migrate-worker-ingress.js +0 -26
- package/dist/schema/modules/service/functions/replace-worker-schedules.d.ts +0 -11
- package/dist/schema/modules/service/functions/replace-worker-schedules.js +0 -7
- package/dist/schema/modules/service/functions/set-worker-secret.d.ts +0 -12
- package/dist/schema/modules/service/functions/set-worker-secret.js +0 -7
- package/dist/schema/modules/service/types/deploy-cloudflare-worker.d.ts +0 -286
- package/dist/schema/modules/service/types/deploy-cloudflare-worker.js +0 -51
- package/dist/schema/modules/service/types/legacy/service-deployment-content.js +0 -22
- package/dist/schema/modules/service/types/service-deployment-artifact-module.js +0 -13
- package/dist/schema/modules/service/types/service-deployment-resource-limits.d.ts +0 -6
- package/dist/schema/modules/service/types/service-deployment-resource-limits.js +0 -7
- package/dist/schema/modules/service/types/service-readiness.d.ts +0 -6
- package/dist/schema/modules/service/types/service-readiness.js +0 -6
- package/dist/schema/modules/service/types/service-secret-operation-rejection.d.ts +0 -9
- package/dist/schema/modules/service/types/service-secret-operation-rejection.js +0 -5
- /package/dist/schema/modules/{service → deployment}/types/content/index.d.ts +0 -0
- /package/dist/schema/modules/{service → deployment}/types/content/index.js +0 -0
- /package/dist/schema/modules/{service → deployment}/types/content/limits.d.ts +0 -0
- /package/dist/schema/modules/{service → deployment}/types/content/limits.js +0 -0
- /package/dist/schema/modules/{service → deployment}/types/service-deployment-content.d.ts +0 -0
- /package/dist/schema/modules/{service → deployment}/types/service-deployment-content.js +0 -0
|
@@ -7,7 +7,7 @@ export declare const deploymentRejectionReason: z.ZodEnum<{
|
|
|
7
7
|
"deployment-retired": "deployment-retired";
|
|
8
8
|
"hosting-unavailable": "hosting-unavailable";
|
|
9
9
|
"invalid-deployment": "invalid-deployment";
|
|
10
|
-
"
|
|
10
|
+
"service-owned-elsewhere": "service-owned-elsewhere";
|
|
11
11
|
"service-unavailable": "service-unavailable";
|
|
12
12
|
}>;
|
|
13
13
|
export declare const deploymentRejection: z.ZodObject<{
|
|
@@ -19,7 +19,7 @@ export declare const deploymentRejection: z.ZodObject<{
|
|
|
19
19
|
"deployment-retired": "deployment-retired";
|
|
20
20
|
"hosting-unavailable": "hosting-unavailable";
|
|
21
21
|
"invalid-deployment": "invalid-deployment";
|
|
22
|
-
"
|
|
22
|
+
"service-owned-elsewhere": "service-owned-elsewhere";
|
|
23
23
|
"service-unavailable": "service-unavailable";
|
|
24
24
|
}>;
|
|
25
25
|
message: z.ZodString;
|
|
@@ -28,7 +28,7 @@ export declare const deploymentRejection: z.ZodObject<{
|
|
|
28
28
|
/**
|
|
29
29
|
* `DeploymentResponseV1`. A created deployment binds the request's secrets at its create-only
|
|
30
30
|
* upload (`bound`); a reused one compares them with its keyed digest (`unchanged`) or rewrites them
|
|
31
|
-
* in place on that deployment only (`updated`).
|
|
31
|
+
* in place on that deployment only (`updated`). The summary says whether the Service now serves it.
|
|
32
32
|
*/
|
|
33
33
|
export declare const deploymentResponse: z.ZodUnion<readonly [z.ZodObject<{
|
|
34
34
|
kind: z.ZodLiteral<"deployed">;
|
|
@@ -47,7 +47,8 @@ export declare const deploymentResponse: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
47
47
|
id: z.ZodString;
|
|
48
48
|
url: z.ZodString;
|
|
49
49
|
label: z.ZodString;
|
|
50
|
-
|
|
50
|
+
serviceId: z.ZodString;
|
|
51
|
+
service: z.ZodString;
|
|
51
52
|
owner: z.ZodString;
|
|
52
53
|
state: z.ZodEnum<{
|
|
53
54
|
active: "active";
|
|
@@ -56,18 +57,9 @@ export declare const deploymentResponse: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
56
57
|
retired: "retired";
|
|
57
58
|
retiring: "retiring";
|
|
58
59
|
}>;
|
|
59
|
-
|
|
60
|
-
preview: "preview";
|
|
61
|
-
published: "published";
|
|
62
|
-
}>;
|
|
60
|
+
current: z.ZodBoolean;
|
|
63
61
|
createdAt: z.ZodString;
|
|
64
|
-
lastCallAt: z.ZodOptional<z.ZodString>;
|
|
65
|
-
expiresAt: z.ZodOptional<z.ZodString>;
|
|
66
62
|
retiredAt: z.ZodOptional<z.ZodString>;
|
|
67
|
-
retirement: z.ZodOptional<z.ZodEnum<{
|
|
68
|
-
expired: "expired";
|
|
69
|
-
withdrawn: "withdrawn";
|
|
70
|
-
}>>;
|
|
71
63
|
signingKeyId: z.ZodString;
|
|
72
64
|
record: z.ZodObject<{
|
|
73
65
|
format: z.ZodLiteral<"astrale.deployment-record">;
|
|
@@ -98,7 +90,7 @@ export declare const deploymentResponse: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
98
90
|
"deployment-retired": "deployment-retired";
|
|
99
91
|
"hosting-unavailable": "hosting-unavailable";
|
|
100
92
|
"invalid-deployment": "invalid-deployment";
|
|
101
|
-
"
|
|
93
|
+
"service-owned-elsewhere": "service-owned-elsewhere";
|
|
102
94
|
"service-unavailable": "service-unavailable";
|
|
103
95
|
}>;
|
|
104
96
|
message: z.ZodString;
|
|
@@ -7,7 +7,7 @@ export const deploymentRejectionReason = z.enum([
|
|
|
7
7
|
'invalid-deployment',
|
|
8
8
|
'address-mismatch',
|
|
9
9
|
'build-mismatch',
|
|
10
|
-
'
|
|
10
|
+
'service-owned-elsewhere',
|
|
11
11
|
'deployment-conflict',
|
|
12
12
|
'deployment-retired',
|
|
13
13
|
'hosting-unavailable',
|
|
@@ -23,7 +23,7 @@ export const deploymentRejection = z.strictObject({
|
|
|
23
23
|
/**
|
|
24
24
|
* `DeploymentResponseV1`. A created deployment binds the request's secrets at its create-only
|
|
25
25
|
* upload (`bound`); a reused one compares them with its keyed digest (`unchanged`) or rewrites them
|
|
26
|
-
* in place on that deployment only (`updated`).
|
|
26
|
+
* in place on that deployment only (`updated`). The summary says whether the Service now serves it.
|
|
27
27
|
*/
|
|
28
28
|
export const deploymentResponse = z.union([
|
|
29
29
|
z.strictObject({
|
|
@@ -21,7 +21,7 @@ export declare const retireDeploymentOutput: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
21
21
|
"deployment-retired": "deployment-retired";
|
|
22
22
|
"hosting-unavailable": "hosting-unavailable";
|
|
23
23
|
"invalid-deployment": "invalid-deployment";
|
|
24
|
-
"
|
|
24
|
+
"service-owned-elsewhere": "service-owned-elsewhere";
|
|
25
25
|
"service-unavailable": "service-unavailable";
|
|
26
26
|
}>;
|
|
27
27
|
message: z.ZodString;
|
|
@@ -17,43 +17,4 @@ export declare const deploymentSecretRejection: z.ZodObject<{
|
|
|
17
17
|
message: z.ZodString;
|
|
18
18
|
retryAfter: z.ZodOptional<z.ZodString>;
|
|
19
19
|
}, z.core.$strict>;
|
|
20
|
-
/**
|
|
21
|
-
* Rewrite one secret of one deployment in place: the same script, URL, issuer and key, with no
|
|
22
|
-
* new release. The provider serves the new value once it has propagated, a few seconds later.
|
|
23
|
-
*
|
|
24
|
-
* `authenticated`, as `deploy`: a publisher's identities on the Admin instance hold no `can_use`
|
|
25
|
-
* on Services' Functions, which an `authorized` Method requires of every non-Root caller (Kernel
|
|
26
|
-
* law in `runtime/functions/.spec/laws/authentication.ts`), so `authorized` with the
|
|
27
|
-
* `OwnDeployment` Policy refuses a line holder (2004). The handler decides `OwnDeployment` on the
|
|
28
|
-
* caller's own session before anything is read or written, exactly as `deploy` decides
|
|
29
|
-
* `OwnLine`, and a caller who does not hold the line finds no such deployment
|
|
30
|
-
* (`DEPLOYMENT_NOT_FOUND`). The day the Admin instance grants publishers `can_use` on these
|
|
31
|
-
* Methods, they become `authorized` with that Policy and the handler check goes.
|
|
32
|
-
*/
|
|
33
|
-
export declare const setDeploymentSecretContract: {
|
|
34
|
-
readonly description: 'Rewrite one declared secret of this deployment in place; the new value is served once the provider propagates it.';
|
|
35
|
-
readonly auth: 'authenticated';
|
|
36
|
-
readonly input: z.ZodObject<{
|
|
37
|
-
name: z.ZodString;
|
|
38
|
-
value: z.ZodString;
|
|
39
|
-
}, z.core.$strict>;
|
|
40
|
-
readonly output: z.ZodUnion<readonly [z.ZodObject<{
|
|
41
|
-
name: z.ZodString;
|
|
42
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
43
|
-
kind: z.ZodLiteral<"rejected">;
|
|
44
|
-
reason: z.ZodEnum<{
|
|
45
|
-
"secret-undeclared": "secret-undeclared";
|
|
46
|
-
"service-unavailable": "service-unavailable";
|
|
47
|
-
}>;
|
|
48
|
-
message: z.ZodString;
|
|
49
|
-
retryAfter: z.ZodOptional<z.ZodString>;
|
|
50
|
-
}, z.core.$strict>]>;
|
|
51
|
-
};
|
|
52
|
-
/** The names of the secrets one deployment binds, never their values; decided as `setSecret`. */
|
|
53
|
-
export declare const listDeploymentSecretNamesContract: {
|
|
54
|
-
readonly description: 'List the names of the secrets this deployment binds, without their values.';
|
|
55
|
-
readonly auth: 'authenticated';
|
|
56
|
-
readonly input: z.ZodObject<{}, z.core.$strict>;
|
|
57
|
-
readonly output: z.ZodArray<z.ZodString>;
|
|
58
|
-
};
|
|
59
20
|
export type DeploymentSecretRejection = z.output<typeof deploymentSecretRejection>;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/** An ISO 8601 instant, as the graph's instant values read. */
|
|
3
3
|
const instant = z.string().min(1).max(64);
|
|
4
|
-
/** A secret name as a deployment's frozen configuration declares it. */
|
|
5
|
-
const secretName = z.string().min(1).max(128);
|
|
6
4
|
/**
|
|
7
5
|
* Why a deployment's secret was not rewritten. `secret-undeclared`: the name is not one the
|
|
8
6
|
* deployment's frozen configuration binds, and adding or removing a name is a new release; nothing
|
|
@@ -18,35 +16,3 @@ export const deploymentSecretRejection = z.strictObject({
|
|
|
18
16
|
message: z.string().min(1).max(500),
|
|
19
17
|
retryAfter: instant.optional(),
|
|
20
18
|
});
|
|
21
|
-
/**
|
|
22
|
-
* Rewrite one secret of one deployment in place: the same script, URL, issuer and key, with no
|
|
23
|
-
* new release. The provider serves the new value once it has propagated, a few seconds later.
|
|
24
|
-
*
|
|
25
|
-
* `authenticated`, as `deploy`: a publisher's identities on the Admin instance hold no `can_use`
|
|
26
|
-
* on Services' Functions, which an `authorized` Method requires of every non-Root caller (Kernel
|
|
27
|
-
* law in `runtime/functions/.spec/laws/authentication.ts`), so `authorized` with the
|
|
28
|
-
* `OwnDeployment` Policy refuses a line holder (2004). The handler decides `OwnDeployment` on the
|
|
29
|
-
* caller's own session before anything is read or written, exactly as `deploy` decides
|
|
30
|
-
* `OwnLine`, and a caller who does not hold the line finds no such deployment
|
|
31
|
-
* (`DEPLOYMENT_NOT_FOUND`). The day the Admin instance grants publishers `can_use` on these
|
|
32
|
-
* Methods, they become `authorized` with that Policy and the handler check goes.
|
|
33
|
-
*/
|
|
34
|
-
export const setDeploymentSecretContract = {
|
|
35
|
-
description: 'Rewrite one declared secret of this deployment in place; the new value is served once the provider propagates it.',
|
|
36
|
-
auth: 'authenticated',
|
|
37
|
-
input: z.strictObject({
|
|
38
|
-
name: secretName,
|
|
39
|
-
value: z
|
|
40
|
-
.string()
|
|
41
|
-
.min(1)
|
|
42
|
-
.max(64 * 1024),
|
|
43
|
-
}),
|
|
44
|
-
output: z.union([z.strictObject({ name: secretName }), deploymentSecretRejection]),
|
|
45
|
-
};
|
|
46
|
-
/** The names of the secrets one deployment binds, never their values; decided as `setSecret`. */
|
|
47
|
-
export const listDeploymentSecretNamesContract = {
|
|
48
|
-
description: 'List the names of the secrets this deployment binds, without their values.',
|
|
49
|
-
auth: 'authenticated',
|
|
50
|
-
input: z.strictObject({}),
|
|
51
|
-
output: z.array(secretName),
|
|
52
|
-
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/**
|
|
3
3
|
* `DeploymentSummaryV1`: what Services knows of one deployment beside the record its deployer
|
|
4
|
-
* declared. It names a deployment by its label and URL, never by a provider version
|
|
4
|
+
* declared. It names a deployment by its label and URL, never by a provider version, and says
|
|
5
|
+
* whether it is the one its Service currently serves.
|
|
5
6
|
*/
|
|
6
7
|
export declare const deploymentSummary: z.ZodObject<{
|
|
7
8
|
id: z.ZodString;
|
|
8
9
|
url: z.ZodString;
|
|
9
10
|
label: z.ZodString;
|
|
10
|
-
|
|
11
|
+
serviceId: z.ZodString;
|
|
12
|
+
service: z.ZodString;
|
|
11
13
|
owner: z.ZodString;
|
|
12
14
|
state: z.ZodEnum<{
|
|
13
15
|
active: "active";
|
|
@@ -16,18 +18,9 @@ export declare const deploymentSummary: z.ZodObject<{
|
|
|
16
18
|
retired: "retired";
|
|
17
19
|
retiring: "retiring";
|
|
18
20
|
}>;
|
|
19
|
-
|
|
20
|
-
preview: "preview";
|
|
21
|
-
published: "published";
|
|
22
|
-
}>;
|
|
21
|
+
current: z.ZodBoolean;
|
|
23
22
|
createdAt: z.ZodString;
|
|
24
|
-
lastCallAt: z.ZodOptional<z.ZodString>;
|
|
25
|
-
expiresAt: z.ZodOptional<z.ZodString>;
|
|
26
23
|
retiredAt: z.ZodOptional<z.ZodString>;
|
|
27
|
-
retirement: z.ZodOptional<z.ZodEnum<{
|
|
28
|
-
expired: "expired";
|
|
29
|
-
withdrawn: "withdrawn";
|
|
30
|
-
}>>;
|
|
31
24
|
signingKeyId: z.ZodString;
|
|
32
25
|
record: z.ZodObject<{
|
|
33
26
|
format: z.ZodLiteral<"astrale.deployment-record">;
|
|
@@ -59,7 +52,8 @@ export declare const unadmittedDeploymentSummary: z.ZodObject<{
|
|
|
59
52
|
id: z.ZodString;
|
|
60
53
|
url: z.ZodString;
|
|
61
54
|
label: z.ZodString;
|
|
62
|
-
|
|
55
|
+
serviceId: z.ZodString;
|
|
56
|
+
service: z.ZodString;
|
|
63
57
|
owner: z.ZodString;
|
|
64
58
|
state: z.ZodEnum<{
|
|
65
59
|
active: "active";
|
|
@@ -68,18 +62,9 @@ export declare const unadmittedDeploymentSummary: z.ZodObject<{
|
|
|
68
62
|
retired: "retired";
|
|
69
63
|
retiring: "retiring";
|
|
70
64
|
}>;
|
|
71
|
-
|
|
72
|
-
preview: "preview";
|
|
73
|
-
published: "published";
|
|
74
|
-
}>;
|
|
65
|
+
current: z.ZodBoolean;
|
|
75
66
|
createdAt: z.ZodString;
|
|
76
|
-
lastCallAt: z.ZodOptional<z.ZodString>;
|
|
77
|
-
expiresAt: z.ZodOptional<z.ZodString>;
|
|
78
67
|
retiredAt: z.ZodOptional<z.ZodString>;
|
|
79
|
-
retirement: z.ZodOptional<z.ZodEnum<{
|
|
80
|
-
expired: "expired";
|
|
81
|
-
withdrawn: "withdrawn";
|
|
82
|
-
}>>;
|
|
83
68
|
signingKeyId: z.ZodString;
|
|
84
69
|
record: z.ZodUnknown;
|
|
85
70
|
}, z.core.$strict>;
|
|
@@ -91,7 +76,8 @@ export declare const listedDeploymentSummary: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
91
76
|
id: z.ZodString;
|
|
92
77
|
url: z.ZodString;
|
|
93
78
|
label: z.ZodString;
|
|
94
|
-
|
|
79
|
+
serviceId: z.ZodString;
|
|
80
|
+
service: z.ZodString;
|
|
95
81
|
owner: z.ZodString;
|
|
96
82
|
state: z.ZodEnum<{
|
|
97
83
|
active: "active";
|
|
@@ -100,18 +86,9 @@ export declare const listedDeploymentSummary: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
100
86
|
retired: "retired";
|
|
101
87
|
retiring: "retiring";
|
|
102
88
|
}>;
|
|
103
|
-
|
|
104
|
-
preview: "preview";
|
|
105
|
-
published: "published";
|
|
106
|
-
}>;
|
|
89
|
+
current: z.ZodBoolean;
|
|
107
90
|
createdAt: z.ZodString;
|
|
108
|
-
lastCallAt: z.ZodOptional<z.ZodString>;
|
|
109
|
-
expiresAt: z.ZodOptional<z.ZodString>;
|
|
110
91
|
retiredAt: z.ZodOptional<z.ZodString>;
|
|
111
|
-
retirement: z.ZodOptional<z.ZodEnum<{
|
|
112
|
-
expired: "expired";
|
|
113
|
-
withdrawn: "withdrawn";
|
|
114
|
-
}>>;
|
|
115
92
|
signingKeyId: z.ZodString;
|
|
116
93
|
record: z.ZodObject<{
|
|
117
94
|
format: z.ZodLiteral<"astrale.deployment-record">;
|
|
@@ -136,7 +113,8 @@ export declare const listedDeploymentSummary: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
136
113
|
id: z.ZodString;
|
|
137
114
|
url: z.ZodString;
|
|
138
115
|
label: z.ZodString;
|
|
139
|
-
|
|
116
|
+
serviceId: z.ZodString;
|
|
117
|
+
service: z.ZodString;
|
|
140
118
|
owner: z.ZodString;
|
|
141
119
|
state: z.ZodEnum<{
|
|
142
120
|
active: "active";
|
|
@@ -145,18 +123,9 @@ export declare const listedDeploymentSummary: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
145
123
|
retired: "retired";
|
|
146
124
|
retiring: "retiring";
|
|
147
125
|
}>;
|
|
148
|
-
|
|
149
|
-
preview: "preview";
|
|
150
|
-
published: "published";
|
|
151
|
-
}>;
|
|
126
|
+
current: z.ZodBoolean;
|
|
152
127
|
createdAt: z.ZodString;
|
|
153
|
-
lastCallAt: z.ZodOptional<z.ZodString>;
|
|
154
|
-
expiresAt: z.ZodOptional<z.ZodString>;
|
|
155
128
|
retiredAt: z.ZodOptional<z.ZodString>;
|
|
156
|
-
retirement: z.ZodOptional<z.ZodEnum<{
|
|
157
|
-
expired: "expired";
|
|
158
|
-
withdrawn: "withdrawn";
|
|
159
|
-
}>>;
|
|
160
129
|
signingKeyId: z.ZodString;
|
|
161
130
|
record: z.ZodUnknown;
|
|
162
131
|
}, z.core.$strict>]>;
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { deploymentRecord } from './deployment-record.js';
|
|
3
|
-
import { deploymentRetention, deploymentRetirement } from './deployment-retention.js';
|
|
4
3
|
/** An ISO 8601 instant, as the graph's instant values read. */
|
|
5
4
|
const instant = z.string().min(1).max(64);
|
|
6
5
|
/**
|
|
7
6
|
* `DeploymentSummaryV1`: what Services knows of one deployment beside the record its deployer
|
|
8
|
-
* declared. It names a deployment by its label and URL, never by a provider version
|
|
7
|
+
* declared. It names a deployment by its label and URL, never by a provider version, and says
|
|
8
|
+
* whether it is the one its Service currently serves.
|
|
9
9
|
*/
|
|
10
10
|
export const deploymentSummary = z.strictObject({
|
|
11
11
|
id: z.string().min(1),
|
|
12
12
|
url: z.string().min(1).max(2_048),
|
|
13
13
|
label: z.string().min(1).max(63),
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
/** The id of the Service this deployment is a version of. */
|
|
15
|
+
serviceId: z.string().min(1),
|
|
16
|
+
/** The name of that Service, the prefix of the label. */
|
|
17
|
+
service: z.string().min(16).max(40),
|
|
18
|
+
/** The Identity path of the Service's owner. */
|
|
16
19
|
owner: z.string().min(1),
|
|
17
20
|
state: z.enum(['deploying', 'active', 'retiring', 'retired', 'failed']),
|
|
18
|
-
|
|
21
|
+
/** Whether the Service's URL serves this deployment. */
|
|
22
|
+
current: z.boolean(),
|
|
19
23
|
createdAt: instant,
|
|
20
|
-
lastCallAt: instant.optional(),
|
|
21
|
-
expiresAt: instant.optional(),
|
|
22
24
|
retiredAt: instant.optional(),
|
|
23
|
-
retirement: deploymentRetirement.optional(),
|
|
24
25
|
signingKeyId: z.string().min(1).max(128),
|
|
25
26
|
record: deploymentRecord,
|
|
26
27
|
});
|
|
@@ -6,11 +6,9 @@ export { deploymentRequest } from './deployment-request.js';
|
|
|
6
6
|
export type { DeploymentRequest } from './deployment-request.js';
|
|
7
7
|
export { deploymentRejection, deploymentRejectionReason, deploymentResponse, } from './deployment-response.js';
|
|
8
8
|
export type { DeploymentRejection, DeploymentRejectionReason, DeploymentResponse, } from './deployment-response.js';
|
|
9
|
-
export { deploymentLabel, deploymentRetention, deploymentRetirement, expirePreviewsInput, expirePreviewsOutput, lastCallsInput, lastCallsOutput, MAXIMUM_LAST_CALL_LABELS, MAXIMUM_PREVIEW_EXPIRY_WRITES, retainInput, retainOutput, } from './deployment-retention.js';
|
|
10
|
-
export type { DeploymentRetention, DeploymentRetirement, ExpirePreviewsResult, } from './deployment-retention.js';
|
|
11
9
|
export { retireDeploymentInput, retireDeploymentOutput } from './deployment-retire.js';
|
|
12
10
|
export type { RetireDeploymentResult } from './deployment-retire.js';
|
|
13
|
-
export { deploymentSecretRejection
|
|
11
|
+
export { deploymentSecretRejection } from './deployment-secret.js';
|
|
14
12
|
export type { DeploymentSecretRejection } from './deployment-secret.js';
|
|
15
13
|
export { deploymentSecretDigest, deploymentSecretDigests } from './deployment-secret-digest.js';
|
|
16
14
|
export type { DeploymentSecretDigest } from './deployment-secret-digest.js';
|
|
@@ -18,3 +16,9 @@ export { deploymentSummary, listedDeploymentSummary, unadmittedDeploymentSummary
|
|
|
18
16
|
export type { DeploymentSummary, ListedDeploymentSummary, UnadmittedDeploymentSummary, } from './deployment-summary.js';
|
|
19
17
|
export { frozenConfiguration } from './frozen-configuration.js';
|
|
20
18
|
export type { FrozenConfiguration } from './frozen-configuration.js';
|
|
19
|
+
export { artifactModule } from './service-deployment-artifact-module.js';
|
|
20
|
+
export type { ArtifactModule } from './service-deployment-artifact-module.js';
|
|
21
|
+
export { assetBundle, assetFile } from './service-deployment-assets.js';
|
|
22
|
+
export type { AssetBundle } from './service-deployment-assets.js';
|
|
23
|
+
export { MAX_ASSET_BASE64_SIZE, MAX_ASSET_DECODED_SIZE, MAX_DEPLOYMENT_DECODED_SIZE, MAX_MODULE_BASE64_SIZE, MAX_MODULE_DECODED_SIZE, PORTABLE_BASE64_CHUNK_SIZE, } from './service-deployment-content.js';
|
|
24
|
+
export type { ServiceDeploymentContent } from './service-deployment-content.js';
|
|
@@ -2,9 +2,11 @@ export { deploymentHosting, listDeploymentsInput, listDeploymentsOutput, } from
|
|
|
2
2
|
export { deploymentCommit, deploymentRecord } from './deployment-record.js';
|
|
3
3
|
export { deploymentRequest } from './deployment-request.js';
|
|
4
4
|
export { deploymentRejection, deploymentRejectionReason, deploymentResponse, } from './deployment-response.js';
|
|
5
|
-
export { deploymentLabel, deploymentRetention, deploymentRetirement, expirePreviewsInput, expirePreviewsOutput, lastCallsInput, lastCallsOutput, MAXIMUM_LAST_CALL_LABELS, MAXIMUM_PREVIEW_EXPIRY_WRITES, retainInput, retainOutput, } from './deployment-retention.js';
|
|
6
5
|
export { retireDeploymentInput, retireDeploymentOutput } from './deployment-retire.js';
|
|
7
|
-
export { deploymentSecretRejection
|
|
6
|
+
export { deploymentSecretRejection } from './deployment-secret.js';
|
|
8
7
|
export { deploymentSecretDigest, deploymentSecretDigests } from './deployment-secret-digest.js';
|
|
9
8
|
export { deploymentSummary, listedDeploymentSummary, unadmittedDeploymentSummary, } from './deployment-summary.js';
|
|
10
9
|
export { frozenConfiguration } from './frozen-configuration.js';
|
|
10
|
+
export { artifactModule } from './service-deployment-artifact-module.js';
|
|
11
|
+
export { assetBundle, assetFile } from './service-deployment-assets.js';
|
|
12
|
+
export { MAX_ASSET_BASE64_SIZE, MAX_ASSET_DECODED_SIZE, MAX_DEPLOYMENT_DECODED_SIZE, MAX_MODULE_BASE64_SIZE, MAX_MODULE_DECODED_SIZE, PORTABLE_BASE64_CHUNK_SIZE, } from './service-deployment-content.js';
|
package/dist/schema/modules/{service → deployment}/types/service-deployment-artifact-module.d.ts
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const artifactModule: z.
|
|
2
|
+
export declare const artifactModule: z.ZodObject<{
|
|
3
3
|
name: z.ZodString;
|
|
4
4
|
kind: z.ZodOptional<z.ZodEnum<{
|
|
5
5
|
data: "data";
|
|
@@ -22,23 +22,5 @@ export declare const artifactModule: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
22
22
|
decodedSize: z.ZodNumber;
|
|
23
23
|
contentBase64Chunks: z.ZodArray<z.ZodString>;
|
|
24
24
|
}, z.core.$strict>]>;
|
|
25
|
-
}, z.core.$strict
|
|
26
|
-
contentBase64: z.ZodString;
|
|
27
|
-
name: z.ZodString;
|
|
28
|
-
kind: z.ZodOptional<z.ZodEnum<{
|
|
29
|
-
data: "data";
|
|
30
|
-
esm: "esm";
|
|
31
|
-
text: "text";
|
|
32
|
-
wasm: "wasm";
|
|
33
|
-
}>>;
|
|
34
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
35
|
-
contentBase64Chunks: z.ZodArray<z.ZodString>;
|
|
36
|
-
name: z.ZodString;
|
|
37
|
-
kind: z.ZodOptional<z.ZodEnum<{
|
|
38
|
-
data: "data";
|
|
39
|
-
esm: "esm";
|
|
40
|
-
text: "text";
|
|
41
|
-
wasm: "wasm";
|
|
42
|
-
}>>;
|
|
43
|
-
}, z.core.$strict>]>;
|
|
25
|
+
}, z.core.$strict>;
|
|
44
26
|
export type ArtifactModule = z.infer<typeof artifactModule>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { encodedContent, MAX_MODULE_BASE64_SIZE } from './service-deployment-content.js';
|
|
3
|
+
const fields = {
|
|
4
|
+
name: z.string().min(1).max(256),
|
|
5
|
+
kind: z.enum(['esm', 'wasm', 'text', 'data']).optional(),
|
|
6
|
+
};
|
|
7
|
+
export const artifactModule = z.strictObject({
|
|
8
|
+
...fields,
|
|
9
|
+
content: encodedContent(MAX_MODULE_BASE64_SIZE),
|
|
10
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const assetFile: z.
|
|
2
|
+
export declare const assetFile: z.ZodObject<{
|
|
3
3
|
path: z.ZodString;
|
|
4
4
|
contentType: z.ZodOptional<z.ZodString>;
|
|
5
5
|
content: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -17,17 +17,9 @@ export declare const assetFile: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
17
17
|
decodedSize: z.ZodNumber;
|
|
18
18
|
contentBase64Chunks: z.ZodArray<z.ZodString>;
|
|
19
19
|
}, z.core.$strict>]>;
|
|
20
|
-
}, z.core.$strict
|
|
21
|
-
contentBase64: z.ZodString;
|
|
22
|
-
path: z.ZodString;
|
|
23
|
-
contentType: z.ZodOptional<z.ZodString>;
|
|
24
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
25
|
-
contentBase64Chunks: z.ZodArray<z.ZodString>;
|
|
26
|
-
path: z.ZodString;
|
|
27
|
-
contentType: z.ZodOptional<z.ZodString>;
|
|
28
|
-
}, z.core.$strict>]>;
|
|
20
|
+
}, z.core.$strict>;
|
|
29
21
|
export declare const assetBundle: z.ZodObject<{
|
|
30
|
-
files: z.ZodArray<z.
|
|
22
|
+
files: z.ZodArray<z.ZodObject<{
|
|
31
23
|
path: z.ZodString;
|
|
32
24
|
contentType: z.ZodOptional<z.ZodString>;
|
|
33
25
|
content: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -45,15 +37,7 @@ export declare const assetBundle: z.ZodObject<{
|
|
|
45
37
|
decodedSize: z.ZodNumber;
|
|
46
38
|
contentBase64Chunks: z.ZodArray<z.ZodString>;
|
|
47
39
|
}, z.core.$strict>]>;
|
|
48
|
-
}, z.core.$strict
|
|
49
|
-
contentBase64: z.ZodString;
|
|
50
|
-
path: z.ZodString;
|
|
51
|
-
contentType: z.ZodOptional<z.ZodString>;
|
|
52
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
53
|
-
contentBase64Chunks: z.ZodArray<z.ZodString>;
|
|
54
|
-
path: z.ZodString;
|
|
55
|
-
contentType: z.ZodOptional<z.ZodString>;
|
|
56
|
-
}, z.core.$strict>]>>;
|
|
40
|
+
}, z.core.$strict>>;
|
|
57
41
|
notFound: z.ZodOptional<z.ZodEnum<{
|
|
58
42
|
"404-page": "404-page";
|
|
59
43
|
none: "none";
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { legacyEncodedContent } from './legacy/service-deployment-content.js';
|
|
3
2
|
import { encodedContent, MAX_ASSET_BASE64_SIZE } from './service-deployment-content.js';
|
|
4
3
|
const fields = {
|
|
5
4
|
path: z.string().min(1).max(2_048),
|
|
6
5
|
contentType: z.string().min(1).max(256).optional(),
|
|
7
6
|
};
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
z.strictObject({ ...fields, ...legacy.chunked }),
|
|
13
|
-
]);
|
|
7
|
+
export const assetFile = z.strictObject({
|
|
8
|
+
...fields,
|
|
9
|
+
content: encodedContent(MAX_ASSET_BASE64_SIZE),
|
|
10
|
+
});
|
|
14
11
|
export const assetBundle = z.strictObject({
|
|
15
12
|
files: z.array(assetFile).min(1).max(2_000),
|
|
16
13
|
notFound: z.enum(['none', '404-page', 'single-page-application']).optional(),
|