@constellation-network/node-pilot 0.14.0-omegatest → 0.14.0-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 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.14.0-omegatest darwin-arm64 node-v22.15.0
24
+ @constellation-network/node-pilot/0.14.0-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.14.0-omegatest/src/commands/clean.ts)_
75
+ _See code: [src/commands/clean.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.14.0-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.14.0-omegatest/src/commands/config.ts)_
92
+ _See code: [src/commands/config.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.14.0-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.14.0-omegatest/src/commands/config/get.ts)_
116
+ _See code: [src/commands/config/get.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.14.0-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.14.0-omegatest/src/commands/config/set.ts)_
139
+ _See code: [src/commands/config/set.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.14.0-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.14.0-omegatest/src/commands/info.ts)_
176
+ _See code: [src/commands/info.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.14.0-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.14.0-omegatest/src/commands/logs.ts)_
202
+ _See code: [src/commands/logs.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.14.0-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.14.0-omegatest/src/commands/restart.ts)_
230
+ _See code: [src/commands/restart.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.14.0-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.14.0-omegatest/src/commands/shutdown.ts)_
247
+ _See code: [src/commands/shutdown.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.14.0-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.14.0-omegatest/src/commands/status.ts)_
261
+ _See code: [src/commands/status.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.14.0-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.14.0-omegatest/src/commands/uninstall.ts)_
278
+ _See code: [src/commands/uninstall.ts](https://github.com/Constellation-Labs/node-pilot/blob/v0.14.0-testnet/src/commands/uninstall.ts)_
279
279
  <!-- commandsstop -->
@@ -154,9 +154,6 @@ export const checkNetwork = {
154
154
  configStore.setClusterStats({ total: nodes.length });
155
155
  return true;
156
156
  })
157
- .catch(() => {
158
- clm.error(`${type} is not in service. Please try again later.`);
159
- return false;
160
- });
157
+ .catch(() => false);
161
158
  }
162
159
  };
@@ -50,8 +50,8 @@ export const checkProject = {
50
50
  let mainLayerMem = 0;
51
51
  if (currentNetwork === 'testnet') {
52
52
  // Divide equally between layers with max of 10GB each
53
- subLayerMem = layersToRun.length > 1 ? Math.floor(answer / layersToRun.length) : 0;
54
- subLayerMem = Math.min(subLayerMem, 10);
53
+ subLayerMem = layersToRun.length > 1 ? Math.floor(answer / 3) : 0;
54
+ subLayerMem = Math.min(subLayerMem, 5);
55
55
  mainLayerMem = Math.min(10, answer - subLayerMem);
56
56
  }
57
57
  else {
@@ -127,9 +127,9 @@ export const checkProject = {
127
127
  else if (rInfo.version !== nInfo.version) {
128
128
  configStore.setNetworkInfo({ type: rInfo.network, version: rInfo.version });
129
129
  }
130
- const clusterVersion = await clusterService.getReleaseVersion();
131
130
  if (!requiresInstall) {
132
131
  const nInfo = configStore.getNetworkInfo();
132
+ const clusterVersion = await clusterService.getReleaseVersion();
133
133
  if (nInfo.version !== clusterVersion) {
134
134
  const answer = await input({
135
135
  default: 'y',
@@ -5,7 +5,10 @@ import { checkNetwork } from "../checks/check-network.js";
5
5
  import { checkNodePilot } from "../checks/check-pilot.js";
6
6
  import { checkProject } from "../checks/check-project.js";
7
7
  import { checkWallet } from "../checks/check-wallet.js";
8
+ import { clm } from "../clm.js";
9
+ import { configStore } from "../config-store.js";
8
10
  import { keyFileHelper } from "../helpers/key-file-helper.js";
11
+ import { dockerService } from "../services/docker-service.js";
9
12
  import { migrationService } from "../services/migration-service.js";
10
13
  export default class Status extends Command {
11
14
  static description = 'Display node status and configuration settings';
@@ -21,7 +24,14 @@ export async function checkInstallationAndConfigurationStatus() {
21
24
  migrationService.runMigrations();
22
25
  await checkProject.checkJavaMemory();
23
26
  await checkNetwork.checkExternalIpAddress();
24
- // await checkNetwork.isNetworkConnectable();
27
+ if (!await checkNetwork.isNetworkConnectable()) {
28
+ if (await dockerService.isRunning()) {
29
+ await checkLayers.layersStatus();
30
+ return;
31
+ }
32
+ const { type } = configStore.getNetworkInfo();
33
+ clm.error(`${type} is currently offline. Please try again later.`);
34
+ }
25
35
  await checkNodePilot.checkDiscordRegistration();
26
36
  await checkProject.releaseVersion();
27
37
  await keyFileHelper.promptIfNoKeyFile();
@@ -1,11 +1,12 @@
1
1
  import semver from "semver";
2
2
  import { clm } from "../clm.js";
3
3
  import { configStore } from "../config-store.js";
4
+ import { projectHelper } from "../helpers/project-helper.js";
4
5
  export const migrationService = {
5
6
  runMigrations() {
6
7
  const migrations = {
7
8
  '0.12.5': m0125,
8
- '0.14.0': m0140,
9
+ '0.13.9': m0139,
9
10
  // add more migrations as needed
10
11
  };
11
12
  const { version = '0.0.0' } = configStore.getProjectInfo();
@@ -30,9 +31,10 @@ export const migrationService = {
30
31
  configStore.setProjectInfo({ version: currentVersion.toString() });
31
32
  }
32
33
  };
33
- function m0140() {
34
- clm.step('Running migration 0.14.0...');
34
+ function m0139() {
35
+ clm.step('Running migration 0.13.9...');
35
36
  configStore.setProjectFlag('javaMemoryChecked', false);
37
+ projectHelper.upgradeHypergraph();
36
38
  }
37
39
  function m0125() {
38
40
  clm.step('Running migration 0.12.5...');
@@ -363,5 +363,5 @@
363
363
  ]
364
364
  }
365
365
  },
366
- "version": "0.14.0-omegatest"
366
+ "version": "0.14.0-testnet"
367
367
  }
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.14.0-omegatest",
4
+ "version": "0.14.0-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 omegatest"
24
+ "pub": "npm publish --access public --tag testnet"
25
25
  },
26
26
  "types": "dist/index.d.ts",
27
27
  "engines": {