locus-product-planning 1.2.1 → 1.2.2
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.cjs +18 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +18 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -12480,16 +12480,31 @@ var import_meta = {};
|
|
|
12480
12480
|
function getCurrentDirname() {
|
|
12481
12481
|
try {
|
|
12482
12482
|
const meta = import_meta;
|
|
12483
|
-
if (meta?.url) {
|
|
12484
|
-
|
|
12483
|
+
if (meta?.url && typeof meta.url === "string" && meta.url.startsWith("file:")) {
|
|
12484
|
+
const result = (0, import_path.dirname)((0, import_url.fileURLToPath)(meta.url));
|
|
12485
|
+
if (typeof result === "string" && result.length > 0) {
|
|
12486
|
+
return result;
|
|
12487
|
+
}
|
|
12485
12488
|
}
|
|
12486
12489
|
} catch {
|
|
12487
12490
|
}
|
|
12488
12491
|
try {
|
|
12489
12492
|
const packageJsonPath = require.resolve("locus-product-planning/package.json");
|
|
12490
|
-
|
|
12493
|
+
if (typeof packageJsonPath === "string") {
|
|
12494
|
+
return (0, import_path.join)((0, import_path.dirname)(packageJsonPath), "dist");
|
|
12495
|
+
}
|
|
12491
12496
|
} catch {
|
|
12492
12497
|
}
|
|
12498
|
+
const cacheLocations = [
|
|
12499
|
+
(0, import_path.join)(process.env.HOME || "", ".cache", "opencode", "node_modules", "locus-product-planning"),
|
|
12500
|
+
(0, import_path.join)(process.env.HOME || "", ".config", "opencode", "node_modules", "locus-product-planning")
|
|
12501
|
+
];
|
|
12502
|
+
for (const loc of cacheLocations) {
|
|
12503
|
+
const distPath = (0, import_path.join)(loc, "dist");
|
|
12504
|
+
if ((0, import_fs.existsSync)(distPath)) {
|
|
12505
|
+
return distPath;
|
|
12506
|
+
}
|
|
12507
|
+
}
|
|
12493
12508
|
const cwd = process.cwd();
|
|
12494
12509
|
try {
|
|
12495
12510
|
const pkgPath = (0, import_path.resolve)(cwd, "package.json");
|