Conversation
…d GitHub API integration
…ost as PR comment
fix: update mobile reader workflow to generate markdown in
Contributor
📖 PR #4 — feat: CLI 추가 + JSX/Tailwind 파서 확장 + 보안 강화
📄
|
3rdflr
added a commit
that referenced
this pull request
Feb 23, 2026
feat: CLI 추가 + JSX/Tailwind 파서 확장 + 보안 강화
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CLI 신규 추가 (src/cli.ts)
npx github-mobile-reader --repo owner/repo --pr 42 로 터미널에서 바로 실행
--all 플래그로 최근 PR 전체 일괄 처리
JS/TS 파일만 필터링 후 파일별 독립 섹션으로 출력 (reader-output/pr-.md)
package.json에 bin 필드 및 build:cli 스크립트 추가
JSX/Tailwind 파서 확장 (src/parser.ts)
.jsx / .tsx 파일 diff에 3개 섹션 추가:
🎨 JSX Structure — 컴포넌트 계층 트리 (스택 기반 indent depth 알고리즘)
💅 Style Changes — 추가/제거된 Tailwind 클래스 diff (Set 연산 기반)
✅ Added Code / ❌ Removed Code — className= 전용 줄이 제거된 순수 로직만 표시
비JSX 파일(.ts, .js)은 기존 동작 그대로 유지.
보안 강화 (src/cli.ts)
--token 플래그 제거 — 셸 히스토리/ps 노출 방지, $GITHUB_TOKEN 환경변수 전용
--repo 형식 검증 (owner/repo 정규식)
--out 경로 검증 (절대 경로 및 .. 차단)
GitHub API 에러 응답 raw body 출력 제거
.gitignore 업데이트
reader-output/ 추가 (CLI 출력 디렉토리 로컬 전용)
README 업데이트 (README.md, README.ko.md)
CLI 사용법 섹션 신규 추가 (인증 방법, 옵션 표, 출력 구조)
JSX/Tailwind 기능 및 보안 기본값 Features 항목 추가
프로젝트 구조에 cli.ts, reader-output/ 반영