gunshi 0.10.0 → 0.10.2
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-BmK-tBjI.js → cli-Dl65HT93.js} +3 -3
- package/lib/{context-BeFe0i70.js → context-DaUoC-sR.js} +3 -3
- package/lib/context.js +2 -2
- package/lib/generator.js +4 -4
- package/lib/index.js +4 -4
- package/lib/renderer/index.js +2 -2
- package/lib/{renderer-CZGhbue4.js → renderer-Dm_6iF2f.js} +1 -1
- package/package.json +2 -3
- /package/{locales → lib/locales}/en-US.json +0 -0
- /package/{locales → lib/locales}/ja-JP.json +0 -0
- /package/lib/{utils-DhI1qcqR.js → utils-zZSVaYTy.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { renderHeader, renderUsage, renderValidationErrors } from "./renderer-
|
|
1
|
+
import { COMMAND_OPTIONS_DEFAULT, COMMON_OPTIONS, create, resolveLazyCommand } from "./utils-zZSVaYTy.js";
|
|
2
|
+
import { createCommandContext } from "./context-DaUoC-sR.js";
|
|
3
|
+
import { renderHeader, renderUsage, renderValidationErrors } from "./renderer-Dm_6iF2f.js";
|
|
4
4
|
import { parseArgs, resolveArgs } from "args-tokens";
|
|
5
5
|
|
|
6
6
|
//#region src/cli.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BUILT_IN_PREFIX, COMMAND_OPTIONS_DEFAULT, DEFAULT_LOCALE, NOOP, create, deepFreeze, log, mapResourceWithBuiltinKey, resolveLazyCommand } from "./utils-
|
|
1
|
+
import { BUILT_IN_PREFIX, COMMAND_OPTIONS_DEFAULT, DEFAULT_LOCALE, NOOP, create, deepFreeze, log, mapResourceWithBuiltinKey, resolveLazyCommand } from "./utils-zZSVaYTy.js";
|
|
2
2
|
|
|
3
|
-
//#region locales/en-US.json
|
|
3
|
+
//#region src/locales/en-US.json
|
|
4
4
|
var COMMAND = "COMMAND";
|
|
5
5
|
var COMMANDS = "COMMANDS";
|
|
6
6
|
var SUBCOMMAND = "SUBCOMMAND";
|
|
@@ -85,7 +85,7 @@ async function createCommandContext({ options, values, positionals, command, com
|
|
|
85
85
|
*/
|
|
86
86
|
localeResources.set(DEFAULT_LOCALE, mapResourceWithBuiltinKey(en_US_default));
|
|
87
87
|
if (DEFAULT_LOCALE !== localeStr) try {
|
|
88
|
-
builtInLoadedResources = await import(
|
|
88
|
+
builtInLoadedResources = await import(`./locales/${localeStr}.json`, { with: { type: "json" } });
|
|
89
89
|
localeResources.set(localeStr, mapResourceWithBuiltinKey(builtInLoadedResources));
|
|
90
90
|
} catch {}
|
|
91
91
|
/**
|
package/lib/context.js
CHANGED
package/lib/generator.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./renderer-
|
|
4
|
-
import { cli } from "./cli-
|
|
1
|
+
import { create } from "./utils-zZSVaYTy.js";
|
|
2
|
+
import "./context-DaUoC-sR.js";
|
|
3
|
+
import "./renderer-Dm_6iF2f.js";
|
|
4
|
+
import { cli } from "./cli-Dl65HT93.js";
|
|
5
5
|
|
|
6
6
|
//#region src/generator.ts
|
|
7
7
|
async function generate(command, entry, opts = {}) {
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "./
|
|
3
|
-
import "./renderer-
|
|
4
|
-
import { cli } from "./cli-
|
|
1
|
+
import "./utils-zZSVaYTy.js";
|
|
2
|
+
import { DefaultTranslation } from "./context-DaUoC-sR.js";
|
|
3
|
+
import "./renderer-Dm_6iF2f.js";
|
|
4
|
+
import { cli } from "./cli-Dl65HT93.js";
|
|
5
5
|
|
|
6
6
|
export { DefaultTranslation, cli };
|
package/lib/renderer/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../utils-
|
|
2
|
-
import { renderHeader, renderUsage, renderValidationErrors } from "../renderer-
|
|
1
|
+
import "../utils-zZSVaYTy.js";
|
|
2
|
+
import { renderHeader, renderUsage, renderValidationErrors } from "../renderer-Dm_6iF2f.js";
|
|
3
3
|
|
|
4
4
|
export { renderHeader, renderUsage, renderValidationErrors };
|
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.10.
|
|
4
|
+
"version": "0.10.2",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "kazuya kawaguchi",
|
|
7
7
|
"email": "kawakazu80@gmail.com"
|
|
@@ -31,8 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"type": "module",
|
|
33
33
|
"files": [
|
|
34
|
-
"lib"
|
|
35
|
-
"locales"
|
|
34
|
+
"lib"
|
|
36
35
|
],
|
|
37
36
|
"module": "lib/index.js",
|
|
38
37
|
"exports": {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|