workbox-streams
Advanced tools
Comparing version 6.1.5 to 6.2.0-alpha.0
"use strict"; | ||
// @ts-ignore | ||
try { | ||
self['workbox:streams:6.1.5'] && _(); | ||
self['workbox:streams:6.2.0-alpha.0'] && _(); | ||
} | ||
catch (e) { } |
@@ -6,3 +6,3 @@ this.workbox = this.workbox || {}; | ||
try { | ||
self['workbox:streams:6.1.5'] && _(); | ||
self['workbox:streams:6.2.0-alpha.0'] && _(); | ||
} catch (e) {} | ||
@@ -9,0 +9,0 @@ |
@@ -1,2 +0,2 @@ | ||
this.workbox=this.workbox||{},this.workbox.streams=function(e,n,t){"use strict";try{self["workbox:streams:6.1.5"]&&_()}catch(e){}function s(e){const t=e.map((e=>Promise.resolve(e).then((e=>function(e){return e instanceof Response?e.body.getReader():e instanceof ReadableStream?e.getReader():new Response(e).body.getReader()}(e))))),s=new n.Deferred;let r=0;const o=new ReadableStream({pull(e){return t[r].then((e=>e.read())).then((n=>{if(n.done)return r++,r>=t.length?(e.close(),void s.resolve()):this.pull(e);e.enqueue(n.value)})).catch((e=>{throw s.reject(e),e}))},cancel(){s.resolve()}});return{done:s.promise,stream:o}}function r(e={}){const n=new Headers(e);return n.has("content-type")||n.set("content-type","text/html"),n}function o(e,n){const{done:t,stream:o}=s(e),c=r(n);return{done:t,response:new Response(o,{headers:c})}}function c(){return t.canConstructReadableStream()}return e.concatenate=s,e.concatenateToResponse=o,e.isSupported=c,e.strategy=function(e,n){return async({event:t,request:s,url:a,params:u})=>{const i=e.map((e=>Promise.resolve(e({event:t,request:s,url:a,params:u}))));if(c()){const{done:e,response:s}=o(i,n);return t&&t.waitUntil(e),s}const f=i.map((async e=>{const n=await e;return n instanceof Response?n.blob():new Response(n).blob()})),p=await Promise.all(f),w=r(n);return new Response(new Blob(p),{headers:w})}},e}({},workbox.core._private,workbox.core._private); | ||
this.workbox=this.workbox||{},this.workbox.streams=function(e,n,t){"use strict";try{self["workbox:streams:6.2.0-alpha.0"]&&_()}catch(e){}function s(e){const t=e.map((e=>Promise.resolve(e).then((e=>function(e){return e instanceof Response?e.body.getReader():e instanceof ReadableStream?e.getReader():new Response(e).body.getReader()}(e))))),s=new n.Deferred;let r=0;const o=new ReadableStream({pull(e){return t[r].then((e=>e.read())).then((n=>{if(n.done)return r++,r>=t.length?(e.close(),void s.resolve()):this.pull(e);e.enqueue(n.value)})).catch((e=>{throw s.reject(e),e}))},cancel(){s.resolve()}});return{done:s.promise,stream:o}}function r(e={}){const n=new Headers(e);return n.has("content-type")||n.set("content-type","text/html"),n}function o(e,n){const{done:t,stream:o}=s(e),c=r(n);return{done:t,response:new Response(o,{headers:c})}}function c(){return t.canConstructReadableStream()}return e.concatenate=s,e.concatenateToResponse=o,e.isSupported=c,e.strategy=function(e,n){return async({event:t,request:s,url:a,params:u})=>{const i=e.map((e=>Promise.resolve(e({event:t,request:s,url:a,params:u}))));if(c()){const{done:e,response:s}=o(i,n);return t&&t.waitUntil(e),s}const f=i.map((async e=>{const n=await e;return n instanceof Response?n.blob():new Response(n).blob()})),p=await Promise.all(f),w=r(n);return new Response(new Blob(p),{headers:w})}},e}({},workbox.core._private,workbox.core._private); | ||
//# sourceMappingURL=workbox-streams.prod.js.map |
{ | ||
"name": "workbox-streams", | ||
"version": "6.1.5", | ||
"version": "6.2.0-alpha.0", | ||
"license": "MIT", | ||
@@ -26,6 +26,6 @@ "author": "Google's Web DevRel Team", | ||
"dependencies": { | ||
"workbox-core": "^6.1.5", | ||
"workbox-routing": "^6.1.5" | ||
"workbox-core": "^6.2.0-alpha.0", | ||
"workbox-routing": "^6.2.0-alpha.0" | ||
}, | ||
"gitHead": "d559fc8b3240f723fd9721f3976797dcedf7112b" | ||
"gitHead": "46af63c1780955345c117c63c8c8dd54f3d40220" | ||
} |
// @ts-ignore | ||
try{self['workbox:streams:6.1.5']&&_()}catch(e){} | ||
try{self['workbox:streams:6.2.0-alpha.0']&&_()}catch(e){} |
@@ -24,3 +24,3 @@ /* | ||
*/ | ||
function isSupported() { | ||
function isSupported(): boolean { | ||
return canConstructReadableStream(); | ||
@@ -27,0 +27,0 @@ } |
@@ -25,3 +25,3 @@ /* | ||
*/ | ||
function createHeaders(headersInit = {}) { | ||
function createHeaders(headersInit = {}): Headers { | ||
// See https://github.com/GoogleChrome/workbox/issues/1461 | ||
@@ -28,0 +28,0 @@ const headers = new Headers(headersInit); |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
179669
0
1