@thinkingai/ae-cli 6.0.16 → 6.0.17
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 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -679,6 +679,10 @@ import { join as join2 } from "path";
|
|
|
679
679
|
import { existsSync, readFileSync } from "fs";
|
|
680
680
|
import { dirname, join } from "path";
|
|
681
681
|
import { fileURLToPath } from "url";
|
|
682
|
+
var AE_CLI_PACKAGE_NAMES = /* @__PURE__ */ new Set(["@tant/ae-cli", "@thinkingai/ae-cli"]);
|
|
683
|
+
function isAeCliPackageName(name) {
|
|
684
|
+
return typeof name === "string" && (AE_CLI_PACKAGE_NAMES.has(name) || name.endsWith("/ae-cli"));
|
|
685
|
+
}
|
|
682
686
|
function getPackageRoot() {
|
|
683
687
|
let cur = dirname(fileURLToPath(import.meta.url));
|
|
684
688
|
while (cur !== dirname(cur)) {
|
|
@@ -686,7 +690,7 @@ function getPackageRoot() {
|
|
|
686
690
|
if (existsSync(pj)) {
|
|
687
691
|
try {
|
|
688
692
|
const pkg2 = JSON.parse(readFileSync(pj, "utf8"));
|
|
689
|
-
if (pkg2.name
|
|
693
|
+
if (isAeCliPackageName(pkg2.name)) return cur;
|
|
690
694
|
} catch {
|
|
691
695
|
}
|
|
692
696
|
}
|