Skip to content

feat: listContents + selective extract via unzip entries (#365) - #369

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

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

Conversation

@plrthink

@plrthink plrthink commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

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

APIs

  • listContents(source, charset?)ZipEntry[] (path, size, compressedSize, isDirectory, isEncrypted)
  • Optional entries on existing unzip APIs (no separate unzipFiles* methods):
    • unzip(source, target, charset?, entries?) — also accepts unzip(src, dest, ['a.txt'])
    • unzipWithPassword(source, target, password, entries?)

E2E

  • Maestro _list-contents-test.yaml wired into ci-master.yaml
  • Covers list contents, selective unzip, and password selective unzip
  • Playground demos assert Listed Entries / Selective Extract / Password Selective Extract (including skipped hello.txt)

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

Test plan

  • npm test
  • Maestro flow added to CI master suite
  • Confirm CI E2E (expo + rn, Android + iOS) green
  • Confirm Zip Slip rejected for ../ selected entries

Stack

Merge first: this PR → #370#371#372

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 4 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>
Remove unzipFiles/unzipFilesWithPassword and add an optional entries
argument to unzip and unzipWithPassword instead, matching the existing
zip overload style.

Co-authored-by: Perry <plrthink@gmail.com>
@cursor cursor Bot changed the title feat: listContents + selective extract APIs (#365) feat: listContents + selective extract via unzip entries (#365) Jul 27, 2026
cursoragent and others added 3 commits July 27, 2026 01:33
Add Maestro coverage for listing archive entries, selective unzip via
entries, and password selective unzip. Playground demos now surface
assertable Listed Entries / Selective Extract / Password Selective
Extract results including files that were intentionally skipped.

Co-authored-by: Perry <plrthink@gmail.com>
Remove an extra closing brace left from the selective-extract cherry-pick
that broke Android compilation on stacked PRs. Make the list/selective
Maestro flow assert stable accessibility labels and summary markers.

Co-authored-by: Perry <plrthink@gmail.com>
zip4j cannot extract ZIP_STANDARD_VARIANT_STRONG, which caused
password selective extract E2E to fail with "encryption method is
not supported". Map explicit STANDARD to ZIP_STANDARD like the
default path.

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