@gunshi/plugin-i18n 1.0.0-rc.4 → 1.0.0-rc.5
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 +0 -6
- package/lib/index.d.ts +7 -9
- package/lib/index.js +3 -3
- package/package.json +10 -15
package/README.md
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
[![Version][npm-version-src]][npm-version-href]
|
|
4
4
|
[![InstallSize][install-size-src]][install-size-src]
|
|
5
|
-
[![JSR][jsr-src]][jsr-href]
|
|
6
5
|
|
|
7
6
|
> internationalization (i18n) plugin for gunshi.
|
|
8
7
|
|
|
@@ -20,9 +19,6 @@ pnpm add @gunshi/plugin-i18n
|
|
|
20
19
|
# yarn
|
|
21
20
|
yarn add @gunshi/plugin-i18n
|
|
22
21
|
|
|
23
|
-
# deno
|
|
24
|
-
deno add jsr:@gunshi/plugin-i18n
|
|
25
|
-
|
|
26
22
|
# bun
|
|
27
23
|
bun add @gunshi/plugin-i18n
|
|
28
24
|
```
|
|
@@ -761,6 +757,4 @@ See the [API References](./docs/index.md)
|
|
|
761
757
|
|
|
762
758
|
[npm-version-src]: https://img.shields.io/npm/v/@gunshi/plugin-i18n?style=flat
|
|
763
759
|
[npm-version-href]: https://npmjs.com/package/@gunshi/plugin-i18n@alpha
|
|
764
|
-
[jsr-src]: https://jsr.io/badges/@gunshi/plugin-i18n
|
|
765
|
-
[jsr-href]: https://jsr.io/@gunshi/plugin-i18n
|
|
766
760
|
[install-size-src]: https://pkg-size.dev/badge/install/67599
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Args, Awaitable, Command, CommandContext, DefaultGunshiParams, ExtendContext, ExtractArgs, ExtractExtensions, GunshiParams, GunshiParamsConstraint, PluginWithExtension, Prettify } from "@gunshi/plugin";
|
|
2
|
-
//#region ../../node_modules/.pnpm/args-tokens@1.0.
|
|
3
|
-
//#region src/resolver.d.ts
|
|
2
|
+
//#region ../../node_modules/.pnpm/args-tokens@1.0.2/node_modules/args-tokens/lib/resolver.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* An argument schema definition for command-line argument parsing.
|
|
6
5
|
*
|
|
@@ -362,9 +361,9 @@ interface ArgSchema {
|
|
|
362
361
|
*/
|
|
363
362
|
toKebab?: true;
|
|
364
363
|
/**
|
|
365
|
-
* Names of other
|
|
364
|
+
* Names of other arguments that conflict with this argument.
|
|
366
365
|
*
|
|
367
|
-
* When this
|
|
366
|
+
* When this argument is used together with any of the conflicting arguments, the error is an
|
|
368
367
|
* `ArgResolveError` with type 'conflict' and the code `err:arg:conflict`
|
|
369
368
|
* ({@link ArgsValidationErrorKeys}.conflict). Its `values` has the `displayName` and `name` of
|
|
370
369
|
* the argument whose `conflicts` names the other one, and the `conflictDisplayName` and
|
|
@@ -374,9 +373,8 @@ interface ArgSchema {
|
|
|
374
373
|
*
|
|
375
374
|
* A positional argument can be on either side, such as `[file]` and `--stdin`. It conflicts when
|
|
376
375
|
* it is given, and it is shown by its name, such as `'file'` (in kebab-case with `toKebab`), as
|
|
377
|
-
* in its other errors. The message
|
|
378
|
-
* `
|
|
379
|
-
* `Optional argument '--stdin' conflicts with 'file'`.
|
|
376
|
+
* in its other errors. The message names the argument given as `name` first:
|
|
377
|
+
* `'file' conflicts with '--stdin'` or `'--stdin' conflicts with 'file'`.
|
|
380
378
|
*
|
|
381
379
|
* Conflicts only need to be defined on one side - if option A defines a conflict
|
|
382
380
|
* with option B, the conflict is automatically detected when both are used,
|
|
@@ -415,7 +413,7 @@ interface ArgSchema {
|
|
|
415
413
|
* }
|
|
416
414
|
* }
|
|
417
415
|
* // Usage: --summer --autumn reports an error
|
|
418
|
-
* // Error: "
|
|
416
|
+
* // Error: "'--summer' conflicts with '--autumn'"
|
|
419
417
|
* ```
|
|
420
418
|
*
|
|
421
419
|
* @example
|
|
@@ -455,7 +453,7 @@ interface ArgSchema {
|
|
|
455
453
|
* toKebab: true // Accessible as --autumn-season
|
|
456
454
|
* }
|
|
457
455
|
* }
|
|
458
|
-
* // Error: "
|
|
456
|
+
* // Error: "'--summer-season' conflicts with '--autumn-season'"
|
|
459
457
|
* ```
|
|
460
458
|
*/
|
|
461
459
|
conflicts?: string | string[];
|
package/lib/index.js
CHANGED
|
@@ -33,14 +33,14 @@ var en_US_default = {
|
|
|
33
33
|
CHOICES: "choices",
|
|
34
34
|
help: "Display this help message",
|
|
35
35
|
version: "Display this version",
|
|
36
|
-
"err:arg:required-option": "
|
|
36
|
+
"err:arg:required-option": "Option {$displayName} is required",
|
|
37
37
|
"err:arg:required-positional": "Positional argument {$displayName} is required",
|
|
38
38
|
"err:arg:invalid-type": "Invalid value for {$displayName}: expected {$expected}",
|
|
39
39
|
"err:arg:invalid-choice": "Invalid value for {$displayName}: expected one of {$choices}",
|
|
40
40
|
"err:arg:custom-parse": "Invalid value for {$displayName}: {$reason}",
|
|
41
41
|
"err:arg:unknown-option": "Unknown option: {$rawName}",
|
|
42
|
-
"err:arg:unexpected-value": "
|
|
43
|
-
"err:arg:missing-value": "
|
|
42
|
+
"err:arg:unexpected-value": "Option {$displayName} does not take a value",
|
|
43
|
+
"err:arg:missing-value": "Option {$displayName} requires a value",
|
|
44
44
|
"err:arg:missing-value:hint": "(to pass '{$next}' as its value, write '{$suggestion}')",
|
|
45
45
|
"err:arg:conflict": "{$displayName} conflicts with {$conflictDisplayName}",
|
|
46
46
|
"err:arg:invalid-default": "Invalid default for {$displayName}: {$actual} is not one of {$choices}",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gunshi/plugin-i18n",
|
|
3
3
|
"description": "internationalization plugin for gunshi",
|
|
4
|
-
"version": "1.0.0-rc.
|
|
4
|
+
"version": "1.0.0-rc.5",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "kazuya kawaguchi",
|
|
7
7
|
"email": "kawakazu80@gmail.com"
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@gunshi/plugin": "1.0.0-rc.
|
|
56
|
+
"@gunshi/plugin": "1.0.0-rc.5"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@gunshi/plugin-global": "1.0.0-rc.
|
|
59
|
+
"@gunshi/plugin-global": "1.0.0-rc.5"
|
|
60
60
|
},
|
|
61
61
|
"peerDependenciesMeta": {
|
|
62
62
|
"@gunshi/plugin-global": {
|
|
@@ -64,24 +64,19 @@
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@gunshi/bone": "1.0.0-rc.
|
|
68
|
-
"@gunshi/plugin-global": "1.0.0-rc.
|
|
69
|
-
"@gunshi/plugin-renderer": "1.0.0-rc.
|
|
70
|
-
"@gunshi/resources": "1.0.0-rc.
|
|
71
|
-
"@gunshi/shared": "1.0.0-rc.
|
|
67
|
+
"@gunshi/bone": "1.0.0-rc.5",
|
|
68
|
+
"@gunshi/plugin-global": "1.0.0-rc.5",
|
|
69
|
+
"@gunshi/plugin-renderer": "1.0.0-rc.5",
|
|
70
|
+
"@gunshi/resources": "1.0.0-rc.5",
|
|
71
|
+
"@gunshi/shared": "1.0.0-rc.5",
|
|
72
72
|
"@intlify/core-base": "12.0.0-alpha.7",
|
|
73
|
-
"
|
|
74
|
-
"gunshi": "1.0.0-rc.4",
|
|
75
|
-
"jsr": "^0.14.3",
|
|
76
|
-
"jsr-exports-lint": "^0.4.2",
|
|
73
|
+
"gunshi": "1.0.0-rc.5",
|
|
77
74
|
"messageformat": "4.1.0",
|
|
78
75
|
"publint": "^0.3.20",
|
|
79
76
|
"tsdown": "0.22.14"
|
|
80
77
|
},
|
|
81
78
|
"scripts": {
|
|
82
79
|
"build": "tsdown",
|
|
83
|
-
"build:docs": "tsx ../../scripts/api-references.ts"
|
|
84
|
-
"lint:jsr": "jsr publish --dry-run --allow-dirty",
|
|
85
|
-
"typecheck:deno": "deno check --import-map=../../importmap.json ./src"
|
|
80
|
+
"build:docs": "tsx ../../scripts/api-references.ts"
|
|
86
81
|
}
|
|
87
82
|
}
|