@dboio/cli 0.6.0 → 0.6.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/bin/postinstall.js +24 -24
- package/package.json +1 -1
package/bin/postinstall.js
CHANGED
|
@@ -19,24 +19,24 @@ const PLUGINS = [
|
|
|
19
19
|
];
|
|
20
20
|
|
|
21
21
|
function printStaticMessage() {
|
|
22
|
-
console.
|
|
23
|
-
console.
|
|
24
|
-
console.
|
|
25
|
-
console.
|
|
22
|
+
console.error('');
|
|
23
|
+
console.error(`${BOLD}${CYAN} DBO.io CLI installed successfully.${RESET}`);
|
|
24
|
+
console.error('');
|
|
25
|
+
console.error(` ${DIM}Plugins available:${RESET}`);
|
|
26
26
|
for (const plugin of PLUGINS) {
|
|
27
|
-
console.
|
|
28
|
-
console.
|
|
27
|
+
console.error(` ${YELLOW}${plugin.label}${RESET}`);
|
|
28
|
+
console.error(` ${DIM}${plugin.command}${RESET}`);
|
|
29
29
|
}
|
|
30
|
-
console.
|
|
31
|
-
console.
|
|
32
|
-
console.
|
|
33
|
-
console.
|
|
30
|
+
console.error('');
|
|
31
|
+
console.error(` To install all plugins at once, run:`);
|
|
32
|
+
console.error(` ${BOLD}dbo install plugins${RESET}`);
|
|
33
|
+
console.error('');
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
async function promptInteractive() {
|
|
37
|
-
console.
|
|
38
|
-
console.
|
|
39
|
-
console.
|
|
37
|
+
console.error('');
|
|
38
|
+
console.error(`${BOLD}${CYAN} DBO.io CLI installed successfully.${RESET}`);
|
|
39
|
+
console.error('');
|
|
40
40
|
|
|
41
41
|
const { default: inquirer } = await import('inquirer');
|
|
42
42
|
|
|
@@ -54,29 +54,29 @@ async function promptInteractive() {
|
|
|
54
54
|
]);
|
|
55
55
|
|
|
56
56
|
if (selected.length === 0) {
|
|
57
|
-
console.
|
|
58
|
-
console.
|
|
59
|
-
console.
|
|
60
|
-
console.
|
|
57
|
+
console.error('');
|
|
58
|
+
console.error(` ${DIM}No plugins selected. You can install them later with:${RESET}`);
|
|
59
|
+
console.error(` ${BOLD}dbo install plugins${RESET}`);
|
|
60
|
+
console.error('');
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
const { execSync } = await import('child_process');
|
|
65
65
|
const combined = selected.join(' && ');
|
|
66
66
|
|
|
67
|
-
console.
|
|
68
|
-
console.
|
|
69
|
-
console.
|
|
67
|
+
console.error('');
|
|
68
|
+
console.error(` ${DIM}Running: ${combined}${RESET}`);
|
|
69
|
+
console.error('');
|
|
70
70
|
|
|
71
71
|
try {
|
|
72
72
|
execSync(combined, { stdio: 'inherit' });
|
|
73
73
|
} catch {
|
|
74
|
-
console.
|
|
75
|
-
console.
|
|
74
|
+
console.error('');
|
|
75
|
+
console.error(` ${YELLOW}Plugin installation had an issue. You can retry with:${RESET}`);
|
|
76
76
|
for (const cmd of selected) {
|
|
77
|
-
console.
|
|
77
|
+
console.error(` ${BOLD}${cmd}${RESET}`);
|
|
78
78
|
}
|
|
79
|
-
console.
|
|
79
|
+
console.error('');
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|