uni-run 1.0.7 → 1.0.9
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/arg-helper.cjs +28 -22
- package/dist/arg-helper.d.cts +26 -20
- package/dist/arg-helper.d.mts +26 -20
- package/dist/arg-helper.mjs +28 -22
- package/dist/arg.d.cts +46 -36
- package/dist/arg.d.mts +46 -36
- package/dist/execution/index.cjs +55 -31
- package/dist/execution/index.d.cts +3 -1
- package/dist/execution/index.d.mts +3 -1
- package/dist/execution/index.mjs +55 -31
- package/dist/utils/debounce.d.cts +1 -1
- package/dist/utils/debounce.d.mts +1 -1
- package/package.json +8 -8
package/dist/arg-helper.cjs
CHANGED
|
@@ -8,21 +8,18 @@ exports.mapFlagsToOptions = mapFlagsToOptions;
|
|
|
8
8
|
const noarg_1 = __importDefault(require("noarg"));
|
|
9
9
|
exports.executionConfig = noarg_1.default.defineConfig({
|
|
10
10
|
flags: {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
// Watch/Reload flags
|
|
12
|
+
'key-reload': noarg_1.default.boolean()
|
|
13
|
+
.aliases('k')
|
|
13
14
|
.default(true)
|
|
14
15
|
.description("Reload the page when pressing 'Ctrl+R' or 'F5'"),
|
|
15
16
|
watch: noarg_1.default.boolean()
|
|
16
17
|
.aliases('w')
|
|
17
18
|
.default(true)
|
|
18
|
-
.description('Watch for changes'),
|
|
19
|
+
.description('Watch for file changes and reload the script'),
|
|
19
20
|
exit: noarg_1.default.boolean()
|
|
20
21
|
.default(false)
|
|
21
22
|
.description('Exit after code execution, disabling `watch` and `reloadKey`'),
|
|
22
|
-
clear: noarg_1.default.boolean()
|
|
23
|
-
.aliases('c')
|
|
24
|
-
.default(true)
|
|
25
|
-
.description('Clear the console before running the script'),
|
|
26
23
|
delay: noarg_1.default.number()
|
|
27
24
|
.aliases('d')
|
|
28
25
|
.default(100)
|
|
@@ -31,27 +28,35 @@ exports.executionConfig = noarg_1.default.defineConfig({
|
|
|
31
28
|
.aliases('e')
|
|
32
29
|
.default([])
|
|
33
30
|
.description('Looks for changes only of the given extensions'),
|
|
34
|
-
|
|
35
|
-
.aliases('
|
|
31
|
+
focus: noarg_1.default.array(noarg_1.default.string())
|
|
32
|
+
.aliases('f')
|
|
36
33
|
.default([])
|
|
37
|
-
.description('Only watch the given
|
|
38
|
-
|
|
39
|
-
.aliases('
|
|
34
|
+
.description('Only watch the given items. `chokidar` syntax'),
|
|
35
|
+
ignore: noarg_1.default.array(noarg_1.default.string())
|
|
36
|
+
.aliases('ig')
|
|
40
37
|
.default([])
|
|
41
|
-
.description('Exclude the given
|
|
38
|
+
.description('Exclude the given items. `gitignore` syntax'),
|
|
39
|
+
// Benchmark flags
|
|
42
40
|
bench: noarg_1.default.boolean()
|
|
43
41
|
.aliases('b')
|
|
44
42
|
.description('Calculate the execution time'),
|
|
45
|
-
|
|
43
|
+
'bench-prefix': noarg_1.default.string()
|
|
46
44
|
.aliases('bp')
|
|
47
45
|
.minLength(1)
|
|
48
46
|
.description('The prefix to show before the execution time'),
|
|
47
|
+
clear: noarg_1.default.boolean()
|
|
48
|
+
.aliases('c')
|
|
49
|
+
.default(true)
|
|
50
|
+
.description('Clear the console before running the script'),
|
|
49
51
|
cwd: noarg_1.default.string()
|
|
50
52
|
.default(process.cwd())
|
|
51
53
|
.description('Current working directory'),
|
|
52
54
|
shell: noarg_1.default.boolean()
|
|
53
55
|
.default(false)
|
|
54
56
|
.description('Run the script in a shell for more low-level control'),
|
|
57
|
+
'safe-stdin': noarg_1.default.boolean()
|
|
58
|
+
.default(false)
|
|
59
|
+
.description('Disable raw mode for stdin (useful for some scripts)'),
|
|
55
60
|
info: noarg_1.default.boolean()
|
|
56
61
|
.default(false)
|
|
57
62
|
.description('Show information about the script'),
|
|
@@ -62,12 +67,12 @@ exports.executionConfig = noarg_1.default.defineConfig({
|
|
|
62
67
|
.default([])
|
|
63
68
|
.description('Environment variables'),
|
|
64
69
|
// Extra flags
|
|
65
|
-
|
|
70
|
+
'node-dev': noarg_1.default.boolean()
|
|
66
71
|
.default(false)
|
|
67
72
|
.description('Set NODE_ENV to "development"'),
|
|
68
73
|
tsn: noarg_1.default.boolean()
|
|
69
74
|
.default(false)
|
|
70
|
-
.description('Run the script with ts-node'),
|
|
75
|
+
.description('Run the script with ts-node (TypeScript)'),
|
|
71
76
|
},
|
|
72
77
|
listArgument: {
|
|
73
78
|
name: 'args for script',
|
|
@@ -84,22 +89,23 @@ function mapFlagsToOptions(flags, bin) {
|
|
|
84
89
|
return {
|
|
85
90
|
cwd: flags.cwd,
|
|
86
91
|
shell: flags.shell,
|
|
92
|
+
stdinSafeMode: flags['safe-stdin'],
|
|
87
93
|
showInfo: flags.info,
|
|
88
94
|
showTime: flags.time,
|
|
89
|
-
benchmark: (_a = flags.bench) !== null && _a !== void 0 ? _a : Boolean(flags
|
|
90
|
-
benchmarkPrefix: flags
|
|
95
|
+
benchmark: (_a = flags.bench) !== null && _a !== void 0 ? _a : Boolean(flags['bench-prefix']),
|
|
96
|
+
benchmarkPrefix: flags['bench-prefix'],
|
|
91
97
|
clearOnReload: flags.clear,
|
|
92
|
-
keystrokeReload: flags.exit ? false : flags
|
|
98
|
+
keystrokeReload: flags.exit ? false : flags['key-reload'],
|
|
93
99
|
watch: flags.exit ? false : flags.watch,
|
|
94
100
|
watchDelay: flags.delay,
|
|
95
|
-
|
|
96
|
-
|
|
101
|
+
watchFocus: flags.focus.length ? flags.focus : [flags.cwd],
|
|
102
|
+
watchIgnore: flags.ignore,
|
|
97
103
|
watchExtensions: (flags.ext.length ? flags.ext : bin === null || bin === void 0 ? void 0 : bin.getRelatedExts()) || [],
|
|
98
104
|
tsNode: flags['tsn'],
|
|
99
105
|
env: Object.assign(Object.assign({}, flags.env.reduce((acc, env) => {
|
|
100
106
|
const [key, value] = env.split('=');
|
|
101
107
|
acc[key] = value;
|
|
102
108
|
return acc;
|
|
103
|
-
}, {})), (flags
|
|
109
|
+
}, {})), (flags['node-dev'] ? { NODE_ENV: 'development' } : {})),
|
|
104
110
|
};
|
|
105
111
|
}
|
package/dist/arg-helper.d.cts
CHANGED
|
@@ -3,8 +3,8 @@ import type { app } from "./arg.cjs";
|
|
|
3
3
|
import Executor from "./builtin-bin/Executor.cjs";
|
|
4
4
|
export declare const executionConfig: {
|
|
5
5
|
readonly flags: {
|
|
6
|
-
readonly
|
|
7
|
-
aliases: ["
|
|
6
|
+
readonly 'key-reload': import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
7
|
+
aliases: ["k"];
|
|
8
8
|
required: true;
|
|
9
9
|
default: true;
|
|
10
10
|
description: "Reload the page when pressing 'Ctrl+R' or 'F5'";
|
|
@@ -13,19 +13,13 @@ export declare const executionConfig: {
|
|
|
13
13
|
aliases: ["w"];
|
|
14
14
|
required: true;
|
|
15
15
|
default: true;
|
|
16
|
-
description: "Watch for changes";
|
|
16
|
+
description: "Watch for file changes and reload the script";
|
|
17
17
|
}>;
|
|
18
18
|
readonly exit: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
19
19
|
required: true;
|
|
20
20
|
default: false;
|
|
21
21
|
description: "Exit after code execution, disabling `watch` and `reloadKey`";
|
|
22
22
|
}>;
|
|
23
|
-
readonly clear: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
24
|
-
aliases: ["c"];
|
|
25
|
-
required: true;
|
|
26
|
-
default: true;
|
|
27
|
-
description: "Clear the console before running the script";
|
|
28
|
-
}>;
|
|
29
23
|
readonly delay: import("noarg/dist/schema/TypeNumber.cjs").TypeNumber<{
|
|
30
24
|
aliases: ["d"];
|
|
31
25
|
required: true;
|
|
@@ -39,29 +33,35 @@ export declare const executionConfig: {
|
|
|
39
33
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
40
34
|
description: "Looks for changes only of the given extensions";
|
|
41
35
|
}>;
|
|
42
|
-
readonly
|
|
43
|
-
aliases: ["
|
|
36
|
+
readonly focus: import("noarg/dist/schema/TypeArray.cjs").TypeArray<{
|
|
37
|
+
aliases: ["f"];
|
|
44
38
|
required: true;
|
|
45
39
|
default: never[];
|
|
46
40
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
47
|
-
description: "Only watch the given
|
|
41
|
+
description: "Only watch the given items. `chokidar` syntax";
|
|
48
42
|
}>;
|
|
49
|
-
readonly
|
|
50
|
-
aliases: ["
|
|
43
|
+
readonly ignore: import("noarg/dist/schema/TypeArray.cjs").TypeArray<{
|
|
44
|
+
aliases: ["ig"];
|
|
51
45
|
required: true;
|
|
52
46
|
default: never[];
|
|
53
47
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
54
|
-
description: "Exclude the given
|
|
48
|
+
description: "Exclude the given items. `gitignore` syntax";
|
|
55
49
|
}>;
|
|
56
50
|
readonly bench: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
57
51
|
aliases: ["b"];
|
|
58
52
|
description: "Calculate the execution time";
|
|
59
53
|
}>;
|
|
60
|
-
readonly
|
|
54
|
+
readonly 'bench-prefix': import("noarg/dist/schema/TypeString.cjs").TypeString<{
|
|
61
55
|
aliases: ["bp"];
|
|
62
56
|
minLength: 1;
|
|
63
57
|
description: "The prefix to show before the execution time";
|
|
64
58
|
}>;
|
|
59
|
+
readonly clear: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
60
|
+
aliases: ["c"];
|
|
61
|
+
required: true;
|
|
62
|
+
default: true;
|
|
63
|
+
description: "Clear the console before running the script";
|
|
64
|
+
}>;
|
|
65
65
|
readonly cwd: import("noarg/dist/schema/TypeString.cjs").TypeString<{
|
|
66
66
|
required: true;
|
|
67
67
|
default: string;
|
|
@@ -72,6 +72,11 @@ export declare const executionConfig: {
|
|
|
72
72
|
default: false;
|
|
73
73
|
description: "Run the script in a shell for more low-level control";
|
|
74
74
|
}>;
|
|
75
|
+
readonly 'safe-stdin': import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
76
|
+
required: true;
|
|
77
|
+
default: false;
|
|
78
|
+
description: "Disable raw mode for stdin (useful for some scripts)";
|
|
79
|
+
}>;
|
|
75
80
|
readonly info: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
76
81
|
required: true;
|
|
77
82
|
default: false;
|
|
@@ -88,7 +93,7 @@ export declare const executionConfig: {
|
|
|
88
93
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
89
94
|
description: "Environment variables";
|
|
90
95
|
}>;
|
|
91
|
-
readonly
|
|
96
|
+
readonly 'node-dev': import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
92
97
|
required: true;
|
|
93
98
|
default: false;
|
|
94
99
|
description: "Set NODE_ENV to \"development\"";
|
|
@@ -96,7 +101,7 @@ export declare const executionConfig: {
|
|
|
96
101
|
readonly tsn: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
97
102
|
required: true;
|
|
98
103
|
default: false;
|
|
99
|
-
description: "Run the script with ts-node";
|
|
104
|
+
description: "Run the script with ts-node (TypeScript)";
|
|
100
105
|
}>;
|
|
101
106
|
};
|
|
102
107
|
readonly listArgument: {
|
|
@@ -113,6 +118,7 @@ export type ExecuteOptions = ReturnType<typeof mapFlagsToOptions>;
|
|
|
113
118
|
export declare function mapFlagsToOptions(flags: NoArg.InferFlags<typeof app>, bin?: Executor): {
|
|
114
119
|
cwd: string;
|
|
115
120
|
shell: boolean;
|
|
121
|
+
stdinSafeMode: boolean;
|
|
116
122
|
showInfo: boolean;
|
|
117
123
|
showTime: boolean;
|
|
118
124
|
benchmark: boolean;
|
|
@@ -121,8 +127,8 @@ export declare function mapFlagsToOptions(flags: NoArg.InferFlags<typeof app>, b
|
|
|
121
127
|
keystrokeReload: boolean;
|
|
122
128
|
watch: boolean;
|
|
123
129
|
watchDelay: number;
|
|
124
|
-
|
|
125
|
-
|
|
130
|
+
watchFocus: string[];
|
|
131
|
+
watchIgnore: string[];
|
|
126
132
|
watchExtensions: string[];
|
|
127
133
|
tsNode: boolean;
|
|
128
134
|
env: NodeJS.ProcessEnv;
|
package/dist/arg-helper.d.mts
CHANGED
|
@@ -3,8 +3,8 @@ import type { app } from "./arg.mjs";
|
|
|
3
3
|
import Executor from "./builtin-bin/Executor.mjs";
|
|
4
4
|
export declare const executionConfig: {
|
|
5
5
|
readonly flags: {
|
|
6
|
-
readonly
|
|
7
|
-
aliases: ["
|
|
6
|
+
readonly 'key-reload': import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
7
|
+
aliases: ["k"];
|
|
8
8
|
required: true;
|
|
9
9
|
default: true;
|
|
10
10
|
description: "Reload the page when pressing 'Ctrl+R' or 'F5'";
|
|
@@ -13,19 +13,13 @@ export declare const executionConfig: {
|
|
|
13
13
|
aliases: ["w"];
|
|
14
14
|
required: true;
|
|
15
15
|
default: true;
|
|
16
|
-
description: "Watch for changes";
|
|
16
|
+
description: "Watch for file changes and reload the script";
|
|
17
17
|
}>;
|
|
18
18
|
readonly exit: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
19
19
|
required: true;
|
|
20
20
|
default: false;
|
|
21
21
|
description: "Exit after code execution, disabling `watch` and `reloadKey`";
|
|
22
22
|
}>;
|
|
23
|
-
readonly clear: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
24
|
-
aliases: ["c"];
|
|
25
|
-
required: true;
|
|
26
|
-
default: true;
|
|
27
|
-
description: "Clear the console before running the script";
|
|
28
|
-
}>;
|
|
29
23
|
readonly delay: import("noarg/dist/schema/TypeNumber.cjs").TypeNumber<{
|
|
30
24
|
aliases: ["d"];
|
|
31
25
|
required: true;
|
|
@@ -39,29 +33,35 @@ export declare const executionConfig: {
|
|
|
39
33
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
40
34
|
description: "Looks for changes only of the given extensions";
|
|
41
35
|
}>;
|
|
42
|
-
readonly
|
|
43
|
-
aliases: ["
|
|
36
|
+
readonly focus: import("noarg/dist/schema/TypeArray.cjs").TypeArray<{
|
|
37
|
+
aliases: ["f"];
|
|
44
38
|
required: true;
|
|
45
39
|
default: never[];
|
|
46
40
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
47
|
-
description: "Only watch the given
|
|
41
|
+
description: "Only watch the given items. `chokidar` syntax";
|
|
48
42
|
}>;
|
|
49
|
-
readonly
|
|
50
|
-
aliases: ["
|
|
43
|
+
readonly ignore: import("noarg/dist/schema/TypeArray.cjs").TypeArray<{
|
|
44
|
+
aliases: ["ig"];
|
|
51
45
|
required: true;
|
|
52
46
|
default: never[];
|
|
53
47
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
54
|
-
description: "Exclude the given
|
|
48
|
+
description: "Exclude the given items. `gitignore` syntax";
|
|
55
49
|
}>;
|
|
56
50
|
readonly bench: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
57
51
|
aliases: ["b"];
|
|
58
52
|
description: "Calculate the execution time";
|
|
59
53
|
}>;
|
|
60
|
-
readonly
|
|
54
|
+
readonly 'bench-prefix': import("noarg/dist/schema/TypeString.cjs").TypeString<{
|
|
61
55
|
aliases: ["bp"];
|
|
62
56
|
minLength: 1;
|
|
63
57
|
description: "The prefix to show before the execution time";
|
|
64
58
|
}>;
|
|
59
|
+
readonly clear: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
60
|
+
aliases: ["c"];
|
|
61
|
+
required: true;
|
|
62
|
+
default: true;
|
|
63
|
+
description: "Clear the console before running the script";
|
|
64
|
+
}>;
|
|
65
65
|
readonly cwd: import("noarg/dist/schema/TypeString.cjs").TypeString<{
|
|
66
66
|
required: true;
|
|
67
67
|
default: string;
|
|
@@ -72,6 +72,11 @@ export declare const executionConfig: {
|
|
|
72
72
|
default: false;
|
|
73
73
|
description: "Run the script in a shell for more low-level control";
|
|
74
74
|
}>;
|
|
75
|
+
readonly 'safe-stdin': import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
76
|
+
required: true;
|
|
77
|
+
default: false;
|
|
78
|
+
description: "Disable raw mode for stdin (useful for some scripts)";
|
|
79
|
+
}>;
|
|
75
80
|
readonly info: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
76
81
|
required: true;
|
|
77
82
|
default: false;
|
|
@@ -88,7 +93,7 @@ export declare const executionConfig: {
|
|
|
88
93
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
89
94
|
description: "Environment variables";
|
|
90
95
|
}>;
|
|
91
|
-
readonly
|
|
96
|
+
readonly 'node-dev': import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
92
97
|
required: true;
|
|
93
98
|
default: false;
|
|
94
99
|
description: "Set NODE_ENV to \"development\"";
|
|
@@ -96,7 +101,7 @@ export declare const executionConfig: {
|
|
|
96
101
|
readonly tsn: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
97
102
|
required: true;
|
|
98
103
|
default: false;
|
|
99
|
-
description: "Run the script with ts-node";
|
|
104
|
+
description: "Run the script with ts-node (TypeScript)";
|
|
100
105
|
}>;
|
|
101
106
|
};
|
|
102
107
|
readonly listArgument: {
|
|
@@ -113,6 +118,7 @@ export type ExecuteOptions = ReturnType<typeof mapFlagsToOptions>;
|
|
|
113
118
|
export declare function mapFlagsToOptions(flags: NoArg.InferFlags<typeof app>, bin?: Executor): {
|
|
114
119
|
cwd: string;
|
|
115
120
|
shell: boolean;
|
|
121
|
+
stdinSafeMode: boolean;
|
|
116
122
|
showInfo: boolean;
|
|
117
123
|
showTime: boolean;
|
|
118
124
|
benchmark: boolean;
|
|
@@ -121,8 +127,8 @@ export declare function mapFlagsToOptions(flags: NoArg.InferFlags<typeof app>, b
|
|
|
121
127
|
keystrokeReload: boolean;
|
|
122
128
|
watch: boolean;
|
|
123
129
|
watchDelay: number;
|
|
124
|
-
|
|
125
|
-
|
|
130
|
+
watchFocus: string[];
|
|
131
|
+
watchIgnore: string[];
|
|
126
132
|
watchExtensions: string[];
|
|
127
133
|
tsNode: boolean;
|
|
128
134
|
env: NodeJS.ProcessEnv;
|
package/dist/arg-helper.mjs
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import NoArg from "noarg";
|
|
2
2
|
export const executionConfig = NoArg.defineConfig({
|
|
3
3
|
flags: {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
// Watch/Reload flags
|
|
5
|
+
'key-reload': NoArg.boolean()
|
|
6
|
+
.aliases('k')
|
|
6
7
|
.default(true)
|
|
7
8
|
.description("Reload the page when pressing 'Ctrl+R' or 'F5'"),
|
|
8
9
|
watch: NoArg.boolean()
|
|
9
10
|
.aliases('w')
|
|
10
11
|
.default(true)
|
|
11
|
-
.description('Watch for changes'),
|
|
12
|
+
.description('Watch for file changes and reload the script'),
|
|
12
13
|
exit: NoArg.boolean()
|
|
13
14
|
.default(false)
|
|
14
15
|
.description('Exit after code execution, disabling `watch` and `reloadKey`'),
|
|
15
|
-
clear: NoArg.boolean()
|
|
16
|
-
.aliases('c')
|
|
17
|
-
.default(true)
|
|
18
|
-
.description('Clear the console before running the script'),
|
|
19
16
|
delay: NoArg.number()
|
|
20
17
|
.aliases('d')
|
|
21
18
|
.default(100)
|
|
@@ -24,27 +21,35 @@ export const executionConfig = NoArg.defineConfig({
|
|
|
24
21
|
.aliases('e')
|
|
25
22
|
.default([])
|
|
26
23
|
.description('Looks for changes only of the given extensions'),
|
|
27
|
-
|
|
28
|
-
.aliases('
|
|
24
|
+
focus: NoArg.array(NoArg.string())
|
|
25
|
+
.aliases('f')
|
|
29
26
|
.default([])
|
|
30
|
-
.description('Only watch the given
|
|
31
|
-
|
|
32
|
-
.aliases('
|
|
27
|
+
.description('Only watch the given items. `chokidar` syntax'),
|
|
28
|
+
ignore: NoArg.array(NoArg.string())
|
|
29
|
+
.aliases('ig')
|
|
33
30
|
.default([])
|
|
34
|
-
.description('Exclude the given
|
|
31
|
+
.description('Exclude the given items. `gitignore` syntax'),
|
|
32
|
+
// Benchmark flags
|
|
35
33
|
bench: NoArg.boolean()
|
|
36
34
|
.aliases('b')
|
|
37
35
|
.description('Calculate the execution time'),
|
|
38
|
-
|
|
36
|
+
'bench-prefix': NoArg.string()
|
|
39
37
|
.aliases('bp')
|
|
40
38
|
.minLength(1)
|
|
41
39
|
.description('The prefix to show before the execution time'),
|
|
40
|
+
clear: NoArg.boolean()
|
|
41
|
+
.aliases('c')
|
|
42
|
+
.default(true)
|
|
43
|
+
.description('Clear the console before running the script'),
|
|
42
44
|
cwd: NoArg.string()
|
|
43
45
|
.default(process.cwd())
|
|
44
46
|
.description('Current working directory'),
|
|
45
47
|
shell: NoArg.boolean()
|
|
46
48
|
.default(false)
|
|
47
49
|
.description('Run the script in a shell for more low-level control'),
|
|
50
|
+
'safe-stdin': NoArg.boolean()
|
|
51
|
+
.default(false)
|
|
52
|
+
.description('Disable raw mode for stdin (useful for some scripts)'),
|
|
48
53
|
info: NoArg.boolean()
|
|
49
54
|
.default(false)
|
|
50
55
|
.description('Show information about the script'),
|
|
@@ -55,12 +60,12 @@ export const executionConfig = NoArg.defineConfig({
|
|
|
55
60
|
.default([])
|
|
56
61
|
.description('Environment variables'),
|
|
57
62
|
// Extra flags
|
|
58
|
-
|
|
63
|
+
'node-dev': NoArg.boolean()
|
|
59
64
|
.default(false)
|
|
60
65
|
.description('Set NODE_ENV to "development"'),
|
|
61
66
|
tsn: NoArg.boolean()
|
|
62
67
|
.default(false)
|
|
63
|
-
.description('Run the script with ts-node'),
|
|
68
|
+
.description('Run the script with ts-node (TypeScript)'),
|
|
64
69
|
},
|
|
65
70
|
listArgument: {
|
|
66
71
|
name: 'args for script',
|
|
@@ -77,22 +82,23 @@ export function mapFlagsToOptions(flags, bin) {
|
|
|
77
82
|
return {
|
|
78
83
|
cwd: flags.cwd,
|
|
79
84
|
shell: flags.shell,
|
|
85
|
+
stdinSafeMode: flags['safe-stdin'],
|
|
80
86
|
showInfo: flags.info,
|
|
81
87
|
showTime: flags.time,
|
|
82
|
-
benchmark: (_a = flags.bench) !== null && _a !== void 0 ? _a : Boolean(flags
|
|
83
|
-
benchmarkPrefix: flags
|
|
88
|
+
benchmark: (_a = flags.bench) !== null && _a !== void 0 ? _a : Boolean(flags['bench-prefix']),
|
|
89
|
+
benchmarkPrefix: flags['bench-prefix'],
|
|
84
90
|
clearOnReload: flags.clear,
|
|
85
|
-
keystrokeReload: flags.exit ? false : flags
|
|
91
|
+
keystrokeReload: flags.exit ? false : flags['key-reload'],
|
|
86
92
|
watch: flags.exit ? false : flags.watch,
|
|
87
93
|
watchDelay: flags.delay,
|
|
88
|
-
|
|
89
|
-
|
|
94
|
+
watchFocus: flags.focus.length ? flags.focus : [flags.cwd],
|
|
95
|
+
watchIgnore: flags.ignore,
|
|
90
96
|
watchExtensions: (flags.ext.length ? flags.ext : bin === null || bin === void 0 ? void 0 : bin.getRelatedExts()) || [],
|
|
91
97
|
tsNode: flags['tsn'],
|
|
92
98
|
env: Object.assign(Object.assign({}, flags.env.reduce((acc, env) => {
|
|
93
99
|
const [key, value] = env.split('=');
|
|
94
100
|
acc[key] = value;
|
|
95
101
|
return acc;
|
|
96
|
-
}, {})), (flags
|
|
102
|
+
}, {})), (flags['node-dev'] ? { NODE_ENV: 'development' } : {})),
|
|
97
103
|
};
|
|
98
104
|
}
|
package/dist/arg.d.cts
CHANGED
|
@@ -22,8 +22,8 @@ export declare const app: NoArg<"uni-run", {
|
|
|
22
22
|
};
|
|
23
23
|
readonly trailingArguments: "--";
|
|
24
24
|
readonly flags: {
|
|
25
|
-
readonly
|
|
26
|
-
aliases: ["
|
|
25
|
+
readonly 'key-reload': import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
26
|
+
aliases: ["k"];
|
|
27
27
|
required: true;
|
|
28
28
|
default: true;
|
|
29
29
|
description: "Reload the page when pressing 'Ctrl+R' or 'F5'";
|
|
@@ -32,19 +32,13 @@ export declare const app: NoArg<"uni-run", {
|
|
|
32
32
|
aliases: ["w"];
|
|
33
33
|
required: true;
|
|
34
34
|
default: true;
|
|
35
|
-
description: "Watch for changes";
|
|
35
|
+
description: "Watch for file changes and reload the script";
|
|
36
36
|
}>;
|
|
37
37
|
readonly exit: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
38
38
|
required: true;
|
|
39
39
|
default: false;
|
|
40
40
|
description: "Exit after code execution, disabling `watch` and `reloadKey`";
|
|
41
41
|
}>;
|
|
42
|
-
readonly clear: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
43
|
-
aliases: ["c"];
|
|
44
|
-
required: true;
|
|
45
|
-
default: true;
|
|
46
|
-
description: "Clear the console before running the script";
|
|
47
|
-
}>;
|
|
48
42
|
readonly delay: import("noarg/dist/schema/TypeNumber.cjs").TypeNumber<{
|
|
49
43
|
aliases: ["d"];
|
|
50
44
|
required: true;
|
|
@@ -58,29 +52,35 @@ export declare const app: NoArg<"uni-run", {
|
|
|
58
52
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
59
53
|
description: "Looks for changes only of the given extensions";
|
|
60
54
|
}>;
|
|
61
|
-
readonly
|
|
62
|
-
aliases: ["
|
|
55
|
+
readonly focus: import("noarg/dist/schema/TypeArray.cjs").TypeArray<{
|
|
56
|
+
aliases: ["f"];
|
|
63
57
|
required: true;
|
|
64
58
|
default: never[];
|
|
65
59
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
66
|
-
description: "Only watch the given
|
|
60
|
+
description: "Only watch the given items. `chokidar` syntax";
|
|
67
61
|
}>;
|
|
68
|
-
readonly
|
|
69
|
-
aliases: ["
|
|
62
|
+
readonly ignore: import("noarg/dist/schema/TypeArray.cjs").TypeArray<{
|
|
63
|
+
aliases: ["ig"];
|
|
70
64
|
required: true;
|
|
71
65
|
default: never[];
|
|
72
66
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
73
|
-
description: "Exclude the given
|
|
67
|
+
description: "Exclude the given items. `gitignore` syntax";
|
|
74
68
|
}>;
|
|
75
69
|
readonly bench: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
76
70
|
aliases: ["b"];
|
|
77
71
|
description: "Calculate the execution time";
|
|
78
72
|
}>;
|
|
79
|
-
readonly
|
|
73
|
+
readonly 'bench-prefix': import("noarg/dist/schema/TypeString.cjs").TypeString<{
|
|
80
74
|
aliases: ["bp"];
|
|
81
75
|
minLength: 1;
|
|
82
76
|
description: "The prefix to show before the execution time";
|
|
83
77
|
}>;
|
|
78
|
+
readonly clear: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
79
|
+
aliases: ["c"];
|
|
80
|
+
required: true;
|
|
81
|
+
default: true;
|
|
82
|
+
description: "Clear the console before running the script";
|
|
83
|
+
}>;
|
|
84
84
|
readonly cwd: import("noarg/dist/schema/TypeString.cjs").TypeString<{
|
|
85
85
|
required: true;
|
|
86
86
|
default: string;
|
|
@@ -91,6 +91,11 @@ export declare const app: NoArg<"uni-run", {
|
|
|
91
91
|
default: false;
|
|
92
92
|
description: "Run the script in a shell for more low-level control";
|
|
93
93
|
}>;
|
|
94
|
+
readonly 'safe-stdin': import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
95
|
+
required: true;
|
|
96
|
+
default: false;
|
|
97
|
+
description: "Disable raw mode for stdin (useful for some scripts)";
|
|
98
|
+
}>;
|
|
94
99
|
readonly info: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
95
100
|
required: true;
|
|
96
101
|
default: false;
|
|
@@ -107,7 +112,7 @@ export declare const app: NoArg<"uni-run", {
|
|
|
107
112
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
108
113
|
description: "Environment variables";
|
|
109
114
|
}>;
|
|
110
|
-
readonly
|
|
115
|
+
readonly 'node-dev': import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
111
116
|
required: true;
|
|
112
117
|
default: false;
|
|
113
118
|
description: "Set NODE_ENV to \"development\"";
|
|
@@ -115,7 +120,7 @@ export declare const app: NoArg<"uni-run", {
|
|
|
115
120
|
readonly tsn: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
116
121
|
required: true;
|
|
117
122
|
default: false;
|
|
118
|
-
description: "Run the script with ts-node";
|
|
123
|
+
description: "Run the script with ts-node (TypeScript)";
|
|
119
124
|
}>;
|
|
120
125
|
};
|
|
121
126
|
readonly customRenderHelp: {
|
|
@@ -140,8 +145,8 @@ export declare const exec: import("noarg/dist/NoArg/NoArgProgram.cjs").NoArgProg
|
|
|
140
145
|
};
|
|
141
146
|
readonly trailingArguments: "--";
|
|
142
147
|
readonly flags: {
|
|
143
|
-
readonly
|
|
144
|
-
aliases: ["
|
|
148
|
+
readonly 'key-reload': import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
149
|
+
aliases: ["k"];
|
|
145
150
|
required: true;
|
|
146
151
|
default: true;
|
|
147
152
|
description: "Reload the page when pressing 'Ctrl+R' or 'F5'";
|
|
@@ -150,19 +155,13 @@ export declare const exec: import("noarg/dist/NoArg/NoArgProgram.cjs").NoArgProg
|
|
|
150
155
|
aliases: ["w"];
|
|
151
156
|
required: true;
|
|
152
157
|
default: true;
|
|
153
|
-
description: "Watch for changes";
|
|
158
|
+
description: "Watch for file changes and reload the script";
|
|
154
159
|
}>;
|
|
155
160
|
readonly exit: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
156
161
|
required: true;
|
|
157
162
|
default: false;
|
|
158
163
|
description: "Exit after code execution, disabling `watch` and `reloadKey`";
|
|
159
164
|
}>;
|
|
160
|
-
readonly clear: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
161
|
-
aliases: ["c"];
|
|
162
|
-
required: true;
|
|
163
|
-
default: true;
|
|
164
|
-
description: "Clear the console before running the script";
|
|
165
|
-
}>;
|
|
166
165
|
readonly delay: import("noarg/dist/schema/TypeNumber.cjs").TypeNumber<{
|
|
167
166
|
aliases: ["d"];
|
|
168
167
|
required: true;
|
|
@@ -176,29 +175,35 @@ export declare const exec: import("noarg/dist/NoArg/NoArgProgram.cjs").NoArgProg
|
|
|
176
175
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
177
176
|
description: "Looks for changes only of the given extensions";
|
|
178
177
|
}>;
|
|
179
|
-
readonly
|
|
180
|
-
aliases: ["
|
|
178
|
+
readonly focus: import("noarg/dist/schema/TypeArray.cjs").TypeArray<{
|
|
179
|
+
aliases: ["f"];
|
|
181
180
|
required: true;
|
|
182
181
|
default: never[];
|
|
183
182
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
184
|
-
description: "Only watch the given
|
|
183
|
+
description: "Only watch the given items. `chokidar` syntax";
|
|
185
184
|
}>;
|
|
186
|
-
readonly
|
|
187
|
-
aliases: ["
|
|
185
|
+
readonly ignore: import("noarg/dist/schema/TypeArray.cjs").TypeArray<{
|
|
186
|
+
aliases: ["ig"];
|
|
188
187
|
required: true;
|
|
189
188
|
default: never[];
|
|
190
189
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
191
|
-
description: "Exclude the given
|
|
190
|
+
description: "Exclude the given items. `gitignore` syntax";
|
|
192
191
|
}>;
|
|
193
192
|
readonly bench: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
194
193
|
aliases: ["b"];
|
|
195
194
|
description: "Calculate the execution time";
|
|
196
195
|
}>;
|
|
197
|
-
readonly
|
|
196
|
+
readonly 'bench-prefix': import("noarg/dist/schema/TypeString.cjs").TypeString<{
|
|
198
197
|
aliases: ["bp"];
|
|
199
198
|
minLength: 1;
|
|
200
199
|
description: "The prefix to show before the execution time";
|
|
201
200
|
}>;
|
|
201
|
+
readonly clear: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
202
|
+
aliases: ["c"];
|
|
203
|
+
required: true;
|
|
204
|
+
default: true;
|
|
205
|
+
description: "Clear the console before running the script";
|
|
206
|
+
}>;
|
|
202
207
|
readonly cwd: import("noarg/dist/schema/TypeString.cjs").TypeString<{
|
|
203
208
|
required: true;
|
|
204
209
|
default: string;
|
|
@@ -209,6 +214,11 @@ export declare const exec: import("noarg/dist/NoArg/NoArgProgram.cjs").NoArgProg
|
|
|
209
214
|
default: false;
|
|
210
215
|
description: "Run the script in a shell for more low-level control";
|
|
211
216
|
}>;
|
|
217
|
+
readonly 'safe-stdin': import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
218
|
+
required: true;
|
|
219
|
+
default: false;
|
|
220
|
+
description: "Disable raw mode for stdin (useful for some scripts)";
|
|
221
|
+
}>;
|
|
212
222
|
readonly info: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
213
223
|
required: true;
|
|
214
224
|
default: false;
|
|
@@ -225,7 +235,7 @@ export declare const exec: import("noarg/dist/NoArg/NoArgProgram.cjs").NoArgProg
|
|
|
225
235
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
226
236
|
description: "Environment variables";
|
|
227
237
|
}>;
|
|
228
|
-
readonly
|
|
238
|
+
readonly 'node-dev': import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
229
239
|
required: true;
|
|
230
240
|
default: false;
|
|
231
241
|
description: "Set NODE_ENV to \"development\"";
|
|
@@ -233,7 +243,7 @@ export declare const exec: import("noarg/dist/NoArg/NoArgProgram.cjs").NoArgProg
|
|
|
233
243
|
readonly tsn: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
234
244
|
required: true;
|
|
235
245
|
default: false;
|
|
236
|
-
description: "Run the script with ts-node";
|
|
246
|
+
description: "Run the script with ts-node (TypeScript)";
|
|
237
247
|
}>;
|
|
238
248
|
};
|
|
239
249
|
readonly customRenderHelp: {
|
package/dist/arg.d.mts
CHANGED
|
@@ -22,8 +22,8 @@ export declare const app: NoArg<"uni-run", {
|
|
|
22
22
|
};
|
|
23
23
|
readonly trailingArguments: "--";
|
|
24
24
|
readonly flags: {
|
|
25
|
-
readonly
|
|
26
|
-
aliases: ["
|
|
25
|
+
readonly 'key-reload': import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
26
|
+
aliases: ["k"];
|
|
27
27
|
required: true;
|
|
28
28
|
default: true;
|
|
29
29
|
description: "Reload the page when pressing 'Ctrl+R' or 'F5'";
|
|
@@ -32,19 +32,13 @@ export declare const app: NoArg<"uni-run", {
|
|
|
32
32
|
aliases: ["w"];
|
|
33
33
|
required: true;
|
|
34
34
|
default: true;
|
|
35
|
-
description: "Watch for changes";
|
|
35
|
+
description: "Watch for file changes and reload the script";
|
|
36
36
|
}>;
|
|
37
37
|
readonly exit: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
38
38
|
required: true;
|
|
39
39
|
default: false;
|
|
40
40
|
description: "Exit after code execution, disabling `watch` and `reloadKey`";
|
|
41
41
|
}>;
|
|
42
|
-
readonly clear: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
43
|
-
aliases: ["c"];
|
|
44
|
-
required: true;
|
|
45
|
-
default: true;
|
|
46
|
-
description: "Clear the console before running the script";
|
|
47
|
-
}>;
|
|
48
42
|
readonly delay: import("noarg/dist/schema/TypeNumber.cjs").TypeNumber<{
|
|
49
43
|
aliases: ["d"];
|
|
50
44
|
required: true;
|
|
@@ -58,29 +52,35 @@ export declare const app: NoArg<"uni-run", {
|
|
|
58
52
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
59
53
|
description: "Looks for changes only of the given extensions";
|
|
60
54
|
}>;
|
|
61
|
-
readonly
|
|
62
|
-
aliases: ["
|
|
55
|
+
readonly focus: import("noarg/dist/schema/TypeArray.cjs").TypeArray<{
|
|
56
|
+
aliases: ["f"];
|
|
63
57
|
required: true;
|
|
64
58
|
default: never[];
|
|
65
59
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
66
|
-
description: "Only watch the given
|
|
60
|
+
description: "Only watch the given items. `chokidar` syntax";
|
|
67
61
|
}>;
|
|
68
|
-
readonly
|
|
69
|
-
aliases: ["
|
|
62
|
+
readonly ignore: import("noarg/dist/schema/TypeArray.cjs").TypeArray<{
|
|
63
|
+
aliases: ["ig"];
|
|
70
64
|
required: true;
|
|
71
65
|
default: never[];
|
|
72
66
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
73
|
-
description: "Exclude the given
|
|
67
|
+
description: "Exclude the given items. `gitignore` syntax";
|
|
74
68
|
}>;
|
|
75
69
|
readonly bench: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
76
70
|
aliases: ["b"];
|
|
77
71
|
description: "Calculate the execution time";
|
|
78
72
|
}>;
|
|
79
|
-
readonly
|
|
73
|
+
readonly 'bench-prefix': import("noarg/dist/schema/TypeString.cjs").TypeString<{
|
|
80
74
|
aliases: ["bp"];
|
|
81
75
|
minLength: 1;
|
|
82
76
|
description: "The prefix to show before the execution time";
|
|
83
77
|
}>;
|
|
78
|
+
readonly clear: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
79
|
+
aliases: ["c"];
|
|
80
|
+
required: true;
|
|
81
|
+
default: true;
|
|
82
|
+
description: "Clear the console before running the script";
|
|
83
|
+
}>;
|
|
84
84
|
readonly cwd: import("noarg/dist/schema/TypeString.cjs").TypeString<{
|
|
85
85
|
required: true;
|
|
86
86
|
default: string;
|
|
@@ -91,6 +91,11 @@ export declare const app: NoArg<"uni-run", {
|
|
|
91
91
|
default: false;
|
|
92
92
|
description: "Run the script in a shell for more low-level control";
|
|
93
93
|
}>;
|
|
94
|
+
readonly 'safe-stdin': import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
95
|
+
required: true;
|
|
96
|
+
default: false;
|
|
97
|
+
description: "Disable raw mode for stdin (useful for some scripts)";
|
|
98
|
+
}>;
|
|
94
99
|
readonly info: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
95
100
|
required: true;
|
|
96
101
|
default: false;
|
|
@@ -107,7 +112,7 @@ export declare const app: NoArg<"uni-run", {
|
|
|
107
112
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
108
113
|
description: "Environment variables";
|
|
109
114
|
}>;
|
|
110
|
-
readonly
|
|
115
|
+
readonly 'node-dev': import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
111
116
|
required: true;
|
|
112
117
|
default: false;
|
|
113
118
|
description: "Set NODE_ENV to \"development\"";
|
|
@@ -115,7 +120,7 @@ export declare const app: NoArg<"uni-run", {
|
|
|
115
120
|
readonly tsn: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
116
121
|
required: true;
|
|
117
122
|
default: false;
|
|
118
|
-
description: "Run the script with ts-node";
|
|
123
|
+
description: "Run the script with ts-node (TypeScript)";
|
|
119
124
|
}>;
|
|
120
125
|
};
|
|
121
126
|
readonly customRenderHelp: {
|
|
@@ -140,8 +145,8 @@ export declare const exec: import("noarg/dist/NoArg/NoArgProgram.cjs").NoArgProg
|
|
|
140
145
|
};
|
|
141
146
|
readonly trailingArguments: "--";
|
|
142
147
|
readonly flags: {
|
|
143
|
-
readonly
|
|
144
|
-
aliases: ["
|
|
148
|
+
readonly 'key-reload': import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
149
|
+
aliases: ["k"];
|
|
145
150
|
required: true;
|
|
146
151
|
default: true;
|
|
147
152
|
description: "Reload the page when pressing 'Ctrl+R' or 'F5'";
|
|
@@ -150,19 +155,13 @@ export declare const exec: import("noarg/dist/NoArg/NoArgProgram.cjs").NoArgProg
|
|
|
150
155
|
aliases: ["w"];
|
|
151
156
|
required: true;
|
|
152
157
|
default: true;
|
|
153
|
-
description: "Watch for changes";
|
|
158
|
+
description: "Watch for file changes and reload the script";
|
|
154
159
|
}>;
|
|
155
160
|
readonly exit: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
156
161
|
required: true;
|
|
157
162
|
default: false;
|
|
158
163
|
description: "Exit after code execution, disabling `watch` and `reloadKey`";
|
|
159
164
|
}>;
|
|
160
|
-
readonly clear: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
161
|
-
aliases: ["c"];
|
|
162
|
-
required: true;
|
|
163
|
-
default: true;
|
|
164
|
-
description: "Clear the console before running the script";
|
|
165
|
-
}>;
|
|
166
165
|
readonly delay: import("noarg/dist/schema/TypeNumber.cjs").TypeNumber<{
|
|
167
166
|
aliases: ["d"];
|
|
168
167
|
required: true;
|
|
@@ -176,29 +175,35 @@ export declare const exec: import("noarg/dist/NoArg/NoArgProgram.cjs").NoArgProg
|
|
|
176
175
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
177
176
|
description: "Looks for changes only of the given extensions";
|
|
178
177
|
}>;
|
|
179
|
-
readonly
|
|
180
|
-
aliases: ["
|
|
178
|
+
readonly focus: import("noarg/dist/schema/TypeArray.cjs").TypeArray<{
|
|
179
|
+
aliases: ["f"];
|
|
181
180
|
required: true;
|
|
182
181
|
default: never[];
|
|
183
182
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
184
|
-
description: "Only watch the given
|
|
183
|
+
description: "Only watch the given items. `chokidar` syntax";
|
|
185
184
|
}>;
|
|
186
|
-
readonly
|
|
187
|
-
aliases: ["
|
|
185
|
+
readonly ignore: import("noarg/dist/schema/TypeArray.cjs").TypeArray<{
|
|
186
|
+
aliases: ["ig"];
|
|
188
187
|
required: true;
|
|
189
188
|
default: never[];
|
|
190
189
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
191
|
-
description: "Exclude the given
|
|
190
|
+
description: "Exclude the given items. `gitignore` syntax";
|
|
192
191
|
}>;
|
|
193
192
|
readonly bench: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
194
193
|
aliases: ["b"];
|
|
195
194
|
description: "Calculate the execution time";
|
|
196
195
|
}>;
|
|
197
|
-
readonly
|
|
196
|
+
readonly 'bench-prefix': import("noarg/dist/schema/TypeString.cjs").TypeString<{
|
|
198
197
|
aliases: ["bp"];
|
|
199
198
|
minLength: 1;
|
|
200
199
|
description: "The prefix to show before the execution time";
|
|
201
200
|
}>;
|
|
201
|
+
readonly clear: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
202
|
+
aliases: ["c"];
|
|
203
|
+
required: true;
|
|
204
|
+
default: true;
|
|
205
|
+
description: "Clear the console before running the script";
|
|
206
|
+
}>;
|
|
202
207
|
readonly cwd: import("noarg/dist/schema/TypeString.cjs").TypeString<{
|
|
203
208
|
required: true;
|
|
204
209
|
default: string;
|
|
@@ -209,6 +214,11 @@ export declare const exec: import("noarg/dist/NoArg/NoArgProgram.cjs").NoArgProg
|
|
|
209
214
|
default: false;
|
|
210
215
|
description: "Run the script in a shell for more low-level control";
|
|
211
216
|
}>;
|
|
217
|
+
readonly 'safe-stdin': import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
218
|
+
required: true;
|
|
219
|
+
default: false;
|
|
220
|
+
description: "Disable raw mode for stdin (useful for some scripts)";
|
|
221
|
+
}>;
|
|
212
222
|
readonly info: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
213
223
|
required: true;
|
|
214
224
|
default: false;
|
|
@@ -225,7 +235,7 @@ export declare const exec: import("noarg/dist/NoArg/NoArgProgram.cjs").NoArgProg
|
|
|
225
235
|
schema: import("noarg/dist/schema/TypeString.cjs").TypeString<{}>;
|
|
226
236
|
description: "Environment variables";
|
|
227
237
|
}>;
|
|
228
|
-
readonly
|
|
238
|
+
readonly 'node-dev': import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
229
239
|
required: true;
|
|
230
240
|
default: false;
|
|
231
241
|
description: "Set NODE_ENV to \"development\"";
|
|
@@ -233,7 +243,7 @@ export declare const exec: import("noarg/dist/NoArg/NoArgProgram.cjs").NoArgProg
|
|
|
233
243
|
readonly tsn: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
234
244
|
required: true;
|
|
235
245
|
default: false;
|
|
236
|
-
description: "Run the script with ts-node";
|
|
246
|
+
description: "Run the script with ts-node (TypeScript)";
|
|
237
247
|
}>;
|
|
238
248
|
};
|
|
239
249
|
readonly customRenderHelp: {
|
package/dist/execution/index.cjs
CHANGED
|
@@ -42,8 +42,9 @@ class Execution {
|
|
|
42
42
|
this.child = null;
|
|
43
43
|
this.benchMarkText = colors_1.default.dim.blue('> Execution time');
|
|
44
44
|
this.isBenchmarkRunning = false;
|
|
45
|
+
this.isExecutionExecutedAnyTime = false;
|
|
45
46
|
this.setup();
|
|
46
|
-
this.
|
|
47
|
+
this.startProcess();
|
|
47
48
|
}
|
|
48
49
|
setup() {
|
|
49
50
|
var _a, _b;
|
|
@@ -53,62 +54,48 @@ class Execution {
|
|
|
53
54
|
}
|
|
54
55
|
if (this.options.keystrokeReload) {
|
|
55
56
|
readline.emitKeypressEvents(process.stdin);
|
|
56
|
-
|
|
57
|
+
if (!this.options.stdinSafeMode) {
|
|
58
|
+
(_b = (_a = process.stdin).setRawMode) === null || _b === void 0 ? void 0 : _b.call(_a, true);
|
|
59
|
+
}
|
|
57
60
|
process.stdin.on('keypress', (_, key) => {
|
|
58
61
|
if (key.name === 'f5' || (key.ctrl && key.name === 'r')) {
|
|
59
|
-
return this.
|
|
62
|
+
return this.startProcess();
|
|
60
63
|
}
|
|
61
64
|
if (key.ctrl && key.name === 'c') {
|
|
62
65
|
this.killProcess();
|
|
63
|
-
|
|
66
|
+
process.exit(0);
|
|
64
67
|
}
|
|
65
68
|
});
|
|
66
69
|
}
|
|
67
70
|
if (this.options.watch) {
|
|
68
|
-
(0, watcher_1.default)(this.options.cwd, this.options.
|
|
69
|
-
|
|
70
|
-
: [this.options.cwd], () => this.runProcess(), {
|
|
71
|
-
ignore: this.options.watchExclude,
|
|
71
|
+
(0, watcher_1.default)(this.options.cwd, this.options.watchFocus, () => this.startProcess(), {
|
|
72
|
+
ignore: this.options.watchIgnore,
|
|
72
73
|
debounceDelay: this.options.watchDelay,
|
|
73
74
|
extensions: new Set(this.options.watchExtensions),
|
|
74
75
|
});
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
|
-
|
|
78
|
+
startProcess() {
|
|
78
79
|
this.killProcess();
|
|
79
80
|
this.clearBeforeStart();
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
if (this.options.benchmark) {
|
|
84
|
-
if (this.isBenchmarkRunning) {
|
|
85
|
-
console.timeEnd(this.benchMarkText);
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
this.isBenchmarkRunning = true;
|
|
89
|
-
}
|
|
90
|
-
console.time(this.benchMarkText);
|
|
91
|
-
}
|
|
81
|
+
this.renderInfoLogs();
|
|
82
|
+
const controller = new AbortController();
|
|
83
|
+
this.isExecutionExecutedAnyTime = true;
|
|
92
84
|
this.child = (0, cross_spawn_1.spawn)(this.command, this.args, {
|
|
93
85
|
stdio: 'inherit',
|
|
94
86
|
argv0: this.command,
|
|
95
87
|
cwd: this.options.cwd,
|
|
96
88
|
shell: this.options.shell,
|
|
97
89
|
env: Object.assign({}, this.options.env),
|
|
90
|
+
signal: controller.signal,
|
|
98
91
|
});
|
|
99
|
-
this.child.on('error', console.error);
|
|
100
92
|
this.child.on('exit', (code) => {
|
|
101
93
|
if (code && code > 0) {
|
|
102
94
|
console.log(colors_1.default.red(`Process exited with code: ${colors_1.default.yellow(String(code))}`));
|
|
103
95
|
}
|
|
104
|
-
if (this.
|
|
105
|
-
this.isBenchmarkRunning = false;
|
|
96
|
+
if (this.isBenchmarkRunning) {
|
|
106
97
|
console.timeEnd(this.benchMarkText);
|
|
107
|
-
|
|
108
|
-
if (this.options.watch && this.options.showInfo) {
|
|
109
|
-
console.log(colors_1.default.dim.blue('> Watching for extensions:'), colors_1.default.dim(this.options.watchExtensions
|
|
110
|
-
.map((ext) => colors_1.default.yellow(ext))
|
|
111
|
-
.join(', ') || colors_1.default.yellow('*')));
|
|
98
|
+
this.isBenchmarkRunning = false;
|
|
112
99
|
}
|
|
113
100
|
if (this.options.keystrokeReload) {
|
|
114
101
|
console.log(colors_1.default.blue.dim(`> Press ${colors_1.default.yellow('F5')} or ${colors_1.default.yellow('^R')} to reload...`));
|
|
@@ -119,16 +106,53 @@ class Execution {
|
|
|
119
106
|
if (!this.child)
|
|
120
107
|
return;
|
|
121
108
|
this.child.removeAllListeners();
|
|
122
|
-
|
|
123
|
-
|
|
109
|
+
const isKilled = (0, kill_process_1.default)(this.child);
|
|
110
|
+
if (!isKilled) {
|
|
111
|
+
console.error(colors_1.default.bgRed('ERROR:'), colors_1.default.red('Failed to kill the previous process'));
|
|
124
112
|
}
|
|
125
113
|
this.child = null;
|
|
126
114
|
}
|
|
127
115
|
clearBeforeStart() {
|
|
128
116
|
if (this.options.clearOnReload) {
|
|
129
117
|
process.stdout.write('\x1Bc');
|
|
118
|
+
process.stdout.cursorTo(0, 0);
|
|
119
|
+
process.stdout.clearScreenDown();
|
|
130
120
|
console.clear();
|
|
131
121
|
}
|
|
132
122
|
}
|
|
123
|
+
renderInfoLogs() {
|
|
124
|
+
if (this.options.showInfo && !this.isExecutionExecutedAnyTime) {
|
|
125
|
+
if (this.options.watch) {
|
|
126
|
+
console.log(colors_1.default.dim.bgGreen('INFO:'), colors_1.default.green('Watching for extensions:'), colors_1.default.dim(this.options.watchExtensions
|
|
127
|
+
.map((ext) => colors_1.default.reset(ext))
|
|
128
|
+
.join(', ') || colors_1.default.yellow('*')));
|
|
129
|
+
}
|
|
130
|
+
if (this.options.watchFocus.length) {
|
|
131
|
+
console.log(colors_1.default.dim.bgGreen('INFO:'), colors_1.default.green('Watching target:'), colors_1.default.dim(this.options.watchFocus
|
|
132
|
+
.map((ext) => colors_1.default.reset(ext))
|
|
133
|
+
.join(', ') || colors_1.default.yellow('*')));
|
|
134
|
+
}
|
|
135
|
+
if (this.options.watchIgnore.length) {
|
|
136
|
+
console.log(colors_1.default.dim.bgGreen('INFO:'), colors_1.default.green('Watching ignore:'), colors_1.default.dim(this.options.watchIgnore
|
|
137
|
+
.map((ext) => colors_1.default.reset(ext))
|
|
138
|
+
.join(', ') || colors_1.default.yellow('*')));
|
|
139
|
+
}
|
|
140
|
+
if (this.options.shell) {
|
|
141
|
+
console.log(colors_1.default.dim.bgGreen('INFO:'), colors_1.default.green('SHELL mode enabled'));
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if (this.options.showTime) {
|
|
145
|
+
console.log(colors_1.default.dim.bgGreen('TIME:'), colors_1.default.green(new Date().toLocaleString()));
|
|
146
|
+
}
|
|
147
|
+
if (this.options.benchmark) {
|
|
148
|
+
if (this.isBenchmarkRunning) {
|
|
149
|
+
console.timeEnd(this.benchMarkText);
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
this.isBenchmarkRunning = true;
|
|
153
|
+
}
|
|
154
|
+
console.time(this.benchMarkText);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
133
157
|
}
|
|
134
158
|
exports.default = Execution;
|
|
@@ -6,10 +6,12 @@ export default class Execution {
|
|
|
6
6
|
private child;
|
|
7
7
|
private benchMarkText;
|
|
8
8
|
private isBenchmarkRunning;
|
|
9
|
+
private isExecutionExecutedAnyTime;
|
|
9
10
|
static start([command, ...args]: string[], options: ExecuteOptions): Execution;
|
|
10
11
|
constructor(command: string, args: string[], options: ExecuteOptions);
|
|
11
12
|
private setup;
|
|
12
|
-
private
|
|
13
|
+
private startProcess;
|
|
13
14
|
private killProcess;
|
|
14
15
|
private clearBeforeStart;
|
|
16
|
+
private renderInfoLogs;
|
|
15
17
|
}
|
|
@@ -6,10 +6,12 @@ export default class Execution {
|
|
|
6
6
|
private child;
|
|
7
7
|
private benchMarkText;
|
|
8
8
|
private isBenchmarkRunning;
|
|
9
|
+
private isExecutionExecutedAnyTime;
|
|
9
10
|
static start([command, ...args]: string[], options: ExecuteOptions): Execution;
|
|
10
11
|
constructor(command: string, args: string[], options: ExecuteOptions);
|
|
11
12
|
private setup;
|
|
12
|
-
private
|
|
13
|
+
private startProcess;
|
|
13
14
|
private killProcess;
|
|
14
15
|
private clearBeforeStart;
|
|
16
|
+
private renderInfoLogs;
|
|
15
17
|
}
|
package/dist/execution/index.mjs
CHANGED
|
@@ -14,8 +14,9 @@ export default class Execution {
|
|
|
14
14
|
this.child = null;
|
|
15
15
|
this.benchMarkText = colors.dim.blue('> Execution time');
|
|
16
16
|
this.isBenchmarkRunning = false;
|
|
17
|
+
this.isExecutionExecutedAnyTime = false;
|
|
17
18
|
this.setup();
|
|
18
|
-
this.
|
|
19
|
+
this.startProcess();
|
|
19
20
|
}
|
|
20
21
|
setup() {
|
|
21
22
|
var _a, _b;
|
|
@@ -25,62 +26,48 @@ export default class Execution {
|
|
|
25
26
|
}
|
|
26
27
|
if (this.options.keystrokeReload) {
|
|
27
28
|
readline.emitKeypressEvents(process.stdin);
|
|
28
|
-
|
|
29
|
+
if (!this.options.stdinSafeMode) {
|
|
30
|
+
(_b = (_a = process.stdin).setRawMode) === null || _b === void 0 ? void 0 : _b.call(_a, true);
|
|
31
|
+
}
|
|
29
32
|
process.stdin.on('keypress', (_, key) => {
|
|
30
33
|
if (key.name === 'f5' || (key.ctrl && key.name === 'r')) {
|
|
31
|
-
return this.
|
|
34
|
+
return this.startProcess();
|
|
32
35
|
}
|
|
33
36
|
if (key.ctrl && key.name === 'c') {
|
|
34
37
|
this.killProcess();
|
|
35
|
-
|
|
38
|
+
process.exit(0);
|
|
36
39
|
}
|
|
37
40
|
});
|
|
38
41
|
}
|
|
39
42
|
if (this.options.watch) {
|
|
40
|
-
watcher(this.options.cwd, this.options.
|
|
41
|
-
|
|
42
|
-
: [this.options.cwd], () => this.runProcess(), {
|
|
43
|
-
ignore: this.options.watchExclude,
|
|
43
|
+
watcher(this.options.cwd, this.options.watchFocus, () => this.startProcess(), {
|
|
44
|
+
ignore: this.options.watchIgnore,
|
|
44
45
|
debounceDelay: this.options.watchDelay,
|
|
45
46
|
extensions: new Set(this.options.watchExtensions),
|
|
46
47
|
});
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
|
-
|
|
50
|
+
startProcess() {
|
|
50
51
|
this.killProcess();
|
|
51
52
|
this.clearBeforeStart();
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (this.options.benchmark) {
|
|
56
|
-
if (this.isBenchmarkRunning) {
|
|
57
|
-
console.timeEnd(this.benchMarkText);
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
this.isBenchmarkRunning = true;
|
|
61
|
-
}
|
|
62
|
-
console.time(this.benchMarkText);
|
|
63
|
-
}
|
|
53
|
+
this.renderInfoLogs();
|
|
54
|
+
const controller = new AbortController();
|
|
55
|
+
this.isExecutionExecutedAnyTime = true;
|
|
64
56
|
this.child = spawn(this.command, this.args, {
|
|
65
57
|
stdio: 'inherit',
|
|
66
58
|
argv0: this.command,
|
|
67
59
|
cwd: this.options.cwd,
|
|
68
60
|
shell: this.options.shell,
|
|
69
61
|
env: Object.assign({}, this.options.env),
|
|
62
|
+
signal: controller.signal,
|
|
70
63
|
});
|
|
71
|
-
this.child.on('error', console.error);
|
|
72
64
|
this.child.on('exit', (code) => {
|
|
73
65
|
if (code && code > 0) {
|
|
74
66
|
console.log(colors.red(`Process exited with code: ${colors.yellow(String(code))}`));
|
|
75
67
|
}
|
|
76
|
-
if (this.
|
|
77
|
-
this.isBenchmarkRunning = false;
|
|
68
|
+
if (this.isBenchmarkRunning) {
|
|
78
69
|
console.timeEnd(this.benchMarkText);
|
|
79
|
-
|
|
80
|
-
if (this.options.watch && this.options.showInfo) {
|
|
81
|
-
console.log(colors.dim.blue('> Watching for extensions:'), colors.dim(this.options.watchExtensions
|
|
82
|
-
.map((ext) => colors.yellow(ext))
|
|
83
|
-
.join(', ') || colors.yellow('*')));
|
|
70
|
+
this.isBenchmarkRunning = false;
|
|
84
71
|
}
|
|
85
72
|
if (this.options.keystrokeReload) {
|
|
86
73
|
console.log(colors.blue.dim(`> Press ${colors.yellow('F5')} or ${colors.yellow('^R')} to reload...`));
|
|
@@ -91,15 +78,52 @@ export default class Execution {
|
|
|
91
78
|
if (!this.child)
|
|
92
79
|
return;
|
|
93
80
|
this.child.removeAllListeners();
|
|
94
|
-
|
|
95
|
-
|
|
81
|
+
const isKilled = killProcess(this.child);
|
|
82
|
+
if (!isKilled) {
|
|
83
|
+
console.error(colors.bgRed('ERROR:'), colors.red('Failed to kill the previous process'));
|
|
96
84
|
}
|
|
97
85
|
this.child = null;
|
|
98
86
|
}
|
|
99
87
|
clearBeforeStart() {
|
|
100
88
|
if (this.options.clearOnReload) {
|
|
101
89
|
process.stdout.write('\x1Bc');
|
|
90
|
+
process.stdout.cursorTo(0, 0);
|
|
91
|
+
process.stdout.clearScreenDown();
|
|
102
92
|
console.clear();
|
|
103
93
|
}
|
|
104
94
|
}
|
|
95
|
+
renderInfoLogs() {
|
|
96
|
+
if (this.options.showInfo && !this.isExecutionExecutedAnyTime) {
|
|
97
|
+
if (this.options.watch) {
|
|
98
|
+
console.log(colors.dim.bgGreen('INFO:'), colors.green('Watching for extensions:'), colors.dim(this.options.watchExtensions
|
|
99
|
+
.map((ext) => colors.reset(ext))
|
|
100
|
+
.join(', ') || colors.yellow('*')));
|
|
101
|
+
}
|
|
102
|
+
if (this.options.watchFocus.length) {
|
|
103
|
+
console.log(colors.dim.bgGreen('INFO:'), colors.green('Watching target:'), colors.dim(this.options.watchFocus
|
|
104
|
+
.map((ext) => colors.reset(ext))
|
|
105
|
+
.join(', ') || colors.yellow('*')));
|
|
106
|
+
}
|
|
107
|
+
if (this.options.watchIgnore.length) {
|
|
108
|
+
console.log(colors.dim.bgGreen('INFO:'), colors.green('Watching ignore:'), colors.dim(this.options.watchIgnore
|
|
109
|
+
.map((ext) => colors.reset(ext))
|
|
110
|
+
.join(', ') || colors.yellow('*')));
|
|
111
|
+
}
|
|
112
|
+
if (this.options.shell) {
|
|
113
|
+
console.log(colors.dim.bgGreen('INFO:'), colors.green('SHELL mode enabled'));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (this.options.showTime) {
|
|
117
|
+
console.log(colors.dim.bgGreen('TIME:'), colors.green(new Date().toLocaleString()));
|
|
118
|
+
}
|
|
119
|
+
if (this.options.benchmark) {
|
|
120
|
+
if (this.isBenchmarkRunning) {
|
|
121
|
+
console.timeEnd(this.benchMarkText);
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
this.isBenchmarkRunning = true;
|
|
125
|
+
}
|
|
126
|
+
console.time(this.benchMarkText);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
105
129
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function createDebounce(delay: number): (fn:
|
|
1
|
+
export declare function createDebounce(delay: number): (fn: () => void) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function createDebounce(delay: number): (fn:
|
|
1
|
+
export declare function createDebounce(delay: number): (fn: () => void) => void;
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uni-run",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Universal Runner for many language",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "npmize dev",
|
|
7
7
|
"build": "npmize build",
|
|
8
8
|
"tsc": "tsc --watch --noEmit",
|
|
9
|
-
"lab": "run ./src/__lab__/index.ts",
|
|
10
9
|
"cjs": "node ./dist/__lab__/index.cjs",
|
|
11
|
-
"mjs": "node ./dist/__lab__/index.mjs"
|
|
10
|
+
"mjs": "node ./dist/__lab__/index.mjs",
|
|
11
|
+
"lab": "run ./src/__lab__/index.ts --focus ./src"
|
|
12
12
|
},
|
|
13
13
|
"main": "./dist/index.cjs",
|
|
14
14
|
"module": "./dist/index.mjs",
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"ansi-colors": "^4.1.3",
|
|
21
|
-
"chokidar": "^
|
|
21
|
+
"chokidar": "^4.0.1",
|
|
22
22
|
"cross-spawn": "^7.0.3",
|
|
23
|
-
"ignore": "^
|
|
24
|
-
"noarg": "^3.1.
|
|
23
|
+
"ignore": "^6.0.2",
|
|
24
|
+
"noarg": "^3.1.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/cross-spawn": "^6.0.6",
|
|
28
|
-
"@types/node": "^22.
|
|
29
|
-
"npmize": "^1.1.
|
|
28
|
+
"@types/node": "^22.7.3",
|
|
29
|
+
"npmize": "^1.1.9",
|
|
30
30
|
"typescript": "^5.6.2"
|
|
31
31
|
},
|
|
32
32
|
"repository": {
|