@emeryld/rrroutes-server 2.5.2 → 2.5.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.
package/dist/index.js CHANGED
@@ -24,7 +24,7 @@ var normalizeOptions = (options) => {
24
24
  targets: new Set(options.targets ?? defaultTargets),
25
25
  trimStrings: options.trimStrings ?? false,
26
26
  stripNullBytes: options.stripNullBytes ?? true,
27
- stripPrototypePollutionKeys: options.stripPrototypePollutionKeys ?? true,
27
+ stripBlockedKeys: options.stripBlockedKeys ?? true,
28
28
  blockedKeys: new Set(options.blockedKeys ?? defaultBlockedKeys),
29
29
  maxDepth: options.maxDepth ?? defaultMaxDepth,
30
30
  customSanitizer: options.customSanitizer,
@@ -80,7 +80,7 @@ var sanitizeValue = (value, options, depth, seen, req, target, path) => {
80
80
  const source = value;
81
81
  const objectTarget = Object.getPrototypeOf(source) === null ? /* @__PURE__ */ Object.create(null) : {};
82
82
  for (const [key, entry] of Object.entries(source)) {
83
- if (options.stripPrototypePollutionKeys && options.blockedKeys.has(key)) {
83
+ if (options.stripBlockedKeys && options.blockedKeys.has(key)) {
84
84
  continue;
85
85
  }
86
86
  ;
@@ -1180,7 +1180,8 @@ function createSocketConnections(io, events, opts) {
1180
1180
  sentAt: /* @__PURE__ */ new Date(),
1181
1181
  sentTo: targets,
1182
1182
  data: check.data,
1183
- metadata: metadata ?? {}
1183
+ metadata: metadata ?? {},
1184
+ rooms: targets
1184
1185
  };
1185
1186
  if (targets.length === 0) io.emit(String(eventName), envelope);
1186
1187
  else if (targets.length === 1) {