@2515097216/jimeng-free-api 0.8.8 → 0.8.10
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/{chunk-KHOQ4PCS.js → chunk-Z45BIJT6.js} +21 -2
- package/dist/chunk-Z45BIJT6.js.map +1 -0
- package/dist/index.cjs +20 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/index.cjs +20 -1
- package/dist/mcp/index.cjs.map +1 -1
- package/dist/mcp/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-KHOQ4PCS.js.map +0 -1
|
@@ -31,10 +31,29 @@ var Environment = class {
|
|
|
31
31
|
this.package = _package;
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
+
function loadPackageJson() {
|
|
35
|
+
const cwdPkgPath = path.join(process.cwd(), "package.json");
|
|
36
|
+
if (fs.pathExistsSync(cwdPkgPath)) {
|
|
37
|
+
return JSON.parse(fs.readFileSync(cwdPkgPath).toString());
|
|
38
|
+
}
|
|
39
|
+
const entryFile = process.argv[1];
|
|
40
|
+
const entryDir = entryFile ? path.dirname(entryFile) : process.cwd();
|
|
41
|
+
const candidates = [
|
|
42
|
+
path.resolve(entryDir, "../package.json"),
|
|
43
|
+
path.resolve(entryDir, "../../package.json"),
|
|
44
|
+
path.resolve(entryDir, "../../../package.json")
|
|
45
|
+
];
|
|
46
|
+
for (const p of candidates) {
|
|
47
|
+
if (fs.pathExistsSync(p)) {
|
|
48
|
+
return JSON.parse(fs.readFileSync(p).toString());
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return {};
|
|
52
|
+
}
|
|
34
53
|
var environment_default = new Environment({
|
|
35
54
|
cmdArgs,
|
|
36
55
|
envVars,
|
|
37
|
-
package:
|
|
56
|
+
package: loadPackageJson()
|
|
38
57
|
});
|
|
39
58
|
|
|
40
59
|
// src/lib/configs/service-config.ts
|
|
@@ -5585,4 +5604,4 @@ export {
|
|
|
5585
5604
|
generateSeedanceVideo,
|
|
5586
5605
|
routes_default
|
|
5587
5606
|
};
|
|
5588
|
-
//# sourceMappingURL=chunk-
|
|
5607
|
+
//# sourceMappingURL=chunk-Z45BIJT6.js.map
|