Registry / storage / ymlr-redis

ymlr-redis

JSON →
library1.2.2-alpha.7jsnpmunverified

ymlr-redis is a plugin for the ymlr platform that provides Redis connector functionality including pub/sub messaging, job queues via BullMQ, and channel subscription management. It is currently at version 1.2.2-alpha.7, built on top of ioredis and BullMQ. The package ships TypeScript types. It is designed to be used within ymlr YAML-based workflows, offering a declarative way to interact with Redis without writing imperative code. Key differentiators: integration with ymlr's workflow engine, declarative job queue management, and pub/sub patterns.

npm install ymlr-redis
INSTALL
IMPORT
SIG · YMLR-REDIS
Y
ymlr-redis
storagejavascriptv1.2.2-alpha.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import ymlrRedis from 'ymlr-redis'
const ymlrRedis = require('ymlr-redis')
ESM-only; does not export CommonJS
Plugin
import { Plugin } from 'ymlr-redis'
import { ymlrRedis } from 'ymlr-redis'
Named export for plugin class
types
import type { RedisConfig } from 'ymlr-redis'
import { RedisConfig } from 'ymlr-redis'
Type import to avoid runtime inclusion

Shows how to import the plugin, define a YAML workflow that connects to Redis and publishes a message, then execute it.

import { Plugin } from 'ymlr-redis'; import { load } from 'ymlr'; const workflow = ` - name: Redis Example ymlr-redis: uri: ${process.env.REDIS_URI ?? 'redis://localhost:6379'} runs: - name: Publish message ymlr-redis'pub: channels: ['test'] data: { msg: 'Hello world' } `; async function run() { const engine = await load(workflow); await engine.start(); console.log('Workflow completed'); } run().catch(console.error);
Debug
Known issues
gotchaThe package is ESM-only; require() will fail with ERR_REQUIRE_ESM.
fix
Use import syntax or dynamic import().
affects: >=1.0.0
gotchaBullMQ is an optional dependency; job-related blocks will fail if not installed.
fix
Install bullmq package: npm install bullmq.
affects: >=1.0.0
breakingymlr-redis'job and ymlr-redis'onJob blocks require BullMQ Worker and Queue; incorrect options may cause silent failures.
fix
Ensure queue options match BullMQ documentation exactly.
affects: >=1.2.0
deprecatedUsing 'opts' with ioredis options directly is deprecated; use 'redisOptions' instead.
fix
Rename 'opts' to 'redisOptions'.
affects: <1.2.2
gotchaThe 'detach' property on ymlr-redis'job blocks keeps connection alive; forgetting to set detach to true may release connection prematurely.
fix
Set 'detach: false' to keep connection for reuse.
affects: >=1.0.0
Errors
Common errors & fixes
ERR_REQUIRE_ESM
Trying to require() an ESM-only package in CommonJS context.
fix
Use import instead, or set type: 'module' in package.json and use .mjs extension.
TypeError: Cannot read properties of undefined (reading 'redis')
Referencing a Redis connection that was never declared or released.
fix
Ensure ymlr-redis block is declared with 'detach: false' before using it in other blocks.
Error: queueOpts is not a valid BullMQ option
Providing invalid or misspelled options to ymlr-redis'job.
fix
Consult BullMQ documentation for valid QueueOptions and WorkerOptions.
Upgrade
Version history
1.2.2-alpha.7latest on npm
Audit
Dependencies
ioredisrequiredRedis client for connection and operations
bullmqoptionalJob queue support for ymlr-redis'job and ymlr-redis'onJob blocks
Agent activity
23 hits · last 30 days
node
20
OpenAI (training)
1
Resources
ymlr-redis — npm install ymlr-redis · libregistry