exupery-core-bin 0.1.16 → 0.1.18

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,21 +1,21 @@
1
1
  import * as _et from 'exupery-core-types';
2
2
  import * as _easync from 'exupery-core-async';
3
- export type Guaranteed_Main = _easync.Guaranteed.Procedure;
3
+ export type Guaranteed_Main_Initializer = _easync.Guaranteed_Procedure_Initializer<Parameters>;
4
4
  /**
5
5
  * Runs a program main function, passing command line arguments (excluding
6
6
  * `node` and the script name)
7
7
  */
8
- export declare const run_guaranteed_main_procedure: (main: Guaranteed_Main) => void;
8
+ export declare const run_guaranteed_main_procedure: (main: Guaranteed_Main_Initializer) => void;
9
9
  export type Parameters = {
10
10
  'arguments': _et.Array<string>;
11
11
  };
12
12
  export type Error = {
13
13
  'exit code': number;
14
14
  };
15
- export type Unguaranteed_Main = _easync.Unguaranteed.Procedure<Error>;
15
+ export type Unguaranteed_Main_Initializer = _easync.Unguaranteed_Procedure_Initializer<Parameters, Error>;
16
16
  /**
17
17
  * Runs a program main function, passing command line arguments (excluding
18
18
  * `node` and the script name), and setting the process exit code to the
19
19
  * returned value when the async value completes.
20
20
  */
21
- export declare const run_unguaranteed_main_procedure: (main: Unguaranteed_Main) => void;
21
+ export declare const run_unguaranteed_main_procedure: (main: Unguaranteed_Main_Initializer) => void;
package/dist/index.js CHANGED
@@ -30,16 +30,9 @@ const _ei = __importStar(require("exupery-core-internals"));
30
30
  * `node` and the script name)
31
31
  */
32
32
  const run_guaranteed_main_procedure = (main) => {
33
- _ei.panic("IMPLEMENT ME");
34
- // main(
35
- // _easync.initialize_guaranteed_procedure_context(),
36
- // {
37
- // 'arguments': _ei.array_literal(process.argv.slice(2))
38
- // },
39
- // ).__start(
40
- // () => {
41
- // }
42
- // )
33
+ main({
34
+ 'arguments': _ei.array_literal(process.argv.slice(2))
35
+ }).__start(() => { });
43
36
  };
44
37
  exports.run_guaranteed_main_procedure = run_guaranteed_main_procedure;
45
38
  /**
@@ -48,18 +41,11 @@ exports.run_guaranteed_main_procedure = run_guaranteed_main_procedure;
48
41
  * returned value when the async value completes.
49
42
  */
50
43
  const run_unguaranteed_main_procedure = (main) => {
51
- _ei.panic("IMPLEMENT ME");
52
- // main(
53
- // _easync.initialize_unguaranteed_procedure_context(),
54
- // {
55
- // 'arguments': _ei.array_literal(process.argv.slice(2))
56
- // },
57
- // ).__start(
58
- // () => {
59
- // },
60
- // ($) => {
61
- // process.exitCode = $['exit code']
62
- // }
63
- // )
44
+ main({
45
+ 'arguments': _ei.array_literal(process.argv.slice(2))
46
+ }).__start(() => {
47
+ }, ($) => {
48
+ process.exitCode = $['exit code'];
49
+ });
64
50
  };
65
51
  exports.run_unguaranteed_main_procedure = run_unguaranteed_main_procedure;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exupery-core-bin",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
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.36",
31
- "exupery-core-internals": "^0.1.10"
30
+ "exupery-core-async": "^0.1.39",
31
+ "exupery-core-internals": "^0.1.11"
32
32
  }
33
33
  }