@rpcbase/cli 0.23.0 → 0.25.0
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/package.json +2 -1
- package/src/start_command.js +17 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpcbase/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"license": "SSPL-1.0",
|
|
5
5
|
"bin": {
|
|
6
6
|
"rb": "./bin.js"
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"dotenv": "16.0.1",
|
|
16
16
|
"picocolors": "1.0.0",
|
|
17
17
|
"semver": "7.3.7",
|
|
18
|
+
"tunnelmole": "2.1.2",
|
|
18
19
|
"validator": "13.7.0",
|
|
19
20
|
"yargs": "17.6.2"
|
|
20
21
|
}
|
package/src/start_command.js
CHANGED
|
@@ -17,6 +17,7 @@ const start_command = async(args) => {
|
|
|
17
17
|
const run_configs = get_run_configs()
|
|
18
18
|
|
|
19
19
|
const run_commands = []
|
|
20
|
+
|
|
20
21
|
run_configs.forEach((cfg) => {
|
|
21
22
|
let name
|
|
22
23
|
let command
|
|
@@ -58,18 +59,30 @@ const start_command = async(args) => {
|
|
|
58
59
|
name,
|
|
59
60
|
command,
|
|
60
61
|
prefixColor,
|
|
61
|
-
cwd: cfg.working_dir
|
|
62
|
+
cwd: cfg.working_dir,
|
|
63
|
+
env: process.env,
|
|
62
64
|
})
|
|
63
65
|
})
|
|
64
66
|
|
|
67
|
+
const has_server = run_configs.findIndex((c) => c.type === "server") > -1
|
|
68
|
+
|
|
69
|
+
// TODO: we shouldnt check in native mode
|
|
65
70
|
// check if docker is running
|
|
66
|
-
if (
|
|
71
|
+
if (has_server) {
|
|
67
72
|
docker_runtime_check()
|
|
68
73
|
}
|
|
69
74
|
|
|
70
|
-
|
|
75
|
+
// check if we should run the tunnel
|
|
76
|
+
if (has_server) {
|
|
77
|
+
run_commands.push({
|
|
78
|
+
name: "tunnel",
|
|
79
|
+
command: "./node_modules/.bin/tunnelmole 80",
|
|
80
|
+
prefixColor: "#F00",
|
|
81
|
+
cwd: process.cwd(),
|
|
82
|
+
})
|
|
83
|
+
}
|
|
71
84
|
|
|
72
|
-
|
|
85
|
+
let project_errors
|
|
73
86
|
|
|
74
87
|
const {result, commands} = concurrently(run_commands, {
|
|
75
88
|
killOthers: ["success", "failure"],
|