
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
@cortec/storage
Advanced tools
The @cortec/storage package provides a unified interface for managing file storage backends. It currently supports disk-based storage and is designed to be extensible for other storage providers. The module allows you to configure multiple storage instances, each with its own directory and options, and access them by name.
Where to put config:
Place your storage config in config/default.yml (or your environment-specific config file).
Schema:
storage:
uploads:
dir: '/var/app/uploads'
makeParent: true
logs:
dir: '/var/app/logs'
makeParent: false
Field-by-field explanation:
storage: Root key for Storage config.uploads, logs: Identity/name for each storage instance (can be any string).dir: Directory path for storage. This is where files will be read/written.makeParent: If true, parent directories will be created automatically if missing.How config is loaded:
The config is loaded automatically by the @cortec/config module and validated at runtime.
Access it in code via:
import { Config } from '@cortec/config';
const storageConfig = Config.get('storage');
If config is missing or invalid, an error is thrown at startup.
Example YAML:
storage:
uploads:
dir: '/var/app/uploads'
makeParent: true
logs:
dir: '/var/app/logs'
makeParent: false
import Storage from '@cortec/storage';
// After context is loaded and storage module is initialized
const storage = new Storage();
// Get a storage instance by name
const uploadsStorage = storage.get('uploads');
// Use the storage instance (DiskStorage API)
await uploadsStorage.writeFile('example.txt', 'Hello, world!');
const content = await uploadsStorage.readFile('example.txt');
console.log(content); // "Hello, world!"
// Dispose all storage instances when shutting down
await storage.dispose();
storage.get(name: string): IBaseStorageReturns the storage instance for the given name. Throws if not found.
The returned IBaseStorage instance supports typical file operations such as:
writeFile(filename: string, data: string | Buffer): Promise<void>readFile(filename: string): Promise<string | Buffer>deleteFile(filename: string): Promise<void>dispose(): Promise<void>FAQs
<description>
We found that @cortec/storage 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
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.