@constellation-network/node-pilot 0.13.0-omegatest.8 → 0.13.1-testnet
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/README.md +11 -11
- package/dist/commands/status.js +1 -1
- package/dist/services/node-service.d.ts +3 -0
- package/dist/services/node-service.js +12 -14
- package/oclif.manifest.json +1 -1
- package/package.json +2 -3
- package/install-java-21.sh +0 -110
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ $ npm install -g @constellation-network/node-pilot
|
|
|
21
21
|
$ cpilot COMMAND
|
|
22
22
|
running command...
|
|
23
23
|
$ cpilot (--version|-v)
|
|
24
|
-
@constellation-network/node-pilot/0.13.
|
|
24
|
+
@constellation-network/node-pilot/0.13.1-testnet darwin-arm64 node-v22.15.0
|
|
25
25
|
$ cpilot --help [COMMAND]
|
|
26
26
|
USAGE
|
|
27
27
|
$ cpilot COMMAND
|
|
@@ -72,7 +72,7 @@ EXAMPLES
|
|
|
72
72
|
$ cpilot clean
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
_See code: [src/commands/clean.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.13.
|
|
75
|
+
_See code: [src/commands/clean.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.13.1-testnet/src/commands/clean.ts)_
|
|
76
76
|
|
|
77
77
|
## `cpilot config`
|
|
78
78
|
|
|
@@ -89,7 +89,7 @@ EXAMPLES
|
|
|
89
89
|
$ cpilot config
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
_See code: [src/commands/config.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.13.
|
|
92
|
+
_See code: [src/commands/config.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.13.1-testnet/src/commands/config.ts)_
|
|
93
93
|
|
|
94
94
|
## `cpilot config get [NAME]`
|
|
95
95
|
|
|
@@ -113,7 +113,7 @@ EXAMPLES
|
|
|
113
113
|
$ cpilot config get gl0:CL_PUBLIC_HTTP_PORT
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
-
_See code: [src/commands/config/get.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.13.
|
|
116
|
+
_See code: [src/commands/config/get.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.13.1-testnet/src/commands/config/get.ts)_
|
|
117
117
|
|
|
118
118
|
## `cpilot config set NAME VALUE`
|
|
119
119
|
|
|
@@ -136,7 +136,7 @@ EXAMPLES
|
|
|
136
136
|
$ cpilot config set gl0:CL_PUBLIC_HTTP_PORT 9000
|
|
137
137
|
```
|
|
138
138
|
|
|
139
|
-
_See code: [src/commands/config/set.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.13.
|
|
139
|
+
_See code: [src/commands/config/set.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.13.1-testnet/src/commands/config/set.ts)_
|
|
140
140
|
|
|
141
141
|
## `cpilot help [COMMAND]`
|
|
142
142
|
|
|
@@ -173,7 +173,7 @@ EXAMPLES
|
|
|
173
173
|
$ cpilot info
|
|
174
174
|
```
|
|
175
175
|
|
|
176
|
-
_See code: [src/commands/info.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.13.
|
|
176
|
+
_See code: [src/commands/info.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.13.1-testnet/src/commands/info.ts)_
|
|
177
177
|
|
|
178
178
|
## `cpilot logs LAYER`
|
|
179
179
|
|
|
@@ -199,7 +199,7 @@ EXAMPLES
|
|
|
199
199
|
$ cpilot logs
|
|
200
200
|
```
|
|
201
201
|
|
|
202
|
-
_See code: [src/commands/logs.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.13.
|
|
202
|
+
_See code: [src/commands/logs.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.13.1-testnet/src/commands/logs.ts)_
|
|
203
203
|
|
|
204
204
|
## `cpilot restart [LAYER]`
|
|
205
205
|
|
|
@@ -227,7 +227,7 @@ EXAMPLES
|
|
|
227
227
|
$ cpilot restart
|
|
228
228
|
```
|
|
229
229
|
|
|
230
|
-
_See code: [src/commands/restart.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.13.
|
|
230
|
+
_See code: [src/commands/restart.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.13.1-testnet/src/commands/restart.ts)_
|
|
231
231
|
|
|
232
232
|
## `cpilot shutdown`
|
|
233
233
|
|
|
@@ -244,7 +244,7 @@ EXAMPLES
|
|
|
244
244
|
$ cpilot shutdown
|
|
245
245
|
```
|
|
246
246
|
|
|
247
|
-
_See code: [src/commands/shutdown.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.13.
|
|
247
|
+
_See code: [src/commands/shutdown.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.13.1-testnet/src/commands/shutdown.ts)_
|
|
248
248
|
|
|
249
249
|
## `cpilot status`
|
|
250
250
|
|
|
@@ -258,7 +258,7 @@ DESCRIPTION
|
|
|
258
258
|
Display node status and configuration settings
|
|
259
259
|
```
|
|
260
260
|
|
|
261
|
-
_See code: [src/commands/status.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.13.
|
|
261
|
+
_See code: [src/commands/status.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.13.1-testnet/src/commands/status.ts)_
|
|
262
262
|
|
|
263
263
|
## `cpilot uninstall`
|
|
264
264
|
|
|
@@ -275,5 +275,5 @@ EXAMPLES
|
|
|
275
275
|
$ cpilot uninstall
|
|
276
276
|
```
|
|
277
277
|
|
|
278
|
-
_See code: [src/commands/uninstall.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.13.
|
|
278
|
+
_See code: [src/commands/uninstall.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.13.1-testnet/src/commands/uninstall.ts)_
|
|
279
279
|
<!-- commandsstop -->
|
package/dist/commands/status.js
CHANGED
|
@@ -17,12 +17,12 @@ export async function checkInstallationAndConfigurationStatus() {
|
|
|
17
17
|
await checkInitialSetup.firstTimeRun();
|
|
18
18
|
await checkNodePilot.checkMultipleUsers();
|
|
19
19
|
await checkProject.projectInstallation();
|
|
20
|
+
await checkNodePilot.checkVersion();
|
|
20
21
|
migrationService.runMigrations();
|
|
21
22
|
await checkProject.checkJavaMemory();
|
|
22
23
|
await checkNetwork.checkExternalIpAddress();
|
|
23
24
|
await checkNetwork.isNetworkConnectable();
|
|
24
25
|
await checkNodePilot.checkDiscordRegistration();
|
|
25
|
-
await checkNodePilot.checkVersion();
|
|
26
26
|
await checkProject.releaseVersion();
|
|
27
27
|
await keyFileHelper.promptIfNoKeyFile();
|
|
28
28
|
await checkNetwork.checkSeedList();
|
|
@@ -3,6 +3,9 @@ export declare const nodeService: {
|
|
|
3
3
|
getNodeInfo(layer: "first" | TessellationLayer): Promise<NodeInfo>;
|
|
4
4
|
getSnapshotHash(ipAddr: string, ordinal: number): Promise<string>;
|
|
5
5
|
getStatusInfo(layer: TessellationLayer): Promise<TessellationLayer>;
|
|
6
|
+
isPortExposed(port: number): Promise<boolean>;
|
|
7
|
+
isPortInUse(port: number): Promise<boolean>;
|
|
8
|
+
isPortOpen(port: number): Promise<boolean>;
|
|
6
9
|
joinCluster(layer: TessellationLayer): Promise<void>;
|
|
7
10
|
leaveCluster(layer: TessellationLayer): Promise<boolean>;
|
|
8
11
|
leaveClusterAllLayers(): Promise<boolean>;
|
|
@@ -31,20 +31,18 @@ export const nodeService = {
|
|
|
31
31
|
async getStatusInfo(layer) {
|
|
32
32
|
return layer;
|
|
33
33
|
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
// return shellService.runCommandWithOutput(command).then(o => o.length > 0);
|
|
47
|
-
// },
|
|
34
|
+
async isPortExposed(port) {
|
|
35
|
+
const command = configStore.getSystemInfo().platform === 'linux' ? `ss -tuln | grep 0.0.0.0:${port}` : `netstat -an | grep '*.${port}'`;
|
|
36
|
+
return shellService.runCommandWithOutput(command).then(o => o.length > 0);
|
|
37
|
+
},
|
|
38
|
+
async isPortInUse(port) {
|
|
39
|
+
clm.preStep('Making a sudo call to check if a port is in use...');
|
|
40
|
+
return shellService.runCommandWithOutput(`sudo lsof -i :${port}`).then(Boolean).catch(() => false);
|
|
41
|
+
},
|
|
42
|
+
async isPortOpen(port) {
|
|
43
|
+
const command = configStore.getSystemInfo().platform === 'linux' ? `ss -tuln | grep :${port}` : `netstat -an | grep '.${port}'`;
|
|
44
|
+
return shellService.runCommandWithOutput(command).then(o => o.length > 0);
|
|
45
|
+
},
|
|
48
46
|
async joinCluster(layer) {
|
|
49
47
|
const { state } = await this.getNodeInfo(layer);
|
|
50
48
|
if (state !== "ReadyToJoin") {
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constellation-network/node-pilot",
|
|
3
3
|
"description": "An easy deployment and monitoring tool for Constellation nodes.",
|
|
4
|
-
"version": "0.13.
|
|
4
|
+
"version": "0.13.1-testnet",
|
|
5
5
|
"author": "Frank Fox",
|
|
6
6
|
"bin": {
|
|
7
7
|
"cpilot": "bin/run.js"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"version": "oclif readme && git add README.md",
|
|
22
22
|
"start": "./bin/dev.js",
|
|
23
23
|
"debug": "DEBUG=true ./bin/dev.js",
|
|
24
|
-
"pub": "npm publish --access public --tag
|
|
24
|
+
"pub": "npm publish --access public --tag testnet"
|
|
25
25
|
},
|
|
26
26
|
"types": "dist/index.d.ts",
|
|
27
27
|
"engines": {
|
|
@@ -69,7 +69,6 @@
|
|
|
69
69
|
"dist",
|
|
70
70
|
"oclif.manifest.json",
|
|
71
71
|
"install-dependencies.sh",
|
|
72
|
-
"install-java-21.sh",
|
|
73
72
|
"projects",
|
|
74
73
|
"scripts",
|
|
75
74
|
"README.md",
|
package/install-java-21.sh
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
# Break on any error
|
|
4
|
-
set -e
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
check_java_home() {
|
|
8
|
-
# echo "Checking if JAVA_HOME env is set"
|
|
9
|
-
|
|
10
|
-
if [ -z "$JAVA_HOME" ] || ! grep -q 'JAVA_HOME' "$HOME/.bashrc"; then
|
|
11
|
-
JAVA_HOME_LINE='export JAVA_HOME="$(dirname "$(dirname "$(readlink -f "$(which java)")")")"'
|
|
12
|
-
echo "JAVA_HOME is not set. Attempting to set automatically"
|
|
13
|
-
echo "Please ensure the following line is in your ~/.bashrc or ~/.zshrc file:"
|
|
14
|
-
echo "Script will attempt to now add it for you and run it, but this only adds to .bashrc"
|
|
15
|
-
echo $JAVA_HOME_LINE
|
|
16
|
-
echo "$JAVA_HOME_LINE" >> $HOME/.bashrc
|
|
17
|
-
echo "Adding JAVA_HOME to current environment"
|
|
18
|
-
eval $JAVA_HOME_LINE
|
|
19
|
-
echo "JAVA_HOME is now set to: $JAVA_HOME"
|
|
20
|
-
fi
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
# Check and install Java 21
|
|
25
|
-
check_java() {
|
|
26
|
-
# echo "Checking for Java 21..."
|
|
27
|
-
if command -v java >/dev/null 2>&1; then
|
|
28
|
-
java_version=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}')
|
|
29
|
-
# echo "Found Java version: $java_version"
|
|
30
|
-
if [[ "$java_version" == 21* ]] || [[ "$java_version" == 1.21* ]]; then
|
|
31
|
-
echo "✅ Java 21 is installed."
|
|
32
|
-
return 0
|
|
33
|
-
else
|
|
34
|
-
echo "⚠️ Java is installed but not version 21. Will attempt to install Java 21."
|
|
35
|
-
fi
|
|
36
|
-
else
|
|
37
|
-
echo "⚠️ Java not found. Will attempt to install Java 21."
|
|
38
|
-
fi
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
case "$(uname)" in
|
|
42
|
-
Linux)
|
|
43
|
-
if command -v apt >/dev/null 2>&1; then
|
|
44
|
-
echo "Installing Java 21 using apt..."
|
|
45
|
-
sudo apt install -y openjdk-21-jdk
|
|
46
|
-
elif command -v yum >/dev/null 2>&1; then
|
|
47
|
-
echo "Installing Java 21 using yum..."
|
|
48
|
-
sudo yum install -y java-21-openjdk-devel
|
|
49
|
-
else
|
|
50
|
-
echo "⚠️ Unsupported Linux distribution. Please install Java 21 manually."
|
|
51
|
-
return 1
|
|
52
|
-
fi
|
|
53
|
-
;;
|
|
54
|
-
Darwin)
|
|
55
|
-
if command -v brew >/dev/null 2>&1; then
|
|
56
|
-
echo "Installing Java 21 using Homebrew..."
|
|
57
|
-
brew tap adoptopenjdk/openjdk
|
|
58
|
-
brew install --cask adoptopenjdk21
|
|
59
|
-
else
|
|
60
|
-
echo "⚠️ Homebrew not found. Please install Java 21 manually."
|
|
61
|
-
return 1
|
|
62
|
-
fi
|
|
63
|
-
;;
|
|
64
|
-
MINGW*|MSYS*|CYGWIN*)
|
|
65
|
-
echo "On Windows, please install Java 21 manually from https://adoptopenjdk.net/"
|
|
66
|
-
return 1
|
|
67
|
-
;;
|
|
68
|
-
*)
|
|
69
|
-
echo "⚠️ Unsupported OS: $(uname). Please install Java 21 manually."
|
|
70
|
-
return 1
|
|
71
|
-
;;
|
|
72
|
-
esac
|
|
73
|
-
|
|
74
|
-
echo "✅ Java 21 installation complete."
|
|
75
|
-
return 0
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
check_system_update() {
|
|
79
|
-
echo ""
|
|
80
|
-
echo "Checking for system updates..."
|
|
81
|
-
echo ""
|
|
82
|
-
|
|
83
|
-
if [ "$(uname)" = "Linux" ]; then
|
|
84
|
-
sudo apt-get update && sudo apt-get upgrade -y
|
|
85
|
-
echo "System packages updated."
|
|
86
|
-
fi
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
check_system_update
|
|
90
|
-
check_java
|
|
91
|
-
check_java_home
|
|
92
|
-
|
|
93
|
-
if [ -f /var/run/reboot-required ]; then
|
|
94
|
-
echo ""
|
|
95
|
-
echo "⚠️ A system reboot is required to complete updates. Please reboot your system."
|
|
96
|
-
echo ""
|
|
97
|
-
echo "Then run 'cpilot' to get started"
|
|
98
|
-
echo ""
|
|
99
|
-
echo "Would you like to reboot now? (y/n)"
|
|
100
|
-
read -r response
|
|
101
|
-
if [[ ! "$response" =~ ^[Yy]$ ]]; then
|
|
102
|
-
echo "Reboot skipped. Please reboot manually to proceed."
|
|
103
|
-
else
|
|
104
|
-
sudo reboot
|
|
105
|
-
fi
|
|
106
|
-
else
|
|
107
|
-
echo ""
|
|
108
|
-
echo "Run 'cpilot' to get started"
|
|
109
|
-
fi
|
|
110
|
-
|