@exulu/backend 1.39.2 → 1.39.3
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/CHANGELOG.md +2 -2
- package/dist/index.cjs +19 -0
- package/dist/index.js +19 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
## [1.39.
|
|
1
|
+
## [1.39.3](https://github.com/Qventu/exulu-backend/compare/v1.39.2...v1.39.3) (2025-12-03)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* add version number to return headers ([57ea1dc](https://github.com/Qventu/exulu-backend/commit/57ea1dc0ec85ec49d2e4a839a522fd6215c1857e))
|
package/dist/index.cjs
CHANGED
|
@@ -6684,6 +6684,18 @@ var CLAUDE_MESSAGES = {
|
|
|
6684
6684
|
var import_ai2 = require("ai");
|
|
6685
6685
|
var import_cookie_parser = __toESM(require("cookie-parser"), 1);
|
|
6686
6686
|
var REQUEST_SIZE_LIMIT = "50mb";
|
|
6687
|
+
var getExuluVersionNumber = async () => {
|
|
6688
|
+
try {
|
|
6689
|
+
const path = process.cwd();
|
|
6690
|
+
const packageJson = import_fs.default.readFileSync(path + "/package.json", "utf8");
|
|
6691
|
+
const packageData = JSON.parse(packageJson);
|
|
6692
|
+
const exuluVersion = packageData.dependencies["@exulu/backend"];
|
|
6693
|
+
console.log(`[EXULU] Installed exulu-backend version: ${exuluVersion}`);
|
|
6694
|
+
return exuluVersion;
|
|
6695
|
+
} catch (error) {
|
|
6696
|
+
console.error("Could not find or import package.json:", error.message);
|
|
6697
|
+
}
|
|
6698
|
+
};
|
|
6687
6699
|
var global_queues = {
|
|
6688
6700
|
eval_runs: "eval_runs"
|
|
6689
6701
|
};
|
|
@@ -6720,6 +6732,13 @@ var createExpressRoutes = async (app, agents, tools, contexts, config, evals, tr
|
|
|
6720
6732
|
app.use(import_body_parser.default.urlencoded({ extended: true, limit: REQUEST_SIZE_LIMIT }));
|
|
6721
6733
|
app.use(import_body_parser.default.json({ limit: REQUEST_SIZE_LIMIT }));
|
|
6722
6734
|
app.use((0, import_cookie_parser.default)());
|
|
6735
|
+
app.use(async (req, res, next) => {
|
|
6736
|
+
const version = await getExuluVersionNumber();
|
|
6737
|
+
if (version) {
|
|
6738
|
+
res.setHeader("exulu-version", version);
|
|
6739
|
+
}
|
|
6740
|
+
next();
|
|
6741
|
+
});
|
|
6723
6742
|
console.log(`
|
|
6724
6743
|
\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557
|
|
6725
6744
|
\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u255A\u2588\u2588\u2557\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551
|
package/dist/index.js
CHANGED
|
@@ -6651,6 +6651,18 @@ var CLAUDE_MESSAGES = {
|
|
|
6651
6651
|
import { createIdGenerator } from "ai";
|
|
6652
6652
|
import cookieParser from "cookie-parser";
|
|
6653
6653
|
var REQUEST_SIZE_LIMIT = "50mb";
|
|
6654
|
+
var getExuluVersionNumber = async () => {
|
|
6655
|
+
try {
|
|
6656
|
+
const path = process.cwd();
|
|
6657
|
+
const packageJson = fs.readFileSync(path + "/package.json", "utf8");
|
|
6658
|
+
const packageData = JSON.parse(packageJson);
|
|
6659
|
+
const exuluVersion = packageData.dependencies["@exulu/backend"];
|
|
6660
|
+
console.log(`[EXULU] Installed exulu-backend version: ${exuluVersion}`);
|
|
6661
|
+
return exuluVersion;
|
|
6662
|
+
} catch (error) {
|
|
6663
|
+
console.error("Could not find or import package.json:", error.message);
|
|
6664
|
+
}
|
|
6665
|
+
};
|
|
6654
6666
|
var global_queues = {
|
|
6655
6667
|
eval_runs: "eval_runs"
|
|
6656
6668
|
};
|
|
@@ -6687,6 +6699,13 @@ var createExpressRoutes = async (app, agents, tools, contexts, config, evals, tr
|
|
|
6687
6699
|
app.use(bodyParser.urlencoded({ extended: true, limit: REQUEST_SIZE_LIMIT }));
|
|
6688
6700
|
app.use(bodyParser.json({ limit: REQUEST_SIZE_LIMIT }));
|
|
6689
6701
|
app.use(cookieParser());
|
|
6702
|
+
app.use(async (req, res, next) => {
|
|
6703
|
+
const version = await getExuluVersionNumber();
|
|
6704
|
+
if (version) {
|
|
6705
|
+
res.setHeader("exulu-version", version);
|
|
6706
|
+
}
|
|
6707
|
+
next();
|
|
6708
|
+
});
|
|
6690
6709
|
console.log(`
|
|
6691
6710
|
\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557
|
|
6692
6711
|
\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u255A\u2588\u2588\u2557\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551
|