agenticmail 0.3.3 → 0.3.4
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/cli.js +12 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3792,16 +3792,24 @@ var Spinner = class {
|
|
|
3792
3792
|
};
|
|
3793
3793
|
function resolveApiEntry() {
|
|
3794
3794
|
try {
|
|
3795
|
-
const
|
|
3796
|
-
return
|
|
3795
|
+
const resolved = import.meta.resolve("@agenticmail/api");
|
|
3796
|
+
return fileURLToPath(resolved);
|
|
3797
3797
|
} catch {
|
|
3798
3798
|
}
|
|
3799
3799
|
const thisDir = dirname(fileURLToPath(import.meta.url));
|
|
3800
|
-
|
|
3800
|
+
let dir = thisDir;
|
|
3801
|
+
for (let i = 0; i < 10; i++) {
|
|
3802
|
+
const candidate = join(dir, "node_modules", "@agenticmail", "api", "dist", "index.js");
|
|
3803
|
+
if (existsSync2(candidate)) return candidate;
|
|
3804
|
+
const parent = dirname(dir);
|
|
3805
|
+
if (parent === dir) break;
|
|
3806
|
+
dir = parent;
|
|
3807
|
+
}
|
|
3808
|
+
const monorepo = [
|
|
3801
3809
|
join(thisDir, "..", "..", "packages", "api", "dist", "index.js"),
|
|
3802
3810
|
join(thisDir, "..", "packages", "api", "dist", "index.js")
|
|
3803
3811
|
];
|
|
3804
|
-
for (const p of
|
|
3812
|
+
for (const p of monorepo) {
|
|
3805
3813
|
if (existsSync2(p)) return p;
|
|
3806
3814
|
}
|
|
3807
3815
|
throw new Error("Could not find @agenticmail/api. Make sure it is installed or built.");
|