exupery-core-bin 0.1.5 → 0.1.6

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 CHANGED
@@ -1,11 +1,19 @@
1
1
  import * as _et from 'exupery-core-types';
2
2
  import * as _easync from 'exupery-core-async';
3
- export type Program_Main = ($: _et.Array<string>) => _easync.Safe_Command_Result;
4
- export type Unsafe_Program_Main = ($: _et.Array<string>) => _easync.Unsafe_Command_Result<number>;
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;
5
10
  /**
6
11
  * Runs a program main function, passing command line arguments (excluding
7
12
  * `node` and the script name), and setting the process exit code to the
8
13
  * returned value when the async value completes.
9
14
  */
10
- export declare const run_program: (main: Program_Main) => void;
11
- export declare const run_unsafe_program: (main: Unsafe_Program_Main) => void;
15
+ export declare const run_unsafe_program: (main: ($: {
16
+ "arguments": _et.Array<string>;
17
+ }) => _easync.Unsafe_Command_Result<{
18
+ "exit_code": number;
19
+ }>) => 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), and setting the process exit code to the
31
- * returned value when the async value completes.
30
+ * `node` and the script name)
32
31
  */
33
32
  const run_program = (main) => {
34
- main(_ei.array_literal(process.argv.slice(2))).__start(() => {
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(_ei.array_literal(process.argv.slice(2))).__start(() => {
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.5",
3
+ "version": "0.1.6",
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.3",
31
- "exupery-core-internals": "^0.1.7"
30
+ "exupery-core-async": "^0.1.18",
31
+ "exupery-core-internals": "^0.1.8"
32
32
  }
33
33
  }