uni-run 1.1.17 → 1.1.19
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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import NoArg from 'noarg';
|
|
2
2
|
export declare const app: NoArg<"uni-run", {
|
|
3
3
|
readonly allowEqualAssign: true;
|
|
4
|
-
readonly booleanNotSyntaxEnding: "\\";
|
|
5
4
|
readonly allowDuplicateFlagForList: true;
|
|
5
|
+
readonly booleanNotSyntaxEnding: "!";
|
|
6
6
|
readonly splitListByComma: true;
|
|
7
7
|
}, {
|
|
8
8
|
readonly help: true;
|
|
@@ -104,8 +104,8 @@ export declare const app: NoArg<"uni-run", {
|
|
|
104
104
|
}>;
|
|
105
105
|
export declare const exec: import("noarg/dist/NoArg/NoArgProgram.cjs").NoArgProgram<"exec", {
|
|
106
106
|
readonly allowEqualAssign: true;
|
|
107
|
-
readonly booleanNotSyntaxEnding: "\\";
|
|
108
107
|
readonly allowDuplicateFlagForList: true;
|
|
108
|
+
readonly booleanNotSyntaxEnding: "!";
|
|
109
109
|
readonly splitListByComma: true;
|
|
110
110
|
}, {
|
|
111
111
|
readonly help: true;
|
|
@@ -203,8 +203,8 @@ export declare const exec: import("noarg/dist/NoArg/NoArgProgram.cjs").NoArgProg
|
|
|
203
203
|
}>;
|
|
204
204
|
export declare const list: import("noarg/dist/NoArg/NoArgProgram.cjs").NoArgProgram<"list", {
|
|
205
205
|
readonly allowEqualAssign: true;
|
|
206
|
-
readonly booleanNotSyntaxEnding: "\\";
|
|
207
206
|
readonly allowDuplicateFlagForList: true;
|
|
207
|
+
readonly booleanNotSyntaxEnding: "!";
|
|
208
208
|
readonly splitListByComma: true;
|
|
209
209
|
}, {
|
|
210
210
|
readonly help: true;
|
|
@@ -217,8 +217,8 @@ export declare const list: import("noarg/dist/NoArg/NoArgProgram.cjs").NoArgProg
|
|
|
217
217
|
}>;
|
|
218
218
|
export declare const clean: import("noarg/dist/NoArg/NoArgProgram.cjs").NoArgProgram<"clean", {
|
|
219
219
|
readonly allowEqualAssign: true;
|
|
220
|
-
readonly booleanNotSyntaxEnding: "\\";
|
|
221
220
|
readonly allowDuplicateFlagForList: true;
|
|
221
|
+
readonly booleanNotSyntaxEnding: "!";
|
|
222
222
|
readonly splitListByComma: true;
|
|
223
223
|
}, {
|
|
224
224
|
readonly help: true;
|
|
@@ -13,9 +13,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.default = default_1;
|
|
16
|
+
const os_1 = __importDefault(require("../helpers/os"));
|
|
16
17
|
const colors_1 = __importDefault(require("../lib/colors"));
|
|
17
18
|
const confirm_1 = __importDefault(require("@inquirer/confirm"));
|
|
18
19
|
const cross_spawn_1 = require("cross-spawn");
|
|
20
|
+
function isBinaryInstalled(bin) {
|
|
21
|
+
const result = (0, cross_spawn_1.sync)(os_1.default.isWindows ? 'where' : 'which', [bin], {
|
|
22
|
+
stdio: 'ignore',
|
|
23
|
+
});
|
|
24
|
+
return result.status === 0;
|
|
25
|
+
}
|
|
19
26
|
function default_1(runtime) {
|
|
20
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
28
|
var _a, _b, _c, _d;
|
|
@@ -24,8 +31,8 @@ function default_1(runtime) {
|
|
|
24
31
|
const command = runtime.exec[0];
|
|
25
32
|
if (!command)
|
|
26
33
|
return true;
|
|
27
|
-
const
|
|
28
|
-
if (
|
|
34
|
+
const isInstalled = isBinaryInstalled(command);
|
|
35
|
+
if (isInstalled)
|
|
29
36
|
return true;
|
|
30
37
|
console.error(colors_1.default.yellow(command) + colors_1.default.red(' is not installed.'));
|
|
31
38
|
if ((_c = runtime.install) === null || _c === void 0 ? void 0 : _c.length) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uni-run",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.19",
|
|
4
4
|
"description": "Universal Runner for many language",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"scripts": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"chokidar": "^4.0.1",
|
|
24
24
|
"cross-spawn": "^7.0.3",
|
|
25
25
|
"ignore": "^6.0.2",
|
|
26
|
-
"noarg": "^3.1.
|
|
26
|
+
"noarg": "^3.1.8"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/cross-spawn": "^6.0.6",
|