@seneca/traverse
v0.1.2
Published
Data Traverse plugin for the Seneca framework.
Readme
@seneca/traverse
Seneca Traverse is a plugin for Seneca
Data Traverse plugin for the Seneca framework.
|
| This open source module is sponsored and supported by Voxgig. |
| ---------------------------------------------------- | --------------------------------------------------------------------------------------- |
Install
$ npm install @seneca/traverseQuick Example
seneca.use('Traverse', {})
const depsRes = await seneca.post('sys:traverse,find:deps')
// === { ok: true, deps: [['foo/bar0,foo/bar1'],...] }More Examples
Review the unit tests for more examples.
Options
debug: booleanrootExecute: booleanrootEntity: stringrelations: objectcustomRef: objectinit$: boolean
Action Patterns
- sys:traverse,do:create,on:run
- sys:traverse,do:execute,on:task
- sys:traverse,do:next,on:task
- sys:traverse,do:start,on:run
- sys:traverse,do:stop,on:run
- sys:traverse,find:children
- sys:traverse,find:deps
Action Descriptions
« sys:traverse,do:create,on:run »
Create a run process and generate tasks for each child entity to be executed.
Parameters
- rootEntity : string (optional, default: ``)
- rootEntityId : string
- taskMsg : string
« sys:traverse,do:execute,on:task »
Execute a single Run task.
Parameters
- task : object
« sys:traverse,do:next,on:task »
No description provided.
Parameters
- runId : string
« sys:traverse,do:start,on:run »
Start a Run process execution, dispatching the next pending child task.
Parameters
- runId : string
« sys:traverse,do:stop,on:run »
Stop a Run process execution, preventing the dispatching of the next pending child task.
Parameters
- runId : string
« sys:traverse,find:children »
Returns all discovered child instances with their parent relationship.
Parameters
- rootEntity : string (optional, default: ``)
- rootEntityId : string
« sys:traverse,find:deps »
Returns a sorted list of entity pairs starting from a given entity.
Parameters
- rootEntity : string (optional, default: ``)
