@qui-cli/shell 3.0.2 → 3.1.0
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/CHANGELOG.md +14 -0
- package/dist/Shell.d.ts +14 -0
- package/dist/Shell.js +12 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [3.1.0](https://github.com/battis/qui-cli/compare/shell/3.0.3...shell/3.1.0) (2025-12-26)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* disable/enable logging of commands ([d8b6f14](https://github.com/battis/qui-cli/commit/d8b6f14a7ba2452735940a26364426226dca05a5))
|
|
11
|
+
|
|
12
|
+
## [3.0.3](https://github.com/battis/qui-cli/compare/shell/3.0.2...shell/3.0.3) (2025-11-08)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* remove all ambiguity from peer dependencies ([ced3fac](https://github.com/battis/qui-cli/commit/ced3faced1bc340457ca43e3be11afa3933b6d72))
|
|
18
|
+
|
|
5
19
|
## [3.0.2](https://github.com/battis/qui-cli/compare/shell/3.0.1...shell/3.0.2) (2025-11-08)
|
|
6
20
|
|
|
7
21
|
|
package/dist/Shell.d.ts
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
import * as Plugin from '@qui-cli/plugin';
|
|
2
2
|
import shell from 'shelljs';
|
|
3
3
|
export type Configuration = Plugin.Configuration & {
|
|
4
|
+
/**
|
|
5
|
+
* Whether or not to display the commands (rather than just their output) in
|
|
6
|
+
* the console, defaults to `false`.
|
|
7
|
+
*/
|
|
4
8
|
showCommands?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Whether or not to show command output (and, potentially, commands
|
|
11
|
+
* themselves) in the console, defaults to `true`.
|
|
12
|
+
*/
|
|
5
13
|
silent?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Whether or not to log commands and output at level `debug`, defaults to
|
|
16
|
+
* `true`
|
|
17
|
+
*/
|
|
18
|
+
logging?: boolean;
|
|
6
19
|
};
|
|
7
20
|
export declare const name = "shell";
|
|
8
21
|
export declare function configure(config?: Configuration): void;
|
|
@@ -16,6 +29,7 @@ export declare function setShowCommands(commandsAreShownInConsole: boolean): boo
|
|
|
16
29
|
export declare function setSilent(commandsAreExecutedSilentlyInConsole: boolean): boolean;
|
|
17
30
|
export declare function isSilent(): boolean;
|
|
18
31
|
export declare function commandsShown(): boolean;
|
|
32
|
+
export declare function isLogging(): boolean;
|
|
19
33
|
export declare function getPreviousResult(): shell.ShellString | undefined;
|
|
20
34
|
/** @deprecated Use shelljs */
|
|
21
35
|
export declare const cd: typeof shell.cd;
|
package/dist/Shell.js
CHANGED
|
@@ -7,9 +7,11 @@ export const name = 'shell';
|
|
|
7
7
|
let showCommands = true;
|
|
8
8
|
let silent = false;
|
|
9
9
|
let result = undefined;
|
|
10
|
+
let logging = true;
|
|
10
11
|
export function configure(config = {}) {
|
|
11
12
|
showCommands = Plugin.hydrate(config.showCommands, showCommands);
|
|
12
13
|
silent = Plugin.hydrate(config.silent, silent);
|
|
14
|
+
logging = Plugin.hydrate(config.logging, logging);
|
|
13
15
|
}
|
|
14
16
|
export function options() {
|
|
15
17
|
return {
|
|
@@ -21,6 +23,10 @@ export function options() {
|
|
|
21
23
|
silent: {
|
|
22
24
|
description: `Hide command output`,
|
|
23
25
|
default: silent
|
|
26
|
+
},
|
|
27
|
+
logging: {
|
|
28
|
+
description: `Log commands and output at level ${Colors.value('debug')}`,
|
|
29
|
+
default: logging
|
|
24
30
|
}
|
|
25
31
|
}
|
|
26
32
|
};
|
|
@@ -49,7 +55,9 @@ export function exec(command) {
|
|
|
49
55
|
entry.stdout = result.stdout;
|
|
50
56
|
if (result.stderr.length)
|
|
51
57
|
entry.stderr = result.stderr;
|
|
52
|
-
|
|
58
|
+
if (logging) {
|
|
59
|
+
Log.debug(entry);
|
|
60
|
+
}
|
|
53
61
|
if (spinner) {
|
|
54
62
|
spinner.succeed(Colors.command(keywords(command)));
|
|
55
63
|
}
|
|
@@ -69,6 +77,9 @@ export function isSilent() {
|
|
|
69
77
|
export function commandsShown() {
|
|
70
78
|
return showCommands;
|
|
71
79
|
}
|
|
80
|
+
export function isLogging() {
|
|
81
|
+
return logging;
|
|
82
|
+
}
|
|
72
83
|
export function getPreviousResult() {
|
|
73
84
|
return result;
|
|
74
85
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qui-cli/shell",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "@qui-cli Plugin: Standardized shelljs wrapper",
|
|
5
5
|
"homepage": "https://github.com/battis/qui-cli/tree/main/packages/shell#readme",
|
|
6
6
|
"repository": {
|
|
@@ -19,22 +19,22 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"ora": "^8.2.0",
|
|
21
21
|
"shelljs": "^0.10.0",
|
|
22
|
-
"@qui-cli/colors": "3.
|
|
22
|
+
"@qui-cli/colors": "3.2.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@tsconfig/node20": "^20.1.
|
|
26
|
-
"@types/node": "^24.10.
|
|
25
|
+
"@tsconfig/node20": "^20.1.8",
|
|
26
|
+
"@types/node": "^24.10.4",
|
|
27
27
|
"@types/shelljs": "^0.8.17",
|
|
28
|
-
"commit-and-tag-version": "^12.6.
|
|
28
|
+
"commit-and-tag-version": "^12.6.1",
|
|
29
29
|
"del-cli": "^6.0.0",
|
|
30
30
|
"npm-run-all": "^4.1.5",
|
|
31
31
|
"typescript": "^5.9.3",
|
|
32
|
-
"@qui-cli/log": "4.0.
|
|
32
|
+
"@qui-cli/log": "4.0.1",
|
|
33
33
|
"@qui-cli/plugin": "4.0.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@qui-cli/log": "
|
|
37
|
-
"@qui-cli/plugin": "
|
|
36
|
+
"@qui-cli/log": "4.x",
|
|
37
|
+
"@qui-cli/plugin": "4.x"
|
|
38
38
|
},
|
|
39
39
|
"target": "node",
|
|
40
40
|
"scripts": {
|