CH-J Server Managergestion de serveur sur SSH
Menu
Source publiée

CH-J Server Manager

Parcourez les répertoires et les fichiers pour une version spécifique de l'application.

Télécharger la source ZIP
CH-J / Server Manager 196 fichiers
core-20261013T133631Z-faa4ab45100e Ajouté: Date non enregistrée · Construit:
Fichiers
afterPack.js Ajouté: Date non enregistrée 2,8 KB · 45 lignes
Télécharger le fichier
1"use strict";
3const fs = require("node:fs");
4const path = require("node:path");
6function 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}`);
12module.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.version
18 });
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 1000
44 );
45};
SHA-25612e85cc72fe5eff6dec9ef3875365e7fa641afd8ced6312f6b2a8424f3fd26f5

CH-J Proprietary Software License 1.14 · La source est fournie sous CH-J Proprietary Software License 1.14. Sa disponibilité ne modifie pas les termes de la licence ni n'accorde de droits supplémentaires.

Archive SHA-256de757268dbc4f0226549f8b4f41f9b7e585c856ee97fa0d43b17a0e95c281449