@nu-art/commando 0.204.3 → 0.204.5

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/cli/nvm.js CHANGED
@@ -1,12 +1,35 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
3
26
  exports.NVM = exports.Cli_NVM = void 0;
4
27
  const programming_1 = require("./programming");
5
28
  const basic_1 = require("./basic");
6
29
  const cli_1 = require("../core/cli");
7
- const fs = require("fs");
30
+ const fs = __importStar(require("fs"));
8
31
  const fs_1 = require("fs");
9
- const path = require("path");
32
+ const path = __importStar(require("path"));
10
33
  const tools_1 = require("../core/tools");
11
34
  const ts_common_1 = require("@nu-art/ts-common");
12
35
  const CONST__FILE_NVMRC = '.nvmrc';
package/core/cli.js CHANGED
@@ -58,9 +58,8 @@ class CliInteractive extends BaseCLI {
58
58
  if (this._debug)
59
59
  this.logDebug(`executing: `, `"""\n${command}\n"""`);
60
60
  this.shell.stdin.write(command + this.option.newlineDelimiter, 'utf-8', (err) => {
61
- console.log('GOT HERE');
62
61
  if (err)
63
- console.error(err);
62
+ ts_common_1.StaticLogger.logError('error', err);
64
63
  });
65
64
  this.commands = [];
66
65
  };
@@ -73,7 +72,7 @@ class CliInteractive extends BaseCLI {
73
72
  const message = data.toString().trim();
74
73
  if (!message.length)
75
74
  return;
76
- console.log(message);
75
+ ts_common_1.StaticLogger.logInfo(message);
77
76
  };
78
77
  this.shell.stdout.on('data', printer);
79
78
  this.shell.stderr.on('data', printer);
@@ -81,7 +80,7 @@ class CliInteractive extends BaseCLI {
81
80
  this.shell.on('data', printer);
82
81
  // Handle shell exit
83
82
  this.shell.on('close', (code) => {
84
- console.log(`child process exited with code ${code}`);
83
+ ts_common_1.StaticLogger.logInfo(`child process exited with code ${code}`);
85
84
  });
86
85
  }
87
86
  }
@@ -106,12 +105,10 @@ class Cli extends BaseCLI {
106
105
  }
107
106
  if (stderr)
108
107
  reject(stderr);
109
- if (stdout) {
110
- console.log(stdout);
111
- this.logVerbose(stdout);
112
- }
108
+ if (stdout)
109
+ this.logError(stdout);
113
110
  if (stderr)
114
- this.logVerboseBold(stderr);
111
+ this.logError(stderr);
115
112
  resolve({ stdout, stderr });
116
113
  });
117
114
  });
package/core/tools.js CHANGED
@@ -1,7 +1,30 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
3
26
  exports.convertToFullPath = exports.removeAnsiCodes = void 0;
4
- const path = require("path");
27
+ const path = __importStar(require("path"));
5
28
  function removeAnsiCodes(text) {
6
29
  // This regular expression matches the escape codes and removes them
7
30
  return text.replace(/\x1B\[\d+;?\d*m/g, '');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nu-art/commando",
3
- "version": "0.204.3",
3
+ "version": "0.204.5",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "TacB0sS",