
Security News
Happy Birthday, Shai-Hulud
It has been one year since Shai-Hulud made its first appearance on npm.
@toa.io/bridges.node
Advanced tools
Currently, Node.js bridge only supports CommonJS modules.
Operation's algorithms are defined as CommonJS modules in under operations directory in the
component root. Algorithm module must export a function which is Algorithm Function, Class or
Factory. Module file name without extension is an operation name (endpoint).
// operations/create.js
function transition (input, object, context) {
// ...
return { foo: 'bar' }
}
exports.transition = transition
Exported function's name defines operation type property, thus must be one of:
transition, observation, or assignment. Second (state) argument name must be object,
objects, or changeset as it defines operation's scope.
Following function signature defines operation of observation type with objects scope.
// operations/set.js
function observation (input, objects) {
// ...
}
See Operation properties.
// operations/transit.js
class Transition {
#context
async mount (context) {
this.#context = context
}
execute (input, object) {
// ...
return { foo: 'bar' }
}
}
exports.Transition = Transition
Exported class name must be one of: Transition, Observation, or Assignment, as it defines
operation's type. Class must implement Algorithm interface.
Second (state) argument name of the execute method must be object, objects, or changeset as
it defines operation's scope.
class ObjectTransitionFactory {
create () {
// ...
}
}
exports.ObjectTransitionFactory = ObjectTransitionFactory
Exported class name must follow the pattern: {Subject}{Type}Factory, where Subject and Type
defines operation's scope and type respectively. Class must
implement Algorithm Factory interface.
Factory class name examples:
ObjectTransitionFactory,ObjectsObservationFactory,ChangesetAssignmentFactory.
Algorithm definition should store reference to the
contextobject without copying its value type variables as they may change over operation lifetime.
FAQs
Toa Node Bridge (inproc)
The npm package @toa.io/bridges.node receives a total of 1,519 weekly downloads. As such, @toa.io/bridges.node popularity was classified as popular.
We found that @toa.io/bridges.node 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.

Security News
It has been one year since Shai-Hulud made its first appearance on npm.

Research
/Security News
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.