open-mcp-app 0.0.4 → 0.0.5
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/server/index.d.ts +2 -5
- package/dist/server/index.js +6 -10
- package/dist/server/index.js.map +1 -1
- package/dist/vite/index.d.ts +1 -10
- package/dist/vite/index.js +3 -5
- package/dist/vite/index.js.map +1 -1
- package/package.json +1 -1
package/dist/server/index.d.ts
CHANGED
|
@@ -512,11 +512,8 @@ declare class App {
|
|
|
512
512
|
/**
|
|
513
513
|
* Get the HMR port for injecting the live reload client.
|
|
514
514
|
*
|
|
515
|
-
* When
|
|
516
|
-
*
|
|
517
|
-
* the hmr.json file might not exist yet when the server starts.
|
|
518
|
-
*
|
|
519
|
-
* Falls back to reading hmr.json for non-Creature environments (manual npm run dev).
|
|
515
|
+
* When MCP_HMR_PORT is set (by host), uses that directly.
|
|
516
|
+
* Falls back to reading hmr.json for non-host environments (manual npm run dev).
|
|
520
517
|
*/
|
|
521
518
|
private getHmrPort;
|
|
522
519
|
private generateInstanceId;
|
package/dist/server/index.js
CHANGED
|
@@ -13390,7 +13390,6 @@ import fs from "fs";
|
|
|
13390
13390
|
import path from "path";
|
|
13391
13391
|
|
|
13392
13392
|
// src/vite/hmr-client.ts
|
|
13393
|
-
var HMR_PORT_OFFSET = 1e3;
|
|
13394
13393
|
var HMR_RELOAD_NOTIFICATION = "ui/notifications/hmr-reload";
|
|
13395
13394
|
function generateHmrClientScript(port) {
|
|
13396
13395
|
return `
|
|
@@ -14296,19 +14295,16 @@ var App = class {
|
|
|
14296
14295
|
}
|
|
14297
14296
|
/**
|
|
14298
14297
|
* Get the HMR port for injecting the live reload client.
|
|
14299
|
-
*
|
|
14300
|
-
* When
|
|
14301
|
-
*
|
|
14302
|
-
* the hmr.json file might not exist yet when the server starts.
|
|
14303
|
-
*
|
|
14304
|
-
* Falls back to reading hmr.json for non-Creature environments (manual npm run dev).
|
|
14298
|
+
*
|
|
14299
|
+
* When MCP_HMR_PORT is set (by host), uses that directly.
|
|
14300
|
+
* Falls back to reading hmr.json for non-host environments (manual npm run dev).
|
|
14305
14301
|
*/
|
|
14306
14302
|
getHmrPort() {
|
|
14307
14303
|
if (!this.isDev) return null;
|
|
14308
14304
|
if (this.hmrPort !== null) return this.hmrPort;
|
|
14309
|
-
const
|
|
14310
|
-
if (
|
|
14311
|
-
this.hmrPort =
|
|
14305
|
+
const hmrPortFromHost = process.env.MCP_HMR_PORT ? parseInt(process.env.MCP_HMR_PORT, 10) : null;
|
|
14306
|
+
if (hmrPortFromHost && !isNaN(hmrPortFromHost)) {
|
|
14307
|
+
this.hmrPort = hmrPortFromHost;
|
|
14312
14308
|
return this.hmrPort;
|
|
14313
14309
|
}
|
|
14314
14310
|
const hmrConfig = readHmrConfig();
|