@rpcbase/cli 0.24.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/cli",
3
- "version": "0.24.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
  }
@@ -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
@@ -63,14 +64,25 @@ const start_command = async(args) => {
63
64
  })
64
65
  })
65
66
 
67
+ const has_server = run_configs.findIndex((c) => c.type === "server") > -1
68
+
69
+ // TODO: we shouldnt check in native mode
66
70
  // check if docker is running
67
- if (run_configs.filter((c) => c.type === "server").length > 0) {
71
+ if (has_server) {
68
72
  docker_runtime_check()
69
73
  }
70
74
 
71
- let project_errors
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
+ }
72
84
 
73
- // console.log("RUN COMMANDS", run_commands)
85
+ let project_errors
74
86
 
75
87
  const {result, commands} = concurrently(run_commands, {
76
88
  killOthers: ["success", "failure"],