ddan-js 3.6.1 → 3.6.3

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.
@@ -1,4 +1,10 @@
1
+ export interface ExecResult {
2
+ error: Error | null;
3
+ stdout: string;
4
+ stderr: string;
5
+ }
1
6
  declare const _default: {
2
7
  child_exec: (cmd: string) => Promise<[any, string]>;
8
+ childExec: (cmd: string, timeout?: number) => Promise<ExecResult>;
3
9
  };
4
10
  export default _default;
@@ -41,6 +41,7 @@ declare const _default: {
41
41
  useSystem?: boolean | undefined;
42
42
  } | undefined) => Promise<string>;
43
43
  child_exec: (cmd: string) => Promise<[any, string]>;
44
+ childExec: (cmd: string, timeout?: number) => Promise<import("./child").ExecResult>;
44
45
  brotliCompress: typeof import("./brotli").brotliCompress;
45
46
  brotliDecompress: typeof import("./brotli").brotliDecompress;
46
47
  readDirectory: (dir: string, callback?: import("../..").Ddan.Func1<string, any> | undefined) => Promise<unknown>;
@@ -1,7 +1,7 @@
1
1
  import { Ddan } from '../../typings';
2
2
  /**
3
3
  * 安全可靠的 URL 拼接函数
4
- * 支持协议域名、相对路径、绝对路径 (macOS/Unix) 等场景
4
+ * 支持协议域名、相对路径、绝对路径等场景
5
5
  * @param parts URL 各个部分
6
6
  * @returns 拼接后的完整 URL 字符串
7
7
  */
@@ -38,6 +38,7 @@ declare const dNode: {
38
38
  useSystem?: boolean | undefined;
39
39
  } | undefined) => Promise<string>;
40
40
  child_exec: (cmd: string) => Promise<[any, string]>;
41
+ childExec: (cmd: string, timeout?: number) => Promise<import("../modules/node/child").ExecResult>;
41
42
  brotliCompress: typeof import("../modules/node/brotli").brotliCompress;
42
43
  brotliDecompress: typeof import("../modules/node/brotli").brotliDecompress;
43
44
  readDirectory: (dir: string, callback?: import("..").Ddan.Func1<string, any> | undefined) => Promise<unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ddan-js",
3
- "version": "3.6.1",
3
+ "version": "3.6.3",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "ddan-js",