exupery-core-bin 0.1.1 → 0.1.2
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 +7 -1
- package/dist/index.js +5 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import * as _et from 'exupery-core-types';
|
|
2
|
-
export
|
|
2
|
+
export type Program_Main = ($: _et.Array<string>) => _et.Async_Value<number>;
|
|
3
|
+
/**
|
|
4
|
+
* Runs a program main function, passing command line arguments (excluding
|
|
5
|
+
* `node` and the script name), and setting the process exit code to the
|
|
6
|
+
* returned value when the async value completes.
|
|
7
|
+
*/
|
|
8
|
+
export declare const run_program: (main: Program_Main) => void;
|
package/dist/index.js
CHANGED
|
@@ -25,6 +25,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.run_program = void 0;
|
|
27
27
|
const _ei = __importStar(require("exupery-core-internals"));
|
|
28
|
+
/**
|
|
29
|
+
* Runs a program main function, passing command line arguments (excluding
|
|
30
|
+
* `node` and the script name), and setting the process exit code to the
|
|
31
|
+
* returned value when the async value completes.
|
|
32
|
+
*/
|
|
28
33
|
const run_program = (main) => {
|
|
29
34
|
main(_ei.array_literal(process.argv.slice(2))).__execute(($) => {
|
|
30
35
|
process.exitCode = $;
|