@astrale-os/sdk 0.6.0-beta.22 → 0.6.0-beta.24
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 +30 -36
- package/dist/application/define.d.ts +3 -1
- package/dist/application/define.js +16 -2
- package/dist/application/domain.d.ts +3 -1
- package/dist/application/index.d.ts +1 -1
- package/dist/application/mutation/index.d.ts +1 -1
- package/dist/application/query/composite/plan.d.ts +0 -4
- package/dist/application/query/composite/plan.js +0 -2
- package/dist/application/view/define.js +4 -6
- package/dist/application/view/frontend.d.ts +2 -2
- package/dist/application/view/index.d.ts +1 -1
- package/dist/application/view/route.d.ts +0 -14
- package/dist/application/view/route.js +1 -64
- package/dist/deployment/adapter/adapter.d.ts +11 -24
- package/dist/deployment/adapter/bundle/file.d.ts +1 -1
- package/dist/deployment/adapter/define.d.ts +4 -25
- package/dist/deployment/adapter/define.js +12 -44
- package/dist/deployment/adapter/index.d.ts +0 -2
- package/dist/deployment/adapter/release/context.d.ts +3 -4
- package/dist/deployment/adapter/release/list.d.ts +1 -2
- package/dist/deployment/address/configuration.d.ts +12 -0
- package/dist/deployment/address/configuration.js +11 -0
- package/dist/deployment/address/index.d.ts +2 -2
- package/dist/deployment/address/index.js +2 -2
- package/dist/deployment/address/label.d.ts +5 -5
- package/dist/deployment/address/label.js +5 -5
- package/dist/deployment/address/record.d.ts +21 -0
- package/dist/deployment/address/record.js +34 -0
- package/dist/deployment/address/summary.d.ts +3 -7
- package/dist/deployment/authoring.d.ts +0 -2
- package/dist/deployment/authoring.js +0 -1
- package/dist/deployment/build/build.d.ts +6 -0
- package/dist/deployment/build/compile.js +2 -0
- package/dist/deployment/build/frontend/compilation.d.ts +2 -4
- package/dist/deployment/build/frontend/compilation.js +0 -5
- package/dist/deployment/build/frontend/digest.js +1 -5
- package/dist/deployment/build/material.d.ts +2 -2
- package/dist/deployment/build/material.js +28 -13
- package/dist/deployment/deployment.d.ts +4 -8
- package/dist/deployment/index.d.ts +3 -5
- package/dist/deployment/index.js +1 -2
- package/dist/deployment/release/addressing.d.ts +2 -9
- package/dist/deployment/release/addressing.js +2 -3
- package/dist/deployment/release/index.d.ts +0 -2
- package/dist/deployment/release/index.js +0 -2
- package/dist/deployment/release/release.d.ts +1 -1
- package/dist/deployment/release/runtime.d.ts +0 -2
- package/dist/deployment/release/runtime.js +0 -2
- package/dist/deployment/release/served/index.d.ts +1 -2
- package/dist/deployment/release/served/index.js +7 -3
- package/dist/deployment/release/served/views.js +0 -1
- package/dist/deployment/verify/index.d.ts +2 -4
- package/dist/deployment/verify/index.js +1 -3
- package/dist/deployment/verify/preflight/index.d.ts +0 -12
- package/dist/deployment/verify/preflight/index.js +0 -12
- package/dist/deployment/verify/readiness/index.d.ts +9 -6
- package/dist/deployment/verify/readiness/index.js +20 -12
- package/dist/deployment/worker/address.d.ts +26 -0
- package/dist/deployment/worker/address.js +43 -0
- package/dist/deployment/worker/build.d.ts +60 -0
- package/dist/deployment/worker/build.js +172 -0
- package/dist/deployment/worker/configuration.d.ts +73 -0
- package/dist/deployment/worker/configuration.js +165 -0
- package/dist/deployment/worker/content.d.ts +38 -0
- package/dist/deployment/worker/content.js +169 -0
- package/dist/deployment/worker/index.d.ts +29 -0
- package/dist/deployment/worker/index.js +29 -0
- package/dist/deployment/worker/limits.d.ts +30 -0
- package/dist/deployment/worker/limits.js +30 -0
- package/dist/deployment/worker/record.d.ts +29 -0
- package/dist/deployment/worker/record.js +69 -0
- package/dist/deployment/worker/request.d.ts +118 -0
- package/dist/deployment/worker/request.js +280 -0
- package/dist/deployment/worker/response.d.ts +101 -0
- package/dist/deployment/worker/response.js +207 -0
- package/dist/execution/identity/delivery.d.ts +2 -7
- package/dist/execution/identity/delivery.js +1 -23
- package/dist/execution/identity/identity.d.ts +2 -3
- package/dist/execution/index.d.ts +1 -3
- package/dist/execution/index.js +1 -2
- package/dist/execution/invocation/admission/authority.d.ts +4 -5
- package/dist/execution/invocation/admission/authority.js +1 -2
- package/dist/execution/invocation/index.d.ts +2 -2
- package/dist/execution/invocation/index.js +1 -1
- package/dist/execution/invocation/invocation.js +3 -12
- package/dist/execution/invocation/result/errors.d.ts +0 -10
- package/dist/execution/invocation/result/errors.js +0 -17
- package/dist/execution/invocation/result/index.d.ts +2 -2
- package/dist/execution/invocation/result/index.js +1 -1
- package/dist/execution/runtime/release.d.ts +6 -11
- package/dist/execution/runtime/release.js +2 -9
- package/dist/execution/service/create.js +3 -1
- package/dist/execution/service/service.d.ts +2 -3
- package/dist/execution/service/serving/delivery.d.ts +1 -2
- package/dist/execution/service/serving/delivery.js +1 -2
- package/dist/execution/service/serving/source.d.ts +3 -10
- package/dist/execution/service/serving/source.js +1 -5
- package/dist/execution/workflows/index.d.ts +1 -1
- package/dist/execution/workflows/index.js +1 -1
- package/dist/execution/workflows/options.d.ts +0 -6
- package/dist/execution/workflows/options.js +0 -18
- package/dist/execution/workflows/receiver.d.ts +1 -2
- package/dist/execution/workflows/receiver.js +13 -20
- package/dist/execution/workflows/route.d.ts +1 -3
- package/dist/execution/workflows/route.js +4 -9
- package/dist/execution/workflows/run.d.ts +1 -1
- package/dist/execution/workflows/run.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/platform/graph/alias.d.ts +1 -5
- package/dist/platform/graph/alias.js +1 -5
- package/dist/platform/graph/document/index.d.ts +1 -1
- package/dist/platform/graph/document/index.js +1 -1
- package/dist/platform/graph/index.d.ts +1 -1
- package/dist/platform/graph/index.js +1 -1
- package/dist/platform/release/index.d.ts +1 -26
- package/dist/platform/release/index.js +1 -26
- package/dist/platform/schema/class-icon-svg.d.ts +9 -0
- package/dist/platform/schema/class-icon-svg.js +29 -0
- package/dist/platform/schema/class-icon.d.ts +3 -8
- package/dist/platform/schema/class-icon.js +2 -29
- package/dist/platform/schema/index.d.ts +1 -1
- package/dist/platform/schema/schema-authoring.d.ts +14 -7
- package/dist/platform/schema/schema-authoring.js +5 -1
- package/dist/project/admit.js +0 -4
- package/dist/project/install-command.d.ts +0 -4
- package/dist/project/install-command.js +1 -5
- package/dist/tooling/cli/deploy-mode.d.ts +3 -59
- package/dist/tooling/cli/deploy-mode.js +46 -122
- package/dist/tooling/cli/deploy-result.d.ts +10 -15
- package/dist/tooling/cli/help.js +9 -16
- package/dist/tooling/cli/immutable-deployment.d.ts +5 -5
- package/dist/tooling/cli/index.d.ts +1 -1
- package/dist/tooling/cli/list.d.ts +5 -7
- package/dist/tooling/cli/list.js +9 -61
- package/dist/tooling/cli/orchestrate.js +6 -16
- package/dist/tooling/cli/publish/index.d.ts +2 -2
- package/dist/tooling/cli/registry/client.js +1 -1
- package/dist/tooling/cli/secrets.d.ts +2 -2
- package/dist/tooling/linter/implementations/source/global.js +0 -1
- package/dist/tooling/linter/implementations/source/verifiers.js +0 -2
- package/dist/tooling/linter/policy/generated.js +2 -51
- package/dist/tooling/linter/requirements/registry.js +0 -6
- package/package.json +10 -6
- package/dist/application/query/execution/projection.d.ts +0 -3
- package/dist/application/query/execution/projection.js +0 -3
- package/dist/deployment/adapter/legacy/adapter.d.ts +0 -40
- package/dist/deployment/adapter/legacy/adapter.js +0 -1
- package/dist/deployment/adapter/legacy/deploy/context.d.ts +0 -19
- package/dist/deployment/adapter/legacy/deploy/context.js +0 -1
- package/dist/deployment/adapter/legacy/deploy/index.d.ts +0 -2
- package/dist/deployment/adapter/legacy/deploy/index.js +0 -1
- package/dist/deployment/adapter/legacy/deploy/result.d.ts +0 -89
- package/dist/deployment/adapter/legacy/deploy/result.js +0 -1
- package/dist/deployment/adapter/legacy/index.d.ts +0 -24
- package/dist/deployment/adapter/legacy/index.js +0 -1
- package/dist/deployment/adapter/legacy/prepare/artifact.d.ts +0 -43
- package/dist/deployment/adapter/legacy/prepare/artifact.js +0 -1
- package/dist/deployment/adapter/legacy/prepare/context.d.ts +0 -33
- package/dist/deployment/adapter/legacy/prepare/context.js +0 -1
- package/dist/deployment/adapter/legacy/prepare/index.d.ts +0 -2
- package/dist/deployment/adapter/legacy/prepare/index.js +0 -1
- package/dist/deployment/deploy.d.ts +0 -20
- package/dist/deployment/deploy.js +0 -31
- package/dist/deployment/release/legacy/admission.d.ts +0 -3
- package/dist/deployment/release/legacy/admission.js +0 -8
- package/dist/deployment/release/legacy/assemble.d.ts +0 -5
- package/dist/deployment/release/legacy/assemble.js +0 -20
- package/dist/deployment/release/legacy/index.d.ts +0 -35
- package/dist/deployment/release/legacy/index.js +0 -34
- package/dist/deployment/release/legacy/release.d.ts +0 -12
- package/dist/deployment/release/legacy/release.js +0 -1
- package/dist/deployment/release/legacy/seal.d.ts +0 -10
- package/dist/deployment/release/legacy/seal.js +0 -17
- package/dist/deployment/verify/preflight/artifact.d.ts +0 -6
- package/dist/deployment/verify/preflight/artifact.js +0 -122
- package/dist/deployment/verify/preflight/publication.d.ts +0 -4
- package/dist/deployment/verify/preflight/publication.js +0 -15
- package/dist/deployment/verify/readiness/deployment.d.ts +0 -3
- package/dist/deployment/verify/readiness/deployment.js +0 -143
- package/dist/deployment/verify/readiness/legacy/index.d.ts +0 -2
- package/dist/deployment/verify/readiness/legacy/index.js +0 -2
- package/dist/deployment/verify/readiness/legacy/publication.d.ts +0 -12
- package/dist/deployment/verify/readiness/legacy/publication.js +0 -23
- package/dist/execution/service/errors.d.ts +0 -3
- package/dist/execution/service/errors.js +0 -3
- package/dist/execution/service/serving/legacy/index.d.ts +0 -15
- package/dist/execution/service/serving/legacy/index.js +0 -19
- package/dist/tooling/cli/deprecations.d.ts +0 -9
- package/dist/tooling/cli/deprecations.js +0 -15
- package/dist/tooling/cli/legacy/deploy-result.d.ts +0 -28
- package/dist/tooling/cli/legacy/deploy-result.js +0 -37
- package/dist/tooling/cli/legacy/stable-target-adapter.d.ts +0 -21
- package/dist/tooling/cli/legacy/stable-target-adapter.js +0 -14
- package/dist/tooling/cli/legacy/stable-target-deploy.d.ts +0 -40
- package/dist/tooling/cli/legacy/stable-target-deploy.js +0 -102
- package/dist/tooling/cli/legacy/uploaded-build.d.ts +0 -11
- package/dist/tooling/cli/legacy/uploaded-build.js +0 -22
- package/dist/tooling/linter/implementations/source/migrations.d.ts +0 -2
- package/dist/tooling/linter/implementations/source/migrations.js +0 -113
- package/dist/tooling/linter/qualification/index.d.ts +0 -10
- package/dist/tooling/linter/qualification/index.js +0 -2
- package/dist/tooling/linter/qualification/query-fixtures.d.ts +0 -2
- package/dist/tooling/linter/qualification/query-fixtures.js +0 -68
- package/dist/tooling/linter/qualification/runner.d.ts +0 -3
- package/dist/tooling/linter/qualification/runner.js +0 -6
|
@@ -3,5 +3,3 @@ export { defineAdapter, defineDeployment, isAdapter } from './define.js';
|
|
|
3
3
|
export { RetainRefusal } from './release/refusal.js';
|
|
4
4
|
export type * from './bundle/index.js';
|
|
5
5
|
export type * from './release/index.js';
|
|
6
|
-
/** @deprecated The contract before adapter interface v2; see `./legacy/index.ts`. */
|
|
7
|
-
export type * from './legacy/index.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DeploymentCommitV1,
|
|
1
|
+
import type { DeploymentCommitV1, DeploymentConfiguration, LineAddressing } from '../../address/index.js';
|
|
2
2
|
import type { Release } from '../../release/index.js';
|
|
3
3
|
import type { Bundle } from '../bundle/index.js';
|
|
4
4
|
/**
|
|
@@ -10,8 +10,7 @@ export interface ConfigureContext {
|
|
|
10
10
|
readonly environment: string;
|
|
11
11
|
/**
|
|
12
12
|
* The names of the Environment's current secrets (the adapter's `secretsFile`), sorted and
|
|
13
|
-
* unique: exactly the secrets `deployRelease` receives, which the configuration declares
|
|
14
|
-
* `bindings.secrets`.
|
|
13
|
+
* unique: exactly the secrets `deployRelease` receives, which the configuration declares.
|
|
15
14
|
*/
|
|
16
15
|
readonly secrets: readonly string[];
|
|
17
16
|
}
|
|
@@ -53,7 +52,7 @@ export interface ReleaseDeployContext {
|
|
|
53
52
|
/** The environment-free bytes of the adapter's `bundler`, identified by `bundle.digest`. */
|
|
54
53
|
readonly bundle: Bundle;
|
|
55
54
|
/** What `configure` froze for this Environment. */
|
|
56
|
-
readonly configuration:
|
|
55
|
+
readonly configuration: DeploymentConfiguration;
|
|
57
56
|
/** Where `placement` said the host places the deployment. */
|
|
58
57
|
readonly placement: Placement;
|
|
59
58
|
/**
|
|
@@ -31,8 +31,7 @@ export type DeploymentCallTarget = {
|
|
|
31
31
|
* host stores it, and where it is called. Admin's Services keeps every deployment until it is
|
|
32
32
|
* retired and counts no call: its deployments are `published` and `withdrawn` once retiring. A
|
|
33
33
|
* Cloudflare dispatch namespace keeps no retention: its rows carry none, and carry their creation
|
|
34
|
-
* instant and key only while their script exists.
|
|
35
|
-
* expiry any more; the CLI still prints one an older adapter reports.
|
|
34
|
+
* instant and key only while their script exists. Deployments have no last-call or expiry clock.
|
|
36
35
|
*
|
|
37
36
|
* The adapter does not admit the record. The listing admits it with `acceptDeploymentRecord`, and a
|
|
38
37
|
* record it refuses (one a host on an older SDK still admits, say) never fails the listing: that
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Digest } from '@astrale-os/kernel-protocol/artifact';
|
|
2
|
+
import type { WorkerConfigurationV1 } from '../worker/configuration.js';
|
|
2
3
|
export declare const FROZEN_CONFIGURATION_FORMAT = "astrale.deployment.configuration";
|
|
3
4
|
export declare const FROZEN_CONFIGURATION_VERSION = 1;
|
|
4
5
|
/**
|
|
@@ -70,6 +71,17 @@ export interface FrozenDurableOptions {
|
|
|
70
71
|
};
|
|
71
72
|
readonly stepTimeoutMs?: number;
|
|
72
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* What one deployment freezes beside its build, as its adapter's `configure` returns it: a
|
|
76
|
+
* `FrozenConfigurationV1`, which a Cloudflare dispatch namespace binds (namespace mode), or a
|
|
77
|
+
* `WorkerConfigurationV1` (`@astrale-os/sdk/deployment/worker`), which a Worker host binds
|
|
78
|
+
* (Admin's Services). Its digest and the build digest make the deployment's label.
|
|
79
|
+
*/
|
|
80
|
+
export type DeploymentConfiguration = FrozenConfigurationV1 | WorkerConfigurationV1;
|
|
81
|
+
/** The digest of one frozen configuration of either format, as the deployment's label keeps it. */
|
|
82
|
+
export declare function deploymentConfigurationDigest(configuration: DeploymentConfiguration): Digest;
|
|
83
|
+
/** Whether a configuration is a `FrozenConfigurationV1`, by its format alone (not admitted). */
|
|
84
|
+
export declare function isFrozenConfiguration(configuration: DeploymentConfiguration): configuration is FrozenConfigurationV1;
|
|
73
85
|
/** A configuration before its canonical order: lists in any order, no format header. */
|
|
74
86
|
export type FrozenConfigurationInput = Omit<FrozenConfigurationV1, 'format' | 'version'>;
|
|
75
87
|
/** Freeze one deployment configuration in the one canonical order its digest is taken in. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { json } from '@astrale-os/kernel-dsl/value';
|
|
2
2
|
import { identify } from '@astrale-os/kernel-protocol/artifact';
|
|
3
|
+
import { isWorkerConfiguration, workerConfigurationDigest } from '../worker/configuration.js';
|
|
3
4
|
export const FROZEN_CONFIGURATION_FORMAT = 'astrale.deployment.configuration';
|
|
4
5
|
export const FROZEN_CONFIGURATION_VERSION = 1;
|
|
5
6
|
/** Service binding through which an immutable deployment reaches the instance router. */
|
|
@@ -10,6 +11,16 @@ const COMPATIBILITY_DATE = /^\d{4}-\d{2}-\d{2}$/u;
|
|
|
10
11
|
const BINDING_NAME = /^[A-Za-z_][A-Za-z0-9_]{0,127}$/u;
|
|
11
12
|
/** A Cloudflare dispatch namespace name. */
|
|
12
13
|
const NAMESPACE_NAME = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/u;
|
|
14
|
+
/** The digest of one frozen configuration of either format, as the deployment's label keeps it. */
|
|
15
|
+
export function deploymentConfigurationDigest(configuration) {
|
|
16
|
+
return isWorkerConfiguration(configuration)
|
|
17
|
+
? workerConfigurationDigest(configuration)
|
|
18
|
+
: configurationDigest(configuration);
|
|
19
|
+
}
|
|
20
|
+
/** Whether a configuration is a `FrozenConfigurationV1`, by its format alone (not admitted). */
|
|
21
|
+
export function isFrozenConfiguration(configuration) {
|
|
22
|
+
return configuration?.format === FROZEN_CONFIGURATION_FORMAT;
|
|
23
|
+
}
|
|
13
24
|
/** Freeze one deployment configuration in the one canonical order its digest is taken in. */
|
|
14
25
|
export function frozenConfiguration(input) {
|
|
15
26
|
if (input === null || typeof input !== 'object')
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { configurationDigest, frozenConfiguration, FROZEN_CONFIGURATION_FORMAT, FROZEN_CONFIGURATION_VERSION, type FrozenConfigurationInput, type FrozenDurableOptions, type FrozenConfigurationV1, } from './configuration.js';
|
|
1
|
+
export { configurationDigest, deploymentConfigurationDigest, frozenConfiguration, FROZEN_CONFIGURATION_FORMAT, FROZEN_CONFIGURATION_VERSION, isFrozenConfiguration, type DeploymentConfiguration, type FrozenConfigurationInput, type FrozenDurableOptions, type FrozenConfigurationV1, } from './configuration.js';
|
|
2
2
|
export { DEPLOYMENT_LABEL, deploymentContent, deploymentLabel, deploymentUrl, parseDeploymentLabel, type DeploymentLabelParts, } from './label.js';
|
|
3
3
|
export { deploymentLine, lineFingerprint, readablePart, type DeploymentLineInput, type LineAddressing, } from './line.js';
|
|
4
|
-
export { acceptDeploymentRecord, DEPLOYMENT_RECORD_FORMAT, DEPLOYMENT_RECORD_VERSION, type DeploymentCommitV1, type DeploymentRecordV1, } from './record.js';
|
|
4
|
+
export { acceptDeploymentRecord, decodeDeploymentRecord, DEPLOYMENT_RECORD_FORMAT, DEPLOYMENT_RECORD_MEDIA_TYPE, DEPLOYMENT_RECORD_VERSION, encodeDeploymentRecord, type DeploymentCommitV1, type DeploymentRecordDocument, type DeploymentRecordV1, } from './record.js';
|
|
5
5
|
export type { DeploymentSummaryV1 } from './summary.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { configurationDigest, frozenConfiguration, FROZEN_CONFIGURATION_FORMAT, FROZEN_CONFIGURATION_VERSION, } from './configuration.js';
|
|
1
|
+
export { configurationDigest, deploymentConfigurationDigest, frozenConfiguration, FROZEN_CONFIGURATION_FORMAT, FROZEN_CONFIGURATION_VERSION, isFrozenConfiguration, } from './configuration.js';
|
|
2
2
|
export { DEPLOYMENT_LABEL, deploymentContent, deploymentLabel, deploymentUrl, parseDeploymentLabel, } from './label.js';
|
|
3
3
|
export { deploymentLine, lineFingerprint, readablePart, } from './line.js';
|
|
4
|
-
export { acceptDeploymentRecord, DEPLOYMENT_RECORD_FORMAT, DEPLOYMENT_RECORD_VERSION, } from './record.js';
|
|
4
|
+
export { acceptDeploymentRecord, decodeDeploymentRecord, DEPLOYMENT_RECORD_FORMAT, DEPLOYMENT_RECORD_MEDIA_TYPE, DEPLOYMENT_RECORD_VERSION, encodeDeploymentRecord, } from './record.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Digest } from '@astrale-os/kernel-protocol/artifact';
|
|
2
2
|
import type { BuildDigest } from '../build/manifest.js';
|
|
3
|
-
import type {
|
|
3
|
+
import type { DeploymentConfiguration } from './configuration.js';
|
|
4
4
|
/**
|
|
5
5
|
* Every deployment label: an optional readable part, the 16-character line fingerprint and the
|
|
6
6
|
* 16-character content, both lower-case base32. A legacy provider name (a UUID, a stable Worker
|
|
@@ -16,11 +16,11 @@ export interface DeploymentLabelParts {
|
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* The 16-character content of one deployment: the first 80 bits of
|
|
19
|
-
* `sha256(utf8(buildDigest) ‖ 0x00 ‖ utf8(
|
|
20
|
-
* base32. It covers the build and the frozen configuration, never a secret: one address
|
|
21
|
-
* one release, and a changed variable gives another address.
|
|
19
|
+
* `sha256(utf8(buildDigest) ‖ 0x00 ‖ utf8(deploymentConfigurationDigest(configuration)))` in
|
|
20
|
+
* lower-case base32. It covers the build and the frozen configuration, never a secret: one address
|
|
21
|
+
* serves one release, and a changed variable gives another address.
|
|
22
22
|
*/
|
|
23
|
-
export declare function deploymentContent(build: BuildDigest, configuration:
|
|
23
|
+
export declare function deploymentContent(build: BuildDigest, configuration: DeploymentConfiguration): string;
|
|
24
24
|
/** The content of a build and a full configuration digest, as a deployment record holds them. */
|
|
25
25
|
export declare function contentOf(build: BuildDigest, configuration: Digest): string;
|
|
26
26
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { deploymentConfigurationDigest } from './configuration.js';
|
|
2
2
|
import { first80 } from './fingerprint.js';
|
|
3
3
|
/**
|
|
4
4
|
* Every deployment label: an optional readable part, the 16-character line fingerprint and the
|
|
@@ -18,12 +18,12 @@ const MAXIMUM_LABEL_LENGTH = MAXIMUM_LINE_LENGTH + 17;
|
|
|
18
18
|
const MAXIMUM_HOST_LENGTH = 253;
|
|
19
19
|
/**
|
|
20
20
|
* The 16-character content of one deployment: the first 80 bits of
|
|
21
|
-
* `sha256(utf8(buildDigest) ‖ 0x00 ‖ utf8(
|
|
22
|
-
* base32. It covers the build and the frozen configuration, never a secret: one address
|
|
23
|
-
* one release, and a changed variable gives another address.
|
|
21
|
+
* `sha256(utf8(buildDigest) ‖ 0x00 ‖ utf8(deploymentConfigurationDigest(configuration)))` in
|
|
22
|
+
* lower-case base32. It covers the build and the frozen configuration, never a secret: one address
|
|
23
|
+
* serves one release, and a changed variable gives another address.
|
|
24
24
|
*/
|
|
25
25
|
export function deploymentContent(build, configuration) {
|
|
26
|
-
return contentOf(build,
|
|
26
|
+
return contentOf(build, deploymentConfigurationDigest(configuration));
|
|
27
27
|
}
|
|
28
28
|
/** The content of a build and a full configuration digest, as a deployment record holds them. */
|
|
29
29
|
export function contentOf(build, configuration) {
|
|
@@ -4,6 +4,11 @@ import type { ReleaseDigest } from '@astrale-os/kernel-protocol/release';
|
|
|
4
4
|
import type { BuildDigest } from '../build/manifest.js';
|
|
5
5
|
export declare const DEPLOYMENT_RECORD_FORMAT = "astrale.deployment-record";
|
|
6
6
|
export declare const DEPLOYMENT_RECORD_VERSION = 1;
|
|
7
|
+
/**
|
|
8
|
+
* The media type of a `DeploymentRecordV1` document: what a Domain deployer publishes it with, and
|
|
9
|
+
* what a host serves it with at `/.well-known/astrale/deployment.json`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const DEPLOYMENT_RECORD_MEDIA_TYPE = "application/vnd.astrale.deployment-record+json;v=1";
|
|
7
12
|
/** The commit a deployment was built from, as the deployer declared it. */
|
|
8
13
|
export interface DeploymentCommitV1 {
|
|
9
14
|
/** The full commit SHA, 40 hexadecimal digits in either case; git prints it in lower case. */
|
|
@@ -50,3 +55,19 @@ export interface DeploymentRecordV1 {
|
|
|
50
55
|
* does, and never fails the whole listing over it.
|
|
51
56
|
*/
|
|
52
57
|
export declare function acceptDeploymentRecord(input: unknown): DeploymentRecordV1;
|
|
58
|
+
/** The document of one record: what a Domain deployer publishes and a host serves verbatim. */
|
|
59
|
+
export interface DeploymentRecordDocument {
|
|
60
|
+
readonly contentType: string;
|
|
61
|
+
readonly bytes: Uint8Array;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The document of one record, as a Domain deployer publishes it: the record admitted, as the
|
|
65
|
+
* UTF-8 bytes of its RFC 8785 canonical JSON, with `DEPLOYMENT_RECORD_MEDIA_TYPE`. One record has
|
|
66
|
+
* one document, byte for byte, whoever writes it.
|
|
67
|
+
*/
|
|
68
|
+
export declare function encodeDeploymentRecord(record: DeploymentRecordV1): DeploymentRecordDocument;
|
|
69
|
+
/**
|
|
70
|
+
* Admit the document of one record: `DEPLOYMENT_RECORD_MEDIA_TYPE`, and UTF-8 JSON whose value
|
|
71
|
+
* `acceptDeploymentRecord` admits. Anything else throws.
|
|
72
|
+
*/
|
|
73
|
+
export declare function decodeDeploymentRecord(document: DeploymentRecordDocument): DeploymentRecordV1;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { patterns } from '@astrale-os/kernel-dsl/v1/addressing';
|
|
2
|
+
import { json } from '@astrale-os/kernel-dsl/value';
|
|
2
3
|
import { isVersion } from '../../platform/versioning/version.js';
|
|
3
4
|
import { ENVIRONMENT_NAME } from '../environment.js';
|
|
4
5
|
import { contentOf, parseDeploymentLabel } from './label.js';
|
|
5
6
|
import { deploymentLine } from './line.js';
|
|
6
7
|
export const DEPLOYMENT_RECORD_FORMAT = 'astrale.deployment-record';
|
|
7
8
|
export const DEPLOYMENT_RECORD_VERSION = 1;
|
|
9
|
+
/**
|
|
10
|
+
* The media type of a `DeploymentRecordV1` document: what a Domain deployer publishes it with, and
|
|
11
|
+
* what a host serves it with at `/.well-known/astrale/deployment.json`.
|
|
12
|
+
*/
|
|
13
|
+
export const DEPLOYMENT_RECORD_MEDIA_TYPE = 'application/vnd.astrale.deployment-record+json;v=1';
|
|
8
14
|
const DIGEST = /^sha256:[0-9a-f]{64}$/u;
|
|
9
15
|
/** The full hexadecimal SHA-1 of a commit, in either case, as a deployment name reads it. */
|
|
10
16
|
const SHA = /^[0-9a-f]{40}$/iu;
|
|
@@ -64,6 +70,34 @@ export function acceptDeploymentRecord(input) {
|
|
|
64
70
|
commit: record.commit === null ? null : commit(record.commit),
|
|
65
71
|
});
|
|
66
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* The document of one record, as a Domain deployer publishes it: the record admitted, as the
|
|
75
|
+
* UTF-8 bytes of its RFC 8785 canonical JSON, with `DEPLOYMENT_RECORD_MEDIA_TYPE`. One record has
|
|
76
|
+
* one document, byte for byte, whoever writes it.
|
|
77
|
+
*/
|
|
78
|
+
export function encodeDeploymentRecord(record) {
|
|
79
|
+
return Object.freeze({
|
|
80
|
+
contentType: DEPLOYMENT_RECORD_MEDIA_TYPE,
|
|
81
|
+
bytes: new TextEncoder().encode(json.serialize(acceptDeploymentRecord(record))),
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Admit the document of one record: `DEPLOYMENT_RECORD_MEDIA_TYPE`, and UTF-8 JSON whose value
|
|
86
|
+
* `acceptDeploymentRecord` admits. Anything else throws.
|
|
87
|
+
*/
|
|
88
|
+
export function decodeDeploymentRecord(document) {
|
|
89
|
+
if (document?.contentType !== DEPLOYMENT_RECORD_MEDIA_TYPE) {
|
|
90
|
+
throw new TypeError('Deployment record document has another media type.');
|
|
91
|
+
}
|
|
92
|
+
let value;
|
|
93
|
+
try {
|
|
94
|
+
value = JSON.parse(new TextDecoder('utf-8', { fatal: true, ignoreBOM: false }).decode(document.bytes));
|
|
95
|
+
}
|
|
96
|
+
catch (cause) {
|
|
97
|
+
throw new TypeError('Deployment record document is not UTF-8 JSON.', { cause });
|
|
98
|
+
}
|
|
99
|
+
return acceptDeploymentRecord(value);
|
|
100
|
+
}
|
|
67
101
|
function commit(input) {
|
|
68
102
|
const based = input !== null && typeof input === 'object' && Object.hasOwn(input, 'base');
|
|
69
103
|
const value = exact(input, based ? ['sha', 'dirty', 'base'] : ['sha', 'dirty'], 'commit');
|
|
@@ -18,16 +18,12 @@ export interface DeploymentSummaryV1 {
|
|
|
18
18
|
* `published` on Admin's Services, which keeps every deployment until it is retired. Absent on a
|
|
19
19
|
* dispatch namespace, which keeps no retention.
|
|
20
20
|
*/
|
|
21
|
-
readonly retention?: '
|
|
21
|
+
readonly retention?: 'published';
|
|
22
22
|
/** When the host created it; absent when the host no longer knows (its script is gone). */
|
|
23
23
|
readonly createdAt?: string;
|
|
24
|
-
/** An older adapter's report of the last call; no first-party adapter reports it any more. */
|
|
25
|
-
readonly lastCallAt?: string;
|
|
26
|
-
/** An older adapter's preview expiry; no first-party adapter reports it any more. */
|
|
27
|
-
readonly expiresAt?: string;
|
|
28
24
|
readonly retiredAt?: string;
|
|
29
|
-
/** `withdrawn` once its owner retired it
|
|
30
|
-
readonly retirement?: '
|
|
25
|
+
/** `withdrawn` once its owner retired it. */
|
|
26
|
+
readonly retirement?: 'withdrawn';
|
|
31
27
|
/** The RFC 7638 thumbprint of its key; absent when the host no longer knows (its script is gone). */
|
|
32
28
|
readonly signingKeyId?: string;
|
|
33
29
|
readonly record: DeploymentRecordV1;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export { deploy } from './deploy.js';
|
|
2
|
-
export type { DeploymentInput, LegacyDeployment } from './deploy.js';
|
|
3
1
|
export type { Deployment } from './deployment.js';
|
|
4
2
|
export { runtime } from './runtime/index.js';
|
|
5
3
|
export type { RuntimeReference } from './runtime/index.js';
|
|
@@ -10,4 +10,10 @@ export interface Build<Schema extends schema.DomainSchema = schema.DomainSchema,
|
|
|
10
10
|
readonly requirements: release.Requirements;
|
|
11
11
|
readonly routes: routes.Plan;
|
|
12
12
|
readonly frontend?: FrontendCompilation;
|
|
13
|
+
/** What the release manifest shows of the application: its icon. */
|
|
14
|
+
readonly presentation?: BuildPresentation;
|
|
15
|
+
}
|
|
16
|
+
export interface BuildPresentation {
|
|
17
|
+
/** One self-contained inline SVG. */
|
|
18
|
+
readonly icon?: string;
|
|
13
19
|
}
|
|
@@ -19,6 +19,7 @@ export function compile(definition) {
|
|
|
19
19
|
const compiled = schemaApi.compile(definition.schema);
|
|
20
20
|
const requirements = compileRequirements(domain, definition.requirements, sourceBundle);
|
|
21
21
|
const frontend = compileFrontend(definition.frontend, domain);
|
|
22
|
+
const presentation = definition.icon === undefined ? undefined : Object.freeze({ icon: definition.icon });
|
|
22
23
|
const plan = routes.compile({
|
|
23
24
|
domain,
|
|
24
25
|
routes: admitRoutes(definition.routes, registry),
|
|
@@ -37,6 +38,7 @@ export function compile(definition) {
|
|
|
37
38
|
requirements,
|
|
38
39
|
routes: plan,
|
|
39
40
|
...(frontend === undefined ? {} : { frontend }),
|
|
41
|
+
...(presentation === undefined ? {} : { presentation }),
|
|
40
42
|
});
|
|
41
43
|
return admitBuild(build, { domain, registry });
|
|
42
44
|
}
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import type { Frontend, FrontendSource } from '../../../application/view/index.js';
|
|
2
|
-
import type { FrontendHandshake,
|
|
3
|
-
import type { Key
|
|
2
|
+
import type { FrontendHandshake, ViewHostRequirements } from '../../../application/view/index.js';
|
|
3
|
+
import type { Key } from '../../../platform/schema/index.js';
|
|
4
4
|
import type { Domain } from '../../../platform/schema/index.js';
|
|
5
5
|
export interface CompiledFrontendRoute {
|
|
6
6
|
readonly view: Key.View;
|
|
7
7
|
readonly path: string;
|
|
8
8
|
readonly document: string;
|
|
9
9
|
readonly handshake: FrontendHandshake;
|
|
10
|
-
readonly iframe?: IframeRequirements;
|
|
11
10
|
readonly host?: ViewHostRequirements;
|
|
12
11
|
}
|
|
13
12
|
export interface FrontendCompilation {
|
|
14
13
|
readonly source: FrontendSource;
|
|
15
14
|
readonly routes: readonly CompiledFrontendRoute[];
|
|
16
|
-
readonly entrypoint: ViewRef;
|
|
17
15
|
}
|
|
18
16
|
/** Lower exact authored View names to canonical DSL references without placing URLs. */
|
|
19
17
|
export declare function compileFrontend(frontend: Frontend | undefined, domain: Domain): FrontendCompilation | undefined;
|
|
@@ -15,16 +15,11 @@ export function compileFrontend(frontend, domain) {
|
|
|
15
15
|
path: route.path,
|
|
16
16
|
document: route.document,
|
|
17
17
|
handshake: route.handshake,
|
|
18
|
-
...(route.iframe === undefined ? {} : { iframe: route.iframe }),
|
|
19
18
|
...(route.host === undefined ? {} : { host: route.host }),
|
|
20
19
|
});
|
|
21
20
|
});
|
|
22
|
-
const entrypoint = domain.views[frontend.entrypoint];
|
|
23
|
-
if (entrypoint === undefined)
|
|
24
|
-
throw new TypeError('Frontend entrypoint is absent from its Domain.');
|
|
25
21
|
return Object.freeze({
|
|
26
22
|
source: frontend.source,
|
|
27
23
|
routes: Object.freeze(routes),
|
|
28
|
-
entrypoint: entrypoint.ref,
|
|
29
24
|
});
|
|
30
25
|
}
|
|
@@ -3,11 +3,7 @@ const MEDIA_TYPE = 'application/vnd.astrale.frontend-material+octet-stream;v=1';
|
|
|
3
3
|
export function digest(frontend, files) {
|
|
4
4
|
const encoder = new TextEncoder();
|
|
5
5
|
const chunks = [
|
|
6
|
-
encoder.encode(JSON.stringify({
|
|
7
|
-
source: frontend.source,
|
|
8
|
-
routes: frontend.routes,
|
|
9
|
-
entrypoint: frontend.entrypoint,
|
|
10
|
-
})),
|
|
6
|
+
encoder.encode(JSON.stringify({ source: frontend.source, routes: frontend.routes })),
|
|
11
7
|
];
|
|
12
8
|
for (const file of files) {
|
|
13
9
|
const bytes = file.bytes();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DomainSchema } from '@astrale-os/kernel-dsl/v1/schema';
|
|
2
2
|
import type { Runtime } from '../../application/runtime/index.js';
|
|
3
|
-
import type { Build } from './build.js';
|
|
3
|
+
import type { Build, BuildPresentation } from './build.js';
|
|
4
4
|
import type { FrontendCompilation } from './frontend/index.js';
|
|
5
5
|
export interface BuildMaterial {
|
|
6
6
|
readonly format: 'astrale.sdk.build-material';
|
|
@@ -16,6 +16,7 @@ export interface BuildMaterial {
|
|
|
16
16
|
readonly requirements: Build['requirements'];
|
|
17
17
|
readonly routes: Build['routes'];
|
|
18
18
|
readonly frontend?: FrontendCompilation;
|
|
19
|
+
readonly presentation?: BuildPresentation;
|
|
19
20
|
}
|
|
20
21
|
declare const GENERATED_BUILD_MATERIAL: unique symbol;
|
|
21
22
|
/** Exact Build material embedded by an Astrale execution-code generator. */
|
|
@@ -23,7 +24,6 @@ export interface GeneratedBuildMaterial {
|
|
|
23
24
|
readonly format: 'astrale.sdk.generated-build-material';
|
|
24
25
|
readonly version: 1;
|
|
25
26
|
readonly material: BuildMaterial;
|
|
26
|
-
readonly digest: Build['schema']['bundle']['ref']['digest'];
|
|
27
27
|
readonly [GENERATED_BUILD_MATERIAL]: 'generated-build-material';
|
|
28
28
|
}
|
|
29
29
|
/** Detach the provider-neutral, runtime-free material embedded into generated execution code. */
|
|
@@ -4,10 +4,11 @@ import { load as loadCompiledSchema } from '@astrale-os/kernel-dsl/v1/compiled/l
|
|
|
4
4
|
import { revision } from '@astrale-os/kernel-dsl/v1/schema/revision';
|
|
5
5
|
import { equal } from '@astrale-os/kernel-dsl/value';
|
|
6
6
|
import * as artifact from '@astrale-os/kernel-protocol/artifact';
|
|
7
|
-
import { BUNDLE_MEDIA_TYPE } from '@astrale-os/kernel-protocol/release
|
|
8
|
-
import { admitRequirements, validateRequirements
|
|
7
|
+
import { BUNDLE_MEDIA_TYPE } from '@astrale-os/kernel-protocol/release';
|
|
8
|
+
import { admitRequirements, validateRequirements } from '@astrale-os/kernel-protocol/release';
|
|
9
9
|
import * as routes from '@astrale-os/kernel-protocol/routes';
|
|
10
10
|
import { admitRuntimeRegistry, isRuntime } from '../../application/runtime/index.js';
|
|
11
|
+
import { admitClassIconSvg } from '../../platform/schema/class-icon-svg.js';
|
|
11
12
|
import { admitBuild, isBuild } from './admission.js';
|
|
12
13
|
/** Detach the provider-neutral, runtime-free material embedded into generated execution code. */
|
|
13
14
|
export function material(build) {
|
|
@@ -29,6 +30,7 @@ export function material(build) {
|
|
|
29
30
|
requirements: build.requirements,
|
|
30
31
|
routes: build.routes,
|
|
31
32
|
...(build.frontend === undefined ? {} : { frontend: build.frontend }),
|
|
33
|
+
...(build.presentation === undefined ? {} : { presentation: build.presentation }),
|
|
32
34
|
});
|
|
33
35
|
}
|
|
34
36
|
/** Produce opaque material for execution code from one admitted Build. */
|
|
@@ -38,7 +40,6 @@ export function generatedMaterial(build) {
|
|
|
38
40
|
format: 'astrale.sdk.generated-build-material',
|
|
39
41
|
version: 1,
|
|
40
42
|
material: value,
|
|
41
|
-
digest: digestOf(value),
|
|
42
43
|
});
|
|
43
44
|
}
|
|
44
45
|
/** Re-admit detached provider-neutral Build material against the exact Runtime value. */
|
|
@@ -62,6 +63,7 @@ export function restoreBuild(input, runtime) {
|
|
|
62
63
|
const compiled = deepFreeze(input.schema.compiled);
|
|
63
64
|
const bundleRef = deepFreeze(input.schema.bundle.ref);
|
|
64
65
|
const frontend = input.frontend === undefined ? undefined : deepFreeze(input.frontend);
|
|
66
|
+
const presentation = input.presentation === undefined ? undefined : admitPresentation(input.presentation);
|
|
65
67
|
const detached = new Uint8Array(bytes);
|
|
66
68
|
const build = Object.freeze({
|
|
67
69
|
kind: 'build',
|
|
@@ -77,6 +79,7 @@ export function restoreBuild(input, runtime) {
|
|
|
77
79
|
requirements,
|
|
78
80
|
routes: plan,
|
|
79
81
|
...(frontend === undefined ? {} : { frontend }),
|
|
82
|
+
...(presentation === undefined ? {} : { presentation }),
|
|
80
83
|
});
|
|
81
84
|
return admitBuild(build, { domain, registry });
|
|
82
85
|
}
|
|
@@ -106,6 +109,7 @@ export function restoreGeneratedBuild(input, runtime) {
|
|
|
106
109
|
requirements: material.requirements,
|
|
107
110
|
routes: material.routes,
|
|
108
111
|
...(material.frontend === undefined ? {} : { frontend: material.frontend }),
|
|
112
|
+
...(material.presentation === undefined ? {} : { presentation: material.presentation }),
|
|
109
113
|
});
|
|
110
114
|
return admitBuild(build, { domain, registry });
|
|
111
115
|
}
|
|
@@ -118,7 +122,7 @@ function acceptGeneratedMaterial(input, runtime) {
|
|
|
118
122
|
Array.isArray(input) ||
|
|
119
123
|
format !== 'astrale.sdk.generated-build-material' ||
|
|
120
124
|
version !== 1 ||
|
|
121
|
-
Reflect.ownKeys(input).some((key) => key !== 'format' && key !== 'version' && key !== 'material'
|
|
125
|
+
Reflect.ownKeys(input).some((key) => key !== 'format' && key !== 'version' && key !== 'material')) {
|
|
122
126
|
invalid();
|
|
123
127
|
}
|
|
124
128
|
assertMaterialEnvelope(material, runtime);
|
|
@@ -128,14 +132,6 @@ function acceptGeneratedMaterial(input, runtime) {
|
|
|
128
132
|
deepFreeze(input);
|
|
129
133
|
return Object.freeze({ material });
|
|
130
134
|
}
|
|
131
|
-
function digestOf(input) {
|
|
132
|
-
try {
|
|
133
|
-
return artifact.identify(new TextEncoder().encode(JSON.stringify(input)), 'application/vnd.astrale.sdk.build-material+json').digest;
|
|
134
|
-
}
|
|
135
|
-
catch {
|
|
136
|
-
invalid();
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
135
|
function assertMaterialEnvelope(input, runtime) {
|
|
140
136
|
if (!isRuntime(runtime))
|
|
141
137
|
throw new TypeError('Build Runtime is not admitted.');
|
|
@@ -150,7 +146,8 @@ function assertMaterialEnvelope(input, runtime) {
|
|
|
150
146
|
key !== 'callables' &&
|
|
151
147
|
key !== 'requirements' &&
|
|
152
148
|
key !== 'routes' &&
|
|
153
|
-
key !== 'frontend'
|
|
149
|
+
key !== 'frontend' &&
|
|
150
|
+
key !== 'presentation')) {
|
|
154
151
|
invalid();
|
|
155
152
|
}
|
|
156
153
|
}
|
|
@@ -186,6 +183,24 @@ function admitRoutePlan(input, domain) {
|
|
|
186
183
|
invalid();
|
|
187
184
|
return admitted;
|
|
188
185
|
}
|
|
186
|
+
/** External material must re-admit its icon using the same worker-safe SVG owner as authoring. */
|
|
187
|
+
function admitPresentation(input) {
|
|
188
|
+
if (input === null || typeof input !== 'object' || Array.isArray(input))
|
|
189
|
+
invalid();
|
|
190
|
+
const value = input;
|
|
191
|
+
if (Reflect.ownKeys(value).some((key) => key !== 'icon'))
|
|
192
|
+
invalid();
|
|
193
|
+
const { icon } = value;
|
|
194
|
+
if (icon === undefined)
|
|
195
|
+
return Object.freeze({});
|
|
196
|
+
if (typeof icon !== 'string')
|
|
197
|
+
invalid();
|
|
198
|
+
const admitted = admitClassIconSvg(icon);
|
|
199
|
+
// Material carries an exact admitted value, rather than authored text to normalize.
|
|
200
|
+
if (admitted !== icon)
|
|
201
|
+
invalid();
|
|
202
|
+
return Object.freeze({ icon: admitted });
|
|
203
|
+
}
|
|
189
204
|
function deepFreeze(input, seen = new WeakSet()) {
|
|
190
205
|
if (input !== null && typeof input === 'object' && !seen.has(input)) {
|
|
191
206
|
seen.add(input);
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import type { Adapter
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
* interface v2 `Adapter`, or a `@deprecated` `LegacyAdapter` whose Environments are all on the
|
|
5
|
-
* legacy direct-mode path (CT33).
|
|
6
|
-
*/
|
|
7
|
-
export interface Deployment<Parameters extends object = object, AdapterValue extends Adapter<Parameters> | LegacyAdapter<Parameters> = Adapter<Parameters> | LegacyAdapter<Parameters>> {
|
|
1
|
+
import type { Adapter } from './adapter/index.js';
|
|
2
|
+
/** One immutable-deployment adapter bound to one Project Environment. */
|
|
3
|
+
export interface Deployment<Parameters extends object = object, AdapterValue extends Adapter<Parameters> = Adapter<Parameters>> {
|
|
8
4
|
readonly kind: 'deployment';
|
|
9
5
|
readonly adapter: AdapterValue;
|
|
10
6
|
readonly parameters: Parameters;
|
|
11
7
|
}
|
|
12
8
|
/** Internal adapter binding boundary used by public provider packages. */
|
|
13
|
-
export declare function captureDeployment<const Parameters extends object>(adapter: Adapter<Parameters
|
|
9
|
+
export declare function captureDeployment<const Parameters extends object>(adapter: Adapter<Parameters>, parameters: Parameters): Deployment<Parameters>;
|
|
14
10
|
export declare function isDeployment(input: unknown): input is Deployment;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
export { defineAdapter, defineDeployment, isAdapter } from './adapter/index.js';
|
|
2
|
-
export type { Adapter, AdapterCommand, AdapterCommandContext, AdapterCommandResult, AdapterEnvironmentContext, AdapterInput,
|
|
2
|
+
export type { Adapter, AdapterCommand, AdapterCommandContext, AdapterCommandResult, AdapterEnvironmentContext, AdapterInput, ArtifactFile, Bundle, BundleContext, Bundler, BundleSource, ConfigureContext, DeploymentCallTarget, DeploymentSecretsState, FailedReleaseDeployResult, ListContext, ListedDeployment, MutationKnowledge, Placement, PlacementContext, PreparedArtifactFile, ReadyReleaseDeployResult, ReleaseDeployContext, ReleaseDeploymentPhase, ReleaseDeployResult, RetainContext, } from './adapter/index.js';
|
|
3
3
|
export { compile, isBuild } from './build/index.js';
|
|
4
4
|
export type { Build, BuildBundle, BuildDigest, BuildManifestV1, BuildSchema, } from './build/index.js';
|
|
5
|
-
export { deploy } from './deploy.js';
|
|
6
|
-
export type { DeploymentInput, LegacyDeployment } from './deploy.js';
|
|
7
5
|
export { isDeployment } from './deployment.js';
|
|
8
6
|
export type { Deployment } from './deployment.js';
|
|
9
7
|
export { addressing, assemble, isAddressing, isRelease } from './release/index.js';
|
|
10
8
|
export type { Addressing, Release } from './release/index.js';
|
|
11
9
|
export { admit as admitRuntime, resolve as resolveRuntime, runtime } from './runtime/index.js';
|
|
12
10
|
export type { ResolvedRuntimeReference, RuntimeModuleLoader, RuntimeReference, } from './runtime/index.js';
|
|
13
|
-
export { verifyBundle,
|
|
14
|
-
export type { BundleInput
|
|
11
|
+
export { verifyBundle, verifyReadiness, verifyUploadedBuild } from './verify/index.js';
|
|
12
|
+
export type { BundleInput } from './verify/index.js';
|
package/dist/deployment/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { defineAdapter, defineDeployment, isAdapter } from './adapter/index.js';
|
|
2
2
|
export { compile, isBuild } from './build/index.js';
|
|
3
|
-
export { deploy } from './deploy.js';
|
|
4
3
|
export { isDeployment } from './deployment.js';
|
|
5
4
|
export { addressing, assemble, isAddressing, isRelease } from './release/index.js';
|
|
6
5
|
export { admit as admitRuntime, resolve as resolveRuntime, runtime } from './runtime/index.js';
|
|
7
|
-
export { verifyBundle,
|
|
6
|
+
export { verifyBundle, verifyReadiness, verifyUploadedBuild } from './verify/index.js';
|
|
@@ -5,15 +5,8 @@ import type { IssuerId } from '../../platform/auth/index.js';
|
|
|
5
5
|
*/
|
|
6
6
|
export interface Addressing {
|
|
7
7
|
readonly issuer: IssuerId;
|
|
8
|
-
/** Public origin serving this Release
|
|
8
|
+
/** Public origin serving this Release, identical to its issuer. */
|
|
9
9
|
readonly publicUrl: IssuerId;
|
|
10
10
|
}
|
|
11
|
-
export declare function addressing(input: string
|
|
12
|
-
/**
|
|
13
|
-
* @deprecated Stable-target `legacy` path only: adapter-cloudflare direct mode serves under an
|
|
14
|
-
* issuer distinct from its route (`identityIssuer`). Removed with that mode at D10; a
|
|
15
|
-
* deployment's URL is its issuer.
|
|
16
|
-
*/
|
|
17
|
-
readonly publicUrl?: string;
|
|
18
|
-
}): Addressing;
|
|
11
|
+
export declare function addressing(input: string): Addressing;
|
|
19
12
|
export declare function isAddressing(input: unknown): input is Addressing;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { issuer } from '../../platform/auth/index.js';
|
|
2
2
|
const admittedAddressing = new WeakSet();
|
|
3
|
-
export function addressing(input
|
|
3
|
+
export function addressing(input) {
|
|
4
4
|
const admitted = origin(input);
|
|
5
|
-
const
|
|
6
|
-
const value = Object.freeze({ issuer: admitted, publicUrl });
|
|
5
|
+
const value = Object.freeze({ issuer: admitted, publicUrl: admitted });
|
|
7
6
|
admittedAddressing.add(value);
|
|
8
7
|
return value;
|
|
9
8
|
}
|
|
@@ -3,5 +3,3 @@ export { capture, isRelease } from './admission.js';
|
|
|
3
3
|
export { addressing, isAddressing, type Addressing } from './addressing.js';
|
|
4
4
|
export { invocationPath } from './invocation.js';
|
|
5
5
|
export type { Release } from './release.js';
|
|
6
|
-
/** @deprecated Stable-target Publication v3; see `legacy/index.ts` for its consumers and removal. */
|
|
7
|
-
export * as legacy from './legacy/index.js';
|
|
@@ -2,5 +2,3 @@ export { assemble } from './assemble.js';
|
|
|
2
2
|
export { capture, isRelease } from './admission.js';
|
|
3
3
|
export { addressing, isAddressing } from './addressing.js';
|
|
4
4
|
export { invocationPath } from './invocation.js';
|
|
5
|
-
/** @deprecated Stable-target Publication v3; see `legacy/index.ts` for its consumers and removal. */
|
|
6
|
-
export * as legacy from './legacy/index.js';
|
|
@@ -12,7 +12,7 @@ export interface Release<BuildValue extends Build = Build> {
|
|
|
12
12
|
readonly build: BuildValue;
|
|
13
13
|
/**
|
|
14
14
|
* The deployment's URL: its origin, which is also its issuer (`document.identity.issuer`). A
|
|
15
|
-
* deployment
|
|
15
|
+
* deployment binds both to the same immutable URL.
|
|
16
16
|
*/
|
|
17
17
|
readonly url: IssuerId;
|
|
18
18
|
readonly document: release.DomainRelease;
|
|
@@ -4,8 +4,7 @@ import type { Addressing } from '../addressing.js';
|
|
|
4
4
|
export declare const DELIVERY_PATH: '/install';
|
|
5
5
|
/**
|
|
6
6
|
* What a deployment serves beneath its URL: identity, schema bundle, requirements, bindings, routes
|
|
7
|
-
* and delivery. A `DomainRelease` v4 adds
|
|
8
|
-
* path is exactly this content, so both documents of one build at one address agree.
|
|
7
|
+
* and delivery. A `DomainRelease` v4 adds the digest of its running build.
|
|
9
8
|
*/
|
|
10
9
|
export type Served = Omit<release.Content, 'format' | 'version' | 'build'>;
|
|
11
10
|
/** Derive the served content of one exact Build at one Addressing. */
|