aiupdate 0.1.0 → 0.1.1
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/cli.js +5 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -14,8 +14,8 @@ var AI_TOOLS = [
|
|
|
14
14
|
];
|
|
15
15
|
var SKILLS_TASK = {
|
|
16
16
|
name: "skills",
|
|
17
|
-
command: "
|
|
18
|
-
args: ["
|
|
17
|
+
command: "skills",
|
|
18
|
+
args: ["update", "-g", "-p", "-y"]
|
|
19
19
|
};
|
|
20
20
|
async function defaultChecker(command) {
|
|
21
21
|
try {
|
|
@@ -49,11 +49,11 @@ async function run(targetArgs, executor = async (cmd, args) => {
|
|
|
49
49
|
await execa(cmd, args);
|
|
50
50
|
}, checker = defaultChecker, versioner = getVersion) {
|
|
51
51
|
const { selectedAITools, includeSkills } = selectTools(targetArgs);
|
|
52
|
+
const toolsToCheck = includeSkills ? [...selectedAITools, SKILLS_TASK] : selectedAITools;
|
|
52
53
|
const checks = await Promise.all(
|
|
53
|
-
|
|
54
|
+
toolsToCheck.map(async (t) => ({ tool: t, installed: await checker(t.command) }))
|
|
54
55
|
);
|
|
55
|
-
const
|
|
56
|
-
const allTools = includeSkills ? [...availableTools, SKILLS_TASK] : availableTools;
|
|
56
|
+
const allTools = checks.filter((c) => c.installed).map((c) => c.tool);
|
|
57
57
|
let hasFailures = false;
|
|
58
58
|
const runner = new Listr(
|
|
59
59
|
allTools.map((tool) => ({
|