CH-J ToolsSSH를 통한 서버 관리
메뉴
공개된 소스

CH-J Tools

특정 애플리케이션 릴리스의 디렉터리와 파일을 살펴보세요.

소스 ZIP 다운로드
CH-J / Server Manager 406 개 파일
core-20261024T135205Z-7c487d719de2 추가됨: · 빌드됨:
navIcons.test.js 추가됨: 날짜 기록 없음 1.8 KB · 27 줄
코드 파일 다운로드
1"use strict";
3// Navigation icons: one mapping by stable IDs for all sidebar modes and the plugin taskbar.
4const test = require("node:test");
5const assert = require("node:assert/strict");
6const fs = require("node:fs");
7const path = require("node:path");
8const icons = require("../src/renderer/vendor/lucide/icons");
9const { ICON_BY_KEY, FALLBACK, iconName } = require("../src/renderer/navIcons");
10const { PluginRegistry } = require("../src/main/plugins/pluginRegistry");
12test("every core view and bundled plugin has its own existing icon; unknown plugins fall back to puzzle", () => {
13 const html = fs.readFileSync(path.join(__dirname, "../src/renderer/index.html"), "utf8");
14 const views = [...html.matchAll(/class="nav-button[^"]*" data-view="([a-z]+)"/g)].map((match) => match[1]);
15 assert.ok(views.length >= 7);
16 const registry = new PluginRegistry(fs.mkdtempSync(path.join(require("node:os").tmpdir(), "chj-icons-")), null, { bundledRoot: path.join(__dirname, "../src/main/firstPartyPlugins") });
17 const keys = [...views, ...registry.listInstalled().map((plugin) => `plugin:${plugin.id}`)];
18 const names = keys.map((key) => iconName(key));
19 for (const [index, key] of keys.entries()) {
20 assert.notEqual(names[index], FALLBACK, `${key} has a specific icon`);
21 assert.ok(icons[names[index]]?.length, `${names[index]} exists in the vendored set`);
22 }
23 assert.equal(new Set(names).size, names.length, "no two known modules share an icon");
24 assert.equal(iconName("plugin:example.unknown"), "puzzle"); assert.ok(icons.puzzle.length);
25 for (const name of Object.values(ICON_BY_KEY)) assert.ok(icons[name], `mapped icon ${name} is vendored`);
26 assert.ok(fs.readFileSync(path.join(__dirname, "../src/renderer/vendor/lucide/LICENSE.txt"), "utf8").startsWith("ISC License"));
27});
SHA-256c26ada9bf7870bc06ba8acc661c9151fad41d60550343bac2d6bfcbc48707d7b

CH-J Proprietary Software License 1.14 · 소스는 CH-J Proprietary Software License 1.14에 따라 제공됩니다. 소스를 공개한다고 해서 라이선스 조항이 바뀌거나 추가 권리가 부여되지는 않습니다.

압축 파일 SHA-256476ed8aef0f1e96a5acdf223127b6692acdf4492eeaf5d0816b6e2a634fbbda6
파일