@astrale-os/adapter-astrale 0.5.0-beta.161 → 0.5.0-beta.162
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 +18 -25
- package/dist/adapter.js +2 -9
- package/dist/deploy/deploy.js +3 -11
- package/dist/deploy/progress.d.ts +1 -1
- package/dist/deploy/progress.js +0 -1
- package/dist/deploy/readiness.d.ts +3 -1
- package/dist/index.d.ts +13 -9
- package/dist/index.js +13 -9
- package/dist/params.d.ts +13 -3
- package/package.json +3 -3
- package/template/astrale.config.ts +9 -4
package/README.md
CHANGED
|
@@ -15,26 +15,28 @@ export default defineProject({
|
|
|
15
15
|
domain,
|
|
16
16
|
environments: {
|
|
17
17
|
development: {
|
|
18
|
-
deployment: astrale({ secrets: '.env.dev' }),
|
|
19
|
-
installation: { instance: 'customer-development' },
|
|
20
|
-
},
|
|
21
|
-
preview: {
|
|
22
|
-
deployment: astrale({ instance: 'customer-development' }),
|
|
18
|
+
deployment: astrale({ instance: 'customer-development', secrets: '.env.dev' }),
|
|
23
19
|
},
|
|
24
20
|
},
|
|
25
21
|
})
|
|
26
22
|
```
|
|
27
23
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
The adapter deploys through the Services Domain on the instance `astrale({ instance })` names; an
|
|
25
|
+
Environment without one is refused. A deploy never installs the Domain: install the URL
|
|
26
|
+
`astrale-domain deploy <environment>` prints with
|
|
27
|
+
`astrale domain install <url> --direct -i <instance>`. The deploy itself still calls those Services
|
|
28
|
+
through the instance's Kernel, and installs the Services Domain on the instance when it is missing.
|
|
29
|
+
A Project Environment that still declares `installation` is refused before any effect, naming
|
|
30
|
+
those two commands.
|
|
33
31
|
|
|
34
32
|
`astrale-domain dev <environment>` and `astrale-domain deploy <environment>` use the same remote
|
|
35
33
|
provider path. The adapter starts no local Worker, Vite server, or tunnel. Stopping a watcher retains
|
|
36
|
-
the remote Service, stable issuer,
|
|
37
|
-
|
|
34
|
+
the remote Service, stable issuer, and secrets.
|
|
35
|
+
|
|
36
|
+
This instance mode replaces one stable Service in place, so the SDK deploys it in legacy direct mode
|
|
37
|
+
and warns that it is deprecated. It is replaced by immutable deployments once this adapter
|
|
38
|
+
implements `deployRelease`; `instance` and `signingIdentity` are deprecated, and refused from then
|
|
39
|
+
on. New Projects scaffolded from this template carry both until then.
|
|
38
40
|
|
|
39
41
|
The adapter sends provider-neutral deployment material: Services receives no Schema revision,
|
|
40
42
|
Publication identity, issuer, or callable inventory. It admits exact Services evidence, assembles
|
|
@@ -60,17 +62,8 @@ rename them there. The same names below the root remain ordinary files.
|
|
|
60
62
|
|
|
61
63
|
Services is also the cross-machine serialization boundary for one managed Service. Its graph
|
|
62
64
|
operation receipt admits one deployment at a time, and provider promotion is conditional on the
|
|
63
|
-
observed Cloudflare digest. The SDK separately locks the Project Environment inside one checkout
|
|
64
|
-
|
|
65
|
-
neither local lease is
|
|
66
|
-
the distributed safety mechanism.
|
|
67
|
-
|
|
68
|
-
For an installed Environment with a frontend, development opens the default installed View and
|
|
69
|
-
reports its page URL. Each successful update refreshes that same local View session in place;
|
|
70
|
-
stopping closes the View session while retaining the Service and Domain installation. The existing
|
|
71
|
-
private `--credential-file` flag authenticates provider, installation, and View calls without
|
|
72
|
-
placing the credential in Project configuration or evidence.
|
|
65
|
+
observed Cloudflare digest. The SDK separately locks the Project Environment inside one checkout;
|
|
66
|
+
that local lease is not the distributed safety mechanism.
|
|
73
67
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
versioned `DevelopmentSessionFileV1` snapshot. It never contains secrets.
|
|
68
|
+
The private `--credential-file` flag of `astrale-domain dev` authenticates the adapter's provider
|
|
69
|
+
calls without placing the credential in Project configuration.
|
package/dist/adapter.js
CHANGED
|
@@ -37,15 +37,8 @@ export function astraleWithDependencies(parameters, dependencies) {
|
|
|
37
37
|
// Services hosts the same generated Worker: both adapters share one build.
|
|
38
38
|
bundler: cloudflareWorkerBundler,
|
|
39
39
|
admit(parameters, context) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if (deploymentInstance === undefined && installationInstance === undefined) {
|
|
43
|
-
throw new TypeError(`Astrale Environment ${context.environment} requires installation.instance or astrale({ instance }).`);
|
|
44
|
-
}
|
|
45
|
-
if (deploymentInstance !== undefined &&
|
|
46
|
-
installationInstance !== undefined &&
|
|
47
|
-
deploymentInstance !== installationInstance) {
|
|
48
|
-
throw new TypeError(`Astrale Environment ${context.environment} deployment and installation instances must match.`);
|
|
40
|
+
if (parameters.instance === undefined) {
|
|
41
|
+
throw new TypeError(`Astrale Environment ${context.environment} requires astrale({ instance }): the instance whose Services hosts its deployment.`);
|
|
49
42
|
}
|
|
50
43
|
},
|
|
51
44
|
prepare: dependencies.prepare,
|
package/dist/deploy/deploy.js
CHANGED
|
@@ -11,15 +11,9 @@ import { deployedService } from './service/response.js';
|
|
|
11
11
|
import { serviceKeyFromOrigin } from './service/service-key.js';
|
|
12
12
|
const SERVICES_ORIGIN = 'services.astrale.ai';
|
|
13
13
|
export async function deployAstrale(parameters, context, dependencies) {
|
|
14
|
-
const
|
|
15
|
-
const instance = parameters.instance ?? installationInstance;
|
|
14
|
+
const instance = parameters.instance;
|
|
16
15
|
if (instance === undefined) {
|
|
17
|
-
return failed('prerequisite', progress(), new TypeError('Astrale deployment requires
|
|
18
|
-
}
|
|
19
|
-
if (parameters.instance !== undefined &&
|
|
20
|
-
installationInstance !== undefined &&
|
|
21
|
-
parameters.instance !== installationInstance) {
|
|
22
|
-
return failed('prerequisite', progress(), new TypeError('Astrale deployment and installation instances must match.'));
|
|
16
|
+
return failed('prerequisite', progress(), new TypeError('Astrale deployment requires astrale({ instance }).'));
|
|
23
17
|
}
|
|
24
18
|
let secrets;
|
|
25
19
|
let signing;
|
|
@@ -40,9 +34,7 @@ export async function deployAstrale(parameters, context, dependencies) {
|
|
|
40
34
|
try {
|
|
41
35
|
identity = authorityArguments({
|
|
42
36
|
...(context.credential === undefined ? {} : { credential: context.credential }),
|
|
43
|
-
...(context.credential !== undefined
|
|
44
|
-
? {}
|
|
45
|
-
: { identity: context.identity ?? context.installation?.identity }),
|
|
37
|
+
...(context.credential !== undefined ? {} : { identity: context.identity }),
|
|
46
38
|
});
|
|
47
39
|
}
|
|
48
40
|
catch (cause) {
|
|
@@ -4,4 +4,4 @@ export declare const NONE: Readonly<{
|
|
|
4
4
|
kind: 'none';
|
|
5
5
|
}>;
|
|
6
6
|
export declare function progress(input?: Partial<DeploymentProgress>): DeploymentProgress;
|
|
7
|
-
export declare function failed(phase: 'prerequisite' | 'provider' | 'addressing' | 'release' | 'configuration' | '
|
|
7
|
+
export declare function failed(phase: 'prerequisite' | 'provider' | 'addressing' | 'release' | 'configuration' | 'readiness', deploymentProgress: DeploymentProgress, cause: unknown, release?: legacy.Release): DeployResult;
|
package/dist/deploy/progress.js
CHANGED
|
@@ -4,7 +4,6 @@ export function progress(input = {}) {
|
|
|
4
4
|
prerequisite: input.prerequisite ?? NONE,
|
|
5
5
|
provider: input.provider ?? NONE,
|
|
6
6
|
configuration: input.configuration ?? NONE,
|
|
7
|
-
installation: input.installation ?? NONE,
|
|
8
7
|
});
|
|
9
8
|
}
|
|
10
9
|
export function failed(phase, deploymentProgress, cause, release) {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import type { legacy } from '@astrale-os/sdk/deployment/release';
|
|
2
2
|
import { verifyReadiness } from '@astrale-os/sdk/deployment/verify';
|
|
3
|
-
|
|
3
|
+
/** One readiness check of the stable Worker this direct-mode deploy published. */
|
|
4
|
+
export type ReadinessCheck = (release: legacy.Release, options: NonNullable<Parameters<typeof verifyReadiness>[1]>) => Promise<void>;
|
|
5
|
+
export declare function waitForReadiness(release: legacy.Release, signal: AbortSignal, verify?: ReadinessCheck): Promise<void>;
|
package/dist/index.d.ts
CHANGED
|
@@ -7,20 +7,24 @@
|
|
|
7
7
|
*
|
|
8
8
|
* environments: {
|
|
9
9
|
* development: {
|
|
10
|
-
* deployment: astrale({ secrets: '.env.dev' }),
|
|
11
|
-
* installation: { instance: '<your-instance-slug>' },
|
|
10
|
+
* deployment: astrale({ instance: '<your-instance-slug>', secrets: '.env.dev' }),
|
|
12
11
|
* },
|
|
13
12
|
* }
|
|
14
13
|
*
|
|
15
|
-
* `astrale-domain
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* `astrale-domain deploy <environment>` builds locally and deploys remotely; it
|
|
15
|
+
* never installs the Domain. `astrale domain install <url> --direct -i <instance>`
|
|
16
|
+
* installs the URL it prints. The deploy itself still calls the Services of
|
|
17
|
+
* `instance` through that instance's Kernel, and installs the Services Domain there
|
|
18
|
+
* when it is missing.
|
|
19
|
+
*
|
|
20
|
+
* This instance mode replaces one stable Service in place, so the SDK deploys it on
|
|
21
|
+
* the deprecated legacy direct-mode path. It is replaced by immutable deployments
|
|
22
|
+
* once this adapter implements `deployRelease`; `instance` and `signingIdentity` are
|
|
23
|
+
* then refused.
|
|
18
24
|
*
|
|
19
25
|
* It builds the SAME Cloudflare Workers bundle the `cloudflare` adapter ships
|
|
20
|
-
* (via `@astrale-os/adapter-cloudflare/build`), then hosts it on the
|
|
21
|
-
*
|
|
22
|
-
* instance is inferred from `installation.instance`; deploy-only Environments
|
|
23
|
-
* provide `astrale({ instance })` explicitly.
|
|
26
|
+
* (via `@astrale-os/adapter-cloudflare/build`), then hosts it on the `services`
|
|
27
|
+
* domain of `astrale({ instance })`.
|
|
24
28
|
* For deploying to YOUR OWN Cloudflare account instead, use
|
|
25
29
|
* `@astrale-os/adapter-cloudflare`.
|
|
26
30
|
*/
|
package/dist/index.js
CHANGED
|
@@ -7,20 +7,24 @@
|
|
|
7
7
|
*
|
|
8
8
|
* environments: {
|
|
9
9
|
* development: {
|
|
10
|
-
* deployment: astrale({ secrets: '.env.dev' }),
|
|
11
|
-
* installation: { instance: '<your-instance-slug>' },
|
|
10
|
+
* deployment: astrale({ instance: '<your-instance-slug>', secrets: '.env.dev' }),
|
|
12
11
|
* },
|
|
13
12
|
* }
|
|
14
13
|
*
|
|
15
|
-
* `astrale-domain
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* `astrale-domain deploy <environment>` builds locally and deploys remotely; it
|
|
15
|
+
* never installs the Domain. `astrale domain install <url> --direct -i <instance>`
|
|
16
|
+
* installs the URL it prints. The deploy itself still calls the Services of
|
|
17
|
+
* `instance` through that instance's Kernel, and installs the Services Domain there
|
|
18
|
+
* when it is missing.
|
|
19
|
+
*
|
|
20
|
+
* This instance mode replaces one stable Service in place, so the SDK deploys it on
|
|
21
|
+
* the deprecated legacy direct-mode path. It is replaced by immutable deployments
|
|
22
|
+
* once this adapter implements `deployRelease`; `instance` and `signingIdentity` are
|
|
23
|
+
* then refused.
|
|
18
24
|
*
|
|
19
25
|
* It builds the SAME Cloudflare Workers bundle the `cloudflare` adapter ships
|
|
20
|
-
* (via `@astrale-os/adapter-cloudflare/build`), then hosts it on the
|
|
21
|
-
*
|
|
22
|
-
* instance is inferred from `installation.instance`; deploy-only Environments
|
|
23
|
-
* provide `astrale({ instance })` explicitly.
|
|
26
|
+
* (via `@astrale-os/adapter-cloudflare/build`), then hosts it on the `services`
|
|
27
|
+
* domain of `astrale({ instance })`.
|
|
24
28
|
* For deploying to YOUR OWN Cloudflare account instead, use
|
|
25
29
|
* `@astrale-os/adapter-cloudflare`.
|
|
26
30
|
*/
|
package/dist/params.d.ts
CHANGED
|
@@ -4,14 +4,20 @@ import type { ExchangeOptions } from '@astrale-os/sdk/execution';
|
|
|
4
4
|
* `AstraleParams` — the provider-typed config for the Astrale-managed adapter.
|
|
5
5
|
*
|
|
6
6
|
* One value configures one Project Environment. `deploy` ships the bundle through
|
|
7
|
-
* the Services Domain of `instance
|
|
7
|
+
* the Services Domain of `instance` and never installs the Domain: `astrale domain
|
|
8
|
+
* install` installs the URL it prints. The deploy still calls those Services through
|
|
9
|
+
* the instance's Kernel, and installs the Services Domain there when it is missing.
|
|
8
10
|
* Frontend source, routes, and build ownership live on the authored Domain;
|
|
9
11
|
* adapter environments select delivery only.
|
|
10
12
|
*/
|
|
11
13
|
export interface AstraleParams {
|
|
12
14
|
/**
|
|
13
|
-
*
|
|
14
|
-
* Environment
|
|
15
|
+
* The instance whose Services Domain hosts this Environment's deployment. Required: an
|
|
16
|
+
* Environment without one is refused when the Project loads.
|
|
17
|
+
*
|
|
18
|
+
* @deprecated Instance mode replaces one stable Service in place (legacy direct mode).
|
|
19
|
+
* Replacement: an immutable deployment per release on Admin's Services, once this adapter
|
|
20
|
+
* implements `deployRelease` (S8), which then refuses `instance`. Deleted by S8.
|
|
15
21
|
*/
|
|
16
22
|
readonly instance?: string;
|
|
17
23
|
/** Stable owner-scoped Service key. Default: derived from Domain and Environment identity. */
|
|
@@ -23,6 +29,10 @@ export interface AstraleParams {
|
|
|
23
29
|
/**
|
|
24
30
|
* Private Ed25519 JWK file retained outside source control. Managed deploys
|
|
25
31
|
* require this stable Domain signing identity.
|
|
32
|
+
*
|
|
33
|
+
* @deprecated A stable signing identity belongs to the legacy direct-mode path.
|
|
34
|
+
* Replacement: the key generated for each immutable deployment, once this adapter
|
|
35
|
+
* implements `deployRelease` (S8), which then refuses `signingIdentity`. Deleted by S8.
|
|
26
36
|
*/
|
|
27
37
|
readonly signingIdentity?: string;
|
|
28
38
|
/** Extra plain vars for the atomic managed release upload. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrale-os/adapter-astrale",
|
|
3
|
-
"version": "0.5.0-beta.
|
|
3
|
+
"version": "0.5.0-beta.162",
|
|
4
4
|
"description": "Deploy an Astrale domain as a managed service through the Astrale platform",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"adapter",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"registry": "https://registry.npmjs.org/"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@astrale-os/adapter-cloudflare": "0.5.0-beta.
|
|
41
|
-
"@astrale-os/sdk": "0.6.0-beta.
|
|
40
|
+
"@astrale-os/adapter-cloudflare": "0.5.0-beta.169",
|
|
41
|
+
"@astrale-os/sdk": "0.6.0-beta.14"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@astrale-os/ox": "0.1.4",
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* One Project definition, with explicit software-factory Environments.
|
|
3
3
|
*
|
|
4
|
-
* `
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* `astrale-domain deploy development` deploys the development Environment
|
|
5
|
+
* through the Services Domain of its instance. A deploy never installs the
|
|
6
|
+
* Domain: install the URL it prints with
|
|
7
|
+
* `astrale domain install <url> --direct -i <instance>`.
|
|
8
|
+
*
|
|
9
|
+
* `instance` and `signingIdentity` select the deprecated instance mode, which
|
|
10
|
+
* replaces one stable Service in place. Once this adapter deploys immutable
|
|
11
|
+
* deployments (`deployRelease`), both are refused: remove them then.
|
|
7
12
|
*/
|
|
8
13
|
import { astrale } from '@astrale-os/adapter-astrale'
|
|
9
14
|
import { defineProject } from '@astrale-os/sdk/project'
|
|
@@ -19,10 +24,10 @@ export default defineProject({
|
|
|
19
24
|
environments: {
|
|
20
25
|
development: {
|
|
21
26
|
deployment: astrale({
|
|
27
|
+
instance: targetInstance,
|
|
22
28
|
secrets: '.env.dev',
|
|
23
29
|
signingIdentity: '.astrale/identity.json',
|
|
24
30
|
}),
|
|
25
|
-
installation: { instance: targetInstance },
|
|
26
31
|
},
|
|
27
32
|
},
|
|
28
33
|
|