servicemap 0.1.5 → 0.1.7
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/bin/servicemap.mjs +15 -8
- package/package.json +1 -1
package/bin/servicemap.mjs
CHANGED
|
@@ -13,9 +13,9 @@ const pageScript = resolve(packageRoot, 'servicemap/scripts/generate-page.mjs');
|
|
|
13
13
|
const desktopScript = resolve(packageRoot, 'servicemap/scripts/generate-desktop-app.mjs');
|
|
14
14
|
|
|
15
15
|
const targetCatalog = [
|
|
16
|
-
{ id: 'codex', label: 'OpenAI (Codex, ChatGPT, GPT models)', kind: 'skill', root: () => resolve(homedir(), '.agents/skills')
|
|
17
|
-
{ id: 'claude', label: 'Anthropic (Claude Code, Claude models)', kind: 'skill', root: () => resolve(homedir(), '.claude/skills')
|
|
18
|
-
{ id: 'grok', label: 'xAI (Grok)', kind: 'skill', root: () => resolve(homedir(), '.grok/skills')
|
|
16
|
+
{ id: 'codex', label: 'OpenAI (Codex, ChatGPT, GPT models)', kind: 'skill', root: () => resolve(homedir(), '.agents/skills') },
|
|
17
|
+
{ id: 'claude', label: 'Anthropic (Claude Code, Claude models)', kind: 'skill', root: () => resolve(homedir(), '.claude/skills') },
|
|
18
|
+
{ id: 'grok', label: 'xAI (Grok)', kind: 'skill', root: () => resolve(homedir(), '.grok/skills') },
|
|
19
19
|
{ id: 'gemini', label: 'Google (Gemini, Vertex AI)', kind: 'guide' },
|
|
20
20
|
{ id: 'cursor', label: 'Cursor', kind: 'guide' },
|
|
21
21
|
{ id: 'windsurf', label: 'Windsurf', kind: 'guide' },
|
|
@@ -211,17 +211,16 @@ function renderSurvey(selected, cursor) {
|
|
|
211
211
|
targetCatalog.forEach((target, index) => {
|
|
212
212
|
const pointer = index === cursor ? '>' : ' ';
|
|
213
213
|
const checked = selected.has(target.id) ? 'x' : ' ';
|
|
214
|
-
|
|
215
|
-
console.log(`${pointer} [${checked}] ${target.label} (${detail})`);
|
|
214
|
+
console.log(`${pointer} [${checked}] ${target.label}`);
|
|
216
215
|
});
|
|
217
216
|
}
|
|
218
217
|
|
|
219
218
|
function runTargetSurvey() {
|
|
220
219
|
if (!process.stdin.isTTY || !process.stdout.isTTY) {
|
|
221
|
-
return Promise.resolve(
|
|
220
|
+
return Promise.resolve([]);
|
|
222
221
|
}
|
|
223
222
|
|
|
224
|
-
const selected = new Set(
|
|
223
|
+
const selected = new Set();
|
|
225
224
|
let cursor = 0;
|
|
226
225
|
|
|
227
226
|
return new Promise((resolvePromise) => {
|
|
@@ -303,11 +302,17 @@ async function installSkill(options) {
|
|
|
303
302
|
? await runTargetSurvey()
|
|
304
303
|
: targetsForOptions(options);
|
|
305
304
|
const roots = skillRootsForTargets(options, selectedTargets);
|
|
305
|
+
const notes = guideTargets(selectedTargets);
|
|
306
306
|
|
|
307
307
|
if (!existsSync(source)) {
|
|
308
308
|
throw new Error(`Bundled skill folder not found: ${source}`);
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
+
if (roots.length === 0 && notes.length === 0) {
|
|
312
|
+
console.log('No targets selected. Nothing was installed.');
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
|
|
311
316
|
if (options.dryRun) {
|
|
312
317
|
for (const root of roots) {
|
|
313
318
|
console.log(`Would install Servicemap skill to ${join(root, 'servicemap')}`);
|
|
@@ -326,7 +331,9 @@ async function installSkill(options) {
|
|
|
326
331
|
|
|
327
332
|
await writeGuidePacks(selectedTargets, options);
|
|
328
333
|
|
|
329
|
-
|
|
334
|
+
if (roots.length > 0) {
|
|
335
|
+
console.log('Restart your AI app if /servicemap does not appear immediately.');
|
|
336
|
+
}
|
|
330
337
|
}
|
|
331
338
|
|
|
332
339
|
async function main() {
|