Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
diesis-electrician
Advanced tools
This is an adapter for using electrician components with Diesis.
You import the adapter like this:
const diesisElectrician = require('diesis-electrician')
Then you pass a map of electric components:
const deps = diesisElectrician(components)
You get back an object with startAll/stopAll methods:
const deps = diesisElectrician({
config: new Conflab(),
endpoints: new Endpoints(),
metrics: new ElectricMetrics(),
refdata: new Refdata(),
server: new Server(),
})
deps.startAll() // ... starts all components
.then(obj => {
// obj is a map with all components
})
deps.stopAll() // ... stops all components
.then(() => {
})
Every dependency not declared in the components is intended as additional argument that can be sent in the startAll/stopAll method:
deps.startAll({ value: 5 })
startAll/stopAll are convenience methods build on top of run
:
run([config, endpoints, metrics, refdata, server], { value: 5 })
deps contains also 2 registries (startRegistry and stopRegistry) with all dependencies that you can export and use:
const getConfig = deps.startRegistry.config
const getRefdata = deps.startRegistry.refdata
const { dependency } = require('diesis')
const doSomething = dependency([getConfig, getRefdata], (config, refdata) => {
// ...
})
If you want get the same API of electrician you can call getSystem:
const system = deps.getSystem(obj) // you inject some argument if required
system.start((err) => {
// ...
})
system.stop((err) => {
// ...
})
FAQs
Adapter to use electrician components in diesis
We found that diesis-electrician 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.