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