uni-run 1.1.12 → 1.1.15
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/execution/index.js
CHANGED
|
@@ -66,7 +66,6 @@ class Execution {
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
setup() {
|
|
69
|
-
var _a, _b;
|
|
70
69
|
if (this.options.benchmarkPrefix) {
|
|
71
70
|
this.benchMarkText =
|
|
72
71
|
colors_1.default.bold(this.options.benchmarkPrefix) + ' ' + this.benchMarkText;
|
|
@@ -74,7 +73,7 @@ class Execution {
|
|
|
74
73
|
if (this.options.keystrokeReload) {
|
|
75
74
|
readline.emitKeypressEvents(process.stdin);
|
|
76
75
|
if (!this.options.stdinSafeMode) {
|
|
77
|
-
|
|
76
|
+
process.stdin.setRawMode(true);
|
|
78
77
|
}
|
|
79
78
|
process.stdin.on('keypress', (_, key) => {
|
|
80
79
|
if (key.name === 'f5' || (key.ctrl && key.name === 'r')) {
|
|
@@ -31,7 +31,8 @@ function default_1(runtime) {
|
|
|
31
31
|
console.error(colors_1.default.yellow(runtime.exec[0]) + colors_1.default.red(' is not installed.'));
|
|
32
32
|
if (!((_b = install.command) === null || _b === void 0 ? void 0 : _b.length))
|
|
33
33
|
return false;
|
|
34
|
-
const ans = yield (0, confirm_1.default)({ message: 'Do you want to install it?' });
|
|
34
|
+
const ans = yield (0, confirm_1.default)({ message: 'Do you want to install it?' }, { clearPromptOnDone: true });
|
|
35
|
+
process.stdin.resume();
|
|
35
36
|
if (ans) {
|
|
36
37
|
const [installCmd, ...installArgs] = install.command;
|
|
37
38
|
const result = (0, cross_spawn_1.sync)(installCmd, installArgs, { stdio: 'inherit' });
|
|
@@ -278,7 +278,7 @@ exports.default = (0, as_1.default)([
|
|
|
278
278
|
exec: ['light-express-server', script, ...args],
|
|
279
279
|
watchExts: ['css', 'js', 'javascript'],
|
|
280
280
|
install: {
|
|
281
|
-
check: ['light-express-server', '--
|
|
281
|
+
check: ['light-express-server', '--help'],
|
|
282
282
|
command: ['npm', 'install', '-g', 'light-express-server'],
|
|
283
283
|
hints: [
|
|
284
284
|
'Please install light-express-server from https://www.npmjs.com/package/light-express-server',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uni-run",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.15",
|
|
4
4
|
"description": "Universal Runner for many language",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"scripts": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"dev": "tsc --watch",
|
|
9
9
|
"tsc": "tsc --watch --noEmit",
|
|
10
10
|
"live": "node ./dist/__lab__/index.js",
|
|
11
|
-
"tsx": "tsx
|
|
11
|
+
"tsx": "tsx ./src/__lab__/index.ts",
|
|
12
12
|
"lab": "run ./src/__lab__/index.ts --focus ./src -- UNI_RUN_LAB_MODE"
|
|
13
13
|
},
|
|
14
14
|
"main": "./dist/index.js",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"uni-run": "./dist/bin.js"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
+
"@inquirer/prompts": "^6.0.1",
|
|
20
21
|
"ansi-colors": "^4.1.3",
|
|
21
22
|
"chokidar": "^4.0.1",
|
|
22
23
|
"cross-spawn": "^7.0.3",
|