Comparing version 4.0.7-beta.2 to 4.0.7
@@ -1,19 +0,182 @@ | ||
var ut=Object.create;var k=Object.defineProperty;var Rt=Object.getOwnPropertyDescriptor;var ht=Object.getOwnPropertyNames;var mt=Object.getPrototypeOf,Ut=Object.prototype.hasOwnProperty;var ae=(e,t)=>()=>(e&&(t=e(e=0)),t);var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),B=(e,t)=>{for(var r in t)k(e,r,{get:t[r],enumerable:!0})},pe=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ht(t))!Ut.call(e,n)&&n!==r&&k(e,n,{get:()=>t[n],enumerable:!(o=Rt(t,n))||o.enumerable});return e};var m=(e,t,r)=>(r=e!=null?ut(mt(e)):{},pe(t||!e||!e.__esModule?k(r,"default",{value:e,enumerable:!0}):r,e)),X=e=>pe(k({},"__esModule",{value:!0}),e);var de={};B(de,{error:()=>j,warn:()=>W});var L,z,W,j,P=ae(()=>{L=m(require("chalk")),z=m(require("util")),W=(...e)=>console.warn(L.default.bgYellow.black(` | ||
WARNING `),z.default.format(...e),` | ||
`),j=(...e)=>console.warn(L.default.bgRed.black(` | ||
ERROR `),z.default.format(...e),` | ||
`)});var Re={};B(Re,{debugHttpProxy:()=>ft});var ue,ft,he=ae(()=>{ue=require("debug"),ft=(0,ue.debug)("cy2-http-proxy")});var H=w(Ue=>{var S=Ue,Tt=require("url"),me=require("util")._extend,Nt=require("requires-port"),St=/(^|,)\s*upgrade\s*($|,)/i,D=/^https|wss/;S.isSSL=D;S.setupOutgoing=function(e,t,r,o){let n={...t};r.url==="/preflight"&&(n.target=new URL("https://api.cypress.io")),e.port=n[o||"target"].port||(D.test(n[o||"target"].protocol)?443:80),["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"].forEach(function(p){e[p]=n[o||"target"][p]}),e.method=n.method||r.method,e.headers=me({},r.headers),n.headers&&me(e.headers,n.headers),n.auth&&(e.auth=n.auth),n.ca&&(e.ca=n.ca),D.test(n[o||"target"].protocol)&&(e.rejectUnauthorized=typeof n.secure>"u"?!0:n.secure),e.agent=n.agent||!1,e.localAddress=n.localAddress,e.agent||(e.headers=e.headers||{},(typeof e.headers.connection!="string"||!St.test(e.headers.connection))&&(e.headers.connection="close"));var s=n[o||"target"],a=s&&n.prependPath!==!1&&s.path||"",i=n.toProxy?r.url:Tt.parse(r.url).path||"";return i=n.ignorePath?"":i,e.path=S.urlJoin(a,i),n.changeOrigin&&(e.headers.host=Nt(e.port,n[o||"target"].protocol)&&!Et(e.host)?e.host+":"+e.port:e.host),e};S.setupSocket=function(e){return e.setTimeout(0),e.setNoDelay(!0),e.setKeepAlive(!0,0),e};S.getPort=function(e){var t=e.headers.host?e.headers.host.match(/:(\d+)/):"";return t?t[1]:S.hasEncryptedConnection(e)?"443":"80"};S.hasEncryptedConnection=function(e){return Boolean(e.connection.encrypted||e.connection.pair)};S.urlJoin=function(){var e=Array.prototype.slice.call(arguments),t=e.length-1,r=e[t],o=r.split("?"),n;return e[t]=o.shift(),n=[e.filter(Boolean).join("/").replace(/\/+/g,"/").replace("http:/","http://").replace("https:/","https://")],n.push.apply(n,o),n.join("?")};S.rewriteCookieProperty=function e(t,r,o){return Array.isArray(t)?t.map(function(n){return e(n,r,o)}):t.replace(new RegExp("(;\\s*"+o+"=)([^;]+)","i"),function(n,s,a){var i;if(a in r)i=r[a];else if("*"in r)i=r["*"];else return n;return i?s+i:""})};function Et(e){return!!~e.indexOf(":")}});var Ne=w((qt,Te)=>{var Ve=require("url"),fe=H(),yt=/^201|30(1|2|7|8)$/;Te.exports={removeChunked:function(t,r,o){t.httpVersion==="1.0"&&delete o.headers["transfer-encoding"]},setConnection:function(t,r,o){t.httpVersion==="1.0"?o.headers.connection=t.headers.connection||"close":t.httpVersion!=="2.0"&&!o.headers.connection&&(o.headers.connection=t.headers.connection||"keep-alive")},setRedirectHostRewrite:function(t,r,o,n){if((n.hostRewrite||n.autoRewrite||n.protocolRewrite)&&o.headers.location&&yt.test(o.statusCode)){var s=Ve.parse(n.target),a=Ve.parse(o.headers.location);if(s.host!=a.host)return;n.hostRewrite?a.host=n.hostRewrite:n.autoRewrite&&(a.host=t.headers.host),n.protocolRewrite&&(a.protocol=n.protocolRewrite),o.headers.location=a.format()}},writeHeaders:function(t,r,o,n){var s=n.cookieDomainRewrite,a=n.cookiePathRewrite,i=n.preserveHeaderKeyCase,p,U=function(l,u){u!=null&&(s&&l.toLowerCase()==="set-cookie"&&(u=fe.rewriteCookieProperty(u,s,"domain")),a&&l.toLowerCase()==="set-cookie"&&(u=fe.rewriteCookieProperty(u,a,"path")),r.setHeader(String(l).trim(),u))};if(typeof s=="string"&&(s={"*":s}),typeof a=="string"&&(a={"*":a}),i&&o.rawHeaders!=null){p={};for(var c=0;c<o.rawHeaders.length;c+=2){var d=o.rawHeaders[c];p[d.toLowerCase()]=d}}Object.keys(o.headers).forEach(function(l){var u=o.headers[l];i&&p&&(l=p[l]||l),U(l,u)})},writeStatusCode:function(t,r,o){o.statusMessage?(r.statusCode=o.statusCode,r.statusMessage=o.statusMessage):r.statusCode=o.statusCode}}});var Ee=w(($t,Se)=>{var Ft=require("http"),wt=require("https"),Y=Ne(),O=H(),gt=require("follow-redirects");Y=Object.keys(Y).map(function(e){return Y[e]});var bt={http:Ft,https:wt};Se.exports={deleteLength:function(t,r,o){(t.method==="DELETE"||t.method==="OPTIONS")&&!t.headers["content-length"]&&(t.headers["content-length"]="0",delete t.headers["transfer-encoding"])},timeout:function(t,r,o){o.timeout&&t.socket.setTimeout(o.timeout)},XHeaders:function(t,r,o){if(o.xfwd){var n=t.isSpdy||O.hasEncryptedConnection(t),s={for:t.connection.remoteAddress||t.socket.remoteAddress,port:O.getPort(t),proto:n?"https":"http"};["for","port","proto"].forEach(function(a){t.headers["x-forwarded-"+a]=(t.headers["x-forwarded-"+a]||"")+(t.headers["x-forwarded-"+a]?",":"")+s[a]}),t.headers["x-forwarded-host"]=t.headers["x-forwarded-host"]||t.headers.host||""}},stream:function(t,r,o,n,s,a){let i={...o};t.url==="/preflight"&&(i.target=new URL("https://api.cypress.io")),s.emit("start",t,r,i.target||i.forward);var p=i.followRedirects?gt:bt,U=p.http,c=p.https;if(i.forward){var d=(i.forward.protocol==="https:"?c:U).request(O.setupOutgoing(i.ssl||{},i,t,"forward")),l=Z(d,i.forward);if(t.on("error",l),d.on("error",l),(i.buffer||t).pipe(d),!i.target)return r.end()}var u=(i.target.protocol==="https:"?c:U).request(O.setupOutgoing(i.ssl||{},i,t));u.on("socket",function(N){s&&!u.getHeader("expect")&&s.emit("proxyReq",u,t,r,i)}),i.proxyTimeout&&u.setTimeout(i.proxyTimeout,function(){u.abort()}),t.on("aborted",function(){u.abort()});var y=Z(u,i.target);t.on("error",y),u.on("error",y);function Z(N,F){return function(C){if(t.socket.destroyed&&C.code==="ECONNRESET")return s.emit("econnreset",C,t,r,F),N.abort();a?a(C,t,r,F):s.emit("error",C,t,r,F)}}(i.buffer||t).pipe(u),u.on("response",function(N){if(s&&s.emit("proxyRes",N,t,r),!r.headersSent&&!i.selfHandleResponse)for(var F=0;F<Y.length&&!Y[F](t,r,N,i);F++);r.finished?s&&s.emit("end",t,r,N):(N.on("end",function(){s&&s.emit("end",t,r,N)}),i.selfHandleResponse||N.pipe(r))})}}});var Fe=w((er,ye)=>{var Zt=require("http"),Wt=require("https"),v=H();ye.exports={checkMethodAndHeader:function(t,r){if(t.method!=="GET"||!t.headers.upgrade||t.headers.upgrade.toLowerCase()!=="websocket")return r.destroy(),!0},XHeaders:function(t,r,o){if(o.xfwd){var n={for:t.connection.remoteAddress||t.socket.remoteAddress,port:v.getPort(t),proto:v.hasEncryptedConnection(t)?"wss":"ws"};["for","port","proto"].forEach(function(s){t.headers["x-forwarded-"+s]=(t.headers["x-forwarded-"+s]||"")+(t.headers["x-forwarded-"+s]?",":"")+n[s]})}},stream:function(t,r,o,n,s,a){var i=function(c,d){return Object.keys(d).reduce(function(l,u){var y=d[u];if(!Array.isArray(y))return l.push(u+": "+y),l;for(var Z=0;Z<y.length;Z++)l.push(u+": "+y[Z]);return l},[c]).join(`\r | ||
var ut=Object.create;var B=Object.defineProperty;var ht=Object.getOwnPropertyDescriptor;var dt=Object.getOwnPropertyNames;var lt=Object.getPrototypeOf,mt=Object.prototype.hasOwnProperty;var se=(e,t)=>()=>(e&&(t=e(e=0)),t);var b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),V=(e,t)=>{for(var r in t)B(e,r,{get:t[r],enumerable:!0})},ie=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of dt(t))!mt.call(e,o)&&o!==r&&B(e,o,{get:()=>t[o],enumerable:!(n=ht(t,o))||n.enumerable});return e};var m=(e,t,r)=>(r=e!=null?ut(lt(e)):{},ie(t||!e||!e.__esModule?B(r,"default",{value:e,enumerable:!0}):r,e)),X=e=>ie(B({},"__esModule",{value:!0}),e);var ae={};V(ae,{error:()=>q,warn:()=>S});var Q,K,S,q,U=se(()=>{Q=m(require("chalk")),K=m(require("util")),S=(...e)=>console.warn(Q.default.bgYellow.black(` | ||
WARNING `),K.default.format(...e),` | ||
`),q=(...e)=>console.warn(Q.default.bgRed.black(` | ||
ERROR `),K.default.format(...e),` | ||
`)});var he={};V(he,{debugHttpProxy:()=>Pt});var ue,Pt,de=se(()=>{ue=require("debug"),Pt=(0,ue.debug)("cy2-http-proxy")});var L=b(me=>{var w=me,Ct=require("url"),le=require("util")._extend,yt=require("requires-port"),At=/(^|,)\s*upgrade\s*($|,)/i,Z=/^https|wss/;w.isSSL=Z;w.setupOutgoing=function(e,t,r,n){e.port=t[n||"target"].port||(Z.test(t[n||"target"].protocol)?443:80),["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"].forEach(function(a){e[a]=t[n||"target"][a]}),e.method=t.method||r.method,e.headers=le({},r.headers),t.headers&&le(e.headers,t.headers),t.auth&&(e.auth=t.auth),t.ca&&(e.ca=t.ca),Z.test(t[n||"target"].protocol)&&(e.rejectUnauthorized=typeof t.secure>"u"?!0:t.secure),e.agent=t.agent||!1,e.localAddress=t.localAddress,e.agent||(e.headers=e.headers||{},(typeof e.headers.connection!="string"||!At.test(e.headers.connection))&&(e.headers.connection="close"));var o=t[n||"target"],s=o&&t.prependPath!==!1&&o.path||"",i=t.toProxy?r.url:Ct.parse(r.url).path||"";return i=t.ignorePath?"":i,e.path=w.urlJoin(s,i),t.changeOrigin&&(e.headers.host=yt(e.port,t[n||"target"].protocol)&&!wt(e.host)?e.host+":"+e.port:e.host),e};w.setupSocket=function(e){return e.setTimeout(0),e.setNoDelay(!0),e.setKeepAlive(!0,0),e};w.getPort=function(e){var t=e.headers.host?e.headers.host.match(/:(\d+)/):"";return t?t[1]:w.hasEncryptedConnection(e)?"443":"80"};w.hasEncryptedConnection=function(e){return Boolean(e.connection.encrypted||e.connection.pair)};w.urlJoin=function(){var e=Array.prototype.slice.call(arguments),t=e.length-1,r=e[t],n=r.split("?"),o;return e[t]=n.shift(),o=[e.filter(Boolean).join("/").replace(/\/+/g,"/").replace("http:/","http://").replace("https:/","https://")],o.push.apply(o,n),o.join("?")};w.rewriteCookieProperty=function e(t,r,n){return Array.isArray(t)?t.map(function(o){return e(o,r,n)}):t.replace(new RegExp("(;\\s*"+n+"=)([^;]+)","i"),function(o,s,i){var a;if(i in r)a=r[i];else if("*"in r)a=r["*"];else return o;return a?s+a:""})};function wt(e){return!!~e.indexOf(":")}});var ye=b((kt,Ce)=>{var ge=require("url"),Pe=L(),Et=/^201|30(1|2|7|8)$/;Ce.exports={removeChunked:function(t,r,n){t.httpVersion==="1.0"&&delete n.headers["transfer-encoding"]},setConnection:function(t,r,n){t.httpVersion==="1.0"?n.headers.connection=t.headers.connection||"close":t.httpVersion!=="2.0"&&!n.headers.connection&&(n.headers.connection=t.headers.connection||"keep-alive")},setRedirectHostRewrite:function(t,r,n,o){if((o.hostRewrite||o.autoRewrite||o.protocolRewrite)&&n.headers.location&&Et.test(n.statusCode)){var s=ge.parse(o.target),i=ge.parse(n.headers.location);if(s.host!=i.host)return;o.hostRewrite?i.host=o.hostRewrite:o.autoRewrite&&(i.host=t.headers.host),o.protocolRewrite&&(i.protocol=o.protocolRewrite),n.headers.location=i.format()}},writeHeaders:function(t,r,n,o){var s=o.cookieDomainRewrite,i=o.cookiePathRewrite,a=o.preserveHeaderKeyCase,c,g=function(p,d){d!=null&&(s&&p.toLowerCase()==="set-cookie"&&(d=Pe.rewriteCookieProperty(d,s,"domain")),i&&p.toLowerCase()==="set-cookie"&&(d=Pe.rewriteCookieProperty(d,i,"path")),r.setHeader(String(p).trim(),d))};if(typeof s=="string"&&(s={"*":s}),typeof i=="string"&&(i={"*":i}),a&&n.rawHeaders!=null){c={};for(var u=0;u<n.rawHeaders.length;u+=2){var f=n.rawHeaders[u];c[f.toLowerCase()]=f}}Object.keys(n.headers).forEach(function(p){var d=n.headers[p];a&&c&&(p=c[p]||p),g(p,d)})},writeStatusCode:function(t,r,n){n.statusMessage?(r.statusCode=n.statusCode,r.statusMessage=n.statusMessage):r.statusCode=n.statusCode}}});var we=b((Jt,Ae)=>{var Tt=require("http"),vt=require("https"),H=ye(),N=L(),bt=require("follow-redirects");H=Object.keys(H).map(function(e){return H[e]});var xt={http:Tt,https:vt};Ae.exports={deleteLength:function(t,r,n){(t.method==="DELETE"||t.method==="OPTIONS")&&!t.headers["content-length"]&&(t.headers["content-length"]="0",delete t.headers["transfer-encoding"])},timeout:function(t,r,n){n.timeout&&t.socket.setTimeout(n.timeout)},XHeaders:function(t,r,n){if(n.xfwd){var o=t.isSpdy||N.hasEncryptedConnection(t),s={for:t.connection.remoteAddress||t.socket.remoteAddress,port:N.getPort(t),proto:o?"https":"http"};["for","port","proto"].forEach(function(i){t.headers["x-forwarded-"+i]=(t.headers["x-forwarded-"+i]||"")+(t.headers["x-forwarded-"+i]?",":"")+s[i]}),t.headers["x-forwarded-host"]=t.headers["x-forwarded-host"]||t.headers.host||""}},stream:function(t,r,n,o,s,i){s.emit("start",t,r,n.target||n.forward);var a=n.followRedirects?bt:xt,c=a.http,g=a.https;if(n.forward){var u=(n.forward.protocol==="https:"?g:c).request(N.setupOutgoing(n.ssl||{},n,t,"forward")),f=T(u,n.forward);if(t.on("error",f),u.on("error",f),(n.buffer||t).pipe(u),!n.target)return r.end()}var p=(n.target.protocol==="https:"?g:c).request(N.setupOutgoing(n.ssl||{},n,t));p.on("socket",function(P){s&&!p.getHeader("expect")&&s.emit("proxyReq",p,t,r,n)}),n.proxyTimeout&&p.setTimeout(n.proxyTimeout,function(){p.abort()}),t.on("aborted",function(){p.abort()});var d=T(p,n.target);t.on("error",d),p.on("error",d);function T(P,v){return function(O){if(t.socket.destroyed&&O.code==="ECONNRESET")return s.emit("econnreset",O,t,r,v),P.abort();i?i(O,t,r,v):s.emit("error",O,t,r,v)}}(n.buffer||t).pipe(p),p.on("response",function(P){if(s&&s.emit("proxyRes",P,t,r),!r.headersSent&&!n.selfHandleResponse)for(var v=0;v<H.length&&!H[v](t,r,P,n);v++);r.finished?s&&s.emit("end",t,r,P):(P.on("end",function(){s&&s.emit("end",t,r,P)}),n.selfHandleResponse||P.pipe(r))})}}});var Te=b((_t,Ee)=>{var Rt=require("http"),St=require("https"),I=L();Ee.exports={checkMethodAndHeader:function(t,r){if(t.method!=="GET"||!t.headers.upgrade||t.headers.upgrade.toLowerCase()!=="websocket")return r.destroy(),!0},XHeaders:function(t,r,n){if(n.xfwd){var o={for:t.connection.remoteAddress||t.socket.remoteAddress,port:I.getPort(t),proto:I.hasEncryptedConnection(t)?"wss":"ws"};["for","port","proto"].forEach(function(s){t.headers["x-forwarded-"+s]=(t.headers["x-forwarded-"+s]||"")+(t.headers["x-forwarded-"+s]?",":"")+o[s]})}},stream:function(t,r,n,o,s,i){var a=function(u,f){return Object.keys(f).reduce(function(p,d){var T=f[d];if(!Array.isArray(T))return p.push(d+": "+T),p;for(var P=0;P<T.length;P++)p.push(d+": "+T[P]);return p},[u]).join(`\r | ||
`)+`\r | ||
\r | ||
`};v.setupSocket(r),n&&n.length&&r.unshift(n);var p=(v.isSSL.test(o.target.protocol)?Wt:Zt).request(v.setupOutgoing(o.ssl||{},o,t));return s&&s.emit("proxyReqWs",p,t,r,o,n),p.on("error",U),p.on("response",function(c){c.upgrade||(r.write(i("HTTP/"+c.httpVersion+" "+c.statusCode+" "+c.statusMessage,c.headers)),c.pipe(r))}),p.on("upgrade",function(c,d,l){d.on("error",U),d.on("end",function(){s.emit("close",c,d,l)}),r.on("error",function(){d.end()}),v.setupSocket(d),l&&l.length&&d.unshift(l),r.write(i("HTTP/1.1 101 Switching Protocols",c.headers)),d.pipe(r).pipe(d),s.emit("open",d),s.emit("proxySocket",d)}),p.end();function U(c){a?a(c,t,r):s.emit("error",c,t,r),r.end()}}}});var Ye=w((tr,Pe)=>{var{debugHttpProxy:A}=(he(),X(Re)),{error:Qt}=(P(),X(de)),{omit:we,pick:ge,isUndefined:vt}=require("lodash"),Qe=Pe.exports,be=require("util")._extend,Pt=require("url").parse,ve=require("eventemitter3"),Yt=require("http"),xt=require("https"),Ze=Ee(),We=Fe();Qe.Server=g;function I(e){return function(r){return function(n,s){var a=e==="ws"?this.wsPasses:this.webPasses,i=[].slice.call(arguments),p=i.length-1,U,c;typeof i[p]=="function"&&(c=i[p],p--);var d=r;if(!(i[p]instanceof Buffer)&&i[p]!==s&&(d=be({},r),be(d,i[p]),p--),i[p]instanceof Buffer&&(U=i[p]),["target","forward"].forEach(function(u){typeof d[u]=="string"&&(d[u]=Pt(d[u]))}),!d.target&&!d.forward)return this.emit("error",new Error("Must provide a proper URL as target"));vt(a==null?void 0:a.length)&&(Qt("Unexpected error processing the request. Please report the issue and the details below. Set environment variable DEBUG=cy2* and rerun to get more information"),console.error("Request: %o",ge(n,"httpVersion","method","url","headers","upgrade","aborted","complete")),console.error("Proxy: type %s, request options: %O",e,we(d,"ssl"))),A("applying passes, proxy type: %s, request options: %o",e,we(d,"ssl")),A("Request: %o",ge(n,"httpVersion","method","url","headers","upgrade","aborted","complete"));for(var l=0;l<a.length;l++)if(a[l](n,s,d,U,this,c)){A('pass halted the loop type "%s", #%d: %s %s',e,l,a[l].name,n.method,n.url);break}}}}Qe.createRightProxy=I;function g(e){ve.call(this),e=e||{},e.prependPath=e.prependPath!==!1,this.web=this.proxyRequest=I("web")(e),this.ws=this.proxyWebsocketRequest=I("ws")(e),this.options=e,this.webPasses=Object.keys(Ze).map(function(t){return Ze[t]}),this.wsPasses=Object.keys(We).map(function(t){return We[t]}),this.on("error",this.onError,this)}require("util").inherits(g,ve);g.prototype.onError=function(e){if(this.listeners("error").length===1)throw e};g.prototype.listen=function(e,t,r){var o=this,n=function(s,a){o.web(s,a)};return this._server=this.options.ssl?xt.createServer(this.options.ssl,n):Yt.createServer(n),this.options.ws&&this._server.on("upgrade",function(s,a,i){o.ws(s,a,i)}),this._server.listen(e,t,r),this};g.prototype.close=function(e){var t=this;this._server&&this._server.close(r);function r(){t._server=null,e&&e.apply(null,arguments)}};g.prototype.before=function(e,t,r){if(e!=="ws"&&e!=="web")throw new Error("type must be `web` or `ws`");var o=e==="ws"?this.wsPasses:this.webPasses,n=!1;if(o.forEach(function(s,a){s.name===t&&(n=a)}),n===!1)throw new Error("No such pass");o.splice(n,0,r)};g.prototype.after=function(e,t,r){if(e!=="ws"&&e!=="web")throw new Error("type must be `web` or `ws`");var o=e==="ws"?this.wsPasses:this.webPasses,n=!1;if(o.forEach(function(s,a){s.name===t&&(n=a)}),n===!1)throw new Error("No such pass");o.splice(n++,0,r)}});var Ce=w((rr,xe)=>{var x=Ye().Server;function q(e){return new x(e)}x.createProxyServer=q;x.createServer=q;x.createProxy=q;xe.exports=x});var Je=w((nr,ke)=>{ke.exports=Ce()});var Ot={};B(Ot,{getCypressCLIBinPath:()=>M,run:()=>lt,spawn:()=>ct});module.exports=X(Ot);var Qr=require("source-map-support/register");var J=require("path");var G=require("debug"),R=(0,G.debug)("cy2"),h=(0,G.debug)("cy2-net");P();async function M(){var e;if(process.env.CYPRESS_PACKAGE_SHELL_SCRIPT)return R("Cypress binary path from CYPRESS_PACKAGE_SHELL_SCRIPT: %s",process.env.CYPRESS_PACKAGE_SHELL_SCRIPT),process.env.CYPRESS_PACKAGE_SHELL_SCRIPT;try{let t=require.resolve("cypress"),r=require("cypress/package.json");if(!r.bin||!((e=r.bin)!=null&&e.cypress))throw new Error("Cannot detect cypress package executable");let o=(0,J.resolve)((0,J.dirname)(t),r.bin.cypress);if(R("Cypress binary path: %s",o),!o)throw new Error("Cannot detect cypress package executable");return o}catch(t){throw j("Cannot detect cypress package executable. Consider using CYPRESS_PACKAGE_SHELL_SCRIPT environment variable. Tried locations: %O",require.resolve.paths("cypress")),t}}var pt=m(require("child_process")),dt=require("os");var K={name:"cy2",version:"4.0.7-beta.2",author:"Andrew Goldis",main:"./dist",typings:"./dist",license:"GPL-3.0-or-later",repository:{type:"git",url:"https://github.com/sorry-cypress/cy2.git"},scripts:{postinstall:"patch-package",build:"run-p tsc esbuild",dev:"run-p watch:*",test:"jest",tsc:"tsc",esbuild:"node ./build.js","watch:tsc":'run-s "tsc --watch --preserveWatchOutput"',"watch:esbuild":"esbuild ./src/*.ts --bundle --platform=node --target=node14 --packages=external --sourcemap=inline --outdir=dist --watch","build-tunnel":"esbuild ./src/tunnel-proxy.ts --bundle --platform=node --target=node14 --packages=external --sourcemap=inline --outdir=dist",release:"release-it","release-ci":"release-it --ci --npm.skipChecks --no-git --no-github --no-increment --npm.publish",clean:"rimraf dist"},files:["bin/*","dist/index.js*","!dist/__tests__","!dist/*.d.ts","!dist/**/*.d.ts","dist/index.d.ts","dist/cypress-wrapper.d.ts","dist/bin-path.d.ts"],bin:{cy2:"bin/cy2"},engines:{node:">=14.17.0"},keywords:["cypress","sorry-cypress","cypress dashboard","cypress ci","cypress parallel","currents"],dependencies:{chalk:"^4.1.2",eventemitter3:"^4.0.0","follow-redirects":"^1.0.0","fp-ts":"^2.13.1","http-terminator":"^3.2.0","https-proxy-agent":"^5.0.1",lodash:"^4.17.21",micromatch:"^4.0.5","patch-package":"^6.5.1","requires-port":"^1.0.0","source-map-support":"^0.5.21",tmp:"^0.2.1"},devDependencies:{"@release-it/conventional-changelog":"^5.1.1","@types/http-proxy":"^1.17.9","@types/jest":"^27.0.1","@types/lodash":"^4.14.191","@types/micromatch":"^4.0.2","@types/node":"^18.11.17",cypress:">=6.7.0",devcert:"^1.2.2",esbuild:"^0.16.13",jest:"^29.3.1","npm-run-all":"^4.1.5","release-it":"^15.6.0",rimraf:"^3.0.2","ts-jest":"^29.0.3",typescript:"^4.9.4"},"release-it":{npm:{publish:!1},github:{release:!0},plugins:{"@release-it/conventional-changelog":{preset:"angular",header:"# Changelog",ignoreVersion:!0,infile:"CHANGELOG.md"}},git:{requireBranch:"main",commitMessage:"chore: release v${version}"},hooks:{"before:init":"run-s clean build"}},prettier:{singleQuote:!0}};var De=m(require("fp-ts/Array")),Ae=require("fp-ts/function"),E=m(require("fp-ts/Option")),Ie=m(require("http")),qe=require("http-terminator"),$e=require("micromatch");var Q=(e,t="base64")=>Buffer.from(e,t).toString();var Me=require("https-proxy-agent");var ce=Q("LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUR6ekNDQXJlZ0F3SUJBZ0lKQUxKbGJVZmRBK2s1TUEwR0NTcUdTSWIzRFFFQkN3VUFNRDR4RnpBVkJnTlYKQkFNTURtRndhUzVqZVhCeVpYTnpMbWx2TVFzd0NRWURWUVFHRXdKVlV6RVdNQlFHQTFVRUJ3d05VMkZ1SUVaeQpZVzV6YVhOamJ6QWVGdzB5TWpFeU1UY3dPREUxTkRGYUZ3MHlNekV5TVRjd09ERTFOREZhTUgweEN6QUpCZ05WCkJBWVRBbFZUTVJNd0VRWURWUVFJREFwRFlXeHBabTl5Ym1saE1SWXdGQVlEVlFRSERBMVRZVzRnUm5KaGJuTnAKYzJOdk1SRXdEd1lEVlFRS0RBaElaV3hzYjBoMVlqRVZNQk1HQTFVRUN3d01TR1ZzYkc5SWRXSWdSR1YyTVJjdwpGU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Stopping interceptors"),await Promise.all(Array.from(f.values()).map((e,t,r)=>new Promise(o=>e.close(()=>{h("Stopped interceptor %d/%d",t+1,r.length),o()})))),f.clear()}async function Be({target:e,upstreamProxy:t}){if(f.has("upstream"))return h("Using interceptor with upstream routing",t.toString(),e),f.get("upstream");h("Creating interceptor with upstream routing path: %s -> %s",t.toString(),e);let r=new Me.HttpsProxyAgent({protocol:t.protocol,host:t.hostname,port:t.port,path:t.pathname});return f.set("upstream",await Ge({target:e,agent:r})),f.get("upstream")}async function Xe({target:e}){return f.has("direct")?(h("Using interceptor with direct routing"),f.get("direct")):(h("Creating interceptor with direct routing path: %s",e),f.set("direct",await Ge({target:e})),f.get("direct"))}function Ge({target:e,agent:t}){return new Promise(r=>{h("Creating interceptor for %s",e);let o=He.createProxyServer({target:e,changeOrigin:!0,followRedirects:!0,agent:t,secure:!1,ssl:{key:le,cert:ce}}).on("error",n=>{let s=Boolean(t)?"upstream proxy":"direct";h("Interceptor of type %s error: %s",s,n),W("Error connecting to %s: %s",e,n.message)});o.listen(0,void 0,()=>r(o))})}var $=m(require("net"));function Le({socket:e,port:t,hostname:r}){let o=$.default.connect(t,r);o.on("ready",function(){e.pipe(o),o.pipe(e),e.write(`HTTP/1.1 200 OK\r | ||
`};I.setupSocket(r),o&&o.length&&r.unshift(o);var c=(I.isSSL.test(n.target.protocol)?St:Rt).request(I.setupOutgoing(n.ssl||{},n,t));return s&&s.emit("proxyReqWs",c,t,r,n,o),c.on("error",g),c.on("response",function(u){u.upgrade||(r.write(a("HTTP/"+u.httpVersion+" "+u.statusCode+" "+u.statusMessage,u.headers)),u.pipe(r))}),c.on("upgrade",function(u,f,p){f.on("error",g),f.on("end",function(){s.emit("close",u,f,p)}),r.on("error",function(){f.end()}),I.setupSocket(f),p&&p.length&&f.unshift(p),r.write(a("HTTP/1.1 101 Switching Protocols",u.headers)),f.pipe(r).pipe(f),s.emit("open",f),s.emit("proxySocket",f)}),c.end();function g(u){i?i(u,t,r):s.emit("error",u,t,r),r.end()}}}});var Me=b(($t,He)=>{var{debugHttpProxy:j}=(de(),X(he)),{error:It}=(U(),X(ae)),{omit:ve,pick:be,isUndefined:Ut}=require("lodash"),Ie=He.exports,xe=require("util")._extend,Ht=require("url").parse,Ue=require("eventemitter3"),Mt=require("http"),Ot=require("https"),Re=we(),Se=Te();Ie.Server=x;function F(e){return function(r){return function(o,s){var i=e==="ws"?this.wsPasses:this.webPasses,a=[].slice.call(arguments),c=a.length-1,g,u;typeof a[c]=="function"&&(u=a[c],c--);var f=r;if(!(a[c]instanceof Buffer)&&a[c]!==s&&(f=xe({},r),xe(f,a[c]),c--),a[c]instanceof Buffer&&(g=a[c]),["target","forward"].forEach(function(d){typeof f[d]=="string"&&(f[d]=Ht(f[d]))}),!f.target&&!f.forward)return this.emit("error",new Error("Must provide a proper URL as target"));Ut(i==null?void 0:i.length)&&(It("Unexpected error processing the request. Please report the issue and the details below. Set environment variable DEBUG=cy2* and rerun to get more information"),console.error("Request: %o",be(o,"httpVersion","method","url","headers","upgrade","aborted","complete")),console.error("Proxy: type %s, request options: %O",e,ve(f,"ssl"))),j("applying passes, proxy type: %s, request options: %o",e,ve(f,"ssl")),j("Request: %o",be(o,"httpVersion","method","url","headers","upgrade","aborted","complete"));for(var p=0;p<i.length;p++)if(i[p](o,s,f,g,this,u)){j('pass halted the loop type "%s", #%d: %s %s',e,p,i[p].name,o.method,o.url);break}}}}Ie.createRightProxy=F;function x(e){Ue.call(this),e=e||{},e.prependPath=e.prependPath!==!1,this.web=this.proxyRequest=F("web")(e),this.ws=this.proxyWebsocketRequest=F("ws")(e),this.options=e,this.webPasses=Object.keys(Re).map(function(t){return Re[t]}),this.wsPasses=Object.keys(Se).map(function(t){return Se[t]}),this.on("error",this.onError,this)}require("util").inherits(x,Ue);x.prototype.onError=function(e){if(this.listeners("error").length===1)throw e};x.prototype.listen=function(e,t,r){var n=this,o=function(s,i){n.web(s,i)};return this._server=this.options.ssl?Ot.createServer(this.options.ssl,o):Mt.createServer(o),this.options.ws&&this._server.on("upgrade",function(s,i,a){n.ws(s,i,a)}),this._server.listen(e,t,r),this};x.prototype.close=function(e){var t=this;this._server&&this._server.close(r);function r(){t._server=null,e&&e.apply(null,arguments)}};x.prototype.before=function(e,t,r){if(e!=="ws"&&e!=="web")throw new Error("type must be `web` or `ws`");var n=e==="ws"?this.wsPasses:this.webPasses,o=!1;if(n.forEach(function(s,i){s.name===t&&(o=i)}),o===!1)throw new Error("No such pass");n.splice(o,0,r)};x.prototype.after=function(e,t,r){if(e!=="ws"&&e!=="web")throw new Error("type must be `web` or `ws`");var n=e==="ws"?this.wsPasses:this.webPasses,o=!1;if(n.forEach(function(s,i){s.name===t&&(o=i)}),o===!1)throw new Error("No such pass");n.splice(o++,0,r)}});var Be=b((er,Oe)=>{var M=Me().Server;function k(e){return new M(e)}M.createProxyServer=k;M.createServer=k;M.createProxy=k;Oe.exports=M});var De=b((tr,Ye)=>{Ye.exports=Be()});var Vt={};V(Vt,{getCypressCLIBinPath:()=>D,run:()=>ft,spawn:()=>pt});module.exports=X(Vt);var Sr=require("source-map-support/register");var Y=require("path");var z=require("debug"),h=(0,z.debug)("cy2"),l=(0,z.debug)("cy2-net");U();async function D(){var e;if(process.env.CYPRESS_PACKAGE_SHELL_SCRIPT)return h("Cypress binary path from CYPRESS_PACKAGE_SHELL_SCRIPT: %s",process.env.CYPRESS_PACKAGE_SHELL_SCRIPT),process.env.CYPRESS_PACKAGE_SHELL_SCRIPT;try{let t=require.resolve("cypress"),r=require("cypress/package.json");if(!r.bin||!((e=r.bin)!=null&&e.cypress))throw new Error("Cannot detect cypress package executable");let n=(0,Y.resolve)((0,Y.dirname)(t),r.bin.cypress);if(h("Cypress binary path: %s",n),!n)throw new Error("Cannot detect cypress package executable");return n}catch(t){throw q("Cannot detect cypress package executable. Consider using CYPRESS_PACKAGE_SHELL_SCRIPT environment variable. Tried locations: %O",require.resolve.paths("cypress")),t}}var at=m(require("child_process")),ct=require("os");var G={name:"cy2",version:"4.0.7",author:"Andrew Goldis",main:"./dist",typings:"./dist",license:"GPL-3.0-or-later",repository:{type:"git",url:"https://github.com/sorry-cypress/cy2.git"},scripts:{postinstall:"patch-package",build:"run-p tsc esbuild",dev:"run-p watch:*",test:"jest",tsc:"tsc",esbuild:"node ./build.js","watch:tsc":'run-s "tsc --watch --preserveWatchOutput"',"watch:esbuild":"esbuild ./src/*.ts --bundle --platform=node --target=node14 --packages=external --sourcemap=inline --outdir=dist --watch","build-tunnel":"esbuild ./src/tunnel-proxy.ts --bundle --platform=node --target=node14 --packages=external --sourcemap=inline --outdir=dist",release:"release-it","release-ci":"release-it --ci --npm.skipChecks --no-git --no-github --no-increment --npm.publish",clean:"rimraf dist"},files:["bin/*","dist/index.js*","!dist/__tests__","!dist/*.d.ts","!dist/**/*.d.ts","dist/index.d.ts","dist/cypress-wrapper.d.ts","dist/bin-path.d.ts"],bin:{cy2:"bin/cy2"},engines:{node:">=14.17.0"},keywords:["cypress","sorry-cypress","cypress dashboard","cypress ci","cypress parallel","currents"],peerDependencies:{cypress:">=6.7.0"},dependencies:{chalk:"^4.1.2",eventemitter3:"^4.0.0","follow-redirects":"^1.0.0","fp-ts":"^2.13.1","http-terminator":"^3.2.0","https-proxy-agent":"^5.0.1",lodash:"^4.17.21",micromatch:"^4.0.5","patch-package":"^6.5.1","requires-port":"^1.0.0","source-map-support":"^0.5.21",tmp:"^0.2.1"},devDependencies:{"@release-it/conventional-changelog":"^5.1.1","@types/http-proxy":"^1.17.9","@types/jest":"^27.0.1","@types/lodash":"^4.14.191","@types/micromatch":"^4.0.2","@types/node":"^18.11.17",devcert:"^1.2.2",esbuild:"^0.16.13",jest:"^29.3.1","npm-run-all":"^4.1.5","release-it":"^15.6.0",rimraf:"^3.0.2","ts-jest":"^29.0.3",typescript:"^4.9.4"},"release-it":{npm:{publish:!1},github:{release:!0},plugins:{"@release-it/conventional-changelog":{preset:"angular",header:"# Changelog",ignoreVersion:!0,infile:"CHANGELOG.md"}},git:{commitMessage:"chore: release v${version}"},hooks:{"before:init":"run-s clean build"}},prettier:{singleQuote:!0}};var je=m(require("fp-ts/Array")),Fe=require("fp-ts/function"),E=m(require("fp-ts/Option")),ke=m(require("http")),Je=require("http-terminator"),_e=require("micromatch");var ce=(e,t="base64")=>Buffer.from(e,t).toString();var Le=require("https-proxy-agent");var pe=`-----BEGIN CERTIFICATE----- | ||
MIIFQzCCAyugAwIBAgIUeibA8mBpbpYo63Bh2j4VEng4TRswDQYJKoZIhvcNAQEL | ||
BQAwMTELMAkGA1UEBhMCQ0ExEzARBgNVBAgMClNvbWUtU3RhdGUxDTALBgNVBAoM | ||
BE5vbmUwHhcNMjMxMjA4MTA0NTU3WhcNMzMxMjA1MTA0NTU3WjAxMQswCQYDVQQG | ||
EwJDQTETMBEGA1UECAwKU29tZS1TdGF0ZTENMAsGA1UECgwETm9uZTCCAiIwDQYJ | ||
KoZIhvcNAQEBBQADggIPADCCAgoCggIBAKzfMtnN0aG6STPhoxs+JDXE3oClcch9 | ||
SZbmEsy3sMjlZQtHvk/D9Qn/asWZwBsWezke5ugHLQzcjWmsIPKqEgz9L17iAUYh | ||
VgQ556TrdTqhiC7sxfpQSHT+3cVmWBAsvOmp9Ihe+0KuhagS36yoY6B8qvOeVnwZ | ||
WhWaFs4eTaSBCSh6LcCvahaJsblfUAas3tGE1jhyBDqFcPK9G4WYC5kzzJxVZVUo | ||
kTJfKkavdYmJGksmYeyD9qS1qlc9kHGYF4QkyG0LnJMKnAdVZfWA4kYUalatRzz+ | ||
BVX8MK+jCetOqPS7hVQ+Pg1bmyjYhcGJX/EYa3qssn8Pgxo9clzG+REZskcZF0gO | ||
YcWC9zqGOfgZwghH5hRJnQBaFpAwJXLyAhP5FYqcQLUH+bFqLQcmFbvskOHZHvGb | ||
Ftcijrk0EHExToq49xvMb7nel7t+eHOwoFvsut8ZSyqNIl+OvK1rUBFCtn6ydKBd | ||
aCPLVEdUhmapgCVN3w96HFvQyeCfItF5lS8vwUgrgjozNZYQpaDh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Tb2uc6dei | ||
xQUCggEAeh7Um6RQqELzSSdjvEJ0Pt7KC4WHY9LSfvRC1nITUKn9P1L0GJ2DtoI4 | ||
+gMAKITxuKGNqALDmdZW87cxkNaSaB+TFan9jToK0R1M3IwXEDabISP0OXlgXHjB | ||
XDjDPvMzZvgLuvvWJbe3w7YMa6sIpem5cpoZZIKX3LUVy94M3OnV4BFuVv23JqEo | ||
QvZcTirarA9LHDaw3WL21HdOJPaZXPLcTZvfC0KAP7acRM57fjk43EhV2/5pc1QU | ||
nKgdEzH7kPOVj9VpZyCaQxVP3/gM91KYjP/2kMTpBQwUKqhXe2iQUh7JQVlA61XG | ||
EI60HSVmkJXRpdndkYVlUJuep/PjYg== | ||
-----END PRIVATE KEY-----`,W=process.env.CY2_EMPTY_CA?"":`-----BEGIN CERTIFICATE----- | ||
MIIFQzCCAyugAwIBAgIUeibA8mBpbpYo63Bh2j4VEng4TRswDQYJKoZIhvcNAQEL | ||
BQAwMTELMAkGA1UEBhMCQ0ExEzARBgNVBAgMClNvbWUtU3RhdGUxDTALBgNVBAoM | ||
BE5vbmUwHhcNMjMxMjA4MTA0NTU3WhcNMzMxMjA1MTA0NTU3WjAxMQswCQYDVQQG | ||
EwJDQTETMBEGA1UECAwKU29tZS1TdGF0ZTENMAsGA1UECgwETm9uZTCCAiIwDQYJ | ||
KoZIhvcNAQEBBQADggIPADCCAgoCggIBAKzfMtnN0aG6STPhoxs+JDXE3oClcch9 | ||
SZbmEsy3sMjlZQtHvk/D9Qn/asWZwBsWezke5ugHLQzcjWmsIPKqEgz9L17iAUYh | ||
VgQ556TrdTqhiC7sxfpQSHT+3cVmWBAsvOmp9Ihe+0KuhagS36yoY6B8qvOeVnwZ | ||
WhWaFs4eTaSBCSh6LcCvahaJsblfUAas3tGE1jhyBDqFcPK9G4WYC5kzzJxVZVUo | ||
kTJfKkavdYmJGksmYeyD9qS1qlc9kHGYF4QkyG0LnJMKnAdVZfWA4kYUalatRzz+ | ||
BVX8MK+jCetOqPS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B | ||
cgUflYo9T8ZEUZY8wLaIdhOKD38kB0sfNWA+b1mMjX2zf6YjygEHT4DwWfMbt+n5 | ||
RSXMa1iYCjc8YKCqDiaoDiVrcNxmc5I/cDd2PzCDq9nLwVpFFmNXf+/VtWv+dcy+ | ||
QIxUbgNU1Co0RDC40JdnykgBRPyRjew3mOsHW+Yzo3iPR7EPx6as4qqePcF00luA | ||
ABsTm55+MQ== | ||
-----END CERTIFICATE-----`;var Ne=m(De());U();var y=new Map;async function Ve(){l("Stopping interceptors"),await Promise.all(Array.from(y.values()).map((e,t,r)=>new Promise(n=>e.close(()=>{l("Stopped interceptor %d/%d",t+1,r.length),n()})))),y.clear()}async function Xe({target:e,upstreamProxy:t}){if(y.has("upstream"))return l("Using interceptor with upstream routing",t.toString(),e),y.get("upstream");l("Creating interceptor with upstream routing path: %s -> %s",t.toString(),e);let r=new Le.HttpsProxyAgent({protocol:t.protocol,host:t.hostname,port:t.port,path:t.pathname});return y.set("upstream",await Qe({target:e,agent:r})),y.get("upstream")}async function ze({target:e}){return y.has("direct")?(l("Using interceptor with direct routing"),y.get("direct")):(l("Creating interceptor with direct routing path: %s",e),y.set("direct",await Qe({target:e})),y.get("direct"))}function Qe({target:e,agent:t}){return new Promise(r=>{l("Creating interceptor for %s",e);let n=Ne.createProxyServer({target:e,changeOrigin:!0,followRedirects:!0,agent:t,ssl:{key:fe,cert:pe}}).on("error",o=>{let s=Boolean(t)?"upstream proxy":"direct";l("Interceptor of type %s error: %s",s,o),S("Error connecting to %s: %s",e,o.message)});n.listen(0,void 0,()=>r(n))})}var J=m(require("net"));function Ke({socket:e,port:t,hostname:r}){let n=J.default.connect(t,r);n.on("ready",function(){e.pipe(n),n.pipe(e),e.write(`HTTP/1.1 200 OK\r | ||
\r | ||
`)}),o.on("error",function(){o.end(),o.destroy(),e.end(),e.destroy()}),e.on("error",function(){e.end(),e.destroy(),o.end(),o.destroy()})}function ze({socket:e,port:t}){let r=$.default.connect(t);r.on("ready",()=>{r.pipe(e),e.pipe(r),e.write(`HTTP/1.1 200 OK\r | ||
`)}),n.on("error",function(){n.end(),n.destroy(),e.end(),e.destroy()}),e.on("error",function(){e.end(),e.destroy(),n.end(),n.destroy()})}function qe({socket:e,port:t}){let r=J.default.connect(t);r.on("ready",()=>{r.pipe(e),e.pipe(r),e.write(`HTTP/1.1 200 OK\r | ||
\r | ||
`)}),r.on("error",()=>{e.end(),e.destroy()}),r.on("end",()=>{e.end(),e.destroy()}),e.on("error",()=>{r.end(),r.destroy()}),e.on("end",()=>{r.end(),r.destroy()})}var je=m(require("http")),Ke=m(require("https"));function _e(e,t,r){h("Proxy chain to upstream for",e.url),r.protocol==="https:"?Ke.default:je.default.request({method:"CONNECT",path:e.url,headers:e.headers,agent:!1,hostname:r.hostname,port:r.port,protocol:r.protocol}).once("upgrade",n).once("connect",s).once("error",a).once("response",o).end();function o(i){i.upgrade=!0}function n(i,p){process.nextTick(function(){s(i,p)})}function s(i,p){p.setNoDelay(!0),p.removeAllListeners(),i.statusCode===200?(t.pipe(p),p.pipe(t),t.write(`HTTP/1.1 200 OK\r | ||
`)}),r.on("error",()=>{e.end(),e.destroy()}),r.on("end",()=>{e.end(),e.destroy()}),e.on("error",()=>{r.end(),r.destroy()}),e.on("end",()=>{r.end(),r.destroy()})}var Ge=m(require("http")),We=m(require("https"));function Ze(e,t,r){l("Proxy chain to upstream for",e.url),r.protocol==="https:"?We.default:Ge.default.request({method:"CONNECT",path:e.url,headers:e.headers,agent:!1,hostname:r.hostname,port:r.port,protocol:r.protocol}).once("upgrade",o).once("connect",s).once("error",i).once("response",n).end();function n(a){a.upgrade=!0}function o(a,c){process.nextTick(function(){s(a,c)})}function s(a,c){c.setNoDelay(!0),c.removeAllListeners(),a.statusCode===200?(t.pipe(c),c.pipe(t),t.write(`HTTP/1.1 200 OK\r | ||
\r | ||
`)):(t.write(`HTTP/1.1 500 SERVER ERROR\r | ||
\r | ||
`),t.end(),t.destroy()),p.on("error",()=>{p.end(),p.destroy(),t.end(),t.destroy()}),t.on("error",()=>{p.end(),p.destroy(),t.end(),t.destroy()})}function a(i){console.error("Upstream proxy connection error",i),t.end(),t.destroy()}}async function ee({target:e="https://cy.currents.dev",upstreamProxy:t=null,envVariables:r={}}){return new Promise((o,n)=>{var U;let s=Ct(t,e,(U=r.NO_PROXY)==null?void 0:U.split(",")),a=Ie.default.createServer(),i=(0,qe.createHttpTerminator)({server:a});async function p(){h("Stopping proxy"),await i.terminate()}a.on("connect",s).listen(0,()=>{let c=a.address();if(!Mt(c)){n(new Error("Unable to detect proxy address"));return}h("Proxy is listening on port %d",c.port),o({stop:async()=>{await Oe(),await p(),h("Stopped proxy + interceptors")},port:c.port})})})}var Ct=(e,t,r=[])=>function(n,s){if(h("Connection request: %s",n.url),!n.url)throw new Error("Missing req.url in connect handler");let[a,i]=n.url.split(":",2);if(Jt(a)){kt({target:t,hostname:a,socket:s,upstreamProxy:e,noProxy:r});return}if(e&&et(a,r)){_e(n,s,e);return}Le({socket:s,port:parseInt(i,10),hostname:a})};async function kt({target:e,hostname:t,socket:r,upstreamProxy:o=null,noProxy:n=[]}){let a=(await(0,Ae.pipe)(o,E.fromNullable,E.filter(()=>et(new URL(e).hostname,n)),E.map(i=>Be({upstreamProxy:i,target:e})),E.getOrElse(()=>Xe({target:e}))))._server.address().port;h('Intercepting request to "%s" via port: %d',t,a),ze({socket:r,port:a})}function et(e,t=[]){let r=De.isEmpty(t)?!0:!(0,$e.isMatch)(e,t);return h('Should "%s" use upstream proxy with NO_PROXY %s: %s',e,t,r),r}function Jt(e){return e===Q("YXBpLmN5cHJlc3MuaW8=")}function Mt(e){return typeof e=="object"&&e!==null}var te=require("fp-ts/function"),V=m(require("fp-ts/Option")),st=m(require("fs")),b=require("lodash"),it=m(require("tmp")),re=require("url");var tt=require("fp-ts/function"),T=m(require("fp-ts/Option")),rt=m(require("fs"));var nt=()=>(0,tt.pipe)(T.fromNullable(process.env.NODE_EXTRA_CA_CERTS),T.chain(e=>T.tryCatch(()=>rt.default.readFileSync(e))),T.map(e=>(R("Augmenting NODE_EXTRA_CA_CERTS: %s",process.env.NODE_EXTRA_CA_CERTS),`${_} | ||
${e}`)),T.getOrElse(()=>_));P();var ot=e=>e==="false"||e==="0"||!e;function ne(){let e=(0,b.pick)(process.env,["NO_PROXY","HTTP_PROXY","HTTPS_PROXY","no_proxy","http_proxy","https_proxy","npm_config_proxy","npm_config_https_proxy","npm_config_noproxy"]);R("Original environment variables %o",e),[["http_proxy","HTTP_PROXY"],["https_proxy","HTTPS_PROXY"],["no_proxy","NO_PROXY"]].forEach(([r,o])=>{ot(e[r])||(R("Copying lowercase %s to %s",r,o),e[o]=e[r])}),[["npm_config_proxy","HTTP_PROXY"],["npm_config_https_proxy","HTTPS_PROXY"]].forEach(([r,o])=>{!ot(e[r])&&(0,b.isUndefined)(e[o])&&(R("Using npm's %s as %s",r,o),e[o]=e[r])});let t={https_proxy:void 0,http_proxy:void 0,npm_config_proxy:void 0,npm_config_https_proxy:void 0,NO_PROXY:e.NO_PROXY,HTTP_PROXY:e.HTTP_PROXY,HTTPS_PROXY:e.HTTPS_PROXY};return R("Sanitized environment variables %o",t),t}function oe({port:e}){let t=nt(),r=it.default.fileSync();return st.default.writeFileSync(r.name,t),{caPath:r.name,proxyURL:`http://127.0.0.1:${e}`}}function se(e){return(0,te.pipe)(V.fromNullable(e.HTTPS_PROXY),V.map(t=>({source:"HTTPS_PROXY",value:t})),V.alt(()=>(0,te.pipe)(V.fromNullable(e.HTTP_PROXY),V.map(t=>({source:"HTTP_PROXY",value:t})))),V.map(t=>(Ht(t.source,new re.URL(t.value)),new re.URL(t.value))),V.fold(()=>null,t=>(R("Using upstream proxy %o",t),t)))}function Ht(e,t){t.protocol==="http:"&&e==="HTTPS_PROXY"&&W("Mismatch between protocol 'http' and env variable HTTPS_PROXY: %s. Use HTTP_PROXY instead.",t),t.protocol==="https:"&&e==="HTTP_PROXY"&&W("Mismatch between protocol 'https' and env variable HTTP_PROXY: %s. USE HTTPS_PROXY instead.",t)}function ie(e,t){return(0,b.chain)({...t,HTTP_PROXY:void 0,HTTPS_PROXY:e.proxyURL,NODE_EXTRA_CA_CERTS:e.caPath,CYPRESS_API_URL:void 0}).tap(r=>R("Resolved proxy environment variables %o",r)).value()}function at(e){Object.entries(e).forEach(([t,r])=>{if((0,b.isUndefined)(r)){R("Deleting env %s",t),process.env[t]=r,delete process.env[t];return}R("Setting env %s=%s",t,r),process.env[t]=r})}async function ct(e){R("Cypress API URL: %s",e),R("Package version: %s",K.version);let[,,...t]=process.argv,r=await M(),o=(0,dt.platform)()==="win32",n=o?"node":r,s=o?[r,...t]:t;R("Running cypress: %o",[n,...s]);let a=ne(),i=se(a),{port:p}=await ee({target:e,upstreamProxy:i,envVariables:a});pt.default.spawn(n,s,{stdio:"inherit",env:{...process.env,...ie(oe({port:p}),a)}}).on("exit",U=>{process.exit(U??1)})}async function lt(e,t){if(R("Cypress API URL: %s",e),R("Package version: %s",K.version),!e)throw new Error("Missing API URL");let r=require("cypress"),o={...process.env},n=ne(),s=se(n),{port:a,stop:i}=await ee({target:e,upstreamProxy:s,envVariables:n});try{return at(ie(oe({port:a}),n)),await r.run(t)}finally{process.env=o,await i()}}0&&(module.exports={getCypressCLIBinPath,run,spawn}); | ||
`),t.end(),t.destroy()),c.on("error",()=>{c.end(),c.destroy(),t.end(),t.destroy()}),t.on("error",()=>{c.end(),c.destroy(),t.end(),t.destroy()})}function i(a){console.error("Upstream proxy connection error",a),t.end(),t.destroy()}}async function _({target:e="https://cy.currents.dev",upstreamProxy:t=null,envVariables:r={}}){return new Promise((n,o)=>{var g;let s=Bt(t,e,(g=r.NO_PROXY)==null?void 0:g.split(",")),i=ke.default.createServer(),a=(0,Je.createHttpTerminator)({server:i});async function c(){l("Stopping proxy"),await a.terminate()}i.on("connect",s).listen(0,()=>{let u=i.address();if(!Lt(u)){o(new Error("Unable to detect proxy address"));return}l("Proxy is listening on port %d",u.port),n({stop:async()=>{await Ve(),await c(),l("Stopped proxy + interceptors")},port:u.port})})})}var Bt=(e,t,r=[])=>function(o,s){if(l("Connection request: %s",o.url),!o.url)throw new Error("Missing req.url in connect handler");let[i,a]=o.url.split(":",2);if(Dt(i)){Yt({target:t,hostname:i,socket:s,upstreamProxy:e,noProxy:r});return}if(e&&$e(i,r)){Ze(o,s,e);return}Ke({socket:s,port:parseInt(a,10),hostname:i})};async function Yt({target:e,hostname:t,socket:r,upstreamProxy:n=null,noProxy:o=[]}){let i=(await(0,Fe.pipe)(n,E.fromNullable,E.filter(()=>$e(new URL(e).hostname,o)),E.map(a=>Xe({upstreamProxy:a,target:e})),E.getOrElse(()=>ze({target:e}))))._server.address().port;l('Intercepting request to "%s" via port: %d',t,i),qe({socket:r,port:i})}function $e(e,t=[]){let r=je.isEmpty(t)?!0:!(0,_e.isMatch)(e,t);return l('Should "%s" use upstream proxy with NO_PROXY %s: %s',e,t,r),r}function Dt(e){return e===ce("YXBpLmN5cHJlc3MuaW8=")}function Lt(e){return typeof e=="object"&&e!==null}var $=require("fp-ts/function"),C=m(require("fp-ts/Option")),ot=m(require("fs")),R=require("lodash"),st=m(require("tmp")),ee=require("url");var et=require("fp-ts/function"),A=m(require("fp-ts/Option")),tt=m(require("fs"));var rt=()=>(0,et.pipe)(A.fromNullable(process.env.NODE_EXTRA_CA_CERTS),A.chain(e=>A.tryCatch(()=>tt.default.readFileSync(e))),A.map(e=>(h("Augmenting NODE_EXTRA_CA_CERTS: %s",process.env.NODE_EXTRA_CA_CERTS),`${W} | ||
${e}`)),A.getOrElse(()=>W));U();var nt=e=>e==="false"||e==="0"||!e;function te(){let e=(0,R.pick)(process.env,["NO_PROXY","HTTP_PROXY","HTTPS_PROXY","no_proxy","http_proxy","https_proxy","npm_config_proxy","npm_config_https_proxy","npm_config_noproxy"]);h("Original environment variables %o",e),[["http_proxy","HTTP_PROXY"],["https_proxy","HTTPS_PROXY"],["no_proxy","NO_PROXY"]].forEach(([r,n])=>{nt(e[r])||(h("Copying lowercase %s to %s",r,n),e[n]=e[r])}),[["npm_config_proxy","HTTP_PROXY"],["npm_config_https_proxy","HTTPS_PROXY"]].forEach(([r,n])=>{!nt(e[r])&&(0,R.isUndefined)(e[n])&&(h("Using npm's %s as %s",r,n),e[n]=e[r])});let t={https_proxy:void 0,http_proxy:void 0,npm_config_proxy:void 0,npm_config_https_proxy:void 0,NO_PROXY:e.NO_PROXY,HTTP_PROXY:e.HTTP_PROXY,HTTPS_PROXY:e.HTTPS_PROXY};return h("Sanitized environment variables %o",t),t}function re({port:e}){let t=rt(),r=st.default.fileSync();return ot.default.writeFileSync(r.name,t),{caPath:r.name,proxyURL:`http://127.0.0.1:${e}`}}function ne(e){return(0,$.pipe)(C.fromNullable(e.HTTPS_PROXY),C.map(t=>({source:"HTTPS_PROXY",value:t})),C.alt(()=>(0,$.pipe)(C.fromNullable(e.HTTP_PROXY),C.map(t=>({source:"HTTP_PROXY",value:t})))),C.map(t=>(Nt(t.source,new ee.URL(t.value)),new ee.URL(t.value))),C.fold(()=>null,t=>(h("Using upstream proxy %o",t),t)))}function Nt(e,t){t.protocol==="http:"&&e==="HTTPS_PROXY"&&S("Mismatch between protocol 'http' and env variable HTTPS_PROXY: %s. Use HTTP_PROXY instead.",t),t.protocol==="https:"&&e==="HTTP_PROXY"&&S("Mismatch between protocol 'https' and env variable HTTP_PROXY: %s. USE HTTPS_PROXY instead.",t)}function oe(e,t){return(0,R.chain)({...t,HTTP_PROXY:void 0,HTTPS_PROXY:e.proxyURL,NODE_EXTRA_CA_CERTS:e.caPath}).tap(r=>h("Resolved proxy environment variables %o",r)).value()}function it(e){Object.entries(e).forEach(([t,r])=>{if((0,R.isUndefined)(r)){h("Deleting env %s",t),process.env[t]=r,delete process.env[t];return}h("Setting env %s=%s",t,r),process.env[t]=r})}async function pt(e){h("Cypress API URL: %s",e),h("Package version: %s",G.version);let[,,...t]=process.argv,r=await D(),n=(0,ct.platform)()==="win32",o=n?"node":r,s=n?[r,...t]:t;h("Running cypress: %o",[o,...s]);let i=te(),a=ne(i),{port:c}=await _({target:e,upstreamProxy:a,envVariables:i});at.default.spawn(o,s,{stdio:"inherit",env:{...process.env,...oe(re({port:c}),i)}}).on("exit",g=>{process.exit(g??1)})}async function ft(e,t){if(h("Cypress API URL: %s",e),h("Package version: %s",G.version),!e)throw new Error("Missing API URL");let r=require("cypress"),n={...process.env},o=te(),s=ne(o),{port:i,stop:a}=await _({target:e,upstreamProxy:s,envVariables:o});try{return it(oe(re({port:i}),o)),await r.run(t)}finally{process.env=n,await a()}}0&&(module.exports={getCypressCLIBinPath,run,spawn}); | ||
/*! For license information please see index.js.LEGAL.txt */ | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "cy2", | ||
"version": "4.0.7-beta.2", | ||
"version": "4.0.7", | ||
"author": "Andrew Goldis", | ||
@@ -50,2 +50,5 @@ "main": "./dist", | ||
], | ||
"peerDependencies": { | ||
"cypress": ">=6.7.0" | ||
}, | ||
"dependencies": { | ||
@@ -72,3 +75,2 @@ "chalk": "^4.1.2", | ||
"@types/node": "^18.11.17", | ||
"cypress": ">=6.7.0", | ||
"devcert": "^1.2.2", | ||
@@ -99,3 +101,2 @@ "esbuild": "^0.16.13", | ||
"git": { | ||
"requireBranch": "main", | ||
"commitMessage": "chore: release v${version}" | ||
@@ -102,0 +103,0 @@ }, |
@@ -21,10 +21,2 @@ # cy2 | ||
--- | ||
*March 2023 Update* | ||
⭐️ Cypress 12.6.0+ users, please use https://github.com/currents-dev/cypress-cloud if you are seeing `Cypress does not support recording test results to this third party service` error ⭐️ | ||
--- | ||
[Changelog](./CHANGELOG.md) | [License GPL-3.0+](./LICENSE) | ||
@@ -31,0 +23,0 @@ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
168643
14
259
2
15
13
136
14