Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@adityapurwa/orbitalframe
Advanced tools
Workflow framework to automate and simplify your life
v0.0.1 - Ardjet / Pre-Release - NOT SUITABLE FOR PRODUCTION
Orbital Frame is a workflow framework designed to work similar to Zapier or IFTTT. It works with the concept of event, pipe, and context.
A simple workflow for a time bot:
const frame = new OrbitalFrame();
const expPlugin = new ExpressPlugin();
frame.with(expPlugin)
// Whenever a slack outgoing webhook is received
frame.on(new SlackEvent())
// Pipe is a middleware, it processes the event and
// decides whether it want to continue or not
.pipe(
// A prebuilt pipe can be used by mapping the input to
// it own expected format and pipe it out
new WitAiPipe({
client
}).map(context => {
return {
message: SlackEvent.data(context).data.text
}
}).pipe()
)
.pipe((context, event, next) => {
const witData = WitAiPipe.data(context)
const eventData = SlackEvent.data(context);
if (witData.intents[0].name === 'ask_time' && witData.intents[0].confidence > 0.7) {
eventData.res.status(200).send({
text: `Its ${new Date().toTimeString()} now`
}).end()
}
})
frame.start();
Event is the entry point of a workflow, when an event occurs, it will run any registered flow.
Even must inherits from OrbitalEvent, implements the get symbol, setup, and also expose the constructor that accept options.
Best practice, it is not required but highly recommended to implement a static method to read a context using its symbol. E.g SlackEvent.data(context) will returns the data stored by SlackEvent in the context.
Pipe is a middleware function that accepts context, events, next pipe, and the frame. Most of the time you'd likely be interested with the first three only.
Pipe must implements the pipe()
method that returns the actual pipe
that's going to be run. A pipe accepts a mapper function, which is used
to map current context into a form that could be understood by the pipe.
Context is the storage of the flow, any event, pipes, and plugins; can store data into the context.
To prevent collision, context must be indexed with symbol only. That is why event, pipes, and plugins should always expose the symbol it used to store the data so it can be fetched later.
FAQs
Workflow framework to simplify your life
The npm package @adityapurwa/orbitalframe receives a total of 0 weekly downloads. As such, @adityapurwa/orbitalframe popularity was classified as not popular.
We found that @adityapurwa/orbitalframe demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.