@nu-art/commando 0.204.141 → 0.204.143

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/console/types.js CHANGED
@@ -23,7 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.createBlessedWidget = exports.BlessedElements = void 0;
26
+ exports.BlessedElements = void 0;
27
+ exports.createBlessedWidget = createBlessedWidget;
27
28
  const blessed = __importStar(require("neo-blessed"));
28
29
  /**
29
30
  * A collection of Blessed elements for easy access.
@@ -69,4 +70,3 @@ function createBlessedWidget(type, props = {}, parent) {
69
70
  const element = exports.BlessedElements[type];
70
71
  return element(Object.assign(Object.assign({}, props), { parent }));
71
72
  }
72
- exports.createBlessedWidget = createBlessedWidget;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nu-art/commando",
3
- "version": "0.204.141",
3
+ "version": "0.204.143",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "TacB0sS",
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { CustomException } from '@nu-art/ts-common';
3
2
  import { ExecException } from 'child_process';
4
3
  export declare class CliError extends CustomException {
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CreateMergedInstance = exports.MergeClass = void 0;
3
+ exports.MergeClass = MergeClass;
4
+ exports.CreateMergedInstance = CreateMergedInstance;
4
5
  /**
5
6
  * Function to merge multiple classes into a single class.
6
7
  * @template T - An array of constructors.
@@ -26,7 +27,6 @@ function MergeClass(...plugins) {
26
27
  }
27
28
  return SuperClass;
28
29
  }
29
- exports.MergeClass = MergeClass;
30
30
  /**
31
31
  * Function to create an instance of a class that merges multiple classes.
32
32
  * @template T - An array of constructors.
@@ -37,4 +37,3 @@ function CreateMergedInstance(...plugins) {
37
37
  const SuperClass = MergeClass(...plugins);
38
38
  return new SuperClass();
39
39
  }
40
- exports.CreateMergedInstance = CreateMergedInstance;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Constructor, LogLevel } from '@nu-art/ts-common';
3
2
  import { LogTypes } from '../types';
4
3
  import { BaseCommando } from '../core/BaseCommando';
@@ -1,9 +1,3 @@
1
- /// <reference types="mocha" />
2
- /// <reference types="node" />
3
- /// <reference types="node" />
4
- /// <reference types="node" />
5
- /// <reference types="node" />
6
- /// <reference types="node" />
7
1
  import { Logger, LogLevel } from '@nu-art/ts-common';
8
2
  import { LogTypes } from '../types';
9
3
  type LogProcessor = (log: string, std: LogTypes) => boolean;
@@ -73,7 +73,7 @@ class InteractiveShell extends ts_common_1.Logger {
73
73
  });
74
74
  };
75
75
  this.shell = (0, node_child_process_1.spawn)('/bin/bash', {
76
- detached: true,
76
+ detached: true, // This is important to make the process a session leader
77
77
  shell: true
78
78
  });
79
79
  this.alive = true;
@@ -2,7 +2,7 @@ import { Constructor } from '@nu-art/ts-common';
2
2
  import { BaseCommando } from '../core/BaseCommando';
3
3
  export declare class Commando extends BaseCommando {
4
4
  private uid?;
5
- static create<T extends Constructor<any>[]>(...plugins: T): import("../core/class-merger").MergeTypes<[typeof BaseCommando, typeof Commando, ...T]> & BaseCommando & Commando;
5
+ static create<T extends Constructor<any>[]>(...plugins: T): (import("../core/class-merger").MergeTypes<[typeof BaseCommando, typeof Commando, ...T]> & BaseCommando) & Commando;
6
6
  constructor();
7
7
  setUID(uid: string): this;
8
8
  executeFile(filePath: string, interpreter?: string): Promise<{
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import { ExecOptions } from 'child_process';
4
2
  import { Logger } from '@nu-art/ts-common';
5
3
  export type CliOptions = ExecOptions & {
package/shell/tools.js CHANGED
@@ -23,13 +23,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.convertToFullPath = exports.removeAnsiCodes = void 0;
26
+ exports.removeAnsiCodes = removeAnsiCodes;
27
+ exports.convertToFullPath = convertToFullPath;
27
28
  const path = __importStar(require("path"));
28
29
  function removeAnsiCodes(text) {
29
30
  // This regular expression matches the escape codes and removes them
30
31
  return text.replace(/\x1B\[\d+;?\d*m/g, '');
31
32
  }
32
- exports.removeAnsiCodes = removeAnsiCodes;
33
33
  function convertToFullPath(pathToFile, assetParentPath = process.cwd()) {
34
34
  if (!pathToFile)
35
35
  throw new Error('Path not provided');
@@ -42,4 +42,3 @@ function convertToFullPath(pathToFile, assetParentPath = process.cwd()) {
42
42
  // throw new Error(`Found path: '${absolutePath}' which is out of the scope of the assert directory: '${assetParentPath}'`);
43
43
  return absolutePath;
44
44
  }
45
- exports.convertToFullPath = convertToFullPath;