@gunshi/plugin-global 0.27.0-beta.3 → 0.27.0-beta.4
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 +4 -0
- package/lib/index.js +37 -0
- package/package.json +7 -7
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { Awaitable, PluginWithExtension } from "@gunshi/plugin";
|
|
2
2
|
|
|
3
3
|
//#region src/extension.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* @author kazuya kawaguchi (a.k.a. kazupon)
|
|
6
|
+
* @license MIT
|
|
7
|
+
*/
|
|
4
8
|
|
|
5
9
|
/**
|
|
6
10
|
* Extended command context which provides utilities via global options plugin.
|
package/lib/index.js
CHANGED
|
@@ -41,6 +41,10 @@ function namespacedId(id) {
|
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region src/types.ts
|
|
43
43
|
/**
|
|
44
|
+
* @author kazuya kawaguchi (a.k.a. kazupon)
|
|
45
|
+
* @license MIT
|
|
46
|
+
*/
|
|
47
|
+
/**
|
|
44
48
|
* The unique identifier for the global options plugin.
|
|
45
49
|
*/
|
|
46
50
|
const pluginId = namespacedId("global");
|
|
@@ -48,6 +52,10 @@ const pluginId = namespacedId("global");
|
|
|
48
52
|
//#endregion
|
|
49
53
|
//#region src/decorator.ts
|
|
50
54
|
/**
|
|
55
|
+
* @author kazuya kawaguchi (a.k.a. kazupon)
|
|
56
|
+
* @license MIT
|
|
57
|
+
*/
|
|
58
|
+
/**
|
|
51
59
|
* Decorator function to extend the command with global options.
|
|
52
60
|
*
|
|
53
61
|
* @param baseRunner - The base command runner
|
|
@@ -121,6 +129,35 @@ function extension(ctx) {
|
|
|
121
129
|
//#endregion
|
|
122
130
|
//#region src/index.ts
|
|
123
131
|
/**
|
|
132
|
+
* The entry point of global options plugin
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```js
|
|
136
|
+
* import global from '@gunshi/plugin-global'
|
|
137
|
+
* import { cli } from 'gunshi'
|
|
138
|
+
*
|
|
139
|
+
* const entry = (ctx) => {
|
|
140
|
+
* // ...
|
|
141
|
+
* }
|
|
142
|
+
*
|
|
143
|
+
* await cli(process.argv.slice(2), entry, {
|
|
144
|
+
* // ...
|
|
145
|
+
*
|
|
146
|
+
* plugins: [
|
|
147
|
+
* global()
|
|
148
|
+
* ],
|
|
149
|
+
*
|
|
150
|
+
* // ...
|
|
151
|
+
* })
|
|
152
|
+
* ```
|
|
153
|
+
*
|
|
154
|
+
* @module
|
|
155
|
+
*/
|
|
156
|
+
/**
|
|
157
|
+
* @author kazuya kawaguchi (a.k.a. kazupon)
|
|
158
|
+
* @license MIT
|
|
159
|
+
*/
|
|
160
|
+
/**
|
|
124
161
|
* global options plugin
|
|
125
162
|
*
|
|
126
163
|
* @returns A defined plugin as global options
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gunshi/plugin-global",
|
|
3
3
|
"description": "global options plugin for gunshi",
|
|
4
|
-
"version": "0.27.0-beta.
|
|
4
|
+
"version": "0.27.0-beta.4",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "kazuya kawaguchi",
|
|
7
7
|
"email": "kawakazu80@gmail.com"
|
|
@@ -51,17 +51,17 @@
|
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@gunshi/plugin": "0.27.0-beta.
|
|
54
|
+
"@gunshi/plugin": "0.27.0-beta.4"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"deno": "^2.5.
|
|
57
|
+
"deno": "^2.5.6",
|
|
58
58
|
"jsr": "^0.13.5",
|
|
59
59
|
"jsr-exports-lint": "^0.4.1",
|
|
60
|
-
"publint": "^0.3.
|
|
61
|
-
"tsdown": "0.15.
|
|
62
|
-
"typedoc": "^0.28.
|
|
60
|
+
"publint": "^0.3.15",
|
|
61
|
+
"tsdown": "0.15.12",
|
|
62
|
+
"typedoc": "^0.28.15",
|
|
63
63
|
"typedoc-plugin-markdown": "^4.9.0",
|
|
64
|
-
"@gunshi/shared": "0.27.0-beta.
|
|
64
|
+
"@gunshi/shared": "0.27.0-beta.4"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"build": "tsdown",
|