@motiadev/core 0.17.1-beta.183-457518 → 0.17.1-beta.183-843379
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/index.d.mts
CHANGED
|
@@ -36,4 +36,4 @@ import { NoTracer } from "./src/observability/no-tracer.mjs";
|
|
|
36
36
|
import { MotiaEventManager, createStepHandlers } from "./src/step-handlers.mjs";
|
|
37
37
|
import { MotiaServer, createServer } from "./src/server.mjs";
|
|
38
38
|
import { createStateAdapter } from "./src/state/create-state-adapter.mjs";
|
|
39
|
-
export { type AdapterConfig, ApiMiddleware, ApiRequest, ApiResponse, ApiRouteConfig, ApiRouteHandler, ApiRouteMethod, type BaseStreamItem, type Config, type CronAdapter, type CronAdapterConfig, type CronConfig, CronHandler, type CronLock, type CronLockInfo, type CronManager, InMemoryCronAdapter as DefaultCronAdapter, InMemoryQueueEventAdapter as DefaultQueueEventAdapter, Emit, EmitData, Emitter, Event, type EventAdapter, EventConfig, EventHandler, FileStateAdapter, FileStreamAdapter, FileStreamAdapterManager, Flow, FlowContext, FlowContextStateStreams, Handler, HandlerConfig, Handlers, InfrastructureConfig, type InfrastructureValidationError, type InfrastructureValidationResult, InternalStateManager, JsonSchema, JsonSchemaError, LockedData, Logger, MemoryStateAdapter, MemoryStreamAdapter, MemoryStreamAdapterManager, type Metric, type Motia, type MotiaEventManager, MotiaPlugin, MotiaPluginBuilder, type MotiaPluginContext, type MotiaServer, type MotiaStream, NoPrinter, NoTracer, NoopConfig, type ObservabilityAdapter, PLUGIN_FLOW_ID, type PluginApiConfig, PluginStep, Printer, QueryParam, QueueConfig, QueueManager, type QueueMetrics, RedisConfig, type StateAdapter, type StateFilter, type StateItem, type StateItemsInput, type StateStreamEvent, type StateStreamEventChannel, Step, StepConfig, StepHandler, StepSchemaInput, type Stream, StreamAdapter, type StreamAdapterManager, StreamAuthConfig, type StreamAuthRequest, type StreamConfig, type StreamQueryFilter, type StreamSubscription, SubscribeConfig, type SubscriptionHandle, type Tracer, type UnregisterMotiaPluginApi, UnsubscribeConfig, WorkbenchPlugin, ZodInput, config, createMermaidGenerator, createServer, createStateAdapter, createStepHandlers, getProjectIdentifier, getProjectName, getStepConfig, getStreamConfig, getUserIdentifier, invalidate, isAnalyticsEnabled, isAnyOf, isApiStep, isCronStep, isEventStep, isNoopStep, setupCronHandlers, trackEvent, validateInfrastructureConfig };
|
|
39
|
+
export { type AdapterConfig, ApiMiddleware, ApiRequest, ApiResponse, ApiRouteConfig, ApiRouteHandler, ApiRouteMethod, type BaseStreamItem, type Config, type CronAdapter, type CronAdapterConfig, type CronConfig, CronHandler, type CronLock, type CronLockInfo, type CronManager, InMemoryCronAdapter as DefaultCronAdapter, InMemoryQueueEventAdapter as DefaultQueueEventAdapter, Emit, EmitData, Emitter, Event, type EventAdapter, EventConfig, EventHandler, FileStateAdapter, FileStreamAdapter, FileStreamAdapterManager, Flow, FlowContext, FlowContextStateStreams, Handler, HandlerConfig, Handlers, InfrastructureConfig, type InfrastructureValidationError, type InfrastructureValidationResult, InternalStateManager, JsonSchema, JsonSchemaError, LockedData, Logger, MemoryStateAdapter, MemoryStreamAdapter, MemoryStreamAdapterManager, type Metric, type Motia, type MotiaEventManager, MotiaPlugin, MotiaPluginBuilder, type MotiaPluginContext, type MotiaServer, type MotiaStream, NoPrinter, NoTracer, NoopConfig, type ObservabilityAdapter, PLUGIN_FLOW_ID, type PluginApiConfig, PluginStep, Printer, QueryParam, QueueConfig, QueueManager, type QueueMetrics, RedisConfig, type StateAdapter, type StateFilter, type StateItem, type StateItemsInput, type StateStreamEvent, type StateStreamEventChannel, Step, StepConfig, StepHandler, StepSchemaInput, type Stream, StreamAdapter, type StreamAdapterManager, StreamAuthConfig, type StreamAuthRequest, type StreamConfig, type StreamQueryFilter, type StreamSubscription, SubscribeConfig, type SubscriptionHandle, type Tracer, type UnregisterMotiaPluginApi, UnsubscribeConfig, WorkbenchPlugin, ZodInput, config, createMermaidGenerator, createServer, createStateAdapter, createStepHandlers, config as defineConfig, getProjectIdentifier, getProjectName, getStepConfig, getStreamConfig, getUserIdentifier, invalidate, isAnalyticsEnabled, isAnyOf, isApiStep, isCronStep, isEventStep, isNoopStep, setupCronHandlers, trackEvent, validateInfrastructureConfig };
|
package/dist/index.mjs
CHANGED
|
@@ -28,4 +28,4 @@ import { createStepHandlers } from "./src/step-handlers.mjs";
|
|
|
28
28
|
import { createServer } from "./src/server.mjs";
|
|
29
29
|
import { createStateAdapter } from "./src/state/create-state-adapter.mjs";
|
|
30
30
|
|
|
31
|
-
export { InMemoryCronAdapter as DefaultCronAdapter, InMemoryQueueEventAdapter as DefaultQueueEventAdapter, FileStateAdapter, FileStreamAdapter, FileStreamAdapterManager, JsonSchemaError, LockedData, Logger, MemoryStateAdapter, MemoryStreamAdapter, MemoryStreamAdapterManager, NoPrinter, NoTracer, PLUGIN_FLOW_ID, Printer, QueueManager, StreamAdapter, config, createMermaidGenerator, createServer, createStateAdapter, createStepHandlers, getProjectIdentifier, getProjectName, getStepConfig, getStreamConfig, getUserIdentifier, invalidate, isAnalyticsEnabled, isAnyOf, isApiStep, isCronStep, isEventStep, isNoopStep, setupCronHandlers, trackEvent, validateInfrastructureConfig };
|
|
31
|
+
export { InMemoryCronAdapter as DefaultCronAdapter, InMemoryQueueEventAdapter as DefaultQueueEventAdapter, FileStateAdapter, FileStreamAdapter, FileStreamAdapterManager, JsonSchemaError, LockedData, Logger, MemoryStateAdapter, MemoryStreamAdapter, MemoryStreamAdapterManager, NoPrinter, NoTracer, PLUGIN_FLOW_ID, Printer, QueueManager, StreamAdapter, config, createMermaidGenerator, createServer, createStateAdapter, createStepHandlers, config as defineConfig, getProjectIdentifier, getProjectName, getStepConfig, getStreamConfig, getUserIdentifier, invalidate, isAnalyticsEnabled, isAnyOf, isApiStep, isCronStep, isEventStep, isNoopStep, setupCronHandlers, trackEvent, validateInfrastructureConfig };
|
|
@@ -23,7 +23,7 @@ const stepEndpoint = (app, lockedData) => {
|
|
|
23
23
|
}
|
|
24
24
|
try {
|
|
25
25
|
const content = await fs.readFile(step.filePath, "utf8");
|
|
26
|
-
const features = await getFeatures(step.filePath.replace(`${path.sep}
|
|
26
|
+
const features = await getFeatures(step.filePath.replace(`${path.sep}src${path.sep}`, `${path.sep}tutorial${path.sep}`));
|
|
27
27
|
res.status(200).send({
|
|
28
28
|
id,
|
|
29
29
|
content,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-endpoint.mjs","names":["step"],"sources":["../../../src/endpoints/step-endpoint.ts"],"sourcesContent":["import path from 'node:path'\nimport type { Express } from 'express'\nimport fs from 'fs/promises'\nimport { generateStepId } from '../helper/flows-helper'\nimport type { LockedData } from '../locked-data'\n\nconst getFeatures = async (filePath: string) => {\n const stat = await fs.stat(`${filePath}-features.json`).catch(() => null)\n\n if (!stat || stat.isDirectory()) {\n return []\n }\n\n try {\n const content = await fs.readFile(`${filePath}-features.json`, 'utf8')\n return JSON.parse(content)\n } catch {\n return []\n }\n}\n\nexport const stepEndpoint = (app: Express, lockedData: LockedData) => {\n app.get('/__motia/step/:stepId', async (req, res) => {\n const id = req.params.stepId\n\n const allSteps = [...lockedData.activeSteps, ...lockedData.devSteps]\n const step = allSteps.find((step) => generateStepId(step.filePath) === id)\n\n if (!step) {\n res.status(404).send({ error: 'Step not found' })\n return\n }\n\n try {\n const content = await fs.readFile(step.filePath, 'utf8')\n const features = await getFeatures(\n step.filePath.replace(`${path.sep}
|
|
1
|
+
{"version":3,"file":"step-endpoint.mjs","names":["step"],"sources":["../../../src/endpoints/step-endpoint.ts"],"sourcesContent":["import path from 'node:path'\nimport type { Express } from 'express'\nimport fs from 'fs/promises'\nimport { generateStepId } from '../helper/flows-helper'\nimport type { LockedData } from '../locked-data'\n\nconst getFeatures = async (filePath: string) => {\n const stat = await fs.stat(`${filePath}-features.json`).catch(() => null)\n\n if (!stat || stat.isDirectory()) {\n return []\n }\n\n try {\n const content = await fs.readFile(`${filePath}-features.json`, 'utf8')\n return JSON.parse(content)\n } catch {\n return []\n }\n}\n\nexport const stepEndpoint = (app: Express, lockedData: LockedData) => {\n app.get('/__motia/step/:stepId', async (req, res) => {\n const id = req.params.stepId\n\n const allSteps = [...lockedData.activeSteps, ...lockedData.devSteps]\n const step = allSteps.find((step) => generateStepId(step.filePath) === id)\n\n if (!step) {\n res.status(404).send({ error: 'Step not found' })\n return\n }\n\n try {\n const content = await fs.readFile(step.filePath, 'utf8')\n const features = await getFeatures(\n step.filePath.replace(`${path.sep}src${path.sep}`, `${path.sep}tutorial${path.sep}`),\n )\n\n res.status(200).send({ id, content, features })\n } catch (error) {\n console.error('Error reading step file:', error)\n res.status(500).send({\n error: 'Failed to read step file',\n })\n }\n })\n}\n"],"mappings":";;;;;AAMA,MAAM,cAAc,OAAO,aAAqB;CAC9C,MAAM,OAAO,MAAM,GAAG,KAAK,GAAG,SAAS,gBAAgB,CAAC,YAAY,KAAK;AAEzE,KAAI,CAAC,QAAQ,KAAK,aAAa,CAC7B,QAAO,EAAE;AAGX,KAAI;EACF,MAAM,UAAU,MAAM,GAAG,SAAS,GAAG,SAAS,iBAAiB,OAAO;AACtE,SAAO,KAAK,MAAM,QAAQ;SACpB;AACN,SAAO,EAAE;;;AAIb,MAAa,gBAAgB,KAAc,eAA2B;AACpE,KAAI,IAAI,yBAAyB,OAAO,KAAK,QAAQ;EACnD,MAAM,KAAK,IAAI,OAAO;EAGtB,MAAM,OADW,CAAC,GAAG,WAAW,aAAa,GAAG,WAAW,SAAS,CAC9C,MAAM,WAAS,eAAeA,OAAK,SAAS,KAAK,GAAG;AAE1E,MAAI,CAAC,MAAM;AACT,OAAI,OAAO,IAAI,CAAC,KAAK,EAAE,OAAO,kBAAkB,CAAC;AACjD;;AAGF,MAAI;GACF,MAAM,UAAU,MAAM,GAAG,SAAS,KAAK,UAAU,OAAO;GACxD,MAAM,WAAW,MAAM,YACrB,KAAK,SAAS,QAAQ,GAAG,KAAK,IAAI,KAAK,KAAK,OAAO,GAAG,KAAK,IAAI,UAAU,KAAK,MAAM,CACrF;AAED,OAAI,OAAO,IAAI,CAAC,KAAK;IAAE;IAAI;IAAS;IAAU,CAAC;WACxC,OAAO;AACd,WAAQ,MAAM,4BAA4B,MAAM;AAChD,OAAI,OAAO,IAAI,CAAC,KAAK,EACnB,OAAO,4BACR,CAAC;;GAEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-state-adapter.d.mts","names":[],"sources":["../../../src/state/create-state-adapter.ts"],"sourcesContent":[],"mappings":";;;;KAOK,aAAA,GAAgB;;AAF6D,CAAA;AAIlE,iBAAA,kBAAA,CAA2B,MAAA,EAAA,aAAgB,
|
|
1
|
+
{"version":3,"file":"create-state-adapter.d.mts","names":[],"sources":["../../../src/state/create-state-adapter.ts"],"sourcesContent":[],"mappings":";;;;KAOK,aAAA,GAAgB;;AAF6D,CAAA;AAIlE,iBAAA,kBAAA,CAA2B,MAAA,EAAA,aAAgB,CAAA,EAAA,YAAY"}
|