motia 0.5.11-beta.120-110250 → 0.5.11-beta.120-685453
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 +1 -13
- package/dist/cjs/create/templates/default/motia-workbench.json +4 -4
- package/dist/cjs/create/templates/generate.js +2 -4
- package/dist/cjs/create/templates/generate.ts +2 -6
- package/dist/cjs/create/templates/index.js +0 -1
- package/dist/cjs/create/templates/index.ts +0 -1
- package/dist/esm/create/index.js +1 -13
- package/dist/esm/create/templates/default/motia-workbench.json +4 -4
- package/dist/esm/create/templates/generate.js +2 -4
- package/dist/esm/create/templates/generate.ts +2 -6
- package/dist/esm/create/templates/index.js +0 -1
- package/dist/esm/create/templates/index.ts +0 -1
- package/package.json +4 -4
- /package/dist/cjs/create/templates/python/{00_noop_step.py.txt → steps/00_noop_step.py.txt} +0 -0
- /package/dist/cjs/create/templates/python/{00_noop_step.tsx.txt → steps/00_noop_step.tsx.txt} +0 -0
- /package/dist/cjs/create/templates/python/{01_api_step.py.txt → steps/01_api_step.py.txt} +0 -0
- /package/dist/cjs/create/templates/python/{02_test_state_step.py.txt → steps/02_test_state_step.py.txt} +0 -0
- /package/dist/cjs/create/templates/python/{03_check_state_change_step.py.txt → steps/03_check_state_change_step.py.txt} +0 -0
- /package/dist/esm/create/templates/python/{00_noop_step.py.txt → steps/00_noop_step.py.txt} +0 -0
- /package/dist/esm/create/templates/python/{00_noop_step.tsx.txt → steps/00_noop_step.tsx.txt} +0 -0
- /package/dist/esm/create/templates/python/{01_api_step.py.txt → steps/01_api_step.py.txt} +0 -0
- /package/dist/esm/create/templates/python/{02_test_state_step.py.txt → steps/02_test_state_step.py.txt} +0 -0
- /package/dist/esm/create/templates/python/{03_check_state_change_step.py.txt → steps/03_check_state_change_step.py.txt} +0 -0
package/dist/cjs/create/index.js
CHANGED
|
@@ -177,20 +177,8 @@ const create = async ({ projectName, template, cursorEnabled, context }) => {
|
|
|
177
177
|
fs_1.default.cpSync(cursorTemplateDir, cursorTargetDir, { recursive: true });
|
|
178
178
|
context.log('cursor-folder-created', (message) => message.tag('success').append('Folder').append('.cursor', 'cyan').append('has been created.'));
|
|
179
179
|
}
|
|
180
|
-
const stepsDir = path_1.default.join(rootDir, 'steps');
|
|
181
|
-
if (!(0, utils_1.checkIfDirectoryExists)(stepsDir)) {
|
|
182
|
-
fs_1.default.mkdirSync(stepsDir);
|
|
183
|
-
context.log('steps-directory-created', (message) => message.tag('success').append('Folder').append('steps', 'cyan').append('has been created.'));
|
|
184
|
-
}
|
|
185
|
-
if (!(0, utils_1.checkIfDirectoryExists)(path_1.default.join(stepsDir, 'basic-tutorial'))) {
|
|
186
|
-
fs_1.default.mkdirSync(path_1.default.join(stepsDir, 'basic-tutorial'));
|
|
187
|
-
}
|
|
188
|
-
await (0, setup_template_1.setupTemplate)('basic-tutorial', stepsDir, context);
|
|
189
180
|
if (template) {
|
|
190
|
-
|
|
191
|
-
fs_1.default.mkdirSync(path_1.default.join(stepsDir, template));
|
|
192
|
-
}
|
|
193
|
-
await (0, setup_template_1.setupTemplate)(template, stepsDir, context);
|
|
181
|
+
await (0, setup_template_1.setupTemplate)(template, rootDir, context);
|
|
194
182
|
}
|
|
195
183
|
const packageManager = await installNodeDependencies(rootDir, context);
|
|
196
184
|
if (template === 'python') {
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
{
|
|
3
3
|
"id": "basic-tutorial",
|
|
4
4
|
"config": {
|
|
5
|
-
"steps/
|
|
5
|
+
"steps/03-state-audit-cron.step.ts": {
|
|
6
6
|
"x": -165,
|
|
7
7
|
"y": 217,
|
|
8
8
|
"sourceHandlePosition": "right"
|
|
9
9
|
},
|
|
10
|
-
"steps/
|
|
10
|
+
"steps/02-process-food-order.step.ts": {
|
|
11
11
|
"x": 211,
|
|
12
12
|
"y": 17,
|
|
13
13
|
"sourceHandlePosition": "bottom",
|
|
14
14
|
"targetHandlePosition": "left"
|
|
15
15
|
},
|
|
16
|
-
"steps/
|
|
16
|
+
"steps/01-api.step.ts": {
|
|
17
17
|
"x": -100,
|
|
18
18
|
"y": 3,
|
|
19
19
|
"sourceHandlePosition": "right",
|
|
20
20
|
"targetHandlePosition": "left"
|
|
21
21
|
},
|
|
22
|
-
"steps/
|
|
22
|
+
"steps/04-notification.step.ts": {
|
|
23
23
|
"x": 300,
|
|
24
24
|
"y": 264
|
|
25
25
|
}
|
|
@@ -46,14 +46,12 @@ const generateTemplateSteps = (templateFolder) => {
|
|
|
46
46
|
const filePath = path.join(templatePath, fileName);
|
|
47
47
|
if ((0, fs_1.statSync)(filePath).isDirectory()) {
|
|
48
48
|
const folderPath = path.basename(filePath);
|
|
49
|
-
(0, fs_1.mkdirSync)(path.join(rootDir,
|
|
49
|
+
(0, fs_1.mkdirSync)(path.join(rootDir, folderPath));
|
|
50
50
|
continue;
|
|
51
51
|
}
|
|
52
52
|
const sanitizedFileName = fileName.replace('.txt', '');
|
|
53
53
|
const isWorkbenchConfig = fileName.match('motia-workbench.json');
|
|
54
|
-
const generateFilePath = path.join(
|
|
55
|
-
? [rootDir.match(/steps/) ? path.join(rootDir, '..') : rootDir, sanitizedFileName]
|
|
56
|
-
: [rootDir, templateFolder, sanitizedFileName]));
|
|
54
|
+
const generateFilePath = path.join(rootDir, sanitizedFileName);
|
|
57
55
|
let content = await fs_1.promises.readFile(filePath, 'utf8');
|
|
58
56
|
// Make sure statSync doesn't break the execution if the file doesn't exist
|
|
59
57
|
try {
|
|
@@ -16,17 +16,13 @@ export const generateTemplateSteps = (templateFolder: string): Generator => {
|
|
|
16
16
|
|
|
17
17
|
if (statSync(filePath).isDirectory()) {
|
|
18
18
|
const folderPath = path.basename(filePath)
|
|
19
|
-
mkdirSync(path.join(rootDir,
|
|
19
|
+
mkdirSync(path.join(rootDir, folderPath))
|
|
20
20
|
continue
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const sanitizedFileName = fileName.replace('.txt', '')
|
|
24
24
|
const isWorkbenchConfig = fileName.match('motia-workbench.json')
|
|
25
|
-
const generateFilePath = path.join(
|
|
26
|
-
...(isWorkbenchConfig
|
|
27
|
-
? [rootDir.match(/steps/) ? path.join(rootDir, '..') : rootDir, sanitizedFileName]
|
|
28
|
-
: [rootDir, templateFolder, sanitizedFileName]),
|
|
29
|
-
)
|
|
25
|
+
const generateFilePath = path.join(rootDir, sanitizedFileName)
|
|
30
26
|
let content = await fs.readFile(filePath, 'utf8')
|
|
31
27
|
|
|
32
28
|
// Make sure statSync doesn't break the execution if the file doesn't exist
|
package/dist/esm/create/index.js
CHANGED
|
@@ -171,20 +171,8 @@ export const create = async ({ projectName, template, cursorEnabled, context })
|
|
|
171
171
|
fs.cpSync(cursorTemplateDir, cursorTargetDir, { recursive: true });
|
|
172
172
|
context.log('cursor-folder-created', (message) => message.tag('success').append('Folder').append('.cursor', 'cyan').append('has been created.'));
|
|
173
173
|
}
|
|
174
|
-
const stepsDir = path.join(rootDir, 'steps');
|
|
175
|
-
if (!checkIfDirectoryExists(stepsDir)) {
|
|
176
|
-
fs.mkdirSync(stepsDir);
|
|
177
|
-
context.log('steps-directory-created', (message) => message.tag('success').append('Folder').append('steps', 'cyan').append('has been created.'));
|
|
178
|
-
}
|
|
179
|
-
if (!checkIfDirectoryExists(path.join(stepsDir, 'basic-tutorial'))) {
|
|
180
|
-
fs.mkdirSync(path.join(stepsDir, 'basic-tutorial'));
|
|
181
|
-
}
|
|
182
|
-
await setupTemplate('basic-tutorial', stepsDir, context);
|
|
183
174
|
if (template) {
|
|
184
|
-
|
|
185
|
-
fs.mkdirSync(path.join(stepsDir, template));
|
|
186
|
-
}
|
|
187
|
-
await setupTemplate(template, stepsDir, context);
|
|
175
|
+
await setupTemplate(template, rootDir, context);
|
|
188
176
|
}
|
|
189
177
|
const packageManager = await installNodeDependencies(rootDir, context);
|
|
190
178
|
if (template === 'python') {
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
{
|
|
3
3
|
"id": "basic-tutorial",
|
|
4
4
|
"config": {
|
|
5
|
-
"steps/
|
|
5
|
+
"steps/03-state-audit-cron.step.ts": {
|
|
6
6
|
"x": -165,
|
|
7
7
|
"y": 217,
|
|
8
8
|
"sourceHandlePosition": "right"
|
|
9
9
|
},
|
|
10
|
-
"steps/
|
|
10
|
+
"steps/02-process-food-order.step.ts": {
|
|
11
11
|
"x": 211,
|
|
12
12
|
"y": 17,
|
|
13
13
|
"sourceHandlePosition": "bottom",
|
|
14
14
|
"targetHandlePosition": "left"
|
|
15
15
|
},
|
|
16
|
-
"steps/
|
|
16
|
+
"steps/01-api.step.ts": {
|
|
17
17
|
"x": -100,
|
|
18
18
|
"y": 3,
|
|
19
19
|
"sourceHandlePosition": "right",
|
|
20
20
|
"targetHandlePosition": "left"
|
|
21
21
|
},
|
|
22
|
-
"steps/
|
|
22
|
+
"steps/04-notification.step.ts": {
|
|
23
23
|
"x": 300,
|
|
24
24
|
"y": 264
|
|
25
25
|
}
|
|
@@ -10,14 +10,12 @@ export const generateTemplateSteps = (templateFolder) => {
|
|
|
10
10
|
const filePath = path.join(templatePath, fileName);
|
|
11
11
|
if (statSync(filePath).isDirectory()) {
|
|
12
12
|
const folderPath = path.basename(filePath);
|
|
13
|
-
mkdirSync(path.join(rootDir,
|
|
13
|
+
mkdirSync(path.join(rootDir, folderPath));
|
|
14
14
|
continue;
|
|
15
15
|
}
|
|
16
16
|
const sanitizedFileName = fileName.replace('.txt', '');
|
|
17
17
|
const isWorkbenchConfig = fileName.match('motia-workbench.json');
|
|
18
|
-
const generateFilePath = path.join(
|
|
19
|
-
? [rootDir.match(/steps/) ? path.join(rootDir, '..') : rootDir, sanitizedFileName]
|
|
20
|
-
: [rootDir, templateFolder, sanitizedFileName]));
|
|
18
|
+
const generateFilePath = path.join(rootDir, sanitizedFileName);
|
|
21
19
|
let content = await fs.readFile(filePath, 'utf8');
|
|
22
20
|
// Make sure statSync doesn't break the execution if the file doesn't exist
|
|
23
21
|
try {
|
|
@@ -16,17 +16,13 @@ export const generateTemplateSteps = (templateFolder: string): Generator => {
|
|
|
16
16
|
|
|
17
17
|
if (statSync(filePath).isDirectory()) {
|
|
18
18
|
const folderPath = path.basename(filePath)
|
|
19
|
-
mkdirSync(path.join(rootDir,
|
|
19
|
+
mkdirSync(path.join(rootDir, folderPath))
|
|
20
20
|
continue
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const sanitizedFileName = fileName.replace('.txt', '')
|
|
24
24
|
const isWorkbenchConfig = fileName.match('motia-workbench.json')
|
|
25
|
-
const generateFilePath = path.join(
|
|
26
|
-
...(isWorkbenchConfig
|
|
27
|
-
? [rootDir.match(/steps/) ? path.join(rootDir, '..') : rootDir, sanitizedFileName]
|
|
28
|
-
: [rootDir, templateFolder, sanitizedFileName]),
|
|
29
|
-
)
|
|
25
|
+
const generateFilePath = path.join(rootDir, sanitizedFileName)
|
|
30
26
|
let content = await fs.readFile(filePath, 'utf8')
|
|
31
27
|
|
|
32
28
|
// Make sure statSync doesn't break the execution if the file doesn't exist
|
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.5.11-beta.120-
|
|
4
|
+
"version": "0.5.11-beta.120-685453",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"inquirer": "^8.2.5",
|
|
44
44
|
"table": "^6.9.0",
|
|
45
45
|
"ts-node": "^10.9.2",
|
|
46
|
-
"@motiadev/
|
|
47
|
-
"@motiadev/
|
|
48
|
-
"@motiadev/
|
|
46
|
+
"@motiadev/workbench": "0.5.11-beta.120-685453",
|
|
47
|
+
"@motiadev/core": "0.5.11-beta.120-685453",
|
|
48
|
+
"@motiadev/stream-client-node": "0.5.11-beta.120-685453"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@amplitude/analytics-types": "^2.9.2",
|
|
File without changes
|
/package/dist/cjs/create/templates/python/{00_noop_step.tsx.txt → steps/00_noop_step.tsx.txt}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/esm/create/templates/python/{00_noop_step.tsx.txt → steps/00_noop_step.tsx.txt}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|