@gunshi/plugin-dryrun 1.0.0-rc.6 → 1.0.0-rc.8
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 -12
- package/lib/index.js +1 -2
- package/package.json +30 -31
package/lib/index.d.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { Awaitable, PluginWithExtension } from "@gunshi/plugin";
|
|
2
|
-
//#region src/index.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* The unique identifier for dry-run plugin.
|
|
5
4
|
*/
|
|
6
|
-
declare const pluginId:
|
|
5
|
+
export declare const pluginId: 'g:dryrun';
|
|
7
6
|
/**
|
|
8
7
|
* Type representing the unique identifier for dry-run plugin.
|
|
9
8
|
*/
|
|
10
|
-
type PluginId = typeof pluginId;
|
|
9
|
+
export type PluginId = typeof pluginId;
|
|
11
10
|
/**
|
|
12
11
|
* dry-run plugin options.
|
|
13
12
|
*/
|
|
14
|
-
interface DryRunPluginOptions {
|
|
13
|
+
export interface DryRunPluginOptions {
|
|
15
14
|
/**
|
|
16
15
|
* command values key for dry-run option.
|
|
17
16
|
*
|
|
@@ -36,7 +35,7 @@ interface DryRunPluginOptions {
|
|
|
36
35
|
/**
|
|
37
36
|
* dry-run output message option.
|
|
38
37
|
*/
|
|
39
|
-
interface DryRunMessage {
|
|
38
|
+
export interface DryRunMessage {
|
|
40
39
|
/**
|
|
41
40
|
* dry-run output message.
|
|
42
41
|
*/
|
|
@@ -45,7 +44,7 @@ interface DryRunMessage {
|
|
|
45
44
|
/**
|
|
46
45
|
* dry-run result option for `run()`.
|
|
47
46
|
*/
|
|
48
|
-
type DryRunRunResult<R> = {
|
|
47
|
+
export type DryRunRunResult<R> = {
|
|
49
48
|
result: R;
|
|
50
49
|
} | {
|
|
51
50
|
resolve: () => Awaitable<R>;
|
|
@@ -53,7 +52,7 @@ type DryRunRunResult<R> = {
|
|
|
53
52
|
/**
|
|
54
53
|
* dry-run result option for `wrap()`.
|
|
55
54
|
*/
|
|
56
|
-
type DryRunWrapResult<A extends unknown[], R> = {
|
|
55
|
+
export type DryRunWrapResult<A extends unknown[], R> = {
|
|
57
56
|
result: R;
|
|
58
57
|
} | {
|
|
59
58
|
resolve: (...args: A) => Awaitable<R>;
|
|
@@ -63,11 +62,11 @@ type DryRunWrapResult<A extends unknown[], R> = {
|
|
|
63
62
|
*
|
|
64
63
|
* Non-void operations require a fallback result option so dry-run mode can return a value without executing the side effect.
|
|
65
64
|
*/
|
|
66
|
-
type DryRunOptionsArg<R, O> = [Awaited<R>] extends [void] ? [options?: DryRunMessage & Partial<O>] : [options: DryRunMessage & O];
|
|
65
|
+
export type DryRunOptionsArg<R, O> = [Awaited<R>] extends [void] ? [options?: DryRunMessage & Partial<O>] : [options: DryRunMessage & O];
|
|
67
66
|
/**
|
|
68
67
|
* dry-run plugin extension.
|
|
69
68
|
*/
|
|
70
|
-
interface DryRunExtension {
|
|
69
|
+
export interface DryRunExtension {
|
|
71
70
|
/**
|
|
72
71
|
* Whether dry-run mode is enabled.
|
|
73
72
|
*/
|
|
@@ -95,6 +94,4 @@ interface DryRunExtension {
|
|
|
95
94
|
* @param options - A {@linkcode DryRunPluginOptions | dry-run plugin options}
|
|
96
95
|
* @returns A defined plugin as dry-run
|
|
97
96
|
*/
|
|
98
|
-
|
|
99
|
-
//#endregion
|
|
100
|
-
export { DryRunExtension, DryRunMessage, DryRunOptionsArg, DryRunPluginOptions, DryRunRunResult, DryRunWrapResult, PluginId, dryrun as default, pluginId };
|
|
97
|
+
export default function dryrun(options?: DryRunPluginOptions): PluginWithExtension<DryRunExtension>;
|
package/lib/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { plugin } from "@gunshi/plugin";
|
|
2
|
-
|
|
2
|
+
// src/index.ts
|
|
3
3
|
/**
|
|
4
4
|
* The entry point of dry-run plugin
|
|
5
5
|
*
|
|
@@ -127,5 +127,4 @@ function resolveDescriptionResources(options, description) {
|
|
|
127
127
|
"en-US": description
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
|
-
//#endregion
|
|
131
130
|
export { dryrun as default, pluginId };
|
package/package.json
CHANGED
|
@@ -1,38 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gunshi/plugin-dryrun",
|
|
3
|
+
"version": "1.0.0-rc.8",
|
|
3
4
|
"description": "dry-run option plugin for gunshi",
|
|
4
|
-
"
|
|
5
|
+
"keywords": [
|
|
6
|
+
"cli",
|
|
7
|
+
"dryrun",
|
|
8
|
+
"gunshi",
|
|
9
|
+
"plugin"
|
|
10
|
+
],
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/kazupon/gunshi/issues"
|
|
13
|
+
},
|
|
14
|
+
"license": "MIT",
|
|
5
15
|
"author": {
|
|
6
16
|
"name": "kazuya kawaguchi",
|
|
7
17
|
"email": "kawakazu80@gmail.com"
|
|
8
18
|
},
|
|
9
|
-
"license": "MIT",
|
|
10
|
-
"funding": "https://github.com/sponsors/kazupon",
|
|
11
|
-
"bugs": {
|
|
12
|
-
"url": "https://github.com/kazupon/gunshi/issues"
|
|
13
|
-
},
|
|
14
19
|
"repository": {
|
|
15
20
|
"type": "git",
|
|
16
21
|
"url": "git+https://github.com/kazupon/gunshi.git",
|
|
17
22
|
"directory": "packages/plugin-dryrun"
|
|
18
23
|
},
|
|
19
|
-
"
|
|
20
|
-
"gunshi",
|
|
21
|
-
"dryrun",
|
|
22
|
-
"plugin",
|
|
23
|
-
"cli"
|
|
24
|
-
],
|
|
25
|
-
"publishConfig": {
|
|
26
|
-
"access": "public"
|
|
27
|
-
},
|
|
28
|
-
"engines": {
|
|
29
|
-
"node": ">= 22"
|
|
30
|
-
},
|
|
31
|
-
"type": "module",
|
|
24
|
+
"funding": "https://github.com/sponsors/kazupon",
|
|
32
25
|
"files": [
|
|
33
26
|
"lib"
|
|
34
27
|
],
|
|
28
|
+
"type": "module",
|
|
35
29
|
"module": "lib/index.js",
|
|
30
|
+
"types": "lib/index.d.ts",
|
|
31
|
+
"typesVersions": {
|
|
32
|
+
"*": {
|
|
33
|
+
"*": [
|
|
34
|
+
"./lib/*",
|
|
35
|
+
"./*"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
36
39
|
"exports": {
|
|
37
40
|
".": {
|
|
38
41
|
"types": "./lib/index.d.ts",
|
|
@@ -42,24 +45,20 @@
|
|
|
42
45
|
},
|
|
43
46
|
"./package.json": "./package.json"
|
|
44
47
|
},
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
"*": {
|
|
48
|
-
"*": [
|
|
49
|
-
"./lib/*",
|
|
50
|
-
"./*"
|
|
51
|
-
]
|
|
52
|
-
}
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
53
50
|
},
|
|
54
51
|
"dependencies": {
|
|
55
|
-
"@gunshi/plugin": "1.0.0-rc.
|
|
52
|
+
"@gunshi/plugin": "1.0.0-rc.8"
|
|
56
53
|
},
|
|
57
54
|
"devDependencies": {
|
|
58
|
-
"publint": "^0.3.20"
|
|
59
|
-
|
|
55
|
+
"publint": "^0.3.20"
|
|
56
|
+
},
|
|
57
|
+
"engines": {
|
|
58
|
+
"node": ">= 22"
|
|
60
59
|
},
|
|
61
60
|
"scripts": {
|
|
62
|
-
"build": "
|
|
61
|
+
"build": "vp pack",
|
|
63
62
|
"build:docs": "tsx ../../scripts/api-references.ts"
|
|
64
63
|
}
|
|
65
64
|
}
|