CH-J Server Manager
Durchsuchen Sie Verzeichnisse und Dateien einer bestimmten Anwendungsausgabe.
Die Quellen werden unter der CH-J Proprietary Software License 1.14 bereitgestellt. Ihre Verfügbarkeit ändert die Lizenzbedingungen nicht und gewährt keine zusätzlichen Rechte.
"use strict";const test = require("node:test");const assert = require("node:assert/strict");const fs = require("node:fs");const path = require("node:path");const AdmZip = require("adm-zip");const root = path.join(__dirname, "..");test("application includes the complete project and dependency license texts", () => { const license = fs.readFileSync(path.join(root, "LICENSE"), "utf8"); const notice = fs.readFileSync(path.join(root, "NOTICE"), "utf8"); const thirdParty = fs.readFileSync(path.join(root, "THIRD_PARTY_NOTICES.txt"), "utf8"); const packageJson = JSON.parse(fs.readFileSync(path.join(root, "package.json"), "utf8")); assert.match(license, /CH-J\s+Proprietary Software License[\s\S]*Version 1\.14/); assert.match(license, /End of License\./); assert.equal(packageJson.license, "SEE LICENSE IN LICENSE"); assert.equal(packageJson.build.nsis.license, "build/license.rtf"); assert.equal(packageJson.build.dmg.license, "build/installation.rtf"); const installerLicense = fs.readFileSync(path.join(root, "build", "license.rtf"), "ascii"); assert.ok(installerLicense.startsWith("{\\rtf1")); assert.ok(installerLicense.includes("Chud\\u253?")); assert.match(installerLicense, /End of License\./); const installation = fs.readFileSync(path.join(root, "build", "installation.rtf"), "ascii"); assert.ok(installation.indexOf("provozn") < installation.indexOf("APPLICATION LICENSE")); assert.ok(installation.indexOf("Betriebssicherheit") < installation.indexOf("APPLICATION LICENSE")); assert.ok(installation.indexOf("Operational Safety") < installation.indexOf("APPLICATION LICENSE")); assert.equal(packageJson.build.nsis.include, "build/installer.nsh"); assert.equal(packageJson.build.nsis.displayLanguageSelector, true); for (const language of ["cs", "de", "en"]) { const bytes = fs.readFileSync(path.join(root, "build", `guidance-${language}.txt`)); assert.deepEqual([...bytes.subarray(0, 2)], [255, 254]); const source = fs.readFileSync(path.join(root, "docs", require("../src/main/legal/guidanceDocuments").GUIDANCE_FILES[language]), "utf8"); assert.equal(bytes.toString("utf16le").slice(1).replace(/\r\n/g, "\n"), source); } assert.deepEqual(fs.readFileSync(path.join(root, "build", "license.txt")), fs.readFileSync(path.join(root, "LICENSE"))); assert.match(notice, /CH-J Proprietary Software License/); assert.ok(license.length > 10000); assert.match(notice, /Copyright 2026 Josef Chudy/); assert.match(thirdParty, /isarray@1\.0\.0/); for (const filename of ["APPLICATION_LICENSE.txt", "NOTICE.txt", "THIRD_PARTY_NOTICES.txt", "THIRD_PARTY_LICENSES.zip", "ELECTRON_LICENSE.txt", "CHROMIUM_LICENSES.html"]) { assert.ok(packageJson.build.extraResources.some((entry) => entry.to === `licenses/${filename}`), filename); } assert.equal(packageJson.build.afterPack, "scripts/afterPack.js"); const bundle = new AdmZip(path.join(root, "THIRD_PARTY_LICENSES.zip")); assert.match(bundle.readAsText("README.txt"), /CH-J Proprietary Software License, version 1\.14/); for (const filename of ["THIRD_PARTY_NOTICES.txt", "ELECTRON_LICENSE.txt", "CHROMIUM_LICENSES.html", "MONACO_LICENSE.txt", "MONACO_THIRD_PARTY_NOTICES.txt", "FB_TIGER_HASH_LICENSE.txt", "GOOGLE_CITYHASH_LICENSE.txt", "SHA512SUMS.txt"]) { assert.ok(bundle.getEntry(filename), filename); } for (const dependency of ["@noble/hashes@2.3.0", "farmhashjs@1.0.1", "hash-wasm@4.12.0", "highwayhasher@0.4.4", "fb-tiger-hash@1.0.0", "google-cityhash"]) { assert.match(thirdParty, new RegExp(dependency.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"))); }});test("license documents are accessible from the sandboxed renderer through narrow IPC", () => { const preload = fs.readFileSync(path.join(root, "src", "preload", "corePreload.js"), "utf8"); const ipc = fs.readFileSync(path.join(root, "src", "main", "ipc", "registerCoreIpc.js"), "utf8"); const html = fs.readFileSync(path.join(root, "src", "renderer", "index.html"), "utf8"); assert.match(preload, /openLegalDocument/); assert.match(ipc, /handle\("legal:open"/); assert.match(html, /data-legal-document="thirdParty"/); assert.match(html, /data-legal-document="thirdPartyBundle"/); for (const key of ["documentation", "safetyCzech", "safetyEnglish", "safetyGerman"]) assert.ok(html.includes(`data-legal-document="${key}"`)); assert.ok(JSON.parse(fs.readFileSync(path.join(root, "package.json"))).build.extraResources.some(entry => entry.from === "docs" && entry.to === "docs")); for (const name of ["provozni-bezpecnost-a-zalohovani.md", "betriebssicherheit-und-datensicherung.md", "operational-safety-and-backup-guidance.md"]) { const bundled = fs.readFileSync(path.join(root, "docs", name)); assert.ok(bundled.length > 1000); const canonical = path.join(root, "..", "docs", name); if (fs.existsSync(canonical)) assert.deepEqual(bundled, fs.readFileSync(canonical)); }});SHA-256: a06c8edf230060d27e7e83c3240cb729f4bdb3eead73983824b786e2b93d50ab
SHA-256 des Archivs: 5ac91caf4fa32a6fdb114f2430deed486fbe7489d5eea343d1f034169fafb5e0