motia 0.17.9-beta.192-620848 → 0.17.11-beta.193
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/install.mjs +8 -11
- package/dist/install.mjs.map +1 -1
- package/package.json +8 -8
package/dist/install.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { getStepFiles, getStreamFiles } from "./generate-locked-data.mjs";
|
|
|
2
2
|
import { internalLogger } from "./utils/internal-logger.mjs";
|
|
3
3
|
import { executeCommand } from "./utils/execute-command.mjs";
|
|
4
4
|
import { getPythonCommand } from "./utils/python-version-utils.mjs";
|
|
5
|
-
import { activatePythonVenv
|
|
5
|
+
import { activatePythonVenv } from "./utils/activate-python-env.mjs";
|
|
6
6
|
import { getInstallCommand } from "./utils/validate-python-environment.mjs";
|
|
7
7
|
import { ensureUvInstalled } from "./utils/ensure-uv.mjs";
|
|
8
8
|
import { installLambdaPythonPackages } from "./utils/install-lambda-python-packages.mjs";
|
|
@@ -26,16 +26,6 @@ const pythonInstall = async ({ baseDir, isVerbose = false, pythonVersion = "3.13
|
|
|
26
26
|
console.log("📦 Creating Python virtual environment...");
|
|
27
27
|
await executeCommand(`${pythonCmd} -m venv python_modules`, baseDir);
|
|
28
28
|
}
|
|
29
|
-
const sitePackagesPath = getSitePackagesPath({
|
|
30
|
-
baseDir,
|
|
31
|
-
pythonVersion
|
|
32
|
-
});
|
|
33
|
-
if (!sitePackagesPath || !fs.existsSync(sitePackagesPath)) {
|
|
34
|
-
const installCmd = getInstallCommand(baseDir);
|
|
35
|
-
internalLogger.error("Python virtual environment was not created");
|
|
36
|
-
internalLogger.info(`Please try running ${pc.cyan(installCmd)} or manually create the venv with: ${pc.cyan("python3 -m venv python_modules")}`);
|
|
37
|
-
process.exit(1);
|
|
38
|
-
}
|
|
39
29
|
activatePythonVenv({
|
|
40
30
|
baseDir,
|
|
41
31
|
isVerbose,
|
|
@@ -53,6 +43,13 @@ const pythonInstall = async ({ baseDir, isVerbose = false, pythonVersion = "3.13
|
|
|
53
43
|
if (isVerbose) console.log("📄 Using requirements from:", requirement);
|
|
54
44
|
await executeCommand(`pip install -r "${requirement}" --only-binary=:all:`, baseDir);
|
|
55
45
|
}
|
|
46
|
+
const sitePackagesPath = process.env.PYTHON_SITE_PACKAGES;
|
|
47
|
+
if (!sitePackagesPath || !fs.existsSync(sitePackagesPath)) {
|
|
48
|
+
const installCmd = getInstallCommand(baseDir);
|
|
49
|
+
internalLogger.error("Python virtual environment was not created");
|
|
50
|
+
internalLogger.info(`Please try running ${pc.cyan(installCmd)} or manually create the venv with: ${pc.cyan("python3 -m venv python_modules")}`);
|
|
51
|
+
process.exit(1);
|
|
52
|
+
}
|
|
56
53
|
} catch (error) {
|
|
57
54
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
58
55
|
internalLogger.error("Installation failed:", errorMessage);
|
package/dist/install.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.mjs","names":[],"sources":["../src/install.ts"],"sourcesContent":["import fs from 'fs'\nimport path from 'path'\nimport pc from 'picocolors'\nimport { getStepFiles, getStreamFiles } from './generate-locked-data'\nimport { activatePythonVenv
|
|
1
|
+
{"version":3,"file":"install.mjs","names":[],"sources":["../src/install.ts"],"sourcesContent":["import fs from 'fs'\nimport path from 'path'\nimport pc from 'picocolors'\nimport { getStepFiles, getStreamFiles } from './generate-locked-data'\nimport { activatePythonVenv } from './utils/activate-python-env'\nimport { ensureUvInstalled } from './utils/ensure-uv'\nimport { executeCommand } from './utils/execute-command'\nimport { installLambdaPythonPackages } from './utils/install-lambda-python-packages'\nimport { internalLogger } from './utils/internal-logger'\nimport { getPythonCommand } from './utils/python-version-utils'\nimport { getInstallCommand } from './utils/validate-python-environment'\n\ninterface InstallConfig {\n isVerbose?: boolean\n pythonVersion?: string\n}\n\ntype PythonInstallConfig = InstallConfig & { baseDir: string }\n\nexport const pythonInstall = async ({\n baseDir,\n isVerbose = false,\n pythonVersion = '3.13',\n}: PythonInstallConfig): Promise<void> => {\n const venvPath = path.join(baseDir, 'python_modules')\n console.log('📦 Installing Python dependencies...', venvPath)\n\n const coreRequirementsPath = path.join(baseDir, 'node_modules', 'motia', 'dist', 'requirements-core.txt')\n const snapRequirementsPath = path.join(baseDir, 'node_modules', 'motia', 'dist', 'requirements-snap.txt')\n const localRequirements = path.join(baseDir, 'requirements.txt')\n\n const requirementsList = [coreRequirementsPath, snapRequirementsPath, localRequirements]\n\n try {\n // Get the appropriate Python command\n const pythonCmd = await getPythonCommand(pythonVersion, baseDir)\n if (isVerbose) {\n console.log(`🐍 Using Python command: ${pythonCmd}`)\n }\n\n // Check if virtual environment exists\n if (!fs.existsSync(venvPath)) {\n console.log('📦 Creating Python virtual environment...')\n await executeCommand(`${pythonCmd} -m venv python_modules`, baseDir)\n }\n\n activatePythonVenv({ baseDir, isVerbose, pythonVersion })\n\n // Ensure UV is installed\n console.log('🔧 Checking UV installation...')\n await ensureUvInstalled()\n console.log('✅ UV is available')\n\n installLambdaPythonPackages({ isVerbose, requirementsList })\n\n // Install requirements\n console.log('📥 Installing Python dependencies...')\n\n // Core requirements\n\n for (const requirement of requirementsList) {\n if (fs.existsSync(requirement)) {\n if (isVerbose) {\n console.log('📄 Using requirements from:', requirement)\n }\n await executeCommand(`pip install -r \"${requirement}\" --only-binary=:all:`, baseDir)\n }\n }\n\n const sitePackagesPath = process.env.PYTHON_SITE_PACKAGES\n\n if (!sitePackagesPath || !fs.existsSync(sitePackagesPath)) {\n const installCmd = getInstallCommand(baseDir)\n internalLogger.error('Python virtual environment was not created')\n internalLogger.info(\n `Please try running ${pc.cyan(installCmd)} or manually create the venv with: ${pc.cyan('python3 -m venv python_modules')}`,\n )\n process.exit(1)\n }\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error)\n internalLogger.error('Installation failed:', errorMessage)\n process.exit(1)\n }\n}\n\nexport const install = async ({ isVerbose = false, pythonVersion = '3.13' }: InstallConfig): Promise<void> => {\n const baseDir = process.cwd()\n\n const steps = getStepFiles(baseDir)\n const streams = getStreamFiles(baseDir)\n if (steps.some((file) => file.endsWith('.py')) || streams.some((file) => file.endsWith('.py'))) {\n await pythonInstall({ baseDir, isVerbose, pythonVersion })\n }\n\n console.info('✅ Installation completed successfully!')\n\n process.exit(0)\n}\n"],"mappings":";;;;;;;;;;;;;AAmBA,MAAa,gBAAgB,OAAO,EAClC,SACA,YAAY,OACZ,gBAAgB,aACwB;CACxC,MAAM,WAAW,KAAK,KAAK,SAAS,iBAAiB;AACrD,SAAQ,IAAI,wCAAwC,SAAS;CAM7D,MAAM,mBAAmB;EAJI,KAAK,KAAK,SAAS,gBAAgB,SAAS,QAAQ,wBAAwB;EAC5E,KAAK,KAAK,SAAS,gBAAgB,SAAS,QAAQ,wBAAwB;EAC/E,KAAK,KAAK,SAAS,mBAAmB;EAEwB;AAExF,KAAI;EAEF,MAAM,YAAY,MAAM,iBAAiB,eAAe,QAAQ;AAChE,MAAI,UACF,SAAQ,IAAI,4BAA4B,YAAY;AAItD,MAAI,CAAC,GAAG,WAAW,SAAS,EAAE;AAC5B,WAAQ,IAAI,4CAA4C;AACxD,SAAM,eAAe,GAAG,UAAU,0BAA0B,QAAQ;;AAGtE,qBAAmB;GAAE;GAAS;GAAW;GAAe,CAAC;AAGzD,UAAQ,IAAI,iCAAiC;AAC7C,QAAM,mBAAmB;AACzB,UAAQ,IAAI,oBAAoB;AAEhC,8BAA4B;GAAE;GAAW;GAAkB,CAAC;AAG5D,UAAQ,IAAI,uCAAuC;AAInD,OAAK,MAAM,eAAe,iBACxB,KAAI,GAAG,WAAW,YAAY,EAAE;AAC9B,OAAI,UACF,SAAQ,IAAI,+BAA+B,YAAY;AAEzD,SAAM,eAAe,mBAAmB,YAAY,wBAAwB,QAAQ;;EAIxF,MAAM,mBAAmB,QAAQ,IAAI;AAErC,MAAI,CAAC,oBAAoB,CAAC,GAAG,WAAW,iBAAiB,EAAE;GACzD,MAAM,aAAa,kBAAkB,QAAQ;AAC7C,kBAAe,MAAM,6CAA6C;AAClE,kBAAe,KACb,sBAAsB,GAAG,KAAK,WAAW,CAAC,qCAAqC,GAAG,KAAK,iCAAiC,GACzH;AACD,WAAQ,KAAK,EAAE;;UAEV,OAAO;EACd,MAAM,eAAe,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM;AAC3E,iBAAe,MAAM,wBAAwB,aAAa;AAC1D,UAAQ,KAAK,EAAE;;;AAInB,MAAa,UAAU,OAAO,EAAE,YAAY,OAAO,gBAAgB,aAA2C;CAC5G,MAAM,UAAU,QAAQ,KAAK;CAE7B,MAAM,QAAQ,aAAa,QAAQ;CACnC,MAAM,UAAU,eAAe,QAAQ;AACvC,KAAI,MAAM,MAAM,SAAS,KAAK,SAAS,MAAM,CAAC,IAAI,QAAQ,MAAM,SAAS,KAAK,SAAS,MAAM,CAAC,CAC5F,OAAM,cAAc;EAAE;EAAS;EAAW;EAAe,CAAC;AAG5D,SAAQ,KAAK,yCAAyC;AAEtD,SAAQ,KAAK,EAAE"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "motia",
|
|
3
3
|
"description": "Build production-grade backends with a single primitive. APIs, background jobs, Queues, Workflows, and AI agents - unified in one system with built-in State management, Streaming, and Observability.",
|
|
4
|
-
"version": "0.17.
|
|
4
|
+
"version": "0.17.11-beta.193",
|
|
5
5
|
"license": "Elastic-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"repository": {
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
"table": "^6.9.0",
|
|
47
47
|
"ts-node": "^10.9.2",
|
|
48
48
|
"zod": "^4.1.13",
|
|
49
|
-
"@motiadev/adapter-
|
|
50
|
-
"@motiadev/adapter-redis-
|
|
51
|
-
"@motiadev/adapter-redis-
|
|
52
|
-
"@motiadev/
|
|
53
|
-
"@motiadev/
|
|
54
|
-
"@motiadev/
|
|
55
|
-
"@motiadev/
|
|
49
|
+
"@motiadev/adapter-bullmq-events": "0.17.11-beta.193",
|
|
50
|
+
"@motiadev/adapter-redis-streams": "0.17.11-beta.193",
|
|
51
|
+
"@motiadev/adapter-redis-cron": "0.17.11-beta.193",
|
|
52
|
+
"@motiadev/adapter-redis-state": "0.17.11-beta.193",
|
|
53
|
+
"@motiadev/core": "0.17.11-beta.193",
|
|
54
|
+
"@motiadev/stream-client-node": "0.17.11-beta.193",
|
|
55
|
+
"@motiadev/workbench": "0.17.11-beta.193"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@amplitude/analytics-types": "^2.9.2",
|