workbox-routing
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "workbox-routing", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "A service worker helper library to route request URLs to handlers.", | ||
@@ -25,4 +25,4 @@ "keywords": [ | ||
"homepage": "https://github.com/GoogleChrome/workbox/tree/master/packages/workbox-routing", | ||
"main": "build/importScripts/workbox-routing.prod.v0.0.1.js", | ||
"module": "build/modules/workbox-routing.prod.v0.0.1.mjs" | ||
"main": "build/importScripts/workbox-routing.prod.v0.0.2.js", | ||
"module": "build/modules/workbox-routing.prod.v0.0.2.mjs" | ||
} |
@@ -21,2 +21,4 @@ /* | ||
* | ||
* **Install:** `npm install --save-dev workbox-routing` | ||
* | ||
* @module workbox-routing | ||
@@ -23,0 +25,0 @@ */ |
@@ -38,3 +38,3 @@ /* | ||
* // segment passed along to the handler via params.file. | ||
* const route = new goog.routing.ExpressRoute({ | ||
* const route = new workbox.routing.ExpressRoute({ | ||
* path: '/path/to/:file', | ||
@@ -47,3 +47,3 @@ * handler: ({event, params}) => { | ||
* | ||
* const router = new goog.routing.Router(); | ||
* const router = new workbox.routing.Router(); | ||
* router.registerRoute({route}); | ||
@@ -53,3 +53,3 @@ * | ||
* // Any cross-origin requests for https://example.com will match this route. | ||
* const route = new goog.routing.ExpressRoute({ | ||
* const route = new workbox.routing.ExpressRoute({ | ||
* path: 'https://example.com/path/to/:file', | ||
@@ -59,3 +59,3 @@ * handler: ({event}) => return caches.match(event.request), | ||
* | ||
* const router = new goog.routing.Router(); | ||
* const router = new workbox.routing.Router(); | ||
* router.registerRoute({route}); | ||
@@ -62,0 +62,0 @@ * |
@@ -45,3 +45,3 @@ /* | ||
* // app-shell.html. | ||
* const route = new goog.routing.NavigationRoute({ | ||
* const route = new workbox.routing.NavigationRoute({ | ||
* whitelist: [new RegExp('^/article/')], | ||
@@ -51,3 +51,3 @@ * handler: {handle: () => caches.match('app-shell.html')}, | ||
* | ||
* const router = new goog.routing.Router(); | ||
* const router = new workbox.routing.Router(); | ||
* router.registerRoute({route}); | ||
@@ -54,0 +54,0 @@ */ |
@@ -51,3 +51,3 @@ /* | ||
* // the capture groups passed along to the handler as an array via params. | ||
* const route = new goog.routing.RegExpRoute({ | ||
* const route = new workbox.routing.RegExpRoute({ | ||
* regExp: new RegExp('^https://example.com/path/to/(\\w+)'), | ||
@@ -63,3 +63,3 @@ * handler: { | ||
* | ||
* const router = new goog.routing.Router(); | ||
* const router = new workbox.routing.Router(); | ||
* router.registerRoute({route}); | ||
@@ -66,0 +66,0 @@ */ |
@@ -36,3 +36,3 @@ /* | ||
* // Any navigate requests for URLs that start with /path/to/ will match. | ||
* const route = new goog.routing.Route({ | ||
* const route = new workbox.routing.Route({ | ||
* match: ({url, event}) => { | ||
@@ -48,3 +48,3 @@ * return event.request.mode === 'navigate' && | ||
* | ||
* const router = new goog.routing.Router(); | ||
* const router = new workbox.routing.Router(); | ||
* router.registerRoute({route}); | ||
@@ -51,0 +51,0 @@ * |
@@ -41,12 +41,14 @@ /* | ||
* regExp: /assets/, | ||
* handler: new goog.runtimeCaching.StaleWhileRevalidate(), | ||
* handler: new workbox.runtimeCaching.StaleWhileRevalidate(), | ||
* }); | ||
* const imageRoute = new RegExpRoute({ | ||
* regExp: /images/, | ||
* handler: new goog.runtimeCaching.CacheFirst(), | ||
* handler: new workbox.runtimeCaching.CacheFirst(), | ||
* }); | ||
* | ||
* const router = new goog.routing.Router(); | ||
* const router = new workbox.routing.Router(); | ||
* router.registerRoutes({routes: [assetRoute, imageRoute]}); | ||
* router.setDefaultHandler({handler: new goog.runtimeCaching.NetworkFirst()}); | ||
* router.setDefaultHandler({ | ||
* handler: new workbox.runtimeCaching.NetworkFirst(), | ||
* }); | ||
*/ | ||
@@ -159,3 +161,3 @@ class Router { | ||
* router.setDefaultHandler({ | ||
* handler: new goog.runtimeCaching.NetworkFirst() | ||
* handler: new workbox.runtimeCaching.NetworkFirst() | ||
* }); | ||
@@ -162,0 +164,0 @@ * |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 4 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 4 instances in 1 package
585394
4725
2