feat(supporters): 승인 UI·입력 반영·워커 — §7-5 ClinicInputsPanel + supporter_builds/inputs 마이그레이션 + apply_inputs, §12-2 상단 고지·개설자 승인·색인 빌드 필터, §7-6 워커 E2E(뷰성형외과 URL → 5편 → 게이트 0오류)
- 게이트: DISCLOSURE_TOP_MISSING, APPROVED_*, UNAPPROVED_IN_INDEXABLE_BUILD, PRESS_VOICE 규칙화, 픽스처 추가 (16/16) - 생성기: --site 옵션, 병원 확인 답변(clinicAnswers) 근거 [A] - default_briefs.mjs 첫 배치 자동 기획, workers/supporters-build/run.mjs - 랜딩: SAMPLE REPORT 라벨 "실제 사례"로 (haewon 지시) - v2 §11-6·§11-7 기록, E2E 리포트 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
64a3bce9a3
commit
7e515b70ae
56 files changed
+2530
-41
No files matched your search
@@ -4,6 +4,7 @@
|
||||
// node scripts/check.mjs 검사
|
||||
// node scripts/check.mjs --update-layout 구조 기준선(§3-2) 갱신. 룩앤필 변경을 haewon이 승인한 뒤에만
|
||||
// node scripts/check.mjs --today=YYYY-MM-DD
|
||||
// node scripts/check.mjs --home-text=../evidence/<clinic>/home_text.txt 40자 중복 검사 기준을 수집기 산출물로
|
||||
import { readdirSync, readFileSync, statSync, existsSync, writeFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
@@ -17,10 +18,13 @@ const args = process.argv.slice(2);
|
||||
const updateLayout = args.includes('--update-layout');
|
||||
const today = args.find((a) => a.startsWith('--today='))?.slice(8) ?? new Date().toISOString().slice(0, 10);
|
||||
|
||||
const HOME_TEXT = existsSync(here('./home_text.txt')) ? readFileSync(here('./home_text.txt'), 'utf8') : '';
|
||||
const homeTextPath = args.find((a) => a.startsWith('--home-text='))?.slice(12) ?? here('./home_text.txt');
|
||||
const HOME_TEXT = existsSync(homeTextPath) ? readFileSync(homeTextPath, 'utf8') : '';
|
||||
const authors = JSON.parse(readFileSync(here('../src/data/authors.json'), 'utf8'));
|
||||
const fact = JSON.parse(readFileSync(here('../src/data/factSheet.json'), 'utf8'));
|
||||
const videos = JSON.parse(readFileSync(here('../src/data/videos.json'), 'utf8'));
|
||||
const site = JSON.parse(readFileSync(here('../src/data/site.json'), 'utf8'));
|
||||
const INDEXABLE = process.env.PUBLIC_INDEXABLE === 'true';
|
||||
|
||||
// 구조 기준선을 보는 페이지. 글 목록은 글 수에 따라 카드가 늘므로 집합 비교, 나머지는 순서 비교.
|
||||
// 글 상세는 사전순 첫 글 하나를 대표로 본다(템플릿·다른 병원에서도 같은 규칙).
|
||||
@@ -63,6 +67,14 @@ for (const f of files) {
|
||||
add(rel, R.checkHomeDuplicate(text, HOME_TEXT));
|
||||
add(rel, R.checkOperatorVocab(text, rel));
|
||||
add(rel, R.checkHeadingEndings(html));
|
||||
// §12-2 (1) 글 첫 부분 지원 고지. site.sponsorNotice 가 켜져 있으면 error, 아니면 warn
|
||||
if (rel.startsWith('/posts/') && rel !== '/posts.html') add(rel, R.checkTopDisclosure(html, { required: Boolean(site.sponsorNotice) }));
|
||||
// §12-2 (2) 색인 허용 빌드에 미승인 글이 섞이면 error
|
||||
if (INDEXABLE && rel.startsWith('/posts/') && rel !== '/posts.html') {
|
||||
const slug = rel.replace(/^\/posts\//, '').replace(/\.html$/, '');
|
||||
const src = join(POSTS, `${slug}.md`);
|
||||
if (existsSync(src) && !R.parseMarkdown(readFileSync(src, 'utf8')).data.approvedAt) add(rel, [{ level: R.E, code: 'UNAPPROVED_IN_INDEXABLE_BUILD', msg: '색인 허용 빌드인데 게시 승인(approvedAt) 없는 글이 포함됨' }]);
|
||||
}
|
||||
// 구조 지문
|
||||
if (LAYOUT_PAGES[rel]) layoutNow[rel] = R.layoutFingerprint(html);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user