motia 0.9.4-beta.151-160668 ā 0.9.5-beta.151
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/cli.js +0 -2
- package/dist/cjs/create/index.js +1 -1
- package/dist/cjs/create/interactive.d.ts +0 -1
- package/dist/cjs/create/interactive.js +0 -12
- package/dist/cjs/create/templates/nodejs/tutorial/tutorial.tsx.txt +10 -6
- package/dist/cjs/create/templates/python/tutorial/tutorial.tsx.txt +10 -6
- package/dist/esm/cli.js +0 -2
- package/dist/esm/create/index.js +1 -1
- package/dist/esm/create/interactive.d.ts +0 -1
- package/dist/esm/create/interactive.js +0 -12
- package/dist/esm/create/templates/nodejs/tutorial/tutorial.tsx.txt +10 -6
- package/dist/esm/create/templates/python/tutorial/tutorial.tsx.txt +10 -6
- package/dist/types/create/interactive.d.ts +0 -1
- package/package.json +4 -4
package/dist/cjs/cli.js
CHANGED
|
@@ -26,7 +26,6 @@ commander_1.program
|
|
|
26
26
|
.option('-t, --template <template>', 'The template to use for your project')
|
|
27
27
|
.option('-p, --plugin', 'Create a plugin project')
|
|
28
28
|
.option('-i, --interactive', 'Use interactive prompts to create project') // it's default
|
|
29
|
-
.option('-c, --confirm', 'Confirm the project creation', false)
|
|
30
29
|
.action((projectName, options) => {
|
|
31
30
|
const mergedArgs = { ...options, name: projectName };
|
|
32
31
|
return (0, config_utils_1.handler)(async (arg, context) => {
|
|
@@ -35,7 +34,6 @@ commander_1.program
|
|
|
35
34
|
name: arg.name,
|
|
36
35
|
template: arg.template,
|
|
37
36
|
plugin: !!arg.plugin,
|
|
38
|
-
confirm: !!arg.confirm,
|
|
39
37
|
}, context);
|
|
40
38
|
})(mergedArgs);
|
|
41
39
|
});
|
package/dist/cjs/create/index.js
CHANGED
|
@@ -26,7 +26,7 @@ const installRequiredDependencies = async (packageManager, rootDir, context) =>
|
|
|
26
26
|
yarn: 'yarn add',
|
|
27
27
|
pnpm: 'pnpm add',
|
|
28
28
|
}[packageManager];
|
|
29
|
-
const dependencies = [`motia@${version_1.version}`, 'zod@
|
|
29
|
+
const dependencies = [`motia@${version_1.version}`, 'zod@3.24.4', ...plugin_dependencies_1.pluginDependencies.map((dep) => `${dep}@${version_1.version}`)].join(' ');
|
|
30
30
|
const devDependencies = ['ts-node@10.9.2', 'typescript@5.7.3', '@types/react@19.1.1'].join(' ');
|
|
31
31
|
try {
|
|
32
32
|
await (0, execute_command_1.executeCommand)(`${installCommand} ${dependencies}`, rootDir);
|
|
@@ -60,20 +60,8 @@ const createInteractive = async (args, context) => {
|
|
|
60
60
|
filter: (input) => input.trim(),
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
|
-
if (!args.confirm) {
|
|
64
|
-
questions.push({
|
|
65
|
-
type: 'confirm',
|
|
66
|
-
name: 'proceed',
|
|
67
|
-
message: 'Proceed? [Y/n]:',
|
|
68
|
-
default: true,
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
63
|
if (questions.length > 0) {
|
|
72
64
|
const answers = await inquirer_1.default.prompt(questions);
|
|
73
|
-
if (!args.confirm && !answers.proceed) {
|
|
74
|
-
context.log('cancelled', (message) => message.tag('info').append('\nā Project creation cancelled.'));
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
65
|
name = args.name || answers.projectName;
|
|
78
66
|
template = args.template || answers.template;
|
|
79
67
|
}
|
|
@@ -432,15 +432,19 @@ export const steps: TutorialStep[] = [
|
|
|
432
432
|
elementXpath: workbenchXPath.endpoints.callPanel,
|
|
433
433
|
title: 'API Endpoint Test',
|
|
434
434
|
description: () => (
|
|
435
|
-
|
|
436
|
-
|
|
435
|
+
<>
|
|
436
|
+
<p>
|
|
437
|
+
This form will allow you to validate your API Step by executing an HTTP request against your API endpoint.
|
|
438
|
+
</p>
|
|
437
439
|
<br />
|
|
438
440
|
<br />
|
|
439
|
-
You can also test your API endpoints using your terminal through the curl command
|
|
441
|
+
<p>You can also test your API endpoints using your terminal through the curl command.</p>
|
|
440
442
|
<br />
|
|
441
443
|
<br />
|
|
442
|
-
|
|
443
|
-
|
|
444
|
+
<p>
|
|
445
|
+
š” Thanks to the <b>bodySchema</b> attribute from the API Step config, you are automatically provided with a
|
|
446
|
+
sample request payload.
|
|
447
|
+
</p>
|
|
444
448
|
<br />
|
|
445
449
|
<br />
|
|
446
450
|
<pre className="code-preview">
|
|
@@ -455,7 +459,7 @@ export const steps: TutorialStep[] = [
|
|
|
455
459
|
'
|
|
456
460
|
</code>
|
|
457
461
|
</pre>
|
|
458
|
-
|
|
462
|
+
</>
|
|
459
463
|
),
|
|
460
464
|
before: [
|
|
461
465
|
{ type: 'click', selector: workbenchXPath.closePanelButton },
|
|
@@ -432,15 +432,19 @@ export const steps: TutorialStep[] = [
|
|
|
432
432
|
elementXpath: workbenchXPath.endpoints.callPanel,
|
|
433
433
|
title: 'API Endpoint Test',
|
|
434
434
|
description: () => (
|
|
435
|
-
|
|
436
|
-
|
|
435
|
+
<>
|
|
436
|
+
<p>
|
|
437
|
+
This form will allow you to validate your API Step by executing an HTTP request against your API endpoint.
|
|
438
|
+
</p>
|
|
437
439
|
<br />
|
|
438
440
|
<br />
|
|
439
|
-
You can also test your API endpoints using your terminal through the curl command
|
|
441
|
+
<p>You can also test your API endpoints using your terminal through the curl command.</p>
|
|
440
442
|
<br />
|
|
441
443
|
<br />
|
|
442
|
-
|
|
443
|
-
|
|
444
|
+
<p>
|
|
445
|
+
š” Thanks to the <b>bodySchema</b> attribute from the API Step config, you are automatically provided with a
|
|
446
|
+
sample request payload.
|
|
447
|
+
</p>
|
|
444
448
|
<br />
|
|
445
449
|
<br />
|
|
446
450
|
<pre className="code-preview">
|
|
@@ -455,7 +459,7 @@ export const steps: TutorialStep[] = [
|
|
|
455
459
|
'
|
|
456
460
|
</code>
|
|
457
461
|
</pre>
|
|
458
|
-
|
|
462
|
+
</>
|
|
459
463
|
),
|
|
460
464
|
before: [
|
|
461
465
|
{ type: 'click', selector: workbenchXPath.closePanelButton },
|
package/dist/esm/cli.js
CHANGED
|
@@ -24,7 +24,6 @@ program
|
|
|
24
24
|
.option('-t, --template <template>', 'The template to use for your project')
|
|
25
25
|
.option('-p, --plugin', 'Create a plugin project')
|
|
26
26
|
.option('-i, --interactive', 'Use interactive prompts to create project') // it's default
|
|
27
|
-
.option('-c, --confirm', 'Confirm the project creation', false)
|
|
28
27
|
.action((projectName, options) => {
|
|
29
28
|
const mergedArgs = { ...options, name: projectName };
|
|
30
29
|
return handler(async (arg, context) => {
|
|
@@ -33,7 +32,6 @@ program
|
|
|
33
32
|
name: arg.name,
|
|
34
33
|
template: arg.template,
|
|
35
34
|
plugin: !!arg.plugin,
|
|
36
|
-
confirm: !!arg.confirm,
|
|
37
35
|
}, context);
|
|
38
36
|
})(mergedArgs);
|
|
39
37
|
});
|
package/dist/esm/create/index.js
CHANGED
|
@@ -20,7 +20,7 @@ const installRequiredDependencies = async (packageManager, rootDir, context) =>
|
|
|
20
20
|
yarn: 'yarn add',
|
|
21
21
|
pnpm: 'pnpm add',
|
|
22
22
|
}[packageManager];
|
|
23
|
-
const dependencies = [`motia@${version}`, 'zod@
|
|
23
|
+
const dependencies = [`motia@${version}`, 'zod@3.24.4', ...pluginDependencies.map((dep) => `${dep}@${version}`)].join(' ');
|
|
24
24
|
const devDependencies = ['ts-node@10.9.2', 'typescript@5.7.3', '@types/react@19.1.1'].join(' ');
|
|
25
25
|
try {
|
|
26
26
|
await executeCommand(`${installCommand} ${dependencies}`, rootDir);
|
|
@@ -54,20 +54,8 @@ export const createInteractive = async (args, context) => {
|
|
|
54
54
|
filter: (input) => input.trim(),
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
-
if (!args.confirm) {
|
|
58
|
-
questions.push({
|
|
59
|
-
type: 'confirm',
|
|
60
|
-
name: 'proceed',
|
|
61
|
-
message: 'Proceed? [Y/n]:',
|
|
62
|
-
default: true,
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
57
|
if (questions.length > 0) {
|
|
66
58
|
const answers = await inquirer.prompt(questions);
|
|
67
|
-
if (!args.confirm && !answers.proceed) {
|
|
68
|
-
context.log('cancelled', (message) => message.tag('info').append('\nā Project creation cancelled.'));
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
59
|
name = args.name || answers.projectName;
|
|
72
60
|
template = args.template || answers.template;
|
|
73
61
|
}
|
|
@@ -432,15 +432,19 @@ export const steps: TutorialStep[] = [
|
|
|
432
432
|
elementXpath: workbenchXPath.endpoints.callPanel,
|
|
433
433
|
title: 'API Endpoint Test',
|
|
434
434
|
description: () => (
|
|
435
|
-
|
|
436
|
-
|
|
435
|
+
<>
|
|
436
|
+
<p>
|
|
437
|
+
This form will allow you to validate your API Step by executing an HTTP request against your API endpoint.
|
|
438
|
+
</p>
|
|
437
439
|
<br />
|
|
438
440
|
<br />
|
|
439
|
-
You can also test your API endpoints using your terminal through the curl command
|
|
441
|
+
<p>You can also test your API endpoints using your terminal through the curl command.</p>
|
|
440
442
|
<br />
|
|
441
443
|
<br />
|
|
442
|
-
|
|
443
|
-
|
|
444
|
+
<p>
|
|
445
|
+
š” Thanks to the <b>bodySchema</b> attribute from the API Step config, you are automatically provided with a
|
|
446
|
+
sample request payload.
|
|
447
|
+
</p>
|
|
444
448
|
<br />
|
|
445
449
|
<br />
|
|
446
450
|
<pre className="code-preview">
|
|
@@ -455,7 +459,7 @@ export const steps: TutorialStep[] = [
|
|
|
455
459
|
'
|
|
456
460
|
</code>
|
|
457
461
|
</pre>
|
|
458
|
-
|
|
462
|
+
</>
|
|
459
463
|
),
|
|
460
464
|
before: [
|
|
461
465
|
{ type: 'click', selector: workbenchXPath.closePanelButton },
|
|
@@ -432,15 +432,19 @@ export const steps: TutorialStep[] = [
|
|
|
432
432
|
elementXpath: workbenchXPath.endpoints.callPanel,
|
|
433
433
|
title: 'API Endpoint Test',
|
|
434
434
|
description: () => (
|
|
435
|
-
|
|
436
|
-
|
|
435
|
+
<>
|
|
436
|
+
<p>
|
|
437
|
+
This form will allow you to validate your API Step by executing an HTTP request against your API endpoint.
|
|
438
|
+
</p>
|
|
437
439
|
<br />
|
|
438
440
|
<br />
|
|
439
|
-
You can also test your API endpoints using your terminal through the curl command
|
|
441
|
+
<p>You can also test your API endpoints using your terminal through the curl command.</p>
|
|
440
442
|
<br />
|
|
441
443
|
<br />
|
|
442
|
-
|
|
443
|
-
|
|
444
|
+
<p>
|
|
445
|
+
š” Thanks to the <b>bodySchema</b> attribute from the API Step config, you are automatically provided with a
|
|
446
|
+
sample request payload.
|
|
447
|
+
</p>
|
|
444
448
|
<br />
|
|
445
449
|
<br />
|
|
446
450
|
<pre className="code-preview">
|
|
@@ -455,7 +459,7 @@ export const steps: TutorialStep[] = [
|
|
|
455
459
|
'
|
|
456
460
|
</code>
|
|
457
461
|
</pre>
|
|
458
|
-
|
|
462
|
+
</>
|
|
459
463
|
),
|
|
460
464
|
before: [
|
|
461
465
|
{ type: 'click', selector: workbenchXPath.closePanelButton },
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "motia",
|
|
3
3
|
"description": "A Modern Unified Backend Framework for APIs, Events and Agents",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.5-beta.151",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"python-ast": "^0.1.0",
|
|
47
47
|
"table": "^6.9.0",
|
|
48
48
|
"ts-node": "^10.9.2",
|
|
49
|
-
"@motiadev/core": "0.9.
|
|
50
|
-
"@motiadev/
|
|
51
|
-
"@motiadev/
|
|
49
|
+
"@motiadev/core": "0.9.5-beta.151",
|
|
50
|
+
"@motiadev/stream-client-node": "0.9.5-beta.151",
|
|
51
|
+
"@motiadev/workbench": "0.9.5-beta.151"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@amplitude/analytics-types": "^2.9.2",
|