@gzl10/nexus-backend 0.19.0 → 0.19.1
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 +10 -6
- package/dist/cli.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -865,13 +865,17 @@ import { readFileSync as readFileSync4 } from "fs";
|
|
|
865
865
|
import { dirname as dirname5, join as join6 } from "path";
|
|
866
866
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
867
867
|
function getVersion() {
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
const
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
868
|
+
let dir = dirname5(fileURLToPath2(import.meta.url));
|
|
869
|
+
for (let i = 0; i < 5; i++) {
|
|
870
|
+
const candidate = join6(dir, "package.json");
|
|
871
|
+
try {
|
|
872
|
+
const pkg3 = JSON.parse(readFileSync4(candidate, "utf-8"));
|
|
873
|
+
if (pkg3.name === "@gzl10/nexus-backend") return pkg3.version;
|
|
874
|
+
} catch {
|
|
875
|
+
}
|
|
876
|
+
dir = dirname5(dir);
|
|
874
877
|
}
|
|
878
|
+
return "unknown";
|
|
875
879
|
}
|
|
876
880
|
async function collectInfo() {
|
|
877
881
|
const config3 = resolveConfig();
|