
Security News
/Research
Fake Corepack Site Distributes Infostealer and Proxyware to Developers
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.
@chargebee/chargebee-apps-shared
Advanced tools
Shared interfaces and utilities for Chargebee Apps CLI
Core interfaces, types, and utilities shared across all Chargebee Apps CLI packages.
This package serves as the foundation for the Chargebee Apps CLI ecosystem, providing:
The shared package follows a strict interface-first design, ensuring that both public-facing and internal implementations adhere to the same contracts.
@chargebee/chargebee-apps-shared
├── src/
│ ├── config/ # Environment detection and path resolution
│ ├── dependency/ # Dependency management and npm operations
│ ├── types/ # Common TypeScript interfaces and types
│ ├── logger/ # Logging interfaces and utilities
│ ├── sandbox/ # Sandbox execution interfaces
│ ├── event-handler/ # Event handling interfaces
│ └── index.ts # Main exports
This package contains core interfaces and utilities organized into focused modules. Each module has detailed documentation with code examples and usage patterns.
CBFileSystem) - Abstracted file operationsCBProcess) - Abstracted process operationsICBLogger) - Standardized logging for user codeEventRecord, Manifest) - Event and configuration types__logger) - CLI operation loggingSandboxContext) - Execution context correlationISandboxWrapper) - Secure code execution interfaceIEventHandler) - Event processing interfaceThis package is imported by other packages in the workspace to implement the defined interfaces:
import {
ICBLogger,
CBFileSystem,
ISandboxWrapper,
DependencyManager,
PathResolver,
EnvironmentConfig
} from '@chargebee/chargebee-apps-shared';
// Environment detection
const envConfig = new EnvironmentConfig();
console.log(`Running in ${envConfig.getEnvironment()} mode`);
// Path resolution
const pathResolver = new PathResolver();
const templatesPath = pathResolver.getPublicLibsTemplatesDir();
// Dependency management
const dependencyManager = new DependencyManager();
await dependencyManager.ensureDependencies('/app/path', manifest);
// Implement interfaces in your package
export class MyLogger implements ICBLogger {
// Implementation details...
}
Standard npm scripts: build, test, test:coverage, and type-check.
Runtime: semver (for dependency version validation) Development: TypeScript 5.0+, Jest, @types/node
src/config/ - Environment detection and path resolution utilitiessrc/dependency/ - Dependency management with isolated npm installations and secure module loadingsrc/types/ - Core types and interfaces with usage examplessrc/logger/ - Logging interfaces and utilities with implementation patternssrc/sandbox/ - Sandbox execution interfaces with security examplessrc/event-handler/ - Event handling interfaces with processing patternstests/unit/ - Unit testsWhen adding new interfaces or types:
FAQs
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
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.

Research
/Security News
A large-scale campaign abused GitHub Actions in compromised repositories to exploit CVE-2026-41940 in cPanel and WHM and steal server credentials.

Security News
Five frontier LLMs generated the same nonexistent package names, leaving 53 available for potential slopsquatting across PyPI and npm.