motia 0.12.0-beta.157 → 0.12.1-beta.158
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/cjs/create/templates/hello/motia-workbench.json +5 -4
- package/dist/cjs/create/templates/hello_js/motia-workbench.json +14 -11
- package/dist/cjs/create/templates/hello_python/motia-workbench.json +14 -11
- package/dist/cjs/create/templates/nodejs/motia-workbench.json +11 -12
- package/dist/cjs/create/templates/python/motia-workbench.json +10 -10
- package/dist/cjs/generate-locked-data.js +5 -0
- package/dist/cjs/utils/python-version-utils.js +11 -0
- package/dist/esm/create/templates/hello/motia-workbench.json +5 -4
- package/dist/esm/create/templates/hello_js/motia-workbench.json +14 -11
- package/dist/esm/create/templates/hello_python/motia-workbench.json +14 -11
- package/dist/esm/create/templates/nodejs/motia-workbench.json +11 -12
- package/dist/esm/create/templates/python/motia-workbench.json +10 -10
- package/dist/esm/generate-locked-data.js +5 -0
- package/dist/esm/utils/python-version-utils.js +11 -0
- package/package.json +6 -6
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
"id": "hello-world-flow",
|
|
4
4
|
"config": {
|
|
5
5
|
"steps/hello/process-greeting.step.ts": {
|
|
6
|
-
"x":
|
|
7
|
-
"y":
|
|
6
|
+
"x": 409,
|
|
7
|
+
"y": 44
|
|
8
8
|
},
|
|
9
9
|
"steps/hello/hello-api.step.ts": {
|
|
10
|
-
"x":
|
|
11
|
-
"y":
|
|
10
|
+
"x": 0,
|
|
11
|
+
"y": 0,
|
|
12
|
+
"sourceHandlePosition": "right"
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "hello-world-flow",
|
|
4
|
+
"config": {
|
|
5
|
+
"steps/hello/process-greeting.step.js": {
|
|
6
|
+
"x": 409,
|
|
7
|
+
"y": 44
|
|
8
|
+
},
|
|
9
|
+
"steps/hello/hello-api.step.js": {
|
|
10
|
+
"x": 0,
|
|
11
|
+
"y": 0,
|
|
12
|
+
"sourceHandlePosition": "right"
|
|
13
|
+
}
|
|
11
14
|
}
|
|
12
15
|
}
|
|
13
|
-
|
|
16
|
+
]
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "hello-world-flow",
|
|
4
|
+
"config": {
|
|
5
|
+
"steps/hello/process_greeting_step.py": {
|
|
6
|
+
"x": 409,
|
|
7
|
+
"y": 44
|
|
8
|
+
},
|
|
9
|
+
"steps/hello/hello_api_step.py": {
|
|
10
|
+
"x": 0,
|
|
11
|
+
"y": 0,
|
|
12
|
+
"sourceHandlePosition": "right"
|
|
13
|
+
}
|
|
11
14
|
}
|
|
12
15
|
}
|
|
13
|
-
|
|
16
|
+
]
|
|
@@ -3,25 +3,24 @@
|
|
|
3
3
|
"id": "basic-tutorial",
|
|
4
4
|
"config": {
|
|
5
5
|
"steps/petstore/state-audit-cron.step.ts": {
|
|
6
|
-
"x": -
|
|
7
|
-
"y":
|
|
6
|
+
"x": -175,
|
|
7
|
+
"y": 219,
|
|
8
8
|
"sourceHandlePosition": "right"
|
|
9
9
|
},
|
|
10
10
|
"steps/petstore/process-food-order.step.ts": {
|
|
11
|
-
"x":
|
|
11
|
+
"x": 144,
|
|
12
12
|
"y": 17,
|
|
13
|
-
"sourceHandlePosition": "bottom"
|
|
14
|
-
|
|
13
|
+
"sourceHandlePosition": "bottom"
|
|
14
|
+
},
|
|
15
|
+
"steps/petstore/notification.step.ts": {
|
|
16
|
+
"x": 331,
|
|
17
|
+
"y": 261,
|
|
18
|
+
"sourceHandlePosition": "bottom"
|
|
15
19
|
},
|
|
16
20
|
"steps/petstore/api.step.ts": {
|
|
17
|
-
"x": -
|
|
21
|
+
"x": -175,
|
|
18
22
|
"y": 3,
|
|
19
|
-
"sourceHandlePosition": "right"
|
|
20
|
-
"targetHandlePosition": "left"
|
|
21
|
-
},
|
|
22
|
-
"steps/petstore/notification.step.ts": {
|
|
23
|
-
"x": 300,
|
|
24
|
-
"y": 264
|
|
23
|
+
"sourceHandlePosition": "right"
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
26
|
}
|
|
@@ -3,23 +3,23 @@
|
|
|
3
3
|
"id": "basic-tutorial",
|
|
4
4
|
"config": {
|
|
5
5
|
"steps/petstore/state_audit_cron_step.py": {
|
|
6
|
-
"x": -
|
|
7
|
-
"y":
|
|
6
|
+
"x": -175,
|
|
7
|
+
"y": 219,
|
|
8
8
|
"sourceHandlePosition": "right"
|
|
9
9
|
},
|
|
10
10
|
"steps/petstore/process_food_order_step.py": {
|
|
11
|
-
"x":
|
|
12
|
-
"y":
|
|
13
|
-
"
|
|
11
|
+
"x": 144,
|
|
12
|
+
"y": 17,
|
|
13
|
+
"sourceHandlePosition": "bottom"
|
|
14
14
|
},
|
|
15
15
|
"steps/petstore/notification_step.py": {
|
|
16
|
-
"x":
|
|
17
|
-
"y":
|
|
18
|
-
"
|
|
16
|
+
"x": 331,
|
|
17
|
+
"y": 261,
|
|
18
|
+
"sourceHandlePosition": "bottom"
|
|
19
19
|
},
|
|
20
20
|
"steps/petstore/api_step.py": {
|
|
21
|
-
"x":
|
|
22
|
-
"y":
|
|
21
|
+
"x": -175,
|
|
22
|
+
"y": 3,
|
|
23
23
|
"sourceHandlePosition": "right"
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -73,6 +73,11 @@ const collectFlows = async (projectDir, lockedData) => {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
catch (err) {
|
|
76
|
+
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
77
|
+
if (errorMessage.includes('Executable ruby not found') || errorMessage.includes('Executable python not found')) {
|
|
78
|
+
console.warn(colors_1.default.yellow(`! [WARNING] Skipping step ${filePath}: ${errorMessage}`));
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
76
81
|
throw new compilation_error_1.CompilationError(`Error collecting flow ${filePath}`, path_1.default.relative(projectDir, filePath), err);
|
|
77
82
|
}
|
|
78
83
|
}
|
|
@@ -36,6 +36,17 @@ async function getPythonCommand(requestedVersion, baseDir) {
|
|
|
36
36
|
catch (error) {
|
|
37
37
|
// If error, python command doesn't exist or can't be executed
|
|
38
38
|
}
|
|
39
|
+
// Check if python3 exists
|
|
40
|
+
try {
|
|
41
|
+
const result = await (0, execute_command_1.executeCommand)('python3 --version', baseDir, { silent: true });
|
|
42
|
+
const versionMatch = result.match(/Python\s+(\d+)\.(\d+)\.(\d+)/);
|
|
43
|
+
if (versionMatch && parseInt(versionMatch[1], 10) >= 3) {
|
|
44
|
+
return 'python3';
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
// If error, python3 command doesn't exist or can't be executed
|
|
49
|
+
}
|
|
39
50
|
throw new Error('No compatible Python 3 installation found. Please install Python 3.');
|
|
40
51
|
}
|
|
41
52
|
function findPythonSitePackagesDir(venvLibPath, pythonVersion) {
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
"id": "hello-world-flow",
|
|
4
4
|
"config": {
|
|
5
5
|
"steps/hello/process-greeting.step.ts": {
|
|
6
|
-
"x":
|
|
7
|
-
"y":
|
|
6
|
+
"x": 409,
|
|
7
|
+
"y": 44
|
|
8
8
|
},
|
|
9
9
|
"steps/hello/hello-api.step.ts": {
|
|
10
|
-
"x":
|
|
11
|
-
"y":
|
|
10
|
+
"x": 0,
|
|
11
|
+
"y": 0,
|
|
12
|
+
"sourceHandlePosition": "right"
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "hello-world-flow",
|
|
4
|
+
"config": {
|
|
5
|
+
"steps/hello/process-greeting.step.js": {
|
|
6
|
+
"x": 409,
|
|
7
|
+
"y": 44
|
|
8
|
+
},
|
|
9
|
+
"steps/hello/hello-api.step.js": {
|
|
10
|
+
"x": 0,
|
|
11
|
+
"y": 0,
|
|
12
|
+
"sourceHandlePosition": "right"
|
|
13
|
+
}
|
|
11
14
|
}
|
|
12
15
|
}
|
|
13
|
-
|
|
16
|
+
]
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "hello-world-flow",
|
|
4
|
+
"config": {
|
|
5
|
+
"steps/hello/process_greeting_step.py": {
|
|
6
|
+
"x": 409,
|
|
7
|
+
"y": 44
|
|
8
|
+
},
|
|
9
|
+
"steps/hello/hello_api_step.py": {
|
|
10
|
+
"x": 0,
|
|
11
|
+
"y": 0,
|
|
12
|
+
"sourceHandlePosition": "right"
|
|
13
|
+
}
|
|
11
14
|
}
|
|
12
15
|
}
|
|
13
|
-
|
|
16
|
+
]
|
|
@@ -3,25 +3,24 @@
|
|
|
3
3
|
"id": "basic-tutorial",
|
|
4
4
|
"config": {
|
|
5
5
|
"steps/petstore/state-audit-cron.step.ts": {
|
|
6
|
-
"x": -
|
|
7
|
-
"y":
|
|
6
|
+
"x": -175,
|
|
7
|
+
"y": 219,
|
|
8
8
|
"sourceHandlePosition": "right"
|
|
9
9
|
},
|
|
10
10
|
"steps/petstore/process-food-order.step.ts": {
|
|
11
|
-
"x":
|
|
11
|
+
"x": 144,
|
|
12
12
|
"y": 17,
|
|
13
|
-
"sourceHandlePosition": "bottom"
|
|
14
|
-
|
|
13
|
+
"sourceHandlePosition": "bottom"
|
|
14
|
+
},
|
|
15
|
+
"steps/petstore/notification.step.ts": {
|
|
16
|
+
"x": 331,
|
|
17
|
+
"y": 261,
|
|
18
|
+
"sourceHandlePosition": "bottom"
|
|
15
19
|
},
|
|
16
20
|
"steps/petstore/api.step.ts": {
|
|
17
|
-
"x": -
|
|
21
|
+
"x": -175,
|
|
18
22
|
"y": 3,
|
|
19
|
-
"sourceHandlePosition": "right"
|
|
20
|
-
"targetHandlePosition": "left"
|
|
21
|
-
},
|
|
22
|
-
"steps/petstore/notification.step.ts": {
|
|
23
|
-
"x": 300,
|
|
24
|
-
"y": 264
|
|
23
|
+
"sourceHandlePosition": "right"
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
26
|
}
|
|
@@ -3,23 +3,23 @@
|
|
|
3
3
|
"id": "basic-tutorial",
|
|
4
4
|
"config": {
|
|
5
5
|
"steps/petstore/state_audit_cron_step.py": {
|
|
6
|
-
"x": -
|
|
7
|
-
"y":
|
|
6
|
+
"x": -175,
|
|
7
|
+
"y": 219,
|
|
8
8
|
"sourceHandlePosition": "right"
|
|
9
9
|
},
|
|
10
10
|
"steps/petstore/process_food_order_step.py": {
|
|
11
|
-
"x":
|
|
12
|
-
"y":
|
|
13
|
-
"
|
|
11
|
+
"x": 144,
|
|
12
|
+
"y": 17,
|
|
13
|
+
"sourceHandlePosition": "bottom"
|
|
14
14
|
},
|
|
15
15
|
"steps/petstore/notification_step.py": {
|
|
16
|
-
"x":
|
|
17
|
-
"y":
|
|
18
|
-
"
|
|
16
|
+
"x": 331,
|
|
17
|
+
"y": 261,
|
|
18
|
+
"sourceHandlePosition": "bottom"
|
|
19
19
|
},
|
|
20
20
|
"steps/petstore/api_step.py": {
|
|
21
|
-
"x":
|
|
22
|
-
"y":
|
|
21
|
+
"x": -175,
|
|
22
|
+
"y": 3,
|
|
23
23
|
"sourceHandlePosition": "right"
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -65,6 +65,11 @@ export const collectFlows = async (projectDir, lockedData) => {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
catch (err) {
|
|
68
|
+
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
69
|
+
if (errorMessage.includes('Executable ruby not found') || errorMessage.includes('Executable python not found')) {
|
|
70
|
+
console.warn(colors.yellow(`! [WARNING] Skipping step ${filePath}: ${errorMessage}`));
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
68
73
|
throw new CompilationError(`Error collecting flow ${filePath}`, path.relative(projectDir, filePath), err);
|
|
69
74
|
}
|
|
70
75
|
}
|
|
@@ -28,6 +28,17 @@ export async function getPythonCommand(requestedVersion, baseDir) {
|
|
|
28
28
|
catch (error) {
|
|
29
29
|
// If error, python command doesn't exist or can't be executed
|
|
30
30
|
}
|
|
31
|
+
// Check if python3 exists
|
|
32
|
+
try {
|
|
33
|
+
const result = await executeCommand('python3 --version', baseDir, { silent: true });
|
|
34
|
+
const versionMatch = result.match(/Python\s+(\d+)\.(\d+)\.(\d+)/);
|
|
35
|
+
if (versionMatch && parseInt(versionMatch[1], 10) >= 3) {
|
|
36
|
+
return 'python3';
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
// If error, python3 command doesn't exist or can't be executed
|
|
41
|
+
}
|
|
31
42
|
throw new Error('No compatible Python 3 installation found. Please install Python 3.');
|
|
32
43
|
}
|
|
33
44
|
export function findPythonSitePackagesDir(venvLibPath, pythonVersion) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "motia",
|
|
3
3
|
"description": "Build production-grade backends with a single primitive. APIs, background jobs, Queues, Workflows, and AI agents - unified in one system with built-in State management, Streaming, and Observability.",
|
|
4
|
-
"version": "0.12.
|
|
4
|
+
"version": "0.12.1-beta.158",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
"redis-memory-server": "^0.14.0",
|
|
49
49
|
"table": "^6.9.0",
|
|
50
50
|
"ts-node": "^10.9.2",
|
|
51
|
-
"@motiadev/adapter-redis-state": "0.12.
|
|
52
|
-
"@motiadev/
|
|
53
|
-
"@motiadev/stream-client-node": "0.12.
|
|
54
|
-
"@motiadev/workbench": "0.12.
|
|
55
|
-
"@motiadev/
|
|
51
|
+
"@motiadev/adapter-redis-state": "0.12.1-beta.158",
|
|
52
|
+
"@motiadev/adapter-redis-streams": "0.12.1-beta.158",
|
|
53
|
+
"@motiadev/stream-client-node": "0.12.1-beta.158",
|
|
54
|
+
"@motiadev/workbench": "0.12.1-beta.158",
|
|
55
|
+
"@motiadev/core": "0.12.1-beta.158"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@amplitude/analytics-types": "^2.9.2",
|