@shrkcrft/cli 0.1.0-alpha.29 → 0.1.0-alpha.31
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/asset-preview/apply-asset-preview.js +1 -1
- package/dist/authoring/authoring-kit.d.ts +9 -1
- package/dist/authoring/authoring-kit.d.ts.map +1 -1
- package/dist/authoring/authoring-kit.js +26 -13
- package/dist/bootstrap/unlinked-workspace-dependency.d.ts +11 -0
- package/dist/bootstrap/unlinked-workspace-dependency.d.ts.map +1 -0
- package/dist/bootstrap/unlinked-workspace-dependency.js +99 -0
- package/dist/command-registry.d.ts +100 -1
- package/dist/command-registry.d.ts.map +1 -1
- package/dist/command-registry.js +130 -3
- package/dist/commands/api-diff.command.d.ts.map +1 -1
- package/dist/commands/api-diff.command.js +12 -0
- package/dist/commands/apply.command.d.ts.map +1 -1
- package/dist/commands/apply.command.js +3 -0
- package/dist/commands/arch.command.d.ts.map +1 -1
- package/dist/commands/arch.command.js +26 -7
- package/dist/commands/architecture.command.d.ts.map +1 -1
- package/dist/commands/architecture.command.js +8 -2
- package/dist/commands/baseline.command.d.ts +76 -0
- package/dist/commands/baseline.command.d.ts.map +1 -1
- package/dist/commands/baseline.command.js +599 -75
- package/dist/commands/biome.command.d.ts.map +1 -1
- package/dist/commands/biome.command.js +20 -0
- package/dist/commands/boundaries.command.d.ts +9 -1
- package/dist/commands/boundaries.command.d.ts.map +1 -1
- package/dist/commands/boundaries.command.js +88 -20
- package/dist/commands/bundle.command.d.ts.map +1 -1
- package/dist/commands/bundle.command.js +57 -11
- package/dist/commands/cache-align.command.d.ts.map +1 -1
- package/dist/commands/cache-align.command.js +3 -1
- package/dist/commands/changelog-data.d.ts.map +1 -1
- package/dist/commands/changelog-data.js +164 -0
- package/dist/commands/changes.command.d.ts.map +1 -1
- package/dist/commands/changes.command.js +15 -0
- package/dist/commands/check.command.d.ts.map +1 -1
- package/dist/commands/check.command.js +1260 -324
- package/dist/commands/checks.command.d.ts.map +1 -1
- package/dist/commands/checks.command.js +188 -40
- package/dist/commands/ci.command.d.ts.map +1 -1
- package/dist/commands/ci.command.js +35 -2
- package/dist/commands/code-intel.command.d.ts.map +1 -1
- package/dist/commands/code-intel.command.js +8 -1
- package/dist/commands/command-catalog.d.ts +23 -1
- package/dist/commands/command-catalog.d.ts.map +1 -1
- package/dist/commands/command-catalog.js +152 -35
- package/dist/commands/commands.command.d.ts +21 -3
- package/dist/commands/commands.command.d.ts.map +1 -1
- package/dist/commands/commands.command.js +172 -27
- package/dist/commands/compress.command.d.ts.map +1 -1
- package/dist/commands/compress.command.js +4 -0
- package/dist/commands/constructs.command.d.ts.map +1 -1
- package/dist/commands/constructs.command.js +50 -12
- package/dist/commands/context.command.d.ts.map +1 -1
- package/dist/commands/context.command.js +40 -5
- package/dist/commands/contract-templates.command.d.ts.map +1 -1
- package/dist/commands/contract-templates.command.js +9 -1
- package/dist/commands/contract.command.d.ts.map +1 -1
- package/dist/commands/contract.command.js +35 -0
- package/dist/commands/conventions.command.d.ts.map +1 -1
- package/dist/commands/conventions.command.js +189 -29
- package/dist/commands/coverage.command.d.ts.map +1 -1
- package/dist/commands/coverage.command.js +9 -0
- package/dist/commands/daily.commands.d.ts +0 -1
- package/dist/commands/daily.commands.d.ts.map +1 -1
- package/dist/commands/daily.commands.js +12 -76
- package/dist/commands/dashboard.command.d.ts.map +1 -1
- package/dist/commands/dashboard.command.js +10 -0
- package/dist/commands/dev.command.d.ts.map +1 -1
- package/dist/commands/dev.command.js +45 -2
- package/dist/commands/diagnostics.command.d.ts +0 -2
- package/dist/commands/diagnostics.command.d.ts.map +1 -1
- package/dist/commands/diagnostics.command.js +5 -78
- package/dist/commands/diff-check.command.d.ts +6 -4
- package/dist/commands/diff-check.command.d.ts.map +1 -1
- package/dist/commands/diff-check.command.js +190 -103
- package/dist/commands/docs-references.command.d.ts +20 -0
- package/dist/commands/docs-references.command.d.ts.map +1 -0
- package/dist/commands/docs-references.command.js +520 -0
- package/dist/commands/doctor.command.d.ts.map +1 -1
- package/dist/commands/doctor.command.js +60 -5
- package/dist/commands/drift.command.d.ts.map +1 -1
- package/dist/commands/drift.command.js +17 -4
- package/dist/commands/eslint.command.d.ts.map +1 -1
- package/dist/commands/eslint.command.js +20 -0
- package/dist/commands/export.command.d.ts.map +1 -1
- package/dist/commands/export.command.js +23 -1
- package/dist/commands/feedback-dispatch.command.d.ts.map +1 -1
- package/dist/commands/feedback-dispatch.command.js +29 -0
- package/dist/commands/feedback.command.d.ts.map +1 -1
- package/dist/commands/feedback.command.js +6 -1
- package/dist/commands/finish.command.d.ts.map +1 -1
- package/dist/commands/finish.command.js +32 -8
- package/dist/commands/fix.command.d.ts.map +1 -1
- package/dist/commands/fix.command.js +19 -0
- package/dist/commands/gate.command.d.ts +6 -1
- package/dist/commands/gate.command.d.ts.map +1 -1
- package/dist/commands/gate.command.js +50 -124
- package/dist/commands/gates.command.d.ts +54 -0
- package/dist/commands/gates.command.d.ts.map +1 -1
- package/dist/commands/gates.command.js +1314 -64
- package/dist/commands/gen.command.d.ts.map +1 -1
- package/dist/commands/gen.command.js +4 -0
- package/dist/commands/generated.command.d.ts +62 -0
- package/dist/commands/generated.command.d.ts.map +1 -1
- package/dist/commands/generated.command.js +639 -156
- package/dist/commands/graph-code-subverbs.d.ts +15 -0
- package/dist/commands/graph-code-subverbs.d.ts.map +1 -1
- package/dist/commands/graph-code-subverbs.js +203 -25
- package/dist/commands/graph.command.d.ts.map +1 -1
- package/dist/commands/graph.command.js +79 -37
- package/dist/commands/help.command.d.ts +30 -6
- package/dist/commands/help.command.d.ts.map +1 -1
- package/dist/commands/help.command.js +323 -199
- package/dist/commands/helper.command.d.ts +1 -0
- package/dist/commands/helper.command.d.ts.map +1 -1
- package/dist/commands/helper.command.js +195 -56
- package/dist/commands/impact.command.d.ts.map +1 -1
- package/dist/commands/impact.command.js +115 -12
- package/dist/commands/infer.command.d.ts.map +1 -1
- package/dist/commands/infer.command.js +20 -45
- package/dist/commands/ingest.command.d.ts +0 -1
- package/dist/commands/ingest.command.d.ts.map +1 -1
- package/dist/commands/ingest.command.js +25 -41
- package/dist/commands/knowledge-author.command.d.ts +0 -3
- package/dist/commands/knowledge-author.command.d.ts.map +1 -1
- package/dist/commands/knowledge-author.command.js +10 -23
- package/dist/commands/knowledge.command.d.ts.map +1 -1
- package/dist/commands/knowledge.command.js +469 -129
- package/dist/commands/languages.command.d.ts.map +1 -1
- package/dist/commands/languages.command.js +27 -0
- package/dist/commands/lint.command.d.ts.map +1 -1
- package/dist/commands/lint.command.js +3 -0
- package/dist/commands/mcp.command.d.ts +18 -0
- package/dist/commands/mcp.command.d.ts.map +1 -1
- package/dist/commands/mcp.command.js +33 -8
- package/dist/commands/onboard.command.d.ts.map +1 -1
- package/dist/commands/onboard.command.js +20 -0
- package/dist/commands/owners.command.d.ts.map +1 -1
- package/dist/commands/owners.command.js +14 -2
- package/dist/commands/packs-new.d.ts +13 -1
- package/dist/commands/packs-new.d.ts.map +1 -1
- package/dist/commands/packs-new.js +500 -335
- package/dist/commands/packs.command.d.ts.map +1 -1
- package/dist/commands/packs.command.js +378 -36
- package/dist/commands/paths.command.d.ts.map +1 -1
- package/dist/commands/paths.command.js +9 -1
- package/dist/commands/pipelines.command.d.ts.map +1 -1
- package/dist/commands/pipelines.command.js +7 -1
- package/dist/commands/plan-check.command.d.ts.map +1 -1
- package/dist/commands/plan-check.command.js +3 -0
- package/dist/commands/plan.command.d.ts.map +1 -1
- package/dist/commands/plan.command.js +3 -0
- package/dist/commands/playbooks.command.d.ts.map +1 -1
- package/dist/commands/playbooks.command.js +7 -2
- package/dist/commands/policy-lint.command.d.ts +19 -2
- package/dist/commands/policy-lint.command.d.ts.map +1 -1
- package/dist/commands/policy-lint.command.js +224 -65
- package/dist/commands/policy.command.d.ts.map +1 -1
- package/dist/commands/policy.command.js +6 -1
- package/dist/commands/pr.command.d.ts.map +1 -1
- package/dist/commands/pr.command.js +14 -0
- package/dist/commands/presets.command.d.ts.map +1 -1
- package/dist/commands/presets.command.js +12 -27
- package/dist/commands/profiles.command.d.ts.map +1 -1
- package/dist/commands/profiles.command.js +94 -26
- package/dist/commands/provenance.command.js +1 -1
- package/dist/commands/quality.command.d.ts.map +1 -1
- package/dist/commands/quality.command.js +129 -33
- package/dist/commands/recommend.command.d.ts +20 -4
- package/dist/commands/recommend.command.d.ts.map +1 -1
- package/dist/commands/recommend.command.js +172 -278
- package/dist/commands/registrations.command.d.ts.map +1 -1
- package/dist/commands/registrations.command.js +138 -13
- package/dist/commands/registry-lifecycle-run.d.ts +14 -0
- package/dist/commands/registry-lifecycle-run.d.ts.map +1 -0
- package/dist/commands/registry-lifecycle-run.js +336 -0
- package/dist/commands/registry.command.d.ts.map +1 -1
- package/dist/commands/registry.command.js +235 -62
- package/dist/commands/release.command.d.ts.map +1 -1
- package/dist/commands/release.command.js +99 -20
- package/dist/commands/report.command.d.ts.map +1 -1
- package/dist/commands/report.command.js +38 -2
- package/dist/commands/reuse-coverage.command.d.ts +23 -0
- package/dist/commands/reuse-coverage.command.d.ts.map +1 -0
- package/dist/commands/reuse-coverage.command.js +536 -0
- package/dist/commands/reuse.command.d.ts +3 -18
- package/dist/commands/reuse.command.d.ts.map +1 -1
- package/dist/commands/reuse.command.js +395 -244
- package/dist/commands/review.command.d.ts.map +1 -1
- package/dist/commands/review.command.js +33 -1
- package/dist/commands/rounds.command.d.ts.map +1 -1
- package/dist/commands/rounds.command.js +5 -0
- package/dist/commands/safety.command.d.ts.map +1 -1
- package/dist/commands/safety.command.js +9 -0
- package/dist/commands/scaffolds.command.d.ts.map +1 -1
- package/dist/commands/scaffolds.command.js +97 -25
- package/dist/commands/search.command.d.ts +0 -8
- package/dist/commands/search.command.d.ts.map +1 -1
- package/dist/commands/search.command.js +136 -28
- package/dist/commands/self-config-xrefs.command.d.ts +24 -0
- package/dist/commands/self-config-xrefs.command.d.ts.map +1 -0
- package/dist/commands/self-config-xrefs.command.js +170 -0
- package/dist/commands/self-config.command.d.ts.map +1 -1
- package/dist/commands/self-config.command.js +261 -65
- package/dist/commands/smart-context.command.d.ts.map +1 -1
- package/dist/commands/smart-context.command.js +39 -3
- package/dist/commands/spec.command.d.ts.map +1 -1
- package/dist/commands/spec.command.js +3 -0
- package/dist/commands/stats.command.d.ts.map +1 -1
- package/dist/commands/stats.command.js +3 -0
- package/dist/commands/surface.command.d.ts +6 -1
- package/dist/commands/surface.command.d.ts.map +1 -1
- package/dist/commands/surface.command.js +256 -54
- package/dist/commands/task-context.command.js +1 -1
- package/dist/commands/task.command.d.ts.map +1 -1
- package/dist/commands/task.command.js +22 -1
- package/dist/commands/templates.command.d.ts +4 -0
- package/dist/commands/templates.command.d.ts.map +1 -1
- package/dist/commands/templates.command.js +109 -22
- package/dist/commands/test.command.d.ts.map +1 -1
- package/dist/commands/test.command.js +161 -33
- package/dist/commands/tests.command.d.ts.map +1 -1
- package/dist/commands/tests.command.js +29 -3
- package/dist/commands/trace.command.d.ts.map +1 -1
- package/dist/commands/trace.command.js +29 -4
- package/dist/commands/watch.command.d.ts.map +1 -1
- package/dist/commands/watch.command.js +3 -0
- package/dist/commands/why.command.d.ts.map +1 -1
- package/dist/commands/why.command.js +3 -0
- package/dist/commands/wiring.command.d.ts +18 -4
- package/dist/commands/wiring.command.d.ts.map +1 -1
- package/dist/commands/wiring.command.js +362 -74
- package/dist/dashboard/code-intelligence-data.js +4 -4
- package/dist/diff/deleted-orphan-coverage.d.ts +32 -0
- package/dist/diff/deleted-orphan-coverage.d.ts.map +1 -0
- package/dist/diff/deleted-orphan-coverage.js +107 -0
- package/dist/diff/deleted-orphan-scope-notes.d.ts +23 -0
- package/dist/diff/deleted-orphan-scope-notes.d.ts.map +1 -0
- package/dist/diff/deleted-orphan-scope-notes.js +49 -0
- package/dist/diff/deleted-orphans.d.ts +32 -0
- package/dist/diff/deleted-orphans.d.ts.map +1 -1
- package/dist/diff/deleted-orphans.js +42 -2
- package/dist/dispatch/closest-match.d.ts +15 -0
- package/dist/dispatch/closest-match.d.ts.map +1 -0
- package/dist/dispatch/closest-match.js +47 -0
- package/dist/dispatch/global-flags.d.ts +94 -0
- package/dist/dispatch/global-flags.d.ts.map +1 -0
- package/dist/dispatch/global-flags.js +123 -0
- package/dist/dispatch/guard-invocation-input.d.ts +24 -0
- package/dist/dispatch/guard-invocation-input.d.ts.map +1 -0
- package/dist/dispatch/guard-invocation-input.js +1 -0
- package/dist/dispatch/guard-invocation.d.ts +33 -0
- package/dist/dispatch/guard-invocation.d.ts.map +1 -0
- package/dist/dispatch/guard-invocation.js +183 -0
- package/dist/dispatch/help-intercept.d.ts +22 -0
- package/dist/dispatch/help-intercept.d.ts.map +1 -0
- package/dist/dispatch/help-intercept.js +42 -0
- package/dist/dispatch/i-declared-invocation.d.ts +17 -0
- package/dist/dispatch/i-declared-invocation.d.ts.map +1 -0
- package/dist/dispatch/i-declared-invocation.js +1 -0
- package/dist/dispatch/i-unknown-flag-refusal-input.d.ts +28 -0
- package/dist/dispatch/i-unknown-flag-refusal-input.d.ts.map +1 -0
- package/dist/dispatch/i-unknown-flag-refusal-input.js +1 -0
- package/dist/dispatch/invocation-rejection-kind.d.ts +15 -0
- package/dist/dispatch/invocation-rejection-kind.d.ts.map +1 -0
- package/dist/dispatch/invocation-rejection-kind.js +15 -0
- package/dist/dispatch/invocation-rejection.d.ts +18 -0
- package/dist/dispatch/invocation-rejection.d.ts.map +1 -0
- package/dist/dispatch/invocation-rejection.js +1 -0
- package/dist/dispatch/judge-invocation.d.ts +24 -0
- package/dist/dispatch/judge-invocation.d.ts.map +1 -0
- package/dist/dispatch/judge-invocation.js +50 -0
- package/dist/dispatch/positional-mode.d.ts +18 -0
- package/dist/dispatch/positional-mode.d.ts.map +1 -0
- package/dist/dispatch/positional-mode.js +18 -0
- package/dist/dispatch/read-tracking-map.d.ts +28 -0
- package/dist/dispatch/read-tracking-map.d.ts.map +1 -0
- package/dist/dispatch/read-tracking-map.js +58 -0
- package/dist/dispatch/refuse-sibling-valve-flags.d.ts +30 -0
- package/dist/dispatch/refuse-sibling-valve-flags.d.ts.map +1 -0
- package/dist/dispatch/refuse-sibling-valve-flags.js +65 -0
- package/dist/dispatch/subverb-spec.d.ts +26 -0
- package/dist/dispatch/subverb-spec.d.ts.map +1 -0
- package/dist/dispatch/subverb-spec.js +1 -0
- package/dist/dispatch/undocumented-flag-reads.d.ts +22 -0
- package/dist/dispatch/undocumented-flag-reads.d.ts.map +1 -0
- package/dist/dispatch/undocumented-flag-reads.js +283 -0
- package/dist/dispatch/unknown-flag-refusal-mode.d.ts +13 -0
- package/dist/dispatch/unknown-flag-refusal-mode.d.ts.map +1 -0
- package/dist/dispatch/unknown-flag-refusal-mode.js +13 -0
- package/dist/dispatch/unknown-flag-refusal.d.ts +22 -0
- package/dist/dispatch/unknown-flag-refusal.d.ts.map +1 -0
- package/dist/dispatch/unknown-flag-refusal.js +57 -0
- package/dist/dispatch/unread-flags.d.ts +152 -0
- package/dist/dispatch/unread-flags.d.ts.map +1 -0
- package/dist/dispatch/unread-flags.js +295 -0
- package/dist/dispatch/verdict-valve-flag.d.ts +21 -0
- package/dist/dispatch/verdict-valve-flag.d.ts.map +1 -0
- package/dist/dispatch/verdict-valve-flag.js +21 -0
- package/dist/dispatch/walk-declared-subverbs.d.ts +14 -0
- package/dist/dispatch/walk-declared-subverbs.d.ts.map +1 -0
- package/dist/dispatch/walk-declared-subverbs.js +28 -0
- package/dist/exit-codes.d.ts +41 -3
- package/dist/exit-codes.d.ts.map +1 -1
- package/dist/exit-codes.js +153 -14
- package/dist/finish/run-finish.d.ts +72 -5
- package/dist/finish/run-finish.d.ts.map +1 -1
- package/dist/finish/run-finish.js +453 -104
- package/dist/gates/accepted-empty-note.d.ts +10 -0
- package/dist/gates/accepted-empty-note.d.ts.map +1 -0
- package/dist/gates/accepted-empty-note.js +11 -0
- package/dist/gates/allow-empty.d.ts +25 -0
- package/dist/gates/allow-empty.d.ts.map +1 -0
- package/dist/gates/allow-empty.js +27 -0
- package/dist/gates/asset-doctor-failing-units.d.ts +16 -0
- package/dist/gates/asset-doctor-failing-units.d.ts.map +1 -0
- package/dist/gates/asset-doctor-failing-units.js +14 -0
- package/dist/gates/asset-doctor-failure-line.d.ts +16 -0
- package/dist/gates/asset-doctor-failure-line.d.ts.map +1 -0
- package/dist/gates/asset-doctor-failure-line.js +28 -0
- package/dist/gates/empty-rule-advice-lines.d.ts +15 -0
- package/dist/gates/empty-rule-advice-lines.d.ts.map +1 -0
- package/dist/gates/empty-rule-advice-lines.js +20 -0
- package/dist/gates/gate-envelope.d.ts +85 -8
- package/dist/gates/gate-envelope.d.ts.map +1 -1
- package/dist/gates/gate-envelope.js +56 -7
- package/dist/gates/gate-rule-globs.d.ts +67 -0
- package/dist/gates/gate-rule-globs.d.ts.map +1 -0
- package/dist/gates/gate-rule-globs.js +139 -0
- package/dist/gates/gate-rule-view.d.ts +25 -6
- package/dist/gates/gate-rule-view.d.ts.map +1 -1
- package/dist/gates/gate-rule-view.js +105 -77
- package/dist/gates/i-coverage-dead-glob.d.ts +19 -0
- package/dist/gates/i-coverage-dead-glob.d.ts.map +1 -0
- package/dist/gates/i-coverage-dead-glob.js +1 -0
- package/dist/gates/i-coverage-negation.d.ts +13 -0
- package/dist/gates/i-coverage-negation.d.ts.map +1 -0
- package/dist/gates/i-coverage-negation.js +1 -0
- package/dist/gates/i-registration-query-settle-input.d.ts +18 -0
- package/dist/gates/i-registration-query-settle-input.d.ts.map +1 -0
- package/dist/gates/i-registration-query-settle-input.js +1 -0
- package/dist/gates/i-unit-state-note-row.d.ts +16 -0
- package/dist/gates/i-unit-state-note-row.d.ts.map +1 -0
- package/dist/gates/i-unit-state-note-row.js +1 -0
- package/dist/gates/i-unit-state-notes.d.ts +32 -0
- package/dist/gates/i-unit-state-notes.d.ts.map +1 -0
- package/dist/gates/i-unit-state-notes.js +1 -0
- package/dist/gates/incomplete-registry-inventory.d.ts +19 -0
- package/dist/gates/incomplete-registry-inventory.d.ts.map +1 -0
- package/dist/gates/incomplete-registry-inventory.js +63 -0
- package/dist/gates/measure-registration-roles.d.ts +10 -0
- package/dist/gates/measure-registration-roles.d.ts.map +1 -0
- package/dist/gates/measure-registration-roles.js +9 -0
- package/dist/gates/plane-verdict.d.ts +14 -0
- package/dist/gates/plane-verdict.d.ts.map +1 -0
- package/dist/gates/plane-verdict.js +22 -0
- package/dist/gates/qualify-clean-for-units.d.ts +12 -0
- package/dist/gates/qualify-clean-for-units.d.ts.map +1 -0
- package/dist/gates/qualify-clean-for-units.js +18 -0
- package/dist/gates/registration-graph-verdict.d.ts +34 -0
- package/dist/gates/registration-graph-verdict.d.ts.map +1 -0
- package/dist/gates/registration-graph-verdict.js +70 -0
- package/dist/gates/registration-roles.d.ts +9 -0
- package/dist/gates/registration-roles.d.ts.map +1 -0
- package/dist/gates/registration-roles.js +1 -0
- package/dist/gates/registry-liveness.d.ts +11 -0
- package/dist/gates/registry-liveness.d.ts.map +1 -0
- package/dist/gates/registry-liveness.js +13 -0
- package/dist/gates/rule-coverage.d.ts +225 -4
- package/dist/gates/rule-coverage.d.ts.map +1 -1
- package/dist/gates/rule-coverage.js +610 -43
- package/dist/gates/run-gate-planes.d.ts +58 -0
- package/dist/gates/run-gate-planes.d.ts.map +1 -0
- package/dist/gates/run-gate-planes.js +403 -0
- package/dist/gates/scaffold-selftest.d.ts +56 -0
- package/dist/gates/scaffold-selftest.d.ts.map +1 -0
- package/dist/gates/scaffold-selftest.js +119 -0
- package/dist/gates/seam-rejected-rules.d.ts +28 -0
- package/dist/gates/seam-rejected-rules.d.ts.map +1 -0
- package/dist/gates/seam-rejected-rules.js +95 -0
- package/dist/gates/self-test-check.d.ts +29 -0
- package/dist/gates/self-test-check.d.ts.map +1 -0
- package/dist/gates/self-test-check.js +1 -0
- package/dist/gates/self-test-subject.d.ts +28 -0
- package/dist/gates/self-test-subject.d.ts.map +1 -0
- package/dist/gates/self-test-subject.js +1 -0
- package/dist/gates/self-test.d.ts +20 -0
- package/dist/gates/self-test.d.ts.map +1 -0
- package/dist/gates/self-test.js +82 -0
- package/dist/gates/settle-verdict.d.ts +14 -0
- package/dist/gates/settle-verdict.d.ts.map +1 -0
- package/dist/gates/settle-verdict.js +13 -0
- package/dist/gates/settled-verdict.d.ts +8 -0
- package/dist/gates/settled-verdict.d.ts.map +1 -0
- package/dist/gates/settled-verdict.js +1 -0
- package/dist/gates/template-registry-coverage.d.ts +18 -0
- package/dist/gates/template-registry-coverage.d.ts.map +1 -0
- package/dist/gates/template-registry-coverage.js +24 -0
- package/dist/gates/unit-state-notes.d.ts +40 -0
- package/dist/gates/unit-state-notes.d.ts.map +1 -0
- package/dist/gates/unit-state-notes.js +71 -0
- package/dist/gates/verdict-line.d.ts +18 -0
- package/dist/gates/verdict-line.d.ts.map +1 -0
- package/dist/gates/verdict-line.js +40 -0
- package/dist/graph/graph-reuse-lookup.d.ts +10 -0
- package/dist/graph/graph-reuse-lookup.d.ts.map +1 -0
- package/dist/graph/graph-reuse-lookup.js +41 -0
- package/dist/graph/index-behind-hint.d.ts +11 -0
- package/dist/graph/index-behind-hint.d.ts.map +1 -0
- package/dist/graph/index-behind-hint.js +27 -0
- package/dist/knowledge/knowledge-stale-gate-flags.d.ts +3 -0
- package/dist/knowledge/knowledge-stale-gate-flags.d.ts.map +1 -0
- package/dist/knowledge/knowledge-stale-gate-flags.js +1 -0
- package/dist/knowledge/knowledge-stale-gate-input.d.ts +3 -0
- package/dist/knowledge/knowledge-stale-gate-input.d.ts.map +1 -0
- package/dist/knowledge/knowledge-stale-gate-input.js +1 -0
- package/dist/knowledge/knowledge-stale-gate-result.d.ts +3 -0
- package/dist/knowledge/knowledge-stale-gate-result.d.ts.map +1 -0
- package/dist/knowledge/knowledge-stale-gate-result.js +1 -0
- package/dist/knowledge/knowledge-stale-gate.d.ts +10 -0
- package/dist/knowledge/knowledge-stale-gate.d.ts.map +1 -0
- package/dist/knowledge/knowledge-stale-gate.js +9 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +204 -83
- package/dist/output/failure-hints.d.ts.map +1 -1
- package/dist/output/failure-hints.js +11 -9
- package/dist/output/rejected-entries-note.d.ts +57 -0
- package/dist/output/rejected-entries-note.d.ts.map +1 -0
- package/dist/output/rejected-entries-note.js +103 -0
- package/dist/output/stdout-is-pipe.d.ts +13 -0
- package/dist/output/stdout-is-pipe.d.ts.map +1 -0
- package/dist/output/stdout-is-pipe.js +21 -0
- package/dist/packs/stale-build-warning.d.ts +11 -0
- package/dist/packs/stale-build-warning.d.ts.map +1 -0
- package/dist/packs/stale-build-warning.js +23 -0
- package/dist/quality/run-quality.d.ts +123 -0
- package/dist/quality/run-quality.d.ts.map +1 -0
- package/dist/quality/run-quality.js +442 -0
- package/dist/schemas/json-schemas.d.ts +184 -3
- package/dist/schemas/json-schemas.d.ts.map +1 -1
- package/dist/schemas/json-schemas.js +113 -2
- package/dist/shrk.d.ts +3 -0
- package/dist/shrk.d.ts.map +1 -0
- package/dist/shrk.js +30 -0
- package/dist/surface/audience-applicability.d.ts +26 -0
- package/dist/surface/audience-applicability.d.ts.map +1 -0
- package/dist/surface/audience-applicability.js +60 -0
- package/dist/surface/catalog-command-safety.d.ts +18 -0
- package/dist/surface/catalog-command-safety.d.ts.map +1 -0
- package/dist/surface/catalog-command-safety.js +62 -0
- package/dist/surface/cli-command-resolver.d.ts +21 -0
- package/dist/surface/cli-command-resolver.d.ts.map +1 -0
- package/dist/surface/cli-command-resolver.js +87 -0
- package/dist/surface/command-dispatch-kind.d.ts +20 -0
- package/dist/surface/command-dispatch-kind.d.ts.map +1 -0
- package/dist/surface/command-dispatch-kind.js +20 -0
- package/dist/surface/command-index-entry.d.ts +40 -0
- package/dist/surface/command-index-entry.d.ts.map +1 -0
- package/dist/surface/command-index-entry.js +1 -0
- package/dist/surface/command-index.d.ts +77 -0
- package/dist/surface/command-index.d.ts.map +1 -0
- package/dist/surface/command-index.js +323 -0
- package/dist/surface/i-command-index.d.ts +22 -0
- package/dist/surface/i-command-index.d.ts.map +1 -0
- package/dist/surface/i-command-index.js +1 -0
- package/dist/surface/i-command-string-context.d.ts +20 -0
- package/dist/surface/i-command-string-context.d.ts.map +1 -0
- package/dist/surface/i-command-string-context.js +1 -0
- package/dist/surface/i-surface-denial.d.ts +13 -0
- package/dist/surface/i-surface-denial.d.ts.map +1 -0
- package/dist/surface/i-surface-denial.js +1 -0
- package/dist/surface/load-surface-context.d.ts +17 -1
- package/dist/surface/load-surface-context.d.ts.map +1 -1
- package/dist/surface/load-surface-context.js +48 -10
- package/dist/surface/not-enabled-error.d.ts +38 -4
- package/dist/surface/not-enabled-error.d.ts.map +1 -1
- package/dist/surface/not-enabled-error.js +96 -6
- package/dist/surface/profiles.d.ts +7 -0
- package/dist/surface/profiles.d.ts.map +1 -1
- package/dist/surface/resolve-command-string.d.ts +10 -0
- package/dist/surface/resolve-command-string.d.ts.map +1 -0
- package/dist/surface/resolve-command-string.js +572 -0
- package/dist/surface/surface-config-writer.d.ts +7 -2
- package/dist/surface/surface-config-writer.d.ts.map +1 -1
- package/dist/surface/surface-config-writer.js +25 -6
- package/dist/surface/surface-layer.d.ts +11 -0
- package/dist/surface/surface-layer.d.ts.map +1 -0
- package/dist/surface/surface-layer.js +11 -0
- package/dist/surface/surface-refusal-reason.d.ts +16 -0
- package/dist/surface/surface-refusal-reason.d.ts.map +1 -0
- package/dist/surface/surface-refusal-reason.js +16 -0
- package/dist/surface/surface-selector.d.ts +26 -0
- package/dist/surface/surface-selector.d.ts.map +1 -0
- package/dist/surface/surface-selector.js +42 -0
- package/dist/surface/surface-summary.d.ts +61 -18
- package/dist/surface/surface-summary.d.ts.map +1 -1
- package/dist/surface/surface-summary.js +147 -60
- package/dist/surface/tier.d.ts +85 -22
- package/dist/surface/tier.d.ts.map +1 -1
- package/dist/surface/tier.js +132 -30
- package/dist/usage/usage-log.d.ts +6 -1
- package/dist/usage/usage-log.d.ts.map +1 -1
- package/dist/usage/usage-log.js +7 -2
- package/dist/validation/run-validation-loop.d.ts +9 -0
- package/dist/validation/run-validation-loop.d.ts.map +1 -1
- package/dist/validation/run-validation-loop.js +14 -11
- package/dist/validation/typecheck-emitted.d.ts +8 -9
- package/dist/validation/typecheck-emitted.d.ts.map +1 -1
- package/dist/validation/typecheck-emitted.js +17 -97
- package/package.json +34 -34
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `shrk self-config resolve <id>` and `shrk self-config xrefs` — the lookup and
|
|
3
|
+
* listing verbs over THE declared cross-reference collector.
|
|
4
|
+
*
|
|
5
|
+
* Ids carry no namespace prefix, so "is this `related` id live, and what is
|
|
6
|
+
* it?" used to mean grepping several asset sources in turn. `resolve` answers
|
|
7
|
+
* it for one id: every registry that has it (most specific first, with the verb
|
|
8
|
+
* that shows it) and every declared field pointing at it. `xrefs` prints the
|
|
9
|
+
* extracted set — the contract `gates explain` honours for gate rules. Both are
|
|
10
|
+
* thin renderers: the answers come from `buildDeclaredXrefReport` and the
|
|
11
|
+
* reference registry, never from a walk of their own.
|
|
12
|
+
*/
|
|
13
|
+
import { ALL_ID_REFERENCE_KINDS, buildDeclaredXrefReport, DECLARED_XREF_FIELDS, declaredXrefSummaryLine, DeclaredXrefStatus, inspectSharkcraft, isBrokenXref, nearestIds, referenceIdPool, referenceKindsOf, reverseXrefs, } from '@shrkcrft/inspector';
|
|
14
|
+
import { flagBool, flagString, resolveCwd, } from "../command-registry.js";
|
|
15
|
+
import { ExitCode } from "../exit-codes.js";
|
|
16
|
+
import { asJson, header } from "../output/format-output.js";
|
|
17
|
+
/**
|
|
18
|
+
* The verb that shows an id of each kind. Every entry must resolve through the
|
|
19
|
+
* live command index (`r75-xrefs-cli.test.ts` locks it), so a renamed verb
|
|
20
|
+
* fails the day it is renamed instead of being printed as a dead command. A
|
|
21
|
+
* kind with no show / list verb is absent — never guessed.
|
|
22
|
+
*/
|
|
23
|
+
export const REFERENCE_KIND_VERBS = Object.freeze({
|
|
24
|
+
template: 'shrk templates get <id>',
|
|
25
|
+
pipeline: 'shrk pipelines get <id>',
|
|
26
|
+
playbook: 'shrk playbooks get <id>',
|
|
27
|
+
policy: 'shrk policy get <id>',
|
|
28
|
+
construct: 'shrk constructs get <id>',
|
|
29
|
+
helper: 'shrk helper get <id>',
|
|
30
|
+
'boundary-rule': 'shrk boundaries list',
|
|
31
|
+
'path-convention': 'shrk paths get <id>',
|
|
32
|
+
rule: 'shrk rules get <id>',
|
|
33
|
+
knowledge: 'shrk knowledge get <id>',
|
|
34
|
+
convention: 'shrk conventions get <id>',
|
|
35
|
+
'migration-profile': 'shrk profiles get <id>',
|
|
36
|
+
'registration-hint': 'shrk registrations get <id>',
|
|
37
|
+
'scaffold-pattern': 'shrk scaffolds get <id>',
|
|
38
|
+
});
|
|
39
|
+
function verbFor(kind, id) {
|
|
40
|
+
return REFERENCE_KIND_VERBS[kind]?.replace('<id>', id);
|
|
41
|
+
}
|
|
42
|
+
function rowLabel(r) {
|
|
43
|
+
return `${r.sourceKind}:${r.sourceId} ${r.field}${r.facetId ? ` [${r.facetId}]` : ''}`;
|
|
44
|
+
}
|
|
45
|
+
function statusText(r) {
|
|
46
|
+
switch (r.status) {
|
|
47
|
+
case DeclaredXrefStatus.Ok:
|
|
48
|
+
return `→ ${r.resolvedAs.join(' | ')}`;
|
|
49
|
+
case DeclaredXrefStatus.Dangling:
|
|
50
|
+
return `UNRESOLVED — no registry has this id${r.didYouMean.length > 0 ? ` (did you mean "${r.didYouMean[0]}"?)` : ''}`;
|
|
51
|
+
case DeclaredXrefStatus.WrongKind:
|
|
52
|
+
return `WRONG KIND — resolves as ${r.resolvedAs.join(' | ')}; the field accepts ${r.accepts === 'any' ? 'any kind' : r.accepts.join(' | ')}`;
|
|
53
|
+
default:
|
|
54
|
+
return 'NOT VERIFIED — its registry was not warmed, or is empty';
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export const selfConfigResolveCommand = {
|
|
58
|
+
name: 'resolve',
|
|
59
|
+
description: 'Which registry an id resolves in — every kind, most specific first, with the verb that shows it — and every declared cross-reference pointing at it; did-you-mean when it resolves nowhere. Exit 0 resolved · 1 unresolved · 3 no id.',
|
|
60
|
+
usage: 'shrk self-config resolve <id> [--json]',
|
|
61
|
+
booleanFlags: new Set(['json']),
|
|
62
|
+
async run(args) {
|
|
63
|
+
const id = args.positional[0];
|
|
64
|
+
if (!id) {
|
|
65
|
+
process.stderr.write('Usage: shrk self-config resolve <id> [--json]\n');
|
|
66
|
+
return ExitCode.UsageError;
|
|
67
|
+
}
|
|
68
|
+
const inspection = await inspectSharkcraft({ cwd: resolveCwd(args) });
|
|
69
|
+
// Warms every registry, so a construct / playbook id resolves like any other.
|
|
70
|
+
const report = await buildDeclaredXrefReport(inspection);
|
|
71
|
+
const kinds = referenceKindsOf(inspection, id);
|
|
72
|
+
const pointedAtBy = reverseXrefs(report, id);
|
|
73
|
+
const didYouMean = kinds.length === 0 ? nearestIds(id, referenceIdPool(inspection, ALL_ID_REFERENCE_KINDS)).map((n) => n.id) : [];
|
|
74
|
+
const exit = kinds.length > 0 ? ExitCode.VerifiedPass : ExitCode.Failure;
|
|
75
|
+
if (flagBool(args, 'json')) {
|
|
76
|
+
process.stdout.write(asJson({
|
|
77
|
+
id,
|
|
78
|
+
resolved: kinds.length > 0,
|
|
79
|
+
resolvedAs: kinds.map((kind) => ({ kind, ...(verbFor(kind, id) ? { verb: verbFor(kind, id) } : {}) })),
|
|
80
|
+
pointedAtBy: pointedAtBy.map((r) => ({
|
|
81
|
+
sourceKind: r.sourceKind,
|
|
82
|
+
sourceId: r.sourceId,
|
|
83
|
+
field: r.field,
|
|
84
|
+
...(r.facetId ? { facetId: r.facetId } : {}),
|
|
85
|
+
status: r.status,
|
|
86
|
+
...(r.file ? { file: r.file } : {}),
|
|
87
|
+
})),
|
|
88
|
+
didYouMean,
|
|
89
|
+
exitCode: exit,
|
|
90
|
+
}) + '\n');
|
|
91
|
+
return exit;
|
|
92
|
+
}
|
|
93
|
+
process.stdout.write(header(`Resolve: ${id}`));
|
|
94
|
+
if (kinds.length > 0) {
|
|
95
|
+
process.stdout.write(' resolves as (most specific first):\n');
|
|
96
|
+
for (const kind of kinds) {
|
|
97
|
+
const verb = verbFor(kind, id);
|
|
98
|
+
process.stdout.write(` • ${kind.padEnd(18)}${verb ? ` ${verb}` : ''}\n`);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
process.stdout.write(` UNRESOLVED — no registry has "${id}" (checked ${ALL_ID_REFERENCE_KINDS.length} kinds).\n`);
|
|
103
|
+
if (didYouMean.length > 0)
|
|
104
|
+
process.stdout.write(` did you mean: ${didYouMean.join(', ')}\n`);
|
|
105
|
+
}
|
|
106
|
+
process.stdout.write(`\n pointed at by (${pointedAtBy.length}):\n`);
|
|
107
|
+
if (pointedAtBy.length === 0)
|
|
108
|
+
process.stdout.write(' (no declared cross-reference names it)\n');
|
|
109
|
+
for (const r of pointedAtBy) {
|
|
110
|
+
process.stdout.write(` • ${rowLabel(r)}${r.status === DeclaredXrefStatus.Ok ? '' : ` (${r.status})`}${r.file ? ` — ${r.file}` : ''}\n`);
|
|
111
|
+
}
|
|
112
|
+
return exit;
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
/** The source kinds the collector walks — the only valid `--source <kind>:` prefixes. */
|
|
116
|
+
const SOURCE_KINDS = [...new Set(DECLARED_XREF_FIELDS.map((f) => f.sourceKind))];
|
|
117
|
+
export const selfConfigXrefsCommand = {
|
|
118
|
+
name: 'xrefs',
|
|
119
|
+
description: 'Every declared cross-reference id — knowledge related / seeAlso / supersededBy / action hints, construct related* + facets that declare resolvesAs, boundary related*, template related — with the namespace(s) it resolved into and its status. `--source <kind>:<id>` narrows to one asset, `--dangling-only` keeps the broken ones. Exit 0 (a listing); 3 on a malformed --source.',
|
|
120
|
+
usage: 'shrk self-config xrefs [--source <kind>:<id>] [--dangling-only] [--json]',
|
|
121
|
+
booleanFlags: new Set(['json', 'dangling-only']),
|
|
122
|
+
async run(args) {
|
|
123
|
+
let source;
|
|
124
|
+
if (args.flags.has('source')) {
|
|
125
|
+
const raw = flagString(args, 'source') ?? '';
|
|
126
|
+
const at = raw.indexOf(':');
|
|
127
|
+
const kind = at > 0 ? raw.slice(0, at) : '';
|
|
128
|
+
const id = at > 0 ? raw.slice(at + 1) : '';
|
|
129
|
+
if (!kind || !id || !SOURCE_KINDS.includes(kind)) {
|
|
130
|
+
process.stderr.write(`--source must be <kind>:<id> with <kind> one of: ${SOURCE_KINDS.join(', ')} (got "${raw}").\n`);
|
|
131
|
+
return ExitCode.UsageError;
|
|
132
|
+
}
|
|
133
|
+
source = { kind, id };
|
|
134
|
+
}
|
|
135
|
+
const danglingOnly = flagBool(args, 'dangling-only');
|
|
136
|
+
const inspection = await inspectSharkcraft({ cwd: resolveCwd(args) });
|
|
137
|
+
const report = await buildDeclaredXrefReport(inspection);
|
|
138
|
+
const inScope = (r) => !source || (r.sourceKind === source.kind && r.sourceId === source.id);
|
|
139
|
+
const rows = report.rows.filter((r) => inScope(r) && (!danglingOnly || isBrokenXref(r)));
|
|
140
|
+
const issues = report.issues.filter(inScope);
|
|
141
|
+
if (flagBool(args, 'json')) {
|
|
142
|
+
process.stdout.write(asJson({
|
|
143
|
+
schema: report.schema,
|
|
144
|
+
...(source ? { source: `${source.kind}:${source.id}` } : {}),
|
|
145
|
+
danglingOnly,
|
|
146
|
+
shown: rows.length,
|
|
147
|
+
counts: report.counts,
|
|
148
|
+
examined: report.examined,
|
|
149
|
+
rows,
|
|
150
|
+
issues,
|
|
151
|
+
}) + '\n');
|
|
152
|
+
return ExitCode.VerifiedPass;
|
|
153
|
+
}
|
|
154
|
+
const scope = source ? ` — ${source.kind}:${source.id}` : '';
|
|
155
|
+
process.stdout.write(header(`Declared cross-references${scope} (${rows.length})`));
|
|
156
|
+
process.stdout.write(` ${declaredXrefSummaryLine(report)}\n\n`);
|
|
157
|
+
if (rows.length === 0) {
|
|
158
|
+
process.stdout.write(` (${danglingOnly ? 'no dangling or wrong-kind id' : 'no declared cross-reference id'}${source ? ' on this asset' : ''})\n`);
|
|
159
|
+
}
|
|
160
|
+
for (const r of rows) {
|
|
161
|
+
process.stdout.write(` • ${rowLabel(r)} → ${r.targetId} ${statusText(r)}\n`);
|
|
162
|
+
}
|
|
163
|
+
if (issues.length > 0) {
|
|
164
|
+
process.stdout.write(`\n declaration issues (${issues.length}):\n`);
|
|
165
|
+
for (const i of issues)
|
|
166
|
+
process.stdout.write(` ${i.severity.padEnd(7)} [${i.code}] ${i.message}\n`);
|
|
167
|
+
}
|
|
168
|
+
return ExitCode.VerifiedPass;
|
|
169
|
+
},
|
|
170
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"self-config.command.d.ts","sourceRoot":"","sources":["../../src/commands/self-config.command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"self-config.command.d.ts","sourceRoot":"","sources":["../../src/commands/self-config.command.ts"],"names":[],"mappings":"AAyBA,OAAO,EAIL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AA+KhC,eAAO,MAAM,uBAAuB,EAAE,eA0CrC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,eA6BpC,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,eA2C1C,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,eAwDrC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,eAyC/B,CAAC"}
|
|
@@ -4,50 +4,185 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
6
6
|
import * as nodePath from 'node:path';
|
|
7
|
-
import {
|
|
7
|
+
import { DEAD_SELECTOR_CAUSES, UnitLivenessState } from '@shrkcrft/core';
|
|
8
|
+
import { assetDoctorProposedExit, buildDeclaredXrefReport, buildSelfConfigDoctorReportV2, buildSelfConfigGraph, declaredXrefCoverage, inspectSharkcraft, isUnresolvedReferenceFinding, isWrongKindReferenceFinding, SelfConfigSeverityV2, withDeclaredXrefEdges, projectSelfConfigDoctorV2ToV1, renderSelfConfigDoctorMarkdown, renderSelfConfigDoctorText, renderSelfConfigDoctorV2Markdown, renderSelfConfigDoctorV2Text, } from '@shrkcrft/inspector';
|
|
8
9
|
import { flagBool, flagString, resolveCwd, } from "../command-registry.js";
|
|
10
|
+
import { PositionalMode } from "../dispatch/positional-mode.js";
|
|
9
11
|
import { asJson } from "../output/format-output.js";
|
|
12
|
+
import { ALLOW_EMPTY_FLAG, allowEmptyValve } from "../gates/allow-empty.js";
|
|
13
|
+
import { assetDoctorFailingUnits } from "../gates/asset-doctor-failing-units.js";
|
|
14
|
+
import { assetDoctorFailureLine } from "../gates/asset-doctor-failure-line.js";
|
|
15
|
+
import { warmCliReferenceRegistries } from "../surface/cli-command-resolver.js";
|
|
16
|
+
import { settleVerdict } from "../gates/settle-verdict.js";
|
|
17
|
+
import { verdictLine } from "../gates/verdict-line.js";
|
|
18
|
+
import { selfConfigResolveCommand, selfConfigXrefsCommand } from "./self-config-xrefs.command.js";
|
|
19
|
+
/**
|
|
20
|
+
* The self-config graph plus one edge per declared cross-reference id, from THE
|
|
21
|
+
* collector the doctor reads — so `graph`, `broken-links` and `report` show the
|
|
22
|
+
* same dangling ids as `doctor` (the v1 graph alone saw only file references).
|
|
23
|
+
*/
|
|
24
|
+
async function selfConfigGraphWithXrefs(inspection) {
|
|
25
|
+
const xrefs = await buildDeclaredXrefReport(inspection);
|
|
26
|
+
const base = await buildSelfConfigGraph(inspection);
|
|
27
|
+
return { graph: withDeclaredXrefEdges(base, xrefs), base, xrefs };
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* THE coverage `self-config broken-links` settles on (round 11 review
|
|
31
|
+
* R11-GAP-4): the references it examined of the references declared — every
|
|
32
|
+
* file reference of the graph (each checked on disk) plus every declared
|
|
33
|
+
* cross-reference id (`declaredXrefCoverage`: one that could not be looked up
|
|
34
|
+
* is unexamined). Nothing declared is `expected: 0` — NOT VERIFIED (2) unless
|
|
35
|
+
* `--allow-empty` accepts it, as every sibling doctor settles "nothing to
|
|
36
|
+
* examine". It used to settle against NO record over an empty config and print
|
|
37
|
+
* "No broken references. ✓" at 0.
|
|
38
|
+
*/
|
|
39
|
+
function brokenLinksCoverage(base, xrefs, args) {
|
|
40
|
+
const ids = declaredXrefCoverage(xrefs);
|
|
41
|
+
const fileRefs = base.edges.filter((e) => e.to.kind === 'file').length;
|
|
42
|
+
const expected = fileRefs + ids.expected;
|
|
43
|
+
return {
|
|
44
|
+
unit: 'references',
|
|
45
|
+
expected,
|
|
46
|
+
examined: fileRefs + ids.examined,
|
|
47
|
+
...(ids.unexamined !== undefined
|
|
48
|
+
? { unexamined: ids.unexamined, unexaminedTotal: ids.unexaminedTotal ?? ids.unexamined.length, reason: ids.reason ?? 'not examined' }
|
|
49
|
+
: {}),
|
|
50
|
+
...(expected === 0 ? { reason: 'no file reference and no declared cross-reference id to examine' } : {}),
|
|
51
|
+
...allowEmptyValve(args, expected),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/** The shared dead-selector valve (boundary, gate and asset planes spell it the same). */
|
|
55
|
+
const FAIL_ON_DEAD_UNITS_FLAG = 'fail-on-dead-units';
|
|
56
|
+
const DOCTOR_FLAGS = new Set(['json', 'strict', FAIL_ON_DEAD_UNITS_FLAG]);
|
|
57
|
+
/**
|
|
58
|
+
* THE self-config verdict — one settle for `--schema v1` and v2 alike (v1 is a
|
|
59
|
+
* projection of the same report), for `self-config doctor` and `self-config
|
|
60
|
+
* report`, through THE asset-doctor proposal MCP `get_self_config_doctor`
|
|
61
|
+
* reads too (round 13): 1 on errors, on warnings under `--strict`, or on a
|
|
62
|
+
* settled selector unit THE `--fail-on-dead-units` predicate fails (a dead
|
|
63
|
+
* unit, or a stale LOCAL expectEmpty marker); else 0. The engine's coverage
|
|
64
|
+
* (command strings, tuning keys + triggers, routing hints + their ids,
|
|
65
|
+
* registration discovery, scaffold globs) settles it: a dead or unverifiable
|
|
66
|
+
* unit turns 0 into 2, never a pass; an intended-empty unit is a printed
|
|
67
|
+
* acceptance.
|
|
68
|
+
*/
|
|
69
|
+
function settleSelfConfig(report, args) {
|
|
70
|
+
const proposed = assetDoctorProposedExit({ errors: report.totals.error, warnings: report.totals.warning, units: report.selectorUnits }, { strict: flagBool(args, 'strict'), failOnDeadUnits: flagBool(args, FAIL_ON_DEAD_UNITS_FLAG) });
|
|
71
|
+
return settleVerdict(proposed, report.coverage);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* THE units that fail the self-config verdict (round 13 review) — the
|
|
75
|
+
* predicate `settleSelfConfig` proposes from — so the verbs can say why a
|
|
76
|
+
* `--fail-on-dead-units` run exited 1 (its header read `verdict OK` and no line
|
|
77
|
+
* named the failure).
|
|
78
|
+
*/
|
|
79
|
+
function selfConfigFailing(report, args) {
|
|
80
|
+
return assetDoctorFailingUnits(report.selectorUnits, {
|
|
81
|
+
failOnDeadUnits: flagBool(args, FAIL_ON_DEAD_UNITS_FLAG),
|
|
82
|
+
strict: flagBool(args, 'strict'),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/** The settled verdict's fields on `--json` — the vocabulary the sibling doctors use (`verdict` stays the report's own). */
|
|
86
|
+
function settledJson(settled, failing = []) {
|
|
87
|
+
return {
|
|
88
|
+
exitCode: settled.exit,
|
|
89
|
+
settledVerdict: settled.verdict,
|
|
90
|
+
shortfalls: settled.shortfalls,
|
|
91
|
+
accepted: settled.accepted,
|
|
92
|
+
failingUnits: failing.map((u) => ({ list: u.list, unit: u.unit, state: u.state, message: u.message })),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* What the command probes did NOT prove, said out loud in the clean line: a
|
|
97
|
+
* `prefix-only` tail (verb proven, internally-dispatched tail not) and a
|
|
98
|
+
* `not-shrk` string (never checked — narrowed out of the coverage) are not
|
|
99
|
+
* "resolved".
|
|
100
|
+
*/
|
|
101
|
+
function commandProbeCaveats(report) {
|
|
102
|
+
const c = report.probes.command;
|
|
103
|
+
const parts = [];
|
|
104
|
+
if (c.prefixOnly > 0)
|
|
105
|
+
parts.push(`${c.prefixOnly} prefix-only tail(s) unproven`);
|
|
106
|
+
if (c.notShrk > 0)
|
|
107
|
+
parts.push(`${c.notShrk} non-shrk command string(s) not checked`);
|
|
108
|
+
return parts.length > 0 ? ` (${parts.join('; ')})` : '';
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The exit-0 sentence. "every checked probe resolved ✓" is printed only when
|
|
112
|
+
* it is true: an INFO-severity unresolved reference (a routing / registration
|
|
113
|
+
* hint's related id, a convention's applicability profile id, a pipeline step
|
|
114
|
+
* reference — THE doctor's `isUnresolvedReferenceFinding`) never fails the
|
|
115
|
+
* run, but it is not "resolved", so it is counted instead of certified. So is
|
|
116
|
+
* an info-severity WRONG-KIND reference (`isWrongKindReferenceFinding`: a
|
|
117
|
+
* pipeline step naming a construct) — it resolves, but not as its field
|
|
118
|
+
* accepts (round 12, 12.4 split it out of `pipeline-reference-missing`).
|
|
119
|
+
*/
|
|
120
|
+
function cleanSentence(report) {
|
|
121
|
+
const caveats = commandProbeCaveats(report);
|
|
122
|
+
const info = report.findings.filter((f) => f.severity === SelfConfigSeverityV2.Info);
|
|
123
|
+
const unresolvedInfo = info.filter(isUnresolvedReferenceFinding).length;
|
|
124
|
+
const wrongKindInfo = info.filter(isWrongKindReferenceFinding).length;
|
|
125
|
+
// A stale LOCAL expectEmpty marker is not "resolved" either (round 13): it is
|
|
126
|
+
// counted, never certified (a pack's is INFO — the consumer cannot edit it).
|
|
127
|
+
const staleMarkers = report.selectorUnits.filter((u) => u.state === UnitLivenessState.WentLive && u.mark?.packageName === undefined).length;
|
|
128
|
+
const reported = [
|
|
129
|
+
...(report.totals.warning > 0 ? [`${report.totals.warning} warning(s)`] : []),
|
|
130
|
+
...(unresolvedInfo > 0 ? [`${unresolvedInfo} unresolved reference(s)`] : []),
|
|
131
|
+
...(wrongKindInfo > 0 ? [`${wrongKindInfo} wrong-kind reference(s)`] : []),
|
|
132
|
+
...(staleMarkers > 0 ? [`${staleMarkers} stale expectEmpty marker(s)`] : []),
|
|
133
|
+
];
|
|
134
|
+
if (reported.length === 0)
|
|
135
|
+
return `No cross-reference issues — every checked probe resolved${caveats}. ✓`;
|
|
136
|
+
const where = report.totals.warning > 0 ? 'reported above' : 'reported as info above';
|
|
137
|
+
const listed = reported.length > 1 ? `${reported.slice(0, -1).join(', ')} and ${reported[reported.length - 1]}` : reported[0];
|
|
138
|
+
return `No blocking cross-reference issues${caveats} — ${listed} ${where}.`;
|
|
139
|
+
}
|
|
140
|
+
async function buildDoctorReport(args) {
|
|
141
|
+
const cwd = resolveCwd(args);
|
|
142
|
+
const inspection = await inspectSharkcraft({ cwd });
|
|
143
|
+
// Warm WITH the command resolver so every prescribed command string resolves
|
|
144
|
+
// against the live command index — for both schemas.
|
|
145
|
+
await warmCliReferenceRegistries(inspection);
|
|
146
|
+
return { cwd, inspection, report: await buildSelfConfigDoctorReportV2(inspection) };
|
|
147
|
+
}
|
|
10
148
|
export const selfConfigDoctorCommand = {
|
|
11
149
|
name: 'doctor',
|
|
12
|
-
description: 'Self-config cross-reference doctor — validates the graph of refs. Defaults to v2 schema; pass --schema v1 for the legacy shape.',
|
|
13
|
-
usage: 'shrk self-config doctor [--schema v1|v2] [--format text|markdown|json] [--strict]',
|
|
150
|
+
description: 'Self-config cross-reference doctor — validates the graph of refs, with per-unit coverage (exit 0 pass · 1 errors · 2 a dead or unverified unit). Defaults to v2 schema; pass --schema v1 for the legacy shape (same checks).',
|
|
151
|
+
usage: 'shrk self-config doctor [--schema v1|v2] [--format text|markdown|json] [--strict] [--fail-on-dead-units]',
|
|
152
|
+
booleanFlags: DOCTOR_FLAGS,
|
|
14
153
|
async run(args) {
|
|
15
|
-
const cwd = resolveCwd(args);
|
|
16
|
-
const inspection = await inspectSharkcraft({ cwd });
|
|
17
|
-
const strict = flagBool(args, 'strict');
|
|
18
154
|
const format = flagString(args, 'format') ?? 'text';
|
|
19
155
|
const wantJson = flagBool(args, 'json') || format === 'json';
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if (wantJson) {
|
|
25
|
-
process.stdout.write(asJson(report) + '\n');
|
|
26
|
-
}
|
|
27
|
-
else if (format === 'markdown') {
|
|
28
|
-
process.stdout.write(renderSelfConfigDoctorMarkdown(report));
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
process.stdout.write(renderSelfConfigDoctorText(report));
|
|
32
|
-
}
|
|
33
|
-
if (strict && (report.verdict === 'warnings' || report.verdict === 'errors'))
|
|
34
|
-
return 1;
|
|
35
|
-
return report.verdict === 'errors' ? 1 : 0;
|
|
36
|
-
}
|
|
37
|
-
// Default: v2 graph validation.
|
|
38
|
-
const report = await buildSelfConfigDoctorReportV2(inspection);
|
|
156
|
+
const useV1 = flagString(args, 'schema') === 'v1';
|
|
157
|
+
const { report } = await buildDoctorReport(args);
|
|
158
|
+
const settled = settleSelfConfig(report, args);
|
|
159
|
+
const failing = selfConfigFailing(report, args);
|
|
39
160
|
if (wantJson) {
|
|
40
|
-
|
|
161
|
+
const payload = useV1 ? projectSelfConfigDoctorV2ToV1(report) : report;
|
|
162
|
+
process.stdout.write(asJson({ ...payload, ...settledJson(settled, failing) }) + '\n');
|
|
163
|
+
return settled.exit;
|
|
41
164
|
}
|
|
42
|
-
|
|
43
|
-
|
|
165
|
+
if (useV1) {
|
|
166
|
+
const v1 = projectSelfConfigDoctorV2ToV1(report);
|
|
167
|
+
process.stdout.write(format === 'markdown' ? renderSelfConfigDoctorMarkdown(v1) : renderSelfConfigDoctorText(v1));
|
|
44
168
|
}
|
|
45
169
|
else {
|
|
46
|
-
process.stdout.write(renderSelfConfigDoctorV2Text(report));
|
|
170
|
+
process.stdout.write(format === 'markdown' ? renderSelfConfigDoctorV2Markdown(report) : renderSelfConfigDoctorV2Text(report));
|
|
47
171
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
172
|
+
const line = verdictLine(settled, cleanSentence(report));
|
|
173
|
+
if (line)
|
|
174
|
+
process.stdout.write(line + '\n');
|
|
175
|
+
// Round 13 review: a 1 from --fail-on-dead-units names its units — the
|
|
176
|
+
// header above reads the REPORT's own verdict (`verdict OK`).
|
|
177
|
+
if (settled.exit === 1) {
|
|
178
|
+
const failure = assetDoctorFailureLine('self-config doctor', failing);
|
|
179
|
+
if (failure)
|
|
180
|
+
process.stdout.write(failure + '\n');
|
|
181
|
+
}
|
|
182
|
+
if (settled.exit !== 0 && report.deadUnits.length > 0 && !flagBool(args, FAIL_ON_DEAD_UNITS_FLAG)) {
|
|
183
|
+
process.stdout.write(`Fix each dead unit (${report.deadUnits.length}) — ${DEAD_SELECTOR_CAUSES}; pass --${FAIL_ON_DEAD_UNITS_FLAG} to fail on them.\n`);
|
|
184
|
+
}
|
|
185
|
+
return settled.exit;
|
|
51
186
|
},
|
|
52
187
|
};
|
|
53
188
|
export const selfConfigGraphCommand = {
|
|
@@ -57,7 +192,7 @@ export const selfConfigGraphCommand = {
|
|
|
57
192
|
async run(args) {
|
|
58
193
|
const cwd = resolveCwd(args);
|
|
59
194
|
const inspection = await inspectSharkcraft({ cwd });
|
|
60
|
-
const graph = await
|
|
195
|
+
const { graph } = await selfConfigGraphWithXrefs(inspection);
|
|
61
196
|
const format = flagString(args, 'format') ?? 'json';
|
|
62
197
|
if (format === 'mermaid') {
|
|
63
198
|
const lines = ['graph TD'];
|
|
@@ -82,63 +217,120 @@ export const selfConfigGraphCommand = {
|
|
|
82
217
|
};
|
|
83
218
|
export const selfConfigBrokenLinksCommand = {
|
|
84
219
|
name: 'broken-links',
|
|
85
|
-
description: 'List only the broken (
|
|
86
|
-
usage: 'shrk self-config broken-links [--json]',
|
|
220
|
+
description: 'List only the broken references — missing referenced files AND every dangling / wrong-kind declared cross-reference id (the rows `self-config doctor` reports). Exit 0 none · 1 broken · 2 an id could not be looked up, or nothing to examine (--allow-empty accepts that).',
|
|
221
|
+
usage: 'shrk self-config broken-links [--allow-empty] [--json]',
|
|
222
|
+
booleanFlags: new Set(['json', ALLOW_EMPTY_FLAG]),
|
|
87
223
|
async run(args) {
|
|
88
224
|
const cwd = resolveCwd(args);
|
|
89
225
|
const inspection = await inspectSharkcraft({ cwd });
|
|
90
|
-
const graph = await
|
|
226
|
+
const { graph, base, xrefs } = await selfConfigGraphWithXrefs(inspection);
|
|
227
|
+
// Always settled against what was examined: an id that could not be looked
|
|
228
|
+
// up, or nothing to examine at all, is never "no broken references".
|
|
229
|
+
const coverage = brokenLinksCoverage(base, xrefs, args);
|
|
230
|
+
const settled = settleVerdict(graph.brokenEdges.length === 0 ? 0 : 1, [coverage]);
|
|
91
231
|
if (flagBool(args, 'json')) {
|
|
92
|
-
process.stdout.write(asJson({
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
232
|
+
process.stdout.write(asJson({
|
|
233
|
+
brokenEdges: graph.brokenEdges,
|
|
234
|
+
coverage,
|
|
235
|
+
exitCode: settled.exit,
|
|
236
|
+
verdict: settled.verdict,
|
|
237
|
+
shortfalls: settled.shortfalls,
|
|
238
|
+
accepted: settled.accepted,
|
|
239
|
+
}) + '\n');
|
|
240
|
+
return settled.exit;
|
|
98
241
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
242
|
+
if (graph.brokenEdges.length > 0) {
|
|
243
|
+
process.stdout.write(`=== Broken self-config references (${graph.brokenEdges.length}) ===\n`);
|
|
244
|
+
for (const e of graph.brokenEdges.slice(0, 100)) {
|
|
245
|
+
process.stdout.write(` • ${e.from.kind}:${e.from.id} -> ${e.to.kind}:${e.to.id} (${e.relation})\n`);
|
|
246
|
+
}
|
|
102
247
|
}
|
|
103
|
-
|
|
248
|
+
const line = verdictLine(settled, 'No broken references. ✓', coverage.expected === 0
|
|
249
|
+
? `NOT VERIFIED — nothing to examine: no file reference and no declared cross-reference id. Pass --${ALLOW_EMPTY_FLAG} to accept that.`
|
|
250
|
+
: undefined);
|
|
251
|
+
if (line)
|
|
252
|
+
process.stdout.write(line + '\n');
|
|
253
|
+
return settled.exit;
|
|
104
254
|
},
|
|
105
255
|
};
|
|
106
256
|
export const selfConfigReportCommand = {
|
|
107
257
|
name: 'report',
|
|
108
|
-
description: 'Write the self-config doctor + graph reports under .sharkcraft/reports
|
|
109
|
-
usage: 'shrk self-config report [--output <dir>]',
|
|
258
|
+
description: 'Write the self-config doctor + graph reports under .sharkcraft/reports/, and settle the doctor verdict (exit 0 pass · 1 errors · 2 a dead or unverified unit), the same as `self-config doctor`.',
|
|
259
|
+
usage: 'shrk self-config report [--schema v1|v2] [--output <dir>] [--strict] [--fail-on-dead-units] [--json]',
|
|
260
|
+
booleanFlags: DOCTOR_FLAGS,
|
|
110
261
|
async run(args) {
|
|
111
|
-
const
|
|
112
|
-
const inspection = await
|
|
113
|
-
const
|
|
114
|
-
const useV1 = schemaArg === 'v1';
|
|
115
|
-
const graph = await buildSelfConfigGraph(inspection);
|
|
262
|
+
const useV1 = flagString(args, 'schema') === 'v1';
|
|
263
|
+
const { cwd, inspection, report } = await buildDoctorReport(args);
|
|
264
|
+
const { graph } = await selfConfigGraphWithXrefs(inspection);
|
|
116
265
|
const outArg = flagString(args, 'output');
|
|
117
266
|
const outDir = outArg
|
|
118
267
|
? (nodePath.isAbsolute(outArg) ? outArg : nodePath.resolve(cwd, outArg))
|
|
119
268
|
: nodePath.join(cwd, '.sharkcraft', 'reports');
|
|
120
269
|
mkdirSync(outDir, { recursive: true });
|
|
121
270
|
const base = 'self-config-doctor';
|
|
271
|
+
const settled = settleSelfConfig(report, args);
|
|
122
272
|
if (useV1) {
|
|
123
|
-
const
|
|
273
|
+
const v1 = projectSelfConfigDoctorV2ToV1(report);
|
|
274
|
+
writeFileSync(nodePath.join(outDir, `${base}.json`), JSON.stringify(v1, null, 2) + '\n', 'utf8');
|
|
275
|
+
writeFileSync(nodePath.join(outDir, `${base}.md`), renderSelfConfigDoctorMarkdown(v1), 'utf8');
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
124
278
|
writeFileSync(nodePath.join(outDir, `${base}.json`), JSON.stringify(report, null, 2) + '\n', 'utf8');
|
|
125
|
-
writeFileSync(nodePath.join(outDir, `${base}.md`),
|
|
126
|
-
writeFileSync(nodePath.join(outDir, `${base}-graph.json`), JSON.stringify(graph, null, 2) + '\n', 'utf8');
|
|
127
|
-
process.stdout.write(`Wrote ${nodePath.relative(cwd, outDir)}/${base}.{json,md} (v1) and ${base}-graph.json\n`);
|
|
128
|
-
return report.verdict === 'errors' ? 1 : 0;
|
|
279
|
+
writeFileSync(nodePath.join(outDir, `${base}.md`), renderSelfConfigDoctorV2Markdown(report), 'utf8');
|
|
129
280
|
}
|
|
130
|
-
const report = await buildSelfConfigDoctorReportV2(inspection);
|
|
131
|
-
writeFileSync(nodePath.join(outDir, `${base}.json`), JSON.stringify(report, null, 2) + '\n', 'utf8');
|
|
132
|
-
writeFileSync(nodePath.join(outDir, `${base}.md`), renderSelfConfigDoctorV2Markdown(report), 'utf8');
|
|
133
281
|
writeFileSync(nodePath.join(outDir, `${base}-graph.json`), JSON.stringify(graph, null, 2) + '\n', 'utf8');
|
|
134
|
-
|
|
135
|
-
|
|
282
|
+
if (flagBool(args, 'json')) {
|
|
283
|
+
// The same settled fields as `self-config doctor --json` (round 13): a
|
|
284
|
+
// registered verdict verb, so its 2 survives a pipe and a bad flag is 3.
|
|
285
|
+
const rel = (name) => nodePath.relative(cwd, nodePath.join(outDir, name)) || name;
|
|
286
|
+
process.stdout.write(asJson({
|
|
287
|
+
written: [rel(`${base}.json`), rel(`${base}.md`), rel(`${base}-graph.json`)],
|
|
288
|
+
schema: useV1 ? 'v1' : 'v2',
|
|
289
|
+
verdict: report.verdict,
|
|
290
|
+
...settledJson(settled, selfConfigFailing(report, args)),
|
|
291
|
+
}) + '\n');
|
|
292
|
+
return settled.exit;
|
|
293
|
+
}
|
|
294
|
+
process.stdout.write(`Wrote ${nodePath.relative(cwd, outDir)}/${base}.{json,md} (${useV1 ? 'v1' : 'v2'}) and ${base}-graph.json\n`);
|
|
295
|
+
const line = verdictLine(settled, cleanSentence(report));
|
|
296
|
+
if (line)
|
|
297
|
+
process.stdout.write(line + '\n');
|
|
298
|
+
// Round 13 review: a 1 from --fail-on-dead-units names its units.
|
|
299
|
+
if (settled.exit === 1) {
|
|
300
|
+
const failure = assetDoctorFailureLine('self-config report', selfConfigFailing(report, args));
|
|
301
|
+
if (failure)
|
|
302
|
+
process.stdout.write(failure + '\n');
|
|
303
|
+
}
|
|
304
|
+
return settled.exit;
|
|
136
305
|
},
|
|
137
306
|
};
|
|
138
307
|
export const selfConfigCommand = {
|
|
139
308
|
name: 'self-config',
|
|
309
|
+
positionals: PositionalMode.None,
|
|
310
|
+
subverbs: [
|
|
311
|
+
{
|
|
312
|
+
name: 'doctor',
|
|
313
|
+
description: 'Cross-reference doctor over the self-config + pack contributions.',
|
|
314
|
+
usage: 'shrk self-config doctor [--schema v1|v2] [--format text|markdown|json] [--strict] [--fail-on-dead-units] [--json]',
|
|
315
|
+
},
|
|
316
|
+
{ name: 'graph', description: 'The self-config reference graph.', usage: 'shrk self-config graph [--dangling-only] [--json]' },
|
|
317
|
+
{
|
|
318
|
+
name: 'broken-links',
|
|
319
|
+
description: 'References that resolve to nothing (exit 2 when nothing could be examined; --allow-empty accepts that).',
|
|
320
|
+
usage: 'shrk self-config broken-links [--allow-empty] [--json]',
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
name: 'report',
|
|
324
|
+
description: 'Write the self-config report, settling the doctor verdict (exit 0 pass · 1 errors · 2 a dead or unverified unit).',
|
|
325
|
+
usage: 'shrk self-config report [--schema v1|v2] [--output <dir>] [--strict] [--fail-on-dead-units] [--json]',
|
|
326
|
+
},
|
|
327
|
+
{ name: 'resolve', description: 'Resolve one id across every kind.', usage: 'shrk self-config resolve <id> [--json]', positionals: PositionalMode.Free },
|
|
328
|
+
{ name: 'xrefs', description: 'Declared cross-references between assets.', usage: 'shrk self-config xrefs [--json]' },
|
|
329
|
+
],
|
|
140
330
|
description: 'Cross-reference doctor over SharkCraft self-config + pack contributions.',
|
|
141
|
-
usage: 'shrk self-config doctor|graph|broken-links|report ...',
|
|
331
|
+
usage: 'shrk self-config doctor|graph|broken-links|report|resolve|xrefs ...',
|
|
332
|
+
// The group parses every subverb's argv, so the subverbs' boolean flags live here too.
|
|
333
|
+
booleanFlags: new Set([...DOCTOR_FLAGS, 'dangling-only', ALLOW_EMPTY_FLAG]),
|
|
142
334
|
async run(args) {
|
|
143
335
|
const sub = args.positional[0];
|
|
144
336
|
args.positional = args.positional.slice(1);
|
|
@@ -150,7 +342,11 @@ export const selfConfigCommand = {
|
|
|
150
342
|
return selfConfigBrokenLinksCommand.run(args);
|
|
151
343
|
if (sub === 'report')
|
|
152
344
|
return selfConfigReportCommand.run(args);
|
|
153
|
-
|
|
345
|
+
if (sub === 'resolve')
|
|
346
|
+
return selfConfigResolveCommand.run(args);
|
|
347
|
+
if (sub === 'xrefs')
|
|
348
|
+
return selfConfigXrefsCommand.run(args);
|
|
349
|
+
process.stderr.write('Usage: shrk self-config doctor|graph|broken-links|report|resolve|xrefs ...\n');
|
|
154
350
|
return 2;
|
|
155
351
|
},
|
|
156
352
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smart-context.command.d.ts","sourceRoot":"","sources":["../../src/commands/smart-context.command.ts"],"names":[],"mappings":"AA2BA,OAAO,EAML,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"smart-context.command.d.ts","sourceRoot":"","sources":["../../src/commands/smart-context.command.ts"],"names":[],"mappings":"AA2BA,OAAO,EAML,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAqGhC,eAAO,MAAM,mBAAmB,EAAE,eAwQjC,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,4BAA4B,EAAE,eAsF1C,CAAC;AAEF,sDAAsD;AACtD,eAAO,MAAM,uBAAuB,EAAE,eAwBrC,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,uBAAuB,EAAE,eAkCrC,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,iCAAiC,EAAE,eAsH/C,CAAC;AA2JF;;;;;;;GAOG;AACH,eAAO,MAAM,iCAAiC,EAAE,eAwH/C,CAAC;AA2JF;;;;;;GAMG;AACH,eAAO,MAAM,iCAAiC,EAAE,eAgG/C,CAAC;AAyPF,4EAA4E;AAC5E,eAAO,MAAM,kCAAkC,EAAE,eA4HhD,CAAC;AAMF,iFAAiF;AACjF,eAAO,MAAM,mCAAmC,EAAE,eAsCjD,CAAC;AAqJF,UAAU,eAAe;IACvB,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,kFAAkF;IAClF,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,uFAAuF;IACvF,SAAS,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,EAAE,eAAe,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAWzF"}
|