@frostbridge/imdl 0.1.4 → 0.1.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 +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1085,6 +1085,7 @@ function capitalize(s) {
|
|
|
1085
1085
|
// src/commands/init.ts
|
|
1086
1086
|
import pc2 from "picocolors";
|
|
1087
1087
|
import { existsSync as existsSync7, readFileSync as readFileSync4, writeFileSync as writeFileSync4, mkdirSync as mkdirSync2 } from "fs";
|
|
1088
|
+
import { execSync } from "child_process";
|
|
1088
1089
|
import { join as join6 } from "path";
|
|
1089
1090
|
import { homedir as homedir4 } from "os";
|
|
1090
1091
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
@@ -1484,10 +1485,9 @@ function installDaemon() {
|
|
|
1484
1485
|
console.log(pc2.dim(" \u2022 Background daemon already installed"));
|
|
1485
1486
|
return;
|
|
1486
1487
|
}
|
|
1487
|
-
const { execSync: execSync2 } = __require("child_process");
|
|
1488
1488
|
let imdlBin = "";
|
|
1489
1489
|
try {
|
|
1490
|
-
imdlBin =
|
|
1490
|
+
imdlBin = execSync("which imdl", { encoding: "utf-8" }).trim();
|
|
1491
1491
|
} catch {
|
|
1492
1492
|
imdlBin = "/usr/local/bin/imdl";
|
|
1493
1493
|
}
|
|
@@ -1520,7 +1520,7 @@ function installDaemon() {
|
|
|
1520
1520
|
try {
|
|
1521
1521
|
if (!existsSync7(plistDir)) mkdirSync2(plistDir, { recursive: true });
|
|
1522
1522
|
writeFileSync4(plistPath, plist);
|
|
1523
|
-
|
|
1523
|
+
execSync(`launchctl load ${plistPath}`, { stdio: "ignore" });
|
|
1524
1524
|
console.log(pc2.green(" \u2713 Background daemon installed (auto-starts on login)"));
|
|
1525
1525
|
} catch {
|
|
1526
1526
|
console.log(pc2.yellow(" \u26A0 Could not install daemon service (run `imdl daemon` manually)"));
|
|
@@ -4662,7 +4662,7 @@ import pc12 from "picocolors";
|
|
|
4662
4662
|
import { existsSync as existsSync22, readFileSync as readFileSync16, writeFileSync as writeFileSync10, mkdirSync as mkdirSync3 } from "fs";
|
|
4663
4663
|
import { join as join21 } from "path";
|
|
4664
4664
|
import { homedir as homedir15 } from "os";
|
|
4665
|
-
import { execSync, spawn } from "child_process";
|
|
4665
|
+
import { execSync as execSync2, spawn } from "child_process";
|
|
4666
4666
|
var IMDL_DIR3 = join21(homedir15(), ".imdl");
|
|
4667
4667
|
var GATEWAY_CONFIG = join21(IMDL_DIR3, "gateway.toml");
|
|
4668
4668
|
var GATEWAY_PID_FILE = join21(IMDL_DIR3, "gateway.pid");
|
|
@@ -4943,7 +4943,7 @@ function findGatewayBinary() {
|
|
|
4943
4943
|
if (existsSync22(path)) return path;
|
|
4944
4944
|
}
|
|
4945
4945
|
try {
|
|
4946
|
-
const result =
|
|
4946
|
+
const result = execSync2("which imdl-gateway", { encoding: "utf-8" }).trim();
|
|
4947
4947
|
if (result) return result;
|
|
4948
4948
|
} catch {
|
|
4949
4949
|
}
|