Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
flinch
Advanced tools
Readme
Multitask with cat-like reflexes
npm install -g flinch
Flinch provides an easy to use API for blocking and signaling on events. When you have multiple terminal sessions open and need to queue up long running commands, flinch comes to the rescue.
Organizing your code into several, small and reusable packages is great. Unfortunately, you may find yourself needing to build and run tasks in several repositories at once. When that happens, things can get difficult. Anyone who's tried to use Git submodules can testify to that.
Flinch exposes a few simple commands
flinch server
spawns an HTTP server that acts as the mediator for event blocking and signalingflinch on <event>
will block until the specified event has firedflinch at <event>
will signal that the specified event has occurred,
causing anything blocking on it to exit with a status code of 0flinch gg <event>
will signal that the specified event has failed, causing
anything blocking on it to exit with a status code of 1flinch flush
will clear the list of events the server remembers having been fired atBy default, flinch at
and flinch gg
announcements have a TTL of 10 minutes,
which helps to alleviate race condition concerns of flinch on
not being run
until after the event is flinched at. This time can be explicitly set via the
--ttl
flag.
Usage: flinch [options] [command]
Commands:
server [options] start a flinch server
s alias for server command
on <event> block on the specified event
at [options] <event> announce that the specified event has occurred
gg [options] <event> announce that the specified event has failed
flush clear list of announced events
f alias for flush command
Options:
-h, --help output usage information
-V, --version output the version number
-p, --port [port] specify which port to use [Default: 3030]
Options for server command:
-g, --growl enable growl notifications
Options for gg and at commands:
-t, --ttl [ttl] set time to live for event success announcement in minutes
After starting flinch server
, you may do something like this:
# Terminal 1
make clean && make && make test && flinch at model
# Terminal 2
make clean && flinch on model && make && flinch at worker
# Terminal 3
rake clean && flinch on model && ./some_script && flinch on worker && rake deploy
Flinch works by having an HTTP server running in the background that acts as a
mediator between blockers and signalers. flinch on
blockers will poll the
server once per second for updates on the event they're waiting on. flinch at
and flinch gg
will send a POST request to the server to announce the event
status. That's all there is to it.
FAQs
Multitask with cat-like reflexes
The npm package flinch receives a total of 16 weekly downloads. As such, flinch popularity was classified as not popular.
We found that flinch 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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.