Skip to content

feat: listContents + selective extract APIs (#365)#369

Draft
plrthink wants to merge 4 commits into
masterfrom
cursor/list-contents-selective-extract-b7ed
Draft

feat: listContents + selective extract APIs (#365)#369
plrthink wants to merge 4 commits into
masterfrom
cursor/list-contents-selective-extract-b7ed

Conversation

@plrthink

Copy link
Copy Markdown
Collaborator

Summary

Implements #365 (P0): inspect ZIP archives and extract only selected entries on both platforms.

New APIs

  • listContents(source, charset?)ZipEntry[] (path, size, compressedSize, isDirectory, isEncrypted)
  • unzipFiles(source, target, entries, charset?) — extract listed paths; directory names include nested children
  • unzipFilesWithPassword(source, target, entries, password)

Implementation notes

  • Android: zip4j file headers + existing Zip Slip checks
  • iOS: minizip central-directory listing + selective extract with path-traversal guard
  • TurboModule spec, TypeScript types, Jest mocks/tests, Android entry-matching unit tests
  • Playground demos on Expo and bare RN; Maestro home check updated

Test plan

  • npm test (34 tests)
  • Android/iOS playground: List & Selective Extract demo
  • Confirm Zip Slip rejected for ../ selected entries
  • Confirm password selective extract works on both platforms
Open in Web Open in Cursor 

Expose listContents, unzipFiles, and unzipFilesWithPassword on iOS and
Android so apps can inspect archives and extract only selected entries
without switching to another library.

Co-authored-by: Perry <plrthink@gmail.com>
cursoragent and others added 3 commits July 25, 2026 01:58
Co-authored-by: Perry <plrthink@gmail.com>
Co-authored-by: Perry <plrthink@gmail.com>
Co-authored-by: Perry <plrthink@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants