@alook/cli 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -2
- package/dist/session-runner.js +16945 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -15952,9 +15952,12 @@ function releaseDaemonPid(profile) {
|
|
|
15952
15952
|
}
|
|
15953
15953
|
|
|
15954
15954
|
// daemon/daemon.ts
|
|
15955
|
+
import { existsSync } from "fs";
|
|
15955
15956
|
import { execSync as execSync3, spawn } from "child_process";
|
|
15956
15957
|
import { fileURLToPath } from "url";
|
|
15957
15958
|
import { dirname as dirname2, join as join3 } from "path";
|
|
15959
|
+
var _dir = dirname2(fileURLToPath(import.meta.url));
|
|
15960
|
+
var sessionRunnerPath = existsSync(join3(_dir, "session-runner.js")) ? join3(_dir, "session-runner.js") : join3(_dir, "session-runner.ts");
|
|
15958
15961
|
function isCommandAvailable2(cmd) {
|
|
15959
15962
|
try {
|
|
15960
15963
|
execSync3(`which ${cmd}`, { stdio: "ignore" });
|
|
@@ -16126,10 +16129,9 @@ async function startDaemon(profile, serverUrl) {
|
|
|
16126
16129
|
process.on("SIGINT", shutdown);
|
|
16127
16130
|
await pollCycle();
|
|
16128
16131
|
}
|
|
16129
|
-
var SESSION_RUNNER_PATH = join3(dirname2(fileURLToPath(import.meta.url)), "session-runner.ts");
|
|
16130
16132
|
function spawnSessionRunner(input) {
|
|
16131
16133
|
const encoded = Buffer.from(JSON.stringify(input)).toString("base64");
|
|
16132
|
-
const child = spawn(
|
|
16134
|
+
const child = spawn(process.execPath, [sessionRunnerPath, encoded], {
|
|
16133
16135
|
detached: true,
|
|
16134
16136
|
stdio: "ignore"
|
|
16135
16137
|
});
|