@spardutti/claude-skills 2.54.0 → 2.54.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.
- package/README.md +1 -1
- package/hooks/ship-log-parse.mjs +1 -1
- package/hooks/ship-log.mjs +8 -0
- package/package.json +1 -1
package/README.md
CHANGED
package/hooks/ship-log-parse.mjs
CHANGED
|
@@ -93,7 +93,7 @@ export function prSize(base, testRe, sourceExt) {
|
|
|
93
93
|
const rows = git(["diff", "--numstat", "--no-renames", fork]).split("\n").filter(Boolean).map((l) => l.split("\t"));
|
|
94
94
|
const size = { files: 0, added: 0, removed: 0, code: { files: 0, added: 0, removed: 0 }, tests: { files: 0, added: 0, removed: 0 }, other: { files: 0, added: 0, removed: 0 } };
|
|
95
95
|
for (const [a, r, f] of [...rows, ...untracked()]) {
|
|
96
|
-
if (/(^|\/)\.claude
|
|
96
|
+
if (/(^|\/)\.claude\/|(^|\/)\.(line-limit|lint|mutmut)-baseline$/.test(f)) continue;
|
|
97
97
|
const add = Number(a) || 0, rem = Number(r) || 0, bucket = size[kindOf(f, testRe, sourceExt)];
|
|
98
98
|
size.files++; size.added += add; size.removed += rem;
|
|
99
99
|
bucket.files++; bucket.added += add; bucket.removed += rem;
|
package/hooks/ship-log.mjs
CHANGED
|
@@ -76,10 +76,16 @@ function addFinding(record, json) {
|
|
|
76
76
|
record.findings.push({ ts: now(), ...f });
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
function lastEvent(record, skip) {
|
|
80
|
+
const ends = Object.entries(record.steps).filter(([k]) => k !== skip).map(([, s]) => s.end);
|
|
81
|
+
return [record.started, ...record.gate.map((g) => g.ts), ...ends].filter(Boolean).sort().at(-1);
|
|
82
|
+
}
|
|
83
|
+
|
|
79
84
|
function addStep(record, [name, edge]) {
|
|
80
85
|
if (!name || !["start", "end"].includes(edge)) throw new Error("usage: step <name> start|end");
|
|
81
86
|
const step = (record.steps[name] ??= {});
|
|
82
87
|
step[edge] = now();
|
|
88
|
+
if (edge === "end" && !step.start) step.start = lastEvent(record, name);
|
|
83
89
|
if (step.start && step.end) step.seconds = Math.round((Date.parse(step.end) - Date.parse(step.start)) / 1000);
|
|
84
90
|
}
|
|
85
91
|
|
|
@@ -90,6 +96,8 @@ function run(mode, args) {
|
|
|
90
96
|
if (!c.on) return 0;
|
|
91
97
|
const id = identity(c.root), path = openPath(c.dir, id), record = load(path, id);
|
|
92
98
|
if (mode === "start") return restart(c.dir, path, record, id), 0;
|
|
99
|
+
// A gate run by hand or on a release is not a ship; only /ship's start opens one.
|
|
100
|
+
if (mode === "gate" && !existsSync(path)) return 0;
|
|
93
101
|
if (mode === "gate") addGateRun(record, args);
|
|
94
102
|
else if (mode === "finding") addFinding(record, args[0]);
|
|
95
103
|
else if (mode === "step") addStep(record, args);
|