Публикуван източник
Изтегляне на източник ZIP
CH-J Server Manager
Преглед на директории и файлове за конкретна версия на приложението.
CH-J / Server Manager
339 Файлове
core-20261014T184258Z-3fbed0b93fdf
Добавено: Дата, която не е регистрирана · Построена:
1
"use strict";3
const fs = require("node:fs");4
const path = require("node:path");6
function assertFile(filePath, pattern, minimumSize = 1) {7
const stat = fs.statSync(filePath, { throwIfNoEntry: false });8
if (!stat?.isFile() || stat.size < minimumSize) throw new Error(`Required license file is missing or incomplete: ${filePath}`);9
if (pattern && !pattern.test(fs.readFileSync(filePath, "utf8"))) throw new Error(`Unexpected license content: ${filePath}`);10
}12
module.exports = async function afterPack(context) {13
if (context.electronPlatformName === "darwin") {14
const { prepareMacNetworkIdentity } = require("./macNetworkIdentity");15
prepareMacNetworkIdentity(path.join(context.appOutDir, `${context.packager.appInfo.productFilename}.app`), {16
appId: context.packager.appInfo.id,17
version: context.packager.appInfo.version18
});19
}20
const resources = context.electronPlatformName === "darwin"21
? path.join(context.appOutDir, `${context.packager.appInfo.productFilename}.app`, "Contents", "Resources")22
: path.join(context.appOutDir, "resources");23
const { validateRuntime } = require("../src/main/diagnostics/httpRuntime");24
const runtime = validateRuntime({ resourcesPath: resources, platform: context.electronPlatformName, arch: require("builder-util").Arch[context.arch] });25
const version = require("node:child_process").execFileSync(runtime.executable, ["--disable", "--version"], { encoding: "utf8" });26
if (!/Features:.*HTTP2/.test(version) || !/Features:.*HTTP3/.test(version)) throw new Error("Packaged HTTP runtime lacks HTTP/2 or HTTP/3");27
const licenses = path.join(resources, "licenses");28
assertFile(path.join(licenses, "APPLICATION_LICENSE.txt"), /CH-J\s+Proprietary Software License[\s\S]*Version 1\.14/, 10000);29
if (!fs.readFileSync(path.join(licenses, "APPLICATION_LICENSE.txt")).equals(fs.readFileSync(path.join(__dirname, "..", "LICENSE")))) {30
throw new Error("Packaged application license differs from the release license.");31
}32
for (const name of ["README.md", "license-acceptance.md", "provozni-bezpecnost-a-zalohovani.md", "betriebssicherheit-und-datensicherung.md", "operational-safety-and-backup-guidance.md"]) {33
assertFile(path.join(resources, "docs", name), null, 100);34
}35
assertFile(path.join(licenses, "NOTICE.txt"), /Copyright 2026 Josef Chudy/);36
assertFile(path.join(licenses, "THIRD_PARTY_NOTICES.txt"), /isarray@1\.0\.0/);37
assertFile(path.join(licenses, "THIRD_PARTY_LICENSES.zip"), null, 1000000);38
assertFile(path.join(licenses, "ELECTRON_LICENSE.txt"), /Copyright \(c\) Electron contributors/i);39
assertFile(path.join(licenses, "CHROMIUM_LICENSES.html"), /Chromium/, 1000000);40
assertFile(41
path.join(resources, "signing", "ch-j-signing-public.asc"),42
/-----BEGIN PGP PUBLIC KEY BLOCK-----/,43
100044
);45
};SHA-256
12e85cc72fe5eff6dec9ef3875365e7fa641afd8ced6312f6b2a8424f3fd26f5CH-J Proprietary Software License 1.14 · Източникът е предоставен под CH-J Proprietary Software License 1.14. Неговата наличност не променя лицензионните условия или не предоставя допълнителни права.
Архив SHA-256
3df08cf5e899262a6ce92d7ec2caf5c42b683f1f2b57055662b845ff7dde67a8