gunshi 0.27.0-beta.6 → 0.27.0
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/README.md
CHANGED
|
@@ -30,13 +30,10 @@ Gunshi is designed to simplify the creation of modern command-line interfaces:
|
|
|
30
30
|
|
|
31
31
|
## 📡 Status
|
|
32
32
|
|
|
33
|
-
- v0.
|
|
34
|
-
- v0.27: beta
|
|
33
|
+
- v0.27: stable
|
|
35
34
|
|
|
36
35
|
## 💿 Installation
|
|
37
36
|
|
|
38
|
-
### Stable
|
|
39
|
-
|
|
40
37
|
```sh
|
|
41
38
|
# npm
|
|
42
39
|
npm install --save gunshi
|
|
@@ -54,25 +51,6 @@ deno add jsr:@gunshi/gunshi
|
|
|
54
51
|
bun add gunshi
|
|
55
52
|
```
|
|
56
53
|
|
|
57
|
-
### v0.27 Beta
|
|
58
|
-
|
|
59
|
-
```sh
|
|
60
|
-
# npm
|
|
61
|
-
npm install --save gunshi@beta
|
|
62
|
-
|
|
63
|
-
## pnpm
|
|
64
|
-
pnpm add gunshi@beta
|
|
65
|
-
|
|
66
|
-
## yarn
|
|
67
|
-
yarn add gunshi@beta
|
|
68
|
-
|
|
69
|
-
## deno (you can specify version with `@`)
|
|
70
|
-
deno add jsr:@gunshi/gunshi@0.27.2
|
|
71
|
-
|
|
72
|
-
## bun
|
|
73
|
-
bun add gunshi@beta
|
|
74
|
-
```
|
|
75
|
-
|
|
76
54
|
## 🚀 Usage
|
|
77
55
|
|
|
78
56
|
```js
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cliCore } from "./core-D15eimMG.js";
|
|
2
2
|
import { t as plugin } from "./plugin-bQlPfOlH.js";
|
|
3
|
-
import { a as namespacedId, s as COMMON_ARGS, t as renderer } from "./src-
|
|
3
|
+
import { a as namespacedId, s as COMMON_ARGS, t as renderer } from "./src-CY4_1ike.js";
|
|
4
4
|
|
|
5
5
|
//#region ../plugin-global/src/types.ts
|
|
6
6
|
/**
|
package/lib/generator.js
CHANGED
|
@@ -2,8 +2,8 @@ import "./context-DRQZ3doU.js";
|
|
|
2
2
|
import { t as create } from "./utils-DA31tfdY.js";
|
|
3
3
|
import "./core-D15eimMG.js";
|
|
4
4
|
import "./plugin-bQlPfOlH.js";
|
|
5
|
-
import "./src-
|
|
6
|
-
import { t as cli } from "./cli-
|
|
5
|
+
import "./src-CY4_1ike.js";
|
|
6
|
+
import { t as cli } from "./cli-CvbMnupQ.js";
|
|
7
7
|
|
|
8
8
|
//#region src/generator.ts
|
|
9
9
|
/**
|
package/lib/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import "./utils-DA31tfdY.js";
|
|
|
3
3
|
import "./core-D15eimMG.js";
|
|
4
4
|
import { i as lazyWithTypes, n as defineWithTypes, r as lazy, t as define } from "./definition-D5821Sur.js";
|
|
5
5
|
import { t as plugin } from "./plugin-bQlPfOlH.js";
|
|
6
|
-
import { a as namespacedId, o as BUILT_IN_PREFIX } from "./src-
|
|
7
|
-
import { t as cli } from "./cli-
|
|
6
|
+
import { a as namespacedId, o as BUILT_IN_PREFIX } from "./src-CY4_1ike.js";
|
|
7
|
+
import { t as cli } from "./cli-CvbMnupQ.js";
|
|
8
8
|
import { parseArgs, resolveArgs } from "args-tokens";
|
|
9
9
|
|
|
10
10
|
//#region ../plugin-i18n/src/translation.ts
|
package/lib/renderer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./context-DRQZ3doU.js";
|
|
2
2
|
import "./utils-DA31tfdY.js";
|
|
3
3
|
import "./plugin-bQlPfOlH.js";
|
|
4
|
-
import { i as renderHeader, n as renderValidationErrors, r as renderUsage } from "./src-
|
|
4
|
+
import { i as renderHeader, n as renderValidationErrors, r as renderUsage } from "./src-CY4_1ike.js";
|
|
5
5
|
|
|
6
6
|
export { renderHeader, renderUsage, renderValidationErrors };
|
|
@@ -493,7 +493,12 @@ async function generatePositionalArgsUsage(ctx) {
|
|
|
493
493
|
}))).join("\n");
|
|
494
494
|
}
|
|
495
495
|
function generatePositionalSymbols(args) {
|
|
496
|
-
return hasPositionalArgs(args) ? getPositionalArgs(args).map(([name]) =>
|
|
496
|
+
return hasPositionalArgs(args) ? getPositionalArgs(args).map(([name, arg]) => {
|
|
497
|
+
const elements = [];
|
|
498
|
+
if (!arg.multiple || arg.required) elements.push(`<${name}>`);
|
|
499
|
+
if (arg.multiple) elements.push(`[<${name}> ...]`);
|
|
500
|
+
return elements.join(" ");
|
|
501
|
+
}).join(" ") : "";
|
|
497
502
|
}
|
|
498
503
|
|
|
499
504
|
//#endregion
|
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.0
|
|
4
|
+
"version": "0.27.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "kazuya kawaguchi",
|
|
7
7
|
"email": "kawakazu80@gmail.com"
|
|
@@ -102,14 +102,14 @@
|
|
|
102
102
|
"deno": "^2.5.6",
|
|
103
103
|
"jsr": "^0.13.5",
|
|
104
104
|
"jsr-exports-lint": "^0.4.1",
|
|
105
|
-
"publint": "^0.3.
|
|
105
|
+
"publint": "^0.3.16",
|
|
106
106
|
"tsdown": "0.15.12",
|
|
107
107
|
"zod": "^4.1.13",
|
|
108
|
-
"@gunshi/plugin-global": "0.27.0
|
|
109
|
-
"@gunshi/plugin-
|
|
110
|
-
"@gunshi/
|
|
111
|
-
"@gunshi/
|
|
112
|
-
"@gunshi/shared": "0.27.0
|
|
108
|
+
"@gunshi/plugin-global": "0.27.0",
|
|
109
|
+
"@gunshi/plugin-renderer": "0.27.0",
|
|
110
|
+
"@gunshi/resources": "0.27.0",
|
|
111
|
+
"@gunshi/plugin-i18n": "0.27.0",
|
|
112
|
+
"@gunshi/shared": "0.27.0"
|
|
113
113
|
},
|
|
114
114
|
"scripts": {
|
|
115
115
|
"build": "tsdown",
|