motia 0.8.5-beta.143-666227 → 0.8.6-beta.143
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/constants.js +1 -6
- package/dist/cjs/create/index.js +2 -3
- package/dist/cjs/plugins/install-plugin-dependencies.js +13 -8
- package/dist/esm/constants.js +1 -3
- package/dist/esm/create/index.js +2 -3
- package/dist/esm/plugins/install-plugin-dependencies.js +13 -8
- package/package.json +4 -4
- /package/dist/cjs/create/templates/nodejs/{tutorial → steps}/petstore/api.step.ts-features.json.txt +0 -0
- /package/dist/cjs/create/templates/nodejs/{tutorial → steps}/petstore/process-food-order.step.ts-features.json.txt +0 -0
- /package/dist/cjs/create/templates/nodejs/{tutorial → steps}/petstore/state-audit-cron.step.ts-features.json.txt +0 -0
- /package/dist/cjs/create/templates/nodejs/{tutorial/tutorial.tsx.txt → tutorial.tsx.txt} +0 -0
- /package/dist/cjs/create/templates/python/{tutorial → steps}/petstore/api_step.py-features.json.txt +0 -0
- /package/dist/cjs/create/templates/python/{tutorial → steps}/petstore/process_food_order_step.py-features.json.txt +0 -0
- /package/dist/cjs/create/templates/python/{tutorial → steps}/petstore/state_audit_cron_step.py-features.json.txt +0 -0
- /package/dist/cjs/create/templates/python/{tutorial/tutorial.tsx.txt → tutorial.tsx.txt} +0 -0
- /package/dist/esm/create/templates/nodejs/{tutorial → steps}/petstore/api.step.ts-features.json.txt +0 -0
- /package/dist/esm/create/templates/nodejs/{tutorial → steps}/petstore/process-food-order.step.ts-features.json.txt +0 -0
- /package/dist/esm/create/templates/nodejs/{tutorial → steps}/petstore/state-audit-cron.step.ts-features.json.txt +0 -0
- /package/dist/esm/create/templates/nodejs/{tutorial/tutorial.tsx.txt → tutorial.tsx.txt} +0 -0
- /package/dist/esm/create/templates/python/{tutorial → steps}/petstore/api_step.py-features.json.txt +0 -0
- /package/dist/esm/create/templates/python/{tutorial → steps}/petstore/process_food_order_step.py-features.json.txt +0 -0
- /package/dist/esm/create/templates/python/{tutorial → steps}/petstore/state_audit_cron_step.py-features.json.txt +0 -0
- /package/dist/esm/create/templates/python/{tutorial/tutorial.tsx.txt → tutorial.tsx.txt} +0 -0
package/dist/cjs/constants.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.isTutorialDisabled = exports.workbenchBase = void 0;
|
|
7
|
-
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
9
4
|
function getWorkbenchBase() {
|
|
10
5
|
const basePath = process.env.MOTIA_WORKBENCH_BASE;
|
|
11
6
|
if (basePath === '/') {
|
|
@@ -14,4 +9,4 @@ function getWorkbenchBase() {
|
|
|
14
9
|
return basePath && basePath[0] !== '/' ? `/${basePath}` : basePath || '';
|
|
15
10
|
}
|
|
16
11
|
exports.workbenchBase = getWorkbenchBase();
|
|
17
|
-
exports.isTutorialDisabled = process.env.MOTIA_TUTORIAL_DISABLED === 'true'
|
|
12
|
+
exports.isTutorialDisabled = process.env.MOTIA_TUTORIAL_DISABLED === 'true';
|
package/dist/cjs/create/index.js
CHANGED
|
@@ -26,16 +26,15 @@ 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@3.24.4'].join(' ');
|
|
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 = [
|
|
31
31
|
'ts-node@10.9.2',
|
|
32
32
|
'typescript@5.7.3',
|
|
33
|
-
'@types/react@
|
|
33
|
+
'@types/react@19.1.1',
|
|
34
34
|
'@jest/globals@^29.7.0',
|
|
35
35
|
'@types/jest@^29.5.14',
|
|
36
36
|
'jest@^29.7.0',
|
|
37
37
|
'ts-jest@^29.2.5',
|
|
38
|
-
...plugin_dependencies_1.pluginDependencies.map((dep) => `${dep}@${version_1.version}`),
|
|
39
38
|
].join(' ');
|
|
40
39
|
try {
|
|
41
40
|
await (0, execute_command_1.executeCommand)(`${installCommand} ${dependencies}`, rootDir);
|
|
@@ -17,19 +17,24 @@ const installPluginDependencies = async (baseDir, printer) => {
|
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
19
|
const packageJson = JSON.parse(node_fs_1.default.readFileSync(packageJsonPath, 'utf-8'));
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
if (!packageJson.dependencies) {
|
|
21
|
+
packageJson.dependencies = {};
|
|
22
|
+
}
|
|
23
|
+
const missingDependencies = [];
|
|
24
|
+
for (const dep of plugin_dependencies_1.pluginDependencies) {
|
|
25
|
+
if (packageJson.devDependencies?.[dep]) {
|
|
26
|
+
delete packageJson.devDependencies[dep];
|
|
27
|
+
}
|
|
28
|
+
if (!packageJson.dependencies[dep]) {
|
|
29
|
+
packageJson.dependencies[dep] = version_1.version;
|
|
30
|
+
missingDependencies.push(dep);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
22
33
|
if (missingDependencies.length === 0) {
|
|
23
34
|
printer.printPluginLog('All plugin dependencies already installed');
|
|
24
35
|
return;
|
|
25
36
|
}
|
|
26
37
|
printer.printPluginLog(`Adding missing plugin dependencies: ${missingDependencies.join(', ')}`);
|
|
27
|
-
if (!packageJson.devDependencies) {
|
|
28
|
-
packageJson.devDependencies = {};
|
|
29
|
-
}
|
|
30
|
-
for (const dep of missingDependencies) {
|
|
31
|
-
packageJson.devDependencies[dep] = version_1.version;
|
|
32
|
-
}
|
|
33
38
|
node_fs_1.default.writeFileSync(packageJsonPath, `${JSON.stringify(packageJson, null, 2)}\n`);
|
|
34
39
|
printer.printPluginLog('Updated package.json with plugin dependencies');
|
|
35
40
|
let packageManager = (0, get_package_manager_1.getPackageManager)(baseDir);
|
package/dist/esm/constants.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import fs from 'node:fs';
|
|
2
|
-
import path from 'node:path';
|
|
3
1
|
function getWorkbenchBase() {
|
|
4
2
|
const basePath = process.env.MOTIA_WORKBENCH_BASE;
|
|
5
3
|
if (basePath === '/') {
|
|
@@ -8,4 +6,4 @@ function getWorkbenchBase() {
|
|
|
8
6
|
return basePath && basePath[0] !== '/' ? `/${basePath}` : basePath || '';
|
|
9
7
|
}
|
|
10
8
|
export const workbenchBase = getWorkbenchBase();
|
|
11
|
-
export const isTutorialDisabled = process.env.MOTIA_TUTORIAL_DISABLED === 'true'
|
|
9
|
+
export const isTutorialDisabled = process.env.MOTIA_TUTORIAL_DISABLED === 'true';
|
package/dist/esm/create/index.js
CHANGED
|
@@ -20,16 +20,15 @@ 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@3.24.4'].join(' ');
|
|
23
|
+
const dependencies = [`motia@${version}`, 'zod@3.24.4', ...pluginDependencies.map((dep) => `${dep}@${version}`)].join(' ');
|
|
24
24
|
const devDependencies = [
|
|
25
25
|
'ts-node@10.9.2',
|
|
26
26
|
'typescript@5.7.3',
|
|
27
|
-
'@types/react@
|
|
27
|
+
'@types/react@19.1.1',
|
|
28
28
|
'@jest/globals@^29.7.0',
|
|
29
29
|
'@types/jest@^29.5.14',
|
|
30
30
|
'jest@^29.7.0',
|
|
31
31
|
'ts-jest@^29.2.5',
|
|
32
|
-
...pluginDependencies.map((dep) => `${dep}@${version}`),
|
|
33
32
|
].join(' ');
|
|
34
33
|
try {
|
|
35
34
|
await executeCommand(`${installCommand} ${dependencies}`, rootDir);
|
|
@@ -11,19 +11,24 @@ export const installPluginDependencies = async (baseDir, printer) => {
|
|
|
11
11
|
return;
|
|
12
12
|
}
|
|
13
13
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
if (!packageJson.dependencies) {
|
|
15
|
+
packageJson.dependencies = {};
|
|
16
|
+
}
|
|
17
|
+
const missingDependencies = [];
|
|
18
|
+
for (const dep of pluginDependencies) {
|
|
19
|
+
if (packageJson.devDependencies?.[dep]) {
|
|
20
|
+
delete packageJson.devDependencies[dep];
|
|
21
|
+
}
|
|
22
|
+
if (!packageJson.dependencies[dep]) {
|
|
23
|
+
packageJson.dependencies[dep] = version;
|
|
24
|
+
missingDependencies.push(dep);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
16
27
|
if (missingDependencies.length === 0) {
|
|
17
28
|
printer.printPluginLog('All plugin dependencies already installed');
|
|
18
29
|
return;
|
|
19
30
|
}
|
|
20
31
|
printer.printPluginLog(`Adding missing plugin dependencies: ${missingDependencies.join(', ')}`);
|
|
21
|
-
if (!packageJson.devDependencies) {
|
|
22
|
-
packageJson.devDependencies = {};
|
|
23
|
-
}
|
|
24
|
-
for (const dep of missingDependencies) {
|
|
25
|
-
packageJson.devDependencies[dep] = version;
|
|
26
|
-
}
|
|
27
32
|
fs.writeFileSync(packageJsonPath, `${JSON.stringify(packageJson, null, 2)}\n`);
|
|
28
33
|
printer.printPluginLog('Updated package.json with plugin dependencies');
|
|
29
34
|
let packageManager = getPackageManager(baseDir);
|
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.8.
|
|
4
|
+
"version": "0.8.6-beta.143",
|
|
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/
|
|
50
|
-
"@motiadev/
|
|
51
|
-
"@motiadev/
|
|
49
|
+
"@motiadev/core": "0.8.6-beta.143",
|
|
50
|
+
"@motiadev/stream-client-node": "0.8.6-beta.143",
|
|
51
|
+
"@motiadev/workbench": "0.8.6-beta.143"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@amplitude/analytics-types": "^2.9.2",
|
/package/dist/cjs/create/templates/nodejs/{tutorial → steps}/petstore/api.step.ts-features.json.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/cjs/create/templates/python/{tutorial → steps}/petstore/api_step.py-features.json.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/esm/create/templates/nodejs/{tutorial → steps}/petstore/api.step.ts-features.json.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/esm/create/templates/python/{tutorial → steps}/petstore/api_step.py-features.json.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|