@astrale-os/sdk 0.6.0-beta.21 → 0.6.0-beta.23
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 +0 -4
- package/dist/application/workflow/durable.d.ts +12 -8
- package/dist/deployment/adapter/adapter.d.ts +16 -5
- package/dist/deployment/adapter/define.d.ts +1 -1
- package/dist/deployment/adapter/define.js +40 -1
- package/dist/deployment/adapter/release/command.d.ts +33 -0
- package/dist/deployment/adapter/release/command.js +1 -0
- package/dist/deployment/adapter/release/context.d.ts +3 -4
- package/dist/deployment/adapter/release/index.d.ts +1 -0
- package/dist/deployment/adapter/release/list.d.ts +11 -10
- package/dist/deployment/address/configuration.d.ts +12 -0
- package/dist/deployment/address/configuration.js +11 -0
- package/dist/deployment/address/index.d.ts +3 -3
- package/dist/deployment/address/index.js +2 -3
- 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 +17 -40
- package/dist/deployment/address/summary.js +1 -117
- package/dist/deployment/index.d.ts +1 -1
- package/dist/deployment/verify/index.d.ts +1 -1
- package/dist/deployment/verify/index.js +1 -1
- package/dist/deployment/verify/readiness/index.d.ts +7 -0
- package/dist/deployment/verify/readiness/index.js +17 -0
- 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 +104 -0
- package/dist/deployment/worker/response.js +213 -0
- package/dist/execution/workflows/run.js +18 -6
- package/dist/tooling/cli/adapter-command.d.ts +35 -0
- package/dist/tooling/cli/adapter-command.js +66 -0
- package/dist/tooling/cli/arguments.d.ts +7 -1
- package/dist/tooling/cli/arguments.js +53 -1
- package/dist/tooling/cli/help.js +11 -8
- package/dist/tooling/cli/immutable-deployment.d.ts +2 -2
- package/dist/tooling/cli/index.d.ts +4 -2
- package/dist/tooling/cli/index.js +3 -2
- package/dist/tooling/cli/list.d.ts +5 -5
- package/dist/tooling/cli/list.js +16 -14
- package/dist/tooling/cli/orchestrate.js +18 -0
- package/dist/tooling/cli/publish/index.d.ts +4 -4
- package/dist/tooling/cli/publish/index.js +8 -9
- package/package.json +5 -1
|
@@ -2,6 +2,7 @@ import { existsSync } from 'node:fs';
|
|
|
2
2
|
import { dirname, join, resolve } from 'node:path';
|
|
3
3
|
import { admitRuntime, compile, resolveRuntime } from '../../deployment/index.js';
|
|
4
4
|
import { packageDomain } from '../packaging/index.js';
|
|
5
|
+
import { runAdapterCommand } from './adapter-command.js';
|
|
5
6
|
import { parseArgs } from './arguments.js';
|
|
6
7
|
import { buildResult, bundleBuild, bundlerCopyWarnings, projectBundlers } from './build.js';
|
|
7
8
|
import { BunRequiredError } from './bun.js';
|
|
@@ -64,6 +65,23 @@ export async function run(argv) {
|
|
|
64
65
|
const project = await loadProject(configPath);
|
|
65
66
|
if (parsed.command === 'list')
|
|
66
67
|
return list(parsed, project, projectDir);
|
|
68
|
+
if (parsed.command === 'adapter') {
|
|
69
|
+
const lifecycle = deploymentLifecycle(`${parsed.adapter} ${parsed.adapterCommand} interrupted.`);
|
|
70
|
+
try {
|
|
71
|
+
return await runAdapterCommand({
|
|
72
|
+
adapter: parsed.adapter,
|
|
73
|
+
command: parsed.adapterCommand,
|
|
74
|
+
environment: parsed.env,
|
|
75
|
+
definition: selectEnvironment(project, parsed.env),
|
|
76
|
+
options: parsed.options ?? {},
|
|
77
|
+
json: parsed.json === true,
|
|
78
|
+
signal: lifecycle.signal,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
finally {
|
|
82
|
+
lifecycle.dispose();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
67
85
|
if (parsed.command === 'yank')
|
|
68
86
|
return yank(parsed, project);
|
|
69
87
|
if (parsed.command === 'publish') {
|
|
@@ -63,10 +63,10 @@ export declare const VERIFY_TIMEOUT_MS = 60000;
|
|
|
63
63
|
* 6. Ask Admin for the Publication; a version Admin gave another release meanwhile is refused,
|
|
64
64
|
* naming the winner's release, and this deployment stays a preview. Any other failure says
|
|
65
65
|
* what CT29 says of it: Admin may have created the Publication (a rerun settles it), Admin made
|
|
66
|
-
* none and a rerun can help, or Admin refused and a rerun meets the same refusal. Then,
|
|
67
|
-
* the host
|
|
68
|
-
* keeps the published deployment
|
|
69
|
-
*
|
|
66
|
+
* none and a rerun can help, or Admin refused and a rerun meets the same refusal. Then, when
|
|
67
|
+
* the adapter declares `retain` (a host with no registry principal to keep it, CT36), it
|
|
68
|
+
* keeps the published deployment. No first-party adapter declares it: Admin's Services and a
|
|
69
|
+
* Cloudflare dispatch namespace keep every deployment until its owner retires it.
|
|
70
70
|
*
|
|
71
71
|
* Steps 0 to 3 make no deploy call. Never installs.
|
|
72
72
|
*/
|
|
@@ -44,10 +44,10 @@ const DEFAULT_DEPENDENCIES = Object.freeze({
|
|
|
44
44
|
* 6. Ask Admin for the Publication; a version Admin gave another release meanwhile is refused,
|
|
45
45
|
* naming the winner's release, and this deployment stays a preview. Any other failure says
|
|
46
46
|
* what CT29 says of it: Admin may have created the Publication (a rerun settles it), Admin made
|
|
47
|
-
* none and a rerun can help, or Admin refused and a rerun meets the same refusal. Then,
|
|
48
|
-
* the host
|
|
49
|
-
* keeps the published deployment
|
|
50
|
-
*
|
|
47
|
+
* none and a rerun can help, or Admin refused and a rerun meets the same refusal. Then, when
|
|
48
|
+
* the adapter declares `retain` (a host with no registry principal to keep it, CT36), it
|
|
49
|
+
* keeps the published deployment. No first-party adapter declares it: Admin's Services and a
|
|
50
|
+
* Cloudflare dispatch namespace keep every deployment until its owner retires it.
|
|
51
51
|
*
|
|
52
52
|
* Steps 0 to 3 make no deploy call. Never installs.
|
|
53
53
|
*/
|
|
@@ -294,11 +294,10 @@ function described(cause) {
|
|
|
294
294
|
return cause instanceof RegistryCliError ? `${cause.code}: ${cause.message}` : message(cause);
|
|
295
295
|
}
|
|
296
296
|
/**
|
|
297
|
-
* Keep the published deployment where its host has no registry principal to mark it
|
|
298
|
-
* declares `retain`
|
|
299
|
-
*
|
|
300
|
-
*
|
|
301
|
-
* retries.
|
|
297
|
+
* Keep the published deployment where its host has no registry principal to mark it, when the
|
|
298
|
+
* adapter declares `retain` (CT36); an adapter without it keeps every deployment until it is
|
|
299
|
+
* retired, as adapter-astrale and adapter-cloudflare do. A `RetainRefusal` (absent or retired) is
|
|
300
|
+
* `refused`, which no rerun changes; any other rejection `failed`, which a rerun retries.
|
|
302
301
|
*/
|
|
303
302
|
async function retain(plan, signal) {
|
|
304
303
|
const { adapter } = plan;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrale-os/sdk",
|
|
3
|
-
"version": "0.6.0-beta.
|
|
3
|
+
"version": "0.6.0-beta.23",
|
|
4
4
|
"description": "Schema-first SDK for defining, composing, and deploying Astrale domains",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astrale",
|
|
@@ -167,6 +167,10 @@
|
|
|
167
167
|
"types": "./dist/deployment/address/vectors.d.ts",
|
|
168
168
|
"import": "./dist/deployment/address/vectors.js"
|
|
169
169
|
},
|
|
170
|
+
"./deployment/worker": {
|
|
171
|
+
"types": "./dist/deployment/worker/index.d.ts",
|
|
172
|
+
"import": "./dist/deployment/worker/index.js"
|
|
173
|
+
},
|
|
170
174
|
"./deployment/release": {
|
|
171
175
|
"types": "./dist/deployment/release/index.d.ts",
|
|
172
176
|
"import": "./dist/deployment/release/index.js"
|