adorn-api 1.0.18 → 1.0.19
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.cjs +25 -10
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +25 -10
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -3365,16 +3365,31 @@ var ADORN_VERSION = (() => {
|
|
|
3365
3365
|
return null;
|
|
3366
3366
|
}
|
|
3367
3367
|
};
|
|
3368
|
-
const
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3368
|
+
const potentialPaths = [];
|
|
3369
|
+
try {
|
|
3370
|
+
const importMetaUrl = import_meta2?.url;
|
|
3371
|
+
if (importMetaUrl && typeof importMetaUrl === "string" && importMetaUrl.length > 0) {
|
|
3372
|
+
const cliDir = (0, import_node_path6.dirname)((0, import_node_url.fileURLToPath)(importMetaUrl));
|
|
3373
|
+
potentialPaths.push(
|
|
3374
|
+
(0, import_node_path6.resolve)(cliDir, "..", "package.json"),
|
|
3375
|
+
(0, import_node_path6.resolve)(cliDir, "package.json")
|
|
3376
|
+
);
|
|
3377
|
+
}
|
|
3378
|
+
} catch {
|
|
3379
|
+
}
|
|
3380
|
+
const cwd = import_node_process2.default.cwd();
|
|
3381
|
+
potentialPaths.push(
|
|
3382
|
+
(0, import_node_path6.resolve)(cwd, "package.json"),
|
|
3383
|
+
(0, import_node_path6.resolve)(cwd, "node_modules", "adorn-api", "package.json"),
|
|
3384
|
+
(0, import_node_path6.resolve)(cwd, "..", "package.json"),
|
|
3385
|
+
(0, import_node_path6.resolve)(cwd, "..", "..", "package.json")
|
|
3386
|
+
);
|
|
3387
|
+
for (const pkgPath of potentialPaths) {
|
|
3388
|
+
const version = tryReadPackageJson(pkgPath);
|
|
3389
|
+
if (version) {
|
|
3390
|
+
return version;
|
|
3391
|
+
}
|
|
3392
|
+
}
|
|
3378
3393
|
return "0.0.0";
|
|
3379
3394
|
})();
|
|
3380
3395
|
function log(msg, options) {
|