
Research
TeamPCP Compromises Telnyx Python SDK to Deliver Credential-Stealing Malware
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.
@eggjs/tegg-common-util
Advanced tools
Common utility functions for tegg framework.
A utility method for deduplicating module references to avoid adding duplicate modules.
public static deduplicateModules(
moduleReferences: readonly ModuleReference[]
): readonly ModuleReference[]
Note: This method does not accept options parameters. The behavior is fixed and optimized for common use cases.
import { ModuleConfigUtil } from '@eggjs/tegg-common-util';
const modules = [
{ name: 'module1', path: '/path/to/module1' },
{ name: 'module2', path: '/path/to/module2' },
{ name: 'module1', path: '/different/path/to/module1' }, // Will throw error
];
const result = ModuleConfigUtil.deduplicateModules(modules);
// Throws Error: Duplicate module name "module1" found
const modules = [
{ name: 'module1', path: '/path/to/module1', optional: true },
{ name: 'module1', path: '/path/to/module1' }, // Non-optional version
];
const result = ModuleConfigUtil.deduplicateModules(modules);
// Result: 1 module, non-optional version kept
const modules = [
{ name: 'module1', path: '/path/to/module1' },
{ name: 'module2', path: '/path/to/module1' }, // Same path, different name
];
const result = ModuleConfigUtil.deduplicateModules(modules);
// Result: 1 module, first occurrence kept
// In ModuleScanner.loadModuleReferences()
return ModuleConfigUtil.deduplicateModules(allModuleReferences);
// Automatically handles deduplication with optimal defaults
// In Runner.getModuleReferences()
return ModuleConfigUtil.deduplicateModules(allModuleReferences);
// Simple and reliable deduplication
try {
const result = ModuleConfigUtil.deduplicateModules(modules);
} catch (error) {
if (error.message.includes('Duplicate module name')) {
// Handle duplicate module name error
console.error('Configuration error:', error.message);
}
throw error;
}
// This API never existed in the actual implementation
const result = ModuleConfigUtil.deduplicateModules(modules, {
prioritizeNonOptional: true,
allowNameDuplicates: false,
logPrefix: '[tegg/config]',
logger: customLogger,
});
// Current implementation - simple and direct
const result = ModuleConfigUtil.deduplicateModules(modules);
// Automatically handles all deduplication logic
FAQs
common util for tegg
The npm package @eggjs/tegg-common-util receives a total of 4,110 weekly downloads. As such, @eggjs/tegg-common-util popularity was classified as popular.
We found that @eggjs/tegg-common-util demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 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
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.

Security News
/Research
Widespread GitHub phishing campaign uses fake Visual Studio Code security alerts in Discussions to trick developers into visiting malicious website.