@clockworkdog/cogs-client 2.1.0 → 2.1.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/dist/CogsConnection.js +3 -2
- package/dist/browser/index.js +4 -3
- package/package.json +1 -1
package/dist/CogsConnection.js
CHANGED
|
@@ -245,8 +245,9 @@ function websocketParametersFromUrl(url) {
|
|
|
245
245
|
const serial = (_g = pathParams.get('serial')) !== null && _g !== void 0 ? _g : '';
|
|
246
246
|
pathParams.delete('serial');
|
|
247
247
|
// Check if cogs-box-av is a version which added support for ignoring HTTP/2 self-signed certificates
|
|
248
|
-
const
|
|
249
|
-
const
|
|
248
|
+
const firmwareVersion = ((_h = pathParams.get('f')) !== null && _h !== void 0 ? _h : '').replace(/^v/, '');
|
|
249
|
+
const isCogsBoxAvDevBuild = firmwareVersion === '0.0.0'; // We assume dev firmware builds have HTTP/2 assets support - Added in 2024-03
|
|
250
|
+
const supportsHttp2Assets = isCogsBoxAvDevBuild || ((0, compare_versions_1.validate)(firmwareVersion) && (0, compare_versions_1.satisfies)(firmwareVersion, '>=4.9.0'));
|
|
250
251
|
return {
|
|
251
252
|
path: `/client/${encodeURIComponent(serial)}`,
|
|
252
253
|
pathParams,
|