@rpcbase/cli 0.31.0 → 0.33.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.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"license": "SSPL-1.0",
|
|
5
5
|
"bin": {
|
|
6
6
|
"rb": "./bin.js"
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"bluebird": "3.7.2",
|
|
13
|
-
"concurrently": "
|
|
13
|
+
"concurrently": "8.2.1",
|
|
14
14
|
"debug": "4.3.4",
|
|
15
|
-
"dotenv": "16.
|
|
15
|
+
"dotenv": "16.3.1",
|
|
16
16
|
"picocolors": "1.0.0",
|
|
17
|
-
"semver": "7.
|
|
18
|
-
"validator": "13.
|
|
19
|
-
"yargs": "17.
|
|
17
|
+
"semver": "7.5.4",
|
|
18
|
+
"validator": "13.11.0",
|
|
19
|
+
"yargs": "17.7.2"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -9,9 +9,12 @@ const get_root_dir = require("./get_root_dir")
|
|
|
9
9
|
|
|
10
10
|
const TAILSCALE_PATH = "/Applications/Tailscale.app/Contents/MacOS/Tailscale"
|
|
11
11
|
|
|
12
|
+
const has_tailscale = process.platform === "darwin" && fs.existsSync(TAILSCALE_PATH)
|
|
13
|
+
|
|
12
14
|
const get_port = (run_configs) => {
|
|
13
15
|
const project_root_dir = get_root_dir(run_configs)
|
|
14
16
|
|
|
17
|
+
// TODO: should join w/ .env.base
|
|
15
18
|
const server_env_path = path.join(project_root_dir, "./server/server/.env")
|
|
16
19
|
|
|
17
20
|
const server_env_buf = fs.readFileSync(server_env_path)
|
|
@@ -25,6 +28,8 @@ const get_port = (run_configs) => {
|
|
|
25
28
|
|
|
26
29
|
|
|
27
30
|
const start = (run_configs) => {
|
|
31
|
+
if (!has_tailscale) return
|
|
32
|
+
|
|
28
33
|
const {server_port, wss_port} = get_port(run_configs)
|
|
29
34
|
try {
|
|
30
35
|
execSync(`${TAILSCALE_PATH} serve https:443 /wss http://127.0.0.1:${wss_port}`, {stdio: "inherit"})
|
|
@@ -37,6 +42,8 @@ const start = (run_configs) => {
|
|
|
37
42
|
|
|
38
43
|
|
|
39
44
|
const stop = (run_configs) => {
|
|
45
|
+
if (!has_tailscale) return
|
|
46
|
+
|
|
40
47
|
const {server_port, wss_port} = get_port(run_configs)
|
|
41
48
|
try {
|
|
42
49
|
execSync(`${TAILSCALE_PATH} serve https:443 /wss http://127.0.0.1:${wss_port} off`, {stdio: "inherit"})
|