
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@arabesque/core
Advanced tools
Functional micro-framework
Arabesque is a lightweight, modular and functional micro-framework.
Arabesque provides a minimal foundation to create applications and micro-services, consisting of three types and a function.
declare type Listener<Channel, Context> = (channel: Channel, handler: (context: Context) => Promise<Context>) => Promise<() => Promise<void>>;
The fundamental part of an Arabesque application, the Listener is passed by the application a channel, that the Listener is expected to subscribe to, and a handler, that the Listener must call whenever it receives something from the channel. The Listener must return a promise that resolves to an argument-less function that, when executed, stop the Listener.
A channel can take any imaginable form, for example:
declare type Middleware<Context> = (context: Context, next: (context: Context) => Promise<Context>) => Promise<Context>;
The operational part of an Arabesque application, the Middleware is passed by the application a context, coming from either the Listener or a previous Middleware, and a next function, that the Middleware may call with a Context to execute the next Middleware, if any.
declare type Application<Channel> = (channel: Channel) => Promise<() => Promise<void>>;
The Arabesque Application itself that, when executed, returns a Promise that resolves to an argument-less function that, when executed, stop the Application.
import {Middleware} from "./index";
declare const createApplication: <Channel, Context>(
listen: Listener<Channel, Context>,
middleware: Middleware<Context>
) => Application<Channel, Context>;
The factory that creates an Arabesque Application from a Listener and a Middleware.
import type {Listener} from "@arabesque/core";
import {createApplication} from "@arabesque/core";
const listener: Listener<string, string> = (channel, handler) => {
return handler(channel).then(() => {
return () => Promise.resolve();
});
};
const start = createApplication(listener, (context, next) => {
console.log(`I am the middleware and I received ${context}`);
return next(context);
});
return start('foo').then((stop) => {
return stop();
});
FAQs
Functional micro-framework
The npm package @arabesque/core receives a total of 0 weekly downloads. As such, @arabesque/core popularity was classified as not popular.
We found that @arabesque/core 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.