@tech-leads-club/harness-toolkit 0.4.0 → 0.4.2

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.
@@ -1,4 +1,4 @@
1
- import{existsSync as Q,readFileSync as U}from"node:fs";import{join as J}from"node:path";import{homedir as L}from"node:os";import{delimiter as _,join as M,resolve as $}from"node:path";function N(){return M(L(),".tlc","harness")}function G(A=process.env){return A.TLC_HOME??N()}var V=J(G(),"docs"),q=(process.argv[2]??"").toLowerCase(),X={architecture:{file:"architecture.md"},concepts:{file:"concepts.md"},measure:{file:"measure.md"},metrics:{file:"measure.md"},prices:{file:"measure.md",section:"## Prices"},price:{file:"measure.md",section:"## Prices"},cost:{file:"measure.md",section:"## Prices"},costs:{file:"measure.md",section:"## Prices"},diagnose:{file:"diagnose.md"},doctor:{file:"diagnose.md"},debug:{file:"diagnose.md"},init:{file:"init.md"},setup:{file:"init.md"},lessons:{file:"lessons.md"},lesson:{file:"lessons.md"},rules:{file:"concepts.md",section:"## operator rules"},rule:{file:"concepts.md",section:"## operator rules"},runtime:{file:"concepts.md",section:"## which runtime answers a hook"},dev:{file:"concepts.md",section:"## which runtime answers a hook"},settings:{file:"concepts.md",section:"## where a setting lives"},config:{file:"concepts.md",section:"## where a setting lives"}};function K(){console.log(`tlc harness help
1
+ import{existsSync as A,readFileSync as B}from"node:fs";import{join as V}from"node:path";import{homedir as Z}from"node:os";import{delimiter as W,dirname as _,join as $,resolve as N}from"node:path";function q(){return $(Z(),".tlc","harness")}function Q(J=process.env){return J.TLC_HOME??q()}var F=V(Q(),"docs"),z=(process.argv[2]??"").toLowerCase(),L={architecture:{file:"architecture.md"},concepts:{file:"concepts.md"},measure:{file:"measure.md"},metrics:{file:"measure.md"},prices:{file:"measure.md",section:"## Prices"},price:{file:"measure.md",section:"## Prices"},cost:{file:"measure.md",section:"## Prices"},costs:{file:"measure.md",section:"## Prices"},diagnose:{file:"diagnose.md"},doctor:{file:"diagnose.md"},debug:{file:"diagnose.md"},init:{file:"init.md"},setup:{file:"init.md"},lessons:{file:"lessons.md"},lesson:{file:"lessons.md"},rules:{file:"concepts.md",section:"## operator rules"},rule:{file:"concepts.md",section:"## operator rules"},runtime:{file:"concepts.md",section:"## which runtime answers a hook"},dev:{file:"concepts.md",section:"## which runtime answers a hook"},settings:{file:"concepts.md",section:"## where a setting lives"},config:{file:"concepts.md",section:"## where a setting lives"}};function Y(){console.log(`tlc harness help
2
2
 
3
3
  TOPICS
4
4
  tlc harness help architecture
@@ -18,6 +18,6 @@ PRICES
18
18
 
19
19
  ALSO
20
20
  tlc harness status | doctor | grind | mode | obs | lessons
21
- `)}if(!q||q==="help"||q==="-h"||q==="--help")K(),process.exit(0);var B=X[q];if(!B)console.error(`unknown topic: ${q}`),K(),process.exit(1);var E=J(V,B.file);if(!Q(E))console.error(`missing doc: ${E}`),process.exit(1);var z=U(E,"utf8");if(B.section){let A=z.indexOf(B.section);if(A>=0)z=z.slice(A)}process.stdout.write(z.endsWith(`
22
- `)?z:`${z}
21
+ `)}if(!z||z==="help"||z==="-h"||z==="--help")Y(),process.exit(0);var K=L[z];if(!K)console.error(`unknown topic: ${z}`),Y(),process.exit(1);var M=V(F,K.file);if(!A(M))console.error(`missing doc: ${M}`),process.exit(1);var G=B(M,"utf8");if(K.section){let J=G.indexOf(K.section);if(J>=0)G=G.slice(J)}process.stdout.write(G.endsWith(`
22
+ `)?G:`${G}
23
23
  `);