@todesktop/runtime
Advanced tools
Comparing version 1.6.3-7 to 1.6.3-8
@@ -13,3 +13,4 @@ "use strict"; | ||
const electron_1 = require("electron"); | ||
const electron_updater_1 = require("electron-updater"); | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
const getConfig_1 = require("../getConfig"); | ||
@@ -22,3 +23,5 @@ const getPackageJson_1 = require("../getPackageJson"); | ||
const buildId = (0, getPackageJson_1.default)().tdBuildId; | ||
const autoUpdateUrl = electron_updater_1.autoUpdater.getFeedURL() || ""; | ||
const updateYamlPath = path.join(process.resourcesPath, "app-update.yml"); | ||
const updateYaml = yield readFlatYam(updateYamlPath); | ||
const autoUpdateUrl = updateYaml.url || ""; | ||
const isDev = autoUpdateUrl.includes("todesktop-builds-dev"); | ||
@@ -67,1 +70,18 @@ logger.debug("Feed URL:", autoUpdateUrl); | ||
} | ||
function readFlatYam(yamlPath) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const result = {}; | ||
try { | ||
const fileContents = yield fs.promises.readFile(yamlPath, "utf8"); | ||
const lines = fileContents.split("\n").filter((line) => line.match(/^\w/i)); | ||
for (const line of lines) { | ||
const [key, value] = line.split(":").map((s) => s.trim()); | ||
result[key] = value; | ||
} | ||
return result; | ||
} | ||
catch (e) { | ||
throw new Error(`Failed to read or parse YAML file at ${yamlPath}: ${e}`); | ||
} | ||
}); | ||
} |
@@ -1,1 +0,1 @@ | ||
export declare const CLIENT_VERSION = "1.6.3-7"; | ||
export declare const CLIENT_VERSION = "1.6.3-8"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CLIENT_VERSION = void 0; | ||
exports.CLIENT_VERSION = "1.6.3-7"; | ||
exports.CLIENT_VERSION = "1.6.3-8"; |
@@ -7,3 +7,3 @@ { | ||
"name": "@todesktop/runtime", | ||
"version": "1.6.3-7", | ||
"version": "1.6.3-8", | ||
"license": "MIT", | ||
@@ -10,0 +10,0 @@ "author": "ToDesktop <hi@todesktop.com> (https://www.todesktop.com/)", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
100649
1687
14