{"id":46842,"library":"ymlr-redis","title":"ymlr-redis","description":"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.","status":"active","version":"1.2.2-alpha.7","language":"javascript","source_language":"en","source_url":"https://github.com/circle2jt/ymlr-redis","tags":["javascript","redis","ymlr","ymlr plugin","typescript"],"install":[{"cmd":"npm install ymlr-redis","lang":"bash","label":"npm"},{"cmd":"yarn add ymlr-redis","lang":"bash","label":"yarn"},{"cmd":"pnpm add ymlr-redis","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Redis client for connection and operations","package":"ioredis","optional":false},{"reason":"Job queue support for ymlr-redis'job and ymlr-redis'onJob blocks","package":"bullmq","optional":true}],"imports":[{"note":"ESM-only; does not export CommonJS","wrong":"const ymlrRedis = require('ymlr-redis')","symbol":"default","correct":"import ymlrRedis from 'ymlr-redis'"},{"note":"Named export for plugin class","wrong":"import { ymlrRedis } from 'ymlr-redis'","symbol":"Plugin","correct":"import { Plugin } from 'ymlr-redis'"},{"note":"Type import to avoid runtime inclusion","wrong":"import { RedisConfig } from 'ymlr-redis'","symbol":"types","correct":"import type { RedisConfig } from 'ymlr-redis'"}],"quickstart":{"code":"import { Plugin } from 'ymlr-redis';\nimport { load } from 'ymlr';\n\nconst workflow = `\n- name: Redis Example\n  ymlr-redis:\n    uri: ${process.env.REDIS_URI ?? 'redis://localhost:6379'}\n    runs:\n      - name: Publish message\n        ymlr-redis'pub:\n          channels: ['test']\n          data: { msg: 'Hello world' }\n`;\n\nasync function run() {\n  const engine = await load(workflow);\n  await engine.start();\n  console.log('Workflow completed');\n}\n\nrun().catch(console.error);","lang":"typescript","description":"Shows how to import the plugin, define a YAML workflow that connects to Redis and publishes a message, then execute it."},"warnings":[{"fix":"Use import syntax or dynamic import().","message":"The package is ESM-only; require() will fail with ERR_REQUIRE_ESM.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Install bullmq package: npm install bullmq.","message":"BullMQ is an optional dependency; job-related blocks will fail if not installed.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure queue options match BullMQ documentation exactly.","message":"ymlr-redis'job and ymlr-redis'onJob blocks require BullMQ Worker and Queue; incorrect options may cause silent failures.","severity":"breaking","affected_versions":">=1.2.0"},{"fix":"Rename 'opts' to 'redisOptions'.","message":"Using 'opts' with ioredis options directly is deprecated; use 'redisOptions' instead.","severity":"deprecated","affected_versions":"<1.2.2"},{"fix":"Set 'detach: false' to keep connection for reuse.","message":"The 'detach' property on ymlr-redis'job blocks keeps connection alive; forgetting to set detach to true may release connection prematurely.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.2.2':35 'alpha.7':36 'base':59 'built':37 'bullmq':25,43 'channel':27 'code':72 'connector':17 'current':32 'declar':63,81 'design':51 'differenti':74 'engin':80 'function':18 'imper':71 'includ':19 'integr':75 'interact':66 'ioredi':41 'javascript':88 'job':22,82 'key':73 'manag':29,84 'messag':21 'offer':61 'packag':45 'pattern':87 'platform':13 'plugin':9,92 'provid':15 'pub/sub':20,86 'queue':23,83 'redi':3,6,16,68,89 'ship':46 'subscript':28 'top':39 'type':48 'typescript':47,93 'use':54 'version':34 'via':24 'way':64 'within':55 'without':69 'workflow':60,79 'write':70 'yaml':58 'yaml-bas':57 'ymlr':2,5,12,56,77,90,91 'ymlr-redi':1,4","created_at":"2026-06-07T13:01:53.640989+00:00","updated_at":"2026-06-07T13:01:53.640989+00:00","problems":[{"fix":"Use import instead, or set type: 'module' in package.json and use .mjs extension.","cause":"Trying to require() an ESM-only package in CommonJS context.","error":"ERR_REQUIRE_ESM"},{"fix":"Ensure ymlr-redis block is declared with 'detach: false' before using it in other blocks.","cause":"Referencing a Redis connection that was never declared or released.","error":"TypeError: Cannot read properties of undefined (reading 'redis')"},{"fix":"Consult BullMQ documentation for valid QueueOptions and WorkerOptions.","cause":"Providing invalid or misspelled options to ymlr-redis'job.","error":"Error: queueOpts is not a valid BullMQ option"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/circle2jt/ymlr-redis#readme","github":"https://github.com/circle2jt/ymlr-redis","docs":null,"changelog":null,"pypi":null,"npm":"ymlr-redis","openapi_spec":null,"status_page":null,"smithery":null,"categories":["storage"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}