@copilotkit/runtime 0.0.0-fix-restore-handle-method-node-http-20251222114321 → 0.0.0-fix-restore-handle-method-node-http-20260105204107
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.d.ts +6 -5
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/lib/integrations/node-http/index.ts +16 -1
package/dist/index.mjs
CHANGED
|
@@ -15,6 +15,7 @@ import { useDeferStream } from '@graphql-yoga/plugin-defer-stream';
|
|
|
15
15
|
import createPinoLogger from 'pino';
|
|
16
16
|
import pretty from 'pino-pretty';
|
|
17
17
|
import { handle } from 'hono/vercel';
|
|
18
|
+
import { getRequestListener } from '@hono/node-server';
|
|
18
19
|
|
|
19
20
|
var __create = Object.create;
|
|
20
21
|
var __defProp = Object.defineProperty;
|
|
@@ -4753,7 +4754,16 @@ function copilotRuntimeNodeHttpEndpoint(options) {
|
|
|
4753
4754
|
runtime: options.runtime.instance,
|
|
4754
4755
|
basePath: options.baseUrl ?? options.endpoint
|
|
4755
4756
|
});
|
|
4756
|
-
|
|
4757
|
+
const handle2 = getRequestListener(honoApp.fetch);
|
|
4758
|
+
return function(reqOrRequest, res) {
|
|
4759
|
+
if (reqOrRequest instanceof Request) {
|
|
4760
|
+
return honoApp.fetch(reqOrRequest);
|
|
4761
|
+
}
|
|
4762
|
+
if (!res) {
|
|
4763
|
+
throw new TypeError("ServerResponse is required for Node HTTP requests");
|
|
4764
|
+
}
|
|
4765
|
+
return handle2(reqOrRequest, res);
|
|
4766
|
+
};
|
|
4757
4767
|
}
|
|
4758
4768
|
__name(copilotRuntimeNodeHttpEndpoint, "copilotRuntimeNodeHttpEndpoint");
|
|
4759
4769
|
|