Skip to content

Helpers

Reusable classes and functions providing common functionality - designed for easy injection and configuration.

Available Helpers

HelperPurposeKey Features
Common TypesUtility typesNullable, resolvers, class types
CronJob schedulingCron expressions, task management
CryptoCryptographic operationsAES/RSA/ECDH encryption, key exchange, hashing
EnvironmentEnvironment variablesCentralized config access
ErrorError handlingApplicationError, consistent responses
InversionDependency injectionDI container implementation
LoggerLoggingWinston-based, multiple transports, scopes
NetworkNetwork requestsHTTP, TCP, UDP helpers
KafkaEvent streamingApache Kafka producer/consumer/admin/schema registry
QueueMessage queuesBullMQ, MQTT support
RedisRedis operationsSingle/cluster, key-value, hashes, JSON, pub/sub
Socket.IOReal-time communicationSocket.IO client/server helpers
WebSocketReal-time communicationBun native WebSocket server/emitter, Redis scaling
StorageFile storageIn-memory, Minio object storage
TestingTest utilitiesTest plan runner, base test classes
UIDUnique ID generationSnowflake IDs, Base62 encoding
Worker ThreadWorker threadsNode.js worker management

Subpath Imports

Some helpers with optional peer dependencies are only available via subpath imports to ensure proper tree-shaking:

SubpathPeer DependencyDescription
@venizia/ignis-helpers/kafka@platformatic/kafkaKafka producer/consumer/admin/schema registry
@venizia/ignis-helpers/bullmqbullmqBullMQ job queue
@venizia/ignis-helpers/mqttmqttMQTT pub/sub client
@venizia/ignis-helpers/socket-iosocket.io, socket.io-clientSocket.IO server/client
@venizia/ignis-helpers/miniominioMinIO S3-compatible storage
@venizia/ignis-helpers/bun-s3--Bun native S3 storage
@venizia/ignis-helpers/croncronCron job scheduling
@venizia/ignis-helpers/axiosaxiosAxios HTTP client

See Also