Helpers
Standalone utility classes for infrastructure concerns - extend BaseHelper for scoped logging, and inject them wherever you need them.
Every peer dependency below is optional. You install one only when you use the helper that needs it.
| Helper | What it does | When you reach for it | Peer dependency |
|---|---|---|---|
| Types | Shared utility types | You need IGNIS's shared TypeScript utility types | None |
| Cron | Scheduled tasks | You run code on a cron schedule | cron |
| Crypto | Encryption and signing | You hash, encrypt, or sign data | None |
| Environment | Env var management | You need typed, validated env var access | None |
| Error | Error utilities | You throw or handle an error | None |
| Secrets & Vault | Secrets and credentials | You read config or credentials from Vault or a vaulted .env | node-vault or @dotenvx/dotenvx |
| Inversion | DI container | You build custom bindings or providers | None |
| Logger | Logging | You need scoped, leveled logging | winston or pino |
| Network | HTTP/TCP/UDP clients | You call another service over HTTP, TCP, or UDP | axios, for the Axios client only |
| Kafka | Kafka messaging | You publish or consume Kafka topics | @platformatic/kafka |
| Queue | Job queues | You need background or delayed work | bullmq or mqtt |
| Redis | Redis client | You need a Redis connection - cache, pub/sub, locks | ioredis |
| Socket.IO | Socket.IO server | You build a custom real-time feature | socket.io |
| WebSocket | WebSocket server | You build a custom real-time feature | None |
| Storage | File storage | You read/write files to S3 or disk directly | none - the S3 backend uses Bun's own client |
| Temporal | Dates in a time zone | You parse, format, or add a month to a date in a named zone | None - you pass in your own date library |
| UID | Snowflake IDs | You need unique, sortable IDs | None |
| Worker Thread | Worker pools | You move CPU-heavy work off the main thread | None |
Subpath imports
A helper with an optional peer dependency ships from its own subpath, so a bundler never pulls in a peer you don't use.
| Import from | Requires |
|---|---|
@venizia/ignis-helpers/cron | cron |
@venizia/ignis-helpers/axios | axios |
@venizia/ignis-helpers/kafka | @platformatic/kafka |
@venizia/ignis-helpers/bullmq | bullmq |
@venizia/ignis-helpers/mqtt | mqtt |
@venizia/ignis-helpers/socket-io | socket.io; socket.io-client only for SocketIOClientHelper, loaded when it configures |
@venizia/ignis-helpers/minio | minio |
@venizia/ignis-helpers/bun-s3 | none - Bun native |
@venizia/ignis-helpers/hashicorp-vault | node-vault |
@venizia/ignis-helpers/dotenv-vault | @dotenvx/dotenvx |
@venizia/ignis-helpers/winston | winston |
@venizia/ignis-helpers/pino | pino |
Four more subpaths are of a different kind. They isolate no peer dependency - they expose the parts of this package that are already browser-safe.
| Import from | Holds |
|---|---|
@venizia/ignis-helpers/common | Constants and pure types: HTTP, GRPC, TConstValue, the duration and mime tables, the redaction helpers |
@venizia/ignis-helpers/core | Browser-safe runtime classes: BaseHelper, the error module, RetryHelper, TemporalHelper, TreeBuilder, TreeWalker, SlugHelper, UrlPolicy, BuildInfoRegistry, ProjectRootRegistry, and the parse utilities |
@venizia/ignis-helpers/temporal | TemporalHelper and its adapters alone |
@venizia/ignis-helpers/uuid | uuidV4, uuidV5, uuidV7 and UuidHelper alone - see UID |
Import one of them when your code has to bundle for a browser.
The root barrel cannot: it re-exports every module, so reaching one constant through it pulls in 14 node builtins - node:fs, node:net, node:tls, node:worker_threads among them. A guard test bundles both entry points for a browser target and fails if that ever changes.
/core is hand-curated one symbol at a time, never export * from a module barrel. ./modules/env carries applicationEnvironment, which reads process.env, so only EnvironmentNames crosses over. UrlPolicy crosses, its UrlIngest sibling does not, because UrlIngest reaches node:dns.
import { HTTP } from '@venizia/ignis-helpers/common';
import { RetryHelper } from '@venizia/ignis-helpers/core';See also
- Services - using helpers in the service layer
- Controllers - using helpers in controllers
- Utilities - pure utility functions
- Components - framework components