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 +10 -8
- package/dist/cli.mjs +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
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
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
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
|