@qui-cli/core 5.0.0 → 5.0.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/CHANGELOG.md +7 -0
- package/README.md +17 -7
- package/dist/Core.d.ts +2 -2
- package/dist/Help.d.ts +1 -0
- package/dist/Positionals.d.ts +5 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
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.0.1](https://github.com/battis/qui-cli/compare/core/5.0.0...core/5.0.1) (2025-12-19)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* update documentation to reflect current core plugin model ([dbb3f26](https://github.com/battis/qui-cli/commit/dbb3f269d3dc3996c1d7050eb3a1acfdd08ab640))
|
|
11
|
+
|
|
5
12
|
## [5.0.0](https://github.com/battis/qui-cli/compare/core/4.1.0...core/5.0.0) (2025-11-07)
|
|
6
13
|
|
|
7
14
|
### ⚠ BREAKING CHANGES
|
package/README.md
CHANGED
|
@@ -44,19 +44,29 @@ See [examples](https://github.com/battis/qui-cli/tree/main/examples#readme) for
|
|
|
44
44
|
|
|
45
45
|
Three core plugins are registered automatically to provide consistent functionality.
|
|
46
46
|
|
|
47
|
-
### `
|
|
47
|
+
### `JackSpeak`
|
|
48
48
|
|
|
49
|
-
Manages any custom [jackspeak](https://www.npmjs.com/package/jackspeak#user-content-jackoptions-jackoptions----jack) options. As with any other plugin, it can be configured via `
|
|
49
|
+
Manages any custom [jackspeak](https://www.npmjs.com/package/jackspeak#user-content-jackoptions-jackoptions----jack) options. As with any other plugin, it can be configured via `configure()`:
|
|
50
50
|
|
|
51
51
|
```ts
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
import { Core, JackSpeak } from '@qui-cli/core';
|
|
53
|
+
|
|
54
|
+
await JackSpeak.configure({
|
|
55
|
+
envPrefix: 'MY_APP'
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
await Core.init({
|
|
59
|
+
foo: {
|
|
60
|
+
description: 'bar'
|
|
55
61
|
}
|
|
56
62
|
});
|
|
63
|
+
|
|
64
|
+
await Core.run();
|
|
65
|
+
|
|
66
|
+
console.log(process.env.MY_APP_FOO);
|
|
57
67
|
```
|
|
58
68
|
|
|
59
|
-
### `
|
|
69
|
+
### `Positionals`
|
|
60
70
|
|
|
61
71
|
Provides per-plugin positonal argument management and documentation. Individual plugins can require named positional arguments, which are collected and documented by `usage()` and accessible throgh the `Positionals` plugin.
|
|
62
72
|
|
|
@@ -97,7 +107,7 @@ Positionals.setMinArg(6);
|
|
|
97
107
|
Positionals.setMaxArg(4);
|
|
98
108
|
```
|
|
99
109
|
|
|
100
|
-
### `
|
|
110
|
+
### `Help`
|
|
101
111
|
|
|
102
112
|
Provides consistent `--help` (`-h`) flag for all commands that displays usage. No confiuration.
|
|
103
113
|
|
package/dist/Core.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ import * as JackSpeak from './JackSpeak.js';
|
|
|
3
3
|
export { Options } from '@qui-cli/plugin';
|
|
4
4
|
export * from './Usage.js';
|
|
5
5
|
export type Configuration = Plugin.Registrar.Configuration & {
|
|
6
|
-
/** @deprecated Use
|
|
6
|
+
/** @deprecated Use {@link JackSpeak} core plugin */
|
|
7
7
|
core?: JackSpeak.Configuration & {
|
|
8
|
-
/** @deprecated Use
|
|
8
|
+
/** @deprecated Use {@link Positionals} core plugin */
|
|
9
9
|
requirePositionals?: boolean | number;
|
|
10
10
|
};
|
|
11
11
|
};
|
package/dist/Help.d.ts
CHANGED
package/dist/Positionals.d.ts
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import * as Plugin from '@qui-cli/plugin';
|
|
2
2
|
type PositionalConfig = {
|
|
3
|
+
/** Description of the purpose of the positional argument */
|
|
3
4
|
description?: string;
|
|
5
|
+
/** Hint about the value of the positional argument */
|
|
4
6
|
hint?: string;
|
|
7
|
+
/** Must return true for the argument to be accepted */
|
|
5
8
|
validate?: (v?: string) => boolean | string;
|
|
6
9
|
};
|
|
7
10
|
type PositionalConfigSet = Record<string, PositionalConfig>;
|
|
8
11
|
export type Configuration = Plugin.Configuration & {
|
|
12
|
+
/** Minimum number of accepted positional arguments */
|
|
9
13
|
min?: number;
|
|
14
|
+
/** Maximum number of accepted positional arguments */
|
|
10
15
|
max?: number;
|
|
11
16
|
};
|
|
12
17
|
export declare const name = "positionals";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qui-cli/core",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
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": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"jackspeak": "^4.1.1",
|
|
21
21
|
"wrap-ansi": "^9.0.2",
|
|
22
|
-
"@qui-cli/colors": "3.1.
|
|
22
|
+
"@qui-cli/colors": "3.1.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@tsconfig/node20": "^20.1.6",
|