@copilotkitnext/runtime 0.0.13-alpha.1 → 0.0.13

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/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@copilotkitnext/runtime",
4
- version: "0.0.13-alpha.1",
4
+ version: "0.0.13",
5
5
  description: "Server-side runtime package for CopilotKit2",
6
6
  main: "dist/index.js",
7
7
  types: "dist/index.d.ts",
@@ -469,6 +469,7 @@ var CopilotRuntime = class {
469
469
 
470
470
  // src/endpoint.ts
471
471
  import { Hono } from "hono";
472
+ import { cors } from "hono/cors";
472
473
 
473
474
  // src/handlers/handle-run.ts
474
475
  import {
@@ -1031,7 +1032,14 @@ function createCopilotEndpoint({
1031
1032
  basePath
1032
1033
  }) {
1033
1034
  const app = new Hono();
1034
- return app.basePath(basePath).use("*", async (c, next) => {
1035
+ return app.basePath(basePath).use(
1036
+ "*",
1037
+ cors({
1038
+ origin: "*",
1039
+ allowMethods: ["GET", "HEAD", "PUT", "POST", "DELETE", "PATCH", "OPTIONS"],
1040
+ allowHeaders: ["*"]
1041
+ })
1042
+ ).use("*", async (c, next) => {
1035
1043
  const request = c.req.raw;
1036
1044
  const path = c.req.path;
1037
1045
  try {