@fileverse/api 0.0.7 → 0.0.9
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/index.js +12 -11
- package/dist/cli/index.js.map +1 -1
- package/dist/cloudflare.js +17862 -0
- package/dist/cloudflare.js.map +1 -0
- package/dist/commands/index.js +7 -2
- package/dist/commands/index.js.map +1 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/worker.js +6 -1
- package/dist/worker.js.map +1 -1
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -116,7 +116,12 @@ var init_config = __esm({
|
|
|
116
116
|
init_constants();
|
|
117
117
|
projectEnvPath = path2.join(process.cwd(), "config", ".env");
|
|
118
118
|
userEnvPath = path2.join(os.homedir(), ".fileverse", ".env");
|
|
119
|
-
|
|
119
|
+
if (typeof globalThis.process !== "undefined" && typeof globalThis.process.cwd === "function") {
|
|
120
|
+
try {
|
|
121
|
+
loadConfig(false);
|
|
122
|
+
} catch {
|
|
123
|
+
}
|
|
124
|
+
}
|
|
120
125
|
config = {
|
|
121
126
|
...STATIC_CONFIG,
|
|
122
127
|
get SERVICE_NAME() {
|
|
@@ -18549,6 +18554,12 @@ var startServer = async () => {
|
|
|
18549
18554
|
await startWorker(concurrency);
|
|
18550
18555
|
logger.info("Inline worker started");
|
|
18551
18556
|
}
|
|
18557
|
+
app_default.use((req, _res, next) => {
|
|
18558
|
+
if (req.method === "POST" && req.path === "/" && req.body?.jsonrpc) {
|
|
18559
|
+
req.url = "/mcp";
|
|
18560
|
+
}
|
|
18561
|
+
next();
|
|
18562
|
+
});
|
|
18552
18563
|
app_default.use("/mcp", createMcpRouter({ serverUrl: `http://localhost:${port}`, apiKey }));
|
|
18553
18564
|
logger.info("MCP HTTP transport mounted at /mcp");
|
|
18554
18565
|
server = app_default.listen(port, ip, async () => {
|