Files
Aislo/resources/tester/helper_272_1_station_list.cjs
T
eomsangdonandClaude Opus 5.5 30d99acbdd fix(427 공용 측점): 꼭짓점 세움 셈을 공용 파일 밖 B05 logic 새 파일로 — 공용이 B05 종단 선형을 안 끎 · 410 시험 오류 3 풂 (427-2)
- common_util_structure_station `followMovedNodes` = 옮김 · 지움 · 세울 측점(`seat`)만 돌려줌
- 새 B05_Profile/logic/B05_Profile_Grade_Seat.ts `seatBornNodes` = 파이썬 `_seat_born_nodes` 짝
- design_profile_base 가 둘을 차례로 부름 · 272-1 · 427-1 도우미 맞춤

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014utrjfoW831Vc5wJUd13kL
2026-10-18 16:17:24 +09:00

35 lines
1.6 KiB
JavaScript

/* 272-1 측점 한 벌 — 진짜 `common_util_structure_station.ts` 의 `plantedChainages` · `oneStationList` 를
* Node 로 돌림. 입력 argv[2] JSON(파이썬과 같은 값) · 표준출력 JSON 한 벌.
*/
const fs = require("fs");
const path = require("path");
const ts = require(path.join(__dirname, "..", "..", "config", "node_modules", "typescript"));
const CATALOG = require("./helper_322_catalog_module.cjs"); // 구조물 표(322-1)
const ROOT = path.join(__dirname, "..", "..");
function loadTs(file) {
const js = ts.transpileModule(fs.readFileSync(path.join(ROOT, file), "utf8"), {
compilerOptions: { module: ts.ModuleKind.CommonJS, target: ts.ScriptTarget.ES2020 },
}).outputText;
const box = { exports: {} };
const localRequire = (request) => {
if (CATALOG.isCatalogRequest(request)) return CATALOG;
throw new Error(`stub 없음: ${request} (${file})`);
};
new Function("exports", "module", "require", js)(box.exports, box, localRequire);
return box.exports;
}
const input = JSON.parse(fs.readFileSync(process.argv[2], "utf8"));
const station = loadTs("common_util/common_util_structure_station.ts");
const out = {
planted: station.plantedChainages(input.pipes, input.structures, input.types),
list: station.oneStationList(input.server, input.fresh),
nodes: station.followMovedNodes(input.base.basePvi, input.gone, input.born, input.edited).nodes,
};
// 368-2 추가 측점 — 화면이 둔 읽는 곳(setPlusStations)으로 심는 자리에 듦
station.setPlusStations(() => input.plus);
out.plantedPlus = station.plantedChainages(input.pipes, input.structures, input.types);
process.stdout.write(JSON.stringify(out));