spawn-rx 2.0.9 → 3.0.0
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/.travis.yml +24 -24
- package/CODE_OF_CONDUCT.md +50 -50
- package/COPYING +7 -7
- package/README.md +187 -187
- package/appveyor.yml +21 -21
- package/build.cmd +1 -1
- package/build.sh +2 -2
- package/esdoc.json +26 -26
- package/lib/src/index.d.ts +84 -88
- package/lib/src/index.js +306 -301
- package/lib/src/index.js.map +1 -1
- package/package.json +15 -14
- package/src/index.ts +334 -336
- package/test/asserttest.ts +15 -15
- package/test/spawn.ts +102 -102
- package/test/support.ts +14 -14
- package/tsconfig.json +28 -31
- package/tslint.json +39 -37
- package/.npmignore +0 -3
- package/lib/index.js +0 -352
package/lib/src/index.d.ts
CHANGED
@@ -1,88 +1,84 @@
|
|
1
|
-
import 'rxjs
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
*
|
14
|
-
*
|
15
|
-
* @
|
16
|
-
* @
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
*
|
28
|
-
*
|
29
|
-
*
|
30
|
-
*
|
31
|
-
* @
|
32
|
-
*
|
33
|
-
*
|
34
|
-
*
|
35
|
-
*
|
36
|
-
*
|
37
|
-
*
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
*
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
*
|
46
|
-
*
|
47
|
-
* @
|
48
|
-
*
|
49
|
-
*
|
50
|
-
*
|
51
|
-
*
|
52
|
-
*
|
53
|
-
*
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
*
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
*
|
62
|
-
*
|
63
|
-
*
|
64
|
-
* @
|
65
|
-
*
|
66
|
-
*
|
67
|
-
*
|
68
|
-
*
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
*
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
*
|
77
|
-
*
|
78
|
-
* @
|
79
|
-
*
|
80
|
-
*
|
81
|
-
*
|
82
|
-
*
|
83
|
-
|
84
|
-
|
85
|
-
* non-zero value, the Promise will resolve with
|
86
|
-
* an Error.
|
87
|
-
*/
|
88
|
-
export declare function spawnPromise(exe: string, params: Array<string>, opts?: any): Promise<string>;
|
1
|
+
import { Observable } from 'rxjs';
|
2
|
+
/**
|
3
|
+
* Finds the actual executable and parameters to run on Windows. This method
|
4
|
+
* mimics the POSIX behavior of being able to run scripts as executables by
|
5
|
+
* replacing the passed-in executable with the script runner, for PowerShell,
|
6
|
+
* CMD, and node scripts.
|
7
|
+
*
|
8
|
+
* This method also does the work of running down PATH, which spawn on Windows
|
9
|
+
* also doesn't do, unlike on POSIX.
|
10
|
+
*
|
11
|
+
* @param {string} exe The executable to run
|
12
|
+
* @param {Array<string>} args The arguments to run
|
13
|
+
*
|
14
|
+
* @return {Object} The cmd and args to run
|
15
|
+
* @property {string} cmd The command to pass to spawn
|
16
|
+
* @property {Array<string>} args The arguments to pass to spawn
|
17
|
+
*/
|
18
|
+
export declare function findActualExecutable(exe: string, args: Array<string>): {
|
19
|
+
cmd: string;
|
20
|
+
args: Array<string>;
|
21
|
+
};
|
22
|
+
/**
|
23
|
+
* Spawns a process but detached from the current process. The process is put
|
24
|
+
* into its own Process Group that can be killed by unsubscribing from the
|
25
|
+
* return Observable.
|
26
|
+
*
|
27
|
+
* @param {string} exe The executable to run
|
28
|
+
* @param {Array<string>} params The parameters to pass to the child
|
29
|
+
* @param {Object} opts Options to pass to spawn.
|
30
|
+
*
|
31
|
+
* @return {Observable<string>} Returns an Observable that when subscribed
|
32
|
+
* to, will create a detached process. The
|
33
|
+
* process output will be streamed to this
|
34
|
+
* Observable, and if unsubscribed from, the
|
35
|
+
* process will be terminated early. If the
|
36
|
+
* process terminates with a non-zero value,
|
37
|
+
* the Observable will terminate with onError.
|
38
|
+
*/
|
39
|
+
export declare function spawnDetached(exe: string, params: Array<string>, opts?: any): Observable<string>;
|
40
|
+
/**
|
41
|
+
* Spawns a process attached as a child of the current process.
|
42
|
+
*
|
43
|
+
* @param {string} exe The executable to run
|
44
|
+
* @param {Array<string>} params The parameters to pass to the child
|
45
|
+
* @param {Object} opts Options to pass to spawn.
|
46
|
+
*
|
47
|
+
* @return {Observable<string>} Returns an Observable that when subscribed
|
48
|
+
* to, will create a child process. The
|
49
|
+
* process output will be streamed to this
|
50
|
+
* Observable, and if unsubscribed from, the
|
51
|
+
* process will be terminated early. If the
|
52
|
+
* process terminates with a non-zero value,
|
53
|
+
* the Observable will terminate with onError.
|
54
|
+
*/
|
55
|
+
export declare function spawn<T = string>(exe: string, params?: Array<string>, opts?: any): Observable<T>;
|
56
|
+
/**
|
57
|
+
* Spawns a process but detached from the current process. The process is put
|
58
|
+
* into its own Process Group.
|
59
|
+
*
|
60
|
+
* @param {string} exe The executable to run
|
61
|
+
* @param {Array<string>} params The parameters to pass to the child
|
62
|
+
* @param {Object} opts Options to pass to spawn.
|
63
|
+
*
|
64
|
+
* @return {Promise<string>} Returns an Promise that represents a detached
|
65
|
+
* process. The value returned is the process
|
66
|
+
* output. If the process terminates with a
|
67
|
+
* non-zero value, the Promise will resolve with
|
68
|
+
* an Error.
|
69
|
+
*/
|
70
|
+
export declare function spawnDetachedPromise(exe: string, params: Array<string>, opts?: any): Promise<string>;
|
71
|
+
/**
|
72
|
+
* Spawns a process as a child process.
|
73
|
+
*
|
74
|
+
* @param {string} exe The executable to run
|
75
|
+
* @param {Array<string>} params The parameters to pass to the child
|
76
|
+
* @param {Object} opts Options to pass to spawn.
|
77
|
+
*
|
78
|
+
* @return {Promise<string>} Returns an Promise that represents a child
|
79
|
+
* process. The value returned is the process
|
80
|
+
* output. If the process terminates with a
|
81
|
+
* non-zero value, the Promise will resolve with
|
82
|
+
* an Error.
|
83
|
+
*/
|
84
|
+
export declare function spawnPromise(exe: string, params: Array<string>, opts?: any): Promise<string>;
|