ts-service-worker 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -270,14 +270,16 @@ All developer actions are listed in the `scripts` section of `package.json`. The
270
270
  Published using `npm publish`.
271
271
 
272
272
  ### TODO
273
- 1. Other matching mechanisms, like mime-type.
274
- 2. https://web.dev/learn/pwa/serving/#cache-only
275
- 3. filter/only strategy: to process only certain types, eg. `{ strategy: 'filter', paths: ' /https?:.*/ }`. This is weird semantically, so I'm still thinking.
276
- 5. https://web.dev/learn/pwa/workbox/#offline-fallback
277
- https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#recovering_failed_requests
278
- 6. offline SVG: https://github.com/veiss-com/sw-tools#offline
279
- 6. https://github.com/veiss-com/sw-tools#limiting-the-cache-size
280
- 7. expiring cache / expirations on cached items
273
+ - [x] Fix bug where `withOrigin` gets applied to regular expressions.
274
+ - [ ] Fix CLI for Symbols like "Origin", or remove this workflow.
275
+ - [ ] Other matching mechanisms, like mime-type.
276
+ - [ ] https://web.dev/learn/pwa/serving/#cache-only
277
+ - [ ] filter/only strategy: to process only certain types, eg. `{ strategy: 'filter', paths: ' /https?:.*/ }`. This is weird semantically, so I'm still thinking.
278
+ - [ ] https://web.dev/learn/pwa/workbox/#offline-fallback
279
+ - [ ] https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#recovering_failed_requests
280
+ - [ ] offline SVG: https://github.com/veiss-com/sw-tools#offline
281
+ - [ ] https://github.com/veiss-com/sw-tools#limiting-the-cache-size
282
+ - [ ] expiring cache / expirations on cached items
281
283
 
282
284
  ## References
283
285
  These are the basics of how service workers function:
package/dist/cli.mjs CHANGED
@@ -6658,6 +6658,7 @@ function regexEscape(s) {
6658
6658
  }
6659
6659
 
6660
6660
  function withOrigin(path) {
6661
+ if (typeof path !== 'string') return path
6661
6662
  if (path.match(/https?:\\/\\//)) return path
6662
6663
  if (path.startsWith('/')) return self.origin + path
6663
6664
  return self.origin + '/' + path
package/dist/index.js CHANGED
@@ -6670,6 +6670,7 @@ function regexEscape(s) {
6670
6670
  }
6671
6671
 
6672
6672
  function withOrigin(path) {
6673
+ if (typeof path !== 'string') return path
6673
6674
  if (path.match(/https?:\\/\\//)) return path
6674
6675
  if (path.startsWith('/')) return self.origin + path
6675
6676
  return self.origin + '/' + path