@stacksjs/cli 0.44.10 → 0.44.12
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.d.ts +3 -2
- package/dist/actions/run.mjs +2 -2
- package/dist/helpers.d.ts +1 -1
- package/package.json +7 -7
package/dist/actions/run.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CliOptions, CommandResult, Result } from '@stacksjs/types';
|
|
2
|
+
import { ResultAsync } from '@stacksjs/error-handling';
|
|
2
3
|
/**
|
|
3
4
|
* Execute a command.
|
|
4
5
|
*
|
|
@@ -7,7 +8,7 @@ import type { CliOptions, CommandResult, Result } from '@stacksjs/types';
|
|
|
7
8
|
* @param errorMsg The name of the error to throw if the command fails.
|
|
8
9
|
* @returns The result of the command.
|
|
9
10
|
*/
|
|
10
|
-
export declare function exec(command: string, options?: CliOptions):
|
|
11
|
+
export declare function exec(command: string, options?: CliOptions): ResultAsync<CommandResult<string>, Error>;
|
|
11
12
|
/**
|
|
12
13
|
* Run a command the Stacks way.
|
|
13
14
|
*
|
|
@@ -15,7 +16,7 @@ export declare function exec(command: string, options?: CliOptions): any;
|
|
|
15
16
|
* @param options The options to pass to the command.
|
|
16
17
|
* @returns The result of the command.
|
|
17
18
|
*/
|
|
18
|
-
export declare function runCommand(command: string, options?: CliOptions): Promise<
|
|
19
|
+
export declare function runCommand(command: string, options?: CliOptions): Promise<Result<CommandResult<string>, Error>>;
|
|
19
20
|
/**
|
|
20
21
|
* Run many commands—the Stacks way.
|
|
21
22
|
*
|
package/dist/actions/run.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { determineDebugMode } from "@stacksjs/config";
|
|
2
2
|
import { ResultAsync } from "@stacksjs/error-handling";
|
|
3
3
|
import { projectPath } from "@stacksjs/path";
|
|
4
|
-
import { italic } from "
|
|
4
|
+
import { italic } from "@stacksjs/cli";
|
|
5
5
|
import { spawn } from "../command.mjs";
|
|
6
6
|
import { startAnimation } from "../helpers.mjs";
|
|
7
7
|
export function exec(command, options) {
|
|
@@ -9,7 +9,7 @@ export function exec(command, options) {
|
|
|
9
9
|
const stdio = determineDebugMode(options) ? "inherit" : "ignore";
|
|
10
10
|
return ResultAsync.fromPromise(
|
|
11
11
|
spawn(command, { stdio, cwd }),
|
|
12
|
-
() => new Error(`Failed to
|
|
12
|
+
() => new Error(`Failed to run command: ${italic(command)}`)
|
|
13
13
|
);
|
|
14
14
|
}
|
|
15
15
|
export async function runCommand(command, options) {
|
package/dist/helpers.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export declare function intro(command: string, options?: IntroOptions): number |
|
|
|
6
6
|
/**
|
|
7
7
|
* Prints the outro message.
|
|
8
8
|
*/
|
|
9
|
-
export declare function outro(text: string, options: OutroOptions, error?: Error): void;
|
|
9
|
+
export declare function outro(text: string, options: OutroOptions, error?: Error | string): void;
|
|
10
10
|
export declare function startAnimation(): import("ora").Ora;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.44.
|
|
4
|
+
"version": "0.44.12",
|
|
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.44.
|
|
53
|
-
"@stacksjs/error-handling": "0.44.
|
|
54
|
-
"@stacksjs/logging": "0.44.
|
|
55
|
-
"@stacksjs/path": "0.44.
|
|
56
|
-
"@stacksjs/types": "0.44.
|
|
52
|
+
"@stacksjs/config": "0.44.12",
|
|
53
|
+
"@stacksjs/error-handling": "0.44.12",
|
|
54
|
+
"@stacksjs/logging": "0.44.12",
|
|
55
|
+
"@stacksjs/path": "0.44.12",
|
|
56
|
+
"@stacksjs/types": "0.44.12"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"esno": "^0.16.3",
|
|
60
60
|
"mkdist": "^1.0.0",
|
|
61
|
-
"@stacksjs/testing": "0.44.
|
|
61
|
+
"@stacksjs/testing": "0.44.12"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "mkdist -d",
|