@zabuti/tools 0.1.5 → 0.1.6
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/installer/src/skills.js +10 -2
- package/package.json +1 -1
|
@@ -104,6 +104,10 @@ export async function cmdAddSkill(name, dryRun, outDir) {
|
|
|
104
104
|
// Same files already on disk: leave everything alone, so the one kept backup
|
|
105
105
|
// stays a real older version instead of being replaced by an identical copy.
|
|
106
106
|
if (files.every((f) => existsSync(f.full) && sha256(readFileSync(f.full, "utf8")) === sha256(f.content))) {
|
|
107
|
+
// Installs from before manifests existed: record this one so status stops
|
|
108
|
+
// asking for a reinstall that would land here again.
|
|
109
|
+
if (!existsSync(join(root, MANIFEST)))
|
|
110
|
+
writeManifest(root, name, files);
|
|
107
111
|
console.log(`✓ ${name} is already up to date at ${root}`);
|
|
108
112
|
return;
|
|
109
113
|
}
|
|
@@ -118,14 +122,18 @@ export async function cmdAddSkill(name, dryRun, outDir) {
|
|
|
118
122
|
mkdirSync(dirname(f.full), { recursive: true });
|
|
119
123
|
writeFileSync(f.full, f.content);
|
|
120
124
|
}
|
|
121
|
-
|
|
122
|
-
writeFileSync(join(root, ".zabuti-install.json"), JSON.stringify(manifest, null, 2));
|
|
125
|
+
writeManifest(root, name, files);
|
|
123
126
|
console.log(`✓ Installed ${name} (${files.length} files) → ${root}`);
|
|
124
127
|
if (existsSync(previous))
|
|
125
128
|
console.log(` Previous copy kept at ${previous} (undo with \`zabuti-tools rollback ${name}\`)`);
|
|
126
129
|
console.log(" Open Claude Code in your project and ask it to use the skill.");
|
|
127
130
|
}
|
|
128
131
|
const sha256 = (s) => createHash("sha256").update(s, "utf8").digest("hex");
|
|
132
|
+
const MANIFEST = ".zabuti-install.json";
|
|
133
|
+
function writeManifest(root, name, files) {
|
|
134
|
+
const manifest = { name, installedAt: new Date().toISOString(), source: BASE_URL, files: files.map((f) => ({ path: f.rel, sha256: sha256(f.content) })) };
|
|
135
|
+
writeFileSync(join(root, MANIFEST), JSON.stringify(manifest, null, 2));
|
|
136
|
+
}
|
|
129
137
|
const skillRoot = (name) => join(homedir(), ".claude", "skills", name);
|
|
130
138
|
/** Where the replaced copy goes: never inside a skills folder. */
|
|
131
139
|
function previousDir(root, name) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zabuti/tools",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Installs the licensed Zabuti developer tools (Logic Map, Logic Optimizer, Deadlock Map) as Claude Code skills. Needs a license and a download token from zabuti.com.",
|
|
5
5
|
"homepage": "https://zabuti.com",
|
|
6
6
|
"license": "MIT",
|