workbox-cacheable-response
Advanced tools
Comparing version 7.0.0 to 7.1.0
@@ -5,2 +5,3 @@ this.workbox = this.workbox || {}; | ||
// @ts-ignore | ||
try { | ||
@@ -25,3 +26,2 @@ self['workbox:cacheable-response:7.0.0'] && _(); | ||
*/ | ||
class CacheableResponse { | ||
@@ -51,3 +51,2 @@ /** | ||
} | ||
if (config.statuses) { | ||
@@ -61,3 +60,2 @@ assert_js.assert.isArray(config.statuses, { | ||
} | ||
if (config.headers) { | ||
@@ -72,3 +70,2 @@ assert_js.assert.isType(config.headers, 'object', { | ||
} | ||
this._statuses = config.statuses; | ||
@@ -86,4 +83,2 @@ this._headers = config.headers; | ||
*/ | ||
isResponseCacheable(response) { | ||
@@ -98,9 +93,6 @@ { | ||
} | ||
let cacheable = true; | ||
if (this._statuses) { | ||
cacheable = this._statuses.includes(response.status); | ||
} | ||
if (this._headers && cacheable) { | ||
@@ -111,3 +103,2 @@ cacheable = Object.keys(this._headers).some(headerName => { | ||
} | ||
{ | ||
@@ -135,6 +126,4 @@ if (!cacheable) { | ||
} | ||
return cacheable; | ||
} | ||
} | ||
@@ -156,3 +145,2 @@ | ||
*/ | ||
class CacheableResponsePlugin { | ||
@@ -186,9 +174,6 @@ /** | ||
} | ||
return null; | ||
}; | ||
this._cacheableResponse = new CacheableResponse(config); | ||
} | ||
} | ||
@@ -201,3 +186,3 @@ | ||
}({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private)); | ||
})({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private); | ||
//# sourceMappingURL=workbox-cacheable-response.dev.js.map |
@@ -1,2 +0,2 @@ | ||
this.workbox=this.workbox||{},this.workbox.cacheableResponse=function(s){"use strict";try{self["workbox:cacheable-response:7.0.0"]&&_()}catch(s){}class t{constructor(s={}){this.O=s.statuses,this._=s.headers}isResponseCacheable(s){let t=!0;return this.O&&(t=this.O.includes(s.status)),this._&&t&&(t=Object.keys(this._).some((t=>s.headers.get(t)===this._[t]))),t}}return s.CacheableResponse=t,s.CacheableResponsePlugin=class{constructor(s){this.cacheWillUpdate=async({response:s})=>this.G.isResponseCacheable(s)?s:null,this.G=new t(s)}},s}({}); | ||
this.workbox=this.workbox||{},this.workbox.cacheableResponse=function(s){"use strict";try{self["workbox:cacheable-response:7.0.0"]&&_()}catch(s){}class t{constructor(s={}){this._=s.statuses,this.G=s.headers}isResponseCacheable(s){let t=!0;return this._&&(t=this._.includes(s.status)),this.G&&t&&(t=Object.keys(this.G).some((t=>s.headers.get(t)===this.G[t]))),t}}return s.CacheableResponse=t,s.CacheableResponsePlugin=class{constructor(s){this.cacheWillUpdate=async({response:s})=>this.H.isResponseCacheable(s)?s:null,this.H=new t(s)}},s}({}); | ||
//# sourceMappingURL=workbox-cacheable-response.prod.js.map |
{ | ||
"name": "workbox-cacheable-response", | ||
"version": "7.0.0", | ||
"version": "7.1.0", | ||
"license": "MIT", | ||
@@ -25,5 +25,5 @@ "author": "Google's Web DevRel Team", | ||
"dependencies": { | ||
"workbox-core": "7.0.0" | ||
"workbox-core": "7.1.0" | ||
}, | ||
"gitHead": "c1d11636823e5e3a89520f7a531970a39304b14a" | ||
"gitHead": "9e69c4269c35e2db9fbba4d13e4e6206c7b66d2a" | ||
} |
// @ts-ignore | ||
try{self['workbox:cacheable-response:7.0.0']&&_()}catch(e){} | ||
try{self['workbox:cacheable-response:7.1.0']&&_()}catch(e){} |
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
78174
653
+ Addedworkbox-core@7.1.0(transitive)
- Removedworkbox-core@7.0.0(transitive)
Updatedworkbox-core@7.1.0