@motiadev/core 0.1.0-beta.8 → 0.1.0-beta.9

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.
@@ -38,7 +38,7 @@ const getStepConfig = (file) => {
38
38
  });
39
39
  child.on('message', (message) => {
40
40
  logger_1.globalLogger.debug('[Config] Read config', { config: message });
41
- config = message;
41
+ config = command === 'node' ? eval('(' + message + ')') : message;
42
42
  resolve(config);
43
43
  child.kill(); // we can kill the child process since we already received the message
44
44
  });
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const path_1 = __importDefault(require("path"));
7
7
  const zod_1 = require("zod");
8
8
  const zod_to_json_schema_1 = __importDefault(require("zod-to-json-schema"));
9
+ const serialize_javascript_1 = __importDefault(require("serialize-javascript"));
9
10
  // Add ts-node registration before dynamic imports
10
11
  // eslint-disable-next-line @typescript-eslint/no-require-imports
11
12
  require('ts-node').register({
@@ -26,7 +27,7 @@ async function getConfig(filePath) {
26
27
  else if (module.config.bodySchema instanceof zod_1.ZodObject) {
27
28
  module.config.bodySchema = (0, zod_to_json_schema_1.default)(module.config.bodySchema);
28
29
  }
29
- process.send?.(module.config);
30
+ process.send?.((0, serialize_javascript_1.default)(module.config));
30
31
  process.exit(0);
31
32
  }
32
33
  catch (error) {
package/package.json CHANGED
@@ -2,13 +2,14 @@
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.8",
5
+ "version": "0.1.0-beta.9",
6
6
  "dependencies": {
7
7
  "body-parser": "^1.20.3",
8
8
  "colors": "^1.4.0",
9
9
  "express": "^4.21.2",
10
10
  "ioredis": "^5.4.2",
11
11
  "node-cron": "^3.0.3",
12
+ "serialize-javascript": "^6.0.2",
12
13
  "socket.io": "^4.8.1",
13
14
  "ts-node": "^10.9.2",
14
15
  "tsconfig-paths": "^4.2.0",
@@ -20,6 +21,7 @@
20
21
  "@types/express": "^5.0.0",
21
22
  "@types/jest": "^29.5.14",
22
23
  "@types/node-cron": "^3.0.11",
24
+ "@types/serialize-javascript": "^5.0.4",
23
25
  "@types/supertest": "^6.0.2",
24
26
  "jest": "^29.7.0",
25
27
  "supertest": "^7.0.0",