Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

workbox-cacheable-response

Package Overview
Dependencies
Maintainers
3
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

workbox-cacheable-response - npm Package Compare versions

Comparing version 3.0.0-alpha.1 to 3.0.0-alpha.2

Plugin.mjs

30

build/workbox-cacheable-response.dev.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc