@kirill.konshin/lint 0.6.0 → 0.6.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.
Files changed (51) hide show
  1. package/README.md +7 -7
  2. package/dist/lib.js +2 -1
  3. package/package.json +4 -6
  4. package/skills/spec-steward/SKILL.md +2 -2
  5. package/skills/spec-steward/references/contract.md +7 -7
  6. package/skills/spec-tools/SKILL.md +3 -1
  7. package/skills/spec-tools/references/contract.md +1 -1
  8. package/skills/spec-tools/references/gitlab.md +20 -22
  9. package/skills/spec-tools/scripts/cli.js +8129 -0
  10. package/skills/spec-verify/SKILL.md +2 -2
  11. package/skills/spec-steward/scripts/lib/align.mjs +0 -127
  12. package/skills/spec-steward/scripts/lib/checks.mjs +0 -589
  13. package/skills/spec-steward/scripts/lib/citations.mjs +0 -156
  14. package/skills/spec-steward/scripts/lib/corpus.mjs +0 -256
  15. package/skills/spec-steward/scripts/lib/coverage.mjs +0 -123
  16. package/skills/spec-steward/scripts/lib/evidence.mjs +0 -189
  17. package/skills/spec-steward/scripts/lib/git.mjs +0 -138
  18. package/skills/spec-steward/scripts/lib/review.mjs +0 -347
  19. package/skills/spec-steward/scripts/lib/scan.mjs +0 -364
  20. package/skills/spec-steward/scripts/lib/util.mjs +0 -161
  21. package/skills/spec-steward/scripts/lib/wire.mjs +0 -333
  22. package/skills/spec-steward/scripts/steward.mjs +0 -289
  23. package/spec-tools/dist/audit-DkZZulq6.mjs +0 -130
  24. package/spec-tools/dist/auditChanged-CNGjlake.mjs +0 -1
  25. package/spec-tools/dist/auditChanged-CZCvMgyZ.mjs +0 -618
  26. package/spec-tools/dist/auditReport-xgq4wK2i.mjs +0 -458
  27. package/spec-tools/dist/auditScope-CBuBtfPG.mjs +0 -104
  28. package/spec-tools/dist/changeGates-DdeQKfle.mjs +0 -333
  29. package/spec-tools/dist/changeGates-uy4Ti8rK.mjs +0 -1
  30. package/spec-tools/dist/ci-BUewHJS3.mjs +0 -143
  31. package/spec-tools/dist/ci-CFBzn8Of.mjs +0 -1
  32. package/spec-tools/dist/cli.mjs +0 -93
  33. package/spec-tools/dist/comment-szasMMg2.mjs +0 -57
  34. package/spec-tools/dist/files-Bppsb34B.mjs +0 -1
  35. package/spec-tools/dist/files-QlzY687_.mjs +0 -38
  36. package/spec-tools/dist/html-BMTkpbUN.mjs +0 -1766
  37. package/spec-tools/dist/jsonrepair-Dlm5dEen.mjs +0 -742
  38. package/spec-tools/dist/repo-CjIoUPYl.mjs +0 -16
  39. package/spec-tools/dist/repo-DUcnJw3c.mjs +0 -1
  40. package/spec-tools/dist/run-BElA9du3.mjs +0 -67
  41. package/spec-tools/dist/specDiff-8G56jMYn.mjs +0 -123
  42. package/spec-tools/dist/steward-DeieyOcj.mjs +0 -34
  43. package/spec-tools/dist/stewardAudit-BRMM0lrD.mjs +0 -1
  44. package/spec-tools/dist/stewardAudit-v0vOMfLN.mjs +0 -271
  45. package/spec-tools/dist/tier-Cn0P7juM.mjs +0 -1
  46. package/spec-tools/dist/tier-c3s_mA_I.mjs +0 -65
  47. package/spec-tools/dist/util-wnxhsnWO.mjs +0 -49
  48. package/spec-tools/dist/verdict-BFfN9PO8.mjs +0 -58
  49. package/spec-tools/dist/workers-BcIgckeq.mjs +0 -417
  50. package/spec-tools/dist/workflowEvidence-DyBj8EdG.mjs +0 -1
  51. package/spec-tools/dist/workflowEvidence-oui6ghPI.mjs +0 -78
