@intentius/chant 0.44.1 → 0.44.2
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/lint.d.ts +10 -0
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/components/cli-support.d.ts +1 -1
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/governance.d.ts +1 -1
- package/dist/graph-detail.d.ts +31 -13
- package/dist/graph-detail.d.ts.map +1 -1
- package/dist/lifecycle/change-set.d.ts +7 -0
- package/dist/lifecycle/change-set.d.ts.map +1 -1
- package/dist/lifecycle/live-diff.d.ts +18 -0
- package/dist/lifecycle/live-diff.d.ts.map +1 -1
- package/dist/lifecycle/observe.d.ts.map +1 -1
- package/dist/lint/component-checks.d.ts +2 -1
- package/dist/lint/component-checks.d.ts.map +1 -1
- package/dist/observation.d.ts +33 -3
- package/dist/observation.d.ts.map +1 -1
- package/dist/reconcile.d.ts +5 -5
- package/dist/reconcile.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cli/commands/lint.ts +14 -3
- package/src/cli/handlers/components.ts +1 -1
- package/src/cli/handlers/graph.ts +32 -7
- package/src/cli/handlers/lifecycle.ts +8 -2
- package/src/codegen/publish-order.test.ts +1 -1
- package/src/codegen/release-wiring.test.ts +3 -4
- package/src/components/cli-support.test.ts +52 -0
- package/src/components/cli-support.ts +13 -2
- package/src/governance.test.ts +1 -1
- package/src/governance.ts +1 -1
- package/src/graph-detail.test.ts +117 -6
- package/src/graph-detail.ts +76 -18
- package/src/lifecycle/change-set.test.ts +26 -0
- package/src/lifecycle/change-set.ts +13 -0
- package/src/lifecycle/live-diff.test.ts +35 -0
- package/src/lifecycle/live-diff.ts +21 -0
- package/src/lifecycle/observe.ts +2 -1
- package/src/lint/component-checks.ts +8 -1
- package/src/observation.test.ts +54 -7
- package/src/observation.ts +53 -13
- package/src/reconcile.ts +7 -7
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BuildParamProvenance } from "../../provenance.js";
|
|
1
2
|
import type { LintRule, LintDiagnostic } from "../../lint/rule.js";
|
|
2
3
|
/**
|
|
3
4
|
* Type guard to check if a value conforms to the LintRule interface.
|
|
@@ -34,6 +35,15 @@ export declare function loadPluginRules(plugins: string[], configDir: string): P
|
|
|
34
35
|
export interface LintOptions {
|
|
35
36
|
/** Path to lint */
|
|
36
37
|
path: string;
|
|
38
|
+
/**
|
|
39
|
+
* This invocation's resolved build parameters (#1490).
|
|
40
|
+
*
|
|
41
|
+
* The COMP* checks import `*.component.ts`, and an ES module evaluates once
|
|
42
|
+
* per path — so the values in effect during the lint gate are the values
|
|
43
|
+
* every later reader observes. A caller that lints before it graphs must
|
|
44
|
+
* pass the same parameters to both or the later resolution has no effect.
|
|
45
|
+
*/
|
|
46
|
+
buildParams?: BuildParamProvenance[];
|
|
37
47
|
/** Apply auto-fixes */
|
|
38
48
|
fix?: boolean;
|
|
39
49
|
/** Output format */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/lint.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/lint.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAI7D,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAW,MAAM,iBAAiB,CAAC;AAkBzE;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,QAAQ,CAW5D;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,MAAM,EAAE,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAmBhC;AAgED;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/E"}
|
|
@@ -80,7 +80,7 @@ export interface ComponentGraphResult {
|
|
|
80
80
|
error?: string;
|
|
81
81
|
}
|
|
82
82
|
/** Compute the components' dependency graph under `path`, for `chant graph --components`. */
|
|
83
|
-
export declare function computeComponentGraph(path: string, sandbox?: boolean): Promise<ComponentGraphResult>;
|
|
83
|
+
export declare function computeComponentGraph(path: string, sandbox?: boolean, buildParams?: BuildParamProvenance[]): Promise<ComponentGraphResult>;
|
|
84
84
|
/** A generate-mode target lexicon name — any lexicon whose plugin implements `generateComponentPipeline` (gitlab, github, and forgejo today). */
|
|
85
85
|
export type GenerateLexicon = string;
|
|
86
86
|
/** Result of `chant build --components --generate <lexicon>`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-support.d.ts","sourceRoot":"","sources":["../../src/components/cli-support.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAQL,KAAK,eAAe,EAEpB,KAAK,eAAe,EACrB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAuC,KAAK,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAChG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAE9D,yDAAyD;AACzD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;A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ACrD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,6FAA6F;IAC7F,GAAG,CAAC,EAAE,eAAe,CAAC;IACtB,uEAAuE;IACvE,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gIAAgI;IAChI,eAAe,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5D,wSAAwS;IACxS,WAAW,CAAC,EAAE,oBAAoB,EAAE,CAAC;CACtC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,0KAA0K;AAC1K,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,OAAO;AACjB,4RAA4R;AAC5R,WAAW,CAAC,EAAE,oBAAoB,EAAE,GACnC,OAAO,CAAC,wBAAwB,CAAC,CA2CnC;AAED,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,mBAAmB,CAAC,CAuG9B"}
|
package/dist/governance.d.ts
CHANGED
package/dist/graph-detail.d.ts
CHANGED
|
@@ -4,10 +4,27 @@ import type { GraphIR } from "./graph-ir.js";
|
|
|
4
4
|
* transform over the base graph IR (no re-discovery), so every emitter and the
|
|
5
5
|
* painter get them for free. See issue #494 / epic #492.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* The dial moves two things: the graph's shape (what collapses) and each
|
|
8
|
+
* node's attribute payload (how much of the resource reaches the node). The
|
|
9
|
+
* payload is monotonic — a node's attrs at level n are a subset of its attrs
|
|
10
|
+
* at level n+1 — so a consumer stepping through the levels always sees the
|
|
11
|
+
* graph grow (#1489):
|
|
12
|
+
*
|
|
13
|
+
* - 0 STACKS — one node per lexicon; edges are cross-lexicon deps; no attrs
|
|
14
|
+
* - 1 COMPOSITES — composite instances collapsed to a single node each;
|
|
15
|
+
* topology view — attrs carry only overlay paint (`_*`)
|
|
16
|
+
* and composite membership
|
|
17
|
+
* - 2 DECLARABLES — every resource; the resource view of its attrs — scalar
|
|
18
|
+
* fields and reference envelopes, not nested property trees
|
|
19
|
+
* - 3 ATTRIBUTES — declarables carrying the full property tree, plus the
|
|
20
|
+
* producer attribute on each reference edge
|
|
21
|
+
*
|
|
22
|
+
* Before #1489 the dial never touched attrs: every level carried the full
|
|
23
|
+
* projected config, and T3's only delta over T2 (the producer attribute on
|
|
24
|
+
* `$ref`-derived edges) is empty for a lexicon whose resources link by
|
|
25
|
+
* name/label convention — the k8s lexicon end to end — so levels 2 and 3 came
|
|
26
|
+
* out byte-identical and a zoom picker mapped onto them rendered the same
|
|
27
|
+
* graph twice (behold#131).
|
|
11
28
|
*/
|
|
12
29
|
export type DetailLevel = 0 | 1 | 2 | 3;
|
|
13
30
|
export declare const DETAIL: {
|
|
@@ -21,17 +38,18 @@ export declare function applyDetail(ir: GraphIR, level: DetailLevel): GraphIR;
|
|
|
21
38
|
/**
|
|
22
39
|
* chant #1489 — the message to print when `--detail 3` changed nothing.
|
|
23
40
|
*
|
|
24
|
-
* T3
|
|
25
|
-
* edges. A graph whose
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* the bug; this names it.
|
|
41
|
+
* T3 adds two things over T2: the full property tree on each node and the
|
|
42
|
+
* producer attribute on `$ref`-derived edges. A graph whose nodes carry no
|
|
43
|
+
* properties beyond the resource view AND whose edges reference nothing (they
|
|
44
|
+
* link by name or label convention) gains neither, so levels 2 and 3 come out
|
|
45
|
+
* byte-identical — which reads as a broken dial from any consumer stepping
|
|
46
|
+
* through the levels (behold#131 was filed over exactly this). Accepting a
|
|
47
|
+
* value that changes nothing without saying so is the bug; this names it.
|
|
31
48
|
*
|
|
32
49
|
* Returns the warning text, or undefined when detail 3 did add something.
|
|
33
|
-
*
|
|
34
|
-
* the
|
|
50
|
+
* `base` is the pre-detail IR the caller already holds (the same one it fed
|
|
51
|
+
* `applyDetail`); the T2 view to compare against is derived here, so callers
|
|
52
|
+
* don't run the projection twice for a message. Pure — no I/O.
|
|
35
53
|
*/
|
|
36
54
|
export declare function detailInertNotice(base: GraphIR, detailed: GraphIR): string | undefined;
|
|
37
55
|
//# sourceMappingURL=graph-detail.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-detail.d.ts","sourceRoot":"","sources":["../src/graph-detail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAkB,MAAM,YAAY,CAAC;AAE1D
|
|
1
|
+
{"version":3,"file":"graph-detail.d.ts","sourceRoot":"","sources":["../src/graph-detail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAkB,MAAM,YAAY,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAExC,eAAO,MAAM,MAAM;;;;;CAKT,CAAC;AAEX,6DAA6D;AAC7D,wBAAgB,WAAW,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAYpE;AAsKD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAYtF"}
|
|
@@ -71,6 +71,13 @@ export interface ChangeSetEntry {
|
|
|
71
71
|
unobservedReason?: UnobservedReason;
|
|
72
72
|
/** Human-readable backing for `unobservedReason` (the failing command, the missing binding). */
|
|
73
73
|
unobservedDetail?: string;
|
|
74
|
+
/**
|
|
75
|
+
* The resolved address the live read was issued against (#1620), when the
|
|
76
|
+
* lexicon reported one. On a `create` it says which address the provider
|
|
77
|
+
* confirmed absent — the line between "not there" and "looked in the wrong
|
|
78
|
+
* place" (a defaulted namespace, an endpoint override, the wrong region).
|
|
79
|
+
*/
|
|
80
|
+
queried?: string;
|
|
74
81
|
/** The declared entity this resource's owner chain resolves to, for `action: "runtime"` (#1077). */
|
|
75
82
|
runtimeOwner?: string;
|
|
76
83
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change-set.d.ts","sourceRoot":"","sources":["../../src/lifecycle/change-set.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAY,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAAwB,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,YAAY,CAAC;AAExG;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;AAExD,MAAM,WAAW,cAAc;IAC7B,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,YAAY,CAAC;IACrB,kEAAkE;IAClE,QAAQ,EAAE;QACR,oCAAoC;QACpC,QAAQ,EAAE,OAAO,CAAC;QAClB,oCAAoC;QACpC,UAAU,EAAE,OAAO,CAAC;QACpB,qDAAqD;QACrD,IAAI,EAAE,OAAO,CAAC;QACd;;;;;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QACpC,UAAU,EAAE,OAAO,CAAC;QACpB,qDAAqD;QACrD,IAAI,EAAE,OAAO,CAAC;QACd;;;;;WAKG;QACH,QAAQ,EAAE,OAAO,CAAC;KACnB,CAAC;IACF,6CAA6C;IAC7C,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;IAC3B,oDAAoD;IACpD,SAAS,EAAE,SAAS,CAAC;IACrB,gFAAgF;IAChF,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,gGAAgG;IAChG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oGAAoG;IACpG,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,SAAS,CAuG3E;AAID,gCAAgC;AAChC,wBAAgB,SAAS,CAAC,EAAE,EAAE,SAAS,GAAG,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAYrE;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,uEAAuE;AACvE,wBAAgB,cAAc,CAAC,EAAE,EAAE,SAAS,GAAG,cAAc,CAG5D;AAED,sEAAsE;AACtE,wBAAgB,eAAe,CAAC,EAAE,EAAE,SAAS,GAAG,MAAM,CA6BrD"}
|
|
@@ -31,6 +31,8 @@ export interface UnobservedResource {
|
|
|
31
31
|
type?: string;
|
|
32
32
|
reason: UnobservedReason;
|
|
33
33
|
detail?: string;
|
|
34
|
+
/** The resolved address the failed read was issued against (#1620), when the lexicon reported one. */
|
|
35
|
+
queried?: string;
|
|
34
36
|
}
|
|
35
37
|
/**
|
|
36
38
|
* A live, undeclared resource whose owner-reference chain reaches a declared
|
|
@@ -79,6 +81,16 @@ export interface LiveDiffResult {
|
|
|
79
81
|
* in the observation. Sorted by name.
|
|
80
82
|
*/
|
|
81
83
|
unobserved: UnobservedResource[];
|
|
84
|
+
/**
|
|
85
|
+
* The resolved query address per entity name (#1620) — what the live read
|
|
86
|
+
* was actually issued against, as the lexicon reported it. Present only when
|
|
87
|
+
* the lexicon supplied addresses; other lexicons omitting it stays valid.
|
|
88
|
+
* This is where a `missing` entry explains itself: `missing` is a bare name
|
|
89
|
+
* list, and `queried[name]` says which address the provider answered 404
|
|
90
|
+
* for — a declared k8s object with no namespace reads from the *defaulted*
|
|
91
|
+
* namespace, and only this field makes that visible.
|
|
92
|
+
*/
|
|
93
|
+
queried?: Record<string, string>;
|
|
82
94
|
}
|
|
83
95
|
export interface DiffLiveInput {
|
|
84
96
|
/** Entity names from the current build. */
|
|
@@ -93,6 +105,12 @@ export interface DiffLiveInput {
|
|
|
93
105
|
* at, so absence from `observedNow` is a confirmed absence.
|
|
94
106
|
*/
|
|
95
107
|
unobserved?: Record<string, UnobservedEntity>;
|
|
108
|
+
/**
|
|
109
|
+
* Resolved query address per entity name (#1620), as the observation
|
|
110
|
+
* reported it. Passed through to the result and joined onto unobserved rows;
|
|
111
|
+
* never consulted for classification.
|
|
112
|
+
*/
|
|
113
|
+
queried?: Record<string, string>;
|
|
96
114
|
}
|
|
97
115
|
/** The delta between two saved snapshots (#822): a two-way observed diff. */
|
|
98
116
|
export interface SnapshotDiffResult {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live-diff.d.ts","sourceRoot":"","sources":["../../src/lifecycle/live-diff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,KAAK,EAAE,g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AE,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;IAC9E,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC3C,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChE,GACA,OAAO,CAAC,qBAAqB,CAAC,CA0ChC"}
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
*/
|
|
24
24
|
import type { Component } from "../components/component.js";
|
|
25
25
|
import type { DiscoveredComponent } from "../components/discover.js";
|
|
26
|
+
import type { BuildParamProvenance } from "../provenance.js";
|
|
26
27
|
import type { RollbackPolicy } from "../components/capability.js";
|
|
27
28
|
import type { Severity } from "./rule.js";
|
|
28
29
|
/** One discovered component, keyed by its declared name, with the file it came from. */
|
|
@@ -93,7 +94,7 @@ export interface ComponentCheck {
|
|
|
93
94
|
* COMP* checks exist precisely because they need the discovered `Component`
|
|
94
95
|
* graph, which does mean importing `*.component.ts` files.
|
|
95
96
|
*/
|
|
96
|
-
export declare function runComponentChecks(path: string, checks: ComponentCheck[], registryContext?: Pick<ComponentCheckContext, "knownKinds" | "rollbackPolicies">, sandbox?: boolean): Promise<ComponentCheckDiagnostic[]>;
|
|
97
|
+
export declare function runComponentChecks(path: string, checks: ComponentCheck[], registryContext?: Pick<ComponentCheckContext, "knownKinds" | "rollbackPolicies">, sandbox?: boolean, buildParams?: BuildParamProvenance[]): Promise<ComponentCheckDiagnostic[]>;
|
|
97
98
|
/** Structural type guard, mirroring `isPostSynthCheck` — used by rule discovery/registry code. */
|
|
98
99
|
export declare function isComponentCheck(value: unknown): value is ComponentCheck;
|
|
99
100
|
/** 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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S,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,EACjB,WAAW,CAAC,EAAE,oBAAoB,EAAE,GACnC,OAAO,CAAC,wBAAwB,EAAE,CAAC,CAoCrC;AAED,kGAAkG;AAClG,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAUxE;AAED,uHAAuH;AACvH,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
|
package/dist/observation.d.ts
CHANGED
|
@@ -61,6 +61,14 @@ export interface UnobservedEntity {
|
|
|
61
61
|
reason: UnobservedReason;
|
|
62
62
|
/** Human-readable detail: the command that failed, the missing binding key, the unsupported kind. */
|
|
63
63
|
detail?: string;
|
|
64
|
+
/**
|
|
65
|
+
* The resolved address the read was issued against (#1620) — for k8s the
|
|
66
|
+
* request path (`/apis/apps/v1/namespaces/default/deployments/web`), for
|
|
67
|
+
* other substrates whatever names the endpoint/region/account actually
|
|
68
|
+
* asked. Optional and purely diagnostic: it never changes the verdict, it
|
|
69
|
+
* lets a consumer tell "looked in the wrong place" from "not there".
|
|
70
|
+
*/
|
|
71
|
+
queried?: string;
|
|
64
72
|
}
|
|
65
73
|
/**
|
|
66
74
|
* The observation envelope — a `describeResources()` return value that can say
|
|
@@ -73,16 +81,30 @@ export interface ObservationResult {
|
|
|
73
81
|
resources: Record<string, ResourceMetadata>;
|
|
74
82
|
/** NOT-OBSERVED, keyed by chant entity name. Omit or leave empty when everything asked about was looked at. */
|
|
75
83
|
unobserved?: Record<string, UnobservedEntity>;
|
|
84
|
+
/**
|
|
85
|
+
* The resolved query address per declared entity (#1620), keyed by chant
|
|
86
|
+
* entity name — what was actually asked of the provider, whatever the
|
|
87
|
+
* verdict came back as. Additive metadata over the tri-state, never part of
|
|
88
|
+
* it: classification still reads only `resources` and `unobserved`, and an
|
|
89
|
+
* entity in neither map is still OBSERVED-ABSENT whether or not it appears
|
|
90
|
+
* here. This map is the only place an ABSENT entity can carry its address —
|
|
91
|
+
* absence is spelled "in neither map", so there is no row to hang it on —
|
|
92
|
+
* which is exactly the entry that lets a consumer see that a defaulted
|
|
93
|
+
* namespace, endpoint or region was read, not the one the resource lives in.
|
|
94
|
+
*/
|
|
95
|
+
queried?: Record<string, string>;
|
|
76
96
|
}
|
|
77
97
|
/**
|
|
78
98
|
* What `describeResources()` may return: the bare map (pre-#1089, still valid —
|
|
79
99
|
* "I looked at everything") or the {@link ObservationResult} envelope.
|
|
80
100
|
*/
|
|
81
101
|
export type DescribeResourcesResult = Record<string, ResourceMetadata> | ObservationResult;
|
|
82
|
-
/** Normalized form every consumer works with.
|
|
102
|
+
/** Normalized form every consumer works with. All maps always present. */
|
|
83
103
|
export interface NormalizedObservation {
|
|
84
104
|
resources: Record<string, ResourceMetadata>;
|
|
85
105
|
unobserved: Record<string, UnobservedEntity>;
|
|
106
|
+
/** Resolved query address per entity name (#1620). Empty when the lexicon reported none. */
|
|
107
|
+
queried: Record<string, string>;
|
|
86
108
|
}
|
|
87
109
|
/** True when `value` is the versioned {@link ObservationResult} envelope. */
|
|
88
110
|
export declare function isObservationResult(value: unknown): value is ObservationResult;
|
|
@@ -90,7 +112,7 @@ export declare function isObservationResult(value: unknown): value is Observatio
|
|
|
90
112
|
* Build an {@link ObservationResult}. Lexicons use this rather than writing the
|
|
91
113
|
* discriminant by hand.
|
|
92
114
|
*/
|
|
93
|
-
export declare function observation(resources: Record<string, ResourceMetadata>, unobserved?: Record<string, UnobservedEntity>): ObservationResult;
|
|
115
|
+
export declare function observation(resources: Record<string, ResourceMetadata>, unobserved?: Record<string, UnobservedEntity>, queried?: Record<string, string>): ObservationResult;
|
|
94
116
|
/**
|
|
95
117
|
* Normalize either accepted return shape. `undefined` (a lexicon that returned
|
|
96
118
|
* nothing at all) normalizes to two empty maps — which reads as "everything was
|
|
@@ -118,7 +140,7 @@ export declare function unobservedAll(names: Iterable<string>, reason: Unobserve
|
|
|
118
140
|
export declare function mergeObservations(parts: Iterable<NormalizedObservation>): NormalizedObservation;
|
|
119
141
|
/** One-line human phrasing of a reason, for CLI output. */
|
|
120
142
|
export declare function unobservedReasonText(reason: UnobservedReason): string;
|
|
121
|
-
/** `name — reason (detail)`, the shared rendering for CLI and plan output. */
|
|
143
|
+
/** `name — reason (detail) [queried address]`, the shared rendering for CLI and plan output. */
|
|
122
144
|
export declare function formatUnobserved(name: string, entry: UnobservedEntity): string;
|
|
123
145
|
/** One declared entity handed to the harness. */
|
|
124
146
|
export interface DeclaredEntity {
|
|
@@ -134,16 +156,24 @@ export interface DeclaredEntity {
|
|
|
134
156
|
* - `present` — a key in `resources`.
|
|
135
157
|
* - `absent` — in neither map (the provider was asked and reported it missing).
|
|
136
158
|
* - `unobserved` — a typed NOT-OBSERVED (unsupported kind, filtered, read error).
|
|
159
|
+
*
|
|
160
|
+
* Every variant may carry `queried` (#1620): the resolved address the read was
|
|
161
|
+
* issued against. The harness collects it into the result's `queried` map (and
|
|
162
|
+
* onto the unobserved entry), so even an absent verdict — which records
|
|
163
|
+
* nothing else — says where the provider was asked.
|
|
137
164
|
*/
|
|
138
165
|
export type EntityObservation = {
|
|
139
166
|
present: ResourceMetadata;
|
|
167
|
+
queried?: string;
|
|
140
168
|
} | {
|
|
141
169
|
absent: true;
|
|
170
|
+
queried?: string;
|
|
142
171
|
} | {
|
|
143
172
|
unobserved: {
|
|
144
173
|
reason: UnobservedReason;
|
|
145
174
|
detail?: string;
|
|
146
175
|
};
|
|
176
|
+
queried?: string;
|
|
147
177
|
};
|
|
148
178
|
/** What a lexicon supplies to drive the harness. `Client` is its transport handle. */
|
|
149
179
|
export interface ObserverAdapter<Client> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observation.d.ts","sourceRoot":"","sources":["../src/observation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAElD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,gBAAgB,GAChB,YAAY,GACZ,kBAAkB,GAClB,UAAU,CAAC;AAEf,mFAAmF;AACnF,eAAO,MAAM,kBAAkB,EAAE,SAAS,gBAAgB,EAMzD,CAAC;AAEF,6DAA6D;AAC7D,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAE5E;AAED,kEAAkE;AAClE,MAAM,WAAW,gBAAgB;IAC/B,kGAAkG;IAClG,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,MAAM,EAAE,gBAAgB,CAAC;IACzB,qGAAqG;IACrG,MAAM,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"observation.d.ts","sourceRoot":"","sources":["../src/observation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAElD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,gBAAgB,GAChB,YAAY,GACZ,kBAA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c,EAAE,EACnC,OAAO,EAAE,eAAe,CAAC,MAAM,CAAC,GAC/B,OAAO,CAAC,iBAAiB,CAAC,CAsD5B"}
|
package/dist/reconcile.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* the plan renderer, and the guardrail framework (rename resolution + a removal
|
|
8
8
|
* cap + a pluggable check runner).
|
|
9
9
|
*
|
|
10
|
-
* A
|
|
10
|
+
* A consumer application (e.g. github-warden) builds its provider-specific resource diffing,
|
|
11
11
|
* live-state types, and domain guardrails on top of this, and drives them with
|
|
12
12
|
* the generic `runReconcile` loop + `Cycle` interface (below). It complements
|
|
13
13
|
* chant's `ownership.ts` marker contract: ownership markers make a `delete`
|
|
@@ -33,7 +33,7 @@ export interface ChangeSetEntry {
|
|
|
33
33
|
/** High-level resource category (e.g. "team", "member", "branch-protection"). */
|
|
34
34
|
resourceType: string;
|
|
35
35
|
/**
|
|
36
|
-
* Cross-provider governance category
|
|
36
|
+
* Cross-provider governance category. `resourceType` stays the
|
|
37
37
|
* provider-specific display string; the verb is the shared grammar SCM and
|
|
38
38
|
* cloud plans group by. Stamped by `runReconcile` from the cycle's `verb`.
|
|
39
39
|
*/
|
|
@@ -180,8 +180,8 @@ export interface Cycle<TClient, TConfig, TLive, TScope = unknown> {
|
|
|
180
180
|
/** Human-readable name, e.g. "branch-protection". */
|
|
181
181
|
name: string;
|
|
182
182
|
/**
|
|
183
|
-
* Cross-provider governance category this cycle reconciles
|
|
184
|
-
* SCM
|
|
183
|
+
* Cross-provider governance category this cycle reconciles. Every
|
|
184
|
+
* SCM reconciler cycles stamp one; cloud cycles must. Optional
|
|
185
185
|
* only so provider-external Cycle implementations don't break.
|
|
186
186
|
*/
|
|
187
187
|
verb?: GovernanceVerb;
|
|
@@ -192,7 +192,7 @@ export interface Cycle<TClient, TConfig, TLive, TScope = unknown> {
|
|
|
192
192
|
/** Per-cycle outcome recorded in the run result. */
|
|
193
193
|
export interface CycleResult {
|
|
194
194
|
name: string;
|
|
195
|
-
/** The cycle's governance verb
|
|
195
|
+
/** The cycle's governance verb, when it stamps one. */
|
|
196
196
|
verb?: GovernanceVerb;
|
|
197
197
|
/** Scope id this result is for (e.g. an org login). */
|
|
198
198
|
org: string;
|
package/dist/reconcile.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reconcile.d.ts","sourceRoot":"","sources":["../src/reconcile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAMxE,mFAAmF;AACnF,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,oDAAoD;AACpD,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAExD,wCAAwC;AACxC,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,UAAU,CAAC;IACjB,iFAAiF;IACjF,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ,6DAA6D;IAC7D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,+DAA+D;IAC/D,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,wDAAwD;IACxD,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;CACxB;AAED,yEAAyE;AACzE,MAAM,WAAW,SAAS;IACxB,6EAA6E;IAC7E,GAAG,EAAE,MAAM,CAAC;IACZ,6CAA6C;IAC7C,OAAO,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED,0CAA0C;AAC1C,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAA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AkC;AAClC,MAAM,WAAW,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;IAC5E,0EAA0E;IAC1E,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,qDAAqD;IACrD,MAAM,EAAE,OAAO,CAAC;IAChB,gEAAgE;IAChE,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;IACtD,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gFAAgF;IAChF,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC3B,0EAA0E;IAC1E,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,KAAK,SAAS,CAAC;IACvF,yEAAyE;IACzE,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,KAAK,eAAe,CAAC;IACpE,wCAAwC;IACxC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,sDAAsD;IACtD,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,kEAAkE;IAClE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAMD;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,EAC1E,IAAI,EAAE,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,GACzD,OAAO,CAAC,eAAe,CAAC,CA6G1B"}
|
package/package.json
CHANGED
package/src/cli/commands/lint.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { resolve, join, relative } from "path";
|
|
2
|
+
import type { BuildParamProvenance } from "../../provenance";
|
|
2
3
|
import { readFileSync, writeFileSync, readdirSync, statSync } from "fs";
|
|
3
4
|
import { execFileSync } from "child_process";
|
|
4
5
|
import { runLint, parseDisableComments } from "../../lint/engine";
|
|
@@ -152,6 +153,15 @@ async function loadAllPluginRules(
|
|
|
152
153
|
export interface LintOptions {
|
|
153
154
|
/** Path to lint */
|
|
154
155
|
path: string;
|
|
156
|
+
/**
|
|
157
|
+
* This invocation's resolved build parameters (#1490).
|
|
158
|
+
*
|
|
159
|
+
* The COMP* checks import `*.component.ts`, and an ES module evaluates once
|
|
160
|
+
* per path — so the values in effect during the lint gate are the values
|
|
161
|
+
* every later reader observes. A caller that lints before it graphs must
|
|
162
|
+
* pass the same parameters to both or the later resolution has no effect.
|
|
163
|
+
*/
|
|
164
|
+
buildParams?: BuildParamProvenance[];
|
|
155
165
|
/** Apply auto-fixes */
|
|
156
166
|
fix?: boolean;
|
|
157
167
|
/** Output format */
|
|
@@ -334,6 +344,7 @@ async function resolveRegistryContext(
|
|
|
334
344
|
async function runComponentCheckDiagnostics(
|
|
335
345
|
infraPath: string,
|
|
336
346
|
sandbox?: boolean,
|
|
347
|
+
buildParams?: BuildParamProvenance[],
|
|
337
348
|
): Promise<{ diagnostics: LintDiagnostic[]; suppressed: Array<LintDiagnostic & { reason?: string }> }> {
|
|
338
349
|
// Discovery stays scoped to the lint arg; COMP* severity overrides come from
|
|
339
350
|
// the project-root config, same as the AST-rule pass.
|
|
@@ -342,7 +353,7 @@ async function runComponentCheckDiagnostics(
|
|
|
342
353
|
const allCheckIds = new Set(checks.map((c) => c.id));
|
|
343
354
|
|
|
344
355
|
const registryContext = await resolveRegistryContext(infraPath);
|
|
345
|
-
const raw = await runComponentChecks(infraPath, checks, registryContext, sandbox);
|
|
356
|
+
const raw = await runComponentChecks(infraPath, checks, registryContext, sandbox, buildParams);
|
|
346
357
|
|
|
347
358
|
const fileDirectivesCache = new Map<string, ReturnType<typeof parseDisableComments>>();
|
|
348
359
|
const fileLevelDisable = (
|
|
@@ -483,7 +494,7 @@ export async function lintCommand(options: LintOptions): Promise<LintResult> {
|
|
|
483
494
|
// structurally distinct check family (whole-project, post-discovery,
|
|
484
495
|
// see ../../lint/component-checks.ts) but the same `chant lint` output and
|
|
485
496
|
// the same error-severity gating as every COR/EVL diagnostic.
|
|
486
|
-
const componentResult = await runComponentCheckDiagnostics(infraPath, options.sandbox);
|
|
497
|
+
const componentResult = await runComponentCheckDiagnostics(infraPath, options.sandbox, options.buildParams);
|
|
487
498
|
diagnostics.push(...componentResult.diagnostics);
|
|
488
499
|
suppressed.push(...componentResult.suppressed);
|
|
489
500
|
|
|
@@ -531,7 +542,7 @@ export async function lintCommand(options: LintOptions): Promise<LintResult> {
|
|
|
531
542
|
// `*.component.ts` file on their behalf), but a fix applied to another
|
|
532
543
|
// rule could still be in the same file a component was discovered from —
|
|
533
544
|
// re-run for consistency with the AST re-lint above.
|
|
534
|
-
const postComponentResult = await runComponentCheckDiagnostics(infraPath, options.sandbox);
|
|
545
|
+
const postComponentResult = await runComponentCheckDiagnostics(infraPath, options.sandbox, options.buildParams);
|
|
535
546
|
diagnostics.push(...postComponentResult.diagnostics);
|
|
536
547
|
suppressed.push(...postComponentResult.suppressed);
|
|
537
548
|
}
|
|
@@ -430,7 +430,7 @@ export async function runComponentsStatus(ctx: CommandContext): Promise<number>
|
|
|
430
430
|
// rather than "stale" (recorded, and nothing live).
|
|
431
431
|
const message = err instanceof Error ? err.message : String(err);
|
|
432
432
|
console.error(formatWarning({ message: `${plugin.name}: describeResources failed — ${message} (components in this lexicon report unknown, not stale)` }));
|
|
433
|
-
observed = { resources: {}, unobserved: unobservedAll(declared, "read-failed", message, entities) };
|
|
433
|
+
observed = { resources: {}, unobserved: unobservedAll(declared, "read-failed", message, entities), queried: {} };
|
|
434
434
|
}
|
|
435
435
|
const cs = buildChangeSet(environment, {
|
|
436
436
|
declared,
|
|
@@ -378,7 +378,11 @@ async function runGraphLive(
|
|
|
378
378
|
*/
|
|
379
379
|
async function runComponentGraph(ctx: CommandContext): Promise<number> {
|
|
380
380
|
const projectPath = resolve(ctx.args.path === "." ? "." : ctx.args.path);
|
|
381
|
-
|
|
381
|
+
// #1490 — as in runComponentGraphView: the text/--json mode reads the same
|
|
382
|
+
// source and must not disagree with the --format modes about it.
|
|
383
|
+
const componentParams = await graphBuildParams(ctx, projectPath);
|
|
384
|
+
if (!componentParams) return 1;
|
|
385
|
+
const graph = await computeComponentGraph(projectPath, ctx.args.sandbox, componentParams);
|
|
382
386
|
|
|
383
387
|
if (!graph.success) {
|
|
384
388
|
console.error(formatError({ message: graph.error ?? "Failed to compute component graph" }));
|
|
@@ -434,7 +438,20 @@ async function runComponentGraphView(
|
|
|
434
438
|
): Promise<number> {
|
|
435
439
|
const projectPath = resolve(ctx.args.path === "." ? "." : ctx.args.path);
|
|
436
440
|
|
|
437
|
-
|
|
441
|
+
// #1490 — resolved BEFORE the lint gate, not after. The COMP* checks import
|
|
442
|
+
// every `*.component.ts`, an ES module evaluates once per path, and the
|
|
443
|
+
// values in effect at that first import are the ones the graph below will
|
|
444
|
+
// read no matter what it resolves for itself. Ordering is the fix; passing
|
|
445
|
+
// them to `computeComponentGraph` alone did nothing.
|
|
446
|
+
const componentParams = await graphBuildParams(ctx, projectPath);
|
|
447
|
+
if (!componentParams) return 1;
|
|
448
|
+
|
|
449
|
+
const lint = await lintCommand({
|
|
450
|
+
path: ctx.args.path,
|
|
451
|
+
format: "stylish",
|
|
452
|
+
sandbox: ctx.args.sandbox,
|
|
453
|
+
buildParams: componentParams,
|
|
454
|
+
});
|
|
438
455
|
if (!lint.success) {
|
|
439
456
|
console.error(
|
|
440
457
|
formatError({
|
|
@@ -444,7 +461,7 @@ async function runComponentGraphView(
|
|
|
444
461
|
return 1;
|
|
445
462
|
}
|
|
446
463
|
|
|
447
|
-
const graph = await computeComponentGraph(projectPath, ctx.args.sandbox);
|
|
464
|
+
const graph = await computeComponentGraph(projectPath, ctx.args.sandbox, componentParams);
|
|
448
465
|
if (!graph.success) {
|
|
449
466
|
console.error(formatError({ message: graph.error ?? "Failed to compute component graph" }));
|
|
450
467
|
return 1;
|
|
@@ -538,8 +555,19 @@ async function runGraphView(
|
|
|
538
555
|
return 1;
|
|
539
556
|
}
|
|
540
557
|
|
|
558
|
+
// Resolved before the gate for the reason in runComponentGraphView: the
|
|
559
|
+
// lint pass imports project source, and the first import of a module is the
|
|
560
|
+
// one that binds its parameter-derived values (#1490).
|
|
561
|
+
const buildParams = await graphBuildParams(ctx, projectPath);
|
|
562
|
+
if (!buildParams) return 1;
|
|
563
|
+
|
|
541
564
|
// Gate: only emit for lint-clean source.
|
|
542
|
-
const lint = await lintCommand({
|
|
565
|
+
const lint = await lintCommand({
|
|
566
|
+
path: ctx.args.path,
|
|
567
|
+
format: "stylish",
|
|
568
|
+
sandbox: ctx.args.sandbox,
|
|
569
|
+
buildParams,
|
|
570
|
+
});
|
|
543
571
|
if (!lint.success) {
|
|
544
572
|
console.error(
|
|
545
573
|
formatError({
|
|
@@ -550,9 +578,6 @@ async function runGraphView(
|
|
|
550
578
|
return 1;
|
|
551
579
|
}
|
|
552
580
|
|
|
553
|
-
const buildParams = await graphBuildParams(ctx, projectPath);
|
|
554
|
-
if (!buildParams) return 1;
|
|
555
|
-
|
|
556
581
|
const result = await discover(projectPath, { buildParams });
|
|
557
582
|
if (result.errors.length > 0) {
|
|
558
583
|
for (const e of result.errors) console.error(formatError({ message: e.message }));
|