-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: improve io * chore: nit
- Loading branch information
Showing
20 changed files
with
2,145 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
#!/usr/bin/env node | ||
|
||
import { writeError } from "@mokr/core"; | ||
import { hasEncounteredErrors, writeError } from "@mokr/core"; | ||
import cli from "./dist/cli.js"; | ||
|
||
function errorHandler(err) { | ||
if (process.env["DEBUG"]) { | ||
console.debug(err); | ||
} else { | ||
writeError(`\n${String(err)}`); | ||
} | ||
|
||
writeError(err); | ||
process.exit(1); | ||
} | ||
|
||
cli.runOrRepl().catch(errorHandler); | ||
|
||
// Compat layer for Node < 16 | ||
process.on("unhandledRejection", errorHandler); | ||
|
||
// Run application | ||
await cli.runOrRepl().catch(errorHandler); | ||
|
||
// If tasks had errors, exit with non-zero code | ||
if (hasEncounteredErrors()) { | ||
process.exit(1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/core/.nyc_output/4f1e7034-ddce-495f-b447-e58daf3c0760.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
1 change: 1 addition & 0 deletions
1
packages/core/.nyc_output/837d69e9-01b2-4a68-8ecf-0699afb3bddb.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
1 change: 1 addition & 0 deletions
1
packages/core/.nyc_output/9d05f215-841d-4c98-ab0b-63a8d0c938cf.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
16 changes: 16 additions & 0 deletions
16
packages/core/.nyc_output/processinfo/4f1e7034-ddce-495f-b447-e58daf3c0760.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"parent": "9d05f215-841d-4c98-ab0b-63a8d0c938cf", | ||
"pid": 15752, | ||
"argv": [ | ||
"/home/hongaar/.nvm/versions/node/v18.12.1/bin/node", | ||
"/home/hongaar/Code/hongaar/moker/packages/core/test/json.test.ts" | ||
], | ||
"execArgv": [], | ||
"cwd": "/home/hongaar/Code/hongaar/moker/packages/core", | ||
"time": 1671097032296, | ||
"ppid": 15725, | ||
"coverageFilename": "/home/hongaar/Code/hongaar/moker/packages/core/.nyc_output/4f1e7034-ddce-495f-b447-e58daf3c0760.json", | ||
"externalId": "test/json.test.ts", | ||
"uuid": "4f1e7034-ddce-495f-b447-e58daf3c0760", | ||
"files": [] | ||
} |
16 changes: 16 additions & 0 deletions
16
packages/core/.nyc_output/processinfo/837d69e9-01b2-4a68-8ecf-0699afb3bddb.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"parent": "9d05f215-841d-4c98-ab0b-63a8d0c938cf", | ||
"pid": 15751, | ||
"argv": [ | ||
"/home/hongaar/.nvm/versions/node/v18.12.1/bin/node", | ||
"/home/hongaar/Code/hongaar/moker/packages/core/test/io.test.ts" | ||
], | ||
"execArgv": [], | ||
"cwd": "/home/hongaar/Code/hongaar/moker/packages/core", | ||
"time": 1671097032296, | ||
"ppid": 15725, | ||
"coverageFilename": "/home/hongaar/Code/hongaar/moker/packages/core/.nyc_output/837d69e9-01b2-4a68-8ecf-0699afb3bddb.json", | ||
"externalId": "test/io.test.ts", | ||
"uuid": "837d69e9-01b2-4a68-8ecf-0699afb3bddb", | ||
"files": [] | ||
} |
16 changes: 16 additions & 0 deletions
16
packages/core/.nyc_output/processinfo/9d05f215-841d-4c98-ab0b-63a8d0c938cf.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"parent": null, | ||
"pid": 15725, | ||
"argv": [ | ||
"/home/hongaar/.nvm/versions/node/v18.12.1/bin/node", | ||
"/home/hongaar/Code/hongaar/moker/node_modules/tap/bin/run.js" | ||
], | ||
"execArgv": [], | ||
"cwd": "/home/hongaar/Code/hongaar/moker/packages/core", | ||
"time": 1671097031352, | ||
"ppid": 15681, | ||
"coverageFilename": "/home/hongaar/Code/hongaar/moker/packages/core/.nyc_output/9d05f215-841d-4c98-ab0b-63a8d0c938cf.json", | ||
"externalId": "", | ||
"uuid": "9d05f215-841d-4c98-ab0b-63a8d0c938cf", | ||
"files": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"processes": { | ||
"4f1e7034-ddce-495f-b447-e58daf3c0760": { | ||
"parent": "9d05f215-841d-4c98-ab0b-63a8d0c938cf", | ||
"externalId": "test/json.test.ts", | ||
"children": [] | ||
}, | ||
"837d69e9-01b2-4a68-8ecf-0699afb3bddb": { | ||
"parent": "9d05f215-841d-4c98-ab0b-63a8d0c938cf", | ||
"externalId": "test/io.test.ts", | ||
"children": [] | ||
}, | ||
"9d05f215-841d-4c98-ab0b-63a8d0c938cf": { | ||
"parent": null, | ||
"children": [ | ||
"4f1e7034-ddce-495f-b447-e58daf3c0760", | ||
"837d69e9-01b2-4a68-8ecf-0699afb3bddb" | ||
] | ||
} | ||
}, | ||
"files": {}, | ||
"externalIds": { | ||
"test/json.test.ts": { | ||
"root": "4f1e7034-ddce-495f-b447-e58daf3c0760", | ||
"children": [] | ||
}, | ||
"test/io.test.ts": { | ||
"root": "837d69e9-01b2-4a68-8ecf-0699afb3bddb", | ||
"children": [] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.