@agenticmail/core 0.2.26 → 0.3.1
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.d.ts +3 -2
- package/dist/index.js +41 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1265,8 +1265,9 @@ declare class DependencyInstaller {
|
|
|
1265
1265
|
private onProgress;
|
|
1266
1266
|
constructor(onProgress?: InstallProgress);
|
|
1267
1267
|
/**
|
|
1268
|
-
*
|
|
1269
|
-
*
|
|
1268
|
+
* Ensure Docker is installed AND the daemon is running.
|
|
1269
|
+
* Installs Docker if not present (Homebrew on macOS, apt on Linux).
|
|
1270
|
+
* Starts the daemon if Docker CLI is present but daemon is stopped.
|
|
1270
1271
|
*/
|
|
1271
1272
|
installDocker(): Promise<void>;
|
|
1272
1273
|
/**
|
package/dist/index.js
CHANGED
|
@@ -5437,15 +5437,39 @@ var DependencyInstaller = class {
|
|
|
5437
5437
|
});
|
|
5438
5438
|
}
|
|
5439
5439
|
/**
|
|
5440
|
-
*
|
|
5441
|
-
*
|
|
5440
|
+
* Ensure Docker is installed AND the daemon is running.
|
|
5441
|
+
* Installs Docker if not present (Homebrew on macOS, apt on Linux).
|
|
5442
|
+
* Starts the daemon if Docker CLI is present but daemon is stopped.
|
|
5442
5443
|
*/
|
|
5443
5444
|
async installDocker() {
|
|
5445
|
+
let cliInstalled = false;
|
|
5444
5446
|
try {
|
|
5445
5447
|
execSync2("docker --version", { timeout: 5e3, stdio: "ignore" });
|
|
5446
|
-
|
|
5448
|
+
cliInstalled = true;
|
|
5447
5449
|
} catch {
|
|
5448
5450
|
}
|
|
5451
|
+
if (cliInstalled) {
|
|
5452
|
+
try {
|
|
5453
|
+
execSync2("docker info", { timeout: 1e4, stdio: "ignore" });
|
|
5454
|
+
return;
|
|
5455
|
+
} catch {
|
|
5456
|
+
this.onProgress("Starting Docker daemon...");
|
|
5457
|
+
const os2 = platform2();
|
|
5458
|
+
if (os2 === "darwin") {
|
|
5459
|
+
try {
|
|
5460
|
+
execSync2("open -a Docker", { timeout: 1e4, stdio: "ignore" });
|
|
5461
|
+
} catch {
|
|
5462
|
+
}
|
|
5463
|
+
} else if (os2 === "linux") {
|
|
5464
|
+
try {
|
|
5465
|
+
execSync2("sudo systemctl start docker", { timeout: 15e3, stdio: "ignore" });
|
|
5466
|
+
} catch {
|
|
5467
|
+
}
|
|
5468
|
+
}
|
|
5469
|
+
await this.waitForDocker();
|
|
5470
|
+
return;
|
|
5471
|
+
}
|
|
5472
|
+
}
|
|
5449
5473
|
const os = platform2();
|
|
5450
5474
|
if (os === "darwin") {
|
|
5451
5475
|
this.onProgress("Installing Docker via Homebrew...");
|
|
@@ -5500,7 +5524,20 @@ var DependencyInstaller = class {
|
|
|
5500
5524
|
try {
|
|
5501
5525
|
execSync2("docker info", { timeout: 1e4, stdio: "ignore" });
|
|
5502
5526
|
} catch {
|
|
5503
|
-
|
|
5527
|
+
this.onProgress("Starting Docker...");
|
|
5528
|
+
const os = platform2();
|
|
5529
|
+
if (os === "darwin") {
|
|
5530
|
+
try {
|
|
5531
|
+
execSync2("open -a Docker", { timeout: 1e4, stdio: "ignore" });
|
|
5532
|
+
} catch {
|
|
5533
|
+
}
|
|
5534
|
+
} else if (os === "linux") {
|
|
5535
|
+
try {
|
|
5536
|
+
execSync2("sudo systemctl start docker", { timeout: 15e3, stdio: "ignore" });
|
|
5537
|
+
} catch {
|
|
5538
|
+
}
|
|
5539
|
+
}
|
|
5540
|
+
await this.waitForDocker();
|
|
5504
5541
|
}
|
|
5505
5542
|
this.onProgress("Starting Stalwart mail server...");
|
|
5506
5543
|
execSync2(`docker compose -f "${composePath}" up -d`, {
|