workbox-strategies
Advanced tools
Comparing version 3.0.0-alpha.2 to 3.0.0-alpha.3
@@ -6,3 +6,3 @@ this.workbox = this.workbox || {}; | ||
try { | ||
self.workbox.v['workbox:strategies:3.0.0-alpha.2'] = 1; | ||
self.workbox.v['workbox:strategies:3.0.0-alpha.3'] = 1; | ||
} catch (e) {} // eslint-disable-line | ||
@@ -9,0 +9,0 @@ |
@@ -1,2 +0,2 @@ | ||
this.workbox=this.workbox||{},this.workbox.strategies=function(e,t,r){"use strict";try{self.workbox.v["workbox:strategies:3.0.0-alpha.2"]=1}catch(e){}class n{constructor(t={}){this.e=e.cacheNames.getRuntimeName(t.cacheName),this.t=t.plugins||[]}handle({event:e}){var r=this;return babelHelpers.asyncToGenerator(function*(){let n,s=yield t.cacheWrapper.match(r.e,e.request,null,r.t);if(!s)try{s=yield r.r(e)}catch(e){n=e}if(n)throw n;return s})()}r(e){var n=this;return babelHelpers.asyncToGenerator(function*(){const s=yield r.fetchWrapper.fetch(e.request,null,n.t),i=s.clone();return e.waitUntil(t.cacheWrapper.put(n.e,e.request,i,n.t)),s})()}}class s{constructor(t={}){this.e=e.cacheNames.getRuntimeName(t.cacheName),this.t=t.plugins||[]}handle({event:e}){var r=this;return babelHelpers.asyncToGenerator(function*(){return yield t.cacheWrapper.match(r.e,e.request,null,r.t)})()}}var i={cacheWillUpdate:({response:e})=>e.ok||0===e.status?e:null};class l{constructor(t={}){if(this.e=e.cacheNames.getRuntimeName(t.cacheName),t.plugins){let e=t.plugins.some(e=>!!e.cacheWillUpdate);this.t=e?t.plugins:[i,...t.plugins]}else this.t=[i];this.n=t.networkTimeoutSeconds}handle({event:e}){var t=this;return babelHelpers.asyncToGenerator(function*(){const r=[],n=[];let s;if(t.n){const{id:i,promise:l}=t.s(e,r);s=i,n.push(l)}const i=t.i(s,e,r);return n.push(i),yield Promise.race(n)})()}s(e,t){var r=this;let n;return{promise:new Promise(t=>{const s=(()=>{var n=babelHelpers.asyncToGenerator(function*(){t(yield r.l(e.request))});return function(){return n.apply(this,arguments)}})();n=setTimeout(s,1e3*this.n)}),id:n}}i(e,n,s){var i=this;return babelHelpers.asyncToGenerator(function*(){let s,l;try{l=yield r.fetchWrapper.fetch(n.request,i.t)}catch(e){s=e}if(e&&clearTimeout(e),s||!l)l=yield i.l(n.request);else{const e=l.clone();n.waitUntil(t.cacheWrapper.put(i.e,n.request,e,i.t))}return l})()}l(e){return t.cacheWrapper.match(this.e,e,null,this.t)}}class o{constructor(t={}){this.e=e.cacheNames.getRuntimeName(t.cacheName),this.t=t.plugins||[]}handle({event:e}){var t=this;return babelHelpers.asyncToGenerator(function*(){let n,s;try{s=yield r.fetchWrapper.fetch(e.request,null,t.t)}catch(e){n=e}if(n)throw n;return s})()}}class c{constructor(t={}){if(this.e=e.cacheNames.getRuntimeName(t.cacheName),this.t=t.plugins||[],t.plugins){let e=t.plugins.some(e=>!!e.cacheWillUpdate);this.t=e?t.plugins:[i,...t.plugins]}else this.t=[i]}handle({event:e}){var r=this;return babelHelpers.asyncToGenerator(function*(){const n=r.r(e);let s=yield t.cacheWrapper.match(r.e,e.request,null,r.t);return s?e.waitUntil(n):s=yield n,s})()}r(e){var n=this;return babelHelpers.asyncToGenerator(function*(){const s=yield r.fetchWrapper.fetch(e.request,null,n.t);return e.waitUntil(t.cacheWrapper.put(n.e,e.request,s.clone(),n.t)),s})()}}var a=Object.freeze({CacheFirst:n,CacheOnly:s,NetworkFirst:l,NetworkOnly:o,StaleWhileRevalidate:c});const h={cacheFirst:n,cacheOnly:s,networkFirst:l,networkOnly:o,staleWhileRevalidate:c},u={};return Object.keys(h).forEach(e=>{u[e]=((t={})=>new(0,h[e])(Object.assign(t)))}),Object.assign(u,a)}(workbox.core._private,workbox.core._private,workbox.core._private); | ||
this.workbox=this.workbox||{},this.workbox.strategies=function(e,t,r){"use strict";try{self.workbox.v["workbox:strategies:3.0.0-alpha.3"]=1}catch(e){}class n{constructor(t={}){this.e=e.cacheNames.getRuntimeName(t.cacheName),this.t=t.plugins||[]}handle({event:e}){var r=this;return babelHelpers.asyncToGenerator(function*(){let n,s=yield t.cacheWrapper.match(r.e,e.request,null,r.t);if(!s)try{s=yield r.r(e)}catch(e){n=e}if(n)throw n;return s})()}r(e){var n=this;return babelHelpers.asyncToGenerator(function*(){const s=yield r.fetchWrapper.fetch(e.request,null,n.t),i=s.clone();return e.waitUntil(t.cacheWrapper.put(n.e,e.request,i,n.t)),s})()}}class s{constructor(t={}){this.e=e.cacheNames.getRuntimeName(t.cacheName),this.t=t.plugins||[]}handle({event:e}){var r=this;return babelHelpers.asyncToGenerator(function*(){return yield t.cacheWrapper.match(r.e,e.request,null,r.t)})()}}var i={cacheWillUpdate:({response:e})=>e.ok||0===e.status?e:null};class l{constructor(t={}){if(this.e=e.cacheNames.getRuntimeName(t.cacheName),t.plugins){let e=t.plugins.some(e=>!!e.cacheWillUpdate);this.t=e?t.plugins:[i,...t.plugins]}else this.t=[i];this.n=t.networkTimeoutSeconds}handle({event:e}){var t=this;return babelHelpers.asyncToGenerator(function*(){const r=[],n=[];let s;if(t.n){const{id:i,promise:l}=t.s(e,r);s=i,n.push(l)}const i=t.i(s,e,r);return n.push(i),yield Promise.race(n)})()}s(e,t){var r=this;let n;return{promise:new Promise(t=>{const s=(()=>{var n=babelHelpers.asyncToGenerator(function*(){t(yield r.l(e.request))});return function(){return n.apply(this,arguments)}})();n=setTimeout(s,1e3*this.n)}),id:n}}i(e,n,s){var i=this;return babelHelpers.asyncToGenerator(function*(){let s,l;try{l=yield r.fetchWrapper.fetch(n.request,i.t)}catch(e){s=e}if(e&&clearTimeout(e),s||!l)l=yield i.l(n.request);else{const e=l.clone();n.waitUntil(t.cacheWrapper.put(i.e,n.request,e,i.t))}return l})()}l(e){return t.cacheWrapper.match(this.e,e,null,this.t)}}class o{constructor(t={}){this.e=e.cacheNames.getRuntimeName(t.cacheName),this.t=t.plugins||[]}handle({event:e}){var t=this;return babelHelpers.asyncToGenerator(function*(){let n,s;try{s=yield r.fetchWrapper.fetch(e.request,null,t.t)}catch(e){n=e}if(n)throw n;return s})()}}class c{constructor(t={}){if(this.e=e.cacheNames.getRuntimeName(t.cacheName),this.t=t.plugins||[],t.plugins){let e=t.plugins.some(e=>!!e.cacheWillUpdate);this.t=e?t.plugins:[i,...t.plugins]}else this.t=[i]}handle({event:e}){var r=this;return babelHelpers.asyncToGenerator(function*(){const n=r.r(e);let s=yield t.cacheWrapper.match(r.e,e.request,null,r.t);return s?e.waitUntil(n):s=yield n,s})()}r(e){var n=this;return babelHelpers.asyncToGenerator(function*(){const s=yield r.fetchWrapper.fetch(e.request,null,n.t);return e.waitUntil(t.cacheWrapper.put(n.e,e.request,s.clone(),n.t)),s})()}}var a=Object.freeze({CacheFirst:n,CacheOnly:s,NetworkFirst:l,NetworkOnly:o,StaleWhileRevalidate:c});const h={cacheFirst:n,cacheOnly:s,networkFirst:l,networkOnly:o,staleWhileRevalidate:c},u={};return Object.keys(h).forEach(e=>{u[e]=((t={})=>new(0,h[e])(Object.assign(t)))}),Object.assign(u,a)}(workbox.core._private,workbox.core._private,workbox.core._private); | ||
//# sourceMappingURL=workbox-strategies.prod.js.map |
{ | ||
"name": "workbox-strategies", | ||
"version": "3.0.0-alpha.2", | ||
"version": "3.0.0-alpha.3", | ||
"license": "Apache-2.0", | ||
@@ -30,4 +30,4 @@ "author": "Google's Web DevRel Team", | ||
"dependencies": { | ||
"workbox-core": "^3.0.0-alpha.2" | ||
"workbox-core": "^3.0.0-alpha.3" | ||
} | ||
} |
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
230220
Updatedworkbox-core@^3.0.0-alpha.3