@@ -1,130 +0,0 @@
1
- import { a as PARTS_DIR, r as EVIDENCE_FILE, t as AUDIT_FILES } from "./files-QlzY687_.mjs";
2
- import { n as root, t as git } from "./repo-CjIoUPYl.mjs";
3
- import { spawnSync } from "node:child_process";
4
- import * as fs from "node:fs";
5
- import * as os from "node:os";
6
- import * as path from "node:path";
7
- //#region spec-tools/src/audit.ts
8
- /**
9
- * `spec-tools audit`: the CI sequence — the evidence model, scope, then the passes and merges in the order `workers.ts`
10
- * describes — run by default from a DETACHED worktree of HEAD, so what is judged is exactly the commit CI judges: an
11
- * uncommitted edit, or a stale `audit-parts/findings/` in the working tree, cannot leak into the run, and every ERROR's
12
- * quotes are re-proved against HEAD. The install is the working tree's (`node_modules` is linked in), and the run's
13
- * outputs — evidence model, scope, evidence, findings, the merged report — come back to the working tree.
14
- * `--here` runs on the working tree instead, uncommitted edits included, and re-proves quotes against it.
15
- * `--dry` exercises the tree and runs no worker.
16
- */
17
- /** What a run produces and brings back to the working tree. */
18
- const outputs = (audit) => [.../* @__PURE__ */ new Set([
19
- EVIDENCE_FILE,
20
- PARTS_DIR,
21
- AUDIT_FILES[audit].scope,
22
- AUDIT_FILES[audit].report,
23
- AUDIT_FILES[audit].data
24
- ])];
25
- /** This CLI as it was started — the build or the source under a loader alike — run in `cwd`; its exit code. */
26
- const self = (args, cwd) => spawnSync(process.execPath, [
27
- ...process.execArgv,
28
- process.argv[1],
29
- ...args
30
- ], {
31
- cwd,
32
- stdio: "inherit"
33
- }).status ?? 1;
34
- /**
35
- * The sequence in one tree. The intermediate merges only render; spec-verify's last one gates (exit 0 / 1 / 3), and
36
- * spec-steward's renders the review file for the owner.
37
- */
38
- function sequence(tree, here, dry, audit, context) {
39
- const named = audit === "spec-verify" ? [] : ["--audit", audit];
40
- const worker = context ? [
41
- ...named,
42
- "--context",
43
- context
44
- ] : named;
45
- const report = [...here ? ["report", "--worktree"] : ["report"], ...named];
46
- const steps = dry ? [["scope", ...named]] : [
47
- ["scope", ...named],
48
- ["workers", ...worker],
49
- report,
50
- [
51
- "workers",
52
- "--complete",
53
- ...worker
54
- ],
55
- report,
56
- [
57
- "workers",
58
- "--verify",
59
- ...worker
60
- ],
61
- audit === "spec-verify" ? [...report, "--gate"] : report
62
- ];
63
- for (const step of steps) {
64
- const code = self(step, tree);
65
- if (code !== 0) return code;
66
- }
67
- if (dry) console.log("spec-tools audit: dry run — scope written, no worker started");
68
- return 0;
69
- }
70
- function audit(argv, audit = "spec-verify") {
71
- const valued = ["--audit", "--context"];
72
- const unknown = argv.filter((a, i) => a !== "--here" && a !== "--dry" && !valued.includes(a) && !valued.includes(argv[i - 1] ?? ""));
73
- if (unknown.length) {
74
- console.error(`spec-tools audit: unknown argument ${unknown[0]} (accepted: --here, --dry, --audit <name>, --context <file>)`);
75
- return 2;
76
- }
77
- const given = argv.includes("--context") ? argv[argv.indexOf("--context") + 1] : void 0;
78
- const context = given ? path.resolve(given) : void 0;
79
- const here = argv.includes("--here");
80
- const dry = argv.includes("--dry");
81
- const top = root();
82
- const head = git([
83
- "rev-parse",
84
- "--short",
85
- "HEAD"
86
- ]).trim();
87
- if (here) {
88
- console.log(`spec-tools audit: working tree (${head}, uncommitted edits included)`);
89
- return sequence(top, true, dry, audit, context);
90
- }
91
- const tree = path.join(fs.mkdtempSync(path.join(os.tmpdir(), `${path.basename(top)}-audit-`)), "tree");
92
- git([
93
- "worktree",
94
- "add",
95
- "--detach",
96
- "--quiet",
97
- tree,
98
- "HEAD"
99
- ]);
100
- try {
101
- fs.symlinkSync(path.join(top, "node_modules"), path.join(tree, "node_modules"));
102
- console.log(`spec-tools audit: detached tree of ${head} at ${tree}`);
103
- const code = sequence(tree, false, dry, audit, context);
104
- if (!dry) for (const out of outputs(audit)) {
105
- if (!fs.existsSync(path.join(tree, out))) continue;
106
- fs.rmSync(path.join(top, out), {
107
- recursive: true,
108
- force: true
109
- });
110
- fs.cpSync(path.join(tree, out), path.join(top, out), { recursive: true });
111
- }
112
- return code;
113
- } finally {
114
- try {
115
- git([
116
- "worktree",
117
- "remove",
118
- "--force",
119
- tree
120
- ]);
121
- } catch {
122
- fs.rmSync(tree, {
123
- recursive: true,
124
- force: true
125
- });
126
- }
127
- }
128
- }
129
- //#endregion
130
- export { audit };
@@ -1 +0,0 @@
1
- export { o as main } from "./auditChanged-CZCvMgyZ.mjs";