Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
Works with
•JSR Score100%•This package works with Node.js, Deno, Browsers


Published11 months ago (0.1.3)
Serve files embedded within an archive file using msw
@cdaringe/archive-filesystem-service-worker
Given an archive, serve files from that archive using msw.
For example, assume the following tarball:
# foo.tar.gz . ├── static-storybook │ ├── assets.js │ ├── styles.css │ └── img.png └── package.json
After installing the service worker in browser,
GET /static-storybook/assets.js would resolve the file from the archive.
usage
import { createTarballFilesHandler } from "jsr:archive-filesystem-service-worker/msw.ts"; import msw from "msw"; const handler = await createTarballFilesHandler( msw, "https://path.to/tarball.tgz" ); const worker = setupWorker(handler); worker.start();
Built and signed on
GitHub Actions