etymd 0.13.0 → 0.14.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.
Files changed (35) hide show
  1. package/CHANGELOG.md +94 -0
  2. package/dist/{approve-YUT43YLC.js → approve-QDOH2E7V.js} +5 -5
  3. package/dist/audit-42OHF7ON.js +10 -0
  4. package/dist/{brief-Z5S6OY2M.js → brief-ZUQK3CFL.js} +5 -5
  5. package/dist/{chunk-D3R74TJ2.js → chunk-623W6KVC.js} +1 -1
  6. package/dist/{chunk-5BVKFJWM.js → chunk-HI7NWPRA.js} +79 -4
  7. package/dist/{chunk-2VLNI3L2.js → chunk-HOR4M6EC.js} +1 -1
  8. package/dist/{chunk-YXOAPMQH.js → chunk-HWC6PKJM.js} +2 -2
  9. package/dist/{chunk-PXRLOEN5.js → chunk-LT7JMVV3.js} +127 -11
  10. package/dist/{chunk-DWL2IKZH.js → chunk-P6ATKV2R.js} +65 -3
  11. package/dist/{chunk-DSAQ5S5D.js → chunk-PAMWS665.js} +2 -2
  12. package/dist/{chunk-HRJJQCMT.js → chunk-UFNETE6P.js} +69 -20
  13. package/dist/{chunk-LSZGCKIQ.js → chunk-YQZDYDAK.js} +1 -1
  14. package/dist/cli.js +20 -20
  15. package/dist/{config-XAH6PA5G.js → config-724Y3IOB.js} +1 -2
  16. package/dist/{context-F63RSIBH.js → context-JGKU4M7Z.js} +2 -4
  17. package/dist/doctor-CE5SD4JW.js +17 -0
  18. package/dist/{fleet-YQ35KGEP.js → fleet-F3XDEDCV.js} +10 -12
  19. package/dist/{gates-DU6SDH2M.js → gates-F4YPKWJR.js} +6 -7
  20. package/dist/generate-KEX75XNG.js +5 -0
  21. package/dist/index.d.ts +9 -1
  22. package/dist/index.js +223 -40
  23. package/dist/{init-XJEYU2HC.js → init-AHA7VRRI.js} +14 -13
  24. package/dist/ledger-T54JDHGP.js +6 -0
  25. package/dist/scan-QRTH6HAP.js +5 -0
  26. package/dist/{scan-B24RZAV2.js → scan-TVX3FKK4.js} +5 -5
  27. package/dist/{screen-CS6PSG7U.js → screen-E4FC7W5N.js} +2 -1
  28. package/package.json +1 -1
  29. package/dist/audit-YRT4SWSQ.js +0 -12
  30. package/dist/chunk-F75Q43BC.js +0 -59
  31. package/dist/chunk-JHZ2BN4U.js +0 -67
  32. package/dist/doctor-7YKDXSKM.js +0 -19
  33. package/dist/generate-PMCP37DC.js +0 -6
  34. package/dist/ledger-4FOZ5HAB.js +0 -5
  35. package/dist/scan-QDNN7ER3.js +0 -5
