@nosana/node 1.1.0-rc → 1.1.1-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.0-rc",
3
+ "version": "1.1.1-rc",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "nosana-node": "./dist/src/index.js"
@@ -30,6 +30,7 @@ export class ConsoleLogger {
30
30
  return this.isNode;
31
31
  }
32
32
  update(log, isNode = true) {
33
+ const renderBase = `${chalk.bgGreenBright.black.bold(' RUNNING JOB ')} ${chalk.reset('')}`;
33
34
  if (!this.kill && log.type == 'kill-process') {
34
35
  if (this.pending) {
35
36
  this.spinner.stop();
@@ -44,7 +45,7 @@ export class ConsoleLogger {
44
45
  this.pending = true;
45
46
  this.expecting = log.pending?.expecting;
46
47
  if (isNode && this.taskManagerActive) {
47
- this.spinner.succeed(chalk.magenta(`${chalk.bgMagenta.bold(' TASKMANAGER ')} Exited`));
48
+ this.spinner.succeed(renderBase + ' Exited');
48
49
  }
49
50
  this.spinner = ora(log.log).start();
50
51
  }
@@ -81,11 +82,12 @@ export class ConsoleLogger {
81
82
  this.pending = true;
82
83
  this.expiry = log.payload?.expiry;
83
84
  const startTime = Date.now();
84
- this.spinner = ora(chalk.magenta(`${chalk.bgMagenta.bold(' TASKMANAGER ')} ${chalk.bgGreen.bold(' Duration: 0s ')} ${chalk.bgCyan.bold(` Max Duration: ${formatTime(this.expiry ?? 0)} `)}`)).start();
85
+ 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();
85
87
  this.taskManagerRunInterval = setInterval(() => {
86
88
  if (this.taskManagerActive) {
87
89
  const duration = (Date.now() - startTime) / 1000;
88
- this.spinner.text = chalk.magenta(`${chalk.bgMagenta.bold(' TASKMANAGER ')} ${chalk.bgGreen.bold(` Duration: ${formatTime(duration)} `)} ${chalk.bgCyan.bold(` Max Duration: ${formatTime((this.expiry ?? 0))} `)}`);
90
+ this.spinner.text = renderBar(duration);
89
91
  }
90
92
  else {
91
93
  clearInterval(this.taskManagerRunInterval);
@@ -97,7 +99,7 @@ export class ConsoleLogger {
97
99
  // While TaskManager is active, swallow all logs except the stop signal
98
100
  if (this.taskManagerActive) {
99
101
  if (log.method === 'TaskManager.start') {
100
- this.spinner.succeed(chalk.magenta(`${chalk.bgMagenta.bold(' TASKMANAGER ')} Ending ${log.job}...`));
102
+ this.spinner.succeed(renderBase + ` Ending ${log.job}...`);
101
103
  this.taskManagerActive = false;
102
104
  this.pending = false;
103
105
  return;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@nosana/node",
3
- "version": "1.1.0-rc",
3
+ "version": "1.1.1-rc",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@nosana/node",
9
- "version": "1.1.0-rc",
9
+ "version": "1.1.1-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.0-rc",
3
+ "version": "1.1.1-rc",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "nosana-node": "./dist/src/index.js"