@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.
Files changed (58) hide show
  1. package/README.md +0 -4
  2. package/dist/application/workflow/durable.d.ts +12 -8
  3. package/dist/deployment/adapter/adapter.d.ts +16 -5
  4. package/dist/deployment/adapter/define.d.ts +1 -1
  5. package/dist/deployment/adapter/define.js +40 -1
  6. package/dist/deployment/adapter/release/command.d.ts +33 -0
  7. package/dist/deployment/adapter/release/command.js +1 -0
  8. package/dist/deployment/adapter/release/context.d.ts +3 -4
  9. package/dist/deployment/adapter/release/index.d.ts +1 -0
  10. package/dist/deployment/adapter/release/list.d.ts +11 -10
  11. package/dist/deployment/address/configuration.d.ts +12 -0
  12. package/dist/deployment/address/configuration.js +11 -0
  13. package/dist/deployment/address/index.d.ts +3 -3
  14. package/dist/deployment/address/index.js +2 -3
  15. package/dist/deployment/address/label.d.ts +5 -5
  16. package/dist/deployment/address/label.js +5 -5
  17. package/dist/deployment/address/record.d.ts +21 -0
  18. package/dist/deployment/address/record.js +34 -0
  19. package/dist/deployment/address/summary.d.ts +17 -40
  20. package/dist/deployment/address/summary.js +1 -117
  21. package/dist/deployment/index.d.ts +1 -1
  22. package/dist/deployment/verify/index.d.ts +1 -1
  23. package/dist/deployment/verify/index.js +1 -1
  24. package/dist/deployment/verify/readiness/index.d.ts +7 -0
  25. package/dist/deployment/verify/readiness/index.js +17 -0
  26. package/dist/deployment/worker/address.d.ts +26 -0
  27. package/dist/deployment/worker/address.js +43 -0
  28. package/dist/deployment/worker/build.d.ts +60 -0
  29. package/dist/deployment/worker/build.js +172 -0
  30. package/dist/deployment/worker/configuration.d.ts +73 -0
  31. package/dist/deployment/worker/configuration.js +165 -0
  32. package/dist/deployment/worker/content.d.ts +38 -0
  33. package/dist/deployment/worker/content.js +169 -0
  34. package/dist/deployment/worker/index.d.ts +29 -0
  35. package/dist/deployment/worker/index.js +29 -0
  36. package/dist/deployment/worker/limits.d.ts +30 -0
  37. package/dist/deployment/worker/limits.js +30 -0
  38. package/dist/deployment/worker/record.d.ts +29 -0
  39. package/dist/deployment/worker/record.js +69 -0
  40. package/dist/deployment/worker/request.d.ts +118 -0
  41. package/dist/deployment/worker/request.js +280 -0
  42. package/dist/deployment/worker/response.d.ts +104 -0
  43. package/dist/deployment/worker/response.js +213 -0
  44. package/dist/execution/workflows/run.js +18 -6
  45. package/dist/tooling/cli/adapter-command.d.ts +35 -0
  46. package/dist/tooling/cli/adapter-command.js +66 -0
  47. package/dist/tooling/cli/arguments.d.ts +7 -1
  48. package/dist/tooling/cli/arguments.js +53 -1
  49. package/dist/tooling/cli/help.js +11 -8
  50. package/dist/tooling/cli/immutable-deployment.d.ts +2 -2
  51. package/dist/tooling/cli/index.d.ts +4 -2
  52. package/dist/tooling/cli/index.js +3 -2
  53. package/dist/tooling/cli/list.d.ts +5 -5
  54. package/dist/tooling/cli/list.js +16 -14
  55. package/dist/tooling/cli/orchestrate.js +18 -0
  56. package/dist/tooling/cli/publish/index.d.ts +4 -4
  57. package/dist/tooling/cli/publish/index.js +8 -9
  58. 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, where
67
- * the host has no registry principal to keep it (the platform namespace), `adapter.retain`
68
- * keeps the published deployment (CT36). Admin keeps no mark on its Services' deployments:
69
- * Services keeps every deployment until it is retired.
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, where
48
- * the host has no registry principal to keep it (the platform namespace), `adapter.retain`
49
- * keeps the published deployment (CT36). Admin keeps no mark on its Services' deployments:
50
- * Services keeps every deployment until it is retired.
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: the adapter
298
- * declares `retain` for the platform namespace only (CT36). Admin's Services keeps every
299
- * deployment until it is retired, so adapter-astrale declares none. A `RetainRefusal` (absent or
300
- * retired) is `refused`, which no rerun changes; any other rejection `failed`, which a rerun
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.21",
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"