gunshi 0.3.1 → 0.4.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
@@ -14,7 +14,7 @@
14
14
  Gunshi is a modern javascript command-line library
15
15
 
16
16
  > [!TIP]
17
- > gunshi (軍師) is a position in ancient Japanese samurai battle in which a amurai devised strategies and gave orders. That name is inspired by the word "command".
17
+ > gunshi (軍師) is a position in ancient Japanese samurai battle in which a samurai devised strategies and gave orders. That name is inspired by the word "command".
18
18
 
19
19
  ## ✨ Features
20
20
 
@@ -44,7 +44,7 @@ yarn add gunshi
44
44
 
45
45
  ## 🚀 Usage
46
46
 
47
- ### Simple API
47
+ ### 📏 Simple API
48
48
 
49
49
  Gunshi has a simple API that is a facade:
50
50
 
@@ -57,7 +57,7 @@ cli(process.argv.slice(2), () => {
57
57
  })
58
58
  ```
59
59
 
60
- ### Type-Safe Arguments
60
+ ### 🛡️ Type-Safe Arguments
61
61
 
62
62
  Gunshi provides type-safe argument parsing with TypeScript:
63
63
 
@@ -97,7 +97,7 @@ await cli(process.argv.slice(2), command)
97
97
 
98
98
  For more detailed examples, check out the [playground/type-safe](https://github.com/kazupon/gunshi/tree/main/playground/type-safe) in the repository.
99
99
 
100
- ### Declarative Configuration
100
+ ### ⚙️ Declarative Configuration
101
101
 
102
102
  Configure commands declaratively:
103
103
 
@@ -137,7 +137,7 @@ cli(process.argv.slice(2), command, {
137
137
 
138
138
  For more detailed examples, check out the [playground/declarative](https://github.com/kazupon/gunshi/tree/main/playground/declarative) in the repository.
139
139
 
140
- ### Composable Sub-commands
140
+ ### 🧩 Composable Sub-commands
141
141
 
142
142
  Create a CLI with composable sub-commands:
143
143
 
@@ -188,7 +188,7 @@ cli(process.argv.slice(2), mainCommand, {
188
188
 
189
189
  For more detailed examples, check out the [playground/composable](https://github.com/kazupon/gunshi/tree/main/playground/composable) in the repository.
190
190
 
191
- ### Lazy & Async Command Loading
191
+ ### Lazy & Async Command Loading
192
192
 
193
193
  Load commands lazily and execute them asynchronously:
194
194
 
@@ -229,7 +229,7 @@ cli(
229
229
 
230
230
  For more detailed examples, check out the [playground/lazy-async](https://github.com/kazupon/gunshi/tree/main/playground/lazy-async) in the repository.
231
231
 
232
- ### Auto Usage Generation
232
+ ### 📜 Auto Usage Generation
233
233
 
234
234
  Gunshi automatically generates usage information:
235
235
 
@@ -266,7 +266,7 @@ cli(process.argv.slice(2), command, {
266
266
 
267
267
  For more detailed examples, check out the [playground/auto-usage](https://github.com/kazupon/gunshi/tree/main/playground/auto-usage) in the repository.
268
268
 
269
- ### Custom Usage Generation
269
+ ### 🎨 Custom Usage Generation
270
270
 
271
271
  Customize the usage message generation:
272
272
 
@@ -316,7 +316,7 @@ cli(
316
316
 
317
317
  For more detailed examples, check out the [playground/custom-usage](https://github.com/kazupon/gunshi/tree/main/playground/custom-usage) in the repository.
318
318
 
319
- ### Internationalization
319
+ ### 🌍 Internationalization
320
320
 
321
321
  Support internationalization:
322
322
 
@@ -359,6 +359,10 @@ cli(process.argv.slice(2), command, {
359
359
 
360
360
  For more detailed examples, check out the [playground/i18n](https://github.com/kazupon/gunshi/tree/main/playground/i18n) in the repository.
361
361
 
362
+ ## 💁‍♀️ Showcases
363
+
364
+ - [pnpmc](https://github.com/kazupon/pnpmc): PNPM Catalogs Tooling
365
+
362
366
  ## 🙌 Contributing guidelines
363
367
 
364
368
  If you are interested in contributing to `gunshi`, I highly recommend checking out [the contributing guidelines](/CONTRIBUTING.md) here. You'll find all the relevant information such as [how to make a PR](/CONTRIBUTING.md#pull-request-guidelines), [how to setup development](/CONTRIBUTING.md#development-setup)) etc., there.
package/lib/context.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ArgOptions, ArgValues } from 'args-tokens';
2
- import { C as Command, a as CommandOptions, b as CommandContext } from './types.d-00BVt8hZ.js';
2
+ import { C as Command, a as CommandOptions, b as CommandContext } from './types.d-veidyA82.js';
3
3
 
4
4
  /**
5
5
  * The default locale string, which format is BCP 47 language tag
package/lib/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ArgOptions } from 'args-tokens';
2
2
  export { ArgOptionSchema, ArgOptions, ArgValues } from 'args-tokens';
3
- import { C as Command, c as CommandRunner, a as CommandOptions } from './types.d-00BVt8hZ.js';
4
- export { f as CommandBuiltinKeys, d as CommandBuiltinOptionsKeys, e as CommandBuiltinResourceKeys, b as CommandContext, g as CommandEnvironment, h as CommandResource, i as CommandResourceFetcher, L as LazyCommand } from './types.d-00BVt8hZ.js';
3
+ import { C as Command, c as CommandRunner, a as CommandOptions } from './types.d-veidyA82.js';
4
+ export { f as CommandBuiltinKeys, d as CommandBuiltinOptionsKeys, e as CommandBuiltinResourceKeys, b as CommandContext, g as CommandEnvironment, h as CommandResource, i as CommandResourceFetcher, L as LazyCommand } from './types.d-veidyA82.js';
5
5
 
6
6
  /**
7
7
  * Run the command
@@ -1,6 +1,6 @@
1
1
  import { ArgOptions, ArgValues } from 'args-tokens';
2
2
 
3
- declare const COMMON_OPTIONS: {
3
+ type CommonOptionType = {
4
4
  readonly help: {
5
5
  readonly type: "boolean"
6
6
  readonly short: "h"
@@ -10,6 +10,7 @@ declare const COMMON_OPTIONS: {
10
10
  readonly short: "v"
11
11
  }
12
12
  };
13
+ declare const COMMON_OPTIONS: CommonOptionType;
13
14
  declare const COMMAND_OPTIONS_DEFAULT: CommandOptions<ArgOptions>;
14
15
  declare const COMMAND_I18N_RESOURCE_KEYS: readonly ["USAGE", "COMMAND", "SUBCOMMAND", "COMMANDS", "OPTIONS", "EXAMPLES", "FORMORE"];
15
16
 
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.3.1",
4
+ "version": "0.4.0",
5
5
  "author": {
6
6
  "name": "kazuya kawaguchi",
7
7
  "email": "kawakazu80@gmail.com"
@@ -84,6 +84,7 @@
84
84
  "eslint-plugin-unicorn": "^57.0.0",
85
85
  "eslint-plugin-yml": "^1.17.0",
86
86
  "gh-changelogen": "^0.2.8",
87
+ "jsr": "^0.13.4",
87
88
  "knip": "^5.45.0",
88
89
  "lint-staged": "^15.4.3",
89
90
  "pkg-pr-new": "^0.0.41",
@@ -119,6 +120,7 @@
119
120
  "fix:prettier": "prettier . --write",
120
121
  "lint": "pnpm run --stream --color \"/^lint:/\"",
121
122
  "lint:eslint": "eslint .",
123
+ "lint:jsr": "jsr publish --dry-run --allow-dirty",
122
124
  "lint:knip": "knip",
123
125
  "lint:prettier": "prettier . --check",
124
126
  "release": "bumpp --commit \"release: v%s\" --all --push --tag",