Commit Graph

5 Commits

Author SHA1 Message Date
149e3a5924 feat: add getProjectDisplayName utility 2026-03-04 22:17:31 +08:00
87271c4602 fix: correct apk-parser test expectations and regex pattern
- Use letter-only regex pattern /ft_([a-z]+)_/i to correctly detect environment suffixes
- This ensures version numbers (starting with digits) are treated as no environment suffix
- Update test expectations to match spec behavior:
  - ft_0_42_ff9ff3441.apk now correctly returns 'product' (no match)
  - invalid_filename.apk returns 'product' (no match)
- All 10 tests pass with corrected implementation
2026-03-04 22:17:31 +08:00
95101d5914 fix: add missing lan test and simplify apk-parser implementation
- Add missing test case for lan environment detection
- Simplify detectEnvironment() to match spec exactly
- Remove extra logic (version number detection, ft_ prefix check)
- Update test expectations to match simplified implementation behavior
- All tests now pass with spec-compliant implementation
2026-03-04 22:17:31 +08:00
5e280d4cbe feat: add APK filename parser utilities
- Add detectEnvironment() to parse environment from APK filenames
- Add parseApkFilename() to extract environment and commit ID metadata
- Support dev, sandbox, product, and other environment types
- Map environment patterns: timeshift, lan, dev -> dev; sandbox -> sandbox
- Detect product APKs when no environment suffix present
- Handle invalid formats gracefully
2026-03-04 22:17:31 +08:00
8227f36cbe refactor: organize tests and extract formatting utilities
- Move test files to lib/__tests__/ directory
- Extract formatting utilities (formatVersion, formatFileSize, formatDateTime)
  from fs-utils.ts to new utils.ts module
- Add Jest test configuration and test scripts
- Update component imports to use new utils module
- Add CLAUDE.md documentation for project structure

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-04 02:33:30 +08:00