@beechcms/core 0.6.3 → 0.6.4

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.
@@ -31,9 +31,13 @@ export type JobRegistry = Record<string, JobHandler<any>>;
31
31
  * Producer port. `enqueue` schedules deferred work and returns once the message
32
32
  * is accepted by the transport. Like INotificationService, implementations MUST
33
33
  * decide their own fire-and-forget vs inline semantics and MUST NOT let a
34
- * transport failure crash the request that called enqueue.
34
+ * transport failure crash the request that called enqueue. Resolves `true`
35
+ * when the message was handed off successfully, `false` when it was dropped
36
+ * (e.g. transport rejection, oversized payload, no handler) — callers that
37
+ * need at-least-once delivery guarantees MUST check this instead of assuming
38
+ * a resolved promise means success.
35
39
  */
36
40
  export interface IQueueService {
37
- enqueue<T>(name: string, payload: T): Promise<void>;
41
+ enqueue<T>(name: string, payload: T): Promise<boolean>;
38
42
  }
39
43
  //# sourceMappingURL=queue.interface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"queue.interface.d.ts","sourceRoot":"","sources":["../../src/queue/queue.interface.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D;;;GAGG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,OAAO;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,CAAC,CAAA;CACX;AAED;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,iBAAiB,CAAA;IAC7B,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,YAAY,CAAA;IACzB,GAAG,EAAE,MAAM,CAA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C,EACV,OAAO,EAAE,UAAU,KAChB,OAAO,CAAC,IAAI,CAAC,CAAA;AAElB,0DAA0D;AAC1D,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAA;AAEzD;;;;;;;;;GASG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CACvD"}
@@ -1,6 +1,6 @@
1
1
  import type { IQueueService } from './queue.interface.js';
2
2
  /** Safe no-op producer (e.g. unit tests that don't assert on enqueue). */
3
3
  export declare class NoOpQueueService implements IQueueService {
4
- enqueue<T>(_name: string, _payload: T): Promise<void>;
4
+ enqueue<T>(_name: string, _payload: T): Promise<boolean>;
5
5
  }
6
6
  //# sourceMappingURL=queue.stub.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"queue.stub.d.ts","sourceRoot":"","sources":["../../src/queue/queue.stub.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzD,0EAA0E;AAC1E,qBAAa,gBAAiB,YAAW,aAAa;IAC9C,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAE1D;CACF"}
1
+ {"version":3,"file":"queue.stub.d.ts","sourceRoot":"","sources":["../../src/queue/queue.stub.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzD,0EAA0E;AAC1E,qBAAa,gBAAiB,YAAW,aAAa;IAC9C,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAG7D;CACF"}
@@ -3,6 +3,7 @@
3
3
  /** Safe no-op producer (e.g. unit tests that don't assert on enqueue). */
4
4
  export class NoOpQueueService {
5
5
  async enqueue(_name, _payload) {
6
- // intentionally empty
6
+ // intentionally empty; reports success since there is nothing to fail
7
+ return true;
7
8
  }
8
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beechcms/core",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",