@exulu/backend 1.63.0 → 1.63.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/index.cjs +13 -2
- package/dist/index.js +14 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -23470,9 +23470,20 @@ var initLiteLLMDatabase = async (packageRoot) => {
|
|
|
23470
23470
|
}
|
|
23471
23471
|
const venvBin = (0, import_node_path8.resolve)(packageRoot, "ee/python/.venv/bin");
|
|
23472
23472
|
const prismaCli = (0, import_node_path8.resolve)(venvBin, "prisma");
|
|
23473
|
+
const venvLibDir = (0, import_node_path8.resolve)(packageRoot, "ee/python/.venv/lib");
|
|
23474
|
+
const pythonVersionDir = (0, import_node_fs7.existsSync)(venvLibDir) ? (0, import_node_fs7.readdirSync)(venvLibDir).find((entry) => /^python3\.\d+$/.test(entry)) : void 0;
|
|
23475
|
+
if (!pythonVersionDir) {
|
|
23476
|
+
warn([
|
|
23477
|
+
`Could not find a python3.* directory under ${venvLibDir}.`,
|
|
23478
|
+
`Run \`npm run python:setup\` to create the venv.`,
|
|
23479
|
+
`Skipping LiteLLM database setup.`
|
|
23480
|
+
]);
|
|
23481
|
+
return;
|
|
23482
|
+
}
|
|
23473
23483
|
const litellmProxyDir = (0, import_node_path8.resolve)(
|
|
23474
|
-
|
|
23475
|
-
|
|
23484
|
+
venvLibDir,
|
|
23485
|
+
pythonVersionDir,
|
|
23486
|
+
"site-packages/litellm/proxy"
|
|
23476
23487
|
);
|
|
23477
23488
|
const schemaPath = (0, import_node_path8.resolve)(litellmProxyDir, "schema.prisma");
|
|
23478
23489
|
if (!(0, import_node_fs7.existsSync)(prismaCli)) {
|
package/dist/index.js
CHANGED
|
@@ -14947,7 +14947,7 @@ var execute = async ({ contexts }) => {
|
|
|
14947
14947
|
};
|
|
14948
14948
|
|
|
14949
14949
|
// src/exulu/litellm/db-init.ts
|
|
14950
|
-
import { existsSync as existsSync4 } from "fs";
|
|
14950
|
+
import { existsSync as existsSync4, readdirSync } from "fs";
|
|
14951
14951
|
import { resolve as resolve2 } from "path";
|
|
14952
14952
|
import { spawnSync } from "child_process";
|
|
14953
14953
|
import { Client } from "pg";
|
|
@@ -15157,9 +15157,20 @@ var initLiteLLMDatabase = async (packageRoot) => {
|
|
|
15157
15157
|
}
|
|
15158
15158
|
const venvBin = resolve2(packageRoot, "ee/python/.venv/bin");
|
|
15159
15159
|
const prismaCli = resolve2(venvBin, "prisma");
|
|
15160
|
+
const venvLibDir = resolve2(packageRoot, "ee/python/.venv/lib");
|
|
15161
|
+
const pythonVersionDir = existsSync4(venvLibDir) ? readdirSync(venvLibDir).find((entry) => /^python3\.\d+$/.test(entry)) : void 0;
|
|
15162
|
+
if (!pythonVersionDir) {
|
|
15163
|
+
warn([
|
|
15164
|
+
`Could not find a python3.* directory under ${venvLibDir}.`,
|
|
15165
|
+
`Run \`npm run python:setup\` to create the venv.`,
|
|
15166
|
+
`Skipping LiteLLM database setup.`
|
|
15167
|
+
]);
|
|
15168
|
+
return;
|
|
15169
|
+
}
|
|
15160
15170
|
const litellmProxyDir = resolve2(
|
|
15161
|
-
|
|
15162
|
-
|
|
15171
|
+
venvLibDir,
|
|
15172
|
+
pythonVersionDir,
|
|
15173
|
+
"site-packages/litellm/proxy"
|
|
15163
15174
|
);
|
|
15164
15175
|
const schemaPath = resolve2(litellmProxyDir, "schema.prisma");
|
|
15165
15176
|
if (!existsSync4(prismaCli)) {
|