@r_masseater/msch 0.41.0 → 0.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -8
- package/dist/cargo-inputs.d.mts +15 -0
- package/dist/cargo-inputs.mjs +281 -0
- package/dist/cargo-inputs.mjs.map +1 -0
- package/dist/changed.d.mts +1 -0
- package/dist/changed.mjs +178 -0
- package/dist/changed.mjs.map +1 -0
- package/dist/cli-contract-BY7vwgKc.mjs +41 -0
- package/dist/cli-contract-BY7vwgKc.mjs.map +1 -0
- package/dist/cli.mjs +1038 -1206
- package/dist/cli.mjs.map +1 -1
- package/dist/config.d.mts +4 -2
- package/dist/config.mjs +26 -13
- package/dist/config.mjs.map +1 -1
- package/dist/decision-rules.d.mts +1 -1
- package/dist/decision-rules.mjs +1 -1
- package/dist/{define-lint-preset-BYMl7wof.mjs → define-lint-preset-CxzPzVuB.mjs} +110 -80
- package/dist/define-lint-preset-CxzPzVuB.mjs.map +1 -0
- package/dist/{package-A62qq8pE.mjs → dependencies-v59cxwTD.mjs} +186 -165
- package/dist/dependencies-v59cxwTD.mjs.map +1 -0
- package/dist/ignored-directories-thSB0IAT.mjs +57 -0
- package/dist/ignored-directories-thSB0IAT.mjs.map +1 -0
- package/dist/{index-lM4Pphgz.d.mts → index-DL7PSp7j.d.mts} +21 -16
- package/dist/{index-CcVKuHBw.d.mts → index-DdJXnW1q.d.mts} +2 -2
- package/dist/lint.d.mts +2 -2
- package/dist/lint.mjs +1 -1
- package/dist/locked-closure-paths-Dtqs8uBU.mjs +7 -0
- package/dist/locked-closure-paths-Dtqs8uBU.mjs.map +1 -0
- package/dist/locked-inputs.d.mts +12 -0
- package/dist/locked-inputs.mjs +20 -0
- package/dist/locked-inputs.mjs.map +1 -0
- package/dist/oxlint.mjs +2 -1
- package/dist/oxlint.mjs.map +1 -1
- package/dist/package-Bdv6W97F.mjs +144 -0
- package/dist/package-Bdv6W97F.mjs.map +1 -0
- package/dist/project-DeQcAglt.mjs +464 -0
- package/dist/project-DeQcAglt.mjs.map +1 -0
- package/dist/publish.d.mts +1 -0
- package/dist/publish.mjs +822 -0
- package/dist/publish.mjs.map +1 -0
- package/dist/reachable-Cc-255L3.mjs +13 -0
- package/dist/reachable-Cc-255L3.mjs.map +1 -0
- package/dist/{repository-files-CorshdqY.mjs → repository-files-aXwrITdF.mjs} +9 -2
- package/dist/repository-files-aXwrITdF.mjs.map +1 -0
- package/dist/runtime-GbrDfB8K.mjs +29 -0
- package/dist/runtime-GbrDfB8K.mjs.map +1 -0
- package/dist/started-once-CkTooI_o.mjs +13 -0
- package/dist/started-once-CkTooI_o.mjs.map +1 -0
- package/dist/{cli-contract-8SnKqhGw.mjs → syntax-ct2fFLtv.mjs} +9 -45
- package/dist/syntax-ct2fFLtv.mjs.map +1 -0
- package/dist/workspace-settings.d.mts +1 -1
- package/dist/workspace-settings.mjs +11 -92
- package/dist/workspace-settings.mjs.map +1 -1
- package/package.json +52 -34
- package/skills/msch-checks/SKILL.md +1 -6
- package/skills/publishing/SKILL.md +46 -0
- package/skills/repository-config/SKILL.md +21 -15
- package/skills/workspace-settings/SKILL.md +33 -3
- package/src/app/vite.d.ts +6 -0
- package/dist/cli-contract-8SnKqhGw.mjs.map +0 -1
- package/dist/define-lint-preset-BYMl7wof.mjs.map +0 -1
- package/dist/package-A62qq8pE.mjs.map +0 -1
- package/dist/repository-files-CorshdqY.mjs.map +0 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { d as lineOf, n as columnOf } from "./syntax-ct2fFLtv.mjs";
|
|
2
|
+
import { Array, Order, Schema, pipe } from "effect";
|
|
3
|
+
// src/shared/lib/problem.ts
|
|
4
|
+
const RuleNameSchema = Schema.String.check(Schema.isPattern(/^[a-z]+(?:-[a-z]+)*$/u));
|
|
5
|
+
const ProblemSchema = Schema.Struct({
|
|
6
|
+
file: Schema.String,
|
|
7
|
+
line: Schema.Int,
|
|
8
|
+
column: Schema.Int,
|
|
9
|
+
rule: RuleNameSchema,
|
|
10
|
+
message: Schema.String
|
|
11
|
+
});
|
|
12
|
+
const ProblemList = Schema.Array(ProblemSchema);
|
|
13
|
+
const problemAt = ({ rule, message }) => (node) => ({
|
|
14
|
+
file: node.getSourceFile().fileName,
|
|
15
|
+
line: lineOf(node),
|
|
16
|
+
column: columnOf(node),
|
|
17
|
+
rule,
|
|
18
|
+
message
|
|
19
|
+
});
|
|
20
|
+
const problemOrder = Order.combineAll([
|
|
21
|
+
Order.mapInput(Order.String, (problem) => problem.file),
|
|
22
|
+
Order.mapInput(Order.Number, (problem) => problem.line),
|
|
23
|
+
Order.mapInput(Order.Number, (problem) => problem.column),
|
|
24
|
+
Order.mapInput(Order.String, (problem) => problem.rule),
|
|
25
|
+
Order.mapInput(Order.String, (problem) => problem.message)
|
|
26
|
+
]);
|
|
27
|
+
const problemKey = (problem) => pipe([
|
|
28
|
+
problem.file,
|
|
29
|
+
String(problem.line),
|
|
30
|
+
String(problem.column),
|
|
31
|
+
problem.rule,
|
|
32
|
+
problem.message
|
|
33
|
+
], Array.join("\0"));
|
|
34
|
+
const sortProblems = (problems) => Array.sort(Array.dedupeWith(problems, (left, right) => problemKey(left) === problemKey(right)), problemOrder);
|
|
35
|
+
const describeFinding = (problem) => `[${problem.rule}] ${problem.message}`;
|
|
36
|
+
const formatProblem = (relative) => (problem) => `${relative(problem.file)}:${String(problem.line)}:${String(problem.column)} ${describeFinding(problem)}`;
|
|
37
|
+
// src/shared/lib/cli-contract.ts
|
|
38
|
+
const JSON_FLAG = "--json";
|
|
39
|
+
export { problemAt as a, formatProblem as i, ProblemList as n, sortProblems as o, describeFinding as r, JSON_FLAG as t };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=cli-contract-BY7vwgKc.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-contract-BY7vwgKc.mjs","names":["Arr"],"sources":["../src/shared/lib/problem.ts","../src/shared/lib/cli-contract.ts"],"sourcesContent":["import { Array as Arr, Order, Schema, pipe } from \"effect\";\n\nimport type { Node } from \"./compiler.ts\";\nimport { columnOf, lineOf } from \"./syntax.ts\";\n\nconst RuleNameSchema = Schema.String.check(Schema.isPattern(/^[a-z]+(?:-[a-z]+)*$/u));\n\nexport type RuleName = typeof RuleNameSchema.Type;\n\nconst ProblemSchema = Schema.Struct({\n file: Schema.String,\n line: Schema.Int,\n column: Schema.Int,\n rule: RuleNameSchema,\n message: Schema.String,\n});\n\nexport type Problem = typeof ProblemSchema.Type;\n\nexport const ProblemList = Schema.Array(ProblemSchema);\n\nexport const CANDIDATE_LIMIT = 3;\n\nexport interface Finding {\n readonly rule: RuleName;\n readonly message: string;\n}\n\nexport const problemAt =\n ({ rule, message }: Finding) =>\n (node: Node): Problem => ({\n file: node.getSourceFile().fileName,\n line: lineOf(node),\n column: columnOf(node),\n rule,\n message,\n });\n\nconst problemOrder: Order.Order<Problem> = Order.combineAll([\n Order.mapInput(Order.String, (problem: Problem) => problem.file),\n Order.mapInput(Order.Number, (problem: Problem) => problem.line),\n Order.mapInput(Order.Number, (problem: Problem) => problem.column),\n Order.mapInput(Order.String, (problem: Problem) => problem.rule),\n Order.mapInput(Order.String, (problem: Problem) => problem.message),\n]);\n\nconst problemKey = (problem: Problem): string =>\n pipe(\n [problem.file, String(problem.line), String(problem.column), problem.rule, problem.message],\n Arr.join(\"\\0\"),\n );\n\nexport const sortProblems = (problems: readonly Problem[]): readonly Problem[] =>\n Arr.sort(\n Arr.dedupeWith(problems, (left, right) => problemKey(left) === problemKey(right)),\n problemOrder,\n );\n\nexport const describeFinding = (problem: Problem): string => `[${problem.rule}] ${problem.message}`;\n\nexport const formatProblem =\n (relative: (file: string) => string) =>\n (problem: Problem): string =>\n `${relative(problem.file)}:${String(problem.line)}:${String(problem.column)} ${describeFinding(problem)}`;\n","export const JSON_FLAG = \"--json\";\n"],"mappings":";;;AAKA,MAAM,iBAAiB,OAAO,OAAO,MAAM,OAAO,UAAU,uBAAuB,CA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