@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
|
@@ -1,135 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
/** The adapter names of the first-party adapters whose parameters CT33 classifies. */
|
|
3
|
-
const CLOUDFLARE = 'cloudflare';
|
|
4
|
-
const ASTRALE = 'astrale';
|
|
5
|
-
/** The parameters that named the stable Service of adapter-astrale's removed instance mode. */
|
|
6
|
-
const ASTRALE_SERVICE_PARAMETERS = ['serviceKey', 'name'];
|
|
7
|
-
const CLOUDFLARE_DIRECT_PARAMETERS = [
|
|
8
|
-
'route',
|
|
9
|
-
'workerName',
|
|
10
|
-
'identityIssuer',
|
|
11
|
-
'addressing',
|
|
12
|
-
'signingIdentity',
|
|
13
|
-
];
|
|
14
|
-
/**
|
|
15
|
-
* Select the deploy mode of one Environment (CT33). It reads the configuration and the command
|
|
16
|
-
* only, and has no effect.
|
|
17
|
-
*
|
|
18
|
-
* A refusal wins over every other reason. adapter-astrale deploys immutable deployments only
|
|
19
|
-
* (`deployRelease`): its removed instance mode's `instance` and `signingIdentity` are refused
|
|
20
|
-
* before any effect, since their one consumer pins an older SDK (AM-72). Otherwise the Environment
|
|
21
|
-
* is on the legacy direct-mode path when adapter-cloudflare names a direct-mode parameter or no
|
|
22
|
-
* `namespace`, or when its adapter declares no `deployRelease`. Everything else is canonical,
|
|
23
|
-
* and `publish` refuses the legacy direct-mode path: a stable target serves no release, so no
|
|
24
|
-
* version can name it.
|
|
25
|
-
*
|
|
26
|
-
* Within canonical adapter-cloudflare (with `namespace`), a direct-mode parameter is refused
|
|
27
|
-
* rather than silently selecting either mode, and so is `wrangler.triggers`: an immutable
|
|
28
|
-
* deployment runs no cron of its own (D13). The bundling-affecting `wrangler` keys are refused by
|
|
29
|
-
* adapter-cloudflare itself for every Environment (AM-51).
|
|
30
|
-
*/
|
|
1
|
+
/** Inspect one Environment's deployment contract without building or changing any provider. */
|
|
31
2
|
export function selectDeployMode(input) {
|
|
32
|
-
const {
|
|
33
|
-
const
|
|
34
|
-
const parameters = definition.deployment.parameters;
|
|
3
|
+
const { adapter, parameters } = input.definition.deployment;
|
|
4
|
+
const values = parameters;
|
|
35
5
|
const refusals = [];
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
6
|
+
if (typeof adapter.deployRelease !== 'function') {
|
|
7
|
+
refusals.push({
|
|
8
|
+
reason: 'unsupported-adapter',
|
|
9
|
+
guidance: `Adapter ${adapter.name} must implement configure, placement and deployRelease for immutable deployments.`,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
if (adapter.name === 'cloudflare') {
|
|
13
|
+
if (values.namespace === undefined) {
|
|
40
14
|
refusals.push({
|
|
41
|
-
reason: '
|
|
42
|
-
guidance:
|
|
15
|
+
reason: 'missing-namespace',
|
|
16
|
+
guidance: 'cloudflare requires namespace: { name, routingDomain }. Use astrale() for managed deployments.',
|
|
43
17
|
});
|
|
44
18
|
}
|
|
45
|
-
|
|
19
|
+
const allowed = [
|
|
20
|
+
'namespace',
|
|
21
|
+
'secrets',
|
|
22
|
+
'vars',
|
|
23
|
+
'maximumRequestBytes',
|
|
24
|
+
'invocationTimeoutMs',
|
|
25
|
+
'tokenExchange',
|
|
26
|
+
'durable',
|
|
27
|
+
'wrangler',
|
|
28
|
+
'router',
|
|
29
|
+
];
|
|
30
|
+
const unknown = Reflect.ownKeys(values).filter((key) => typeof key !== 'string' || !allowed.includes(key));
|
|
31
|
+
if (unknown.length > 0)
|
|
32
|
+
refusals.push({
|
|
33
|
+
reason: 'invalid-parameters',
|
|
34
|
+
guidance: `Cloudflare Environment ${input.environment} declares unknown parameters ${unknown.map(String).join(', ')}.`,
|
|
35
|
+
});
|
|
36
|
+
const wrangler = values.wrangler;
|
|
37
|
+
if (wrangler !== undefined && Object.hasOwn(wrangler, 'triggers')) {
|
|
46
38
|
refusals.push({
|
|
47
|
-
reason: '
|
|
48
|
-
guidance: '
|
|
49
|
-
'generated when it is deployed. Remove `signingIdentity`.',
|
|
39
|
+
reason: 'scheduled-triggers',
|
|
40
|
+
guidance: 'Immutable deployments run no cron of their own. Remove wrangler.triggers.',
|
|
50
41
|
});
|
|
51
42
|
}
|
|
52
43
|
}
|
|
53
|
-
if (adapter.name ===
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
`remove ${direct.join(', ')}, or remove \`namespace\` to stay on the direct mode.`,
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
const wrangler = parameters.wrangler;
|
|
65
|
-
if (wrangler !== undefined && declares(wrangler, 'triggers')) {
|
|
66
|
-
refusals.push({
|
|
67
|
-
reason: 'scheduled-triggers',
|
|
68
|
-
guidance: 'cloudflare({ namespace }) refuses `wrangler.triggers`: an immutable deployment runs ' +
|
|
69
|
-
'no cron of its own. Remove `wrangler.triggers`, or keep the cron on a direct-mode ' +
|
|
70
|
-
'Environment.',
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
reasons.push(...direct.map((parameter) => ({ reason: 'direct-parameter', parameter })), { reason: 'no-namespace' });
|
|
76
|
-
}
|
|
44
|
+
if (adapter.name === 'astrale') {
|
|
45
|
+
const allowed = ['admin', 'secrets', 'vars', 'maximumRequestBytes', 'tokenExchange', 'durable'];
|
|
46
|
+
const unknown = Reflect.ownKeys(values).filter((key) => typeof key !== 'string' || !allowed.includes(key));
|
|
47
|
+
if (unknown.length > 0)
|
|
48
|
+
refusals.push({
|
|
49
|
+
reason: 'invalid-parameters',
|
|
50
|
+
guidance: `Astrale Environment ${input.environment} declares unknown parameters ${unknown.map(String).join(', ')}.`,
|
|
51
|
+
});
|
|
77
52
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return Object.freeze({ kind: 'refused', refusals: freeze(refusals) });
|
|
82
|
-
if (reasons.length > 0 && command === 'publish') {
|
|
83
|
-
return Object.freeze({
|
|
53
|
+
return refusals.length === 0
|
|
54
|
+
? Object.freeze({ kind: 'canonical' })
|
|
55
|
+
: Object.freeze({
|
|
84
56
|
kind: 'refused',
|
|
85
|
-
refusals: freeze(
|
|
86
|
-
{ reason: 'publish-legacy-direct', guidance: publishGuidance(environment, reasons) },
|
|
87
|
-
]),
|
|
57
|
+
refusals: Object.freeze(refusals.map((r) => Object.freeze(r))),
|
|
88
58
|
});
|
|
89
|
-
}
|
|
90
|
-
if (reasons.length > 0)
|
|
91
|
-
return Object.freeze({ kind: 'legacy-direct', reasons: freeze(reasons) });
|
|
92
|
-
return Object.freeze({ kind: 'canonical' });
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* How an adapter-astrale Environment of the removed instance mode deploys now: without `instance`
|
|
96
|
-
* (nor `serviceKey` and `name`, which named its stable Service), then installed by URL on the
|
|
97
|
-
* instance it used to deploy through.
|
|
98
|
-
*/
|
|
99
|
-
function astraleInstanceGuidance(parameters, environment) {
|
|
100
|
-
const instance = String(parameters.instance);
|
|
101
|
-
const service = ASTRALE_SERVICE_PARAMETERS.filter((name) => declares(parameters, name));
|
|
102
|
-
const removed = service.length === 0
|
|
103
|
-
? 'Remove `instance`'
|
|
104
|
-
: `Remove \`instance\` with ${service.map((name) => `\`${name}\``).join(' and ')}, ` +
|
|
105
|
-
`which named its stable Service`;
|
|
106
|
-
return (`astrale({ instance: '${instance}' }) deployed through that instance's Services, which no ` +
|
|
107
|
-
`longer hosts deployments. ${removed}: \`astrale-domain deploy ${environment}\` ` +
|
|
108
|
-
`makes an immutable deployment on Admin's Services, and \`${installCommand(instance)}\` ` +
|
|
109
|
-
'installs it.');
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Why a legacy direct-mode Environment cannot be published, and the configuration that makes it
|
|
113
|
-
* publishable: a version names an immutable deployment's release, which a stable target never
|
|
114
|
-
* serves.
|
|
115
|
-
*/
|
|
116
|
-
function publishGuidance(environment, reasons) {
|
|
117
|
-
const deploys = `\`astrale-domain publish ${environment}\` names an immutable deployment's release, and ${environment} deploys`;
|
|
118
|
-
if (reasons.some(({ reason }) => reason === 'no-deploy-release')) {
|
|
119
|
-
return (`${deploys} through an adapter without deployRelease, which replaces a stable target in ` +
|
|
120
|
-
'place and serves no release. Use an adapter that implements deployRelease (adapter ' +
|
|
121
|
-
"interface v2), such as astrale() on Admin's Services.");
|
|
122
|
-
}
|
|
123
|
-
const direct = reasons.flatMap((reason) => reason.reason === 'direct-parameter' ? [reason.parameter] : []);
|
|
124
|
-
return (`${deploys} on cloudflare()'s legacy direct mode, which serves no release. Deploy it into a ` +
|
|
125
|
-
'dispatch namespace with cloudflare({ namespace })' +
|
|
126
|
-
(direct.length === 0 ? '' : ` and remove ${direct.join(', ')}`) +
|
|
127
|
-
", or on Admin's Services with astrale().");
|
|
128
|
-
}
|
|
129
|
-
/** A parameter is declared when its value is not `undefined`, as optional adapter parameters read. */
|
|
130
|
-
function declares(parameters, name) {
|
|
131
|
-
return Object.hasOwn(parameters, name) && parameters[name] !== undefined;
|
|
132
|
-
}
|
|
133
|
-
function freeze(values) {
|
|
134
|
-
return Object.freeze(values.map((value) => Object.freeze(value)));
|
|
135
59
|
}
|
|
@@ -15,23 +15,21 @@ export interface DeployResultV1 {
|
|
|
15
15
|
readonly environment: string;
|
|
16
16
|
/**
|
|
17
17
|
* The URL `astrale domain install <url>` takes: an immutable deployment's URL, which is also its
|
|
18
|
-
* issuer
|
|
18
|
+
* issuer.
|
|
19
19
|
*/
|
|
20
20
|
readonly url: string;
|
|
21
21
|
/**
|
|
22
|
-
* The digest of the
|
|
23
|
-
* stable target, which serves a v3 Publication and no release.
|
|
22
|
+
* The digest of the DomainRelease v4 served at release.json.
|
|
24
23
|
*/
|
|
25
24
|
readonly release: {
|
|
26
25
|
readonly digest: ReleaseDigest;
|
|
27
|
-
}
|
|
26
|
+
};
|
|
28
27
|
/**
|
|
29
|
-
* The build digest of the code the deployment runs, as
|
|
30
|
-
* for a stable target, which never serves a build digest.
|
|
28
|
+
* The build digest of the code the deployment runs, as astrale-domain build prints it.
|
|
31
29
|
*/
|
|
32
30
|
readonly build: {
|
|
33
31
|
readonly digest: BuildDigest;
|
|
34
|
-
}
|
|
32
|
+
};
|
|
35
33
|
readonly schema: {
|
|
36
34
|
readonly revision: Revision;
|
|
37
35
|
};
|
|
@@ -40,24 +38,21 @@ export interface DeployResultV1 {
|
|
|
40
38
|
readonly adapter: string;
|
|
41
39
|
/**
|
|
42
40
|
* The provider script that serves this deployment: an immutable deployment's label, which is
|
|
43
|
-
* also the first label of its URL.
|
|
44
|
-
* never report the script they replace.
|
|
41
|
+
* also the first label of its URL.
|
|
45
42
|
*/
|
|
46
|
-
readonly script: string
|
|
43
|
+
readonly script: string;
|
|
47
44
|
/**
|
|
48
45
|
* `created`: a new immutable deployment. `reused`: the immutable deployment of this exact
|
|
49
|
-
* release already existed.
|
|
50
|
-
* ran, if anything (the legacy direct-mode path cannot tell a first deploy from a later one);
|
|
51
|
-
* only that path replaces.
|
|
46
|
+
* release already existed.
|
|
52
47
|
*/
|
|
53
|
-
readonly state: 'created' | 'reused'
|
|
48
|
+
readonly state: 'created' | 'reused';
|
|
54
49
|
};
|
|
55
50
|
/**
|
|
56
51
|
* Immutable deployments only: the environment's current secrets were `bound` to a new
|
|
57
52
|
* deployment, or `updated` or left `unchanged` in place on the reused one. A deploy never writes
|
|
58
53
|
* the secrets of any other deployment.
|
|
59
54
|
*/
|
|
60
|
-
readonly secrets
|
|
55
|
+
readonly secrets: {
|
|
61
56
|
readonly state: DeploymentSecretsState;
|
|
62
57
|
};
|
|
63
58
|
/**
|
package/dist/tooling/cli/help.js
CHANGED
|
@@ -101,16 +101,11 @@ Behavior:
|
|
|
101
101
|
does, loads declared secrets, and deploys through the selected adapter. It never
|
|
102
102
|
installs the Domain: install the URL it prints with
|
|
103
103
|
${installCommand()}.
|
|
104
|
-
|
|
105
|
-
deployRelease
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
Environment's current secrets; a reused one has its own secrets updated in place,
|
|
110
|
-
served once propagated; no other deployment's secrets change. Any other Environment
|
|
111
|
-
replaces its stable target in place (legacy direct mode, deprecated), warns on
|
|
112
|
-
stderr, serves a v3 Publication only, and warns when the uploaded code has another
|
|
113
|
-
build digest than the Bundle.
|
|
104
|
+
Each Environment deploys one immutable release through configure, placement and
|
|
105
|
+
deployRelease. The SDK seals the release at the deployment URL and records the
|
|
106
|
+
source commit. Its adapter creates that deployment or reuses it. A new deployment
|
|
107
|
+
binds the Environment's current secrets; reuse updates only that deployment's
|
|
108
|
+
secrets. Cloudflare requires a dispatch namespace; astrale() uses Admin's Services.
|
|
114
109
|
With --json, stdout holds only one DeployResultV1: the deployment's URL, which
|
|
115
110
|
astrale domain install takes, its digests, adapter and state. Exit status: 0 deployed,
|
|
116
111
|
1 failed or refused, 2 usage error; a failed run prints nothing on stdout.
|
|
@@ -131,8 +126,7 @@ Options:
|
|
|
131
126
|
Behavior:
|
|
132
127
|
Asks the adapter of each Environment that deploys immutable deployments for the
|
|
133
128
|
deployments its host keeps for the caller, and prints each one's release, its version
|
|
134
|
-
or name, Environment and state, the instances it is installed on,
|
|
135
|
-
its expiry, and the URL ${installCommand()} takes.
|
|
129
|
+
or name, Environment and state, the instances it is installed on, and the URL ${installCommand()} takes.
|
|
136
130
|
A deployment is named by the registry's version of its release (1.5.0) or of its build
|
|
137
131
|
(1.5.0 · staging), else from its record's commit, such as 1.4.2 + 7 commits · a1b2c3d ·
|
|
138
132
|
staging. Names are computed, never stored, and printed whole.
|
|
@@ -144,11 +138,10 @@ Behavior:
|
|
|
144
138
|
The registry and the instances are read through the Astrale CLI (${MINIMUM_INSTALLATIONS_CLI_VERSION} or
|
|
145
139
|
newer) with the caller's identity, only once a deployment is listed.
|
|
146
140
|
A registry that cannot be read fails the listing; an unknown instance never does.
|
|
147
|
-
Admin's Services and a Cloudflare dispatch namespace keep
|
|
148
|
-
owner retires
|
|
149
|
-
only when an older adapter reports it.
|
|
141
|
+
Admin's Services and a Cloudflare dispatch namespace keep deployments until their
|
|
142
|
+
owner retires them.
|
|
150
143
|
Listing changes nothing, at any host, registry or instance.
|
|
151
|
-
An Environment
|
|
144
|
+
An Environment refused by deploy, or whose adapter lists no
|
|
152
145
|
deployments is reported on stderr and, with --json, under unlisted. A deployment
|
|
153
146
|
whose record this SDK does not admit is still listed, from what its host knows.
|
|
154
147
|
With --json, each deployment carries its installedOn and its call target: the path of
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DeploymentCommitV1,
|
|
2
|
-
import type { Adapter, Build, Bundle,
|
|
1
|
+
import type { DeploymentCommitV1, DeploymentConfiguration } from '../../deployment/address/index.js';
|
|
2
|
+
import type { Adapter, Build, Bundle, Placement, Release, ResolvedRuntimeReference } from '../../deployment/index.js';
|
|
3
3
|
import type { DeployResultV1 } from './deploy-result.js';
|
|
4
4
|
/**
|
|
5
5
|
* Everything the deploy of one canonical Environment derives before its only effectful call: the
|
|
@@ -15,7 +15,7 @@ export interface ImmutableDeploymentPlan {
|
|
|
15
15
|
readonly identity?: string;
|
|
16
16
|
readonly bundle: Bundle;
|
|
17
17
|
readonly secrets: Readonly<Record<string, string>>;
|
|
18
|
-
readonly configuration:
|
|
18
|
+
readonly configuration: DeploymentConfiguration;
|
|
19
19
|
readonly placement: Placement;
|
|
20
20
|
/** `<line>-<content>`: the deployment's DNS label and provider script. */
|
|
21
21
|
readonly label: string;
|
|
@@ -37,7 +37,7 @@ export declare function planImmutableDeployment(input: {
|
|
|
37
37
|
readonly projectDir: string;
|
|
38
38
|
readonly environment: string;
|
|
39
39
|
/** A canonical Environment's adapter (CT33), which implements adapter interface v2. */
|
|
40
|
-
readonly adapter: Adapter<object
|
|
40
|
+
readonly adapter: Adapter<object>;
|
|
41
41
|
readonly parameters: object;
|
|
42
42
|
readonly build: Build;
|
|
43
43
|
readonly runtime: ResolvedRuntimeReference;
|
|
@@ -73,7 +73,7 @@ export declare function deployImmutable(input: {
|
|
|
73
73
|
readonly projectDir: string;
|
|
74
74
|
readonly environment: string;
|
|
75
75
|
/** A canonical Environment's adapter (CT33), which implements adapter interface v2. */
|
|
76
|
-
readonly adapter: Adapter<object
|
|
76
|
+
readonly adapter: Adapter<object>;
|
|
77
77
|
readonly parameters: object;
|
|
78
78
|
readonly build: Build;
|
|
79
79
|
readonly runtime: ResolvedRuntimeReference;
|
|
@@ -20,5 +20,5 @@ export type { InstallationSourcesV1, InstallationUnknownReason, InstalledOnV1, I
|
|
|
20
20
|
export type { PublishReportV1 } from './publish/index.js';
|
|
21
21
|
export type { YankReportV1 } from './yank.js';
|
|
22
22
|
export { selectDeployMode } from './deploy-mode.js';
|
|
23
|
-
export type {
|
|
23
|
+
export type { DeployMode, DeployModeCommand, DeployRefusal } from './deploy-mode.js';
|
|
24
24
|
export { loadDeclaredSecrets } from './dotenv.js';
|
|
@@ -29,8 +29,7 @@ export interface ListResultV1 {
|
|
|
29
29
|
* and its adapter, its computed name, and its call target. Admin's Services (adapter-astrale) keeps
|
|
30
30
|
* every deployment until it is retired: its rows are `published` and say whether their Service
|
|
31
31
|
* serves them (`current`). A Cloudflare dispatch namespace (adapter-cloudflare) keeps no
|
|
32
|
-
* retention, and knows a deployment's creation instant and key only while its script exists.
|
|
33
|
-
* last call and an expiry are printed only when an older adapter still reports them.
|
|
32
|
+
* retention, and knows a deployment's creation instant and key only while its script exists.
|
|
34
33
|
*/
|
|
35
34
|
export type ListedDeploymentV1 = Omit<DeploymentSummaryV1, 'record'> & {
|
|
36
35
|
/** The Project Environment whose line holds the deployment, as its host listed it. */
|
|
@@ -75,14 +74,13 @@ export type ListedDeploymentV1 = Omit<DeploymentSummaryV1, 'record'> & {
|
|
|
75
74
|
};
|
|
76
75
|
/**
|
|
77
76
|
* An Environment the listing did not list:
|
|
78
|
-
* - `legacy-direct`: it replaces one stable target in place and makes no immutable deployment;
|
|
79
77
|
* - `refused`: `deploy` refuses its configuration, so it deploys nothing;
|
|
80
78
|
* - `unsupported`: its adapter deploys immutable deployments but lists none.
|
|
81
79
|
*/
|
|
82
80
|
export interface UnlistedEnvironmentV1 {
|
|
83
81
|
readonly environment: string;
|
|
84
82
|
readonly adapter: string;
|
|
85
|
-
readonly reason: '
|
|
83
|
+
readonly reason: 'refused' | 'unsupported';
|
|
86
84
|
}
|
|
87
85
|
/** What a listing found, beside the result: what to tell a person, and what failed. */
|
|
88
86
|
export interface DeploymentListing {
|
|
@@ -145,10 +143,10 @@ export declare function listDeployments(input: {
|
|
|
145
143
|
readonly instances?: readonly string[];
|
|
146
144
|
}): Promise<DeploymentListing>;
|
|
147
145
|
/**
|
|
148
|
-
* The listing as a table for a person
|
|
146
|
+
* The listing as a table for a person: each deployment's release, its name as computed
|
|
149
147
|
* (never shortened, AM-57), its Environment and state (`active (current)` for the deployment its
|
|
150
148
|
* Service serves), the instances known to pin it (`?` when a source could not tell, AM-198), its
|
|
151
|
-
*
|
|
149
|
+
* URL `astrale domain install` takes. Without deployments, it says so only for what was listed: nothing when a host
|
|
152
150
|
* `failed` (stderr says which), and that some Environments were not listed when any was not.
|
|
153
151
|
*/
|
|
154
|
-
export declare function renderDeploymentList(result: ListResultV1,
|
|
152
|
+
export declare function renderDeploymentList(result: ListResultV1, failed?: boolean): readonly string[];
|
package/dist/tooling/cli/list.js
CHANGED
|
@@ -38,11 +38,8 @@ export async function listDeployments(input) {
|
|
|
38
38
|
adapter: name,
|
|
39
39
|
reason: mode.kind,
|
|
40
40
|
}));
|
|
41
|
-
notices.push(
|
|
42
|
-
|
|
43
|
-
'one stable target in place, and has no immutable deployments.'
|
|
44
|
-
: `Environment ${environment} is not listed: deploy refuses its configuration. ` +
|
|
45
|
-
mode.refusals.map((refusal) => refusal.guidance).join(' '));
|
|
41
|
+
notices.push(`Environment ${environment} is not listed: deploy refuses its configuration. ` +
|
|
42
|
+
mode.refusals.map((refusal) => refusal.guidance).join(' '));
|
|
46
43
|
continue;
|
|
47
44
|
}
|
|
48
45
|
if (!('list' in adapter) || typeof adapter.list !== 'function') {
|
|
@@ -191,8 +188,6 @@ function listedDeployment(hosted, publications, installations) {
|
|
|
191
188
|
state: deployment.state,
|
|
192
189
|
...(deployment.retention === undefined ? {} : { retention: deployment.retention }),
|
|
193
190
|
...(deployment.createdAt === undefined ? {} : { createdAt: deployment.createdAt }),
|
|
194
|
-
...(deployment.lastCallAt === undefined ? {} : { lastCallAt: deployment.lastCallAt }),
|
|
195
|
-
...(deployment.expiresAt === undefined ? {} : { expiresAt: deployment.expiresAt }),
|
|
196
191
|
...(deployment.retiredAt === undefined ? {} : { retiredAt: deployment.retiredAt }),
|
|
197
192
|
...(deployment.retirement === undefined ? {} : { retirement: deployment.retirement }),
|
|
198
193
|
...(deployment.signingKeyId === undefined ? {} : { signingKeyId: deployment.signingKeyId }),
|
|
@@ -263,20 +258,16 @@ function admitListed(deployment, adapter) {
|
|
|
263
258
|
if (!text(value[key]))
|
|
264
259
|
invalid(key);
|
|
265
260
|
}
|
|
266
|
-
for (const key of ['createdAt', 'signingKeyId', '
|
|
261
|
+
for (const key of ['createdAt', 'signingKeyId', 'retiredAt']) {
|
|
267
262
|
if (value[key] !== undefined && !text(value[key]))
|
|
268
263
|
invalid(key);
|
|
269
264
|
}
|
|
270
265
|
if (!STATES.includes(value.state))
|
|
271
266
|
invalid('state');
|
|
272
|
-
if (value.retention !== undefined &&
|
|
273
|
-
value.retention !== 'preview' &&
|
|
274
|
-
value.retention !== 'published') {
|
|
267
|
+
if (value.retention !== undefined && value.retention !== 'published') {
|
|
275
268
|
invalid('retention');
|
|
276
269
|
}
|
|
277
|
-
if (value.retirement !== undefined &&
|
|
278
|
-
value.retirement !== 'expired' &&
|
|
279
|
-
value.retirement !== 'withdrawn') {
|
|
270
|
+
if (value.retirement !== undefined && value.retirement !== 'withdrawn') {
|
|
280
271
|
invalid('retirement');
|
|
281
272
|
}
|
|
282
273
|
if (value.current !== undefined && typeof value.current !== 'boolean')
|
|
@@ -301,27 +292,15 @@ function members(input) {
|
|
|
301
292
|
? input
|
|
302
293
|
: undefined;
|
|
303
294
|
}
|
|
304
|
-
const COLUMNS = [
|
|
305
|
-
'RELEASE',
|
|
306
|
-
'VERSION',
|
|
307
|
-
'ENV',
|
|
308
|
-
'STATE',
|
|
309
|
-
'INSTALLED ON',
|
|
310
|
-
'LAST CALL',
|
|
311
|
-
'EXPIRES',
|
|
312
|
-
'URL',
|
|
313
|
-
];
|
|
314
|
-
const MINUTE = 60_000;
|
|
315
|
-
const HOUR = 60 * MINUTE;
|
|
316
|
-
const DAY = 24 * HOUR;
|
|
295
|
+
const COLUMNS = ['RELEASE', 'VERSION', 'ENV', 'STATE', 'INSTALLED ON', 'URL'];
|
|
317
296
|
/**
|
|
318
|
-
* The listing as a table for a person
|
|
297
|
+
* The listing as a table for a person: each deployment's release, its name as computed
|
|
319
298
|
* (never shortened, AM-57), its Environment and state (`active (current)` for the deployment its
|
|
320
299
|
* Service serves), the instances known to pin it (`?` when a source could not tell, AM-198), its
|
|
321
|
-
*
|
|
300
|
+
* URL `astrale domain install` takes. Without deployments, it says so only for what was listed: nothing when a host
|
|
322
301
|
* `failed` (stderr says which), and that some Environments were not listed when any was not.
|
|
323
302
|
*/
|
|
324
|
-
export function renderDeploymentList(result,
|
|
303
|
+
export function renderDeploymentList(result, failed = false) {
|
|
325
304
|
if (result.deployments.length === 0) {
|
|
326
305
|
if (failed)
|
|
327
306
|
return Object.freeze([]);
|
|
@@ -338,10 +317,6 @@ export function renderDeploymentList(result, now, failed = false) {
|
|
|
338
317
|
deployment.environment,
|
|
339
318
|
deployment.current === true ? `${deployment.state} (current)` : deployment.state,
|
|
340
319
|
installedOnCell(deployment.installedOn, result.installations),
|
|
341
|
-
deployment.lastCallAt === undefined
|
|
342
|
-
? '—'
|
|
343
|
-
: `${elapsed(now - Date.parse(deployment.lastCallAt))} ago`,
|
|
344
|
-
expiry(deployment, now),
|
|
345
320
|
deployment.url,
|
|
346
321
|
]);
|
|
347
322
|
const widths = COLUMNS.map((column, index) => Math.max(column.length, ...rows.map((row) => row[index].length)));
|
|
@@ -354,30 +329,3 @@ export function renderDeploymentList(result, now, failed = false) {
|
|
|
354
329
|
function shortDigest(digest) {
|
|
355
330
|
return `${digest.slice(0, 'sha256:'.length + 7)}…`;
|
|
356
331
|
}
|
|
357
|
-
/**
|
|
358
|
-
* When a deployment stops serving: `never` once published, else the expiry an older adapter
|
|
359
|
-
* reports (`due` once that instant passed), else `—` (a dispatch namespace keeps a deployment
|
|
360
|
-
* until its owner retires it); for a retired deployment, why it was retired.
|
|
361
|
-
*/
|
|
362
|
-
function expiry(deployment, now) {
|
|
363
|
-
if (deployment.state === 'retiring')
|
|
364
|
-
return 'retiring';
|
|
365
|
-
if (deployment.state === 'retired')
|
|
366
|
-
return deployment.retirement ?? 'retired';
|
|
367
|
-
if (deployment.retention === 'published')
|
|
368
|
-
return 'never';
|
|
369
|
-
if (deployment.expiresAt === undefined)
|
|
370
|
-
return '—';
|
|
371
|
-
const remaining = Date.parse(deployment.expiresAt) - now;
|
|
372
|
-
return remaining > 0 ? `in ${elapsed(remaining)}` : 'due';
|
|
373
|
-
}
|
|
374
|
-
/** A duration as a person reads it in a listing: minutes, then hours, then days. */
|
|
375
|
-
function elapsed(milliseconds) {
|
|
376
|
-
if (!(milliseconds >= MINUTE))
|
|
377
|
-
return '< 1 min';
|
|
378
|
-
if (milliseconds < HOUR)
|
|
379
|
-
return `${Math.floor(milliseconds / MINUTE)} min`;
|
|
380
|
-
if (milliseconds < DAY)
|
|
381
|
-
return `${Math.floor(milliseconds / HOUR)} h`;
|
|
382
|
-
return `${Math.floor(milliseconds / DAY)} d`;
|
|
383
|
-
}
|
|
@@ -7,11 +7,9 @@ import { parseArgs } from './arguments.js';
|
|
|
7
7
|
import { buildResult, bundleBuild, bundlerCopyWarnings, projectBundlers } from './build.js';
|
|
8
8
|
import { BunRequiredError } from './bun.js';
|
|
9
9
|
import { selectDeployMode } from './deploy-mode.js';
|
|
10
|
-
import { deprecationWarnings } from './deprecations.js';
|
|
11
10
|
import { runDiff } from './diff/index.js';
|
|
12
11
|
import { ERROR_USAGE, helpRequest, helpText } from './help.js';
|
|
13
12
|
import { deployImmutable } from './immutable-deployment.js';
|
|
14
|
-
import { deployStableTarget } from './legacy/stable-target-deploy.js';
|
|
15
13
|
import { listDeployments, renderDeploymentList } from './list.js';
|
|
16
14
|
import { error, info, progress, warn } from './log.js';
|
|
17
15
|
import { importModule, loadProject, runtimeEntrypoint, selectEnvironment, } from './project.js';
|
|
@@ -103,8 +101,6 @@ export async function run(argv) {
|
|
|
103
101
|
});
|
|
104
102
|
}
|
|
105
103
|
const build = compile(project.domain);
|
|
106
|
-
for (const warning of deprecationWarnings(build))
|
|
107
|
-
warn(warning);
|
|
108
104
|
const resolved = await resolveRuntime(runtimeEntrypoint(project), (path) => importModule(resolve(dirname(configPath), path)));
|
|
109
105
|
admitRuntime({ runtime: build.runtime }, resolved);
|
|
110
106
|
if (parsed.command === 'diff') {
|
|
@@ -214,17 +210,11 @@ export async function run(argv) {
|
|
|
214
210
|
signal: lifecycle.signal,
|
|
215
211
|
report,
|
|
216
212
|
};
|
|
217
|
-
const deployed =
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
})
|
|
223
|
-
: await deployStableTarget({
|
|
224
|
-
...deployment,
|
|
225
|
-
definition: environment,
|
|
226
|
-
reasons: mode.reasons,
|
|
227
|
-
});
|
|
213
|
+
const deployed = await deployImmutable({
|
|
214
|
+
...deployment,
|
|
215
|
+
adapter: environment.deployment.adapter,
|
|
216
|
+
parameters: environment.deployment.parameters,
|
|
217
|
+
});
|
|
228
218
|
if (deployed === undefined)
|
|
229
219
|
return 1;
|
|
230
220
|
if (parsed.json === true)
|
|
@@ -284,7 +274,7 @@ async function list(parsed, project, projectDir) {
|
|
|
284
274
|
return 0;
|
|
285
275
|
}
|
|
286
276
|
const failed = listing.failures.length > 0;
|
|
287
|
-
for (const line of renderDeploymentList(listing.result,
|
|
277
|
+
for (const line of renderDeploymentList(listing.result, failed)) {
|
|
288
278
|
process.stdout.write(`${line}\n`);
|
|
289
279
|
}
|
|
290
280
|
return failed ? 1 : 0;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { Adapter, Build,
|
|
1
|
+
import type { Adapter, Build, Release, ResolvedRuntimeReference } from '../../../deployment/index.js';
|
|
2
2
|
import type { DomainRegistry } from '../registry/index.js';
|
|
3
3
|
export type { PublishReportV1 } from './report.js';
|
|
4
4
|
export interface PublishCommandInput {
|
|
5
5
|
readonly projectDir: string;
|
|
6
6
|
readonly environment: string;
|
|
7
7
|
/** The adapter of a canonical Environment (CT33): `publish` refuses every other one before. */
|
|
8
|
-
readonly adapter: Adapter<object
|
|
8
|
+
readonly adapter: Adapter<object>;
|
|
9
9
|
readonly parameters: object;
|
|
10
10
|
readonly build: Build;
|
|
11
11
|
readonly runtime: ResolvedRuntimeReference;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as artifact from '@astrale-os/kernel-protocol/artifact';
|
|
2
|
-
import { BUNDLE_MEDIA_TYPE } from '@astrale-os/kernel-protocol/release
|
|
2
|
+
import { BUNDLE_MEDIA_TYPE } from '@astrale-os/kernel-protocol/release';
|
|
3
3
|
import { mkdtemp, readFile, rm } from 'node:fs/promises';
|
|
4
4
|
import { tmpdir } from 'node:os';
|
|
5
5
|
import { join } from 'node:path';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Runtime } from '../../application/runtime/index.js';
|
|
2
|
-
import type { Adapter
|
|
2
|
+
import type { Adapter } from '../../deployment/adapter/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* The secrets one Environment's deployment binds: the values of the secrets file its adapter
|
|
5
5
|
* declares. An Integration-free Runtime has no Providers and therefore no author-owned secrets, so
|
|
6
6
|
* its file may be absent; adapter-owned secrets, such as a signing identity, are the adapter's to
|
|
7
7
|
* resolve and never make this file required.
|
|
8
8
|
*/
|
|
9
|
-
export declare function environmentSecrets(adapter: Adapter<object
|
|
9
|
+
export declare function environmentSecrets(adapter: Adapter<object>, parameters: object, projectDir: string, runtime: Runtime): Readonly<Record<string, string>>;
|
|
@@ -506,7 +506,6 @@ export const globalRules = [
|
|
|
506
506
|
{ layer: 'queries', name: 'defineQuery', members: [undefined] },
|
|
507
507
|
{ layer: 'queries', name: 'defineCompositeQuery', members: [undefined] },
|
|
508
508
|
{ layer: 'mutations', name: 'defineMutation', members: [undefined] },
|
|
509
|
-
{ layer: 'migrations', name: 'defineMigration', members: [undefined] },
|
|
510
509
|
];
|
|
511
510
|
for (const definition of definitions) {
|
|
512
511
|
for (const file of production(project, definition.layer)) {
|
|
@@ -2,7 +2,6 @@ import { actionRules } from './actions.js';
|
|
|
2
2
|
import { dependencyRules } from './dependencies.js';
|
|
3
3
|
import { globalRules } from './global.js';
|
|
4
4
|
import { integrationRules } from './integrations.js';
|
|
5
|
-
import { migrationRules } from './migrations.js';
|
|
6
5
|
import { mutationRules } from './mutations.js';
|
|
7
6
|
import { providerRules } from './providers.js';
|
|
8
7
|
import { queryRules } from './queries.js';
|
|
@@ -23,7 +22,6 @@ export const sourceRuleVerifiers = Object.freeze([
|
|
|
23
22
|
...mutationRules,
|
|
24
23
|
...workflowRules,
|
|
25
24
|
...dependencyRules,
|
|
26
|
-
...migrationRules,
|
|
27
25
|
...integrationRules,
|
|
28
26
|
...actionRules,
|
|
29
27
|
...providerRules,
|