@intentius/chant 0.19.1 → 0.21.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/build-params.d.ts +108 -0
- package/dist/build-params.d.ts.map +1 -0
- package/dist/build.d.ts +79 -1
- package/dist/build.d.ts.map +1 -1
- package/dist/cli/commands/build.d.ts +31 -0
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/check-lexicon-examples.d.ts +41 -0
- package/dist/cli/commands/check-lexicon-examples.d.ts.map +1 -0
- package/dist/cli/commands/check-lexicon-intrinsics.d.ts +71 -0
- package/dist/cli/commands/check-lexicon-intrinsics.d.ts.map +1 -0
- package/dist/cli/commands/check-lexicon.d.ts +1 -1
- package/dist/cli/commands/check-lexicon.d.ts.map +1 -1
- package/dist/cli/commands/lint.d.ts +27 -0
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/components.d.ts.map +1 -1
- package/dist/cli/handlers/lint.d.ts.map +1 -1
- package/dist/cli/handlers/run-client.d.ts +1 -1
- package/dist/cli/handlers/run-client.d.ts.map +1 -1
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/plugins.d.ts +16 -0
- package/dist/cli/plugins.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +10 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/codegen/docs-sections.d.ts.map +1 -1
- package/dist/codegen/docs-types.d.ts +2 -0
- package/dist/codegen/docs-types.d.ts.map +1 -1
- package/dist/components/cli-support.d.ts +12 -5
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/discover.d.ts +62 -7
- package/dist/components/discover.d.ts.map +1 -1
- package/dist/components/sandbox/driver.d.ts +12 -0
- package/dist/components/sandbox/driver.d.ts.map +1 -0
- package/dist/components/sandbox/run.d.ts +42 -0
- package/dist/components/sandbox/run.d.ts.map +1 -0
- package/dist/composite.d.ts +5 -0
- package/dist/composite.d.ts.map +1 -1
- package/dist/config.d.ts +71 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/declarable.d.ts +16 -0
- package/dist/declarable.d.ts.map +1 -1
- package/dist/discovery/collect.d.ts.map +1 -1
- package/dist/discovery/entity-wire-codec.d.ts +166 -0
- package/dist/discovery/entity-wire-codec.d.ts.map +1 -0
- package/dist/discovery/entity-wire.d.ts +50 -0
- package/dist/discovery/entity-wire.d.ts.map +1 -0
- package/dist/discovery/fold-import.d.ts +239 -0
- package/dist/discovery/fold-import.d.ts.map +1 -0
- package/dist/discovery/index.d.ts +74 -1
- package/dist/discovery/index.d.ts.map +1 -1
- package/dist/discovery/sandbox/bundle.d.ts +18 -0
- package/dist/discovery/sandbox/bundle.d.ts.map +1 -0
- package/dist/discovery/sandbox/child-errors.d.ts +15 -0
- package/dist/discovery/sandbox/child-errors.d.ts.map +1 -0
- package/dist/discovery/sandbox/driver.d.ts +13 -0
- package/dist/discovery/sandbox/driver.d.ts.map +1 -0
- package/dist/discovery/sandbox/run.d.ts +69 -0
- package/dist/discovery/sandbox/run.d.ts.map +1 -0
- package/dist/errors.d.ts +9 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/fold/fold.d.ts +299 -0
- package/dist/fold/fold.d.ts.map +1 -0
- package/dist/fold/foldable-helpers.d.ts +121 -0
- package/dist/fold/foldable-helpers.d.ts.map +1 -0
- package/dist/fold/subset.d.ts +134 -0
- package/dist/fold/subset.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/lexicon-output.d.ts +7 -2
- package/dist/lexicon-output.d.ts.map +1 -1
- package/dist/lexicon-schema.d.ts +4 -2
- package/dist/lexicon-schema.d.ts.map +1 -1
- package/dist/lexicon.d.ts +131 -1
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.d.ts +11 -0
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lint/component-checks.d.ts +7 -1
- package/dist/lint/component-checks.d.ts.map +1 -1
- package/dist/lint/rules/evl001-non-literal-expression.d.ts.map +1 -1
- package/dist/lint/rules/evl003-dynamic-property-access.d.ts.map +1 -1
- package/dist/params.d.ts +60 -0
- package/dist/params.d.ts.map +1 -0
- package/dist/provenance.d.ts +21 -0
- package/dist/provenance.d.ts.map +1 -1
- package/dist/runtime.d.ts +10 -1
- package/dist/runtime.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/build-params.test.ts +144 -0
- package/src/build-params.ts +207 -0
- package/src/build.test.ts +38 -0
- package/src/build.ts +144 -7
- package/src/cli/commands/build.test.ts +220 -2
- package/src/cli/commands/build.ts +111 -3
- package/src/cli/commands/check-lexicon-examples.test.ts +92 -0
- package/src/cli/commands/check-lexicon-examples.ts +103 -0
- package/src/cli/commands/check-lexicon-intrinsics.test.ts +179 -0
- package/src/cli/commands/check-lexicon-intrinsics.ts +348 -0
- package/src/cli/commands/check-lexicon.test.ts +34 -0
- package/src/cli/commands/check-lexicon.ts +137 -1
- package/src/cli/commands/lint.ts +31 -3
- package/src/cli/commands/onboard.ts +1 -1
- package/src/cli/component-security-boundary.test.ts +170 -0
- package/src/cli/handlers/build.ts +24 -3
- package/src/cli/handlers/components.ts +9 -2
- package/src/cli/handlers/dev.ts +1 -1
- package/src/cli/handlers/graph.ts +7 -5
- package/src/cli/handlers/lifecycle.ts +2 -2
- package/src/cli/handlers/lint.ts +2 -0
- package/src/cli/handlers/misc.ts +2 -2
- package/src/cli/handlers/run-client.ts +1 -1
- package/src/cli/handlers/run.ts +20 -5
- package/src/cli/main.test.ts +22 -0
- package/src/cli/main.ts +39 -0
- package/src/cli/plugins.ts +20 -4
- package/src/cli/registry.ts +10 -0
- package/src/cli/security-boundary.test.ts +135 -0
- package/src/codegen/docs-sections.test.ts +67 -0
- package/src/codegen/docs-sections.ts +7 -3
- package/src/codegen/docs-types.ts +2 -0
- package/src/components/cli-support.ts +22 -10
- package/src/components/discover.ts +127 -25
- package/src/components/sandbox/driver.ts +114 -0
- package/src/components/sandbox/run.test.ts +185 -0
- package/src/components/sandbox/run.ts +177 -0
- package/src/composite.test.ts +21 -0
- package/src/composite.ts +20 -1
- package/src/config.ts +81 -0
- package/src/declarable.ts +20 -0
- package/src/discovery/collect.ts +17 -3
- package/src/discovery/entity-wire-codec.ts +487 -0
- package/src/discovery/entity-wire.test.ts +240 -0
- package/src/discovery/entity-wire.ts +67 -0
- package/src/discovery/fold-import.test.ts +1598 -0
- package/src/discovery/fold-import.ts +1998 -0
- package/src/discovery/index.test.ts +191 -1
- package/src/discovery/index.ts +242 -1
- package/src/discovery/sandbox/bundle.ts +218 -0
- package/src/discovery/sandbox/child-errors.ts +65 -0
- package/src/discovery/sandbox/driver.ts +147 -0
- package/src/discovery/sandbox/run.test.ts +179 -0
- package/src/discovery/sandbox/run.ts +196 -0
- package/src/errors.ts +9 -1
- package/src/fold/fold.test.ts +812 -0
- package/src/fold/fold.ts +805 -0
- package/src/fold/foldable-helpers.ts +171 -0
- package/src/fold/subset-doc-parity.test.ts +210 -0
- package/src/fold/subset.test.ts +352 -0
- package/src/fold/subset.ts +383 -0
- package/src/index.ts +2 -0
- package/src/lexicon-output.ts +7 -2
- package/src/lexicon-schema.test.ts +57 -0
- package/src/lexicon-schema.ts +8 -1
- package/src/lexicon.ts +132 -1
- package/src/lifecycle/git.test.ts +10 -5
- package/src/lifecycle/release-ledger.test.ts +28 -0
- package/src/lifecycle/release-ledger.ts +11 -0
- package/src/lint/component-checks.ts +8 -1
- package/src/lint/rules/evl001-non-literal-expression.ts +26 -110
- package/src/lint/rules/evl003-dynamic-property-access.ts +11 -2
- package/src/params.test.ts +22 -0
- package/src/params.ts +66 -0
- package/src/provenance.ts +22 -0
- package/src/runtime.ts +11 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lexicon-schema.d.ts","sourceRoot":"","sources":["../src/lexicon-schema.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,WAAW,CAAC;AAM/D,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"lexicon-schema.d.ts","sourceRoot":"","sources":["../src/lexicon-schema.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,WAAW,CAAC;AAM/D,eAAO,MAAM,kBAAkB;;;;;;iBAY7B,CAAC;AAQH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;iBAOhC,CAAC;AAiCH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmB7B,CAAC;AAMH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAMpE;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,eAAe,CA2B/D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAmBjF"}
|
package/dist/lexicon.d.ts
CHANGED
|
@@ -14,6 +14,41 @@ import type { ReferenceCatalog } from "./graph-refs.js";
|
|
|
14
14
|
export type { ReferenceCatalog, IdentityRule, RefRule } from "./graph-refs.js";
|
|
15
15
|
/**
|
|
16
16
|
* Manifest for a packaged lexicon — metadata embedded in the tarball.
|
|
17
|
+
*
|
|
18
|
+
* chant #1067 decided each optional field below explicitly rather than
|
|
19
|
+
* leaving them all equally unchecked:
|
|
20
|
+
*
|
|
21
|
+
* - `chantVersion` — now validated for presence/shape by `chant dev
|
|
22
|
+
* check-lexicon` (a lexicon's `dist/manifest.json` must declare one).
|
|
23
|
+
* NOT validated for compatibility against the core version actually
|
|
24
|
+
* running — that needs a live check at plugin-load time (a different
|
|
25
|
+
* surface: `loadPlugin`/`loadPlugins` in `./cli/plugins.ts`), which stays
|
|
26
|
+
* a deliberate non-goal here.
|
|
27
|
+
* - `namespace` — deliberately NOT validated for cross-lexicon uniqueness in
|
|
28
|
+
* #1067. `chant dev check-lexicon <dir>` only ever inspects one lexicon at
|
|
29
|
+
* a time, so it structurally can't catch a collision between two
|
|
30
|
+
* *different* lexicons. The natural home is `checkConflicts` (./cli/
|
|
31
|
+
* conflict-check.ts), which already detects cross-lexicon rule-id/skill/
|
|
32
|
+
* MCP-tool/MCP-resource collisions when multiple plugins load together —
|
|
33
|
+
* but `namespace` isn't on the runtime `LexiconPlugin` surface at all
|
|
34
|
+
* (manifest-only, baked in at package time), so extending that check would
|
|
35
|
+
* mean adding a new field to `LexiconPlugin` itself. Deferred rather than
|
|
36
|
+
* done under time pressure alongside a concurrent, unrelated change to
|
|
37
|
+
* this same interface (chant #1064).
|
|
38
|
+
* - `pseudoParameters` — deliberately NOT validated against what the
|
|
39
|
+
* lexicon actually exports in #1067, unlike `intrinsics` (see
|
|
40
|
+
* `IntrinsicDef.isTag` below and `./cli/commands/check-lexicon-
|
|
41
|
+
* intrinsics.ts`). The same static-analysis approach would apply — check
|
|
42
|
+
* each declared pseudo-parameter's short name against the real exported
|
|
43
|
+
* namespace object's properties (`AWS.StackName`, `Azure.ResourceGroupName`,
|
|
44
|
+
* ...) — but unlike `intrinsics()`, `pseudoParameters(): string[]` is a
|
|
45
|
+
* flat list of dotted strings with no structural link back to a specific
|
|
46
|
+
* export/property declaration, making the same trick more involved to
|
|
47
|
+
* generalize correctly. Relevant to #1063 (folding cross-file references
|
|
48
|
+
* into lexicon pseudo-parameter namespaces): once that lands, a wrong or
|
|
49
|
+
* missing pseudo-parameter property would silently break folding exactly
|
|
50
|
+
* the way #1039 did for intrinsics, which would be the moment this
|
|
51
|
+
* deferral needs revisiting.
|
|
17
52
|
*/
|
|
18
53
|
export interface LexiconManifest {
|
|
19
54
|
name: string;
|
|
@@ -91,8 +126,103 @@ export interface IntrinsicDef {
|
|
|
91
126
|
readonly name: string;
|
|
92
127
|
readonly description?: string;
|
|
93
128
|
readonly outputKey?: string;
|
|
94
|
-
|
|
129
|
+
/**
|
|
130
|
+
* Whether this intrinsic is authored as a JS tagged template (`` Sub`...` ``)
|
|
131
|
+
* rather than a plain function call (`Ref(...)`). Required — chant #1067 —
|
|
132
|
+
* because an omitted value silently defaulted to "not a tag" with no
|
|
133
|
+
* signal that the registration had never been decided. That produced #1039
|
|
134
|
+
* in both directions at once: aws's `Sub` (a genuine tagged template, the
|
|
135
|
+
* most-used intrinsic in the ecosystem) shipped with no `isTag` at all and
|
|
136
|
+
* silently never folded, while gitlab's `reference()` (a plain call)
|
|
137
|
+
* shipped with `isTag: true`. Both were wrong, and both shipped, because
|
|
138
|
+
* nothing forced the declaration or checked it against how the intrinsic is
|
|
139
|
+
* actually authored. `chant dev check-lexicon` now validates every
|
|
140
|
+
* registration here against its real declaration (tagged-template
|
|
141
|
+
* signature vs plain call) and against the package's own exports — see
|
|
142
|
+
* `../cli/commands/check-lexicon-intrinsics.ts`.
|
|
143
|
+
*/
|
|
144
|
+
readonly isTag: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* chant #1044 — opt this intrinsic's PLAIN-CALL form into folding
|
|
147
|
+
* (`Ref(bucket)`, `Concat(a, b)` reduce to their intrinsic node instead of
|
|
148
|
+
* falling the whole file back to the run path).
|
|
149
|
+
*
|
|
150
|
+
* Optional, and OFF unless a lexicon writes `true`. That default is the
|
|
151
|
+
* point: `fold()` has no general `CallExpression` case by construction
|
|
152
|
+
* (epic #1019), and this field is the only thing that admits one. It is a
|
|
153
|
+
* closed, lexicon-declared allowlist, decided one intrinsic at a time —
|
|
154
|
+
* never inferred from `isTag`, from the name, or from the call's shape. An
|
|
155
|
+
* intrinsic with no `foldsAsCall` behaves exactly as it did before #1044.
|
|
156
|
+
*
|
|
157
|
+
* Only set it when calling the intrinsic is a pure function of its
|
|
158
|
+
* arguments that builds a deterministic data envelope — the whole
|
|
159
|
+
* correctness argument is that invoking it while folding is
|
|
160
|
+
* indistinguishable from invoking it during a real run of the file. An
|
|
161
|
+
* intrinsic that reads the environment, mutates state, or depends on
|
|
162
|
+
* anything but its arguments does not qualify, and neither does a tagged
|
|
163
|
+
* template (see {@link isTag}: the two forms are mutually exclusive, and
|
|
164
|
+
* `chant dev check-lexicon` rejects `isTag: true` + `foldsAsCall: true`).
|
|
165
|
+
*
|
|
166
|
+
* Registration is by name. It is not permission to invoke whatever that
|
|
167
|
+
* name happens to be bound to: `fold()` reduces the call to a symbolic
|
|
168
|
+
* envelope executing nothing, and `../discovery/fold-import.ts` resolves
|
|
169
|
+
* the name through the folding FILE'S OWN imports before invoking the real
|
|
170
|
+
* function — so the function that runs while folding is the same one the
|
|
171
|
+
* run path would have called, from the module the source itself named.
|
|
172
|
+
*/
|
|
173
|
+
readonly foldsAsCall?: boolean;
|
|
95
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* Whether `chant build --fold` can ever fold a use of this intrinsic
|
|
177
|
+
* (chant #1062, epic #1019) — in EITHER authored form.
|
|
178
|
+
*
|
|
179
|
+
* Two disjoint ways to qualify, one per form:
|
|
180
|
+
*
|
|
181
|
+
* - a registered tagged-template intrinsic (`Sub\`...\``) folds because
|
|
182
|
+
* `foldTaggedTemplate` recognizes its tag and recurses into the interior
|
|
183
|
+
* ({@link intrinsicTagFolds});
|
|
184
|
+
* - a registered plain-call intrinsic (`Ref(...)`, `Concat(...)`) folds
|
|
185
|
+
* only when its lexicon opted it in with `foldsAsCall`
|
|
186
|
+
* ({@link intrinsicCallFolds}, chant #1044). Before #1044 no plain call
|
|
187
|
+
* folded at all, whatever it was named or registered as.
|
|
188
|
+
*
|
|
189
|
+
* This function is the single predicate the generated per-lexicon intrinsics
|
|
190
|
+
* page (`../codegen/docs-sections.ts`'s "Folds?" column) calls — never a
|
|
191
|
+
* restated copy that could silently drift from the code. `fold()` itself
|
|
192
|
+
* calls the two form-specific predicates below rather than this one, because
|
|
193
|
+
* it always knows which form it is looking at, and a tag must not fold as a
|
|
194
|
+
* call (or vice versa) merely because the other form was opted in.
|
|
195
|
+
*
|
|
196
|
+
* Takes a structural `{ isTag?, foldsAsCall? }` rather than
|
|
197
|
+
* `Pick<IntrinsicDef, ...>` deliberately: `IntrinsicDef.isTag` is required
|
|
198
|
+
* for new registrations (chant #1067), but these predicates also read off
|
|
199
|
+
* untrusted, possibly-older parsed JSON (`ManifestJSON` in
|
|
200
|
+
* `./codegen/docs-types.ts`, on disk as a published lexicon's
|
|
201
|
+
* `dist/manifest.json`) that may predate either field. `undefined` there
|
|
202
|
+
* means what it always did — not a tag, not opted in.
|
|
203
|
+
*/
|
|
204
|
+
export declare function intrinsicFolds(def: {
|
|
205
|
+
isTag?: boolean;
|
|
206
|
+
foldsAsCall?: boolean;
|
|
207
|
+
}): boolean;
|
|
208
|
+
/** True when this intrinsic's TAGGED-TEMPLATE form folds (`Sub\`...\``) — see {@link intrinsicFolds}. */
|
|
209
|
+
export declare function intrinsicTagFolds(def: {
|
|
210
|
+
isTag?: boolean;
|
|
211
|
+
}): boolean;
|
|
212
|
+
/**
|
|
213
|
+
* True when this intrinsic's PLAIN-CALL form folds (`Ref(...)`) — i.e. the
|
|
214
|
+
* lexicon opted it in via {@link IntrinsicDef.foldsAsCall} (chant #1044).
|
|
215
|
+
*
|
|
216
|
+
* `isTag: true` disqualifies regardless: a tagged template is invoked as
|
|
217
|
+
* `` Name`...` ``, so a call to it isn't the registered authoring form at
|
|
218
|
+
* all. Keeping that here rather than trusting registrations means a lexicon
|
|
219
|
+
* that declares both flags cannot quietly widen `fold()`'s call case — and
|
|
220
|
+
* `chant dev check-lexicon` fails the registration outright.
|
|
221
|
+
*/
|
|
222
|
+
export declare function intrinsicCallFolds(def: {
|
|
223
|
+
isTag?: boolean;
|
|
224
|
+
foldsAsCall?: boolean;
|
|
225
|
+
}): boolean;
|
|
96
226
|
/**
|
|
97
227
|
* Options passed to a MigrationSource by `chant migrate`.
|
|
98
228
|
*/
|
package/dist/lexicon.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lexicon.d.ts","sourceRoot":"","sources":["../src/lexicon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC7H,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAIrD,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5E
|
|
1
|
+
{"version":3,"file":"lexicon.d.ts","sourceRoot":"","sources":["../src/lexicon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAA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OAAO,GAAG,SAAS,CAAC;CACjC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mCAAmC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAkBtE"}
|
|
@@ -61,6 +61,17 @@ export interface ReleaseRecord {
|
|
|
61
61
|
timestamp: string;
|
|
62
62
|
/** Who/what triggered the deploy (a username, a CI actor, a service account). */
|
|
63
63
|
actor: string;
|
|
64
|
+
/**
|
|
65
|
+
* Who approved the change at its durable approval gate (#1035). Populated for
|
|
66
|
+
* a gated change — the same identity the approver supplied when they cleared
|
|
67
|
+
* the Temporal gate (`chant run signal ... --approver`, carried in the gate
|
|
68
|
+
* signal payload and thus the workflow history). Optional and omitted for an
|
|
69
|
+
* ungated change (nothing to approve), so `actor` alone answers "who made
|
|
70
|
+
* it" while `approver` answers "who approved it" only where a gate exists.
|
|
71
|
+
* Distinct from `actor`: the approver is deliberately a different person than
|
|
72
|
+
* the one who triggered the deploy (separation of duties).
|
|
73
|
+
*/
|
|
74
|
+
approver?: string;
|
|
64
75
|
/** Optional: the archive's own manifest digest (../components/verbs/build-archive.ts's `manifestDigest`), when the caller has it — lets a reader recover full build contents/provenance, not just the promoted image digest. */
|
|
65
76
|
manifestDigest?: string;
|
|
66
77
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release-ledger.d.ts","sourceRoot":"","sources":["../../src/lifecycle/release-ledger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;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CAAC,aAAa,CAAC,GAAG,MAAM,EAAE,CAO9E;AAED,gIAAgI;AAChI,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;AAEhE;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,kBAAkB,EACzB,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GACtB,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,aAAa,CAAA;CAAE,CAAC,CAQpD;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GACtB,OAAO,CAAC;IAAE,OAAO,EAAE,aAAa,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAiB1D;AAED,4EAA4E;AAC5E,wBAAsB,uBAAuB,CAAC,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAExF;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CASvF;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,EAAE,CAE1F"}
|
|
@@ -86,8 +86,14 @@ export interface ComponentCheck {
|
|
|
86
86
|
* error under the pseudo-check id "COMP000" rather than silently dropped —
|
|
87
87
|
* matching how `discoverComponents`'s caller (`../components/cli-support.ts`)
|
|
88
88
|
* always surfaces `result.errors` rather than ignoring them.
|
|
89
|
+
*
|
|
90
|
+
* `sandbox` (chant #1051, `chant lint --sandbox`) is threaded straight
|
|
91
|
+
* through to `discoverComponents` — `chant lint`'s own AST-only rule engine
|
|
92
|
+
* never executes project source (see this module's own doc comment), but
|
|
93
|
+
* COMP* checks exist precisely because they need the discovered `Component`
|
|
94
|
+
* graph, which does mean importing `*.component.ts` files.
|
|
89
95
|
*/
|
|
90
|
-
export declare function runComponentChecks(path: string, checks: ComponentCheck[], registryContext?: Pick<ComponentCheckContext, "knownKinds" | "rollbackPolicies"
|
|
96
|
+
export declare function runComponentChecks(path: string, checks: ComponentCheck[], registryContext?: Pick<ComponentCheckContext, "knownKinds" | "rollbackPolicies">, sandbox?: boolean): Promise<ComponentCheckDiagnostic[]>;
|
|
91
97
|
/** Structural type guard, mirroring `isPostSynthCheck` — used by rule discovery/registry code. */
|
|
92
98
|
export declare function isComponentCheck(value: unknown): value is ComponentCheck;
|
|
93
99
|
/** Re-exported for rule modules that need the discovered shape without importing `../components/discover` directly. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-checks.d.ts","sourceRoot":"","sources":["../../src/lint/component-checks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEvC,wFAAwF;AACxF,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,mGAAmG;AACnG,MAAM,WAAW,qBAAqB;IACpC,6DAA6D;IAC7D,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAC7C;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC;;;;;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,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;CACxD;AAED,2MAA2M;AAC3M,MAAM,WAAW,wBAAwB;IACvC,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,wFAAwF;IACxF,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,gFAAgF;AAChF,MAAM,WAAW,cAAc;IAC7B,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC;IACnB,QAAQ,EAAE,aAAa,GAAG,OAAO,GAAG,aAAa,GAAG,UAAU,CAAC;IAC/D,gDAAgD;IAChD,KAAK,CAAC,GAAG,EAAE,qBAAqB,GAAG,wBAAwB,EAAE,CAAC;CAC/D;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,cAAc,EAAE,EACxB,eAAe,CAAC,EAAE,IAAI,CAAC,qBAAqB,EAAE,YAAY,GAAG,kBAAkB,CAAC,EAChF,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,wBAAwB,EAAE,CAAC,CA+BrC;AAED,kGAAkG;AAClG,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAUxE;AAED,uHAAuH;AACvH,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evl001-non-literal-expression.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/evl001-non-literal-expression.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"evl001-non-literal-expression.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/evl001-non-literal-expression.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,SAAS,CAAC;AAsDrE,eAAO,MAAM,8BAA8B,EAAE,QAU5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evl003-dynamic-property-access.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/evl003-dynamic-property-access.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"evl003-dynamic-property-access.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/evl003-dynamic-property-access.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,SAAS,CAAC;AAuCrE,eAAO,MAAM,+BAA+B,EAAE,QAU7C,CAAC"}
|
package/dist/params.d.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build-time parameters — the runtime binding source references (chant #1064,
|
|
3
|
+
* follow-up to epic #1019's fold work).
|
|
4
|
+
*
|
|
5
|
+
* This is deliberately NOT `Parameter` (`lexicons/aws/src/parameter.ts`), which
|
|
6
|
+
* is a deploy-time CloudFormation parameter: it emits a `Parameters:` block and
|
|
7
|
+
* resolves when the STACK deploys. A build-time parameter resolves before the
|
|
8
|
+
* template is even synthesized — its value can change WHICH resources are
|
|
9
|
+
* produced at all (loomster's `LOOM_TIER` selecting `light` vs `production` vs
|
|
10
|
+
* `production-ha`), which a deploy-time `Parameter` structurally cannot do.
|
|
11
|
+
*
|
|
12
|
+
* Project source never reads `process.env` directly to vary a build — that
|
|
13
|
+
* reads ambient state at module-evaluation time, which `fold()` correctly
|
|
14
|
+
* cannot reduce to a value (see ../fold/fold.ts). Instead it imports this
|
|
15
|
+
* module's `params` object:
|
|
16
|
+
*
|
|
17
|
+
* ```ts
|
|
18
|
+
* import { params } from "@intentius/chant/params";
|
|
19
|
+
* export const tier = params.tier as Tier;
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* `params` is declared, validated (type + optional `enum`), and resolved by
|
|
23
|
+
* the CLI BEFORE discovery ever touches a project file (../build-params.ts's
|
|
24
|
+
* `resolveBuildParams`, driven by `chant build --param`/`--params-file`/a
|
|
25
|
+
* declared `env` mapping/`chant.config.ts`'s `buildParams` defaults). Two
|
|
26
|
+
* consumers read the resolved values, and both see the identical object:
|
|
27
|
+
*
|
|
28
|
+
* - The FOLD path (../discovery/fold-import.ts's `buildExternals`) recognizes
|
|
29
|
+
* a named `params` import resolving to *this* module and substitutes the
|
|
30
|
+
* already-resolved values directly, with zero import performed — so
|
|
31
|
+
* `params.tier` folds to a LITERAL, not a symbolic node. This is the entire
|
|
32
|
+
* point: the value is known at build invocation, so there is nothing left
|
|
33
|
+
* to defer.
|
|
34
|
+
* - The RUN path (a run-fallback file that imports this module for real)
|
|
35
|
+
* gets the exact same values, because `setBuildParams` below is called
|
|
36
|
+
* once, in-process, before ANY project file is imported or folded —
|
|
37
|
+
* mutating this shared object in place rather than replacing the binding,
|
|
38
|
+
* so a live-imported reference always observes the current build's values.
|
|
39
|
+
*/
|
|
40
|
+
import type { BuildParamValue } from "./build-params.js";
|
|
41
|
+
export type { BuildParamValue };
|
|
42
|
+
/**
|
|
43
|
+
* The current build's resolved parameter values, keyed by declared name.
|
|
44
|
+
* Empty until a build populates it via {@link setBuildParams}. Mutated IN
|
|
45
|
+
* PLACE (never reassigned) so a real `import { params }` in a run-fallback
|
|
46
|
+
* file — which captures this exact object reference at import time — always
|
|
47
|
+
* observes whatever the current build resolved, even though the import
|
|
48
|
+
* happens after this module was first loaded.
|
|
49
|
+
*/
|
|
50
|
+
export declare const params: Record<string, BuildParamValue>;
|
|
51
|
+
/**
|
|
52
|
+
* Replace the shared {@link params} object's contents in place. Called once
|
|
53
|
+
* per build (../discovery/index.ts's `discover()`), before any project file
|
|
54
|
+
* is imported or folded, with the CLI/config-resolved values
|
|
55
|
+
* (../build-params.ts's `resolveBuildParams`). Never called from project
|
|
56
|
+
* source — this is chant's own build-invocation plumbing, not a public
|
|
57
|
+
* authoring API.
|
|
58
|
+
*/
|
|
59
|
+
export declare function setBuildParams(values: Readonly<Record<string, BuildParamValue>>): void;
|
|
60
|
+
//# sourceMappingURL=params.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"params.d.ts","sourceRoot":"","sources":["../src/params.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,YAAY,EAAE,eAAe,EAAE,CAAC;AAEhC;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAM,CAAC;AAE1D;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,GAAG,IAAI,CAGtF"}
|
package/dist/provenance.d.ts
CHANGED
|
@@ -8,6 +8,12 @@
|
|
|
8
8
|
* This is entity-level provenance (which file declared it, and which composite
|
|
9
9
|
* expanded it), not a YAML-line source map. It answers "where did this resource
|
|
10
10
|
* come from?", which is the question an agent asks before changing it.
|
|
11
|
+
*
|
|
12
|
+
* {@link BuildParamProvenance} (chant #1064) is the other half: not "where did
|
|
13
|
+
* this ENTITY come from" but "what INPUTS was this whole BUILD invoked with" —
|
|
14
|
+
* the question ambient `process.env` reads used to answer invisibly. See
|
|
15
|
+
* ../build-params.ts for declaration/resolution and ../build.ts's
|
|
16
|
+
* `BuildResult.buildParams` for where a build surfaces it.
|
|
11
17
|
*/
|
|
12
18
|
export interface EntityProvenance {
|
|
13
19
|
/** Absolute path of the source file that declared (or exported) the entity. */
|
|
@@ -30,4 +36,19 @@ export interface EntityProvenance {
|
|
|
30
36
|
export declare function setProvenance(entity: object, prov: EntityProvenance): void;
|
|
31
37
|
/** Read an entity's build provenance, if any was stamped. */
|
|
32
38
|
export declare function getProvenance(entity: object): EntityProvenance | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* One resolved build-time parameter (chant #1064, see ../build-params.ts): its
|
|
41
|
+
* final value and which source won it, so a build's parameter inputs are
|
|
42
|
+
* auditable rather than inferred. `source` records precedence, most to least
|
|
43
|
+
* specific: an explicit `--param`/`--params-file` value beats a declared `env`
|
|
44
|
+
* mapping, which beats `chant.config.ts`'s `default`.
|
|
45
|
+
*/
|
|
46
|
+
export interface BuildParamProvenance {
|
|
47
|
+
/** The declared parameter name (a key of `chant.config.ts`'s `buildParams`). */
|
|
48
|
+
name: string;
|
|
49
|
+
/** The resolved, type-coerced value actually bound to `params.<name>` for this build. */
|
|
50
|
+
value: string | number | boolean;
|
|
51
|
+
/** Which input supplied the value. */
|
|
52
|
+
source: "cli" | "params-file" | "env" | "default";
|
|
53
|
+
}
|
|
33
54
|
//# sourceMappingURL=provenance.d.ts.map
|
package/dist/provenance.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provenance.d.ts","sourceRoot":"","sources":["../src/provenance.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"provenance.d.ts","sourceRoot":"","sources":["../src/provenance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,MAAM,WAAW,gBAAgB;IAC/B,+EAA+E;IAC/E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAe1E;AAED,6DAA6D;AAC7D,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAE1E;AAED;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;IACb,yFAAyF;IACzF,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACjC,sCAAsC;IACtC,MAAM,EAAE,KAAK,GAAG,aAAa,GAAG,KAAK,GAAG,SAAS,CAAC;CACnD"}
|
package/dist/runtime.d.ts
CHANGED
|
@@ -18,6 +18,15 @@ import { type Declarable } from "./declarable.js";
|
|
|
18
18
|
export declare function createResource(type: string, lexicon: string, attrMap: Record<string, string>): new (props: Record<string, unknown>, attributes?: Record<string, unknown>) => Declarable & Record<string, string>;
|
|
19
19
|
/**
|
|
20
20
|
* Create a property-kind class for a given property type.
|
|
21
|
+
*
|
|
22
|
+
* Instances carry DECLARABLE_MARKER/lexicon/entityType/kind at runtime (set
|
|
23
|
+
* via defineProperty below), so they already satisfy `Declarable` — the
|
|
24
|
+
* return type just needs to say so. Before this, the signature was
|
|
25
|
+
* `Record<string, unknown>` with no `Declarable`, so any composite that
|
|
26
|
+
* returned a property-kind instance as a top-level member only type-checked
|
|
27
|
+
* by accident: either the caller went through an untyped `require()` (losing
|
|
28
|
+
* the type entirely) or never assigned the instance where its `Declarable`-ness
|
|
29
|
+
* was checked statically. See chant #1068.
|
|
21
30
|
*/
|
|
22
|
-
export declare function createProperty(type: string, lexicon: string): new (props: Record<string, unknown>) => Record<string, unknown>;
|
|
31
|
+
export declare function createProperty(type: string, lexicon: string): new (props: Record<string, unknown>) => Declarable & Record<string, unknown>;
|
|
23
32
|
//# sourceMappingURL=runtime.d.ts.map
|
package/dist/runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAGlE;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,KAAK,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA4BnH;AAED
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAGlE;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,KAAK,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA4BnH;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,KAAK,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAY9E"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.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",
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
78
|
"@dagrejs/dagre": "^3.0.0",
|
|
79
|
+
"esbuild": "^0.27.0",
|
|
79
80
|
"fflate": "^0.8.2",
|
|
80
81
|
"picomatch": "^4.0.3",
|
|
81
82
|
"tsx": "^4.0.0",
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { describe, expect, test } from "vitest";
|
|
2
|
+
import { resolveBuildParams, buildParamValues, type BuildParamsConfig } from "./build-params";
|
|
3
|
+
|
|
4
|
+
const TIER_DEF: BuildParamsConfig = {
|
|
5
|
+
tier: { type: "string", default: "light", enum: ["light", "production", "production-ha"] },
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
describe("resolveBuildParams — precedence", () => {
|
|
9
|
+
test("cli beats params-file beats env beats default", () => {
|
|
10
|
+
const defs: BuildParamsConfig = { name: { type: "string", default: "d", env: "NAME_ENV" } };
|
|
11
|
+
|
|
12
|
+
const cliOnly = resolveBuildParams(defs, { cli: { name: "from-cli" } });
|
|
13
|
+
expect(cliOnly.errors).toEqual([]);
|
|
14
|
+
expect(cliOnly.provenance).toEqual([{ name: "name", value: "from-cli", source: "cli" }]);
|
|
15
|
+
|
|
16
|
+
const cliOverFile = resolveBuildParams(defs, { cli: { name: "from-cli" }, fromFile: { name: "from-file" } });
|
|
17
|
+
expect(cliOverFile.provenance).toEqual([{ name: "name", value: "from-cli", source: "cli" }]);
|
|
18
|
+
|
|
19
|
+
const fileOverEnv = resolveBuildParams(defs, { fromFile: { name: "from-file" }, env: { NAME_ENV: "from-env" } });
|
|
20
|
+
expect(fileOverEnv.provenance).toEqual([{ name: "name", value: "from-file", source: "params-file" }]);
|
|
21
|
+
|
|
22
|
+
const envOverDefault = resolveBuildParams(defs, { env: { NAME_ENV: "from-env" } });
|
|
23
|
+
expect(envOverDefault.provenance).toEqual([{ name: "name", value: "from-env", source: "env" }]);
|
|
24
|
+
|
|
25
|
+
const defaultOnly = resolveBuildParams(defs, {});
|
|
26
|
+
expect(defaultOnly.provenance).toEqual([{ name: "name", value: "d", source: "default" }]);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
test("a parameter with no env mapping ignores an unrelated env var of the same name", () => {
|
|
30
|
+
const defs: BuildParamsConfig = { name: { type: "string", default: "d" } };
|
|
31
|
+
const result = resolveBuildParams(defs, { env: { name: "should-not-be-used" } });
|
|
32
|
+
expect(result.provenance).toEqual([{ name: "name", value: "d", source: "default" }]);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
describe("resolveBuildParams — validation", () => {
|
|
37
|
+
test("missing value with no default is a build error naming the parameter", () => {
|
|
38
|
+
const defs: BuildParamsConfig = { tier: { type: "string" } };
|
|
39
|
+
const result = resolveBuildParams(defs, {});
|
|
40
|
+
expect(result.provenance).toEqual([]);
|
|
41
|
+
expect(result.errors).toHaveLength(1);
|
|
42
|
+
expect(result.errors[0]).toContain('"tier"');
|
|
43
|
+
expect(result.errors[0]).toContain("--param tier=");
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
test("enum violation names the parameter and the allowed values", () => {
|
|
47
|
+
const result = resolveBuildParams(TIER_DEF, { cli: { tier: "bogus" } });
|
|
48
|
+
expect(result.provenance).toEqual([]);
|
|
49
|
+
expect(result.errors).toHaveLength(1);
|
|
50
|
+
expect(result.errors[0]).toContain('"tier"');
|
|
51
|
+
expect(result.errors[0]).toContain("light");
|
|
52
|
+
expect(result.errors[0]).toContain("bogus");
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
test("enum success resolves normally", () => {
|
|
56
|
+
const result = resolveBuildParams(TIER_DEF, { cli: { tier: "production" } });
|
|
57
|
+
expect(result.errors).toEqual([]);
|
|
58
|
+
expect(result.provenance).toEqual([{ name: "tier", value: "production", source: "cli" }]);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
test("unknown --param key (not declared) is a build error", () => {
|
|
62
|
+
const result = resolveBuildParams(TIER_DEF, { cli: { bogusName: "x" } });
|
|
63
|
+
expect(result.errors.some((e) => e.includes('"bogusName"') && e.includes("--param"))).toBe(true);
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
test("unknown --params-file key (not declared) is a build error", () => {
|
|
67
|
+
const result = resolveBuildParams(TIER_DEF, { fromFile: { bogusName: "x" } });
|
|
68
|
+
expect(result.errors.some((e) => e.includes('"bogusName"') && e.includes("--params-file"))).toBe(true);
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
test("number type coercion, including a non-numeric failure", () => {
|
|
72
|
+
const defs: BuildParamsConfig = { count: { type: "number" } };
|
|
73
|
+
const ok = resolveBuildParams(defs, { cli: { count: "42" } });
|
|
74
|
+
expect(ok.errors).toEqual([]);
|
|
75
|
+
expect(ok.provenance).toEqual([{ name: "count", value: 42, source: "cli" }]);
|
|
76
|
+
|
|
77
|
+
const bad = resolveBuildParams(defs, { cli: { count: "not-a-number" } });
|
|
78
|
+
expect(bad.provenance).toEqual([]);
|
|
79
|
+
expect(bad.errors[0]).toContain('"count"');
|
|
80
|
+
expect(bad.errors[0]).toContain("number");
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
test("boolean type coercion, including an invalid string", () => {
|
|
84
|
+
const defs: BuildParamsConfig = { flag: { type: "boolean" } };
|
|
85
|
+
const trueVal = resolveBuildParams(defs, { cli: { flag: "true" } });
|
|
86
|
+
expect(trueVal.provenance).toEqual([{ name: "flag", value: true, source: "cli" }]);
|
|
87
|
+
|
|
88
|
+
const falseVal = resolveBuildParams(defs, { cli: { flag: "false" } });
|
|
89
|
+
expect(falseVal.provenance).toEqual([{ name: "flag", value: false, source: "cli" }]);
|
|
90
|
+
|
|
91
|
+
const bad = resolveBuildParams(defs, { cli: { flag: "nope" } });
|
|
92
|
+
expect(bad.provenance).toEqual([]);
|
|
93
|
+
expect(bad.errors[0]).toContain("boolean");
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
test("params-file value must be a scalar, not an object/array", () => {
|
|
97
|
+
const defs: BuildParamsConfig = { thing: { type: "string" } };
|
|
98
|
+
const result = resolveBuildParams(defs, { fromFile: { thing: { nested: true } as unknown as string } });
|
|
99
|
+
expect(result.provenance).toEqual([]);
|
|
100
|
+
expect(result.errors[0]).toContain('"thing"');
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
test("every failure across multiple parameters is reported at once", () => {
|
|
104
|
+
const defs: BuildParamsConfig = {
|
|
105
|
+
a: { type: "string" },
|
|
106
|
+
b: { type: "number" },
|
|
107
|
+
};
|
|
108
|
+
const result = resolveBuildParams(defs, { cli: { b: "nan" } });
|
|
109
|
+
expect(result.errors).toHaveLength(2);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
test("no declared params at all — empty resolution, no errors", () => {
|
|
113
|
+
const result = resolveBuildParams(undefined, {});
|
|
114
|
+
expect(result).toEqual({ provenance: [], errors: [] });
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
test("required: false — an unresolved optional parameter is simply omitted, not an error", () => {
|
|
118
|
+
const defs: BuildParamsConfig = { hostedZoneId: { type: "string", required: false } };
|
|
119
|
+
const result = resolveBuildParams(defs, {});
|
|
120
|
+
expect(result.errors).toEqual([]);
|
|
121
|
+
expect(result.provenance).toEqual([]);
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
test("required: false — a supplied value still resolves normally", () => {
|
|
125
|
+
const defs: BuildParamsConfig = { hostedZoneId: { type: "string", required: false } };
|
|
126
|
+
const result = resolveBuildParams(defs, { cli: { hostedZoneId: "Z123" } });
|
|
127
|
+
expect(result.errors).toEqual([]);
|
|
128
|
+
expect(result.provenance).toEqual([{ name: "hostedZoneId", value: "Z123", source: "cli" }]);
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
describe("buildParamValues", () => {
|
|
133
|
+
test("projects provenance records down to a plain value map", () => {
|
|
134
|
+
const provenance = [
|
|
135
|
+
{ name: "tier", value: "light" as const, source: "default" as const },
|
|
136
|
+
{ name: "count", value: 3 as const, source: "cli" as const },
|
|
137
|
+
];
|
|
138
|
+
expect(buildParamValues(provenance)).toEqual({ tier: "light", count: 3 });
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
test("empty provenance yields an empty map", () => {
|
|
142
|
+
expect(buildParamValues([])).toEqual({});
|
|
143
|
+
});
|
|
144
|
+
});
|