
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Fisma is a 422b (br,min) finite state _ma_chine that is built on Generators. It features entry/exit actions, events, sending signals to transition to a specific state.
import { createMachine } from 'fisma';
const m = createMachine([
'A',
{ type: 'B' },
{
type: 'C',
// Add enter and exit
// action as a method
// or array of actions
enter() {},
exit: [() => {}]
},
{
type: 'D',
on: {
RESTART: 'A'
}
},
{
type: 'E',
on: {
RESTART: {
target: 'A',
actions: [ () => console.log('Running actions') ]
}
}
}
]);
// getters
m.current; // A (The active state)
m.done; // false (is the machine running)
// Use `next` to go to the
// next state in array order
m.next();
m.current; // B
// `.subscribe()` returns a cleanup function
const unsub = m.subscribe((ctx) => console.log(ctx));
m.next(); // { type: 'B' }
m.next(); // { type: 'C' }
unsub();
// Pass a string with the
// name of the desired next state
m.next('A');
m.current; // A
m.next('D');
// Signal to the machine a specific
// state to transition to
m.send('RESTART');
m.current; // A
m.next('E');
m.send('RESTART'); // Running actions
m.destroy(); // kills machine
m.done; // true
.start(initialState) method. The initial state is always the first item in the states array.active and done might be confusing, active is for the name of the active state, done is the status of the machine itself.active has been changed to current.next() methodactive vs. currentnext() vs. somethingElse()initial getterFAQs
A FInite State MAchine built with iterators
We found that fisma 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.