@agent-teams/engineering-foundation 1.2.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/capabilities/public-api-compatibility/adapters/inbound/configuration/load-public-api-audit.d.ts +4 -0
- package/dist/capabilities/public-api-compatibility/adapters/inbound/configuration/load-public-api-audit.d.ts.map +1 -0
- package/dist/capabilities/public-api-compatibility/adapters/inbound/configuration/load-public-api-audit.js +13 -0
- package/dist/capabilities/public-api-compatibility/adapters/inbound/configuration/load-public-api-audit.js.map +1 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/audit-compiler-bindings.d.ts +17 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/audit-compiler-bindings.d.ts.map +1 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/audit-compiler-bindings.js +139 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/audit-compiler-bindings.js.map +1 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/load-pinned-audit-sdk.d.ts +7 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/load-pinned-audit-sdk.d.ts.map +1 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/load-pinned-audit-sdk.js +14 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/load-pinned-audit-sdk.js.map +1 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-extractor.d.ts.map +1 -1
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-extractor.js +10 -43
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-extractor.js.map +1 -1
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-observer.d.ts +6 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-observer.d.ts.map +1 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-observer.js +497 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-observer.js.map +1 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/pinned-audit-compiler.d.ts +101 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/pinned-audit-compiler.d.ts.map +1 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/pinned-audit-compiler.js +2 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/pinned-audit-compiler.js.map +1 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/prepare-public-api-extractor.d.ts +15 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/prepare-public-api-extractor.d.ts.map +1 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/prepare-public-api-extractor.js +47 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/prepare-public-api-extractor.js.map +1 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/public-api-audit-inputs.d.ts +43 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/public-api-audit-inputs.d.ts.map +1 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/public-api-audit-inputs.js +239 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/public-api-audit-inputs.js.map +1 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/public-api-baseline-mapper.d.ts +1 -1
- package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/public-api-baseline-mapper.d.ts.map +1 -1
- package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/public-api-baseline-mapper.js.map +1 -1
- package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/stage-public-api-audit.d.ts +12 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/stage-public-api-audit.d.ts.map +1 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/stage-public-api-audit.js +169 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/stage-public-api-audit.js.map +1 -0
- package/dist/capabilities/public-api-compatibility/api.d.ts +3 -0
- package/dist/capabilities/public-api-compatibility/api.d.ts.map +1 -0
- package/dist/capabilities/public-api-compatibility/api.js +2 -0
- package/dist/capabilities/public-api-compatibility/api.js.map +1 -0
- package/dist/capabilities/public-api-compatibility/application/model/public-api-audit-report.d.ts +36 -0
- package/dist/capabilities/public-api-compatibility/application/model/public-api-audit-report.d.ts.map +1 -0
- package/dist/capabilities/public-api-compatibility/application/model/public-api-audit-report.js +2 -0
- package/dist/capabilities/public-api-compatibility/application/model/public-api-audit-report.js.map +1 -0
- package/dist/capabilities/public-api-compatibility/application/model/public-api-observation.d.ts +73 -0
- package/dist/capabilities/public-api-compatibility/application/model/public-api-observation.d.ts.map +1 -0
- package/dist/capabilities/public-api-compatibility/application/model/public-api-observation.js +5 -0
- package/dist/capabilities/public-api-compatibility/application/model/public-api-observation.js.map +1 -0
- package/dist/capabilities/public-api-compatibility/application/policies/project-public-api-observation.d.ts +33 -0
- package/dist/capabilities/public-api-compatibility/application/policies/project-public-api-observation.d.ts.map +1 -0
- package/dist/capabilities/public-api-compatibility/application/policies/project-public-api-observation.js +110 -0
- package/dist/capabilities/public-api-compatibility/application/policies/project-public-api-observation.js.map +1 -0
- package/dist/capabilities/public-api-compatibility/application/policies/public-api-audit-eligibility.d.ts +9 -0
- package/dist/capabilities/public-api-compatibility/application/policies/public-api-audit-eligibility.d.ts.map +1 -0
- package/dist/capabilities/public-api-compatibility/application/policies/public-api-audit-eligibility.js +180 -0
- package/dist/capabilities/public-api-compatibility/application/policies/public-api-audit-eligibility.js.map +1 -0
- package/dist/capabilities/public-api-compatibility/application/ports/public-api-observer.d.ts +29 -0
- package/dist/capabilities/public-api-compatibility/application/ports/public-api-observer.d.ts.map +1 -0
- package/dist/capabilities/public-api-compatibility/application/ports/public-api-observer.js +2 -0
- package/dist/capabilities/public-api-compatibility/application/ports/public-api-observer.js.map +1 -0
- package/dist/capabilities/public-api-compatibility/application/use-cases/audit-public-api.d.ts +14 -0
- package/dist/capabilities/public-api-compatibility/application/use-cases/audit-public-api.d.ts.map +1 -0
- package/dist/capabilities/public-api-compatibility/application/use-cases/audit-public-api.js +144 -0
- package/dist/capabilities/public-api-compatibility/application/use-cases/audit-public-api.js.map +1 -0
- package/dist/capabilities/public-api-compatibility/contract/public-api-audit.d.ts +58 -0
- package/dist/capabilities/public-api-compatibility/contract/public-api-audit.d.ts.map +1 -0
- package/dist/capabilities/public-api-compatibility/contract/public-api-audit.js +2 -0
- package/dist/capabilities/public-api-compatibility/contract/public-api-audit.js.map +1 -0
- package/dist/capabilities/public-api-compatibility/node.d.ts +3 -0
- package/dist/capabilities/public-api-compatibility/node.d.ts.map +1 -0
- package/dist/capabilities/public-api-compatibility/node.js +2 -0
- package/dist/capabilities/public-api-compatibility/node.js.map +1 -0
- package/dist/capabilities/public-api-compatibility/schemas.d.ts +1 -1
- package/dist/capabilities/public-api-compatibility/schemas.d.ts.map +1 -1
- package/dist/capabilities/public-api-compatibility/schemas.js +2 -0
- package/dist/capabilities/public-api-compatibility/schemas.js.map +1 -1
- package/dist/capabilities/source-dependencies/adapters/inbound/configuration/load-capability-config.d.ts +1 -0
- package/dist/capabilities/source-dependencies/adapters/inbound/configuration/load-capability-config.d.ts.map +1 -1
- package/dist/capabilities/source-dependencies/adapters/inbound/configuration/load-capability-config.js +3 -0
- package/dist/capabilities/source-dependencies/adapters/inbound/configuration/load-capability-config.js.map +1 -1
- package/dist/capabilities/source-dependencies/adapters/outbound/node/selected-package-source-discovery.d.ts +2 -0
- package/dist/capabilities/source-dependencies/adapters/outbound/node/selected-package-source-discovery.d.ts.map +1 -1
- package/dist/capabilities/source-dependencies/adapters/outbound/node/selected-package-source-discovery.js +5 -4
- package/dist/capabilities/source-dependencies/adapters/outbound/node/selected-package-source-discovery.js.map +1 -1
- package/dist/capabilities/source-dependencies/adapters/outbound/node/source-census-reader.d.ts +3 -0
- package/dist/capabilities/source-dependencies/adapters/outbound/node/source-census-reader.d.ts.map +1 -0
- package/dist/capabilities/source-dependencies/adapters/outbound/node/source-census-reader.js +32 -0
- package/dist/capabilities/source-dependencies/adapters/outbound/node/source-census-reader.js.map +1 -0
- package/dist/capabilities/source-dependencies/api.d.ts +1 -0
- package/dist/capabilities/source-dependencies/api.d.ts.map +1 -1
- package/dist/capabilities/source-dependencies/api.js.map +1 -1
- package/dist/capabilities/source-dependencies/application/ports/source-census-reader.d.ts +13 -0
- package/dist/capabilities/source-dependencies/application/ports/source-census-reader.d.ts.map +1 -0
- package/dist/capabilities/source-dependencies/application/ports/source-census-reader.js +2 -0
- package/dist/capabilities/source-dependencies/application/ports/source-census-reader.js.map +1 -0
- package/dist/capabilities/source-dependencies/module.d.ts +2 -0
- package/dist/capabilities/source-dependencies/module.d.ts.map +1 -1
- package/dist/capabilities/source-dependencies/module.js +2 -0
- package/dist/capabilities/source-dependencies/module.js.map +1 -1
- package/dist/capabilities/suppression-governance/adapters/inbound/configuration/load-capability-config.d.ts +1 -0
- package/dist/capabilities/suppression-governance/adapters/inbound/configuration/load-capability-config.d.ts.map +1 -1
- package/dist/capabilities/suppression-governance/adapters/inbound/configuration/load-capability-config.js +3 -0
- package/dist/capabilities/suppression-governance/adapters/inbound/configuration/load-capability-config.js.map +1 -1
- package/dist/capabilities/suppression-governance/adapters/outbound/oxc/oxc-suppression-scanner.d.ts.map +1 -1
- package/dist/capabilities/suppression-governance/adapters/outbound/oxc/oxc-suppression-scanner.js +5 -1
- package/dist/capabilities/suppression-governance/adapters/outbound/oxc/oxc-suppression-scanner.js.map +1 -1
- package/dist/capabilities/suppression-governance/module.d.ts +1 -0
- package/dist/capabilities/suppression-governance/module.d.ts.map +1 -1
- package/dist/capabilities/suppression-governance/module.js +1 -0
- package/dist/capabilities/suppression-governance/module.js.map +1 -1
- package/dist/composition/capability-modules.d.ts.map +1 -1
- package/dist/composition/capability-modules.js +3 -0
- package/dist/composition/capability-modules.js.map +1 -1
- package/dist/composition/command-host.d.ts.map +1 -1
- package/dist/composition/command-host.js +2 -1
- package/dist/composition/command-host.js.map +1 -1
- package/dist/composition/quality-coverage.d.ts +6 -0
- package/dist/composition/quality-coverage.d.ts.map +1 -0
- package/dist/composition/quality-coverage.js +25 -0
- package/dist/composition/quality-coverage.js.map +1 -0
- package/dist/features/command-host/adapters/inbound/cli/cli-arguments.d.ts.map +1 -1
- package/dist/features/command-host/adapters/inbound/cli/cli-arguments.js +17 -2
- package/dist/features/command-host/adapters/inbound/cli/cli-arguments.js.map +1 -1
- package/dist/features/command-host/adapters/inbound/cli/foundation-cli.d.ts.map +1 -1
- package/dist/features/command-host/adapters/inbound/cli/foundation-cli.js +38 -1
- package/dist/features/command-host/adapters/inbound/cli/foundation-cli.js.map +1 -1
- package/dist/features/command-host/application/command-invocation.d.ts +1 -0
- package/dist/features/command-host/application/command-invocation.d.ts.map +1 -1
- package/dist/features/command-host/application/command-invocation.js.map +1 -1
- package/dist/features/command-host/application/command-reporting.d.ts +2 -2
- package/dist/features/command-host/application/command-reporting.d.ts.map +1 -1
- package/dist/features/command-host/application/command-reporting.js +4 -1
- package/dist/features/command-host/application/command-reporting.js.map +1 -1
- package/dist/features/command-host/application/command-services.d.ts +10 -1
- package/dist/features/command-host/application/command-services.d.ts.map +1 -1
- package/dist/features/command-host/composition/node-command-host.d.ts +4 -1
- package/dist/features/command-host/composition/node-command-host.d.ts.map +1 -1
- package/dist/features/command-host/composition/node-command-host.js +3 -0
- package/dist/features/command-host/composition/node-command-host.js.map +1 -1
- package/dist/features/foundation-check/adapters/inbound/config/foundation-config-reader.d.ts.map +1 -1
- package/dist/features/foundation-check/adapters/inbound/config/foundation-config-reader.js +2 -1
- package/dist/features/foundation-check/adapters/inbound/config/foundation-config-reader.js.map +1 -1
- package/dist/features/foundation-check/application/ports/foundation-config-input.d.ts +1 -1
- package/dist/features/foundation-check/application/ports/foundation-config-input.d.ts.map +1 -1
- package/dist/features/foundation-check/schemas.d.ts +1 -1
- package/dist/features/foundation-check/schemas.d.ts.map +1 -1
- package/dist/features/foundation-check/schemas.js +2 -1
- package/dist/features/foundation-check/schemas.js.map +1 -1
- package/dist/features/quality-coverage/adapters/configuration.d.ts +3 -0
- package/dist/features/quality-coverage/adapters/configuration.d.ts.map +1 -0
- package/dist/features/quality-coverage/adapters/configuration.js +4 -0
- package/dist/features/quality-coverage/adapters/configuration.js.map +1 -0
- package/dist/features/quality-coverage/adapters/consumer-execution.d.ts +12 -0
- package/dist/features/quality-coverage/adapters/consumer-execution.d.ts.map +1 -0
- package/dist/features/quality-coverage/adapters/consumer-execution.js +35 -0
- package/dist/features/quality-coverage/adapters/consumer-execution.js.map +1 -0
- package/dist/features/quality-coverage/adapters/consumer-observations.d.ts +8 -0
- package/dist/features/quality-coverage/adapters/consumer-observations.d.ts.map +1 -0
- package/dist/features/quality-coverage/adapters/consumer-observations.js +93 -0
- package/dist/features/quality-coverage/adapters/consumer-observations.js.map +1 -0
- package/dist/features/quality-coverage/adapters/consumer-toolchain.d.ts +13 -0
- package/dist/features/quality-coverage/adapters/consumer-toolchain.d.ts.map +1 -0
- package/dist/features/quality-coverage/adapters/consumer-toolchain.js +84 -0
- package/dist/features/quality-coverage/adapters/consumer-toolchain.js.map +1 -0
- package/dist/features/quality-coverage/adapters/oxlint-output.d.ts +8 -0
- package/dist/features/quality-coverage/adapters/oxlint-output.d.ts.map +1 -0
- package/dist/features/quality-coverage/adapters/oxlint-output.js +53 -0
- package/dist/features/quality-coverage/adapters/oxlint-output.js.map +1 -0
- package/dist/features/quality-coverage/adapters/oxlint-session.d.ts +14 -0
- package/dist/features/quality-coverage/adapters/oxlint-session.d.ts.map +1 -0
- package/dist/features/quality-coverage/adapters/oxlint-session.js +53 -0
- package/dist/features/quality-coverage/adapters/oxlint-session.js.map +1 -0
- package/dist/features/quality-coverage/adapters/profile-input.d.ts +9 -0
- package/dist/features/quality-coverage/adapters/profile-input.d.ts.map +1 -0
- package/dist/features/quality-coverage/adapters/profile-input.js +110 -0
- package/dist/features/quality-coverage/adapters/profile-input.js.map +1 -0
- package/dist/features/quality-coverage/adapters/protected-config.d.ts +15 -0
- package/dist/features/quality-coverage/adapters/protected-config.d.ts.map +1 -0
- package/dist/features/quality-coverage/adapters/protected-config.js +200 -0
- package/dist/features/quality-coverage/adapters/protected-config.js.map +1 -0
- package/dist/features/quality-coverage/api.d.ts +13 -0
- package/dist/features/quality-coverage/api.d.ts.map +1 -0
- package/dist/features/quality-coverage/api.js +7 -0
- package/dist/features/quality-coverage/api.js.map +1 -0
- package/dist/features/quality-coverage/application/capability.d.ts +7 -0
- package/dist/features/quality-coverage/application/capability.d.ts.map +1 -0
- package/dist/features/quality-coverage/application/capability.js +12 -0
- package/dist/features/quality-coverage/application/capability.js.map +1 -0
- package/dist/features/quality-coverage/application/check-quality-coverage.d.ts +9 -0
- package/dist/features/quality-coverage/application/check-quality-coverage.d.ts.map +1 -0
- package/dist/features/quality-coverage/application/check-quality-coverage.js +56 -0
- package/dist/features/quality-coverage/application/check-quality-coverage.js.map +1 -0
- package/dist/features/quality-coverage/application/evaluate-coverage.d.ts +6 -0
- package/dist/features/quality-coverage/application/evaluate-coverage.d.ts.map +1 -0
- package/dist/features/quality-coverage/application/evaluate-coverage.js +125 -0
- package/dist/features/quality-coverage/application/evaluate-coverage.js.map +1 -0
- package/dist/features/quality-coverage/application/input-observations.d.ts +6 -0
- package/dist/features/quality-coverage/application/input-observations.d.ts.map +1 -0
- package/dist/features/quality-coverage/application/input-observations.js +2 -0
- package/dist/features/quality-coverage/application/input-observations.js.map +1 -0
- package/dist/features/quality-coverage/application/model.d.ts +57 -0
- package/dist/features/quality-coverage/application/model.d.ts.map +1 -0
- package/dist/features/quality-coverage/application/model.js +2 -0
- package/dist/features/quality-coverage/application/model.js.map +1 -0
- package/dist/features/quality-coverage/application/observation-input.d.ts +17 -0
- package/dist/features/quality-coverage/application/observation-input.d.ts.map +1 -0
- package/dist/features/quality-coverage/application/observation-input.js +2 -0
- package/dist/features/quality-coverage/application/observation-input.js.map +1 -0
- package/dist/features/quality-coverage/application/profile.d.ts +38 -0
- package/dist/features/quality-coverage/application/profile.d.ts.map +1 -0
- package/dist/features/quality-coverage/application/profile.js +2 -0
- package/dist/features/quality-coverage/application/profile.js.map +1 -0
- package/dist/features/quality-coverage/application/rules.d.ts +20 -0
- package/dist/features/quality-coverage/application/rules.d.ts.map +1 -0
- package/dist/features/quality-coverage/application/rules.js +33 -0
- package/dist/features/quality-coverage/application/rules.js.map +1 -0
- package/dist/features/quality-coverage/application/script-route.d.ts +3 -0
- package/dist/features/quality-coverage/application/script-route.d.ts.map +1 -0
- package/dist/features/quality-coverage/application/script-route.js +46 -0
- package/dist/features/quality-coverage/application/script-route.js.map +1 -0
- package/dist/features/quality-coverage/application/source-coverage.d.ts +19 -0
- package/dist/features/quality-coverage/application/source-coverage.d.ts.map +1 -0
- package/dist/features/quality-coverage/application/source-coverage.js +46 -0
- package/dist/features/quality-coverage/application/source-coverage.js.map +1 -0
- package/dist/features/quality-coverage/application/tool-execution.d.ts +2 -0
- package/dist/features/quality-coverage/application/tool-execution.d.ts.map +1 -0
- package/dist/features/quality-coverage/application/tool-execution.js +2 -0
- package/dist/features/quality-coverage/application/tool-execution.js.map +1 -0
- package/dist/features/quality-coverage/node.d.ts +5 -0
- package/dist/features/quality-coverage/node.d.ts.map +1 -0
- package/dist/features/quality-coverage/node.js +5 -0
- package/dist/features/quality-coverage/node.js.map +1 -0
- package/dist/features/quality-coverage/schemas.d.ts +2 -0
- package/dist/features/quality-coverage/schemas.d.ts.map +1 -0
- package/dist/features/quality-coverage/schemas.js +2 -0
- package/dist/features/quality-coverage/schemas.js.map +1 -0
- package/dist/features/validation-reporting/api.d.ts +1 -1
- package/dist/features/validation-reporting/api.d.ts.map +1 -1
- package/dist/features/validation-reporting/api.js.map +1 -1
- package/dist/process-execution/node-process-runner.d.ts.map +1 -1
- package/dist/process-execution/node-process-runner.js +15 -0
- package/dist/process-execution/node-process-runner.js.map +1 -1
- package/dist/process-execution/windows-managed-process.js +2 -2
- package/dist/process-execution/windows-managed-process.js.map +1 -1
- package/dist/schema-catalog.d.ts +1 -1
- package/dist/schema-catalog.d.ts.map +1 -1
- package/dist/schema-ids.d.ts +1 -1
- package/dist/schema-ids.d.ts.map +1 -1
- package/dist/schema-ids.js +2 -0
- package/dist/schema-ids.js.map +1 -1
- package/dist/source-inventory/adapters/outbound/filesystem/filesystem-source-tree-reader.d.ts.map +1 -1
- package/dist/source-inventory/adapters/outbound/filesystem/filesystem-source-tree-reader.js +4 -0
- package/dist/source-inventory/adapters/outbound/filesystem/filesystem-source-tree-reader.js.map +1 -1
- package/package.json +5 -1
- package/schemas/foundation-config/v2.schema.json +201 -0
- package/schemas/package-public-api-audit-report/v1.schema.json +1400 -0
- package/schemas/package-public-api-audit-request/v1.schema.json +339 -0
- package/schemas/quality-source-coverage/v1.schema.json +119 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import { dirname, isAbsolute, join, posix, relative, sep } from "node:path";
|
|
3
|
+
import { realpath } from "node:fs/promises";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { invalidQualityInput, qualityRecord, qualityStrings } from "./profile-input.js";
|
|
6
|
+
function isTestOnlyOverride(override, scope) {
|
|
7
|
+
const patterns = qualityStrings(override["files"]);
|
|
8
|
+
const excluded = override["excludedFiles"] === undefined ? [] : qualityStrings(override["excludedFiles"]);
|
|
9
|
+
if (patterns.length === 0) {
|
|
10
|
+
invalidQualityInput("Overrides require nonempty file selectors.");
|
|
11
|
+
}
|
|
12
|
+
const selected = scope.files.filter((path) => patterns.some((pattern) => posix.matchesGlob(path, pattern)) &&
|
|
13
|
+
!excluded.some((pattern) => posix.matchesGlob(path, pattern)));
|
|
14
|
+
if (selected.length === 0) {
|
|
15
|
+
invalidQualityInput("Override selector classification has no observed files.");
|
|
16
|
+
}
|
|
17
|
+
if (selected.some((path) => !scope.production.includes(path) && !scope.tests.includes(path))) {
|
|
18
|
+
invalidQualityInput("Override selector includes files without production or test classification.");
|
|
19
|
+
}
|
|
20
|
+
return selected.every((path) => scope.tests.includes(path));
|
|
21
|
+
}
|
|
22
|
+
function requirement(path, group, name, expected, comparison = "equal") {
|
|
23
|
+
return { observationId: `${path}#${group}#${name}`, path, name, expected, comparison };
|
|
24
|
+
}
|
|
25
|
+
function severity(value) {
|
|
26
|
+
const input = Array.isArray(value) ? value[0] : value;
|
|
27
|
+
return input === "error" || input === "deny" || input === 2 ? "error" : String(input);
|
|
28
|
+
}
|
|
29
|
+
function ceiling(value) {
|
|
30
|
+
if (!Array.isArray(value)) {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
const option = value[1];
|
|
34
|
+
if (typeof option === "number") {
|
|
35
|
+
return option;
|
|
36
|
+
}
|
|
37
|
+
if (typeof option === "object" && option !== null && "max" in option && typeof option.max === "number") {
|
|
38
|
+
return option.max;
|
|
39
|
+
}
|
|
40
|
+
return undefined;
|
|
41
|
+
}
|
|
42
|
+
async function protectedRules(read) {
|
|
43
|
+
const root = fileURLToPath(new URL("../../../../", import.meta.url));
|
|
44
|
+
const typed = qualityRecord(await read(root, "presets/oxlint/type-aware.json"));
|
|
45
|
+
const maintainability = qualityRecord(await read(root, "presets/oxlint/maintainability.json"));
|
|
46
|
+
return new Map(Object.entries({ ...qualityRecord(typed["rules"]), ...qualityRecord(maintainability["rules"]) })
|
|
47
|
+
.filter(([, value]) => severity(value) === "error"));
|
|
48
|
+
}
|
|
49
|
+
async function configPath(root, physicalRoot, from, reference) {
|
|
50
|
+
if (!reference.endsWith(".json") || isAbsolute(reference)) {
|
|
51
|
+
invalidQualityInput("V1 quality coverage accepts contained JSON Oxlint configuration only.");
|
|
52
|
+
}
|
|
53
|
+
let path;
|
|
54
|
+
try {
|
|
55
|
+
path = await realpath(createRequire(join(root, dirname(from), "package.json")).resolve(reference));
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
invalidQualityInput("An Oxlint extends configuration is missing or unsupported.");
|
|
59
|
+
}
|
|
60
|
+
const suffix = relative(physicalRoot, path);
|
|
61
|
+
if (suffix === ".." || suffix.startsWith(`..${sep}`) || isAbsolute(suffix)) {
|
|
62
|
+
invalidQualityInput("Oxlint configuration escapes the consumer root.");
|
|
63
|
+
}
|
|
64
|
+
return suffix.split(sep).join("/");
|
|
65
|
+
}
|
|
66
|
+
function requiredRuleAssignments(path, group, values, required, testOnly) {
|
|
67
|
+
const assignments = [];
|
|
68
|
+
for (const [name, expected] of required) {
|
|
69
|
+
const suffix = name.split("/").at(-1);
|
|
70
|
+
if (Object.keys(values).some((key) => key !== name && key.split("/").at(-1) === suffix)) {
|
|
71
|
+
invalidQualityInput(`Use the canonical protected rule identifier: ${name}.`);
|
|
72
|
+
}
|
|
73
|
+
if (!Object.hasOwn(values, name)) {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
assignments.push(requirement(path, group, name, "error"));
|
|
77
|
+
const actual = values[name];
|
|
78
|
+
const requiredMaximum = ceiling(expected);
|
|
79
|
+
const maximum = testOnly && requiredMaximum !== undefined ? ceiling(actual) ?? requiredMaximum : requiredMaximum;
|
|
80
|
+
if (maximum !== undefined) {
|
|
81
|
+
assignments.push(requirement(path, group, `${name}:ceiling`, maximum, "ceiling"));
|
|
82
|
+
}
|
|
83
|
+
else if (Array.isArray(actual) && actual.length > 1) {
|
|
84
|
+
invalidQualityInput(`Protected rule options require separate adapter qualification: ${name}.`);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return assignments;
|
|
88
|
+
}
|
|
89
|
+
function observeRuleAssignments(assignments, values) {
|
|
90
|
+
return assignments.map((entry) => ({
|
|
91
|
+
...entry,
|
|
92
|
+
actual: entry.comparison === "ceiling"
|
|
93
|
+
? ceiling(values[entry.name.slice(0, -":ceiling".length)]) ?? "missing numeric ceiling"
|
|
94
|
+
: severity(values[entry.name])
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
97
|
+
function retainStrongerCeilings(rules, required) {
|
|
98
|
+
for (const [name, expected] of required) {
|
|
99
|
+
const previous = ceiling(expected);
|
|
100
|
+
const current = ceiling(rules[name]);
|
|
101
|
+
if (previous !== undefined && current !== undefined && Number.isFinite(current) && current >= 0 && current < previous) {
|
|
102
|
+
required.set(name, rules[name]);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/** A bounded validation of the supported JSON form, never a general effective-config interpreter. */
|
|
107
|
+
export async function inspectProtectedConfig(root, lintPath, read, scope) {
|
|
108
|
+
const physicalRoot = await realpath(root);
|
|
109
|
+
const required = new Map(await protectedRules(read));
|
|
110
|
+
const requiredSettings = ["typeAware", "respectEslintDisableDirectives", "reportUnusedDisableDirectives", ...[...required].flatMap(([name, value]) => ceiling(value) === undefined ? [name] : [name, `${name}:ceiling`])];
|
|
111
|
+
const seen = new Set();
|
|
112
|
+
const active = new Set();
|
|
113
|
+
const assigned = new Set();
|
|
114
|
+
const requiredSettingObservations = [];
|
|
115
|
+
const output = [];
|
|
116
|
+
function inspectAssignments(path, group, values, testOnly = false) {
|
|
117
|
+
const assignments = requiredRuleAssignments(path, group, values, required, testOnly);
|
|
118
|
+
requiredSettingObservations.push(...assignments);
|
|
119
|
+
output.push(...observeRuleAssignments(assignments, values));
|
|
120
|
+
}
|
|
121
|
+
function inspectOption(path, group, name, expected, actual) {
|
|
122
|
+
const entry = requirement(path, group, name, expected);
|
|
123
|
+
requiredSettingObservations.push(entry);
|
|
124
|
+
output.push({ ...entry, actual });
|
|
125
|
+
}
|
|
126
|
+
let typed = false;
|
|
127
|
+
let rootOptions = {};
|
|
128
|
+
async function visit(path) {
|
|
129
|
+
if (active.has(path)) {
|
|
130
|
+
invalidQualityInput("Oxlint extends contains a cycle.");
|
|
131
|
+
}
|
|
132
|
+
if (seen.has(path)) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
if (seen.size >= 32) {
|
|
136
|
+
invalidQualityInput("Oxlint configuration exceeds the qualified JSON closure limit.");
|
|
137
|
+
}
|
|
138
|
+
seen.add(path);
|
|
139
|
+
active.add(path);
|
|
140
|
+
const value = qualityRecord(await read(root, path));
|
|
141
|
+
if (value["jsPlugins"] !== undefined) {
|
|
142
|
+
invalidQualityInput("Executable Oxlint plugins are outside this qualified configuration form.");
|
|
143
|
+
}
|
|
144
|
+
for (const reference of value["extends"] === undefined ? [] : qualityStrings(value["extends"])) {
|
|
145
|
+
await visit(await configPath(root, physicalRoot, path, reference));
|
|
146
|
+
}
|
|
147
|
+
const rules = value["rules"] === undefined ? {} : qualityRecord(value["rules"]);
|
|
148
|
+
for (const name of Object.keys(rules)) {
|
|
149
|
+
assigned.add(name);
|
|
150
|
+
}
|
|
151
|
+
inspectAssignments(path, "rules", rules);
|
|
152
|
+
retainStrongerCeilings(rules, required);
|
|
153
|
+
if (value["options"] !== undefined) {
|
|
154
|
+
const options = qualityRecord(value["options"]);
|
|
155
|
+
if (path === lintPath) {
|
|
156
|
+
rootOptions = options;
|
|
157
|
+
}
|
|
158
|
+
if (options["typeAware"] !== undefined) {
|
|
159
|
+
if (typed) {
|
|
160
|
+
inspectOption(path, "options", "typeAware", "true", scalarSetting(options["typeAware"]));
|
|
161
|
+
}
|
|
162
|
+
typed = options["typeAware"] === true;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
const overrides = value["overrides"];
|
|
166
|
+
if (overrides !== undefined) {
|
|
167
|
+
if (!Array.isArray(overrides) || overrides.length > 1000) {
|
|
168
|
+
invalidQualityInput("Oxlint overrides must be a bounded data list.");
|
|
169
|
+
}
|
|
170
|
+
for (const [index, entry] of overrides.entries()) {
|
|
171
|
+
const override = qualityRecord(entry);
|
|
172
|
+
if (Object.keys(override).some((key) => !["files", "excludedFiles", "rules"].includes(key))) {
|
|
173
|
+
invalidQualityInput("V1 overrides support file selectors and rules only.");
|
|
174
|
+
}
|
|
175
|
+
const testOnly = isTestOnlyOverride(override, scope);
|
|
176
|
+
inspectAssignments(path, `override:${index}`, qualityRecord(override["rules"]), testOnly);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
active.delete(path);
|
|
180
|
+
}
|
|
181
|
+
await visit(lintPath);
|
|
182
|
+
for (const [name, expected] of [["respectEslintDisableDirectives", "false"], ["reportUnusedDisableDirectives", "error"]]) {
|
|
183
|
+
const value = rootOptions[name];
|
|
184
|
+
inspectOption(lintPath, "options", name, expected, value === undefined ? "not configured" : scalarSetting(value));
|
|
185
|
+
}
|
|
186
|
+
inspectOption(lintPath, "effective", "typeAware", "true", String(typed));
|
|
187
|
+
for (const name of required.keys()) {
|
|
188
|
+
if (!assigned.has(name)) {
|
|
189
|
+
inspectOption(lintPath, "effective", name, "error", "not configured");
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return { requiredSettings, requiredSettingObservations, settings: output };
|
|
193
|
+
}
|
|
194
|
+
function scalarSetting(value) {
|
|
195
|
+
if (typeof value === "string" || typeof value === "boolean" || typeof value === "number") {
|
|
196
|
+
return String(value);
|
|
197
|
+
}
|
|
198
|
+
invalidQualityInput("Protected options must have scalar values.");
|
|
199
|
+
}
|
|
200
|
+
//# sourceMappingURL=protected-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protected-config.js","sourceRoot":"","sources":["../../../../src/features/quality-coverage/adapters/protected-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO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AK,CAAC,CAAC,CAAC;IACzE,KAAK,MAAM,IAAI,IAAI,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC;QACnC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAAC,aAAa,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC;QAAC,CAAC;IACrG,CAAC;IACD,OAAO,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AAC7E,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,SAAS,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAAC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IAAC,CAAC;IACnH,mBAAmB,CAAC,4CAA4C,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { checkQualityCoverage, checkStaticQualityCoverage } from "./application/check-quality-coverage.js";
|
|
2
|
+
export { createQualityCoverageCapability, createQualityCoverageCommand } from "./application/capability.js";
|
|
3
|
+
export { QUALITY_COVERAGE_RULES_BY_ID, qualityDiagnostic } from "./application/rules.js";
|
|
4
|
+
export type { QualityCoverageReader, QualityToolProvider, QualityToolSession, QualityCoverageObservation } from "./application/model.js";
|
|
5
|
+
export type { ManagedProcessExecutor, ManagedProcessResult } from "./application/tool-execution.js";
|
|
6
|
+
export { containsScriptRoute, executesScript } from "./application/script-route.js";
|
|
7
|
+
export { classifyQualityCensus, qualitySourceLanguage } from "./application/source-coverage.js";
|
|
8
|
+
export { CapabilityInputError, assertNotCancelled } from "./application/input-observations.js";
|
|
9
|
+
export type { QualityDependencyDeclaration, QualityFileReader } from "./application/input-observations.js";
|
|
10
|
+
export type { QualityCoverageProfile, QualityTopology } from "./application/profile.js";
|
|
11
|
+
export type { ProtectedSetting, RequiredProtectedSetting } from "./application/model.js";
|
|
12
|
+
export type { QualityObservationPorts } from "./application/observation-input.js";
|
|
13
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/features/quality-coverage/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAC3G,OAAO,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AAC5G,OAAO,EAAE,4BAA4B,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACzF,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACzI,YAAY,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACpG,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC/F,YAAY,EAAE,4BAA4B,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAC3G,YAAY,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACxF,YAAY,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACzF,YAAY,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { checkQualityCoverage, checkStaticQualityCoverage } from "./application/check-quality-coverage.js";
|
|
2
|
+
export { createQualityCoverageCapability, createQualityCoverageCommand } from "./application/capability.js";
|
|
3
|
+
export { QUALITY_COVERAGE_RULES_BY_ID, qualityDiagnostic } from "./application/rules.js";
|
|
4
|
+
export { containsScriptRoute, executesScript } from "./application/script-route.js";
|
|
5
|
+
export { classifyQualityCensus, qualitySourceLanguage } from "./application/source-coverage.js";
|
|
6
|
+
export { CapabilityInputError, assertNotCancelled } from "./application/input-observations.js";
|
|
7
|
+
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/features/quality-coverage/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAC3G,OAAO,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AAC5G,OAAO,EAAE,4BAA4B,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAGzF,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CapabilityDefinition, CapabilityInvocation } from "../../validation-reporting/api.js";
|
|
2
|
+
import type { QualityCoverageReader, QualityToolProvider } from "./model.js";
|
|
3
|
+
export declare function createQualityCoverageCapability(reader: QualityCoverageReader): CapabilityDefinition;
|
|
4
|
+
export declare function createQualityCoverageCommand(reader: QualityCoverageReader, tools: QualityToolProvider): (input: CapabilityInvocation & {
|
|
5
|
+
readonly scopeOnly: boolean;
|
|
6
|
+
}) => Promise<import("../../validation-reporting/api.js").CapabilityReport>;
|
|
7
|
+
//# sourceMappingURL=capability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../../../src/features/quality-coverage/application/capability.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACpG,OAAO,KAAK,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAI7E,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,qBAAqB,GAAG,oBAAoB,CAKnG;AAED,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,qBAAqB,EAAE,KAAK,EAAE,mBAAmB,WACrF,oBAAoB,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;CAAE,2EACtE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { checkQualityCoverage, checkStaticQualityCoverage } from "./check-quality-coverage.js";
|
|
2
|
+
import { QUALITY_COVERAGE_ID } from "./rules.js";
|
|
3
|
+
export function createQualityCoverageCapability(reader) {
|
|
4
|
+
return {
|
|
5
|
+
id: QUALITY_COVERAGE_ID, configSchemaVersion: 1,
|
|
6
|
+
run: (invocation) => checkStaticQualityCoverage(invocation, reader)
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export function createQualityCoverageCommand(reader, tools) {
|
|
10
|
+
return (input) => checkQualityCoverage(input, reader, tools);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=capability.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capability.js","sourceRoot":"","sources":["../../../../src/features/quality-coverage/application/capability.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAC/F,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,UAAU,+BAA+B,CAAC,MAA6B;IAC3E,OAAO;QACL,EAAE,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;QAC/C,GAAG,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,0BAA0B,CAAC,UAAU,EAAE,MAAM,CAAC;KACpE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,MAA6B,EAAE,KAA0B;IACpG,OAAO,CAAC,KAA6D,EAAE,EAAE,CAAC,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACvH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type CapabilityInvocation, type CapabilityReport } from "../../validation-reporting/api.js";
|
|
2
|
+
import type { QualityCoverageReader, QualityToolProvider } from "./model.js";
|
|
3
|
+
/** Static validation has no process port and cannot accidentally execute a tool. */
|
|
4
|
+
export declare function checkStaticQualityCoverage(input: CapabilityInvocation, reader: QualityCoverageReader): Promise<CapabilityReport>;
|
|
5
|
+
/** Selection is always observed; only full mode invokes typed lint. */
|
|
6
|
+
export declare function checkQualityCoverage(input: CapabilityInvocation & {
|
|
7
|
+
readonly scopeOnly: boolean;
|
|
8
|
+
}, reader: QualityCoverageReader, tools: QualityToolProvider): Promise<CapabilityReport>;
|
|
9
|
+
//# sourceMappingURL=check-quality-coverage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-quality-coverage.d.ts","sourceRoot":"","sources":["../../../../src/features/quality-coverage/application/check-quality-coverage.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EAAE,KAAK,gBAAgB,EACjD,MAAM,mCAAmC,CAAC;AAE3C,OAAO,KAAK,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAI7E,oFAAoF;AACpF,wBAAsB,0BAA0B,CAAC,KAAK,EAAE,oBAAoB,EAAE,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAStI;AAED,uEAAuE;AACvE,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,oBAAoB,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;CAAE,EAC7D,MAAM,EAAE,qBAAqB,EAC7B,KAAK,EAAE,mBAAmB,GACzB,OAAO,CAAC,gBAAgB,CAAC,CA4B3B"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { capabilityFailureReport, capabilityReport, assertNotCancelled } from "../../validation-reporting/api.js";
|
|
2
|
+
import { evaluateSelectedCoverage, evaluateStaticCoverage, evaluateTypeContext } from "./evaluate-coverage.js";
|
|
3
|
+
import { qualitySourceLanguage } from "./source-coverage.js";
|
|
4
|
+
import { QUALITY_COVERAGE_ID } from "./rules.js";
|
|
5
|
+
/** Static validation has no process port and cannot accidentally execute a tool. */
|
|
6
|
+
export async function checkStaticQualityCoverage(input, reader) {
|
|
7
|
+
try {
|
|
8
|
+
assertNotCancelled(input.signal);
|
|
9
|
+
const observation = await reader.read(input.consumerRoot, input.configPath, input.signal);
|
|
10
|
+
assertNotCancelled(input.signal);
|
|
11
|
+
return report(evaluateStaticCoverage(observation));
|
|
12
|
+
}
|
|
13
|
+
catch (error) {
|
|
14
|
+
return failure(error);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
/** Selection is always observed; only full mode invokes typed lint. */
|
|
18
|
+
export async function checkQualityCoverage(input, reader, tools) {
|
|
19
|
+
try {
|
|
20
|
+
assertNotCancelled(input.signal);
|
|
21
|
+
const observation = await reader.read(input.consumerRoot, input.configPath, input.signal);
|
|
22
|
+
const diagnostics = [...evaluateStaticCoverage(observation)];
|
|
23
|
+
if (diagnostics.length > 0) {
|
|
24
|
+
return report(diagnostics);
|
|
25
|
+
}
|
|
26
|
+
assertNotCancelled(input.signal);
|
|
27
|
+
const session = await tools.prepare(input.consumerRoot, input.configPath, input.signal);
|
|
28
|
+
const production = observation.sources.map(({ path }) => path)
|
|
29
|
+
.filter((path) => qualitySourceLanguage(path) === "typescript" || qualitySourceLanguage(path) === "javascript");
|
|
30
|
+
const selected = await session.select(input.signal);
|
|
31
|
+
diagnostics.push(...evaluateSelectedCoverage(production, selected, observation.testPaths));
|
|
32
|
+
assertNotCancelled(input.signal);
|
|
33
|
+
const typed = production.filter((path) => qualitySourceLanguage(path) === "typescript");
|
|
34
|
+
diagnostics.push(...evaluateTypeContext(typed, await session.typeContext(input.signal)));
|
|
35
|
+
if (diagnostics.length === 0 && !input.scopeOnly) {
|
|
36
|
+
const lint = await session.lint(input.signal);
|
|
37
|
+
const selectedPaths = new Set(selected);
|
|
38
|
+
if (lint.files !== selectedPaths.size || lint.diagnostics.some(({ location }) => !selectedPaths.has(location.path))) {
|
|
39
|
+
throw new Error("Typed execution evidence differs from the qualified selection.");
|
|
40
|
+
}
|
|
41
|
+
diagnostics.push(...lint.diagnostics);
|
|
42
|
+
}
|
|
43
|
+
assertNotCancelled(input.signal);
|
|
44
|
+
return report(diagnostics);
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
return failure(error);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function report(diagnostics) {
|
|
51
|
+
return capabilityReport({ capabilityId: QUALITY_COVERAGE_ID, capabilityConfigSchemaVersion: 1, diagnostics });
|
|
52
|
+
}
|
|
53
|
+
function failure(error) {
|
|
54
|
+
return capabilityFailureReport({ capabilityId: QUALITY_COVERAGE_ID, capabilityConfigSchemaVersion: 1, error, phase: "quality-coverage" });
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=check-quality-coverage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-quality-coverage.js","sourceRoot":"","sources":["../../../../src/features/quality-coverage/application/check-quality-coverage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EAAE,gBAAgB,EAAE,kBAAkB,EAE9D,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE/G,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,oFAA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G,IAAI,CAAC,WAAW,CAAC,CAAC;QACxC,CAAC;QACD,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACjC,OAAO,MAAM,CAAC,WAAW,CAAC,CAAC;IAC7B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;AACH,CAAC;AAED,SAAS,MAAM,CAAC,WAA+E;IAC7F,OAAO,gBAAgB,CAAC,EAAE,YAAY,EAAE,mBAAmB,EAAE,6BAA6B,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;AAChH,CAAC;AAED,SAAS,OAAO,CAAC,KAAc;IAC7B,OAAO,uBAAuB,CAAC,EAAE,YAAY,EAAE,mBAAmB,EAAE,6BAA6B,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,kBAAkB,EAAE,CAAC,CAAC;AAC5I,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { FoundationDiagnostic } from "../../validation-reporting/api.js";
|
|
2
|
+
import type { QualityCoverageObservation } from "./model.js";
|
|
3
|
+
export declare function evaluateStaticCoverage(observation: QualityCoverageObservation): readonly FoundationDiagnostic[];
|
|
4
|
+
export declare function evaluateSelectedCoverage(production: readonly string[], selected: readonly string[], tests: readonly string[]): readonly FoundationDiagnostic[];
|
|
5
|
+
export declare function evaluateTypeContext(production: readonly string[], context: readonly string[]): readonly FoundationDiagnostic[];
|
|
6
|
+
//# sourceMappingURL=evaluate-coverage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluate-coverage.d.ts","sourceRoot":"","sources":["../../../../src/features/quality-coverage/application/evaluate-coverage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,KAAK,EAAoB,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAI/E,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,0BAA0B,GAAG,SAAS,oBAAoB,EAAE,CA6C/G;AAED,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,EAAE,QAAQ,EAAE,SAAS,MAAM,EAAE,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,oBAAoB,EAAE,CAgB9J;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,oBAAoB,EAAE,CAK9H"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { qualitySourceLanguage } from "./source-coverage.js";
|
|
2
|
+
import { qualityDiagnostic } from "./rules.js";
|
|
3
|
+
export function evaluateStaticCoverage(observation) {
|
|
4
|
+
const diagnostics = [];
|
|
5
|
+
for (const path of observation.unclassifiedPackages ?? []) {
|
|
6
|
+
diagnostics.push(qualityDiagnostic("source-package", path, path, "classified production package", "unknown package"));
|
|
7
|
+
}
|
|
8
|
+
if (!observation.sources.some(({ path }) => qualitySourceLanguage(path) === "typescript")) {
|
|
9
|
+
diagnostics.push(qualityDiagnostic("source-empty", "foundation.config.yaml", "production", "nonempty TypeScript production scope", "no TypeScript source"));
|
|
10
|
+
}
|
|
11
|
+
for (const source of observation.sources) {
|
|
12
|
+
if (source.owners.length !== 1) {
|
|
13
|
+
diagnostics.push(qualityDiagnostic("source-classification", source.path, source.path, "one semantic owner", source.owners.join(", ")));
|
|
14
|
+
}
|
|
15
|
+
if (qualitySourceLanguage(source.path) === "native") {
|
|
16
|
+
const gates = source.nativeGates ?? [];
|
|
17
|
+
if (gates.length !== 1 || gates[0]?.reached !== true) {
|
|
18
|
+
diagnostics.push(qualityDiagnostic("native-route", source.path, source.path, "one required consumer native gate", "missing, ambiguous or unreachable gate"));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
else if (qualitySourceLanguage(source.path) === "unsupported") {
|
|
22
|
+
diagnostics.push(qualityDiagnostic("source-language", source.path, source.path, "TypeScript source or JavaScript module", source.path));
|
|
23
|
+
}
|
|
24
|
+
if (!source.suppressionCovered) {
|
|
25
|
+
diagnostics.push(qualityDiagnostic("suppression-coverage", source.path, source.path, "governed", "outside suppression scope"));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
diagnostics.push(...evaluateProtectedSettings(observation));
|
|
29
|
+
for (const mode of ["scope", "full"]) {
|
|
30
|
+
if (!observation.requiredRoutes.some((route) => route.mode === mode)) {
|
|
31
|
+
diagnostics.push(qualityDiagnostic("required-route", "package.json", "routes", mode, "missing required mode observation"));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
for (const required of observation.requiredRoutes) {
|
|
35
|
+
const matches = observation.routes.filter((route) => route.entry === required.entry && route.mode === required.mode);
|
|
36
|
+
if (matches.length !== 1) {
|
|
37
|
+
diagnostics.push(qualityDiagnostic("required-route", "package.json", required.entry, required.mode, "missing or duplicate required route identity"));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
for (const route of observation.routes) {
|
|
41
|
+
if (!observation.requiredRoutes.some((required) => required.entry === route.entry && required.mode === route.mode)) {
|
|
42
|
+
diagnostics.push(qualityDiagnostic("required-route", "package.json", route.entry, "accepted entry and mode", "unknown route identity"));
|
|
43
|
+
}
|
|
44
|
+
if (!route.reached) {
|
|
45
|
+
diagnostics.push(qualityDiagnostic("required-route", "package.json", route.entry, route.mode, "missing executable route"));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return diagnostics;
|
|
49
|
+
}
|
|
50
|
+
export function evaluateSelectedCoverage(production, selected, tests) {
|
|
51
|
+
const expected = new Set(production);
|
|
52
|
+
const actual = new Set(selected);
|
|
53
|
+
const classifiedTests = new Set(tests);
|
|
54
|
+
const diagnostics = [];
|
|
55
|
+
for (const path of expected) {
|
|
56
|
+
if (!actual.has(path)) {
|
|
57
|
+
diagnostics.push(qualityDiagnostic("selection-mismatch", path, path, "selected production source", "not selected"));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
for (const path of actual) {
|
|
61
|
+
if (!expected.has(path) && !classifiedTests.has(path)) {
|
|
62
|
+
diagnostics.push(qualityDiagnostic("selection-mismatch", path, path, "classified production or test source", "unknown selected source"));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return diagnostics;
|
|
66
|
+
}
|
|
67
|
+
export function evaluateTypeContext(production, context) {
|
|
68
|
+
const included = new Set(context);
|
|
69
|
+
return production.filter((path) => !included.has(path)).map((path) => qualityDiagnostic("type-context", path, path, "included in production project", "absent from compiler project"));
|
|
70
|
+
}
|
|
71
|
+
function preservesSetting(setting) {
|
|
72
|
+
if (setting.comparison === "equal") {
|
|
73
|
+
return setting.actual === setting.expected;
|
|
74
|
+
}
|
|
75
|
+
return typeof setting.actual === "number" && typeof setting.expected === "number" &&
|
|
76
|
+
Number.isFinite(setting.actual) && Number.isFinite(setting.expected) &&
|
|
77
|
+
setting.actual >= 0 && setting.expected >= 0 && setting.actual <= setting.expected;
|
|
78
|
+
}
|
|
79
|
+
function evaluateProtectedSettings(observation) {
|
|
80
|
+
const diagnostics = [];
|
|
81
|
+
if (observation.settings.length === 0) {
|
|
82
|
+
diagnostics.push(qualityDiagnostic("protected-setting", "foundation.config.yaml", "settings", "nonempty protected observations", "empty"));
|
|
83
|
+
}
|
|
84
|
+
const requiredSettings = observation.requiredSettings;
|
|
85
|
+
if (requiredSettings.length === 0) {
|
|
86
|
+
diagnostics.push(qualityDiagnostic("protected-setting", "foundation.config.yaml", "requirements", "nonempty preset requirements", "empty"));
|
|
87
|
+
}
|
|
88
|
+
for (const name of new Set(["typeAware", ...requiredSettings])) {
|
|
89
|
+
if (!observation.settings.some((setting) => setting.name === name)) {
|
|
90
|
+
diagnostics.push(qualityDiagnostic("protected-setting", "foundation.config.yaml", name, "required setting observation", "missing"));
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
diagnostics.push(...evaluateSettingIdentities(observation));
|
|
94
|
+
for (const setting of observation.settings) {
|
|
95
|
+
const preserved = preservesSetting(setting);
|
|
96
|
+
if (!preserved) {
|
|
97
|
+
diagnostics.push(qualityDiagnostic("protected-setting", setting.path, setting.name, String(setting.expected), String(setting.actual)));
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return diagnostics;
|
|
101
|
+
}
|
|
102
|
+
function evaluateSettingIdentities(observation) {
|
|
103
|
+
const diagnostics = [];
|
|
104
|
+
const requirements = observation.requiredSettingObservations;
|
|
105
|
+
if (requirements.length === 0) {
|
|
106
|
+
diagnostics.push(qualityDiagnostic("protected-setting", "foundation.config.yaml", "assignments", "complete configuration requirements", "empty"));
|
|
107
|
+
}
|
|
108
|
+
const identities = new Set();
|
|
109
|
+
for (const required of requirements) {
|
|
110
|
+
const count = observation.settings.filter((setting) => setting.observationId === required.observationId).length;
|
|
111
|
+
if (!required.observationId || identities.has(required.observationId) || count !== 1) {
|
|
112
|
+
diagnostics.push(qualityDiagnostic("protected-setting", required.path, required.name, "one required assignment observation", "missing or duplicate identity"));
|
|
113
|
+
}
|
|
114
|
+
identities.add(required.observationId);
|
|
115
|
+
}
|
|
116
|
+
for (const setting of observation.settings) {
|
|
117
|
+
if (!requirements.some((required) => required.observationId === setting.observationId &&
|
|
118
|
+
required.path === setting.path && required.name === setting.name &&
|
|
119
|
+
required.expected === setting.expected && required.comparison === setting.comparison)) {
|
|
120
|
+
diagnostics.push(qualityDiagnostic("protected-setting", setting.path, setting.name, "accepted assignment identity and requirement", "unknown or altered assignment"));
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return diagnostics;
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=evaluate-coverage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluate-coverage.js","sourceRoot":"","sources":["../../../../src/features/quality-coverage/application/evaluate-coverage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CA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AAE,qCAAqC,EAAE,+BAA+B,CAAC,CAAC,CAAC;QACjK,CAAC;QACD,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;IACzC,CAAC;IACD,KAAK,MAAM,OAAO,IAAI,WAAW,CAAC,QAAQ,EAAE,CAAC;QAC3C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,aAAa,KAAK,OAAO,CAAC,aAAa;YACnF,QAAQ,CAAC,IAAI,KAAK,OAAO,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,KAAK,OAAO,CAAC,IAAI;YAChE,QAAQ,CAAC,QAAQ,KAAK,OAAO,CAAC,QAAQ,IAAI,QAAQ,CAAC,UAAU,KAAK,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;YACxF,WAAW,CAAC,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,8CAA8C,EAAE,+BAA+B,CAAC,CAAC,CAAC;QACxK,CAAC;IACH,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ContainedFileObservation } from "../../../source-inventory/api.js";
|
|
2
|
+
import type { DependencyDeclaration } from "../../../workspace-inventory/api.js";
|
|
3
|
+
export type QualityFileReader = ContainedFileObservation["read"];
|
|
4
|
+
export type QualityDependencyDeclaration = DependencyDeclaration;
|
|
5
|
+
export { CapabilityInputError, assertNotCancelled } from "../../validation-reporting/api.js";
|
|
6
|
+
//# sourceMappingURL=input-observations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-observations.d.ts","sourceRoot":"","sources":["../../../../src/features/quality-coverage/application/input-observations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAEjF,MAAM,MAAM,iBAAiB,GAAG,wBAAwB,CAAC,MAAM,CAAC,CAAC;AACjE,MAAM,MAAM,4BAA4B,GAAG,qBAAqB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-observations.js","sourceRoot":"","sources":["../../../../src/features/quality-coverage/application/input-observations.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { FoundationDiagnostic } from "../../validation-reporting/api.js";
|
|
2
|
+
/** Observations refer to consumer-owned classification, never filename heuristics. */
|
|
3
|
+
export interface QualitySource {
|
|
4
|
+
readonly path: string;
|
|
5
|
+
readonly owners: readonly string[];
|
|
6
|
+
readonly suppressionCovered: boolean;
|
|
7
|
+
/** Wiring evidence only; Foundation does not execute native gates. */
|
|
8
|
+
readonly nativeGates?: readonly {
|
|
9
|
+
readonly script: string;
|
|
10
|
+
readonly reached: boolean;
|
|
11
|
+
}[];
|
|
12
|
+
}
|
|
13
|
+
export interface ProtectedSetting {
|
|
14
|
+
/** Unique assignment observation within this configuration closure. */
|
|
15
|
+
readonly observationId: string;
|
|
16
|
+
readonly path: string;
|
|
17
|
+
readonly name: string;
|
|
18
|
+
readonly expected: string | number;
|
|
19
|
+
readonly actual: string | number;
|
|
20
|
+
readonly comparison: "equal" | "ceiling";
|
|
21
|
+
}
|
|
22
|
+
export type RequiredProtectedSetting = Omit<ProtectedSetting, "actual">;
|
|
23
|
+
interface RequiredQualityRoute {
|
|
24
|
+
readonly entry: string;
|
|
25
|
+
readonly mode: "scope" | "full";
|
|
26
|
+
readonly reached: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface QualityCoverageObservation {
|
|
29
|
+
readonly unclassifiedPackages?: readonly string[];
|
|
30
|
+
readonly sources: readonly QualitySource[];
|
|
31
|
+
readonly testPaths: readonly string[];
|
|
32
|
+
/** Required names come from the versioned presets, independently of assignments. */
|
|
33
|
+
readonly requiredSettings: readonly string[];
|
|
34
|
+
/** Complete assignment identities from the accepted configuration groups. */
|
|
35
|
+
readonly requiredSettingObservations: readonly RequiredProtectedSetting[];
|
|
36
|
+
readonly settings: readonly ProtectedSetting[];
|
|
37
|
+
/** Accepted profile identities, independent of observed script reachability. */
|
|
38
|
+
readonly requiredRoutes: readonly Omit<RequiredQualityRoute, "reached">[];
|
|
39
|
+
readonly routes: readonly RequiredQualityRoute[];
|
|
40
|
+
}
|
|
41
|
+
/** An execution session binds selection, context and lint to the same inputs. */
|
|
42
|
+
export interface QualityToolSession {
|
|
43
|
+
select(signal?: AbortSignal): Promise<readonly string[]>;
|
|
44
|
+
typeContext(signal?: AbortSignal): Promise<readonly string[]>;
|
|
45
|
+
lint(signal?: AbortSignal): Promise<{
|
|
46
|
+
readonly files: number;
|
|
47
|
+
readonly diagnostics: readonly FoundationDiagnostic[];
|
|
48
|
+
}>;
|
|
49
|
+
}
|
|
50
|
+
export interface QualityCoverageReader {
|
|
51
|
+
read(consumerRoot: string, configPath: string, signal?: AbortSignal): Promise<QualityCoverageObservation>;
|
|
52
|
+
}
|
|
53
|
+
export interface QualityToolProvider {
|
|
54
|
+
prepare(consumerRoot: string, configPath: string, signal?: AbortSignal): Promise<QualityToolSession>;
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../src/features/quality-coverage/application/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAE9E,sFAAsF;AACtF,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAA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