@pigcloud/skills 1.0.9 → 1.0.10
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/cli.js +15 -9
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -69,15 +69,21 @@ const TOOL_CONFIGS = {
|
|
|
69
69
|
windsurf: { dir: '.', rootFile: '.windsurfrules', markers: ['.windsurfrules'] }
|
|
70
70
|
};
|
|
71
71
|
|
|
72
|
-
function colorize(code, text) {
|
|
73
|
-
const value = String(text);
|
|
74
|
-
if (!process.stdout.isTTY) return value;
|
|
75
|
-
return `${code}${value}${COLORS.reset}`;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function
|
|
79
|
-
|
|
80
|
-
}
|
|
72
|
+
function colorize(code, text) {
|
|
73
|
+
const value = String(text);
|
|
74
|
+
if (!process.stdout.isTTY) return value;
|
|
75
|
+
return `${code}${value}${COLORS.reset}`;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function commandAvailable(command) {
|
|
79
|
+
const { spawnSync } = require('child_process');
|
|
80
|
+
const result = spawnSync(command, ['--version'], { stdio: 'ignore' });
|
|
81
|
+
return !result.error && result.status === 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function normalizeSkillName(skill) {
|
|
85
|
+
return String(skill || '').trim();
|
|
86
|
+
}
|
|
81
87
|
|
|
82
88
|
function normalizeToolName(tool) {
|
|
83
89
|
if (!tool) return null;
|