@warlock.js/notifications 5.26.0 → 5.27.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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to `@warlock.js/notifications` are documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). `@warlock.js/*` packages are released in lockstep — every package shares the same version number, so a version below may list only the changes that affected this package.
6
6
 
7
+ ## 5.27.0 - 2026-10-01
8
+
9
+ ### Changed
10
+
11
+ - Lockstep release; package APIs are unchanged.
12
+
7
13
  ## 5.26.0 - 2026-09-30
8
14
 
9
15
  ### Changed
package/cjs/index.cjs CHANGED
@@ -988,7 +988,7 @@ Or with your preferred package manager:
988
988
  async function loadHerald() {
989
989
  if (heraldModule) return heraldModule;
990
990
  try {
991
- heraldModule = await Promise.resolve().then(() => require("./src-BVlqtCR2.cjs"));
991
+ heraldModule = await Promise.resolve().then(() => require("./src-7ZmTOXFF.cjs"));
992
992
  return heraldModule;
993
993
  } catch {
994
994
  throw new Error(INSTALL_INSTRUCTIONS);
@@ -0,0 +1,3 @@
1
+ const require_src = require('./src-7ZmTOXFF.cjs');
2
+
3
+ exports.RabbitMQDriver = require_src.RabbitMQDriver;
@@ -707,7 +707,7 @@ const invalidRule = (rule, context) => {
707
707
  };
708
708
 
709
709
  //#endregion
710
- //#region ../node_modules/.pnpm/@mongez+supportive-is@2.1.5/node_modules/@mongez/supportive-is/esm/index.mjs
710
+ //#region ../node_modules/.pnpm/@mongez+supportive-is@3.0.0/node_modules/@mongez/supportive-is/esm/index.mjs
711
711
  /**
712
712
  * Determine whether the given value is a number whatever if its data type is String or Number
713
713
  */
@@ -728,6 +728,7 @@ const isFloat = (value) => typeof value === "number" && Number.isFinite(value) &
728
728
  const isRegex = (value) => Boolean(value) && value.constructor?.name === "RegExp";
729
729
  /**
730
730
  * Check if the given value is an object
731
+ * Arrays, dates and class instances are objects; `null` and functions are not
731
732
  */
732
733
  const isObject = (value) => Boolean(value) && typeof value === "object";
733
734
  /**
@@ -765,7 +766,8 @@ const isScalar = (value) => [
765
766
  "bigint"
766
767
  ].includes(typeof value);
767
768
  /**
768
- * Check if the given value is a pr value
769
+ * Check if the given value is a primitive value
770
+ * (string, boolean, number or bigint — symbols, `null` and `undefined` are not)
769
771
  */
770
772
  const isPrimitive = (value) => [
771
773
  "string",
@@ -783,6 +785,9 @@ const isPromise = (value) => Boolean(value) && value instanceof Promise;
783
785
  const isDate = (value) => Boolean(value) && typeof value === "object" && value instanceof Date;
784
786
  /**
785
787
  * Check if the given value is a generator
788
+ * Duck-typed: any object with a `next()` method that is its own iterator, so
789
+ * the predicate is `IterableIterator` (not `Generator`, whose `return` and
790
+ * `throw` methods are not verified)
786
791
  */
787
792
  const isGenerator = (value) => Boolean(value) && typeof value === "object" && typeof value.next === "function" && typeof value[Symbol.iterator] === "function" && value[Symbol.iterator]() === value;
788
793
  /**
@@ -815,7 +820,7 @@ const isEmpty = (value) => {
815
820
  */
816
821
  const isJson = (value) => {
817
822
  if (!value || typeof value !== "string") return false;
818
- if (!["[", "{"].includes(value?.[0])) return false;
823
+ if (!["[", "{"].includes(value[0])) return false;
819
824
  try {
820
825
  JSON.parse(value);
821
826
  return true;
@@ -7652,6 +7657,10 @@ var LiteralValidator = class extends BaseValidator {
7652
7657
 
7653
7658
  //#endregion
7654
7659
  //#region ../seal/src/validators/discriminated-union-validator.ts
7660
+ /** Whether a value read from the payload can be a discriminator key. */
7661
+ function isDiscriminatorValue(value) {
7662
+ return typeof value === "string" || typeof value === "number" || typeof value === "boolean";
7663
+ }
7655
7664
  /**
7656
7665
  * Discriminated union validator — routes payloads by a shared discriminator field.
7657
7666
  *
@@ -7731,7 +7740,7 @@ var DiscriminatedUnionValidator = class DiscriminatedUnionValidator extends Base
7731
7740
  data: void 0
7732
7741
  };
7733
7742
  const discriminatorValue = data[this.discriminator];
7734
- const branch = this.branches.get(discriminatorValue);
7743
+ const branch = isDiscriminatorValue(discriminatorValue) ? this.branches.get(discriminatorValue) : void 0;
7735
7744
  if (!branch) {
7736
7745
  const allowed = [...this.branches.keys()].map((k) => String(k)).join(", ");
7737
7746
  return {
@@ -10810,7 +10819,7 @@ async function connectToBroker(options) {
10810
10819
  switch (driverType) {
10811
10820
  case "rabbitmq": {
10812
10821
  const rabbitOptions = options;
10813
- const { RabbitMQDriver } = await Promise.resolve().then(() => require("./rabbitmq-driver-DvWaCPES.cjs"));
10822
+ const { RabbitMQDriver } = await Promise.resolve().then(() => require("./rabbitmq-driver-SmkI8hSw.cjs"));
10814
10823
  driver = new RabbitMQDriver(rabbitOptions);
10815
10824
  break;
10816
10825
  }
@@ -11134,4 +11143,4 @@ exports.heraldChannel = heraldChannel;
11134
11143
  exports.pendingSubscribers = pendingSubscribers;
11135
11144
  exports.publishEvent = publishEvent;
11136
11145
  exports.subscribeConsumer = subscribeConsumer;
11137
- //# sourceMappingURL=src-BVlqtCR2.cjs.map
11146
+ //# sourceMappingURL=src-7ZmTOXFF.cjs.map