create-claude-code-visualizer 0.1.3 → 0.1.4
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/index.js +10 -18
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -43,11 +43,12 @@ function copyIfNotExists(src, dest) {
|
|
|
43
43
|
return false;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
function copyDirAdditive(src, dest,
|
|
46
|
+
function copyDirAdditive(src, dest, skipPrefixes) {
|
|
47
47
|
fs.mkdirSync(dest, { recursive: true });
|
|
48
|
+
const prefixes = Array.isArray(skipPrefixes) ? skipPrefixes : skipPrefixes ? [skipPrefixes] : [];
|
|
48
49
|
let added = 0;
|
|
49
50
|
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
|
|
50
|
-
if (
|
|
51
|
+
if (prefixes.some((p) => entry.name.startsWith(p))) continue;
|
|
51
52
|
const srcPath = path.join(src, entry.name);
|
|
52
53
|
const destPath = path.join(dest, entry.name);
|
|
53
54
|
if (entry.isDirectory()) {
|
|
@@ -177,11 +178,12 @@ async function main() {
|
|
|
177
178
|
);
|
|
178
179
|
log(`Commands: added ${addedCommands} new`);
|
|
179
180
|
|
|
180
|
-
// Skills (skip gws-*
|
|
181
|
+
// Skills (skip gws-* and recipe-* — those are installed via gws generate-skills)
|
|
182
|
+
const GWS_PREFIXES = ["gws-", "recipe-"];
|
|
181
183
|
const addedSkills = copyDirAdditive(
|
|
182
184
|
path.join(srcClaude, "skills"),
|
|
183
185
|
path.join(dstClaude, "skills"),
|
|
184
|
-
|
|
186
|
+
GWS_PREFIXES
|
|
185
187
|
);
|
|
186
188
|
log(`Skills: added ${addedSkills} new`);
|
|
187
189
|
|
|
@@ -315,21 +317,11 @@ PROJECT_ROOT=${projectRoot}
|
|
|
315
317
|
info("Skipping auth. Run later: cd " + projectDir + " && npx gws auth login");
|
|
316
318
|
}
|
|
317
319
|
|
|
318
|
-
//
|
|
320
|
+
// Generate GWS skills (the CLI handles skill selection)
|
|
319
321
|
console.log("");
|
|
320
|
-
info("
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
let addedGws = 0;
|
|
324
|
-
for (const entry of fs.readdirSync(gwsSkillsSrc, { withFileTypes: true })) {
|
|
325
|
-
if (!entry.name.startsWith("gws-") || !entry.isDirectory()) continue;
|
|
326
|
-
const destPath = path.join(gwsSkillsDst, entry.name);
|
|
327
|
-
if (!fs.existsSync(destPath)) {
|
|
328
|
-
copyDir(path.join(gwsSkillsSrc, entry.name), destPath);
|
|
329
|
-
addedGws++;
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
log(`GWS Skills: added ${addedGws} new`);
|
|
322
|
+
info("Generating Google Workspace skills...");
|
|
323
|
+
run("npx gws generate-skills", { cwd: projectRoot });
|
|
324
|
+
log("GWS skills installed");
|
|
333
325
|
|
|
334
326
|
// Add gws permission to settings
|
|
335
327
|
const settingsPath = path.join(dstClaude, "settings.local.json");
|