@tapjs/processinfo 1.0.3 → 1.0.4

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.
Files changed (2) hide show
  1. package/index.d.ts +60 -12
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  /// <reference types="node" />
2
2
  import {
3
- spawn,
4
- spawnSync,
5
- exec,
6
- execSync,
7
- execFile,
8
- execFileSync,
3
+ ChildProcess,
4
+ ExecFileOptions,
5
+ ExecFileSyncOptions,
6
+ ExecOptions,
7
+ ExecSyncOptions,
8
+ SpawnOptions,
9
+ SpawnSyncOptions,
9
10
  } from 'node:child_process'
10
11
 
11
12
  declare interface ProcessInfoOptions {
@@ -21,6 +22,25 @@ declare class ProcessInfoNode {
21
22
  link(db: ProcessInfo): void
22
23
  }
23
24
 
25
+ declare interface ProcessInfoSpawnOptions extends SpawnOptions {
26
+ externalID?: string
27
+ }
28
+ declare interface ProcessInfoSpawnSyncOptions extends SpawnSyncOptions {
29
+ externalID?: string
30
+ }
31
+ declare interface ProcessInfoExecSyncOptions extends ExecSyncOptions {
32
+ externalID?: string
33
+ }
34
+ declare interface ProcessInfoExecOptions extends ExecOptions {
35
+ externalID?: string
36
+ }
37
+ declare interface ProcessInfoExecFileSyncOptions extends ExecFileSyncOptions {
38
+ externalID?: string
39
+ }
40
+ declare interface ProcessInfoExecFileOptions extends ExecFileOptions {
41
+ externalID?: string
42
+ }
43
+
24
44
  declare class ProcessInfo {
25
45
  public dir: string
26
46
  public exclude: RegExp
@@ -44,12 +64,40 @@ declare class ProcessInfo {
44
64
 
45
65
  static get Node(): typeof ProcessInfoNode
46
66
  static get ProcessInfo(): typeof ProcessInfo
47
- static get spawn(): typeof spawn
48
- static get spawnSync(): typeof spawnSync
49
- static get exec(): typeof exec
50
- static get execSync(): typeof execSync
51
- static get execFile(): typeof execFile
52
- static get execFileSync(): typeof execFileSync
67
+
68
+ static get spawn(): (
69
+ cmd: string,
70
+ args: string[],
71
+ options: ProcessInfoSpawnOptions
72
+ ) => ChildProcess
73
+ static get spawnSync(): (
74
+ cmd: string,
75
+ args: string[],
76
+ options: ProcessInfoSpawnSyncOptions
77
+ ) => SpawnSyncReturns
78
+ static get exec(): (
79
+ cmd: string,
80
+ options: ProcessInfoExecOptions,
81
+ callback?: (
82
+ error: ExecException | null,
83
+ stdout: Buffer,
84
+ stderr: Buffer
85
+ ) => void
86
+ ) => ChildProcess
87
+ static get execSync(): (
88
+ cmd: string,
89
+ options: ProcessInfoExecSyncOptions
90
+ ) => string | Buffer
91
+ static get execFile(): (
92
+ cmd: string,
93
+ args: string[],
94
+ options: ProcessInfoExecFileOptions
95
+ ) => ChildProcess
96
+ static get execFileSync(): (
97
+ cmd: string,
98
+ args: string[],
99
+ options: ProcessInfoExecFileSyncOptions
100
+ ) => string | Buffer
53
101
  }
54
102
 
55
103
  export = ProcessInfo
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tapjs/processinfo",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "main": "lib/index.cjs",
5
5
  "files": [
6
6
  "index.d.ts",