tracerkit 1.5.0 → 1.6.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/dist/bin.js +10 -10
- package/dist/index.js +2 -2
- package/dist/{uninstall-CtKwA0V6.js → uninstall-Dri3LFXP.js} +39 -33
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { n as e, o as t, r as n, t as r } from "./uninstall-Dri3LFXP.js";
|
|
3
3
|
import { existsSync as i, mkdirSync as a, readFileSync as o, rmSync as s, unlinkSync as c, writeFileSync as l } from "node:fs";
|
|
4
4
|
import { dirname as u, join as d, resolve as f } from "node:path";
|
|
5
5
|
import { fileURLToPath as p } from "node:url";
|
|
@@ -19,8 +19,8 @@ function _(e, t, n) {
|
|
|
19
19
|
}
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/commands/archive.ts
|
|
22
|
-
function v(
|
|
23
|
-
let r = e
|
|
22
|
+
function v(e, n) {
|
|
23
|
+
let r = t(e), u = d(e, r.paths.prds, `${n}.md`), f = d(e, r.paths.plans, `${n}.md`), p = d(e, r.paths.archives, n), m = i(u);
|
|
24
24
|
if (!i(f)) throw Error(`Plan "${n}" not found at ${f}`);
|
|
25
25
|
if (i(p)) throw Error(`Archive "${n}" already exists at ${p}`);
|
|
26
26
|
a(p, { recursive: !0 });
|
|
@@ -60,8 +60,8 @@ function S(e) {
|
|
|
60
60
|
}
|
|
61
61
|
//#endregion
|
|
62
62
|
//#region src/commands/progress.ts
|
|
63
|
-
function C(
|
|
64
|
-
let r = d(
|
|
63
|
+
function C(e, n) {
|
|
64
|
+
let r = d(e, t(e).paths.plans, `${n}.md`);
|
|
65
65
|
if (!i(r)) throw Error(`Plan "${n}" not found at ${r}`);
|
|
66
66
|
let { phases: a } = S(o(r, "utf8"));
|
|
67
67
|
if (a.length === 0) return ["No phases found in plan.", "Total: 0/0"];
|
|
@@ -106,14 +106,14 @@ function D(e, t) {
|
|
|
106
106
|
return [`Error: ${e instanceof Error ? e.message : String(e)}`];
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
function O(
|
|
110
|
-
if (
|
|
111
|
-
if (
|
|
112
|
-
let i =
|
|
109
|
+
function O(t) {
|
|
110
|
+
if (t.includes("--help") || t.includes("-h")) return T;
|
|
111
|
+
if (t.includes("--version") || t.includes("-v")) return [`tracerkit/${w}`];
|
|
112
|
+
let i = t[0], a = t.slice(1);
|
|
113
113
|
switch (i) {
|
|
114
114
|
case "init": return n(E(a));
|
|
115
115
|
case "update": {
|
|
116
|
-
let
|
|
116
|
+
let t = a.includes("--force"), n = e(E(a.filter((e) => e !== "--force")), { force: t });
|
|
117
117
|
return n.push("", "Updated to the latest TracerKit."), n.push("If using Claude Code, restart your session to load changes."), n;
|
|
118
118
|
}
|
|
119
119
|
case "uninstall": return r(E(a));
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { e as SKILL_NAMES,
|
|
1
|
+
import { a as e, i as t, n, r, t as i } from "./uninstall-Dri3LFXP.js";
|
|
2
|
+
export { t as DEPRECATED_SKILLS, e as SKILL_NAMES, r as init, i as uninstall, n as update };
|
|
@@ -24,43 +24,41 @@ function d(t) {
|
|
|
24
24
|
archives: typeof o.archives == "string" ? o.archives : u.archives
|
|
25
25
|
} };
|
|
26
26
|
}
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region src/templates.ts
|
|
29
27
|
var f = [
|
|
30
28
|
"tk:prd",
|
|
31
29
|
"tk:plan",
|
|
32
30
|
"tk:check"
|
|
33
|
-
], p = s(o(l(import.meta.url)), "..", "templates");
|
|
34
|
-
function
|
|
31
|
+
], p = ["tk:verify"], m = s(o(l(import.meta.url)), "..", "templates");
|
|
32
|
+
function h(e, t = "") {
|
|
35
33
|
let n = r(e, { withFileTypes: !0 }), i = [];
|
|
36
34
|
for (let r of n) {
|
|
37
35
|
let n = t ? `${t}/${r.name}` : r.name;
|
|
38
|
-
r.isDirectory() ? i.push(...
|
|
36
|
+
r.isDirectory() ? i.push(...h(s(e, r.name), n)) : i.push(n);
|
|
39
37
|
}
|
|
40
38
|
return i.sort();
|
|
41
39
|
}
|
|
42
|
-
function
|
|
40
|
+
function g(e, t) {
|
|
43
41
|
return e.replaceAll("{{paths.prds}}", t.paths.prds).replaceAll("{{paths.plans}}", t.paths.plans).replaceAll("{{paths.archives}}", t.paths.archives);
|
|
44
42
|
}
|
|
45
|
-
function
|
|
46
|
-
let c = i ?? m
|
|
43
|
+
function _(e, r, i) {
|
|
44
|
+
let c = i ?? h(m);
|
|
47
45
|
for (let i of c) {
|
|
48
|
-
let c = s(
|
|
49
|
-
t(o(l), { recursive: !0 }), a(l,
|
|
46
|
+
let c = s(m, i), l = s(e, i);
|
|
47
|
+
t(o(l), { recursive: !0 }), a(l, g(n(c, "utf8"), r));
|
|
50
48
|
}
|
|
51
49
|
return { copied: c };
|
|
52
50
|
}
|
|
53
|
-
function
|
|
51
|
+
function v(e) {
|
|
54
52
|
return c("sha256").update(e).digest("hex");
|
|
55
53
|
}
|
|
56
|
-
function
|
|
57
|
-
let i = m
|
|
54
|
+
function y(t, r) {
|
|
55
|
+
let i = h(m), a = [], o = [], c = [];
|
|
58
56
|
for (let l of i) {
|
|
59
57
|
let i = s(t, l);
|
|
60
58
|
if (!e(i)) c.push(l);
|
|
61
59
|
else {
|
|
62
|
-
let e =
|
|
63
|
-
|
|
60
|
+
let e = g(n(s(m, l), "utf8"), r);
|
|
61
|
+
v(Buffer.from(e)) === v(n(i)) ? a.push(l) : o.push(l);
|
|
64
62
|
}
|
|
65
63
|
}
|
|
66
64
|
return {
|
|
@@ -71,35 +69,43 @@ function v(t, r) {
|
|
|
71
69
|
}
|
|
72
70
|
//#endregion
|
|
73
71
|
//#region src/commands/init.ts
|
|
74
|
-
function
|
|
72
|
+
function b(t) {
|
|
75
73
|
for (let n of f) if (e(s(t, ".claude", "skills", n))) throw Error(`.claude/skills/${n}/ already exists — aborting`);
|
|
76
|
-
let { copied: n } =
|
|
74
|
+
let { copied: n } = _(t, d(t));
|
|
77
75
|
return n.map((e) => `✓ ${e}`);
|
|
78
76
|
}
|
|
79
77
|
//#endregion
|
|
80
78
|
//#region src/commands/update.ts
|
|
81
|
-
function
|
|
79
|
+
function x(t, n) {
|
|
82
80
|
if (!f.some((n) => e(s(t, ".claude", "skills", n)))) throw Error("TracerKit not initialized — run `tracerkit init` first");
|
|
83
|
-
let r = d(t), { unchanged:
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
let r = d(t), { unchanged: a, modified: o, missing: c } = y(t, r), l = [];
|
|
82
|
+
for (let n of p) {
|
|
83
|
+
let r = s(t, ".claude", "skills", n);
|
|
84
|
+
e(r) && (i(r, {
|
|
85
|
+
recursive: !0,
|
|
86
|
+
force: !0
|
|
87
|
+
}), l.push(`✗ .claude/skills/${n}/ removed (deprecated)`));
|
|
88
|
+
}
|
|
89
|
+
let u = n?.force ?? !1, m = [
|
|
90
|
+
...a,
|
|
91
|
+
...c,
|
|
92
|
+
...u ? o : []
|
|
87
93
|
];
|
|
88
|
-
if (
|
|
89
|
-
|
|
90
|
-
for (let e of
|
|
91
|
-
for (let e of
|
|
92
|
-
if (
|
|
94
|
+
if (m.length > 0) {
|
|
95
|
+
_(t, r, m);
|
|
96
|
+
for (let e of a) l.push(`✓ ${e}`);
|
|
97
|
+
for (let e of c) l.push(`✓ ${e} (added)`);
|
|
98
|
+
if (u) for (let e of o) l.push(`✓ ${e} (replaced)`);
|
|
93
99
|
}
|
|
94
|
-
if (!
|
|
95
|
-
for (let e of
|
|
96
|
-
|
|
100
|
+
if (!u && o.length > 0) {
|
|
101
|
+
for (let e of o) l.push(`⚠ ${e} (skipped — modified)`);
|
|
102
|
+
l.push("", "Run `tracerkit update --force` to replace modified files with latest versions.");
|
|
97
103
|
}
|
|
98
|
-
return
|
|
104
|
+
return l;
|
|
99
105
|
}
|
|
100
106
|
//#endregion
|
|
101
107
|
//#region src/commands/uninstall.ts
|
|
102
|
-
function
|
|
108
|
+
function S(t) {
|
|
103
109
|
if (!f.some((n) => e(s(t, ".claude", "skills", n)))) throw Error("TracerKit not initialized — nothing to uninstall");
|
|
104
110
|
let n = [];
|
|
105
111
|
for (let r of f) {
|
|
@@ -112,4 +118,4 @@ function x(t) {
|
|
|
112
118
|
return n;
|
|
113
119
|
}
|
|
114
120
|
//#endregion
|
|
115
|
-
export {
|
|
121
|
+
export { f as a, p as i, x as n, d as o, b as r, S as t };
|