CH-J Server Manager透過 SSH 管理伺服器
選單
已發布的原始碼

CH-J Server Manager

瀏覽特定應用程式版本的目錄與檔案。

下載原始碼 ZIP
CH-J / Server Manager 193 個檔案
core-20261011T184039Z-4148710795d0 新增時間: 未記錄日期 · 建置時間:
afterPack.js 新增時間: 未記錄日期 2.4 KB · 38 行
程式碼 下載檔案
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 const resources = context.electronPlatformName === "darwin"
14 ? path.join(context.appOutDir, `${context.packager.appInfo.productFilename}.app`, "Contents", "Resources")
15 : path.join(context.appOutDir, "resources");
16 const { validateRuntime } = require("../src/main/diagnostics/httpRuntime");
17 const runtime = validateRuntime({ resourcesPath: resources, platform: context.electronPlatformName, arch: require("builder-util").Arch[context.arch] });
18 const version = require("node:child_process").execFileSync(runtime.executable, ["--disable", "--version"], { encoding: "utf8" });
19 if (!/Features:.*HTTP2/.test(version) || !/Features:.*HTTP3/.test(version)) throw new Error("Packaged HTTP runtime lacks HTTP/2 or HTTP/3");
20 const licenses = path.join(resources, "licenses");
21 assertFile(path.join(licenses, "APPLICATION_LICENSE.txt"), /CH-J\s+Proprietary Software License[\s\S]*Version 1\.14/, 10000);
22 if (!fs.readFileSync(path.join(licenses, "APPLICATION_LICENSE.txt")).equals(fs.readFileSync(path.join(__dirname, "..", "LICENSE")))) {
23 throw new Error("Packaged application license differs from the release license.");
24 }
25 for (const name of ["README.md", "license-acceptance.md", "provozni-bezpecnost-a-zalohovani.md", "betriebssicherheit-und-datensicherung.md", "operational-safety-and-backup-guidance.md"]) {
26 assertFile(path.join(resources, "docs", name), null, 100);
27 }
28 assertFile(path.join(licenses, "NOTICE.txt"), /Copyright 2026 Josef Chudy/);
29 assertFile(path.join(licenses, "THIRD_PARTY_NOTICES.txt"), /isarray@1\.0\.0/);
30 assertFile(path.join(licenses, "THIRD_PARTY_LICENSES.zip"), null, 1000000);
31 assertFile(path.join(licenses, "ELECTRON_LICENSE.txt"), /Copyright \(c\) Electron contributors/i);
32 assertFile(path.join(licenses, "CHROMIUM_LICENSES.html"), /Chromium/, 1000000);
33 assertFile(
34 path.join(resources, "signing", "ch-j-signing-public.asc"),
35 /-----BEGIN PGP PUBLIC KEY BLOCK-----/,
36 1000
37 );
38};
SHA-256035138e59417d3f21948e8319d7bcddada7de739ba321ae16ccf021424c4dd33

CH-J Proprietary Software License 1.14 · 原始碼依 CH-J Proprietary Software License 1.14 提供。公開原始碼不會改變授權條款,也不會授予額外的權利。

壓縮檔 SHA-2565a8ea02d06a5643cf2330fe9f54b8767a06c1c59d36527705e536fa9dbca7614
檔案