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.js
CHANGED
|
@@ -3346,16 +3346,31 @@ var ADORN_VERSION = (() => {
|
|
|
3346
3346
|
return null;
|
|
3347
3347
|
}
|
|
3348
3348
|
};
|
|
3349
|
-
const
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3349
|
+
const potentialPaths = [];
|
|
3350
|
+
try {
|
|
3351
|
+
const importMetaUrl = import.meta?.url;
|
|
3352
|
+
if (importMetaUrl && typeof importMetaUrl === "string" && importMetaUrl.length > 0) {
|
|
3353
|
+
const cliDir = dirname3(fileURLToPath(importMetaUrl));
|
|
3354
|
+
potentialPaths.push(
|
|
3355
|
+
resolve3(cliDir, "..", "package.json"),
|
|
3356
|
+
resolve3(cliDir, "package.json")
|
|
3357
|
+
);
|
|
3358
|
+
}
|
|
3359
|
+
} catch {
|
|
3360
|
+
}
|
|
3361
|
+
const cwd = process2.cwd();
|
|
3362
|
+
potentialPaths.push(
|
|
3363
|
+
resolve3(cwd, "package.json"),
|
|
3364
|
+
resolve3(cwd, "node_modules", "adorn-api", "package.json"),
|
|
3365
|
+
resolve3(cwd, "..", "package.json"),
|
|
3366
|
+
resolve3(cwd, "..", "..", "package.json")
|
|
3367
|
+
);
|
|
3368
|
+
for (const pkgPath of potentialPaths) {
|
|
3369
|
+
const version = tryReadPackageJson(pkgPath);
|
|
3370
|
+
if (version) {
|
|
3371
|
+
return version;
|
|
3372
|
+
}
|
|
3373
|
+
}
|
|
3359
3374
|
return "0.0.0";
|
|
3360
3375
|
})();
|
|
3361
3376
|
function log(msg, options) {
|