@gunshi/plugin-completion 0.27.4 → 0.27.6
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.js +6 -6
- package/package.json +8 -8
package/lib/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { RootCommand } from "@bomb.sh/tab";
|
|
7
7
|
import { createCommandContext, plugin } from "@gunshi/plugin";
|
|
8
8
|
|
|
9
|
-
//#region ../../node_modules/.pnpm/args-tokens@0.23.
|
|
9
|
+
//#region ../../node_modules/.pnpm/args-tokens@0.23.1/node_modules/args-tokens/lib/utils-CxvkckUD.js
|
|
10
10
|
/**
|
|
11
11
|
* Entry point of utils.
|
|
12
12
|
*
|
|
@@ -420,11 +420,11 @@ function completion(options = {}) {
|
|
|
420
420
|
}
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
|
-
async function registerCompletion({ name, cmd, config, i18nPluginId
|
|
423
|
+
async function registerCompletion({ name, cmd, config, i18nPluginId, i18n, t, isBombshellRoot = false }) {
|
|
424
424
|
const resolvedCmd = await resolveLazyCommand(cmd);
|
|
425
425
|
const extensions = Object.create(null);
|
|
426
|
-
if (i18n) extensions[i18nPluginId
|
|
427
|
-
key: Symbol(i18nPluginId
|
|
426
|
+
if (i18n) extensions[i18nPluginId] = {
|
|
427
|
+
key: Symbol(i18nPluginId),
|
|
428
428
|
factory: () => i18n
|
|
429
429
|
};
|
|
430
430
|
const ctx = await createCommandContext({
|
|
@@ -448,14 +448,14 @@ function resolveCompletionHandler(name, optionOrArgKey, config, i18n) {
|
|
|
448
448
|
for (const item of handler({ locale: i18n?.locale })) complete(item.value, item.description || "");
|
|
449
449
|
};
|
|
450
450
|
}
|
|
451
|
-
async function handleSubCommands(t, subCommands, i18nPluginId
|
|
451
|
+
async function handleSubCommands(t, subCommands, i18nPluginId, config = {}, i18n) {
|
|
452
452
|
for (const [name, cmd] of subCommands) {
|
|
453
453
|
if (cmd.internal || cmd.entry || name === "complete") continue;
|
|
454
454
|
await registerCompletion({
|
|
455
455
|
name,
|
|
456
456
|
cmd,
|
|
457
457
|
config,
|
|
458
|
-
i18nPluginId
|
|
458
|
+
i18nPluginId,
|
|
459
459
|
i18n,
|
|
460
460
|
t
|
|
461
461
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gunshi/plugin-completion",
|
|
3
3
|
"description": "completion plugin for gunshi",
|
|
4
|
-
"version": "0.27.
|
|
4
|
+
"version": "0.27.6",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "kazuya kawaguchi",
|
|
7
7
|
"email": "kawakazu80@gmail.com"
|
|
@@ -52,15 +52,15 @@
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@bomb.sh/tab": "^0.0.
|
|
56
|
-
"@gunshi/plugin": "0.27.
|
|
55
|
+
"@bomb.sh/tab": "^0.0.11",
|
|
56
|
+
"@gunshi/plugin": "0.27.6"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@gunshi/plugin-i18n": "0.27.
|
|
59
|
+
"@gunshi/plugin-i18n": "0.27.6"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@types/node": "^25.0.
|
|
63
|
-
"deno": "^2.
|
|
62
|
+
"@types/node": "^25.0.3",
|
|
63
|
+
"deno": "^2.6.3",
|
|
64
64
|
"jsr": "^0.13.5",
|
|
65
65
|
"jsr-exports-lint": "^0.4.1",
|
|
66
66
|
"publint": "^0.3.16",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"tsdown": "0.15.12",
|
|
69
69
|
"typedoc": "^0.28.15",
|
|
70
70
|
"typedoc-plugin-markdown": "^4.9.0",
|
|
71
|
-
"@gunshi/plugin-i18n": "0.27.
|
|
72
|
-
"@gunshi/shared": "0.27.
|
|
71
|
+
"@gunshi/plugin-i18n": "0.27.6",
|
|
72
|
+
"@gunshi/shared": "0.27.6"
|
|
73
73
|
},
|
|
74
74
|
"scripts": {
|
|
75
75
|
"build": "tsdown",
|