epicenter-libs 3.35.0 → 3.35.1

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.
@@ -84336,6 +84336,7 @@ const CONNECT_META_CHANNEL = '/meta/connect';
84336
84336
  const DISCONNECT_META_CHANNEL = '/meta/disconnect';
84337
84337
  const HANDSHAKE_META_CHANNEL = '/meta/handshake';
84338
84338
  const COMETD_RECONNECTED = 'COMETD_RECONNECTED';
84339
+ const CHANNELS_NOT_ENABLED = 'CHANNELS_NOT_ENABLED';
84339
84340
  const DEFAULT_CHANNEL_PROTOCOL = 'cometd';
84340
84341
  // error messages that indicate session invalidation as
84341
84342
  // described in cometd documentation and oumuamua source code:
@@ -84387,7 +84388,7 @@ class CometdAdapter {
84387
84388
  }) {
84388
84389
  var _project$channelProto;
84389
84390
  const project = await get$f();
84390
- if (!project.channelEnabled) throw new EpicenterError('Push Channels are not enabled on this project');
84391
+ if (!project.channelEnabled) throw new EpicenterError('Push Channels are not enabled on this project', CHANNELS_NOT_ENABLED);
84391
84392
  const channelProtocol = ((_project$channelProto = project.channelProtocol) === null || _project$channelProto === void 0 ? void 0 : _project$channelProto.toLowerCase()) || DEFAULT_CHANNEL_PROTOCOL;
84392
84393
  const {
84393
84394
  CometD
@@ -84493,7 +84494,11 @@ class CometdAdapter {
84493
84494
  }
84494
84495
  async init(options) {
84495
84496
  if (!this.initialization) {
84496
- this.initialization = this.startup(options);
84497
+ // A rejected startup must not be cached, or every later init() call re-throws it
84498
+ this.initialization = this.startup(options).catch(error => {
84499
+ this.initialization = undefined;
84500
+ throw error;
84501
+ });
84497
84502
  }
84498
84503
  return this.initialization;
84499
84504
  }
@@ -84910,7 +84915,8 @@ function setLocalSession(session) {
84910
84915
  */
84911
84916
  async function removeLocalSession() {
84912
84917
  identification.session = undefined;
84913
- await cometdAdapter.disconnect();
84918
+ // CometD disconnect is best-effort cleanup; its failure must not fail session removal
84919
+ await cometdAdapter.disconnect().catch(() => undefined);
84914
84920
  }
84915
84921
 
84916
84922
  /**
@@ -93087,9 +93093,9 @@ var utilities = /*#__PURE__*/Object.freeze({
93087
93093
  proxy: proxy
93088
93094
  });
93089
93095
 
93090
- /* "3.35.0", "Module" and "2026-07-21T22:45:13.866Z" are injected at build time — by
93096
+ /* "3.35.1", "Module" and "2026-09-24T20:47:51.952Z" are injected at build time — by
93091
93097
  * @rollup/plugin-replace for the shipped bundles and by Vite's `define` for tests */
93092
- const version = `Epicenter (v${"3.35.0"}) for ${"Module"} | Build Date: ${"2026-07-21T22:45:13.866Z"}`;
93098
+ const version = `Epicenter (v${"3.35.1"}) for ${"Module"} | Build Date: ${"2026-09-24T20:47:51.952Z"}`;
93093
93099
  const UNAUTHORIZED = 401;
93094
93100
  const FORBIDDEN = 403;
93095
93101
  const DEFAULT_ERROR_HANDLERS = {};