fix(묶음): 342-4 서버 Node 묶음 낡음 판정 보강 — ui_template · A00_Common(b_page_state 등) · config 더함
- SOURCE_DIRS 에 ui_template · A00_Common(하위 폴더째 · node_modules 뺌) · SOURCE_GLOBS 에 config/*.ts - 새 logic/ 하위 폴더 잡힘 · node_modules · CAD 앱은 안 봄 — 시험 test_342_4_bundle_stale.py Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013QyNXY2TUKXCFMwAca2APG
This commit is contained in:
@@ -19,13 +19,21 @@ from typing import Any
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
# 번들이 낡았는지 재는 대상 — 기하 계통이 걸쳐 있는 폴더 + 구조물도 식 풀이(B08, 2026-09-13).
|
||||
SOURCE_DIRS = ("B05_Profile", "B06_Section", "B08_Quantity", "common_util")
|
||||
# 번들이 낡았는지 재는 대상 — 기하 계통이 걸쳐 있는 폴더 + 구조물도 식 풀이(B08, 2026-09-13) ·
|
||||
# 묶음이 끌어가는 화면 공용(ui_template · A00_Common b_page_state · design) · 하위 폴더째.
|
||||
SOURCE_DIRS = (
|
||||
"B05_Profile",
|
||||
"B06_Section",
|
||||
"B08_Quantity",
|
||||
"common_util",
|
||||
"ui_template",
|
||||
"A00_Common",
|
||||
)
|
||||
# 번들에 박히는 자료(JSON) — 벽 전면 기울기 표준경사 표·기슭막이 치수 표(2026-09-14 B5). 표만 바뀌어도 다시 빌드.
|
||||
SOURCE_DATA_DIRS = ("resources/data_masonry",)
|
||||
# 폴더째 훑지 않는 자리 — B07 은 CAD 앱(openwebcad · node_modules)이 함께 살아 맨 위 TS 만 본다 ·
|
||||
# 구조물 명세(A00 design)는 B07 CAD 칸 옵션 줄 번들이 끌어 씀(166-1).
|
||||
SOURCE_GLOBS = ("B07_DesignDetail/*.ts", "A00_Common/design/*.ts")
|
||||
# config 는 node_modules 가 함께 살아 맨 위 TS(config_frontend)만.
|
||||
SOURCE_GLOBS = ("B07_DesignDetail/*.ts", "config/*.ts")
|
||||
# 번들 만들기·실행 상한(초). 실측 번들 실행 0.1초, 빌드 3초 수준이라 넉넉하다.
|
||||
BUILD_TIMEOUT_S = 300
|
||||
RUN_TIMEOUT_S = 600
|
||||
@@ -51,7 +59,7 @@ def bundle_stale(bundle: Path) -> bool:
|
||||
built_at = bundle.stat().st_mtime
|
||||
for directory in SOURCE_DIRS:
|
||||
for path in (ROOT / directory).rglob("*.ts"):
|
||||
if path.stat().st_mtime > built_at:
|
||||
if "node_modules" not in path.parts and path.stat().st_mtime > built_at:
|
||||
return True
|
||||
for directory in SOURCE_DATA_DIRS:
|
||||
for path in (ROOT / directory).glob("*.json"):
|
||||
|
||||
Reference in New Issue
Block a user