motia 0.14.0-beta.165-616219 → 0.14.0-beta.165-516298
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/create/templates/nodejs/steps/petstore/process-food-order.step.ts.txt +1 -1
- package/dist/create/templates/nodejs/steps/petstore/state-audit-cron.step.ts.txt +1 -1
- package/dist/load-motia-config.mjs +1 -1
- package/dist/load-motia-config.mjs.map +1 -1
- package/dist/plugins/load-config.mjs +2 -2
- package/dist/plugins/load-config.mjs.map +1 -1
- package/package.json +8 -8
|
@@ -10,7 +10,7 @@ const loadMotiaConfig = async (baseDir) => {
|
|
|
10
10
|
});
|
|
11
11
|
if (configFiles.length === 0) return {};
|
|
12
12
|
try {
|
|
13
|
-
return
|
|
13
|
+
return await jiti.import(configFiles[0], { default: true });
|
|
14
14
|
} catch (error) {
|
|
15
15
|
console.warn("Failed to load motia.config.ts:", error);
|
|
16
16
|
return {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-motia-config.mjs","names":[],"sources":["../src/load-motia-config.ts"],"sourcesContent":["import type { Config } from '@motiadev/core'\nimport { globSync } from 'glob'\nimport { createJiti } from 'jiti'\n\nexport type LoadedMotiaConfig = Config\n\nconst jiti = createJiti(import.meta.url)\n\nexport const loadMotiaConfig = async (baseDir: string): Promise<LoadedMotiaConfig> => {\n const configFiles = globSync('motia.config.{ts,js}', { absolute: true, cwd: baseDir })\n\n if (configFiles.length === 0) {\n return {}\n }\n\n try {\n const appConfig: Config = (await jiti.import(configFiles[0]))
|
|
1
|
+
{"version":3,"file":"load-motia-config.mjs","names":[],"sources":["../src/load-motia-config.ts"],"sourcesContent":["import type { Config } from '@motiadev/core'\nimport { globSync } from 'glob'\nimport { createJiti } from 'jiti'\n\nexport type LoadedMotiaConfig = Config\n\nconst jiti = createJiti(import.meta.url)\n\nexport const loadMotiaConfig = async (baseDir: string): Promise<LoadedMotiaConfig> => {\n const configFiles = globSync('motia.config.{ts,js}', { absolute: true, cwd: baseDir })\n\n if (configFiles.length === 0) {\n return {}\n }\n\n try {\n const appConfig: Config = (await jiti.import(configFiles[0], { default: true })) as Config\n return appConfig\n } catch (error) {\n console.warn('Failed to load motia.config.ts:', error)\n return {}\n }\n}\n"],"mappings":";;;;AAMA,MAAM,OAAO,WAAW,OAAO,KAAK,IAAI;AAExC,MAAa,kBAAkB,OAAO,YAAgD;CACpF,MAAM,cAAc,SAAS,wBAAwB;EAAE,UAAU;EAAM,KAAK;EAAS,CAAC;AAEtF,KAAI,YAAY,WAAW,EACzB,QAAO,EAAE;AAGX,KAAI;AAEF,SAD2B,MAAM,KAAK,OAAO,YAAY,IAAI,EAAE,SAAS,MAAM,CAAC;UAExE,OAAO;AACd,UAAQ,KAAK,mCAAmC,MAAM;AACtD,SAAO,EAAE"}
|
|
@@ -20,9 +20,9 @@ const loadConfig = async (baseDir, printer) => {
|
|
|
20
20
|
fs.writeFileSync(configPath, templateContent);
|
|
21
21
|
printer.printPluginLog("Created motia.config.ts");
|
|
22
22
|
await installPluginDependencies(baseDir, printer);
|
|
23
|
-
return
|
|
23
|
+
return await jiti.import(configPath, { default: true });
|
|
24
24
|
}
|
|
25
|
-
return
|
|
25
|
+
return await jiti.import(configFiles[0], { default: true });
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-config.mjs","names":[],"sources":["../../src/plugins/load-config.ts"],"sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport type { Config, Printer } from '@motiadev/core'\nimport { globSync } from 'glob'\nimport { createJiti } from 'jiti'\nimport { installPluginDependencies } from './install-plugin-dependencies'\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url))\nconst jiti = createJiti(import.meta.url)\n\nexport const loadConfig = async (baseDir: string, printer: Printer): Promise<Config> => {\n const configFiles = globSync('motia.config.{ts,js}', { absolute: true, cwd: baseDir })\n if (configFiles.length === 0) {\n const templatePath = path.join(__dirname, '../create/templates/nodejs/motia.config.ts.txt')\n const templateContent = fs.readFileSync(templatePath, 'utf-8')\n const configPath = path.join(baseDir, 'motia.config.ts')\n fs.writeFileSync(configPath, templateContent)\n printer.printPluginLog('Created motia.config.ts')\n\n await installPluginDependencies(baseDir, printer)\n\n return (await jiti.import(configPath))
|
|
1
|
+
{"version":3,"file":"load-config.mjs","names":[],"sources":["../../src/plugins/load-config.ts"],"sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport type { Config, Printer } from '@motiadev/core'\nimport { globSync } from 'glob'\nimport { createJiti } from 'jiti'\nimport { installPluginDependencies } from './install-plugin-dependencies'\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url))\nconst jiti = createJiti(import.meta.url)\n\nexport const loadConfig = async (baseDir: string, printer: Printer): Promise<Config> => {\n const configFiles = globSync('motia.config.{ts,js}', { absolute: true, cwd: baseDir })\n if (configFiles.length === 0) {\n const templatePath = path.join(__dirname, '../create/templates/nodejs/motia.config.ts.txt')\n const templateContent = fs.readFileSync(templatePath, 'utf-8')\n const configPath = path.join(baseDir, 'motia.config.ts')\n fs.writeFileSync(configPath, templateContent)\n printer.printPluginLog('Created motia.config.ts')\n\n await installPluginDependencies(baseDir, printer)\n\n return (await jiti.import(configPath, { default: true })) as Config\n }\n\n return (await jiti.import(configFiles[0], { default: true })) as Config\n}\n"],"mappings":";;;;;;;;AAQA,MAAM,YAAY,KAAK,QAAQ,cAAc,OAAO,KAAK,IAAI,CAAC;AAC9D,MAAM,OAAO,WAAW,OAAO,KAAK,IAAI;AAExC,MAAa,aAAa,OAAO,SAAiB,YAAsC;CACtF,MAAM,cAAc,SAAS,wBAAwB;EAAE,UAAU;EAAM,KAAK;EAAS,CAAC;AACtF,KAAI,YAAY,WAAW,GAAG;EAC5B,MAAM,eAAe,KAAK,KAAK,WAAW,iDAAiD;EAC3F,MAAM,kBAAkB,GAAG,aAAa,cAAc,QAAQ;EAC9D,MAAM,aAAa,KAAK,KAAK,SAAS,kBAAkB;AACxD,KAAG,cAAc,YAAY,gBAAgB;AAC7C,UAAQ,eAAe,0BAA0B;AAEjD,QAAM,0BAA0B,SAAS,QAAQ;AAEjD,SAAQ,MAAM,KAAK,OAAO,YAAY,EAAE,SAAS,MAAM,CAAC;;AAG1D,QAAQ,MAAM,KAAK,OAAO,YAAY,IAAI,EAAE,SAAS,MAAM,CAAC"}
|
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.14.0-beta.165-
|
|
4
|
+
"version": "0.14.0-beta.165-516298",
|
|
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.12",
|
|
49
|
-
"@motiadev/adapter-bullmq-events": "0.14.0-beta.165-
|
|
50
|
-
"@motiadev/adapter-redis-
|
|
51
|
-
"@motiadev/adapter-redis-
|
|
52
|
-
"@motiadev/
|
|
53
|
-
"@motiadev/stream-client-node": "0.14.0-beta.165-
|
|
54
|
-
"@motiadev/workbench": "0.14.0-beta.165-
|
|
55
|
-
"@motiadev/
|
|
49
|
+
"@motiadev/adapter-bullmq-events": "0.14.0-beta.165-516298",
|
|
50
|
+
"@motiadev/adapter-redis-cron": "0.14.0-beta.165-516298",
|
|
51
|
+
"@motiadev/adapter-redis-streams": "0.14.0-beta.165-516298",
|
|
52
|
+
"@motiadev/core": "0.14.0-beta.165-516298",
|
|
53
|
+
"@motiadev/stream-client-node": "0.14.0-beta.165-516298",
|
|
54
|
+
"@motiadev/workbench": "0.14.0-beta.165-516298",
|
|
55
|
+
"@motiadev/adapter-redis-state": "0.14.0-beta.165-516298"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@amplitude/analytics-types": "^2.9.2",
|