uni-run 1.1.19 → 1.1.20
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.d.ts
CHANGED
|
@@ -34,8 +34,7 @@ export declare const app: NoArg<"uni-run", {
|
|
|
34
34
|
aliases: ["drs"];
|
|
35
35
|
description: "Disable raw mode for stdin. Do not needed with `--disable-reload-key`";
|
|
36
36
|
}>;
|
|
37
|
-
readonly
|
|
38
|
-
aliases: ["q"];
|
|
37
|
+
readonly exit: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
39
38
|
description: "Do not watch the script. Just run it once and exit";
|
|
40
39
|
}>;
|
|
41
40
|
readonly silent: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
@@ -132,8 +131,7 @@ export declare const exec: import("noarg/dist/NoArg/NoArgProgram.cjs").NoArgProg
|
|
|
132
131
|
aliases: ["drs"];
|
|
133
132
|
description: "Disable raw mode for stdin. Do not needed with `--disable-reload-key`";
|
|
134
133
|
}>;
|
|
135
|
-
readonly
|
|
136
|
-
aliases: ["q"];
|
|
134
|
+
readonly exit: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
137
135
|
description: "Do not watch the script. Just run it once and exit";
|
|
138
136
|
}>;
|
|
139
137
|
readonly silent: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
package/dist/argHelper.d.ts
CHANGED
|
@@ -14,8 +14,7 @@ export declare const executionConfig: {
|
|
|
14
14
|
aliases: ["drs"];
|
|
15
15
|
description: "Disable raw mode for stdin. Do not needed with `--disable-reload-key`";
|
|
16
16
|
}>;
|
|
17
|
-
readonly
|
|
18
|
-
aliases: ["q"];
|
|
17
|
+
readonly exit: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
|
19
18
|
description: "Do not watch the script. Just run it once and exit";
|
|
20
19
|
}>;
|
|
21
20
|
readonly silent: import("noarg/dist/schema/TypeBoolean.cjs").TypeBoolean<{
|
package/dist/argHelper.js
CHANGED
|
@@ -17,9 +17,7 @@ exports.executionConfig = noarg_1.default.defineConfig({
|
|
|
17
17
|
'disable-raw-stdin': noarg_1.default.boolean()
|
|
18
18
|
.aliases('drs')
|
|
19
19
|
.description('Disable raw mode for stdin. Do not needed with `--disable-reload-key`'),
|
|
20
|
-
|
|
21
|
-
.aliases('q')
|
|
22
|
-
.description('Do not watch the script. Just run it once and exit'),
|
|
20
|
+
exit: noarg_1.default.boolean().description('Do not watch the script. Just run it once and exit'),
|
|
23
21
|
silent: noarg_1.default.boolean()
|
|
24
22
|
.aliases('s')
|
|
25
23
|
.description('Do not show any output of the script'),
|
|
@@ -67,9 +65,9 @@ exports.executionConfig = noarg_1.default.defineConfig({
|
|
|
67
65
|
});
|
|
68
66
|
function mapFlagsToOptions(flags) {
|
|
69
67
|
var _a, _b, _c, _d, _e;
|
|
70
|
-
if (flags.
|
|
71
|
-
flags['disable-reload-key'] = true;
|
|
68
|
+
if (flags.exit) {
|
|
72
69
|
flags['do-not-watch'] = true;
|
|
70
|
+
flags['disable-reload-key'] = true;
|
|
73
71
|
}
|
|
74
72
|
return {
|
|
75
73
|
cwd: flags.cwd,
|
|
@@ -25,17 +25,17 @@ function isBinaryInstalled(bin) {
|
|
|
25
25
|
}
|
|
26
26
|
function default_1(runtime) {
|
|
27
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
var _a, _b, _c, _d;
|
|
28
|
+
var _a, _b, _c, _d, _e, _f;
|
|
29
29
|
if (!((_a = runtime.install) === null || _a === void 0 ? void 0 : _a.length) && !((_b = runtime.installHints) === null || _b === void 0 ? void 0 : _b.length))
|
|
30
30
|
return true;
|
|
31
|
-
const command = runtime.exec[0];
|
|
31
|
+
const command = (_d = (_c = runtime.compile) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : runtime.exec[0];
|
|
32
32
|
if (!command)
|
|
33
33
|
return true;
|
|
34
34
|
const isInstalled = isBinaryInstalled(command);
|
|
35
35
|
if (isInstalled)
|
|
36
36
|
return true;
|
|
37
37
|
console.error(colors_1.default.yellow(command) + colors_1.default.red(' is not installed.'));
|
|
38
|
-
if ((
|
|
38
|
+
if ((_e = runtime.install) === null || _e === void 0 ? void 0 : _e.length) {
|
|
39
39
|
const ans = yield (0, confirm_1.default)({ message: 'Do you want to install it?' });
|
|
40
40
|
process.stdin.setRawMode(false);
|
|
41
41
|
if (ans) {
|
|
@@ -47,7 +47,7 @@ function default_1(runtime) {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
if ((
|
|
50
|
+
if ((_f = runtime.installHints) === null || _f === void 0 ? void 0 : _f.length) {
|
|
51
51
|
console.log(colors_1.default.bold('How to install:'));
|
|
52
52
|
runtime.installHints.forEach((hint) => console.log(hint));
|
|
53
53
|
}
|