@stacksjs/cli 0.45.0 → 0.45.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/actions/run.mjs +2 -2
- package/dist/helpers.d.ts +1 -1
- package/dist/helpers.mjs +4 -2
- package/package.json +7 -7
package/dist/actions/run.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { ResultAsync, err } from "@stacksjs/error-handling";
|
|
|
3
3
|
import { projectPath } from "@stacksjs/path";
|
|
4
4
|
import { italic } from "@stacksjs/cli";
|
|
5
5
|
import { spawn } from "../command.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { startSpinner } from "../helpers.mjs";
|
|
7
7
|
export function exec(command, options) {
|
|
8
8
|
const cwd = options?.cwd || projectPath();
|
|
9
9
|
const stdio = determineDebugMode(options) ? "inherit" : "ignore";
|
|
@@ -41,6 +41,6 @@ export async function runCommands(commands, options) {
|
|
|
41
41
|
}
|
|
42
42
|
function determineSpinner(options) {
|
|
43
43
|
if (!determineDebugMode(options))
|
|
44
|
-
return
|
|
44
|
+
return startSpinner(options?.spinnerText);
|
|
45
45
|
return void 0;
|
|
46
46
|
}
|
package/dist/helpers.d.ts
CHANGED
|
@@ -7,4 +7,4 @@ export declare function intro(command: string, options?: IntroOptions): number |
|
|
|
7
7
|
* Prints the outro message.
|
|
8
8
|
*/
|
|
9
9
|
export declare function outro(text: string, options: OutroOptions, error?: Error | string): void;
|
|
10
|
-
export declare function
|
|
10
|
+
export declare function startSpinner(text?: string): import("ora").Ora;
|
package/dist/helpers.mjs
CHANGED
|
@@ -30,9 +30,11 @@ export function outro(text, options, error) {
|
|
|
30
30
|
log.success(green(`Done in ${time}${options.useSeconds ? "s" : "ms"}`));
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
export function
|
|
33
|
+
export function startSpinner(text) {
|
|
34
|
+
if (!text)
|
|
35
|
+
text = "Executing...";
|
|
34
36
|
const spin = spinner({
|
|
35
|
-
text
|
|
37
|
+
text
|
|
36
38
|
}).start();
|
|
37
39
|
setTimeout(() => {
|
|
38
40
|
spin.text = italic("This may take a little while...");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.45.
|
|
4
|
+
"version": "0.45.1",
|
|
5
5
|
"packageManager": "pnpm@7.18.2",
|
|
6
6
|
"description": "The simple way to create beautiful CLIs.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
@@ -49,16 +49,16 @@
|
|
|
49
49
|
"execa": "^6.1.0",
|
|
50
50
|
"ora": "^6.1.2",
|
|
51
51
|
"prompts": "^2.4.2",
|
|
52
|
-
"@stacksjs/config": "0.45.
|
|
53
|
-
"@stacksjs/error-handling": "0.45.
|
|
54
|
-
"@stacksjs/logging": "0.45.
|
|
55
|
-
"@stacksjs/path": "0.45.
|
|
56
|
-
"@stacksjs/types": "0.45.
|
|
52
|
+
"@stacksjs/config": "0.45.1",
|
|
53
|
+
"@stacksjs/error-handling": "0.45.1",
|
|
54
|
+
"@stacksjs/logging": "0.45.1",
|
|
55
|
+
"@stacksjs/path": "0.45.1",
|
|
56
|
+
"@stacksjs/types": "0.45.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"esno": "^0.16.3",
|
|
60
60
|
"mkdist": "^1.0.0",
|
|
61
|
-
"@stacksjs/testing": "0.45.
|
|
61
|
+
"@stacksjs/testing": "0.45.1"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "mkdist -d",
|