@shrkcrft/cli 0.1.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +15 -0
- package/dist/asset-preview/apply-action-hint-stub.d.ts +28 -0
- package/dist/asset-preview/apply-action-hint-stub.d.ts.map +1 -0
- package/dist/asset-preview/apply-action-hint-stub.js +170 -0
- package/dist/asset-preview/apply-asset-preview.d.ts +31 -0
- package/dist/asset-preview/apply-asset-preview.d.ts.map +1 -0
- package/dist/asset-preview/apply-asset-preview.js +210 -0
- package/dist/asset-preview/apply-knowledge-stale-fix.d.ts +37 -0
- package/dist/asset-preview/apply-knowledge-stale-fix.d.ts.map +1 -0
- package/dist/asset-preview/apply-knowledge-stale-fix.js +344 -0
- package/dist/asset-preview/apply-missing-barrel.d.ts +15 -0
- package/dist/asset-preview/apply-missing-barrel.d.ts.map +1 -0
- package/dist/asset-preview/apply-missing-barrel.js +65 -0
- package/dist/asset-preview/apply-template-drift-fix.d.ts +21 -0
- package/dist/asset-preview/apply-template-drift-fix.d.ts.map +1 -0
- package/dist/asset-preview/apply-template-drift-fix.js +125 -0
- package/dist/asset-preview/apply-template-update.d.ts +43 -0
- package/dist/asset-preview/apply-template-update.d.ts.map +1 -0
- package/dist/asset-preview/apply-template-update.js +257 -0
- package/dist/asset-preview/entry-mutator.d.ts +106 -0
- package/dist/asset-preview/entry-mutator.d.ts.map +1 -0
- package/dist/asset-preview/entry-mutator.js +428 -0
- package/dist/authoring/authoring-kit.d.ts +36 -0
- package/dist/authoring/authoring-kit.d.ts.map +1 -0
- package/dist/authoring/authoring-kit.js +106 -0
- package/dist/command-registry.d.ts +158 -0
- package/dist/command-registry.d.ts.map +1 -0
- package/dist/command-registry.js +348 -0
- package/dist/commands/apply.command.d.ts +3 -0
- package/dist/commands/apply.command.d.ts.map +1 -0
- package/dist/commands/apply.command.js +879 -0
- package/dist/commands/architecture.command.d.ts +5 -0
- package/dist/commands/architecture.command.d.ts.map +1 -0
- package/dist/commands/architecture.command.js +141 -0
- package/dist/commands/ask.command.d.ts +3 -0
- package/dist/commands/ask.command.d.ts.map +1 -0
- package/dist/commands/ask.command.js +58 -0
- package/dist/commands/audit.command.d.ts +3 -0
- package/dist/commands/audit.command.d.ts.map +1 -0
- package/dist/commands/audit.command.js +141 -0
- package/dist/commands/biome.command.d.ts +7 -0
- package/dist/commands/biome.command.d.ts.map +1 -0
- package/dist/commands/biome.command.js +350 -0
- package/dist/commands/boundaries.command.d.ts +9 -0
- package/dist/commands/boundaries.command.d.ts.map +1 -0
- package/dist/commands/boundaries.command.js +314 -0
- package/dist/commands/brief.command.d.ts +3 -0
- package/dist/commands/brief.command.d.ts.map +1 -0
- package/dist/commands/brief.command.js +206 -0
- package/dist/commands/bundle.command.d.ts +3 -0
- package/dist/commands/bundle.command.d.ts.map +1 -0
- package/dist/commands/bundle.command.js +1183 -0
- package/dist/commands/changes.command.d.ts +3 -0
- package/dist/commands/changes.command.d.ts.map +1 -0
- package/dist/commands/changes.command.js +155 -0
- package/dist/commands/check.command.d.ts +3 -0
- package/dist/commands/check.command.d.ts.map +1 -0
- package/dist/commands/check.command.js +553 -0
- package/dist/commands/checks.command.d.ts +29 -0
- package/dist/commands/checks.command.d.ts.map +1 -0
- package/dist/commands/checks.command.js +521 -0
- package/dist/commands/ci.command.d.ts +3 -0
- package/dist/commands/ci.command.d.ts.map +1 -0
- package/dist/commands/ci.command.js +680 -0
- package/dist/commands/codemod.command.d.ts +3 -0
- package/dist/commands/codemod.command.d.ts.map +1 -0
- package/dist/commands/codemod.command.js +130 -0
- package/dist/commands/command-catalog.d.ts +265 -0
- package/dist/commands/command-catalog.d.ts.map +1 -0
- package/dist/commands/command-catalog.js +3242 -0
- package/dist/commands/commands.command.d.ts +92 -0
- package/dist/commands/commands.command.d.ts.map +1 -0
- package/dist/commands/commands.command.js +1208 -0
- package/dist/commands/constructs.command.d.ts +15 -0
- package/dist/commands/constructs.command.d.ts.map +1 -0
- package/dist/commands/constructs.command.js +669 -0
- package/dist/commands/context.command.d.ts +3 -0
- package/dist/commands/context.command.d.ts.map +1 -0
- package/dist/commands/context.command.js +120 -0
- package/dist/commands/contract-gate.command.d.ts +5 -0
- package/dist/commands/contract-gate.command.d.ts.map +1 -0
- package/dist/commands/contract-gate.command.js +208 -0
- package/dist/commands/contract-templates.command.d.ts +8 -0
- package/dist/commands/contract-templates.command.d.ts.map +1 -0
- package/dist/commands/contract-templates.command.js +151 -0
- package/dist/commands/contract.command.d.ts +3 -0
- package/dist/commands/contract.command.d.ts.map +1 -0
- package/dist/commands/contract.command.js +105 -0
- package/dist/commands/conventions.command.d.ts +8 -0
- package/dist/commands/conventions.command.d.ts.map +1 -0
- package/dist/commands/conventions.command.js +169 -0
- package/dist/commands/coverage.command.d.ts +3 -0
- package/dist/commands/coverage.command.d.ts.map +1 -0
- package/dist/commands/coverage.command.js +56 -0
- package/dist/commands/daily.commands.d.ts +5 -0
- package/dist/commands/daily.commands.d.ts.map +1 -0
- package/dist/commands/daily.commands.js +224 -0
- package/dist/commands/dashboard-export.command.d.ts +4 -0
- package/dist/commands/dashboard-export.command.d.ts.map +1 -0
- package/dist/commands/dashboard-export.command.js +86 -0
- package/dist/commands/dashboard.command.d.ts +3 -0
- package/dist/commands/dashboard.command.d.ts.map +1 -0
- package/dist/commands/dashboard.command.js +106 -0
- package/dist/commands/dev.command.d.ts +3 -0
- package/dist/commands/dev.command.d.ts.map +1 -0
- package/dist/commands/dev.command.js +1392 -0
- package/dist/commands/diagnostics.command.d.ts +5 -0
- package/dist/commands/diagnostics.command.d.ts.map +1 -0
- package/dist/commands/diagnostics.command.js +97 -0
- package/dist/commands/docs.command.d.ts +4 -0
- package/dist/commands/docs.command.d.ts.map +1 -0
- package/dist/commands/docs.command.js +34 -0
- package/dist/commands/doctor.command.d.ts +7 -0
- package/dist/commands/doctor.command.d.ts.map +1 -0
- package/dist/commands/doctor.command.js +681 -0
- package/dist/commands/drift.command.d.ts +3 -0
- package/dist/commands/drift.command.d.ts.map +1 -0
- package/dist/commands/drift.command.js +124 -0
- package/dist/commands/eslint.command.d.ts +7 -0
- package/dist/commands/eslint.command.d.ts.map +1 -0
- package/dist/commands/eslint.command.js +423 -0
- package/dist/commands/explore.command.d.ts +3 -0
- package/dist/commands/explore.command.d.ts.map +1 -0
- package/dist/commands/explore.command.js +65 -0
- package/dist/commands/export-bundle.command.d.ts +6 -0
- package/dist/commands/export-bundle.command.d.ts.map +1 -0
- package/dist/commands/export-bundle.command.js +96 -0
- package/dist/commands/export.command.d.ts +3 -0
- package/dist/commands/export.command.d.ts.map +1 -0
- package/dist/commands/export.command.js +83 -0
- package/dist/commands/feedback-dispatch.command.d.ts +12 -0
- package/dist/commands/feedback-dispatch.command.d.ts.map +1 -0
- package/dist/commands/feedback-dispatch.command.js +63 -0
- package/dist/commands/feedback.command.d.ts +11 -0
- package/dist/commands/feedback.command.d.ts.map +1 -0
- package/dist/commands/feedback.command.js +336 -0
- package/dist/commands/fix.command.d.ts +3 -0
- package/dist/commands/fix.command.d.ts.map +1 -0
- package/dist/commands/fix.command.js +776 -0
- package/dist/commands/gen.command.d.ts +3 -0
- package/dist/commands/gen.command.d.ts.map +1 -0
- package/dist/commands/gen.command.js +136 -0
- package/dist/commands/git.command.d.ts +6 -0
- package/dist/commands/git.command.d.ts.map +1 -0
- package/dist/commands/git.command.js +81 -0
- package/dist/commands/graph.command.d.ts +3 -0
- package/dist/commands/graph.command.d.ts.map +1 -0
- package/dist/commands/graph.command.js +287 -0
- package/dist/commands/grounding.command.d.ts +7 -0
- package/dist/commands/grounding.command.d.ts.map +1 -0
- package/dist/commands/grounding.command.js +54 -0
- package/dist/commands/help.command.d.ts +20 -0
- package/dist/commands/help.command.d.ts.map +1 -0
- package/dist/commands/help.command.js +127 -0
- package/dist/commands/helper.command.d.ts +6 -0
- package/dist/commands/helper.command.d.ts.map +1 -0
- package/dist/commands/helper.command.js +170 -0
- package/dist/commands/ide.command.d.ts +6 -0
- package/dist/commands/ide.command.d.ts.map +1 -0
- package/dist/commands/ide.command.js +340 -0
- package/dist/commands/impact.command.d.ts +3 -0
- package/dist/commands/impact.command.d.ts.map +1 -0
- package/dist/commands/impact.command.js +819 -0
- package/dist/commands/import.command.d.ts +3 -0
- package/dist/commands/import.command.d.ts.map +1 -0
- package/dist/commands/import.command.js +115 -0
- package/dist/commands/infer.command.d.ts +3 -0
- package/dist/commands/infer.command.d.ts.map +1 -0
- package/dist/commands/infer.command.js +227 -0
- package/dist/commands/ingest.command.d.ts +6 -0
- package/dist/commands/ingest.command.d.ts.map +1 -0
- package/dist/commands/ingest.command.js +532 -0
- package/dist/commands/init.command.d.ts +3 -0
- package/dist/commands/init.command.d.ts.map +1 -0
- package/dist/commands/init.command.js +301 -0
- package/dist/commands/inspect.command.d.ts +3 -0
- package/dist/commands/inspect.command.d.ts.map +1 -0
- package/dist/commands/inspect.command.js +122 -0
- package/dist/commands/knowledge-author.command.d.ts +22 -0
- package/dist/commands/knowledge-author.command.d.ts.map +1 -0
- package/dist/commands/knowledge-author.command.js +366 -0
- package/dist/commands/knowledge-propose.command.d.ts +3 -0
- package/dist/commands/knowledge-propose.command.d.ts.map +1 -0
- package/dist/commands/knowledge-propose.command.js +125 -0
- package/dist/commands/knowledge.command.d.ts +18 -0
- package/dist/commands/knowledge.command.d.ts.map +1 -0
- package/dist/commands/knowledge.command.js +538 -0
- package/dist/commands/languages.command.d.ts +3 -0
- package/dist/commands/languages.command.d.ts.map +1 -0
- package/dist/commands/languages.command.js +300 -0
- package/dist/commands/lint.command.d.ts +15 -0
- package/dist/commands/lint.command.d.ts.map +1 -0
- package/dist/commands/lint.command.js +194 -0
- package/dist/commands/mcp.command.d.ts +3 -0
- package/dist/commands/mcp.command.d.ts.map +1 -0
- package/dist/commands/mcp.command.js +74 -0
- package/dist/commands/memory.command.d.ts +11 -0
- package/dist/commands/memory.command.d.ts.map +1 -0
- package/dist/commands/memory.command.js +264 -0
- package/dist/commands/onboard.command.d.ts +3 -0
- package/dist/commands/onboard.command.d.ts.map +1 -0
- package/dist/commands/onboard.command.js +650 -0
- package/dist/commands/orchestrate.command.d.ts +3 -0
- package/dist/commands/orchestrate.command.d.ts.map +1 -0
- package/dist/commands/orchestrate.command.js +49 -0
- package/dist/commands/owners.command.d.ts +5 -0
- package/dist/commands/owners.command.d.ts.map +1 -0
- package/dist/commands/owners.command.js +113 -0
- package/dist/commands/ownership.command.d.ts +5 -0
- package/dist/commands/ownership.command.d.ts.map +1 -0
- package/dist/commands/ownership.command.js +117 -0
- package/dist/commands/pack-author.command.d.ts +30 -0
- package/dist/commands/pack-author.command.d.ts.map +1 -0
- package/dist/commands/pack-author.command.js +242 -0
- package/dist/commands/packs-new.d.ts +27 -0
- package/dist/commands/packs-new.d.ts.map +1 -0
- package/dist/commands/packs-new.js +805 -0
- package/dist/commands/packs.command.d.ts +15 -0
- package/dist/commands/packs.command.d.ts.map +1 -0
- package/dist/commands/packs.command.js +958 -0
- package/dist/commands/paths.command.d.ts +6 -0
- package/dist/commands/paths.command.d.ts.map +1 -0
- package/dist/commands/paths.command.js +97 -0
- package/dist/commands/pipelines.command.d.ts +9 -0
- package/dist/commands/pipelines.command.d.ts.map +1 -0
- package/dist/commands/pipelines.command.js +308 -0
- package/dist/commands/plan-check.command.d.ts +27 -0
- package/dist/commands/plan-check.command.d.ts.map +1 -0
- package/dist/commands/plan-check.command.js +150 -0
- package/dist/commands/plan-simulate.command.d.ts +3 -0
- package/dist/commands/plan-simulate.command.d.ts.map +1 -0
- package/dist/commands/plan-simulate.command.js +60 -0
- package/dist/commands/plan.command.d.ts +8 -0
- package/dist/commands/plan.command.d.ts.map +1 -0
- package/dist/commands/plan.command.js +139 -0
- package/dist/commands/playbooks.command.d.ts +10 -0
- package/dist/commands/playbooks.command.d.ts.map +1 -0
- package/dist/commands/playbooks.command.js +296 -0
- package/dist/commands/plugin.command.d.ts +11 -0
- package/dist/commands/plugin.command.d.ts.map +1 -0
- package/dist/commands/plugin.command.js +394 -0
- package/dist/commands/policy.command.d.ts +8 -0
- package/dist/commands/policy.command.d.ts.map +1 -0
- package/dist/commands/policy.command.js +451 -0
- package/dist/commands/pr.command.d.ts +3 -0
- package/dist/commands/pr.command.d.ts.map +1 -0
- package/dist/commands/pr.command.js +132 -0
- package/dist/commands/preflight.command.d.ts +3 -0
- package/dist/commands/preflight.command.d.ts.map +1 -0
- package/dist/commands/preflight.command.js +102 -0
- package/dist/commands/presets.command.d.ts +17 -0
- package/dist/commands/presets.command.d.ts.map +1 -0
- package/dist/commands/presets.command.js +647 -0
- package/dist/commands/profiles.command.d.ts +7 -0
- package/dist/commands/profiles.command.d.ts.map +1 -0
- package/dist/commands/profiles.command.js +151 -0
- package/dist/commands/provenance.command.d.ts +26 -0
- package/dist/commands/provenance.command.d.ts.map +1 -0
- package/dist/commands/provenance.command.js +237 -0
- package/dist/commands/quality.command.d.ts +5 -0
- package/dist/commands/quality.command.d.ts.map +1 -0
- package/dist/commands/quality.command.js +69 -0
- package/dist/commands/recommend.command.d.ts +4 -0
- package/dist/commands/recommend.command.d.ts.map +1 -0
- package/dist/commands/recommend.command.js +270 -0
- package/dist/commands/registrations.command.d.ts +3 -0
- package/dist/commands/registrations.command.d.ts.map +1 -0
- package/dist/commands/registrations.command.js +300 -0
- package/dist/commands/registry.command.d.ts +4 -0
- package/dist/commands/registry.command.d.ts.map +1 -0
- package/dist/commands/registry.command.js +37 -0
- package/dist/commands/release.command.d.ts +4 -0
- package/dist/commands/release.command.d.ts.map +1 -0
- package/dist/commands/release.command.js +639 -0
- package/dist/commands/repo.command.d.ts +3 -0
- package/dist/commands/repo.command.d.ts.map +1 -0
- package/dist/commands/repo.command.js +24 -0
- package/dist/commands/report.command.d.ts +3 -0
- package/dist/commands/report.command.d.ts.map +1 -0
- package/dist/commands/report.command.js +511 -0
- package/dist/commands/reposet.command.d.ts +6 -0
- package/dist/commands/reposet.command.d.ts.map +1 -0
- package/dist/commands/reposet.command.js +120 -0
- package/dist/commands/review.command.d.ts +3 -0
- package/dist/commands/review.command.d.ts.map +1 -0
- package/dist/commands/review.command.js +354 -0
- package/dist/commands/risk.command.d.ts +3 -0
- package/dist/commands/risk.command.d.ts.map +1 -0
- package/dist/commands/risk.command.js +56 -0
- package/dist/commands/rounds.command.d.ts +8 -0
- package/dist/commands/rounds.command.d.ts.map +1 -0
- package/dist/commands/rounds.command.js +180 -0
- package/dist/commands/rules.command.d.ts +49 -0
- package/dist/commands/rules.command.d.ts.map +1 -0
- package/dist/commands/rules.command.js +435 -0
- package/dist/commands/runtime.command.d.ts +3 -0
- package/dist/commands/runtime.command.d.ts.map +1 -0
- package/dist/commands/runtime.command.js +56 -0
- package/dist/commands/safety.command.d.ts +3 -0
- package/dist/commands/safety.command.d.ts.map +1 -0
- package/dist/commands/safety.command.js +117 -0
- package/dist/commands/scaffolds.command.d.ts +5 -0
- package/dist/commands/scaffolds.command.d.ts.map +1 -0
- package/dist/commands/scaffolds.command.js +122 -0
- package/dist/commands/schemas.command.d.ts +21 -0
- package/dist/commands/schemas.command.d.ts.map +1 -0
- package/dist/commands/schemas.command.js +296 -0
- package/dist/commands/search.command.d.ts +12 -0
- package/dist/commands/search.command.d.ts.map +1 -0
- package/dist/commands/search.command.js +275 -0
- package/dist/commands/self-config.command.d.ts +7 -0
- package/dist/commands/self-config.command.d.ts.map +1 -0
- package/dist/commands/self-config.command.js +156 -0
- package/dist/commands/self.command.d.ts +3 -0
- package/dist/commands/self.command.d.ts.map +1 -0
- package/dist/commands/self.command.js +117 -0
- package/dist/commands/simulate.command.d.ts +3 -0
- package/dist/commands/simulate.command.d.ts.map +1 -0
- package/dist/commands/simulate.command.js +54 -0
- package/dist/commands/spec.command.d.ts +29 -0
- package/dist/commands/spec.command.d.ts.map +1 -0
- package/dist/commands/spec.command.js +985 -0
- package/dist/commands/start-here.command.d.ts +3 -0
- package/dist/commands/start-here.command.d.ts.map +1 -0
- package/dist/commands/start-here.command.js +35 -0
- package/dist/commands/stats.command.d.ts +3 -0
- package/dist/commands/stats.command.d.ts.map +1 -0
- package/dist/commands/stats.command.js +88 -0
- package/dist/commands/surface.command.d.ts +15 -0
- package/dist/commands/surface.command.d.ts.map +1 -0
- package/dist/commands/surface.command.js +328 -0
- package/dist/commands/task-context.command.d.ts +7 -0
- package/dist/commands/task-context.command.d.ts.map +1 -0
- package/dist/commands/task-context.command.js +646 -0
- package/dist/commands/task.command.d.ts +3 -0
- package/dist/commands/task.command.d.ts.map +1 -0
- package/dist/commands/task.command.js +301 -0
- package/dist/commands/template-quality.command.d.ts +5 -0
- package/dist/commands/template-quality.command.d.ts.map +1 -0
- package/dist/commands/template-quality.command.js +128 -0
- package/dist/commands/templates.command.d.ts +26 -0
- package/dist/commands/templates.command.d.ts.map +1 -0
- package/dist/commands/templates.command.js +964 -0
- package/dist/commands/test.command.d.ts +3 -0
- package/dist/commands/test.command.d.ts.map +1 -0
- package/dist/commands/test.command.js +262 -0
- package/dist/commands/tests.command.d.ts +5 -0
- package/dist/commands/tests.command.d.ts.map +1 -0
- package/dist/commands/tests.command.js +97 -0
- package/dist/commands/trace.command.d.ts +3 -0
- package/dist/commands/trace.command.d.ts.map +1 -0
- package/dist/commands/trace.command.js +121 -0
- package/dist/commands/upgrade.command.d.ts +4 -0
- package/dist/commands/upgrade.command.d.ts.map +1 -0
- package/dist/commands/upgrade.command.js +43 -0
- package/dist/commands/version.command.d.ts +3 -0
- package/dist/commands/version.command.d.ts.map +1 -0
- package/dist/commands/version.command.js +10 -0
- package/dist/commands/why.command.d.ts +24 -0
- package/dist/commands/why.command.d.ts.map +1 -0
- package/dist/commands/why.command.js +119 -0
- package/dist/dashboard/dashboard-api-server.d.ts +21 -0
- package/dist/dashboard/dashboard-api-server.d.ts.map +1 -0
- package/dist/dashboard/dashboard-api-server.js +410 -0
- package/dist/dashboard/live-session-server.d.ts +18 -0
- package/dist/dashboard/live-session-server.d.ts.map +1 -0
- package/dist/dashboard/live-session-server.js +133 -0
- package/dist/diff/collect-changed-paths.d.ts +27 -0
- package/dist/diff/collect-changed-paths.d.ts.map +1 -0
- package/dist/diff/collect-changed-paths.js +68 -0
- package/dist/doctor/doctor-tags.d.ts +63 -0
- package/dist/doctor/doctor-tags.d.ts.map +1 -0
- package/dist/doctor/doctor-tags.js +146 -0
- package/dist/export/export-formats.d.ts +22 -0
- package/dist/export/export-formats.d.ts.map +1 -0
- package/dist/export/export-formats.js +135 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/init/detected-block.d.ts +57 -0
- package/dist/init/detected-block.d.ts.map +1 -0
- package/dist/init/detected-block.js +197 -0
- package/dist/init/gitignore.d.ts +30 -0
- package/dist/init/gitignore.d.ts.map +1 -0
- package/dist/init/gitignore.js +110 -0
- package/dist/init/init-templates.d.ts +6 -0
- package/dist/init/init-templates.d.ts.map +1 -0
- package/dist/init/init-templates.js +413 -0
- package/dist/main.d.ts +18 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +699 -0
- package/dist/output/failure-hints.d.ts +55 -0
- package/dist/output/failure-hints.d.ts.map +1 -0
- package/dist/output/failure-hints.js +159 -0
- package/dist/output/format-output.d.ts +9 -0
- package/dist/output/format-output.d.ts.map +1 -0
- package/dist/output/format-output.js +26 -0
- package/dist/output/print-error.d.ts +3 -0
- package/dist/output/print-error.d.ts.map +1 -0
- package/dist/output/print-error.js +14 -0
- package/dist/output/watch-loop.d.ts +37 -0
- package/dist/output/watch-loop.d.ts.map +1 -0
- package/dist/output/watch-loop.js +115 -0
- package/dist/schemas/json-schemas.d.ts +1630 -0
- package/dist/schemas/json-schemas.d.ts.map +1 -0
- package/dist/schemas/json-schemas.js +811 -0
- package/dist/surface/about.d.ts +10 -0
- package/dist/surface/about.d.ts.map +1 -0
- package/dist/surface/about.js +53 -0
- package/dist/surface/load-surface-context.d.ts +34 -0
- package/dist/surface/load-surface-context.d.ts.map +1 -0
- package/dist/surface/load-surface-context.js +100 -0
- package/dist/surface/no-args-landing.d.ts +7 -0
- package/dist/surface/no-args-landing.d.ts.map +1 -0
- package/dist/surface/no-args-landing.js +36 -0
- package/dist/surface/not-enabled-error.d.ts +24 -0
- package/dist/surface/not-enabled-error.d.ts.map +1 -0
- package/dist/surface/not-enabled-error.js +36 -0
- package/dist/surface/profiles.d.ts +37 -0
- package/dist/surface/profiles.d.ts.map +1 -0
- package/dist/surface/profiles.js +151 -0
- package/dist/surface/shape-defaults.d.ts +21 -0
- package/dist/surface/shape-defaults.d.ts.map +1 -0
- package/dist/surface/shape-defaults.js +50 -0
- package/dist/surface/spine-extractor.d.ts +38 -0
- package/dist/surface/spine-extractor.d.ts.map +1 -0
- package/dist/surface/spine-extractor.js +100 -0
- package/dist/surface/surface-config-writer.d.ts +59 -0
- package/dist/surface/surface-config-writer.d.ts.map +1 -0
- package/dist/surface/surface-config-writer.js +135 -0
- package/dist/surface/surface-summary.d.ts +66 -0
- package/dist/surface/surface-summary.d.ts.map +1 -0
- package/dist/surface/surface-summary.js +162 -0
- package/dist/surface/tier.d.ts +100 -0
- package/dist/surface/tier.d.ts.map +1 -0
- package/dist/surface/tier.js +172 -0
- package/dist/task-next/apply-batch-runner.d.ts +42 -0
- package/dist/task-next/apply-batch-runner.d.ts.map +1 -0
- package/dist/task-next/apply-batch-runner.js +192 -0
- package/dist/task-next/task-next-ranker.d.ts +75 -0
- package/dist/task-next/task-next-ranker.d.ts.map +1 -0
- package/dist/task-next/task-next-ranker.js +179 -0
- package/dist/usage/usage-log.d.ts +54 -0
- package/dist/usage/usage-log.d.ts.map +1 -0
- package/dist/usage/usage-log.js +105 -0
- package/dist/validation/run-validation-loop.d.ts +38 -0
- package/dist/validation/run-validation-loop.d.ts.map +1 -0
- package/dist/validation/run-validation-loop.js +100 -0
- package/package.json +73 -0
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `shrk plugin` commands, driven by pack/local lifecycle profiles.
|
|
3
|
+
*
|
|
4
|
+
* shrk plugin rename <old> <new> [--profile <id>] [--output <plan.json>] [--json]
|
|
5
|
+
* shrk plugin remove <name> [--profile <id>] [--output <plan.json>] [--json]
|
|
6
|
+
* shrk plugin lifecycle list [--profile <id>] [--json]
|
|
7
|
+
* shrk plugin lifecycle inspect <name> [--profile <id>] [--json]
|
|
8
|
+
* shrk plugin lifecycle profiles [--json]
|
|
9
|
+
* shrk plugin lifecycle profile <id> [--json]
|
|
10
|
+
* shrk plugin lifecycle doctor [--profile <id>] [--json]
|
|
11
|
+
*
|
|
12
|
+
* Every command is plan-only by default. Source is never written by these
|
|
13
|
+
* commands — humans run the regular plan-apply flow with --verify-signature
|
|
14
|
+
* after reviewing the produced plan.
|
|
15
|
+
*/
|
|
16
|
+
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
17
|
+
import * as nodePath from 'node:path';
|
|
18
|
+
import { buildPluginLifecycleListing, buildPluginRemovePlan, buildPluginRenamePlan, checkPluginLifecycleProfileHealth, inspectSharkcraft, listPluginLifecycleProfiles, listPluginLifecycleProfileIssues, pluginLifecyclePlanToSavedPlan, renderPluginLifecyclePlanText, resolvePluginLifecycleProfile, } from '@shrkcrft/inspector';
|
|
19
|
+
import { savePlanToFile, signPlan } from '@shrkcrft/generator';
|
|
20
|
+
import { flagBool, flagString, resolveCwd, } from "../command-registry.js";
|
|
21
|
+
import { asJson, header } from "../output/format-output.js";
|
|
22
|
+
function writePlanFile(content, outputArg, cwd) {
|
|
23
|
+
const abs = nodePath.isAbsolute(outputArg) ? outputArg : nodePath.resolve(cwd, outputArg);
|
|
24
|
+
mkdirSync(nodePath.dirname(abs), { recursive: true });
|
|
25
|
+
writeFileSync(abs, content + '\n', 'utf8');
|
|
26
|
+
return abs;
|
|
27
|
+
}
|
|
28
|
+
async function resolveProfileOrError(cwd, args) {
|
|
29
|
+
const inspection = await inspectSharkcraft({ cwd });
|
|
30
|
+
const profileId = flagString(args, 'profile');
|
|
31
|
+
const resolved = await resolvePluginLifecycleProfile(inspection, {
|
|
32
|
+
profileId,
|
|
33
|
+
allowSingleDefault: true,
|
|
34
|
+
});
|
|
35
|
+
if (!resolved.entry) {
|
|
36
|
+
process.stderr.write(`${resolved.error}\n`);
|
|
37
|
+
return { exitCode: 2 };
|
|
38
|
+
}
|
|
39
|
+
return { entry: resolved.entry };
|
|
40
|
+
}
|
|
41
|
+
export const pluginRenameCommand = {
|
|
42
|
+
name: 'rename',
|
|
43
|
+
description: 'Generate a plan-only rename plan for a plugin (profile-driven). Never writes source. Plan covers the profile key-table + barrels + folder ops (with --emit-folder-ops). Pass --save-plan <file> to emit a saved plan applicable through `shrk apply --allow-folder-ops`.',
|
|
44
|
+
usage: 'shrk plugin rename <old> <new> [--profile <id>] [--output <plan.json>] [--emit-folder-ops] [--save-plan <file>] [--sign] [--json]',
|
|
45
|
+
async run(args) {
|
|
46
|
+
const oldName = args.positional[0];
|
|
47
|
+
const newName = args.positional[1];
|
|
48
|
+
if (!oldName || !newName) {
|
|
49
|
+
process.stderr.write('Usage: shrk plugin rename <old> <new> [--profile <id>]\n');
|
|
50
|
+
return 2;
|
|
51
|
+
}
|
|
52
|
+
const cwd = resolveCwd(args);
|
|
53
|
+
const resolved = await resolveProfileOrError(cwd, args);
|
|
54
|
+
if (!resolved.entry)
|
|
55
|
+
return resolved.exitCode ?? 2;
|
|
56
|
+
const plan = buildPluginRenamePlan({
|
|
57
|
+
projectRoot: cwd,
|
|
58
|
+
profile: resolved.entry.profile,
|
|
59
|
+
oldName,
|
|
60
|
+
newName,
|
|
61
|
+
...(flagBool(args, 'emit-folder-ops') ? { emitFolderOps: true } : {}),
|
|
62
|
+
});
|
|
63
|
+
const output = flagString(args, 'output');
|
|
64
|
+
const savePlanPath = flagString(args, 'save-plan');
|
|
65
|
+
if (savePlanPath) {
|
|
66
|
+
const saved = pluginLifecyclePlanToSavedPlan(plan, cwd);
|
|
67
|
+
let toWrite = saved;
|
|
68
|
+
if (flagBool(args, 'sign')) {
|
|
69
|
+
const signed = signPlan(toWrite);
|
|
70
|
+
if (signed.ok)
|
|
71
|
+
toWrite = signed.value;
|
|
72
|
+
}
|
|
73
|
+
const abs = nodePath.isAbsolute(savePlanPath)
|
|
74
|
+
? savePlanPath
|
|
75
|
+
: nodePath.resolve(cwd, savePlanPath);
|
|
76
|
+
const writeResult = savePlanToFile(toWrite, abs);
|
|
77
|
+
if (!writeResult.ok) {
|
|
78
|
+
process.stderr.write(`Failed to save plan: ${writeResult.error.message}\n`);
|
|
79
|
+
return 1;
|
|
80
|
+
}
|
|
81
|
+
if (!flagBool(args, 'json')) {
|
|
82
|
+
process.stdout.write(renderPluginLifecyclePlanText(plan));
|
|
83
|
+
process.stdout.write(`\nSaved plan to ${abs}\nApply: shrk apply ${abs} --allow-folder-ops${plan.action === 'remove' ? ' --allow-delete-folder' : ''} --verify-signature\n`);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
process.stdout.write(asJson({ saved: abs, plan }) + '\n');
|
|
87
|
+
}
|
|
88
|
+
return 0;
|
|
89
|
+
}
|
|
90
|
+
if (flagBool(args, 'json')) {
|
|
91
|
+
const body = asJson(plan);
|
|
92
|
+
if (output) {
|
|
93
|
+
const abs = writePlanFile(body, output, cwd);
|
|
94
|
+
process.stdout.write(`Wrote ${abs}\n`);
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
process.stdout.write(body + '\n');
|
|
98
|
+
}
|
|
99
|
+
return 0;
|
|
100
|
+
}
|
|
101
|
+
process.stdout.write(renderPluginLifecyclePlanText(plan));
|
|
102
|
+
if (output) {
|
|
103
|
+
const abs = writePlanFile(asJson(plan), output, cwd);
|
|
104
|
+
process.stdout.write(`\nSaved plan to ${abs}\n`);
|
|
105
|
+
}
|
|
106
|
+
return 0;
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
export const pluginRemoveCommand = {
|
|
110
|
+
name: 'remove',
|
|
111
|
+
description: 'Generate a plan-only remove plan for a plugin (profile-driven). Destructive; requires human approval. Source is never written. Pass --save-plan <file> to emit a saved plan applicable through `shrk apply --allow-folder-ops --allow-delete-folder`.',
|
|
112
|
+
usage: 'shrk plugin remove <name> [--profile <id>] [--output <plan.json>] [--emit-folder-ops] [--save-plan <file>] [--sign] [--json]',
|
|
113
|
+
async run(args) {
|
|
114
|
+
const name = args.positional[0];
|
|
115
|
+
if (!name) {
|
|
116
|
+
process.stderr.write('Usage: shrk plugin remove <name> [--profile <id>]\n');
|
|
117
|
+
return 2;
|
|
118
|
+
}
|
|
119
|
+
const cwd = resolveCwd(args);
|
|
120
|
+
const resolved = await resolveProfileOrError(cwd, args);
|
|
121
|
+
if (!resolved.entry)
|
|
122
|
+
return resolved.exitCode ?? 2;
|
|
123
|
+
const plan = buildPluginRemovePlan({
|
|
124
|
+
projectRoot: cwd,
|
|
125
|
+
profile: resolved.entry.profile,
|
|
126
|
+
oldName: name,
|
|
127
|
+
...(flagBool(args, 'emit-folder-ops') ? { emitFolderOps: true } : {}),
|
|
128
|
+
});
|
|
129
|
+
const output = flagString(args, 'output');
|
|
130
|
+
const savePlanPath = flagString(args, 'save-plan');
|
|
131
|
+
if (savePlanPath) {
|
|
132
|
+
const saved = pluginLifecyclePlanToSavedPlan(plan, cwd);
|
|
133
|
+
let toWrite = saved;
|
|
134
|
+
if (flagBool(args, 'sign')) {
|
|
135
|
+
const signed = signPlan(toWrite);
|
|
136
|
+
if (signed.ok)
|
|
137
|
+
toWrite = signed.value;
|
|
138
|
+
}
|
|
139
|
+
const abs = nodePath.isAbsolute(savePlanPath)
|
|
140
|
+
? savePlanPath
|
|
141
|
+
: nodePath.resolve(cwd, savePlanPath);
|
|
142
|
+
const writeResult = savePlanToFile(toWrite, abs);
|
|
143
|
+
if (!writeResult.ok) {
|
|
144
|
+
process.stderr.write(`Failed to save plan: ${writeResult.error.message}\n`);
|
|
145
|
+
return 1;
|
|
146
|
+
}
|
|
147
|
+
if (!flagBool(args, 'json')) {
|
|
148
|
+
process.stdout.write(renderPluginLifecyclePlanText(plan));
|
|
149
|
+
process.stdout.write(`\n⚠ DESTRUCTIVE — saved plan written to ${abs}\nApply: shrk apply ${abs} --allow-folder-ops --allow-delete-folder --verify-signature\n`);
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
process.stdout.write(asJson({ saved: abs, plan }) + '\n');
|
|
153
|
+
}
|
|
154
|
+
return 0;
|
|
155
|
+
}
|
|
156
|
+
if (flagBool(args, 'json')) {
|
|
157
|
+
const body = asJson(plan);
|
|
158
|
+
if (output) {
|
|
159
|
+
const abs = writePlanFile(body, output, cwd);
|
|
160
|
+
process.stdout.write(`Wrote ${abs}\n`);
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
process.stdout.write(body + '\n');
|
|
164
|
+
}
|
|
165
|
+
return 0;
|
|
166
|
+
}
|
|
167
|
+
process.stdout.write(renderPluginLifecyclePlanText(plan));
|
|
168
|
+
process.stdout.write('\n⚠ DESTRUCTIVE — human approval required before any of these steps.\n');
|
|
169
|
+
if (output) {
|
|
170
|
+
const abs = writePlanFile(asJson(plan), output, cwd);
|
|
171
|
+
process.stdout.write(`\nSaved plan to ${abs}\n`);
|
|
172
|
+
}
|
|
173
|
+
return 0;
|
|
174
|
+
},
|
|
175
|
+
};
|
|
176
|
+
export const pluginLifecycleListCommand = {
|
|
177
|
+
name: 'list',
|
|
178
|
+
description: 'List plugins detected under the profile plugin roots + profile key-table entries.',
|
|
179
|
+
usage: 'shrk plugin lifecycle list [--profile <id>] [--json]',
|
|
180
|
+
async run(args) {
|
|
181
|
+
const cwd = resolveCwd(args);
|
|
182
|
+
const resolved = await resolveProfileOrError(cwd, args);
|
|
183
|
+
if (!resolved.entry)
|
|
184
|
+
return resolved.exitCode ?? 2;
|
|
185
|
+
const listing = buildPluginLifecycleListing({ projectRoot: cwd, profile: resolved.entry.profile });
|
|
186
|
+
if (flagBool(args, 'json')) {
|
|
187
|
+
process.stdout.write(asJson(listing) + '\n');
|
|
188
|
+
return 0;
|
|
189
|
+
}
|
|
190
|
+
process.stdout.write(header(`Plugins by layer (profile=${resolved.entry.profile.id})`));
|
|
191
|
+
for (const [layer, names] of Object.entries(listing.pluginsByLayer)) {
|
|
192
|
+
process.stdout.write(` ${layer} (${names.length})\n`);
|
|
193
|
+
for (const n of names)
|
|
194
|
+
process.stdout.write(` • ${n}\n`);
|
|
195
|
+
}
|
|
196
|
+
process.stdout.write(header('Key table'));
|
|
197
|
+
for (const k of listing.pluginKeys) {
|
|
198
|
+
process.stdout.write(` ${k.key.padEnd(28)} '${k.value}'\n`);
|
|
199
|
+
}
|
|
200
|
+
return 0;
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
export const pluginLifecycleInspectCommand = {
|
|
204
|
+
name: 'inspect',
|
|
205
|
+
description: 'Inspect a plugin: which layers reference it, key-table entry, barrels.',
|
|
206
|
+
usage: 'shrk plugin lifecycle inspect <name> [--profile <id>] [--json]',
|
|
207
|
+
async run(args) {
|
|
208
|
+
const name = args.positional[0];
|
|
209
|
+
if (!name) {
|
|
210
|
+
process.stderr.write('Usage: shrk plugin lifecycle inspect <name>\n');
|
|
211
|
+
return 2;
|
|
212
|
+
}
|
|
213
|
+
const cwd = resolveCwd(args);
|
|
214
|
+
const resolved = await resolveProfileOrError(cwd, args);
|
|
215
|
+
if (!resolved.entry)
|
|
216
|
+
return resolved.exitCode ?? 2;
|
|
217
|
+
const listing = buildPluginLifecycleListing({ projectRoot: cwd, profile: resolved.entry.profile });
|
|
218
|
+
const presentInLayers = Object.entries(listing.pluginsByLayer)
|
|
219
|
+
.filter(([, names]) => names.includes(name))
|
|
220
|
+
.map(([layer]) => layer);
|
|
221
|
+
const keyEntry = listing.pluginKeys.find((k) => k.value === name);
|
|
222
|
+
const report = {
|
|
223
|
+
name,
|
|
224
|
+
profile: resolved.entry.profile.id,
|
|
225
|
+
presentInLayers,
|
|
226
|
+
pluginKeysEntry: keyEntry ?? null,
|
|
227
|
+
};
|
|
228
|
+
if (flagBool(args, 'json')) {
|
|
229
|
+
process.stdout.write(asJson(report) + '\n');
|
|
230
|
+
return 0;
|
|
231
|
+
}
|
|
232
|
+
process.stdout.write(header(`Plugin inspect: ${name}`));
|
|
233
|
+
process.stdout.write(` profile ${resolved.entry.profile.id}\n`);
|
|
234
|
+
process.stdout.write(` layers ${presentInLayers.length > 0 ? presentInLayers.join(', ') : '(none)'}\n`);
|
|
235
|
+
process.stdout.write(` key entry ${keyEntry ? `${keyEntry.key} = '${keyEntry.value}'` : '(not registered)'}\n`);
|
|
236
|
+
return 0;
|
|
237
|
+
},
|
|
238
|
+
};
|
|
239
|
+
export const pluginLifecycleProfilesCommand = {
|
|
240
|
+
name: 'profiles',
|
|
241
|
+
description: 'List registered plugin lifecycle profiles (pack + local).',
|
|
242
|
+
usage: 'shrk plugin lifecycle profiles [--json]',
|
|
243
|
+
async run(args) {
|
|
244
|
+
const cwd = resolveCwd(args);
|
|
245
|
+
const inspection = await inspectSharkcraft({ cwd });
|
|
246
|
+
const entries = await listPluginLifecycleProfiles(inspection);
|
|
247
|
+
if (flagBool(args, 'json')) {
|
|
248
|
+
process.stdout.write(asJson(entries) + '\n');
|
|
249
|
+
return 0;
|
|
250
|
+
}
|
|
251
|
+
process.stdout.write(header('Plugin lifecycle profiles'));
|
|
252
|
+
if (entries.length === 0) {
|
|
253
|
+
process.stdout.write(' (none registered — contribute via a pack manifest "pluginLifecycleProfileFiles" entry or sharkcraft/plugin-lifecycle-profiles.ts)\n');
|
|
254
|
+
return 0;
|
|
255
|
+
}
|
|
256
|
+
for (const e of entries) {
|
|
257
|
+
const src = e.source === 'pack' ? `pack:${e.packageName}` : e.source;
|
|
258
|
+
process.stdout.write(` • ${e.profile.id.padEnd(20)} ${e.profile.title} [${src}]\n`);
|
|
259
|
+
if (e.profile.description) {
|
|
260
|
+
process.stdout.write(` ${e.profile.description}\n`);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
return 0;
|
|
264
|
+
},
|
|
265
|
+
};
|
|
266
|
+
export const pluginLifecycleProfileCommand = {
|
|
267
|
+
name: 'profile',
|
|
268
|
+
description: 'Show a single plugin lifecycle profile.',
|
|
269
|
+
usage: 'shrk plugin lifecycle profile <id> [--json]',
|
|
270
|
+
async run(args) {
|
|
271
|
+
const id = args.positional[0];
|
|
272
|
+
if (!id) {
|
|
273
|
+
process.stderr.write('Usage: shrk plugin lifecycle profile <id>\n');
|
|
274
|
+
return 2;
|
|
275
|
+
}
|
|
276
|
+
const cwd = resolveCwd(args);
|
|
277
|
+
const inspection = await inspectSharkcraft({ cwd });
|
|
278
|
+
const entries = await listPluginLifecycleProfiles(inspection);
|
|
279
|
+
const entry = entries.find((e) => e.profile.id === id);
|
|
280
|
+
if (!entry) {
|
|
281
|
+
process.stderr.write(`Unknown profile "${id}". Available: ${entries.length === 0 ? '(none)' : entries.map((e) => e.profile.id).join(', ')}.\n`);
|
|
282
|
+
return 2;
|
|
283
|
+
}
|
|
284
|
+
if (flagBool(args, 'json')) {
|
|
285
|
+
process.stdout.write(asJson(entry) + '\n');
|
|
286
|
+
return 0;
|
|
287
|
+
}
|
|
288
|
+
process.stdout.write(header(`Profile ${entry.profile.id}`));
|
|
289
|
+
process.stdout.write(` title ${entry.profile.title}\n`);
|
|
290
|
+
if (entry.profile.description)
|
|
291
|
+
process.stdout.write(` description ${entry.profile.description}\n`);
|
|
292
|
+
process.stdout.write(` source ${entry.source}${entry.packageName ? ' (' + entry.packageName + ')' : ''}\n`);
|
|
293
|
+
process.stdout.write(` sourceFile ${entry.sourceFile}\n`);
|
|
294
|
+
process.stdout.write(` pluginRoots:\n`);
|
|
295
|
+
for (const r of entry.profile.pluginRoots) {
|
|
296
|
+
process.stdout.write(` • ${r.id.padEnd(12)} ${r.path}${r.kind ? ' [' + r.kind + ']' : ''}\n`);
|
|
297
|
+
}
|
|
298
|
+
if (entry.profile.barrels && entry.profile.barrels.length > 0) {
|
|
299
|
+
process.stdout.write(` barrels:\n`);
|
|
300
|
+
for (const b of entry.profile.barrels) {
|
|
301
|
+
process.stdout.write(` • ${b.id.padEnd(12)} ${b.path}\n`);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
if (entry.profile.keyTable) {
|
|
305
|
+
process.stdout.write(` keyTable ${entry.profile.keyTable.path} (key=${entry.profile.keyTable.keyCase} value=${entry.profile.keyTable.valueCase})\n`);
|
|
306
|
+
}
|
|
307
|
+
if (entry.profile.validationCommands && entry.profile.validationCommands.length > 0) {
|
|
308
|
+
process.stdout.write(` validation:\n`);
|
|
309
|
+
for (const c of entry.profile.validationCommands)
|
|
310
|
+
process.stdout.write(` $ ${c}\n`);
|
|
311
|
+
}
|
|
312
|
+
return 0;
|
|
313
|
+
},
|
|
314
|
+
};
|
|
315
|
+
export const pluginLifecycleDoctorCommand = {
|
|
316
|
+
name: 'doctor',
|
|
317
|
+
description: 'Lifecycle-profile doctor: surface load issues + check profile paths exist.',
|
|
318
|
+
usage: 'shrk plugin lifecycle doctor [--profile <id>] [--json]',
|
|
319
|
+
async run(args) {
|
|
320
|
+
const cwd = resolveCwd(args);
|
|
321
|
+
const inspection = await inspectSharkcraft({ cwd });
|
|
322
|
+
const profileId = flagString(args, 'profile');
|
|
323
|
+
const issues = [...(await listPluginLifecycleProfileIssues(inspection))];
|
|
324
|
+
const healthByProfile = {};
|
|
325
|
+
const entries = await listPluginLifecycleProfiles(inspection);
|
|
326
|
+
const targets = profileId ? entries.filter((e) => e.profile.id === profileId) : entries;
|
|
327
|
+
if (profileId && targets.length === 0) {
|
|
328
|
+
process.stderr.write(`Unknown profile "${profileId}". Available: ${entries.map((e) => e.profile.id).join(', ') || '(none)'}.\n`);
|
|
329
|
+
return 2;
|
|
330
|
+
}
|
|
331
|
+
for (const e of targets) {
|
|
332
|
+
healthByProfile[e.profile.id] = checkPluginLifecycleProfileHealth(cwd, e.profile);
|
|
333
|
+
}
|
|
334
|
+
if (flagBool(args, 'json')) {
|
|
335
|
+
process.stdout.write(asJson({ registryIssues: issues, healthByProfile }) + '\n');
|
|
336
|
+
return 0;
|
|
337
|
+
}
|
|
338
|
+
process.stdout.write(header('Lifecycle profile doctor'));
|
|
339
|
+
if (issues.length === 0) {
|
|
340
|
+
process.stdout.write(' Registry: ok (no load issues)\n');
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
process.stdout.write(` Registry issues (${issues.length}):\n`);
|
|
344
|
+
for (const i of issues) {
|
|
345
|
+
process.stdout.write(` ${i.severity.padEnd(7)} [${i.code}] ${i.message}\n`);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
for (const [id, checks] of Object.entries(healthByProfile)) {
|
|
349
|
+
process.stdout.write(`\n ${id}:\n`);
|
|
350
|
+
for (const c of checks) {
|
|
351
|
+
process.stdout.write(` ${c.severity.padEnd(7)} ${c.message}\n`);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
return 0;
|
|
355
|
+
},
|
|
356
|
+
};
|
|
357
|
+
export const pluginLifecycleCommand = {
|
|
358
|
+
name: 'lifecycle',
|
|
359
|
+
description: 'Inspect / list profile-driven plugins; manage lifecycle profiles.',
|
|
360
|
+
usage: 'shrk plugin lifecycle list|inspect|profiles|profile|doctor ...',
|
|
361
|
+
async run(args) {
|
|
362
|
+
const sub = args.positional[0];
|
|
363
|
+
args.positional = args.positional.slice(1);
|
|
364
|
+
if (sub === 'list')
|
|
365
|
+
return pluginLifecycleListCommand.run(args);
|
|
366
|
+
if (sub === 'inspect')
|
|
367
|
+
return pluginLifecycleInspectCommand.run(args);
|
|
368
|
+
if (sub === 'profiles')
|
|
369
|
+
return pluginLifecycleProfilesCommand.run(args);
|
|
370
|
+
if (sub === 'profile')
|
|
371
|
+
return pluginLifecycleProfileCommand.run(args);
|
|
372
|
+
if (sub === 'doctor')
|
|
373
|
+
return pluginLifecycleDoctorCommand.run(args);
|
|
374
|
+
process.stderr.write('Usage: shrk plugin lifecycle list|inspect|profiles|profile|doctor ...\n');
|
|
375
|
+
return 2;
|
|
376
|
+
},
|
|
377
|
+
};
|
|
378
|
+
export const pluginCommand = {
|
|
379
|
+
name: 'plugin',
|
|
380
|
+
description: 'Plugin lifecycle helpers (profile-driven). Plan-only — every command emits a structured plan that a human must review and apply.',
|
|
381
|
+
usage: 'shrk plugin rename|remove|lifecycle ...',
|
|
382
|
+
async run(args) {
|
|
383
|
+
const sub = args.positional[0];
|
|
384
|
+
args.positional = args.positional.slice(1);
|
|
385
|
+
if (sub === 'rename')
|
|
386
|
+
return pluginRenameCommand.run(args);
|
|
387
|
+
if (sub === 'remove')
|
|
388
|
+
return pluginRemoveCommand.run(args);
|
|
389
|
+
if (sub === 'lifecycle')
|
|
390
|
+
return pluginLifecycleCommand.run(args);
|
|
391
|
+
process.stderr.write('Usage: shrk plugin rename|remove|lifecycle ...\n');
|
|
392
|
+
return 2;
|
|
393
|
+
},
|
|
394
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ICommandHandler } from '../command-registry.js';
|
|
2
|
+
export declare const policyListCommand: ICommandHandler;
|
|
3
|
+
export declare const policyGetCommand: ICommandHandler;
|
|
4
|
+
export declare const policyTestCommand: ICommandHandler;
|
|
5
|
+
export declare const policyRunCommand: ICommandHandler;
|
|
6
|
+
export declare const policySnapshotCommand: ICommandHandler;
|
|
7
|
+
export declare const policyCheckCommand: ICommandHandler;
|
|
8
|
+
//# sourceMappingURL=policy.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policy.command.d.ts","sourceRoot":"","sources":["../../src/commands/policy.command.ts"],"names":[],"mappings":"AAoBA,OAAO,EAKL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAkBhC,eAAO,MAAM,iBAAiB,EAAE,eAwB/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,eA6B9B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,eAsI/B,CAAC;AAiBF,eAAO,MAAM,gBAAgB,EAAE,eA6F9B,CAAC;AAIF,eAAO,MAAM,qBAAqB,EAAE,eAsJnC,CAAC;AAGF,eAAO,MAAM,kBAAkB,EAAE,eAKhC,CAAC"}
|