Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@tramvai/module-common
Advanced tools
Base module consisted of the architectural blocks for typical tramvai app. This module is required at most cases and is used a lot by the other modules.
Base module consisted of the architectural blocks for typical tramvai app. This module is required at most cases and is used a lot by the other modules.
First install @tramvai/module-common
npm i @tramvai/module-common
Add CommonModule to the modules list
import { createApp } from '@tramvai/core';
import { CommonModule } from '@tramvai/module-common';
createApp({
modules: [CommonModule],
});
Module that adds implementation for the commandLineRunner and defines default command lines
This module logs with id command:command-line-runner
Adds state-manager
Implements action system
This module logs with id action:action-page-runner
Add providers that works with cookie. See docs
Implements work with environment variables both on server and client. See docs
Provides PubSub interface to implement communication between components. See docs
This modules logs with id pubsub
Module for logging. Uses @tramvai/module-log
Module that implements caches.
It provides next functionality:
/clear-cache
that will trigger caches clear eventThis modules logs wit id cache:papi-clear-cache
Wrapper for the client request
Wrapper for the client response
import { provide } from '@tramvai/core';
export const providers = [
provide({
provide: MY_MODULE_PROVIDER_FACTORY,
scope: Scope.SINGLETON,
useFactory: ({ createCache }) => {
const cache = createCache('memory', ...args); // type of the cache and any additional options that will be passed to the cache constructor
return someFactory({ cache });
},
deps: {
createCache: CREATE_CACHE_TOKEN,
},
}),
provide({
provide: REGISTER_CLEAR_CACHE_TOKEN,
scope: Scope.SINGLETON,
useFactory: ({ cache }) => {
return async () => {
await cache.reset();
console.log('my module cache cleared');
};
},
deps: {
cache: MY_MODULE_CACHE,
},
}),
provide({
provide: commandLineListTokens.clear,
useFactory: ({ clearCache }) => {
return function clear() {
clearCache(); // clear caches explicitly
};
},
deps: {
clearCache: CLEAR_CACHE_TOKEN,
},
}),
];
FAQs
Base module consisted of the architectural blocks for typical tramvai app. This module is required at most cases and is used a lot by the other modules.
The npm package @tramvai/module-common receives a total of 0 weekly downloads. As such, @tramvai/module-common popularity was classified as not popular.
We found that @tramvai/module-common demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.