@gunshi/shared 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/lib/index.d.ts +9 -13
- package/lib/index.js +4 -4
- package/package.json +4 -9
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/args-tokens@1.0.
|
|
2
|
-
//#region src/parser.d.ts
|
|
1
|
+
//#region ../../node_modules/.pnpm/args-tokens@1.0.2/node_modules/args-tokens/lib/parser-DvPxBZG9.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Entry point of argument parser.
|
|
5
4
|
*
|
|
@@ -56,8 +55,7 @@ interface ArgToken {
|
|
|
56
55
|
inlineValue?: boolean | undefined;
|
|
57
56
|
}
|
|
58
57
|
//#endregion
|
|
59
|
-
//#region ../../node_modules/.pnpm/args-tokens@1.0.
|
|
60
|
-
//#region src/resolver.d.ts
|
|
58
|
+
//#region ../../node_modules/.pnpm/args-tokens@1.0.2/node_modules/args-tokens/lib/resolver.d.ts
|
|
61
59
|
/**
|
|
62
60
|
* An argument schema definition for command-line argument parsing.
|
|
63
61
|
*
|
|
@@ -419,9 +417,9 @@ interface ArgSchema {
|
|
|
419
417
|
*/
|
|
420
418
|
toKebab?: true;
|
|
421
419
|
/**
|
|
422
|
-
* Names of other
|
|
420
|
+
* Names of other arguments that conflict with this argument.
|
|
423
421
|
*
|
|
424
|
-
* When this
|
|
422
|
+
* When this argument is used together with any of the conflicting arguments, the error is an
|
|
425
423
|
* `ArgResolveError` with type 'conflict' and the code `err:arg:conflict`
|
|
426
424
|
* ({@link ArgsValidationErrorKeys}.conflict). Its `values` has the `displayName` and `name` of
|
|
427
425
|
* the argument whose `conflicts` names the other one, and the `conflictDisplayName` and
|
|
@@ -431,9 +429,8 @@ interface ArgSchema {
|
|
|
431
429
|
*
|
|
432
430
|
* A positional argument can be on either side, such as `[file]` and `--stdin`. It conflicts when
|
|
433
431
|
* it is given, and it is shown by its name, such as `'file'` (in kebab-case with `toKebab`), as
|
|
434
|
-
* in its other errors. The message
|
|
435
|
-
* `
|
|
436
|
-
* `Optional argument '--stdin' conflicts with 'file'`.
|
|
432
|
+
* in its other errors. The message names the argument given as `name` first:
|
|
433
|
+
* `'file' conflicts with '--stdin'` or `'--stdin' conflicts with 'file'`.
|
|
437
434
|
*
|
|
438
435
|
* Conflicts only need to be defined on one side - if option A defines a conflict
|
|
439
436
|
* with option B, the conflict is automatically detected when both are used,
|
|
@@ -472,7 +469,7 @@ interface ArgSchema {
|
|
|
472
469
|
* }
|
|
473
470
|
* }
|
|
474
471
|
* // Usage: --summer --autumn reports an error
|
|
475
|
-
* // Error: "
|
|
472
|
+
* // Error: "'--summer' conflicts with '--autumn'"
|
|
476
473
|
* ```
|
|
477
474
|
*
|
|
478
475
|
* @example
|
|
@@ -512,7 +509,7 @@ interface ArgSchema {
|
|
|
512
509
|
* toKebab: true // Accessible as --autumn-season
|
|
513
510
|
* }
|
|
514
511
|
* }
|
|
515
|
-
* // Error: "
|
|
512
|
+
* // Error: "'--summer-season' conflicts with '--autumn-season'"
|
|
516
513
|
* ```
|
|
517
514
|
*/
|
|
518
515
|
conflicts?: string | string[];
|
|
@@ -1240,8 +1237,7 @@ type CommandExamplesFetcher<G extends GunshiParamsConstraint = DefaultGunshiPara
|
|
|
1240
1237
|
*/
|
|
1241
1238
|
type CommandRunner<G extends GunshiParamsConstraint = DefaultGunshiParams> = (ctx: Readonly<CommandContext<G>>) => Awaitable<string | void>;
|
|
1242
1239
|
//#endregion
|
|
1243
|
-
//#region ../../node_modules/.pnpm/args-tokens@1.0.
|
|
1244
|
-
//#region src/utils.d.ts
|
|
1240
|
+
//#region ../../node_modules/.pnpm/args-tokens@1.0.2/node_modules/args-tokens/lib/utils.d.ts
|
|
1245
1241
|
/**
|
|
1246
1242
|
* Entry point of utils.
|
|
1247
1243
|
*
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/args-tokens@1.0.
|
|
1
|
+
//#region ../../node_modules/.pnpm/args-tokens@1.0.2/node_modules/args-tokens/lib/utils.js
|
|
2
2
|
/**
|
|
3
3
|
* Entry point of utils.
|
|
4
4
|
*
|
|
@@ -232,14 +232,14 @@ var en_US_default = {
|
|
|
232
232
|
CHOICES: "choices",
|
|
233
233
|
help: "Display this help message",
|
|
234
234
|
version: "Display this version",
|
|
235
|
-
"err:arg:required-option": "
|
|
235
|
+
"err:arg:required-option": "Option {$displayName} is required",
|
|
236
236
|
"err:arg:required-positional": "Positional argument {$displayName} is required",
|
|
237
237
|
"err:arg:invalid-type": "Invalid value for {$displayName}: expected {$expected}",
|
|
238
238
|
"err:arg:invalid-choice": "Invalid value for {$displayName}: expected one of {$choices}",
|
|
239
239
|
"err:arg:custom-parse": "Invalid value for {$displayName}: {$reason}",
|
|
240
240
|
"err:arg:unknown-option": "Unknown option: {$rawName}",
|
|
241
|
-
"err:arg:unexpected-value": "
|
|
242
|
-
"err:arg:missing-value": "
|
|
241
|
+
"err:arg:unexpected-value": "Option {$displayName} does not take a value",
|
|
242
|
+
"err:arg:missing-value": "Option {$displayName} requires a value",
|
|
243
243
|
"err:arg:missing-value:hint": "(to pass '{$next}' as its value, write '{$suggestion}')",
|
|
244
244
|
"err:arg:conflict": "{$displayName} conflicts with {$conflictDisplayName}",
|
|
245
245
|
"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/shared",
|
|
3
3
|
"description": "shared utils 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"
|
|
@@ -50,17 +50,12 @@
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@gunshi/resources": "1.0.0-rc.
|
|
54
|
-
"
|
|
55
|
-
"gunshi": "1.0.0-rc.4",
|
|
56
|
-
"jsr": "^0.14.3",
|
|
57
|
-
"jsr-exports-lint": "^0.4.2",
|
|
53
|
+
"@gunshi/resources": "1.0.0-rc.5",
|
|
54
|
+
"gunshi": "1.0.0-rc.5",
|
|
58
55
|
"publint": "^0.3.20",
|
|
59
56
|
"tsdown": "0.22.14"
|
|
60
57
|
},
|
|
61
58
|
"scripts": {
|
|
62
|
-
"build": "tsdown"
|
|
63
|
-
"lint:jsr": "jsr publish --dry-run --allow-dirty",
|
|
64
|
-
"typecheck:deno": "deno check --import-map=../../importmap.json ./src"
|
|
59
|
+
"build": "tsdown"
|
|
65
60
|
}
|
|
66
61
|
}
|