workbox-window
Advanced tools
Comparing version 4.0.0 to 4.1.0
@@ -8,3 +8,3 @@ (function (global, factory) { | ||
try { | ||
self['workbox:window:4.0.0'] && _(); | ||
self['workbox:window:4.1.0'] && _(); | ||
} catch (e) {} // eslint-disable-line | ||
@@ -78,3 +78,3 @@ | ||
try { | ||
self['workbox:core:4.0.0'] && _(); | ||
self['workbox:core:4.1.0'] && _(); | ||
} catch (e) {} // eslint-disable-line | ||
@@ -569,3 +569,5 @@ | ||
return _this3._swDeferred.promise; | ||
// If `this._sw` is set, resolve with that as we want `getSW()` to | ||
// return the correct (new) service worker if an update is found. | ||
return _this3._sw || _this3._swDeferred.promise; | ||
}); | ||
@@ -572,0 +574,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n=n||self).workbox={})}(this,function(n){"use strict";try{self["workbox:window:4.0.0"]&&_()}catch(n){}var t=function(n,t){return new Promise(function(e){var i=new MessageChannel;i.port1.onmessage=function(n){return e(n.data)},n.postMessage(t,[i.port2])})};function e(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function i(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}try{self["workbox:core:4.0.0"]&&_()}catch(n){}var r=function(){var n=this;this.promise=new Promise(function(t,e){n.resolve=t,n.reject=e})},o=function(n,t){return new URL(n,location).href===new URL(t,location).href},u=function(n,t){Object.assign(this,t,{type:n})};function s(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(n){return Promise.reject(n)}}}function a(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}function c(){}var f=function(n){var f,h;function v(t,e){var o;return void 0===e&&(e={}),(o=n.call(this)||this).t=t,o.i=e,o.o=0,o.u=new r,o.s=new r,o.h=new r,o.v=o.v.bind(i(i(o))),o.l=o.l.bind(i(i(o))),o.g=o.g.bind(i(i(o))),o.m=o.m.bind(i(i(o))),o}h=n,(f=v).prototype=Object.create(h.prototype),f.prototype.constructor=f,f.__proto__=h;var l,w,d,g=v.prototype;return g.register=s(function(n){var t,e,i=this,r=(void 0===n?{}:n).immediate,s=void 0!==r&&r;return t=function(){return i.p=Boolean(navigator.serviceWorker.controller),i.P=i.j(),a(i.O(),function(n){return i.R=n,i.P&&(i._=i.P,i.u.resolve(i.P),i.s.resolve(i.P),i.h.resolve(i.P),i.k(i.P),i.P.addEventListener("statechange",i.l,{once:!0})),i.R.waiting&&o(i.R.waiting.scriptURL,i.t)&&Promise.resolve().then(function(){i.dispatchEvent(new u("waiting",{sw:i.R.waiting,wasWaitingBeforeRegister:!0}))}),i.R.addEventListener("updatefound",i.g),navigator.serviceWorker.addEventListener("controllerchange",i.m,{once:!0}),"BroadcastChannel"in self&&(i.B=new BroadcastChannel("workbox"),i.B.addEventListener("message",i.v)),navigator.serviceWorker.addEventListener("message",i.v),i.R})},(e=function(){if(!s&&"complete"!==document.readyState)return function(n,t){if(!t)return n&&n.then?n.then(c):Promise.resolve()}(new Promise(function(n){return addEventListener("load",n)}))}())&&e.then?e.then(t):t(e)}),g.getSW=s(function(){return this.u.promise}),g.messageSW=s(function(n){return a(this.getSW(),function(t){return new Promise(function(e){var i=new MessageChannel;i.port1.onmessage=function(n){return e(n.data)},t.postMessage(n,[i.port2])})})}),g.j=function(){var n=navigator.serviceWorker.controller;if(n&&o(n.scriptURL,this.t))return n},g.O=s(function(){var n=this;return function(n,t){try{var e=n()}catch(n){return t(n)}return e&&e.then?e.then(void 0,t):e}(function(){return a(navigator.serviceWorker.register(n.t,n.i),function(t){return n.C=performance.now(),t})},function(n){throw n})}),g.k=function(n){t(n,{type:"WINDOW_READY",meta:"workbox-window"})},g.g=function(){var n=this.R.installing;this.o>0||!o(n.scriptURL,this.t)||performance.now()>this.C+6e4?(this.L=n,this.R.removeEventListener("updatefound",this.g)):(this._=n,this.u.resolve(n)),++this.o,n.addEventListener("statechange",this.l)},g.l=function(n){var t=this,e=n.target,i=e.state,r=e===this.L,o=r?"external":"",s={sw:e,originalEvent:n};!r&&this.p&&(s.isUpdate=!0),this.dispatchEvent(new u(o+i,s)),"installed"===i?this.M=setTimeout(function(){"installed"===i&&t.R.waiting===e&&t.dispatchEvent(new u(o+"waiting",s))},200):"activating"===i&&(clearTimeout(this.M),r||this.s.resolve(e))},g.m=function(n){var t=this._;t===navigator.serviceWorker.controller&&(this.dispatchEvent(new u("controlling",{sw:t,originalEvent:n})),this.h.resolve(t))},g.v=function(n){var t=n.data;this.dispatchEvent(new u("message",{data:t,originalEvent:n}))},l=v,(w=[{key:"active",get:function(){return this.s.promise}},{key:"controlling",get:function(){return this.h.promise}}])&&e(l.prototype,w),d&&e(l,d),v}(function(){function n(){this.W={}}var t=n.prototype;return t.addEventListener=function(n,t){this.D(n).add(t)},t.removeEventListener=function(n,t){this.D(n).remove(t)},t.dispatchEvent=function(n){n.target=this,this.D(n.type).forEach(function(t){return t(n)})},t.D=function(n){return this.W[n]=this.W[n]||new Set},n}());n.Workbox=f,n.messageSW=t,Object.defineProperty(n,"__esModule",{value:!0})}); | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n=n||self).workbox={})}(this,function(n){"use strict";try{self["workbox:window:4.1.0"]&&_()}catch(n){}var t=function(n,t){return new Promise(function(e){var i=new MessageChannel;i.port1.onmessage=function(n){return e(n.data)},n.postMessage(t,[i.port2])})};function e(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function i(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}try{self["workbox:core:4.1.0"]&&_()}catch(n){}var r=function(){var n=this;this.promise=new Promise(function(t,e){n.resolve=t,n.reject=e})},o=function(n,t){return new URL(n,location).href===new URL(t,location).href},u=function(n,t){Object.assign(this,t,{type:n})};function s(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(n){return Promise.reject(n)}}}function a(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}function c(){}var f=function(n){var f,h;function v(t,e){var o;return void 0===e&&(e={}),(o=n.call(this)||this).t=t,o.i=e,o.o=0,o.u=new r,o.s=new r,o.h=new r,o.v=o.v.bind(i(i(o))),o.l=o.l.bind(i(i(o))),o.g=o.g.bind(i(i(o))),o.m=o.m.bind(i(i(o))),o}h=n,(f=v).prototype=Object.create(h.prototype),f.prototype.constructor=f,f.__proto__=h;var l,w,d,g=v.prototype;return g.register=s(function(n){var t,e,i=this,r=(void 0===n?{}:n).immediate,s=void 0!==r&&r;return t=function(){return i.p=Boolean(navigator.serviceWorker.controller),i.P=i.j(),a(i.O(),function(n){return i.R=n,i.P&&(i._=i.P,i.u.resolve(i.P),i.s.resolve(i.P),i.h.resolve(i.P),i.k(i.P),i.P.addEventListener("statechange",i.l,{once:!0})),i.R.waiting&&o(i.R.waiting.scriptURL,i.t)&&Promise.resolve().then(function(){i.dispatchEvent(new u("waiting",{sw:i.R.waiting,wasWaitingBeforeRegister:!0}))}),i.R.addEventListener("updatefound",i.g),navigator.serviceWorker.addEventListener("controllerchange",i.m,{once:!0}),"BroadcastChannel"in self&&(i.B=new BroadcastChannel("workbox"),i.B.addEventListener("message",i.v)),navigator.serviceWorker.addEventListener("message",i.v),i.R})},(e=function(){if(!s&&"complete"!==document.readyState)return function(n,t){if(!t)return n&&n.then?n.then(c):Promise.resolve()}(new Promise(function(n){return addEventListener("load",n)}))}())&&e.then?e.then(t):t(e)}),g.getSW=s(function(){return this._||this.u.promise}),g.messageSW=s(function(n){return a(this.getSW(),function(t){return new Promise(function(e){var i=new MessageChannel;i.port1.onmessage=function(n){return e(n.data)},t.postMessage(n,[i.port2])})})}),g.j=function(){var n=navigator.serviceWorker.controller;if(n&&o(n.scriptURL,this.t))return n},g.O=s(function(){var n=this;return function(n,t){try{var e=n()}catch(n){return t(n)}return e&&e.then?e.then(void 0,t):e}(function(){return a(navigator.serviceWorker.register(n.t,n.i),function(t){return n.C=performance.now(),t})},function(n){throw n})}),g.k=function(n){t(n,{type:"WINDOW_READY",meta:"workbox-window"})},g.g=function(){var n=this.R.installing;this.o>0||!o(n.scriptURL,this.t)||performance.now()>this.C+6e4?(this.L=n,this.R.removeEventListener("updatefound",this.g)):(this._=n,this.u.resolve(n)),++this.o,n.addEventListener("statechange",this.l)},g.l=function(n){var t=this,e=n.target,i=e.state,r=e===this.L,o=r?"external":"",s={sw:e,originalEvent:n};!r&&this.p&&(s.isUpdate=!0),this.dispatchEvent(new u(o+i,s)),"installed"===i?this.M=setTimeout(function(){"installed"===i&&t.R.waiting===e&&t.dispatchEvent(new u(o+"waiting",s))},200):"activating"===i&&(clearTimeout(this.M),r||this.s.resolve(e))},g.m=function(n){var t=this._;t===navigator.serviceWorker.controller&&(this.dispatchEvent(new u("controlling",{sw:t,originalEvent:n})),this.h.resolve(t))},g.v=function(n){var t=n.data;this.dispatchEvent(new u("message",{data:t,originalEvent:n}))},l=v,(w=[{key:"active",get:function(){return this.s.promise}},{key:"controlling",get:function(){return this.h.promise}}])&&e(l.prototype,w),d&&e(l,d),v}(function(){function n(){this.W={}}var t=n.prototype;return t.addEventListener=function(n,t){this.D(n).add(t)},t.removeEventListener=function(n,t){this.D(n).remove(t)},t.dispatchEvent=function(n){n.target=this,this.D(n.type).forEach(function(t){return t(n)})},t.D=function(n){return this.W[n]=this.W[n]||new Set},n}());n.Workbox=f,n.messageSW=t,Object.defineProperty(n,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=workbox-window.prod.umd.js.map |
{ | ||
"name": "workbox-window", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"license": "MIT", | ||
@@ -31,5 +31,5 @@ "author": "Google's Web DevRel Team", | ||
"dependencies": { | ||
"workbox-core": "^4.0.0" | ||
"workbox-core": "^4.1.0" | ||
}, | ||
"gitHead": "51ec243c7afc67d5cec835b685bd9ad1e70fb78b" | ||
"gitHead": "6fd1909f69406b7dd5edf3ac6bad3da0ba1e638d" | ||
} |
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
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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
383031
2865
Updatedworkbox-core@^4.1.0