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.
- package/CHANGELOG.md +26 -0
- package/dist/browser/epicenter.js +11 -5
- package/dist/browser/epicenter.js.map +1 -1
- package/dist/cjs/epicenter.js +11 -5
- package/dist/cjs/epicenter.js.map +1 -1
- package/dist/epicenter.js +11 -5
- package/dist/epicenter.js.map +1 -1
- package/dist/epicenter.min.js +1 -1
- package/dist/epicenter.min.js.map +1 -1
- package/dist/module/epicenter.js +11 -5
- package/dist/module/epicenter.js.map +1 -1
- package/package.json +1 -1
- package/src/adapters/authentication.ts +2 -1
- package/src/adapters/cometd.ts +7 -2
package/dist/module/epicenter.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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.
|
|
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.
|
|
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 = {};
|