xshell 1.3.39 → 1.3.40

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/tsconfig.json CHANGED
@@ -39,6 +39,7 @@
39
39
  "inlineSources": false,
40
40
 
41
41
  // --- features
42
+ "erasableSyntaxOnly": true,
42
43
  "preserveSymlinks": false,
43
44
  "jsx": "react-jsx",
44
45
  "removeComments": false,
package/utils.d.ts CHANGED
@@ -21,12 +21,16 @@ export declare function inspect(obj: any, options?: util.InspectOptions & {
21
21
  limit?: number;
22
22
  omit?: string[];
23
23
  }): string;
24
- /** 根据 enabled 选项返回有 / 无颜色的字符串 (str) */
25
- export declare function colored(str: string, color: string, enabled?: boolean): any;
26
24
  export declare namespace inspect {
27
- const custom: typeof util.inspect.custom;
28
- const defaultOptions: util.InspectOptions;
25
+ var custom: typeof util.inspect.custom;
26
+ var defaultOptions: util.InspectOptions;
27
+ }
28
+ export interface inspect {
29
+ custom: typeof util.inspect.custom;
30
+ defaultOptions: typeof util.inspect.defaultOptions;
29
31
  }
32
+ /** 根据 enabled 选项返回有 / 无颜色的字符串 (str) */
33
+ export declare function colored(str: string, color: string, enabled?: boolean): any;
30
34
  /** 消费一个可读流 */
31
35
  export declare function consume_stream(stream: Readable, ignore_error?: boolean): Promise<void>;
32
36
  export declare function stream_to_lines(stream: Readable): AsyncGenerator<string, void, unknown>;
package/utils.js CHANGED
@@ -61,14 +61,12 @@ export function inspect(obj, options = {}) {
61
61
  else
62
62
  return text;
63
63
  }
64
+ inspect.custom = util.inspect.custom;
65
+ inspect.defaultOptions = util.inspect.defaultOptions;
64
66
  /** 根据 enabled 选项返回有 / 无颜色的字符串 (str) */
65
67
  export function colored(str, color, enabled = inspect.defaultOptions.colors) {
66
68
  return enabled ? str[color] : str;
67
69
  }
68
- (function (inspect) {
69
- inspect.custom = util.inspect.custom;
70
- inspect.defaultOptions = util.inspect.defaultOptions;
71
- })(inspect || (inspect = {}));
72
70
  // ------------------------------------ stream
73
71
  /** 消费一个可读流 */
74
72
  export async function consume_stream(stream, ignore_error = false) {