
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.
A lightweight TypeScript framework for building modular and maintainable applications with TypeORM integration.
A lightweight TypeScript framework for building modular and maintainable applications with TypeORM integration.
npm install cca-core
CCA-Core provides a set of base classes and interfaces to help structure your application following best practices. The library focuses on:
The BaseContainer
class serves as a dependency injection container for your application:
import { BaseContainer, BaseDatabase } from "cca-core";
const container = new BaseContainer({
database: myDatabase,
// Optional: custom cache service, mapper
});
// Register repositories and services
container.registerRepository("userRepository", userRepository);
container.registerService("userService", userService);
// Initialize the container
await container.initialize();
// Access registered components
const userRepo = container.getRepository("userRepository");
const userService = container.getService("userService");
The BaseDatabase
abstract class provides a foundation for database connections:
import { BaseDatabase } from "cca-core";
import { DataSource } from "typeorm";
class MyDatabase extends BaseDatabase {
constructor() {
super(
new DataSource({
/* typeorm config */
})
);
}
async connect(): Promise<void> {
await this.dataSource.initialize();
}
async disconnect(): Promise<void> {
await this.dataSource.destroy();
}
}
The BaseRepository
class implements common CRUD operations:
import { BaseRepository } from "cca-core";
import { User } from "./entities/User";
class UserRepository extends BaseRepository<User> {
// Add custom repository methods here
}
Key features include:
The BaseCacheService
provides in-memory caching with TTL support:
import { BaseCacheService } from "cca-core";
const cache = new BaseCacheService();
await cache.set("key", value, 3600); // Cache for 1 hour
const cachedValue = await cache.get("key");
Helpful utility functions:
ConfigManager()
: ConfigManager manages application configuration, supporting async loading, type safety, and notifications when configuration is available.generateSlug()
: Convert a string to a URL-friendly slugvalidateRepository()
: Validate a repository instanceThe module provides type-safe interfaces:
IBaseEntity
: Core entity interfaceIBaseRepository
: Repository interfaceIExtendedBaseRepository
: Extended repository interfaceIBaseService
: Service interfaceIBaseCacheService
: Cache service interfaceIPaginationOptions
: Pagination request optionsIPaginatedResult
: Paginated response structureBuilt-in error handling with the BaseError
class and utility functions.
import {
BaseContainer,
BaseDatabase,
BaseRepository,
generateSlug,
} from "cca-core";
// Set up database
class MyDatabase extends BaseDatabase {
// implementation
}
// Create repositories
class UserRepository extends BaseRepository<User> {
// custom methods
}
// Create container
const container = new BaseContainer({
database: new MyDatabase(),
});
// Register components
container.registerRepository("users", new UserRepository(/* ... */));
// Initialize
await container.initialize();
// Use the container
const userRepo = container.getRepository("users");
const users = await userRepo.getAll();
// Use utilities
const slug = generateSlug("My Article Title"); // "my-article-title"
MIT License - Copyright (c) 2025 Mindaugas Baltrunas
FAQs
A lightweight TypeScript framework for building modular and maintainable applications with TypeORM integration.
The npm package cca-core receives a total of 91 weekly downloads. As such, cca-core popularity was classified as not popular.
We found that cca-core 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.
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.