workbox-cacheable-response
Advanced tools
Comparing version 3.0.0-alpha.1 to 3.0.0-alpha.2
@@ -6,3 +6,3 @@ this.workbox = this.workbox || {}; | ||
try { | ||
self.workbox.v['workbox:cacheable-response:3.0.0-alpha.1'] = 1; | ||
self.workbox.v['workbox:cacheable-response:3.0.0-alpha.2'] = 1; | ||
} catch (e) {} // eslint-disable-line | ||
@@ -117,13 +117,23 @@ | ||
logger_mjs.logger.groupCollapsed(`View response details here.`); | ||
logger_mjs.logger.unprefixed.log(response); | ||
logger_mjs.logger.groupEnd(); | ||
logger_mjs.logger.groupCollapsed(`View cacheability criteria here.`); | ||
logger_mjs.logger.unprefixed.log(`Cacheable statuses: ` + JSON.stringify(this._statuses)); | ||
logger_mjs.logger.unprefixed.log(`Cacheable headers: ` + JSON.stringify(this._headers)); | ||
logger_mjs.logger.unprefixed.log(`Cacheable headers: ` + JSON.stringify(this._headers, null, 2)); | ||
logger_mjs.logger.groupEnd(); | ||
const logFriendlyHeaders = {}; | ||
response.headers.forEach((value, key) => { | ||
logFriendlyHeaders[key] = value; | ||
}); | ||
logger_mjs.logger.groupCollapsed(`View response status and headers here.`); | ||
logger_mjs.logger.unprefixed.log(`Response status: ` + response.status); | ||
logger_mjs.logger.unprefixed.log(`Response headers: ` + JSON.stringify(logFriendlyHeaders, null, 2)); | ||
logger_mjs.logger.groupEnd(); | ||
logger_mjs.logger.debug(); | ||
logger_mjs.logger.groupCollapsed(`View full response details here.`); | ||
logger_mjs.logger.unprefixed.log(response.headers); | ||
logger_mjs.logger.unprefixed.log(response); | ||
logger_mjs.logger.groupEnd(); | ||
logger_mjs.logger.groupEnd(); | ||
} | ||
@@ -156,5 +166,5 @@ } | ||
*/ | ||
class CacheableResponsePlugin { | ||
class Plugin { | ||
/** | ||
* To construct a new CacheableResponsePlugin instance you must provide at | ||
* To construct a new cacheable response Plugin instance you must provide at | ||
* least one of the `config` properties. | ||
@@ -220,3 +230,3 @@ * | ||
exports.CacheableResponse = CacheableResponse; | ||
exports.CacheableResponsePlugin = CacheableResponsePlugin; | ||
exports.Plugin = Plugin; | ||
@@ -223,0 +233,0 @@ return exports; |
@@ -1,2 +0,2 @@ | ||
this.workbox=this.workbox||{},this.workbox.cacheableResponse=function(t){"use strict";try{self.workbox.v["workbox:cacheable-response:3.0.0-alpha.1"]=1}catch(t){}class s{constructor(t={}){this.t=t.statuses,this.s=t.headers}isResponseCacheable(t){let s=!0;return this.t&&(s=this.t.includes(t.status)),this.s&&s&&(s=Object.keys(this.s).some(s=>t.headers.get(s)===this.s[s])),s}}class e{constructor(t={}){this.e=new s(t)}cacheWillUpdate({response:t}){return this.e.isResponseCacheable(t)}}return t.CacheableResponse=s,t.CacheableResponsePlugin=e,t}({}); | ||
this.workbox=this.workbox||{},this.workbox.cacheableResponse=function(t){"use strict";try{self.workbox.v["workbox:cacheable-response:3.0.0-alpha.2"]=1}catch(t){}class s{constructor(t={}){this.t=t.statuses,this.s=t.headers}isResponseCacheable(t){let s=!0;return this.t&&(s=this.t.includes(t.status)),this.s&&s&&(s=Object.keys(this.s).some(s=>t.headers.get(s)===this.s[s])),s}}class e{constructor(t={}){this.e=new s(t)}cacheWillUpdate({response:t}){return this.e.isResponseCacheable(t)}}return t.CacheableResponse=s,t.Plugin=e,t}({}); | ||
//# sourceMappingURL=workbox-cacheable-response.prod.js.map |
{ | ||
"name": "workbox-cacheable-response", | ||
"version": "3.0.0-alpha.1", | ||
"version": "3.0.0-alpha.2", | ||
"license": "Apache-2.0", | ||
@@ -28,4 +28,4 @@ "author": "Google's Web DevRel Team", | ||
"dependencies": { | ||
"workbox-core": "^3.0.0-alpha.1" | ||
"workbox-core": "^3.0.0-alpha.2" | ||
} | ||
} |
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
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
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
65093
429
0
Updatedworkbox-core@^3.0.0-alpha.2