workbox-strategies
Advanced tools
Comparing version 6.5.1 to 6.5.2
"use strict"; | ||
// @ts-ignore | ||
try { | ||
self['workbox:strategies:6.5.0'] && _(); | ||
self['workbox:strategies:6.5.1'] && _(); | ||
} | ||
catch (e) { } |
@@ -6,3 +6,3 @@ this.workbox = this.workbox || {}; | ||
try { | ||
self['workbox:strategies:6.5.0'] && _(); | ||
self['workbox:strategies:6.5.1'] && _(); | ||
} catch (e) {} | ||
@@ -864,3 +864,3 @@ | ||
/** | ||
* An implementation of a [cache-first]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#cache-falling-back-to-network} | ||
* An implementation of a [cache-first](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#cache-first-falling-back-to-network) | ||
* request strategy. | ||
@@ -959,8 +959,7 @@ * | ||
/** | ||
* An implementation of a | ||
* [cache-only]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#cache-only} | ||
* An implementation of a [cache-only](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#cache-only) | ||
* request strategy. | ||
* | ||
* This class is useful if you want to take advantage of any | ||
* [Workbox plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}. | ||
* [Workbox plugins](https://developer.chrome.com/docs/workbox/using-plugins/). | ||
* | ||
@@ -1055,9 +1054,9 @@ * If there is no cache match, this will throw a `WorkboxError` exception. | ||
* An implementation of a | ||
* [network first]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#network-falling-back-to-cache} | ||
* [network first](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#network-first-falling-back-to-cache) | ||
* request strategy. | ||
* | ||
* By default, this strategy will cache responses with a 200 status code as | ||
* well as [opaque responses]{@link https://developers.google.com/web/tools/workbox/guides/handle-third-party-requests}. | ||
* well as [opaque responses](https://developer.chrome.com/docs/workbox/caching-resources-during-runtime/#opaque-responses). | ||
* Opaque responses are are cross-origin requests where the response doesn't | ||
* support [CORS]{@link https://enable-cors.org/}. | ||
* support [CORS](https://enable-cors.org/). | ||
* | ||
@@ -1287,7 +1286,7 @@ * If the network request fails, and there is no cache match, this will throw | ||
* An implementation of a | ||
* [network-only]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#network-only} | ||
* [network-only](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#network-only) | ||
* request strategy. | ||
* | ||
* This class is useful if you want to take advantage of any | ||
* [Workbox plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}. | ||
* [Workbox plugins](https://developer.chrome.com/docs/workbox/using-plugins/). | ||
* | ||
@@ -1391,3 +1390,3 @@ * If the network request fails, this will throw a `WorkboxError` exception. | ||
* An implementation of a | ||
* [stale-while-revalidate]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#stale-while-revalidate} | ||
* [stale-while-revalidate](https://developer.chrome.com/docs/workbox/reference/workbox-strategies/#type-StaleWhileRevalidate) | ||
* request strategy. | ||
@@ -1401,5 +1400,5 @@ * | ||
* By default, this strategy will cache responses with a 200 status code as | ||
* well as [opaque responses]{@link https://developers.google.com/web/tools/workbox/guides/handle-third-party-requests}. | ||
* well as [opaque responses](https://developer.chrome.com/docs/workbox/caching-resources-during-runtime/#opaque-responses). | ||
* Opaque responses are cross-origin requests where the response doesn't | ||
* support [CORS]{@link https://enable-cors.org/}. | ||
* support [CORS](https://enable-cors.org/). | ||
* | ||
@@ -1406,0 +1405,0 @@ * If the network request fails, and there is no cache match, this will throw |
@@ -1,2 +0,2 @@ | ||
this.workbox=this.workbox||{},this.workbox.strategies=function(t,e,s,r,n,i,a,o,c){"use strict";try{self["workbox:strategies:6.5.0"]&&_()}catch(t){}function h(t){return"string"==typeof t?new Request(t):t}class l{constructor(t,e){this.yt={},Object.assign(this,e),this.event=e.event,this.at=t,this.vt=new n.Deferred,this.bt=[],this.Et=[...t.plugins],this._t=new Map;for(const t of this.Et)this._t.set(t,{});this.event.waitUntil(this.vt.promise)}async fetch(t){const{event:s}=this;let r=h(t);if("navigate"===r.mode&&s instanceof FetchEvent&&s.preloadResponse){const t=await s.preloadResponse;if(t)return t}const n=this.hasCallback("fetchDidFail")?r.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))r=await t({request:r.clone(),event:s})}catch(t){if(t instanceof Error)throw new e.WorkboxError("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const i=r.clone();try{let t;t=await fetch(r,"navigate"===r.mode?void 0:this.at.fetchOptions);for(const e of this.iterateCallbacks("fetchDidSucceed"))t=await e({event:s,request:i,response:t});return t}catch(t){throw n&&await this.runCallbacks("fetchDidFail",{error:t,event:s,originalRequest:n.clone(),request:i.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=h(t);let s;const{cacheName:r,matchOptions:n}=this.at,i=await this.getCacheKey(e,"read"),a=Object.assign(Object.assign({},n),{cacheName:r});s=await caches.match(i,a);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:r,matchOptions:n,cachedResponse:s,request:i,event:this.event})||void 0;return s}async cachePut(t,s){const n=h(t);await c.timeout(0);const o=await this.getCacheKey(n,"write");if(!s)throw new e.WorkboxError("cache-put-with-no-response",{url:a.getFriendlyURL(o.url)});const l=await this.kt(s);if(!l)return!1;const{cacheName:w,matchOptions:u}=this.at,f=await self.caches.open(w),d=this.hasCallback("cacheDidUpdate"),p=d?await r.cacheMatchIgnoreParams(f,o.clone(),["__WB_REVISION__"],u):null;try{await f.put(o,d?l.clone():l)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await i.executeQuotaErrorCallbacks(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:w,oldResponse:p,newResponse:l.clone(),request:o,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.yt[s]){let r=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))r=h(await t({mode:e,request:r,event:this.event,params:this.params}));this.yt[s]=r}return this.yt[s]}hasCallback(t){for(const e of this.at.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.at.plugins)if("function"==typeof e[t]){const s=this._t.get(e),r=r=>{const n=Object.assign(Object.assign({},r),{state:s});return e[t](n)};yield r}}waitUntil(t){return this.bt.push(t),t}async doneWaiting(){let t;for(;t=this.bt.shift();)await t}destroy(){this.vt.resolve(null)}async kt(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class w{constructor(t={}){this.cacheName=s.cacheNames.getRuntimeName(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,r="params"in t?t.params:void 0,n=new l(this,{event:e,request:s,params:r}),i=this.xt(n,s,e);return[i,this.Rt(i,n,s,e)]}async xt(t,s,r){await t.runCallbacks("handlerWillStart",{event:r,request:s});let n=void 0;try{if(n=await this._handle(s,t),!n||"error"===n.type)throw new e.WorkboxError("no-response",{url:s.url})}catch(e){if(e instanceof Error)for(const i of t.iterateCallbacks("handlerDidError"))if(n=await i({error:e,event:r,request:s}),n)break;if(!n)throw e}for(const e of t.iterateCallbacks("handlerWillRespond"))n=await e({event:r,request:s,response:n});return n}async Rt(t,e,s,r){let n,i;try{n=await t}catch(i){}try{await e.runCallbacks("handlerDidRespond",{event:r,request:s,response:n}),await e.doneWaiting()}catch(t){t instanceof Error&&(i=t)}if(await e.runCallbacks("handlerDidComplete",{event:r,request:s,response:n,error:i}),e.destroy(),i)throw i}}const u={cacheWillUpdate:async({response:t})=>200===t.status||0===t.status?t:null};return t.CacheFirst=class extends w{async _handle(t,s){let r=await s.cacheMatch(t),n=void 0;if(!r)try{r=await s.fetchAndCachePut(t)}catch(t){t instanceof Error&&(n=t)}if(!r)throw new e.WorkboxError("no-response",{url:t.url,error:n});return r}},t.CacheOnly=class extends w{async _handle(t,s){const r=await s.cacheMatch(t);if(!r)throw new e.WorkboxError("no-response",{url:t.url});return r}},t.NetworkFirst=class extends w{constructor(t={}){super(t),this.plugins.some((t=>"cacheWillUpdate"in t))||this.plugins.unshift(u),this.Wt=t.networkTimeoutSeconds||0}async _handle(t,s){const r=[],n=[];let i;if(this.Wt){const{id:e,promise:a}=this.Ot({request:t,logs:r,handler:s});i=e,n.push(a)}const a=this.Ut({timeoutId:i,request:t,logs:r,handler:s});n.push(a);const o=await s.waitUntil((async()=>await s.waitUntil(Promise.race(n))||await a)());if(!o)throw new e.WorkboxError("no-response",{url:t.url});return o}Ot({request:t,logs:e,handler:s}){let r;return{promise:new Promise((e=>{r=setTimeout((async()=>{e(await s.cacheMatch(t))}),1e3*this.Wt)})),id:r}}async Ut({timeoutId:t,request:e,logs:s,handler:r}){let n,i;try{i=await r.fetchAndCachePut(e)}catch(t){t instanceof Error&&(n=t)}return t&&clearTimeout(t),!n&&i||(i=await r.cacheMatch(e)),i}},t.NetworkOnly=class extends w{constructor(t={}){super(t),this.Wt=t.networkTimeoutSeconds||0}async _handle(t,s){let r,n=void 0;try{const e=[s.fetch(t)];if(this.Wt){const t=c.timeout(1e3*this.Wt);e.push(t)}if(r=await Promise.race(e),!r)throw new Error("Timed out the network response after "+this.Wt+" seconds.")}catch(t){t instanceof Error&&(n=t)}if(!r)throw new e.WorkboxError("no-response",{url:t.url,error:n});return r}},t.StaleWhileRevalidate=class extends w{constructor(t={}){super(t),this.plugins.some((t=>"cacheWillUpdate"in t))||this.plugins.unshift(u)}async _handle(t,s){const r=s.fetchAndCachePut(t).catch((()=>{}));s.waitUntil(r);let n,i=await s.cacheMatch(t);if(i);else try{i=await r}catch(t){t instanceof Error&&(n=t)}if(!i)throw new e.WorkboxError("no-response",{url:t.url,error:n});return i}},t.Strategy=w,t.StrategyHandler=l,t}({},workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private); | ||
this.workbox=this.workbox||{},this.workbox.strategies=function(t,e,s,r,n,i,a,o,c){"use strict";try{self["workbox:strategies:6.5.1"]&&_()}catch(t){}function h(t){return"string"==typeof t?new Request(t):t}class l{constructor(t,e){this.vt={},Object.assign(this,e),this.event=e.event,this.ht=t,this.bt=new n.Deferred,this.Et=[],this._t=[...t.plugins],this.kt=new Map;for(const t of this._t)this.kt.set(t,{});this.event.waitUntil(this.bt.promise)}async fetch(t){const{event:s}=this;let r=h(t);if("navigate"===r.mode&&s instanceof FetchEvent&&s.preloadResponse){const t=await s.preloadResponse;if(t)return t}const n=this.hasCallback("fetchDidFail")?r.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))r=await t({request:r.clone(),event:s})}catch(t){if(t instanceof Error)throw new e.WorkboxError("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const i=r.clone();try{let t;t=await fetch(r,"navigate"===r.mode?void 0:this.ht.fetchOptions);for(const e of this.iterateCallbacks("fetchDidSucceed"))t=await e({event:s,request:i,response:t});return t}catch(t){throw n&&await this.runCallbacks("fetchDidFail",{error:t,event:s,originalRequest:n.clone(),request:i.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=h(t);let s;const{cacheName:r,matchOptions:n}=this.ht,i=await this.getCacheKey(e,"read"),a=Object.assign(Object.assign({},n),{cacheName:r});s=await caches.match(i,a);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:r,matchOptions:n,cachedResponse:s,request:i,event:this.event})||void 0;return s}async cachePut(t,s){const n=h(t);await c.timeout(0);const o=await this.getCacheKey(n,"write");if(!s)throw new e.WorkboxError("cache-put-with-no-response",{url:a.getFriendlyURL(o.url)});const l=await this.xt(s);if(!l)return!1;const{cacheName:w,matchOptions:u}=this.ht,f=await self.caches.open(w),d=this.hasCallback("cacheDidUpdate"),p=d?await r.cacheMatchIgnoreParams(f,o.clone(),["__WB_REVISION__"],u):null;try{await f.put(o,d?l.clone():l)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await i.executeQuotaErrorCallbacks(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:w,oldResponse:p,newResponse:l.clone(),request:o,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.vt[s]){let r=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))r=h(await t({mode:e,request:r,event:this.event,params:this.params}));this.vt[s]=r}return this.vt[s]}hasCallback(t){for(const e of this.ht.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.ht.plugins)if("function"==typeof e[t]){const s=this.kt.get(e),r=r=>{const n=Object.assign(Object.assign({},r),{state:s});return e[t](n)};yield r}}waitUntil(t){return this.Et.push(t),t}async doneWaiting(){let t;for(;t=this.Et.shift();)await t}destroy(){this.bt.resolve(null)}async xt(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class w{constructor(t={}){this.cacheName=s.cacheNames.getRuntimeName(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,r="params"in t?t.params:void 0,n=new l(this,{event:e,request:s,params:r}),i=this.Rt(n,s,e);return[i,this.Wt(i,n,s,e)]}async Rt(t,s,r){await t.runCallbacks("handlerWillStart",{event:r,request:s});let n=void 0;try{if(n=await this._handle(s,t),!n||"error"===n.type)throw new e.WorkboxError("no-response",{url:s.url})}catch(e){if(e instanceof Error)for(const i of t.iterateCallbacks("handlerDidError"))if(n=await i({error:e,event:r,request:s}),n)break;if(!n)throw e}for(const e of t.iterateCallbacks("handlerWillRespond"))n=await e({event:r,request:s,response:n});return n}async Wt(t,e,s,r){let n,i;try{n=await t}catch(i){}try{await e.runCallbacks("handlerDidRespond",{event:r,request:s,response:n}),await e.doneWaiting()}catch(t){t instanceof Error&&(i=t)}if(await e.runCallbacks("handlerDidComplete",{event:r,request:s,response:n,error:i}),e.destroy(),i)throw i}}const u={cacheWillUpdate:async({response:t})=>200===t.status||0===t.status?t:null};return t.CacheFirst=class extends w{async _handle(t,s){let r=await s.cacheMatch(t),n=void 0;if(!r)try{r=await s.fetchAndCachePut(t)}catch(t){t instanceof Error&&(n=t)}if(!r)throw new e.WorkboxError("no-response",{url:t.url,error:n});return r}},t.CacheOnly=class extends w{async _handle(t,s){const r=await s.cacheMatch(t);if(!r)throw new e.WorkboxError("no-response",{url:t.url});return r}},t.NetworkFirst=class extends w{constructor(t={}){super(t),this.plugins.some((t=>"cacheWillUpdate"in t))||this.plugins.unshift(u),this.Ot=t.networkTimeoutSeconds||0}async _handle(t,s){const r=[],n=[];let i;if(this.Ot){const{id:e,promise:a}=this.Ut({request:t,logs:r,handler:s});i=e,n.push(a)}const a=this.Ct({timeoutId:i,request:t,logs:r,handler:s});n.push(a);const o=await s.waitUntil((async()=>await s.waitUntil(Promise.race(n))||await a)());if(!o)throw new e.WorkboxError("no-response",{url:t.url});return o}Ut({request:t,logs:e,handler:s}){let r;return{promise:new Promise((e=>{r=setTimeout((async()=>{e(await s.cacheMatch(t))}),1e3*this.Ot)})),id:r}}async Ct({timeoutId:t,request:e,logs:s,handler:r}){let n,i;try{i=await r.fetchAndCachePut(e)}catch(t){t instanceof Error&&(n=t)}return t&&clearTimeout(t),!n&&i||(i=await r.cacheMatch(e)),i}},t.NetworkOnly=class extends w{constructor(t={}){super(t),this.Ot=t.networkTimeoutSeconds||0}async _handle(t,s){let r,n=void 0;try{const e=[s.fetch(t)];if(this.Ot){const t=c.timeout(1e3*this.Ot);e.push(t)}if(r=await Promise.race(e),!r)throw new Error("Timed out the network response after "+this.Ot+" seconds.")}catch(t){t instanceof Error&&(n=t)}if(!r)throw new e.WorkboxError("no-response",{url:t.url,error:n});return r}},t.StaleWhileRevalidate=class extends w{constructor(t={}){super(t),this.plugins.some((t=>"cacheWillUpdate"in t))||this.plugins.unshift(u)}async _handle(t,s){const r=s.fetchAndCachePut(t).catch((()=>{}));s.waitUntil(r);let n,i=await s.cacheMatch(t);if(i);else try{i=await r}catch(t){t instanceof Error&&(n=t)}if(!i)throw new e.WorkboxError("no-response",{url:t.url,error:n});return i}},t.Strategy=w,t.StrategyHandler=l,t}({},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-strategies.prod.js.map |
@@ -5,3 +5,3 @@ import { Strategy } from './Strategy.js'; | ||
/** | ||
* An implementation of a [cache-first]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#cache-falling-back-to-network} | ||
* An implementation of a [cache-first](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#cache-first-falling-back-to-network) | ||
* request strategy. | ||
@@ -8,0 +8,0 @@ * |
@@ -15,3 +15,3 @@ /* | ||
/** | ||
* An implementation of a [cache-first]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#cache-falling-back-to-network} | ||
* An implementation of a [cache-first](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#cache-first-falling-back-to-network) | ||
* request strategy. | ||
@@ -18,0 +18,0 @@ * |
@@ -5,8 +5,7 @@ import { Strategy } from './Strategy.js'; | ||
/** | ||
* An implementation of a | ||
* [cache-only]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#cache-only} | ||
* An implementation of a [cache-only](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#cache-only) | ||
* request strategy. | ||
* | ||
* This class is useful if you want to take advantage of any | ||
* [Workbox plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}. | ||
* [Workbox plugins](https://developer.chrome.com/docs/workbox/using-plugins/). | ||
* | ||
@@ -13,0 +12,0 @@ * If there is no cache match, this will throw a `WorkboxError` exception. |
@@ -15,8 +15,7 @@ /* | ||
/** | ||
* An implementation of a | ||
* [cache-only]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#cache-only} | ||
* An implementation of a [cache-only](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#cache-only) | ||
* request strategy. | ||
* | ||
* This class is useful if you want to take advantage of any | ||
* [Workbox plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}. | ||
* [Workbox plugins](https://developer.chrome.com/docs/workbox/using-plugins/). | ||
* | ||
@@ -23,0 +22,0 @@ * If there is no cache match, this will throw a `WorkboxError` exception. |
@@ -9,9 +9,9 @@ import { Strategy, StrategyOptions } from './Strategy.js'; | ||
* An implementation of a | ||
* [network first]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#network-falling-back-to-cache} | ||
* [network first](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#network-first-falling-back-to-cache) | ||
* request strategy. | ||
* | ||
* By default, this strategy will cache responses with a 200 status code as | ||
* well as [opaque responses]{@link https://developers.google.com/web/tools/workbox/guides/handle-third-party-requests}. | ||
* well as [opaque responses](https://developer.chrome.com/docs/workbox/caching-resources-during-runtime/#opaque-responses). | ||
* Opaque responses are are cross-origin requests where the response doesn't | ||
* support [CORS]{@link https://enable-cors.org/}. | ||
* support [CORS](https://enable-cors.org/). | ||
* | ||
@@ -18,0 +18,0 @@ * If the network request fails, and there is no cache match, this will throw |
@@ -17,9 +17,9 @@ /* | ||
* An implementation of a | ||
* [network first]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#network-falling-back-to-cache} | ||
* [network first](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#network-first-falling-back-to-cache) | ||
* request strategy. | ||
* | ||
* By default, this strategy will cache responses with a 200 status code as | ||
* well as [opaque responses]{@link https://developers.google.com/web/tools/workbox/guides/handle-third-party-requests}. | ||
* well as [opaque responses](https://developer.chrome.com/docs/workbox/caching-resources-during-runtime/#opaque-responses). | ||
* Opaque responses are are cross-origin requests where the response doesn't | ||
* support [CORS]{@link https://enable-cors.org/}. | ||
* support [CORS](https://enable-cors.org/). | ||
* | ||
@@ -26,0 +26,0 @@ * If the network request fails, and there is no cache match, this will throw |
@@ -9,7 +9,7 @@ import { Strategy, StrategyOptions } from './Strategy.js'; | ||
* An implementation of a | ||
* [network-only]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#network-only} | ||
* [network-only](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#network-only) | ||
* request strategy. | ||
* | ||
* This class is useful if you want to take advantage of any | ||
* [Workbox plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}. | ||
* [Workbox plugins](https://developer.chrome.com/docs/workbox/using-plugins/). | ||
* | ||
@@ -16,0 +16,0 @@ * If the network request fails, this will throw a `WorkboxError` exception. |
@@ -17,7 +17,7 @@ /* | ||
* An implementation of a | ||
* [network-only]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#network-only} | ||
* [network-only](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#network-only) | ||
* request strategy. | ||
* | ||
* This class is useful if you want to take advantage of any | ||
* [Workbox plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}. | ||
* [Workbox plugins](https://developer.chrome.com/docs/workbox/using-plugins/). | ||
* | ||
@@ -24,0 +24,0 @@ * If the network request fails, this will throw a `WorkboxError` exception. |
{ | ||
"name": "workbox-strategies", | ||
"version": "6.5.1", | ||
"version": "6.5.2", | ||
"license": "MIT", | ||
@@ -26,5 +26,5 @@ "author": "Google's Web DevRel Team", | ||
"dependencies": { | ||
"workbox-core": "6.5.1" | ||
"workbox-core": "6.5.2" | ||
}, | ||
"gitHead": "7c095b4f981976d11a29ac934a16c6a0fbd0c0c1" | ||
"gitHead": "85bdecd24ded38c215b4e8943ee9b3eb0e2c3ee9" | ||
} |
// @ts-ignore | ||
try{self['workbox:strategies:6.5.1']&&_()}catch(e){} | ||
try{self['workbox:strategies:6.5.2']&&_()}catch(e){} |
@@ -19,3 +19,3 @@ /* | ||
/** | ||
* An implementation of a [cache-first]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#cache-falling-back-to-network} | ||
* An implementation of a [cache-first](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#cache-first-falling-back-to-network) | ||
* request strategy. | ||
@@ -22,0 +22,0 @@ * |
@@ -19,8 +19,7 @@ /* | ||
/** | ||
* An implementation of a | ||
* [cache-only]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#cache-only} | ||
* An implementation of a [cache-only](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#cache-only) | ||
* request strategy. | ||
* | ||
* This class is useful if you want to take advantage of any | ||
* [Workbox plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}. | ||
* [Workbox plugins](https://developer.chrome.com/docs/workbox/using-plugins/). | ||
* | ||
@@ -27,0 +26,0 @@ * If there is no cache match, this will throw a `WorkboxError` exception. |
@@ -25,9 +25,9 @@ /* | ||
* An implementation of a | ||
* [network first]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#network-falling-back-to-cache} | ||
* [network first](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#network-first-falling-back-to-cache) | ||
* request strategy. | ||
* | ||
* By default, this strategy will cache responses with a 200 status code as | ||
* well as [opaque responses]{@link https://developers.google.com/web/tools/workbox/guides/handle-third-party-requests}. | ||
* well as [opaque responses](https://developer.chrome.com/docs/workbox/caching-resources-during-runtime/#opaque-responses). | ||
* Opaque responses are are cross-origin requests where the response doesn't | ||
* support [CORS]{@link https://enable-cors.org/}. | ||
* support [CORS](https://enable-cors.org/). | ||
* | ||
@@ -34,0 +34,0 @@ * If the network request fails, and there is no cache match, this will throw |
@@ -26,7 +26,7 @@ /* | ||
* An implementation of a | ||
* [network-only]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#network-only} | ||
* [network-only](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#network-only) | ||
* request strategy. | ||
* | ||
* This class is useful if you want to take advantage of any | ||
* [Workbox plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}. | ||
* [Workbox plugins](https://developer.chrome.com/docs/workbox/using-plugins/). | ||
* | ||
@@ -33,0 +33,0 @@ * If the network request fails, this will throw a `WorkboxError` exception. |
@@ -21,3 +21,3 @@ /* | ||
* An implementation of a | ||
* [stale-while-revalidate]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#stale-while-revalidate} | ||
* [stale-while-revalidate](https://developer.chrome.com/docs/workbox/reference/workbox-strategies/#type-StaleWhileRevalidate) | ||
* request strategy. | ||
@@ -31,5 +31,5 @@ * | ||
* By default, this strategy will cache responses with a 200 status code as | ||
* well as [opaque responses]{@link https://developers.google.com/web/tools/workbox/guides/handle-third-party-requests}. | ||
* well as [opaque responses](https://developer.chrome.com/docs/workbox/caching-resources-during-runtime/#opaque-responses). | ||
* Opaque responses are cross-origin requests where the response doesn't | ||
* support [CORS]{@link https://enable-cors.org/}. | ||
* support [CORS](https://enable-cors.org/). | ||
* | ||
@@ -36,0 +36,0 @@ * If the network request fails, and there is no cache match, this will throw |
@@ -6,3 +6,3 @@ import { Strategy, StrategyOptions } from './Strategy.js'; | ||
* An implementation of a | ||
* [stale-while-revalidate]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#stale-while-revalidate} | ||
* [stale-while-revalidate](https://developer.chrome.com/docs/workbox/reference/workbox-strategies/#type-StaleWhileRevalidate) | ||
* request strategy. | ||
@@ -16,5 +16,5 @@ * | ||
* By default, this strategy will cache responses with a 200 status code as | ||
* well as [opaque responses]{@link https://developers.google.com/web/tools/workbox/guides/handle-third-party-requests}. | ||
* well as [opaque responses](https://developer.chrome.com/docs/workbox/caching-resources-during-runtime/#opaque-responses). | ||
* Opaque responses are cross-origin requests where the response doesn't | ||
* support [CORS]{@link https://enable-cors.org/}. | ||
* support [CORS](https://enable-cors.org/). | ||
* | ||
@@ -21,0 +21,0 @@ * If the network request fails, and there is no cache match, this will throw |
@@ -17,3 +17,3 @@ /* | ||
* An implementation of a | ||
* [stale-while-revalidate]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#stale-while-revalidate} | ||
* [stale-while-revalidate](https://developer.chrome.com/docs/workbox/reference/workbox-strategies/#type-StaleWhileRevalidate) | ||
* request strategy. | ||
@@ -27,5 +27,5 @@ * | ||
* By default, this strategy will cache responses with a 200 status code as | ||
* well as [opaque responses]{@link https://developers.google.com/web/tools/workbox/guides/handle-third-party-requests}. | ||
* well as [opaque responses](https://developer.chrome.com/docs/workbox/caching-resources-during-runtime/#opaque-responses). | ||
* Opaque responses are cross-origin requests where the response doesn't | ||
* support [CORS]{@link https://enable-cors.org/}. | ||
* support [CORS](https://enable-cors.org/). | ||
* | ||
@@ -32,0 +32,0 @@ * If the network request fails, and there is no cache match, this will throw |
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
367984
4789
+ Addedworkbox-core@6.5.2(transitive)
- Removedworkbox-core@6.5.1(transitive)
Updatedworkbox-core@6.5.2