
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@hemia/cache-manager
Advanced tools
Una librería sencilla y extensible para manejar caché utilizando Redis a través de ioredis
, con soporte completo para inyección de dependencias mediante tsyringe
. Incluye operaciones comunes como almacenamiento de cadenas, objetos, listas, TTL, incremento y más.
npm install @hemia/cache-manager
Crea el archivo:
src/config/di/CacheContainer.ts
import { container } from 'tsyringe';
import { CacheClient, CacheService, RedisConfig } from '@hemia/cache-manager';
const redisConfig: RedisConfig = {
host: process.env.REDIS_HOST || '127.0.0.1',
port: Number(process.env.REDIS_PORT) || 6379,
password: process.env.REDIS_PASSWORD,
db: Number(process.env.REDIS_DB) || 0,
tls: process.env.REDIS_TLS === 'true',
};
container.register<CacheClient>('CacheClient', {
useFactory: () => new CacheClient(redisConfig),
});
container.registerSingleton<CacheService>('CacheService', CacheService);
export default container;
import { injectable, inject } from 'tsyringe';
import { CacheService } from '@hemia/cache-manager';
@injectable()
export class ResourceController {
constructor(
@inject('CacheService') private cacheService: CacheService,
@inject('InjectedString') private injectedString: string
) {}
}
setString(key: string, value: string | number, expireTime?: number): Promise<void>
getString(key: string): Promise<string | null>
setObject<T>(key: string, value: T, expireTime?: number): Promise<void>
getObject<T>(key: string): Promise<T | null>
setList(key: string, value: string | number): Promise<void>
getList(key: string, start?: number, stop?: number): Promise<string[]>
deleteKey(key: string): Promise<void>
expire(key: string, seconds: number): Promise<void>
exists(key: string): Promise<boolean>
increment(key: string): Promise<number>
decrement(key: string): Promise<number>
getKeysByPattern(pattern: string): Promise<string[]>
getTTL(key: string): Promise<number>
interface RedisConfig {
host: string;
port: number;
username?: string;
password?: string;
db: number;
tls?: boolean;
}
MIT — © Hemia Technologies
Desarrollado por Hemia Technologies
FAQs
Manejador de caché con soporte Redis y tsyringe
The npm package @hemia/cache-manager receives a total of 0 weekly downloads. As such, @hemia/cache-manager popularity was classified as not popular.
We found that @hemia/cache-manager demonstrated a healthy version release cadence and project activity because the last version was released less than 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.