@nosana/node 1.1.2-rc → 1.1.3-rc

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/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nosana/node",
3
- "version": "1.1.2-rc",
3
+ "version": "1.1.3-rc",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "nosana-node": "./dist/src/index.js"
@@ -16,6 +16,7 @@ export type configType = {
16
16
  };
17
17
  minDiskSpace: number;
18
18
  network: 'devnet' | 'mainnet';
19
+ spinnerInterval: number;
19
20
  };
20
21
  export declare const configs: (options?: {
21
22
  [key: string]: any;
@@ -20,5 +20,6 @@ export const configs = (options) => {
20
20
  },
21
21
  minDiskSpace: parseInt(loadConfigurationValue('MIN_DISK_SPACE')),
22
22
  network: options?.network ?? 'mainnet',
23
+ spinnerInterval: parseInt(loadConfigurationValue('SPINNER_INTERVAL', '5000')),
23
24
  };
24
25
  };
@@ -4,6 +4,7 @@ import { MultiBar, Presets, SingleBar } from 'cli-progress';
4
4
  import { log } from '../NodeLog.js';
5
5
  import { convertFromBytes } from '../../../utils/convertFromBytes.js';
6
6
  import { formatTime } from '../../../utils/formatTime.js';
7
+ import { configs } from '../../../configs/configs.js';
7
8
  export const consoleLogging = (() => {
8
9
  let instance = null;
9
10
  return () => {
@@ -47,7 +48,7 @@ export class ConsoleLogger {
47
48
  if (isNode && this.taskManagerActive) {
48
49
  this.spinner.succeed(renderBase + ' Exited');
49
50
  }
50
- this.spinner = ora(log.log).start();
51
+ this.spinner = ora({ text: log.log, interval: configs().spinnerInterval }).start();
51
52
  }
52
53
  if (this.kill) {
53
54
  if (log.type == 'kill-success') {
@@ -83,7 +84,7 @@ export class ConsoleLogger {
83
84
  this.expiry = log.payload?.expiry;
84
85
  const startTime = Date.now();
85
86
  const renderBar = (duration = 0) => `${renderBase} ${chalk.bgYellow.black.bold(` ⏱ Duration: ${formatTime(duration)} `)} ${chalk.reset('')} ${chalk.bgBlue.black.bold(` ⚡ Max Duration: ${formatTime(this.expiry ?? 0)} `)}`;
86
- this.spinner = ora(renderBar(0)).start();
87
+ this.spinner = ora({ text: renderBar(0), interval: configs().spinnerInterval }).start();
87
88
  this.taskManagerRunInterval = setInterval(() => {
88
89
  if (this.taskManagerActive) {
89
90
  const duration = (Date.now() - startTime) / 1000;
@@ -113,7 +114,7 @@ export class ConsoleLogger {
113
114
  log.type == 'process') {
114
115
  this.benchmarking = true;
115
116
  this.pending = true;
116
- this.spinner = ora(chalk.green(`${chalk.bgGreen.bold(' Checking Specs ')}`)).start();
117
+ this.spinner = ora({ text: chalk.green(`${chalk.bgGreen.bold(' Checking Specs ')}`), interval: configs().spinnerInterval }).start();
117
118
  return;
118
119
  }
119
120
  if (this.benchmarking) {
@@ -289,7 +290,7 @@ export class ConsoleLogger {
289
290
  if (log.pending?.isPending) {
290
291
  this.pending = true;
291
292
  this.expecting = log.pending?.expecting;
292
- this.spinner = ora(log.log).start();
293
+ this.spinner = ora({ text: log.log, interval: configs().spinnerInterval }).start();
293
294
  }
294
295
  else {
295
296
  console.log(log.log);
@@ -1,5 +1,6 @@
1
1
  import ora from 'ora';
2
2
  import chalk from 'chalk';
3
+ import { configs } from '../../configs/configs';
3
4
  const MINIMUM_SOL_BALANCE = 0.005;
4
5
  const SOLANA_DECIMAL = 1e9;
5
6
  export class BalanceHandler {
@@ -41,7 +42,7 @@ export class BalanceHandler {
41
42
  if (!wait) {
42
43
  throw new Error(insufficentSolMessage);
43
44
  }
44
- const spinner = ora(chalk.yellow(insufficentSolMessage)).start();
45
+ const spinner = ora({ text: chalk.yellow(insufficentSolMessage), interval: configs().spinnerInterval }).start();
45
46
  await this.waitForSufficentSol();
46
47
  spinner.succeed();
47
48
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@nosana/node",
3
- "version": "1.1.2-rc",
3
+ "version": "1.1.3-rc",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@nosana/node",
9
- "version": "1.1.2-rc",
9
+ "version": "1.1.3-rc",
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
12
  "@coral-xyz/anchor": "^0.28.1-beta.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nosana/node",
3
- "version": "1.1.2-rc",
3
+ "version": "1.1.3-rc",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "nosana-node": "./dist/src/index.js"