motia 0.9.1-beta.146 → 0.9.1-beta.147-326333
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/index.js +15 -21
- package/dist/cjs/create/templates/hello/steps/hello/process-greeting.step.ts.txt +0 -2
- package/dist/cjs/create/templates/hello_js/steps/hello/process-greeting.step.js.txt +0 -2
- package/dist/cjs/create/templates/hello_python/steps/hello/process_greeting_step.py.txt +0 -3
- package/dist/cjs/create/templates/nodejs/src/services/pet-store/create-order.ts.txt +1 -1
- package/dist/cjs/create/templates/nodejs/steps/petstore/process-food-order.step.ts.txt +1 -0
- package/dist/cjs/create/templates/nodejs/tutorial/tutorial.tsx.txt +8 -8
- package/dist/cjs/create/templates/python/tutorial/tutorial.tsx.txt +8 -8
- package/dist/esm/create/index.js +15 -21
- package/dist/esm/create/templates/hello/steps/hello/process-greeting.step.ts.txt +0 -2
- package/dist/esm/create/templates/hello_js/steps/hello/process-greeting.step.js.txt +0 -2
- package/dist/esm/create/templates/hello_python/steps/hello/process_greeting_step.py.txt +0 -3
- package/dist/esm/create/templates/nodejs/src/services/pet-store/create-order.ts.txt +1 -1
- package/dist/esm/create/templates/nodejs/steps/petstore/process-food-order.step.ts.txt +1 -0
- package/dist/esm/create/templates/nodejs/tutorial/tutorial.tsx.txt +8 -8
- package/dist/esm/create/templates/python/tutorial/tutorial.tsx.txt +8 -8
- package/package.json +4 -4
package/dist/cjs/create/index.js
CHANGED
|
@@ -27,15 +27,7 @@ const installRequiredDependencies = async (packageManager, rootDir, context) =>
|
|
|
27
27
|
pnpm: 'pnpm add',
|
|
28
28
|
}[packageManager];
|
|
29
29
|
const dependencies = [`motia@${version_1.version}`, 'zod@3.24.4', ...plugin_dependencies_1.pluginDependencies.map((dep) => `${dep}@${version_1.version}`)].join(' ');
|
|
30
|
-
const devDependencies = [
|
|
31
|
-
'ts-node@10.9.2',
|
|
32
|
-
'typescript@5.7.3',
|
|
33
|
-
'@types/react@19.1.1',
|
|
34
|
-
'@jest/globals@^29.7.0',
|
|
35
|
-
'@types/jest@^29.5.14',
|
|
36
|
-
'jest@^29.7.0',
|
|
37
|
-
'ts-jest@^29.2.5',
|
|
38
|
-
].join(' ');
|
|
30
|
+
const devDependencies = ['ts-node@10.9.2', 'typescript@5.7.3', '@types/react@19.1.1'].join(' ');
|
|
39
31
|
try {
|
|
40
32
|
await (0, execute_command_1.executeCommand)(`${installCommand} ${dependencies}`, rootDir);
|
|
41
33
|
await (0, execute_command_1.executeCommand)(`${installCommand} -D ${devDependencies}`, rootDir);
|
|
@@ -65,15 +57,6 @@ const installNodeDependencies = async (rootDir, context) => {
|
|
|
65
57
|
});
|
|
66
58
|
return packageManager;
|
|
67
59
|
};
|
|
68
|
-
const wrapUp = async (context, packageManager, isPlugin = false) => {
|
|
69
|
-
context.log('project-setup-completed', (message) => message.tag('success').append('Project setup completed, happy coding!'));
|
|
70
|
-
if (isPlugin) {
|
|
71
|
-
context.log('package-manager-used', (message) => message.tag('info').append('To build the plugin, run').append(`${packageManager} run build`, 'gray'));
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
context.log('package-manager-used', (message) => message.tag('info').append('To start the development server, run').append(`${packageManager} run dev`, 'gray'));
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
60
|
const create = async ({ projectName, template, cursorEnabled, context }) => {
|
|
78
61
|
console.log('\n\n' +
|
|
79
62
|
`
|
|
@@ -188,7 +171,7 @@ const create = async ({ projectName, template, cursorEnabled, context }) => {
|
|
|
188
171
|
let packageManager;
|
|
189
172
|
if (!isPluginTemplate) {
|
|
190
173
|
packageManager = await installNodeDependencies(rootDir, context);
|
|
191
|
-
if (template
|
|
174
|
+
if (template.includes('python')) {
|
|
192
175
|
await (0, install_1.pythonInstall)({ baseDir: rootDir });
|
|
193
176
|
}
|
|
194
177
|
await (0, generate_types_1.generateTypes)(rootDir);
|
|
@@ -197,7 +180,18 @@ const create = async ({ projectName, template, cursorEnabled, context }) => {
|
|
|
197
180
|
// For plugin template, just detect the package manager
|
|
198
181
|
packageManager = await preparePackageManager(rootDir, context);
|
|
199
182
|
}
|
|
200
|
-
|
|
201
|
-
|
|
183
|
+
context.log('project-setup-completed', (message) => message.tag('success').append('All set! Your project is ready to go.'));
|
|
184
|
+
context.log('project-location', (message) => message
|
|
185
|
+
.tag('success')
|
|
186
|
+
.append('Created at')
|
|
187
|
+
.append(`./${path_1.default.basename(rootDir)}`, 'cyan')
|
|
188
|
+
.append('- happy coding!'));
|
|
189
|
+
context.log('starting-development-server-command', (message) => message
|
|
190
|
+
.tag('info')
|
|
191
|
+
.append('Next steps:')
|
|
192
|
+
.append(`cd ${path_1.default.basename(rootDir)}`, 'gray')
|
|
193
|
+
.append('then run', 'dark')
|
|
194
|
+
.append(`${packageManager} run dev`, 'gray')
|
|
195
|
+
.append('to start the development server.', 'dark'));
|
|
202
196
|
};
|
|
203
197
|
exports.create = create;
|
|
@@ -25,8 +25,6 @@ export const handler: Handlers['ProcessGreeting'] = async (input, { logger, stat
|
|
|
25
25
|
|
|
26
26
|
const greeting = `${greetingPrefix} ${appName}!`;
|
|
27
27
|
|
|
28
|
-
await new Promise(resolve => setTimeout(resolve, 2000)); // Simulate background processing
|
|
29
|
-
|
|
30
28
|
// Store result in state (demonstrates state usage)
|
|
31
29
|
// Note: The state.set method takes (groupId, key, value)
|
|
32
30
|
await state.set('greetings', requestId, {
|
|
@@ -24,8 +24,6 @@ const handler = async (input, { logger, state }) => {
|
|
|
24
24
|
|
|
25
25
|
const greeting = `${greetingPrefix} ${appName}!`;
|
|
26
26
|
|
|
27
|
-
await new Promise(resolve => setTimeout(resolve, 2000)); // Simulate background processing
|
|
28
|
-
|
|
29
27
|
// Store result in state (demonstrates state usage)
|
|
30
28
|
// Note: The state.set method takes (groupId, key, value)
|
|
31
29
|
await state.set('greetings', requestId, {
|
|
@@ -50,9 +50,6 @@ async def handler(input_data, context):
|
|
|
50
50
|
|
|
51
51
|
greeting = f"{greeting_prefix} {app_name}!"
|
|
52
52
|
|
|
53
|
-
# Simulate background processing
|
|
54
|
-
await asyncio.sleep(2)
|
|
55
|
-
|
|
56
53
|
# Store result in state (demonstrates state usage)
|
|
57
54
|
# Note: The state.set method takes (groupId, key, value)
|
|
58
55
|
await context.state.set("greetings", request_id, {
|
|
@@ -5,7 +5,7 @@ export const createOrder = async (order: Omit<Order, 'id'>): Promise<Order> => {
|
|
|
5
5
|
method: 'POST',
|
|
6
6
|
body: JSON.stringify({
|
|
7
7
|
quantity: order?.quantity ?? 1,
|
|
8
|
-
petId: 1,
|
|
8
|
+
petId: order?.petId ?? 1,
|
|
9
9
|
shipDate: order?.shipDate ?? new Date().toISOString(),
|
|
10
10
|
status: order?.status ?? 'placed',
|
|
11
11
|
}),
|
|
@@ -29,7 +29,7 @@ export const steps: TutorialStep[] = [
|
|
|
29
29
|
{
|
|
30
30
|
elementXpath: workbenchXPath.flows.node('apitrigger'),
|
|
31
31
|
title: 'API Step',
|
|
32
|
-
link: 'https://www.motia.dev/docs/concepts/steps
|
|
32
|
+
link: 'https://www.motia.dev/docs/concepts/steps#api-trigger',
|
|
33
33
|
description: () => (
|
|
34
34
|
<p>
|
|
35
35
|
Let's evaluate the Step that will allow you to receive traffic from external applications, API Steps will allow
|
|
@@ -103,7 +103,7 @@ export const steps: TutorialStep[] = [
|
|
|
103
103
|
{
|
|
104
104
|
elementXpath: workbenchXPath.sidebarContainer,
|
|
105
105
|
title: 'Request Body',
|
|
106
|
-
link: 'https://zod.dev',
|
|
106
|
+
link: 'https://zod.dev/api',
|
|
107
107
|
description: () => (
|
|
108
108
|
<p>
|
|
109
109
|
The <b>bodySchema</b> attribute will define the shape of the request body.
|
|
@@ -117,7 +117,7 @@ export const steps: TutorialStep[] = [
|
|
|
117
117
|
{
|
|
118
118
|
elementXpath: workbenchXPath.sidebarContainer,
|
|
119
119
|
title: 'Response Payload',
|
|
120
|
-
link: 'https://zod.dev',
|
|
120
|
+
link: 'https://zod.dev/api',
|
|
121
121
|
description: () => (
|
|
122
122
|
<p>
|
|
123
123
|
Through the <b>responseSchema</b> attribute you can declare the different type of http responses based on the
|
|
@@ -202,7 +202,7 @@ export const steps: TutorialStep[] = [
|
|
|
202
202
|
{
|
|
203
203
|
elementXpath: workbenchXPath.flows.node('processfoodorder'),
|
|
204
204
|
title: 'Event Step',
|
|
205
|
-
link: 'https://www.motia.dev/docs/concepts/steps
|
|
205
|
+
link: 'https://www.motia.dev/docs/concepts/steps#event-trigger',
|
|
206
206
|
description: () => (
|
|
207
207
|
<p>
|
|
208
208
|
Now that we have an entry point in our flow, let's focus on subscribing to a <b>topic</b> and performing a
|
|
@@ -224,7 +224,7 @@ export const steps: TutorialStep[] = [
|
|
|
224
224
|
{
|
|
225
225
|
elementXpath: workbenchXPath.sidebarContainer,
|
|
226
226
|
title: 'Event Step',
|
|
227
|
-
link: 'https://www.motia.dev/docs/concepts/steps
|
|
227
|
+
link: 'https://www.motia.dev/docs/concepts/steps#event-trigger',
|
|
228
228
|
description: () => (
|
|
229
229
|
<p>
|
|
230
230
|
Now that we have an entry point in our flow, let's focus on subscribing to a <b>topic</b> and performing a
|
|
@@ -283,7 +283,7 @@ export const steps: TutorialStep[] = [
|
|
|
283
283
|
{
|
|
284
284
|
elementXpath: workbenchXPath.sidebarContainer,
|
|
285
285
|
title: 'Storing Data in State',
|
|
286
|
-
link: 'https://www.motia.dev/docs/
|
|
286
|
+
link: 'https://www.motia.dev/docs/development-guide/state-management',
|
|
287
287
|
description: () => (
|
|
288
288
|
<p>
|
|
289
289
|
Let's take a closer look at storing data in state.
|
|
@@ -301,7 +301,7 @@ export const steps: TutorialStep[] = [
|
|
|
301
301
|
{
|
|
302
302
|
elementXpath: workbenchXPath.flows.node('stateauditjob'),
|
|
303
303
|
title: 'Cron Step',
|
|
304
|
-
link: 'https://www.motia.dev/docs/concepts/steps
|
|
304
|
+
link: 'https://www.motia.dev/docs/concepts/steps#cron-trigger',
|
|
305
305
|
description: () => (
|
|
306
306
|
<p>
|
|
307
307
|
Let's do a recap of what you've learned, thus far you've become familiar with two Step types <b>API</b>{' '}
|
|
@@ -317,7 +317,7 @@ export const steps: TutorialStep[] = [
|
|
|
317
317
|
{
|
|
318
318
|
elementXpath: workbenchXPath.sidebarContainer,
|
|
319
319
|
title: 'Cron Schedule',
|
|
320
|
-
link: 'https://www.motia.dev/docs/concepts/steps
|
|
320
|
+
link: 'https://www.motia.dev/docs/concepts/steps#cron-trigger',
|
|
321
321
|
description: () => (
|
|
322
322
|
<p>
|
|
323
323
|
<b>CRON</b> Steps are similar to the other Step types, they are composed by a configuration and a handler.
|
|
@@ -29,7 +29,7 @@ export const steps: TutorialStep[] = [
|
|
|
29
29
|
{
|
|
30
30
|
elementXpath: workbenchXPath.flows.node('apitrigger'),
|
|
31
31
|
title: 'API Step',
|
|
32
|
-
link: 'https://www.motia.dev/docs/concepts/steps
|
|
32
|
+
link: 'https://www.motia.dev/docs/concepts/steps#api-trigger',
|
|
33
33
|
description: () => (
|
|
34
34
|
<p>
|
|
35
35
|
Let's evaluate the Step that will allow you to receive traffic from external applications, API Steps will allow
|
|
@@ -103,7 +103,7 @@ export const steps: TutorialStep[] = [
|
|
|
103
103
|
{
|
|
104
104
|
elementXpath: workbenchXPath.sidebarContainer,
|
|
105
105
|
title: 'Request Body',
|
|
106
|
-
link: 'https://zod.dev',
|
|
106
|
+
link: 'https://zod.dev/api',
|
|
107
107
|
description: () => (
|
|
108
108
|
<p>
|
|
109
109
|
The <b>bodySchema</b> attribute will define the shape of the request body.
|
|
@@ -117,7 +117,7 @@ export const steps: TutorialStep[] = [
|
|
|
117
117
|
{
|
|
118
118
|
elementXpath: workbenchXPath.sidebarContainer,
|
|
119
119
|
title: 'Response Payload',
|
|
120
|
-
link: 'https://zod.dev',
|
|
120
|
+
link: 'https://zod.dev/api',
|
|
121
121
|
description: () => (
|
|
122
122
|
<p>
|
|
123
123
|
Through the <b>responseSchema</b> attribute you can declare the different type of http responses based on the
|
|
@@ -202,7 +202,7 @@ export const steps: TutorialStep[] = [
|
|
|
202
202
|
{
|
|
203
203
|
elementXpath: workbenchXPath.flows.node('processfoodorder'),
|
|
204
204
|
title: 'Event Step',
|
|
205
|
-
link: 'https://www.motia.dev/docs/concepts/steps
|
|
205
|
+
link: 'https://www.motia.dev/docs/concepts/steps#event-trigger',
|
|
206
206
|
description: () => (
|
|
207
207
|
<p>
|
|
208
208
|
Now that we have an entry point in our flow, let's focus on subscribing to a <b>topic</b> and performing a
|
|
@@ -224,7 +224,7 @@ export const steps: TutorialStep[] = [
|
|
|
224
224
|
{
|
|
225
225
|
elementXpath: workbenchXPath.sidebarContainer,
|
|
226
226
|
title: 'Event Step',
|
|
227
|
-
link: 'https://www.motia.dev/docs/concepts/steps
|
|
227
|
+
link: 'https://www.motia.dev/docs/concepts/steps#event-trigger',
|
|
228
228
|
description: () => (
|
|
229
229
|
<p>
|
|
230
230
|
Now that we have an entry point in our flow, let's focus on subscribing to a <b>topic</b> and performing a
|
|
@@ -283,7 +283,7 @@ export const steps: TutorialStep[] = [
|
|
|
283
283
|
{
|
|
284
284
|
elementXpath: workbenchXPath.sidebarContainer,
|
|
285
285
|
title: 'Storing Data in State',
|
|
286
|
-
link: 'https://www.motia.dev/docs/
|
|
286
|
+
link: 'https://www.motia.dev/docs/development-guide/state-management',
|
|
287
287
|
description: () => (
|
|
288
288
|
<p>
|
|
289
289
|
Let's take a closer look at storing data in state.
|
|
@@ -301,7 +301,7 @@ export const steps: TutorialStep[] = [
|
|
|
301
301
|
{
|
|
302
302
|
elementXpath: workbenchXPath.flows.node('stateauditjob'),
|
|
303
303
|
title: 'Cron Step',
|
|
304
|
-
link: 'https://www.motia.dev/docs/concepts/steps
|
|
304
|
+
link: 'https://www.motia.dev/docs/concepts/steps#cron-trigger',
|
|
305
305
|
description: () => (
|
|
306
306
|
<p>
|
|
307
307
|
Let's do a recap of what you've learned. Thus far, you've become familiar with two Step types: <b>API</b>{' '}
|
|
@@ -317,7 +317,7 @@ export const steps: TutorialStep[] = [
|
|
|
317
317
|
{
|
|
318
318
|
elementXpath: workbenchXPath.sidebarContainer,
|
|
319
319
|
title: 'Cron Schedule',
|
|
320
|
-
link: 'https://www.motia.dev/docs/concepts/steps
|
|
320
|
+
link: 'https://www.motia.dev/docs/concepts/steps#cron-trigger',
|
|
321
321
|
description: () => (
|
|
322
322
|
<p>
|
|
323
323
|
<b>CRON</b> Steps are similar to the other Step types, they are composed by a configuration and a handler.
|
package/dist/esm/create/index.js
CHANGED
|
@@ -21,15 +21,7 @@ const installRequiredDependencies = async (packageManager, rootDir, context) =>
|
|
|
21
21
|
pnpm: 'pnpm add',
|
|
22
22
|
}[packageManager];
|
|
23
23
|
const dependencies = [`motia@${version}`, 'zod@3.24.4', ...pluginDependencies.map((dep) => `${dep}@${version}`)].join(' ');
|
|
24
|
-
const devDependencies = [
|
|
25
|
-
'ts-node@10.9.2',
|
|
26
|
-
'typescript@5.7.3',
|
|
27
|
-
'@types/react@19.1.1',
|
|
28
|
-
'@jest/globals@^29.7.0',
|
|
29
|
-
'@types/jest@^29.5.14',
|
|
30
|
-
'jest@^29.7.0',
|
|
31
|
-
'ts-jest@^29.2.5',
|
|
32
|
-
].join(' ');
|
|
24
|
+
const devDependencies = ['ts-node@10.9.2', 'typescript@5.7.3', '@types/react@19.1.1'].join(' ');
|
|
33
25
|
try {
|
|
34
26
|
await executeCommand(`${installCommand} ${dependencies}`, rootDir);
|
|
35
27
|
await executeCommand(`${installCommand} -D ${devDependencies}`, rootDir);
|
|
@@ -59,15 +51,6 @@ const installNodeDependencies = async (rootDir, context) => {
|
|
|
59
51
|
});
|
|
60
52
|
return packageManager;
|
|
61
53
|
};
|
|
62
|
-
const wrapUp = async (context, packageManager, isPlugin = false) => {
|
|
63
|
-
context.log('project-setup-completed', (message) => message.tag('success').append('Project setup completed, happy coding!'));
|
|
64
|
-
if (isPlugin) {
|
|
65
|
-
context.log('package-manager-used', (message) => message.tag('info').append('To build the plugin, run').append(`${packageManager} run build`, 'gray'));
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
context.log('package-manager-used', (message) => message.tag('info').append('To start the development server, run').append(`${packageManager} run dev`, 'gray'));
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
54
|
export const create = async ({ projectName, template, cursorEnabled, context }) => {
|
|
72
55
|
console.log('\n\n' +
|
|
73
56
|
`
|
|
@@ -182,7 +165,7 @@ export const create = async ({ projectName, template, cursorEnabled, context })
|
|
|
182
165
|
let packageManager;
|
|
183
166
|
if (!isPluginTemplate) {
|
|
184
167
|
packageManager = await installNodeDependencies(rootDir, context);
|
|
185
|
-
if (template
|
|
168
|
+
if (template.includes('python')) {
|
|
186
169
|
await pythonInstall({ baseDir: rootDir });
|
|
187
170
|
}
|
|
188
171
|
await generateTypes(rootDir);
|
|
@@ -191,6 +174,17 @@ export const create = async ({ projectName, template, cursorEnabled, context })
|
|
|
191
174
|
// For plugin template, just detect the package manager
|
|
192
175
|
packageManager = await preparePackageManager(rootDir, context);
|
|
193
176
|
}
|
|
194
|
-
|
|
195
|
-
|
|
177
|
+
context.log('project-setup-completed', (message) => message.tag('success').append('All set! Your project is ready to go.'));
|
|
178
|
+
context.log('project-location', (message) => message
|
|
179
|
+
.tag('success')
|
|
180
|
+
.append('Created at')
|
|
181
|
+
.append(`./${path.basename(rootDir)}`, 'cyan')
|
|
182
|
+
.append('- happy coding!'));
|
|
183
|
+
context.log('starting-development-server-command', (message) => message
|
|
184
|
+
.tag('info')
|
|
185
|
+
.append('Next steps:')
|
|
186
|
+
.append(`cd ${path.basename(rootDir)}`, 'gray')
|
|
187
|
+
.append('then run', 'dark')
|
|
188
|
+
.append(`${packageManager} run dev`, 'gray')
|
|
189
|
+
.append('to start the development server.', 'dark'));
|
|
196
190
|
};
|
|
@@ -25,8 +25,6 @@ export const handler: Handlers['ProcessGreeting'] = async (input, { logger, stat
|
|
|
25
25
|
|
|
26
26
|
const greeting = `${greetingPrefix} ${appName}!`;
|
|
27
27
|
|
|
28
|
-
await new Promise(resolve => setTimeout(resolve, 2000)); // Simulate background processing
|
|
29
|
-
|
|
30
28
|
// Store result in state (demonstrates state usage)
|
|
31
29
|
// Note: The state.set method takes (groupId, key, value)
|
|
32
30
|
await state.set('greetings', requestId, {
|
|
@@ -24,8 +24,6 @@ const handler = async (input, { logger, state }) => {
|
|
|
24
24
|
|
|
25
25
|
const greeting = `${greetingPrefix} ${appName}!`;
|
|
26
26
|
|
|
27
|
-
await new Promise(resolve => setTimeout(resolve, 2000)); // Simulate background processing
|
|
28
|
-
|
|
29
27
|
// Store result in state (demonstrates state usage)
|
|
30
28
|
// Note: The state.set method takes (groupId, key, value)
|
|
31
29
|
await state.set('greetings', requestId, {
|
|
@@ -50,9 +50,6 @@ async def handler(input_data, context):
|
|
|
50
50
|
|
|
51
51
|
greeting = f"{greeting_prefix} {app_name}!"
|
|
52
52
|
|
|
53
|
-
# Simulate background processing
|
|
54
|
-
await asyncio.sleep(2)
|
|
55
|
-
|
|
56
53
|
# Store result in state (demonstrates state usage)
|
|
57
54
|
# Note: The state.set method takes (groupId, key, value)
|
|
58
55
|
await context.state.set("greetings", request_id, {
|
|
@@ -5,7 +5,7 @@ export const createOrder = async (order: Omit<Order, 'id'>): Promise<Order> => {
|
|
|
5
5
|
method: 'POST',
|
|
6
6
|
body: JSON.stringify({
|
|
7
7
|
quantity: order?.quantity ?? 1,
|
|
8
|
-
petId: 1,
|
|
8
|
+
petId: order?.petId ?? 1,
|
|
9
9
|
shipDate: order?.shipDate ?? new Date().toISOString(),
|
|
10
10
|
status: order?.status ?? 'placed',
|
|
11
11
|
}),
|
|
@@ -29,7 +29,7 @@ export const steps: TutorialStep[] = [
|
|
|
29
29
|
{
|
|
30
30
|
elementXpath: workbenchXPath.flows.node('apitrigger'),
|
|
31
31
|
title: 'API Step',
|
|
32
|
-
link: 'https://www.motia.dev/docs/concepts/steps
|
|
32
|
+
link: 'https://www.motia.dev/docs/concepts/steps#api-trigger',
|
|
33
33
|
description: () => (
|
|
34
34
|
<p>
|
|
35
35
|
Let's evaluate the Step that will allow you to receive traffic from external applications, API Steps will allow
|
|
@@ -103,7 +103,7 @@ export const steps: TutorialStep[] = [
|
|
|
103
103
|
{
|
|
104
104
|
elementXpath: workbenchXPath.sidebarContainer,
|
|
105
105
|
title: 'Request Body',
|
|
106
|
-
link: 'https://zod.dev',
|
|
106
|
+
link: 'https://zod.dev/api',
|
|
107
107
|
description: () => (
|
|
108
108
|
<p>
|
|
109
109
|
The <b>bodySchema</b> attribute will define the shape of the request body.
|
|
@@ -117,7 +117,7 @@ export const steps: TutorialStep[] = [
|
|
|
117
117
|
{
|
|
118
118
|
elementXpath: workbenchXPath.sidebarContainer,
|
|
119
119
|
title: 'Response Payload',
|
|
120
|
-
link: 'https://zod.dev',
|
|
120
|
+
link: 'https://zod.dev/api',
|
|
121
121
|
description: () => (
|
|
122
122
|
<p>
|
|
123
123
|
Through the <b>responseSchema</b> attribute you can declare the different type of http responses based on the
|
|
@@ -202,7 +202,7 @@ export const steps: TutorialStep[] = [
|
|
|
202
202
|
{
|
|
203
203
|
elementXpath: workbenchXPath.flows.node('processfoodorder'),
|
|
204
204
|
title: 'Event Step',
|
|
205
|
-
link: 'https://www.motia.dev/docs/concepts/steps
|
|
205
|
+
link: 'https://www.motia.dev/docs/concepts/steps#event-trigger',
|
|
206
206
|
description: () => (
|
|
207
207
|
<p>
|
|
208
208
|
Now that we have an entry point in our flow, let's focus on subscribing to a <b>topic</b> and performing a
|
|
@@ -224,7 +224,7 @@ export const steps: TutorialStep[] = [
|
|
|
224
224
|
{
|
|
225
225
|
elementXpath: workbenchXPath.sidebarContainer,
|
|
226
226
|
title: 'Event Step',
|
|
227
|
-
link: 'https://www.motia.dev/docs/concepts/steps
|
|
227
|
+
link: 'https://www.motia.dev/docs/concepts/steps#event-trigger',
|
|
228
228
|
description: () => (
|
|
229
229
|
<p>
|
|
230
230
|
Now that we have an entry point in our flow, let's focus on subscribing to a <b>topic</b> and performing a
|
|
@@ -283,7 +283,7 @@ export const steps: TutorialStep[] = [
|
|
|
283
283
|
{
|
|
284
284
|
elementXpath: workbenchXPath.sidebarContainer,
|
|
285
285
|
title: 'Storing Data in State',
|
|
286
|
-
link: 'https://www.motia.dev/docs/
|
|
286
|
+
link: 'https://www.motia.dev/docs/development-guide/state-management',
|
|
287
287
|
description: () => (
|
|
288
288
|
<p>
|
|
289
289
|
Let's take a closer look at storing data in state.
|
|
@@ -301,7 +301,7 @@ export const steps: TutorialStep[] = [
|
|
|
301
301
|
{
|
|
302
302
|
elementXpath: workbenchXPath.flows.node('stateauditjob'),
|
|
303
303
|
title: 'Cron Step',
|
|
304
|
-
link: 'https://www.motia.dev/docs/concepts/steps
|
|
304
|
+
link: 'https://www.motia.dev/docs/concepts/steps#cron-trigger',
|
|
305
305
|
description: () => (
|
|
306
306
|
<p>
|
|
307
307
|
Let's do a recap of what you've learned, thus far you've become familiar with two Step types <b>API</b>{' '}
|
|
@@ -317,7 +317,7 @@ export const steps: TutorialStep[] = [
|
|
|
317
317
|
{
|
|
318
318
|
elementXpath: workbenchXPath.sidebarContainer,
|
|
319
319
|
title: 'Cron Schedule',
|
|
320
|
-
link: 'https://www.motia.dev/docs/concepts/steps
|
|
320
|
+
link: 'https://www.motia.dev/docs/concepts/steps#cron-trigger',
|
|
321
321
|
description: () => (
|
|
322
322
|
<p>
|
|
323
323
|
<b>CRON</b> Steps are similar to the other Step types, they are composed by a configuration and a handler.
|
|
@@ -29,7 +29,7 @@ export const steps: TutorialStep[] = [
|
|
|
29
29
|
{
|
|
30
30
|
elementXpath: workbenchXPath.flows.node('apitrigger'),
|
|
31
31
|
title: 'API Step',
|
|
32
|
-
link: 'https://www.motia.dev/docs/concepts/steps
|
|
32
|
+
link: 'https://www.motia.dev/docs/concepts/steps#api-trigger',
|
|
33
33
|
description: () => (
|
|
34
34
|
<p>
|
|
35
35
|
Let's evaluate the Step that will allow you to receive traffic from external applications, API Steps will allow
|
|
@@ -103,7 +103,7 @@ export const steps: TutorialStep[] = [
|
|
|
103
103
|
{
|
|
104
104
|
elementXpath: workbenchXPath.sidebarContainer,
|
|
105
105
|
title: 'Request Body',
|
|
106
|
-
link: 'https://zod.dev',
|
|
106
|
+
link: 'https://zod.dev/api',
|
|
107
107
|
description: () => (
|
|
108
108
|
<p>
|
|
109
109
|
The <b>bodySchema</b> attribute will define the shape of the request body.
|
|
@@ -117,7 +117,7 @@ export const steps: TutorialStep[] = [
|
|
|
117
117
|
{
|
|
118
118
|
elementXpath: workbenchXPath.sidebarContainer,
|
|
119
119
|
title: 'Response Payload',
|
|
120
|
-
link: 'https://zod.dev',
|
|
120
|
+
link: 'https://zod.dev/api',
|
|
121
121
|
description: () => (
|
|
122
122
|
<p>
|
|
123
123
|
Through the <b>responseSchema</b> attribute you can declare the different type of http responses based on the
|
|
@@ -202,7 +202,7 @@ export const steps: TutorialStep[] = [
|
|
|
202
202
|
{
|
|
203
203
|
elementXpath: workbenchXPath.flows.node('processfoodorder'),
|
|
204
204
|
title: 'Event Step',
|
|
205
|
-
link: 'https://www.motia.dev/docs/concepts/steps
|
|
205
|
+
link: 'https://www.motia.dev/docs/concepts/steps#event-trigger',
|
|
206
206
|
description: () => (
|
|
207
207
|
<p>
|
|
208
208
|
Now that we have an entry point in our flow, let's focus on subscribing to a <b>topic</b> and performing a
|
|
@@ -224,7 +224,7 @@ export const steps: TutorialStep[] = [
|
|
|
224
224
|
{
|
|
225
225
|
elementXpath: workbenchXPath.sidebarContainer,
|
|
226
226
|
title: 'Event Step',
|
|
227
|
-
link: 'https://www.motia.dev/docs/concepts/steps
|
|
227
|
+
link: 'https://www.motia.dev/docs/concepts/steps#event-trigger',
|
|
228
228
|
description: () => (
|
|
229
229
|
<p>
|
|
230
230
|
Now that we have an entry point in our flow, let's focus on subscribing to a <b>topic</b> and performing a
|
|
@@ -283,7 +283,7 @@ export const steps: TutorialStep[] = [
|
|
|
283
283
|
{
|
|
284
284
|
elementXpath: workbenchXPath.sidebarContainer,
|
|
285
285
|
title: 'Storing Data in State',
|
|
286
|
-
link: 'https://www.motia.dev/docs/
|
|
286
|
+
link: 'https://www.motia.dev/docs/development-guide/state-management',
|
|
287
287
|
description: () => (
|
|
288
288
|
<p>
|
|
289
289
|
Let's take a closer look at storing data in state.
|
|
@@ -301,7 +301,7 @@ export const steps: TutorialStep[] = [
|
|
|
301
301
|
{
|
|
302
302
|
elementXpath: workbenchXPath.flows.node('stateauditjob'),
|
|
303
303
|
title: 'Cron Step',
|
|
304
|
-
link: 'https://www.motia.dev/docs/concepts/steps
|
|
304
|
+
link: 'https://www.motia.dev/docs/concepts/steps#cron-trigger',
|
|
305
305
|
description: () => (
|
|
306
306
|
<p>
|
|
307
307
|
Let's do a recap of what you've learned. Thus far, you've become familiar with two Step types: <b>API</b>{' '}
|
|
@@ -317,7 +317,7 @@ export const steps: TutorialStep[] = [
|
|
|
317
317
|
{
|
|
318
318
|
elementXpath: workbenchXPath.sidebarContainer,
|
|
319
319
|
title: 'Cron Schedule',
|
|
320
|
-
link: 'https://www.motia.dev/docs/concepts/steps
|
|
320
|
+
link: 'https://www.motia.dev/docs/concepts/steps#cron-trigger',
|
|
321
321
|
description: () => (
|
|
322
322
|
<p>
|
|
323
323
|
<b>CRON</b> Steps are similar to the other Step types, they are composed by a configuration and a handler.
|
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.1-beta.
|
|
4
|
+
"version": "0.9.1-beta.147-326333",
|
|
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.1-beta.
|
|
50
|
-
"@motiadev/workbench": "0.9.1-beta.
|
|
51
|
-
"@motiadev/stream-client-node": "0.9.1-beta.
|
|
49
|
+
"@motiadev/core": "0.9.1-beta.147-326333",
|
|
50
|
+
"@motiadev/workbench": "0.9.1-beta.147-326333",
|
|
51
|
+
"@motiadev/stream-client-node": "0.9.1-beta.147-326333"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@amplitude/analytics-types": "^2.9.2",
|