@intentius/chant 0.124.44 → 0.124.46
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/capabilities/aws.paths +148 -0
- package/dist/capabilities/base-mappings.json +122 -0
- package/dist/capabilities/catalog.d.ts +89 -0
- package/dist/capabilities/catalog.d.ts.map +1 -0
- package/dist/capabilities/catalog.js +204 -0
- package/dist/capabilities/language.d.ts +103 -0
- package/dist/capabilities/language.d.ts.map +1 -0
- package/dist/capabilities/language.js +335 -0
- package/dist/capabilities/matcher.d.ts +65 -0
- package/dist/capabilities/matcher.d.ts.map +1 -0
- package/dist/capabilities/matcher.js +299 -0
- package/dist/capabilities/view.d.ts +207 -0
- package/dist/capabilities/view.d.ts.map +1 -0
- package/dist/capabilities/view.js +484 -0
- package/dist/ci-identity.d.ts +183 -12
- package/dist/ci-identity.d.ts.map +1 -1
- package/dist/ci-identity.js +362 -53
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/lint.js +1 -0
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +17 -1
- package/dist/cli/handlers/declared-graph.d.ts +44 -0
- package/dist/cli/handlers/declared-graph.d.ts.map +1 -0
- package/dist/cli/handlers/declared-graph.js +87 -0
- package/dist/cli/handlers/graph.d.ts +25 -0
- package/dist/cli/handlers/graph.d.ts.map +1 -1
- package/dist/cli/handlers/graph.js +93 -87
- package/dist/cli/handlers/pr-env.d.ts +8 -2
- package/dist/cli/handlers/pr-env.d.ts.map +1 -1
- package/dist/cli/handlers/pr-env.js +127 -225
- package/dist/cli/handlers/pr.d.ts +3 -0
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +1 -0
- package/dist/cli/handlers/search-count.d.ts +89 -0
- package/dist/cli/handlers/search-count.d.ts.map +1 -0
- package/dist/cli/handlers/search-count.js +132 -0
- package/dist/cli/handlers/search.d.ts +358 -6
- package/dist/cli/handlers/search.d.ts.map +1 -1
- package/dist/cli/handlers/search.js +1065 -155
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +23 -3
- package/dist/cli/mcp/server.d.ts.map +1 -1
- package/dist/cli/mcp/server.js +3 -0
- package/dist/cli/mcp/tools/capabilities.d.ts +7 -0
- package/dist/cli/mcp/tools/capabilities.d.ts.map +1 -0
- package/dist/cli/mcp/tools/capabilities.js +27 -0
- package/dist/cli/mcp/workspace-tools.d.ts +3 -1
- package/dist/cli/mcp/workspace-tools.d.ts.map +1 -1
- package/dist/cli/mcp/workspace-tools.js +47 -2
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +64 -17
- package/dist/cli/registry.d.ts +22 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/cli-support.d.ts +2 -0
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/cli-support.js +4 -2
- package/dist/components/fan-out-support.d.ts +3 -0
- package/dist/components/fan-out-support.d.ts.map +1 -1
- package/dist/components/fan-out-support.js +1 -1
- package/dist/components/pr-env-ports.d.ts +29 -0
- package/dist/components/pr-env-ports.d.ts.map +1 -0
- package/dist/components/pr-env-ports.js +77 -0
- package/dist/components/pr-env-run.d.ts +254 -0
- package/dist/components/pr-env-run.d.ts.map +1 -0
- package/dist/components/pr-env-run.js +376 -0
- package/dist/components/pr-environment.d.ts +91 -15
- package/dist/components/pr-environment.d.ts.map +1 -1
- package/dist/components/pr-environment.js +95 -9
- package/dist/components/pr-pipeline.d.ts +10 -1
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/config-environments.d.ts +92 -0
- package/dist/config-environments.d.ts.map +1 -0
- package/dist/config-environments.js +102 -0
- package/dist/config.d.ts +24 -84
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +9 -96
- package/dist/graph-detail.d.ts.map +1 -1
- package/dist/graph-detail.js +15 -3
- package/dist/graph-effective.d.ts +33 -2
- package/dist/graph-effective.d.ts.map +1 -1
- package/dist/graph-effective.js +215 -68
- package/dist/graph-ir.d.ts +23 -0
- package/dist/graph-ir.d.ts.map +1 -1
- package/dist/graph-ir.js +130 -0
- package/dist/graph-sub-template.d.ts +11 -0
- package/dist/graph-sub-template.d.ts.map +1 -0
- package/dist/graph-sub-template.js +19 -0
- package/dist/lexicon.d.ts +9 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/observe.d.ts +28 -0
- package/dist/lifecycle/observe.d.ts.map +1 -1
- package/dist/lifecycle/observe.js +23 -1
- package/dist/lint/rule.d.ts +6 -0
- package/dist/lint/rule.d.ts.map +1 -1
- package/dist/live-endpoint.d.ts +1 -1
- package/dist/live-endpoint.d.ts.map +1 -1
- package/dist/live-endpoint.js +1 -1
- package/dist/observation.d.ts +48 -1
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +21 -5
- package/dist/op/activities/activity-contracts.d.ts +4 -4
- package/dist/op/op-waves.d.ts +17 -0
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +23 -1
- package/dist/pr-forge.d.ts +15 -1
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/pr-forge.js +28 -16
- package/dist/pr-requires.d.ts +5 -1
- package/dist/pr-requires.d.ts.map +1 -1
- package/dist/wave-runtime.mjs +251 -250
- package/dist/workspace/capabilities-contract.d.ts +66 -0
- package/dist/workspace/capabilities-contract.d.ts.map +1 -0
- package/dist/workspace/capabilities-contract.js +107 -0
- package/dist/workspace/capabilities.schema.json +229 -0
- package/dist/workspace/ci-cloud-identity.d.ts +3 -1
- package/dist/workspace/ci-cloud-identity.d.ts.map +1 -1
- package/dist/workspace/ci-cloud-identity.js +16 -1
- package/dist/workspace/ci-run.d.ts +35 -8
- package/dist/workspace/ci-run.d.ts.map +1 -1
- package/dist/workspace/ci-run.js +95 -21
- package/dist/workspace/ci-secrets.d.ts.map +1 -1
- package/dist/workspace/ci-secrets.js +4 -3
- package/dist/workspace/compose-graph.d.ts +9 -0
- package/dist/workspace/compose-graph.d.ts.map +1 -1
- package/dist/workspace/compose-graph.js +3 -1
- package/dist/workspace/conformance/index.d.ts +1 -1
- package/dist/workspace/conformance/index.d.ts.map +1 -1
- package/dist/workspace/conformance/index.js +39 -2
- package/dist/workspace/declaration.d.ts +10 -0
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.js +17 -1
- package/dist/workspace/declaration.schema.json +36 -1
- package/dist/workspace/graph-cache.d.ts +8 -0
- package/dist/workspace/graph-cache.d.ts.map +1 -1
- package/dist/workspace/graph-cache.js +27 -3
- package/dist/workspace/graph-cli.d.ts +39 -2
- package/dist/workspace/graph-cli.d.ts.map +1 -1
- package/dist/workspace/graph-cli.js +66 -24
- package/dist/workspace/graph.schema.json +148 -0
- package/dist/workspace/kind-readers.d.ts +3 -0
- package/dist/workspace/kind-readers.d.ts.map +1 -1
- package/dist/workspace/kind-readers.js +7 -1
- package/dist/workspace/member-commands.d.ts +10 -1
- package/dist/workspace/member-commands.d.ts.map +1 -1
- package/dist/workspace/member-commands.js +17 -1
- package/dist/workspace/nested-graph.d.ts +2 -0
- package/dist/workspace/nested-graph.d.ts.map +1 -1
- package/dist/workspace/nested-graph.js +32 -1
- package/dist/workspace/reason-codes.d.ts +10 -0
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/reason-codes.js +12 -0
- package/dist/workspace/search-cli.d.ts +204 -0
- package/dist/workspace/search-cli.d.ts.map +1 -0
- package/dist/workspace/search-cli.js +466 -0
- package/dist/workspace/search-contract.d.ts +56 -0
- package/dist/workspace/search-contract.d.ts.map +1 -0
- package/dist/workspace/search-contract.js +70 -0
- package/dist/workspace/search.schema.json +822 -0
- package/package.json +1 -1
- package/src/__snapshots__/okf.test.ts.snap +10 -0
- package/src/capabilities/aws.paths +148 -0
- package/src/capabilities/base-mappings.json +122 -0
- package/src/capabilities/catalog.ts +230 -0
- package/src/capabilities/language.test.ts +191 -0
- package/src/capabilities/language.ts +373 -0
- package/src/capabilities/matcher.ts +315 -0
- package/src/capabilities/view-compose.test.ts +76 -0
- package/src/capabilities/view.ts +631 -0
- package/src/ci-identity-targets.test.ts +275 -0
- package/src/ci-identity.ts +394 -61
- package/src/cli/commands/lint.ts +1 -0
- package/src/cli/handlers/build.ts +15 -1
- package/src/cli/handlers/declared-graph.ts +99 -0
- package/src/cli/handlers/graph.test.ts +94 -3
- package/src/cli/handlers/graph.ts +123 -96
- package/src/cli/handlers/pr-env.ts +135 -227
- package/src/cli/handlers/pr.ts +4 -0
- package/src/cli/handlers/search-build-roots.test.ts +144 -0
- package/src/cli/handlers/search-count.test.ts +191 -0
- package/src/cli/handlers/search-count.ts +165 -0
- package/src/cli/handlers/search-json.test.ts +333 -0
- package/src/cli/handlers/search-live.test.ts +387 -0
- package/src/cli/handlers/search-paths.test.ts +235 -0
- package/src/cli/handlers/search.ts +1312 -166
- package/src/cli/main.test.ts +28 -3
- package/src/cli/main.ts +23 -3
- package/src/cli/mcp/server.test.ts +3 -3
- package/src/cli/mcp/server.ts +3 -0
- package/src/cli/mcp/tools/capabilities.ts +32 -0
- package/src/cli/mcp/workspace-tools.e2e.test.ts +21 -1
- package/src/cli/mcp/workspace-tools.ts +47 -2
- package/src/cli/parse-args.ts +52 -13
- package/src/cli/registry.ts +22 -0
- package/src/components/cli-support.ts +6 -1
- package/src/components/fan-out-support.ts +4 -1
- package/src/components/pr-env-ports.ts +89 -0
- package/src/components/pr-env-run-bundle.test.ts +54 -0
- package/src/components/pr-env-run.test.ts +290 -0
- package/src/components/pr-env-run.ts +563 -0
- package/src/components/pr-environment.ts +161 -13
- package/src/components/pr-pipeline.ts +10 -1
- package/src/config-environments.ts +133 -0
- package/src/config.ts +37 -124
- package/src/graph-detail.ts +15 -3
- package/src/graph-effective.ts +226 -75
- package/src/graph-ir.test.ts +163 -0
- package/src/graph-ir.ts +147 -0
- package/src/graph-sub-template.ts +22 -0
- package/src/lexicon.ts +10 -0
- package/src/lifecycle/observe.test.ts +27 -1
- package/src/lifecycle/observe.ts +43 -1
- package/src/lint/rule.ts +6 -0
- package/src/live-endpoint.ts +1 -1
- package/src/observation.test.ts +25 -0
- package/src/observation.ts +69 -5
- package/src/op/op-waves.ts +38 -1
- package/src/pr-forge-bundle.test.ts +1 -1
- package/src/pr-forge.ts +44 -17
- package/src/pr-requires.test.ts +43 -6
- package/src/pr-requires.ts +5 -1
- package/src/workspace/capabilities-contract.test.ts +88 -0
- package/src/workspace/capabilities-contract.ts +132 -0
- package/src/workspace/capabilities.schema.json +229 -0
- package/src/workspace/ci-cloud-identity.test.ts +20 -0
- package/src/workspace/ci-cloud-identity.ts +14 -1
- package/src/workspace/ci-run.test.ts +74 -1
- package/src/workspace/ci-run.ts +122 -29
- package/src/workspace/ci-secrets.test.ts +1 -1
- package/src/workspace/ci-secrets.ts +4 -3
- package/src/workspace/compose-graph.ts +10 -1
- package/src/workspace/conformance/conformance.e2e.test.ts +14 -1
- package/src/workspace/conformance/index.ts +31 -2
- package/src/workspace/declaration.schema.json +36 -1
- package/src/workspace/declaration.test.ts +7 -0
- package/src/workspace/declaration.ts +24 -2
- package/src/workspace/graph-cache.ts +27 -3
- package/src/workspace/graph-cli.ts +96 -24
- package/src/workspace/graph.schema.json +148 -0
- package/src/workspace/kind-readers.e2e.test.ts +28 -0
- package/src/workspace/kind-readers.test.ts +1 -1
- package/src/workspace/kind-readers.ts +7 -1
- package/src/workspace/member-commands.ts +22 -1
- package/src/workspace/nested-graph.ts +32 -1
- package/src/workspace/reason-codes.test.ts +7 -0
- package/src/workspace/reason-codes.ts +12 -0
- package/src/workspace/search-cli.e2e.test.ts +305 -0
- package/src/workspace/search-cli.ts +591 -0
- package/src/workspace/search-contract.ts +95 -0
- package/src/workspace/search.schema.json +822 -0
|
@@ -289,6 +289,33 @@
|
|
|
289
289
|
"type": "string",
|
|
290
290
|
"pattern": "^[1-9][0-9]*(m|h|d)$",
|
|
291
291
|
"description": "How long a pull request's environment lives after its last apply, such as 72h, 90m or 7d. chant components pr-env sweep tears down one whose TTL passed. 72h when absent."
|
|
292
|
+
},
|
|
293
|
+
"teardown": {
|
|
294
|
+
"type": "object",
|
|
295
|
+
"description": "A command that tears down what no lexicon does, such as a Terraform root's copy of the environment (#4330). pr-env down and pr-env sweep run it after the ownership check, twice: CHANT_PR_ENV_STAGE=owned writes the candidates with their read-back markers to CHANT_PR_ENV_RESULT, and CHANT_PR_ENV_STAGE=teardown deletes the candidates in CHANT_PR_ENV_CANDIDATES and writes their outcomes. It runs without the forge token variables. Added in schema 1 by chant 0.124.45, so a declaration that uses it sets minReader to 0.124.45 or newer.",
|
|
296
|
+
"required": ["command"],
|
|
297
|
+
"additionalProperties": false,
|
|
298
|
+
"patternProperties": {
|
|
299
|
+
"^x-": true
|
|
300
|
+
},
|
|
301
|
+
"properties": {
|
|
302
|
+
"name": {
|
|
303
|
+
"type": "string",
|
|
304
|
+
"pattern": "^[a-z0-9][a-z0-9-]*$",
|
|
305
|
+
"description": "The name the teardown's outcomes are attributed to, as a lexicon's are. teardown when absent."
|
|
306
|
+
},
|
|
307
|
+
"command": {
|
|
308
|
+
"type": "array",
|
|
309
|
+
"minItems": 1,
|
|
310
|
+
"items": { "type": "string", "minLength": 1 },
|
|
311
|
+
"description": "Argv, run in the member's directory at the commit the job runs at. {env}, {pr} and {stage} are filled in."
|
|
312
|
+
},
|
|
313
|
+
"lexicons": {
|
|
314
|
+
"type": "array",
|
|
315
|
+
"items": { "type": "string", "minLength": 1 },
|
|
316
|
+
"description": "The lexicons the command tears down in place of, such as terraform. Their own teardown is left out, so one with no teardown execution does not leave the environment incomplete."
|
|
317
|
+
}
|
|
318
|
+
}
|
|
292
319
|
}
|
|
293
320
|
}
|
|
294
321
|
}
|
|
@@ -363,7 +390,7 @@
|
|
|
363
390
|
"ciCloudIdentityRules": {
|
|
364
391
|
"type": "array",
|
|
365
392
|
"minItems": 1,
|
|
366
|
-
"description": "Rules, first match wins: a rule matches a pipeline when its environments match the pipeline's environment and its members match the pipeline's member. A rule with no environments matches every environment,
|
|
393
|
+
"description": "Rules, first match wins: a rule matches a pipeline when its environments match the pipeline's environment and its members match the pipeline's member, and a target inside the member when its targets match the target too. A rule with no environments matches every environment, one with no members every member and a pipeline outside a member, and one with no targets every target.",
|
|
367
394
|
"items": {
|
|
368
395
|
"type": "object",
|
|
369
396
|
"additionalProperties": false,
|
|
@@ -378,6 +405,14 @@
|
|
|
378
405
|
"description": "Environment-name globs, such as prod or staging-*."
|
|
379
406
|
},
|
|
380
407
|
"members": { "$ref": "#/$defs/ciMemberGlobs" },
|
|
408
|
+
"targets": {
|
|
409
|
+
"type": "array",
|
|
410
|
+
"minItems": 1,
|
|
411
|
+
"uniqueItems": true,
|
|
412
|
+
"items": { "type": "string", "minLength": 1 },
|
|
413
|
+
"description": "Target globs inside the member (#4332), such as Terraform roots or Op wave run targets: * within one / segment, ** across segments, ? one character. The plan job trades for every plan identity the member's targets take, and an apply splits into one job per apply identity. Added in schema 1 by chant 0.124.45, so a declaration that uses it sets minReader to 0.124.45 or newer."
|
|
414
|
+
},
|
|
415
|
+
"name": { "type": "string", "pattern": "^[a-z0-9_-]+$", "description": "The name of the apply job group the rule's targets form (#4332). Default: from its first target glob. Added by chant 0.124.45." },
|
|
381
416
|
"plan": { "type": "string", "minLength": 1, "description": "The identity the plan and record jobs take: a role ARN, a service account email or a client id." },
|
|
382
417
|
"apply": { "type": "string", "minLength": 1, "description": "The identity the apply jobs take." }
|
|
383
418
|
}
|
|
@@ -156,6 +156,14 @@ export interface CacheSplit {
|
|
|
156
156
|
* line whose stamp can be taken end up in `hits` or in `pending`.
|
|
157
157
|
*/
|
|
158
158
|
export declare function splitCached(plan: MemberPlan, args: ParsedArgs, cache: GraphCache, at: string | null, argvFor?: (unit: RunUnit) => string[]): CacheSplit;
|
|
159
|
+
/**
|
|
160
|
+
* Every member unit's stamp, by unit id, by the rule {@link splitCached} keys
|
|
161
|
+
* the cache on (ws-059), with no cache read. A read that is never cached, such
|
|
162
|
+
* as `chant workspace search` (#4374), still stamps its members this way, so a
|
|
163
|
+
* reader compares stamps across documents with one meaning. A unit whose stamp
|
|
164
|
+
* can't be taken is left out.
|
|
165
|
+
*/
|
|
166
|
+
export declare function planStamps(plan: MemberPlan, at: string | null): Map<string, string>;
|
|
159
167
|
/** The plan without the units in `ids`; a toolchain left with no units is dropped. */
|
|
160
168
|
export declare function withoutUnits(plan: MemberPlan, ids: ReadonlySet<string>): MemberPlan;
|
|
161
169
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-cache.d.ts","sourceRoot":"","sources":["../../src/workspace/graph-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAMH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAc,KAAK,UAAU,EAAE,KAAK,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/G,gFAAgF;AAChF,eAAO,MAAM,YAAY,IAAI,CAAC;AAE9B,mHAAmH;AACnH,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAE/C,eAAO,MAAM,WAAW,MAAM,CAAC;AAC/B,eAAO,MAAM,SAAS,QAAoB,CAAC;AAE3C,gFAAgF;AAChF,eAAO,MAAM,eAAe,OAAO,CAAC;AAEpC,qFAAqF;AACrF,eAAO,MAAM,UAAU,YAAI,QAAQ,EAAE,WAAW,EAAE,WAAW,CAAU,CAAC;AAExE,yFAAyF;AACzF,eAAO,MAAM,YAAY,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAiBpD,CAAC;AAgBF,4EAA4E;AAC5E,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAEhE;AAMD,MAAM,WAAW,KAAK;IACpB,sBAAsB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,MAAM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IAClB,EAAE,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,4EAA4E;IAC5E,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,mEAAmE;IACnE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,oHAAoH;IACpH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,GAAE,CAAC,IAAI,EAAE,OAAO,KAAK,MAAM,EAAwC,GAAG,UAAU,CA4B5L;AASD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAUnF;AAED,sFAAsF;AACtF,wBAAgB,YAAY,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,UAAU,CAInF;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,UAAU,EAAE,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,CASrG"}
|
|
@@ -307,9 +307,7 @@ export function splitCached(plan, args, cache, at, argvFor = (u) => memberArgv("
|
|
|
307
307
|
// A member read through a generated reader project (#2874) is also keyed on
|
|
308
308
|
// the kind's graph block and the version of the package that reads it.
|
|
309
309
|
const reader = unit.reader ? readerStamp(unit.reader) : "";
|
|
310
|
-
const abs
|
|
311
|
-
const revision = at ? { commit: at, dir: unit.dir } : undefined;
|
|
312
|
-
const stamp = memberStamp(abs, unit.exclude, revision);
|
|
310
|
+
const { abs, revision, stamp } = unitStamp(plan, unit, at);
|
|
313
311
|
if (!stamp)
|
|
314
312
|
continue;
|
|
315
313
|
stamps.set(unit.id, stamp.value);
|
|
@@ -325,6 +323,32 @@ export function splitCached(plan, args, cache, at, argvFor = (u) => memberArgv("
|
|
|
325
323
|
}
|
|
326
324
|
return { hits, stamps, pending, started };
|
|
327
325
|
}
|
|
326
|
+
/** One unit's stamp, and what it was taken over: the member's directory on disk, and the commit for `--at`. */
|
|
327
|
+
function unitStamp(plan, unit, at) {
|
|
328
|
+
const abs = unit.dir === "." ? plan.workspace.root : join(plan.workspace.root, ...unit.dir.split("/"));
|
|
329
|
+
const revision = at ? { commit: at, dir: unit.dir } : undefined;
|
|
330
|
+
return { abs, ...(revision ? { revision } : {}), stamp: memberStamp(abs, unit.exclude, revision) };
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Every member unit's stamp, by unit id, by the rule {@link splitCached} keys
|
|
334
|
+
* the cache on (ws-059), with no cache read. A read that is never cached, such
|
|
335
|
+
* as `chant workspace search` (#4374), still stamps its members this way, so a
|
|
336
|
+
* reader compares stamps across documents with one meaning. A unit whose stamp
|
|
337
|
+
* can't be taken is left out.
|
|
338
|
+
*/
|
|
339
|
+
export function planStamps(plan, at) {
|
|
340
|
+
const stamps = new Map();
|
|
341
|
+
for (const group of plan.groups) {
|
|
342
|
+
for (const unit of group.units) {
|
|
343
|
+
if (unit.group)
|
|
344
|
+
continue;
|
|
345
|
+
const { stamp } = unitStamp(plan, unit, at);
|
|
346
|
+
if (stamp)
|
|
347
|
+
stamps.set(unit.id, stamp.value);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
return stamps;
|
|
351
|
+
}
|
|
328
352
|
/** The plan without the units in `ids`; a toolchain left with no units is dropped. */
|
|
329
353
|
export function withoutUnits(plan, ids) {
|
|
330
354
|
if (ids.size === 0)
|
|
@@ -26,8 +26,9 @@
|
|
|
26
26
|
import type { CommandContext, ParsedArgs } from "../cli/registry.js";
|
|
27
27
|
import { type Plantable } from "./box-factory.js";
|
|
28
28
|
import { type WorkspaceGraph } from "./compose-graph.js";
|
|
29
|
-
import { type ErrorLocation } from "./declaration.js";
|
|
30
|
-
import { type MemberPlan, type Toolchain, type UnitResult } from "./member-commands.js";
|
|
29
|
+
import { type Declaration, type ErrorLocation } from "./declaration.js";
|
|
30
|
+
import { type MemberArgv, type MemberPlan, type Toolchain, type UnitResult } from "./member-commands.js";
|
|
31
|
+
import { type KindRegistry } from "./kinds.js";
|
|
31
32
|
import { type LocatedWorkspace } from "./which-chant.js";
|
|
32
33
|
/** The version of the `graph` document this chant writes. */
|
|
33
34
|
export declare const GRAPH_CONTRACT_VERSION = 1;
|
|
@@ -109,6 +110,42 @@ export declare function componentGraphArgv(args: Partial<ParsedArgs>): string[];
|
|
|
109
110
|
export declare function exportRevision(located: LocatedWorkspace, memberDirs: string[]): string;
|
|
110
111
|
/** Plan a graph read without running anything, for `--dry-run`. Throws a {@link WorkspaceReadError}. */
|
|
111
112
|
export declare function planGraph(query: GraphQuery): MemberPlan;
|
|
113
|
+
/** The members of a workspace read, each read under its own toolchain: what graph and search compose (#4374). */
|
|
114
|
+
export interface MemberReads {
|
|
115
|
+
located: LocatedWorkspace;
|
|
116
|
+
declaration: Declaration;
|
|
117
|
+
kinds: KindRegistry;
|
|
118
|
+
/** The plan the members ran from. */
|
|
119
|
+
plan: MemberPlan;
|
|
120
|
+
/** Each member's answer, the cache's included, in no particular order. */
|
|
121
|
+
results: UnitResult[];
|
|
122
|
+
/** The members the cache answered. */
|
|
123
|
+
served: ReadonlySet<string>;
|
|
124
|
+
/** Each member's stamp, by unit id (ws-059). */
|
|
125
|
+
stamps: ReadonlyMap<string, string>;
|
|
126
|
+
/** With {@link GraphQuery.components}: each member's component graph run. */
|
|
127
|
+
components?: UnitResult[];
|
|
128
|
+
}
|
|
129
|
+
export interface MemberReadOptions {
|
|
130
|
+
/** The command line each member runs; `chant graph --format ir` and the verb's flags by default. */
|
|
131
|
+
argvFor?: MemberArgv;
|
|
132
|
+
/**
|
|
133
|
+
* Answer members from the per-member cache and store what they print
|
|
134
|
+
* (ws-059). Only a read whose output is a graph IR may be cached. When
|
|
135
|
+
* off, every member is still stamped by the same rule.
|
|
136
|
+
*/
|
|
137
|
+
cache: boolean;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Plan the members a workspace read covers, run each under its own toolchain
|
|
141
|
+
* (ws-021) at the revision asked for, and return what they printed. One
|
|
142
|
+
* fan-out, shared by `chant workspace graph` and `chant workspace search`
|
|
143
|
+
* (#4374): `--at` exports the tree once, a member of a package's kind runs in
|
|
144
|
+
* its reader project, and every member is stamped by the rule of ws-059. The
|
|
145
|
+
* exported tree and the reader projects are removed before this returns.
|
|
146
|
+
* Throws a {@link WorkspaceReadError} when the declaration can't be read.
|
|
147
|
+
*/
|
|
148
|
+
export declare function readMembers(query: GraphQuery, options: MemberReadOptions): Promise<MemberReads>;
|
|
112
149
|
/** Read and compose the graph, and build the document. Never throws a {@link WorkspaceReadError}. */
|
|
113
150
|
export declare function workspaceGraph(query: GraphQuery): Promise<GraphResult>;
|
|
114
151
|
export declare function runWorkspaceGraph(ctx: CommandContext): Promise<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/graph-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAOH,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAA0B,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,
|
|
1
|
+
{"version":3,"file":"graph-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/graph-cli.ts"],"names":[],"mappings":"AAAA;;;;;;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,CAAC;IAC1B,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,YAAY,CAAC;IACpB,qCAAqC;IACrC,IAAI,EAAE,UAAU,CAAC;IACjB,0EAA0E;IAC1E,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,sCAAsC;IACtC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC5B,gDAAgD;IAChD,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,6EAA6E;IAC7E,UAAU,CAAC,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,iBAAiB;IAChC,oGAAoG;IACpG,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB;;;;OAIG;IACH,KAAK,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAsB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,CAuCrG;AAiBD,qGAAqG;AACrG,wBAAsB,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,CA0C5E;AA8CD,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAsE5E"}
|
|
@@ -29,8 +29,10 @@ import { tmpdir } from "node:os";
|
|
|
29
29
|
import { dirname, join, resolve } from "node:path";
|
|
30
30
|
import { formatError } from "../cli/format.js";
|
|
31
31
|
import { graphBox, plantability } from "./box-factory.js";
|
|
32
|
-
import { composeWorkspaceGraph, readMemberIr } from "./compose-graph.js";
|
|
33
|
-
import {
|
|
32
|
+
import { composedId, composeWorkspaceGraph, readMemberIr } from "./compose-graph.js";
|
|
33
|
+
import { isViewDocument, prefixView } from "../capabilities/view.js";
|
|
34
|
+
import { refusedCapabilityView } from "./nested-graph.js";
|
|
35
|
+
import { openGraphCache, planStamps, splitCached, storeReads, withoutUnits } from "./graph-cache.js";
|
|
34
36
|
import { readDeclaration, readerVersion, WORKSPACE_ERROR_CODES, WorkspaceReadError } from "./declaration.js";
|
|
35
37
|
import { describePlan, emitDocument, executePlan, memberStatus, planJson, planMembers } from "./member-commands.js";
|
|
36
38
|
import { loadKindRegistry } from "./kinds.js";
|
|
@@ -101,7 +103,7 @@ export function exportRevision(located, memberDirs) {
|
|
|
101
103
|
}
|
|
102
104
|
return out;
|
|
103
105
|
}
|
|
104
|
-
function compose(plan, results, only, declarationMembers, live = false) {
|
|
106
|
+
function compose(plan, results, only, declarationMembers, live = false, capabilityView = false) {
|
|
105
107
|
// A member that ran was read live when --live was given, and says when (#2875).
|
|
106
108
|
const read = (member, r) => {
|
|
107
109
|
if (live) {
|
|
@@ -138,6 +140,12 @@ function compose(plan, results, only, declarationMembers, live = false) {
|
|
|
138
140
|
}
|
|
139
141
|
const member = read(memberStatus(m.name, m.dir, m.kind, "composed", null, r.chant), r);
|
|
140
142
|
member.irVersion = ir.irVersion;
|
|
143
|
+
// The member's own capability view (#4378), with composed ids; null when its chant printed none.
|
|
144
|
+
if (capabilityView) {
|
|
145
|
+
const view = ir.ir.capabilityView;
|
|
146
|
+
member.capabilityView = isViewDocument(view) ? prefixView(view, composedId(m.name, "")) : null;
|
|
147
|
+
}
|
|
148
|
+
delete ir.ir.capabilityView;
|
|
141
149
|
inputs.push({ member, ir: ir.ir });
|
|
142
150
|
}
|
|
143
151
|
return { inputs, failed };
|
|
@@ -146,40 +154,47 @@ function compose(plan, results, only, declarationMembers, live = false) {
|
|
|
146
154
|
export function planGraph(query) {
|
|
147
155
|
const located = locateWorkspace(query.cwd, query.at);
|
|
148
156
|
const declaration = readDeclaration(located.tree, "", { rootChant: true });
|
|
149
|
-
const kinds = loadKindRegistry(declaration.pins, located.rootOnDisk)
|
|
150
|
-
return planMembers("graph", located.rootOnDisk, { only: query.members, reader: query.reader, tree: located.tree, kinds });
|
|
157
|
+
const { registry: kinds, problems } = loadKindRegistry(declaration.pins, located.rootOnDisk);
|
|
158
|
+
return planMembers("graph", located.rootOnDisk, { only: query.members, reader: query.reader, tree: located.tree, kinds, kindProblems: problems.map((p) => p.message) });
|
|
151
159
|
}
|
|
152
|
-
/**
|
|
153
|
-
|
|
154
|
-
|
|
160
|
+
/**
|
|
161
|
+
* Plan the members a workspace read covers, run each under its own toolchain
|
|
162
|
+
* (ws-021) at the revision asked for, and return what they printed. One
|
|
163
|
+
* fan-out, shared by `chant workspace graph` and `chant workspace search`
|
|
164
|
+
* (#4374): `--at` exports the tree once, a member of a package's kind runs in
|
|
165
|
+
* its reader project, and every member is stamped by the rule of ws-059. The
|
|
166
|
+
* exported tree and the reader projects are removed before this returns.
|
|
167
|
+
* Throws a {@link WorkspaceReadError} when the declaration can't be read.
|
|
168
|
+
*/
|
|
169
|
+
export async function readMembers(query, options) {
|
|
155
170
|
let exported;
|
|
156
171
|
let readers;
|
|
157
|
-
if (query.args?.live && query.at !== undefined) {
|
|
158
|
-
return { doc: { ...head, error: { code: "live-at-revision", message: LIVE_AT_REVISION, location: null } }, failed: true };
|
|
159
|
-
}
|
|
160
172
|
try {
|
|
161
173
|
const located = locateWorkspace(query.cwd, query.at);
|
|
162
174
|
const declaration = readDeclaration(located.tree, "", { rootChant: true });
|
|
163
175
|
// Kinds are read before planning: a package kind with a graph block runs (#2874).
|
|
164
|
-
const kinds = loadKindRegistry(declaration.pins, located.rootOnDisk)
|
|
165
|
-
|
|
176
|
+
const { registry: kinds, problems } = loadKindRegistry(declaration.pins, located.rootOnDisk);
|
|
177
|
+
const kindProblems = problems.map((p) => p.message);
|
|
178
|
+
let plan = planMembers("graph", located.rootOnDisk, { only: query.members, reader: query.reader, tree: located.tree, kinds, kindProblems });
|
|
166
179
|
const args = (query.args ?? {});
|
|
167
180
|
// Members whose last source read still stands are answered from the cache (#2876).
|
|
168
181
|
// A composites read runs every member's component graph as well, so it reads everything.
|
|
169
|
-
const cache = query.noCache || query.components ? undefined : openGraphCache(located.rootOnDisk);
|
|
182
|
+
const cache = !options.cache || query.noCache || query.components ? undefined : openGraphCache(located.rootOnDisk);
|
|
170
183
|
const split = cache ? splitCached(plan, args, cache, located.at) : undefined;
|
|
184
|
+
const stamps = split?.stamps ?? (options.cache ? new Map() : planStamps(plan, located.at));
|
|
171
185
|
const served = new Set(split?.hits.map((h) => h.id));
|
|
172
186
|
if (located.at !== null && withoutUnits(plan, served).groups.length > 0) {
|
|
173
187
|
exported = exportRevision(located, withoutUnits(plan, served).groups.flatMap((g) => g.units.map((u) => u.dir)));
|
|
174
|
-
plan = planMembers("graph", exported, { only: query.members, reader: query.reader, tree: workingTree(exported), kinds });
|
|
188
|
+
plan = planMembers("graph", exported, { only: query.members, reader: query.reader, tree: workingTree(exported), kinds, kindProblems });
|
|
175
189
|
}
|
|
176
190
|
// Only the members that run get a reader project; a served member needs none.
|
|
177
191
|
const toRun = withoutUnits(plan, served);
|
|
178
192
|
readers = prepareKindReaders(toRun, exported ?? located.rootOnDisk);
|
|
179
|
-
const [
|
|
180
|
-
executePlan(toRun, args),
|
|
193
|
+
const [first, components] = await Promise.all([
|
|
194
|
+
executePlan(toRun, args, options.argvFor),
|
|
181
195
|
query.components ? executePlan(plan, args, () => componentGraphArgv(args)) : Promise.resolve(undefined),
|
|
182
196
|
]);
|
|
197
|
+
const ran = args.capabilityView && !options.argvFor ? await withoutViewWhereRefused(toRun, args, first) : first;
|
|
183
198
|
if (cache && split)
|
|
184
199
|
storeReads(split, ran, cache);
|
|
185
200
|
const results = [...(split?.hits ?? []), ...ran];
|
|
@@ -191,12 +206,44 @@ export async function workspaceGraph(query) {
|
|
|
191
206
|
for (const r of results)
|
|
192
207
|
if (r.stderr.trim() && query.onStderr)
|
|
193
208
|
query.onStderr(r.stderr.endsWith("\n") ? r.stderr : `${r.stderr}\n`);
|
|
194
|
-
|
|
209
|
+
return { located, declaration, kinds, plan, results, served, stamps, ...(components ? { components } : {}) };
|
|
210
|
+
}
|
|
211
|
+
finally {
|
|
212
|
+
readers?.cleanup();
|
|
213
|
+
if (exported)
|
|
214
|
+
rmSync(dirname(exported), { recursive: true, force: true });
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* A member's chant from before #4378 refuses `--capability-view` as a flag
|
|
219
|
+
* it doesn't know. Read those members again without it, so the graph still
|
|
220
|
+
* composes them; they carry `capabilityView: null`, which a capability search
|
|
221
|
+
* reports as `member-chant-too-old`.
|
|
222
|
+
*/
|
|
223
|
+
async function withoutViewWhereRefused(plan, args, results) {
|
|
224
|
+
const refused = new Set(results.filter((r) => r.exitCode !== 0 && refusedCapabilityView(r.stderr)).map((r) => r.id));
|
|
225
|
+
if (refused.size === 0)
|
|
226
|
+
return results;
|
|
227
|
+
const others = new Set(results.filter((r) => !refused.has(r.id)).map((r) => r.id));
|
|
228
|
+
const again = await executePlan(withoutUnits(plan, others), { ...args, capabilityView: false });
|
|
229
|
+
const byId = new Map(again.map((r) => [r.id, r]));
|
|
230
|
+
return results.map((r) => byId.get(r.id) ?? r);
|
|
231
|
+
}
|
|
232
|
+
/** Read and compose the graph, and build the document. Never throws a {@link WorkspaceReadError}. */
|
|
233
|
+
export async function workspaceGraph(query) {
|
|
234
|
+
const head = { $schema: GRAPH_OUTPUT_SCHEMA_ID, contract: GRAPH_CONTRACT_VERSION, chant: readerVersion() };
|
|
235
|
+
if (query.args?.live && query.at !== undefined) {
|
|
236
|
+
return { doc: { ...head, error: { code: "live-at-revision", message: LIVE_AT_REVISION, location: null } }, failed: true };
|
|
237
|
+
}
|
|
238
|
+
try {
|
|
239
|
+
const { located, declaration, kinds, plan, results, served, stamps, components } = await readMembers(query, { cache: true });
|
|
240
|
+
const args = (query.args ?? {});
|
|
241
|
+
const { inputs, failed } = compose(plan, results, query.members, declaration.members, !!args.live, !!args.capabilityView);
|
|
195
242
|
for (const { member } of inputs) {
|
|
196
243
|
if (member.status !== "composed")
|
|
197
244
|
continue;
|
|
198
245
|
member.cached = served.has(member.name);
|
|
199
|
-
member.stamp =
|
|
246
|
+
member.stamp = stamps.get(member.name) ?? null;
|
|
200
247
|
}
|
|
201
248
|
// Links (#2539) resolve against the declaration that was read, the revision's for --at, and the kinds installed now.
|
|
202
249
|
// A kind's link reader (#3932) reads the member's files in the tree read, as check does.
|
|
@@ -231,11 +278,6 @@ export async function workspaceGraph(query) {
|
|
|
231
278
|
throw err;
|
|
232
279
|
return { doc: { ...head, error: { code: err.code, message: err.message, location: err.location ?? null } }, failed: true };
|
|
233
280
|
}
|
|
234
|
-
finally {
|
|
235
|
-
readers?.cleanup();
|
|
236
|
-
if (exported)
|
|
237
|
-
rmSync(dirname(exported), { recursive: true, force: true });
|
|
238
|
-
}
|
|
239
281
|
}
|
|
240
282
|
/**
|
|
241
283
|
* Expand every member of kind `workspace` the query covers, read-only (#2551,
|
|
@@ -437,6 +437,17 @@
|
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
439
|
]
|
|
440
|
+
},
|
|
441
|
+
"capabilityView": {
|
|
442
|
+
"description": "Added in contract 1 by #4378. Only with `--capability-view`, which `chant workspace search` asks for when a query has a capability term. The lexicon-neutral view capability rules read, built by the member's own chant through the mappings and adapters of the lexicons the member loads (its `chant graph --format ir --capability-view`), with `<member>/<id>` ids. null on a composed member whose chant printed no view (one from before #4378); a capability search reports that member as `member-chant-too-old`. Absent without the flag, and on a member that was not composed.",
|
|
443
|
+
"oneOf": [
|
|
444
|
+
{
|
|
445
|
+
"type": "null"
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"$ref": "#/$defs/capabilityView"
|
|
449
|
+
}
|
|
450
|
+
]
|
|
440
451
|
}
|
|
441
452
|
},
|
|
442
453
|
"if": {
|
|
@@ -1438,6 +1449,143 @@
|
|
|
1438
1449
|
]
|
|
1439
1450
|
}
|
|
1440
1451
|
}
|
|
1452
|
+
},
|
|
1453
|
+
"capabilityView": {
|
|
1454
|
+
"type": "object",
|
|
1455
|
+
"description": "One member's capability view (#4378), as `capabilities/view.ts` serializes it. Rules read labels, attributes and edges; a node's attributes are the neutral ones its lexicon's mapping names.",
|
|
1456
|
+
"required": [
|
|
1457
|
+
"version",
|
|
1458
|
+
"lexicons",
|
|
1459
|
+
"nodes",
|
|
1460
|
+
"edges",
|
|
1461
|
+
"unresolved"
|
|
1462
|
+
],
|
|
1463
|
+
"properties": {
|
|
1464
|
+
"version": {
|
|
1465
|
+
"const": 1,
|
|
1466
|
+
"description": "The view's own format version. A reader treats a view of a version it doesn't know as no view."
|
|
1467
|
+
},
|
|
1468
|
+
"lexicons": {
|
|
1469
|
+
"type": "array",
|
|
1470
|
+
"items": {
|
|
1471
|
+
"type": "string"
|
|
1472
|
+
},
|
|
1473
|
+
"description": "The lexicons whose nodes a mapping labelled."
|
|
1474
|
+
},
|
|
1475
|
+
"nodes": {
|
|
1476
|
+
"type": "array",
|
|
1477
|
+
"items": {
|
|
1478
|
+
"type": "object",
|
|
1479
|
+
"required": [
|
|
1480
|
+
"id",
|
|
1481
|
+
"label",
|
|
1482
|
+
"irId",
|
|
1483
|
+
"lexicon",
|
|
1484
|
+
"attrs"
|
|
1485
|
+
],
|
|
1486
|
+
"properties": {
|
|
1487
|
+
"id": {
|
|
1488
|
+
"type": "string",
|
|
1489
|
+
"description": "A node id of the composed graph, or, for a policy statement or an inline block, that id with `#<attribute path>`."
|
|
1490
|
+
},
|
|
1491
|
+
"label": {
|
|
1492
|
+
"type": "string",
|
|
1493
|
+
"description": "The neutral label (`Role`, `Bucket`, `Statement`, `IngressRule`)."
|
|
1494
|
+
},
|
|
1495
|
+
"irId": {
|
|
1496
|
+
"type": "string",
|
|
1497
|
+
"description": "The composed graph node this view node is, or sits inside."
|
|
1498
|
+
},
|
|
1499
|
+
"lexicon": {
|
|
1500
|
+
"type": "string"
|
|
1501
|
+
},
|
|
1502
|
+
"attrs": {
|
|
1503
|
+
"type": "object"
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
},
|
|
1508
|
+
"edges": {
|
|
1509
|
+
"type": "array",
|
|
1510
|
+
"items": {
|
|
1511
|
+
"type": "object",
|
|
1512
|
+
"required": [
|
|
1513
|
+
"from",
|
|
1514
|
+
"to",
|
|
1515
|
+
"name",
|
|
1516
|
+
"hops"
|
|
1517
|
+
],
|
|
1518
|
+
"properties": {
|
|
1519
|
+
"from": {
|
|
1520
|
+
"type": "string"
|
|
1521
|
+
},
|
|
1522
|
+
"to": {
|
|
1523
|
+
"type": "string"
|
|
1524
|
+
},
|
|
1525
|
+
"name": {
|
|
1526
|
+
"type": "string",
|
|
1527
|
+
"description": "The view edge's name (`subnet`, `statement`, `resource`, `attachedTo`)."
|
|
1528
|
+
},
|
|
1529
|
+
"hops": {
|
|
1530
|
+
"type": "array",
|
|
1531
|
+
"description": "The graph references the edge stands for, in walk order from `from`, each in the reference's own direction.",
|
|
1532
|
+
"items": {
|
|
1533
|
+
"type": "object",
|
|
1534
|
+
"required": [
|
|
1535
|
+
"from",
|
|
1536
|
+
"to",
|
|
1537
|
+
"edge"
|
|
1538
|
+
],
|
|
1539
|
+
"properties": {
|
|
1540
|
+
"from": {
|
|
1541
|
+
"type": "string"
|
|
1542
|
+
},
|
|
1543
|
+
"fromAttr": {
|
|
1544
|
+
"type": "string"
|
|
1545
|
+
},
|
|
1546
|
+
"to": {
|
|
1547
|
+
"type": "string"
|
|
1548
|
+
},
|
|
1549
|
+
"toAttr": {
|
|
1550
|
+
"type": "string"
|
|
1551
|
+
},
|
|
1552
|
+
"edge": {
|
|
1553
|
+
"type": "string"
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
},
|
|
1561
|
+
"unresolved": {
|
|
1562
|
+
"type": "array",
|
|
1563
|
+
"description": "ARN strings naming a role, bucket or table that the member declares nothing of. `chant workspace search` resolves them by name over every member's view, so a policy in one member reaches a bucket in another.",
|
|
1564
|
+
"items": {
|
|
1565
|
+
"type": "object",
|
|
1566
|
+
"required": [
|
|
1567
|
+
"from",
|
|
1568
|
+
"fromAttr",
|
|
1569
|
+
"edge",
|
|
1570
|
+
"value"
|
|
1571
|
+
],
|
|
1572
|
+
"properties": {
|
|
1573
|
+
"from": {
|
|
1574
|
+
"type": "string"
|
|
1575
|
+
},
|
|
1576
|
+
"fromAttr": {
|
|
1577
|
+
"type": "string"
|
|
1578
|
+
},
|
|
1579
|
+
"edge": {
|
|
1580
|
+
"type": "string"
|
|
1581
|
+
},
|
|
1582
|
+
"value": {
|
|
1583
|
+
"type": "string"
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1441
1589
|
}
|
|
1442
1590
|
}
|
|
1443
1591
|
}
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
* (`substituteGraphConfig`). The terraform lexicon's config names one root
|
|
14
14
|
* after the member, at the member's directory, with `moduleRoot` at the
|
|
15
15
|
* workspace root, so a member that calls `../modules/x` keeps its modules.
|
|
16
|
+
* - It also sets `graph.lint: "report"` (behold#919), so a member whose
|
|
17
|
+
* source fails the lexicon's lint is still composed, with the findings on
|
|
18
|
+
* its `meta.lint`, instead of failing with `command-failed`.
|
|
16
19
|
* - `node_modules` links to the `node_modules` directory holding the lexicon
|
|
17
20
|
* package, found from the workspace root as the kind's pin was. The lexicon
|
|
18
21
|
* chant loads is then the one the declaration pins.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kind-readers.d.ts","sourceRoot":"","sources":["../../src/workspace/kind-readers.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"kind-readers.d.ts","sourceRoot":"","sources":["../../src/workspace/kind-readers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAMH,OAAO,KAAK,EAAE,UAAU,EAAW,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE3E,MAAM,WAAW,eAAe;IAC9B,4FAA4F;IAC5F,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,gEAAgE;IAChE,OAAO,IAAI,IAAI,CAAC;CACjB;AAmCD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,eAAe,CAoClF"}
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
* (`substituteGraphConfig`). The terraform lexicon's config names one root
|
|
14
14
|
* after the member, at the member's directory, with `moduleRoot` at the
|
|
15
15
|
* workspace root, so a member that calls `../modules/x` keeps its modules.
|
|
16
|
+
* - It also sets `graph.lint: "report"` (behold#919), so a member whose
|
|
17
|
+
* source fails the lexicon's lint is still composed, with the findings on
|
|
18
|
+
* its `meta.lint`, instead of failing with `command-failed`.
|
|
16
19
|
* - `node_modules` links to the `node_modules` directory holding the lexicon
|
|
17
20
|
* package, found from the workspace root as the kind's pin was. The lexicon
|
|
18
21
|
* chant loads is then the one the declaration pins.
|
|
@@ -86,7 +89,10 @@ export function prepareKindReaders(plan, root) {
|
|
|
86
89
|
const project = join(scratch, unit.id);
|
|
87
90
|
mkdirSync(project, { recursive: true });
|
|
88
91
|
const config = substituteGraphConfig(unit.reader.config, { member: unit.member, dir: unit.abs, workspace: root });
|
|
89
|
-
|
|
92
|
+
// `graph.lint: "report"` (behold#919): chant did not author a reader
|
|
93
|
+
// member's source, so a lint error there is a finding about it, carried
|
|
94
|
+
// on the member's `meta.lint`, not a reason to leave it out of the graph.
|
|
95
|
+
writeFileSync(join(project, "chant.config.json"), `${JSON.stringify({ lexicons: [unit.reader.lexicon], [unit.reader.lexicon]: config, graph: { lint: "report" } }, null, 2)}\n`);
|
|
90
96
|
symlinkSync(found.modules, join(project, "node_modules"), "dir");
|
|
91
97
|
unit.abs = project;
|
|
92
98
|
return true;
|
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
* - For `graph` only, members of a pinned package's kind whose kinds file
|
|
13
13
|
* says how to read them (#2874, a `graph` block): each runs `chant graph`
|
|
14
14
|
* in a reader project chant writes for it (`kind-readers.ts`). Other
|
|
15
|
-
* package kinds are `kind-not-run`, as before.
|
|
15
|
+
* package kinds are `kind-not-run`, as before. A kind no built-in or
|
|
16
|
+
* pinned package supplies, such as `terraform` when the pinned lexicon is
|
|
17
|
+
* missing or at another version, is `unknown-kind` and fails the read,
|
|
18
|
+
* with the pin's problem in the message (#4380).
|
|
16
19
|
* - For `build` and `lint` only, every project an example group matches
|
|
17
20
|
* (ws-051): groups are built and linted, and have no ledger, audit or place
|
|
18
21
|
* in the graph. On a large repository this is most of the run, so
|
|
@@ -116,6 +119,12 @@ export interface PlanOptions {
|
|
|
116
119
|
reader?: Toolchain;
|
|
117
120
|
/** The files to plan from, such as a revision's (`--at`); the working tree under `root` by default. */
|
|
118
121
|
tree?: WorkspaceTree;
|
|
122
|
+
/**
|
|
123
|
+
* Why a pinned package's kinds couldn't be loaded (`loadKindRegistry`'s
|
|
124
|
+
* problems), such as a pin at one version with another installed. A graph
|
|
125
|
+
* read names them on a member whose kind is unknown (#4380).
|
|
126
|
+
*/
|
|
127
|
+
kindProblems?: readonly string[];
|
|
119
128
|
}
|
|
120
129
|
/** Work out which projects run and under which chant. Throws a {@link WorkspaceReadError} for an unreadable declaration or an unknown `--member` name. */
|
|
121
130
|
export declare function planMembers(verb: WorkspaceVerb, root: string, options?: PlanOptions): MemberPlan;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"member-commands.d.ts","sourceRoot":"","sources":["../../src/workspace/member-commands.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"member-commands.d.ts","sourceRoot":"","sources":["../../src/workspace/member-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAOH,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElE,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACp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