@motiadev/core 0.1.0-beta.13 → 0.1.0-beta.15

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.
@@ -10,6 +10,7 @@ const express_1 = __importDefault(require("express"));
10
10
  const http_1 = __importDefault(require("http"));
11
11
  const multer_1 = __importDefault(require("multer"));
12
12
  const socket_io_1 = require("socket.io");
13
+ const cors_1 = __importDefault(require("cors"));
13
14
  const flows_endpoint_1 = require("./flows-endpoint");
14
15
  const guards_1 = require("./guards");
15
16
  const logger_1 = require("./logger");
@@ -105,6 +106,7 @@ const createServer = async (lockedData, eventManager, state, config) => {
105
106
  router.stack = filteredStack;
106
107
  };
107
108
  allSteps.filter(guards_1.isApiStep).forEach(addRoute);
109
+ app.use((0, cors_1.default)());
108
110
  app.use(router);
109
111
  (0, flows_endpoint_1.flowsEndpoint)(lockedData, app);
110
112
  (0, flows_config_endpoint_1.flowsConfigEndpoint)(app, process.cwd());
package/package.json CHANGED
@@ -2,10 +2,11 @@
2
2
  "name": "@motiadev/core",
3
3
  "description": "Core functionality for the Motia framework, providing the foundation for building event-driven workflows.",
4
4
  "main": "dist/index.js",
5
- "version": "0.1.0-beta.13",
5
+ "version": "0.1.0-beta.15",
6
6
  "dependencies": {
7
7
  "body-parser": "^1.20.3",
8
8
  "colors": "^1.4.0",
9
+ "cors": "^2.8.5",
9
10
  "dotenv": "^16.4.7",
10
11
  "express": "^4.21.2",
11
12
  "ioredis": "^5.4.2",
@@ -19,6 +20,7 @@
19
20
  },
20
21
  "devDependencies": {
21
22
  "@types/body-parser": "^1.19.5",
23
+ "@types/cors": "^2.8.17",
22
24
  "@types/express": "^5.0.0",
23
25
  "@types/jest": "^29.5.14",
24
26
  "@types/multer": "^1.4.12",