@qui-cli/core 6.0.0 → 6.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 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
+ ## [6.0.1](https://github.com/battis/qui-cli/compare/core/6.0.0...core/6.0.1) (2026-02-21)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * display plugin usage information in LIFO registration order ([a79c8ed](https://github.com/battis/qui-cli/commit/a79c8ed0e0f8dc0bb45a035909e82af37b7ba350))
11
+
5
12
  ## [6.0.0](https://github.com/battis/qui-cli/compare/core/5.0.3...core/6.0.0) (2026-01-29)
6
13
 
7
14
 
package/dist/Core.d.ts CHANGED
@@ -3,6 +3,15 @@ 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
+ /**
7
+ * Usage information for plugins is diplayed in LIFO (last-in, first-out)
8
+ * order, putting the plug-in that requires other plug-ins at the top and the
9
+ * plug-ins required by other plug-ins at the bottom.
10
+ *
11
+ * To display plugins in FIFO order (as in qui-cli/core@<6.0.1), set
12
+ * `lifoUsage` to false
13
+ */
14
+ lifoUsage?: boolean;
6
15
  /** @deprecated Use {@link JackSpeak} core plugin */
7
16
  core?: JackSpeak.Configuration & {
8
17
  /** @deprecated Use {@link Positionals} core plugin */
package/dist/Core.js CHANGED
@@ -3,7 +3,9 @@ import * as JackSpeak from './JackSpeak.js';
3
3
  import * as Positionals from './Positionals.js';
4
4
  export * from './Usage.js';
5
5
  let initialized = false;
6
+ let lifoUsage = true;
6
7
  export async function configure(config = {}) {
8
+ lifoUsage = Plugin.hydrate(config.lifoUsage, lifoUsage);
7
9
  const { core = {}, jackspeak: jackOptions, positionals = {} } = config;
8
10
  const { requirePositionals, ...deprecated } = core;
9
11
  const jackspeak = {
@@ -20,13 +22,27 @@ export async function init(externalOptions) {
20
22
  if (initialized) {
21
23
  throw new Error(`Already initialized with user-provided command line arguments.`);
22
24
  }
23
- for (const plugin of Plugin.Registrar.registered()) {
24
- if (plugin.options) {
25
- JackSpeak.args(await plugin.options());
25
+ if (lifoUsage) {
26
+ // lifo plugin usage order
27
+ if (externalOptions) {
28
+ JackSpeak.args(Plugin.documentDefaults(externalOptions));
29
+ }
30
+ for (const plugin of Plugin.Registrar.registered().toReversed()) {
31
+ if (plugin.options) {
32
+ JackSpeak.args(await plugin.options());
33
+ }
26
34
  }
27
35
  }
28
- if (externalOptions) {
29
- JackSpeak.args(Plugin.documentDefaults(externalOptions));
36
+ else {
37
+ // fifo plugin usage order
38
+ for (const plugin of Plugin.Registrar.registered()) {
39
+ if (plugin.options) {
40
+ JackSpeak.args(await plugin.options());
41
+ }
42
+ }
43
+ if (externalOptions) {
44
+ JackSpeak.args(Plugin.documentDefaults(externalOptions));
45
+ }
30
46
  }
31
47
  const args = JackSpeak.parse();
32
48
  await Plugin.Registrar.init(args);
package/dist/Help.js CHANGED
@@ -7,6 +7,7 @@ export function configure(config = {}) {
7
7
  }
8
8
  export function options() {
9
9
  return {
10
+ man: [{ level: 1, text: 'Usage information' }],
10
11
  flag: {
11
12
  help: {
12
13
  description: 'Get usage information',
@@ -11,7 +11,7 @@ export declare function toJSON(): {
11
11
  hint?: string | undefined;
12
12
  default?: import("jackspeak").ConfigValue | undefined;
13
13
  validOptions?: readonly number[] | readonly string[] | undefined;
14
- validate?: ((v: unknown) => boolean) | ((v: unknown) => v is import("jackspeak").ValidValue<import("jackspeak").ConfigType, boolean>) | undefined;
14
+ validate?: ((v: unknown) => boolean) | ((v: unknown) => v is import("jackspeak").ConfigValue) | undefined;
15
15
  description?: string | undefined;
16
16
  short?: string | undefined;
17
17
  delim?: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qui-cli/core",
3
- "version": "6.0.0",
3
+ "version": "6.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": {
@@ -17,13 +17,13 @@
17
17
  "main": "./dist/index.js",
18
18
  "types": "./dist/index.d.ts",
19
19
  "dependencies": {
20
- "jackspeak": "^4.1.1",
21
- "wrap-ansi": "^9.0.2",
20
+ "jackspeak": "^4.2.3",
21
+ "wrap-ansi": "^10.0.0",
22
22
  "@qui-cli/colors": "3.2.3"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@tsconfig/node24": "^24.0.4",
26
- "@types/node": "^24.10.9",
26
+ "@types/node": "^24.10.13",
27
27
  "commit-and-tag-version": "^12.6.1",
28
28
  "del-cli": "^7.0.0",
29
29
  "npm-run-all": "^4.1.5",