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