@breadc/complete 0.8.9 → 0.9.1
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/dist/index.cjs +9 -20
- package/dist/index.mjs +9 -20
- package/package.json +12 -10
package/dist/index.cjs
CHANGED
|
@@ -85,28 +85,17 @@ function complete() {
|
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
87
|
function makeCompleteOption(breadc$1, allCommands, globalOptions) {
|
|
88
|
-
const command = {
|
|
89
|
-
async callback(result) {
|
|
90
|
-
const shell = detectShellType(result.options["shell"]);
|
|
91
|
-
const text = generate(shell, breadc$1, allCommands, globalOptions);
|
|
92
|
-
console.log(text);
|
|
93
|
-
return text;
|
|
94
|
-
},
|
|
95
|
-
format: "-c, --complete <shell>",
|
|
96
|
-
description: "Export shell complete script",
|
|
97
|
-
_arguments: [],
|
|
98
|
-
_options: [],
|
|
99
|
-
// @ts-ignore
|
|
100
|
-
option: void 0,
|
|
101
|
-
// @ts-ignore
|
|
102
|
-
alias: void 0,
|
|
103
|
-
// @ts-ignore
|
|
104
|
-
action: void 0
|
|
105
|
-
};
|
|
106
88
|
const node = breadc.makeTreeNode({
|
|
107
|
-
command,
|
|
108
89
|
next() {
|
|
109
90
|
return false;
|
|
91
|
+
},
|
|
92
|
+
finish() {
|
|
93
|
+
return (result) => {
|
|
94
|
+
const shell = detectShellType(result.options["shell"]);
|
|
95
|
+
const text = generate(shell, breadc$1, allCommands, globalOptions);
|
|
96
|
+
console.log(text);
|
|
97
|
+
return text;
|
|
98
|
+
};
|
|
110
99
|
}
|
|
111
100
|
});
|
|
112
101
|
const option = {
|
|
@@ -117,7 +106,7 @@ function makeCompleteOption(breadc$1, allCommands, globalOptions) {
|
|
|
117
106
|
initial: "",
|
|
118
107
|
order: 999999999 - 1,
|
|
119
108
|
description: "Export shell complete script",
|
|
120
|
-
|
|
109
|
+
parse() {
|
|
121
110
|
return node;
|
|
122
111
|
}
|
|
123
112
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -81,28 +81,17 @@ function complete() {
|
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
function makeCompleteOption(breadc, allCommands, globalOptions) {
|
|
84
|
-
const command = {
|
|
85
|
-
async callback(result) {
|
|
86
|
-
const shell = detectShellType(result.options["shell"]);
|
|
87
|
-
const text = generate(shell, breadc, allCommands, globalOptions);
|
|
88
|
-
console.log(text);
|
|
89
|
-
return text;
|
|
90
|
-
},
|
|
91
|
-
format: "-c, --complete <shell>",
|
|
92
|
-
description: "Export shell complete script",
|
|
93
|
-
_arguments: [],
|
|
94
|
-
_options: [],
|
|
95
|
-
// @ts-ignore
|
|
96
|
-
option: void 0,
|
|
97
|
-
// @ts-ignore
|
|
98
|
-
alias: void 0,
|
|
99
|
-
// @ts-ignore
|
|
100
|
-
action: void 0
|
|
101
|
-
};
|
|
102
84
|
const node = makeTreeNode({
|
|
103
|
-
command,
|
|
104
85
|
next() {
|
|
105
86
|
return false;
|
|
87
|
+
},
|
|
88
|
+
finish() {
|
|
89
|
+
return (result) => {
|
|
90
|
+
const shell = detectShellType(result.options["shell"]);
|
|
91
|
+
const text = generate(shell, breadc, allCommands, globalOptions);
|
|
92
|
+
console.log(text);
|
|
93
|
+
return text;
|
|
94
|
+
};
|
|
106
95
|
}
|
|
107
96
|
});
|
|
108
97
|
const option = {
|
|
@@ -113,7 +102,7 @@ function makeCompleteOption(breadc, allCommands, globalOptions) {
|
|
|
113
102
|
initial: "",
|
|
114
103
|
order: 999999999 - 1,
|
|
115
104
|
description: "Export shell complete script",
|
|
116
|
-
|
|
105
|
+
parse() {
|
|
117
106
|
return node;
|
|
118
107
|
}
|
|
119
108
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@breadc/complete",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Autocompletion generation support for Breadc",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"breadc",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"author": "XLor",
|
|
22
22
|
"sideEffects": false,
|
|
23
|
+
"type": "module",
|
|
23
24
|
"exports": {
|
|
24
25
|
".": {
|
|
25
26
|
"require": "./dist/index.cjs",
|
|
@@ -27,9 +28,9 @@
|
|
|
27
28
|
"types": "./dist/index.d.ts"
|
|
28
29
|
}
|
|
29
30
|
},
|
|
30
|
-
"main": "
|
|
31
|
-
"module": "
|
|
32
|
-
"types": "
|
|
31
|
+
"main": "dist/index.cjs",
|
|
32
|
+
"module": "dist/index.mjs",
|
|
33
|
+
"types": "dist/index.d.ts",
|
|
33
34
|
"files": [
|
|
34
35
|
"dist"
|
|
35
36
|
],
|
|
@@ -37,14 +38,15 @@
|
|
|
37
38
|
"omelette": "^0.4.17"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
|
-
"@types/node": "^18.
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"breadc": "0.
|
|
41
|
+
"@types/node": "^18.15.11",
|
|
42
|
+
"typescript": "^5.0.4",
|
|
43
|
+
"vitest": "0.30.1",
|
|
44
|
+
"@breadc/color": "0.9.1",
|
|
45
|
+
"breadc": "0.9.1"
|
|
44
46
|
},
|
|
45
47
|
"peerDependencies": {
|
|
46
|
-
"breadc": "0.
|
|
47
|
-
"
|
|
48
|
+
"@breadc/color": "0.9.1",
|
|
49
|
+
"breadc": "0.9.1"
|
|
48
50
|
},
|
|
49
51
|
"scripts": {
|
|
50
52
|
"build": "unbuild",
|