@@ -1,67 +0,0 @@
1
- #!/usr/bin/env node
2
- import { readJson } from './chunk-4VPBP6K6.js';
3
- import { promises } from 'fs';
4
- import path from 'path';
5
-
6
- var ETYMD_DIR = ".etymd";
7
- var CACHE_DIR = path.join(ETYMD_DIR, "cache");
8
- var CACHE_FACTS_FILE = path.join(CACHE_DIR, "facts.json");
9
- var BASELINE_FILE = path.join(ETYMD_DIR, "baseline.json");
10
- function cacheFactsPath(root) {
11
- return path.join(root, CACHE_FACTS_FILE);
12
- }
13
- function baselinePath(root) {
14
- return path.join(root, BASELINE_FILE);
15
- }
16
- async function writeJsonFile(target, data) {
17
- await promises.mkdir(path.dirname(target), { recursive: true });
18
- await promises.writeFile(target, JSON.stringify(data, null, 2) + "\n", "utf8");
19
- return target;
20
- }
21
- async function writeCachedFacts(root, facts) {
22
- return writeJsonFile(cacheFactsPath(root), facts);
23
- }
24
- function withoutMachinePath(facts) {
25
- return { ...facts, root: "." };
26
- }
27
- function baselineCarriesMachinePath(baseline) {
28
- const root = baseline.facts?.root;
29
- return typeof root === "string" && root !== "." && (root.startsWith("/") || /^[A-Za-z]:[\\/]/.test(root));
30
- }
31
- async function writeBaseline(root, baseline) {
32
- return writeJsonFile(baselinePath(root), {
33
- ...baseline,
34
- facts: withoutMachinePath(baseline.facts)
35
- });
36
- }
37
- async function readBaseline(root) {
38
- return readJson(baselinePath(root));
39
- }
40
- function deriveProfile(facts) {
41
- return (facts.git.recentAuthors ?? 1) > 2 ? "team" : "solo";
42
- }
43
- var DRIFT_ROLES = ["test", "lint", "typecheck", "format", "formatCheck", "build", "dev"];
44
- function summarizeBaselineDrift(old, fresh) {
45
- const commands = [];
46
- for (const role of DRIFT_ROLES) {
47
- const from = old.commands[role];
48
- const to = fresh.commands[role];
49
- if (from !== to) commands.push({ role, from, to });
50
- }
51
- const presentIds = (f) => new Set(f.artifacts.filter((a) => a.exists).map((a) => a.id));
52
- const oldArtifacts = presentIds(old);
53
- const freshArtifacts = presentIds(fresh);
54
- const labelOf = (id) => fresh.artifacts.find((a) => a.id === id)?.label ?? old.artifacts.find((a) => a.id === id)?.label ?? id;
55
- const artifactsAdded = [...freshArtifacts].filter((id) => !oldArtifacts.has(id)).map(labelOf);
56
- const artifactsRemoved = [...oldArtifacts].filter((id) => !freshArtifacts.has(id)).map(labelOf);
57
- const oldDirs = new Set(old.tree.dirs.map((d) => d.name));
58
- const freshDirs = new Set(fresh.tree.dirs.map((d) => d.name));
59
- const dirsAdded = [...freshDirs].filter((d) => !oldDirs.has(d));
60
- const dirsRemoved = [...oldDirs].filter((d) => !freshDirs.has(d));
61
- return { commands, artifactsAdded, artifactsRemoved, dirsAdded, dirsRemoved };
62
- }
63
- function isDriftEmpty(d) {
64
- return d.commands.length === 0 && d.artifactsAdded.length === 0 && d.artifactsRemoved.length === 0 && d.dirsAdded.length === 0 && d.dirsRemoved.length === 0;
65
- }
66
-
67
- export { BASELINE_FILE, CACHE_DIR, ETYMD_DIR, baselineCarriesMachinePath, deriveProfile, isDriftEmpty, readBaseline, summarizeBaselineDrift, writeBaseline, writeCachedFacts };
@@ -1,19 +0,0 @@
1
- #!/usr/bin/env node
2
- import { run } from './chunk-DSAQ5S5D.js';
3
- import './chunk-PXRLOEN5.js';
4
- import './chunk-F75Q43BC.js';
5
- import './chunk-3E2IPCRY.js';
6
- import './chunk-DWL2IKZH.js';
7
- import './chunk-5BVKFJWM.js';
8
- import './chunk-YXOAPMQH.js';
9
- import './chunk-D3R74TJ2.js';
10
- import './chunk-JHZ2BN4U.js';
11
- import './chunk-LSZGCKIQ.js';
12
- import './chunk-4VPBP6K6.js';
13
-
14
- // src/commands/doctor.ts
15
- async function run2(opts) {
16
- await run({ cwd: opts.cwd, json: opts.json, truth: true });
17
- }
18
-
19
- export { run2 as run };
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- export { deriveFailOn, derivedCommands, planWorkflow, riskReachability } from './chunk-HRJJQCMT.js';
3
- import './chunk-DWL2IKZH.js';
4
- import './chunk-JHZ2BN4U.js';
5
- import './chunk-LSZGCKIQ.js';
6
- import './chunk-4VPBP6K6.js';
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env node
2
- export { accept, dismiss, list } from './chunk-2VLNI3L2.js';
3
- import './chunk-3E2IPCRY.js';
4
- import './chunk-5BVKFJWM.js';
5
- import './chunk-4VPBP6K6.js';
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env node
2
- export { scanProject } from './chunk-YXOAPMQH.js';
3
- import './chunk-D3R74TJ2.js';
4
- import './chunk-LSZGCKIQ.js';
5
- import './chunk-4VPBP6K6.js';