@opensip-cli/fitness 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/NOTICE +8 -0
- package/README.md +31 -0
- package/dist/__tests__/baseline-plane.test.d.ts +12 -0
- package/dist/__tests__/baseline-plane.test.d.ts.map +1 -0
- package/dist/__tests__/baseline-plane.test.js +63 -0
- package/dist/__tests__/baseline-plane.test.js.map +1 -0
- package/dist/__tests__/check-utils.test.d.ts +10 -0
- package/dist/__tests__/check-utils.test.d.ts.map +1 -0
- package/dist/__tests__/check-utils.test.js +193 -0
- package/dist/__tests__/check-utils.test.js.map +1 -0
- package/dist/__tests__/fingerprint-parity.test.d.ts +14 -0
- package/dist/__tests__/fingerprint-parity.test.d.ts.map +1 -0
- package/dist/__tests__/fingerprint-parity.test.js +59 -0
- package/dist/__tests__/fingerprint-parity.test.js.map +1 -0
- package/dist/__tests__/fit-execute-opts.test.d.ts +15 -0
- package/dist/__tests__/fit-execute-opts.test.d.ts.map +1 -0
- package/dist/__tests__/fit-execute-opts.test.js +124 -0
- package/dist/__tests__/fit-execute-opts.test.js.map +1 -0
- package/dist/__tests__/public-api.test.d.ts +19 -0
- package/dist/__tests__/public-api.test.d.ts.map +1 -0
- package/dist/__tests__/public-api.test.js +85 -0
- package/dist/__tests__/public-api.test.js.map +1 -0
- package/dist/__tests__/tool.test.d.ts +10 -0
- package/dist/__tests__/tool.test.d.ts.map +1 -0
- package/dist/__tests__/tool.test.js +57 -0
- package/dist/__tests__/tool.test.js.map +1 -0
- package/dist/baseline-strategy.d.ts +21 -0
- package/dist/baseline-strategy.d.ts.map +1 -0
- package/dist/baseline-strategy.js +21 -0
- package/dist/baseline-strategy.js.map +1 -0
- package/dist/check-utils/display.d.ts +52 -0
- package/dist/check-utils/display.d.ts.map +1 -0
- package/dist/check-utils/display.js +66 -0
- package/dist/check-utils/display.js.map +1 -0
- package/dist/check-utils/index.d.ts +17 -0
- package/dist/check-utils/index.d.ts.map +1 -0
- package/dist/check-utils/index.js +13 -0
- package/dist/check-utils/index.js.map +1 -0
- package/dist/check-utils/path-matching.d.ts +40 -0
- package/dist/check-utils/path-matching.d.ts.map +1 -0
- package/dist/check-utils/path-matching.js +38 -0
- package/dist/check-utils/path-matching.js.map +1 -0
- package/dist/check-utils/source-analysis.d.ts +36 -0
- package/dist/check-utils/source-analysis.d.ts.map +1 -0
- package/dist/check-utils/source-analysis.js +44 -0
- package/dist/check-utils/source-analysis.js.map +1 -0
- package/dist/check-utils/test-helpers.d.ts +57 -0
- package/dist/check-utils/test-helpers.d.ts.map +1 -0
- package/dist/check-utils/test-helpers.js +71 -0
- package/dist/check-utils/test-helpers.js.map +1 -0
- package/dist/cli/__tests__/fit-gate-mode.test.d.ts +14 -0
- package/dist/cli/__tests__/fit-gate-mode.test.d.ts.map +1 -0
- package/dist/cli/__tests__/fit-gate-mode.test.js +110 -0
- package/dist/cli/__tests__/fit-gate-mode.test.js.map +1 -0
- package/dist/cli/__tests__/fit-modes-live.test.d.ts +13 -0
- package/dist/cli/__tests__/fit-modes-live.test.d.ts.map +1 -0
- package/dist/cli/__tests__/fit-modes-live.test.js +182 -0
- package/dist/cli/__tests__/fit-modes-live.test.js.map +1 -0
- package/dist/cli/__tests__/report-data.test.d.ts +12 -0
- package/dist/cli/__tests__/report-data.test.d.ts.map +1 -0
- package/dist/cli/__tests__/report-data.test.js +113 -0
- package/dist/cli/__tests__/report-data.test.js.map +1 -0
- package/dist/cli/fit/__tests__/display-fold.test.d.ts +8 -0
- package/dist/cli/fit/__tests__/display-fold.test.d.ts.map +1 -0
- package/dist/cli/fit/__tests__/display-fold.test.js +87 -0
- package/dist/cli/fit/__tests__/display-fold.test.js.map +1 -0
- package/dist/cli/fit/__tests__/gate-resolved-config.test.d.ts +16 -0
- package/dist/cli/fit/__tests__/gate-resolved-config.test.d.ts.map +1 -0
- package/dist/cli/fit/__tests__/gate-resolved-config.test.js +62 -0
- package/dist/cli/fit/__tests__/gate-resolved-config.test.js.map +1 -0
- package/dist/cli/fit/check-loader.d.ts +37 -0
- package/dist/cli/fit/check-loader.d.ts.map +1 -0
- package/dist/cli/fit/check-loader.js +154 -0
- package/dist/cli/fit/check-loader.js.map +1 -0
- package/dist/cli/fit/config-loader.d.ts +55 -0
- package/dist/cli/fit/config-loader.d.ts.map +1 -0
- package/dist/cli/fit/config-loader.js +107 -0
- package/dist/cli/fit/config-loader.js.map +1 -0
- package/dist/cli/fit/display-registry.d.ts +19 -0
- package/dist/cli/fit/display-registry.d.ts.map +1 -0
- package/dist/cli/fit/display-registry.js +33 -0
- package/dist/cli/fit/display-registry.js.map +1 -0
- package/dist/cli/fit/envelope-view.d.ts +49 -0
- package/dist/cli/fit/envelope-view.d.ts.map +1 -0
- package/dist/cli/fit/envelope-view.js +85 -0
- package/dist/cli/fit/envelope-view.js.map +1 -0
- package/dist/cli/fit/fit-aux-command-specs.d.ts +35 -0
- package/dist/cli/fit/fit-aux-command-specs.d.ts.map +1 -0
- package/dist/cli/fit/fit-aux-command-specs.js +110 -0
- package/dist/cli/fit/fit-aux-command-specs.js.map +1 -0
- package/dist/cli/fit/fit-command-spec.d.ts +24 -0
- package/dist/cli/fit/fit-command-spec.d.ts.map +1 -0
- package/dist/cli/fit/fit-command-spec.js +131 -0
- package/dist/cli/fit/fit-command-spec.js.map +1 -0
- package/dist/cli/fit/gate-compare-render.d.ts +13 -0
- package/dist/cli/fit/gate-compare-render.d.ts.map +1 -0
- package/dist/cli/fit/gate-compare-render.js +87 -0
- package/dist/cli/fit/gate-compare-render.js.map +1 -0
- package/dist/cli/fit/recipe-selector.d.ts +53 -0
- package/dist/cli/fit/recipe-selector.d.ts.map +1 -0
- package/dist/cli/fit/recipe-selector.js +106 -0
- package/dist/cli/fit/recipe-selector.js.map +1 -0
- package/dist/cli/fit/recipe-selector.test.d.ts +2 -0
- package/dist/cli/fit/recipe-selector.test.d.ts.map +1 -0
- package/dist/cli/fit/recipe-selector.test.js +69 -0
- package/dist/cli/fit/recipe-selector.test.js.map +1 -0
- package/dist/cli/fit/resolved-fitness-config.d.ts +48 -0
- package/dist/cli/fit/resolved-fitness-config.d.ts.map +1 -0
- package/dist/cli/fit/resolved-fitness-config.js +46 -0
- package/dist/cli/fit/resolved-fitness-config.js.map +1 -0
- package/dist/cli/fit/result-builders.d.ts +91 -0
- package/dist/cli/fit/result-builders.d.ts.map +1 -0
- package/dist/cli/fit/result-builders.js +206 -0
- package/dist/cli/fit/result-builders.js.map +1 -0
- package/dist/cli/fit-list.d.ts +7 -0
- package/dist/cli/fit-list.d.ts.map +1 -0
- package/dist/cli/fit-list.js +24 -0
- package/dist/cli/fit-list.js.map +1 -0
- package/dist/cli/fit-modes.d.ts +42 -0
- package/dist/cli/fit-modes.d.ts.map +1 -0
- package/dist/cli/fit-modes.js +322 -0
- package/dist/cli/fit-modes.js.map +1 -0
- package/dist/cli/fit-recipes.d.ts +7 -0
- package/dist/cli/fit-recipes.d.ts.map +1 -0
- package/dist/cli/fit-recipes.js +34 -0
- package/dist/cli/fit-recipes.js.map +1 -0
- package/dist/cli/fit-runner-views.d.ts +33 -0
- package/dist/cli/fit-runner-views.d.ts.map +1 -0
- package/dist/cli/fit-runner-views.js +92 -0
- package/dist/cli/fit-runner-views.js.map +1 -0
- package/dist/cli/fit-runner.d.ts +44 -0
- package/dist/cli/fit-runner.d.ts.map +1 -0
- package/dist/cli/fit-runner.js +250 -0
- package/dist/cli/fit-runner.js.map +1 -0
- package/dist/cli/fit-worker.d.ts +26 -0
- package/dist/cli/fit-worker.d.ts.map +1 -0
- package/dist/cli/fit-worker.js +67 -0
- package/dist/cli/fit-worker.js.map +1 -0
- package/dist/cli/fit.d.ts +74 -0
- package/dist/cli/fit.d.ts.map +1 -0
- package/dist/cli/fit.js +149 -0
- package/dist/cli/fit.js.map +1 -0
- package/dist/cli/report-data.d.ts +44 -0
- package/dist/cli/report-data.d.ts.map +1 -0
- package/dist/cli/report-data.js +89 -0
- package/dist/cli/report-data.js.map +1 -0
- package/dist/config/__tests__/fitness-config-schema.test.d.ts +6 -0
- package/dist/config/__tests__/fitness-config-schema.test.d.ts.map +1 -0
- package/dist/config/__tests__/fitness-config-schema.test.js +37 -0
- package/dist/config/__tests__/fitness-config-schema.test.js.map +1 -0
- package/dist/config/fitness-config-schema.d.ts +48 -0
- package/dist/config/fitness-config-schema.d.ts.map +1 -0
- package/dist/config/fitness-config-schema.js +62 -0
- package/dist/config/fitness-config-schema.js.map +1 -0
- package/dist/framework/__tests__/abortable-exec.test.d.ts +9 -0
- package/dist/framework/__tests__/abortable-exec.test.d.ts.map +1 -0
- package/dist/framework/__tests__/abortable-exec.test.js +102 -0
- package/dist/framework/__tests__/abortable-exec.test.js.map +1 -0
- package/dist/framework/__tests__/check-config.test.d.ts +2 -0
- package/dist/framework/__tests__/check-config.test.d.ts.map +1 -0
- package/dist/framework/__tests__/check-config.test.js +56 -0
- package/dist/framework/__tests__/check-config.test.js.map +1 -0
- package/dist/framework/__tests__/check-types.test.d.ts +2 -0
- package/dist/framework/__tests__/check-types.test.d.ts.map +1 -0
- package/dist/framework/__tests__/check-types.test.js +76 -0
- package/dist/framework/__tests__/check-types.test.js.map +1 -0
- package/dist/framework/__tests__/command-executor.test.d.ts +2 -0
- package/dist/framework/__tests__/command-executor.test.d.ts.map +1 -0
- package/dist/framework/__tests__/command-executor.test.js +110 -0
- package/dist/framework/__tests__/command-executor.test.js.map +1 -0
- package/dist/framework/__tests__/content-filter-dispatch.test.d.ts +2 -0
- package/dist/framework/__tests__/content-filter-dispatch.test.d.ts.map +1 -0
- package/dist/framework/__tests__/content-filter-dispatch.test.js +122 -0
- package/dist/framework/__tests__/content-filter-dispatch.test.js.map +1 -0
- package/dist/framework/__tests__/define-check.test.d.ts +2 -0
- package/dist/framework/__tests__/define-check.test.d.ts.map +1 -0
- package/dist/framework/__tests__/define-check.test.js +402 -0
- package/dist/framework/__tests__/define-check.test.js.map +1 -0
- package/dist/framework/__tests__/define-regex-list-check.test.d.ts +15 -0
- package/dist/framework/__tests__/define-regex-list-check.test.d.ts.map +1 -0
- package/dist/framework/__tests__/define-regex-list-check.test.js +299 -0
- package/dist/framework/__tests__/define-regex-list-check.test.js.map +1 -0
- package/dist/framework/__tests__/directive-inventory.test.d.ts +2 -0
- package/dist/framework/__tests__/directive-inventory.test.d.ts.map +1 -0
- package/dist/framework/__tests__/directive-inventory.test.js +111 -0
- package/dist/framework/__tests__/directive-inventory.test.js.map +1 -0
- package/dist/framework/__tests__/directive-parsing.test.d.ts +13 -0
- package/dist/framework/__tests__/directive-parsing.test.d.ts.map +1 -0
- package/dist/framework/__tests__/directive-parsing.test.js +86 -0
- package/dist/framework/__tests__/directive-parsing.test.js.map +1 -0
- package/dist/framework/__tests__/execution-context.globalexcludes-parity.test.d.ts +2 -0
- package/dist/framework/__tests__/execution-context.globalexcludes-parity.test.d.ts.map +1 -0
- package/dist/framework/__tests__/execution-context.globalexcludes-parity.test.js +56 -0
- package/dist/framework/__tests__/execution-context.globalexcludes-parity.test.js.map +1 -0
- package/dist/framework/__tests__/execution-context.test.d.ts +2 -0
- package/dist/framework/__tests__/execution-context.test.d.ts.map +1 -0
- package/dist/framework/__tests__/execution-context.test.js +140 -0
- package/dist/framework/__tests__/execution-context.test.js.map +1 -0
- package/dist/framework/__tests__/file-accessor.test.d.ts +2 -0
- package/dist/framework/__tests__/file-accessor.test.d.ts.map +1 -0
- package/dist/framework/__tests__/file-accessor.test.js +106 -0
- package/dist/framework/__tests__/file-accessor.test.js.map +1 -0
- package/dist/framework/__tests__/file-cache.test.d.ts +2 -0
- package/dist/framework/__tests__/file-cache.test.d.ts.map +1 -0
- package/dist/framework/__tests__/file-cache.test.js +122 -0
- package/dist/framework/__tests__/file-cache.test.js.map +1 -0
- package/dist/framework/__tests__/file-type-filter.test.d.ts +9 -0
- package/dist/framework/__tests__/file-type-filter.test.d.ts.map +1 -0
- package/dist/framework/__tests__/file-type-filter.test.js +39 -0
- package/dist/framework/__tests__/file-type-filter.test.js.map +1 -0
- package/dist/framework/__tests__/ignore-processing.test.d.ts +11 -0
- package/dist/framework/__tests__/ignore-processing.test.d.ts.map +1 -0
- package/dist/framework/__tests__/ignore-processing.test.js +175 -0
- package/dist/framework/__tests__/ignore-processing.test.js.map +1 -0
- package/dist/framework/__tests__/import-graph.test.d.ts +15 -0
- package/dist/framework/__tests__/import-graph.test.d.ts.map +1 -0
- package/dist/framework/__tests__/import-graph.test.js +164 -0
- package/dist/framework/__tests__/import-graph.test.js.map +1 -0
- package/dist/framework/__tests__/memory-profiler.test.d.ts +9 -0
- package/dist/framework/__tests__/memory-profiler.test.d.ts.map +1 -0
- package/dist/framework/__tests__/memory-profiler.test.js +108 -0
- package/dist/framework/__tests__/memory-profiler.test.js.map +1 -0
- package/dist/framework/__tests__/parse-cache.test.d.ts +9 -0
- package/dist/framework/__tests__/parse-cache.test.d.ts.map +1 -0
- package/dist/framework/__tests__/parse-cache.test.js +51 -0
- package/dist/framework/__tests__/parse-cache.test.js.map +1 -0
- package/dist/framework/__tests__/path-matcher.test.d.ts +2 -0
- package/dist/framework/__tests__/path-matcher.test.d.ts.map +1 -0
- package/dist/framework/__tests__/path-matcher.test.js +113 -0
- package/dist/framework/__tests__/path-matcher.test.js.map +1 -0
- package/dist/framework/__tests__/register-helpers.test.d.ts +2 -0
- package/dist/framework/__tests__/register-helpers.test.d.ts.map +1 -0
- package/dist/framework/__tests__/register-helpers.test.js +51 -0
- package/dist/framework/__tests__/register-helpers.test.js.map +1 -0
- package/dist/framework/__tests__/registry.test.d.ts +2 -0
- package/dist/framework/__tests__/registry.test.d.ts.map +1 -0
- package/dist/framework/__tests__/registry.test.js +211 -0
- package/dist/framework/__tests__/registry.test.js.map +1 -0
- package/dist/framework/__tests__/result-builder.test.d.ts +2 -0
- package/dist/framework/__tests__/result-builder.test.d.ts.map +1 -0
- package/dist/framework/__tests__/result-builder.test.js +153 -0
- package/dist/framework/__tests__/result-builder.test.js.map +1 -0
- package/dist/framework/__tests__/scope-registry.test.d.ts +8 -0
- package/dist/framework/__tests__/scope-registry.test.d.ts.map +1 -0
- package/dist/framework/__tests__/scope-registry.test.js +156 -0
- package/dist/framework/__tests__/scope-registry.test.js.map +1 -0
- package/dist/framework/__tests__/scope-resolver.golden.test.d.ts +2 -0
- package/dist/framework/__tests__/scope-resolver.golden.test.d.ts.map +1 -0
- package/dist/framework/__tests__/scope-resolver.golden.test.js +105 -0
- package/dist/framework/__tests__/scope-resolver.golden.test.js.map +1 -0
- package/dist/framework/__tests__/scope-resolver.test.d.ts +2 -0
- package/dist/framework/__tests__/scope-resolver.test.d.ts.map +1 -0
- package/dist/framework/__tests__/scope-resolver.test.js +150 -0
- package/dist/framework/__tests__/scope-resolver.test.js.map +1 -0
- package/dist/framework/__tests__/severity-mapping.test.d.ts +2 -0
- package/dist/framework/__tests__/severity-mapping.test.d.ts.map +1 -0
- package/dist/framework/__tests__/severity-mapping.test.js +74 -0
- package/dist/framework/__tests__/severity-mapping.test.js.map +1 -0
- package/dist/framework/__tests__/strip-literals.test.d.ts +2 -0
- package/dist/framework/__tests__/strip-literals.test.d.ts.map +1 -0
- package/dist/framework/__tests__/strip-literals.test.js +87 -0
- package/dist/framework/__tests__/strip-literals.test.js.map +1 -0
- package/dist/framework/abortable-exec.d.ts +34 -0
- package/dist/framework/abortable-exec.d.ts.map +1 -0
- package/dist/framework/abortable-exec.js +143 -0
- package/dist/framework/abortable-exec.js.map +1 -0
- package/dist/framework/check-config.d.ts +175 -0
- package/dist/framework/check-config.d.ts.map +1 -0
- package/dist/framework/check-config.js +115 -0
- package/dist/framework/check-config.js.map +1 -0
- package/dist/framework/check-types.d.ts +82 -0
- package/dist/framework/check-types.d.ts.map +1 -0
- package/dist/framework/check-types.js +63 -0
- package/dist/framework/check-types.js.map +1 -0
- package/dist/framework/command-executor.d.ts +25 -0
- package/dist/framework/command-executor.d.ts.map +1 -0
- package/dist/framework/command-executor.js +63 -0
- package/dist/framework/command-executor.js.map +1 -0
- package/dist/framework/comment-openers.d.ts +11 -0
- package/dist/framework/comment-openers.d.ts.map +1 -0
- package/dist/framework/comment-openers.js +11 -0
- package/dist/framework/comment-openers.js.map +1 -0
- package/dist/framework/constants.d.ts +9 -0
- package/dist/framework/constants.d.ts.map +1 -0
- package/dist/framework/constants.js +16 -0
- package/dist/framework/constants.js.map +1 -0
- package/dist/framework/define-check.d.ts +38 -0
- package/dist/framework/define-check.d.ts.map +1 -0
- package/dist/framework/define-check.js +296 -0
- package/dist/framework/define-check.js.map +1 -0
- package/dist/framework/define-regex-list-check.d.ts +160 -0
- package/dist/framework/define-regex-list-check.d.ts.map +1 -0
- package/dist/framework/define-regex-list-check.js +177 -0
- package/dist/framework/define-regex-list-check.js.map +1 -0
- package/dist/framework/directive-inventory.d.ts +37 -0
- package/dist/framework/directive-inventory.d.ts.map +1 -0
- package/dist/framework/directive-inventory.js +82 -0
- package/dist/framework/directive-inventory.js.map +1 -0
- package/dist/framework/directive-parsing.d.ts +23 -0
- package/dist/framework/directive-parsing.d.ts.map +1 -0
- package/dist/framework/directive-parsing.js +39 -0
- package/dist/framework/directive-parsing.js.map +1 -0
- package/dist/framework/execution-context.d.ts +98 -0
- package/dist/framework/execution-context.d.ts.map +1 -0
- package/dist/framework/execution-context.js +145 -0
- package/dist/framework/execution-context.js.map +1 -0
- package/dist/framework/file-accessor.d.ts +20 -0
- package/dist/framework/file-accessor.d.ts.map +1 -0
- package/dist/framework/file-accessor.js +122 -0
- package/dist/framework/file-accessor.js.map +1 -0
- package/dist/framework/file-cache.d.ts +70 -0
- package/dist/framework/file-cache.d.ts.map +1 -0
- package/dist/framework/file-cache.js +199 -0
- package/dist/framework/file-cache.js.map +1 -0
- package/dist/framework/file-type-filter.d.ts +11 -0
- package/dist/framework/file-type-filter.d.ts.map +1 -0
- package/dist/framework/file-type-filter.js +21 -0
- package/dist/framework/file-type-filter.js.map +1 -0
- package/dist/framework/ignore-processing.d.ts +36 -0
- package/dist/framework/ignore-processing.d.ts.map +1 -0
- package/dist/framework/ignore-processing.js +172 -0
- package/dist/framework/ignore-processing.js.map +1 -0
- package/dist/framework/import-graph.d.ts +51 -0
- package/dist/framework/import-graph.d.ts.map +1 -0
- package/dist/framework/import-graph.js +217 -0
- package/dist/framework/import-graph.js.map +1 -0
- package/dist/framework/memory-profiler.d.ts +53 -0
- package/dist/framework/memory-profiler.d.ts.map +1 -0
- package/dist/framework/memory-profiler.js +92 -0
- package/dist/framework/memory-profiler.js.map +1 -0
- package/dist/framework/parse-cache.d.ts +24 -0
- package/dist/framework/parse-cache.d.ts.map +1 -0
- package/dist/framework/parse-cache.js +41 -0
- package/dist/framework/parse-cache.js.map +1 -0
- package/dist/framework/path-matcher.d.ts +86 -0
- package/dist/framework/path-matcher.d.ts.map +1 -0
- package/dist/framework/path-matcher.js +138 -0
- package/dist/framework/path-matcher.js.map +1 -0
- package/dist/framework/register-helpers.d.ts +11 -0
- package/dist/framework/register-helpers.d.ts.map +1 -0
- package/dist/framework/register-helpers.js +19 -0
- package/dist/framework/register-helpers.js.map +1 -0
- package/dist/framework/registry.d.ts +51 -0
- package/dist/framework/registry.d.ts.map +1 -0
- package/dist/framework/registry.js +131 -0
- package/dist/framework/registry.js.map +1 -0
- package/dist/framework/result-builder.d.ts +74 -0
- package/dist/framework/result-builder.d.ts.map +1 -0
- package/dist/framework/result-builder.js +154 -0
- package/dist/framework/result-builder.js.map +1 -0
- package/dist/framework/scope-registry.d.ts +38 -0
- package/dist/framework/scope-registry.d.ts.map +1 -0
- package/dist/framework/scope-registry.js +77 -0
- package/dist/framework/scope-registry.js.map +1 -0
- package/dist/framework/scope-resolver.d.ts +23 -0
- package/dist/framework/scope-resolver.d.ts.map +1 -0
- package/dist/framework/scope-resolver.js +102 -0
- package/dist/framework/scope-resolver.js.map +1 -0
- package/dist/framework/severity-mapping.d.ts +17 -0
- package/dist/framework/severity-mapping.d.ts.map +1 -0
- package/dist/framework/severity-mapping.js +71 -0
- package/dist/framework/severity-mapping.js.map +1 -0
- package/dist/framework/strip-literals.d.ts +73 -0
- package/dist/framework/strip-literals.d.ts.map +1 -0
- package/dist/framework/strip-literals.js +213 -0
- package/dist/framework/strip-literals.js.map +1 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +64 -0
- package/dist/index.js.map +1 -0
- package/dist/internal.d.ts +17 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +17 -0
- package/dist/internal.js.map +1 -0
- package/dist/persistence/session-payload.d.ts +68 -0
- package/dist/persistence/session-payload.d.ts.map +1 -0
- package/dist/persistence/session-payload.js +78 -0
- package/dist/persistence/session-payload.js.map +1 -0
- package/dist/persistence/session-payload.test.d.ts +11 -0
- package/dist/persistence/session-payload.test.d.ts.map +1 -0
- package/dist/persistence/session-payload.test.js +80 -0
- package/dist/persistence/session-payload.test.js.map +1 -0
- package/dist/persistence/session-replay.d.ts +14 -0
- package/dist/persistence/session-replay.d.ts.map +1 -0
- package/dist/persistence/session-replay.js +85 -0
- package/dist/persistence/session-replay.js.map +1 -0
- package/dist/persistence/session-replay.test.d.ts +10 -0
- package/dist/persistence/session-replay.test.d.ts.map +1 -0
- package/dist/persistence/session-replay.test.js +171 -0
- package/dist/persistence/session-replay.test.js.map +1 -0
- package/dist/plugins/__tests__/check-package-discovery.test.d.ts +2 -0
- package/dist/plugins/__tests__/check-package-discovery.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/check-package-discovery.test.js +48 -0
- package/dist/plugins/__tests__/check-package-discovery.test.js.map +1 -0
- package/dist/plugins/__tests__/lang-domain.test.d.ts +2 -0
- package/dist/plugins/__tests__/lang-domain.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/lang-domain.test.js +192 -0
- package/dist/plugins/__tests__/lang-domain.test.js.map +1 -0
- package/dist/plugins/__tests__/loader.test.d.ts +2 -0
- package/dist/plugins/__tests__/loader.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/loader.test.js +271 -0
- package/dist/plugins/__tests__/loader.test.js.map +1 -0
- package/dist/plugins/check-package-discovery.d.ts +19 -0
- package/dist/plugins/check-package-discovery.d.ts.map +1 -0
- package/dist/plugins/check-package-discovery.js +34 -0
- package/dist/plugins/check-package-discovery.js.map +1 -0
- package/dist/plugins/loader.d.ts +32 -0
- package/dist/plugins/loader.d.ts.map +1 -0
- package/dist/plugins/loader.js +198 -0
- package/dist/plugins/loader.js.map +1 -0
- package/dist/plugins/types.d.ts +29 -0
- package/dist/plugins/types.d.ts.map +1 -0
- package/dist/plugins/types.js +9 -0
- package/dist/plugins/types.js.map +1 -0
- package/dist/recipes/__tests__/built-in-recipes.test.d.ts +2 -0
- package/dist/recipes/__tests__/built-in-recipes.test.d.ts.map +1 -0
- package/dist/recipes/__tests__/built-in-recipes.test.js +93 -0
- package/dist/recipes/__tests__/built-in-recipes.test.js.map +1 -0
- package/dist/recipes/__tests__/check-config.test.d.ts +12 -0
- package/dist/recipes/__tests__/check-config.test.d.ts.map +1 -0
- package/dist/recipes/__tests__/check-config.test.js +90 -0
- package/dist/recipes/__tests__/check-config.test.js.map +1 -0
- package/dist/recipes/__tests__/check-resolution.test.d.ts +2 -0
- package/dist/recipes/__tests__/check-resolution.test.d.ts.map +1 -0
- package/dist/recipes/__tests__/check-resolution.test.js +160 -0
- package/dist/recipes/__tests__/check-resolution.test.js.map +1 -0
- package/dist/recipes/__tests__/execution-branches.test.d.ts +10 -0
- package/dist/recipes/__tests__/execution-branches.test.d.ts.map +1 -0
- package/dist/recipes/__tests__/execution-branches.test.js +612 -0
- package/dist/recipes/__tests__/execution-branches.test.js.map +1 -0
- package/dist/recipes/__tests__/execution-paths.test.d.ts +10 -0
- package/dist/recipes/__tests__/execution-paths.test.d.ts.map +1 -0
- package/dist/recipes/__tests__/execution-paths.test.js +280 -0
- package/dist/recipes/__tests__/execution-paths.test.js.map +1 -0
- package/dist/recipes/__tests__/registry.test.d.ts +2 -0
- package/dist/recipes/__tests__/registry.test.d.ts.map +1 -0
- package/dist/recipes/__tests__/registry.test.js +89 -0
- package/dist/recipes/__tests__/registry.test.js.map +1 -0
- package/dist/recipes/__tests__/retry.test.d.ts +2 -0
- package/dist/recipes/__tests__/retry.test.d.ts.map +1 -0
- package/dist/recipes/__tests__/retry.test.js +75 -0
- package/dist/recipes/__tests__/retry.test.js.map +1 -0
- package/dist/recipes/__tests__/run-one-check.test.d.ts +14 -0
- package/dist/recipes/__tests__/run-one-check.test.d.ts.map +1 -0
- package/dist/recipes/__tests__/run-one-check.test.js +182 -0
- package/dist/recipes/__tests__/run-one-check.test.js.map +1 -0
- package/dist/recipes/__tests__/service.test.d.ts +11 -0
- package/dist/recipes/__tests__/service.test.d.ts.map +1 -0
- package/dist/recipes/__tests__/service.test.js +572 -0
- package/dist/recipes/__tests__/service.test.js.map +1 -0
- package/dist/recipes/built-in-recipes.d.ts +14 -0
- package/dist/recipes/built-in-recipes.d.ts.map +1 -0
- package/dist/recipes/built-in-recipes.js +241 -0
- package/dist/recipes/built-in-recipes.js.map +1 -0
- package/dist/recipes/check-config.d.ts +56 -0
- package/dist/recipes/check-config.d.ts.map +1 -0
- package/dist/recipes/check-config.js +61 -0
- package/dist/recipes/check-config.js.map +1 -0
- package/dist/recipes/check-resolution.d.ts +36 -0
- package/dist/recipes/check-resolution.d.ts.map +1 -0
- package/dist/recipes/check-resolution.js +81 -0
- package/dist/recipes/check-resolution.js.map +1 -0
- package/dist/recipes/check-result-processor.d.ts +51 -0
- package/dist/recipes/check-result-processor.d.ts.map +1 -0
- package/dist/recipes/check-result-processor.js +197 -0
- package/dist/recipes/check-result-processor.js.map +1 -0
- package/dist/recipes/parallel-execution.d.ts +38 -0
- package/dist/recipes/parallel-execution.d.ts.map +1 -0
- package/dist/recipes/parallel-execution.js +61 -0
- package/dist/recipes/parallel-execution.js.map +1 -0
- package/dist/recipes/registry.d.ts +47 -0
- package/dist/recipes/registry.d.ts.map +1 -0
- package/dist/recipes/registry.js +70 -0
- package/dist/recipes/registry.js.map +1 -0
- package/dist/recipes/retry.d.ts +29 -0
- package/dist/recipes/retry.d.ts.map +1 -0
- package/dist/recipes/retry.js +23 -0
- package/dist/recipes/retry.js.map +1 -0
- package/dist/recipes/run-one-check.d.ts +59 -0
- package/dist/recipes/run-one-check.d.ts.map +1 -0
- package/dist/recipes/run-one-check.js +174 -0
- package/dist/recipes/run-one-check.js.map +1 -0
- package/dist/recipes/sequential-execution.d.ts +12 -0
- package/dist/recipes/sequential-execution.d.ts.map +1 -0
- package/dist/recipes/sequential-execution.js +48 -0
- package/dist/recipes/sequential-execution.js.map +1 -0
- package/dist/recipes/service-types.d.ts +87 -0
- package/dist/recipes/service-types.d.ts.map +1 -0
- package/dist/recipes/service-types.js +8 -0
- package/dist/recipes/service-types.js.map +1 -0
- package/dist/recipes/service.d.ts +73 -0
- package/dist/recipes/service.d.ts.map +1 -0
- package/dist/recipes/service.js +438 -0
- package/dist/recipes/service.js.map +1 -0
- package/dist/recipes/types.d.ts +155 -0
- package/dist/recipes/types.d.ts.map +1 -0
- package/dist/recipes/types.js +56 -0
- package/dist/recipes/types.js.map +1 -0
- package/dist/scaffold/config-block.d.ts +17 -0
- package/dist/scaffold/config-block.d.ts.map +1 -0
- package/dist/scaffold/config-block.js +30 -0
- package/dist/scaffold/config-block.js.map +1 -0
- package/dist/scaffold/examples.d.ts +30 -0
- package/dist/scaffold/examples.d.ts.map +1 -0
- package/dist/scaffold/examples.js +129 -0
- package/dist/scaffold/examples.js.map +1 -0
- package/dist/scope-augmentation.d.ts +77 -0
- package/dist/scope-augmentation.d.ts.map +1 -0
- package/dist/scope-augmentation.js +31 -0
- package/dist/scope-augmentation.js.map +1 -0
- package/dist/signalers/__tests__/loader.test.d.ts +2 -0
- package/dist/signalers/__tests__/loader.test.d.ts.map +1 -0
- package/dist/signalers/__tests__/loader.test.js +141 -0
- package/dist/signalers/__tests__/loader.test.js.map +1 -0
- package/dist/signalers/__tests__/violation-to-signal.test.d.ts +2 -0
- package/dist/signalers/__tests__/violation-to-signal.test.d.ts.map +1 -0
- package/dist/signalers/__tests__/violation-to-signal.test.js +59 -0
- package/dist/signalers/__tests__/violation-to-signal.test.js.map +1 -0
- package/dist/signalers/index.d.ts +8 -0
- package/dist/signalers/index.d.ts.map +1 -0
- package/dist/signalers/index.js +9 -0
- package/dist/signalers/index.js.map +1 -0
- package/dist/signalers/loader.d.ts +30 -0
- package/dist/signalers/loader.d.ts.map +1 -0
- package/dist/signalers/loader.js +120 -0
- package/dist/signalers/loader.js.map +1 -0
- package/dist/signalers/schema.d.ts +60 -0
- package/dist/signalers/schema.d.ts.map +1 -0
- package/dist/signalers/schema.js +74 -0
- package/dist/signalers/schema.js.map +1 -0
- package/dist/signalers/types.d.ts +13 -0
- package/dist/signalers/types.d.ts.map +1 -0
- package/dist/signalers/types.js +5 -0
- package/dist/signalers/types.js.map +1 -0
- package/dist/signalers/violation-to-signal.d.ts +38 -0
- package/dist/signalers/violation-to-signal.d.ts.map +1 -0
- package/dist/signalers/violation-to-signal.js +43 -0
- package/dist/signalers/violation-to-signal.js.map +1 -0
- package/dist/targets/__tests__/loader.test.d.ts +2 -0
- package/dist/targets/__tests__/loader.test.d.ts.map +1 -0
- package/dist/targets/__tests__/loader.test.js +190 -0
- package/dist/targets/__tests__/loader.test.js.map +1 -0
- package/dist/targets/__tests__/target-registry.test.d.ts +2 -0
- package/dist/targets/__tests__/target-registry.test.d.ts.map +1 -0
- package/dist/targets/__tests__/target-registry.test.js +182 -0
- package/dist/targets/__tests__/target-registry.test.js.map +1 -0
- package/dist/targets/index.d.ts +18 -0
- package/dist/targets/index.d.ts.map +1 -0
- package/dist/targets/index.js +21 -0
- package/dist/targets/index.js.map +1 -0
- package/dist/targets/loader.d.ts +27 -0
- package/dist/targets/loader.d.ts.map +1 -0
- package/dist/targets/loader.js +178 -0
- package/dist/targets/loader.js.map +1 -0
- package/dist/targets/target-registry.d.ts +41 -0
- package/dist/targets/target-registry.d.ts.map +1 -0
- package/dist/targets/target-registry.js +71 -0
- package/dist/targets/target-registry.js.map +1 -0
- package/dist/targets/types.d.ts +14 -0
- package/dist/targets/types.d.ts.map +1 -0
- package/dist/targets/types.js +14 -0
- package/dist/targets/types.js.map +1 -0
- package/dist/tool.d.ts +61 -0
- package/dist/tool.d.ts.map +1 -0
- package/dist/tool.js +260 -0
- package/dist/tool.js.map +1 -0
- package/dist/types/findings.d.ts +113 -0
- package/dist/types/findings.d.ts.map +1 -0
- package/dist/types/findings.js +89 -0
- package/dist/types/findings.js.map +1 -0
- package/dist/types/severity.d.ts +15 -0
- package/dist/types/severity.d.ts.map +1 -0
- package/dist/types/severity.js +33 -0
- package/dist/types/severity.js.map +1 -0
- package/package.json +137 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `opensip-cli.config.yml` parsing + validation for the `fit` command.
|
|
3
|
+
*
|
|
4
|
+
* Wraps `loadSignalersConfig` and `loadTargetsConfig` so that
|
|
5
|
+
* `executeFit` gets a single resolve-or-error step. A missing/invalid
|
|
6
|
+
* config is a HARD error — otherwise file-based checks silently produce
|
|
7
|
+
* zero findings, the exact failure mode the CLI exists to prevent.
|
|
8
|
+
*/
|
|
9
|
+
import { EXIT_CODES } from '@opensip-cli/contracts';
|
|
10
|
+
import { logger } from '@opensip-cli/core';
|
|
11
|
+
import { loadSignalersConfig } from '../../signalers/index.js';
|
|
12
|
+
import { loadTargetsConfig } from '../../targets/index.js';
|
|
13
|
+
/**
|
|
14
|
+
* Resolve `signalersConfig` + `targetsConfig` for this run. Scope-first
|
|
15
|
+
* (ADR-0023 one-reader): on CLI paths both loaders project from the
|
|
16
|
+
* host-validated `scope.configDocument`; the file read is the scope-less
|
|
17
|
+
* fallback (programmatic use, unit tests). Returns an `ErrorResult` instead
|
|
18
|
+
* of throwing so the caller maps it directly to the public failure shape — a
|
|
19
|
+
* missing/invalid config is a HARD error (otherwise file-based checks
|
|
20
|
+
* silently produce zero findings).
|
|
21
|
+
*/
|
|
22
|
+
export function loadFitConfig(args) {
|
|
23
|
+
try {
|
|
24
|
+
const signalersConfig = loadSignalersConfig(args.cwd, args.config);
|
|
25
|
+
const targetsResult = loadTargetsConfig(args.cwd, args.config);
|
|
26
|
+
return {
|
|
27
|
+
signalersConfig,
|
|
28
|
+
targetsConfig: targetsResult.config,
|
|
29
|
+
targetRegistry: targetsResult.registry,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
34
|
+
logger.warn({ evt: 'cli.config.load_failed', module: 'cli:fit', message });
|
|
35
|
+
return {
|
|
36
|
+
error: {
|
|
37
|
+
type: 'error',
|
|
38
|
+
message,
|
|
39
|
+
suggestion: "Run 'opensip init' to scaffold a config, or pass --config <path> to point at an existing one.",
|
|
40
|
+
exitCode: EXIT_CODES.CONFIGURATION_ERROR,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Warn loudly when the targets config declares a `languages:` tag that is
|
|
47
|
+
* neither backed by a content-filter adapter NOR a recognized non-code
|
|
48
|
+
* format — i.e. a likely typo. Silent acceptance would let users ship
|
|
49
|
+
* configs whose files match no check and skip filtering with no signal.
|
|
50
|
+
*
|
|
51
|
+
* `languages:` is a *matching dimension* (it routes files to checks via
|
|
52
|
+
* `findByScope`). A subset of those tags have a registered
|
|
53
|
+
* {@link LanguageAdapter} that strips strings/comments; another set are
|
|
54
|
+
* recognized non-code formats (JSON, YAML, Markdown, …) that are valid
|
|
55
|
+
* matching tags but intentionally have no adapter — files in those scan
|
|
56
|
+
* raw, which is correct, so they are NOT warned about. Only genuinely
|
|
57
|
+
* unrecognized tags (e.g. `pythonn`) warn.
|
|
58
|
+
*
|
|
59
|
+
* Returns warning strings (one per unknown-language batch) rather than
|
|
60
|
+
* writing to stderr — stderr writes during the Ink live view desync the
|
|
61
|
+
* renderer's frame tracking. `executeFit` collects these and threads
|
|
62
|
+
* them into `FitDoneResult.warnings`.
|
|
63
|
+
*
|
|
64
|
+
* Async only because `currentScope` is imported via dynamic import to
|
|
65
|
+
* keep the executeFit body free of fitness↔core import arrows beyond
|
|
66
|
+
* the kernel barrel. The scope is bound by the CLI pre-action-hook.
|
|
67
|
+
*
|
|
68
|
+
* @throws {Error} When called outside `runWithScope(...)` (no current scope).
|
|
69
|
+
*/
|
|
70
|
+
export async function validateLanguagesAgainstAdapters(targetRegistry) {
|
|
71
|
+
const { currentScope, isRecognizedNonCodeFormat } = await import('@opensip-cli/core');
|
|
72
|
+
const scope = currentScope();
|
|
73
|
+
if (!scope) {
|
|
74
|
+
throw new Error('validateLanguagesAgainstAdapters() called outside runWithScope. ' +
|
|
75
|
+
'fit pipeline must run inside a RunScope so language adapters resolve via cli.scope.languages.');
|
|
76
|
+
}
|
|
77
|
+
const langRegistry = scope.languages;
|
|
78
|
+
const knownLanguages = new Set(langRegistry.list().flatMap((a) => [a.id, ...(a.aliases ?? [])]));
|
|
79
|
+
const unknownLanguages = new Set();
|
|
80
|
+
for (const target of targetRegistry.getAll()) {
|
|
81
|
+
const langs = target.config.languages ?? [];
|
|
82
|
+
for (const lang of langs) {
|
|
83
|
+
// A tag is legitimate if it either has a content-filter adapter or
|
|
84
|
+
// is a recognized adapter-less format (JSON/YAML/Markdown/…). Only
|
|
85
|
+
// truly unrecognized tags fall through to the warning.
|
|
86
|
+
if (knownLanguages.has(lang) || isRecognizedNonCodeFormat(lang))
|
|
87
|
+
continue;
|
|
88
|
+
unknownLanguages.add(lang);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (unknownLanguages.size === 0)
|
|
92
|
+
return [];
|
|
93
|
+
const list = [...unknownLanguages].sort().join(', ');
|
|
94
|
+
logger.warn({
|
|
95
|
+
evt: 'cli.config.unknown_languages',
|
|
96
|
+
module: 'cli:fit',
|
|
97
|
+
unknown: [...unknownLanguages],
|
|
98
|
+
known: [...knownLanguages],
|
|
99
|
+
});
|
|
100
|
+
return [
|
|
101
|
+
`target config declares unrecognized language tag(s): ${list}. ` +
|
|
102
|
+
`These match no content-filter adapter and are not a recognized non-code ` +
|
|
103
|
+
`format — likely a typo. Known code languages: ${[...knownLanguages].sort().join(', ')}. ` +
|
|
104
|
+
`Files under an unrecognized tag scan with no string/comment filtering.`,
|
|
105
|
+
];
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=config-loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-loader.js","sourceRoot":"","sources":["../../../src/cli/fit/config-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAW3D;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,IAAgB;IAC5C,IAAI,CAAC;QACH,MAAM,eAAe,GAAG,mBAAmB,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACnE,MAAM,aAAa,GAAG,iBAAiB,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC/D,OAAO;YACL,eAAe;YACf,aAAa,EAAE,aAAa,CAAC,MAAM;YACnC,cAAc,EAAE,aAAa,CAAC,QAAQ;SACvC,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,wBAAwB,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;QAC3E,OAAO;YACL,KAA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,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAE3C,MAAM,IAAI,GAAG,CAAC,GAAG,gBAAgB,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrD,MAAM,CAAC,IAAI,CAAC;QACV,GAAG,EAAE,8BAA8B;QACnC,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,CAAC,GAAG,gBAAgB,CAAC;QAC9B,KAAK,EAAE,CAAC,GAAG,cAAc,CAAC;KAC3B,CAAC,CAAC;IACH,OAAO;QACL,wDAAwD,IAAI,IAAI;YAC9D,0EAA0E;YAC1E,iDAAiD,CAAC,GAAG,cAAc,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;YAC1F,wEAAwE;KAC3E,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check display lookups — read from the scope-owned check registry.
|
|
3
|
+
*
|
|
4
|
+
* Display (icon + display name) travels WITH each check on `check.config`
|
|
5
|
+
* (§5.3 separate-domains fold); a pack's authoring map is folded onto its
|
|
6
|
+
* checks via `applyCheckDisplay` at the pack boundary. There is NO per-process
|
|
7
|
+
* merged-display singleton anymore (that was audit finding F3): `getDisplayName`
|
|
8
|
+
* / `getIcon` resolve a slug against the CURRENT run's check registry
|
|
9
|
+
* (`currentCheckRegistry()`), so two concurrent scopes read independent display
|
|
10
|
+
* with no shared mutable state.
|
|
11
|
+
*
|
|
12
|
+
* Slugs with no registered check (or a check that set no display) fall back to
|
|
13
|
+
* kebab-to-title-case for the name and a magnifying-glass emoji for the icon.
|
|
14
|
+
*/
|
|
15
|
+
/** Get the display name for a check slug, read from the current scope's check registry. */
|
|
16
|
+
export declare function getDisplayName(slug: string): string;
|
|
17
|
+
/** Get the icon for a check slug, read from the current scope's check registry. */
|
|
18
|
+
export declare function getIcon(slug: string): string;
|
|
19
|
+
//# sourceMappingURL=display-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"display-registry.d.ts","sourceRoot":"","sources":["../../../src/cli/fit/display-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAeH,2FAA2F;AAC3F,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,mFAAmF;AACnF,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5C"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check display lookups — read from the scope-owned check registry.
|
|
3
|
+
*
|
|
4
|
+
* Display (icon + display name) travels WITH each check on `check.config`
|
|
5
|
+
* (§5.3 separate-domains fold); a pack's authoring map is folded onto its
|
|
6
|
+
* checks via `applyCheckDisplay` at the pack boundary. There is NO per-process
|
|
7
|
+
* merged-display singleton anymore (that was audit finding F3): `getDisplayName`
|
|
8
|
+
* / `getIcon` resolve a slug against the CURRENT run's check registry
|
|
9
|
+
* (`currentCheckRegistry()`), so two concurrent scopes read independent display
|
|
10
|
+
* with no shared mutable state.
|
|
11
|
+
*
|
|
12
|
+
* Slugs with no registered check (or a check that set no display) fall back to
|
|
13
|
+
* kebab-to-title-case for the name and a magnifying-glass emoji for the icon.
|
|
14
|
+
*/
|
|
15
|
+
import { currentCheckRegistry } from '../../framework/scope-registry.js';
|
|
16
|
+
/** Default icon when a check sets none. */
|
|
17
|
+
const DEFAULT_ICON = '🔍';
|
|
18
|
+
/** Kebab-to-title-case fallback display name for a slug. */
|
|
19
|
+
function defaultDisplayName(slug) {
|
|
20
|
+
return slug
|
|
21
|
+
.split('-')
|
|
22
|
+
.map((w) => w.charAt(0).toUpperCase() + w.slice(1))
|
|
23
|
+
.join(' ');
|
|
24
|
+
}
|
|
25
|
+
/** Get the display name for a check slug, read from the current scope's check registry. */
|
|
26
|
+
export function getDisplayName(slug) {
|
|
27
|
+
return currentCheckRegistry().find(slug)?.config.displayName ?? defaultDisplayName(slug);
|
|
28
|
+
}
|
|
29
|
+
/** Get the icon for a check slug, read from the current scope's check registry. */
|
|
30
|
+
export function getIcon(slug) {
|
|
31
|
+
return currentCheckRegistry().find(slug)?.config.icon ?? DEFAULT_ICON;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=display-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"display-registry.js","sourceRoot":"","sources":["../../../src/cli/fit/display-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAEzE,2CAA2C;AAC3C,MAAM,YAAY,GAAG,IAAI,CAAC;AAE1B,4DAA4D;AAC5D,SAAS,kBAAkB,CAAC,IAAY;IACtC,OAAO,IAAI;SACR,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAClD,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC;AAED,2FAA2F;AAC3F,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,OAAO,oBAAoB,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,WAAW,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAC3F,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,OAAO,CAAC,IAAY;IAClC,OAAO,oBAAoB,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,IAAI,YAAY,CAAC;AACxE,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Fitness live-view derivation from the run's `SignalEnvelope`
|
|
3
|
+
* (ADR-0011, Phase 6).
|
|
4
|
+
*
|
|
5
|
+
* The shared `formatSignalTableRows` (`@opensip-cli/output`) is the canonical
|
|
6
|
+
* neutral table for the static/non-TTY render path — but fitness's PRODUCTION
|
|
7
|
+
* source must not import `@opensip-cli/output` (the root owns egress; output
|
|
8
|
+
* is the egress/format layer). So the TTY live view derives its richer,
|
|
9
|
+
* fitness-specific table (display names + the `Validated`/`Ignores` columns)
|
|
10
|
+
* straight from the envelope here, using only `@opensip-cli/contracts`
|
|
11
|
+
* (envelope/units) + `@opensip-cli/core` (signals). This is the
|
|
12
|
+
* decision-B fallback: ONE neutral formatter for the shared path, plus a
|
|
13
|
+
* tool-specific rich view for fitness's terminal UX — both fed by the same
|
|
14
|
+
* `UnitResult` facts (`filesValidated`/`itemType`/`ignoredCount`), so there is
|
|
15
|
+
* a single source of truth.
|
|
16
|
+
*
|
|
17
|
+
* Pure: no IO, no clock. `getDisplayName` is a registry lookup (display only).
|
|
18
|
+
*/
|
|
19
|
+
import type { SignalEnvelope, VerboseDetail } from '@opensip-cli/contracts';
|
|
20
|
+
/** A live-view results-table row — one per check unit, with fitness columns. */
|
|
21
|
+
export interface FitTableRow {
|
|
22
|
+
/** Display name (pretty, via the display registry), falling back to the slug. */
|
|
23
|
+
readonly check: string;
|
|
24
|
+
readonly status: 'PASS' | 'FAIL' | 'ERROR';
|
|
25
|
+
readonly errors: number;
|
|
26
|
+
readonly warnings: number;
|
|
27
|
+
/** Files/items scanned this run (raw count; rendered with the noun). */
|
|
28
|
+
readonly validated?: number;
|
|
29
|
+
readonly itemType?: string;
|
|
30
|
+
/** Findings suppressed by an inline ignore directive. */
|
|
31
|
+
readonly ignored: number;
|
|
32
|
+
readonly duration: string;
|
|
33
|
+
readonly durationMs: number;
|
|
34
|
+
}
|
|
35
|
+
/** Build the live-view results-table rows from the envelope (one row per unit). */
|
|
36
|
+
export declare function envelopeToFitRows(envelope: SignalEnvelope): FitTableRow[];
|
|
37
|
+
/** Render a row's "Validated" cell (e.g. `"450 files"`, `"—"`). */
|
|
38
|
+
export declare function fitValidatedCell(row: FitTableRow): string;
|
|
39
|
+
/**
|
|
40
|
+
* Build the run's verbose detail body (ADR-0021) — `undefined` unless the run
|
|
41
|
+
* asked for it (`--verbose`). Delegates the Signal[] → `FindingGroup[]` mapping
|
|
42
|
+
* to the shared contracts `buildFindingGroups` (one source for fit + sim),
|
|
43
|
+
* passing fit's display registry so each block is titled with the check's
|
|
44
|
+
* pretty name.
|
|
45
|
+
*/
|
|
46
|
+
export declare function buildFitVerboseDetail(envelope: SignalEnvelope, opts: {
|
|
47
|
+
readonly verbose?: boolean;
|
|
48
|
+
}): VerboseDetail | undefined;
|
|
49
|
+
//# sourceMappingURL=envelope-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"envelope-view.d.ts","sourceRoot":"","sources":["../../../src/cli/fit/envelope-view.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAQH,OAAO,KAAK,EAAE,cAAc,EAAc,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGxF,gFAAgF;AAChF,MAAM,WAAW,WAAW;IAC1B,iFAAiF;IACjF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAC3C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,wEAAwE;IACxE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,yDAAyD;IACzD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAkBD,mFAAmF;AACnF,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,cAAc,GAAG,WAAW,EAAE,CAsBzE;AAED,mEAAmE;AACnE,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,WAAW,GAAG,MAAM,CAEzD;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAE;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GACnC,aAAa,GAAG,SAAS,CAM3B"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Fitness live-view derivation from the run's `SignalEnvelope`
|
|
3
|
+
* (ADR-0011, Phase 6).
|
|
4
|
+
*
|
|
5
|
+
* The shared `formatSignalTableRows` (`@opensip-cli/output`) is the canonical
|
|
6
|
+
* neutral table for the static/non-TTY render path — but fitness's PRODUCTION
|
|
7
|
+
* source must not import `@opensip-cli/output` (the root owns egress; output
|
|
8
|
+
* is the egress/format layer). So the TTY live view derives its richer,
|
|
9
|
+
* fitness-specific table (display names + the `Validated`/`Ignores` columns)
|
|
10
|
+
* straight from the envelope here, using only `@opensip-cli/contracts`
|
|
11
|
+
* (envelope/units) + `@opensip-cli/core` (signals). This is the
|
|
12
|
+
* decision-B fallback: ONE neutral formatter for the shared path, plus a
|
|
13
|
+
* tool-specific rich view for fitness's terminal UX — both fed by the same
|
|
14
|
+
* `UnitResult` facts (`filesValidated`/`itemType`/`ignoredCount`), so there is
|
|
15
|
+
* a single source of truth.
|
|
16
|
+
*
|
|
17
|
+
* Pure: no IO, no clock. `getDisplayName` is a registry lookup (display only).
|
|
18
|
+
*/
|
|
19
|
+
import { formatValidatedColumn } from '@opensip-cli/cli-ui';
|
|
20
|
+
import { buildFindingGroups } from '@opensip-cli/contracts';
|
|
21
|
+
import { formatDuration, isErrorSignal } from '@opensip-cli/core';
|
|
22
|
+
import { getDisplayName } from './display-registry.js';
|
|
23
|
+
/** Group a run's signals by `signal.source` (the emitting check's slug). */
|
|
24
|
+
function groupBySource(signals) {
|
|
25
|
+
const bySource = new Map();
|
|
26
|
+
for (const signal of signals) {
|
|
27
|
+
const bucket = bySource.get(signal.source);
|
|
28
|
+
if (bucket)
|
|
29
|
+
bucket.push(signal);
|
|
30
|
+
else
|
|
31
|
+
bySource.set(signal.source, [signal]);
|
|
32
|
+
}
|
|
33
|
+
return bySource;
|
|
34
|
+
}
|
|
35
|
+
function rowStatus(unit) {
|
|
36
|
+
if (unit.error !== undefined)
|
|
37
|
+
return 'ERROR';
|
|
38
|
+
return unit.passed ? 'PASS' : 'FAIL';
|
|
39
|
+
}
|
|
40
|
+
/** Build the live-view results-table rows from the envelope (one row per unit). */
|
|
41
|
+
export function envelopeToFitRows(envelope) {
|
|
42
|
+
const bySource = groupBySource(envelope.signals);
|
|
43
|
+
return envelope.units.map((unit) => {
|
|
44
|
+
const unitSignals = bySource.get(unit.slug) ?? [];
|
|
45
|
+
let errors = 0;
|
|
46
|
+
let warnings = 0;
|
|
47
|
+
for (const s of unitSignals) {
|
|
48
|
+
if (isErrorSignal(s))
|
|
49
|
+
errors += 1;
|
|
50
|
+
else
|
|
51
|
+
warnings += 1;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
check: getDisplayName(unit.slug),
|
|
55
|
+
status: rowStatus(unit),
|
|
56
|
+
errors,
|
|
57
|
+
warnings,
|
|
58
|
+
validated: unit.filesValidated,
|
|
59
|
+
itemType: unit.itemType,
|
|
60
|
+
ignored: unit.ignoredCount ?? 0,
|
|
61
|
+
duration: formatDuration(unit.durationMs),
|
|
62
|
+
durationMs: unit.durationMs,
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/** Render a row's "Validated" cell (e.g. `"450 files"`, `"—"`). */
|
|
67
|
+
export function fitValidatedCell(row) {
|
|
68
|
+
return formatValidatedColumn(row.validated, row.itemType);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Build the run's verbose detail body (ADR-0021) — `undefined` unless the run
|
|
72
|
+
* asked for it (`--verbose`). Delegates the Signal[] → `FindingGroup[]` mapping
|
|
73
|
+
* to the shared contracts `buildFindingGroups` (one source for fit + sim),
|
|
74
|
+
* passing fit's display registry so each block is titled with the check's
|
|
75
|
+
* pretty name.
|
|
76
|
+
*/
|
|
77
|
+
export function buildFitVerboseDetail(envelope, opts) {
|
|
78
|
+
if (opts.verbose !== true)
|
|
79
|
+
return undefined;
|
|
80
|
+
return {
|
|
81
|
+
kind: 'findings',
|
|
82
|
+
groups: buildFindingGroups(envelope.units, envelope.signals, getDisplayName),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=envelope-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"envelope-view.js","sourceRoot":"","sources":["../../../src/cli/fit/envelope-view.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAqBvD,4EAA4E;AAC5E,SAAS,aAAa,CAAC,OAA0B;IAC/C,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAoB,CAAC;IAC7C,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC3C,IAAI,MAAM;YAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;;YAC3B,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,SAAS,CAAC,IAAgB;IAC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;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACnC,QAAwB,EACxB,IAAoC;IAEpC,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5C,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,kBAAkB,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;KAC7E,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* fit-aux-command-specs — the declarative `fit-list` / `fit-recipes` /
|
|
3
|
+
* `fit-baseline-export` commands (release 2.11.0 Phase 4 Task 4.2).
|
|
4
|
+
*
|
|
5
|
+
* Replaces fitness's hand-rolled `registerListCommand` / `registerRecipesCommand`
|
|
6
|
+
* / `registerBaselineExportCommand` bodies. The host mounts each spec via
|
|
7
|
+
* `mountCommandSpec`; the tool no longer touches Commander.
|
|
8
|
+
*
|
|
9
|
+
* Output modes:
|
|
10
|
+
* - `fit-list` / `fit-recipes` → `command-result`: the handler returns the
|
|
11
|
+
* list result; the host dispatches it through the shared seam
|
|
12
|
+
* (`--json` → JSON.stringify, else render). Byte-identical to the former
|
|
13
|
+
* `if (json) cli.emitJson(result) else cli.render(result)` body, because
|
|
14
|
+
* `emitJson` and the seam's json arm both write `JSON.stringify(x, null, 2)
|
|
15
|
+
* + '\n'`.
|
|
16
|
+
* - `fit-baseline-export` → `raw-stream`: an explicit file-writing command. The
|
|
17
|
+
* handler writes the SARIF baseline and prints a one-line confirmation (or an
|
|
18
|
+
* error), owning its exit-code decision and the `--json` branch itself — the
|
|
19
|
+
* documented non-Ink exception. The host renders nothing.
|
|
20
|
+
*/
|
|
21
|
+
import type { CommandSpec, ToolCliContext } from '@opensip-cli/core';
|
|
22
|
+
/** `fit-list` — list available fitness checks. */
|
|
23
|
+
export declare const fitListCommandSpec: CommandSpec<unknown, ToolCliContext>;
|
|
24
|
+
/** `fit-recipes` — list available fitness recipes. */
|
|
25
|
+
export declare const fitRecipesCommandSpec: CommandSpec<unknown, ToolCliContext>;
|
|
26
|
+
/**
|
|
27
|
+
* `fit-baseline-export` — write the SQLite-backed fit baseline to a SARIF file.
|
|
28
|
+
*
|
|
29
|
+
* `output: 'raw-stream'`: the handler owns its full IO — it writes the file and
|
|
30
|
+
* prints a one-line confirmation, or sets the exit code + writes the error to
|
|
31
|
+
* the `--json`/stderr channel itself. Byte-identical to the former
|
|
32
|
+
* `registerBaselineExportCommand` action body.
|
|
33
|
+
*/
|
|
34
|
+
export declare const fitBaselineExportCommandSpec: CommandSpec<unknown, ToolCliContext>;
|
|
35
|
+
//# sourceMappingURL=fit-aux-command-specs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fit-aux-command-specs.d.ts","sourceRoot":"","sources":["../../../src/cli/fit/fit-aux-command-specs.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AASH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAErE,kDAAkD;AAClD,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,OAAO,EAAE,cAAc,CAalE,CAAC;AAEH,sDAAsD;AACtD,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,OAAO,EAAE,cAAc,CAarE,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,EAAE,WAAW,CAAC,OAAO,EAAE,cAAc,CAqD5E,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// @fitness-ignore-file no-direct-stdout-in-tool-engine -- auxiliary subcommand status line: `fit-baseline-export` writes the SARIF baseline to a file and prints a one-line "Exported fit baseline to <path>" confirmation (the --json path uses cli.emitJson). This is not the signal-envelope run output (ADR-0011), which routes through the composition root.
|
|
2
|
+
// @fitness-ignore-file only-documented-toolcli-seams -- same rationale as above: the one-line "Exported fit baseline to <path>" status confirmation after a file write; the --json path uses cli.emitJson. Not run output through a ToolCliContext seam.
|
|
3
|
+
/**
|
|
4
|
+
* fit-aux-command-specs — the declarative `fit-list` / `fit-recipes` /
|
|
5
|
+
* `fit-baseline-export` commands (release 2.11.0 Phase 4 Task 4.2).
|
|
6
|
+
*
|
|
7
|
+
* Replaces fitness's hand-rolled `registerListCommand` / `registerRecipesCommand`
|
|
8
|
+
* / `registerBaselineExportCommand` bodies. The host mounts each spec via
|
|
9
|
+
* `mountCommandSpec`; the tool no longer touches Commander.
|
|
10
|
+
*
|
|
11
|
+
* Output modes:
|
|
12
|
+
* - `fit-list` / `fit-recipes` → `command-result`: the handler returns the
|
|
13
|
+
* list result; the host dispatches it through the shared seam
|
|
14
|
+
* (`--json` → JSON.stringify, else render). Byte-identical to the former
|
|
15
|
+
* `if (json) cli.emitJson(result) else cli.render(result)` body, because
|
|
16
|
+
* `emitJson` and the seam's json arm both write `JSON.stringify(x, null, 2)
|
|
17
|
+
* + '\n'`.
|
|
18
|
+
* - `fit-baseline-export` → `raw-stream`: an explicit file-writing command. The
|
|
19
|
+
* handler writes the SARIF baseline and prints a one-line confirmation (or an
|
|
20
|
+
* error), owning its exit-code decision and the `--json` branch itself — the
|
|
21
|
+
* documented non-Ink exception. The host renders nothing.
|
|
22
|
+
*/
|
|
23
|
+
import { EXIT_CODES } from '@opensip-cli/contracts';
|
|
24
|
+
import { ConfigurationError, defineCommand, logger } from '@opensip-cli/core';
|
|
25
|
+
import { listChecks } from '../fit-list.js';
|
|
26
|
+
import { listRecipes } from '../fit-recipes.js';
|
|
27
|
+
/** `fit-list` — list available fitness checks. */
|
|
28
|
+
export const fitListCommandSpec = defineCommand({
|
|
29
|
+
name: 'fit-list',
|
|
30
|
+
description: 'List available fitness checks',
|
|
31
|
+
commonFlags: ['cwd', 'json'],
|
|
32
|
+
scope: 'project',
|
|
33
|
+
output: 'command-result',
|
|
34
|
+
handler: async (rawOpts) => {
|
|
35
|
+
const opts = rawOpts;
|
|
36
|
+
return listChecks(opts.cwd);
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
/** `fit-recipes` — list available fitness recipes. */
|
|
40
|
+
export const fitRecipesCommandSpec = defineCommand({
|
|
41
|
+
name: 'fit-recipes',
|
|
42
|
+
description: 'List available fitness recipes',
|
|
43
|
+
commonFlags: ['cwd', 'json'],
|
|
44
|
+
scope: 'project',
|
|
45
|
+
output: 'command-result',
|
|
46
|
+
handler: async (rawOpts) => {
|
|
47
|
+
const opts = rawOpts;
|
|
48
|
+
return listRecipes(opts.cwd);
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
/**
|
|
52
|
+
* `fit-baseline-export` — write the SQLite-backed fit baseline to a SARIF file.
|
|
53
|
+
*
|
|
54
|
+
* `output: 'raw-stream'`: the handler owns its full IO — it writes the file and
|
|
55
|
+
* prints a one-line confirmation, or sets the exit code + writes the error to
|
|
56
|
+
* the `--json`/stderr channel itself. Byte-identical to the former
|
|
57
|
+
* `registerBaselineExportCommand` action body.
|
|
58
|
+
*/
|
|
59
|
+
export const fitBaselineExportCommandSpec = defineCommand({
|
|
60
|
+
name: 'fit-baseline-export',
|
|
61
|
+
description: 'Export the fit gate baseline (SARIF) from the datastore to a file',
|
|
62
|
+
commonFlags: ['cwd', 'json'],
|
|
63
|
+
options: [
|
|
64
|
+
{
|
|
65
|
+
flag: '--out',
|
|
66
|
+
value: '<path>',
|
|
67
|
+
description: 'Output file path for the SARIF baseline',
|
|
68
|
+
required: true,
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
scope: 'project',
|
|
72
|
+
output: 'raw-stream',
|
|
73
|
+
rawStreamReason: 'file-export',
|
|
74
|
+
handler: async (rawOpts, cli) => {
|
|
75
|
+
const opts = rawOpts;
|
|
76
|
+
// ADR-0036: the host owns the SARIF export — it reconstructs a synthetic
|
|
77
|
+
// envelope from the stored payloads (no stored envelope under the plane). The
|
|
78
|
+
// seam throws ConfigurationError (→ exit 2) when no baseline exists.
|
|
79
|
+
try {
|
|
80
|
+
await cli.exportBaselineSarif('fitness', opts.out);
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
84
|
+
const exitCode = error instanceof ConfigurationError
|
|
85
|
+
? EXIT_CODES.CONFIGURATION_ERROR
|
|
86
|
+
: EXIT_CODES.RUNTIME_ERROR;
|
|
87
|
+
logger.warn({
|
|
88
|
+
evt: 'cli.fit.baseline_export.failed',
|
|
89
|
+
module: 'fit:cli',
|
|
90
|
+
message,
|
|
91
|
+
exitCode,
|
|
92
|
+
});
|
|
93
|
+
if (opts.json) {
|
|
94
|
+
// 2.12.0 (§5.5): structured error outcome (host wraps + sets exit code).
|
|
95
|
+
cli.emitError({ message, exitCode });
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
cli.setExitCode(exitCode);
|
|
99
|
+
process.stderr.write(`Error: ${message}\n`);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const result = { type: 'fit-baseline-export', outPath: opts.out };
|
|
103
|
+
if (opts.json) {
|
|
104
|
+
cli.emitJson(result);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
process.stdout.write(`Exported fit baseline to ${opts.out}\n`);
|
|
108
|
+
},
|
|
109
|
+
});
|
|
110
|
+
//# sourceMappingURL=fit-aux-command-specs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fit-aux-command-specs.js","sourceRoot":"","sources":["../../../src/cli/fit/fit-aux-command-specs.ts"],"names":[],"mappings":"AAAA,kWAAkW;AAClW,yPAAyP;AACzP;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,W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C,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* fit-command-spec — the declarative `fit` command (release 2.11.0 Phase 4).
|
|
3
|
+
*
|
|
4
|
+
* Replaces fitness's hand-rolled `registerFitCommand()` body: the host mounts
|
|
5
|
+
* this spec via `mountCommandSpec`, applies the ADR-0021 common flags + fit's
|
|
6
|
+
* own options, and invokes {@link runFit}. The tool no longer touches Commander.
|
|
7
|
+
*
|
|
8
|
+
* `output: 'raw-stream'` because fit's handler owns its entire output surface —
|
|
9
|
+
* it dispatches at runtime between five mutually-exclusive modes (gate / list /
|
|
10
|
+
* recipes / json / live), each of which performs its OWN render/emit, exit-code
|
|
11
|
+
* decision, cloud egress (`deliverSignals` / `--report-to`), and dashboard
|
|
12
|
+
* auto-open. None of that is expressible through the `signal-envelope` dispatch
|
|
13
|
+
* arm (which only does `emitEnvelope`/`render`), so the host renders nothing and
|
|
14
|
+
* the handler stays authoritative — byte-identical to the former action body.
|
|
15
|
+
*/
|
|
16
|
+
import type { CommandSpec, ToolCliContext } from '@opensip-cli/core';
|
|
17
|
+
export declare const FIT_LIVE_VIEW_KEY = "fit";
|
|
18
|
+
/**
|
|
19
|
+
* Build the declarative `fit` command. The `setUpLiveView` callback is supplied
|
|
20
|
+
* by the tool (tool.ts) so the `cli.registerLiveView(renderFitLive)` wiring
|
|
21
|
+
* stays next to the renderer import; this module stays renderer-free.
|
|
22
|
+
*/
|
|
23
|
+
export declare function buildFitCommandSpec(setUpLiveView: (cli: ToolCliContext) => void): CommandSpec<unknown, ToolCliContext>;
|
|
24
|
+
//# sourceMappingURL=fit-command-spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fit-command-spec.d.ts","sourceRoot":"","sources":["../../../src/cli/fit/fit-command-spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAcH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAqB,MAAM,mBAAmB,CAAC;AAMxF,eAAO,MAAM,iBAAiB,QAAQ,CAAC;AAoDvC;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,IAAI,GAC3C,WAAW,CAAC,OAAO,EAAE,cAAc,CAAC,CA2DtC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* fit-command-spec — the declarative `fit` command (release 2.11.0 Phase 4).
|
|
3
|
+
*
|
|
4
|
+
* Replaces fitness's hand-rolled `registerFitCommand()` body: the host mounts
|
|
5
|
+
* this spec via `mountCommandSpec`, applies the ADR-0021 common flags + fit's
|
|
6
|
+
* own options, and invokes {@link runFit}. The tool no longer touches Commander.
|
|
7
|
+
*
|
|
8
|
+
* `output: 'raw-stream'` because fit's handler owns its entire output surface —
|
|
9
|
+
* it dispatches at runtime between five mutually-exclusive modes (gate / list /
|
|
10
|
+
* recipes / json / live), each of which performs its OWN render/emit, exit-code
|
|
11
|
+
* decision, cloud egress (`deliverSignals` / `--report-to`), and dashboard
|
|
12
|
+
* auto-open. None of that is expressible through the `signal-envelope` dispatch
|
|
13
|
+
* arm (which only does `emitEnvelope`/`render`), so the host renders nothing and
|
|
14
|
+
* the handler stays authoritative — byte-identical to the former action body.
|
|
15
|
+
*/
|
|
16
|
+
import { defineCommand } from '@opensip-cli/core';
|
|
17
|
+
import { runGateMode, runJsonMode, runListMode, runLiveMode, runRecipesMode, runShowMode, } from '../fit-modes.js';
|
|
18
|
+
// Live-view key fitness contributes to the CLI's renderer registry. Owned by
|
|
19
|
+
// this package — the CLI dispatcher does NOT key off this literal; each tool
|
|
20
|
+
// decides its own live-view name. The renderer is registered lazily inside the
|
|
21
|
+
// live branch of the handler via `setUpFitLiveView` (the tool wires that up).
|
|
22
|
+
export const FIT_LIVE_VIEW_KEY = 'fit';
|
|
23
|
+
/**
|
|
24
|
+
* The `fit` command handler — the former `registerFitCommand()` action body,
|
|
25
|
+
* lifted verbatim to a spec handler. Returns `void`: the host (`raw-stream`)
|
|
26
|
+
* renders nothing, so the five-mode dispatch keeps full ownership of its IO.
|
|
27
|
+
*
|
|
28
|
+
* The live-view registration that previously happened as a mount-time side
|
|
29
|
+
* effect in `register()` now happens lazily — the host calls `setUpFitLiveView`
|
|
30
|
+
* (passed in by the tool) the first time a live run needs it. We thread that
|
|
31
|
+
* setup callback in via the closure the tool builds, so this handler module
|
|
32
|
+
* stays free of the `cli.registerLiveView` wiring (which belongs next to the
|
|
33
|
+
* renderer import in tool.ts).
|
|
34
|
+
*/
|
|
35
|
+
async function runFit(rawOpts, cli, setUpLiveView) {
|
|
36
|
+
const opts = rawOpts;
|
|
37
|
+
// host-owned-run-timing Phases 3 + 5: the run-producing modes RETURN a
|
|
38
|
+
// `{ session, dashboard }` completion; runFit forwards it as a
|
|
39
|
+
// ToolRunCompletion and the host run plane persists the session row AND the
|
|
40
|
+
// per-run dashboard contribution after this handler resolves (the TTY live
|
|
41
|
+
// path already persisted via renderLive, so it returns undefined — no
|
|
42
|
+
// double-write).
|
|
43
|
+
if (opts.show !== undefined && opts.show.length > 0) {
|
|
44
|
+
await runShowMode(opts, cli);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (opts.gateSave === true || opts.gateCompare === true) {
|
|
48
|
+
return await runGateMode(opts, cli);
|
|
49
|
+
}
|
|
50
|
+
if (opts.list) {
|
|
51
|
+
await runListMode(opts, cli);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (opts.recipes) {
|
|
55
|
+
await runRecipesMode(opts, cli);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (opts.json) {
|
|
59
|
+
return await runJsonMode(opts, cli);
|
|
60
|
+
}
|
|
61
|
+
// Live mode is the only branch that needs fitness's Ink renderer. Register it
|
|
62
|
+
// lazily here (idempotent map write) — the spec-mounted world has no
|
|
63
|
+
// mount-time `register()` hook, so we set the renderer up on the host context
|
|
64
|
+
// before the `cli.renderLive` lookup inside runLiveMode.
|
|
65
|
+
setUpLiveView(cli);
|
|
66
|
+
return await runLiveMode(opts, cli, FIT_LIVE_VIEW_KEY, opts.open === true);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Build the declarative `fit` command. The `setUpLiveView` callback is supplied
|
|
70
|
+
* by the tool (tool.ts) so the `cli.registerLiveView(renderFitLive)` wiring
|
|
71
|
+
* stays next to the renderer import; this module stays renderer-free.
|
|
72
|
+
*/
|
|
73
|
+
export function buildFitCommandSpec(setUpLiveView) {
|
|
74
|
+
return defineCommand({
|
|
75
|
+
name: 'fit',
|
|
76
|
+
description: 'Run fitness checks',
|
|
77
|
+
// ADR-0021 cross-tool flags from the single registry: --cwd, --json,
|
|
78
|
+
// --quiet, --verbose, --debug, --report-to, --api-key, --open. `cwd` is
|
|
79
|
+
// seeded with process.cwd() by the mounter. fit-specific flags below.
|
|
80
|
+
commonFlags: ['cwd', 'json', 'quiet', 'verbose', 'debug', 'reportTo', 'apiKey', 'open'],
|
|
81
|
+
options: [
|
|
82
|
+
{
|
|
83
|
+
flag: '--recipe',
|
|
84
|
+
value: '<name>',
|
|
85
|
+
description: 'Use a named recipe (default, quick-smoke, backend, etc.)',
|
|
86
|
+
},
|
|
87
|
+
{ flag: '--check', value: '<slug>', description: 'Run a single check by slug' },
|
|
88
|
+
{
|
|
89
|
+
flag: '--tags',
|
|
90
|
+
value: '<tags>',
|
|
91
|
+
description: 'Filter checks by tags (repeatable or comma-separated)',
|
|
92
|
+
arrayDefault: [],
|
|
93
|
+
parse: (val, prev) => [...prev, val],
|
|
94
|
+
},
|
|
95
|
+
{ flag: '--list', description: 'List available checks', default: false },
|
|
96
|
+
{ flag: '--recipes', description: 'List available recipes', default: false },
|
|
97
|
+
{
|
|
98
|
+
flag: '--exclude',
|
|
99
|
+
value: '<slug>',
|
|
100
|
+
description: 'Exclude check (repeatable)',
|
|
101
|
+
arrayDefault: [],
|
|
102
|
+
parse: (val, prev) => [...prev, val],
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
flag: '--config',
|
|
106
|
+
value: '<path>',
|
|
107
|
+
description: 'Path to opensip-cli.config.yml (overrides package.json pointer and default)',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
flag: '--show',
|
|
111
|
+
value: '<session>',
|
|
112
|
+
description: 'Replay a stored fit session by id, or latest for the latest fit session',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
flag: '--gate-save',
|
|
116
|
+
description: 'Architecture-gate: save current findings as baseline in the project SQLite store (mutually exclusive with --gate-compare)',
|
|
117
|
+
default: false,
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
flag: '--gate-compare',
|
|
121
|
+
description: 'Architecture-gate: compare current findings against the saved baseline; exit 1 on regression',
|
|
122
|
+
default: false,
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
scope: 'project',
|
|
126
|
+
output: 'raw-stream',
|
|
127
|
+
rawStreamReason: 'runtime-render-dispatch',
|
|
128
|
+
handler: (opts, cli) => runFit(opts, cli, setUpLiveView),
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=fit-command-spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fit-command-spec.js","sourceRoot":"","sources":["../../../src/cli/fit/fit-command-spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EACL,WAAW,EACX,WAAW,EACX,WAAW,EACX,WAAW,EACX,cAAc,EACd,WAAW,GACZ,MAAM,iBAAiB,CAAC;AAKzB,6EAA6E;AAC7E,6EAA6E;AAC7E,+EAA+E;AAC/E,8EAA8E;AAC9E,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC;AAEvC;;;;;;;;;;;GAWG;AACH,KAAK,UAAU,MAAM,CACnB,OAAgB,EAChB,GAAmB,EACnB,aAA4C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