{"_id":"@dornick/parsers-archive","name":"@dornick/parsers-archive","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@dornick/parsers-archive","version":"0.1.0","description":"Lazy ZIP archive parser for Dornick. Unpacks archive contents into the VFS under /user/files/<id>/parsed/.","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsup","dev":"tsup --watch","test":"vitest run","typecheck":"tsc --noEmit","clean":"rm -rf dist","size":"size-limit"},"dependencies":{"@dornick/capabilities":"0.1.0","@dornick/parsers":"0.1.0","fflate":"^0.8.2"},"devDependencies":{"@size-limit/file":"^11.1.6","size-limit":"^11.1.6","tsup":"^8.3.0","typescript":"^5.5.4","vitest":"^4.1.7"},"license":"MIT","sideEffects":false,"publishConfig":{"access":"public"},"size-limit":[{"name":"@dornick/parsers-archive (gz)","path":"dist/index.js","limit":"1.5 KB","gzip":true}],"gitHead":"622e4ebed9c3aebadd808a2dd1f5f29c7d226040","_id":"@dornick/parsers-archive@0.1.0","_nodeVersion":"26.7.0","_npmVersion":"11.19.0","dist":{"integrity":"sha512-p62PcpsbEx8CN1uTr3kUgK8EJrz3KsP2CoeSVsN7QZC0Hb0tJiC5wGlssXHvtGSbQshrTnkfvIghaA/6ot5C7g==","shasum":"b43be68084192439f4f51677979befe50e22c7a0","tarball":"https://registry.npmjs.org/@dornick/parsers-archive/-/parsers-archive-0.1.0.tgz","fileCount":7,"unpackedSize":15458,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCaahSPOeCann02rMUx2k0SCLBG3FstooaQG80biSzgswIgfVYCAwH3H2/RB/wyrJ1BiIhOcNIgR+Yx4HglL6aGEMs="}]},"_npmUser":{"name":"dipankarsarkar","email":"me@dipankar.name"},"directories":{},"maintainers":[{"name":"dipankarsarkar","email":"me@dipankar.name"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/parsers-archive_0.1.0_1788784931254_0.16244225429729298"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-07T12:42:10.644Z","0.1.0":"2026-09-07T12:42:11.378Z","modified":"2026-09-07T12:42:11.573Z"},"maintainers":[{"name":"dipankarsarkar","email":"me@dipankar.name"}],"description":"Lazy ZIP archive parser for Dornick. Unpacks archive contents into the VFS under /user/files/<id>/parsed/.","license":"MIT","readme":"# @dornick/parsers-archive\n\n**Lazy ZIP archive parser for Dornick — unpack archives client-side and expose contents as VFS paths.**\n\nDrop a ZIP onto the page; the agent navigates the entries as if they were a filesystem under `/user/files/<id>/parsed/`. Powers the personal-data-explorer use case (Google Takeout, Slack exports, etc.) where the file *must* not leave the browser.\n\n[![npm](https://img.shields.io/npm/v/@dornick/parsers-archive.svg?style=flat&color=4c1)](https://www.npmjs.com/package/@dornick/parsers-archive)\n[![license](https://img.shields.io/npm/l/@dornick/parsers-archive.svg?style=flat&color=blue)](../../LICENSE)\n\n## Install\n\n```sh\nnpm i @dornick/parsers-archive\n```\n\nDepends on [`fflate`](https://www.npmjs.com/package/fflate) — a fast, tiny (~30 KB) zip library. The Dornick shim itself is < 1 KB.\n\n## Use\n\n```ts\nimport { Dornick } from \"@dornick/core\";\nimport { archiveParser } from \"@dornick/parsers-archive\";\n\nconst dornick = new Dornick({ config, transport });\ndornick.parsers.add(archiveParser);\n```\n\n## Paths produced\n\n| Path | Content |\n|---|---|\n| `index.json` | `{ totalEntries, totalUncompressedBytes, entries: [{ path, size, isDir }] }` |\n| `summary.txt` | Plain-text overview with first ~12 entries |\n| `entries/<path>` | UTF-8 text of any entry inside the ZIP |\n\nThe `entries/<path>` paths are dynamic — claimed by the parser's `claims()` method. The agent reads `index.json` to discover the structure, then issues targeted reads against `entries/...` for the content it cares about.\n\n## Capability gate\n\n`requires: [\"wasm\"]` — fflate uses WebAssembly internally for speed.\n\n## Memory\n\nUnzipped entries are cached per-file in memory once read. For very large archives (multi-GB exports), use `dornick.capabilities.storage.estimateMB` to gate uploads in `onFileUpload`.\n\n## See also\n\n- [Use case: Personal data-export explorer](https://docs.neullabs.com/dornick/use-cases/personal-data-explorer/)\n- [Concept: Parsers](https://docs.neullabs.com/dornick/concepts/parsers/)\n\n## License\n\nMIT — © Dipankar Sarkar\n","readmeFilename":"README.md","_rev":"1-1f09c622bce5844560faa11833a05d93"}