@astrale-domains/services 0.2.1 → 0.2.3
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 +101 -0
- package/README.md +12 -7
- 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 +57 -7
- package/dist/schema/deployment/result.js +14 -5
- package/dist/schema/index.d.ts +4 -4
- package/dist/schema/index.js +3 -3
- package/dist/schema/schema.d.ts +8288 -0
- package/dist/schema/schema.js +15 -0
- package/dist/schema/service/cloudflare-worker-class.d.ts +8029 -0
- package/dist/schema/service/cloudflare-worker-class.js +18 -0
- package/dist/schema/service/index.d.ts +4 -3
- package/dist/schema/service/index.js +4 -3
- 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 +81 -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.js +1 -1
- package/dist/schema/service/{class.d.ts → service-class.d.ts} +71 -184
- package/dist/schema/service/service-class.js +46 -0
- package/dist/schema/service/{relationships.js → service-owned-by-edge-class.js} +2 -2
- package/package.json +29 -23
- 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
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.2.3](https://github.com/astrale-os/domains/compare/services-v0.2.2...services-v0.2.3) (2026-08-29)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **domains:** remove Property visibility annotations from V1 schemas ([#118](https://github.com/astrale-os/domains/issues/118)) ([215e5e0](https://github.com/astrale-os/domains/commit/215e5e0ca3b849cb56fcccc685d4e3fc51cc41f5))
|
|
9
|
+
* **services:** redesign the service workspace ([#115](https://github.com/astrale-os/domains/issues/115)) ([bcb12ba](https://github.com/astrale-os/domains/commit/bcb12ba33014f83b3e4495c32abd763a01b197e8))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **services:** separate publication from consumer installation ([#107](https://github.com/astrale-os/domains/issues/107)) ([f3fec75](https://github.com/astrale-os/domains/commit/f3fec752309dddd34e3b1e182506371d87d3629e))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Documentation
|
|
18
|
+
|
|
19
|
+
* **services:** close release qualification ledger ([#105](https://github.com/astrale-os/domains/issues/105)) ([eaa9cd6](https://github.com/astrale-os/domains/commit/eaa9cd6d72677b23f20d85c79c664fc401138746))
|
|
20
|
+
|
|
21
|
+
## [0.2.2](https://github.com/astrale-os/domains/compare/services-v0.2.1...services-v0.2.2) (2026-08-27)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* make Domain lifecycles authoritative ([#101](https://github.com/astrale-os/domains/issues/101)) ([4ed45f6](https://github.com/astrale-os/domains/commit/4ed45f6c3f5708db52455904c28a2c13c983e33f))
|
|
27
|
+
* **services:** rebuild the hosted service control plane ([#99](https://github.com/astrale-os/domains/issues/99)) ([3460573](https://github.com/astrale-os/domains/commit/34605735a167cb62996850915fa79bf6caec910d))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* **integrations:** align provider authorization lifecycles ([#89](https://github.com/astrale-os/domains/issues/89)) ([734b396](https://github.com/astrale-os/domains/commit/734b396f80e6befa642e03aba8b0e311a4b63ade))
|
|
33
|
+
* **services:** converge terminal provider cleanup ([#100](https://github.com/astrale-os/domains/issues/100)) ([67304f8](https://github.com/astrale-os/domains/commit/67304f893b9625367aa5ec5131fe3c13e1613780))
|
|
34
|
+
|
|
35
|
+
## [0.2.1](https://github.com/astrale-os/domains/compare/services-v0.2.0...services-v0.2.1) (2026-08-26)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Features
|
|
39
|
+
|
|
40
|
+
* **domains:** complete AI Gateway and Integrations parity qualification ([#87](https://github.com/astrale-os/domains/issues/87)) ([5be7461](https://github.com/astrale-os/domains/commit/5be74610469c4a20b108d73c38d0d2b6a298eef6))
|
|
41
|
+
* **domains:** restore AI Gateway and Integrations parity ([#80](https://github.com/astrale-os/domains/issues/80)) ([51ca802](https://github.com/astrale-os/domains/commit/51ca8027109bdc3fd3a05e861e6ed58bea8fe755))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Bug Fixes
|
|
45
|
+
|
|
46
|
+
* align domains with current SDK cohort ([#85](https://github.com/astrale-os/domains/issues/85)) ([f2153e2](https://github.com/astrale-os/domains/commit/f2153e271e1389692ee9f98a14207c5e4340a743))
|
|
47
|
+
* **deps:** qualify GRC and domain dependencies ([#84](https://github.com/astrale-os/domains/issues/84)) ([e8a4c6b](https://github.com/astrale-os/domains/commit/e8a4c6b80e8e8f02a385e0001aa0f220acef5ce6))
|
|
48
|
+
|
|
49
|
+
## [0.2.0](https://github.com/astrale-os/domains/compare/services-v0.1.0...services-v0.2.0) (2026-08-25)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### ⚠ BREAKING CHANGES
|
|
53
|
+
|
|
54
|
+
* doors-only graph reads across workspace/agents/services/ai-gateway
|
|
55
|
+
* **services:** the Service interface method `remove` is now `delete`; callers invoking `<service>::remove` must switch to `<service>::delete`.
|
|
56
|
+
|
|
57
|
+
* doors-only graph reads across workspace/agents/services/ai-gateway ([d1b3f0a](https://github.com/astrale-os/domains/commit/d1b3f0af1059ab9dc8f4e10c3eaf0bd129c79876))
|
|
58
|
+
* **services:** rename Service.remove endpoint to delete ([3bcdb44](https://github.com/astrale-os/domains/commit/3bcdb440137acc0d4625f7d9ea5023c45b899c41))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
### Features
|
|
62
|
+
|
|
63
|
+
* add runtime logs, schedule, and secrets management ([265be00](https://github.com/astrale-os/domains/commit/265be00eb198c95f65308e12a61fdde4a2703848))
|
|
64
|
+
* **events:** add Events V0 and async issue notifications ([9538769](https://github.com/astrale-os/domains/commit/9538769b0e3ff4063583b3798b1e2301098a5e0c))
|
|
65
|
+
* implement batch edge creation and reconcile node structures ([8797cfb](https://github.com/astrale-os/domains/commit/8797cfb22a671e264f400edcf4e93384b4e32c7a))
|
|
66
|
+
* implement batch edge creation and reconcile node structures ([828c1fe](https://github.com/astrale-os/domains/commit/828c1fe1e3dda848b5bec9d9b445586ba65a2bd1))
|
|
67
|
+
* overhaul domain apps and runtime flows ([cb92e06](https://github.com/astrale-os/domains/commit/cb92e0601d329a601c4eb072d4c80b0eff6816e7))
|
|
68
|
+
* overhaul services and domain applications ([b8bc24d](https://github.com/astrale-os/domains/commit/b8bc24dbce4c4541ccf1f453b5f3cd335ff1aca4))
|
|
69
|
+
* publish Schema-only Domain contracts ([ec0a16a](https://github.com/astrale-os/domains/commit/ec0a16a46a08a3a2118ca1490a4f7e71239d62eb))
|
|
70
|
+
* publish Schema-only Domain contracts ([70aab15](https://github.com/astrale-os/domains/commit/70aab152f4eea0c69fed1a35cd4611d8d2f99ff9))
|
|
71
|
+
* **services:** reconcile hosted functions on deploy ([eb48173](https://github.com/astrale-os/domains/commit/eb48173664f40b2d923c9ed2736acf7c6847dc13))
|
|
72
|
+
* **services:** support immutable revisioned deployments ([3aac62f](https://github.com/astrale-os/domains/commit/3aac62f044543c4278eb3c880595e2a15b02528c))
|
|
73
|
+
* **services:** support immutable revisioned deployments ([6d20f53](https://github.com/astrale-os/domains/commit/6d20f5327eaf2c1e215efd7d040aebc367609d0a))
|
|
74
|
+
* **skills:** add domain skill packages ([#28](https://github.com/astrale-os/domains/issues/28)) ([6c0b949](https://github.com/astrale-os/domains/commit/6c0b949f1e5821d9f53745fb02eca3453ffb7f80))
|
|
75
|
+
* tag service deploys with provenance ([0a740b8](https://github.com/astrale-os/domains/commit/0a740b8d58f54c289c4bf1b8aebde1b621bbe91d))
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### Bug Fixes
|
|
79
|
+
|
|
80
|
+
* **ci:** keep standalone packaging permissive ([9151cf9](https://github.com/astrale-os/domains/commit/9151cf99311dd070068734c373a1b7ec7e1027a0))
|
|
81
|
+
* **ci:** make domain workspace standalone ([ff42931](https://github.com/astrale-os/domains/commit/ff429317dfd8dd4b0af2ffe8160867c9ba410099))
|
|
82
|
+
* **ci:** simplify Domain publication ([097befc](https://github.com/astrale-os/domains/commit/097befc1217352ce4e3ce91c01d797aba8fd78a2))
|
|
83
|
+
* **ci:** simplify Domain publication ([1b99dd9](https://github.com/astrale-os/domains/commit/1b99dd9781337e13e63c5b1838d96d4fd0dfa3bc))
|
|
84
|
+
* **domains:** pin legacy package cohorts ([12043e2](https://github.com/astrale-os/domains/commit/12043e2fab4e96099aa487ec91acd5e7b33dea12))
|
|
85
|
+
* **domains:** use the compatible legacy cohort ([f6d42fa](https://github.com/astrale-os/domains/commit/f6d42fa60a08305fe8e1e6e046b80f37a73b190b))
|
|
86
|
+
* **frontend:** pin compatible shell cohort [skip ci] ([c64bc4b](https://github.com/astrale-os/domains/commit/c64bc4b46a0ee0ec118d0add7e15bd494c1ff1f7))
|
|
87
|
+
* **frontend:** restore project source discovery ([#72](https://github.com/astrale-os/domains/issues/72)) ([7795508](https://github.com/astrale-os/domains/commit/77955086688833289b474c64314a6adae598be9f))
|
|
88
|
+
* isolate legacy domain test dependencies ([8f8f1ab](https://github.com/astrale-os/domains/commit/8f8f1abbeb5ef8a071cf036d4b8c433d2aaea741))
|
|
89
|
+
* isolate legacy test dependencies ([4599f59](https://github.com/astrale-os/domains/commit/4599f59e6b1d896e1a2bdbd70726e24c660cabc4))
|
|
90
|
+
* keep Domain command cleanup narrow ([90f0b6c](https://github.com/astrale-os/domains/commit/90f0b6c68cdc43068e63f62bfc17ff610a79bb58))
|
|
91
|
+
* **lint:** use PROP key accessors in tests + allowlist decoupled client bundles ([39c1c97](https://github.com/astrale-os/domains/commit/39c1c97971114208b454874b48e3b14e60d5acc7))
|
|
92
|
+
* point-read get returns the node, not an envelope ([17d62c4](https://github.com/astrale-os/domains/commit/17d62c4ec32e066b8c0e5da1e66f9225c469bce8))
|
|
93
|
+
* require hosted-functions SDK release ([e4d3122](https://github.com/astrale-os/domains/commit/e4d312268798a1ab803b815ebaff234aae24500a))
|
|
94
|
+
* **services:** admit empty Cloudflare script details ([cae00d9](https://github.com/astrale-os/domains/commit/cae00d9bfcef567756548678ced00022f65306e5))
|
|
95
|
+
* **services:** consume canonical domain publication ([bfef80f](https://github.com/astrale-os/domains/commit/bfef80f9c84c95ca594bc5f116cf8d1345582428))
|
|
96
|
+
* **services:** declare static frontend identity ([#76](https://github.com/astrale-os/domains/issues/76)) ([527a3ba](https://github.com/astrale-os/domains/commit/527a3bae47c00abd79fe00fc6e5246b4341bf4f7))
|
|
97
|
+
* **services:** seed function authority ([221d9bf](https://github.com/astrale-os/domains/commit/221d9bf48beedcea3aa6a5ff5d87541e6746ee56))
|
|
98
|
+
* **services:** seed function authority ([a33e06e](https://github.com/astrale-os/domains/commit/a33e06e3d6f4c52c591feafa0fcfd8440f52d5d3))
|
|
99
|
+
* **services:** type asset hash mapping ([f2d48dd](https://github.com/astrale-os/domains/commit/f2d48dd6487b7ce433f62388a82b3543bab2bfdd))
|
|
100
|
+
* **views:** adopt proof-bounded Shell cohort ([#74](https://github.com/astrale-os/domains/issues/74)) ([09fb9f3](https://github.com/astrale-os/domains/commit/09fb9f39e5350cf930ff083090b6a6f21369dc49))
|
|
101
|
+
* **views:** retain graph query provenance ([#75](https://github.com/astrale-os/domains/issues/75)) ([c880a42](https://github.com/astrale-os/domains/commit/c880a42f78f15e24ebfe54ae4eb76388d8872a80))
|
package/README.md
CHANGED
|
@@ -6,18 +6,18 @@ deployment evidence in the graph.
|
|
|
6
6
|
|
|
7
7
|
## Model
|
|
8
8
|
|
|
9
|
-
- `Service` records one opaque provider name, its
|
|
10
|
-
|
|
9
|
+
- `Service` records one opaque provider name, its owner-scoped stable `serviceKey`, deployment mode,
|
|
10
|
+
URL, state,
|
|
11
|
+
deployment receipt and—when revisioned—Schema revision independently of provider-local code staging.
|
|
11
12
|
- `service_owned_by` connects the authenticated owner to each Service and governs graph visibility.
|
|
12
13
|
- secret values stay write-only at Cloudflare and never enter Astrale mutations or graph state.
|
|
13
14
|
- schedules remain provider state; only the owner may read or replace them.
|
|
14
15
|
- logs are remote evidence admitted by the Cloudflare Provider before a Workflow returns them.
|
|
15
16
|
|
|
16
|
-
The View
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
the provider-neutral Integration contract; Cloudflare is its first Provider.
|
|
17
|
+
The View, CLI, and agent consumers read the named Service Queries directly; there is intentionally
|
|
18
|
+
no list Function wrapping `visibleServicesQuery`. Deployment, secrets, schedules, logs, and deletion
|
|
19
|
+
are Workflows because they coordinate caller authorization with external effects. `service-hosting`
|
|
20
|
+
is the provider-neutral Integration contract; Cloudflare is its first Provider.
|
|
21
21
|
|
|
22
22
|
## Development
|
|
23
23
|
|
|
@@ -37,3 +37,8 @@ string or bounded Base64 chunks when one string cannot cross the portable Value
|
|
|
37
37
|
unique and secrets use environment-variable identifiers. Plain and revisioned artifacts are
|
|
38
38
|
distinct modes and cannot replace each other at one Service record. Five-field cron expressions are
|
|
39
39
|
supported when `CLOUDFLARE_SCHEDULE_KV_ID` is configured.
|
|
40
|
+
|
|
41
|
+
SDK-authored Applications should deploy through `@astrale-os/adapter-astrale`, which projects the
|
|
42
|
+
admitted Cloudflare artifact into the revisioned Services request. Execution release identifies
|
|
43
|
+
immutable code/configuration and can change without a Schema revision; Publication generation then
|
|
44
|
+
selects the exact Kernel installation. Manual callers must not manufacture or reuse these identities.
|
|
@@ -0,0 +1,11 @@
|
|
|
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>;
|
|
@@ -3,9 +3,11 @@ export type { AssetBundle } from './asset.js';
|
|
|
3
3
|
export { MAX_ASSET_BASE64_SIZE, MAX_MODULE_BASE64_SIZE, PORTABLE_BASE64_CHUNK_SIZE, } from './content.js';
|
|
4
4
|
export { resourceLimits } from './limits.js';
|
|
5
5
|
export type { ResourceLimits } from './limits.js';
|
|
6
|
+
export { deploymentRejection } from './deployment-rejection.js';
|
|
7
|
+
export type { DeploymentRejection } from './deployment-rejection.js';
|
|
6
8
|
export { artifactModule } from './module.js';
|
|
7
9
|
export type { ArtifactModule } from './module.js';
|
|
8
10
|
export { artifact, deployServiceInput, revisionedDeployment } from './request.js';
|
|
9
11
|
export type { DeployServiceInput } from './request.js';
|
|
10
|
-
export { deployedFunction, deployServiceOutput } from './result.js';
|
|
12
|
+
export { deployedFunction, deployedService, deployServiceOutput, publishedApplication, } from './result.js';
|
|
11
13
|
export type { DeployServiceOutput } from './result.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { assetBundle, assetFile } from './asset.js';
|
|
2
2
|
export { MAX_ASSET_BASE64_SIZE, MAX_MODULE_BASE64_SIZE, PORTABLE_BASE64_CHUNK_SIZE, } from './content.js';
|
|
3
3
|
export { resourceLimits } from './limits.js';
|
|
4
|
+
export { deploymentRejection } from './deployment-rejection.js';
|
|
4
5
|
export { artifactModule } from './module.js';
|
|
5
6
|
export { artifact, deployServiceInput, revisionedDeployment } from './request.js';
|
|
6
|
-
export { deployedFunction, deployServiceOutput } from './result.js';
|
|
7
|
+
export { deployedFunction, deployedService, deployServiceOutput, publishedApplication, } from './result.js';
|
|
@@ -23,6 +23,7 @@ export declare const artifact: z.ZodObject<{
|
|
|
23
23
|
}, z.core.$strict>;
|
|
24
24
|
export declare const revisionedDeployment: z.ZodObject<{
|
|
25
25
|
revision: z.ZodString;
|
|
26
|
+
requiredSecrets: z.ZodArray<z.ZodString>;
|
|
26
27
|
release: z.ZodObject<{
|
|
27
28
|
entry: z.ZodString;
|
|
28
29
|
modules: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -45,31 +46,8 @@ export declare const revisionedDeployment: z.ZodObject<{
|
|
|
45
46
|
}>>;
|
|
46
47
|
}, z.core.$strict>]>>;
|
|
47
48
|
}, z.core.$strict>;
|
|
48
|
-
gateway: z.ZodObject<{
|
|
49
|
-
entry: z.ZodString;
|
|
50
|
-
modules: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
51
|
-
contentBase64: z.ZodString;
|
|
52
|
-
name: z.ZodString;
|
|
53
|
-
kind: z.ZodOptional<z.ZodEnum<{
|
|
54
|
-
data: "data";
|
|
55
|
-
esm: "esm";
|
|
56
|
-
text: "text";
|
|
57
|
-
wasm: "wasm";
|
|
58
|
-
}>>;
|
|
59
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
60
|
-
contentBase64Chunks: z.ZodArray<z.ZodString>;
|
|
61
|
-
name: z.ZodString;
|
|
62
|
-
kind: z.ZodOptional<z.ZodEnum<{
|
|
63
|
-
data: "data";
|
|
64
|
-
esm: "esm";
|
|
65
|
-
text: "text";
|
|
66
|
-
wasm: "wasm";
|
|
67
|
-
}>>;
|
|
68
|
-
}, z.core.$strict>]>>;
|
|
69
|
-
}, z.core.$strict>;
|
|
70
49
|
}, z.core.$strict>;
|
|
71
50
|
export declare const deployServiceInput: z.ZodObject<{
|
|
72
|
-
path: z.ZodString;
|
|
73
51
|
name: z.ZodOptional<z.ZodString>;
|
|
74
52
|
entry: z.ZodOptional<z.ZodString>;
|
|
75
53
|
modules: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -93,6 +71,7 @@ export declare const deployServiceInput: z.ZodObject<{
|
|
|
93
71
|
}, z.core.$strict>]>>>;
|
|
94
72
|
revisioned: z.ZodOptional<z.ZodObject<{
|
|
95
73
|
revision: z.ZodString;
|
|
74
|
+
requiredSecrets: z.ZodArray<z.ZodString>;
|
|
96
75
|
release: z.ZodObject<{
|
|
97
76
|
entry: z.ZodString;
|
|
98
77
|
modules: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -115,28 +94,6 @@ export declare const deployServiceInput: z.ZodObject<{
|
|
|
115
94
|
}>>;
|
|
116
95
|
}, z.core.$strict>]>>;
|
|
117
96
|
}, z.core.$strict>;
|
|
118
|
-
gateway: z.ZodObject<{
|
|
119
|
-
entry: z.ZodString;
|
|
120
|
-
modules: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
121
|
-
contentBase64: z.ZodString;
|
|
122
|
-
name: z.ZodString;
|
|
123
|
-
kind: z.ZodOptional<z.ZodEnum<{
|
|
124
|
-
data: "data";
|
|
125
|
-
esm: "esm";
|
|
126
|
-
text: "text";
|
|
127
|
-
wasm: "wasm";
|
|
128
|
-
}>>;
|
|
129
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
130
|
-
contentBase64Chunks: z.ZodArray<z.ZodString>;
|
|
131
|
-
name: z.ZodString;
|
|
132
|
-
kind: z.ZodOptional<z.ZodEnum<{
|
|
133
|
-
data: "data";
|
|
134
|
-
esm: "esm";
|
|
135
|
-
text: "text";
|
|
136
|
-
wasm: "wasm";
|
|
137
|
-
}>>;
|
|
138
|
-
}, z.core.$strict>]>>;
|
|
139
|
-
}, z.core.$strict>;
|
|
140
97
|
}, z.core.$strict>>;
|
|
141
98
|
compatibilityDate: z.ZodOptional<z.ZodString>;
|
|
142
99
|
compatibilityFlags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -168,5 +125,6 @@ export declare const deployServiceInput: z.ZodObject<{
|
|
|
168
125
|
cpuMs: z.ZodOptional<z.ZodNumber>;
|
|
169
126
|
subrequests: z.ZodOptional<z.ZodNumber>;
|
|
170
127
|
}, z.core.$strict>>;
|
|
128
|
+
serviceKey: z.ZodString;
|
|
171
129
|
}, z.core.$strict>;
|
|
172
130
|
export type DeployServiceInput = z.infer<typeof deployServiceInput>;
|
|
@@ -6,13 +6,16 @@ export const artifact = z.strictObject({
|
|
|
6
6
|
entry: z.string().min(1).max(256),
|
|
7
7
|
modules: z.array(artifactModule).min(1).max(40),
|
|
8
8
|
});
|
|
9
|
+
const digest = z
|
|
10
|
+
.string()
|
|
11
|
+
.length(71)
|
|
12
|
+
.regex(/sha256:[0-9a-f]{64}/);
|
|
9
13
|
export const revisionedDeployment = z.strictObject({
|
|
10
|
-
revision:
|
|
14
|
+
revision: digest,
|
|
15
|
+
requiredSecrets: z.array(z.string().min(1).max(128)).max(64),
|
|
11
16
|
release: artifact,
|
|
12
|
-
gateway: artifact,
|
|
13
17
|
});
|
|
14
|
-
|
|
15
|
-
path: z.string().min(1).max(2_048),
|
|
18
|
+
const deploymentFields = {
|
|
16
19
|
name: z.string().min(1).max(256).optional(),
|
|
17
20
|
entry: z.string().min(1).max(256).optional(),
|
|
18
21
|
modules: z.array(artifactModule).min(1).max(40).optional(),
|
|
@@ -30,4 +33,8 @@ export const deployServiceInput = z.strictObject({
|
|
|
30
33
|
secrets: z.record(z.string().max(256), z.string().max(64 * 1024)).optional(),
|
|
31
34
|
assets: assetBundle.optional(),
|
|
32
35
|
limits: resourceLimits,
|
|
36
|
+
};
|
|
37
|
+
export const deployServiceInput = z.strictObject({
|
|
38
|
+
serviceKey: z.string().min(1).max(63),
|
|
39
|
+
...deploymentFields,
|
|
33
40
|
});
|
|
@@ -1,24 +1,74 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const deployedFunction: z.ZodObject<{
|
|
3
|
-
id: z.ZodString;
|
|
4
3
|
path: z.ZodString;
|
|
5
4
|
ref: z.ZodString;
|
|
6
5
|
}, z.core.$strict>;
|
|
7
|
-
export declare const
|
|
8
|
-
|
|
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;
|
|
9
19
|
url: z.ZodString;
|
|
10
20
|
digest: z.ZodString;
|
|
11
21
|
revision: z.ZodOptional<z.ZodString>;
|
|
12
22
|
state: z.ZodEnum<{
|
|
23
|
+
deleting: "deleting";
|
|
13
24
|
deploying: "deploying";
|
|
14
25
|
failed: "failed";
|
|
15
26
|
ready: "ready";
|
|
27
|
+
reconciling: "reconciling";
|
|
16
28
|
}>;
|
|
17
29
|
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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>>;
|
|
22
39
|
}, z.core.$strict>>;
|
|
23
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>]>;
|
|
24
74
|
export type DeployServiceOutput = z.infer<typeof deployServiceOutput>;
|
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { deploymentRejection } from './deployment-rejection.js';
|
|
2
3
|
export const deployedFunction = z.strictObject({
|
|
3
|
-
id: z.string(),
|
|
4
4
|
path: z.string(),
|
|
5
5
|
ref: z.string(),
|
|
6
6
|
});
|
|
7
|
-
export const
|
|
8
|
-
|
|
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),
|
|
9
17
|
url: z.string(),
|
|
10
18
|
digest: z.string(),
|
|
11
19
|
revision: z.string().min(1).max(80).optional(),
|
|
12
|
-
state: z.enum(['deploying', 'ready', 'failed']),
|
|
20
|
+
state: z.enum(['deploying', 'reconciling', 'ready', 'failed', 'deleting']),
|
|
13
21
|
error: z.string().nullable().optional(),
|
|
14
|
-
|
|
22
|
+
application: publishedApplication.optional(),
|
|
15
23
|
});
|
|
24
|
+
export const deployServiceOutput = z.union([deployedService, deploymentRejection]);
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { schema } from './
|
|
2
|
-
export type { ServicesDomain, ServicesSchema } from './
|
|
3
|
-
export { artifact, artifactModule, assetBundle, assetFile, deployedFunction, deployServiceInput, deployServiceOutput, resourceLimits, revisionedDeployment, } from './deployment/index.js';
|
|
1
|
+
export { schema } from './schema.js';
|
|
2
|
+
export type { ServicesDomain, ServicesSchema } from './schema.js';
|
|
3
|
+
export { artifact, artifactModule, assetBundle, assetFile, deployedFunction, deployServiceInput, deployServiceOutput, publishedApplication, resourceLimits, revisionedDeployment, } from './deployment/index.js';
|
|
4
4
|
export type { ArtifactModule, AssetBundle, DeployServiceInput, DeployServiceOutput, ResourceLimits, } from './deployment/index.js';
|
|
5
|
-
export { CloudflareWorker, service_owned_by } from './service/index.js';
|
|
5
|
+
export { CloudflareWorker, ObserveService, Service, TraverseOwnedService, service_owned_by, } from './service/index.js';
|
package/dist/schema/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { schema } from './
|
|
2
|
-
export { artifact, artifactModule, assetBundle, assetFile, deployedFunction, deployServiceInput, deployServiceOutput, resourceLimits, revisionedDeployment, } from './deployment/index.js';
|
|
3
|
-
export { CloudflareWorker, service_owned_by } from './service/index.js';
|
|
1
|
+
export { schema } from './schema.js';
|
|
2
|
+
export { artifact, artifactModule, assetBundle, assetFile, deployedFunction, deployServiceInput, deployServiceOutput, publishedApplication, resourceLimits, revisionedDeployment, } from './deployment/index.js';
|
|
3
|
+
export { CloudflareWorker, ObserveService, Service, TraverseOwnedService, service_owned_by, } from './service/index.js';
|