@opensip-cli/core 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__/config-resolution.test.d.ts +2 -0
- package/dist/__tests__/config-resolution.test.d.ts.map +1 -0
- package/dist/__tests__/config-resolution.test.js +94 -0
- package/dist/__tests__/config-resolution.test.js.map +1 -0
- package/dist/__tests__/public-api.test.d.ts +16 -0
- package/dist/__tests__/public-api.test.d.ts.map +1 -0
- package/dist/__tests__/public-api.test.js +209 -0
- package/dist/__tests__/public-api.test.js.map +1 -0
- package/dist/__tests__/signal-batch.test.d.ts +2 -0
- package/dist/__tests__/signal-batch.test.d.ts.map +1 -0
- package/dist/__tests__/signal-batch.test.js +39 -0
- package/dist/__tests__/signal-batch.test.js.map +1 -0
- package/dist/__tests__/signal-sink.test.d.ts +2 -0
- package/dist/__tests__/signal-sink.test.d.ts.map +1 -0
- package/dist/__tests__/signal-sink.test.js +25 -0
- package/dist/__tests__/signal-sink.test.js.map +1 -0
- package/dist/__tests__/strip-utils.test.d.ts +2 -0
- package/dist/__tests__/strip-utils.test.d.ts.map +1 -0
- package/dist/__tests__/strip-utils.test.js +397 -0
- package/dist/__tests__/strip-utils.test.js.map +1 -0
- package/dist/__tests__/text-tree.test.d.ts +2 -0
- package/dist/__tests__/text-tree.test.d.ts.map +1 -0
- package/dist/__tests__/text-tree.test.js +31 -0
- package/dist/__tests__/text-tree.test.js.map +1 -0
- package/dist/baseline/__tests__/fingerprint-strategy.test.d.ts +2 -0
- package/dist/baseline/__tests__/fingerprint-strategy.test.d.ts.map +1 -0
- package/dist/baseline/__tests__/fingerprint-strategy.test.js +69 -0
- package/dist/baseline/__tests__/fingerprint-strategy.test.js.map +1 -0
- package/dist/baseline/fingerprint-strategy.d.ts +70 -0
- package/dist/baseline/fingerprint-strategy.d.ts.map +1 -0
- package/dist/baseline/fingerprint-strategy.js +90 -0
- package/dist/baseline/fingerprint-strategy.js.map +1 -0
- package/dist/config-resolution.d.ts +27 -0
- package/dist/config-resolution.d.ts.map +1 -0
- package/dist/config-resolution.js +92 -0
- package/dist/config-resolution.js.map +1 -0
- package/dist/index.d.ts +81 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +165 -0
- package/dist/index.js.map +1 -0
- package/dist/languages/__tests__/content-filter-dispatch.test.d.ts +2 -0
- package/dist/languages/__tests__/content-filter-dispatch.test.d.ts.map +1 -0
- package/dist/languages/__tests__/content-filter-dispatch.test.js +87 -0
- package/dist/languages/__tests__/content-filter-dispatch.test.js.map +1 -0
- package/dist/languages/__tests__/non-code-formats.test.d.ts +2 -0
- package/dist/languages/__tests__/non-code-formats.test.d.ts.map +1 -0
- package/dist/languages/__tests__/non-code-formats.test.js +31 -0
- package/dist/languages/__tests__/non-code-formats.test.js.map +1 -0
- package/dist/languages/__tests__/parse-cache.test.d.ts +2 -0
- package/dist/languages/__tests__/parse-cache.test.d.ts.map +1 -0
- package/dist/languages/__tests__/parse-cache.test.js +228 -0
- package/dist/languages/__tests__/parse-cache.test.js.map +1 -0
- package/dist/languages/__tests__/registry.test.d.ts +2 -0
- package/dist/languages/__tests__/registry.test.d.ts.map +1 -0
- package/dist/languages/__tests__/registry.test.js +193 -0
- package/dist/languages/__tests__/registry.test.js.map +1 -0
- package/dist/languages/__tests__/workspace-unit-contract.test.d.ts +2 -0
- package/dist/languages/__tests__/workspace-unit-contract.test.d.ts.map +1 -0
- package/dist/languages/__tests__/workspace-unit-contract.test.js +66 -0
- package/dist/languages/__tests__/workspace-unit-contract.test.js.map +1 -0
- package/dist/languages/adapter.d.ts +66 -0
- package/dist/languages/adapter.d.ts.map +1 -0
- package/dist/languages/adapter.js +2 -0
- package/dist/languages/adapter.js.map +1 -0
- package/dist/languages/content-filter-dispatch.d.ts +36 -0
- package/dist/languages/content-filter-dispatch.d.ts.map +1 -0
- package/dist/languages/content-filter-dispatch.js +75 -0
- package/dist/languages/content-filter-dispatch.js.map +1 -0
- package/dist/languages/generic-types.d.ts +22 -0
- package/dist/languages/generic-types.d.ts.map +1 -0
- package/dist/languages/generic-types.js +3 -0
- package/dist/languages/generic-types.js.map +1 -0
- package/dist/languages/index.d.ts +12 -0
- package/dist/languages/index.d.ts.map +1 -0
- package/dist/languages/index.js +7 -0
- package/dist/languages/index.js.map +1 -0
- package/dist/languages/non-code-formats.d.ts +37 -0
- package/dist/languages/non-code-formats.d.ts.map +1 -0
- package/dist/languages/non-code-formats.js +45 -0
- package/dist/languages/non-code-formats.js.map +1 -0
- package/dist/languages/parse-cache-class.d.ts +69 -0
- package/dist/languages/parse-cache-class.d.ts.map +1 -0
- package/dist/languages/parse-cache-class.js +135 -0
- package/dist/languages/parse-cache-class.js.map +1 -0
- package/dist/languages/parse-cache.d.ts +54 -0
- package/dist/languages/parse-cache.d.ts.map +1 -0
- package/dist/languages/parse-cache.js +88 -0
- package/dist/languages/parse-cache.js.map +1 -0
- package/dist/languages/registry.d.ts +35 -0
- package/dist/languages/registry.d.ts.map +1 -0
- package/dist/languages/registry.js +123 -0
- package/dist/languages/registry.js.map +1 -0
- package/dist/languages/strip-scanners.d.ts +170 -0
- package/dist/languages/strip-scanners.d.ts.map +1 -0
- package/dist/languages/strip-scanners.js +233 -0
- package/dist/languages/strip-scanners.js.map +1 -0
- package/dist/languages/strip-utils.d.ts +66 -0
- package/dist/languages/strip-utils.d.ts.map +1 -0
- package/dist/languages/strip-utils.js +88 -0
- package/dist/languages/strip-utils.js.map +1 -0
- package/dist/languages/text-tree.d.ts +44 -0
- package/dist/languages/text-tree.d.ts.map +1 -0
- package/dist/languages/text-tree.js +34 -0
- package/dist/languages/text-tree.js.map +1 -0
- package/dist/languages/workspace-unit.d.ts +18 -0
- package/dist/languages/workspace-unit.d.ts.map +1 -0
- package/dist/languages/workspace-unit.js +2 -0
- package/dist/languages/workspace-unit.js.map +1 -0
- package/dist/lib/__tests__/config-version.test.d.ts +12 -0
- package/dist/lib/__tests__/config-version.test.d.ts.map +1 -0
- package/dist/lib/__tests__/config-version.test.js +92 -0
- package/dist/lib/__tests__/config-version.test.js.map +1 -0
- package/dist/lib/__tests__/diagnostics-bus.test.d.ts +7 -0
- package/dist/lib/__tests__/diagnostics-bus.test.d.ts.map +1 -0
- package/dist/lib/__tests__/diagnostics-bus.test.js +44 -0
- package/dist/lib/__tests__/diagnostics-bus.test.js.map +1 -0
- package/dist/lib/__tests__/env-registry.test.d.ts +7 -0
- package/dist/lib/__tests__/env-registry.test.d.ts.map +1 -0
- package/dist/lib/__tests__/env-registry.test.js +82 -0
- package/dist/lib/__tests__/env-registry.test.js.map +1 -0
- package/dist/lib/__tests__/errors.test.d.ts +2 -0
- package/dist/lib/__tests__/errors.test.d.ts.map +1 -0
- package/dist/lib/__tests__/errors.test.js +218 -0
- package/dist/lib/__tests__/errors.test.js.map +1 -0
- package/dist/lib/__tests__/format.test.d.ts +2 -0
- package/dist/lib/__tests__/format.test.d.ts.map +1 -0
- package/dist/lib/__tests__/format.test.js +23 -0
- package/dist/lib/__tests__/format.test.js.map +1 -0
- package/dist/lib/__tests__/ids.test.d.ts +2 -0
- package/dist/lib/__tests__/ids.test.d.ts.map +1 -0
- package/dist/lib/__tests__/ids.test.js +80 -0
- package/dist/lib/__tests__/ids.test.js.map +1 -0
- package/dist/lib/__tests__/logger.test.d.ts +2 -0
- package/dist/lib/__tests__/logger.test.d.ts.map +1 -0
- package/dist/lib/__tests__/logger.test.js +284 -0
- package/dist/lib/__tests__/logger.test.js.map +1 -0
- package/dist/lib/__tests__/package-version.test.d.ts +2 -0
- package/dist/lib/__tests__/package-version.test.d.ts.map +1 -0
- package/dist/lib/__tests__/package-version.test.js +47 -0
- package/dist/lib/__tests__/package-version.test.js.map +1 -0
- package/dist/lib/__tests__/paths.test.d.ts +5 -0
- package/dist/lib/__tests__/paths.test.d.ts.map +1 -0
- package/dist/lib/__tests__/paths.test.js +59 -0
- package/dist/lib/__tests__/paths.test.js.map +1 -0
- package/dist/lib/__tests__/payload-version.test.d.ts +2 -0
- package/dist/lib/__tests__/payload-version.test.d.ts.map +1 -0
- package/dist/lib/__tests__/payload-version.test.js +35 -0
- package/dist/lib/__tests__/payload-version.test.js.map +1 -0
- package/dist/lib/__tests__/phantom-detect.test.d.ts +10 -0
- package/dist/lib/__tests__/phantom-detect.test.d.ts.map +1 -0
- package/dist/lib/__tests__/phantom-detect.test.js +84 -0
- package/dist/lib/__tests__/phantom-detect.test.js.map +1 -0
- package/dist/lib/__tests__/project-context.test.d.ts +10 -0
- package/dist/lib/__tests__/project-context.test.d.ts.map +1 -0
- package/dist/lib/__tests__/project-context.test.js +240 -0
- package/dist/lib/__tests__/project-context.test.js.map +1 -0
- package/dist/lib/__tests__/registry.test.d.ts +2 -0
- package/dist/lib/__tests__/registry.test.d.ts.map +1 -0
- package/dist/lib/__tests__/registry.test.js +333 -0
- package/dist/lib/__tests__/registry.test.js.map +1 -0
- package/dist/lib/__tests__/retry.test.d.ts +2 -0
- package/dist/lib/__tests__/retry.test.d.ts.map +1 -0
- package/dist/lib/__tests__/retry.test.js +71 -0
- package/dist/lib/__tests__/retry.test.js.map +1 -0
- package/dist/lib/__tests__/run-diagnostics.test.d.ts +9 -0
- package/dist/lib/__tests__/run-diagnostics.test.d.ts.map +1 -0
- package/dist/lib/__tests__/run-diagnostics.test.js +61 -0
- package/dist/lib/__tests__/run-diagnostics.test.js.map +1 -0
- package/dist/lib/__tests__/run-scope.test.d.ts +2 -0
- package/dist/lib/__tests__/run-scope.test.d.ts.map +1 -0
- package/dist/lib/__tests__/run-scope.test.js +202 -0
- package/dist/lib/__tests__/run-scope.test.js.map +1 -0
- package/dist/lib/__tests__/run-timer.test.d.ts +2 -0
- package/dist/lib/__tests__/run-timer.test.d.ts.map +1 -0
- package/dist/lib/__tests__/run-timer.test.js +152 -0
- package/dist/lib/__tests__/run-timer.test.js.map +1 -0
- package/dist/lib/__tests__/severity-policy.test.d.ts +6 -0
- package/dist/lib/__tests__/severity-policy.test.d.ts.map +1 -0
- package/dist/lib/__tests__/severity-policy.test.js +47 -0
- package/dist/lib/__tests__/severity-policy.test.js.map +1 -0
- package/dist/lib/__tests__/telemetry.test.d.ts +2 -0
- package/dist/lib/__tests__/telemetry.test.d.ts.map +1 -0
- package/dist/lib/__tests__/telemetry.test.js +212 -0
- package/dist/lib/__tests__/telemetry.test.js.map +1 -0
- package/dist/lib/__tests__/verdict-policy.test.d.ts +7 -0
- package/dist/lib/__tests__/verdict-policy.test.d.ts.map +1 -0
- package/dist/lib/__tests__/verdict-policy.test.js +91 -0
- package/dist/lib/__tests__/verdict-policy.test.js.map +1 -0
- package/dist/lib/__tests__/yaml.test.d.ts +6 -0
- package/dist/lib/__tests__/yaml.test.d.ts.map +1 -0
- package/dist/lib/__tests__/yaml.test.js +79 -0
- package/dist/lib/__tests__/yaml.test.js.map +1 -0
- package/dist/lib/config-version.d.ts +49 -0
- package/dist/lib/config-version.d.ts.map +1 -0
- package/dist/lib/config-version.js +56 -0
- package/dist/lib/config-version.js.map +1 -0
- package/dist/lib/diagnostics-bus.d.ts +48 -0
- package/dist/lib/diagnostics-bus.d.ts.map +1 -0
- package/dist/lib/diagnostics-bus.js +74 -0
- package/dist/lib/diagnostics-bus.js.map +1 -0
- package/dist/lib/env-registry.d.ts +108 -0
- package/dist/lib/env-registry.d.ts.map +1 -0
- package/dist/lib/env-registry.js +92 -0
- package/dist/lib/env-registry.js.map +1 -0
- package/dist/lib/errors.d.ts +132 -0
- package/dist/lib/errors.d.ts.map +1 -0
- package/dist/lib/errors.js +160 -0
- package/dist/lib/errors.js.map +1 -0
- package/dist/lib/execution/__tests__/execution.test.d.ts +7 -0
- package/dist/lib/execution/__tests__/execution.test.d.ts.map +1 -0
- package/dist/lib/execution/__tests__/execution.test.js +254 -0
- package/dist/lib/execution/__tests__/execution.test.js.map +1 -0
- package/dist/lib/execution/index.d.ts +15 -0
- package/dist/lib/execution/index.d.ts.map +1 -0
- package/dist/lib/execution/index.js +10 -0
- package/dist/lib/execution/index.js.map +1 -0
- package/dist/lib/execution/options.d.ts +32 -0
- package/dist/lib/execution/options.d.ts.map +1 -0
- package/dist/lib/execution/options.js +15 -0
- package/dist/lib/execution/options.js.map +1 -0
- package/dist/lib/execution/pipeline.d.ts +36 -0
- package/dist/lib/execution/pipeline.d.ts.map +1 -0
- package/dist/lib/execution/pipeline.js +38 -0
- package/dist/lib/execution/pipeline.js.map +1 -0
- package/dist/lib/execution/retry.d.ts +38 -0
- package/dist/lib/execution/retry.d.ts.map +1 -0
- package/dist/lib/execution/retry.js +56 -0
- package/dist/lib/execution/retry.js.map +1 -0
- package/dist/lib/execution/run-with-timeout.d.ts +46 -0
- package/dist/lib/execution/run-with-timeout.d.ts.map +1 -0
- package/dist/lib/execution/run-with-timeout.js +86 -0
- package/dist/lib/execution/run-with-timeout.js.map +1 -0
- package/dist/lib/execution/schedule.d.ts +62 -0
- package/dist/lib/execution/schedule.d.ts.map +1 -0
- package/dist/lib/execution/schedule.js +130 -0
- package/dist/lib/execution/schedule.js.map +1 -0
- package/dist/lib/format.d.ts +17 -0
- package/dist/lib/format.d.ts.map +1 -0
- package/dist/lib/format.js +26 -0
- package/dist/lib/format.js.map +1 -0
- package/dist/lib/ids.d.ts +13 -0
- package/dist/lib/ids.d.ts.map +1 -0
- package/dist/lib/ids.js +48 -0
- package/dist/lib/ids.js.map +1 -0
- package/dist/lib/logger.d.ts +166 -0
- package/dist/lib/logger.d.ts.map +1 -0
- package/dist/lib/logger.js +283 -0
- package/dist/lib/logger.js.map +1 -0
- package/dist/lib/package-version.d.ts +17 -0
- package/dist/lib/package-version.d.ts.map +1 -0
- package/dist/lib/package-version.js +52 -0
- package/dist/lib/package-version.js.map +1 -0
- package/dist/lib/paths.d.ts +139 -0
- package/dist/lib/paths.d.ts.map +1 -0
- package/dist/lib/paths.js +105 -0
- package/dist/lib/paths.js.map +1 -0
- package/dist/lib/payload-version.d.ts +15 -0
- package/dist/lib/payload-version.d.ts.map +1 -0
- package/dist/lib/payload-version.js +24 -0
- package/dist/lib/payload-version.js.map +1 -0
- package/dist/lib/phantom-detect.d.ts +21 -0
- package/dist/lib/phantom-detect.d.ts.map +1 -0
- package/dist/lib/phantom-detect.js +76 -0
- package/dist/lib/phantom-detect.js.map +1 -0
- package/dist/lib/project-context.d.ts +66 -0
- package/dist/lib/project-context.d.ts.map +1 -0
- package/dist/lib/project-context.js +112 -0
- package/dist/lib/project-context.js.map +1 -0
- package/dist/lib/recipe-id.d.ts +13 -0
- package/dist/lib/recipe-id.d.ts.map +1 -0
- package/dist/lib/recipe-id.js +15 -0
- package/dist/lib/recipe-id.js.map +1 -0
- package/dist/lib/registry.d.ts +98 -0
- package/dist/lib/registry.d.ts.map +1 -0
- package/dist/lib/registry.js +152 -0
- package/dist/lib/registry.js.map +1 -0
- package/dist/lib/retry.d.ts +26 -0
- package/dist/lib/retry.d.ts.map +1 -0
- package/dist/lib/retry.js +48 -0
- package/dist/lib/retry.js.map +1 -0
- package/dist/lib/run-diagnostics.d.ts +64 -0
- package/dist/lib/run-diagnostics.d.ts.map +1 -0
- package/dist/lib/run-diagnostics.js +25 -0
- package/dist/lib/run-diagnostics.js.map +1 -0
- package/dist/lib/run-scope.d.ts +167 -0
- package/dist/lib/run-scope.d.ts.map +1 -0
- package/dist/lib/run-scope.js +176 -0
- package/dist/lib/run-scope.js.map +1 -0
- package/dist/lib/run-timer.d.ts +82 -0
- package/dist/lib/run-timer.d.ts.map +1 -0
- package/dist/lib/run-timer.js +79 -0
- package/dist/lib/run-timer.js.map +1 -0
- package/dist/lib/scope-types.d.ts +172 -0
- package/dist/lib/scope-types.d.ts.map +1 -0
- package/dist/lib/scope-types.js +27 -0
- package/dist/lib/scope-types.js.map +1 -0
- package/dist/lib/severity-policy.d.ts +38 -0
- package/dist/lib/severity-policy.d.ts.map +1 -0
- package/dist/lib/severity-policy.js +44 -0
- package/dist/lib/severity-policy.js.map +1 -0
- package/dist/lib/telemetry.d.ts +93 -0
- package/dist/lib/telemetry.d.ts.map +1 -0
- package/dist/lib/telemetry.js +144 -0
- package/dist/lib/telemetry.js.map +1 -0
- package/dist/lib/ui-context.d.ts +34 -0
- package/dist/lib/ui-context.d.ts.map +1 -0
- package/dist/lib/ui-context.js +16 -0
- package/dist/lib/ui-context.js.map +1 -0
- package/dist/lib/verdict-policy.d.ts +71 -0
- package/dist/lib/verdict-policy.d.ts.map +1 -0
- package/dist/lib/verdict-policy.js +82 -0
- package/dist/lib/verdict-policy.js.map +1 -0
- package/dist/lib/yaml.d.ts +74 -0
- package/dist/lib/yaml.d.ts.map +1 -0
- package/dist/lib/yaml.js +118 -0
- package/dist/lib/yaml.js.map +1 -0
- package/dist/plugins/__tests__/as-if-external.test.d.ts +18 -0
- package/dist/plugins/__tests__/as-if-external.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/as-if-external.test.js +159 -0
- package/dist/plugins/__tests__/as-if-external.test.js.map +1 -0
- package/dist/plugins/__tests__/authored-tool-discovery.test.d.ts +8 -0
- package/dist/plugins/__tests__/authored-tool-discovery.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/authored-tool-discovery.test.js +97 -0
- package/dist/plugins/__tests__/authored-tool-discovery.test.js.map +1 -0
- package/dist/plugins/__tests__/capability-discovery.test.d.ts +2 -0
- package/dist/plugins/__tests__/capability-discovery.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/capability-discovery.test.js +349 -0
- package/dist/plugins/__tests__/capability-discovery.test.js.map +1 -0
- package/dist/plugins/__tests__/capability-from-manifest.test.d.ts +2 -0
- package/dist/plugins/__tests__/capability-from-manifest.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/capability-from-manifest.test.js +172 -0
- package/dist/plugins/__tests__/capability-from-manifest.test.js.map +1 -0
- package/dist/plugins/__tests__/capability-loader.test.d.ts +2 -0
- package/dist/plugins/__tests__/capability-loader.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/capability-loader.test.js +122 -0
- package/dist/plugins/__tests__/capability-loader.test.js.map +1 -0
- package/dist/plugins/__tests__/capability-registry.test.d.ts +2 -0
- package/dist/plugins/__tests__/capability-registry.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/capability-registry.test.js +185 -0
- package/dist/plugins/__tests__/capability-registry.test.js.map +1 -0
- package/dist/plugins/__tests__/discover.test.d.ts +2 -0
- package/dist/plugins/__tests__/discover.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/discover.test.js +311 -0
- package/dist/plugins/__tests__/discover.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 +191 -0
- package/dist/plugins/__tests__/loader.test.js.map +1 -0
- package/dist/plugins/__tests__/manifest-discovery.test.d.ts +2 -0
- package/dist/plugins/__tests__/manifest-discovery.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/manifest-discovery.test.js +132 -0
- package/dist/plugins/__tests__/manifest-discovery.test.js.map +1 -0
- package/dist/plugins/__tests__/manifest-loader.test.d.ts +2 -0
- package/dist/plugins/__tests__/manifest-loader.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/manifest-loader.test.js +434 -0
- package/dist/plugins/__tests__/manifest-loader.test.js.map +1 -0
- package/dist/plugins/__tests__/marker-discovery.test.d.ts +2 -0
- package/dist/plugins/__tests__/marker-discovery.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/marker-discovery.test.js +164 -0
- package/dist/plugins/__tests__/marker-discovery.test.js.map +1 -0
- package/dist/plugins/__tests__/node-modules-walk.test.d.ts +2 -0
- package/dist/plugins/__tests__/node-modules-walk.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/node-modules-walk.test.js +76 -0
- package/dist/plugins/__tests__/node-modules-walk.test.js.map +1 -0
- package/dist/plugins/__tests__/package-entry.test.d.ts +9 -0
- package/dist/plugins/__tests__/package-entry.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/package-entry.test.js +117 -0
- package/dist/plugins/__tests__/package-entry.test.js.map +1 -0
- package/dist/plugins/__tests__/recipe-loader.test.d.ts +2 -0
- package/dist/plugins/__tests__/recipe-loader.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/recipe-loader.test.js +130 -0
- package/dist/plugins/__tests__/recipe-loader.test.js.map +1 -0
- package/dist/plugins/__tests__/scope-validation.test.d.ts +2 -0
- package/dist/plugins/__tests__/scope-validation.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/scope-validation.test.js +68 -0
- package/dist/plugins/__tests__/scope-validation.test.js.map +1 -0
- package/dist/plugins/__tests__/single-core-guard.test.d.ts +10 -0
- package/dist/plugins/__tests__/single-core-guard.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/single-core-guard.test.js +89 -0
- package/dist/plugins/__tests__/single-core-guard.test.js.map +1 -0
- package/dist/plugins/__tests__/tool-package-discovery.test.d.ts +2 -0
- package/dist/plugins/__tests__/tool-package-discovery.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/tool-package-discovery.test.js +215 -0
- package/dist/plugins/__tests__/tool-package-discovery.test.js.map +1 -0
- package/dist/plugins/authored-tool-discovery.d.ts +45 -0
- package/dist/plugins/authored-tool-discovery.d.ts.map +1 -0
- package/dist/plugins/authored-tool-discovery.js +61 -0
- package/dist/plugins/authored-tool-discovery.js.map +1 -0
- package/dist/plugins/capability-discovery.d.ts +80 -0
- package/dist/plugins/capability-discovery.d.ts.map +1 -0
- package/dist/plugins/capability-discovery.js +278 -0
- package/dist/plugins/capability-discovery.js.map +1 -0
- package/dist/plugins/capability-loader.d.ts +50 -0
- package/dist/plugins/capability-loader.d.ts.map +1 -0
- package/dist/plugins/capability-loader.js +85 -0
- package/dist/plugins/capability-loader.js.map +1 -0
- package/dist/plugins/capability-registry.d.ts +169 -0
- package/dist/plugins/capability-registry.d.ts.map +1 -0
- package/dist/plugins/capability-registry.js +319 -0
- package/dist/plugins/capability-registry.js.map +1 -0
- package/dist/plugins/discover.d.ts +64 -0
- package/dist/plugins/discover.d.ts.map +1 -0
- package/dist/plugins/discover.js +303 -0
- package/dist/plugins/discover.js.map +1 -0
- package/dist/plugins/index.d.ts +37 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +40 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/json-guards.d.ts +11 -0
- package/dist/plugins/json-guards.d.ts.map +1 -0
- package/dist/plugins/json-guards.js +15 -0
- package/dist/plugins/json-guards.js.map +1 -0
- package/dist/plugins/loader.d.ts +67 -0
- package/dist/plugins/loader.d.ts.map +1 -0
- package/dist/plugins/loader.js +137 -0
- package/dist/plugins/loader.js.map +1 -0
- package/dist/plugins/manifest-discovery.d.ts +28 -0
- package/dist/plugins/manifest-discovery.d.ts.map +1 -0
- package/dist/plugins/manifest-discovery.js +103 -0
- package/dist/plugins/manifest-discovery.js.map +1 -0
- package/dist/plugins/manifest-loader.d.ts +120 -0
- package/dist/plugins/manifest-loader.d.ts.map +1 -0
- package/dist/plugins/manifest-loader.js +410 -0
- package/dist/plugins/manifest-loader.js.map +1 -0
- package/dist/plugins/marker-discovery.d.ts +115 -0
- package/dist/plugins/marker-discovery.d.ts.map +1 -0
- package/dist/plugins/marker-discovery.js +172 -0
- package/dist/plugins/marker-discovery.js.map +1 -0
- package/dist/plugins/node-modules-walk.d.ts +61 -0
- package/dist/plugins/node-modules-walk.d.ts.map +1 -0
- package/dist/plugins/node-modules-walk.js +99 -0
- package/dist/plugins/node-modules-walk.js.map +1 -0
- package/dist/plugins/package-entry.d.ts +38 -0
- package/dist/plugins/package-entry.d.ts.map +1 -0
- package/dist/plugins/package-entry.js +86 -0
- package/dist/plugins/package-entry.js.map +1 -0
- package/dist/plugins/recipe-loader.d.ts +63 -0
- package/dist/plugins/recipe-loader.d.ts.map +1 -0
- package/dist/plugins/recipe-loader.js +67 -0
- package/dist/plugins/recipe-loader.js.map +1 -0
- package/dist/plugins/scope-validation.d.ts +35 -0
- package/dist/plugins/scope-validation.d.ts.map +1 -0
- package/dist/plugins/scope-validation.js +55 -0
- package/dist/plugins/scope-validation.js.map +1 -0
- package/dist/plugins/single-core-guard.d.ts +28 -0
- package/dist/plugins/single-core-guard.d.ts.map +1 -0
- package/dist/plugins/single-core-guard.js +69 -0
- package/dist/plugins/single-core-guard.js.map +1 -0
- package/dist/plugins/tool-package-discovery.d.ts +93 -0
- package/dist/plugins/tool-package-discovery.d.ts.map +1 -0
- package/dist/plugins/tool-package-discovery.js +118 -0
- package/dist/plugins/tool-package-discovery.js.map +1 -0
- package/dist/plugins/types.d.ts +78 -0
- package/dist/plugins/types.d.ts.map +1 -0
- package/dist/plugins/types.js +15 -0
- package/dist/plugins/types.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 +170 -0
- package/dist/recipes/__tests__/registry.test.js.map +1 -0
- package/dist/recipes/__tests__/selector.test.d.ts +20 -0
- package/dist/recipes/__tests__/selector.test.d.ts.map +1 -0
- package/dist/recipes/__tests__/selector.test.js +173 -0
- package/dist/recipes/__tests__/selector.test.js.map +1 -0
- package/dist/recipes/__tests__/unit-config.test.d.ts +7 -0
- package/dist/recipes/__tests__/unit-config.test.d.ts.map +1 -0
- package/dist/recipes/__tests__/unit-config.test.js +52 -0
- package/dist/recipes/__tests__/unit-config.test.js.map +1 -0
- package/dist/recipes/registry.d.ts +105 -0
- package/dist/recipes/registry.d.ts.map +1 -0
- package/dist/recipes/registry.js +141 -0
- package/dist/recipes/registry.js.map +1 -0
- package/dist/recipes/selector.d.ts +112 -0
- package/dist/recipes/selector.d.ts.map +1 -0
- package/dist/recipes/selector.js +134 -0
- package/dist/recipes/selector.js.map +1 -0
- package/dist/recipes/unit-config.d.ts +63 -0
- package/dist/recipes/unit-config.d.ts.map +1 -0
- package/dist/recipes/unit-config.js +68 -0
- package/dist/recipes/unit-config.js.map +1 -0
- package/dist/runtime/__tests__/in-process-transport.test.d.ts +6 -0
- package/dist/runtime/__tests__/in-process-transport.test.d.ts.map +1 -0
- package/dist/runtime/__tests__/in-process-transport.test.js +73 -0
- package/dist/runtime/__tests__/in-process-transport.test.js.map +1 -0
- package/dist/runtime/__tests__/subprocess-transport.test.d.ts +11 -0
- package/dist/runtime/__tests__/subprocess-transport.test.d.ts.map +1 -0
- package/dist/runtime/__tests__/subprocess-transport.test.js +118 -0
- package/dist/runtime/__tests__/subprocess-transport.test.js.map +1 -0
- package/dist/runtime/in-process-transport.d.ts +20 -0
- package/dist/runtime/in-process-transport.d.ts.map +1 -0
- package/dist/runtime/in-process-transport.js +49 -0
- package/dist/runtime/in-process-transport.js.map +1 -0
- package/dist/runtime/progress-transport.d.ts +73 -0
- package/dist/runtime/progress-transport.d.ts.map +1 -0
- package/dist/runtime/progress-transport.js +17 -0
- package/dist/runtime/progress-transport.js.map +1 -0
- package/dist/runtime/subprocess-transport.d.ts +43 -0
- package/dist/runtime/subprocess-transport.d.ts.map +1 -0
- package/dist/runtime/subprocess-transport.js +134 -0
- package/dist/runtime/subprocess-transport.js.map +1 -0
- package/dist/signals/comment-openers.d.ts +29 -0
- package/dist/signals/comment-openers.d.ts.map +1 -0
- package/dist/signals/comment-openers.js +41 -0
- package/dist/signals/comment-openers.js.map +1 -0
- package/dist/signals/comment-openers.test.d.ts +7 -0
- package/dist/signals/comment-openers.test.d.ts.map +1 -0
- package/dist/signals/comment-openers.test.js +41 -0
- package/dist/signals/comment-openers.test.js.map +1 -0
- package/dist/signals/create-signal-from-violation.d.ts +29 -0
- package/dist/signals/create-signal-from-violation.d.ts.map +1 -0
- package/dist/signals/create-signal-from-violation.js +29 -0
- package/dist/signals/create-signal-from-violation.js.map +1 -0
- package/dist/signals/signal-sink.d.ts +49 -0
- package/dist/signals/signal-sink.d.ts.map +1 -0
- package/dist/signals/signal-sink.js +6 -0
- package/dist/signals/signal-sink.js.map +1 -0
- package/dist/signals/suppress.d.ts +102 -0
- package/dist/signals/suppress.d.ts.map +1 -0
- package/dist/signals/suppress.js +325 -0
- package/dist/signals/suppress.js.map +1 -0
- package/dist/signals/suppress.test.d.ts +2 -0
- package/dist/signals/suppress.test.d.ts.map +1 -0
- package/dist/signals/suppress.test.js +213 -0
- package/dist/signals/suppress.test.js.map +1 -0
- package/dist/tools/__tests__/command-spec.test.d.ts +2 -0
- package/dist/tools/__tests__/command-spec.test.d.ts.map +1 -0
- package/dist/tools/__tests__/command-spec.test.js +191 -0
- package/dist/tools/__tests__/command-spec.test.js.map +1 -0
- package/dist/tools/__tests__/compatibility.test.d.ts +5 -0
- package/dist/tools/__tests__/compatibility.test.d.ts.map +1 -0
- package/dist/tools/__tests__/compatibility.test.js +41 -0
- package/dist/tools/__tests__/compatibility.test.js.map +1 -0
- package/dist/tools/__tests__/ids.test.d.ts +5 -0
- package/dist/tools/__tests__/ids.test.d.ts.map +1 -0
- package/dist/tools/__tests__/ids.test.js +56 -0
- package/dist/tools/__tests__/ids.test.js.map +1 -0
- package/dist/tools/__tests__/manifest-assert.test.d.ts +5 -0
- package/dist/tools/__tests__/manifest-assert.test.d.ts.map +1 -0
- package/dist/tools/__tests__/manifest-assert.test.js +66 -0
- package/dist/tools/__tests__/manifest-assert.test.js.map +1 -0
- package/dist/tools/__tests__/registry.test.d.ts +2 -0
- package/dist/tools/__tests__/registry.test.d.ts.map +1 -0
- package/dist/tools/__tests__/registry.test.js +93 -0
- package/dist/tools/__tests__/registry.test.js.map +1 -0
- package/dist/tools/__tests__/types.test.d.ts +2 -0
- package/dist/tools/__tests__/types.test.d.ts.map +1 -0
- package/dist/tools/__tests__/types.test.js +51 -0
- package/dist/tools/__tests__/types.test.js.map +1 -0
- package/dist/tools/capability.d.ts +257 -0
- package/dist/tools/capability.d.ts.map +1 -0
- package/dist/tools/capability.js +46 -0
- package/dist/tools/capability.js.map +1 -0
- package/dist/tools/command-spec.d.ts +211 -0
- package/dist/tools/command-spec.d.ts.map +1 -0
- package/dist/tools/command-spec.js +110 -0
- package/dist/tools/command-spec.js.map +1 -0
- package/dist/tools/compatibility.d.ts +45 -0
- package/dist/tools/compatibility.d.ts.map +1 -0
- package/dist/tools/compatibility.js +49 -0
- package/dist/tools/compatibility.js.map +1 -0
- package/dist/tools/ids.d.ts +61 -0
- package/dist/tools/ids.d.ts.map +1 -0
- package/dist/tools/ids.js +61 -0
- package/dist/tools/ids.js.map +1 -0
- package/dist/tools/index.d.ts +22 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +28 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/manifest-assert.d.ts +35 -0
- package/dist/tools/manifest-assert.d.ts.map +1 -0
- package/dist/tools/manifest-assert.js +67 -0
- package/dist/tools/manifest-assert.js.map +1 -0
- package/dist/tools/manifest.d.ts +178 -0
- package/dist/tools/manifest.d.ts.map +1 -0
- package/dist/tools/manifest.js +35 -0
- package/dist/tools/manifest.js.map +1 -0
- package/dist/tools/registry.d.ts +37 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +49 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/types.d.ts +1021 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +77 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/types/__tests__/signal.test.d.ts +2 -0
- package/dist/types/__tests__/signal.test.d.ts.map +1 -0
- package/dist/types/__tests__/signal.test.js +111 -0
- package/dist/types/__tests__/signal.test.js.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/signal-batch.d.ts +56 -0
- package/dist/types/signal-batch.d.ts.map +1 -0
- package/dist/types/signal-batch.js +54 -0
- package/dist/types/signal-batch.js.map +1 -0
- package/dist/types/signal.d.ts +77 -0
- package/dist/types/signal.d.ts.map +1 -0
- package/dist/types/signal.js +42 -0
- package/dist/types/signal.js.map +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* createSignalFromViolation — the generic identity-stamping signal factory
|
|
3
|
+
* (north-star §5.9, launch).
|
|
4
|
+
*
|
|
5
|
+
* Generalizes fitness's `violationToSignal`: a tool hands a flat violation
|
|
6
|
+
* (`message`, author `severity`, location, optional suggestion) plus its
|
|
7
|
+
* `toolSource` + rule `slug`, and the factory STAMPS the `Signal` identity —
|
|
8
|
+
* `source`, `ruleId`, and the wire `severity` (via {@link SeverityPolicy}) — so an
|
|
9
|
+
* author never retypes fingerprint-relevant identity. Output is byte-identical to
|
|
10
|
+
* the per-tool hand-mapping it replaces.
|
|
11
|
+
*/
|
|
12
|
+
import { type AuthorSeverity } from '../lib/severity-policy.js';
|
|
13
|
+
import { type Signal } from '../types/signal.js';
|
|
14
|
+
/** A flat violation: a message at a location with an author-level severity. */
|
|
15
|
+
export interface ViolationInput {
|
|
16
|
+
readonly message: string;
|
|
17
|
+
readonly severity: AuthorSeverity;
|
|
18
|
+
readonly suggestion?: string;
|
|
19
|
+
readonly file?: string;
|
|
20
|
+
readonly line?: number;
|
|
21
|
+
readonly column?: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Build a {@link Signal} from a violation, stamping `source`/`ruleId` from the
|
|
25
|
+
* tool + slug and the wire `severity` from the policy. `category` defaults to the
|
|
26
|
+
* neutral `quality` (via `createSignal`); the location rides on `code`.
|
|
27
|
+
*/
|
|
28
|
+
export declare function createSignalFromViolation(toolSource: string, slug: string, violation: ViolationInput): Signal;
|
|
29
|
+
//# sourceMappingURL=create-signal-from-violation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-signal-from-violation.d.ts","sourceRoot":"","sources":["../../src/signals/create-signal-from-violation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE/D,+EAA+E;AAC/E,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,cAAc,GACxB,MAAM,CASR"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* createSignalFromViolation — the generic identity-stamping signal factory
|
|
3
|
+
* (north-star §5.9, launch).
|
|
4
|
+
*
|
|
5
|
+
* Generalizes fitness's `violationToSignal`: a tool hands a flat violation
|
|
6
|
+
* (`message`, author `severity`, location, optional suggestion) plus its
|
|
7
|
+
* `toolSource` + rule `slug`, and the factory STAMPS the `Signal` identity —
|
|
8
|
+
* `source`, `ruleId`, and the wire `severity` (via {@link SeverityPolicy}) — so an
|
|
9
|
+
* author never retypes fingerprint-relevant identity. Output is byte-identical to
|
|
10
|
+
* the per-tool hand-mapping it replaces.
|
|
11
|
+
*/
|
|
12
|
+
import { SeverityPolicy } from '../lib/severity-policy.js';
|
|
13
|
+
import { createSignal } from '../types/signal.js';
|
|
14
|
+
/**
|
|
15
|
+
* Build a {@link Signal} from a violation, stamping `source`/`ruleId` from the
|
|
16
|
+
* tool + slug and the wire `severity` from the policy. `category` defaults to the
|
|
17
|
+
* neutral `quality` (via `createSignal`); the location rides on `code`.
|
|
18
|
+
*/
|
|
19
|
+
export function createSignalFromViolation(toolSource, slug, violation) {
|
|
20
|
+
return createSignal({
|
|
21
|
+
source: toolSource,
|
|
22
|
+
ruleId: slug,
|
|
23
|
+
severity: SeverityPolicy.liftAuthorSeverity(violation.severity),
|
|
24
|
+
message: violation.message,
|
|
25
|
+
suggestion: violation.suggestion,
|
|
26
|
+
code: { file: violation.file, line: violation.line, column: violation.column },
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=create-signal-from-violation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-signal-from-violation.js","sourceRoot":"","sources":["../../src/signals/create-signal-from-violation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,cAAc,EAAuB,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAAE,YAAY,EAAe,MAAM,oBAAoB,CAAC;AAY/D;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CACvC,UAAkB,EAClB,IAAY,EACZ,SAAyB;IAEzB,OAAO,YAAY,CAAC;QAClB,MAAM,EAAE,UAAU;QAClB,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,cAAc,CAAC,kBAAkB,CAAC,SAAS,CAAC,QAAQ,CAAC;QAC/D,OAAO,EAAE,SAAS,CAAC,OAAO;QAC1B,UAAU,EAAE,SAAS,CAAC,UAAU;QAChC,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE;KAC/E,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SignalSink — the decoupling seam for cloud signal egress (ADR-0008).
|
|
3
|
+
*
|
|
4
|
+
* A Strategy: callers depend on this interface, never on a concrete cloud
|
|
5
|
+
* client. The default is the Null-Object `noopSignalSink` (OSS / embedded /
|
|
6
|
+
* not-entitled → nothing happens). The OpenSIP Cloud implementation lives in
|
|
7
|
+
* @opensip-cli/output and depends *up* on core — core never imports it,
|
|
8
|
+
* keeping the kernel free of network concerns.
|
|
9
|
+
*
|
|
10
|
+
* Non-blocking invariant: `emit` MUST NOT throw and MUST NOT affect the run's
|
|
11
|
+
* exit code. A failing sink returns `{ accepted: 0, … }`. `authRejected` is the
|
|
12
|
+
* single piece of feedback a caller acts on — the CLI invalidates the cached
|
|
13
|
+
* entitlement on a 401/403 so a lapsed plan stops syncing within one run rather
|
|
14
|
+
* than one cache-TTL.
|
|
15
|
+
*/
|
|
16
|
+
import type { SignalBatch } from '../types/signal-batch.js';
|
|
17
|
+
/** Outcome of an emit. `accepted` drives the "Sent N signals" message. */
|
|
18
|
+
export interface EmitResult {
|
|
19
|
+
/** Signals the server acknowledged. */
|
|
20
|
+
readonly accepted: number;
|
|
21
|
+
/** Server rejected auth (401/403) — caller busts the entitlement cache. */
|
|
22
|
+
readonly authRejected: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Why an active sink accepted nothing, when that is knowable. Best-effort
|
|
25
|
+
* delivery stays non-blocking (ADR-0008) — this exists so the composition
|
|
26
|
+
* root can SURFACE a skip ("0 of N signals delivered: not entitled") instead
|
|
27
|
+
* of the user silently believing their signals shipped. `'unentitled'` — the
|
|
28
|
+
* entitlement check said no; `'error'` — the emit faulted (network, server).
|
|
29
|
+
* Omitted on success and on the no-op sink (where silence is correct: the
|
|
30
|
+
* user opted out or never configured a key).
|
|
31
|
+
*/
|
|
32
|
+
readonly skippedReason?: 'unentitled' | 'error';
|
|
33
|
+
}
|
|
34
|
+
/** A best-effort destination for a run's signals. Implementations MUST NOT throw. */
|
|
35
|
+
export interface SignalSink {
|
|
36
|
+
emit(batch: SignalBatch): Promise<EmitResult>;
|
|
37
|
+
/**
|
|
38
|
+
* Marks an INTENTIONAL no-delivery sink (the user opted out or never
|
|
39
|
+
* configured a key). The composition root keeps such sinks silent — no
|
|
40
|
+
* "0 signals uploaded" notice — whereas an active sink that ships nothing
|
|
41
|
+
* gets a skip notice. A behavioral discriminator, deliberately NOT an
|
|
42
|
+
* identity check against {@link noopSignalSink}: any host (embedded/SaaS)
|
|
43
|
+
* may construct its own no-op sink and it must substitute cleanly.
|
|
44
|
+
*/
|
|
45
|
+
readonly noop?: true;
|
|
46
|
+
}
|
|
47
|
+
/** The default sink: does nothing, accepts nothing. Used whenever cloud sync is off. */
|
|
48
|
+
export declare const noopSignalSink: SignalSink;
|
|
49
|
+
//# sourceMappingURL=signal-sink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signal-sink.d.ts","sourceRoot":"","sources":["../../src/signals/signal-sink.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,0EAA0E;AAC1E,MAAM,WAAW,UAAU;IACzB,uCAAuC;IACvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,2EAA2E;IAC3E,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B;;;;;;;;OAQG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC;CACjD;AAED,qFAAqF;AACrF,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAC9C;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC;CACtB;AAED,wFAAwF;AACxF,eAAO,MAAM,cAAc,EAAE,UAG5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signal-sink.js","sourceRoot":"","sources":["../../src/signals/signal-sink.ts"],"names":[],"mappings":"AAiDA,wFAAwF;AACxF,MAAM,CAAC,MAAM,cAAc,GAAe;IACxC,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;CAClE,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Keyword-agnostic inline-suppression primitive (ADR-0014).
|
|
3
|
+
*
|
|
4
|
+
* The shared machinery behind `@fitness-ignore-*` and `@graph-ignore-*`: a
|
|
5
|
+
* pure text scan of comment directives plus a `Signal`-stream filter. It is
|
|
6
|
+
* keyword-agnostic (the directive keywords are a parameter) and performs no
|
|
7
|
+
* file I/O — content is read through an injected reader, keeping the kernel
|
|
8
|
+
* pure. The *vocabulary* (which keyword a tool uses) stays tool-owned and
|
|
9
|
+
* explicit; only the *machinery* is shared.
|
|
10
|
+
*
|
|
11
|
+
* Matching unit: each signal is tested against a set of **candidate source
|
|
12
|
+
* locations** (default: the signal's own `code`). Graph supplies extra
|
|
13
|
+
* candidate locations for `graph:cycle` (the SCC members) so a directive above
|
|
14
|
+
* any member matches — without this module knowing what an SCC is.
|
|
15
|
+
*
|
|
16
|
+
* Suppression is **unconditional**: a directive with no `-- reason` still
|
|
17
|
+
* suppresses. Reason quality is audited out-of-band (e.g. the
|
|
18
|
+
* `graph-ignore-hygiene` / `fitness-ignore-hygiene` checks), never enforced
|
|
19
|
+
* here.
|
|
20
|
+
*/
|
|
21
|
+
import type { Signal } from '../types/signal.js';
|
|
22
|
+
/** The two directive keywords a tool owns. */
|
|
23
|
+
export interface SuppressionKeywords {
|
|
24
|
+
/** File-level directive, e.g. `@fitness-ignore-file` / `@graph-ignore-file`. */
|
|
25
|
+
readonly file: string;
|
|
26
|
+
/** Next-line directive, e.g. `@fitness-ignore-next-line` / `@graph-ignore-next-line`. */
|
|
27
|
+
readonly nextLine: string;
|
|
28
|
+
}
|
|
29
|
+
/** A candidate source location a directive may target for a given signal. */
|
|
30
|
+
export interface SuppressionLocation {
|
|
31
|
+
readonly file: string;
|
|
32
|
+
/** 1-based line; omit for a file-only candidate. */
|
|
33
|
+
readonly line?: number;
|
|
34
|
+
}
|
|
35
|
+
/** Request for {@link filterSignalsBySuppressions}. */
|
|
36
|
+
export interface SuppressionRequest {
|
|
37
|
+
readonly signals: readonly Signal[];
|
|
38
|
+
/** The tool's explicit directive keywords. */
|
|
39
|
+
readonly keywords: SuppressionKeywords;
|
|
40
|
+
/** Injected content reader (kernel performs no file I/O). */
|
|
41
|
+
readonly readFile: (filePath: string) => Promise<string>;
|
|
42
|
+
/**
|
|
43
|
+
* Candidate locations a directive may target for this signal. Defaults to
|
|
44
|
+
* the signal's own `code` location. Graph overrides this for `graph:cycle`.
|
|
45
|
+
*/
|
|
46
|
+
readonly locate?: (signal: Signal) => readonly SuppressionLocation[];
|
|
47
|
+
/**
|
|
48
|
+
* The id a directive must name to suppress this signal. Defaults to
|
|
49
|
+
* `signal.ruleId`. Fitness passes `() => checkId` to reproduce its exact
|
|
50
|
+
* per-check semantics.
|
|
51
|
+
*/
|
|
52
|
+
readonly ruleIdOf?: (signal: Signal) => string;
|
|
53
|
+
}
|
|
54
|
+
/** One suppressed signal + the directive that suppressed it. */
|
|
55
|
+
export interface SuppressionMatch {
|
|
56
|
+
readonly signal: Signal;
|
|
57
|
+
readonly ruleId: string;
|
|
58
|
+
readonly file: string;
|
|
59
|
+
/** The 1-based line, or `'file'` for a file-level directive. */
|
|
60
|
+
readonly line: number | 'file';
|
|
61
|
+
}
|
|
62
|
+
/** Result of {@link filterSignalsBySuppressions}. */
|
|
63
|
+
export interface SuppressionResult {
|
|
64
|
+
readonly kept: readonly Signal[];
|
|
65
|
+
readonly suppressed: readonly SuppressionMatch[];
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Per-file scan result. Exposed so lower-level callers (e.g. fitness's
|
|
69
|
+
* `parseFileIgnoreDirective` / `parseIgnoreDirectives` wrappers) can build on
|
|
70
|
+
* the same single scan implementation instead of re-deriving it.
|
|
71
|
+
*/
|
|
72
|
+
export interface SuppressionScan {
|
|
73
|
+
/** Ids named by a file-level directive. */
|
|
74
|
+
readonly fileIgnoredIds: ReadonlySet<string>;
|
|
75
|
+
/** Target 1-based line → ids named by a next-line directive. */
|
|
76
|
+
readonly lineIgnoredIds: ReadonlyMap<number, ReadonlySet<string>>;
|
|
77
|
+
/** 1-based lines that ARE directive comments (anti-recursion guard). */
|
|
78
|
+
readonly directiveLines: ReadonlySet<number>;
|
|
79
|
+
}
|
|
80
|
+
/** Scan a file's content once, extracting every directive for `keywords`. */
|
|
81
|
+
export declare function scanSuppressionDirectives(content: string, keywords: SuppressionKeywords): SuppressionScan;
|
|
82
|
+
/**
|
|
83
|
+
* Filter a `Signal` stream by inline suppression directives.
|
|
84
|
+
*
|
|
85
|
+
* Each file referenced by a candidate location is read once (via the injected
|
|
86
|
+
* `readFile`) and scanned once. A signal is suppressed when, for ANY of its
|
|
87
|
+
* candidate locations, the directive id (`ruleIdOf(signal)`, default
|
|
88
|
+
* `signal.ruleId`) is file-ignored for that file, or next-line-ignored at that
|
|
89
|
+
* location's line. A location pointing AT a directive line is never suppressed
|
|
90
|
+
* by a next-line directive (anti-recursion); file-level still applies.
|
|
91
|
+
*
|
|
92
|
+
* Read-failure posture (fail-loud; Phase 5): the injected `readFile` reads
|
|
93
|
+
* project SOURCE files the analyzers already loaded, so a read failure is
|
|
94
|
+
* UNEXPECTED. An `ENOENT` (the file was genuinely removed) is non-fatal but
|
|
95
|
+
* ATTRIBUTED — it is surfaced via a warning-level `signals.suppress.directive-
|
|
96
|
+
* file-missing` log (so a potentially-dropped waiver is diagnosable) and that
|
|
97
|
+
* file contributes no directives. ANY other read failure (`EACCES`, `EMFILE`,
|
|
98
|
+
* decode error, …) is propagated (THROWS) — the run aborts loudly rather than
|
|
99
|
+
* silently dropping a waiver and leaking the waived signal as a finding.
|
|
100
|
+
*/
|
|
101
|
+
export declare function filterSignalsBySuppressions(request: SuppressionRequest): Promise<SuppressionResult>;
|
|
102
|
+
//# sourceMappingURL=suppress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suppress.d.ts","sourceRoot":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IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,SAAS,gBAAgB,EAAE,CAAC;CAClD;AA+HD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,2CAA2C;IAC3C,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7C,gEAAgE;IAChE,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;IAClE,wEAAwE;IACxE,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC9C;AAED,6EAA6E;AAC7E,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,mBAAmB,GAC5B,eAAe,CA0CjB;AAeD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CA2D5B"}
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Keyword-agnostic inline-suppression primitive (ADR-0014).
|
|
3
|
+
*
|
|
4
|
+
* The shared machinery behind `@fitness-ignore-*` and `@graph-ignore-*`: a
|
|
5
|
+
* pure text scan of comment directives plus a `Signal`-stream filter. It is
|
|
6
|
+
* keyword-agnostic (the directive keywords are a parameter) and performs no
|
|
7
|
+
* file I/O — content is read through an injected reader, keeping the kernel
|
|
8
|
+
* pure. The *vocabulary* (which keyword a tool uses) stays tool-owned and
|
|
9
|
+
* explicit; only the *machinery* is shared.
|
|
10
|
+
*
|
|
11
|
+
* Matching unit: each signal is tested against a set of **candidate source
|
|
12
|
+
* locations** (default: the signal's own `code`). Graph supplies extra
|
|
13
|
+
* candidate locations for `graph:cycle` (the SCC members) so a directive above
|
|
14
|
+
* any member matches — without this module knowing what an SCC is.
|
|
15
|
+
*
|
|
16
|
+
* Suppression is **unconditional**: a directive with no `-- reason` still
|
|
17
|
+
* suppresses. Reason quality is audited out-of-band (e.g. the
|
|
18
|
+
* `graph-ignore-hygiene` / `fitness-ignore-hygiene` checks), never enforced
|
|
19
|
+
* here.
|
|
20
|
+
*/
|
|
21
|
+
import { logger } from '../lib/logger.js';
|
|
22
|
+
import { COMMENT_OPENERS } from './comment-openers.js';
|
|
23
|
+
// =============================================================================
|
|
24
|
+
// INTERNAL CONSTANTS
|
|
25
|
+
// =============================================================================
|
|
26
|
+
/**
|
|
27
|
+
* When a next-line directive is itself preceded by other directive lines, the
|
|
28
|
+
* scanner skips over up to this many stacked directives to find the line the
|
|
29
|
+
* suppression actually targets.
|
|
30
|
+
*/
|
|
31
|
+
const MAX_DIRECTIVE_SKIP = 3;
|
|
32
|
+
/**
|
|
33
|
+
* File-level directives are only honored in the first N lines of a file (they
|
|
34
|
+
* are a "near the top" convention). Matches the historical fitness limit.
|
|
35
|
+
*/
|
|
36
|
+
const FILE_DIRECTIVE_SCAN_LIMIT = 50;
|
|
37
|
+
/**
|
|
38
|
+
* Directive keyword prefixes recognized when skipping over stacked directive
|
|
39
|
+
* lines to find a next-line target. Covers both first-party tools plus the
|
|
40
|
+
* common foreign suppressors so a stacked directive of any kind is skipped.
|
|
41
|
+
*/
|
|
42
|
+
const KNOWN_DIRECTIVE_KEYWORDS = [
|
|
43
|
+
'eslint-disable-next-line',
|
|
44
|
+
'eslint-disable-line',
|
|
45
|
+
'@ts-expect-error',
|
|
46
|
+
'@ts-ignore',
|
|
47
|
+
'@ts-nocheck',
|
|
48
|
+
'prettier-ignore',
|
|
49
|
+
'biome-ignore',
|
|
50
|
+
'@fitness-ignore-next-line',
|
|
51
|
+
'@fitness-ignore-file',
|
|
52
|
+
'@graph-ignore-next-line',
|
|
53
|
+
'@graph-ignore-file',
|
|
54
|
+
];
|
|
55
|
+
// =============================================================================
|
|
56
|
+
// INTERNAL — directive text scanning
|
|
57
|
+
// =============================================================================
|
|
58
|
+
function isIdChar(char) {
|
|
59
|
+
const code = char.codePointAt(0) ?? 0;
|
|
60
|
+
const isLowerCase = code >= 97 && code <= 122;
|
|
61
|
+
const isUpperCase = code >= 65 && code <= 90;
|
|
62
|
+
const isDigit = code >= 48 && code <= 57;
|
|
63
|
+
// `_` `-` `/` `:` — `:` admits namespaced ids like `graph:cycle`.
|
|
64
|
+
const isSpecialChar = code === 95 || code === 45 || code === 47 || code === 58;
|
|
65
|
+
return isLowerCase || isUpperCase || isDigit || isSpecialChar;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Extract the id token a directive names, or `null` when `line` is not a
|
|
69
|
+
* `<comment> <directiveKeyword> <id>` directive.
|
|
70
|
+
*/
|
|
71
|
+
/**
|
|
72
|
+
* Find the first comment opener that is not inside a string literal.
|
|
73
|
+
* This prevents matching `//` inside "http://..." or "foo//bar" or directives
|
|
74
|
+
* hidden inside string literals (false positives) and ensures trailing
|
|
75
|
+
* directives after code-with-embedded-// are found (false negatives).
|
|
76
|
+
*/
|
|
77
|
+
function findFirstRealCommentOpener(line) {
|
|
78
|
+
let i = 0;
|
|
79
|
+
const len = line.length;
|
|
80
|
+
let inString = null; // ' or "
|
|
81
|
+
while (i < len) {
|
|
82
|
+
const ch = line[i];
|
|
83
|
+
if (inString) {
|
|
84
|
+
if (ch === inString) {
|
|
85
|
+
// naive: no escape handling (sufficient for directive scanner; escaped quotes are rare in practice here)
|
|
86
|
+
inString = null;
|
|
87
|
+
}
|
|
88
|
+
i++;
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
if (ch === '"' || ch === "'") {
|
|
92
|
+
inString = ch;
|
|
93
|
+
i++;
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
// check for openers
|
|
97
|
+
for (const [opener, length] of COMMENT_OPENERS) {
|
|
98
|
+
if (line.startsWith(opener, i)) {
|
|
99
|
+
return { index: i, length };
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
i++;
|
|
103
|
+
}
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
function extractDirectiveId(line, directiveKeyword) {
|
|
107
|
+
const openerHit = findFirstRealCommentOpener(line);
|
|
108
|
+
if (!openerHit)
|
|
109
|
+
return null;
|
|
110
|
+
const afterComment = line.slice(openerHit.index + openerHit.length).trimStart();
|
|
111
|
+
if (!afterComment.startsWith(directiveKeyword))
|
|
112
|
+
return null;
|
|
113
|
+
const afterDirective = afterComment.slice(directiveKeyword.length);
|
|
114
|
+
if (afterDirective.length === 0 ||
|
|
115
|
+
(!afterDirective.startsWith(' ') && !afterDirective.startsWith('\t'))) {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
let id = '';
|
|
119
|
+
for (const char of afterDirective.trimStart()) {
|
|
120
|
+
if (isIdChar(char))
|
|
121
|
+
id += char;
|
|
122
|
+
else
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
return id.length > 0 ? id : null;
|
|
126
|
+
}
|
|
127
|
+
/** True when a line is a known directive comment (used to skip stacked directives). */
|
|
128
|
+
function isKnownDirectiveLine(line) {
|
|
129
|
+
const trimmed = line.trimStart();
|
|
130
|
+
if (!trimmed.startsWith('//') && !trimmed.startsWith('/*'))
|
|
131
|
+
return false;
|
|
132
|
+
const content = trimmed.slice(2).trimStart();
|
|
133
|
+
return KNOWN_DIRECTIVE_KEYWORDS.some((keyword) => {
|
|
134
|
+
if (!content.startsWith(keyword))
|
|
135
|
+
return false;
|
|
136
|
+
const next = content[keyword.length];
|
|
137
|
+
return next === undefined || next === ' ' || next === '\t' || next === ':';
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
/** Scan a file's content once, extracting every directive for `keywords`. */
|
|
141
|
+
export function scanSuppressionDirectives(content, keywords) {
|
|
142
|
+
const lines = content.split('\n');
|
|
143
|
+
const fileIgnoredIds = new Set();
|
|
144
|
+
const lineIgnoredIds = new Map();
|
|
145
|
+
const directiveLines = new Set();
|
|
146
|
+
for (let i = 0; i < lines.length; i++) {
|
|
147
|
+
const line = lines[i] ?? '';
|
|
148
|
+
if (i < FILE_DIRECTIVE_SCAN_LIMIT) {
|
|
149
|
+
const fileId = extractDirectiveId(line, keywords.file);
|
|
150
|
+
if (fileId !== null) {
|
|
151
|
+
fileIgnoredIds.add(fileId);
|
|
152
|
+
directiveLines.add(i + 1);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
const nextLineId = extractDirectiveId(line, keywords.nextLine);
|
|
156
|
+
if (nextLineId !== null) {
|
|
157
|
+
directiveLines.add(i + 1);
|
|
158
|
+
// Resolve the line the directive targets, skipping stacked directives.
|
|
159
|
+
let target = i + 1; // 0-based index of the next line
|
|
160
|
+
let skipped = 0;
|
|
161
|
+
while (target < lines.length &&
|
|
162
|
+
skipped < MAX_DIRECTIVE_SKIP &&
|
|
163
|
+
isKnownDirectiveLine(lines[target] ?? '')) {
|
|
164
|
+
target++;
|
|
165
|
+
skipped++;
|
|
166
|
+
}
|
|
167
|
+
const targetLine = target + 1; // 1-based
|
|
168
|
+
let set = lineIgnoredIds.get(targetLine);
|
|
169
|
+
if (!set) {
|
|
170
|
+
set = new Set();
|
|
171
|
+
lineIgnoredIds.set(targetLine, set);
|
|
172
|
+
}
|
|
173
|
+
set.add(nextLineId);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return { fileIgnoredIds, lineIgnoredIds, directiveLines };
|
|
177
|
+
}
|
|
178
|
+
// =============================================================================
|
|
179
|
+
// PUBLIC API
|
|
180
|
+
// =============================================================================
|
|
181
|
+
const defaultLocate = (signal) => {
|
|
182
|
+
const file = signal.code?.file;
|
|
183
|
+
// An absent OR empty file path is not a real candidate location — it can
|
|
184
|
+
// carry no directive and (post-Phase-5) must never be handed to `readFile`,
|
|
185
|
+
// where it would resolve to a directory and fail loud spuriously.
|
|
186
|
+
if (file === undefined || file === '')
|
|
187
|
+
return [];
|
|
188
|
+
return [{ file, line: signal.code?.line }];
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* Filter a `Signal` stream by inline suppression directives.
|
|
192
|
+
*
|
|
193
|
+
* Each file referenced by a candidate location is read once (via the injected
|
|
194
|
+
* `readFile`) and scanned once. A signal is suppressed when, for ANY of its
|
|
195
|
+
* candidate locations, the directive id (`ruleIdOf(signal)`, default
|
|
196
|
+
* `signal.ruleId`) is file-ignored for that file, or next-line-ignored at that
|
|
197
|
+
* location's line. A location pointing AT a directive line is never suppressed
|
|
198
|
+
* by a next-line directive (anti-recursion); file-level still applies.
|
|
199
|
+
*
|
|
200
|
+
* Read-failure posture (fail-loud; Phase 5): the injected `readFile` reads
|
|
201
|
+
* project SOURCE files the analyzers already loaded, so a read failure is
|
|
202
|
+
* UNEXPECTED. An `ENOENT` (the file was genuinely removed) is non-fatal but
|
|
203
|
+
* ATTRIBUTED — it is surfaced via a warning-level `signals.suppress.directive-
|
|
204
|
+
* file-missing` log (so a potentially-dropped waiver is diagnosable) and that
|
|
205
|
+
* file contributes no directives. ANY other read failure (`EACCES`, `EMFILE`,
|
|
206
|
+
* decode error, …) is propagated (THROWS) — the run aborts loudly rather than
|
|
207
|
+
* silently dropping a waiver and leaking the waived signal as a finding.
|
|
208
|
+
*/
|
|
209
|
+
export async function filterSignalsBySuppressions(request) {
|
|
210
|
+
const { signals, keywords, readFile } = request;
|
|
211
|
+
const locate = request.locate ?? defaultLocate;
|
|
212
|
+
const ruleIdOf = request.ruleIdOf ?? ((s) => s.ruleId);
|
|
213
|
+
// Resolve candidate locations once per signal; collect the unique files.
|
|
214
|
+
const locationsBySignal = new Map();
|
|
215
|
+
const uniqueFiles = new Set();
|
|
216
|
+
for (const signal of signals) {
|
|
217
|
+
const locations = locate(signal);
|
|
218
|
+
locationsBySignal.set(signal, locations);
|
|
219
|
+
for (const loc of locations)
|
|
220
|
+
uniqueFiles.add(loc.file);
|
|
221
|
+
}
|
|
222
|
+
// Scan each unique file once, in parallel. A read failure is UNEXPECTED
|
|
223
|
+
// (these are project SOURCE files the analyzers already loaded), so it must
|
|
224
|
+
// not silently degrade a file to "no directives" and leak its waivers: an
|
|
225
|
+
// `ENOENT` is non-fatal but attributed (logged + recorded below), any other
|
|
226
|
+
// error propagates and aborts the run.
|
|
227
|
+
const scanByFile = new Map();
|
|
228
|
+
const missingFiles = new Set();
|
|
229
|
+
await Promise.all([...uniqueFiles].map(async (filePath) => {
|
|
230
|
+
try {
|
|
231
|
+
// @fitness-ignore-next-line unbounded-memory -- `readFile` is the injected reader (the kernel does no real I/O); callers read project SOURCE files the analyzers already loaded — inherently bounded, not attacker-controlled blobs.
|
|
232
|
+
const content = await readFile(filePath);
|
|
233
|
+
scanByFile.set(filePath, scanSuppressionDirectives(content, keywords));
|
|
234
|
+
}
|
|
235
|
+
catch (error) {
|
|
236
|
+
if (!isEnoent(error)) {
|
|
237
|
+
// Unexpected read failure (EACCES, EMFILE, decode, …) — fail loud
|
|
238
|
+
// rather than drop a waiver and leak the waived signal as a finding.
|
|
239
|
+
throw error;
|
|
240
|
+
}
|
|
241
|
+
// ENOENT: the file was genuinely removed. A removed source file yields
|
|
242
|
+
// no occurrences, so its signals should not exist — but we surface it
|
|
243
|
+
// (attribution below) instead of silently treating it as "no
|
|
244
|
+
// directives", so a leaked waiver is always diagnosable.
|
|
245
|
+
missingFiles.add(filePath);
|
|
246
|
+
}
|
|
247
|
+
}));
|
|
248
|
+
// @fitness-ignore-next-line detached-promises -- attributeMissingFiles is synchronous (returns void; only emits logger.warn) — there is no promise to await.
|
|
249
|
+
attributeMissingFiles(missingFiles, request);
|
|
250
|
+
const kept = [];
|
|
251
|
+
const suppressed = [];
|
|
252
|
+
for (const signal of signals) {
|
|
253
|
+
const id = ruleIdOf(signal);
|
|
254
|
+
const match = matchSuppression(locationsBySignal.get(signal) ?? [], id, scanByFile);
|
|
255
|
+
if (match === null) {
|
|
256
|
+
kept.push(signal);
|
|
257
|
+
}
|
|
258
|
+
else {
|
|
259
|
+
suppressed.push({ signal, ruleId: id, file: match.file, line: match.line });
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
return { kept, suppressed };
|
|
263
|
+
}
|
|
264
|
+
/** True when `error` is a Node `ENOENT` (file genuinely absent). */
|
|
265
|
+
function isEnoent(error) {
|
|
266
|
+
return (typeof error === 'object' && error !== null && error.code === 'ENOENT');
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Surface every `ENOENT`-absent directive file as a warning-level structured
|
|
270
|
+
* log, one `evt` per `(file, ruleId)` pair so a potentially-dropped waiver
|
|
271
|
+
* names both the unreadable file AND the signal whose suppression could not be
|
|
272
|
+
* evaluated. Emitting per-ruleId (rather than per-file) is what makes a leaked
|
|
273
|
+
* waiver a 1-minute find. The `logger` singleton stamps `runId` from the
|
|
274
|
+
* current scope, so no logger injection is threaded through the pure scan.
|
|
275
|
+
*/
|
|
276
|
+
function attributeMissingFiles(missingFiles, request) {
|
|
277
|
+
if (missingFiles.size === 0)
|
|
278
|
+
return;
|
|
279
|
+
const locate = request.locate ?? defaultLocate;
|
|
280
|
+
const ruleIdOf = request.ruleIdOf ?? ((s) => s.ruleId);
|
|
281
|
+
// ruleIds whose candidate locations reference each missing file.
|
|
282
|
+
const ruleIdsByFile = new Map();
|
|
283
|
+
for (const signal of request.signals) {
|
|
284
|
+
const id = ruleIdOf(signal);
|
|
285
|
+
for (const loc of locate(signal)) {
|
|
286
|
+
if (!missingFiles.has(loc.file))
|
|
287
|
+
continue;
|
|
288
|
+
let ids = ruleIdsByFile.get(loc.file);
|
|
289
|
+
if (!ids) {
|
|
290
|
+
ids = new Set();
|
|
291
|
+
ruleIdsByFile.set(loc.file, ids);
|
|
292
|
+
}
|
|
293
|
+
ids.add(id);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
for (const file of missingFiles) {
|
|
297
|
+
for (const ruleId of ruleIdsByFile.get(file) ?? []) {
|
|
298
|
+
logger.warn('Suppression directive file is missing; a waiver may not be applied', {
|
|
299
|
+
evt: 'signals.suppress.directive-file-missing',
|
|
300
|
+
module: 'core:signals:suppress',
|
|
301
|
+
file,
|
|
302
|
+
ruleId,
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
/** The first candidate location that suppresses `id`, or `null`. */
|
|
308
|
+
function matchSuppression(locations, id, scanByFile) {
|
|
309
|
+
for (const loc of locations) {
|
|
310
|
+
const scan = scanByFile.get(loc.file);
|
|
311
|
+
if (scan === undefined)
|
|
312
|
+
continue;
|
|
313
|
+
if (scan.fileIgnoredIds.has(id)) {
|
|
314
|
+
return { file: loc.file, line: 'file' };
|
|
315
|
+
}
|
|
316
|
+
const line = loc.line;
|
|
317
|
+
if (line !== undefined &&
|
|
318
|
+
!scan.directiveLines.has(line) && // anti-recursion: never suppress a directive line itself
|
|
319
|
+
scan.lineIgnoredIds.get(line)?.has(id) === true) {
|
|
320
|
+
return { file: loc.file, line };
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
return null;
|
|
324
|
+
}
|
|
325
|
+
//# sourceMappingURL=suppress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suppress.js","sourceRoot":"","sources":["../../src/signals/suppress.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AA0DvD,gFAAgF;AAChF,qBAAqB;AACrB,gFAAgF;AAEhF;;;;GAIG;AACH,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAE7B;;;GAGG;AACH,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAErC;;;;GAIG;AACH,MAAM,wBAAwB,GAAsB;IAClD,0BAA0B;IAC1B,qBAAqB;IACrB,kBAAkB;IAClB,YAAY;IACZ,aAAa;IACb,iBAAiB;IACjB,cAAc;IACd,2BAA2B;IAC3B,sBAAsB;IACtB,yBAAyB;IACzB,oBAAoB;CACrB,C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