sw 0.0.7 copy "sw: ^0.0.7" to clipboard
sw: ^0.0.7 copied to clipboard

A command-line tool to generate service worker files for web applications. It simplifies the process of creating service workers.

0.0.7 #

  • Simplify service worker by removing retry logic and navigation preload.
  • Replace Promise.race timeout wrappers with modern AbortController-based fetchWithTimeout.
  • Remove unused constants (MEDIA_EXT, NETWORK_ONLY, RETRY_DELAY).
  • Remove INSTALL_TIMEOUT, ACTIVATE_TIMEOUT wrappers from install/activate events.
  • Streamline activate event handler by removing redundant Promise.race nesting.

0.0.6 #

  • Add timeout protection for install (30s) and activate (30s) events.
  • Add fetch timeout (10s) and retry logic (2 retries with 500ms delay).
  • Add navigation preload support for online-first strategy.
  • Clean up all stale caches with matching prefix on activation.
  • Ensure self.clients.claim() is always called, even on error/timeout.
  • Emit sw-version.txt alongside sw.js for CI version injection.

0.0.5 #

  • Update index.html example to include more features.

0.0.4 #

  • Improved service worker generation.

0.0.3 #

  • Service worker generation now based on the flutter's flutter_service_worker.js.

0.0.2 #

  • Proof of concept for service worker generation

0.0.1 #

  • Initial release with basic functionality
10
likes
0
points
799
downloads

Publisher

verified publisherplugfox.dev

Weekly Downloads

A command-line tool to generate service worker files for web applications. It simplifies the process of creating service workers.

Repository (GitHub)
View/report issues

Topics

#service-worker #generator #cli #web #flutter

License

unknown (license)

Dependencies

args, crypto, glob, path

More

Packages that depend on sw