{"version":3,"file":"load-herald.mjs","names":[],"sources":["../../../../../../../notifications/src/queue/load-herald.ts"],"sourcesContent":["/**\n * Lazily load `@warlock.js/herald` — the optional peer backing `.queue()`.\n *\n * Memoized: the dynamic import runs at most once. A missing package surfaces a\n * curated install message at use time rather than a boot-time resolution error\n * (the lazy-optional-peer pattern used across the framework's drivers).\n */\nlet heraldModule: typeof import(\"@warlock.js/herald\") | undefined;\n\nconst INSTALL_INSTRUCTIONS = `\nThe notifications queue requires the @warlock.js/herald package.\nInstall it with:\n\n  npm install @warlock.js/herald\n\nOr with your preferred package manager:\n\n  pnpm add @warlock.js/herald\n  yarn add @warlock.js/herald\n`.trim();\n\nexport async function loadHerald(): Promise<typeof import(\"@warlock.js/herald\")> {\n  if (heraldModule) {\n    return heraldModule;\n  }\n\n  try {\n    heraldModule = await import(\"@warlock.js/herald\");\n    return heraldModule;\n  } catch {\n    throw new Error(INSTALL_INSTRUCTIONS);\n  }\n}\n\n/** The herald channel notification jobs are published to / consumed from. */\nexport const DEFAULT_QUEUE_CHANNEL = \"notifications.dispatch\";\n"],"mappings":";;;;;;;;AAOA,IAAI;AAEJ,MAAM,uBAAuB;;;;;;;;;;EAU3B,KAAK;AAEP,eAAsB,aAA2D;CAC/E,IAAI,cACF,OAAO;CAGT,IAAI;EACF,eAAe,MAAM,OAAO;EAC5B,OAAO;CACT,QAAQ;EACN,MAAM,IAAI,MAAM,oBAAoB;CACtC;AACF;;AAGA,MAAa,wBAAwB"}