Files
Aislo/resources/tester/helper_app_settings.cjs
T
eomsangdonandClaude Opus 5.5 aaecfa3438 feat(설정): 332-2 ☰ [설정] 창 — 마우스 · CAD 단축키 · 다른 곳 단축키 탭 · [저장] 때만 계정 pref · 닫을 때 물음
- app_shell ☰ 설정 묶음에 [설정] 단추(서랍 닫고 창은 처음 누를 때 불러옴)
- 새 app_settings.ts(틀 · 탭 셋 · [저장] · askLeave) · app_settings_cad.ts(명령 표 · 내 별칭 · 검사) · app_settings.css
- 새 openwebcad/src/commands/command-catalog.json(명령 153 · 한글 이름 · 기본 별칭) + 거울 시험
- locale 문구(ui_template_locale_common)
- 시험: test_app_settings · cad/command-catalog 새로 · test_device_audit · test_touch_bridge 화면 주소 환경값(AISLO_UI_BASE · AISLO_UI_PROJECT)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QfHKQs7J3hQELKMWQMUJEy
2026-10-15 12:45:03 +09:00

37 lines
1.4 KiB
JavaScript

/* PLAN 332-2 단위검증 헬퍼 — ☰ [설정] CAD 별칭 검사(`A00_Common/app_settings_cad.ts`)를 Node 로 돌림.
* 결과 = 표준출력 JSON 한 벌. 짝 = `test_app_settings.py`. */
const fs = require("fs");
const path = require("path");
const ts = require(path.join(__dirname, "..", "..", "config", "node_modules", "typescript"));
const ROOT = path.join(__dirname, "..", "..");
const file = path.join(ROOT, "A00_Common", "app_settings_cad.ts");
const js = ts.transpileModule(fs.readFileSync(file, "utf8"), {
compilerOptions: {
module: ts.ModuleKind.CommonJS,
target: ts.ScriptTarget.ES2020,
esModuleInterop: true,
},
}).outputText;
const box = { exports: {} };
const req = (p) =>
p.endsWith(".json")
? require(path.join(ROOT, "A00_Common", p))
: p === "@ui/ui_template_locale"
? { t: (k) => k }
: {};
new Function("exports", "module", "require", js)(box.exports, box, req);
const m = box.exports;
const check = (aliases) => m.checkCadAliases(aliases);
process.stdout.write(
JSON.stringify({
commands: m.CAD_COMMANDS.length,
parse: [m.parseAliases(" ll, Cc x1 "), m.parseAliases(""), m.parseAliases(",, ")],
ok: check({ LINE: ["LL"], CIRCLE: ["CC", "C2"], COPY: ["C"] }),
chars: check({ LINE: ["L!"], CIRCLE: ["원"] }),
dup: check({ LINE: ["LL"], CIRCLE: ["LL"], ARC: ["AA", "AA"] }),
name: check({ CIRCLE: ["LINE"] }),
}),
);