Commit Graph

9 Commits

Author SHA1 Message Date
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
889c6ee2f6 feat: add project aliases configuration
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
cf7d3d5618 fix: use streaming and add path validation
- Replace fs.readFileSync() with fs.createReadStream() to prevent memory exhaustion
- Export validatePath() from fs-utils.ts
- Use validatePath() to validate full path including project and version parameters
- Fix incomplete path traversal protection
- Add filename encoding in Content-Disposition header

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-04 02:01:38 +08:00
7609e99076 fix: use constant for cookie value and remove unused import
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-04 01:56:14 +08:00
2a883c23f9 fix: address race conditions and add path validation
- Fixed race condition in getProjects() by using Promise.all with proper async/await
- Fixed race condition in getVersions() by using Promise.all with proper async/await
- Fixed race condition in getApks() by ensuring Promise.all wraps the async map
- Added validatePath() helper function to prevent path traversal attacks
- Applied path validation to all file system operations

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-04 01:54:07 +08:00
5e00e36e57 feat: add file system utility functions 2026-03-04 01:52:44 +08:00
c4a25fced2 fix: address security concerns in constants (path and credentials)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-04 01:52:02 +08:00
af080cee2a feat: add constants configuration 2026-03-04 01:51:09 +08:00