feat: verifyIntegrity CLI 래퍼 추가 및 문서화 (TDD)
- verify.cli.ts/verify.cli.test.ts 추가 - README 사용법/종료코드/CI 가이드 문서화 - 전체 테스트 그린 유지
This commit is contained in:
@@ -80,6 +80,26 @@ The Builder can export a production-ready ZIP that contains:
|
||||
### Asset paths and grouping
|
||||
|
||||
- AssetManager writes files to `assets/` with stable hash-based filenames.
|
||||
|
||||
### verifyIntegrity CLI
|
||||
|
||||
- Purpose: Validate exported bundle assets against `assets.integrity.index.json`.
|
||||
- Input format: two JSON files mapping file path → base64 bytes
|
||||
- Extras JSON: must contain `"assets.integrity.index.json"` key with base64 of the index file
|
||||
- Assets JSON: keys are asset paths, values are base64 of file bytes
|
||||
- Usage:
|
||||
|
||||
```bash
|
||||
node scripts/verify.js --extras extras.json --assets assets.json
|
||||
```
|
||||
|
||||
- Output: prints a JSON with fields of `VerifyResult` (`ok`, `errors`, `summary`)
|
||||
- Exit codes:
|
||||
- 0: ok
|
||||
- 1: verification failed or invalid inputs
|
||||
- 2: usage error (missing args)
|
||||
|
||||
- CI: add a step to run the CLI after build/export; fail the job if exit code != 0.
|
||||
- Path strategy can be configured:
|
||||
- `flat` (default): `assets/<hash>.<ext>`
|
||||
- `grouped`: `assets/images/...`, `assets/fonts/...`, `assets/other/...`
|
||||
|
||||
Reference in New Issue
Block a user