auto: 2026-09-25 09:42 (ESD_LAPTOP)

This commit is contained in:
2026-09-25 09:42:39 +09:00
parent 5e816dbd4c
commit 4d94b6cb96
4 changed files with 10 additions and 8 deletions
+3 -2
View File
@@ -13,9 +13,10 @@ from typing import Any
from common_util.common_util_node_bundle import ROOT, build_bundle, run_bundle_json
BUNDLE = ROOT / "config" / "formula_node" / "ui_template_sheet_node.js"
BUNDLE = ROOT / "config" / "formula_node" / "common_util_sheet_recalc_node.js"
NPM_SCRIPT = "build:formula"
SOURCE_DIR = ROOT / "ui_template" / "sheet"
ENTRY = ROOT / "common_util" / "common_util_sheet_recalc_node.ts"
def _stale() -> bool:
@@ -23,7 +24,7 @@ def _stale() -> bool:
if not BUNDLE.is_file():
return True
built_at = BUNDLE.stat().st_mtime
return any(p.stat().st_mtime > built_at for p in SOURCE_DIR.glob("*.ts"))
return any(p.stat().st_mtime > built_at for p in [ENTRY, *SOURCE_DIR.glob("*.ts")])
def recalc_sheets(docs: list[dict[str, Any]]) -> list[dict[str, Any]] | None:
+5 -4
View File
@@ -1,19 +1,20 @@
/* =============================================================================
* ui_template_sheet_node.ts
* common_util_sheet_recalc_node.ts
* 표 문서 풀이를 **서버가** 돌리는 진입점 — [저장] 때 정본으로 다시 풂.
*
* 풀이는 화면이 쓰는 `ui_template_sheet_recalc.ts` 그대로 — 여기에는 계산이 없음.
* 파이썬 껍데기 = `common_util/common_util_sheet_recalc.py` · 번들 = `npm run build:formula`.
* 파이썬 껍데기 = `common_util_sheet_recalc.py` · 번들 = `npm run build:formula`.
*
* 실행: node <번들> <입력.json> <출력.json>
* 입력 { docs: SheetDoc[] }
* 출력 { results: SheetResult[] } — 입력 차례 그대로
* 끝 코드: 0 성공 / 2 인자 오류
* ⚠ `ui_template/sheet/` 밖에 둠 — M02 화면이 그 폴더를 통째로 훑어 불러옴(node:fs 가 브라우저로 새지 않게).
* ========================================================================== */
import { readFileSync, writeFileSync } from "node:fs";
import { recalcSheet } from "./ui_template_sheet_recalc";
import type { SheetDoc } from "./ui_template_sheet_types";
import { recalcSheet } from "@ui/sheet/ui_template_sheet_recalc";
import type { SheetDoc } from "@ui/sheet/ui_template_sheet_types";
const [inputPath, outputPath] = process.argv.slice(2);
if (!inputPath || !outputPath) {