motia 0.17.11-beta.193 → 0.17.11-beta.194-563479
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/README.md +1 -3
- package/dist/install.mjs +18 -13
- package/dist/install.mjs.map +1 -1
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ Follow the prompts to pick a template, project name, and language.
|
|
|
46
46
|
Inside your new project folder, launch the dev server:
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
|
|
49
|
+
npm run dev # ➜ http://localhost:3000
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
This spins up the Motia Workbench – a local UI for building, testing & observing your backend in real-time.
|
|
@@ -245,8 +245,6 @@ npm run dev [options]
|
|
|
245
245
|
yarn dev [options]
|
|
246
246
|
# or
|
|
247
247
|
pnpm dev [options]
|
|
248
|
-
# or
|
|
249
|
-
bun run dev [options]
|
|
250
248
|
|
|
251
249
|
# options:
|
|
252
250
|
# -p, --port <port> The port to run the server on (default: 3000)
|
package/dist/install.mjs
CHANGED
|
@@ -2,13 +2,13 @@ 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 } from "./utils/activate-python-env.mjs";
|
|
5
|
+
import { activatePythonVenv, getSitePackagesPath } 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";
|
|
9
|
-
import fs from "fs";
|
|
10
|
-
import path from "path";
|
|
11
9
|
import pc from "picocolors";
|
|
10
|
+
import fs from "node:fs";
|
|
11
|
+
import path from "node:path";
|
|
12
12
|
|
|
13
13
|
//#region src/install.ts
|
|
14
14
|
const pythonInstall = async ({ baseDir, isVerbose = false, pythonVersion = "3.13" }) => {
|
|
@@ -22,9 +22,21 @@ const pythonInstall = async ({ baseDir, isVerbose = false, pythonVersion = "3.13
|
|
|
22
22
|
try {
|
|
23
23
|
const pythonCmd = await getPythonCommand(pythonVersion, baseDir);
|
|
24
24
|
if (isVerbose) console.log(`🐍 Using Python command: ${pythonCmd}`);
|
|
25
|
-
if (
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
if (fs.existsSync(venvPath)) fs.rmSync(venvPath, {
|
|
26
|
+
recursive: true,
|
|
27
|
+
force: true
|
|
28
|
+
});
|
|
29
|
+
console.log("📦 Creating Python virtual environment...");
|
|
30
|
+
await executeCommand(`${pythonCmd} -m venv python_modules`, baseDir);
|
|
31
|
+
const sitePackagesPath = getSitePackagesPath({
|
|
32
|
+
baseDir,
|
|
33
|
+
pythonVersion
|
|
34
|
+
});
|
|
35
|
+
if (!sitePackagesPath || !fs.existsSync(sitePackagesPath)) {
|
|
36
|
+
const installCmd = getInstallCommand(baseDir);
|
|
37
|
+
internalLogger.error("Python virtual environment was not created");
|
|
38
|
+
internalLogger.info(`Please try running ${pc.cyan(installCmd)} or manually create the venv with: ${pc.cyan("python3 -m venv python_modules")}`);
|
|
39
|
+
process.exit(1);
|
|
28
40
|
}
|
|
29
41
|
activatePythonVenv({
|
|
30
42
|
baseDir,
|
|
@@ -43,13 +55,6 @@ const pythonInstall = async ({ baseDir, isVerbose = false, pythonVersion = "3.13
|
|
|
43
55
|
if (isVerbose) console.log("📄 Using requirements from:", requirement);
|
|
44
56
|
await executeCommand(`pip install -r "${requirement}" --only-binary=:all:`, baseDir);
|
|
45
57
|
}
|
|
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
|
-
}
|
|
53
58
|
} catch (error) {
|
|
54
59
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
55
60
|
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 } 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 (
|
|
1
|
+
{"version":3,"file":"install.mjs","names":[],"sources":["../src/install.ts"],"sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\nimport pc from 'picocolors'\nimport { getStepFiles, getStreamFiles } from './generate-locked-data'\nimport { activatePythonVenv, getSitePackagesPath } 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 fs.rmSync(venvPath, { recursive: true, force: true })\n }\n\n console.log('📦 Creating Python virtual environment...')\n await executeCommand(`${pythonCmd} -m venv python_modules`, baseDir)\n\n const sitePackagesPath = getSitePackagesPath({ baseDir, pythonVersion })\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\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 } 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,GAAG,WAAW,SAAS,CACzB,IAAG,OAAO,UAAU;G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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.11-beta.
|
|
4
|
+
"version": "0.17.11-beta.194-563479",
|
|
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-
|
|
52
|
-
"@motiadev/
|
|
53
|
-
"@motiadev/core": "0.17.11-beta.
|
|
54
|
-
"@motiadev/
|
|
55
|
-
"@motiadev/workbench": "0.17.11-beta.
|
|
49
|
+
"@motiadev/adapter-redis-cron": "0.17.11-beta.194-563479",
|
|
50
|
+
"@motiadev/adapter-redis-state": "0.17.11-beta.194-563479",
|
|
51
|
+
"@motiadev/adapter-bullmq-events": "0.17.11-beta.194-563479",
|
|
52
|
+
"@motiadev/stream-client-node": "0.17.11-beta.194-563479",
|
|
53
|
+
"@motiadev/core": "0.17.11-beta.194-563479",
|
|
54
|
+
"@motiadev/adapter-redis-streams": "0.17.11-beta.194-563479",
|
|
55
|
+
"@motiadev/workbench": "0.17.11-beta.194-563479"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@amplitude/analytics-types": "^2.9.2",
|