@hailstails/hone 2.0.0-pre.2 → 2.0.0-pre.4
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/ADOPTING.md +7 -7
- package/CHANGELOG.md +76 -0
- package/MIGRATING.md +15 -6
- package/README.md +12 -13
- package/chunks/chunk-3CWFUD5B.js +38 -0
- package/chunks/chunk-5AKHEW6V.js +15 -0
- package/chunks/chunk-75XWZYNN.js +64 -0
- package/chunks/chunk-7FVSZ2VL.js +1304 -0
- package/chunks/chunk-A3RL4O5V.js +146 -0
- package/chunks/chunk-BIDD2YWP.js +398 -0
- package/chunks/{chunk-GNOMK7CR.js → chunk-BKQ3K766.js} +489 -52
- package/chunks/{chunk-NRIQD3PI.js → chunk-BRANVR7K.js} +3 -5
- package/chunks/chunk-COQMPHWZ.js +37 -0
- package/chunks/{chunk-L7BGRC6D.js → chunk-CXM5KBZX.js} +1 -1
- package/chunks/chunk-D6645WPB.js +6 -0
- package/chunks/chunk-DJMF6JIM.js +42 -0
- package/chunks/{chunk-OKLYWD2Z.js → chunk-E4D5WDRX.js} +27 -20
- package/chunks/chunk-EBX57Z3V.js +8 -0
- package/chunks/chunk-FHVNKG5Q.js +19 -0
- package/chunks/chunk-FPIP7JEC.js +191 -0
- package/chunks/{chunk-QP5TLOBY.js → chunk-HVZVKZPW.js} +12 -9
- package/chunks/chunk-LD766VWU.js +57 -0
- package/chunks/chunk-LEFM7OPS.js +41 -0
- package/chunks/chunk-LNMDMRGQ.js +51 -0
- package/chunks/{chunk-RGSHTPLA.js → chunk-MBEDAFVC.js} +3 -11
- package/chunks/chunk-OO5KV7KN.js +17 -0
- package/chunks/{chunk-ASUN4AVC.js → chunk-PVSC4SE3.js} +71 -5
- package/chunks/chunk-SKDQ3QJD.js +75 -0
- package/chunks/chunk-W5OIAUDW.js +18 -0
- package/chunks/chunk-X73RZUPO.js +63 -0
- package/chunks/chunk-XE2KKWYH.js +45 -0
- package/chunks/chunk-YGMO5Z6U.js +432 -0
- package/chunks/chunk-YONPKP3C.js +15 -0
- package/docs/adding-a-discipline-or-mechanism.md +1 -1
- package/docs/extending.md +7 -388
- package/package.json +7 -6
- package/rules/README.md +2 -2
- package/rules/typescript/checks.md +236 -18
- package/rules/typescript/symptoms/ambient-randomness/random-call.md +10 -0
- package/rules/typescript/symptoms/answer-set-in-a-hook/hook-answer.md +10 -0
- package/rules/typescript/symptoms/assertion-outside-a-test/assertion-site.md +10 -0
- package/rules/typescript/symptoms/assertion-outside-a-test.md +25 -0
- package/rules/typescript/symptoms/built-unit-called-in-place/call-of-a-call.md +10 -0
- package/rules/typescript/symptoms/built-unit-called-in-place.md +25 -0
- package/rules/typescript/symptoms/code-or-prose-read-as-text/raw-read.md +10 -0
- package/rules/typescript/symptoms/code-or-prose-read-as-text.md +31 -0
- package/rules/typescript/symptoms/computed-value-in-a-test/test-body.md +1 -1
- package/rules/typescript/symptoms/double-with-a-body/logic-in-a-passed-function.md +1 -1
- package/rules/typescript/symptoms/double-with-a-body/stub-implementation.md +2 -2
- package/rules/typescript/symptoms/export-from-a-test-file/test-file-export.md +10 -0
- package/rules/typescript/symptoms/export-from-a-test-file.md +33 -0
- package/rules/typescript/symptoms/failure-shaped-as-success/empty-catch.md +10 -0
- package/rules/typescript/symptoms/floating-version/version-selector.md +10 -0
- package/rules/typescript/symptoms/inherited-environment-in-a-subprocess/git-spawn-environment.md +1 -1
- package/rules/typescript/symptoms/many-spellings-of-one-concept/test-call-aliases.md +10 -0
- package/rules/typescript/symptoms/many-spellings-of-one-concept.md +3 -2
- package/rules/typescript/symptoms/module-or-global-patched/module-mock-call.md +4 -4
- package/rules/typescript/symptoms/no-lock-file/committed-lock-file.md +12 -0
- package/rules/typescript/symptoms/process-global-used-in-place/debugger-statement.md +10 -0
- package/rules/typescript/symptoms/process-global-used-in-place/direct-global-use.md +14 -0
- package/rules/typescript/symptoms/process-global-used-in-place.md +1 -1
- package/rules/typescript/symptoms/prose-in-code/comment-prose.md +12 -0
- package/rules/typescript/symptoms/test-switched-off/skipped-tests.md +3 -6
- package/rules/typescript/symptoms/test-switched-off.md +1 -1
- package/rules/typescript/symptoms/throw-between-our-units/throw-statement.md +10 -0
- package/rules/typescript/symptoms/throw-or-catch-in-a-test/throw-statement.md +1 -1
- package/rules/typescript/symptoms/tool-fetched-at-run-time/fetch-command.md +10 -0
- package/rules/typescript/symptoms/type-declared-in-a-test/test-type-declaration.md +10 -0
- package/rules/typescript/symptoms/type-declared-in-a-test.md +33 -0
- package/rules/typescript/symptoms/unit-without-a-running-test/companion-test-file.md +2 -2
- package/rules/typescript/symptoms/wide-input/unread-parameter.md +10 -0
- package/rules/typescript/symptoms/wide-input.md +3 -2
- package/rules/typescript/symptoms.md +183 -121
- package/src/application/conformance/conformance-testing-types.d.ts +13 -16
- package/src/domain/language-layer/authored-item-types.d.ts +50 -0
- package/src/domain/language-layer/catalogue-name.d.ts +5 -0
- package/src/domain/language-layer/check-address-text.d.ts +12 -0
- package/src/domain/rule-set/authored-rule-set-types.d.ts +31 -32
- package/src/domain/rule-set/clause-address-types.d.ts +4 -3
- package/src/domain/rule-set/rule-set-name-of.d.ts +10 -0
- package/src/domain/runner/check-binding.d.ts +18 -0
- package/src/domain/runner/check-observations.d.ts +39 -0
- package/src/domain/runner/conformance-types.d.ts +8 -2
- package/src/domain/settings/test-files.d.ts +7 -0
- package/src/eslint-plugin.js +16 -12
- package/src/hone.js +10493 -10410
- package/src/infrastructure/engines/eslint/authored-class-or-this/static-members-only/piece.json +0 -6
- package/src/infrastructure/engines/eslint/long-function/function-length/piece.json +0 -6
- package/src/infrastructure/engines/eslint/runner/pieces/eslint-piece-settings-types.d.ts +2 -0
- package/src/infrastructure/engines/eslint/runner/runner.js +953 -1189
- package/src/infrastructure/engines/eslint/test-switched-off/focused-tests/README.md +0 -3
- package/src/infrastructure/engines/eslint/test-switched-off/focused-tests/eslint-plugin.js +33 -21
- package/src/infrastructure/engines/eslint/test-switched-off/skipped-tests/piece.json +11 -4
- package/src/infrastructure/engines/eslint/test-switched-off/skipped-tests/skipped-tests.examples.json +28 -0
- package/src/infrastructure/engines/eslint/untyped-value/implicit-any-let/piece.json +0 -2
- package/src/infrastructure/engines/eslint/wide-input/unread-parameter/eslint-plugin.js +94 -0
- package/src/infrastructure/engines/eslint/wide-input/unread-parameter/piece.json +11 -0
- package/src/infrastructure/engines/eslint/wide-input/unread-parameter/unread-parameter.examples.json +48 -0
- package/src/infrastructure/engines/walker/ambient-randomness/random-call/ambient-randomness.js +109 -0
- package/src/infrastructure/engines/walker/ambient-randomness/random-call/piece.json +9 -0
- package/src/infrastructure/engines/walker/ambient-randomness/random-call/random-call.examples.json +48 -0
- package/src/infrastructure/engines/walker/answer-set-in-a-hook/hook-answer/hook-answer.examples.json +42 -0
- package/src/infrastructure/engines/walker/answer-set-in-a-hook/hook-answer/hook-answers.js +72 -0
- package/src/infrastructure/engines/walker/answer-set-in-a-hook/hook-answer/piece.json +9 -0
- package/src/infrastructure/engines/walker/assertion-outside-a-test/assertion-site/assertion-site.examples.json +30 -0
- package/src/infrastructure/engines/walker/assertion-outside-a-test/assertion-site/assertion-site.js +123 -0
- package/src/infrastructure/engines/walker/assertion-outside-a-test/assertion-site/piece.json +9 -0
- package/src/infrastructure/engines/walker/authored-class-or-this/class-keyword/class-syntax.js +3 -3
- package/src/infrastructure/engines/walker/boolean-in-a-signature/boolean-annotation/boolean-signatures.js +7 -5
- package/src/infrastructure/engines/walker/branch-in-a-test/test-body/test-body-logic.js +213 -126
- package/src/infrastructure/engines/walker/built-unit-called-in-place/call-of-a-call/call-of-a-call.examples.json +24 -0
- package/src/infrastructure/engines/walker/built-unit-called-in-place/call-of-a-call/call-of-a-call.js +34 -0
- package/src/infrastructure/engines/walker/built-unit-called-in-place/call-of-a-call/piece.json +9 -0
- package/src/infrastructure/engines/walker/claimed-type/cast-to-any/any-cast.js +6 -4
- package/src/infrastructure/engines/walker/claimed-type/unlisted-cast-site/cast-expressions.js +6 -4
- package/src/infrastructure/engines/walker/code-or-prose-read-as-text/raw-read/piece.json +9 -0
- package/src/infrastructure/engines/walker/code-or-prose-read-as-text/raw-read/raw-read.examples.json +30 -0
- package/src/infrastructure/engines/walker/code-or-prose-read-as-text/raw-read/raw-read.js +166 -0
- package/src/infrastructure/engines/walker/computed-value-in-a-test/test-body/piece.json +0 -10
- package/src/infrastructure/engines/walker/date-used-directly/clock-sources/clock-sources.js +4 -4
- package/src/infrastructure/engines/walker/default-on-a-closed-union/default-arm/switch-defaults.js +8 -6
- package/src/infrastructure/engines/walker/double-with-a-body/logic-in-a-passed-function/piece.json +0 -10
- package/src/infrastructure/engines/walker/double-with-a-body/stub-implementation/dependency-isolation.js +9 -14
- package/src/infrastructure/engines/walker/drawer-path/drawer-names/categorical-paths.js +4 -4
- package/src/infrastructure/engines/walker/export-from-a-test-file/test-file-export/piece.json +9 -0
- package/src/infrastructure/engines/walker/export-from-a-test-file/test-file-export/test-file-export.examples.json +30 -0
- package/src/infrastructure/engines/walker/export-from-a-test-file/test-file-export/test-file-export.js +31 -0
- package/src/infrastructure/engines/walker/failure-shaped-as-success/empty-catch/empty-catch.examples.json +18 -0
- package/src/infrastructure/engines/walker/failure-shaped-as-success/empty-catch/empty-catch.js +32 -0
- package/src/infrastructure/engines/walker/failure-shaped-as-success/empty-catch/piece.json +9 -0
- package/src/infrastructure/engines/walker/floating-version/version-selector/piece.json +9 -0
- package/src/infrastructure/engines/walker/floating-version/version-selector/version-selector.examples.json +54 -0
- package/src/infrastructure/engines/walker/floating-version/version-selector/version-selector.js +75 -0
- package/src/infrastructure/engines/walker/inherited-environment-in-a-subprocess/git-spawn-environment/hermetic-git-spawns.js +8 -17
- package/src/infrastructure/engines/walker/loop-keyword/loop-statement/loops.js +8 -6
- package/src/infrastructure/engines/walker/many-spellings-of-one-concept/test-call-aliases/piece.json +9 -0
- package/src/infrastructure/engines/walker/many-spellings-of-one-concept/test-call-aliases/test-call-aliases.examples.json +36 -0
- package/src/infrastructure/engines/walker/many-spellings-of-one-concept/test-call-aliases/test-call-aliases.js +67 -0
- package/src/infrastructure/engines/walker/module-or-global-patched/module-mock-call/module-mock-call.examples.json +34 -0
- package/src/infrastructure/engines/walker/module-or-global-patched/module-mock-call/module-mocking.js +64 -16
- package/src/infrastructure/engines/walker/module-or-global-patched/module-mock-call/piece.json +5 -1
- package/src/infrastructure/engines/walker/no-lock-file/committed-lock-file/committed-lock-file.examples.json +24 -0
- package/src/infrastructure/engines/walker/no-lock-file/committed-lock-file/committed-lock-file.js +41 -0
- package/src/infrastructure/engines/walker/no-lock-file/committed-lock-file/piece.json +9 -0
- package/src/infrastructure/engines/walker/outside-import-past-a-boundary/import-or-require/import-boundaries.js +18 -16
- package/src/infrastructure/engines/walker/outside-import-past-a-boundary/import-or-require/piece.json +1 -1
- package/src/infrastructure/engines/walker/process-global-used-in-place/debugger-statement/debugger-statement.examples.json +18 -0
- package/src/infrastructure/engines/walker/process-global-used-in-place/debugger-statement/debugger-statement.js +17 -0
- package/src/infrastructure/engines/walker/process-global-used-in-place/debugger-statement/piece.json +9 -0
- package/src/infrastructure/engines/walker/process-global-used-in-place/direct-global-use/direct-global-use.examples.json +63 -0
- package/src/infrastructure/engines/walker/process-global-used-in-place/direct-global-use/piece.json +13 -0
- package/src/infrastructure/engines/walker/process-global-used-in-place/direct-global-use/process-global-used-in-place.js +126 -0
- package/src/infrastructure/engines/walker/prose-in-code/comment-prose/comment-prose.examples.json +42 -0
- package/src/infrastructure/engines/walker/prose-in-code/comment-prose/piece.json +16 -0
- package/src/infrastructure/engines/walker/prose-in-code/comment-prose/prose-in-code.js +90 -0
- package/src/infrastructure/engines/walker/rebinding/test-body/piece.json +0 -10
- package/src/infrastructure/engines/walker/runner/pieces/walker-piece.d.ts +7 -5
- package/src/infrastructure/engines/walker/runner/runner.js +266 -77
- package/src/infrastructure/engines/walker/runner/toolchain/typescript-parse.d.ts +3 -0
- package/src/infrastructure/engines/walker/shorthand-name/identifier-names/identifier-names.js +12 -7
- package/src/infrastructure/engines/walker/strictness-weakened/exact-optional-property-types/piece.json +0 -10
- package/src/infrastructure/engines/walker/strictness-weakened/no-fallthrough-cases-in-switch/piece.json +0 -10
- package/src/infrastructure/engines/walker/strictness-weakened/no-implicit-override/piece.json +0 -10
- package/src/infrastructure/engines/walker/strictness-weakened/no-property-access-from-index-signature/piece.json +0 -10
- package/src/infrastructure/engines/walker/strictness-weakened/no-unchecked-indexed-access/piece.json +0 -10
- package/src/infrastructure/engines/walker/strictness-weakened/strict/compiler-overrides.js +30 -52
- package/src/infrastructure/engines/walker/strictness-weakened/use-unknown-in-catch-variables/piece.json +0 -10
- package/src/infrastructure/engines/walker/text-past-its-reader/test-body/piece.json +0 -10
- package/src/infrastructure/engines/walker/throw-between-our-units/throw-statement/piece.json +9 -0
- package/src/infrastructure/engines/walker/throw-between-our-units/throw-statement/throw-statement.examples.json +36 -0
- package/src/infrastructure/engines/walker/throw-between-our-units/throw-statement/throws-in-production.js +12 -0
- package/src/infrastructure/engines/walker/throw-or-catch-in-a-test/throw-statement/throw-statement.examples.json +6 -6
- package/src/infrastructure/engines/walker/throw-or-catch-in-a-test/throw-statement/throws-in-tests.js +5 -44
- package/src/infrastructure/engines/walker/throw-or-catch-in-a-test/try-block/piece.json +0 -10
- package/src/infrastructure/engines/walker/tool-fetched-at-run-time/fetch-command/fetch-command.examples.json +42 -0
- package/src/infrastructure/engines/walker/tool-fetched-at-run-time/fetch-command/fetch-command.js +152 -0
- package/src/infrastructure/engines/walker/tool-fetched-at-run-time/fetch-command/piece.json +9 -0
- package/src/infrastructure/engines/walker/type-declared-in-a-test/test-type-declaration/piece.json +9 -0
- package/src/infrastructure/engines/walker/type-declared-in-a-test/test-type-declaration/test-type-declaration.examples.json +24 -0
- package/src/infrastructure/engines/walker/type-declared-in-a-test/test-type-declaration/test-type-declaration.js +27 -0
- package/src/infrastructure/engines/walker/type-derived-from-code/factory-return-types/factory-return-types.js +8 -6
- package/src/infrastructure/engines/walker/unit-without-a-running-test/companion-test-file/export-test-sibling.js +16 -10
- package/src/infrastructure/engines/walker/untracked-escape/directive-pointers/comments-directives.js +18 -64
- package/src/infrastructure/engines/walker/write-into-a-parameter/parameter-mutation/parameter-mutation.js +7 -5
- package/src/rule-set.d.ts +2 -1
- package/src/testing.d.ts +2 -4
- package/src/testing.js +104 -317
- package/src/{audit.d.ts → walker.d.ts} +13 -8
- package/src/walker.js +28 -0
- package/chunks/chunk-5HRMJ4O2.js +0 -608
- package/chunks/chunk-IX2VZTBO.js +0 -887
- package/chunks/chunk-K2W3D3NB.js +0 -17
- package/chunks/chunk-M6SOGWT7.js +0 -82
- package/chunks/chunk-MWLBA4B3.js +0 -849
- package/chunks/chunk-R75QELTA.js +0 -481
- package/chunks/chunk-RANAKCTW.js +0 -31
- package/chunks/chunk-TNY2PASL.js +0 -38
- package/chunks/chunk-UJONWHA4.js +0 -22
- package/docs/output-contract.md +0 -1155
- package/src/audit.js +0 -18
- package/src/domain/runner/runner-module-types.d.ts +0 -15
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
import {
|
|
2
|
+
caseVerdictSchema,
|
|
3
|
+
checkHitSchema,
|
|
4
|
+
checkMeasurementSchema,
|
|
5
|
+
checkNativeExceptionSchema,
|
|
6
|
+
hitSchema,
|
|
7
|
+
measuredSchema,
|
|
8
|
+
nativeExceptionKindSchema,
|
|
9
|
+
reportedCheckSchema,
|
|
10
|
+
runnerFailureSchema,
|
|
11
|
+
runnerResultSchema
|
|
12
|
+
} from "./chunk-PVSC4SE3.js";
|
|
13
|
+
import {
|
|
14
|
+
clauseAddressObjectSchema
|
|
15
|
+
} from "./chunk-BRANVR7K.js";
|
|
16
|
+
import {
|
|
17
|
+
repoPathSchema,
|
|
18
|
+
runnerModuleSegmentsOf
|
|
19
|
+
} from "./chunk-BKQ3K766.js";
|
|
20
|
+
|
|
21
|
+
// src/infrastructure/engines/protocol/conformance.ts
|
|
22
|
+
import { z } from "zod";
|
|
23
|
+
|
|
24
|
+
// src/domain/runner/runner-failure.ts
|
|
25
|
+
var runnerInvalidOutput = (request) => ({
|
|
26
|
+
outcome: "failed",
|
|
27
|
+
error: { kind: "runner-invalid-output", detail: request.detail }
|
|
28
|
+
});
|
|
29
|
+
var thrownMessage = (request) => request.thrown instanceof Error ? request.thrown.message : String(request.thrown);
|
|
30
|
+
var rejectedCall = (request) => runnerInvalidOutput({ detail: `the runner call threw or rejected: ${thrownMessage(request)}` });
|
|
31
|
+
|
|
32
|
+
// src/infrastructure/engines/protocol/conformance.ts
|
|
33
|
+
var caseVerdictsResultSchema = runnerResultSchema({
|
|
34
|
+
value: z.array(caseVerdictSchema).readonly()
|
|
35
|
+
});
|
|
36
|
+
var lineSet = (request) => [...new Set(request.lines)].toSorted((left, right) => left - right);
|
|
37
|
+
var verdictsNaming = (request) => request.verdicts.filter((verdict) => verdict.caseName === request.caseName);
|
|
38
|
+
var unmatchedVerdict = (request) => {
|
|
39
|
+
const missing = request.cases.find(
|
|
40
|
+
(sourceCase) => verdictsNaming({ verdicts: request.verdicts, caseName: sourceCase.name }).length !== 1
|
|
41
|
+
);
|
|
42
|
+
if (missing !== void 0) {
|
|
43
|
+
return `case ${missing.name} has no single verdict`;
|
|
44
|
+
}
|
|
45
|
+
const unknown = request.verdicts.find(
|
|
46
|
+
(verdict) => !request.cases.some((sourceCase) => sourceCase.name === verdict.caseName)
|
|
47
|
+
);
|
|
48
|
+
return unknown === void 0 ? void 0 : `a verdict names the unknown case ${unknown.caseName}`;
|
|
49
|
+
};
|
|
50
|
+
var caseConformance = (request) => {
|
|
51
|
+
const { sourceCase } = request;
|
|
52
|
+
const expectedLines = lineSet({ lines: sourceCase.expectedLines });
|
|
53
|
+
const flaggedLines = lineSet({
|
|
54
|
+
lines: verdictsNaming({ verdicts: request.verdicts, caseName: sourceCase.name }).flatMap(
|
|
55
|
+
(verdict) => verdict.flaggedLines
|
|
56
|
+
)
|
|
57
|
+
});
|
|
58
|
+
if (expectedLines.join(" ") === flaggedLines.join(" ")) {
|
|
59
|
+
return [];
|
|
60
|
+
}
|
|
61
|
+
return [{ caseName: sourceCase.name, expectedLines, flaggedLines }];
|
|
62
|
+
};
|
|
63
|
+
var conformanceOf = (request) => {
|
|
64
|
+
const parsed = caseVerdictsResultSchema.safeParse(request.returned);
|
|
65
|
+
if (!parsed.success) {
|
|
66
|
+
return runnerInvalidOutput({ detail: z.prettifyError(parsed.error) });
|
|
67
|
+
}
|
|
68
|
+
if (parsed.data.outcome === "failed") {
|
|
69
|
+
return parsed.data;
|
|
70
|
+
}
|
|
71
|
+
const verdicts = parsed.data.value;
|
|
72
|
+
const unmatched = unmatchedVerdict({ verdicts, cases: request.cases });
|
|
73
|
+
if (unmatched !== void 0) {
|
|
74
|
+
return runnerInvalidOutput({ detail: unmatched });
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
outcome: "ok",
|
|
78
|
+
value: request.cases.flatMap((sourceCase) => caseConformance({ sourceCase, verdicts }))
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
var compareCases = async (request) => Promise.resolve().then(request.act).then(
|
|
82
|
+
(returned) => conformanceOf({ returned, cases: request.cases }),
|
|
83
|
+
(thrown) => rejectedCall({ thrown })
|
|
84
|
+
);
|
|
85
|
+
var namedCheckConformance = async (request) => {
|
|
86
|
+
const compared = await compareCases({
|
|
87
|
+
...request,
|
|
88
|
+
act: () => request.runner.conform({ binding: request.binding, cases: request.cases })
|
|
89
|
+
});
|
|
90
|
+
return compared.outcome === "failed" ? compared : {
|
|
91
|
+
outcome: "ok",
|
|
92
|
+
value: compared.value.map((failure) => ({ ...failure, check: request.binding.address }))
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
// src/infrastructure/engines/protocol/engine-run/engine-run.ts
|
|
97
|
+
import { z as z5 } from "zod";
|
|
98
|
+
|
|
99
|
+
// src/domain/runner/checked-observations.ts
|
|
100
|
+
var unrequestedFileDetail = (request) => {
|
|
101
|
+
const entry = request.entries.find(
|
|
102
|
+
({ check, file }) => !request.checks.has(check) || !request.files.has(file)
|
|
103
|
+
);
|
|
104
|
+
return entry === void 0 ? void 0 : `${request.kind} names ${entry.check} in ${entry.file}, which the request did not hold`;
|
|
105
|
+
};
|
|
106
|
+
var checkedObservations = (request) => {
|
|
107
|
+
const { requested, report } = request;
|
|
108
|
+
const checks = new Set(requested.bindings.map(({ address }) => address));
|
|
109
|
+
const files = new Set(requested.files);
|
|
110
|
+
const unrequestedNative = report.nativeExceptions.find(({ check }) => !checks.has(check));
|
|
111
|
+
const detail = unrequestedFileDetail({ kind: "a hit", entries: report.hits, checks, files }) ?? unrequestedFileDetail({ kind: "a measured pair", entries: report.measured, checks, files }) ?? (unrequestedNative === void 0 ? void 0 : `a native exception names ${unrequestedNative.check}, which the request did not hold`);
|
|
112
|
+
return detail === void 0 ? { outcome: "ok", value: report } : runnerInvalidOutput({ detail });
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
// src/infrastructure/engines/protocol/checks/checks-runner-module-schema.ts
|
|
116
|
+
import { z as z4 } from "zod";
|
|
117
|
+
|
|
118
|
+
// src/infrastructure/engines/protocol/embedded/embedded-run-report-schema.ts
|
|
119
|
+
import { z as z2 } from "zod";
|
|
120
|
+
var namedCheck = { check: reportedCheckSchema.optional() };
|
|
121
|
+
var inlineLineSchema = z2.number().int().min(1);
|
|
122
|
+
var inlineDisableSchema = z2.object({
|
|
123
|
+
kind: z2.literal("inline-disable"),
|
|
124
|
+
...namedCheck,
|
|
125
|
+
clause: clauseAddressObjectSchema,
|
|
126
|
+
file: repoPathSchema,
|
|
127
|
+
line: inlineLineSchema,
|
|
128
|
+
text: z2.string(),
|
|
129
|
+
reach: z2.enum(["one-clause", "every-selected-clause"])
|
|
130
|
+
}).readonly();
|
|
131
|
+
var scriptOptionCauseSchema = z2.discriminatedUnion("kind", [
|
|
132
|
+
z2.object({ kind: z2.literal("weakens-run") }).readonly(),
|
|
133
|
+
z2.object({
|
|
134
|
+
kind: z2.literal("after-another-command"),
|
|
135
|
+
command: z2.string(),
|
|
136
|
+
invocation: z2.string()
|
|
137
|
+
}).readonly(),
|
|
138
|
+
z2.object({ kind: z2.literal("wrapped"), command: z2.string(), wrapper: z2.string() }).readonly(),
|
|
139
|
+
z2.object({ kind: z2.literal("unreadable"), command: z2.string() }).readonly()
|
|
140
|
+
]);
|
|
141
|
+
var nativeExceptionSchema = z2.discriminatedUnion("kind", [
|
|
142
|
+
z2.object({
|
|
143
|
+
kind: z2.literal("ignore"),
|
|
144
|
+
...namedCheck,
|
|
145
|
+
clause: clauseAddressObjectSchema,
|
|
146
|
+
file: repoPathSchema
|
|
147
|
+
}).readonly(),
|
|
148
|
+
z2.object({
|
|
149
|
+
kind: z2.literal("config-override"),
|
|
150
|
+
...namedCheck,
|
|
151
|
+
clause: clauseAddressObjectSchema,
|
|
152
|
+
file: repoPathSchema
|
|
153
|
+
}).readonly(),
|
|
154
|
+
z2.object({
|
|
155
|
+
kind: z2.literal("suppression-entry"),
|
|
156
|
+
...namedCheck,
|
|
157
|
+
clause: clauseAddressObjectSchema,
|
|
158
|
+
file: repoPathSchema,
|
|
159
|
+
location: repoPathSchema
|
|
160
|
+
}).readonly(),
|
|
161
|
+
inlineDisableSchema,
|
|
162
|
+
z2.object({
|
|
163
|
+
kind: z2.literal("inline-rule-config"),
|
|
164
|
+
...namedCheck,
|
|
165
|
+
clause: clauseAddressObjectSchema,
|
|
166
|
+
file: repoPathSchema,
|
|
167
|
+
line: inlineLineSchema,
|
|
168
|
+
text: z2.string()
|
|
169
|
+
}).readonly(),
|
|
170
|
+
z2.object({
|
|
171
|
+
kind: z2.literal("command-line-option"),
|
|
172
|
+
...namedCheck,
|
|
173
|
+
clause: clauseAddressObjectSchema,
|
|
174
|
+
location: repoPathSchema,
|
|
175
|
+
script: z2.string(),
|
|
176
|
+
option: z2.string(),
|
|
177
|
+
cause: scriptOptionCauseSchema
|
|
178
|
+
}).readonly()
|
|
179
|
+
]);
|
|
180
|
+
var sliceProblemSchema = z2.object({
|
|
181
|
+
slice: repoPathSchema,
|
|
182
|
+
state: z2.enum([
|
|
183
|
+
"out-of-date",
|
|
184
|
+
"missing",
|
|
185
|
+
"not-applied",
|
|
186
|
+
"unconfigured",
|
|
187
|
+
"nested-configuration"
|
|
188
|
+
])
|
|
189
|
+
}).readonly();
|
|
190
|
+
var unprojectedFolderSchema = z2.object({
|
|
191
|
+
folder: repoPathSchema,
|
|
192
|
+
selectionFolder: repoPathSchema
|
|
193
|
+
}).readonly();
|
|
194
|
+
var embeddedRunReportSchema = z2.object({
|
|
195
|
+
hits: z2.array(hitSchema).readonly(),
|
|
196
|
+
nativeExceptions: z2.array(nativeExceptionSchema).readonly(),
|
|
197
|
+
projection: z2.enum(["current", "out-of-date", "missing", "not-included"]),
|
|
198
|
+
slices: z2.array(sliceProblemSchema).readonly().default([]),
|
|
199
|
+
unprojectedFolders: z2.array(unprojectedFolderSchema).readonly().default([]),
|
|
200
|
+
measured: measuredSchema
|
|
201
|
+
}).readonly();
|
|
202
|
+
|
|
203
|
+
// src/infrastructure/engines/protocol/runner-module/runner-module-schema.ts
|
|
204
|
+
import { z as z3 } from "zod";
|
|
205
|
+
var runnerCallSchema = z3.function({
|
|
206
|
+
input: [z3.unknown()],
|
|
207
|
+
output: z3.promise(z3.unknown())
|
|
208
|
+
});
|
|
209
|
+
var standaloneRunnerModuleSchema = z3.object({
|
|
210
|
+
exceptionPath: z3.literal("standalone"),
|
|
211
|
+
run: runnerCallSchema,
|
|
212
|
+
conform: runnerCallSchema
|
|
213
|
+
});
|
|
214
|
+
var embeddedRunnerModuleSchema = z3.object({
|
|
215
|
+
exceptionPath: z3.literal("embedded"),
|
|
216
|
+
projectedKinds: z3.array(nativeExceptionKindSchema),
|
|
217
|
+
run: runnerCallSchema,
|
|
218
|
+
conform: runnerCallSchema,
|
|
219
|
+
project: runnerCallSchema
|
|
220
|
+
});
|
|
221
|
+
var runnerModuleSchema = z3.discriminatedUnion("exceptionPath", [
|
|
222
|
+
standaloneRunnerModuleSchema,
|
|
223
|
+
embeddedRunnerModuleSchema
|
|
224
|
+
]);
|
|
225
|
+
|
|
226
|
+
// src/infrastructure/engines/protocol/checks/checks-runner-module-schema.ts
|
|
227
|
+
var namedChecksRunnerModuleSchema = z4.object({
|
|
228
|
+
projectedKinds: z4.array(nativeExceptionKindSchema),
|
|
229
|
+
fileScope: z4.enum(["tracked", "typescript"]),
|
|
230
|
+
run: runnerCallSchema,
|
|
231
|
+
conform: runnerCallSchema,
|
|
232
|
+
project: runnerCallSchema
|
|
233
|
+
});
|
|
234
|
+
var misnamedDirectiveShape = {
|
|
235
|
+
ruleId: z4.string().min(1),
|
|
236
|
+
file: repoPathSchema,
|
|
237
|
+
line: z4.number().int().min(1),
|
|
238
|
+
text: z4.string()
|
|
239
|
+
};
|
|
240
|
+
var misnamedRuleIdSchema = z4.discriminatedUnion("kind", [
|
|
241
|
+
z4.strictObject({ kind: z4.literal("names-no-check"), ...misnamedDirectiveShape }).readonly(),
|
|
242
|
+
z4.strictObject({
|
|
243
|
+
kind: z4.literal("version-1-id"),
|
|
244
|
+
...misnamedDirectiveShape,
|
|
245
|
+
replacedBy: z4.tuple([z4.string().min(1)], z4.string().min(1)).readonly()
|
|
246
|
+
}).readonly()
|
|
247
|
+
]);
|
|
248
|
+
var checksSliceProblemSchema = z4.object({
|
|
249
|
+
slice: repoPathSchema,
|
|
250
|
+
state: z4.enum(["missing", "out-of-date", "unconfigured"])
|
|
251
|
+
}).readonly();
|
|
252
|
+
var namedChecksRunReportSchema = z4.strictObject({
|
|
253
|
+
slices: z4.array(checksSliceProblemSchema).readonly(),
|
|
254
|
+
nestedConfigurations: z4.array(repoPathSchema).readonly(),
|
|
255
|
+
unprojectedFolders: z4.array(unprojectedFolderSchema).readonly(),
|
|
256
|
+
misnamedRuleIds: z4.array(misnamedRuleIdSchema).readonly(),
|
|
257
|
+
hits: z4.array(checkHitSchema).readonly(),
|
|
258
|
+
nativeExceptions: z4.array(checkNativeExceptionSchema).readonly(),
|
|
259
|
+
measured: z4.array(checkMeasurementSchema).readonly(),
|
|
260
|
+
projection: z4.enum(["none", "current", "out-of-date", "missing", "not-included"])
|
|
261
|
+
}).readonly();
|
|
262
|
+
var namedChecksRunResultSchema = z4.discriminatedUnion("outcome", [
|
|
263
|
+
z4.strictObject({ outcome: z4.literal("ok"), value: namedChecksRunReportSchema }).readonly(),
|
|
264
|
+
z4.strictObject({
|
|
265
|
+
outcome: z4.literal("failed"),
|
|
266
|
+
error: runnerFailureSchema
|
|
267
|
+
}).readonly()
|
|
268
|
+
]);
|
|
269
|
+
var measurementResultSchema = z4.discriminatedUnion("outcome", [
|
|
270
|
+
z4.strictObject({
|
|
271
|
+
outcome: z4.literal("ok"),
|
|
272
|
+
value: z4.strictObject({
|
|
273
|
+
report: namedChecksRunReportSchema,
|
|
274
|
+
unappliedSlices: z4.array(repoPathSchema).readonly()
|
|
275
|
+
}).readonly()
|
|
276
|
+
}).readonly(),
|
|
277
|
+
z4.strictObject({
|
|
278
|
+
outcome: z4.literal("failed"),
|
|
279
|
+
error: runnerFailureSchema
|
|
280
|
+
}).readonly()
|
|
281
|
+
]);
|
|
282
|
+
var projectedFileSchema = z4.object({ file: repoPathSchema, text: z4.string() }).readonly();
|
|
283
|
+
var checksProjectResultSchema = z4.union([
|
|
284
|
+
z4.object({ outcome: z4.literal("ok"), value: z4.array(projectedFileSchema).readonly() }).readonly(),
|
|
285
|
+
z4.object({
|
|
286
|
+
outcome: z4.literal("failed"),
|
|
287
|
+
error: runnerFailureSchema
|
|
288
|
+
}).readonly()
|
|
289
|
+
]);
|
|
290
|
+
|
|
291
|
+
// src/infrastructure/engines/protocol/engine-run/engine-run.ts
|
|
292
|
+
var invalid = (request) => ({
|
|
293
|
+
outcome: "failed",
|
|
294
|
+
error: { kind: "runner-invalid", mechanism: request.mechanism, detail: request.detail }
|
|
295
|
+
});
|
|
296
|
+
var runnerFailed = (request) => ({
|
|
297
|
+
outcome: "failed",
|
|
298
|
+
error: { kind: "runner-failed", mechanism: request.mechanism, failure: request.failure }
|
|
299
|
+
});
|
|
300
|
+
var runnerModuleAt = (request) => request.modules.load({
|
|
301
|
+
path: request.path.join({
|
|
302
|
+
segments: runnerModuleSegmentsOf({
|
|
303
|
+
installRoot: request.installRoot,
|
|
304
|
+
mechanism: request.mechanism,
|
|
305
|
+
moduleExtension: request.moduleExtension
|
|
306
|
+
})
|
|
307
|
+
})
|
|
308
|
+
});
|
|
309
|
+
var returnedBy = (request) => Promise.resolve().then(request.call).catch((thrown) => ({ outcome: "failed", error: rejectedCall({ thrown }).error }));
|
|
310
|
+
var invalidChecksOutput = (request) => runnerFailed({
|
|
311
|
+
mechanism: request.mechanism,
|
|
312
|
+
failure: runnerInvalidOutput({ detail: z5.prettifyError(request.error) }).error
|
|
313
|
+
});
|
|
314
|
+
var NAMED_RUNNER_MODULE = z5.object({ namedChecksRunner: namedChecksRunnerModuleSchema });
|
|
315
|
+
var loadedNamedRunnerOf = async (request) => {
|
|
316
|
+
const loaded = await runnerModuleAt(request);
|
|
317
|
+
if (loaded.outcome === "failed")
|
|
318
|
+
return invalid({ mechanism: request.mechanism, detail: loaded.error.detail });
|
|
319
|
+
const parsed = NAMED_RUNNER_MODULE.safeParse(loaded.value);
|
|
320
|
+
return parsed.success ? { outcome: "ok", value: parsed.data.namedChecksRunner } : invalid({ mechanism: request.mechanism, detail: z5.prettifyError(parsed.error) });
|
|
321
|
+
};
|
|
322
|
+
var namedRequestOf = (call) => ({
|
|
323
|
+
...call.request,
|
|
324
|
+
bindings: call.request.bindings.filter(({ engine }) => engine === call.mechanism)
|
|
325
|
+
});
|
|
326
|
+
var verifiedNamedRun = (request) => {
|
|
327
|
+
const { call, requested, report } = request;
|
|
328
|
+
const files = call.runner.fileScope === "tracked" ? requested.trackedPaths : requested.files;
|
|
329
|
+
const checked = checkedObservations({ requested: { ...requested, files }, report });
|
|
330
|
+
return checked.outcome === "failed" ? runnerFailed({ mechanism: call.mechanism, failure: checked.error }) : {
|
|
331
|
+
outcome: "ok",
|
|
332
|
+
value: {
|
|
333
|
+
...checked.value,
|
|
334
|
+
mechanism: call.mechanism,
|
|
335
|
+
coverableKinds: call.runner.projectedKinds
|
|
336
|
+
}
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
var namedEngineRunOf = async (call) => {
|
|
340
|
+
const requested = namedRequestOf(call);
|
|
341
|
+
const parsed = namedChecksRunResultSchema.safeParse(
|
|
342
|
+
await returnedBy({ call: () => call.runner.run(requested) })
|
|
343
|
+
);
|
|
344
|
+
if (!parsed.success) {
|
|
345
|
+
return invalidChecksOutput({ mechanism: call.mechanism, error: parsed.error });
|
|
346
|
+
}
|
|
347
|
+
if (parsed.data.outcome === "failed") {
|
|
348
|
+
return runnerFailed({ mechanism: call.mechanism, failure: parsed.data.error });
|
|
349
|
+
}
|
|
350
|
+
return verifiedNamedRun({ call, requested, report: parsed.data.value });
|
|
351
|
+
};
|
|
352
|
+
var versionOneMeasurementModuleSchema = z5.object({
|
|
353
|
+
measureVersionOne: runnerCallSchema.optional()
|
|
354
|
+
});
|
|
355
|
+
var measureNamedRun = async (call) => {
|
|
356
|
+
const report = await namedEngineRunOf(call);
|
|
357
|
+
return report.outcome === "failed" ? report : { outcome: "ok", value: { report: report.value, unappliedSlices: [] } };
|
|
358
|
+
};
|
|
359
|
+
var measureVersionOneProjection = async ({
|
|
360
|
+
call,
|
|
361
|
+
location,
|
|
362
|
+
projection
|
|
363
|
+
}) => {
|
|
364
|
+
if (projection === void 0) return measureNamedRun(call);
|
|
365
|
+
const loaded = await runnerModuleAt(location);
|
|
366
|
+
if (loaded.outcome === "failed")
|
|
367
|
+
return invalid({ mechanism: call.mechanism, detail: loaded.error.detail });
|
|
368
|
+
const module = versionOneMeasurementModuleSchema.safeParse(loaded.value);
|
|
369
|
+
if (!module.success)
|
|
370
|
+
return invalid({ mechanism: call.mechanism, detail: z5.prettifyError(module.error) });
|
|
371
|
+
const measureVersionOne = module.data.measureVersionOne;
|
|
372
|
+
if (measureVersionOne === void 0) return measureNamedRun(call);
|
|
373
|
+
const requested = namedRequestOf(call);
|
|
374
|
+
const parsed = measurementResultSchema.safeParse(
|
|
375
|
+
await returnedBy({ call: () => measureVersionOne({ run: requested, projection }) })
|
|
376
|
+
);
|
|
377
|
+
if (!parsed.success)
|
|
378
|
+
return invalidChecksOutput({ mechanism: call.mechanism, error: parsed.error });
|
|
379
|
+
if (parsed.data.outcome === "failed") {
|
|
380
|
+
return runnerFailed({ mechanism: call.mechanism, failure: parsed.data.error });
|
|
381
|
+
}
|
|
382
|
+
const allowedSlices = new Set(projection.packageFiles);
|
|
383
|
+
const unrequested = parsed.data.value.unappliedSlices.find((slice) => !allowedSlices.has(slice));
|
|
384
|
+
if (unrequested !== void 0) {
|
|
385
|
+
return runnerFailed({
|
|
386
|
+
mechanism: call.mechanism,
|
|
387
|
+
failure: runnerInvalidOutput({
|
|
388
|
+
detail: `unrequested version one projection slice ${unrequested}`
|
|
389
|
+
}).error
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
const report = verifiedNamedRun({ call, requested, report: parsed.data.value.report });
|
|
393
|
+
return report.outcome === "failed" ? report : {
|
|
394
|
+
outcome: "ok",
|
|
395
|
+
value: { report: report.value, unappliedSlices: parsed.data.value.unappliedSlices }
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
var namedEngineProjectionOf = async (call) => {
|
|
399
|
+
const parsed = checksProjectResultSchema.safeParse(
|
|
400
|
+
await returnedBy({ call: () => call.runner.project(namedRequestOf(call)) })
|
|
401
|
+
);
|
|
402
|
+
if (!parsed.success) {
|
|
403
|
+
return invalidChecksOutput({ mechanism: call.mechanism, error: parsed.error });
|
|
404
|
+
}
|
|
405
|
+
return parsed.data.outcome === "failed" ? runnerFailed({ mechanism: call.mechanism, failure: parsed.data.error }) : parsed.data;
|
|
406
|
+
};
|
|
407
|
+
|
|
408
|
+
// src/infrastructure/engines/protocol/engine-port.ts
|
|
409
|
+
var createNamedConformancePort = (_options) => ({
|
|
410
|
+
load: loadedNamedRunnerOf,
|
|
411
|
+
conform: namedCheckConformance
|
|
412
|
+
});
|
|
413
|
+
var createNamedEnginePort = (_options) => ({
|
|
414
|
+
load: loadedNamedRunnerOf,
|
|
415
|
+
run: namedEngineRunOf,
|
|
416
|
+
project: namedEngineProjectionOf
|
|
417
|
+
});
|
|
418
|
+
|
|
419
|
+
// src/domain/settings/clause-settings/default-clause-settings.ts
|
|
420
|
+
var defaultClauseSettings = (request) => Object.fromEntries(
|
|
421
|
+
Object.entries(request.declarations).map(([key, declaration]) => [key, declaration.default])
|
|
422
|
+
);
|
|
423
|
+
|
|
424
|
+
export {
|
|
425
|
+
defaultClauseSettings,
|
|
426
|
+
runnerInvalidOutput,
|
|
427
|
+
rejectedCall,
|
|
428
|
+
runnerCallSchema,
|
|
429
|
+
measureVersionOneProjection,
|
|
430
|
+
createNamedConformancePort,
|
|
431
|
+
createNamedEnginePort
|
|
432
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/domain/gathered-outcomes.ts
|
|
2
|
+
var gatheredOutcomes = (request) => {
|
|
3
|
+
const failed = request.outcomes.find((outcome) => outcome.outcome === "failed");
|
|
4
|
+
if (failed !== void 0) return failed;
|
|
5
|
+
return {
|
|
6
|
+
outcome: "ok",
|
|
7
|
+
value: request.outcomes.flatMap((outcome) => outcome.outcome === "ok" ? outcome.value : [])
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
var listedOutcome = (request) => request.outcome.outcome === "failed" ? request.outcome : { outcome: "ok", value: [request.outcome.value] };
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
gatheredOutcomes,
|
|
14
|
+
listedOutcome
|
|
15
|
+
};
|
|
@@ -151,7 +151,7 @@ Core knows only these two paths. A mechanism that fits neither would need a chan
|
|
|
151
151
|
|
|
152
152
|
Each runner's suite runs core's `checkConformance` (`core/conformance/conformance.ts`) over the real runner as core loads it, for every shared clause its pieces serve. It calls the runner's `conform` and compares the flagged lines with each case's expected lines; the runner conforms for a clause when the result is ok and lists no failures. The audit mechanism's is `mechanisms/audit/runner/walker-conformance.test.ts`; the ESLint runner's is in `src/infrastructure/engines/eslint/runner/native-exceptions/native-exceptions.integration.test.ts` and `delivery/shipped-content/eslint-conformance.test.ts`. Conformance runs the real tool in memory, because the tool's verdict is what is being checked.
|
|
153
153
|
|
|
154
|
-
A runner that answers a version 2 run through a checks runner, as ESLint does with its `checksRunner` export (`ChecksRunner` in `core/mechanism-port/checks-runner-types.ts`), implements `conform` there as well as `run`. `conform` is required: a module whose `checksRunner` has none is the load failure `runner-invalid`. `toolchainBoundChecksRunner` passes `conform` through the toolchain binding, as it does `run`. The report of a checks runner's `run` holds `projection`, the state of the root projection file, and `slices`, each other projection file it found `missing`, `out-of-date` or `unconfigured` (written for a declared config root whose folder holds no lint configuration on disk, so nothing loads it), named by its repository path. A checks runner reports no other slice state. Core lists each entry under `projectionProblems` as a line naming the file, which fails the check, whatever the root projection's state. The conformance kit (`
|
|
154
|
+
A runner that answers a version 2 run through a checks runner, as ESLint does with its `checksRunner` export (`ChecksRunner` in `core/mechanism-port/checks-runner-types.ts`), implements `conform` there as well as `run`. `conform` is required: a module whose `checksRunner` has none is the load failure `runner-invalid`. `toolchainBoundChecksRunner` passes `conform` through the toolchain binding, as it does `run`. The report of a checks runner's `run` holds `projection`, the state of the root projection file, and `slices`, each other projection file it found `missing`, `out-of-date` or `unconfigured` (written for a declared config root whose folder holds no lint configuration on disk, so nothing loads it), named by its repository path. A checks runner reports no other slice state. Core lists each entry under `projectionProblems` as a line naming the file, which fails the check, whatever the root projection's state. The conformance kit (`checkConformanceOf` in `@hailstails/hone/testing`, given a `ruleSet`) asks a standalone runner's `runner.conform`, and for an engine that runs through a native tool asks `checksRunner.conform`; such an engine with no `checksRunner` is the setup failure `runner-unloadable`, "the runner module exports no checksRunner, which version 2 conformance needs of an engine that runs through a native tool". Importing the module still builds its `runner` export; version 2 conformance does not call it.
|
|
155
155
|
|
|
156
156
|
### 5. Selecting it
|
|
157
157
|
|