@livedesk/hub 0.1.61 → 0.1.64

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.
@@ -404,17 +404,19 @@ export function createHubRelayControl({
404
404
  env = process.env,
405
405
  pairToken,
406
406
  onPeerSocket = () => {},
407
- logEvent = () => {},
408
- logWarn = () => {},
409
- connect = options => net.createConnection(options),
410
- randomBytes = size => crypto.randomBytes(size)
411
- } = {}) {
407
+ logEvent = () => {},
408
+ logWarn = () => {},
409
+ connect = options => net.createConnection(options),
410
+ randomBytes = size => crypto.randomBytes(size),
411
+ retiredPayloadRelayTestOnly = false
412
+ } = {}) {
412
413
  const token = requirePairToken(pairToken);
413
414
  const roomId = deriveRelayRoomId(token);
414
415
  const registrationToken = deriveRelayRegistrationToken(token, roomId);
415
- const enabled = isEnabled(
416
- env.LIVEDESK_RELAY_ENABLED,
417
- isEnabled(env.LIVEDESK_UDP_ENABLED, true));
416
+ // Product runtime is permanently fail-closed. The private injection keeps
417
+ // dormant protocol tests executable while the retired implementation is
418
+ // removed separately; no environment setting can open a payload socket.
419
+ const enabled = retiredPayloadRelayTestOnly === true;
418
420
  const host = safeText(
419
421
  env.LIVEDESK_RELAY_HOST
420
422
  || env.LIVEDESK_UDP_RENDEZVOUS_HOST