1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const utils_fs_1 = require("@ionic/utils-fs");
|
4 | const utils_subprocess_1 = require("@ionic/utils-subprocess");
|
5 | const path = require("path");
|
6 | async function sendMessage({ config, ctx }, msg) {
|
7 | const dir = path.dirname(config.p);
|
8 | await utils_fs_1.mkdirp(dir);
|
9 | const fd = await utils_fs_1.open(path.resolve(dir, 'helper.log'), 'a');
|
10 | const p = utils_subprocess_1.fork(ctx.binPath, ['_', '--no-interactive'], { stdio: ['ignore', fd, fd, 'ipc'] });
|
11 | p.send(msg);
|
12 | p.disconnect();
|
13 | p.unref();
|
14 | }
|
15 | exports.sendMessage = sendMessage;
|