exupery-core-bin 0.1.5 → 0.1.7
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 +13 -4
- package/dist/index.js +13 -5
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import * as _et from 'exupery-core-types';
|
|
2
2
|
import * as _easync from 'exupery-core-async';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Runs a program main function, passing command line arguments (excluding
|
|
5
|
+
* `node` and the script name)
|
|
6
|
+
*/
|
|
7
|
+
export declare const run_program: (main: ($: {
|
|
8
|
+
"arguments": _et.Array<string>;
|
|
9
|
+
}) => _easync.Safe_Command_Result) => void;
|
|
10
|
+
export type Error = {
|
|
11
|
+
'exit code': number;
|
|
12
|
+
};
|
|
5
13
|
/**
|
|
6
14
|
* Runs a program main function, passing command line arguments (excluding
|
|
7
15
|
* `node` and the script name), and setting the process exit code to the
|
|
8
16
|
* returned value when the async value completes.
|
|
9
17
|
*/
|
|
10
|
-
export declare const
|
|
11
|
-
|
|
18
|
+
export declare const run_unsafe_program: (main: ($: {
|
|
19
|
+
"arguments": _et.Array<string>;
|
|
20
|
+
}) => _easync.Unsafe_Command_Result<Error>) => void;
|
package/dist/index.js
CHANGED
|
@@ -27,18 +27,26 @@ exports.run_unsafe_program = exports.run_program = void 0;
|
|
|
27
27
|
const _ei = __importStar(require("exupery-core-internals"));
|
|
28
28
|
/**
|
|
29
29
|
* Runs a program main function, passing command line arguments (excluding
|
|
30
|
-
* `node` and the script name)
|
|
31
|
-
* returned value when the async value completes.
|
|
30
|
+
* `node` and the script name)
|
|
32
31
|
*/
|
|
33
32
|
const run_program = (main) => {
|
|
34
|
-
main(
|
|
33
|
+
main({
|
|
34
|
+
'arguments': _ei.array_literal(process.argv.slice(2))
|
|
35
|
+
}).__start(() => {
|
|
35
36
|
});
|
|
36
37
|
};
|
|
37
38
|
exports.run_program = run_program;
|
|
39
|
+
/**
|
|
40
|
+
* Runs a program main function, passing command line arguments (excluding
|
|
41
|
+
* `node` and the script name), and setting the process exit code to the
|
|
42
|
+
* returned value when the async value completes.
|
|
43
|
+
*/
|
|
38
44
|
const run_unsafe_program = (main) => {
|
|
39
|
-
main(
|
|
45
|
+
main({
|
|
46
|
+
'arguments': _ei.array_literal(process.argv.slice(2))
|
|
47
|
+
}).__start(() => {
|
|
40
48
|
}, ($) => {
|
|
41
|
-
process.exitCode =
|
|
49
|
+
process.exitCode = $['exit code'];
|
|
42
50
|
});
|
|
43
51
|
};
|
|
44
52
|
exports.run_unsafe_program = run_unsafe_program;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "exupery-core-bin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"description": "this is one of the core packages for Exupery. it provides functionality to create executables",
|
|
6
6
|
"author": "Corno",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"url": "git+https://github.com/corno/exupery-core.git"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"exupery-core-async": "^0.1.
|
|
31
|
-
"exupery-core-internals": "^0.1.
|
|
30
|
+
"exupery-core-async": "^0.1.18",
|
|
31
|
+
"exupery-core-internals": "^0.1.8"
|
|
32
32
|
}
|
|
33
33
|
}
|