nitrostack 1.0.48 → 1.0.49

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nitrostack",
3
- "version": "1.0.48",
3
+ "version": "1.0.49",
4
4
  "description": "NitroStack - Build powerful MCP servers with TypeScript",
5
5
  "type": "module",
6
6
  "main": "dist/core/index.js",
@@ -8,12 +8,13 @@ export function middleware(request: NextRequest) {
8
8
  // In development, proxy widget requests to the widget dev server
9
9
  if (process.env.NODE_ENV === 'development' && process.env.WIDGETS_DEV_MODE === 'true') {
10
10
  const widgetsDevPort = process.env.WIDGETS_DEV_PORT || '3001';
11
+ console.log(`[Middleware] Proxying widgets to port ${widgetsDevPort}`);
11
12
 
12
13
  // Proxy /widgets/* to widget dev server
13
14
  if (pathname.startsWith('/widgets/')) {
14
15
  const widgetPath = pathname.replace('/widgets/', '');
15
16
  const targetUrl = `http://localhost:${widgetsDevPort}/${widgetPath}`;
16
-
17
+
17
18
  return NextResponse.rewrite(new URL(targetUrl));
18
19
  }
19
20
  }
@@ -31,6 +31,8 @@ const nextConfig = {
31
31
  env: {
32
32
  MCP_SERVER_PORT: process.env.MCP_SERVER_PORT,
33
33
  MCP_TRANSPORT_TYPE: process.env.MCP_TRANSPORT_TYPE,
34
+ WIDGETS_DEV_MODE: process.env.WIDGETS_DEV_MODE,
35
+ WIDGETS_DEV_PORT: process.env.WIDGETS_DEV_PORT,
34
36
  },
35
37
  };
36
38