motia 0.13.2-beta.164-704005 → 0.14.0-beta.164
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/cloud/new-deployment/build.d.ts.map +1 -1
- package/dist/cjs/cloud/new-deployment/build.js +1 -3
- package/dist/cjs/create/index.d.ts.map +1 -1
- package/dist/cjs/create/index.js +7 -4
- package/dist/cjs/create/templates/hello/motia.config.ts.txt +2 -1
- package/dist/cjs/create/templates/hello_js/motia.config.ts.txt +2 -1
- package/dist/cjs/create/templates/hello_python/motia.config.ts.txt +2 -1
- package/dist/cjs/create/templates/nodejs/motia.config.ts.txt +2 -1
- package/dist/cjs/create/templates/python/motia.config.ts.txt +2 -1
- package/dist/cjs/dev.d.ts.map +1 -1
- package/dist/cjs/dev.js +11 -2
- package/dist/cjs/generate-locked-data.d.ts +2 -2
- package/dist/cjs/generate-locked-data.d.ts.map +1 -1
- package/dist/cjs/generate-locked-data.js +1 -1
- package/dist/cjs/generate-types.d.ts.map +1 -1
- package/dist/cjs/generate-types.js +1 -3
- package/dist/cjs/plugins/create-plugin-context.d.ts.map +1 -1
- package/dist/cjs/plugins/create-plugin-context.js +1 -0
- package/dist/cjs/plugins/plugin-dependencies.d.ts.map +1 -1
- package/dist/cjs/plugins/plugin-dependencies.js +1 -0
- package/dist/cjs/redis-memory-manager.d.ts.map +1 -1
- package/dist/cjs/redis-memory-manager.js +1 -3
- package/dist/cjs/start.d.ts.map +1 -1
- package/dist/cjs/start.js +10 -2
- package/dist/cjs/utils/analytics.d.ts.map +1 -1
- package/dist/cjs/utils/analytics.js +3 -1
- package/dist/esm/cloud/new-deployment/build.d.ts.map +1 -1
- package/dist/esm/cloud/new-deployment/build.js +1 -3
- package/dist/esm/create/index.d.ts.map +1 -1
- package/dist/esm/create/index.js +7 -4
- package/dist/esm/create/templates/hello/motia.config.ts.txt +2 -1
- package/dist/esm/create/templates/hello_js/motia.config.ts.txt +2 -1
- package/dist/esm/create/templates/hello_python/motia.config.ts.txt +2 -1
- package/dist/esm/create/templates/nodejs/motia.config.ts.txt +2 -1
- package/dist/esm/create/templates/python/motia.config.ts.txt +2 -1
- package/dist/esm/dev.d.ts.map +1 -1
- package/dist/esm/dev.js +12 -3
- package/dist/esm/generate-locked-data.d.ts +2 -2
- package/dist/esm/generate-locked-data.d.ts.map +1 -1
- package/dist/esm/generate-locked-data.js +2 -2
- package/dist/esm/generate-types.d.ts.map +1 -1
- package/dist/esm/generate-types.js +1 -3
- package/dist/esm/plugins/create-plugin-context.d.ts.map +1 -1
- package/dist/esm/plugins/create-plugin-context.js +1 -0
- package/dist/esm/plugins/plugin-dependencies.d.ts.map +1 -1
- package/dist/esm/plugins/plugin-dependencies.js +1 -0
- package/dist/esm/redis-memory-manager.d.ts.map +1 -1
- package/dist/esm/redis-memory-manager.js +1 -3
- package/dist/esm/start.d.ts.map +1 -1
- package/dist/esm/start.js +11 -3
- package/dist/esm/utils/analytics.d.ts.map +1 -1
- package/dist/esm/utils/analytics.js +3 -1
- package/dist/types/cloud/new-deployment/build.d.ts.map +1 -1
- package/dist/types/create/index.d.ts.map +1 -1
- package/dist/types/dev.d.ts.map +1 -1
- package/dist/types/generate-locked-data.d.ts +2 -2
- package/dist/types/generate-locked-data.d.ts.map +1 -1
- package/dist/types/generate-types.d.ts.map +1 -1
- package/dist/types/plugins/create-plugin-context.d.ts.map +1 -1
- package/dist/types/plugins/plugin-dependencies.d.ts.map +1 -1
- package/dist/types/redis-memory-manager.d.ts.map +1 -1
- package/dist/types/start.d.ts.map +1 -1
- package/dist/types/utils/analytics.d.ts.map +1 -1
- package/package.json +8 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../src/cloud/new-deployment/build.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../src/cloud/new-deployment/build.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAwB,MAAM,kBAAkB,CAAA;AAIhE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAM/D,eAAO,MAAM,KAAK,GAAU,UAAU,aAAa,KAAG,OAAO,CAAC,OAAO,CAsDpE,CAAA"}
|
|
@@ -8,7 +8,6 @@ const core_1 = require("@motiadev/core");
|
|
|
8
8
|
const printer_1 = require("@motiadev/core/dist/src/printer");
|
|
9
9
|
const fs_1 = __importDefault(require("fs"));
|
|
10
10
|
const generate_locked_data_1 = require("../../generate-locked-data");
|
|
11
|
-
const redis_memory_manager_1 = require("../../redis-memory-manager");
|
|
12
11
|
const build_error_1 = require("../../utils/errors/build.error");
|
|
13
12
|
const builder_1 = require("../build/builder");
|
|
14
13
|
const node_1 = require("../build/builders/node");
|
|
@@ -28,8 +27,7 @@ const build = async (listener) => {
|
|
|
28
27
|
builder.registerBuilder('node', new node_1.NodeBuilder(builder, listener));
|
|
29
28
|
fs_1.default.rmSync(constants_1.distDir, { recursive: true, force: true });
|
|
30
29
|
fs_1.default.mkdirSync(constants_1.distDir, { recursive: true });
|
|
31
|
-
const
|
|
32
|
-
const lockedData = new core_1.LockedData(constants_1.projectDir, new core_1.MemoryStreamAdapterManager(), new printer_1.NoPrinter(), redisClient);
|
|
30
|
+
const lockedData = new core_1.LockedData(constants_1.projectDir, new core_1.MemoryStreamAdapterManager(), new printer_1.NoPrinter());
|
|
33
31
|
if (hasPythonSteps([...stepFiles, ...streamFiles])) {
|
|
34
32
|
builder.registerBuilder('python', new python_1.PythonBuilder(builder, listener));
|
|
35
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/create/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/create/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AA2EvD,KAAK,IAAI,GAAG;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,EAAE,OAAO,CAAA;IACtB,OAAO,EAAE,UAAU,CAAA;IACnB,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,CAAA;AAED,eAAO,MAAM,MAAM,GAAU,mDAAmD,IAAI,KAAG,OAAO,CAAC,IAAI,CA6KlG,CAAA"}
|
package/dist/cjs/create/index.js
CHANGED
|
@@ -27,10 +27,13 @@ const installRequiredDependencies = async (packageManager, rootDir, context) =>
|
|
|
27
27
|
yarn: 'yarn add',
|
|
28
28
|
pnpm: 'pnpm add',
|
|
29
29
|
}[packageManager];
|
|
30
|
-
const dependencies = [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
const dependencies = [
|
|
31
|
+
`motia@${version_1.version}`,
|
|
32
|
+
'zod@4.1.12',
|
|
33
|
+
`@motiadev/adapter-bullmq-events@${version_1.version}`,
|
|
34
|
+
...plugin_dependencies_1.pluginDependencies.map((dep) => `${dep}@${version_1.version}`),
|
|
35
|
+
].join(' ');
|
|
36
|
+
const devDependencies = ['ts-node@10.9.2', 'typescript@5.7.3', '@types/react@19.1.1'].join(' ');
|
|
34
37
|
try {
|
|
35
38
|
await (0, execute_command_1.executeCommand)(`${installCommand} ${dependencies}`, rootDir);
|
|
36
39
|
await (0, execute_command_1.executeCommand)(`${installCommand} -D ${devDependencies}`, rootDir);
|
|
@@ -3,7 +3,8 @@ const statesPlugin = require('@motiadev/plugin-states/plugin')
|
|
|
3
3
|
const endpointPlugin = require('@motiadev/plugin-endpoint/plugin')
|
|
4
4
|
const logsPlugin = require('@motiadev/plugin-logs/plugin')
|
|
5
5
|
const observabilityPlugin = require('@motiadev/plugin-observability/plugin')
|
|
6
|
+
const bullmqPlugin = require('@motiadev/plugin-bullmq/plugin')
|
|
6
7
|
|
|
7
8
|
export default config({
|
|
8
|
-
plugins: [observabilityPlugin, statesPlugin, endpointPlugin, logsPlugin],
|
|
9
|
+
plugins: [observabilityPlugin, statesPlugin, endpointPlugin, logsPlugin, bullmqPlugin],
|
|
9
10
|
})
|
|
@@ -3,7 +3,8 @@ const statesPlugin = require('@motiadev/plugin-states/plugin')
|
|
|
3
3
|
const endpointPlugin = require('@motiadev/plugin-endpoint/plugin')
|
|
4
4
|
const logsPlugin = require('@motiadev/plugin-logs/plugin')
|
|
5
5
|
const observabilityPlugin = require('@motiadev/plugin-observability/plugin')
|
|
6
|
+
const bullmqPlugin = require('@motiadev/plugin-bullmq/plugin')
|
|
6
7
|
|
|
7
8
|
export default config({
|
|
8
|
-
plugins: [observabilityPlugin, statesPlugin, endpointPlugin, logsPlugin],
|
|
9
|
+
plugins: [observabilityPlugin, statesPlugin, endpointPlugin, logsPlugin, bullmqPlugin],
|
|
9
10
|
})
|
|
@@ -3,7 +3,8 @@ const statesPlugin = require('@motiadev/plugin-states/plugin')
|
|
|
3
3
|
const endpointPlugin = require('@motiadev/plugin-endpoint/plugin')
|
|
4
4
|
const logsPlugin = require('@motiadev/plugin-logs/plugin')
|
|
5
5
|
const observabilityPlugin = require('@motiadev/plugin-observability/plugin')
|
|
6
|
+
const bullmqPlugin = require('@motiadev/plugin-bullmq/plugin')
|
|
6
7
|
|
|
7
8
|
export default config({
|
|
8
|
-
plugins: [observabilityPlugin, statesPlugin, endpointPlugin, logsPlugin],
|
|
9
|
+
plugins: [observabilityPlugin, statesPlugin, endpointPlugin, logsPlugin, bullmqPlugin],
|
|
9
10
|
})
|
|
@@ -3,7 +3,8 @@ const statesPlugin = require('@motiadev/plugin-states/plugin')
|
|
|
3
3
|
const endpointPlugin = require('@motiadev/plugin-endpoint/plugin')
|
|
4
4
|
const logsPlugin = require('@motiadev/plugin-logs/plugin')
|
|
5
5
|
const observabilityPlugin = require('@motiadev/plugin-observability/plugin')
|
|
6
|
+
const bullmqPlugin = require('@motiadev/plugin-bullmq/plugin')
|
|
6
7
|
|
|
7
8
|
export default config({
|
|
8
|
-
plugins: [observabilityPlugin, statesPlugin, endpointPlugin, logsPlugin],
|
|
9
|
+
plugins: [observabilityPlugin, statesPlugin, endpointPlugin, logsPlugin, bullmqPlugin],
|
|
9
10
|
})
|
|
@@ -3,7 +3,8 @@ const statesPlugin = require('@motiadev/plugin-states/plugin')
|
|
|
3
3
|
const endpointPlugin = require('@motiadev/plugin-endpoint/plugin')
|
|
4
4
|
const logsPlugin = require('@motiadev/plugin-logs/plugin')
|
|
5
5
|
const observabilityPlugin = require('@motiadev/plugin-observability/plugin')
|
|
6
|
+
const bullmqPlugin = require('@motiadev/plugin-bullmq/plugin')
|
|
6
7
|
|
|
7
8
|
export default config({
|
|
8
|
-
plugins: [observabilityPlugin, statesPlugin, endpointPlugin, logsPlugin],
|
|
9
|
+
plugins: [observabilityPlugin, statesPlugin, endpointPlugin, logsPlugin, bullmqPlugin],
|
|
9
10
|
})
|
package/dist/cjs/dev.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/dev.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/dev.ts"],"names":[],"mappings":"AA+BA,eAAO,MAAM,GAAG,GACd,MAAM,MAAM,EACZ,UAAU,MAAM,EAChB,gBAAgB,OAAO,EACvB,eAAe,OAAO,EACtB,sBAAsB,MAAM,KAC3B,OAAO,CAAC,IAAI,CA4Hd,CAAA"}
|
package/dist/cjs/dev.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.dev = void 0;
|
|
4
4
|
const analytics_node_1 = require("@amplitude/analytics-node");
|
|
5
|
+
const adapter_bullmq_events_1 = require("@motiadev/adapter-bullmq-events");
|
|
6
|
+
const adapter_redis_cron_1 = require("@motiadev/adapter-redis-cron");
|
|
5
7
|
const adapter_redis_state_1 = require("@motiadev/adapter-redis-state");
|
|
6
8
|
const adapter_redis_streams_1 = require("@motiadev/adapter-redis-streams");
|
|
7
9
|
const core_1 = require("@motiadev/core");
|
|
@@ -42,8 +44,15 @@ const dev = async (port, hostname, disableVerbose, enableMermaid, motiaFileStora
|
|
|
42
44
|
const appConfig = await (0, load_motia_config_1.loadMotiaConfig)(baseDir);
|
|
43
45
|
const redisClient = await (0, redis_memory_manager_1.instanceRedisMemoryServer)(motiaFileStoragePath, true);
|
|
44
46
|
const adapters = {
|
|
45
|
-
eventAdapter: appConfig.adapters?.events ||
|
|
46
|
-
|
|
47
|
+
eventAdapter: appConfig.adapters?.events ||
|
|
48
|
+
new adapter_bullmq_events_1.BullMQEventAdapter({
|
|
49
|
+
connection: {
|
|
50
|
+
host: redisClient.options.socket?.host || 'localhost',
|
|
51
|
+
port: redisClient.options.socket?.port || 6379,
|
|
52
|
+
},
|
|
53
|
+
prefix: 'motia:events',
|
|
54
|
+
}),
|
|
55
|
+
cronAdapter: appConfig.adapters?.cron || new adapter_redis_cron_1.RedisCronAdapter(redisClient),
|
|
47
56
|
streamAdapter: appConfig.adapters?.streams || new adapter_redis_streams_1.RedisStreamAdapterManager(redisClient),
|
|
48
57
|
};
|
|
49
58
|
const lockedData = await (0, generate_locked_data_1.generateLockedData)({
|
|
@@ -9,8 +9,8 @@ type StreamAuthOptions = {
|
|
|
9
9
|
};
|
|
10
10
|
export declare const generateLockedData: (config: {
|
|
11
11
|
projectDir: string;
|
|
12
|
-
streamAdapter
|
|
13
|
-
redisClient
|
|
12
|
+
streamAdapter?: StreamAdapterManager;
|
|
13
|
+
redisClient?: RedisClientType;
|
|
14
14
|
printerType?: "disabled" | "default";
|
|
15
15
|
streamAuth?: StreamAuthOptions;
|
|
16
16
|
}) => Promise<LockedData>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-locked-data.d.ts","sourceRoot":"","sources":["../../src/generate-locked-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EACf,UAAU,
|
|
1
|
+
{"version":3,"file":"generate-locked-data.d.ts","sourceRoot":"","sources":["../../src/generate-locked-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EACf,UAAU,EAEV,KAAK,IAAI,EACT,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAA;AAOvB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,OAAO,CAAA;AAiB5C,eAAO,MAAM,YAAY,GAAI,YAAY,MAAM,KAAG,MAAM,EAIvD,CAAA;AAYD,eAAO,MAAM,cAAc,GAAI,YAAY,MAAM,KAAG,MAAM,EAIzD,CAAA;AAGD,eAAO,MAAM,YAAY,GAAU,YAAY,MAAM,EAAE,YAAY,UAAU,KAAG,OAAO,CAAC,IAAI,EAAE,CAmF7F,CAAA;AAED,KAAK,iBAAiB,GAAG;IACvB,YAAY,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAA;IAC9C,aAAa,CAAC,EAAE,UAAU,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAU,QAAQ;IAC/C,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,oBAAoB,CAAA;IACpC,WAAW,CAAC,EAAE,eAAe,CAAA;IAC7B,WAAW,CAAC,EAAE,UAAU,GAAG,SAAS,CAAA;IACpC,UAAU,CAAC,EAAE,iBAAiB,CAAA;CAC/B,KAAG,OAAO,CAAC,UAAU,CA6BrB,CAAA"}
|
|
@@ -113,7 +113,7 @@ const collectFlows = async (projectDir, lockedData) => {
|
|
|
113
113
|
exports.collectFlows = collectFlows;
|
|
114
114
|
const generateLockedData = async (config) => {
|
|
115
115
|
try {
|
|
116
|
-
const { projectDir, streamAdapter, printerType = 'default', redisClient, streamAuth } = config;
|
|
116
|
+
const { projectDir, streamAdapter = new core_1.MemoryStreamAdapterManager(), printerType = 'default', redisClient, streamAuth, } = config;
|
|
117
117
|
const printer = printerType === 'disabled' ? new printer_1.NoPrinter() : new printer_1.Printer(projectDir);
|
|
118
118
|
/*
|
|
119
119
|
* NOTE: right now for performance and simplicity let's enforce a folder,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-types.d.ts","sourceRoot":"","sources":["../../src/generate-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate-types.d.ts","sourceRoot":"","sources":["../../src/generate-types.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa,GAAU,YAAY,MAAM,kBAyBrD,CAAA"}
|
|
@@ -8,13 +8,11 @@ const core_1 = require("@motiadev/core");
|
|
|
8
8
|
const crypto_1 = require("crypto");
|
|
9
9
|
const picocolors_1 = __importDefault(require("picocolors"));
|
|
10
10
|
const generate_locked_data_1 = require("./generate-locked-data");
|
|
11
|
-
const redis_memory_manager_1 = require("./redis-memory-manager");
|
|
12
11
|
const version = `${(0, crypto_1.randomUUID)()}:${Math.floor(Date.now() / 1000)}`;
|
|
13
12
|
const generateTypes = async (projectDir) => {
|
|
14
13
|
const files = (0, generate_locked_data_1.getStepFiles)(projectDir);
|
|
15
14
|
const streamsFiles = (0, generate_locked_data_1.getStreamFiles)(projectDir);
|
|
16
|
-
const
|
|
17
|
-
const lockedData = new core_1.LockedData(projectDir, new core_1.MemoryStreamAdapterManager(), new core_1.Printer(projectDir), redisClient);
|
|
15
|
+
const lockedData = new core_1.LockedData(projectDir, new core_1.MemoryStreamAdapterManager(), new core_1.Printer(projectDir));
|
|
18
16
|
for (const filePath of files) {
|
|
19
17
|
const config = await (0, core_1.getStepConfig)(filePath, projectDir);
|
|
20
18
|
if (config) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-plugin-context.d.ts","sourceRoot":"","sources":["../../../src/plugins/create-plugin-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,kBAAkB,EAClB,WAAW,EAIZ,MAAM,gBAAgB,CAAA;AAEvB,eAAO,MAAM,mBAAmB,GAAI,aAAa,WAAW,KAAG,
|
|
1
|
+
{"version":3,"file":"create-plugin-context.d.ts","sourceRoot":"","sources":["../../../src/plugins/create-plugin-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,kBAAkB,EAClB,WAAW,EAIZ,MAAM,gBAAgB,CAAA;AAEvB,eAAO,MAAM,mBAAmB,GAAI,aAAa,WAAW,KAAG,kBAqC9D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-dependencies.d.ts","sourceRoot":"","sources":["../../../src/plugins/plugin-dependencies.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"plugin-dependencies.d.ts","sourceRoot":"","sources":["../../../src/plugins/plugin-dependencies.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,UAO9B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis-memory-manager.d.ts","sourceRoot":"","sources":["../../src/redis-memory-manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,eAAe,EAAE,MAAM,OAAO,CAAA;AAI1D,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb;
|
|
1
|
+
{"version":3,"file":"redis-memory-manager.d.ts","sourceRoot":"","sources":["../../src/redis-memory-manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,eAAe,EAAE,MAAM,OAAO,CAAA;AAI1D,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb;AAiID,eAAO,MAAM,yBAAyB,GAAI,SAAS,MAAM,EAAE,YAAW,OAAc,KAAG,OAAO,CAAC,eAAe,CAC3E,CAAA;AAEnC,eAAO,MAAM,qBAAqB,QAAO,OAAO,CAAC,IAAI,CAAmB,CAAA"}
|
|
@@ -89,9 +89,7 @@ class RedisMemoryManager {
|
|
|
89
89
|
if (this.client && this.running) {
|
|
90
90
|
try {
|
|
91
91
|
if (this.client.isOpen) {
|
|
92
|
-
await this.client.quit().catch(
|
|
93
|
-
console.error('[Redis Memory Server] Error closing client:', error);
|
|
94
|
-
});
|
|
92
|
+
await this.client.quit().catch();
|
|
95
93
|
}
|
|
96
94
|
this.client = null;
|
|
97
95
|
}
|
package/dist/cjs/start.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../src/start.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../src/start.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,KAAK,GAChB,MAAM,MAAM,EACZ,UAAU,MAAM,EAChB,gBAAgB,OAAO,EACvB,sBAAsB,MAAM,KAC3B,OAAO,CAAC,IAAI,CAsEd,CAAA"}
|
package/dist/cjs/start.js
CHANGED
|
@@ -4,6 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.start = void 0;
|
|
7
|
+
const adapter_bullmq_events_1 = require("@motiadev/adapter-bullmq-events");
|
|
8
|
+
const adapter_redis_cron_1 = require("@motiadev/adapter-redis-cron");
|
|
7
9
|
const adapter_redis_state_1 = require("@motiadev/adapter-redis-state");
|
|
8
10
|
const adapter_redis_streams_1 = require("@motiadev/adapter-redis-streams");
|
|
9
11
|
const core_1 = require("@motiadev/core");
|
|
@@ -33,8 +35,14 @@ const start = async (port, hostname, disableVerbose, motiaFileStorageDir) => {
|
|
|
33
35
|
const appConfig = await (0, load_motia_config_1.loadMotiaConfig)(baseDir);
|
|
34
36
|
const redisClient = await (0, redis_memory_manager_1.instanceRedisMemoryServer)(dotMotia);
|
|
35
37
|
const adapters = {
|
|
36
|
-
eventAdapter: appConfig.adapters?.events ||
|
|
37
|
-
|
|
38
|
+
eventAdapter: appConfig.adapters?.events ||
|
|
39
|
+
new adapter_bullmq_events_1.BullMQEventAdapter({
|
|
40
|
+
connection: {
|
|
41
|
+
host: redisClient.options.socket?.host || 'localhost',
|
|
42
|
+
port: redisClient.options.socket?.port || 6379,
|
|
43
|
+
},
|
|
44
|
+
}),
|
|
45
|
+
cronAdapter: appConfig.adapters?.cron || new adapter_redis_cron_1.RedisCronAdapter(redisClient),
|
|
38
46
|
streamAdapter: appConfig.adapters?.streams || new adapter_redis_streams_1.RedisStreamAdapterManager(redisClient),
|
|
39
47
|
};
|
|
40
48
|
const lockedData = await (0, generate_locked_data_1.generateLockedData)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../src/utils/analytics.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAejD,eAAO,MAAM,eAAe,YAE3B,CAAA;AAED,eAAO,MAAM,gBAAgB,YAE5B,CAAA;AAED,eAAO,MAAM,YAAY,YAYxB,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,EAAE,OAAO,UAAU,SAkB7D,CAAA;AAkBD,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,KAAG,
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../src/utils/analytics.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAejD,eAAO,MAAM,eAAe,YAE3B,CAAA;AAED,eAAO,MAAM,gBAAgB,YAE5B,CAAA;AAED,eAAO,MAAM,YAAY,YAYxB,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,EAAE,OAAO,UAAU,SAkB7D,CAAA;AAkBD,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,KAAG,CAelF,CAAA"}
|
|
@@ -79,7 +79,9 @@ const wrapAction = (action) => {
|
|
|
79
79
|
}
|
|
80
80
|
catch (error) {
|
|
81
81
|
const commandName = getCommandNameFromArgs();
|
|
82
|
-
(
|
|
82
|
+
if (error instanceof build_error_1.BuildError) {
|
|
83
|
+
(0, exports.logCliError)(commandName, error);
|
|
84
|
+
}
|
|
83
85
|
await (0, analytics_node_1.flush)().promise.catch(() => {
|
|
84
86
|
// Silently fail
|
|
85
87
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../src/cloud/new-deployment/build.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../src/cloud/new-deployment/build.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAwB,MAAM,kBAAkB,CAAA;AAIhE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAM/D,eAAO,MAAM,KAAK,GAAU,UAAU,aAAa,KAAG,OAAO,CAAC,OAAO,CAsDpE,CAAA"}
|
|
@@ -2,7 +2,6 @@ import { isApiStep, LockedData, MemoryStreamAdapterManager } from '@motiadev/cor
|
|
|
2
2
|
import { NoPrinter } from '@motiadev/core/dist/src/printer';
|
|
3
3
|
import fs from 'fs';
|
|
4
4
|
import { collectFlows, getStepFiles, getStreamFiles } from '../../generate-locked-data';
|
|
5
|
-
import { instanceRedisMemoryServer } from '../../redis-memory-manager';
|
|
6
5
|
import { BuildError, BuildErrorType } from '../../utils/errors/build.error';
|
|
7
6
|
import { Builder } from '../build/builder';
|
|
8
7
|
import { NodeBuilder } from '../build/builders/node';
|
|
@@ -22,8 +21,7 @@ export const build = async (listener) => {
|
|
|
22
21
|
builder.registerBuilder('node', new NodeBuilder(builder, listener));
|
|
23
22
|
fs.rmSync(distDir, { recursive: true, force: true });
|
|
24
23
|
fs.mkdirSync(distDir, { recursive: true });
|
|
25
|
-
const
|
|
26
|
-
const lockedData = new LockedData(projectDir, new MemoryStreamAdapterManager(), new NoPrinter(), redisClient);
|
|
24
|
+
const lockedData = new LockedData(projectDir, new MemoryStreamAdapterManager(), new NoPrinter());
|
|
27
25
|
if (hasPythonSteps([...stepFiles, ...streamFiles])) {
|
|
28
26
|
builder.registerBuilder('python', new PythonBuilder(builder, listener));
|
|
29
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/create/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/create/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AA2EvD,KAAK,IAAI,GAAG;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,EAAE,OAAO,CAAA;IACtB,OAAO,EAAE,UAAU,CAAA;IACnB,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,CAAA;AAED,eAAO,MAAM,MAAM,GAAU,mDAAmD,IAAI,KAAG,OAAO,CAAC,IAAI,CA6KlG,CAAA"}
|
package/dist/esm/create/index.js
CHANGED
|
@@ -21,10 +21,13 @@ const installRequiredDependencies = async (packageManager, rootDir, context) =>
|
|
|
21
21
|
yarn: 'yarn add',
|
|
22
22
|
pnpm: 'pnpm add',
|
|
23
23
|
}[packageManager];
|
|
24
|
-
const dependencies = [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
const dependencies = [
|
|
25
|
+
`motia@${version}`,
|
|
26
|
+
'zod@4.1.12',
|
|
27
|
+
`@motiadev/adapter-bullmq-events@${version}`,
|
|
28
|
+
...pluginDependencies.map((dep) => `${dep}@${version}`),
|
|
29
|
+
].join(' ');
|
|
30
|
+
const devDependencies = ['ts-node@10.9.2', 'typescript@5.7.3', '@types/react@19.1.1'].join(' ');
|
|
28
31
|
try {
|
|
29
32
|
await executeCommand(`${installCommand} ${dependencies}`, rootDir);
|
|
30
33
|
await executeCommand(`${installCommand} -D ${devDependencies}`, rootDir);
|
|
@@ -3,7 +3,8 @@ const statesPlugin = require('@motiadev/plugin-states/plugin')
|
|
|
3
3
|
const endpointPlugin = require('@motiadev/plugin-endpoint/plugin')
|
|
4
4
|
const logsPlugin = require('@motiadev/plugin-logs/plugin')
|
|
5
5
|
const observabilityPlugin = require('@motiadev/plugin-observability/plugin')
|
|
6
|
+
const bullmqPlugin = require('@motiadev/plugin-bullmq/plugin')
|
|
6
7
|
|
|
7
8
|
export default config({
|
|
8
|
-
plugins: [observabilityPlugin, statesPlugin, endpointPlugin, logsPlugin],
|
|
9
|
+
plugins: [observabilityPlugin, statesPlugin, endpointPlugin, logsPlugin, bullmqPlugin],
|
|
9
10
|
})
|
|
@@ -3,7 +3,8 @@ const statesPlugin = require('@motiadev/plugin-states/plugin')
|
|
|
3
3
|
const endpointPlugin = require('@motiadev/plugin-endpoint/plugin')
|
|
4
4
|
const logsPlugin = require('@motiadev/plugin-logs/plugin')
|
|
5
5
|
const observabilityPlugin = require('@motiadev/plugin-observability/plugin')
|
|
6
|
+
const bullmqPlugin = require('@motiadev/plugin-bullmq/plugin')
|
|
6
7
|
|
|
7
8
|
export default config({
|
|
8
|
-
plugins: [observabilityPlugin, statesPlugin, endpointPlugin, logsPlugin],
|
|
9
|
+
plugins: [observabilityPlugin, statesPlugin, endpointPlugin, logsPlugin, bullmqPlugin],
|
|
9
10
|
})
|
|
@@ -3,7 +3,8 @@ const statesPlugin = require('@motiadev/plugin-states/plugin')
|
|
|
3
3
|
const endpointPlugin = require('@motiadev/plugin-endpoint/plugin')
|
|
4
4
|
const logsPlugin = require('@motiadev/plugin-logs/plugin')
|
|
5
5
|
const observabilityPlugin = require('@motiadev/plugin-observability/plugin')
|
|
6
|
+
const bullmqPlugin = require('@motiadev/plugin-bullmq/plugin')
|
|
6
7
|
|
|
7
8
|
export default config({
|
|
8
|
-
plugins: [observabilityPlugin, statesPlugin, endpointPlugin, logsPlugin],
|
|
9
|
+
plugins: [observabilityPlugin, statesPlugin, endpointPlugin, logsPlugin, bullmqPlugin],
|
|
9
10
|
})
|
|
@@ -3,7 +3,8 @@ const statesPlugin = require('@motiadev/plugin-states/plugin')
|
|
|
3
3
|
const endpointPlugin = require('@motiadev/plugin-endpoint/plugin')
|
|
4
4
|
const logsPlugin = require('@motiadev/plugin-logs/plugin')
|
|
5
5
|
const observabilityPlugin = require('@motiadev/plugin-observability/plugin')
|
|
6
|
+
const bullmqPlugin = require('@motiadev/plugin-bullmq/plugin')
|
|
6
7
|
|
|
7
8
|
export default config({
|
|
8
|
-
plugins: [observabilityPlugin, statesPlugin, endpointPlugin, logsPlugin],
|
|
9
|
+
plugins: [observabilityPlugin, statesPlugin, endpointPlugin, logsPlugin, bullmqPlugin],
|
|
9
10
|
})
|
|
@@ -3,7 +3,8 @@ const statesPlugin = require('@motiadev/plugin-states/plugin')
|
|
|
3
3
|
const endpointPlugin = require('@motiadev/plugin-endpoint/plugin')
|
|
4
4
|
const logsPlugin = require('@motiadev/plugin-logs/plugin')
|
|
5
5
|
const observabilityPlugin = require('@motiadev/plugin-observability/plugin')
|
|
6
|
+
const bullmqPlugin = require('@motiadev/plugin-bullmq/plugin')
|
|
6
7
|
|
|
7
8
|
export default config({
|
|
8
|
-
plugins: [observabilityPlugin, statesPlugin, endpointPlugin, logsPlugin],
|
|
9
|
+
plugins: [observabilityPlugin, statesPlugin, endpointPlugin, logsPlugin, bullmqPlugin],
|
|
9
10
|
})
|
package/dist/esm/dev.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/dev.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/dev.ts"],"names":[],"mappings":"AA+BA,eAAO,MAAM,GAAG,GACd,MAAM,MAAM,EACZ,UAAU,MAAM,EAChB,gBAAgB,OAAO,EACvB,eAAe,OAAO,EACtB,sBAAsB,MAAM,KAC3B,OAAO,CAAC,IAAI,CA4Hd,CAAA"}
|
package/dist/esm/dev.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { flush } from '@amplitude/analytics-node';
|
|
2
|
+
import { BullMQEventAdapter } from '@motiadev/adapter-bullmq-events';
|
|
3
|
+
import { RedisCronAdapter } from '@motiadev/adapter-redis-cron';
|
|
2
4
|
import { RedisStateAdapter } from '@motiadev/adapter-redis-state';
|
|
3
5
|
import { RedisStreamAdapterManager } from '@motiadev/adapter-redis-streams';
|
|
4
|
-
import { createMermaidGenerator, createServer,
|
|
6
|
+
import { createMermaidGenerator, createServer, getProjectIdentifier, trackEvent, } from '@motiadev/core';
|
|
5
7
|
import { deployEndpoints } from './cloud/endpoints';
|
|
6
8
|
import { isTutorialDisabled, workbenchBase } from './constants';
|
|
7
9
|
import { createDevWatchers } from './dev-watchers';
|
|
@@ -39,8 +41,15 @@ export const dev = async (port, hostname, disableVerbose, enableMermaid, motiaFi
|
|
|
39
41
|
const appConfig = await loadMotiaConfig(baseDir);
|
|
40
42
|
const redisClient = await instanceRedisMemoryServer(motiaFileStoragePath, true);
|
|
41
43
|
const adapters = {
|
|
42
|
-
eventAdapter: appConfig.adapters?.events ||
|
|
43
|
-
|
|
44
|
+
eventAdapter: appConfig.adapters?.events ||
|
|
45
|
+
new BullMQEventAdapter({
|
|
46
|
+
connection: {
|
|
47
|
+
host: redisClient.options.socket?.host || 'localhost',
|
|
48
|
+
port: redisClient.options.socket?.port || 6379,
|
|
49
|
+
},
|
|
50
|
+
prefix: 'motia:events',
|
|
51
|
+
}),
|
|
52
|
+
cronAdapter: appConfig.adapters?.cron || new RedisCronAdapter(redisClient),
|
|
44
53
|
streamAdapter: appConfig.adapters?.streams || new RedisStreamAdapterManager(redisClient),
|
|
45
54
|
};
|
|
46
55
|
const lockedData = await generateLockedData({
|
|
@@ -9,8 +9,8 @@ type StreamAuthOptions = {
|
|
|
9
9
|
};
|
|
10
10
|
export declare const generateLockedData: (config: {
|
|
11
11
|
projectDir: string;
|
|
12
|
-
streamAdapter
|
|
13
|
-
redisClient
|
|
12
|
+
streamAdapter?: StreamAdapterManager;
|
|
13
|
+
redisClient?: RedisClientType;
|
|
14
14
|
printerType?: "disabled" | "default";
|
|
15
15
|
streamAuth?: StreamAuthOptions;
|
|
16
16
|
}) => Promise<LockedData>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-locked-data.d.ts","sourceRoot":"","sources":["../../src/generate-locked-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EACf,UAAU,
|
|
1
|
+
{"version":3,"file":"generate-locked-data.d.ts","sourceRoot":"","sources":["../../src/generate-locked-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EACf,UAAU,EAEV,KAAK,IAAI,EACT,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAA;AAOvB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,OAAO,CAAA;AAiB5C,eAAO,MAAM,YAAY,GAAI,YAAY,MAAM,KAAG,MAAM,EAIvD,CAAA;AAYD,eAAO,MAAM,cAAc,GAAI,YAAY,MAAM,KAAG,MAAM,EAIzD,CAAA;AAGD,eAAO,MAAM,YAAY,GAAU,YAAY,MAAM,EAAE,YAAY,UAAU,KAAG,OAAO,CAAC,IAAI,EAAE,CAmF7F,CAAA;AAED,KAAK,iBAAiB,GAAG;IACvB,YAAY,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAA;IAC9C,aAAa,CAAC,EAAE,UAAU,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAU,QAAQ;IAC/C,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,oBAAoB,CAAA;IACpC,WAAW,CAAC,EAAE,eAAe,CAAA;IAC7B,WAAW,CAAC,EAAE,UAAU,GAAG,SAAS,CAAA;IACpC,UAAU,CAAC,EAAE,iBAAiB,CAAA;CAC/B,KAAG,OAAO,CAAC,UAAU,CA6BrB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getStepConfig, getStreamConfig, LockedData, } from '@motiadev/core';
|
|
1
|
+
import { getStepConfig, getStreamConfig, LockedData, MemoryStreamAdapterManager, } from '@motiadev/core';
|
|
2
2
|
import { NoPrinter, Printer } from '@motiadev/core/dist/src/printer';
|
|
3
3
|
import { randomUUID } from 'crypto';
|
|
4
4
|
import { existsSync } from 'fs';
|
|
@@ -104,7 +104,7 @@ export const collectFlows = async (projectDir, lockedData) => {
|
|
|
104
104
|
};
|
|
105
105
|
export const generateLockedData = async (config) => {
|
|
106
106
|
try {
|
|
107
|
-
const { projectDir, streamAdapter, printerType = 'default', redisClient, streamAuth } = config;
|
|
107
|
+
const { projectDir, streamAdapter = new MemoryStreamAdapterManager(), printerType = 'default', redisClient, streamAuth, } = config;
|
|
108
108
|
const printer = printerType === 'disabled' ? new NoPrinter() : new Printer(projectDir);
|
|
109
109
|
/*
|
|
110
110
|
* NOTE: right now for performance and simplicity let's enforce a folder,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-types.d.ts","sourceRoot":"","sources":["../../src/generate-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate-types.d.ts","sourceRoot":"","sources":["../../src/generate-types.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa,GAAU,YAAY,MAAM,kBAyBrD,CAAA"}
|
|
@@ -2,13 +2,11 @@ import { getStepConfig, getStreamConfig, LockedData, MemoryStreamAdapterManager,
|
|
|
2
2
|
import { randomUUID } from 'crypto';
|
|
3
3
|
import pc from 'picocolors';
|
|
4
4
|
import { getStepFiles, getStreamFiles } from './generate-locked-data';
|
|
5
|
-
import { instanceRedisMemoryServer } from './redis-memory-manager';
|
|
6
5
|
const version = `${randomUUID()}:${Math.floor(Date.now() / 1000)}`;
|
|
7
6
|
export const generateTypes = async (projectDir) => {
|
|
8
7
|
const files = getStepFiles(projectDir);
|
|
9
8
|
const streamsFiles = getStreamFiles(projectDir);
|
|
10
|
-
const
|
|
11
|
-
const lockedData = new LockedData(projectDir, new MemoryStreamAdapterManager(), new Printer(projectDir), redisClient);
|
|
9
|
+
const lockedData = new LockedData(projectDir, new MemoryStreamAdapterManager(), new Printer(projectDir));
|
|
12
10
|
for (const filePath of files) {
|
|
13
11
|
const config = await getStepConfig(filePath, projectDir);
|
|
14
12
|
if (config) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-plugin-context.d.ts","sourceRoot":"","sources":["../../../src/plugins/create-plugin-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,kBAAkB,EAClB,WAAW,EAIZ,MAAM,gBAAgB,CAAA;AAEvB,eAAO,MAAM,mBAAmB,GAAI,aAAa,WAAW,KAAG,
|
|
1
|
+
{"version":3,"file":"create-plugin-context.d.ts","sourceRoot":"","sources":["../../../src/plugins/create-plugin-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,kBAAkB,EAClB,WAAW,EAIZ,MAAM,gBAAgB,CAAA;AAEvB,eAAO,MAAM,mBAAmB,GAAI,aAAa,WAAW,KAAG,kBAqC9D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-dependencies.d.ts","sourceRoot":"","sources":["../../../src/plugins/plugin-dependencies.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"plugin-dependencies.d.ts","sourceRoot":"","sources":["../../../src/plugins/plugin-dependencies.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,UAO9B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis-memory-manager.d.ts","sourceRoot":"","sources":["../../src/redis-memory-manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,eAAe,EAAE,MAAM,OAAO,CAAA;AAI1D,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb;
|
|
1
|
+
{"version":3,"file":"redis-memory-manager.d.ts","sourceRoot":"","sources":["../../src/redis-memory-manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,eAAe,EAAE,MAAM,OAAO,CAAA;AAI1D,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb;AAiID,eAAO,MAAM,yBAAyB,GAAI,SAAS,MAAM,EAAE,YAAW,OAAc,KAAG,OAAO,CAAC,eAAe,CAC3E,CAAA;AAEnC,eAAO,MAAM,qBAAqB,QAAO,OAAO,CAAC,IAAI,CAAmB,CAAA"}
|
|
@@ -86,9 +86,7 @@ class RedisMemoryManager {
|
|
|
86
86
|
if (this.client && this.running) {
|
|
87
87
|
try {
|
|
88
88
|
if (this.client.isOpen) {
|
|
89
|
-
await this.client.quit().catch(
|
|
90
|
-
console.error('[Redis Memory Server] Error closing client:', error);
|
|
91
|
-
});
|
|
89
|
+
await this.client.quit().catch();
|
|
92
90
|
}
|
|
93
91
|
this.client = null;
|
|
94
92
|
}
|
package/dist/esm/start.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../src/start.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../src/start.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,KAAK,GAChB,MAAM,MAAM,EACZ,UAAU,MAAM,EAChB,gBAAgB,OAAO,EACvB,sBAAsB,MAAM,KAC3B,OAAO,CAAC,IAAI,CAsEd,CAAA"}
|
package/dist/esm/start.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { BullMQEventAdapter } from '@motiadev/adapter-bullmq-events';
|
|
2
|
+
import { RedisCronAdapter } from '@motiadev/adapter-redis-cron';
|
|
1
3
|
import { RedisStateAdapter } from '@motiadev/adapter-redis-state';
|
|
2
4
|
import { RedisStreamAdapterManager } from '@motiadev/adapter-redis-streams';
|
|
3
|
-
import { createServer
|
|
5
|
+
import { createServer } from '@motiadev/core';
|
|
4
6
|
import path from 'path';
|
|
5
7
|
import { workbenchBase } from './constants';
|
|
6
8
|
import { generateLockedData, getStepFiles, getStreamFiles } from './generate-locked-data';
|
|
@@ -27,8 +29,14 @@ export const start = async (port, hostname, disableVerbose, motiaFileStorageDir)
|
|
|
27
29
|
const appConfig = await loadMotiaConfig(baseDir);
|
|
28
30
|
const redisClient = await instanceRedisMemoryServer(dotMotia);
|
|
29
31
|
const adapters = {
|
|
30
|
-
eventAdapter: appConfig.adapters?.events ||
|
|
31
|
-
|
|
32
|
+
eventAdapter: appConfig.adapters?.events ||
|
|
33
|
+
new BullMQEventAdapter({
|
|
34
|
+
connection: {
|
|
35
|
+
host: redisClient.options.socket?.host || 'localhost',
|
|
36
|
+
port: redisClient.options.socket?.port || 6379,
|
|
37
|
+
},
|
|
38
|
+
}),
|
|
39
|
+
cronAdapter: appConfig.adapters?.cron || new RedisCronAdapter(redisClient),
|
|
32
40
|
streamAdapter: appConfig.adapters?.streams || new RedisStreamAdapterManager(redisClient),
|
|
33
41
|
};
|
|
34
42
|
const lockedData = await generateLockedData({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../src/utils/analytics.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAejD,eAAO,MAAM,eAAe,YAE3B,CAAA;AAED,eAAO,MAAM,gBAAgB,YAE5B,CAAA;AAED,eAAO,MAAM,YAAY,YAYxB,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,EAAE,OAAO,UAAU,SAkB7D,CAAA;AAkBD,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,KAAG,
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../src/utils/analytics.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAejD,eAAO,MAAM,eAAe,YAE3B,CAAA;AAED,eAAO,MAAM,gBAAgB,YAE5B,CAAA;AAED,eAAO,MAAM,YAAY,YAYxB,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,EAAE,OAAO,UAAU,SAkB7D,CAAA;AAkBD,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,KAAG,CAelF,CAAA"}
|
|
@@ -72,7 +72,9 @@ export const wrapAction = (action) => {
|
|
|
72
72
|
}
|
|
73
73
|
catch (error) {
|
|
74
74
|
const commandName = getCommandNameFromArgs();
|
|
75
|
-
|
|
75
|
+
if (error instanceof BuildError) {
|
|
76
|
+
logCliError(commandName, error);
|
|
77
|
+
}
|
|
76
78
|
await flush().promise.catch(() => {
|
|
77
79
|
// Silently fail
|
|
78
80
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../src/cloud/new-deployment/build.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../src/cloud/new-deployment/build.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAwB,MAAM,kBAAkB,CAAA;AAIhE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAM/D,eAAO,MAAM,KAAK,GAAU,UAAU,aAAa,KAAG,OAAO,CAAC,OAAO,CAsDpE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/create/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/create/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AA2EvD,KAAK,IAAI,GAAG;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,EAAE,OAAO,CAAA;IACtB,OAAO,EAAE,UAAU,CAAA;IACnB,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,CAAA;AAED,eAAO,MAAM,MAAM,GAAU,mDAAmD,IAAI,KAAG,OAAO,CAAC,IAAI,CA6KlG,CAAA"}
|
package/dist/types/dev.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/dev.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/dev.ts"],"names":[],"mappings":"AA+BA,eAAO,MAAM,GAAG,GACd,MAAM,MAAM,EACZ,UAAU,MAAM,EAChB,gBAAgB,OAAO,EACvB,eAAe,OAAO,EACtB,sBAAsB,MAAM,KAC3B,OAAO,CAAC,IAAI,CA4Hd,CAAA"}
|
|
@@ -9,8 +9,8 @@ type StreamAuthOptions = {
|
|
|
9
9
|
};
|
|
10
10
|
export declare const generateLockedData: (config: {
|
|
11
11
|
projectDir: string;
|
|
12
|
-
streamAdapter
|
|
13
|
-
redisClient
|
|
12
|
+
streamAdapter?: StreamAdapterManager;
|
|
13
|
+
redisClient?: RedisClientType;
|
|
14
14
|
printerType?: "disabled" | "default";
|
|
15
15
|
streamAuth?: StreamAuthOptions;
|
|
16
16
|
}) => Promise<LockedData>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-locked-data.d.ts","sourceRoot":"","sources":["../../src/generate-locked-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EACf,UAAU,
|
|
1
|
+
{"version":3,"file":"generate-locked-data.d.ts","sourceRoot":"","sources":["../../src/generate-locked-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EACf,UAAU,EAEV,KAAK,IAAI,EACT,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAA;AAOvB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,OAAO,CAAA;AAiB5C,eAAO,MAAM,YAAY,GAAI,YAAY,MAAM,KAAG,MAAM,EAIvD,CAAA;AAYD,eAAO,MAAM,cAAc,GAAI,YAAY,MAAM,KAAG,MAAM,EAIzD,CAAA;AAGD,eAAO,MAAM,YAAY,GAAU,YAAY,MAAM,EAAE,YAAY,UAAU,KAAG,OAAO,CAAC,IAAI,EAAE,CAmF7F,CAAA;AAED,KAAK,iBAAiB,GAAG;IACvB,YAAY,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAA;IAC9C,aAAa,CAAC,EAAE,UAAU,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAU,QAAQ;IAC/C,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,oBAAoB,CAAA;IACpC,WAAW,CAAC,EAAE,eAAe,CAAA;IAC7B,WAAW,CAAC,EAAE,UAAU,GAAG,SAAS,CAAA;IACpC,UAAU,CAAC,EAAE,iBAAiB,CAAA;CAC/B,KAAG,OAAO,CAAC,UAAU,CA6BrB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-types.d.ts","sourceRoot":"","sources":["../../src/generate-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate-types.d.ts","sourceRoot":"","sources":["../../src/generate-types.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa,GAAU,YAAY,MAAM,kBAyBrD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-plugin-context.d.ts","sourceRoot":"","sources":["../../../src/plugins/create-plugin-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,kBAAkB,EAClB,WAAW,EAIZ,MAAM,gBAAgB,CAAA;AAEvB,eAAO,MAAM,mBAAmB,GAAI,aAAa,WAAW,KAAG,
|
|
1
|
+
{"version":3,"file":"create-plugin-context.d.ts","sourceRoot":"","sources":["../../../src/plugins/create-plugin-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,kBAAkB,EAClB,WAAW,EAIZ,MAAM,gBAAgB,CAAA;AAEvB,eAAO,MAAM,mBAAmB,GAAI,aAAa,WAAW,KAAG,kBAqC9D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-dependencies.d.ts","sourceRoot":"","sources":["../../../src/plugins/plugin-dependencies.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"plugin-dependencies.d.ts","sourceRoot":"","sources":["../../../src/plugins/plugin-dependencies.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,UAO9B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis-memory-manager.d.ts","sourceRoot":"","sources":["../../src/redis-memory-manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,eAAe,EAAE,MAAM,OAAO,CAAA;AAI1D,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb;
|
|
1
|
+
{"version":3,"file":"redis-memory-manager.d.ts","sourceRoot":"","sources":["../../src/redis-memory-manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,eAAe,EAAE,MAAM,OAAO,CAAA;AAI1D,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb;AAiID,eAAO,MAAM,yBAAyB,GAAI,SAAS,MAAM,EAAE,YAAW,OAAc,KAAG,OAAO,CAAC,eAAe,CAC3E,CAAA;AAEnC,eAAO,MAAM,qBAAqB,QAAO,OAAO,CAAC,IAAI,CAAmB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../src/start.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../src/start.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,KAAK,GAChB,MAAM,MAAM,EACZ,UAAU,MAAM,EAChB,gBAAgB,OAAO,EACvB,sBAAsB,MAAM,KAC3B,OAAO,CAAC,IAAI,CAsEd,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../src/utils/analytics.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAejD,eAAO,MAAM,eAAe,YAE3B,CAAA;AAED,eAAO,MAAM,gBAAgB,YAE5B,CAAA;AAED,eAAO,MAAM,YAAY,YAYxB,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,EAAE,OAAO,UAAU,SAkB7D,CAAA;AAkBD,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,KAAG,
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../src/utils/analytics.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAejD,eAAO,MAAM,eAAe,YAE3B,CAAA;AAED,eAAO,MAAM,gBAAgB,YAE5B,CAAA;AAED,eAAO,MAAM,YAAY,YAYxB,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,EAAE,OAAO,UAAU,SAkB7D,CAAA;AAkBD,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,KAAG,CAelF,CAAA"}
|
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.
|
|
4
|
+
"version": "0.14.0-beta.164",
|
|
5
5
|
"license": "Elastic-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -49,11 +49,13 @@
|
|
|
49
49
|
"table": "^6.9.0",
|
|
50
50
|
"ts-node": "^10.9.2",
|
|
51
51
|
"zod": "^4.1.12",
|
|
52
|
-
"@motiadev/adapter-
|
|
53
|
-
"@motiadev/adapter-redis-
|
|
54
|
-
"@motiadev/
|
|
55
|
-
"@motiadev/stream-client-node": "0.
|
|
56
|
-
"@motiadev/workbench": "0.
|
|
52
|
+
"@motiadev/adapter-bullmq-events": "0.14.0-beta.164",
|
|
53
|
+
"@motiadev/adapter-redis-cron": "0.14.0-beta.164",
|
|
54
|
+
"@motiadev/adapter-redis-state": "0.14.0-beta.164",
|
|
55
|
+
"@motiadev/stream-client-node": "0.14.0-beta.164",
|
|
56
|
+
"@motiadev/workbench": "0.14.0-beta.164",
|
|
57
|
+
"@motiadev/core": "0.14.0-beta.164",
|
|
58
|
+
"@motiadev/adapter-redis-streams": "0.14.0-beta.164"
|
|
57
59
|
},
|
|
58
60
|
"devDependencies": {
|
|
59
61
|
"@amplitude/analytics-types": "^2.9.2",
|