/* PLAN 483(요구 280-4) 측점 목록 거울 헬퍼 — 진짜 `B05_Profile/logic/B05_Profile_Sections_Stations.ts` * `buildStations` 를 트랜스파일해 Node 로 돌림. 입력 argv[2] JSON(사례 목록) · 표준출력 JSON. * 짝 = `test_280_4_stations.py`. */ const fs = require("fs"); const path = require("path"); const { makeLoader } = require("./helper_ts_stub_loader.cjs"); const CATALOG = require("./helper_322_catalog_module.cjs"); const ROOT = path.join(__dirname, "..", ".."); const { loadTs } = makeLoader({ root: ROOT, }); const logic = loadTs(path.join(ROOT, "B05_Profile", "logic", "B05_Profile_Sections_Stations.ts")); const station = loadTs(path.join(ROOT, "common_util", "common_util_structure_station.ts")); station.setPlusStations(() => []); const cases = JSON.parse(fs.readFileSync(process.argv[2], "utf8")); const out = cases.map((c) => logic .buildStations(c.line, c.curves, [], [], { types: [], stationSnap: c.snap, stationSnapStep: c.step, }) .map((s) => ({ m: s.chainageM, kind: s.kind, key: s.key })), ); process.stdout.write(JSON.stringify(out));