@hexok/queue 2.0.1 → 2.0.2

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.
package/README.md CHANGED
@@ -8,7 +8,7 @@ import { Queue, type QueueHandler } from '@hexok/queue';
8
8
 
9
9
  `publish` resolves a broker id. `subscribe` requires `consumerGroup` and `maxDeliveries`. There is no default. A positive integer runs the handler at most that many times. `'unlimited'` retries without a ceiling. `deliveries` on the message is the 1-based handoff count, including a crash that never acknowledged. It is stored with the entry, not in the process. A handler return of `'ack'`, `void`, or `'drop'` acknowledges, including on the last delivery. `'retry'` leaves the entry pending until the ceiling. A throw uses `onError`, which defaults to `'retry'`. A retry at the ceiling is acknowledged. It is not a handler `'drop'`. There is no dead-letter stream. A Redis adapter can park a failed publish, a missing payload, a decode failure, or a give-up when a quarantine sink is passed. A handler `'drop'` is not parked. Without a durable sink, a give-up discards.
10
10
 
11
- Pass `{ sensitive: true }` as the third `publish` argument for a payload that holds a secret, such as a one-time code or a reset link. An adapter then parks and logs that message without its payload. `@hexok/queue-redis` does this from 0.2.0. Its 0.1 release ignores `sensitive`.
11
+ Pass `{ sensitive: true }` as the third `publish` argument for a payload that holds a secret, such as a one-time code or a reset link. An adapter then parks and logs that message without its payload. `sensitive` does not encrypt the payload or remove it from the broker. The adapter's README says what the broker keeps. `@hexok/queue-redis` does this from 0.2.0. Its 0.1 release ignores `sensitive`.
12
12
 
13
13
  Pass `{ delayMs }` to `publish` to deliver no sooner than that many milliseconds from now. Omitted or 0 publishes now. A handler may return `{ retryInMs, payload? }` to acknowledge the entry and publish its replacement after `retryInMs`, in one step. The replacement carries `payload`, or the same payload when it is omitted, and starts at delivery 1. Only the consumer group that returned the result handles the replacement. `concurrency` on `subscribe` sets how many handlers of that subscription run at once. It defaults to 1.
14
14
 
package/dist/queue.d.ts CHANGED
@@ -37,7 +37,7 @@ export interface QueueSubscribeOptions<T> {
37
37
  readonly concurrency?: number;
38
38
  readonly handler: QueueHandler<T>;
39
39
  }
40
- /** `sensitive` keeps the payload out of quarantine and logs. Use it for one-time codes and reset links. */
40
+ /** `sensitive` keeps the payload out of quarantine and logs. It does not encrypt the payload or remove it from the broker. Use it for one-time codes and reset links. */
41
41
  export interface QueuePublishOptions {
42
42
  readonly sensitive?: boolean;
43
43
  /** Delivers no sooner than this many milliseconds from now. Omitted or 0 publishes now. */
@@ -1 +1 @@
1
- {"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../src/queue.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,CAAC;AAExD,uEAAuE;AACvE,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,WAAW,CAAC;AAEtD,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;CACtB;AAED,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAC5B,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,KACrB,OAAO,CAAC,gBAAgB,GAAG,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;AAExD,MAAM,MAAM,cAAc,GACtB,UAAU,GACV,KAAK,GACL;IAAE,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvC,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC,QAAQ,CAAC,aA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jC,MAAM,EAAE,OAAO,EACf,OAAO,GAAE,gBAA0B,GAClC,gBAAgB,CAIlB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexok/queue",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Queue port for hexok.",
5
5
  "type": "module",
6
6
  "license": "MIT",