File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 ],
1111 "scripts" : {
1212 "build" : " tsc" ,
13- "worker" : " ts-node -T ./runner.ts" ,
13+ "worker" : " node --inspect -r ts-node/register/transpile-only ./runner.ts" ,
1414 "migration-add" : " migrate-mongo create" ,
1515 "migrate:up" : " migrate-mongo up" ,
1616 "migrate:down" : " migrate-mongo down" ,
Original file line number Diff line number Diff line change @@ -15,13 +15,16 @@ dotenv.config();
1515type WorkerConstructor = new ( ) => Worker ;
1616
1717const BEGINNING_OF_ARGS = 2 ;
18+ const INSPECT_FLAG_PATTERN = / ^ - - i n s p e c t (?: - b r k ) ? (?: = .* ) ? $ / ;
1819/**
1920 * Get worker name(s) from command line arguments
2021 *
2122 * @example ts-node runner.ts hawk-worker-javascript
2223 * @example ts-node runner.ts hawk-worker-javascript hawk-worker-nodejs
2324 */
24- const workerNames = process . argv . slice ( BEGINNING_OF_ARGS ) ;
25+ const workerNames = process . argv
26+ . slice ( BEGINNING_OF_ARGS )
27+ . filter ( ( argument ) => ! INSPECT_FLAG_PATTERN . test ( argument ) ) ;
2528
2629/**
2730 * Initialize HawkCatcher
You can’t perform that action at this time.
0 commit comments