@intentius/chant 0.45.0 → 0.46.0
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/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/check-lexicon.d.ts +14 -0
- package/dist/cli/commands/check-lexicon.d.ts.map +1 -1
- package/dist/cli/commands/lexicon-surface-diff.d.ts +6 -0
- package/dist/cli/commands/lexicon-surface-diff.d.ts.map +1 -1
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.d.ts +13 -0
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/search.d.ts.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +7 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/codegen/lexicon-regen.d.ts +11 -0
- package/dist/codegen/lexicon-regen.d.ts.map +1 -1
- package/dist/codegen/validate.d.ts +10 -0
- package/dist/codegen/validate.d.ts.map +1 -1
- package/dist/config.d.ts +28 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/env.d.ts +12 -1
- package/dist/env.d.ts.map +1 -1
- package/dist/lexicon.d.ts +182 -2
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/index.d.ts +1 -0
- package/dist/lifecycle/index.d.ts.map +1 -1
- package/dist/lifecycle/teardown.d.ts +130 -0
- package/dist/lifecycle/teardown.d.ts.map +1 -0
- package/dist/lint/engine.d.ts +6 -2
- package/dist/lint/engine.d.ts.map +1 -1
- package/dist/lint/rule.d.ts +31 -0
- package/dist/lint/rule.d.ts.map +1 -1
- package/dist/lint/rules/cor021-env-literal-name.d.ts +3 -0
- package/dist/lint/rules/cor021-env-literal-name.d.ts.map +1 -0
- package/dist/lint/rules/index.d.ts +2 -1
- package/dist/lint/rules/index.d.ts.map +1 -1
- package/dist/op/builders.d.ts +36 -7
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/index.d.ts +1 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/testing.d.ts +136 -0
- package/dist/testing.d.ts.map +1 -0
- package/package.json +6 -1
- package/src/cli/commands/build.test.ts +131 -0
- package/src/cli/commands/build.ts +20 -0
- package/src/cli/commands/check-lexicon.test.ts +45 -1
- package/src/cli/commands/check-lexicon.ts +45 -0
- package/src/cli/commands/lexicon-surface-diff.ts +9 -0
- package/src/cli/commands/lexicon-surface-diff.update.test.ts +112 -0
- package/src/cli/commands/lint.ts +19 -6
- package/src/cli/handlers/graph.ts +2 -2
- package/src/cli/handlers/lifecycle.test.ts +231 -1
- package/src/cli/handlers/lifecycle.ts +219 -3
- package/src/cli/handlers/search.ts +5 -2
- package/src/cli/main.ts +12 -1
- package/src/cli/registry.ts +7 -0
- package/src/codegen/lexicon-regen.ts +19 -1
- package/src/codegen/validate.test.ts +33 -0
- package/src/codegen/validate.ts +21 -2
- package/src/config.test.ts +40 -0
- package/src/config.ts +58 -1
- package/src/env.test.ts +35 -1
- package/src/env.ts +17 -3
- package/src/lexicon.ts +182 -2
- package/src/lifecycle/index.ts +1 -0
- package/src/lifecycle/teardown.test.ts +537 -0
- package/src/lifecycle/teardown.ts +357 -0
- package/src/lint/engine.ts +7 -1
- package/src/lint/rule.ts +23 -0
- package/src/lint/rules/cor021-env-literal-name.test.ts +128 -0
- package/src/lint/rules/cor021-env-literal-name.ts +114 -0
- package/src/lint/rules/index.ts +4 -1
- package/src/op/builders.ts +40 -7
- package/src/op/index.ts +1 -1
- package/src/testing.test.ts +261 -0
- package/src/testing.ts +338 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Teardown planning (#1222) — the enumeration half of
|
|
3
|
+
* `chant lifecycle teardown <env>`.
|
|
4
|
+
*
|
|
5
|
+
* Answers one question: which live resources carry THIS project's ownership
|
|
6
|
+
* marker for THIS environment? Selection is marker-scoped by construction —
|
|
7
|
+
* managed-by present, stack equal to the project's `ownership.stack`, env
|
|
8
|
+
* equal to the argument — so a foreign stack's resources, another env's
|
|
9
|
+
* resources, and unmarked resources are out of scope by shape, not by
|
|
10
|
+
* filtering discipline someone has to remember.
|
|
11
|
+
*
|
|
12
|
+
* Stateless: live markers only. No build, no snapshot, no ledger — the
|
|
13
|
+
* ownership record lives on the cloud resource (see ../ownership.ts), and this
|
|
14
|
+
* module reads it back from there.
|
|
15
|
+
*
|
|
16
|
+
* Two paths per lexicon:
|
|
17
|
+
* - the `teardownOwned` capability, where the lexicon enumerates its own
|
|
18
|
+
* would-delete set (and can use a read shaped for deletion — aws's
|
|
19
|
+
* stack-level path, k8s's prune selector);
|
|
20
|
+
* - a fallback over `describeResources` + the {@link ResourceMetadata.marker}
|
|
21
|
+
* field (#1222 PR 1), for lexicons that have not implemented the capability
|
|
22
|
+
* yet. Best-effort: a lexicon whose thin read only resolves declared names
|
|
23
|
+
* returns nothing here, which the plan reports as a skip, not as clean.
|
|
24
|
+
*
|
|
25
|
+
* Whichever path ran, core re-checks every candidate's marker and drops
|
|
26
|
+
* mismatches — an implementation bug can narrow the set, never widen it.
|
|
27
|
+
*
|
|
28
|
+
* The execution half is {@link executeTeardown}: it drives each lexicon's
|
|
29
|
+
* `executeTeardown` capability over the planned set, then runs one bounded
|
|
30
|
+
* retry pass over the failures. Both halves are exported as functions —
|
|
31
|
+
* #1224's test-env harness calls them in-process, not only through the verb.
|
|
32
|
+
*/
|
|
33
|
+
import type { ObservationLexicon, TeardownCandidate, TeardownHole } from "../lexicon.js";
|
|
34
|
+
/** One would-delete row in a teardown plan, attributed to its lexicon. */
|
|
35
|
+
export interface TeardownPlanEntry extends TeardownCandidate {
|
|
36
|
+
lexicon: string;
|
|
37
|
+
}
|
|
38
|
+
/** One hole in a teardown plan (#1089), attributed to its lexicon. */
|
|
39
|
+
export interface TeardownPlanHole extends TeardownHole {
|
|
40
|
+
lexicon: string;
|
|
41
|
+
}
|
|
42
|
+
/** The plan `chant lifecycle teardown <env>` prints and #1224 consumes. */
|
|
43
|
+
export interface TeardownPlan {
|
|
44
|
+
environment: string;
|
|
45
|
+
/** The project's ownership stack — the identity everything was selected on. */
|
|
46
|
+
stack: string;
|
|
47
|
+
/** The would-delete set. Every entry's marker equals `{ stack, env: environment }`. */
|
|
48
|
+
entries: TeardownPlanEntry[];
|
|
49
|
+
/** What could not be read (#1089). A plan with holes is incomplete, not clean. */
|
|
50
|
+
holes: TeardownPlanHole[];
|
|
51
|
+
/**
|
|
52
|
+
* Lexicons that took part in neither path — no `teardownOwned`, no
|
|
53
|
+
* `describeResources`. Reported so "nothing to delete" can never quietly
|
|
54
|
+
* mean "nobody looked".
|
|
55
|
+
*/
|
|
56
|
+
skipped: string[];
|
|
57
|
+
}
|
|
58
|
+
export interface PlanTeardownOptions {
|
|
59
|
+
/** The environment being torn down — the marker env to select on. */
|
|
60
|
+
environment: string;
|
|
61
|
+
/** This project's ownership stack (`ownership.stack` in chant.config). */
|
|
62
|
+
stack: string;
|
|
63
|
+
plugins: ObservationLexicon[];
|
|
64
|
+
/** Deployed stack name, for a multi-stack project. */
|
|
65
|
+
deployedStack?: string;
|
|
66
|
+
/** Region that stack is deployed in. */
|
|
67
|
+
region?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Every deployed stack a multi-stack project declares (`stacks` in
|
|
70
|
+
* chant.config), for a lexicon whose teardown is stack-shaped (aws
|
|
71
|
+
* enumerates and deletes whole stacks). Forwarded to `teardownOwned` /
|
|
72
|
+
* `executeTeardown` as `stacks`.
|
|
73
|
+
*/
|
|
74
|
+
deployedStacks?: Array<{
|
|
75
|
+
name: string;
|
|
76
|
+
region?: string;
|
|
77
|
+
}>;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Enumerate what `chant lifecycle teardown <env>` would delete. Read-only —
|
|
81
|
+
* this function never deletes and never will; execution composes on top of the
|
|
82
|
+
* plan it returns.
|
|
83
|
+
*/
|
|
84
|
+
export declare function planTeardown(opts: PlanTeardownOptions): Promise<TeardownPlan>;
|
|
85
|
+
/** One planned entry's fate after execution, attributed to its lexicon. */
|
|
86
|
+
export interface TeardownOutcomeEntry extends TeardownPlanEntry {
|
|
87
|
+
/**
|
|
88
|
+
* `skipped` is core's verdict for a candidate whose lexicon implements no
|
|
89
|
+
* `executeTeardown` yet; the other three come from the lexicon (see
|
|
90
|
+
* {@link TeardownOutcome}).
|
|
91
|
+
*/
|
|
92
|
+
outcome: "deleted" | "failed" | "not-prunable" | "skipped";
|
|
93
|
+
/** The error for `failed`, the reason for `not-prunable`/`skipped`. */
|
|
94
|
+
detail?: string;
|
|
95
|
+
/** True when this final outcome came from the bounded retry pass. */
|
|
96
|
+
retried?: boolean;
|
|
97
|
+
}
|
|
98
|
+
/** What `chant lifecycle teardown <env> --yes` prints and #1224 consumes. */
|
|
99
|
+
export interface TeardownReport {
|
|
100
|
+
environment: string;
|
|
101
|
+
stack: string;
|
|
102
|
+
/** The plan that was executed — holes and skipped lexicons included. */
|
|
103
|
+
plan: TeardownPlan;
|
|
104
|
+
/** One row per planned entry. Never fewer: silence is never success. */
|
|
105
|
+
outcomes: TeardownOutcomeEntry[];
|
|
106
|
+
/** Lexicons whose candidates were skipped for lack of an `executeTeardown`. */
|
|
107
|
+
unimplemented: string[];
|
|
108
|
+
}
|
|
109
|
+
export interface ExecuteTeardownOptions extends PlanTeardownOptions {
|
|
110
|
+
/**
|
|
111
|
+
* A plan already computed (the one just shown to the user). Recomputed from
|
|
112
|
+
* a fresh live read when omitted.
|
|
113
|
+
*/
|
|
114
|
+
plan?: TeardownPlan;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Execute a teardown: delete every planned candidate through its lexicon's
|
|
118
|
+
* `executeTeardown`, then retry the failures once. Per-lexicon ordering only —
|
|
119
|
+
* each lexicon deletes its own set in the order its target requires (k8s
|
|
120
|
+
* deletes namespaces last, fly deletes apps last); there is no global
|
|
121
|
+
* reverse-dependency ordering in v1, the bounded retry pass covers the
|
|
122
|
+
* cross-lexicon cases it would.
|
|
123
|
+
*
|
|
124
|
+
* Every planned entry comes back with an outcome. A lexicon that enumerates
|
|
125
|
+
* but implements no execution reports its candidates as `skipped` — loudly,
|
|
126
|
+
* never as clean. Failures that survive the retry stay `failed` in the
|
|
127
|
+
* report; nothing here ever swallows one.
|
|
128
|
+
*/
|
|
129
|
+
export declare function executeTeardown(opts: ExecuteTeardownOptions): Promise<TeardownReport>;
|
|
130
|
+
//# sourceMappingURL=teardown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"teardown.d.ts","sourceRoot":"","sources":["../../src/lifecycle/teardown.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,YAAY,EAAmB,MAAM,YAAY,CAAC;AAGvG,0EAA0E;AAC1E,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,sEAAsE;AACtE,MAAM,WAAW,gBAAiB,SAAQ,YAAY;IACpD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,2EAA2E;AAC3E,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;IACd,uFAAuF;IACvF,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,kFAAkF;IAClF,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B;;;;OAIG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,qEAAqE;IACrE,WAAW,EAAE,MAAM,CAAC;IACpB,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,sDAAsD;IACtD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC3D;AAOD;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC,CA8FnF;AAED,2EAA2E;AAC3E,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D;;;;OAIG;IACH,OAAO,EAAE,SAAS,GAAG,QAAQ,GAAG,cAAc,GAAG,SAAS,CAAC;IAC3D,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,6EAA6E;AAC7E,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,IAAI,EAAE,YAAY,CAAC;IACnB,wEAAwE;IACxE,QAAQ,EAAE,oBAAoB,EAAE,CAAC;IACjC,+EAA+E;IAC/E,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE;;;OAGG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAkDD;;;;;;;;;;;;GAYG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,cAAc,CAAC,CAwE3F"}
|
package/dist/lint/engine.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LintRule, LintDiagnostic } from "./rule.js";
|
|
1
|
+
import type { LintRule, LintDiagnostic, LintProjectConfig } from "./rule.js";
|
|
2
2
|
import type { IntrinsicDef } from "../lexicon.js";
|
|
3
3
|
/**
|
|
4
4
|
* Result of a lint run, separating active diagnostics from suppressed ones.
|
|
@@ -48,7 +48,11 @@ export declare function parseDisableComments(content: string): DisableDirective[
|
|
|
48
48
|
* `IntrinsicDef[]` into the fold path since #1039/#1105. Optional and
|
|
49
49
|
* defaulting to none, so a caller that hasn't resolved a project's
|
|
50
50
|
* lexicons (a unit test, `bench.test.ts`) is unaffected.
|
|
51
|
+
* @param projectConfig - chant #1221 — the project's config slice for
|
|
52
|
+
* config-aware rules (COR021 reads `environments` + `ownership`), put on
|
|
53
|
+
* every file's `LintContext.projectConfig`. Optional; without it those
|
|
54
|
+
* rules stay silent.
|
|
51
55
|
* @returns LintRunResult with diagnostics and suppressed items
|
|
52
56
|
*/
|
|
53
|
-
export declare function runLint(files: string[], rules: LintRule[], ruleOptions?: Map<string, Record<string, unknown>>, intrinsics?: readonly IntrinsicDef[]): Promise<LintRunResult>;
|
|
57
|
+
export declare function runLint(files: string[], rules: LintRule[], ruleOptions?: Map<string, Record<string, unknown>>, intrinsics?: readonly IntrinsicDef[], projectConfig?: LintProjectConfig): Promise<LintRunResult>;
|
|
54
58
|
//# sourceMappingURL=engine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/lint/engine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAe,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/lint/engine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAe,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AACvF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,iEAAiE;IACjE,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,mFAAmF;IACnF,UAAU,EAAE,KAAK,CAAC,cAAc,GAAG;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACzD;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB;IACxB,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC;IACpC,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAkED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAyCxE;AAgDD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,OAAO,CAC3B,KAAK,EAAE,MAAM,EAAE,EACf,KAAK,EAAE,QAAQ,EAAE,EACjB,WAAW,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAClD,UAAU,CAAC,EAAE,SAAS,YAAY,EAAE,EACpC,aAAa,CAAC,EAAE,iBAAiB,GAChC,OAAO,CAAC,aAAa,CAAC,CAuDxB"}
|
package/dist/lint/rule.d.ts
CHANGED
|
@@ -44,6 +44,29 @@ export interface LintDiagnostic {
|
|
|
44
44
|
/** Optional fix that can be applied */
|
|
45
45
|
fix?: LintFix;
|
|
46
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* The slice of the project's `chant.config` a config-aware rule reads
|
|
49
|
+
* (#1221) — threaded into {@link LintContext} by `runLint` when the caller
|
|
50
|
+
* resolved the project's config (`chant lint` does; a bare unit test or the
|
|
51
|
+
* LSP's single-file lint may not). Structurally mirrors the corresponding
|
|
52
|
+
* `ChantConfig` fields (../config.ts) without importing them, so `rule.ts`
|
|
53
|
+
* stays dependency-light for lexicon rule authors.
|
|
54
|
+
*/
|
|
55
|
+
export interface LintProjectConfig {
|
|
56
|
+
/** Declared environments — a bare name or `{ name, endpoint }` (#1166). */
|
|
57
|
+
environments?: Array<string | {
|
|
58
|
+
name: string;
|
|
59
|
+
endpoint?: string;
|
|
60
|
+
}>;
|
|
61
|
+
/** Ownership marking config — `env` is a literal or a build-parameter reference (#1396). */
|
|
62
|
+
ownership?: {
|
|
63
|
+
stack?: string;
|
|
64
|
+
env?: string | {
|
|
65
|
+
param: string;
|
|
66
|
+
};
|
|
67
|
+
enabled?: boolean;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
47
70
|
/**
|
|
48
71
|
* Context provided to lint rules during checking
|
|
49
72
|
*/
|
|
@@ -69,6 +92,14 @@ export interface LintContext {
|
|
|
69
92
|
* call is a violation.
|
|
70
93
|
*/
|
|
71
94
|
intrinsics?: readonly IntrinsicDef[];
|
|
95
|
+
/**
|
|
96
|
+
* chant #1221 — the project's resolved config slice for config-aware rules
|
|
97
|
+
* (COR021 reads `environments` + `ownership`). Threaded from `runLint`;
|
|
98
|
+
* undefined when the caller never loaded a project config (a unit test
|
|
99
|
+
* constructing a context directly, the LSP's single-file path), in which
|
|
100
|
+
* case config-aware rules stay silent.
|
|
101
|
+
*/
|
|
102
|
+
projectConfig?: LintProjectConfig;
|
|
72
103
|
}
|
|
73
104
|
/**
|
|
74
105
|
* Configuration value for a rule: either a severity string or a [severity, options] tuple
|
package/dist/lint/rule.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule.d.ts","sourceRoot":"","sources":["../../src/lint/rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,aAAa,GAAG,OAAO,GAAG,aAAa,GAAG,UAAU,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,gDAAgD;IAChD,KAAK,EAAE,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ourceRoot":"","sources":["../../../src/lint/rules/cor021-env-literal-name.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAkD,MAAM,SAAS,CAAC;AAmGxF,eAAO,MAAM,wBAAwB,EAAE,QAatC,CAAC"}
|
|
@@ -23,9 +23,10 @@ export { evl009CompositeNoConstantRule } from "./evl009-composite-no-constant.js
|
|
|
23
23
|
export { evl010CompositeNoTransformRule } from "./evl010-composite-no-transform.js";
|
|
24
24
|
export { cor017CompositeNameMatchRule } from "./cor017-composite-name-match.js";
|
|
25
25
|
export { cor018CompositePreferLexiconTypeRule } from "./cor018-composite-prefer-lexicon-type.js";
|
|
26
|
+
export { cor021EnvLiteralNameRule } from "./cor021-env-literal-name.js";
|
|
26
27
|
export { isInsideCompositeFactory } from "./composite-scope.js";
|
|
27
28
|
/**
|
|
28
|
-
* Load all
|
|
29
|
+
* Load all 22 core lint rules (COR + EVL).
|
|
29
30
|
*/
|
|
30
31
|
export declare function loadCoreRules(): LintRule[];
|
|
31
32
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,sBAAsB,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A+B,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,oCAAoC,EAAE,MAAM,wCAAwC,CAAC;AAC9F,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAyB7D;;GAEG;AACH,wBAAgB,aAAa,IAAI,QAAQ,EAAE,CAyB1C"}
|
package/dist/op/builders.d.ts
CHANGED
|
@@ -57,6 +57,33 @@ export declare const shell: (cmd: string, opts?: {
|
|
|
57
57
|
}) => ActivityStep;
|
|
58
58
|
/** Run `chant teardown` in the given project directory. Uses `longInfra` profile. */
|
|
59
59
|
export declare const teardown: (path: string) => ActivityStep;
|
|
60
|
+
/**
|
|
61
|
+
* Tear down one environment's marker-owned resources — the durable form of
|
|
62
|
+
* `chant lifecycle teardown <env> --yes` (#1222). The activity runs core's
|
|
63
|
+
* teardown engine in-process: enumerate by ownership marker (this project's
|
|
64
|
+
* `ownership.stack` + `env`), delete through each lexicon's `executeTeardown`
|
|
65
|
+
* capability, retry failures once, and fail the step when any candidate is
|
|
66
|
+
* still failed. Distinct from {@link teardown}, which runs a project's own
|
|
67
|
+
* `npm run teardown` script.
|
|
68
|
+
*
|
|
69
|
+
* The CLI's guards apply unchanged, and a production-like environment name
|
|
70
|
+
* needs `confirmProd: true` in `opts` — the authored counterpart of
|
|
71
|
+
* `--confirm-prod`, since an Op never prompts. An ordinary {@link gate} step
|
|
72
|
+
* placed before this one composes as usual (steps run in authored order), so
|
|
73
|
+
* a human approval can precede the deletion:
|
|
74
|
+
*
|
|
75
|
+
* ```ts
|
|
76
|
+
* phase("Teardown", [
|
|
77
|
+
* gate("approve-teardown", { description: "Release the staging teardown" }),
|
|
78
|
+
* envTeardown("staging"),
|
|
79
|
+
* ]),
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* `opts` also accepts `path` (the chant project directory, default the
|
|
83
|
+
* worker's cwd). Defaults to the `longInfra` profile (override via
|
|
84
|
+
* `opts.profile`).
|
|
85
|
+
*/
|
|
86
|
+
export declare const envTeardown: (env: string, opts?: Record<string, unknown>) => ActivityStep;
|
|
60
87
|
/**
|
|
61
88
|
* Create a local k3d cluster (vanilla Kubernetes in Docker). Idempotent: skips
|
|
62
89
|
* creation if a cluster of the same name already exists. Defaults to the
|
|
@@ -147,8 +174,8 @@ export declare const azDelete: (templatePath: string, opts?: Record<string, unkn
|
|
|
147
174
|
* Deploy a built CloudFormation template by calling the CloudFormation API
|
|
148
175
|
* directly (create-or-update + poll) — the direct twin of {@link azApply} /
|
|
149
176
|
* {@link gcpApply} for AWS, targeting a local Floci emulator or real AWS by
|
|
150
|
-
* endpoint override. Speaks the CFN API over HTTP rather than shelling `aws`
|
|
151
|
-
*
|
|
177
|
+
* endpoint override. Speaks the CFN API over HTTP rather than shelling `aws` —
|
|
178
|
+
* `nativeApply({ target: "cloudformation" })` routes here too (#1449). Provided by
|
|
152
179
|
* the aws lexicon; loaded when the project lists `aws`. Defaults to the
|
|
153
180
|
* `longInfra` profile. `opts` requires `stackName`; accepts `endpoint`, `region`,
|
|
154
181
|
* `capabilities`, `timeoutMs`, `intervalMs`.
|
|
@@ -157,13 +184,15 @@ export declare const awsApply: (templatePath: string, opts?: Record<string, unkn
|
|
|
157
184
|
/** Delete a CloudFormation stack — the inverse of {@link awsApply}. Defaults to the `longInfra` profile (override via `opts.profile`). `opts` requires `stackName`. */
|
|
158
185
|
export declare const awsDelete: (templatePath: string, opts?: Record<string, unknown>) => ActivityStep;
|
|
159
186
|
/**
|
|
160
|
-
* Apply chant's built GCP (CNRM) resources directly to
|
|
187
|
+
* Apply chant's built GCP (CNRM) resources directly to their GCP REST APIs,
|
|
161
188
|
* targeting a local floci-gcp emulator or real GCP by endpoint override — the
|
|
162
|
-
* native GCP applier (#706 starter #711)
|
|
163
|
-
* Defaults to the `longInfra` profile (override via
|
|
189
|
+
* native GCP applier (#706 starter #711). `nativeApply({ target: "gcp" })`
|
|
190
|
+
* routes here too (#1449). Defaults to the `longInfra` profile (override via
|
|
191
|
+
* `opts.profile`).
|
|
164
192
|
*
|
|
165
|
-
* `opts` accepts `endpoint` (default `
|
|
166
|
-
* `project` (default `GOOGLE_CLOUD_PROJECT` env / the CNRM
|
|
193
|
+
* `opts` accepts `endpoint` (default `GCP_ENDPOINT_URL` env / each kind's
|
|
194
|
+
* real-GCP host) and `project` (default `GOOGLE_CLOUD_PROJECT` env / the CNRM
|
|
195
|
+
* project-id annotation).
|
|
167
196
|
*/
|
|
168
197
|
export declare const gcpApply: (manifestPath: string, opts?: Record<string, unknown>) => ActivityStep;
|
|
169
198
|
/** Delete the GCP (CNRM) resources in a built manifest — the inverse of {@link gcpApply}. Defaults to the `longInfra` profile (override via `opts.profile`). */
|
|
@@ -1 +1 @@
|
|
|
1
|
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EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;CAC9B,KAAG,YAGR,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,KAAG,YAKjE,CAAC"}
|
package/dist/op/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Op, phase, activity, gate, build, kubectlApply, helmInstall, waitForStack, waitForReady, gitlabPipeline, lifecycleSnapshot, shell, teardown, k3dUp, k3dDown, flociUp, flociDown, flociAzUp, flociAzDown, flociGcpUp, flociGcpDown, httpCheck, azGroupEnsure, azGroupDelete, azApply, azDelete, awsApply, awsDelete, gcpApply, gcpDelete, policyGate, spriteCreate, spriteExec, spriteCheckpoint, spriteRestore, listCheckpoints, spriteDestroy, spriteWriteFile, spriteReadFile, spriteListDir, spriteRemove, spriteApplyNetworkPolicy, spriteApplyServices, spriteTaskCreate, spriteTaskRefresh, spriteTaskRelease, spritesUp, spritesDown } from "./builders.js";
|
|
1
|
+
export { Op, phase, activity, gate, build, kubectlApply, helmInstall, waitForStack, waitForReady, gitlabPipeline, lifecycleSnapshot, shell, teardown, envTeardown, k3dUp, k3dDown, flociUp, flociDown, flociAzUp, flociAzDown, flociGcpUp, flociGcpDown, httpCheck, azGroupEnsure, azGroupDelete, azApply, azDelete, awsApply, awsDelete, gcpApply, gcpDelete, policyGate, spriteCreate, spriteExec, spriteCheckpoint, spriteRestore, listCheckpoints, spriteDestroy, spriteWriteFile, spriteReadFile, spriteListDir, spriteRemove, spriteApplyNetworkPolicy, spriteApplyServices, spriteTaskCreate, spriteTaskRefresh, spriteTaskRelease, spritesUp, spritesDown } from "./builders.js";
|
|
2
2
|
export { OpResource } from "./resource.js";
|
|
3
3
|
export { safeHeartbeat, sleep } from "./activity-runtime.js";
|
|
4
4
|
export { emulatorLifecycle, emulatorsOf, endpointEnvVars } from "./emulator-lifecycle.js";
|
package/dist/op/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/op/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EACvF,cAAc,EAAE,iBAAiB,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/op/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EACvF,cAAc,EAAE,iBAAiB,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EACnG,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAC3D,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EACrG,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,EACzF,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAC5D,wBAAwB,EAAE,mBAAmB,EAC7C,gBAAgB,EAAE,iBAAiB,EAAE,iBAAiB,EACtD,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvF,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACrI,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACpH,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACjG,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACpF,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,yBAAyB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAClH,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@intentius/chant/testing` (#1224) — the live-stack test harness.
|
|
3
|
+
*
|
|
4
|
+
* A vitest suite deploys a real instance of its project once, asserts against
|
|
5
|
+
* it, and tears it down — emulator-locally on a dev machine, real-cloud in CI,
|
|
6
|
+
* with the same suite text. One call composes machinery that already exists:
|
|
7
|
+
*
|
|
8
|
+
* - **build** — the same programmatic path `chant build` takes: config
|
|
9
|
+
* resolution (`buildParams` + the ownership marker) mirrored from the CLI,
|
|
10
|
+
* then `build()` over the project's own serializers.
|
|
11
|
+
* - **apply** — an additive `nativeApply` per built lexicon output, run
|
|
12
|
+
* in-process through the local Op executor (`runOpLocally`). `deleteMode`
|
|
13
|
+
* is `"never"`: a test deploy creates and updates, nothing else.
|
|
14
|
+
* - **destroy** — #1222's marker-scoped teardown (`executeTeardown`), called
|
|
15
|
+
* in-process for exactly this suite's environment. Stateless by design:
|
|
16
|
+
* a crashed suite's environment is recovered by calling destroy again (or
|
|
17
|
+
* `chant lifecycle teardown <env> --yes`).
|
|
18
|
+
*
|
|
19
|
+
* ## Isolation
|
|
20
|
+
*
|
|
21
|
+
* Every deploy targets its own environment: `test-<suite>-<nonce>` by default
|
|
22
|
+
* ({@link testEnvName}), so parallel CI jobs never collide. The environment
|
|
23
|
+
* is the teardown key — everything the deploy stamps carries the ownership
|
|
24
|
+
* marker `{ stack, env }`, and `destroy()` selects on that identity and
|
|
25
|
+
* nothing else. A project that declares `environments` must legalize the
|
|
26
|
+
* dynamic names with a pattern entry (#1221):
|
|
27
|
+
*
|
|
28
|
+
* ```ts
|
|
29
|
+
* environments: ["dev", "prod", { name: "test-*", endpoint: "http://localhost:4566" }]
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* ## Emulators
|
|
33
|
+
*
|
|
34
|
+
* The harness is emulator-aware the same way `--live` reads are (#1166): the
|
|
35
|
+
* target environment's declared `endpoint` is injected into each lexicon's
|
|
36
|
+
* ambient endpoint variable (`AWS_ENDPOINT_URL`, …) for the apply and the
|
|
37
|
+
* teardown — unless the variable is already set. Ambient always wins, so the
|
|
38
|
+
* env vars `chant emulator up --json` reports (#920) take precedence when
|
|
39
|
+
* exported, and a CI job pointing the identical suite at a real account just
|
|
40
|
+
* leaves both unset.
|
|
41
|
+
*/
|
|
42
|
+
import type { Declarable } from "./declarable.js";
|
|
43
|
+
import type { SerializerResult } from "./serializer.js";
|
|
44
|
+
import { type BuildParamValue } from "./build-params.js";
|
|
45
|
+
import type { LexiconPlugin } from "./lexicon.js";
|
|
46
|
+
import { type ActivityFn, type ActivityProfile } from "./op/activity-registry.js";
|
|
47
|
+
import { type TeardownReport } from "./lifecycle/teardown.js";
|
|
48
|
+
export interface DeployStackOptions {
|
|
49
|
+
/** The chant project directory (where the infra source lives). */
|
|
50
|
+
dir: string;
|
|
51
|
+
/**
|
|
52
|
+
* Explicit environment name. Overrides the default `test-<suite>-<nonce>`
|
|
53
|
+
* derivation — for a shared long-lived test environment, or a test that
|
|
54
|
+
* needs a deterministic name. Must be legal for the project's declared
|
|
55
|
+
* `environments`, exactly as `--env` would be.
|
|
56
|
+
*/
|
|
57
|
+
env?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Suite name folded into the default environment name. Defaults to the
|
|
60
|
+
* project directory's basename.
|
|
61
|
+
*/
|
|
62
|
+
suite?: string;
|
|
63
|
+
/** Build parameters, exactly as `--param name=value` flags would supply them. */
|
|
64
|
+
params?: Record<string, BuildParamValue>;
|
|
65
|
+
/**
|
|
66
|
+
* Loaded lexicon plugins. Defaults to loading the project's own declared/
|
|
67
|
+
* detected lexicons — pass this only to substitute test doubles.
|
|
68
|
+
*/
|
|
69
|
+
plugins?: LexiconPlugin[];
|
|
70
|
+
/** Activity implementations for the apply. Defaults to the real registry. */
|
|
71
|
+
activities?: Map<string, ActivityFn>;
|
|
72
|
+
/** Activity profiles (timeouts/retries). Defaults to the lexicon-declared table. */
|
|
73
|
+
profiles?: Record<string, ActivityProfile>;
|
|
74
|
+
/**
|
|
75
|
+
* Extra lexicon-name → `nativeApply` target entries, merged over the
|
|
76
|
+
* built-in map (aws → cloudformation, k8s → kubectl, azure → arm,
|
|
77
|
+
* gcp → gcp, fly → fly). A seam for tests and out-of-tree lexicons.
|
|
78
|
+
*/
|
|
79
|
+
applyTargets?: Record<string, string>;
|
|
80
|
+
}
|
|
81
|
+
/** The handle a suite holds between `beforeAll` and `afterAll`. */
|
|
82
|
+
export interface DeployedStack {
|
|
83
|
+
/** The built outputs, keyed by lexicon — what was deployed. */
|
|
84
|
+
outputs: Map<string, string | SerializerResult>;
|
|
85
|
+
/** The discovered entities, keyed by name. */
|
|
86
|
+
entities: Map<string, Declarable>;
|
|
87
|
+
/** The environment this deploy targeted — the teardown key. */
|
|
88
|
+
env: string;
|
|
89
|
+
/**
|
|
90
|
+
* Tear down everything carrying this suite's marker `{ stack, env }`.
|
|
91
|
+
* Throws {@link TeardownIncompleteError} when any candidate failed to
|
|
92
|
+
* delete or the plan had holes — an environment that cannot be called
|
|
93
|
+
* clean is a test failure, never a silent leak. Safe to call again:
|
|
94
|
+
* teardown is stateless, and a second call over a clean environment
|
|
95
|
+
* plans nothing.
|
|
96
|
+
*/
|
|
97
|
+
destroy(): Promise<TeardownReport>;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Thrown by {@link DeployedStack.destroy} when the environment cannot be
|
|
101
|
+
* called clean: candidates still `failed` after the retry pass, or the plan
|
|
102
|
+
* had holes (#1089 — parts of the estate could not be read, so "nothing
|
|
103
|
+
* left" would be a claim about what was readable, not about the environment).
|
|
104
|
+
* Carries the full report for diagnosis.
|
|
105
|
+
*/
|
|
106
|
+
export declare class TeardownIncompleteError extends Error {
|
|
107
|
+
readonly report: TeardownReport;
|
|
108
|
+
constructor(report: TeardownReport);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The default environment name for one suite run: `test-<suite>-<nonce>`.
|
|
112
|
+
* The `test-` prefix is what a project's `"test-*"` pattern entry (#1221)
|
|
113
|
+
* legalizes; the nonce keeps parallel CI jobs of the same suite apart.
|
|
114
|
+
*/
|
|
115
|
+
export declare function testEnvName(suite: string): string;
|
|
116
|
+
/**
|
|
117
|
+
* Deploy a live instance of the project in `dir` for one test suite.
|
|
118
|
+
*
|
|
119
|
+
* Build (the CLI's own config resolution: `buildParams`, ownership marker,
|
|
120
|
+
* build roots) + additive apply (one `nativeApply` per built output with a
|
|
121
|
+
* native mechanism, via the local Op executor). Returns the handle the suite
|
|
122
|
+
* holds: outputs, entities, the environment name, and `destroy`.
|
|
123
|
+
*
|
|
124
|
+
* The ownership marker stamped on every resource is `{ stack: ownership.stack,
|
|
125
|
+
* env: <this deploy's environment> }` — the marker env always follows the
|
|
126
|
+
* suite environment, whatever `ownership.env` in config says, because the
|
|
127
|
+
* marker is the only thing `destroy()` selects on. A project with no
|
|
128
|
+
* `ownership.stack` is refused up front: a deploy that stamps nothing is a
|
|
129
|
+
* deploy nothing can sweep.
|
|
130
|
+
*
|
|
131
|
+
* Failures are thrown, never returned: build errors, unresolved parameters,
|
|
132
|
+
* an illegal environment name, and a failed apply (the local executor's
|
|
133
|
+
* `OpRunFailure`) all reject the returned promise.
|
|
134
|
+
*/
|
|
135
|
+
export declare function deployStack(options: DeployStackOptions): Promise<DeployedStack>;
|
|
136
|
+
//# sourceMappingURL=testing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../src/testing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAMH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAMrD,OAAO,EAAsB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAI1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG/C,OAAO,EAAgC,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE7G,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAgB5E,MAAM,WAAW,kBAAkB;IACjC,kEAAkE;IAClE,GAAG,EAAE,MAAM,CAAC;IACZ;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACzC;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;IAC1B,6EAA6E;IAC7E,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACrC,oFAAoF;IACpF,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC3C;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC;AAED,mEAAmE;AACnE,MAAM,WAAW,aAAa;IAC5B,+DAA+D;IAC/D,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAAC,CAAC;IAChD,8CAA8C;IAC9C,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAClC,+DAA+D;IAC/D,GAAG,EAAE,MAAM,CAAC;IACZ;;;;;;;OAOG;IACH,OAAO,IAAI,OAAO,CAAC,cAAc,CAAC,CAAC;CACpC;AAED;;;;;;GAMG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;aACpB,MAAM,EAAE,cAAc;gBAAtB,MAAM,EAAE,cAAc;CAkBnD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAUjD;AA8BD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC,CAkHrF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.0",
|
|
4
4
|
"description": "Declarative infrastructure-as-code toolkit — TypeScript on Node.js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://intentius.io/chant",
|
|
@@ -64,6 +64,11 @@
|
|
|
64
64
|
"types": "./dist/components/index.d.ts",
|
|
65
65
|
"default": "./src/components/index.ts"
|
|
66
66
|
},
|
|
67
|
+
"./testing": {
|
|
68
|
+
"development": "./src/testing.ts",
|
|
69
|
+
"types": "./dist/testing.d.ts",
|
|
70
|
+
"default": "./src/testing.ts"
|
|
71
|
+
},
|
|
67
72
|
"./*": {
|
|
68
73
|
"development": "./src/*.ts",
|
|
69
74
|
"types": "./dist/*.d.ts",
|