@astrale-os/sdk 0.6.0-beta.13 → 0.6.0-beta.15
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 +4 -0
- package/dist/deployment/adapter/adapter.d.ts +9 -11
- package/dist/deployment/adapter/legacy/adapter.d.ts +0 -10
- package/dist/deployment/adapter/legacy/deploy/context.d.ts +0 -2
- package/dist/deployment/adapter/legacy/deploy/result.d.ts +2 -3
- package/dist/deployment/adapter/legacy/index.d.ts +12 -12
- package/dist/deployment/adapter/legacy/prepare/context.d.ts +0 -2
- package/dist/deployment/adapter/release/context.d.ts +23 -3
- package/dist/deployment/adapter/release/index.d.ts +1 -0
- package/dist/deployment/adapter/release/list.d.ts +41 -0
- package/dist/deployment/adapter/release/list.js +1 -0
- package/dist/deployment/address/index.d.ts +1 -1
- package/dist/deployment/address/index.js +1 -0
- package/dist/deployment/address/summary.d.ts +31 -1
- package/dist/deployment/address/summary.js +117 -1
- package/dist/deployment/build/index.d.ts +1 -1
- package/dist/deployment/build/index.js +1 -1
- package/dist/deployment/build/manifest.d.ts +5 -0
- package/dist/deployment/build/manifest.js +10 -0
- package/dist/deployment/index.d.ts +1 -1
- package/dist/deployment/release/legacy/index.d.ts +17 -12
- package/dist/deployment/release/legacy/index.js +17 -12
- package/dist/deployment/verify/readiness/deployment.js +3 -13
- package/dist/deployment/verify/readiness/fetch.d.ts +13 -0
- package/dist/deployment/verify/readiness/fetch.js +26 -0
- package/dist/deployment/verify/readiness/identity.d.ts +3 -6
- package/dist/deployment/verify/readiness/identity.js +3 -3
- package/dist/deployment/verify/readiness/index.d.ts +12 -8
- package/dist/deployment/verify/readiness/index.js +15 -4
- package/dist/deployment/verify/readiness/legacy/index.d.ts +2 -0
- package/dist/deployment/verify/readiness/legacy/index.js +2 -0
- package/dist/deployment/verify/readiness/legacy/publication.d.ts +12 -0
- package/dist/deployment/verify/readiness/legacy/publication.js +23 -0
- package/dist/deployment/verify/readiness/release.d.ts +8 -0
- package/dist/deployment/verify/readiness/release.js +22 -0
- package/dist/execution/identity/authentication.d.ts +14 -3
- package/dist/execution/identity/authentication.js +16 -7
- package/dist/execution/identity/callback.d.ts +5 -2
- package/dist/execution/identity/callback.js +11 -5
- package/dist/execution/identity/delivery.d.ts +11 -4
- package/dist/execution/identity/delivery.js +47 -20
- package/dist/execution/identity/identity.d.ts +12 -6
- package/dist/execution/identity/identity.js +3 -3
- package/dist/execution/invocation/admission/authentication.d.ts +1 -2
- package/dist/execution/invocation/admission/authentication.js +1 -2
- package/dist/execution/invocation/admission/authority.d.ts +10 -4
- package/dist/execution/invocation/admission/authority.js +5 -1
- package/dist/execution/invocation/invocation.js +51 -14
- package/dist/execution/runtime/index.d.ts +1 -0
- package/dist/execution/runtime/index.js +1 -0
- package/dist/execution/runtime/load.d.ts +3 -3
- package/dist/execution/runtime/load.js +3 -2
- package/dist/execution/runtime/release.d.ts +22 -0
- package/dist/execution/runtime/release.js +14 -0
- package/dist/execution/serve.d.ts +2 -2
- package/dist/execution/service/create.js +9 -7
- package/dist/execution/service/release.d.ts +2 -2
- package/dist/execution/service/release.js +3 -2
- package/dist/execution/service/service.d.ts +9 -5
- package/dist/execution/service/serving/delivery.d.ts +6 -0
- package/dist/execution/service/{publication → serving}/delivery.js +5 -1
- package/dist/execution/service/{publication → serving}/index.d.ts +1 -1
- package/dist/execution/service/serving/installation.d.ts +4 -0
- package/dist/execution/service/serving/installation.js +9 -0
- package/dist/execution/service/serving/legacy/index.d.ts +15 -0
- package/dist/execution/service/serving/legacy/index.js +19 -0
- package/dist/execution/service/serving/source.d.ts +18 -0
- package/dist/execution/service/serving/source.js +19 -0
- package/dist/execution/workflows/run.js +1 -1
- package/dist/platform/versioning/name.d.ts +4 -3
- package/dist/platform/versioning/name.js +4 -3
- package/dist/project/define.js +58 -28
- package/dist/project/install-command.d.ts +10 -0
- package/dist/project/install-command.js +13 -0
- package/dist/project/project.d.ts +4 -2
- package/dist/tooling/cli/arguments.d.ts +1 -3
- package/dist/tooling/cli/arguments.js +51 -22
- package/dist/tooling/cli/commit.d.ts +23 -0
- package/dist/tooling/cli/commit.js +216 -0
- package/dist/tooling/cli/deploy-mode.d.ts +16 -13
- package/dist/tooling/cli/deploy-mode.js +45 -36
- package/dist/tooling/cli/deploy-result.d.ts +10 -7
- package/dist/tooling/cli/deploy-result.js +4 -3
- package/dist/tooling/cli/dotenv.d.ts +2 -2
- package/dist/tooling/cli/dotenv.js +3 -33
- package/dist/tooling/cli/help.js +73 -29
- package/dist/tooling/cli/immutable-deployment.d.ts +27 -0
- package/dist/tooling/cli/immutable-deployment.js +95 -0
- package/dist/tooling/cli/index.d.ts +3 -4
- package/dist/tooling/cli/index.js +2 -3
- package/dist/tooling/cli/legacy/deploy-result.d.ts +5 -3
- package/dist/tooling/cli/legacy/deploy-result.js +5 -3
- package/dist/tooling/cli/{development → legacy/development}/candidate.d.ts +3 -4
- package/dist/tooling/cli/{development → legacy/development}/candidate.js +7 -14
- package/dist/tooling/cli/legacy/development/deployment.d.ts +10 -0
- package/dist/tooling/cli/legacy/development/deployment.js +20 -0
- package/dist/tooling/cli/legacy/development/deprecation.d.ts +11 -0
- package/dist/tooling/cli/legacy/development/deprecation.js +13 -0
- package/dist/tooling/cli/legacy/development/develop.d.ts +15 -0
- package/dist/tooling/cli/legacy/development/develop.js +142 -0
- package/dist/tooling/cli/legacy/development/index.d.ts +21 -0
- package/dist/tooling/cli/legacy/development/index.js +21 -0
- package/dist/tooling/cli/legacy/development/report.d.ts +7 -0
- package/dist/tooling/cli/{development → legacy/development}/report.js +2 -5
- package/dist/tooling/cli/legacy/development/secrets-file.d.ts +2 -0
- package/dist/tooling/cli/legacy/development/secrets-file.js +33 -0
- package/dist/tooling/cli/legacy/stable-target-adapter.d.ts +5 -3
- package/dist/tooling/cli/legacy/stable-target-deploy.d.ts +40 -0
- package/dist/tooling/cli/legacy/stable-target-deploy.js +102 -0
- package/dist/tooling/cli/list.d.ts +114 -0
- package/dist/tooling/cli/list.js +297 -0
- package/dist/tooling/cli/orchestrate.d.ts +1 -1
- package/dist/tooling/cli/orchestrate.js +91 -95
- package/dist/tooling/cli/secrets.d.ts +9 -0
- package/dist/tooling/cli/secrets.js +19 -0
- package/package.json +7 -7
- package/dist/deployment/verify/readiness/publication.d.ts +0 -11
- package/dist/deployment/verify/readiness/publication.js +0 -41
- package/dist/execution/service/publication/delivery.d.ts +0 -2
- package/dist/execution/service/publication/installation.d.ts +0 -3
- package/dist/execution/service/publication/installation.js +0 -8
- package/dist/execution/service/publication/source.d.ts +0 -3
- package/dist/execution/service/publication/source.js +0 -11
- package/dist/tooling/cli/astrale/authority.d.ts +0 -5
- package/dist/tooling/cli/astrale/authority.js +0 -11
- package/dist/tooling/cli/astrale/executable.d.ts +0 -2
- package/dist/tooling/cli/astrale/executable.js +0 -47
- package/dist/tooling/cli/astrale/failure.d.ts +0 -6
- package/dist/tooling/cli/astrale/failure.js +0 -48
- package/dist/tooling/cli/astrale/instance.d.ts +0 -11
- package/dist/tooling/cli/astrale/instance.js +0 -52
- package/dist/tooling/cli/astrale/process.d.ts +0 -13
- package/dist/tooling/cli/astrale/process.js +0 -94
- package/dist/tooling/cli/astrale/version.d.ts +0 -18
- package/dist/tooling/cli/astrale/version.js +0 -55
- package/dist/tooling/cli/development/deployment.d.ts +0 -16
- package/dist/tooling/cli/development/deployment.js +0 -39
- package/dist/tooling/cli/development/develop.d.ts +0 -11
- package/dist/tooling/cli/development/develop.js +0 -243
- package/dist/tooling/cli/development/release-evidence.d.ts +0 -4
- package/dist/tooling/cli/development/release-evidence.js +0 -10
- package/dist/tooling/cli/development/report.d.ts +0 -9
- package/dist/tooling/cli/development/session-file.d.ts +0 -53
- package/dist/tooling/cli/development/session-file.js +0 -337
- package/dist/tooling/cli/development/target-lock.d.ts +0 -16
- package/dist/tooling/cli/development/target-lock.js +0 -68
- package/dist/tooling/cli/development/view.d.ts +0 -28
- package/dist/tooling/cli/development/view.js +0 -151
- package/dist/tooling/cli/environment-release.d.ts +0 -24
- package/dist/tooling/cli/environment-release.js +0 -46
- package/dist/tooling/cli/evidence.d.ts +0 -14
- package/dist/tooling/cli/evidence.js +0 -53
- package/dist/tooling/cli/installation/index.d.ts +0 -2
- package/dist/tooling/cli/installation/index.js +0 -1
- package/dist/tooling/cli/installation/observation.d.ts +0 -10
- package/dist/tooling/cli/installation/observation.js +0 -44
- package/dist/tooling/cli/installation/reconcile.d.ts +0 -32
- package/dist/tooling/cli/installation/reconcile.js +0 -122
- /package/dist/execution/service/{publication → serving}/index.js +0 -0
- /package/dist/tooling/cli/{credential.d.ts → legacy/development/credential.d.ts} +0 -0
- /package/dist/tooling/cli/{credential.js → legacy/development/credential.js} +0 -0
- /package/dist/tooling/cli/{development → legacy/development}/lease.d.ts +0 -0
- /package/dist/tooling/cli/{development → legacy/development}/lease.js +0 -0
- /package/dist/tooling/cli/{development → legacy/development}/lifecycle.d.ts +0 -0
- /package/dist/tooling/cli/{development → legacy/development}/lifecycle.js +0 -0
- /package/dist/tooling/cli/{development → legacy/development}/project-imports.d.ts +0 -0
- /package/dist/tooling/cli/{development → legacy/development}/project-imports.js +0 -0
- /package/dist/tooling/cli/{development → legacy/development}/project-lock.d.ts +0 -0
- /package/dist/tooling/cli/{development → legacy/development}/project-lock.js +0 -0
- /package/dist/tooling/cli/{development → legacy/development}/rebuild.d.ts +0 -0
- /package/dist/tooling/cli/{development → legacy/development}/rebuild.js +0 -0
- /package/dist/tooling/cli/{development → legacy/development}/source-watch.d.ts +0 -0
- /package/dist/tooling/cli/{development → legacy/development}/source-watch.js +0 -0
- /package/dist/tooling/cli/{development → legacy/development}/sources.d.ts +0 -0
- /package/dist/tooling/cli/{development → legacy/development}/sources.js +0 -0
|
@@ -6,9 +6,7 @@ export type { DeploymentSecretsState } from '../../deployment/index.js';
|
|
|
6
6
|
/**
|
|
7
7
|
* `astrale-domain deploy <environment> --json` on stdout: the one deployment the deploy made or
|
|
8
8
|
* reused, which CI installs by its URL. Progress and warnings go to stderr. It names no instance
|
|
9
|
-
* and no version: a deploy numbers nothing
|
|
10
|
-
* nothing. A legacy environment that declares `installation` still installs while it deploys and
|
|
11
|
-
* reports that outcome on stderr only.
|
|
9
|
+
* and no version: a deploy numbers nothing and installs nothing.
|
|
12
10
|
*/
|
|
13
11
|
export interface DeployResultV1 {
|
|
14
12
|
readonly format: 'astrale.deploy-result';
|
|
@@ -62,14 +60,19 @@ export interface DeployResultV1 {
|
|
|
62
60
|
readonly secrets?: {
|
|
63
61
|
readonly state: DeploymentSecretsState;
|
|
64
62
|
};
|
|
65
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* The commit the deployment was built from, as its deployment record declares it: the commit of
|
|
65
|
+
* the deploy that created it. A reused deployment keeps its record, so this can be an earlier
|
|
66
|
+
* commit than the one the deploy ran from; the label covers the release, never the commit.
|
|
67
|
+
*/
|
|
66
68
|
readonly commit: DeploymentCommitV1 | null;
|
|
67
69
|
}
|
|
68
70
|
/**
|
|
69
71
|
* The deploy result of one immutable deployment, from the ready result of the adapter's
|
|
70
|
-
* `deployRelease`. Its release, build, Schema revision and URL are those
|
|
71
|
-
*
|
|
72
|
-
*
|
|
72
|
+
* `deployRelease`. Its release, build, Schema revision and URL are those the SDK sealed before
|
|
73
|
+
* deploying; the deployment record the adapter returned must declare exactly that release at that
|
|
74
|
+
* URL, so the result never names a release the deployment does not serve. Its commit is the
|
|
75
|
+
* record's, which a reused deployment kept from the deploy that created it.
|
|
73
76
|
*/
|
|
74
77
|
export declare function deployResult(input: {
|
|
75
78
|
readonly environment: string;
|
|
@@ -6,9 +6,10 @@ const SECRETS_BY_STATE = Object.freeze({
|
|
|
6
6
|
});
|
|
7
7
|
/**
|
|
8
8
|
* The deploy result of one immutable deployment, from the ready result of the adapter's
|
|
9
|
-
* `deployRelease`. Its release, build, Schema revision and URL are those
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* `deployRelease`. Its release, build, Schema revision and URL are those the SDK sealed before
|
|
10
|
+
* deploying; the deployment record the adapter returned must declare exactly that release at that
|
|
11
|
+
* URL, so the result never names a release the deployment does not serve. Its commit is the
|
|
12
|
+
* record's, which a reused deployment kept from the deploy that created it.
|
|
12
13
|
*/
|
|
13
14
|
export function deployResult(input) {
|
|
14
15
|
const { release, deployment } = input;
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
* runtime in dev, pushed to a secret store in prod). No `process.env` mutation,
|
|
8
8
|
* no interpolation magic beyond `${VAR}` against earlier keys in the same file.
|
|
9
9
|
*/
|
|
10
|
+
/** Parse one dotenv document into a flat record; `${VAR}` reads only earlier keys. */
|
|
11
|
+
export declare function parseDotenv(contents: string): Record<string, string>;
|
|
10
12
|
/**
|
|
11
13
|
* Read + parse a dotenv file the preset explicitly DECLARED (`secrets:`).
|
|
12
14
|
* Declared-but-absent is a wiring error (the gitignored file was never created
|
|
@@ -15,5 +17,3 @@
|
|
|
15
17
|
* that exists but holds no keys is legitimate (a domain with no secrets yet).
|
|
16
18
|
*/
|
|
17
19
|
export declare function loadDeclaredSecrets(path: string, declaration: string): Record<string, string>;
|
|
18
|
-
/** Load one explicit development-session secret snapshot without following a leaf symlink. */
|
|
19
|
-
export declare function loadPrivateSecretsFile(path: string, platform?: NodeJS.Platform): Record<string, string>;
|
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
* runtime in dev, pushed to a secret store in prod). No `process.env` mutation,
|
|
8
8
|
* no interpolation magic beyond `${VAR}` against earlier keys in the same file.
|
|
9
9
|
*/
|
|
10
|
-
import {
|
|
11
|
-
|
|
10
|
+
import { readFileSync } from 'node:fs';
|
|
11
|
+
/** Parse one dotenv document into a flat record; `${VAR}` reads only earlier keys. */
|
|
12
|
+
export function parseDotenv(contents) {
|
|
12
13
|
const out = {};
|
|
13
14
|
for (const raw of contents.split('\n')) {
|
|
14
15
|
const line = raw.trim();
|
|
@@ -52,34 +53,3 @@ export function loadDeclaredSecrets(path, declaration) {
|
|
|
52
53
|
}
|
|
53
54
|
return parseDotenv(contents);
|
|
54
55
|
}
|
|
55
|
-
/** Load one explicit development-session secret snapshot without following a leaf symlink. */
|
|
56
|
-
export function loadPrivateSecretsFile(path, platform = process.platform) {
|
|
57
|
-
if (platform === 'win32') {
|
|
58
|
-
throw new Error('--secrets-file is unavailable on Windows until private no-reparse file admission is supported.');
|
|
59
|
-
}
|
|
60
|
-
let descriptor;
|
|
61
|
-
try {
|
|
62
|
-
descriptor = openSync(path, constants.O_RDONLY | constants.O_NOFOLLOW);
|
|
63
|
-
}
|
|
64
|
-
catch (cause) {
|
|
65
|
-
if (cause instanceof Error && 'code' in cause && cause.code === 'ENOENT') {
|
|
66
|
-
throw new Error(`Secrets file '${path}' is missing.`, { cause });
|
|
67
|
-
}
|
|
68
|
-
if (cause instanceof Error && 'code' in cause && cause.code === 'ELOOP') {
|
|
69
|
-
throw new Error(`Secrets file '${path}' must be a regular file and not a symlink.`, { cause });
|
|
70
|
-
}
|
|
71
|
-
throw cause;
|
|
72
|
-
}
|
|
73
|
-
try {
|
|
74
|
-
const info = fstatSync(descriptor);
|
|
75
|
-
if (!info.isFile())
|
|
76
|
-
throw new Error(`Secrets file '${path}' must be a regular file.`);
|
|
77
|
-
if ((info.mode & 0o077) !== 0) {
|
|
78
|
-
throw new Error(`Secrets file '${path}' must not be accessible by group or other users.`);
|
|
79
|
-
}
|
|
80
|
-
return parseDotenv(readFileSync(descriptor, 'utf8'));
|
|
81
|
-
}
|
|
82
|
-
finally {
|
|
83
|
-
closeSync(descriptor);
|
|
84
|
-
}
|
|
85
|
-
}
|
package/dist/tooling/cli/help.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { installCommand } from '../../project/install-command.js';
|
|
1
2
|
import { COMMANDS } from './arguments.js';
|
|
2
3
|
/** Resolve help without parsing a project or performing any command effects. */
|
|
3
4
|
export function helpRequest(argv) {
|
|
@@ -12,15 +13,16 @@ export function helpText(command) {
|
|
|
12
13
|
export const ERROR_USAGE = `Usage: astrale-domain <command> [options]
|
|
13
14
|
Run "astrale-domain --help" for available commands.
|
|
14
15
|
`;
|
|
15
|
-
const GLOBAL_HELP = `Build, develop, deploy, test, lint, and package Astrale Domains.
|
|
16
|
+
const GLOBAL_HELP = `Build, develop, deploy, list, test, lint, and package Astrale Domains.
|
|
16
17
|
|
|
17
18
|
Usage:
|
|
18
19
|
astrale-domain <command> [options]
|
|
19
20
|
|
|
20
21
|
Commands:
|
|
21
|
-
dev [environment]
|
|
22
|
+
dev [environment] Deprecated: use deploy, then astrale domain install.
|
|
22
23
|
build Build, verify and print the build digest.
|
|
23
|
-
deploy <environment> Deploy
|
|
24
|
+
deploy <environment> Deploy one Environment; never installs.
|
|
25
|
+
list List the deployments of the Project's Environments.
|
|
24
26
|
test Run Project tests, optionally against one Environment.
|
|
25
27
|
lint Check Domain source and architecture.
|
|
26
28
|
package Prepare public declarations for publication.
|
|
@@ -55,22 +57,25 @@ Behavior:
|
|
|
55
57
|
checks afterwards. Failed installations leave local changes available for repair.
|
|
56
58
|
For an older SDK without this command: pnpm dlx @astrale-os/sdk@beta upgrade.
|
|
57
59
|
`,
|
|
58
|
-
dev: `Build, verify, remotely deploy, and watch one Project Environment.
|
|
60
|
+
dev: `Build, verify, remotely deploy, and watch one Project Environment (deprecated).
|
|
59
61
|
|
|
60
62
|
Usage:
|
|
61
63
|
astrale-domain dev [environment] [options]
|
|
62
64
|
|
|
65
|
+
Deprecated:
|
|
66
|
+
Development is not a command of the deployment model. Deploy the Environment with
|
|
67
|
+
astrale-domain deploy <environment>, then install the URL it prints with
|
|
68
|
+
astrale domain install <url> --direct -i <instance>. dev keeps its behavior until
|
|
69
|
+
it is removed and warns on every run.
|
|
70
|
+
|
|
63
71
|
Arguments:
|
|
64
72
|
environment Project Environment name; defaults to development.
|
|
65
73
|
|
|
66
74
|
Options:
|
|
67
75
|
--environment <name> Select the environment without a positional argument.
|
|
68
|
-
--
|
|
69
|
-
--as <identity> Select the Astrale identity for Services and installation calls.
|
|
70
|
-
--session-file <path> Write one retained DevelopmentSessionFileV1 snapshot at an
|
|
71
|
-
absolute path in a caller-owned private directory.
|
|
76
|
+
--as <identity> Select the Astrale identity for the adapter's provider calls.
|
|
72
77
|
--credential-file <path>
|
|
73
|
-
Use one private operator credential for
|
|
78
|
+
Use one private operator credential for the adapter's provider
|
|
74
79
|
calls without exposing it in Project configuration.
|
|
75
80
|
--secrets-file <path> Load one private, absolute secrets file for this development
|
|
76
81
|
session instead of the adapter-declared secrets file.
|
|
@@ -80,25 +85,23 @@ Behavior:
|
|
|
80
85
|
The selected Environment must exist; no other Environment is chosen as a fallback.
|
|
81
86
|
Builds and verifies the Domain, Runtime, frontend, and adapter artifact, then
|
|
82
87
|
deploys it through the selected Environment. It never starts a local Worker,
|
|
83
|
-
Vite server, or tunnel
|
|
84
|
-
|
|
88
|
+
Vite server, or tunnel, and never installs the Domain: install the URL it prints with
|
|
89
|
+
${installCommand()}. Imported source changes
|
|
90
|
+
produce serialized remote updates; configuration changes require restarting the
|
|
91
|
+
command. It serves only legacy direct-mode Environments; an Environment that
|
|
92
|
+
deploys immutable deployments is refused.
|
|
85
93
|
A shared direct-provider target additionally requires an external single-writer
|
|
86
94
|
boundary such as a CI/CD concurrency group.
|
|
87
|
-
The session file is machine-readable and authoritative when requested; human
|
|
88
|
-
stdout/stderr remains diagnostic. It requires an adapter that reports exact
|
|
89
|
-
installed Release evidence, so it is rejected for an Environment without an
|
|
90
|
-
installation and when --deploy-only suppresses installation.
|
|
91
95
|
A credential file is admitted and read once. Its value is passed only to the
|
|
92
|
-
deployment adapter
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
admission is absent.
|
|
96
|
+
deployment adapter; it never enters Domain Runtime secrets or diagnostics. It is
|
|
97
|
+
currently unavailable on Windows because private no-reparse file admission is
|
|
98
|
+
absent.
|
|
96
99
|
A secrets-file override is read once, passed to the Domain runtime as secrets,
|
|
97
100
|
never mutates the authored project, and is not watched for later changes. It is
|
|
98
101
|
also unavailable on Windows because private no-reparse admission is absent.
|
|
99
102
|
|
|
100
103
|
Stopping the watcher stops only local build orchestration. The remote deployment
|
|
101
|
-
|
|
104
|
+
remains available.
|
|
102
105
|
`,
|
|
103
106
|
build: `Build and verify a Domain without deploying it, and print its build digest.
|
|
104
107
|
|
|
@@ -129,20 +132,61 @@ Arguments:
|
|
|
129
132
|
Options:
|
|
130
133
|
--environment <name> Select the environment without a positional argument.
|
|
131
134
|
--json Print one DeployResultV1 on stdout; progress goes to stderr.
|
|
132
|
-
--
|
|
133
|
-
--as <identity> Select the Astrale identity for Services and installation calls.
|
|
135
|
+
--as <identity> Select the Astrale identity for the adapter's provider calls.
|
|
134
136
|
-h, --help Show help for deploy.
|
|
135
137
|
|
|
136
138
|
Behavior:
|
|
137
|
-
Builds and verifies the Domain
|
|
138
|
-
secrets, and
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
139
|
+
Builds and verifies the Domain and Runtime, rebuilds the Bundle exactly as build
|
|
140
|
+
does, loads declared secrets, and deploys through the selected adapter. It never
|
|
141
|
+
installs the Domain: install the URL it prints with
|
|
142
|
+
${installCommand()}.
|
|
143
|
+
The Environment's configuration selects how it deploys. An adapter that implements
|
|
144
|
+
deployRelease makes one immutable deployment per release and calls no instance: the
|
|
145
|
+
SDK seals the release for the deployment's URL, records the commit it was built
|
|
146
|
+
from, and the adapter creates that deployment or reuses it (adapter-astrale on
|
|
147
|
+
Admin's Services, through astrale call --admin). A new deployment binds the
|
|
148
|
+
Environment's current secrets; a reused one has its own secrets updated in place,
|
|
149
|
+
served once propagated; no other deployment's secrets change. Any other Environment
|
|
150
|
+
replaces its stable target in place (legacy direct mode, deprecated), warns on
|
|
151
|
+
stderr, serves a v3 Publication only, and warns when the uploaded code has another
|
|
152
|
+
build digest than the Bundle.
|
|
143
153
|
With --json, stdout holds only one DeployResultV1: the deployment's URL, which
|
|
144
154
|
astrale domain install takes, its digests, adapter and state. Exit status: 0 deployed,
|
|
145
|
-
1 failed, 2 usage error; a failed run prints nothing on stdout.
|
|
155
|
+
1 failed or refused, 2 usage error; a failed run prints nothing on stdout.
|
|
156
|
+
`,
|
|
157
|
+
list: `List the deployments of the Project's Environments that their hosts keep.
|
|
158
|
+
|
|
159
|
+
Usage:
|
|
160
|
+
astrale-domain list [--environment <name>] [--json]
|
|
161
|
+
|
|
162
|
+
Options:
|
|
163
|
+
--environment <name> List one Environment instead of every Environment.
|
|
164
|
+
--json Print one ListResultV1 on stdout; notices go to stderr.
|
|
165
|
+
--as <identity> Select the Astrale identity whose deployments the hosts list.
|
|
166
|
+
-h, --help Show help for list.
|
|
167
|
+
|
|
168
|
+
Behavior:
|
|
169
|
+
Asks the adapter of each Environment that deploys immutable deployments for the
|
|
170
|
+
deployments its host keeps for the caller, and prints each one's release, its name,
|
|
171
|
+
Environment and state, its last call and its expiry, and the URL
|
|
172
|
+
${installCommand()} takes. A name is computed
|
|
173
|
+
from the deployment's record and never stored, such as 1.4.2 + 7 commits · a1b2c3d ·
|
|
174
|
+
staging.
|
|
175
|
+
A preview expires 30 days after its activation or its last call, whichever is
|
|
176
|
+
later; a published deployment never does. Last calls are read from the host as it
|
|
177
|
+
counts them, so a host whose last calls cannot be read is not listed. A platform
|
|
178
|
+
dispatch namespace reads them from its calls dataset, and without Account Analytics
|
|
179
|
+
Read lists its deployments without last calls or expiries.
|
|
180
|
+
Listing changes nothing, at any host or instance.
|
|
181
|
+
An Environment in legacy direct mode, refused by deploy, or whose adapter lists no
|
|
182
|
+
deployments is reported on stderr and, with --json, under unlisted. A deployment
|
|
183
|
+
whose record this SDK does not admit is still listed, from what its host knows.
|
|
184
|
+
With --json, each deployment carries its call target: the path of its node on
|
|
185
|
+
Admin's Services, for astrale call "<path>.method.setSecret" --admin, or the
|
|
186
|
+
namespace and script of a platform dispatch namespace, which its operator tooling
|
|
187
|
+
takes.
|
|
188
|
+
Exit status: 0 listed, 1 a host could not be listed (with --json, nothing on
|
|
189
|
+
stdout), 2 usage error.
|
|
146
190
|
`,
|
|
147
191
|
test: `Run Project tests locally or against one selected Environment.
|
|
148
192
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Adapter, Build, LegacyAdapter, ResolvedRuntimeReference } from '../../deployment/index.js';
|
|
2
|
+
import type { DeployResultV1 } from './deploy-result.js';
|
|
3
|
+
/**
|
|
4
|
+
* Deploy one canonical Environment (CT33) as the immutable deployment of one sealed release.
|
|
5
|
+
*
|
|
6
|
+
* The SDK derives everything before the adapter's only effectful call: it bundles exactly as
|
|
7
|
+
* `astrale-domain build` does, asks the adapter to freeze the Environment's configuration and say
|
|
8
|
+
* where its host places deployments, derives the deployment label and URL from them (S3), seals
|
|
9
|
+
* the `DomainRelease` v4 the deployment serves at that URL (S4a), and reads the commit it is built
|
|
10
|
+
* from. `deployRelease` then creates that deployment or reuses it. The SDK makes no Kernel call,
|
|
11
|
+
* the deploy calls no instance and installs nothing: `astrale domain install <url>` installs the
|
|
12
|
+
* URL it prints.
|
|
13
|
+
*
|
|
14
|
+
* Returns the deploy result, or nothing once a failure is reported on stderr.
|
|
15
|
+
*/
|
|
16
|
+
export declare function deployImmutable(input: {
|
|
17
|
+
readonly projectDir: string;
|
|
18
|
+
readonly environment: string;
|
|
19
|
+
/** A canonical Environment's adapter (CT33), which implements adapter interface v2. */
|
|
20
|
+
readonly adapter: Adapter<object> | LegacyAdapter<object>;
|
|
21
|
+
readonly parameters: object;
|
|
22
|
+
readonly build: Build;
|
|
23
|
+
readonly runtime: ResolvedRuntimeReference;
|
|
24
|
+
readonly identity?: string;
|
|
25
|
+
readonly signal: AbortSignal;
|
|
26
|
+
readonly report: (line: string) => void;
|
|
27
|
+
}): Promise<DeployResultV1 | undefined>;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { resolve } from 'node:path';
|
|
2
|
+
import { deploymentContent, deploymentLabel, deploymentLine, deploymentUrl, } from '../../deployment/address/index.js';
|
|
3
|
+
import { assemble } from '../../deployment/index.js';
|
|
4
|
+
import { bundleBuild } from './build.js';
|
|
5
|
+
import { deploymentCommit } from './commit.js';
|
|
6
|
+
import { deployResult } from './deploy-result.js';
|
|
7
|
+
import { error } from './log.js';
|
|
8
|
+
import { environmentSecrets } from './secrets.js';
|
|
9
|
+
/**
|
|
10
|
+
* Deploy one canonical Environment (CT33) as the immutable deployment of one sealed release.
|
|
11
|
+
*
|
|
12
|
+
* The SDK derives everything before the adapter's only effectful call: it bundles exactly as
|
|
13
|
+
* `astrale-domain build` does, asks the adapter to freeze the Environment's configuration and say
|
|
14
|
+
* where its host places deployments, derives the deployment label and URL from them (S3), seals
|
|
15
|
+
* the `DomainRelease` v4 the deployment serves at that URL (S4a), and reads the commit it is built
|
|
16
|
+
* from. `deployRelease` then creates that deployment or reuses it. The SDK makes no Kernel call,
|
|
17
|
+
* the deploy calls no instance and installs nothing: `astrale domain install <url>` installs the
|
|
18
|
+
* URL it prints.
|
|
19
|
+
*
|
|
20
|
+
* Returns the deploy result, or nothing once a failure is reported on stderr.
|
|
21
|
+
*/
|
|
22
|
+
export async function deployImmutable(input) {
|
|
23
|
+
const { parameters, environment, build, signal } = input;
|
|
24
|
+
const adapter = releaseAdapter(input.adapter);
|
|
25
|
+
const identity = input.identity === undefined ? {} : { identity: input.identity };
|
|
26
|
+
const bundle = await bundleBuild({
|
|
27
|
+
bundler: adapter.bundler,
|
|
28
|
+
projectDir: input.projectDir,
|
|
29
|
+
build,
|
|
30
|
+
runtime: input.runtime,
|
|
31
|
+
signal,
|
|
32
|
+
});
|
|
33
|
+
const secrets = environmentSecrets(adapter, parameters, input.projectDir, input.runtime.runtime);
|
|
34
|
+
const configuration = adapter.configure(parameters, {
|
|
35
|
+
environment,
|
|
36
|
+
secrets: Object.freeze(Object.keys(secrets).sort()),
|
|
37
|
+
});
|
|
38
|
+
const placement = await adapter.placement(parameters, { environment, signal, ...identity });
|
|
39
|
+
const origin = build.schema.compiled.root.origin;
|
|
40
|
+
const label = deploymentLabel(deploymentLine({ origin, environment, addressing: placement.addressing }), deploymentContent(bundle.digest, configuration));
|
|
41
|
+
const release = assemble(build, bundle.digest, deploymentUrl(label, placement.routingDomain));
|
|
42
|
+
const commit = await deploymentCommit({
|
|
43
|
+
projectDir: input.projectDir,
|
|
44
|
+
// The configuration sits in the Project directory, and names its runtime relative to it.
|
|
45
|
+
runtimeModule: resolve(input.projectDir, input.runtime.reference.path),
|
|
46
|
+
signal,
|
|
47
|
+
});
|
|
48
|
+
const deployed = await adapter.deployRelease(parameters, {
|
|
49
|
+
projectDir: input.projectDir,
|
|
50
|
+
environment,
|
|
51
|
+
...identity,
|
|
52
|
+
secrets,
|
|
53
|
+
bundle,
|
|
54
|
+
configuration,
|
|
55
|
+
placement,
|
|
56
|
+
label,
|
|
57
|
+
release,
|
|
58
|
+
commit,
|
|
59
|
+
signal,
|
|
60
|
+
});
|
|
61
|
+
if (deployed.status !== 'ready') {
|
|
62
|
+
error(`Deployment failed during ${deployed.phase}: ${deployed.error.message}`);
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
const result = deployResult({ environment, adapter, release, deployment: deployed });
|
|
66
|
+
input.report(`Domain: ${result.origin}`);
|
|
67
|
+
input.report(`Environment: ${environment}`);
|
|
68
|
+
input.report(`Adapter: ${result.deployment.adapter}`);
|
|
69
|
+
input.report(`Deployment: ${label} · ${result.deployment.state}`);
|
|
70
|
+
input.report(`URL: ${result.url}`);
|
|
71
|
+
input.report(`Release: ${release.document.digest}`);
|
|
72
|
+
input.report(`Build: ${release.buildDigest}`);
|
|
73
|
+
input.report(secretsLine(label, result.secrets.state));
|
|
74
|
+
input.report('Ready: deployment verified');
|
|
75
|
+
return result;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* What the deploy did to the secrets of the one deployment it made or reused: `bound` to the new
|
|
79
|
+
* deployment, or `updated` or left `unchanged` in place on the reused one. No other deployment's
|
|
80
|
+
* secrets are ever written. A value rewritten in place is served once the host propagated it,
|
|
81
|
+
* which is eventually consistent (about 4 s on Workers for Platforms, AM-114).
|
|
82
|
+
*/
|
|
83
|
+
function secretsLine(label, state) {
|
|
84
|
+
return state === 'updated'
|
|
85
|
+
? `Secrets: updated in place on ${label}; the new values are served once propagated ` +
|
|
86
|
+
'(eventually consistent, about 4 s)'
|
|
87
|
+
: `Secrets: ${state}`;
|
|
88
|
+
}
|
|
89
|
+
/** The adapter of a canonical Environment: CT33 selects canonical only beside `deployRelease`. */
|
|
90
|
+
function releaseAdapter(adapter) {
|
|
91
|
+
if (!('deployRelease' in adapter) || typeof adapter.deployRelease !== 'function') {
|
|
92
|
+
throw new TypeError(`Adapter ${adapter.name}@${adapter.version} implements no deployRelease and deploys no immutable deployment.`);
|
|
93
|
+
}
|
|
94
|
+
return adapter;
|
|
95
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `@astrale-os/sdk/cli` — the `astrale-domain` CLI
|
|
3
|
-
* (dev | build | deploy | test | lint | package),
|
|
4
|
-
*
|
|
3
|
+
* (dev | build | deploy | list | test | lint | package), its JSON results, and the explicit dotenv
|
|
4
|
+
* boundary. `dev` is deprecated and lives in `legacy/development/`.
|
|
5
5
|
*
|
|
6
6
|
* Node-only: the CLI imports `node:fs`/`node:module`/`node:url` and runs under
|
|
7
7
|
* Bun (it imports the project's `astrale.config.ts` directly). This subpath is
|
|
@@ -13,6 +13,5 @@
|
|
|
13
13
|
export { run } from './run.js';
|
|
14
14
|
export type { BuildResultV1 } from './build.js';
|
|
15
15
|
export type { DeployResultV1, DeploymentSecretsState } from './deploy-result.js';
|
|
16
|
+
export type { ListedDeploymentV1, ListResultV1, UnlistedEnvironmentV1 } from './list.js';
|
|
16
17
|
export { loadDeclaredSecrets } from './dotenv.js';
|
|
17
|
-
export { DEVELOPMENT_SESSION_FILE_VERSION, acceptDevelopmentSessionFileV1, } from './development/session-file.js';
|
|
18
|
-
export type { DevelopmentSessionFileV1, DevelopmentSessionPhaseV1, DevelopmentSessionProjectV1, DevelopmentSessionReleaseV1, } from './development/session-file.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `@astrale-os/sdk/cli` — the `astrale-domain` CLI
|
|
3
|
-
* (dev | build | deploy | test | lint | package),
|
|
4
|
-
*
|
|
3
|
+
* (dev | build | deploy | list | test | lint | package), its JSON results, and the explicit dotenv
|
|
4
|
+
* boundary. `dev` is deprecated and lives in `legacy/development/`.
|
|
5
5
|
*
|
|
6
6
|
* Node-only: the CLI imports `node:fs`/`node:module`/`node:url` and runs under
|
|
7
7
|
* Bun (it imports the project's `astrale.config.ts` directly). This subpath is
|
|
@@ -12,4 +12,3 @@
|
|
|
12
12
|
*/
|
|
13
13
|
export { run } from './run.js';
|
|
14
14
|
export { loadDeclaredSecrets } from './dotenv.js';
|
|
15
|
-
export { DEVELOPMENT_SESSION_FILE_VERSION, acceptDevelopmentSessionFileV1, } from './development/session-file.js';
|
|
@@ -12,9 +12,11 @@ import type { DeployResultV1 } from '../deploy-result.js';
|
|
|
12
12
|
*
|
|
13
13
|
* @deprecated Stable-target deploy path only. Replacement: `deployResult`, the result of an
|
|
14
14
|
* immutable deployment. Consumers: the direct-mode configurations of domains ai-gateway, closing,
|
|
15
|
-
* grc, integrations and issues (until SV15),
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* grc, integrations and issues (until SV15), domains organization (until it leaves direct mode,
|
|
16
|
+
* AM-147), the Services `beta` and `prod` (until SV12), `development` (until SV9) and frozen
|
|
17
|
+
* `admin-beta` (until D19) environments, shell (until SH2) and its frozen `legacy-v3` (until D22),
|
|
18
|
+
* and ui:domain (until UI1). Deleted with the legacy deploy path (D10), once no configuration on
|
|
19
|
+
* any repository's main selects it (CT33, AM-147).
|
|
18
20
|
*/
|
|
19
21
|
export declare function stableTargetDeployResult(input: {
|
|
20
22
|
readonly environment: string;
|
|
@@ -10,9 +10,11 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @deprecated Stable-target deploy path only. Replacement: `deployResult`, the result of an
|
|
12
12
|
* immutable deployment. Consumers: the direct-mode configurations of domains ai-gateway, closing,
|
|
13
|
-
* grc, integrations and issues (until SV15),
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* grc, integrations and issues (until SV15), domains organization (until it leaves direct mode,
|
|
14
|
+
* AM-147), the Services `beta` and `prod` (until SV12), `development` (until SV9) and frozen
|
|
15
|
+
* `admin-beta` (until D19) environments, shell (until SH2) and its frozen `legacy-v3` (until D22),
|
|
16
|
+
* and ui:domain (until UI1). Deleted with the legacy deploy path (D10), once no configuration on
|
|
17
|
+
* any repository's main selects it (CT33, AM-147).
|
|
16
18
|
*/
|
|
17
19
|
export function stableTargetDeployResult(input) {
|
|
18
20
|
const { publication, addressing } = input.deployment.release;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { StableTargetAdapter } from '../
|
|
1
|
+
import type { PreparedArtifact } from '../../../../deployment/adapter/index.js';
|
|
2
|
+
import type { StableTargetAdapter } from '../stable-target-adapter.js';
|
|
3
3
|
export interface DevelopmentCandidate {
|
|
4
4
|
readonly adapter: StableTargetAdapter<object>;
|
|
5
5
|
readonly parameters: object;
|
|
6
|
-
readonly installation?: InstallationTarget;
|
|
7
6
|
readonly artifact: PreparedArtifact;
|
|
8
7
|
readonly secrets: Readonly<Record<string, string>>;
|
|
9
8
|
readonly sources: ReadonlySet<string>;
|
|
@@ -22,5 +21,5 @@ export declare class DevelopmentCandidateBuilder {
|
|
|
22
21
|
}
|
|
23
22
|
export declare function discoverRuntimePath(configPath: string): Promise<string>;
|
|
24
23
|
export declare function sameEnvironment(current: DevelopmentCandidate, candidate: DevelopmentCandidate): boolean;
|
|
25
|
-
/** Identify a rebuilt candidate that cannot change provider
|
|
24
|
+
/** Identify a rebuilt candidate that cannot change provider state. */
|
|
26
25
|
export declare function sameDeploymentCandidate(current: DevelopmentCandidate, candidate: DevelopmentCandidate): boolean;
|
|
@@ -2,11 +2,11 @@ import { existsSync } from 'node:fs';
|
|
|
2
2
|
import { mkdir, rm, writeFile } from 'node:fs/promises';
|
|
3
3
|
import { dirname, isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
4
4
|
import { pathToFileURL } from 'node:url';
|
|
5
|
-
import { admitRuntime, compile, resolveRuntime, runtime, verifyPreflight, } from '
|
|
6
|
-
import { admitProjectModule } from '
|
|
7
|
-
import { loadDeclaredSecrets } from '
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { admitRuntime, compile, resolveRuntime, runtime, verifyPreflight, } from '../../../../deployment/index.js';
|
|
6
|
+
import { admitProjectModule } from '../../../../project/index.js';
|
|
7
|
+
import { loadDeclaredSecrets } from '../../dotenv.js';
|
|
8
|
+
import { selectEnvironment } from '../../project.js';
|
|
9
|
+
import { stableTargetAdapter } from '../stable-target-adapter.js';
|
|
10
10
|
import { projectImportPlugin } from './project-imports.js';
|
|
11
11
|
import { DevelopmentSources } from './sources.js';
|
|
12
12
|
/** Rebuild one complete, isolated Environment candidate from authored sources. */
|
|
@@ -84,9 +84,6 @@ export class DevelopmentCandidateBuilder {
|
|
|
84
84
|
const source = await adapter.prepare(parameters, {
|
|
85
85
|
projectDir: this.#projectDir,
|
|
86
86
|
environment: this.#environment,
|
|
87
|
-
...(environment.installation === undefined
|
|
88
|
-
? {}
|
|
89
|
-
: { installation: environment.installation }),
|
|
90
87
|
mode: 'release',
|
|
91
88
|
recordSource: sources.record,
|
|
92
89
|
signal,
|
|
@@ -102,9 +99,6 @@ export class DevelopmentCandidateBuilder {
|
|
|
102
99
|
return Object.freeze({
|
|
103
100
|
adapter,
|
|
104
101
|
parameters,
|
|
105
|
-
...(environment.installation === undefined
|
|
106
|
-
? {}
|
|
107
|
-
: { installation: environment.installation }),
|
|
108
102
|
artifact,
|
|
109
103
|
secrets: declared.values,
|
|
110
104
|
sources: sources.snapshot(),
|
|
@@ -125,10 +119,9 @@ export function sameEnvironment(current, candidate) {
|
|
|
125
119
|
candidate.adapter.version === current.adapter.version &&
|
|
126
120
|
candidate.artifact.build.schema.compiled.root.origin ===
|
|
127
121
|
current.artifact.build.schema.compiled.root.origin &&
|
|
128
|
-
stable(candidate.parameters) === stable(current.parameters)
|
|
129
|
-
stable(candidate.installation) === stable(current.installation));
|
|
122
|
+
stable(candidate.parameters) === stable(current.parameters));
|
|
130
123
|
}
|
|
131
|
-
/** Identify a rebuilt candidate that cannot change provider
|
|
124
|
+
/** Identify a rebuilt candidate that cannot change provider state. */
|
|
132
125
|
export function sameDeploymentCandidate(current, candidate) {
|
|
133
126
|
return (sameEnvironment(current, candidate) &&
|
|
134
127
|
candidate.artifact.build.schema.compiled.root.revision ===
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReadyDeployResult } from '../../../../deployment/adapter/index.js';
|
|
2
|
+
import type { DevelopmentCandidate } from './candidate.js';
|
|
3
|
+
export interface DevelopmentDeploymentInput {
|
|
4
|
+
readonly projectDir: string;
|
|
5
|
+
readonly environment: string;
|
|
6
|
+
readonly identity?: string;
|
|
7
|
+
readonly credential?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Commit and verify one complete remote candidate. A development deployment installs nothing. */
|
|
10
|
+
export declare function deployDevelopmentCandidate(candidate: DevelopmentCandidate, input: DevelopmentDeploymentInput, signal: AbortSignal): Promise<ReadyDeployResult>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { verifyDeployment } from '../../../../deployment/index.js';
|
|
2
|
+
/** Commit and verify one complete remote candidate. A development deployment installs nothing. */
|
|
3
|
+
export async function deployDevelopmentCandidate(candidate, input, signal) {
|
|
4
|
+
const deployed = await candidate.adapter.deploy(candidate.parameters, {
|
|
5
|
+
projectDir: input.projectDir,
|
|
6
|
+
environment: input.environment,
|
|
7
|
+
...(input.identity === undefined ? {} : { identity: input.identity }),
|
|
8
|
+
...(input.credential === undefined ? {} : { credential: input.credential }),
|
|
9
|
+
secrets: candidate.secrets,
|
|
10
|
+
artifact: candidate.artifact,
|
|
11
|
+
signal,
|
|
12
|
+
});
|
|
13
|
+
const verified = verifyDeployment(candidate.artifact, deployed);
|
|
14
|
+
if (verified.status === 'failed') {
|
|
15
|
+
throw new Error(`Deployment failed during ${verified.phase}: ${verified.error.message}`, {
|
|
16
|
+
cause: verified.error,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return verified;
|
|
20
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What replaces `astrale-domain dev`, for its author: development is not a command of the
|
|
3
|
+
* deployment model. A developer, or an agent, deploys the Environment and installs the URL that
|
|
4
|
+
* deploy prints on their own instance.
|
|
5
|
+
*
|
|
6
|
+
* `--direct` sends that URL to the instance's Kernel. Without it, the CLI releases published so
|
|
7
|
+
* far route a bare URL through the Admin catalog, which only knows published entries, so a fresh
|
|
8
|
+
* deployment URL fails to install. The CLI keeps accepting `--direct` after it starts sending
|
|
9
|
+
* every URL to the Kernel, and drops the flag only after this command is removed.
|
|
10
|
+
*/
|
|
11
|
+
export declare function developmentDeprecation(environment: string): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What replaces `astrale-domain dev`, for its author: development is not a command of the
|
|
3
|
+
* deployment model. A developer, or an agent, deploys the Environment and installs the URL that
|
|
4
|
+
* deploy prints on their own instance.
|
|
5
|
+
*
|
|
6
|
+
* `--direct` sends that URL to the instance's Kernel. Without it, the CLI releases published so
|
|
7
|
+
* far route a bare URL through the Admin catalog, which only knows published entries, so a fresh
|
|
8
|
+
* deployment URL fails to install. The CLI keeps accepting `--direct` after it starts sending
|
|
9
|
+
* every URL to the Kernel, and drops the flag only after this command is removed.
|
|
10
|
+
*/
|
|
11
|
+
export function developmentDeprecation(environment) {
|
|
12
|
+
return `astrale-domain dev is deprecated and will be removed: run \`astrale-domain deploy ${environment}\`, then \`astrale domain install <url> --direct -i <instance>\` with the URL it prints.`;
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Watch one Project Environment and serialize complete remote deployment generations. Each
|
|
3
|
+
* generation replaces the Environment's stable target in place; none installs anything.
|
|
4
|
+
*
|
|
5
|
+
* @deprecated Deploy the Environment with `astrale-domain deploy`, then install the printed URL
|
|
6
|
+
* with `astrale domain install <url> --direct -i <instance>`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function develop(input: {
|
|
9
|
+
readonly configPath: string;
|
|
10
|
+
readonly projectDir: string;
|
|
11
|
+
readonly environment: string;
|
|
12
|
+
readonly identity?: string;
|
|
13
|
+
readonly credentialFile?: string;
|
|
14
|
+
readonly secretsFile?: string;
|
|
15
|
+
}): Promise<number>;
|