workbox-broadcast-update
Advanced tools
Comparing version 6.4.2 to 6.5.0
"use strict"; | ||
// @ts-ignore | ||
try { | ||
self['workbox:broadcast-update:6.4.1'] && _(); | ||
self['workbox:broadcast-update:6.4.2'] && _(); | ||
} | ||
catch (e) { } |
@@ -15,3 +15,3 @@ import { CacheDidUpdateCallbackParam } from 'workbox-core/types.js'; | ||
* | ||
* @memberof module:workbox-broadcast-update | ||
* @memberof workbox-broadcast-update | ||
*/ | ||
@@ -18,0 +18,0 @@ declare class BroadcastCacheUpdate { |
@@ -39,3 +39,3 @@ /* | ||
* | ||
* @memberof module:workbox-broadcast-update | ||
* @memberof workbox-broadcast-update | ||
*/ | ||
@@ -42,0 +42,0 @@ class BroadcastCacheUpdate { |
@@ -8,3 +8,3 @@ import { WorkboxPlugin } from 'workbox-core/types.js'; | ||
* | ||
* @memberof module:workbox-broadcast-update | ||
* @memberof workbox-broadcast-update | ||
*/ | ||
@@ -15,3 +15,3 @@ declare class BroadcastUpdatePlugin implements WorkboxPlugin { | ||
* Construct a BroadcastCacheUpdate instance with the passed options and | ||
* calls its [`notifyIfUpdated()`]{@link module:workbox-broadcast-update.BroadcastCacheUpdate~notifyIfUpdated} | ||
* calls its {@link workbox-broadcast-update.BroadcastCacheUpdate~notifyIfUpdated} | ||
* method whenever the plugin's `cacheDidUpdate` callback is invoked. | ||
@@ -18,0 +18,0 @@ * |
@@ -15,3 +15,3 @@ /* | ||
* | ||
* @memberof module:workbox-broadcast-update | ||
* @memberof workbox-broadcast-update | ||
*/ | ||
@@ -21,3 +21,3 @@ class BroadcastUpdatePlugin { | ||
* Construct a BroadcastCacheUpdate instance with the passed options and | ||
* calls its [`notifyIfUpdated()`]{@link module:workbox-broadcast-update.BroadcastCacheUpdate~notifyIfUpdated} | ||
* calls its {@link workbox-broadcast-update.BroadcastCacheUpdate~notifyIfUpdated} | ||
* method whenever the plugin's `cacheDidUpdate` callback is invoked. | ||
@@ -24,0 +24,0 @@ * |
@@ -6,3 +6,3 @@ this.workbox = this.workbox || {}; | ||
try { | ||
self['workbox:broadcast-update:6.4.1'] && _(); | ||
self['workbox:broadcast-update:6.4.2'] && _(); | ||
} catch (e) {} | ||
@@ -26,3 +26,3 @@ | ||
* | ||
* @memberof module:workbox-broadcast-update | ||
* @memberof workbox-broadcast-update | ||
*/ | ||
@@ -103,3 +103,3 @@ | ||
* | ||
* @memberof module:workbox-broadcast-update | ||
* @memberof workbox-broadcast-update | ||
*/ | ||
@@ -258,3 +258,3 @@ | ||
* | ||
* @memberof module:workbox-broadcast-update | ||
* @memberof workbox-broadcast-update | ||
*/ | ||
@@ -265,3 +265,3 @@ | ||
* Construct a BroadcastCacheUpdate instance with the passed options and | ||
* calls its [`notifyIfUpdated()`]{@link module:workbox-broadcast-update.BroadcastCacheUpdate~notifyIfUpdated} | ||
* calls its {@link workbox-broadcast-update.BroadcastCacheUpdate~notifyIfUpdated} | ||
* method whenever the plugin's `cacheDidUpdate` callback is invoked. | ||
@@ -268,0 +268,0 @@ * |
@@ -1,2 +0,2 @@ | ||
this.workbox=this.workbox||{},this.workbox.broadcastUpdate=function(t,s,a,e){"use strict";try{self["workbox:broadcast-update:6.4.1"]&&_()}catch(t){}const n=(t,s,a)=>!a.some((a=>t.headers.has(a)&&s.headers.has(a)))||a.every((a=>{const e=t.headers.has(a)===s.headers.has(a),n=t.headers.get(a)===s.headers.get(a);return e&&n})),i=["content-length","etag","last-modified"],o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function c(t){return{cacheName:t.cacheName,updatedURL:t.request.url}}class r{constructor({generatePayload:t,headersToCheck:s,notifyAllClients:a}={}){this.C=s||i,this.A=t||c,this.U=null==a||a}async notifyIfUpdated(t){if(t.oldResponse&&!n(t.oldResponse,t.newResponse,this.C)){const e={type:"CACHE_UPDATED",meta:"workbox-broadcast-update",payload:this.A(t)};if("navigate"===t.request.mode){let e;t.event instanceof FetchEvent&&(e=t.event.resultingClientId);await a.resultingClientExists(e)&&!o||await s.timeout(3500)}if(this.U){const t=await self.clients.matchAll({type:"window"});for(const s of t)s.postMessage(e)}else if(t.event instanceof FetchEvent){const s=await self.clients.get(t.event.clientId);null==s||s.postMessage(e)}}}}return t.BroadcastCacheUpdate=r,t.BroadcastUpdatePlugin=class{constructor(t){this.cacheDidUpdate=async t=>{e.dontWaitFor(this.F.notifyIfUpdated(t))},this.F=new r(t)}},t.responsesAreSame=n,t}({},workbox.core._private,workbox.core._private,workbox.core._private); | ||
this.workbox=this.workbox||{},this.workbox.broadcastUpdate=function(t,s,a,e){"use strict";try{self["workbox:broadcast-update:6.4.2"]&&_()}catch(t){}const n=(t,s,a)=>!a.some((a=>t.headers.has(a)&&s.headers.has(a)))||a.every((a=>{const e=t.headers.has(a)===s.headers.has(a),n=t.headers.get(a)===s.headers.get(a);return e&&n})),i=["content-length","etag","last-modified"],o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function c(t){return{cacheName:t.cacheName,updatedURL:t.request.url}}class r{constructor({generatePayload:t,headersToCheck:s,notifyAllClients:a}={}){this.C=s||i,this.A=t||c,this.U=null==a||a}async notifyIfUpdated(t){if(t.oldResponse&&!n(t.oldResponse,t.newResponse,this.C)){const e={type:"CACHE_UPDATED",meta:"workbox-broadcast-update",payload:this.A(t)};if("navigate"===t.request.mode){let e;t.event instanceof FetchEvent&&(e=t.event.resultingClientId);await a.resultingClientExists(e)&&!o||await s.timeout(3500)}if(this.U){const t=await self.clients.matchAll({type:"window"});for(const s of t)s.postMessage(e)}else if(t.event instanceof FetchEvent){const s=await self.clients.get(t.event.clientId);null==s||s.postMessage(e)}}}}return t.BroadcastCacheUpdate=r,t.BroadcastUpdatePlugin=class{constructor(t){this.cacheDidUpdate=async t=>{e.dontWaitFor(this.F.notifyIfUpdated(t))},this.F=new r(t)}},t.responsesAreSame=n,t}({},workbox.core._private,workbox.core._private,workbox.core._private); | ||
//# sourceMappingURL=workbox-broadcast-update.prod.js.map |
{ | ||
"name": "workbox-broadcast-update", | ||
"version": "6.4.2", | ||
"version": "6.5.0", | ||
"license": "MIT", | ||
@@ -25,5 +25,5 @@ "author": "Google's Web DevRel Team", | ||
"dependencies": { | ||
"workbox-core": "6.4.2" | ||
"workbox-core": "6.5.0" | ||
}, | ||
"gitHead": "9fae1320327a3a75bf71df9a76708978bd252428" | ||
"gitHead": "d796009eadcba556b2795e0fea7d71a241f535e0" | ||
} |
@@ -11,5 +11,5 @@ import './_version.js'; | ||
* | ||
* @memberof module:workbox-broadcast-update | ||
* @memberof workbox-broadcast-update | ||
*/ | ||
declare const responsesAreSame: (firstResponse: Response, secondResponse: Response, headersToCheck: string[]) => boolean; | ||
export { responsesAreSame }; |
@@ -20,3 +20,3 @@ /* | ||
* | ||
* @memberof module:workbox-broadcast-update | ||
* @memberof workbox-broadcast-update | ||
*/ | ||
@@ -23,0 +23,0 @@ const responsesAreSame = (firstResponse, secondResponse, headersToCheck) => { |
// @ts-ignore | ||
try{self['workbox:broadcast-update:6.4.2']&&_()}catch(e){} | ||
try{self['workbox:broadcast-update:6.5.0']&&_()}catch(e){} |
@@ -63,3 +63,3 @@ /* | ||
* | ||
* @memberof module:workbox-broadcast-update | ||
* @memberof workbox-broadcast-update | ||
*/ | ||
@@ -66,0 +66,0 @@ class BroadcastCacheUpdate { |
@@ -23,3 +23,3 @@ /* | ||
* | ||
* @memberof module:workbox-broadcast-update | ||
* @memberof workbox-broadcast-update | ||
*/ | ||
@@ -31,3 +31,3 @@ class BroadcastUpdatePlugin implements WorkboxPlugin { | ||
* Construct a BroadcastCacheUpdate instance with the passed options and | ||
* calls its [`notifyIfUpdated()`]{@link module:workbox-broadcast-update.BroadcastCacheUpdate~notifyIfUpdated} | ||
* calls its {@link workbox-broadcast-update.BroadcastCacheUpdate~notifyIfUpdated} | ||
* method whenever the plugin's `cacheDidUpdate` callback is invoked. | ||
@@ -34,0 +34,0 @@ * |
@@ -22,3 +22,3 @@ /* | ||
* | ||
* @memberof module:workbox-broadcast-update | ||
* @memberof workbox-broadcast-update | ||
*/ | ||
@@ -25,0 +25,0 @@ const responsesAreSame = ( |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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 1 instance 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 1 instance in 1 package
103045
+ Addedworkbox-core@6.5.0(transitive)
- Removedworkbox-core@6.4.2(transitive)
Updatedworkbox-core@6.5.0