@telepath-computer/television-desktop 0.1.178 → 0.1.180
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/electron.cjs +9 -1
- package/package.json +1 -1
package/dist/electron.cjs
CHANGED
|
@@ -167,6 +167,12 @@ function parseDesktopConnectURL(input) {
|
|
|
167
167
|
const parsed = parseConnectURL(url.toString());
|
|
168
168
|
return parsed;
|
|
169
169
|
}
|
|
170
|
+
function resolveDesktopAppVersion(appVersion, env) {
|
|
171
|
+
if (env.TV_TEST_MODE === "true" && env.TV_TEST_DESKTOP_APP_VERSION) {
|
|
172
|
+
return env.TV_TEST_DESKTOP_APP_VERSION;
|
|
173
|
+
}
|
|
174
|
+
return appVersion;
|
|
175
|
+
}
|
|
170
176
|
function buildRemoteURL(serverURL, token, desktopAppVersion) {
|
|
171
177
|
const url = new URL(serverURL);
|
|
172
178
|
url.searchParams.set("mode", "electron");
|
|
@@ -378,7 +384,9 @@ var App = class {
|
|
|
378
384
|
}
|
|
379
385
|
async loadRemote(connection) {
|
|
380
386
|
if (!this.window) return;
|
|
381
|
-
await this.window.loadURL(
|
|
387
|
+
await this.window.loadURL(
|
|
388
|
+
buildRemoteURL(connection.serverURL, connection.token, resolveDesktopAppVersion(import_electron2.app.getVersion(), process.env))
|
|
389
|
+
);
|
|
382
390
|
}
|
|
383
391
|
installWindowOpenHandler() {
|
|
384
392
|
import_electron2.app.on("web-contents-created", (_event, contents) => {
|