motia 0.8.1-beta.138 → 0.8.2-beta.140-306759
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 +3 -1
- package/dist/cjs/dev.js +1 -0
- package/dist/cjs/install.d.ts +3 -2
- package/dist/cjs/install.js +6 -6
- package/dist/cjs/utils/install-lambda-python-packages.d.ts +2 -1
- package/dist/cjs/utils/install-lambda-python-packages.js +2 -2
- package/dist/esm/cli.js +3 -1
- package/dist/esm/dev.js +1 -0
- package/dist/esm/install.d.ts +3 -2
- package/dist/esm/install.js +6 -6
- package/dist/esm/utils/install-lambda-python-packages.d.ts +2 -1
- package/dist/esm/utils/install-lambda-python-packages.js +2 -2
- package/dist/types/install.d.ts +3 -2
- package/dist/types/utils/install-lambda-python-packages.d.ts +2 -1
- package/package.json +4 -4
package/dist/cjs/cli.js
CHANGED
|
@@ -56,9 +56,11 @@ commander_1.program
|
|
|
56
56
|
.command('install')
|
|
57
57
|
.description('Sets up Python virtual environment and install dependencies')
|
|
58
58
|
.option('-v, --verbose', 'Enable verbose logging')
|
|
59
|
+
.option('-p, --python <python_version>', 'Specify the python version to use, only supported >3.12')
|
|
60
|
+
.option('-d, --docker', 'Indicate if the install is for a motia docker install')
|
|
59
61
|
.action(async (options) => {
|
|
60
62
|
const { install } = require('./install');
|
|
61
|
-
await install({ isVerbose: options.verbose });
|
|
63
|
+
await install({ isVerbose: options.verbose, pythonVersion: options.python, skipPythonPlatform: !!options.docker });
|
|
62
64
|
});
|
|
63
65
|
commander_1.program
|
|
64
66
|
.command('dev')
|
package/dist/cjs/dev.js
CHANGED
package/dist/cjs/install.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
interface InstallConfig {
|
|
2
2
|
isVerbose?: boolean;
|
|
3
3
|
pythonVersion?: string;
|
|
4
|
+
skipPythonPlatform?: boolean;
|
|
4
5
|
}
|
|
5
6
|
type PythonInstallConfig = InstallConfig & {
|
|
6
7
|
baseDir: string;
|
|
7
8
|
};
|
|
8
|
-
export declare const pythonInstall: ({ baseDir, isVerbose, pythonVersion, }: PythonInstallConfig) => Promise<void>;
|
|
9
|
-
export declare const install: ({ isVerbose, pythonVersion }: InstallConfig) => Promise<void>;
|
|
9
|
+
export declare const pythonInstall: ({ baseDir, isVerbose, pythonVersion, skipPythonPlatform, }: PythonInstallConfig) => Promise<void>;
|
|
10
|
+
export declare const install: ({ isVerbose, pythonVersion, skipPythonPlatform, }: InstallConfig) => Promise<void>;
|
|
10
11
|
export {};
|
package/dist/cjs/install.js
CHANGED
|
@@ -12,9 +12,9 @@ const install_lambda_python_packages_1 = require("./utils/install-lambda-python-
|
|
|
12
12
|
const generate_locked_data_1 = require("./generate-locked-data");
|
|
13
13
|
const python_version_utils_1 = require("./utils/python-version-utils");
|
|
14
14
|
const ensure_uv_1 = require("./utils/ensure-uv");
|
|
15
|
-
const pythonInstall = async ({ baseDir, isVerbose = false, pythonVersion = '3.13', }) => {
|
|
15
|
+
const pythonInstall = async ({ baseDir, isVerbose = false, pythonVersion = '3.13', skipPythonPlatform = false, }) => {
|
|
16
16
|
const venvPath = path_1.default.join(baseDir, 'python_modules');
|
|
17
|
-
console.log(
|
|
17
|
+
console.log(`📦 Installing Python(${pythonVersion}) dependencies...`, venvPath);
|
|
18
18
|
const coreRequirementsPath = path_1.default.join(baseDir, 'node_modules', 'motia', 'dist', 'requirements-core.txt');
|
|
19
19
|
const snapRequirementsPath = path_1.default.join(baseDir, 'node_modules', 'motia', 'dist', 'requirements-snap.txt');
|
|
20
20
|
const localRequirements = path_1.default.join(baseDir, 'requirements.txt');
|
|
@@ -35,7 +35,7 @@ const pythonInstall = async ({ baseDir, isVerbose = false, pythonVersion = '3.13
|
|
|
35
35
|
console.log('🔧 Checking UV installation...');
|
|
36
36
|
await (0, ensure_uv_1.ensureUvInstalled)();
|
|
37
37
|
console.log('✅ UV is available');
|
|
38
|
-
(0, install_lambda_python_packages_1.installLambdaPythonPackages)({ isVerbose, requirementsList });
|
|
38
|
+
(0, install_lambda_python_packages_1.installLambdaPythonPackages)({ isVerbose, requirementsList, skipPythonPlatform });
|
|
39
39
|
// Install requirements
|
|
40
40
|
console.log('📥 Installing Python dependencies...');
|
|
41
41
|
// Core requirements
|
|
@@ -44,7 +44,7 @@ const pythonInstall = async ({ baseDir, isVerbose = false, pythonVersion = '3.13
|
|
|
44
44
|
if (isVerbose) {
|
|
45
45
|
console.log('📄 Using requirements from:', requirement);
|
|
46
46
|
}
|
|
47
|
-
await (0, execute_command_1.executeCommand)(`pip install -r "${requirement}" --only-binary=:all
|
|
47
|
+
await (0, execute_command_1.executeCommand)(`pip install -r "${requirement}" ${skipPythonPlatform ? '' : '--only-binary=:all:'}`, baseDir);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -55,11 +55,11 @@ const pythonInstall = async ({ baseDir, isVerbose = false, pythonVersion = '3.13
|
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
exports.pythonInstall = pythonInstall;
|
|
58
|
-
const install = async ({ isVerbose = false, pythonVersion = '3.13' }) => {
|
|
58
|
+
const install = async ({ isVerbose = false, pythonVersion = '3.13', skipPythonPlatform, }) => {
|
|
59
59
|
const baseDir = process.cwd();
|
|
60
60
|
const steps = (0, generate_locked_data_1.getStepFiles)(baseDir);
|
|
61
61
|
if (steps.some((file) => file.endsWith('.py'))) {
|
|
62
|
-
await (0, exports.pythonInstall)({ baseDir, isVerbose, pythonVersion });
|
|
62
|
+
await (0, exports.pythonInstall)({ baseDir, isVerbose, pythonVersion, skipPythonPlatform });
|
|
63
63
|
}
|
|
64
64
|
console.info('✅ Installation completed successfully!');
|
|
65
65
|
process.exit(0);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
interface VenvConfig {
|
|
2
2
|
requirementsList: string[];
|
|
3
3
|
isVerbose?: boolean;
|
|
4
|
+
skipPythonPlatform?: boolean;
|
|
4
5
|
}
|
|
5
|
-
export declare const installLambdaPythonPackages: ({ isVerbose, requirementsList }: VenvConfig) => void;
|
|
6
|
+
export declare const installLambdaPythonPackages: ({ isVerbose, requirementsList, skipPythonPlatform, }: VenvConfig) => void;
|
|
6
7
|
export {};
|
|
@@ -7,7 +7,7 @@ exports.installLambdaPythonPackages = void 0;
|
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const child_process_1 = require("child_process");
|
|
9
9
|
const internal_logger_1 = require("./internal-logger");
|
|
10
|
-
const installLambdaPythonPackages = ({ isVerbose = false, requirementsList }) => {
|
|
10
|
+
const installLambdaPythonPackages = ({ isVerbose = false, requirementsList, skipPythonPlatform = false, }) => {
|
|
11
11
|
const sitePackagesPath = `${process.env.PYTHON_SITE_PACKAGES}-lambda`;
|
|
12
12
|
for (const requirement of requirementsList) {
|
|
13
13
|
if (!fs_1.default.existsSync(requirement)) {
|
|
@@ -18,7 +18,7 @@ const installLambdaPythonPackages = ({ isVerbose = false, requirementsList }) =>
|
|
|
18
18
|
}
|
|
19
19
|
try {
|
|
20
20
|
// Install packages to lambda site-packages with platform specification
|
|
21
|
-
const command = `pip install -r "${requirement}" --target "${sitePackagesPath}" --platform manylinux2014_x86_64 --only-binary=:all: --upgrade --upgrade-strategy only-if-needed`;
|
|
21
|
+
const command = `pip install -r "${requirement}" --target "${sitePackagesPath}" ${!skipPythonPlatform ? '--platform manylinux2014_x86_64 --only-binary=:all: ' : ''}--upgrade --upgrade-strategy only-if-needed`;
|
|
22
22
|
if (isVerbose) {
|
|
23
23
|
console.log('📦 Installing Python packages with platform specification...');
|
|
24
24
|
console.log('📦 Command:', command);
|
package/dist/esm/cli.js
CHANGED
|
@@ -54,9 +54,11 @@ program
|
|
|
54
54
|
.command('install')
|
|
55
55
|
.description('Sets up Python virtual environment and install dependencies')
|
|
56
56
|
.option('-v, --verbose', 'Enable verbose logging')
|
|
57
|
+
.option('-p, --python <python_version>', 'Specify the python version to use, only supported >3.12')
|
|
58
|
+
.option('-d, --docker', 'Indicate if the install is for a motia docker install')
|
|
57
59
|
.action(async (options) => {
|
|
58
60
|
const { install } = require('./install');
|
|
59
|
-
await install({ isVerbose: options.verbose });
|
|
61
|
+
await install({ isVerbose: options.verbose, pythonVersion: options.python, skipPythonPlatform: !!options.docker });
|
|
60
62
|
});
|
|
61
63
|
program
|
|
62
64
|
.command('dev')
|
package/dist/esm/dev.js
CHANGED
package/dist/esm/install.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
interface InstallConfig {
|
|
2
2
|
isVerbose?: boolean;
|
|
3
3
|
pythonVersion?: string;
|
|
4
|
+
skipPythonPlatform?: boolean;
|
|
4
5
|
}
|
|
5
6
|
type PythonInstallConfig = InstallConfig & {
|
|
6
7
|
baseDir: string;
|
|
7
8
|
};
|
|
8
|
-
export declare const pythonInstall: ({ baseDir, isVerbose, pythonVersion, }: PythonInstallConfig) => Promise<void>;
|
|
9
|
-
export declare const install: ({ isVerbose, pythonVersion }: InstallConfig) => Promise<void>;
|
|
9
|
+
export declare const pythonInstall: ({ baseDir, isVerbose, pythonVersion, skipPythonPlatform, }: PythonInstallConfig) => Promise<void>;
|
|
10
|
+
export declare const install: ({ isVerbose, pythonVersion, skipPythonPlatform, }: InstallConfig) => Promise<void>;
|
|
10
11
|
export {};
|
package/dist/esm/install.js
CHANGED
|
@@ -6,9 +6,9 @@ import { installLambdaPythonPackages } from './utils/install-lambda-python-packa
|
|
|
6
6
|
import { getStepFiles } from './generate-locked-data';
|
|
7
7
|
import { getPythonCommand } from './utils/python-version-utils';
|
|
8
8
|
import { ensureUvInstalled } from './utils/ensure-uv';
|
|
9
|
-
export const pythonInstall = async ({ baseDir, isVerbose = false, pythonVersion = '3.13', }) => {
|
|
9
|
+
export const pythonInstall = async ({ baseDir, isVerbose = false, pythonVersion = '3.13', skipPythonPlatform = false, }) => {
|
|
10
10
|
const venvPath = path.join(baseDir, 'python_modules');
|
|
11
|
-
console.log(
|
|
11
|
+
console.log(`📦 Installing Python(${pythonVersion}) dependencies...`, venvPath);
|
|
12
12
|
const coreRequirementsPath = path.join(baseDir, 'node_modules', 'motia', 'dist', 'requirements-core.txt');
|
|
13
13
|
const snapRequirementsPath = path.join(baseDir, 'node_modules', 'motia', 'dist', 'requirements-snap.txt');
|
|
14
14
|
const localRequirements = path.join(baseDir, 'requirements.txt');
|
|
@@ -29,7 +29,7 @@ export const pythonInstall = async ({ baseDir, isVerbose = false, pythonVersion
|
|
|
29
29
|
console.log('🔧 Checking UV installation...');
|
|
30
30
|
await ensureUvInstalled();
|
|
31
31
|
console.log('✅ UV is available');
|
|
32
|
-
installLambdaPythonPackages({ isVerbose, requirementsList });
|
|
32
|
+
installLambdaPythonPackages({ isVerbose, requirementsList, skipPythonPlatform });
|
|
33
33
|
// Install requirements
|
|
34
34
|
console.log('📥 Installing Python dependencies...');
|
|
35
35
|
// Core requirements
|
|
@@ -38,7 +38,7 @@ export const pythonInstall = async ({ baseDir, isVerbose = false, pythonVersion
|
|
|
38
38
|
if (isVerbose) {
|
|
39
39
|
console.log('📄 Using requirements from:', requirement);
|
|
40
40
|
}
|
|
41
|
-
await executeCommand(`pip install -r "${requirement}" --only-binary=:all
|
|
41
|
+
await executeCommand(`pip install -r "${requirement}" ${skipPythonPlatform ? '' : '--only-binary=:all:'}`, baseDir);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -48,11 +48,11 @@ export const pythonInstall = async ({ baseDir, isVerbose = false, pythonVersion
|
|
|
48
48
|
process.exit(1);
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
-
export const install = async ({ isVerbose = false, pythonVersion = '3.13' }) => {
|
|
51
|
+
export const install = async ({ isVerbose = false, pythonVersion = '3.13', skipPythonPlatform, }) => {
|
|
52
52
|
const baseDir = process.cwd();
|
|
53
53
|
const steps = getStepFiles(baseDir);
|
|
54
54
|
if (steps.some((file) => file.endsWith('.py'))) {
|
|
55
|
-
await pythonInstall({ baseDir, isVerbose, pythonVersion });
|
|
55
|
+
await pythonInstall({ baseDir, isVerbose, pythonVersion, skipPythonPlatform });
|
|
56
56
|
}
|
|
57
57
|
console.info('✅ Installation completed successfully!');
|
|
58
58
|
process.exit(0);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
interface VenvConfig {
|
|
2
2
|
requirementsList: string[];
|
|
3
3
|
isVerbose?: boolean;
|
|
4
|
+
skipPythonPlatform?: boolean;
|
|
4
5
|
}
|
|
5
|
-
export declare const installLambdaPythonPackages: ({ isVerbose, requirementsList }: VenvConfig) => void;
|
|
6
|
+
export declare const installLambdaPythonPackages: ({ isVerbose, requirementsList, skipPythonPlatform, }: VenvConfig) => void;
|
|
6
7
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import { execSync } from 'child_process';
|
|
3
3
|
import { internalLogger } from './internal-logger';
|
|
4
|
-
export const installLambdaPythonPackages = ({ isVerbose = false, requirementsList }) => {
|
|
4
|
+
export const installLambdaPythonPackages = ({ isVerbose = false, requirementsList, skipPythonPlatform = false, }) => {
|
|
5
5
|
const sitePackagesPath = `${process.env.PYTHON_SITE_PACKAGES}-lambda`;
|
|
6
6
|
for (const requirement of requirementsList) {
|
|
7
7
|
if (!fs.existsSync(requirement)) {
|
|
@@ -12,7 +12,7 @@ export const installLambdaPythonPackages = ({ isVerbose = false, requirementsLis
|
|
|
12
12
|
}
|
|
13
13
|
try {
|
|
14
14
|
// Install packages to lambda site-packages with platform specification
|
|
15
|
-
const command = `pip install -r "${requirement}" --target "${sitePackagesPath}" --platform manylinux2014_x86_64 --only-binary=:all: --upgrade --upgrade-strategy only-if-needed`;
|
|
15
|
+
const command = `pip install -r "${requirement}" --target "${sitePackagesPath}" ${!skipPythonPlatform ? '--platform manylinux2014_x86_64 --only-binary=:all: ' : ''}--upgrade --upgrade-strategy only-if-needed`;
|
|
16
16
|
if (isVerbose) {
|
|
17
17
|
console.log('📦 Installing Python packages with platform specification...');
|
|
18
18
|
console.log('📦 Command:', command);
|
package/dist/types/install.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
interface InstallConfig {
|
|
2
2
|
isVerbose?: boolean;
|
|
3
3
|
pythonVersion?: string;
|
|
4
|
+
skipPythonPlatform?: boolean;
|
|
4
5
|
}
|
|
5
6
|
type PythonInstallConfig = InstallConfig & {
|
|
6
7
|
baseDir: string;
|
|
7
8
|
};
|
|
8
|
-
export declare const pythonInstall: ({ baseDir, isVerbose, pythonVersion, }: PythonInstallConfig) => Promise<void>;
|
|
9
|
-
export declare const install: ({ isVerbose, pythonVersion }: InstallConfig) => Promise<void>;
|
|
9
|
+
export declare const pythonInstall: ({ baseDir, isVerbose, pythonVersion, skipPythonPlatform, }: PythonInstallConfig) => Promise<void>;
|
|
10
|
+
export declare const install: ({ isVerbose, pythonVersion, skipPythonPlatform, }: InstallConfig) => Promise<void>;
|
|
10
11
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
interface VenvConfig {
|
|
2
2
|
requirementsList: string[];
|
|
3
3
|
isVerbose?: boolean;
|
|
4
|
+
skipPythonPlatform?: boolean;
|
|
4
5
|
}
|
|
5
|
-
export declare const installLambdaPythonPackages: ({ isVerbose, requirementsList }: VenvConfig) => void;
|
|
6
|
+
export declare const installLambdaPythonPackages: ({ isVerbose, requirementsList, skipPythonPlatform, }: VenvConfig) => void;
|
|
6
7
|
export {};
|
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.2-beta.140-306759",
|
|
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.8.
|
|
50
|
-
"@motiadev/stream-client-node": "0.8.
|
|
51
|
-
"@motiadev/workbench": "0.8.
|
|
49
|
+
"@motiadev/core": "0.8.2-beta.140-306759",
|
|
50
|
+
"@motiadev/stream-client-node": "0.8.2-beta.140-306759",
|
|
51
|
+
"@motiadev/workbench": "0.8.2-beta.140-306759"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@amplitude/analytics-types": "^2.9.2",
|