gunshi 0.14.3 → 0.14.4
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/lib/{cli-BlZyQHmk.js → cli-D4I22PHa.js} +1 -1
- package/lib/definition.d.ts +5 -1
- package/lib/generator.d.ts +1 -1
- package/lib/generator.js +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +1 -1
- package/lib/renderer.d.ts +11 -1
- package/lib/{types.d-Dw5e-IT1.d.ts → types.d-Ce_-U-wp.d.ts} +5 -0
- package/package.json +3 -3
|
@@ -210,7 +210,7 @@ function resolveArgOptions(options) {
|
|
|
210
210
|
}
|
|
211
211
|
function resolveCommandOptions(options, entry) {
|
|
212
212
|
const subCommands = new Map(options.subCommands);
|
|
213
|
-
if (typeof entry === "object" && entry.name) subCommands.set(entry.name, entry);
|
|
213
|
+
if (typeof entry === "object" && entry.name && options.subCommands) subCommands.set(entry.name, entry);
|
|
214
214
|
const resolvedOptions = Object.assign(create(), COMMAND_OPTIONS_DEFAULT, options, { subCommands });
|
|
215
215
|
return resolvedOptions;
|
|
216
216
|
}
|
package/lib/definition.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ArgOptions } from 'args-tokens';
|
|
2
2
|
export { ArgOptionSchema, ArgOptions, ArgValues } from 'args-tokens';
|
|
3
|
-
import { C as Command } from './types.d-
|
|
3
|
+
import { C as Command } from './types.d-Ce_-U-wp.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* The entry for command deifinition.
|
|
@@ -10,6 +10,10 @@ import { C as Command } from './types.d-Dw5e-IT1.js';
|
|
|
10
10
|
* ```
|
|
11
11
|
* @module
|
|
12
12
|
*/
|
|
13
|
+
/**
|
|
14
|
+
* @author kazuya kawaguchi (a.k.a. kazupon)
|
|
15
|
+
* @license MIT
|
|
16
|
+
*/
|
|
13
17
|
|
|
14
18
|
/**
|
|
15
19
|
* Define a {@link Command | command} with type inference
|
package/lib/generator.d.ts
CHANGED
package/lib/generator.js
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ArgOptions } from 'args-tokens';
|
|
2
2
|
export { ArgOptionSchema, ArgOptions, ArgValues, parseArgs, resolveArgs } from 'args-tokens';
|
|
3
|
-
import { C as Command, b as CommandRunner, a as CommandOptions, T as TranslationAdapter, c as TranslationAdapterFactoryOptions } from './types.d-
|
|
4
|
-
export { f as CommandBuiltinKeys, d as CommandBuiltinOptionsKeys, e as CommandBuiltinResourceKeys, i as CommandContext, h as CommandEnvironment, g as CommandOptionKeys, j as CommandResource, k as CommandResourceFetcher, m as Commandable, D as DEFAULT_LOCALE, G as GenerateNamespacedKey, L as LazyCommand, R as RemovedIndex, l as TranslationAdapterFactory } from './types.d-
|
|
3
|
+
import { C as Command, b as CommandRunner, a as CommandOptions, T as TranslationAdapter, c as TranslationAdapterFactoryOptions } from './types.d-Ce_-U-wp.js';
|
|
4
|
+
export { f as CommandBuiltinKeys, d as CommandBuiltinOptionsKeys, e as CommandBuiltinResourceKeys, i as CommandContext, h as CommandEnvironment, g as CommandOptionKeys, j as CommandResource, k as CommandResourceFetcher, m as Commandable, D as DEFAULT_LOCALE, G as GenerateNamespacedKey, L as LazyCommand, R as RemovedIndex, l as TranslationAdapterFactory } from './types.d-Ce_-U-wp.js';
|
|
5
5
|
export { define } from './definition.js';
|
|
6
6
|
|
|
7
7
|
/**
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { define } from "./definition-by5EpPkZ.js";
|
|
2
2
|
import { DEFAULT_LOCALE } from "./renderer-B2JVfepJ.js";
|
|
3
|
-
import { DefaultTranslation, cli } from "./cli-
|
|
3
|
+
import { DefaultTranslation, cli } from "./cli-D4I22PHa.js";
|
|
4
4
|
import { parseArgs, resolveArgs } from "args-tokens";
|
|
5
5
|
|
|
6
6
|
export { DEFAULT_LOCALE, DefaultTranslation, cli, define, parseArgs, resolveArgs };
|
package/lib/renderer.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { ArgOptions } from 'args-tokens';
|
|
2
|
-
import { i as CommandContext } from './types.d-
|
|
2
|
+
import { i as CommandContext } from './types.d-Ce_-U-wp.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @author kazuya kawaguchi (a.k.a. kazupon)
|
|
6
|
+
* @license MIT
|
|
7
|
+
*/
|
|
3
8
|
|
|
4
9
|
/**
|
|
5
10
|
* Render the header.
|
|
@@ -15,6 +20,11 @@ declare function renderHeader<Options extends ArgOptions = ArgOptions>(ctx: Read
|
|
|
15
20
|
*/
|
|
16
21
|
declare function renderUsage<Options extends ArgOptions = ArgOptions>(ctx: Readonly<CommandContext<Options>>): Promise<string>;
|
|
17
22
|
|
|
23
|
+
/**
|
|
24
|
+
* @author kazuya kawaguchi (a.k.a. kazupon)
|
|
25
|
+
* @license MIT
|
|
26
|
+
*/
|
|
27
|
+
|
|
18
28
|
/**
|
|
19
29
|
* Render the validation errors.
|
|
20
30
|
* @param ctx A {@link CommandContext | command context}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gunshi",
|
|
3
3
|
"description": "Modern javascript command-line library",
|
|
4
|
-
"version": "0.14.
|
|
4
|
+
"version": "0.14.4",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "kazuya kawaguchi",
|
|
7
7
|
"email": "kawakazu80@gmail.com"
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@eslint/markdown": "^6.3.0",
|
|
78
78
|
"@intlify/core": "next",
|
|
79
|
-
"@kazupon/eslint-config": "^0.
|
|
79
|
+
"@kazupon/eslint-config": "^0.29.0",
|
|
80
80
|
"@kazupon/prettier-config": "^0.1.1",
|
|
81
81
|
"@types/node": "^22.14.0",
|
|
82
82
|
"@vitest/eslint-plugin": "^1.1.42",
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"typescript-eslint": "^8.29.1",
|
|
112
112
|
"vitepress": "^1.6.3",
|
|
113
113
|
"vitepress-plugin-group-icons": "^1.4.1",
|
|
114
|
-
"vitepress-plugin-llms": "^0.0
|
|
114
|
+
"vitepress-plugin-llms": "^1.0.0",
|
|
115
115
|
"vitest": "^3.1.1",
|
|
116
116
|
"vue": "^3.5.13"
|
|
117
117
|
},
|