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/epicenter.js
CHANGED
|
@@ -3367,6 +3367,7 @@
|
|
|
3367
3367
|
const DISCONNECT_META_CHANNEL = '/meta/disconnect';
|
|
3368
3368
|
const HANDSHAKE_META_CHANNEL = '/meta/handshake';
|
|
3369
3369
|
const COMETD_RECONNECTED = 'COMETD_RECONNECTED';
|
|
3370
|
+
const CHANNELS_NOT_ENABLED = 'CHANNELS_NOT_ENABLED';
|
|
3370
3371
|
const DEFAULT_CHANNEL_PROTOCOL = 'cometd';
|
|
3371
3372
|
// error messages that indicate session invalidation as
|
|
3372
3373
|
// described in cometd documentation and oumuamua source code:
|
|
@@ -3418,7 +3419,7 @@
|
|
|
3418
3419
|
}) {
|
|
3419
3420
|
var _project$channelProto;
|
|
3420
3421
|
const project = await get$f();
|
|
3421
|
-
if (!project.channelEnabled) throw new EpicenterError('Push Channels are not enabled on this project');
|
|
3422
|
+
if (!project.channelEnabled) throw new EpicenterError('Push Channels are not enabled on this project', CHANNELS_NOT_ENABLED);
|
|
3422
3423
|
const channelProtocol = ((_project$channelProto = project.channelProtocol) === null || _project$channelProto === void 0 ? void 0 : _project$channelProto.toLowerCase()) || DEFAULT_CHANNEL_PROTOCOL;
|
|
3423
3424
|
const {
|
|
3424
3425
|
CometD
|
|
@@ -3524,7 +3525,11 @@
|
|
|
3524
3525
|
}
|
|
3525
3526
|
async init(options) {
|
|
3526
3527
|
if (!this.initialization) {
|
|
3527
|
-
|
|
3528
|
+
// A rejected startup must not be cached, or every later init() call re-throws it
|
|
3529
|
+
this.initialization = this.startup(options).catch(error => {
|
|
3530
|
+
this.initialization = undefined;
|
|
3531
|
+
throw error;
|
|
3532
|
+
});
|
|
3528
3533
|
}
|
|
3529
3534
|
return this.initialization;
|
|
3530
3535
|
}
|
|
@@ -3941,7 +3946,8 @@
|
|
|
3941
3946
|
*/
|
|
3942
3947
|
async function removeLocalSession() {
|
|
3943
3948
|
identification.session = undefined;
|
|
3944
|
-
|
|
3949
|
+
// CometD disconnect is best-effort cleanup; its failure must not fail session removal
|
|
3950
|
+
await cometdAdapter.disconnect().catch(() => undefined);
|
|
3945
3951
|
}
|
|
3946
3952
|
|
|
3947
3953
|
/**
|
|
@@ -12118,9 +12124,9 @@
|
|
|
12118
12124
|
proxy: proxy
|
|
12119
12125
|
});
|
|
12120
12126
|
|
|
12121
|
-
/* "3.35.
|
|
12127
|
+
/* "3.35.1", "Browsers" and "2026-09-24T20:47:51.952Z" are injected at build time — by
|
|
12122
12128
|
* @rollup/plugin-replace for the shipped bundles and by Vite's `define` for tests */
|
|
12123
|
-
const version = `Epicenter (v${"3.35.
|
|
12129
|
+
const version = `Epicenter (v${"3.35.1"}) for ${"Browsers"} | Build Date: ${"2026-09-24T20:47:51.952Z"}`;
|
|
12124
12130
|
const UNAUTHORIZED = 401;
|
|
12125
12131
|
const FORBIDDEN = 403;
|
|
12126
12132
|
const DEFAULT_ERROR_HANDLERS = {};
|