gunshi 0.27.3 → 0.27.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/bone.d.ts +1 -1
- package/lib/{context-Pe5vk9kJ.d.ts → context-c3TYozQR.d.ts} +1 -1
- package/lib/context.d.ts +2 -2
- package/lib/{definition-BNViywAg.d.ts → definition-Bhhx1dzQ.d.ts} +1 -1
- package/lib/definition.d.ts +3 -3
- package/lib/generator.d.ts +1 -1
- package/lib/{index-CCtD9wBS.d.ts → index-D_NQFhLl.d.ts} +1 -1
- package/lib/index.d.ts +6 -6
- package/lib/index.js +1 -1
- package/lib/{plugin-aAXfXUT6.d.ts → plugin-BCYPEeKH.d.ts} +1 -1
- package/lib/plugin.d.ts +3 -3
- package/lib/renderer.d.ts +6 -6
- package/lib/{types-n4yrH5jq.d.ts → types-B2vSsTAs.d.ts} +33 -11
- package/lib/{utils-BV37YoO0.d.ts → utils-_mX9Q7d9.d.ts} +2 -4
- package/lib/utils.d.ts +2 -2
- package/package.json +6 -6
package/lib/bone.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as SubCommandable, C as GunshiParams, D as Prettify, E as NormalizeToGunshiParams, O as RendererDecorator, S as ExtractExtensions, T as LazyCommand, _ as Commandable, a as Awaitable, b as ExtractArgExplicitlyProvided, c as CommandCallMode, d as CommandContextExtension, f as CommandDecorator, g as CommandRunner, h as CommandLoader, i as Args, j as ValidationErrorsDecorator, k as RenderingOptions, l as CommandContext, m as CommandExamplesFetcher, n as ArgToken, o as CliOptions, p as CommandEnvironment, r as ArgValues, s as Command, t as ArgSchema, u as CommandContextCore, v as DefaultGunshiParams, w as GunshiParamsConstraint, x as ExtractArgs, y as ExtendContext } from "./types-
|
|
1
|
+
import { A as SubCommandable, C as GunshiParams, D as Prettify, E as NormalizeToGunshiParams, O as RendererDecorator, S as ExtractExtensions, T as LazyCommand, _ as Commandable, a as Awaitable, b as ExtractArgExplicitlyProvided, c as CommandCallMode, d as CommandContextExtension, f as CommandDecorator, g as CommandRunner, h as CommandLoader, i as Args, j as ValidationErrorsDecorator, k as RenderingOptions, l as CommandContext, m as CommandExamplesFetcher, n as ArgToken, o as CliOptions, p as CommandEnvironment, r as ArgValues, s as Command, t as ArgSchema, u as CommandContextCore, v as DefaultGunshiParams, w as GunshiParamsConstraint, x as ExtractArgs, y as ExtendContext } from "./types-B2vSsTAs.js";
|
|
2
2
|
|
|
3
3
|
//#region src/cli/bone.d.ts
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as GunshiParams, T as LazyCommand, b as ExtractArgExplicitlyProvided, c as CommandCallMode, d as CommandContextExtension, i as Args, l as CommandContext, n as ArgToken, o as CliOptions, r as ArgValues, s as Command, v as DefaultGunshiParams, w as GunshiParamsConstraint, x as ExtractArgs, y as ExtendContext } from "./types-
|
|
1
|
+
import { C as GunshiParams, T as LazyCommand, b as ExtractArgExplicitlyProvided, c as CommandCallMode, d as CommandContextExtension, i as Args, l as CommandContext, n as ArgToken, o as CliOptions, r as ArgValues, s as Command, v as DefaultGunshiParams, w as GunshiParamsConstraint, x as ExtractArgs, y as ExtendContext } from "./types-B2vSsTAs.js";
|
|
2
2
|
|
|
3
3
|
//#region src/context.d.ts
|
|
4
4
|
|
package/lib/context.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./types-
|
|
2
|
-
import { n as ExtractExtensions, r as createCommandContext, t as CommandContextParams } from "./context-
|
|
1
|
+
import "./types-B2vSsTAs.js";
|
|
2
|
+
import { n as ExtractExtensions, r as createCommandContext, t as CommandContextParams } from "./context-c3TYozQR.js";
|
|
3
3
|
export { CommandContextParams, ExtractExtensions, createCommandContext };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as GunshiParams, D as Prettify, S as ExtractExtensions, T as LazyCommand, h as CommandLoader, i as Args, s as Command, v as DefaultGunshiParams, w as GunshiParamsConstraint, x as ExtractArgs, y as ExtendContext } from "./types-
|
|
1
|
+
import { C as GunshiParams, D as Prettify, S as ExtractExtensions, T as LazyCommand, h as CommandLoader, i as Args, s as Command, v as DefaultGunshiParams, w as GunshiParamsConstraint, x as ExtractArgs, y as ExtendContext } from "./types-B2vSsTAs.js";
|
|
2
2
|
|
|
3
3
|
//#region src/definition.d.ts
|
|
4
4
|
/**
|
package/lib/definition.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as GunshiParams, T as LazyCommand, g as CommandRunner, h as CommandLoader, i as Args, r as ArgValues, s as Command, t as ArgSchema, v as DefaultGunshiParams, y as ExtendContext } from "./types-
|
|
2
|
-
import { r as createCommandContext, t as CommandContextParams } from "./context-
|
|
3
|
-
import { i as lazyWithTypes, n as defineWithTypes, r as lazy, t as define } from "./definition-
|
|
1
|
+
import { C as GunshiParams, T as LazyCommand, g as CommandRunner, h as CommandLoader, i as Args, r as ArgValues, s as Command, t as ArgSchema, v as DefaultGunshiParams, y as ExtendContext } from "./types-B2vSsTAs.js";
|
|
2
|
+
import { r as createCommandContext, t as CommandContextParams } from "./context-c3TYozQR.js";
|
|
3
|
+
import { i as lazyWithTypes, n as defineWithTypes, r as lazy, t as define } from "./definition-Bhhx1dzQ.js";
|
|
4
4
|
export { ArgSchema, ArgValues, Args, Command, CommandContextParams, CommandLoader, CommandRunner, DefaultGunshiParams, ExtendContext, GunshiParams, LazyCommand, createCommandContext, define, defineWithTypes, lazy, lazyWithTypes };
|
package/lib/generator.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as LazyCommand, o as CliOptions, s as Command, v as DefaultGunshiParams, w as GunshiParamsConstraint } from "./types-
|
|
1
|
+
import { T as LazyCommand, o as CliOptions, s as Command, v as DefaultGunshiParams, w as GunshiParamsConstraint } from "./types-B2vSsTAs.js";
|
|
2
2
|
|
|
3
3
|
//#region src/generator.d.ts
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as SubCommandable, C as GunshiParams, T as LazyCommand, g as CommandRunner, i as Args$1, o as CliOptions, s as Command, v as DefaultGunshiParams, w as GunshiParamsConstraint, y as ExtendContext } from "./types-
|
|
1
|
+
import { A as SubCommandable, C as GunshiParams, T as LazyCommand, g as CommandRunner, i as Args$1, o as CliOptions, s as Command, v as DefaultGunshiParams, w as GunshiParamsConstraint, y as ExtendContext } from "./types-B2vSsTAs.js";
|
|
2
2
|
import { parseArgs as parseArgs$1, resolveArgs as resolveArgs$1 } from "args-tokens";
|
|
3
3
|
|
|
4
4
|
//#region ../plugin-i18n/src/types.d.ts
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as SubCommandable, B as plugin, C as GunshiParams, D as Prettify, E as NormalizeToGunshiParams, F as PluginExtension, I as PluginFunction, L as PluginOptions, M as OnPluginExtension, N as Plugin, O as RendererDecorator, P as PluginDependency, R as PluginWithExtension, S as ExtractExtensions, T as LazyCommand, V as PluginContext, _ as Commandable, a as Awaitable, b as ExtractArgExplicitlyProvided, c as CommandCallMode, d as CommandContextExtension, f as CommandDecorator, g as CommandRunner, h as CommandLoader, i as Args, j as ValidationErrorsDecorator, k as RenderingOptions, l as CommandContext, m as CommandExamplesFetcher, n as ArgToken, o as CliOptions, p as CommandEnvironment, r as ArgValues, s as Command, t as ArgSchema, u as CommandContextCore, v as DefaultGunshiParams, w as GunshiParamsConstraint, x as ExtractArgs, y as ExtendContext, z as PluginWithoutExtension } from "./types-
|
|
2
|
-
import { r as createCommandContext, t as CommandContextParams } from "./context-
|
|
3
|
-
import { i as lazyWithTypes, n as defineWithTypes, r as lazy, t as define } from "./definition-
|
|
4
|
-
import { t as ANONYMOUS_COMMAND_NAME } from "./plugin-
|
|
5
|
-
import { i as DefaultTranslation, n as resolveArgs, r as cli, t as parseArgs } from "./index-
|
|
6
|
-
import "./utils-
|
|
1
|
+
import { A as SubCommandable, B as plugin, C as GunshiParams, D as Prettify, E as NormalizeToGunshiParams, F as PluginExtension, I as PluginFunction, L as PluginOptions, M as OnPluginExtension, N as Plugin, O as RendererDecorator, P as PluginDependency, R as PluginWithExtension, S as ExtractExtensions, T as LazyCommand, V as PluginContext, _ as Commandable, a as Awaitable, b as ExtractArgExplicitlyProvided, c as CommandCallMode, d as CommandContextExtension, f as CommandDecorator, g as CommandRunner, h as CommandLoader, i as Args, j as ValidationErrorsDecorator, k as RenderingOptions, l as CommandContext, m as CommandExamplesFetcher, n as ArgToken, o as CliOptions, p as CommandEnvironment, r as ArgValues, s as Command, t as ArgSchema, u as CommandContextCore, v as DefaultGunshiParams, w as GunshiParamsConstraint, x as ExtractArgs, y as ExtendContext, z as PluginWithoutExtension } from "./types-B2vSsTAs.js";
|
|
2
|
+
import { r as createCommandContext, t as CommandContextParams } from "./context-c3TYozQR.js";
|
|
3
|
+
import { i as lazyWithTypes, n as defineWithTypes, r as lazy, t as define } from "./definition-Bhhx1dzQ.js";
|
|
4
|
+
import { t as ANONYMOUS_COMMAND_NAME } from "./plugin-BCYPEeKH.js";
|
|
5
|
+
import { i as DefaultTranslation, n as resolveArgs, r as cli, t as parseArgs } from "./index-D_NQFhLl.js";
|
|
6
|
+
import "./utils-_mX9Q7d9.js";
|
|
7
7
|
export { ANONYMOUS_COMMAND_NAME, ArgSchema, ArgToken, ArgValues, Args, Awaitable, CliOptions, Command, CommandCallMode, CommandContext, CommandContextCore, CommandContextExtension, CommandContextParams, CommandDecorator, CommandEnvironment, CommandExamplesFetcher, CommandLoader, CommandRunner, Commandable, DefaultGunshiParams, DefaultTranslation, ExtendContext, ExtractArgExplicitlyProvided, ExtractArgs, ExtractExtensions, GunshiParams, GunshiParamsConstraint, LazyCommand, NormalizeToGunshiParams, OnPluginExtension, Plugin, PluginContext, PluginDependency, PluginExtension, PluginFunction, PluginOptions, PluginWithExtension, PluginWithoutExtension, Prettify, RendererDecorator, RenderingOptions, SubCommandable, ValidationErrorsDecorator, cli, createCommandContext, define, defineWithTypes, lazy, lazyWithTypes, parseArgs, plugin, resolveArgs };
|
package/lib/index.js
CHANGED
|
@@ -66,7 +66,7 @@ var DefaultTranslation = class {
|
|
|
66
66
|
if (message === void 0 && locale !== this.#options.fallbackLocale) message = this.getMessage(this.#options.fallbackLocale, key);
|
|
67
67
|
if (message === void 0) return;
|
|
68
68
|
return message.replaceAll(/\{\$(\w+)\}/g, (_, name) => {
|
|
69
|
-
return values[name] == null ? "" : values[name]
|
|
69
|
+
return values[name] == null ? "" : values[name];
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
};
|
package/lib/plugin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as plugin, C as GunshiParams, D as Prettify, E as NormalizeToGunshiParams, F as PluginExtension, I as PluginFunction, L as PluginOptions, M as OnPluginExtension, N as Plugin, O as RendererDecorator, P as PluginDependency, R as PluginWithExtension, S as ExtractExtensions, T as LazyCommand, V as PluginContext, a as Awaitable, d as CommandContextExtension, f as CommandDecorator, g as CommandRunner, i as Args, j as ValidationErrorsDecorator, l as CommandContext, m as CommandExamplesFetcher, n as ArgToken, r as ArgValues, s as Command, t as ArgSchema, u as CommandContextCore, v as DefaultGunshiParams, w as GunshiParamsConstraint, x as ExtractArgs, y as ExtendContext, z as PluginWithoutExtension } from "./types-
|
|
2
|
-
import { r as createCommandContext, t as CommandContextParams } from "./context-
|
|
3
|
-
import { n as CLI_OPTIONS_DEFAULT, t as ANONYMOUS_COMMAND_NAME } from "./plugin-
|
|
1
|
+
import { B as plugin, C as GunshiParams, D as Prettify, E as NormalizeToGunshiParams, F as PluginExtension, I as PluginFunction, L as PluginOptions, M as OnPluginExtension, N as Plugin, O as RendererDecorator, P as PluginDependency, R as PluginWithExtension, S as ExtractExtensions, T as LazyCommand, V as PluginContext, a as Awaitable, d as CommandContextExtension, f as CommandDecorator, g as CommandRunner, i as Args, j as ValidationErrorsDecorator, l as CommandContext, m as CommandExamplesFetcher, n as ArgToken, r as ArgValues, s as Command, t as ArgSchema, u as CommandContextCore, v as DefaultGunshiParams, w as GunshiParamsConstraint, x as ExtractArgs, y as ExtendContext, z as PluginWithoutExtension } from "./types-B2vSsTAs.js";
|
|
2
|
+
import { r as createCommandContext, t as CommandContextParams } from "./context-c3TYozQR.js";
|
|
3
|
+
import { n as CLI_OPTIONS_DEFAULT, t as ANONYMOUS_COMMAND_NAME } from "./plugin-BCYPEeKH.js";
|
|
4
4
|
export { ANONYMOUS_COMMAND_NAME, ArgSchema, ArgToken, ArgValues, Args, Awaitable, CLI_OPTIONS_DEFAULT, Command, CommandContext, CommandContextCore, CommandContextExtension, CommandContextParams, CommandDecorator, CommandExamplesFetcher, CommandRunner, DefaultGunshiParams, ExtendContext, ExtractArgs, ExtractExtensions, GunshiParams, GunshiParamsConstraint, LazyCommand, NormalizeToGunshiParams, OnPluginExtension, Plugin, PluginContext, PluginDependency, PluginExtension, PluginFunction, PluginOptions, PluginWithExtension, PluginWithoutExtension, Prettify, RendererDecorator, ValidationErrorsDecorator, createCommandContext, plugin };
|
package/lib/renderer.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { C as GunshiParams, l as CommandContext, v as DefaultGunshiParams } from "./types-
|
|
2
|
-
import "./context-
|
|
3
|
-
import "./definition-
|
|
4
|
-
import "./plugin-
|
|
5
|
-
import "./index-
|
|
6
|
-
import "./utils-
|
|
1
|
+
import { C as GunshiParams, l as CommandContext, v as DefaultGunshiParams } from "./types-B2vSsTAs.js";
|
|
2
|
+
import "./context-c3TYozQR.js";
|
|
3
|
+
import "./definition-Bhhx1dzQ.js";
|
|
4
|
+
import "./plugin-BCYPEeKH.js";
|
|
5
|
+
import "./index-D_NQFhLl.js";
|
|
6
|
+
import "./utils-_mX9Q7d9.js";
|
|
7
7
|
|
|
8
8
|
//#region ../plugin-renderer/src/header.d.ts
|
|
9
9
|
/**
|
|
@@ -895,27 +895,49 @@ type Commandable<G extends GunshiParamsConstraint = DefaultGunshiParams> = Comma
|
|
|
895
895
|
* @since v0.27.1
|
|
896
896
|
*/
|
|
897
897
|
interface SubCommandable {
|
|
898
|
-
/**
|
|
898
|
+
/**
|
|
899
|
+
* see {@link Command.name}
|
|
900
|
+
*/
|
|
899
901
|
name?: string;
|
|
900
|
-
/**
|
|
902
|
+
/**
|
|
903
|
+
* see {@link Command.description}
|
|
904
|
+
*/
|
|
901
905
|
description?: string;
|
|
902
|
-
/**
|
|
906
|
+
/**
|
|
907
|
+
* see {@link Command.args}
|
|
908
|
+
*/
|
|
903
909
|
args?: Args | Record<string, any>;
|
|
904
|
-
/**
|
|
910
|
+
/**
|
|
911
|
+
* see {@link Command.examples}
|
|
912
|
+
*/
|
|
905
913
|
examples?: string | ((...args: any[]) => any);
|
|
906
|
-
/**
|
|
914
|
+
/**
|
|
915
|
+
* see {@link Command.run}
|
|
916
|
+
*/
|
|
907
917
|
run?: (...args: any[]) => any;
|
|
908
|
-
/**
|
|
918
|
+
/**
|
|
919
|
+
* see {@link Command.toKebab}
|
|
920
|
+
*/
|
|
909
921
|
toKebab?: boolean;
|
|
910
|
-
/**
|
|
922
|
+
/**
|
|
923
|
+
* see {@link Command.internal}
|
|
924
|
+
*/
|
|
911
925
|
internal?: boolean;
|
|
912
|
-
/**
|
|
926
|
+
/**
|
|
927
|
+
* see {@link Command.entry}
|
|
928
|
+
*/
|
|
913
929
|
entry?: boolean;
|
|
914
|
-
/**
|
|
930
|
+
/**
|
|
931
|
+
* see {@link Command.rendering}
|
|
932
|
+
*/
|
|
915
933
|
rendering?: any;
|
|
916
|
-
/**
|
|
934
|
+
/**
|
|
935
|
+
* see {@link LazyCommand.commandName}
|
|
936
|
+
*/
|
|
917
937
|
commandName?: string;
|
|
918
|
-
/**
|
|
938
|
+
/**
|
|
939
|
+
* Index signature to allow additional properties
|
|
940
|
+
*/
|
|
919
941
|
[key: string]: any;
|
|
920
942
|
}
|
|
921
943
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as LazyCommand, _ as Commandable, s as Command, v as DefaultGunshiParams, w as GunshiParamsConstraint } from "./types-
|
|
1
|
+
import { T as LazyCommand, _ as Commandable, s as Command, v as DefaultGunshiParams, w as GunshiParamsConstraint } from "./types-B2vSsTAs.js";
|
|
2
2
|
import { kebabnize } from "args-tokens/utils";
|
|
3
3
|
|
|
4
4
|
//#region src/utils.d.ts
|
|
@@ -43,8 +43,6 @@ declare function log(...args: unknown[]): void;
|
|
|
43
43
|
* @param ignores - Properties to ignore during freezing
|
|
44
44
|
* @returns A frozen object
|
|
45
45
|
*/
|
|
46
|
-
declare function deepFreeze<T extends Record<string, any>>(
|
|
47
|
-
// eslint-disable-line @typescript-eslint/no-explicit-any -- NOTE(kazupon): generic type for deepFreeze
|
|
48
|
-
obj: T, ignores?: string[]): Readonly<T>;
|
|
46
|
+
declare function deepFreeze<T extends Record<string, any>>(obj: T, ignores?: string[]): Readonly<T>;
|
|
49
47
|
//#endregion
|
|
50
48
|
export { log as a, kebabnize as i, deepFreeze as n, resolveLazyCommand as o, isLazyCommand as r, create as t };
|
package/lib/utils.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./types-
|
|
2
|
-
import { a as log, i as kebabnize, n as deepFreeze, o as resolveLazyCommand, r as isLazyCommand, t as create } from "./utils-
|
|
1
|
+
import "./types-B2vSsTAs.js";
|
|
2
|
+
import { a as log, i as kebabnize, n as deepFreeze, o as resolveLazyCommand, r as isLazyCommand, t as create } from "./utils-_mX9Q7d9.js";
|
|
3
3
|
export { create, deepFreeze, isLazyCommand, kebabnize, log, resolveLazyCommand };
|
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.27.
|
|
4
|
+
"version": "0.27.4",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "kazuya kawaguchi",
|
|
7
7
|
"email": "kawakazu80@gmail.com"
|
|
@@ -105,11 +105,11 @@
|
|
|
105
105
|
"publint": "^0.3.16",
|
|
106
106
|
"tsdown": "0.15.12",
|
|
107
107
|
"zod": "^4.2.1",
|
|
108
|
-
"@gunshi/plugin-
|
|
109
|
-
"@gunshi/plugin-
|
|
110
|
-
"@gunshi/
|
|
111
|
-
"@gunshi/
|
|
112
|
-
"@gunshi/
|
|
108
|
+
"@gunshi/plugin-i18n": "0.27.4",
|
|
109
|
+
"@gunshi/plugin-global": "0.27.4",
|
|
110
|
+
"@gunshi/shared": "0.27.4",
|
|
111
|
+
"@gunshi/plugin-renderer": "0.27.4",
|
|
112
|
+
"@gunshi/resources": "0.27.4"
|
|
113
113
|
},
|
|
114
114
|
"scripts": {
|
|
115
115
|
"build": "tsdown",
|