{"version":3,"file":"queue-package-not-installed.error.mjs","names":[],"sources":["../../../../../../../notifications/src/queue/queue-package-not-installed.error.ts"],"sourcesContent":["/**\n * Thrown when the `bullmq` queue driver (`bullmqQueue()`) is configured but\n * `@warlock.js/queue` — an optional peer — isn't installed. Surfaced at USE\n * time (first `.queue()` call), not at boot, matching the lazy-optional-peer\n * pattern `loadHerald` already uses for `@warlock.js/herald`.\n */\n\nfunction captureStack(target: object, ctor: new (...args: any[]) => unknown): void {\n  // V8 only; guarded for non-V8 runtimes.\n  (Error as unknown as { captureStackTrace?: (t: object, c: unknown) => void }).captureStackTrace?.(\n    target,\n    ctor,\n  );\n}\n\nexport class QueuePackageNotInstalledError extends Error {\n  public constructor() {\n    super(\n      \"The bullmq notifications queue driver requires @warlock.js/queue, which isn't installed. \" +\n        \"Install it with:\\n\\n\" +\n        \"  warlock add queue\\n\\n\" +\n        \"Or with your preferred package manager:\\n\\n\" +\n        \"  pnpm add @warlock.js/queue\\n\" +\n        \"  npm install @warlock.js/queue\\n\" +\n        \"  yarn add @warlock.js/queue\",\n    );\n    this.name = \"QueuePackageNotInstalledError\";\n    captureStack(this, QueuePackageNotInstalledError);\n  }\n}\n"],"mappings":";;;;;;;AAOA,SAAS,aAAa,QAAgB,MAA6C;CAEjF,AAAC,MAA6E,oBAC5E,QACA,IACF;AACF;AAEA,IAAa,gCAAb,MAAa,sCAAsC,MAAM;CACvD,AAAO,cAAc;EACnB,MACE,4QAOF;EACA,KAAK,OAAO;EACZ,aAAa,MAAM,6BAA6B;CAClD;AACF"}