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