bluekiwi 0.3.21 → 0.3.22
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/index.js +27 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -63,7 +63,33 @@ program
|
|
|
63
63
|
.option("-p, --profile <name>", "Profile to install into runtimes and set active")
|
|
64
64
|
.action((name, opts) => runtimesCommand.add(name, opts.profile));
|
|
65
65
|
program.command("runtimes:remove <name>").action(runtimesCommand.remove);
|
|
66
|
-
program
|
|
66
|
+
program
|
|
67
|
+
.command("profile [action] [name]")
|
|
68
|
+
.description("List, switch, or remove BlueKiwi profiles")
|
|
69
|
+
.action(async (action, name) => {
|
|
70
|
+
if (!action || action === "list") {
|
|
71
|
+
await profileCommand.list();
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (action === "use") {
|
|
75
|
+
if (!name) {
|
|
76
|
+
console.error("Usage: bluekiwi profile use <name>");
|
|
77
|
+
process.exit(1);
|
|
78
|
+
}
|
|
79
|
+
await profileCommand.use(name);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
if (action === "remove") {
|
|
83
|
+
if (!name) {
|
|
84
|
+
console.error("Usage: bluekiwi profile remove <name>");
|
|
85
|
+
process.exit(1);
|
|
86
|
+
}
|
|
87
|
+
await profileCommand.remove(name);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
console.error(`Unknown profile action '${action}'`);
|
|
91
|
+
process.exit(1);
|
|
92
|
+
});
|
|
67
93
|
program.command("profile:list").action(profileCommand.list);
|
|
68
94
|
program.command("profile:use <name>").action(profileCommand.use);
|
|
69
95
|
program.command("profile:remove <name>").action(profileCommand.remove);
|