- 길 지움(화면 TS · 다른 서버 모듈 · 시험 세 곳에서 다시 찾음 · /openapi.json 524 → 509 뜻한 15 만): GET /groups · /sections · /table/options · /logic/combos · POST /logic/new · /logic/edit · /logic/delete · /logic/draft · /logic/sheet · /logic/sheet/check · /logic/equation(+ preview · links · save) · /logic/doc/links - 본체 지움: M01_MasterData_Sheet.py · Equation.read · preview · save · Store_Make.sections · _counts · table_options · logic_edit · logic_delete · _own_only · logic_draft · Store.groups · Store_Combo.combo_preview · scripts/master_draft.py(지운 /logic/draft 만 부름) - 남김: Equation.export_row · edit_row · links(M02 Sangeun_Equation 이 부름) · Doc.candidates(M02 /doc/links) · Store_Make._all_sections(M02 Hopyo_Clause) · logic_new(복사 · 수식 저장이 씀) · combos_of_logic(Doc.users) · combo_inputs(알약 규칙 입구 · 시험) · master_combo.run(M02 시험 대조 값) · /alias/suggest(main.py 가 따로 끼움 · 승인 화면과 한 벌) - 화면 입구 지움: Api_Fetch.fetchGroups · GroupInfo · fetchSubs · Logic_Api.draftLogic + Draft 타입 6 - 시험: test_m01_draft 지움(죽은 해석기 · 길만 봄) · test_794_1 시트 길 시험 지우고 /save 다시 셈 시험만 남김 · test_796_1 수식 길 시험 지움 · test_800_2 는 살아 있는 export_row · edit_row 로 같은 셈 · test_m01_make 는 죽은 길 대신 /save · logic_new 로 같은 결과 · test_m01_combo 미리 보기 시험 지움 · /logic/combos 는 combos_of_logic 로 · test_m01_api · test_802_3 · test_799_2 · test_717_1(+helper) 죽은 길 줄만 고침 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
48 lines
1.6 KiB
JavaScript
48 lines
1.6 KiB
JavaScript
/* 717-1 헬퍼 — 상세 부품 길 주입 · 가짜 fetch 로 부른 주소만 모음. 짝 = `test_717_1_logic_lib.py`. */
|
|
const path = require("path");
|
|
const { makeLoader } = require("./helper_ts_stub_loader.cjs");
|
|
|
|
const ROOT = path.join(__dirname, "..", "..");
|
|
const { load } = makeLoader({
|
|
root: ROOT,
|
|
stubs: { M01_MasterData_UI_Logic_Text: {} },
|
|
});
|
|
const urls = [];
|
|
global.fetch = async (url) => {
|
|
urls.push(String(url).replace("http://fake", ""));
|
|
return {
|
|
ok: true,
|
|
status: 200,
|
|
statusText: "",
|
|
json: async () => ({ logics: [], subs: [], items: [], rows: [] }),
|
|
};
|
|
};
|
|
|
|
const api = load("M01_MasterData", "M01_MasterData_UI_Logic_Api.ts");
|
|
const rows = load("M01_MasterData", "M01_MasterData_Api_Fetch.ts");
|
|
const note = load("M01_MasterData", "M01_MasterData_UI_Logic_Note.ts");
|
|
|
|
async function round(tag) {
|
|
await api.fetchLogic("K");
|
|
await api.fetchAuto("K");
|
|
await api.searchElements("재료", "q");
|
|
await api.fetchMaterials({ sub: "s" });
|
|
await api.runCalc({ key: "K", inputs: {} });
|
|
await api.runText({ key: "K", inputs: {} });
|
|
await rows.fetchRows("기계.json", 1, 5, "q");
|
|
await rows.fetchPick("price", "q");
|
|
await note.loadTable(`T-${tag}`);
|
|
await rows.fetchFiles("g"); // 관리자 길 — 늘 /m01
|
|
await api.saveFiles([]); // 저장 — 늘 /m01
|
|
return urls.splice(0).map((u) => u.split("?")[0]);
|
|
}
|
|
|
|
(async () => {
|
|
const out = { before: await round("a") };
|
|
api.setLogicApiPaths({ read: "/m02/logic-lib", calc: "/m02/calc-x" });
|
|
out.injected = await round("b");
|
|
api.setLogicApiPaths();
|
|
out.after = await round("c");
|
|
process.stdout.write(JSON.stringify(out));
|
|
})();
|