1 | #!/usr/bin/env node
|
2 | "use strict";
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | var __importStar = (this && this.__importStar) || function (mod) {
|
8 | if (mod && mod.__esModule) return mod;
|
9 | var result = {};
|
10 | if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
11 | result["default"] = mod;
|
12 | return result;
|
13 | };
|
14 | Object.defineProperty(exports, "__esModule", { value: true });
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | const child_process_1 = require("child_process");
|
28 | const which = __importStar(require("which"));
|
29 | const MAX_OLD_SPACE = '--max_old_space_size=4096';
|
30 | if (!process.env.NODE_OPTIONS) {
|
31 | process.env.NODE_OPTIONS = MAX_OLD_SPACE;
|
32 | }
|
33 | else if (!/--max[_\-]old[_\-]space[_\-]size/.test(process.env.NODE_OPTIONS)) {
|
34 | process.env.NODE_OPTIONS += ` ${MAX_OLD_SPACE}`;
|
35 | }
|
36 | const program = which.sync(process.argv[2]);
|
37 | const args = process.argv.slice(3);
|
38 | child_process_1.execFileSync(program, args, { env: process.env, stdio: 'inherit' });
|
39 |
|
\ | No newline at end of file |