@qui-cli/core 4.0.1 → 5.0.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 +28 -9
- package/dist/Core.d.ts +0 -1
- package/dist/Core.js +1 -9
- package/dist/JackSpeak.d.ts +14 -0
- package/dist/JackSpeak.js +6 -0
- package/dist/Positionals.d.ts +1 -1
- package/dist/Positionals.js +9 -4
- package/dist/Usage.d.ts +1 -0
- package/dist/Usage.js +3 -0
- package/package.json +8 -9
package/CHANGELOG.md
CHANGED
|
@@ -2,28 +2,47 @@
|
|
|
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
|
-
## [
|
|
5
|
+
## [5.0.0](https://github.com/battis/qui-cli/compare/core/4.1.0...core/5.0.0) (2025-11-07)
|
|
6
|
+
|
|
7
|
+
### ⚠ BREAKING CHANGES
|
|
8
|
+
|
|
9
|
+
- group arguments by plugin in usage
|
|
10
|
+
- **plugin@4.0.0** auto-document default arg values
|
|
6
11
|
|
|
12
|
+
### revert
|
|
13
|
+
|
|
14
|
+
- group arguments by plugin in usage ([ec3d4bf](https://github.com/battis/qui-cli/commit/ec3d4bf6ef9c59a6da3ede8603554d2dcd2581ad))
|
|
15
|
+
- **plugin@4.0.0** auto-document default arg values ([e01e157](https://github.com/battis/qui-cli/commit/e01e157f06a3a801628ca79366e3f0060be2322e))
|
|
7
16
|
|
|
8
17
|
### Bug Fixes
|
|
9
18
|
|
|
10
|
-
|
|
19
|
+
- merge plugin option in Plugin.Registrar, not in Core ([9a7464f](https://github.com/battis/qui-cli/commit/9a7464fab863c7a9005ade54703726cc9679c8c4))
|
|
11
20
|
|
|
12
|
-
## [4.
|
|
21
|
+
## [4.1.0](https://github.com/battis/qui-cli/compare/core/4.0.1...core/4.1.0) (2025-11-04)
|
|
13
22
|
|
|
23
|
+
### Features
|
|
14
24
|
|
|
15
|
-
|
|
25
|
+
- support scripting markdown documentation for commands ([03ee6d5](https://github.com/battis/qui-cli/commit/03ee6d55f86f6d7b45bd205896cb0fb6a21523b5))
|
|
16
26
|
|
|
17
|
-
|
|
27
|
+
## [4.0.1](https://github.com/battis/qui-cli/compare/core/4.0.0...core/4.0.1) (2025-08-04)
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
- update lagging peer dependency specs ([30c0c27](https://github.com/battis/qui-cli/commit/30c0c279d4247a69a30efef8a7426442752cd9c0))
|
|
32
|
+
|
|
33
|
+
## [4.0.0](https://github.com/battis/qui-cli/compare/core/3.1.0...core/4.0.0) (2025-08-02)
|
|
34
|
+
|
|
35
|
+
### ⚠ BREAKING CHANGES
|
|
18
36
|
|
|
19
|
-
|
|
37
|
+
- rename @battis/qui-cli.core --> @qui-cli/core
|
|
20
38
|
|
|
39
|
+
- rename @battis/qui-cli.core --> @qui-cli/core ([43367e9](https://github.com/battis/qui-cli/commit/43367e9d4316aa22fb28078e9436e6de35564f1f))
|
|
21
40
|
|
|
22
41
|
### Bug Fixes
|
|
23
42
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
43
|
+
- update dependencies to renamed @qui-cli/colors ([ff80e86](https://github.com/battis/qui-cli/commit/ff80e8625ef98834afdf04e57bfedb1906834e2b))
|
|
44
|
+
- update dependencies to renamed @qui-cli/log ([1c8f0fb](https://github.com/battis/qui-cli/commit/1c8f0fbd5561b4274032382c5d10d33912956e7f))
|
|
45
|
+
- update dependencies to renamed @qui-cli/plugin ([117ea85](https://github.com/battis/qui-cli/commit/117ea85256ec69c807c5b56293546d9c350fd43f))
|
|
27
46
|
|
|
28
47
|
## [3.1.0](https://github.com/battis/qui-cli/compare/core/3.0.0...core/3.1.0) (2025-08-01)
|
|
29
48
|
|
package/dist/Core.d.ts
CHANGED
|
@@ -10,6 +10,5 @@ export type Configuration = Plugin.Registrar.Configuration & {
|
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
12
|
export declare function configure(config?: Configuration): Promise<void>;
|
|
13
|
-
export declare function options(externalOptions?: Plugin.Options): Promise<Plugin.Options>;
|
|
14
13
|
export declare function init(externalOptions?: Plugin.Options): Promise<Plugin.Arguments<Plugin.Options>>;
|
|
15
14
|
export declare function run(externalOptions?: Plugin.Options): Promise<Plugin.AccumulatedResults | undefined>;
|
package/dist/Core.js
CHANGED
|
@@ -18,14 +18,6 @@ export async function configure(config = {}) {
|
|
|
18
18
|
}
|
|
19
19
|
await Plugin.Registrar.configure({ positionals, jackspeak });
|
|
20
20
|
}
|
|
21
|
-
export async function options(externalOptions = {}) {
|
|
22
|
-
/*
|
|
23
|
-
* TODO automate default value documentation
|
|
24
|
-
Issue URL: https://github.com/battis/qui-cli/issues/38
|
|
25
|
-
* Including parsing `env` (#34) and `secret` (#33) fields
|
|
26
|
-
*/
|
|
27
|
-
return Plugin.mergeOptions(await Plugin.Registrar.options(), externalOptions);
|
|
28
|
-
}
|
|
29
21
|
export async function init(externalOptions) {
|
|
30
22
|
if (initialized) {
|
|
31
23
|
throw new Error(`Already initialized with user-provided command line arguments.`);
|
|
@@ -36,7 +28,7 @@ export async function init(externalOptions) {
|
|
|
36
28
|
}
|
|
37
29
|
}
|
|
38
30
|
if (externalOptions) {
|
|
39
|
-
JackSpeak.args(externalOptions);
|
|
31
|
+
JackSpeak.args(Plugin.documentDefaults(externalOptions));
|
|
40
32
|
}
|
|
41
33
|
const args = JackSpeak.parse();
|
|
42
34
|
await Plugin.Registrar.init(args);
|
package/dist/JackSpeak.d.ts
CHANGED
|
@@ -6,4 +6,18 @@ export declare function jack(): Jack<{}>;
|
|
|
6
6
|
export declare function configure(config?: Configuration): void;
|
|
7
7
|
export declare function args(options: Plugin.Options): void;
|
|
8
8
|
export declare function parse(): import("jackspeak").Parsed<{}>;
|
|
9
|
+
export declare function toJSON(): {
|
|
10
|
+
[k: string]: {
|
|
11
|
+
hint?: string | undefined;
|
|
12
|
+
default?: import("jackspeak").ConfigValue | undefined;
|
|
13
|
+
validOptions?: readonly number[] | readonly string[] | undefined;
|
|
14
|
+
validate?: ((v: unknown) => boolean) | ((v: unknown) => v is import("jackspeak").ValidValue<import("jackspeak").ConfigType, boolean>) | undefined;
|
|
15
|
+
description?: string | undefined;
|
|
16
|
+
short?: string | undefined;
|
|
17
|
+
delim?: string | undefined;
|
|
18
|
+
multiple?: boolean | undefined;
|
|
19
|
+
type: import("jackspeak").ConfigType;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
9
22
|
export declare function usage(): string;
|
|
23
|
+
export declare function usageMarkdown(): string;
|
package/dist/JackSpeak.js
CHANGED
|
@@ -39,6 +39,12 @@ export function args(options) {
|
|
|
39
39
|
export function parse() {
|
|
40
40
|
return jack().parse();
|
|
41
41
|
}
|
|
42
|
+
export function toJSON() {
|
|
43
|
+
return jack().toJSON();
|
|
44
|
+
}
|
|
42
45
|
export function usage() {
|
|
43
46
|
return jack().usage();
|
|
44
47
|
}
|
|
48
|
+
export function usageMarkdown() {
|
|
49
|
+
return jack().usageMarkdown();
|
|
50
|
+
}
|
package/dist/Positionals.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export declare function maximumUnnamedCount(): number | undefined;
|
|
|
38
38
|
export declare function requireNoMoreThanUnnamedArgs(maxUnnamed: number): void;
|
|
39
39
|
export declare function init(args: Plugin.ExpectedArguments<() => Plugin.Options>): void;
|
|
40
40
|
export declare function usageArgs(): string;
|
|
41
|
-
export declare function usage(usage: string): string;
|
|
41
|
+
export declare function usage(usage: string, isMarkdown?: boolean): string;
|
|
42
42
|
export declare function run(): void;
|
|
43
43
|
export declare function get(positionalArgName: string): string | undefined;
|
|
44
44
|
export declare function namedArgs(): Record<string, string | undefined>;
|
package/dist/Positionals.js
CHANGED
|
@@ -155,10 +155,15 @@ function wrap(text, indent) {
|
|
|
155
155
|
})
|
|
156
156
|
.join('\n');
|
|
157
157
|
}
|
|
158
|
-
export function usage(usage) {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
158
|
+
export function usage(usage, isMarkdown = false) {
|
|
159
|
+
let pre = usage.slice(0, usage.indexOf('\n') + 1);
|
|
160
|
+
let cmd = usage.slice(pre.length, usage.indexOf('\n\n'));
|
|
161
|
+
let post = usage.slice(pre.length + cmd.length);
|
|
162
|
+
if (isMarkdown) {
|
|
163
|
+
pre = usage.slice(0, usage.indexOf('```\n') + 4);
|
|
164
|
+
cmd = usage.slice(pre.length, usage.indexOf('\n```', pre.length));
|
|
165
|
+
post = usage.slice(pre.length + cmd.length);
|
|
166
|
+
}
|
|
162
167
|
return `${pre}${wrap(`${cmd
|
|
163
168
|
.split('\n')
|
|
164
169
|
.map((token) => token.trim())
|
package/dist/Usage.d.ts
CHANGED
package/dist/Usage.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qui-cli/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Core features of @qui-cli/qui-cli",
|
|
5
5
|
"homepage": "https://github.com/battis/qui-cli/tree/main/packages/core#readme",
|
|
6
6
|
"repository": {
|
|
@@ -18,21 +18,20 @@
|
|
|
18
18
|
"types": "./dist/index.d.ts",
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"jackspeak": "^4.1.1",
|
|
21
|
-
"wrap-ansi": "^9.0.
|
|
21
|
+
"wrap-ansi": "^9.0.2",
|
|
22
|
+
"@qui-cli/colors": "3.1.0"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
|
24
25
|
"@tsconfig/node20": "^20.1.6",
|
|
25
|
-
"@types/node": "^24.
|
|
26
|
-
"commit-and-tag-version": "^12.
|
|
26
|
+
"@types/node": "^24.10.0",
|
|
27
|
+
"commit-and-tag-version": "^12.6.0",
|
|
27
28
|
"del-cli": "^6.0.0",
|
|
28
29
|
"npm-run-all": "^4.1.5",
|
|
29
|
-
"typescript": "^5.9.
|
|
30
|
-
"@qui-cli/
|
|
31
|
-
"@qui-cli/plugin": "3.0.0"
|
|
30
|
+
"typescript": "^5.9.3",
|
|
31
|
+
"@qui-cli/plugin": "4.0.0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@qui-cli/
|
|
35
|
-
"@qui-cli/plugin": "3.x"
|
|
34
|
+
"@qui-cli/plugin": "4.x"
|
|
36
35
|
},
|
|
37
36
|
"target": "node",
|
|
38
37
|
"scripts": {
|