@ultimat3/notify 31.35.0 → 31.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +8 -8
  2. package/src/errors.ts +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/notify",
3
- "version": "31.35.0",
3
+ "version": "31.36.0",
4
4
  "description": "Notifications: one declaration, many channels — fan-out, preference gate, digest window, delivery ledger, in-app inbox",
5
5
  "keywords": [
6
6
  "ultimate",
@@ -46,12 +46,12 @@
46
46
  "test": "bun test"
47
47
  },
48
48
  "dependencies": {
49
- "@ultimat3/action": "31.35.0",
50
- "@ultimat3/core": "31.35.0",
51
- "@ultimat3/i18n": "31.35.0",
52
- "@ultimat3/jobs": "31.35.0",
53
- "@ultimat3/policy": "31.35.0",
54
- "@ultimat3/schema": "31.35.0",
55
- "@ultimat3/time": "31.35.0"
49
+ "@ultimat3/action": "31.36.0",
50
+ "@ultimat3/core": "31.36.0",
51
+ "@ultimat3/i18n": "31.36.0",
52
+ "@ultimat3/jobs": "31.36.0",
53
+ "@ultimat3/policy": "31.36.0",
54
+ "@ultimat3/schema": "31.36.0",
55
+ "@ultimat3/time": "31.36.0"
56
56
  }
57
57
  }
package/src/errors.ts CHANGED
@@ -100,7 +100,7 @@ export class NotifyChannelsEmptyError extends UltimateError {
100
100
  super({
101
101
  code: 'X_NOTIFY_CHANNELS_EMPTY',
102
102
  cause: `notifier "${input.notifier}" declares no channels, so every run resolves recipients and delivers nothing`,
103
- fix: `add at least one entry to deliver: [] on notifier("${input.notifier}") — inAppChannel() is the one with no external driver`,
103
+ fix: `deliver: [{ channel: inAppChannel() }] // at least one entry, on notifier("${input.notifier}") — inAppChannel() is the one with no external driver`,
104
104
  meta: { notifier: input.notifier },
105
105
  });
106
106
  }
@@ -122,7 +122,7 @@ export class NotifyChannelDuplicateError extends UltimateError {
122
122
  super({
123
123
  code: 'X_NOTIFY_CHANNEL_DUPLICATE',
124
124
  cause: `notifier "${input.notifier}" declares the channel "${input.channel}" twice, and the delivery ledger keys on it — the second would be deduped away`,
125
- fix: `give the second channel its own name on notifier("${input.notifier}") — deliveryChannel('${input.channel}-digest', …) — or merge the two deliver entries`,
125
+ fix: `deliveryChannel('${input.channel}-digest', …) // the second channel's own name on notifier("${input.notifier}") — or merge the two deliver entries`,
126
126
  meta: { notifier: input.notifier, channel: input.channel },
127
127
  });
128
128
  }
@@ -138,7 +138,7 @@ export class NotifyFanoutTooWideError extends UltimateError {
138
138
  super({
139
139
  code: 'X_NOTIFY_FANOUT_TOO_WIDE',
140
140
  cause: `notifier "${input.notifier}" resolved ${String(input.recipients)} recipients and the per-run ceiling is ${String(input.max)} — each one is a durable step row`,
141
- fix: `deliver through a bulkChannel() on notifier("${input.notifier}"), which sends one payload for every recipient, or page the audience with backfill() from @ultimat3/jobs`,
141
+ fix: `bulkChannel(…) // deliver through one on notifier("${input.notifier}"): one payload for every recipient — or page the audience with backfill() from @ultimat3/jobs`,
142
142
  meta: { notifier: input.notifier, recipients: input.recipients, max: input.max },
143
143
  });
144
144
  }
@@ -191,7 +191,7 @@ export class NotifyDigestUnsupportedError extends UltimateError {
191
191
  super({
192
192
  code: 'X_NOTIFY_DIGEST_UNSUPPORTED',
193
193
  cause: `notifier "${input.notifier}" declares a digest window on the bulk channel "${input.channel}", and a window coalesces per recipient where a bulk send has none`,
194
- fix: `drop digest from the "${input.channel}" entry on notifier("${input.notifier}") and give it a wait instead, or deliver it through deliveryChannel('${input.channel}', …) one recipient at a time`,
194
+ fix: `{ channel, wait: '1h' } // the "${input.channel}" entry on notifier("${input.notifier}"), digest dropped — or deliver it through deliveryChannel('${input.channel}', …) one recipient at a time`,
195
195
  meta: { notifier: input.notifier, channel: input.channel },
196
196
  });
197
197
  }