@m4l/realtime-runtime 1.0.3 → 1.0.4-beta-feat-mfloader-observability-prep-20260506.0
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/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourceDataAtmosphere.d.ts","sourceRoot":"","sources":["../../../../../../packages/realtime-runtime/src/transport/atmosphere/SourceDataAtmosphere.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+CAA+C,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"SourceDataAtmosphere.d.ts","sourceRoot":"","sources":["../../../../../../packages/realtime-runtime/src/transport/atmosphere/SourceDataAtmosphere.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+CAA+C,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAUnD;;GAEG;AACH,iBAAS,2BAA2B,CAClC,MAAM,EAAE,+CAA+C,UA0BxD;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,cAAc;IAEtD,OAAO,CAAC,SAAS,CAAmC;IACpD,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,gBAAgB,CAAyD;IACjF,OAAO,CAAC,oBAAoB,CAAyD;IACrF,OAAO,CAAC,gBAAgB,CAAK;IAC7B,OAAO,CAAC,6BAA6B,CAAS;IAE9C,OAAO,CAAC,eAAe,CAAqB;IAE5C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAEjC;IAEF;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAElC;IAEF;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,6BAA6B,CAI5C;IAGF;;OAEG;IACH,KAAK,IAAI,IAAI;IAMb;;OAEG;IACH,OAAO,CAAC,aAAa;IA0BrB;;OAEG;IACH,OAAO,CAAC,eAAe;IAIvB;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAO7B;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAOjC;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAWjC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAI/B;;OAEG;IACH,OAAO,CAAC,4BAA4B;IAWpC;;OAEG;IACH,OAAO,CAAC,8BAA8B;IAWtC;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAM5B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAW/B;;OAEG;IACH,OAAO,CAAC,gCAAgC;IAuBxC;;OAEG;IACH,OAAO,CAAC,OAAO;IAwIf;;OAEG;IACH,OAAO,CAAC,YAAY;IAapB;;OAEG;IACH,IAAI,IAAI,IAAI;CAeb;AAED,eAAe,oBAAoB,CAAC;AACpC,OAAO,EACL,2BAA2B,GAC5B,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { SourceDataBase as p } from "../SourceDataBase.js";
|
|
2
2
|
import * as a from "atmosphere.js";
|
|
3
3
|
import u from "camelcase-keys";
|
|
4
|
-
const l =
|
|
5
|
-
function
|
|
4
|
+
const l = "warn", m = 2e3, d = 1e4, f = 6e4;
|
|
5
|
+
function T(o) {
|
|
6
6
|
const e = o.host.trim(), t = `${e.endsWith(o.path) ? "" : o.path}${o.topic}`;
|
|
7
7
|
return e ? e.startsWith("wss://") ? `https://${e.slice(6)}${t}` : e.startsWith("ws://") ? `http://${e.slice(5)}${t}` : e.startsWith("https://") || e.startsWith("http://") ? `${e}${t}` : `https://${e}${t}` : `${o.path}${o.topic}`;
|
|
8
8
|
}
|
|
9
|
-
class
|
|
9
|
+
class y extends p {
|
|
10
10
|
subSocket = null;
|
|
11
11
|
stopped = !1;
|
|
12
12
|
reconnectTimeout = null;
|
|
@@ -119,7 +119,7 @@ class v extends p {
|
|
|
119
119
|
armTransportOpenTimeout(e) {
|
|
120
120
|
this.clearTransportOpenTimeout(), this.transportOpenTimeout = setTimeout(() => {
|
|
121
121
|
this.transportOpenTimeout = null, this.isActiveAttempt(e) && (console.warn("Atmosphere: transport open timed out; scheduling reconnect"), this.tryReconnect());
|
|
122
|
-
},
|
|
122
|
+
}, d);
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
125
|
* Reconnect one stale transport when the browser regains a healthy execution state.
|
|
@@ -134,7 +134,7 @@ class v extends p {
|
|
|
134
134
|
return;
|
|
135
135
|
}
|
|
136
136
|
const n = performance.now() - this.lastMessageTime;
|
|
137
|
-
n <
|
|
137
|
+
n < f || (console.warn("Atmosphere: browser recovery found one stale transport; scheduling reconnect", {
|
|
138
138
|
reason: e,
|
|
139
139
|
silenceDurationMs: n
|
|
140
140
|
}), this.tryReconnect());
|
|
@@ -145,12 +145,12 @@ class v extends p {
|
|
|
145
145
|
connect() {
|
|
146
146
|
if (this.stopped)
|
|
147
147
|
return;
|
|
148
|
-
const e = this.config, n =
|
|
148
|
+
const e = this.config, n = T(e), t = this.transportAttempt + 1;
|
|
149
149
|
this.transportAttempt = t;
|
|
150
150
|
const i = {
|
|
151
151
|
url: n,
|
|
152
152
|
contentType: "application/json",
|
|
153
|
-
logLevel:
|
|
153
|
+
logLevel: l,
|
|
154
154
|
transport: "websocket",
|
|
155
155
|
fallbackTransport: e.fallbackTransport ?? "long-polling",
|
|
156
156
|
reconnectInterval: 2e3,
|
|
@@ -250,7 +250,7 @@ class v extends p {
|
|
|
250
250
|
tryReconnect() {
|
|
251
251
|
this.stopped || (this.clearTransportOpenTimeout(), !this.reconnectTimeout && (this.reconnectTimeout = setTimeout(() => {
|
|
252
252
|
this.reconnectTimeout = null, this.connect();
|
|
253
|
-
},
|
|
253
|
+
}, m)));
|
|
254
254
|
}
|
|
255
255
|
/**
|
|
256
256
|
* Stop the transport and cancel any pending reconnect attempt.
|
|
@@ -266,7 +266,7 @@ class v extends p {
|
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
export {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
269
|
+
y as SourceDataAtmosphere,
|
|
270
|
+
y as default,
|
|
271
|
+
T as resolveAtmosphereRequestUrl
|
|
272
272
|
};
|