bluekiwi 0.1.1 → 0.1.2
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/commands/accept.js +21 -15
- package/package.json +1 -1
package/dist/commands/accept.js
CHANGED
|
@@ -34,22 +34,28 @@ export async function acceptCommand(token, opts) {
|
|
|
34
34
|
console.log(pc.green(`✓ Account created: ${result.user.username}`));
|
|
35
35
|
const client = new BlueKiwiClient(opts.server, result.api_key);
|
|
36
36
|
await client.request("GET", "/api/workflows");
|
|
37
|
-
|
|
37
|
+
// Skip runtime installation in non-interactive (CI/script) mode
|
|
38
|
+
const isInteractive = process.stdin.isTTY;
|
|
39
|
+
let chosen = [];
|
|
40
|
+
if (isInteractive) {
|
|
41
|
+
const detected = detectInstalledAdapters();
|
|
42
|
+
const all = getAllAdapters();
|
|
43
|
+
const choices = all.map((adapter) => ({
|
|
44
|
+
title: adapter.displayName,
|
|
45
|
+
value: adapter.name,
|
|
46
|
+
selected: detected.some((detectedAdapter) => detectedAdapter.name === adapter.name),
|
|
47
|
+
disabled: !adapter.isInstalled(),
|
|
48
|
+
}));
|
|
49
|
+
const { selected } = (await prompts({
|
|
50
|
+
type: "multiselect",
|
|
51
|
+
name: "selected",
|
|
52
|
+
message: "Install BlueKiwi into which runtimes?",
|
|
53
|
+
choices,
|
|
54
|
+
hint: "- Space to toggle. Return to submit",
|
|
55
|
+
}));
|
|
56
|
+
chosen = selected ?? [];
|
|
57
|
+
}
|
|
38
58
|
const all = getAllAdapters();
|
|
39
|
-
const choices = all.map((adapter) => ({
|
|
40
|
-
title: adapter.displayName,
|
|
41
|
-
value: adapter.name,
|
|
42
|
-
selected: detected.some((detectedAdapter) => detectedAdapter.name === adapter.name),
|
|
43
|
-
disabled: !adapter.isInstalled(),
|
|
44
|
-
}));
|
|
45
|
-
const { selected } = (await prompts({
|
|
46
|
-
type: "multiselect",
|
|
47
|
-
name: "selected",
|
|
48
|
-
message: "Install BlueKiwi into which runtimes?",
|
|
49
|
-
choices,
|
|
50
|
-
hint: "- Space to toggle. Return to submit",
|
|
51
|
-
}));
|
|
52
|
-
const chosen = selected ?? [];
|
|
53
59
|
for (const name of chosen) {
|
|
54
60
|
const adapter = all.find((item) => item.name === name);
|
|
55
61
|
if (!adapter)
|