create-claude-code-visualizer 0.1.3 → 0.1.5
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 +11 -21
- 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()) {
|
|
@@ -150,9 +151,7 @@ async function main() {
|
|
|
150
151
|
|
|
151
152
|
// Copy personal-assistant-app (the Next.js UI)
|
|
152
153
|
const appTemplate = path.join(TEMPLATES_DIR, "app");
|
|
153
|
-
|
|
154
|
-
warn("personal-assistant-app/ already exists — updating...");
|
|
155
|
-
}
|
|
154
|
+
fs.mkdirSync(appDir, { recursive: true });
|
|
156
155
|
copyDir(appTemplate, appDir);
|
|
157
156
|
log("personal-assistant-app/ installed");
|
|
158
157
|
|
|
@@ -177,11 +176,12 @@ async function main() {
|
|
|
177
176
|
);
|
|
178
177
|
log(`Commands: added ${addedCommands} new`);
|
|
179
178
|
|
|
180
|
-
// Skills (skip gws-*
|
|
179
|
+
// Skills (skip gws-* and recipe-* — those are installed via gws generate-skills)
|
|
180
|
+
const GWS_PREFIXES = ["gws-", "recipe-"];
|
|
181
181
|
const addedSkills = copyDirAdditive(
|
|
182
182
|
path.join(srcClaude, "skills"),
|
|
183
183
|
path.join(dstClaude, "skills"),
|
|
184
|
-
|
|
184
|
+
GWS_PREFIXES
|
|
185
185
|
);
|
|
186
186
|
log(`Skills: added ${addedSkills} new`);
|
|
187
187
|
|
|
@@ -315,21 +315,11 @@ PROJECT_ROOT=${projectRoot}
|
|
|
315
315
|
info("Skipping auth. Run later: cd " + projectDir + " && npx gws auth login");
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
-
//
|
|
318
|
+
// Generate GWS skills (the CLI handles skill selection)
|
|
319
319
|
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`);
|
|
320
|
+
info("Generating Google Workspace skills...");
|
|
321
|
+
run("npx gws generate-skills", { cwd: projectRoot });
|
|
322
|
+
log("GWS skills installed");
|
|
333
323
|
|
|
334
324
|
// Add gws permission to settings
|
|
335
325
|
const settingsPath = path.join(dstClaude, "settings.local.json");
|