@intentius/chant 0.108.1 → 0.110.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/handlers/lifecycle.d.ts.map +1 -1
- package/dist/composite.d.ts +5 -0
- package/dist/composite.d.ts.map +1 -1
- package/dist/discovery/collect.d.ts.map +1 -1
- package/dist/discovery/fold-import.d.ts +15 -0
- package/dist/discovery/fold-import.d.ts.map +1 -1
- package/dist/discovery/param-deps.d.ts +59 -4
- package/dist/discovery/param-deps.d.ts.map +1 -1
- package/dist/fold/subset.d.ts +17 -2
- package/dist/fold/subset.d.ts.map +1 -1
- package/dist/fold-provenance.d.ts +49 -4
- package/dist/fold-provenance.d.ts.map +1 -1
- package/dist/import/ir-utils.d.ts.map +1 -1
- package/dist/import/parser.d.ts +8 -0
- package/dist/import/parser.d.ts.map +1 -1
- package/dist/provenance.d.ts +49 -0
- package/dist/provenance.d.ts.map +1 -1
- package/dist/serializer-walker.d.ts.map +1 -1
- package/dist/stack-output.d.ts +5 -0
- package/dist/stack-output.d.ts.map +1 -1
- package/dist/yaml.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cli/commands/import.test.ts +5 -4
- package/src/cli/handlers/lifecycle.test.ts +106 -1
- package/src/cli/handlers/lifecycle.ts +26 -5
- package/src/composite.ts +37 -0
- package/src/discovery/collect.ts +13 -3
- package/src/discovery/fold-composite.test.ts +22 -0
- package/src/discovery/fold-host-composite.test.ts +23 -0
- package/src/discovery/fold-import.ts +324 -30
- package/src/discovery/fold-package-composite.test.ts +14 -1
- package/src/discovery/fold-project-provenance.test.ts +584 -0
- package/src/discovery/param-deps.test.ts +163 -3
- package/src/discovery/param-deps.ts +173 -4
- package/src/fold/subset-public-export.test.ts +38 -0
- package/src/fold/subset.ts +17 -2
- package/src/fold-provenance.test.ts +190 -16
- package/src/fold-provenance.ts +158 -13
- package/src/import/ir-utils.ts +6 -1
- package/src/import/parser.ts +8 -0
- package/src/provenance.ts +59 -2
- package/src/serializer-walker.test.ts +10 -0
- package/src/serializer-walker.ts +17 -1
- package/src/stack-output.ts +6 -1
- package/src/yaml.test.ts +6 -0
- package/src/yaml.ts +4 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/lifecycle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/lifecycle.ts"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAKlD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,GAAG,MAAM,CAE9E;AAmCD;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAyH/E;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA4C3E;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA8B/E;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA+L3E;AA4rBD;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAqR3E;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA2L/E;AAsBD;;GAEG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAiB1E;AAgBD;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAmE7E;AAiCD;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAM9E;AAkBD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA8D/E"}
|
package/dist/composite.d.ts
CHANGED
|
@@ -76,6 +76,11 @@ export declare class CompositeRegistry {
|
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
78
|
export declare function Composite<P, M extends CompositeFactoryMembers = CompositeMembers>(factory: (props: P) => M, name?: string): CompositeDefinition<P, M>;
|
|
79
|
+
/**
|
|
80
|
+
* chant#3608 — the composite whose call built `entity`, or `undefined` for an
|
|
81
|
+
* entity no chant composite built.
|
|
82
|
+
*/
|
|
83
|
+
export declare function compositeOfMember(entity: object): string | undefined;
|
|
79
84
|
/**
|
|
80
85
|
* Expands a CompositeInstance into a flat Map of prefixed entity names to Declarables.
|
|
81
86
|
* Handles nested composites recursively.
|
package/dist/composite.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composite.d.ts","sourceRoot":"","sources":["../src/composite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAG7D;;GAEG;AACH,eAAO,MAAM,gBAAgB,eAAgC,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAE1D;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,uBAAuB,GAE/B,MAAM,CAAC,MAAM,EA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AAC,CAqBH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collect.d.ts","sourceRoot":"","sources":["../../src/discovery/collect.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"collect.d.ts","sourceRoot":"","sources":["../../src/discovery/collect.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAmI9D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC,EAClE,SAAS,CAAC,EAAE,MAAM,GACjB,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAiEzB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as ts from "typescript";
|
|
2
2
|
import { type Declarable } from "../declarable.js";
|
|
3
3
|
import { type CompositeInstance } from "../composite.js";
|
|
4
|
+
import { type FoldProvenance } from "../fold-provenance.js";
|
|
4
5
|
import { type IntrinsicDef } from "../lexicon.js";
|
|
5
6
|
import type { BuildParamValue } from "../build-params.js";
|
|
6
7
|
/**
|
|
@@ -622,6 +623,20 @@ export interface FoldProjectVerdict {
|
|
|
622
623
|
};
|
|
623
624
|
/** The file's complete export namespace, present only when `verdict` is "fold". */
|
|
624
625
|
readonly exports?: ReadonlyMap<string, unknown>;
|
|
626
|
+
/**
|
|
627
|
+
* chant#3598 — fold provenance for the entities this file contributes,
|
|
628
|
+
* keyed by entity name, in the shape `build()` reports as
|
|
629
|
+
* `BuildResult.foldProvenance`. Present only when `verdict` is "fold" and
|
|
630
|
+
* the folded files' entities could be collected (a duplicate entity name
|
|
631
|
+
* fails collection for the whole set, as it fails a build, and then no
|
|
632
|
+
* verdict carries it). A file that folds and declares nothing with
|
|
633
|
+
* properties carries `{}`.
|
|
634
|
+
*
|
|
635
|
+
* A "run" file has no entry: foldProject never executes one, so it has no
|
|
636
|
+
* entities to attribute. That holds under `sandbox` too, where nothing
|
|
637
|
+
* crosses the child-process wire because no child is started.
|
|
638
|
+
*/
|
|
639
|
+
readonly foldProvenance?: FoldProvenance;
|
|
625
640
|
}
|
|
626
641
|
/**
|
|
627
642
|
* Fold a whole set of project files and report every file's verdict
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fold-import.d.ts","sourceRoot":"","sources":["../../src/discovery/fold-import.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAMjC,OAAO,EAAsC,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAkC,KAAK,iBAAiB,EAAyB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"fold-import.d.ts","sourceRoot":"","sources":["../../src/discovery/fold-import.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAMjC,OAAO,EAAsC,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAkC,KAAK,iBAAiB,EAAyB,MAAM,cAAc,CAAC;AAqD7G,OAAO,EAA4B,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEnF,OAAO,EAAgD,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAC7F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AAEH,mGAAmG;AACnG,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,iBAAiB,CAAC,CAAC;AAElF,MAAM,MAAM,cAAc,GACtB;IACE,EAAE,EAAE,IAAI,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AO,CAAC;IAC7B;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9C;AAED,iFAAiF;AACjF,MAAM,WAAW,kBAAkB;IACjC,0CAA0C;IAC1C,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC;IACjC,yEAAyE;IACzE,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,KAAK,CAAC;IACnC,+EAA+E;IAC/E,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,sEAAsE;IACtE,QAAQ,CAAC,SAAS,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,aAAa,CAAA;KAAE,CAAC;IAC3D,mFAAmF;IACnF,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChD;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC;CAC1C;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,WAAW,CAC/B,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,UAAU,GAAE,SAAS,YAAY,EAAO,EACxC,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAkE1C"}
|
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
import * as ts from "typescript";
|
|
2
|
-
import type { PathOrigin } from "../provenance.js";
|
|
2
|
+
import type { ArgumentLocation, HostOriginReason, PathOrigin, SourceLocation } from "../provenance.js";
|
|
3
|
+
/**
|
|
4
|
+
* What a file binds to host code, for {@link hostReadOf} (INTENTIUS/typescript-as-data#248).
|
|
5
|
+
*/
|
|
6
|
+
export interface HostBindings {
|
|
7
|
+
/** Local names bound to a value a lexicon package exports. */
|
|
8
|
+
values: ReadonlySet<string>;
|
|
9
|
+
/** Local names of eager lexicon helpers: a call to one is evaluated by host code at fold time. */
|
|
10
|
+
eagerCalls: ReadonlySet<string>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The first host read in `expr`, following this file's own top-level consts,
|
|
14
|
+
* or `undefined` when it reads none (INTENTIUS/typescript-as-data#248).
|
|
15
|
+
*
|
|
16
|
+
* A method called on a receiver is `host-call` whatever the receiver is, since
|
|
17
|
+
* fold calls the real method on it; so is a call to an eager lexicon helper. An
|
|
18
|
+
* identifier bound to a lexicon export is `host-value`. A call fold reduces to
|
|
19
|
+
* an envelope (an authoring helper, a call-form intrinsic) or evaluates itself
|
|
20
|
+
* (a project function) is not host code, and only its arguments are read.
|
|
21
|
+
*
|
|
22
|
+
* Syntactic, like {@link readParams}, so it over-reports in one place: both
|
|
23
|
+
* arms of a conditional are read although only one is taken. That errs toward
|
|
24
|
+
* `unknown`, which never licenses an edit `direct` would not.
|
|
25
|
+
*/
|
|
26
|
+
export declare function hostReadOf(expr: ts.Expression, consts: ReadonlyMap<string, ts.Expression>, paramLocals: ReadonlySet<string>, host: HostBindings): HostOriginReason | undefined;
|
|
3
27
|
/**
|
|
4
28
|
* Path → build-parameter origin for one resource's props object literal.
|
|
5
29
|
*
|
|
@@ -12,8 +36,12 @@ import type { PathOrigin } from "../provenance.js";
|
|
|
12
36
|
* A spread is attributed to the object it spreads INTO, at that object's own
|
|
13
37
|
* path (the entity root for a top-level spread), since which keys it
|
|
14
38
|
* contributes is not knowable here.
|
|
39
|
+
*
|
|
40
|
+
* With `host`, a path whose expression reads host code ({@link hostReadOf})
|
|
41
|
+
* is recorded `host` instead, and that outranks a build parameter it also
|
|
42
|
+
* reads: the value is what host code returned, whatever the parameter was.
|
|
15
43
|
*/
|
|
16
|
-
export declare function collectParamDependencies(props: ts.ObjectLiteralExpression, consts: ReadonlyMap<string, ts.Expression>, paramLocals: ReadonlySet<string
|
|
44
|
+
export declare function collectParamDependencies(props: ts.ObjectLiteralExpression, consts: ReadonlyMap<string, ts.Expression>, paramLocals: ReadonlySet<string>, host?: HostBindings): Record<string, PathOrigin>;
|
|
17
45
|
/**
|
|
18
46
|
* The factory-parameter names in scope inside one composite body (chant #2161).
|
|
19
47
|
*
|
|
@@ -29,6 +57,30 @@ export interface CompositeParamScope {
|
|
|
29
57
|
/** Local name → the parameter path it was destructured from (`({ name }) => …`). */
|
|
30
58
|
destructured: ReadonlyMap<string, string>;
|
|
31
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* The composite call an interpreted factory body was reached from (chant
|
|
62
|
+
* #3597): the `WebApp({ replicas: 3 })` expression in the author's source and
|
|
63
|
+
* the absolute path of the file it is written in. The node must come from a
|
|
64
|
+
* source file parsed with parent pointers, which is how `fold-import.ts`
|
|
65
|
+
* parses every file it interprets.
|
|
66
|
+
*/
|
|
67
|
+
export interface CompositeCallSite {
|
|
68
|
+
file: string;
|
|
69
|
+
node: ts.CallExpression;
|
|
70
|
+
}
|
|
71
|
+
/** A node's start as a 1-based {@link SourceLocation}. */
|
|
72
|
+
export declare function sourceLocationOf(file: string, node: ts.Node): SourceLocation;
|
|
73
|
+
/**
|
|
74
|
+
* Where `parameter` was written at `call`: the property at that path in the
|
|
75
|
+
* call's object-literal argument, descending nested object literals segment by
|
|
76
|
+
* segment, or the call itself when there is no such property.
|
|
77
|
+
*
|
|
78
|
+
* The fallback covers a parameter the call leaves out, one that arrives through
|
|
79
|
+
* a spread, and an argument that is not an object literal. In each of those the
|
|
80
|
+
* call is the nearest place that governs the value, and no `text` is given,
|
|
81
|
+
* because no property at the call says what it is.
|
|
82
|
+
*/
|
|
83
|
+
export declare function argumentLocation(call: CompositeCallSite, parameter: string): ArgumentLocation;
|
|
32
84
|
/**
|
|
33
85
|
* Path → composite origin for one `new Type({...})` inside an interpreted
|
|
34
86
|
* composite factory body (chant #2161).
|
|
@@ -45,8 +97,11 @@ export interface CompositeParamScope {
|
|
|
45
97
|
* something under here", while `composite-literal` would be a claim that every
|
|
46
98
|
* key it brings is fixed. That claim is left unmade, and those paths come back
|
|
47
99
|
* `unknown` from ../fold-provenance.ts instead.
|
|
100
|
+
*
|
|
101
|
+
* `call` (chant #3597), when the fold saw the composite call, adds where each
|
|
102
|
+
* parameter's argument was written there, in the same pass.
|
|
48
103
|
*/
|
|
49
|
-
export declare function collectCompositeOrigins(props: ts.ObjectLiteralExpression, consts: ReadonlyMap<string, ts.Expression>, scope: CompositeParamScope, composite: string): Record<string, PathOrigin>;
|
|
104
|
+
export declare function collectCompositeOrigins(props: ts.ObjectLiteralExpression, consts: ReadonlyMap<string, ts.Expression>, scope: CompositeParamScope, composite: string, call?: CompositeCallSite): Record<string, PathOrigin>;
|
|
50
105
|
/**
|
|
51
106
|
* Path → composite origin for an entity a registered tag built inside an
|
|
52
107
|
* interpreted composite factory body (chant #3212).
|
|
@@ -62,5 +117,5 @@ export declare function collectCompositeOrigins(props: ts.ObjectLiteralExpressio
|
|
|
62
117
|
* recorded `composite-literal` at the key, which a parameter recorded deeper
|
|
63
118
|
* still outranks by longest prefix.
|
|
64
119
|
*/
|
|
65
|
-
export declare function collectTagOrigins(interpolations: readonly ts.Expression[], fields: ReadonlyArray<readonly string[]>, props: unknown, consts: ReadonlyMap<string, ts.Expression>, scope: CompositeParamScope, composite: string): Record<string, PathOrigin>;
|
|
120
|
+
export declare function collectTagOrigins(interpolations: readonly ts.Expression[], fields: ReadonlyArray<readonly string[]>, props: unknown, consts: ReadonlyMap<string, ts.Expression>, scope: CompositeParamScope, composite: string, call?: CompositeCallSite): Record<string, PathOrigin>;
|
|
66
121
|
//# sourceMappingURL=param-deps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"param-deps.d.ts","sourceRoot":"","sources":["../../src/discovery/param-deps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"param-deps.d.ts","sourceR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,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,cAAc,CAI5E;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,GAAG,gBAAgB,CAmB7F;AAOD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,EAAE,CAAC,uBAAuB,EACjC,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,EAC1C,KAAK,EAAE,mBAAmB,EAC1B,SAAS,EAAE,MAAM,EACjB,IAAI,CAAC,EAAE,iBAAiB,GACvB,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAkD5B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAC/B,cAAc,EAAE,SAAS,EAAE,CAAC,UAAU,EAAE,EACxC,MAAM,EAAE,aAAa,CAAC,SAAS,MAAM,EAAE,CAAC,EACxC,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,EAC1C,KAAK,EAAE,mBAAmB,EAC1B,SAAS,EAAE,MAAM,EACjB,IAAI,CAAC,EAAE,iBAAiB,GACvB,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAqB5B"}
|
package/dist/fold/subset.d.ts
CHANGED
|
@@ -176,7 +176,7 @@ import { type IntrinsicDef } from "../lexicon.js";
|
|
|
176
176
|
* `spec/VERSION` in the specification repository carries the same string, and
|
|
177
177
|
* the conformance adapter reads this one to fill its `specVersion` field.
|
|
178
178
|
*
|
|
179
|
-
* ## Why
|
|
179
|
+
* ## Why 2.3, and what each version since 1.0 asked for (chant#2445)
|
|
180
180
|
*
|
|
181
181
|
* Raising this is the last step of adopting a rule set, so each version was
|
|
182
182
|
* checked against what chant does rather than against whether the suite is
|
|
@@ -217,6 +217,21 @@ import { type IntrinsicDef } from "../lexicon.js";
|
|
|
217
217
|
* - **1.8** added `ι = executing`, and chant carries it as of `0.72.3`
|
|
218
218
|
* (#2455) — `FoldProjectOptions.executing`, mutually exclusive with
|
|
219
219
|
* `sandbox`. `open` stays the default and stays strict (#2453).
|
|
220
|
+
* - **2.2** added obligations to `F-Obs-Provenance` for an implementation that
|
|
221
|
+
* claims provenance: one origin per emitted path of four kinds, the
|
|
222
|
+
* innermost writer wins, and an origin that cannot be determined is reported
|
|
223
|
+
* as unknown, never as direct. chant claims provenance, so this is the
|
|
224
|
+
* version whose obligations it takes on. 2.2 also widens two rules to what
|
|
225
|
+
* chant already did: a call-bound local exported by name (`export { x }`)
|
|
226
|
+
* resolves by F-Call as the single declarator does, and a same-file call's
|
|
227
|
+
* result read inside an F-Call argument resolves once per file (#3329).
|
|
228
|
+
* - **2.3** says a value host code produced, written at an export or into a
|
|
229
|
+
* field, has an unknown origin and never a direct one. chant reports
|
|
230
|
+
* `host-call` and `host-value` for resource fields since
|
|
231
|
+
* typescript-as-data#248. 2.3 also lets `F-Host-Composite` interpret a
|
|
232
|
+
* composite an active package publishes as TypeScript source, which chant
|
|
233
|
+
* has done since #3247, and adds fixtures for a call result read inside an
|
|
234
|
+
* argument, which chant passes since #3610.
|
|
220
235
|
*
|
|
221
236
|
* `scripts/check-docs-citations.ts` refuses to run when this constant and the
|
|
222
237
|
* rules it loads disagree, so this and the `@intentius/tsad-conformance`
|
|
@@ -228,7 +243,7 @@ import { type IntrinsicDef } from "../lexicon.js";
|
|
|
228
243
|
* Until chant#2470 the rules came from a commit `docs-check.yml` checked out;
|
|
229
244
|
* now they come from the published package, so bumping it is what moves this.
|
|
230
245
|
*/
|
|
231
|
-
export declare const SPEC_VERSION = "2.
|
|
246
|
+
export declare const SPEC_VERSION = "2.3";
|
|
232
247
|
/** The two EVL rule ids a shape violation can be attributed to. */
|
|
233
248
|
export type SubsetRuleId = "EVL001" | "EVL003";
|
|
234
249
|
/** A located, shape-level rejection: the offending node, the EVL rule id it maps to, and a message. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subset.d.ts","sourceRoot":"","sources":["../../src/fold/subset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAiD,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAE9F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwKG;AAEH
|
|
1
|
+
{"version":3,"file":"subset.d.ts","sourceRoot":"","sources":["../../src/fold/subset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAiD,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAE9F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwKG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AACH,eAAO,MAAM,YAAY,QAAQ,CAAC;AAElC,mEAAmE;AACnE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE/C,uGAAuG;AACvG,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC;IACd,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB;AAMD,0FAA0F;AAC1F,eAAO,MAAM,0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/B,IAAI,EAAE,EAAE,CAAC,wBAAwB,EACjC,UAAU,CAAC,EAAE,SAAS,YAAY,EAAE,GACnC,eAAe,GAAG,SAAS,CAc7B;AAWD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,UAAU,CAAC,EAAE,SAAS,YAAY,EAAE,GACnC,eAAe,GAAG,SAAS,CAkO7B"}
|
|
@@ -69,9 +69,13 @@
|
|
|
69
69
|
* call and the parameter path, and performs no edit.
|
|
70
70
|
*/
|
|
71
71
|
import { type Declarable } from "./declarable.js";
|
|
72
|
-
import { type EntityProvenance, type PathOrigin } from "./provenance.js";
|
|
72
|
+
import { type ArgumentLocation, type EntityProvenance, type PathOrigin, type SourceLocation } from "./provenance.js";
|
|
73
73
|
import type { DeepEntityDrift } from "./lifecycle/deep-diff.js";
|
|
74
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* Why a field's origin could not be determined. The first two are facts about
|
|
76
|
+
* the BUILD; the host reasons are facts about the expression, and match the
|
|
77
|
+
* strings the specification's reference implementation reports.
|
|
78
|
+
*/
|
|
75
79
|
export type UnknownOriginReason =
|
|
76
80
|
/**
|
|
77
81
|
* A composite expanded the entity and this build did not interpret its body,
|
|
@@ -85,7 +89,15 @@ export type UnknownOriginReason =
|
|
|
85
89
|
* composite make it" is answerable. A sandboxed child's entities arrive this
|
|
86
90
|
* way: `discovery/entity-wire-codec.ts` drops build metadata over the wire.
|
|
87
91
|
*/
|
|
88
|
-
| "no-provenance"
|
|
92
|
+
| "no-provenance"
|
|
93
|
+
/**
|
|
94
|
+
* INTENTIUS/typescript-as-data#248: host code computed the value, by a method
|
|
95
|
+
* called on a real receiver (`"x".toUpperCase()`, `[1, 2].join("-")`) or an
|
|
96
|
+
* eager lexicon helper. The file wrote the call, not the value.
|
|
97
|
+
*/
|
|
98
|
+
| "host-call"
|
|
99
|
+
/** A value a lexicon package exports, bound by an import (`AWS.Region`, `S3Actions.GetObject`). */
|
|
100
|
+
| "host-value";
|
|
89
101
|
/**
|
|
90
102
|
* What produced one emitted property path.
|
|
91
103
|
*
|
|
@@ -98,10 +110,15 @@ export type FoldFieldOrigin = {
|
|
|
98
110
|
composite: string;
|
|
99
111
|
instance?: string;
|
|
100
112
|
parameters: string[];
|
|
113
|
+
/** Where the composite call was written (chant #3597), when the build saw it. */
|
|
114
|
+
call?: SourceLocation;
|
|
115
|
+
/** Where each parameter's argument was written at that call, in `parameters` order. */
|
|
116
|
+
arguments?: ArgumentLocation[];
|
|
101
117
|
} | {
|
|
102
118
|
kind: "composite-literal";
|
|
103
119
|
composite: string;
|
|
104
120
|
instance?: string;
|
|
121
|
+
call?: SourceLocation;
|
|
105
122
|
} | {
|
|
106
123
|
kind: "direct";
|
|
107
124
|
} | {
|
|
@@ -116,6 +133,11 @@ export interface EntityFoldProvenance {
|
|
|
116
133
|
composite?: string;
|
|
117
134
|
/** The composite call (export name) it belongs to, when one expanded it. */
|
|
118
135
|
instance?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Where that composite call was written (chant #3597), when the fold
|
|
138
|
+
* interpreted the factory at a call it saw as written.
|
|
139
|
+
*/
|
|
140
|
+
compositeCall?: SourceLocation;
|
|
119
141
|
/**
|
|
120
142
|
* Emitted property path to origin, in sorted key order. Every path the entity
|
|
121
143
|
* emits is present: a path with no attribution carries an `unknown` origin
|
|
@@ -165,6 +187,15 @@ export declare function foldProvenanceOfEntities(entities: ReadonlyMap<string, D
|
|
|
165
187
|
export declare function describeFoldFieldOrigin(origin: FoldFieldOrigin): string;
|
|
166
188
|
/** Why an origin could not be determined, in words a report can print. */
|
|
167
189
|
export declare function unknownOriginText(reason: UnknownOriginReason): string;
|
|
190
|
+
/** `src/app.ts:12`, relative to `root` when it is inside it. */
|
|
191
|
+
export declare function formatSourceLocation(location: SourceLocation, root?: string): string;
|
|
192
|
+
/**
|
|
193
|
+
* The composite call as the author wrote the arguments that govern a field:
|
|
194
|
+
* `WebApp({ replicas: 3 })`, or `WebApp({ iam: { path: "/service/" } })` for a
|
|
195
|
+
* nested parameter. Only arguments actually written at the call appear; when
|
|
196
|
+
* none is, the call is shown as `WebApp(...)`.
|
|
197
|
+
*/
|
|
198
|
+
export declare function describeCompositeArguments(composite: string, locations: readonly ArgumentLocation[]): string;
|
|
168
199
|
/**
|
|
169
200
|
* What the return leg may do about one drifted field.
|
|
170
201
|
*
|
|
@@ -203,6 +234,12 @@ export interface FieldReconcile {
|
|
|
203
234
|
declared?: unknown;
|
|
204
235
|
live?: unknown;
|
|
205
236
|
origin: FoldFieldOrigin;
|
|
237
|
+
/**
|
|
238
|
+
* One line naming where the field came from (chant #3597):
|
|
239
|
+
* `spec.replicas on Deployment webDeployment comes from WebApp({ replicas: 3 }) at src/app.ts:12`.
|
|
240
|
+
* An `unknown` origin says so and why; it never reads as a direct declaration.
|
|
241
|
+
*/
|
|
242
|
+
summary: string;
|
|
206
243
|
resolution: DriftResolution;
|
|
207
244
|
}
|
|
208
245
|
/**
|
|
@@ -212,14 +249,20 @@ export interface FieldReconcile {
|
|
|
212
249
|
* source declared, whose live value moved. Undeclared fields are held
|
|
213
250
|
* elsewhere and never reach here, so the only question left is which of the
|
|
214
251
|
* four origins produced the field.
|
|
252
|
+
*
|
|
253
|
+
* `entityType` names the resource in the summary line, and `root` (the
|
|
254
|
+
* project directory) makes the file names in it relative. Both are optional;
|
|
255
|
+
* without them the summary uses the entity name alone and absolute files.
|
|
215
256
|
*/
|
|
216
257
|
export declare function resolveDriftedField(input: {
|
|
217
258
|
entity: string;
|
|
259
|
+
entityType?: string;
|
|
218
260
|
path: string;
|
|
219
261
|
declared?: unknown;
|
|
220
262
|
live?: unknown;
|
|
221
263
|
origin?: PathOrigin;
|
|
222
264
|
provenance?: EntityProvenance;
|
|
265
|
+
root?: string;
|
|
223
266
|
}): FieldReconcile;
|
|
224
267
|
/**
|
|
225
268
|
* Every drifted field in a deep diff, classified.
|
|
@@ -232,5 +275,7 @@ export declare function resolveDriftedField(input: {
|
|
|
232
275
|
* cloud does not have it. That is still drift on a declared path, and the same
|
|
233
276
|
* four origins decide what may be proposed about it.
|
|
234
277
|
*/
|
|
235
|
-
export declare function resolveDeepDrift(drifted: readonly DeepEntityDrift[], provenanceOf: (entity: string) => EntityProvenance | undefined
|
|
278
|
+
export declare function resolveDeepDrift(drifted: readonly DeepEntityDrift[], provenanceOf: (entity: string) => EntityProvenance | undefined, options?: {
|
|
279
|
+
root?: string;
|
|
280
|
+
}): FieldReconcile[];
|
|
236
281
|
//# sourceMappingURL=fold-provenance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fold-provenance.d.ts","sourceRoot":"","sources":["../src/fold-provenance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AAEH,OAAO,EAAwB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"fold-provenance.d.ts","sourceRoot":"","sources":["../src/fold-provenance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AAEH,OAAO,EAAwB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAErE,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,uBAAuB,CAAC;AAE5E;;;;GAIG;AACH,MAAM,MAAM,mBAAmB;AAC7B;;;;;GAKG;AACD,2BAA2B;AAC7B;;;;GAIG;GACD,eAAe;AACjB;;;;GAIG;GACD,WAAW;AACb,mGAAmG;GACjG,YAAY,CAAC;AAEjB;;;;;;GAMG;AACH,MAAM,MAAM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,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAkBzE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"ir-utils.d.ts","sourceRoot":"","sources":["../../src/import/ir-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAkBzE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAsBrE;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,OAAO,EACd,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,GAAG,IAAI,GAC5D,GAAG,CAAC,MAAM,CAAC,CAIb"}
|
package/dist/import/parser.d.ts
CHANGED
|
@@ -8,6 +8,9 @@ export interface ParameterIR {
|
|
|
8
8
|
readonly description?: string;
|
|
9
9
|
readonly defaultValue?: unknown;
|
|
10
10
|
readonly required?: boolean;
|
|
11
|
+
/** What the value is checked against, under the source format's own keys
|
|
12
|
+
* and as written (CloudFormation `AllowedValues`, `MinLength`, `NoEcho`). */
|
|
13
|
+
readonly constraints?: Readonly<Record<string, unknown>>;
|
|
11
14
|
}
|
|
12
15
|
/**
|
|
13
16
|
* Intermediate representation of a template resource
|
|
@@ -20,6 +23,11 @@ export interface ResourceIR {
|
|
|
20
23
|
/** Name of the condition gating this resource (CloudFormation `Condition`
|
|
21
24
|
* key, or equivalent), when the source template declares one (#2069). */
|
|
22
25
|
readonly condition?: string;
|
|
26
|
+
/** Resource-level attributes other than the condition, under the source
|
|
27
|
+
* format's own keys (CloudFormation `DependsOn`, `DeletionPolicy`,
|
|
28
|
+
* `UpdateReplacePolicy`, `UpdatePolicy`, `CreationPolicy`). Values are
|
|
29
|
+
* parsed value trees, like {@link properties}. */
|
|
30
|
+
readonly attributes?: Readonly<Record<string, unknown>>;
|
|
23
31
|
}
|
|
24
32
|
/**
|
|
25
33
|
* Intermediate representation of a declared template condition — a named
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/import/parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/import/parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B;iFAC6E;IAC7E,QAAQ,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC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AC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C;yEACqE;IACrE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED,qCAAqC;AACrC,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE1D,oFAAoF;AACpF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAE9D;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,oFAAoF;IACpF,IAAI,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACtC,kEAAkE;IAClE,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CAC5D"}
|
package/dist/provenance.d.ts
CHANGED
|
@@ -29,6 +29,13 @@ export interface EntityProvenance {
|
|
|
29
29
|
* collapse a composite to a single node at coarse diagram detail levels (#494).
|
|
30
30
|
*/
|
|
31
31
|
compositeInstance?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Where the composite call that expanded this entity was written (chant
|
|
34
|
+
* #3597): the `WebApp({...})` expression, not the factory body. Recorded
|
|
35
|
+
* only when the fold interpreted the factory at a call it could see; the
|
|
36
|
+
* run path and a nested call made from already-folded values leave it unset.
|
|
37
|
+
*/
|
|
38
|
+
compositeCall?: SourceLocation;
|
|
32
39
|
/**
|
|
33
40
|
* Per-path origins within the entity's `props` (chant #1443). Read with
|
|
34
41
|
* {@link originOfPath}, which does the prefix resolution these keys are
|
|
@@ -76,6 +83,12 @@ export interface EntityProvenance {
|
|
|
76
83
|
* expression for this path reads no parameter at all. The composite fixes
|
|
77
84
|
* this field, and no argument at the call site moves it.
|
|
78
85
|
*
|
|
86
|
+
* - `host` — the authored expression for this path reads a value host code
|
|
87
|
+
* produced (INTENTIUS/typescript-as-data#248): a method called on a real
|
|
88
|
+
* receiver or an eager lexicon helper (`host-call`), or a value a lexicon
|
|
89
|
+
* package exports (`host-value`). The author wrote the call, not the value,
|
|
90
|
+
* so ./fold-provenance.ts answers `unknown` rather than `direct`.
|
|
91
|
+
*
|
|
79
92
|
* The coarse `composite` and the two fine kinds are not alternatives. A build
|
|
80
93
|
* records `composite` when it expanded a composite without interpreting its
|
|
81
94
|
* body (the run path, an inadmissible factory), and that is why
|
|
@@ -95,10 +108,46 @@ export type PathOrigin = {
|
|
|
95
108
|
kind: "composite-parameter";
|
|
96
109
|
composite: string;
|
|
97
110
|
parameters: string[];
|
|
111
|
+
/**
|
|
112
|
+
* Where each parameter's argument was written at the composite call
|
|
113
|
+
* (chant #3597), in `parameters` order. Absent when the build did not
|
|
114
|
+
* see the call; see {@link ArgumentLocation} for the fallback.
|
|
115
|
+
*/
|
|
116
|
+
arguments?: ArgumentLocation[];
|
|
98
117
|
} | {
|
|
99
118
|
kind: "composite-literal";
|
|
100
119
|
composite: string;
|
|
120
|
+
} | {
|
|
121
|
+
kind: "host";
|
|
122
|
+
reason: HostOriginReason;
|
|
101
123
|
};
|
|
124
|
+
/** Which host code produced a value: a call it ran, or a value its package exports. */
|
|
125
|
+
export type HostOriginReason = "host-call" | "host-value";
|
|
126
|
+
/**
|
|
127
|
+
* A place in a source file. `file` is absolute, as
|
|
128
|
+
* {@link EntityProvenance.sourceFile} is; `line` and `column` are 1-based, the
|
|
129
|
+
* way an editor and `file:line:column` print them.
|
|
130
|
+
*/
|
|
131
|
+
export interface SourceLocation {
|
|
132
|
+
file: string;
|
|
133
|
+
line: number;
|
|
134
|
+
column: number;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Where one composite parameter's argument was written at the call (chant
|
|
138
|
+
* #3597). When the call's argument object has a property at the parameter's
|
|
139
|
+
* path, the location is that property and `text` is the property as written
|
|
140
|
+
* (`replicas: 3`). When it does not (the parameter was left out, or arrived
|
|
141
|
+
* through a spread or a non-literal argument), the location is the call's own
|
|
142
|
+
* and `text` is absent: the call is the nearest place that governs it, and
|
|
143
|
+
* nothing claims a property that is not there.
|
|
144
|
+
*/
|
|
145
|
+
export interface ArgumentLocation extends SourceLocation {
|
|
146
|
+
/** The factory parameter path, as in `parameters` (`replicas`, `iam.path`). */
|
|
147
|
+
parameter: string;
|
|
148
|
+
/** The innermost property as written at the call, when one is. */
|
|
149
|
+
text?: string;
|
|
150
|
+
}
|
|
102
151
|
/**
|
|
103
152
|
* Merge provenance onto an entity. Non-enumerable so it is invisible to
|
|
104
153
|
* serializers and spreads. Existing fields win (`??=`), so the first/most
|
package/dist/provenance.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provenance.d.ts","sourceRoot":"","sources":["../src/provenance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;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;IAC3B;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CACpC;AAED
|
|
1
|
+
{"version":3,"file":"provenance.d.ts","sourceRoot":"","sources":["../src/provenance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,MAAM,WAAW,gBAAgB;IAC/B,+EAA+E;IAC/E,UAAU,CAAC,EAAE,M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SAAS,CAAC;CACnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializer-walker.d.ts","sourceRoot":"","sources":["../src/serializer-walker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAO/C,MAAM,WAAW,iBAAiB;IAChC,4DAA4D;IAC5D,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IACzD,mEAAmE;IACnE,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1C,+DAA+D;IAC/D,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO,GAAG,OAAO,CAAC;CAChF;
|
|
1
|
+
{"version":3,"file":"serializer-walker.d.ts","sourceRoot":"","sources":["../src/serializer-walker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAO/C,MAAM,WAAW,iBAAiB;IAChC,4DAA4D;IAC5D,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IACzD,mEAAmE;IACnE,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1C,+DAA+D;IAC/D,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO,GAAG,OAAO,CAAC;CAChF;AAkBD;;;GAGG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,OAAO,EACd,WAAW,EAAE,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,EACpC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAyFT"}
|
package/dist/stack-output.d.ts
CHANGED
|
@@ -33,6 +33,10 @@ export interface StackOutput extends Declarable {
|
|
|
33
33
|
* `Output.Condition`) — a condition name, or the condition Declarable
|
|
34
34
|
* itself, resolved to its logical name at serialization (#2068/#2069). */
|
|
35
35
|
readonly condition?: string | Declarable;
|
|
36
|
+
/** The output's key in the template, when it is not the export name. A
|
|
37
|
+
* template may use one key for an output and a parameter or resource; a
|
|
38
|
+
* module cannot export both under that name (#3604). */
|
|
39
|
+
readonly name?: string;
|
|
36
40
|
}
|
|
37
41
|
/**
|
|
38
42
|
* Type guard for StackOutput.
|
|
@@ -61,5 +65,6 @@ export declare function stackOutput(ref: AttrRef | Intrinsic | string, options?:
|
|
|
61
65
|
exportName?: string;
|
|
62
66
|
lexicon?: string;
|
|
63
67
|
condition?: string | Declarable;
|
|
68
|
+
name?: string;
|
|
64
69
|
}): StackOutput;
|
|
65
70
|
//# sourceMappingURL=stack-output.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack-output.d.ts","sourceRoot":"","sources":["../src/stack-output.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,iBAAiB,EAAgB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAG1D;;GAEG;AACH,eAAO,MAAM,mBAAmB,eAAkC,CAAC;AAEnE;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC7C,QAAQ,CAAC,CAAC,mBAAmB,CAAC,EAAE,IAAI,CAAC;IACrC,QAAQ,CAAC,CAAC,iBAAiB,CAAC,EAAE,IAAI,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB;wEACoE;IACpE,QAAQ,CAAC,SAAS,EAAE,OAAO,GAAG,SAAS,GAAG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AAO,GAAG,KAAK,IAAI,WAAW,CAOlE;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CACzB,GAAG,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,EACjC,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GACxH,WAAW,CA2Cb"}
|
package/dist/yaml.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yaml.d.ts","sourceRoot":"","sources":["../src/yaml.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAqCH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"yaml.d.ts","sourceRoot":"","sources":["../src/yaml.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAqCH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CA0H/D;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,SAAI,GAAG,MAAM,CAG7E;AAMD;;;GAGG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC,gEAAgE;IAChE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,YAAY,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAIxC;CACF;AAmID;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQlE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAO1D;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAc5D;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAwBlD"}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import { listInstalledLexicons } from "../plugins";
|
|
10
10
|
import { mkdir, rm, writeFile } from "node:fs/promises";
|
|
11
11
|
import { existsSync, readFileSync } from "node:fs";
|
|
12
|
-
import { join } from "node:path";
|
|
12
|
+
import { basename, join } from "node:path";
|
|
13
13
|
import { tmpdir } from "node:os";
|
|
14
14
|
|
|
15
15
|
describe("importCommand", () => {
|
|
@@ -269,7 +269,7 @@ describe("importCommand", () => {
|
|
|
269
269
|
expect(content).toContain("Bucket");
|
|
270
270
|
});
|
|
271
271
|
|
|
272
|
-
test("
|
|
272
|
+
test("writes a large CloudFormation template to one main.ts", async () => {
|
|
273
273
|
const template = {
|
|
274
274
|
AWSTemplateFormatVersion: "2010-09-09",
|
|
275
275
|
Resources: {
|
|
@@ -289,8 +289,9 @@ describe("importCommand", () => {
|
|
|
289
289
|
});
|
|
290
290
|
|
|
291
291
|
expect(result.success).toBe(true);
|
|
292
|
-
//
|
|
293
|
-
|
|
292
|
+
// The aws generator owns its layout: split files would each need the
|
|
293
|
+
// declarations the others hold.
|
|
294
|
+
expect(result.generatedFiles.map((f) => basename(f))).toEqual(["main.ts"]);
|
|
294
295
|
});
|
|
295
296
|
|
|
296
297
|
test("creates index.ts for organized imports", async () => {
|