exupery-core-bin 0.1.6 → 0.1.8
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/dist/index.d.ts +11 -8
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import * as _et from 'exupery-core-types';
|
|
2
2
|
import * as _easync from 'exupery-core-async';
|
|
3
|
+
export type Runs_Safe_Program_Main = ($: {
|
|
4
|
+
'arguments': _et.Array<string>;
|
|
5
|
+
}) => _easync.Safe_Command_Result;
|
|
3
6
|
/**
|
|
4
7
|
* Runs a program main function, passing command line arguments (excluding
|
|
5
8
|
* `node` and the script name)
|
|
6
9
|
*/
|
|
7
|
-
export declare const run_program: (main:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
export declare const run_program: (main: Runs_Safe_Program_Main) => void;
|
|
11
|
+
export type Error = {
|
|
12
|
+
'exit code': number;
|
|
13
|
+
};
|
|
14
|
+
export type Run_Unsafe_Program_Main = ($: {
|
|
15
|
+
'arguments': _et.Array<string>;
|
|
16
|
+
}) => _easync.Unsafe_Command_Result<Error>;
|
|
10
17
|
/**
|
|
11
18
|
* Runs a program main function, passing command line arguments (excluding
|
|
12
19
|
* `node` and the script name), and setting the process exit code to the
|
|
13
20
|
* returned value when the async value completes.
|
|
14
21
|
*/
|
|
15
|
-
export declare const run_unsafe_program: (main:
|
|
16
|
-
"arguments": _et.Array<string>;
|
|
17
|
-
}) => _easync.Unsafe_Command_Result<{
|
|
18
|
-
"exit_code": number;
|
|
19
|
-
}>) => void;
|
|
22
|
+
export declare const run_unsafe_program: (main: Run_Unsafe_Program_Main) => void;
|
package/dist/index.js
CHANGED
|
@@ -46,7 +46,7 @@ const run_unsafe_program = (main) => {
|
|
|
46
46
|
'arguments': _ei.array_literal(process.argv.slice(2))
|
|
47
47
|
}).__start(() => {
|
|
48
48
|
}, ($) => {
|
|
49
|
-
process.exitCode =
|
|
49
|
+
process.exitCode = $['exit code'];
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
52
|
exports.run_unsafe_program = run_unsafe_program;
|