@rafaeelricco/commit-tools 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@rafaeelricco/commit-tools",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {
7
- "commit-tools": "./dist/index.js"
7
+ "commit": "./dist/index.js"
8
8
  },
9
9
  "scripts": {
10
10
  "start": "bun index.ts",
@@ -18,6 +18,10 @@
18
18
  "typecheck": "tsc --noEmit",
19
19
  "prepublishOnly": "bun run build"
20
20
  },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/rafaeelricco/commit-tools"
24
+ },
21
25
  "publishConfig": {
22
26
  "access": "public"
23
27
  },
@@ -1,5 +0,0 @@
1
- // @bun
2
- import k from"ws";var h=global;h.WebSocket||=k;h.window||=global;h.self||=global;h.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__=[{type:1,value:7,isEnabled:!0},{type:2,value:"InternalApp",isEnabled:!0,isValid:!0},{type:2,value:"InternalAppContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdoutContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStderrContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdinContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalFocusContext",isEnabled:!0,isValid:!0}];import q from"react-devtools-core";q.connectToDevTools();
3
-
4
- //# debugId=56243DA64D255B9164756E2164756E21
5
- //# sourceMappingURL=devtools-ke46sr24.js.map
@@ -1,11 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../node_modules/ink/build/devtools-window-polyfill.js", "../node_modules/ink/build/devtools.js"],
4
- "sourcesContent": [
5
- "// Ignoring missing types error to avoid adding another dependency for this hack to work\nimport ws from 'ws';\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\nconst customGlobal = global;\n// These things must exist before importing `react-devtools-core`\ncustomGlobal.WebSocket ||= ws;\ncustomGlobal.window ||= global;\ncustomGlobal.self ||= global;\n// Filter out Ink's internal components from devtools for a cleaner view.\n// Also, ince `react-devtools-shared` package isn't published on npm, we can't\n// use its types, that's why there are hard-coded values in `type` fields below.\n// See https://github.com/facebook/react/blob/edf6eac8a181860fd8a2d076a43806f1237495a1/packages/react-devtools-shared/src/types.js#L24\ncustomGlobal.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ = [\n {\n // ComponentFilterElementType\n type: 1,\n // ElementTypeHostComponent\n value: 7,\n isEnabled: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'InternalApp',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'InternalAppContext',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'InternalStdoutContext',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'InternalStderrContext',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'InternalStdinContext',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'InternalFocusContext',\n isEnabled: true,\n isValid: true,\n },\n];\n//# sourceMappingURL=devtools-window-polyfill.js.map",
6
- "/* eslint-disable import/order */\n// eslint-disable-next-line import/no-unassigned-import\nimport './devtools-window-polyfill.js';\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-expect-error\nimport devtools from 'react-devtools-core';\n// eslint-disable-next-line @typescript-eslint/no-unsafe-call\ndevtools.connectToDevTools();\n//# sourceMappingURL=devtools.js.map"
7
- ],
8
- "mappings": ";AACA,kBAEA,IAAM,EAAe,OAErB,EAAa,YAAc,EAC3B,EAAa,SAAW,OACxB,EAAa,OAAS,OAKtB,EAAa,OAAO,qCAAuC,CACvD,CAEI,KAAM,EAEN,MAAO,EACP,UAAW,EACf,EACA,CAEI,KAAM,EACN,MAAO,cACP,UAAW,GACX,QAAS,EACb,EACA,CAEI,KAAM,EACN,MAAO,qBACP,UAAW,GACX,QAAS,EACb,EACA,CAEI,KAAM,EACN,MAAO,wBACP,UAAW,GACX,QAAS,EACb,EACA,CAEI,KAAM,EACN,MAAO,wBACP,UAAW,GACX,QAAS,EACb,EACA,CAEI,KAAM,EACN,MAAO,uBACP,UAAW,GACX,QAAS,EACb,EACA,CAEI,KAAM,EACN,MAAO,uBACP,UAAW,GACX,QAAS,EACb,CACJ,ECzDA,mCAEA,EAAS,kBAAkB",
9
- "debugId": "56243DA64D255B9164756E2164756E21",
10
- "names": []
11
- }
@@ -1,6 +0,0 @@
1
- // @bun
2
- var g=Object.create;var{getPrototypeOf:h,defineProperty:f,getOwnPropertyNames:i}=Object;var j=Object.prototype.hasOwnProperty;var k=(a,b,c)=>{c=a!=null?g(h(a)):{};let d=b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c;for(let e of i(a))if(!j.call(d,e))f(d,e,{get:()=>a[e],enumerable:!0});return d};var l=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var m=(a,b)=>{for(var c in b)f(a,c,{get:b[c],enumerable:!0,configurable:!0,set:(d)=>b[c]=()=>d})};var n=import.meta.require;
3
- export{k as a,l as b,m as c,n as d};
4
-
5
- //# debugId=64F0A5495162BBF664756E2164756E21
6
- //# sourceMappingURL=index-9gky9qct.js.map
@@ -1,9 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [
5
- ],
6
- "mappings": "",
7
- "debugId": "64F0A5495162BBF664756E2164756E21",
8
- "names": []
9
- }
@@ -1,16 +0,0 @@
1
- // @bun
2
- import{b as R,d as H}from"./index-9gky9qct.js";var o=R((RG,r)=>{var _=1000,y=_*60,D=y*60,N=D*24,Pw=N*7,qw=N*365.25;r.exports=function(w,K){K=K||{};var G=typeof w;if(G==="string"&&w.length>0)return Rw(w);else if(G==="number"&&isFinite(w))return K.long?Tw(w):Sw(w);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(w))};function Rw(w){if(w=String(w),w.length>100)return;var K=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(w);if(!K)return;var G=parseFloat(K[1]),Q=(K[2]||"ms").toLowerCase();switch(Q){case"years":case"year":case"yrs":case"yr":case"y":return G*qw;case"weeks":case"week":case"w":return G*Pw;case"days":case"day":case"d":return G*N;case"hours":case"hour":case"hrs":case"hr":case"h":return G*D;case"minutes":case"minute":case"mins":case"min":case"m":return G*y;case"seconds":case"second":case"secs":case"sec":case"s":return G*_;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return G;default:return}}function Sw(w){var K=Math.abs(w);if(K>=N)return Math.round(w/N)+"d";if(K>=D)return Math.round(w/D)+"h";if(K>=y)return Math.round(w/y)+"m";if(K>=_)return Math.round(w/_)+"s";return w+"ms"}function Tw(w){var K=Math.abs(w);if(K>=N)return i(w,K,N,"day");if(K>=D)return i(w,K,D,"hour");if(K>=y)return i(w,K,y,"minute");if(K>=_)return i(w,K,_,"second");return w+" ms"}function i(w,K,G,Q){var V=K>=G*1.5;return Math.round(w/G)+" "+Q+(V?"s":"")}});var c=R((SG,t)=>{function Cw(w){G.debug=G,G.default=G,G.coerce=T,G.disable=W,G.enable=V,G.enabled=S,G.humanize=o(),G.destroy=v,Object.keys(w).forEach((Y)=>{G[Y]=w[Y]}),G.names=[],G.skips=[],G.formatters={};function K(Y){let Z=0;for(let $=0;$<Y.length;$++)Z=(Z<<5)-Z+Y.charCodeAt($),Z|=0;return G.colors[Math.abs(Z)%G.colors.length]}G.selectColor=K;function G(Y){let Z,$=null,J,E;function F(...U){if(!F.enabled)return;let q=F,O=Number(new Date),j=O-(Z||O);if(q.diff=j,q.prev=Z,q.curr=O,Z=O,U[0]=G.coerce(U[0]),typeof U[0]!=="string")U.unshift("%O");let C=0;U[0]=U[0].replace(/%([a-zA-Z%])/g,(L,I)=>{if(L==="%%")return"%";C++;let a=G.formatters[I];if(typeof a==="function"){let Ow=U[C];L=a.call(q,Ow),U.splice(C,1),C--}return L}),G.formatArgs.call(q,U),(q.log||G.log).apply(q,U)}if(F.namespace=Y,F.useColors=G.useColors(),F.color=G.selectColor(Y),F.extend=Q,F.destroy=G.destroy,Object.defineProperty(F,"enabled",{enumerable:!0,configurable:!1,get:()=>{if($!==null)return $;if(J!==G.namespaces)J=G.namespaces,E=G.enabled(Y);return E},set:(U)=>{$=U}}),typeof G.init==="function")G.init(F);return F}function Q(Y,Z){let $=G(this.namespace+(typeof Z>"u"?":":Z)+Y);return $.log=this.log,$}function V(Y){G.save(Y),G.namespaces=Y,G.names=[],G.skips=[];let Z=(typeof Y==="string"?Y:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let $ of Z)if($[0]==="-")G.skips.push($.slice(1));else G.names.push($)}function z(Y,Z){let $=0,J=0,E=-1,F=0;while($<Y.length)if(J<Z.length&&(Z[J]===Y[$]||Z[J]==="*"))if(Z[J]==="*")E=J,F=$,J++;else $++,J++;else if(E!==-1)J=E+1,F++,$=F;else return!1;while(J<Z.length&&Z[J]==="*")J++;return J===Z.length}function W(){let Y=[...G.names,...G.skips.map((Z)=>"-"+Z)].join(",");return G.enable(""),Y}function S(Y){for(let Z of G.skips)if(z(Y,Z))return!1;for(let Z of G.names)if(z(Y,Z))return!0;return!1}function T(Y){if(Y instanceof Error)return Y.stack||Y.message;return Y}function v(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return G.enable(G.load()),G}t.exports=Cw});var e=R((s,g)=>{s.formatArgs=Lw;s.save=Nw;s.load=Aw;s.useColors=jw;s.storage=Iw();s.destroy=(()=>{let w=!1;return()=>{if(!w)w=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})();s.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function jw(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let w;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(w=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(w[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Lw(w){if(w[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+w[0]+(this.useColors?"%c ":" ")+"+"+g.exports.humanize(this.diff),!this.useColors)return;let K="color: "+this.color;w.splice(1,0,K,"color: inherit");let G=0,Q=0;w[0].replace(/%[a-zA-Z%]/g,(V)=>{if(V==="%%")return;if(G++,V==="%c")Q=G}),w.splice(Q,0,K)}s.log=console.debug||console.log||(()=>{});function Nw(w){try{if(w)s.storage.setItem("debug",w);else s.storage.removeItem("debug")}catch(K){}}function Aw(){let w;try{w=s.storage.getItem("debug")||s.storage.getItem("DEBUG")}catch(K){}if(!w&&typeof process<"u"&&"env"in process)w=process.env.DEBUG;return w}function Iw(){try{return localStorage}catch(w){}}g.exports=c()(s);var{formatters:_w}=g.exports;_w.j=function(w){try{return JSON.stringify(w)}catch(K){return"[UnexpectedJSONParseError]: "+K.message}}});var Qw=R((Gw,k)=>{var iw=H("tty"),u=H("util");Gw.init=nw;Gw.log=lw;Gw.formatArgs=uw;Gw.save=dw;Gw.load=cw;Gw.useColors=gw;Gw.destroy=u.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Gw.colors=[6,2,3,4,5,1];try{let w=(()=>{throw new Error("Cannot require module "+"supports-color");})();if(w&&(w.stderr||w).level>=2)Gw.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch(w){}Gw.inspectOpts=Object.keys(process.env).filter((w)=>{return/^debug_/i.test(w)}).reduce((w,K)=>{let G=K.substring(6).toLowerCase().replace(/_([a-z])/g,(V,z)=>{return z.toUpperCase()}),Q=process.env[K];if(/^(yes|on|true|enabled)$/i.test(Q))Q=!0;else if(/^(no|off|false|disabled)$/i.test(Q))Q=!1;else if(Q==="null")Q=null;else Q=Number(Q);return w[G]=Q,w},{});function gw(){return"colors"in Gw.inspectOpts?Boolean(Gw.inspectOpts.colors):iw.isatty(process.stderr.fd)}function uw(w){let{namespace:K,useColors:G}=this;if(G){let Q=this.color,V="\x1B[3"+(Q<8?Q:"8;5;"+Q),z=` ${V};1m${K} \x1B[0m`;w[0]=z+w[0].split(`
3
- `).join(`
4
- `+z),w.push(V+"m+"+k.exports.humanize(this.diff)+"\x1B[0m")}else w[0]=kw()+K+" "+w[0]}function kw(){if(Gw.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function lw(...w){return process.stderr.write(u.formatWithOptions(Gw.inspectOpts,...w)+`
5
- `)}function dw(w){if(w)process.env.DEBUG=w;else delete process.env.DEBUG}function cw(){return process.env.DEBUG}function nw(w){w.inspectOpts={};let K=Object.keys(Gw.inspectOpts);for(let G=0;G<K.length;G++)w.inspectOpts[K[G]]=Gw.inspectOpts[K[G]]}k.exports=c()(Gw);var{formatters:ww}=k.exports;ww.o=function(w){return this.inspectOpts.colors=this.useColors,u.inspect(w,this.inspectOpts).split(`
6
- `).map((K)=>K.trim()).join(" ")};ww.O=function(w){return this.inspectOpts.colors=this.useColors,u.inspect(w,this.inspectOpts)}});var p=R((jG,n)=>{if(typeof process>"u"||process.type==="renderer"||!1||process.__nwjs)n.exports=e();else n.exports=Qw()});var Zw=R((B)=>{var ew=B&&B.__createBinding||(Object.create?function(w,K,G,Q){if(Q===void 0)Q=G;var V=Object.getOwnPropertyDescriptor(K,G);if(!V||("get"in V?!K.__esModule:V.writable||V.configurable))V={enumerable:!0,get:function(){return K[G]}};Object.defineProperty(w,Q,V)}:function(w,K,G,Q){if(Q===void 0)Q=G;w[Q]=K[G]}),wG=B&&B.__setModuleDefault||(Object.create?function(w,K){Object.defineProperty(w,"default",{enumerable:!0,value:K})}:function(w,K){w.default=K}),Vw=B&&B.__importStar||function(w){if(w&&w.__esModule)return w;var K={};if(w!=null){for(var G in w)if(G!=="default"&&Object.prototype.hasOwnProperty.call(w,G))ew(K,w,G)}return wG(K,w),K};Object.defineProperty(B,"__esModule",{value:!0});B.req=B.json=B.toBuffer=void 0;var GG=Vw(H("http")),KG=Vw(H("https"));async function Yw(w){let K=0,G=[];for await(let Q of w)K+=Q.length,G.push(Q);return Buffer.concat(G,K)}B.toBuffer=Yw;async function QG(w){let G=(await Yw(w)).toString("utf8");try{return JSON.parse(G)}catch(Q){let V=Q;throw V.message+=` (input: ${G})`,V}}B.json=QG;function VG(w,K={}){let Q=((typeof w==="string"?w:w.href).startsWith("https:")?KG:GG).request(w,K),V=new Promise((z,W)=>{Q.once("response",z).once("error",W).end()});return Q.then=V.then.bind(V),Q}B.req=VG});var Ww=R((X)=>{var zw=X&&X.__createBinding||(Object.create?function(w,K,G,Q){if(Q===void 0)Q=G;var V=Object.getOwnPropertyDescriptor(K,G);if(!V||("get"in V?!K.__esModule:V.writable||V.configurable))V={enumerable:!0,get:function(){return K[G]}};Object.defineProperty(w,Q,V)}:function(w,K,G,Q){if(Q===void 0)Q=G;w[Q]=K[G]}),YG=X&&X.__setModuleDefault||(Object.create?function(w,K){Object.defineProperty(w,"default",{enumerable:!0,value:K})}:function(w,K){w.default=K}),Jw=X&&X.__importStar||function(w){if(w&&w.__esModule)return w;var K={};if(w!=null){for(var G in w)if(G!=="default"&&Object.prototype.hasOwnProperty.call(w,G))zw(K,w,G)}return YG(K,w),K},ZG=X&&X.__exportStar||function(w,K){for(var G in w)if(G!=="default"&&!Object.prototype.hasOwnProperty.call(K,G))zw(K,w,G)};Object.defineProperty(X,"__esModule",{value:!0});X.Agent=void 0;var $G=Jw(H("net")),$w=Jw(H("http")),zG=H("https");ZG(Zw(),X);var P=Symbol("AgentBaseInternalState");class Fw extends $w.Agent{constructor(w){super(w);this[P]={}}isSecureEndpoint(w){if(w){if(typeof w.secureEndpoint==="boolean")return w.secureEndpoint;if(typeof w.protocol==="string")return w.protocol==="https:"}let{stack:K}=Error();if(typeof K!=="string")return!1;return K.split(`
7
- `).some((G)=>G.indexOf("(https.js:")!==-1||G.indexOf("node:https:")!==-1)}incrementSockets(w){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;if(!this.sockets[w])this.sockets[w]=[];let K=new $G.Socket({writable:!1});return this.sockets[w].push(K),this.totalSocketCount++,K}decrementSockets(w,K){if(!this.sockets[w]||K===null)return;let G=this.sockets[w],Q=G.indexOf(K);if(Q!==-1){if(G.splice(Q,1),this.totalSocketCount--,G.length===0)delete this.sockets[w]}}getName(w){if(this.isSecureEndpoint(w))return zG.Agent.prototype.getName.call(this,w);return super.getName(w)}createSocket(w,K,G){let Q={...K,secureEndpoint:this.isSecureEndpoint(K)},V=this.getName(Q),z=this.incrementSockets(V);Promise.resolve().then(()=>this.connect(w,Q)).then((W)=>{if(this.decrementSockets(V,z),W instanceof $w.Agent)try{return W.addRequest(w,Q)}catch(S){return G(S)}this[P].currentSocket=W,super.createSocket(w,K,G)},(W)=>{this.decrementSockets(V,z),G(W)})}createConnection(){let w=this[P].currentSocket;if(this[P].currentSocket=void 0,!w)throw Error("No socket was returned in the `connect()` function");return w}get defaultPort(){return this[P].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(w){if(this[P])this[P].defaultPort=w}get protocol(){return this[P].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(w){if(this[P])this[P].protocol=w}}X.Agent=Fw});var Uw=R((f)=>{var JG=f&&f.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(f,"__esModule",{value:!0});f.parseProxyResponse=void 0;var FG=JG(p()),l=(0,FG.default)("https-proxy-agent:parse-proxy-response");function WG(w){return new Promise((K,G)=>{let Q=0,V=[];function z(){let Y=w.read();if(Y)v(Y);else w.once("readable",z)}function W(){w.removeListener("end",S),w.removeListener("error",T),w.removeListener("readable",z)}function S(){W(),l("onend"),G(Error("Proxy connection ended before receiving CONNECT response"))}function T(Y){W(),l("onerror %o",Y),G(Y)}function v(Y){V.push(Y),Q+=Y.length;let Z=Buffer.concat(V,Q),$=Z.indexOf(`\r
8
- \r
9
- `);if($===-1){l("have not received end of HTTP headers yet..."),z();return}let J=Z.slice(0,$).toString("ascii").split(`\r
10
- `),E=J.shift();if(!E)return w.destroy(),G(Error("No header received from proxy CONNECT response"));let F=E.split(" "),U=+F[1],q=F.slice(2).join(" "),O={};for(let j of J){if(!j)continue;let C=j.indexOf(":");if(C===-1)return w.destroy(),G(Error(`Invalid header from proxy CONNECT response: "${j}"`));let b=j.slice(0,C).toLowerCase(),L=j.slice(C+1).trimStart(),I=O[b];if(typeof I==="string")O[b]=[I,L];else if(Array.isArray(I))I.push(L);else O[b]=L}l("got proxy server response: %o %o",E,O),W(),K({connect:{statusCode:U,statusText:q,headers:O},buffered:Z})}w.on("error",T),w.on("end",S),z()})}f.parseProxyResponse=WG});var qG=R((M)=>{var UG=M&&M.__createBinding||(Object.create?function(w,K,G,Q){if(Q===void 0)Q=G;var V=Object.getOwnPropertyDescriptor(K,G);if(!V||("get"in V?!K.__esModule:V.writable||V.configurable))V={enumerable:!0,get:function(){return K[G]}};Object.defineProperty(w,Q,V)}:function(w,K,G,Q){if(Q===void 0)Q=G;w[Q]=K[G]}),BG=M&&M.__setModuleDefault||(Object.create?function(w,K){Object.defineProperty(w,"default",{enumerable:!0,value:K})}:function(w,K){w.default=K}),Mw=M&&M.__importStar||function(w){if(w&&w.__esModule)return w;var K={};if(w!=null){for(var G in w)if(G!=="default"&&Object.prototype.hasOwnProperty.call(w,G))UG(K,w,G)}return BG(K,w),K},Ew=M&&M.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(M,"__esModule",{value:!0});M.HttpsProxyAgent=void 0;var d=Mw(H("net")),Bw=Mw(H("tls")),XG=Ew(H("assert")),HG=Ew(p()),MG=Ww(),EG=H("url"),OG=Uw(),x=(0,HG.default)("https-proxy-agent"),Xw=(w)=>{if(w.servername===void 0&&w.host&&!d.isIP(w.host))return{...w,servername:w.host};return w};class m extends MG.Agent{constructor(w,K){super(K);this.options={path:void 0},this.proxy=typeof w==="string"?new EG.URL(w):w,this.proxyHeaders=K?.headers??{},x("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let G=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),Q=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...K?Hw(K,"headers"):null,host:G,port:Q}}async connect(w,K){let{proxy:G}=this;if(!K.host)throw TypeError('No "host" provided');let Q;if(G.protocol==="https:")x("Creating `tls.Socket`: %o",this.connectOpts),Q=Bw.connect(Xw(this.connectOpts));else x("Creating `net.Socket`: %o",this.connectOpts),Q=d.connect(this.connectOpts);let V=typeof this.proxyHeaders==="function"?this.proxyHeaders():{...this.proxyHeaders},z=d.isIPv6(K.host)?`[${K.host}]`:K.host,W=`CONNECT ${z}:${K.port} HTTP/1.1\r
11
- `;if(G.username||G.password){let Z=`${decodeURIComponent(G.username)}:${decodeURIComponent(G.password)}`;V["Proxy-Authorization"]=`Basic ${Buffer.from(Z).toString("base64")}`}if(V.Host=`${z}:${K.port}`,!V["Proxy-Connection"])V["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close";for(let Z of Object.keys(V))W+=`${Z}: ${V[Z]}\r
12
- `;let S=(0,OG.parseProxyResponse)(Q);Q.write(`${W}\r
13
- `);let{connect:T,buffered:v}=await S;if(w.emit("proxyConnect",T),this.emit("proxyConnect",T,w),T.statusCode===200){if(w.once("socket",PG),K.secureEndpoint)return x("Upgrading socket connection to TLS"),Bw.connect({...Hw(Xw(K),"host","path","port"),socket:Q});return Q}Q.destroy();let Y=new d.Socket({writable:!1});return Y.readable=!0,w.once("socket",(Z)=>{x("Replaying proxy buffer for failed request"),(0,XG.default)(Z.listenerCount("data")>0),Z.push(v),Z.push(null)}),Y}}m.protocols=["http","https"];M.HttpsProxyAgent=m;function PG(w){w.resume()}function Hw(w,...K){let G={},Q;for(Q in w)if(!K.includes(Q))G[Q]=w[Q];return G}});export default qG();
14
-
15
- //# debugId=FDB18E8C4EC27F9464756E2164756E21
16
- //# sourceMappingURL=index-fep5w8rn.js.map
@@ -1,18 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../node_modules/ms/index.js", "../node_modules/debug/src/common.js", "../node_modules/debug/src/browser.js", "../node_modules/debug/src/node.js", "../node_modules/debug/src/index.js", "../node_modules/agent-base/dist/helpers.js", "../node_modules/agent-base/dist/index.js", "../node_modules/https-proxy-agent/dist/parse-proxy-response.js", "../node_modules/https-proxy-agent/dist/index.js"],
4
- "sourcesContent": [
5
- "/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n",
6
- "\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '')\n\t\t\t.trim()\n\t\t\t.replace(/\\s+/g, ',')\n\t\t\t.split(',')\n\t\t\t.filter(Boolean);\n\n\t\tfor (const ns of split) {\n\t\t\tif (ns[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(ns.slice(1));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(ns);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given string matches a namespace template, honoring\n\t * asterisks as wildcards.\n\t *\n\t * @param {String} search\n\t * @param {String} template\n\t * @return {Boolean}\n\t */\n\tfunction matchesTemplate(search, template) {\n\t\tlet searchIndex = 0;\n\t\tlet templateIndex = 0;\n\t\tlet starIndex = -1;\n\t\tlet matchIndex = 0;\n\n\t\twhile (searchIndex < search.length) {\n\t\t\tif (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {\n\t\t\t\t// Match character or proceed with wildcard\n\t\t\t\tif (template[templateIndex] === '*') {\n\t\t\t\t\tstarIndex = templateIndex;\n\t\t\t\t\tmatchIndex = searchIndex;\n\t\t\t\t\ttemplateIndex++; // Skip the '*'\n\t\t\t\t} else {\n\t\t\t\t\tsearchIndex++;\n\t\t\t\t\ttemplateIndex++;\n\t\t\t\t}\n\t\t\t} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition\n\t\t\t\t// Backtrack to the last '*' and try to match more characters\n\t\t\t\ttemplateIndex = starIndex + 1;\n\t\t\t\tmatchIndex++;\n\t\t\t\tsearchIndex = matchIndex;\n\t\t\t} else {\n\t\t\t\treturn false; // No match\n\t\t\t}\n\t\t}\n\n\t\t// Handle trailing '*' in template\n\t\twhile (templateIndex < template.length && template[templateIndex] === '*') {\n\t\t\ttemplateIndex++;\n\t\t}\n\n\t\treturn templateIndex === template.length;\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names,\n\t\t\t...createDebug.skips.map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tfor (const skip of createDebug.skips) {\n\t\t\tif (matchesTemplate(name, skip)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (const ns of createDebug.names) {\n\t\t\tif (matchesTemplate(name, ns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n",
7
- "/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t// eslint-disable-next-line no-return-assign\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n",
8
- "/**\n * Module dependencies.\n */\n\nconst tty = require('tty');\nconst util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n */\n\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.destroy = util.deprecate(\n\t() => {},\n\t'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'\n);\n\n/**\n * Colors.\n */\n\nexports.colors = [6, 2, 3, 4, 5, 1];\n\ntry {\n\t// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)\n\t// eslint-disable-next-line import/no-extraneous-dependencies\n\tconst supportsColor = require('supports-color');\n\n\tif (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {\n\t\texports.colors = [\n\t\t\t20,\n\t\t\t21,\n\t\t\t26,\n\t\t\t27,\n\t\t\t32,\n\t\t\t33,\n\t\t\t38,\n\t\t\t39,\n\t\t\t40,\n\t\t\t41,\n\t\t\t42,\n\t\t\t43,\n\t\t\t44,\n\t\t\t45,\n\t\t\t56,\n\t\t\t57,\n\t\t\t62,\n\t\t\t63,\n\t\t\t68,\n\t\t\t69,\n\t\t\t74,\n\t\t\t75,\n\t\t\t76,\n\t\t\t77,\n\t\t\t78,\n\t\t\t79,\n\t\t\t80,\n\t\t\t81,\n\t\t\t92,\n\t\t\t93,\n\t\t\t98,\n\t\t\t99,\n\t\t\t112,\n\t\t\t113,\n\t\t\t128,\n\t\t\t129,\n\t\t\t134,\n\t\t\t135,\n\t\t\t148,\n\t\t\t149,\n\t\t\t160,\n\t\t\t161,\n\t\t\t162,\n\t\t\t163,\n\t\t\t164,\n\t\t\t165,\n\t\t\t166,\n\t\t\t167,\n\t\t\t168,\n\t\t\t169,\n\t\t\t170,\n\t\t\t171,\n\t\t\t172,\n\t\t\t173,\n\t\t\t178,\n\t\t\t179,\n\t\t\t184,\n\t\t\t185,\n\t\t\t196,\n\t\t\t197,\n\t\t\t198,\n\t\t\t199,\n\t\t\t200,\n\t\t\t201,\n\t\t\t202,\n\t\t\t203,\n\t\t\t204,\n\t\t\t205,\n\t\t\t206,\n\t\t\t207,\n\t\t\t208,\n\t\t\t209,\n\t\t\t214,\n\t\t\t215,\n\t\t\t220,\n\t\t\t221\n\t\t];\n\t}\n} catch (error) {\n\t// Swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(key => {\n\treturn /^debug_/i.test(key);\n}).reduce((obj, key) => {\n\t// Camel-case\n\tconst prop = key\n\t\t.substring(6)\n\t\t.toLowerCase()\n\t\t.replace(/_([a-z])/g, (_, k) => {\n\t\t\treturn k.toUpperCase();\n\t\t});\n\n\t// Coerce string value into JS value\n\tlet val = process.env[key];\n\tif (/^(yes|on|true|enabled)$/i.test(val)) {\n\t\tval = true;\n\t} else if (/^(no|off|false|disabled)$/i.test(val)) {\n\t\tval = false;\n\t} else if (val === 'null') {\n\t\tval = null;\n\t} else {\n\t\tval = Number(val);\n\t}\n\n\tobj[prop] = val;\n\treturn obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\tconst {namespace: name, useColors} = this;\n\n\tif (useColors) {\n\t\tconst c = this.color;\n\t\tconst colorCode = '\\u001B[3' + (c < 8 ? c : '8;5;' + c);\n\t\tconst prefix = ` ${colorCode};1m${name} \\u001B[0m`;\n\n\t\targs[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n\t\targs.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\\u001B[0m');\n\t} else {\n\t\targs[0] = getDate() + name + ' ' + args[0];\n\t}\n}\n\nfunction getDate() {\n\tif (exports.inspectOpts.hideDate) {\n\t\treturn '';\n\t}\n\treturn new Date().toISOString() + ' ';\n}\n\n/**\n * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.\n */\n\nfunction log(...args) {\n\treturn process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\tif (namespaces) {\n\t\tprocess.env.DEBUG = namespaces;\n\t} else {\n\t\t// If you set a process.env field to null or undefined, it gets cast to the\n\t\t// string 'null' or 'undefined'. Just delete instead.\n\t\tdelete process.env.DEBUG;\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n\treturn process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nformatters.o = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts)\n\t\t.split('\\n')\n\t\t.map(str => str.trim())\n\t\t.join(' ');\n};\n\n/**\n * Map %O to `util.inspect()`, allowing multiple lines if needed.\n */\n\nformatters.O = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts);\n};\n",
9
- "/**\n * Detect Electron renderer / nwjs process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {\n\tmodule.exports = require('./browser.js');\n} else {\n\tmodule.exports = require('./node.js');\n}\n",
10
- "\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.req = exports.json = exports.toBuffer = void 0;\nconst http = __importStar(require(\"http\"));\nconst https = __importStar(require(\"https\"));\nasync function toBuffer(stream) {\n let length = 0;\n const chunks = [];\n for await (const chunk of stream) {\n length += chunk.length;\n chunks.push(chunk);\n }\n return Buffer.concat(chunks, length);\n}\nexports.toBuffer = toBuffer;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nasync function json(stream) {\n const buf = await toBuffer(stream);\n const str = buf.toString('utf8');\n try {\n return JSON.parse(str);\n }\n catch (_err) {\n const err = _err;\n err.message += ` (input: ${str})`;\n throw err;\n }\n}\nexports.json = json;\nfunction req(url, opts = {}) {\n const href = typeof url === 'string' ? url : url.href;\n const req = (href.startsWith('https:') ? https : http).request(url, opts);\n const promise = new Promise((resolve, reject) => {\n req\n .once('response', resolve)\n .once('error', reject)\n .end();\n });\n req.then = promise.then.bind(promise);\n return req;\n}\nexports.req = req;\n//# sourceMappingURL=helpers.js.map",
11
- "\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Agent = void 0;\nconst net = __importStar(require(\"net\"));\nconst http = __importStar(require(\"http\"));\nconst https_1 = require(\"https\");\n__exportStar(require(\"./helpers\"), exports);\nconst INTERNAL = Symbol('AgentBaseInternalState');\nclass Agent extends http.Agent {\n constructor(opts) {\n super(opts);\n this[INTERNAL] = {};\n }\n /**\n * Determine whether this is an `http` or `https` request.\n */\n isSecureEndpoint(options) {\n if (options) {\n // First check the `secureEndpoint` property explicitly, since this\n // means that a parent `Agent` is \"passing through\" to this instance.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (typeof options.secureEndpoint === 'boolean') {\n return options.secureEndpoint;\n }\n // If no explicit `secure` endpoint, check if `protocol` property is\n // set. This will usually be the case since using a full string URL\n // or `URL` instance should be the most common usage.\n if (typeof options.protocol === 'string') {\n return options.protocol === 'https:';\n }\n }\n // Finally, if no `protocol` property was set, then fall back to\n // checking the stack trace of the current call stack, and try to\n // detect the \"https\" module.\n const { stack } = new Error();\n if (typeof stack !== 'string')\n return false;\n return stack\n .split('\\n')\n .some((l) => l.indexOf('(https.js:') !== -1 ||\n l.indexOf('node:https:') !== -1);\n }\n // In order to support async signatures in `connect()` and Node's native\n // connection pooling in `http.Agent`, the array of sockets for each origin\n // has to be updated synchronously. This is so the length of the array is\n // accurate when `addRequest()` is next called. We achieve this by creating a\n // fake socket and adding it to `sockets[origin]` and incrementing\n // `totalSocketCount`.\n incrementSockets(name) {\n // If `maxSockets` and `maxTotalSockets` are both Infinity then there is no\n // need to create a fake socket because Node.js native connection pooling\n // will never be invoked.\n if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) {\n return null;\n }\n // All instances of `sockets` are expected TypeScript errors. The\n // alternative is to add it as a private property of this class but that\n // will break TypeScript subclassing.\n if (!this.sockets[name]) {\n // @ts-expect-error `sockets` is readonly in `@types/node`\n this.sockets[name] = [];\n }\n const fakeSocket = new net.Socket({ writable: false });\n this.sockets[name].push(fakeSocket);\n // @ts-expect-error `totalSocketCount` isn't defined in `@types/node`\n this.totalSocketCount++;\n return fakeSocket;\n }\n decrementSockets(name, socket) {\n if (!this.sockets[name] || socket === null) {\n return;\n }\n const sockets = this.sockets[name];\n const index = sockets.indexOf(socket);\n if (index !== -1) {\n sockets.splice(index, 1);\n // @ts-expect-error `totalSocketCount` isn't defined in `@types/node`\n this.totalSocketCount--;\n if (sockets.length === 0) {\n // @ts-expect-error `sockets` is readonly in `@types/node`\n delete this.sockets[name];\n }\n }\n }\n // In order to properly update the socket pool, we need to call `getName()` on\n // the core `https.Agent` if it is a secureEndpoint.\n getName(options) {\n const secureEndpoint = this.isSecureEndpoint(options);\n if (secureEndpoint) {\n // @ts-expect-error `getName()` isn't defined in `@types/node`\n return https_1.Agent.prototype.getName.call(this, options);\n }\n // @ts-expect-error `getName()` isn't defined in `@types/node`\n return super.getName(options);\n }\n createSocket(req, options, cb) {\n const connectOpts = {\n ...options,\n secureEndpoint: this.isSecureEndpoint(options),\n };\n const name = this.getName(connectOpts);\n const fakeSocket = this.incrementSockets(name);\n Promise.resolve()\n .then(() => this.connect(req, connectOpts))\n .then((socket) => {\n this.decrementSockets(name, fakeSocket);\n if (socket instanceof http.Agent) {\n try {\n // @ts-expect-error `addRequest()` isn't defined in `@types/node`\n return socket.addRequest(req, connectOpts);\n }\n catch (err) {\n return cb(err);\n }\n }\n this[INTERNAL].currentSocket = socket;\n // @ts-expect-error `createSocket()` isn't defined in `@types/node`\n super.createSocket(req, options, cb);\n }, (err) => {\n this.decrementSockets(name, fakeSocket);\n cb(err);\n });\n }\n createConnection() {\n const socket = this[INTERNAL].currentSocket;\n this[INTERNAL].currentSocket = undefined;\n if (!socket) {\n throw new Error('No socket was returned in the `connect()` function');\n }\n return socket;\n }\n get defaultPort() {\n return (this[INTERNAL].defaultPort ??\n (this.protocol === 'https:' ? 443 : 80));\n }\n set defaultPort(v) {\n if (this[INTERNAL]) {\n this[INTERNAL].defaultPort = v;\n }\n }\n get protocol() {\n return (this[INTERNAL].protocol ??\n (this.isSecureEndpoint() ? 'https:' : 'http:'));\n }\n set protocol(v) {\n if (this[INTERNAL]) {\n this[INTERNAL].protocol = v;\n }\n }\n}\nexports.Agent = Agent;\n//# sourceMappingURL=index.js.map",
12
- "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseProxyResponse = void 0;\nconst debug_1 = __importDefault(require(\"debug\"));\nconst debug = (0, debug_1.default)('https-proxy-agent:parse-proxy-response');\nfunction parseProxyResponse(socket) {\n return new Promise((resolve, reject) => {\n // we need to buffer any HTTP traffic that happens with the proxy before we get\n // the CONNECT response, so that if the response is anything other than an \"200\"\n // response code, then we can re-play the \"data\" events on the socket once the\n // HTTP parser is hooked up...\n let buffersLength = 0;\n const buffers = [];\n function read() {\n const b = socket.read();\n if (b)\n ondata(b);\n else\n socket.once('readable', read);\n }\n function cleanup() {\n socket.removeListener('end', onend);\n socket.removeListener('error', onerror);\n socket.removeListener('readable', read);\n }\n function onend() {\n cleanup();\n debug('onend');\n reject(new Error('Proxy connection ended before receiving CONNECT response'));\n }\n function onerror(err) {\n cleanup();\n debug('onerror %o', err);\n reject(err);\n }\n function ondata(b) {\n buffers.push(b);\n buffersLength += b.length;\n const buffered = Buffer.concat(buffers, buffersLength);\n const endOfHeaders = buffered.indexOf('\\r\\n\\r\\n');\n if (endOfHeaders === -1) {\n // keep buffering\n debug('have not received end of HTTP headers yet...');\n read();\n return;\n }\n const headerParts = buffered\n .slice(0, endOfHeaders)\n .toString('ascii')\n .split('\\r\\n');\n const firstLine = headerParts.shift();\n if (!firstLine) {\n socket.destroy();\n return reject(new Error('No header received from proxy CONNECT response'));\n }\n const firstLineParts = firstLine.split(' ');\n const statusCode = +firstLineParts[1];\n const statusText = firstLineParts.slice(2).join(' ');\n const headers = {};\n for (const header of headerParts) {\n if (!header)\n continue;\n const firstColon = header.indexOf(':');\n if (firstColon === -1) {\n socket.destroy();\n return reject(new Error(`Invalid header from proxy CONNECT response: \"${header}\"`));\n }\n const key = header.slice(0, firstColon).toLowerCase();\n const value = header.slice(firstColon + 1).trimStart();\n const current = headers[key];\n if (typeof current === 'string') {\n headers[key] = [current, value];\n }\n else if (Array.isArray(current)) {\n current.push(value);\n }\n else {\n headers[key] = value;\n }\n }\n debug('got proxy server response: %o %o', firstLine, headers);\n cleanup();\n resolve({\n connect: {\n statusCode,\n statusText,\n headers,\n },\n buffered,\n });\n }\n socket.on('error', onerror);\n socket.on('end', onend);\n read();\n });\n}\nexports.parseProxyResponse = parseProxyResponse;\n//# sourceMappingURL=parse-proxy-response.js.map",
13
- "\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HttpsProxyAgent = void 0;\nconst net = __importStar(require(\"net\"));\nconst tls = __importStar(require(\"tls\"));\nconst assert_1 = __importDefault(require(\"assert\"));\nconst debug_1 = __importDefault(require(\"debug\"));\nconst agent_base_1 = require(\"agent-base\");\nconst url_1 = require(\"url\");\nconst parse_proxy_response_1 = require(\"./parse-proxy-response\");\nconst debug = (0, debug_1.default)('https-proxy-agent');\nconst setServernameFromNonIpHost = (options) => {\n if (options.servername === undefined &&\n options.host &&\n !net.isIP(options.host)) {\n return {\n ...options,\n servername: options.host,\n };\n }\n return options;\n};\n/**\n * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to\n * the specified \"HTTP(s) proxy server\" in order to proxy HTTPS requests.\n *\n * Outgoing HTTP requests are first tunneled through the proxy server using the\n * `CONNECT` HTTP request method to establish a connection to the proxy server,\n * and then the proxy server connects to the destination target and issues the\n * HTTP request from the proxy server.\n *\n * `https:` requests have their socket connection upgraded to TLS once\n * the connection to the proxy server has been established.\n */\nclass HttpsProxyAgent extends agent_base_1.Agent {\n constructor(proxy, opts) {\n super(opts);\n this.options = { path: undefined };\n this.proxy = typeof proxy === 'string' ? new url_1.URL(proxy) : proxy;\n this.proxyHeaders = opts?.headers ?? {};\n debug('Creating new HttpsProxyAgent instance: %o', this.proxy.href);\n // Trim off the brackets from IPv6 addresses\n const host = (this.proxy.hostname || this.proxy.host).replace(/^\\[|\\]$/g, '');\n const port = this.proxy.port\n ? parseInt(this.proxy.port, 10)\n : this.proxy.protocol === 'https:'\n ? 443\n : 80;\n this.connectOpts = {\n // Attempt to negotiate http/1.1 for proxy servers that support http/2\n ALPNProtocols: ['http/1.1'],\n ...(opts ? omit(opts, 'headers') : null),\n host,\n port,\n };\n }\n /**\n * Called when the node-core HTTP client library is creating a\n * new HTTP request.\n */\n async connect(req, opts) {\n const { proxy } = this;\n if (!opts.host) {\n throw new TypeError('No \"host\" provided');\n }\n // Create a socket connection to the proxy server.\n let socket;\n if (proxy.protocol === 'https:') {\n debug('Creating `tls.Socket`: %o', this.connectOpts);\n socket = tls.connect(setServernameFromNonIpHost(this.connectOpts));\n }\n else {\n debug('Creating `net.Socket`: %o', this.connectOpts);\n socket = net.connect(this.connectOpts);\n }\n const headers = typeof this.proxyHeaders === 'function'\n ? this.proxyHeaders()\n : { ...this.proxyHeaders };\n const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host;\n let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\\r\\n`;\n // Inject the `Proxy-Authorization` header if necessary.\n if (proxy.username || proxy.password) {\n const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`;\n headers['Proxy-Authorization'] = `Basic ${Buffer.from(auth).toString('base64')}`;\n }\n headers.Host = `${host}:${opts.port}`;\n if (!headers['Proxy-Connection']) {\n headers['Proxy-Connection'] = this.keepAlive\n ? 'Keep-Alive'\n : 'close';\n }\n for (const name of Object.keys(headers)) {\n payload += `${name}: ${headers[name]}\\r\\n`;\n }\n const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket);\n socket.write(`${payload}\\r\\n`);\n const { connect, buffered } = await proxyResponsePromise;\n req.emit('proxyConnect', connect);\n this.emit('proxyConnect', connect, req);\n if (connect.statusCode === 200) {\n req.once('socket', resume);\n if (opts.secureEndpoint) {\n // The proxy is connecting to a TLS server, so upgrade\n // this socket connection to a TLS connection.\n debug('Upgrading socket connection to TLS');\n return tls.connect({\n ...omit(setServernameFromNonIpHost(opts), 'host', 'path', 'port'),\n socket,\n });\n }\n return socket;\n }\n // Some other status code that's not 200... need to re-play the HTTP\n // header \"data\" events onto the socket once the HTTP machinery is\n // attached so that the node core `http` can parse and handle the\n // error status code.\n // Close the original socket, and a new \"fake\" socket is returned\n // instead, so that the proxy doesn't get the HTTP request\n // written to it (which may contain `Authorization` headers or other\n // sensitive data).\n //\n // See: https://hackerone.com/reports/541502\n socket.destroy();\n const fakeSocket = new net.Socket({ writable: false });\n fakeSocket.readable = true;\n // Need to wait for the \"socket\" event to re-play the \"data\" events.\n req.once('socket', (s) => {\n debug('Replaying proxy buffer for failed request');\n (0, assert_1.default)(s.listenerCount('data') > 0);\n // Replay the \"buffered\" Buffer onto the fake `socket`, since at\n // this point the HTTP module machinery has been hooked up for\n // the user.\n s.push(buffered);\n s.push(null);\n });\n return fakeSocket;\n }\n}\nHttpsProxyAgent.protocols = ['http', 'https'];\nexports.HttpsProxyAgent = HttpsProxyAgent;\nfunction resume(socket) {\n socket.resume();\n}\nfunction omit(obj, ...keys) {\n const ret = {};\n let key;\n for (key in obj) {\n if (!keys.includes(key)) {\n ret[key] = obj[key];\n }\n }\n return ret;\n}\n//# sourceMappingURL=index.js.map"
14
- ],
15
- "mappings": ";gEAIA,IAAI,EAAI,KACJ,EAAI,EAAI,GACR,EAAI,EA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AAO,EAChC,KAAK,KAAK,eAAgB,EAAS,CAAG,EAClC,EAAQ,aAAe,IAAK,CAE5B,GADA,EAAI,KAAK,SAAU,EAAM,EACrB,EAAK,eAIL,OADA,EAAM,oCAAoC,EACnC,GAAI,QAAQ,IACZ,GAAK,GAA2B,CAAI,EAAG,OAAQ,OAAQ,MAAM,EAChE,QACJ,CAAC,EAEL,OAAO,EAYX,EAAO,QAAQ,EACf,IAAM,EAAa,IAAI,EAAI,OAAO,CAAE,SAAU,EAAM,CAAC,EAYrD,OAXA,EAAW,SAAW,GAEtB,EAAI,KAAK,SAAU,CAAC,IAAM,CACtB,EAAM,2CAA2C,GAChD,EAAG,GAAS,SAAS,EAAE,cAAc,MAAM,EAAI,CAAC,EAIjD,EAAE,KAAK,CAAQ,EACf,EAAE,KAAK,IAAI,EACd,EACM,EAEf,CACA,EAAgB,UAAY,CAAC,OAAQ,OAAO,EAC5C,EAAQ,gBAAkB,EAC1B,SAAS,EAAM,CAAC,EAAQ,CACpB,EAAO,OAAO,EAElB,SAAS,EAAI,CAAC,KAAQ,EAAM,CACxB,IAAM,EAAM,CAAC,EACT,EACJ,IAAK,KAAO,EACR,GAAI,CAAC,EAAK,SAAS,CAAG,EAClB,EAAI,GAAO,EAAI,GAGvB,OAAO",
16
- "debugId": "FDB18E8C4EC27F9464756E2164756E21",
17
- "names": []
18
- }
@@ -1,7 +0,0 @@
1
- // @bun
2
- import"./index-9gky9qct.js";import P from"process";import $H from"path";import{fileURLToPath as AH}from"url";import fH from"child_process";import gH,{constants as bH}from"fs/promises";import{promisify as NH}from"util";import RH from"child_process";import C,{constants as a}from"fs/promises";import h from"process";import ZH from"os";import I from"fs";import QH from"fs";import u from"fs";var W;function JH(){try{return u.statSync("/.dockerenv"),!0}catch{return!1}}function KH(){try{return u.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function k(){if(W===void 0)W=JH()||KH();return W}var j,VH=()=>{try{return QH.statSync("/run/.containerenv"),!0}catch{return!1}};function R(){if(j===void 0)j=VH()||k();return j}var m=()=>{if(h.platform!=="linux")return!1;if(ZH.release().toLowerCase().includes("microsoft")){if(R())return!1;return!0}try{if(I.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft"))return!R()}catch{}if(I.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")||I.existsSync("/run/WSL"))return!R();return!1},E=h.env.__IS_WSL_TEST__?m:m();import d from"process";import{Buffer as qH}from"buffer";import{promisify as GH}from"util";import TH from"child_process";var EH=GH(TH.execFile),B=()=>`${d.env.SYSTEMROOT||d.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;var G=async(H,Y={})=>{let{powerShellPath:$,...J}=Y,K=G.encodeCommand(H);return EH($??B(),[...G.argumentsPrefix,K],{encoding:"utf8",...J})};G.argumentsPrefix=["-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand"];G.encodeCommand=(H)=>qH.from(H,"utf16le").toString("base64");G.escapeArgument=(H)=>`'${String(H).replaceAll("'","''")}'`;function l(H){for(let Y of H.split(`
3
- `)){if(/^\s*#/.test(Y))continue;let $=/^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(Y);if(!$)continue;return $.groups.mountPoint.trim().replaceAll(/^["']|["']$/g,"")}}var XH=NH(RH.execFile),MH=(()=>{let Y;return async function(){if(Y)return Y;let $="/etc/wsl.conf",J=!1;try{await C.access($,a.F_OK),J=!0}catch{}if(!J)return"/mnt/";let K=await C.readFile($,{encoding:"utf8"}),V=l(K);if(V===void 0)return"/mnt/";return Y=V,Y=Y.endsWith("/")?Y:`${Y}/`,Y}})(),vH=async()=>{return`${await MH()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`},D=E?vH:B,c,p=async()=>{return c??=(async()=>{try{let H=await D();return await C.access(H,a.X_OK),!0}catch{return!1}})(),c},r=async()=>{let H=await D(),Y=String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`,{stdout:$}=await G(Y,{powerShellPath:H});return $.trim()},i=async(H)=>{if(/^[a-z]+:\/\//i.test(H))return H;try{let{stdout:Y}=await XH("wslpath",["-aw",H],{encoding:"utf8"});return Y.trim()}catch{return H}};function X(H,Y,$){let J=(K)=>Object.defineProperty(H,Y,{value:K,enumerable:!0,writable:!0});return Object.defineProperty(H,Y,{configurable:!0,enumerable:!0,get(){let K=$();return J(K),K},set(K){J(K)}}),H}import{promisify as IH}from"util";import f from"process";import{execFile as BH}from"child_process";import{promisify as zH}from"util";import LH from"process";import{execFile as UH}from"child_process";var _H=zH(UH);async function x(){if(LH.platform!=="darwin")throw Error("macOS only");let{stdout:H}=await _H("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]),$=/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(H)?.groups.id??"com.apple.Safari";if($==="com.apple.safari")return"com.apple.Safari";return $}import DH from"process";import{promisify as OH}from"util";import{execFile as FH,execFileSync as z0}from"child_process";var SH=OH(FH);async function t(H,{humanReadableOutput:Y=!0,signal:$}={}){if(DH.platform!=="darwin")throw Error("macOS only");let J=Y?[]:["-ss"],K={};if($)K.signal=$;let{stdout:V}=await SH("osascript",["-e",H,J],K);return V.trim()}async function y(H){return t(`tell application "Finder" to set app_path to application file id "${H}" as string
4
- tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}import{promisify as WH}from"util";import{execFile as kH}from"child_process";var jH=WH(kH),O={MSEdgeHTM:{name:"Edge",id:"com.microsoft.edge"},MSEdgeBHTML:{name:"Edge Beta",id:"com.microsoft.edge.beta"},MSEdgeDHTML:{name:"Edge Dev",id:"com.microsoft.edge.dev"},AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:"Edge",id:"com.microsoft.edge.old"},ChromeHTML:{name:"Chrome",id:"com.google.chrome"},ChromeBHTML:{name:"Chrome Beta",id:"com.google.chrome.beta"},ChromeDHTML:{name:"Chrome Dev",id:"com.google.chrome.dev"},ChromiumHTM:{name:"Chromium",id:"org.chromium.Chromium"},BraveHTML:{name:"Brave",id:"com.brave.Browser"},BraveBHTML:{name:"Brave Beta",id:"com.brave.Browser.beta"},BraveDHTML:{name:"Brave Dev",id:"com.brave.Browser.dev"},BraveSSHTM:{name:"Brave Nightly",id:"com.brave.Browser.nightly"},FirefoxURL:{name:"Firefox",id:"org.mozilla.firefox"},OperaStable:{name:"Opera",id:"com.operasoftware.Opera"},VivaldiHTM:{name:"Vivaldi",id:"com.vivaldi.Vivaldi"},"IE.HTTP":{name:"Internet Explorer",id:"com.microsoft.ie"}},F=new Map(Object.entries(O));class n extends Error{}async function A(H=jH){let{stdout:Y}=await H("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]),$=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(Y);if(!$)throw new n(`Cannot find Windows browser in stdout: ${JSON.stringify(Y)}`);let{id:J}=$.groups,K=J.lastIndexOf("."),V=J.lastIndexOf("-"),N=K===-1?void 0:J.slice(0,K),_=V===-1?void 0:J.slice(0,V);return O[J]??O[N]??O[_]??{name:J,id:J}}var CH=IH(BH),xH=(H)=>H.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,(Y)=>Y.toUpperCase());async function g(){if(f.platform==="darwin"){let H=await x();return{name:await y(H),id:H}}if(f.platform==="linux"){let{stdout:H}=await CH("xdg-mime",["query","default","x-scheme-handler/http"]),Y=H.trim();return{name:xH(Y.replace(/.desktop$/,"").replace("-"," ")),id:Y}}if(f.platform==="win32")return A();throw Error("Only macOS, Linux, and Windows are supported")}import b from"process";var yH=Boolean(b.env.SSH_CONNECTION||b.env.SSH_CLIENT||b.env.SSH_TTY),o=yH;var S=Symbol("fallbackAttempt"),w=import.meta.url?$H.dirname(AH(import.meta.url)):"",s=$H.join(w,"xdg-open"),{platform:M,arch:e}=P,HH=async(H,Y)=>{if(H.length===0)return;let $=[];for(let J of H)try{return await Y(J)}catch(K){$.push(K)}throw AggregateError($,"Failed to open in all supported apps")},L=async(H)=>{H={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...H};let Y=H[S]===!0;if(delete H[S],Array.isArray(H.app))return HH(H.app,(Q)=>L({...H,app:Q,[S]:!0}));let{name:$,arguments:J=[]}=H.app??{};if(J=[...J],Array.isArray($))return HH($,(Q)=>L({...H,app:{name:Q,arguments:J},[S]:!0}));if($==="browser"||$==="browserPrivate"){let Q={"com.google.chrome":"chrome","google-chrome.desktop":"chrome","com.brave.browser":"brave","org.mozilla.firefox":"firefox","firefox.desktop":"firefox","com.microsoft.msedge":"edge","com.microsoft.edge":"edge","com.microsoft.edgemac":"edge","microsoft-edge.desktop":"edge","com.apple.safari":"safari"},Z={chrome:"--incognito",brave:"--incognito",firefox:"--private-window",edge:"--inPrivate"},T;if(E){let z=await r();T=F.get(z)??{}}else T=await g();if(T.id in Q){let z=Q[T.id.toLowerCase()];if($==="browserPrivate"){if(z==="safari")throw Error("Safari doesn't support opening in private mode via command line");J.push(Z[z])}return L({...H,app:{name:v[z],arguments:J}})}throw Error(`${T.name} is not supported as a default browser`)}let K,V=[],N={},_=!1;if(E&&!R()&&!o&&!$)_=await p();if(M==="darwin"){if(K="open",H.wait)V.push("--wait-apps");if(H.background)V.push("--background");if(H.newInstance)V.push("--new");if($)V.push("-a",$)}else if(M==="win32"||_){if(K=await D(),V.push(...G.argumentsPrefix),!E)N.windowsVerbatimArguments=!0;if(E&&H.target)H.target=await i(H.target);let Q=["$ProgressPreference = 'SilentlyContinue';","Start"];if(H.wait)Q.push("-Wait");if($){if(Q.push(G.escapeArgument($)),H.target)J.push(H.target)}else if(H.target)Q.push(G.escapeArgument(H.target));if(J.length>0)J=J.map((Z)=>G.escapeArgument(Z)),Q.push("-ArgumentList",J.join(","));if(H.target=G.encodeCommand(Q.join(" ")),!H.wait)N.stdio="ignore"}else{if($)K=$;else{let Q=!w||w==="/",Z=!1;try{await gH.access(s,bH.X_OK),Z=!0}catch{}K=P.versions.electron??(M==="android"||Q||!Z)?"xdg-open":s}if(J.length>0)V.push(...J);if(!H.wait)N.stdio="ignore",N.detached=!0}if(M==="darwin"&&J.length>0)V.push("--args",...J);if(H.target)V.push(H.target);let q=fH.spawn(K,V,N);if(H.wait)return new Promise((Q,Z)=>{q.once("error",Z),q.once("close",(T)=>{if(!H.allowNonzeroExitCode&&T!==0){Z(Error(`Exited with code ${T}`));return}Q(q)})});if(Y)return new Promise((Q,Z)=>{q.once("error",Z),q.once("spawn",()=>{q.once("close",(T)=>{if(q.off("error",Z),T!==0){Z(Error(`Exited with code ${T}`));return}q.unref(),Q(q)})})});return q.unref(),new Promise((Q,Z)=>{q.once("error",Z),q.once("spawn",()=>{q.off("error",Z),Q(q)})})},PH=(H,Y)=>{if(typeof H!=="string")throw TypeError("Expected a `target`");return L({...Y,target:H})},a0=(H,Y)=>{if(typeof H!=="string"&&!Array.isArray(H))throw TypeError("Expected a valid `name`");let{arguments:$=[]}=Y??{};if($!==void 0&&$!==null&&!Array.isArray($))throw TypeError("Expected `appArguments` as Array type");return L({...Y,app:{name:H,arguments:$}})};function YH(H){if(typeof H==="string"||Array.isArray(H))return H;let{[e]:Y}=H;if(!Y)throw Error(`${e} is not supported`);return Y}function U({[M]:H},{wsl:Y}={}){if(Y&&E)return YH(Y);if(!H)throw Error(`${M} is not supported`);return YH(H)}var v={browser:"browser",browserPrivate:"browserPrivate"};X(v,"chrome",()=>U({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium","chromium-browser"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));X(v,"brave",()=>U({darwin:"brave browser",win32:"brave",linux:["brave-browser","brave"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",x64:["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe","/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]}}));X(v,"firefox",()=>U({darwin:"firefox",win32:String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));X(v,"edge",()=>U({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));X(v,"safari",()=>U({darwin:"Safari"}));var r0=PH;export{a0 as openApp,r0 as default,v as apps};
5
-
6
- //# debugId=75475970ABD6F78C64756E2164756E21
7
- //# sourceMappingURL=index-rc4npgpx.js.map
@@ -1,23 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../node_modules/open/index.js", "../node_modules/wsl-utils/index.js", "../node_modules/is-wsl/index.js", "../node_modules/is-inside-container/index.js", "../node_modules/is-docker/index.js", "../node_modules/powershell-utils/index.js", "../node_modules/wsl-utils/utilities.js", "../node_modules/define-lazy-prop/index.js", "../node_modules/default-browser/index.js", "../node_modules/default-browser-id/index.js", "../node_modules/run-applescript/index.js", "../node_modules/bundle-name/index.js", "../node_modules/default-browser/windows.js", "../node_modules/is-in-ssh/index.js"],
4
- "sourcesContent": [
5
- "import process from 'node:process';\nimport path from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport childProcess from 'node:child_process';\nimport fs, {constants as fsConstants} from 'node:fs/promises';\nimport {\n\tisWsl,\n\tpowerShellPath,\n\tconvertWslPathToWindows,\n\tcanAccessPowerShell,\n\twslDefaultBrowser,\n} from 'wsl-utils';\nimport {executePowerShell} from 'powershell-utils';\nimport defineLazyProperty from 'define-lazy-prop';\nimport defaultBrowser, {_windowsBrowserProgIdMap} from 'default-browser';\nimport isInsideContainer from 'is-inside-container';\nimport isInSsh from 'is-in-ssh';\n\nconst fallbackAttemptSymbol = Symbol('fallbackAttempt');\n\n// Path to included `xdg-open`.\nconst __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : '';\nconst localXdgOpenPath = path.join(__dirname, 'xdg-open');\n\nconst {platform, arch} = process;\n\nconst tryEachApp = async (apps, opener) => {\n\tif (apps.length === 0) {\n\t\t// No app was provided\n\t\treturn;\n\t}\n\n\tconst errors = [];\n\n\tfor (const app of apps) {\n\t\ttry {\n\t\t\treturn await opener(app); // eslint-disable-line no-await-in-loop\n\t\t} catch (error) {\n\t\t\terrors.push(error);\n\t\t}\n\t}\n\n\tthrow new AggregateError(errors, 'Failed to open in all supported apps');\n};\n\n// eslint-disable-next-line complexity\nconst baseOpen = async options => {\n\toptions = {\n\t\twait: false,\n\t\tbackground: false,\n\t\tnewInstance: false,\n\t\tallowNonzeroExitCode: false,\n\t\t...options,\n\t};\n\n\tconst isFallbackAttempt = options[fallbackAttemptSymbol] === true;\n\tdelete options[fallbackAttemptSymbol];\n\n\tif (Array.isArray(options.app)) {\n\t\treturn tryEachApp(options.app, singleApp => baseOpen({\n\t\t\t...options,\n\t\t\tapp: singleApp,\n\t\t\t[fallbackAttemptSymbol]: true,\n\t\t}));\n\t}\n\n\tlet {name: app, arguments: appArguments = []} = options.app ?? {};\n\tappArguments = [...appArguments];\n\n\tif (Array.isArray(app)) {\n\t\treturn tryEachApp(app, appName => baseOpen({\n\t\t\t...options,\n\t\t\tapp: {\n\t\t\t\tname: appName,\n\t\t\t\targuments: appArguments,\n\t\t\t},\n\t\t\t[fallbackAttemptSymbol]: true,\n\t\t}));\n\t}\n\n\tif (app === 'browser' || app === 'browserPrivate') {\n\t\t// IDs from default-browser for macOS and windows are the same.\n\t\t// IDs are lowercased to increase chances of a match.\n\t\tconst ids = {\n\t\t\t'com.google.chrome': 'chrome',\n\t\t\t'google-chrome.desktop': 'chrome',\n\t\t\t'com.brave.browser': 'brave',\n\t\t\t'org.mozilla.firefox': 'firefox',\n\t\t\t'firefox.desktop': 'firefox',\n\t\t\t'com.microsoft.msedge': 'edge',\n\t\t\t'com.microsoft.edge': 'edge',\n\t\t\t'com.microsoft.edgemac': 'edge',\n\t\t\t'microsoft-edge.desktop': 'edge',\n\t\t\t'com.apple.safari': 'safari',\n\t\t};\n\n\t\t// Incognito flags for each browser in `apps`.\n\t\tconst flags = {\n\t\t\tchrome: '--incognito',\n\t\t\tbrave: '--incognito',\n\t\t\tfirefox: '--private-window',\n\t\t\tedge: '--inPrivate',\n\t\t\t// Safari doesn't support private mode via command line\n\t\t};\n\n\t\tlet browser;\n\t\tif (isWsl) {\n\t\t\tconst progId = await wslDefaultBrowser();\n\t\t\tconst browserInfo = _windowsBrowserProgIdMap.get(progId);\n\t\t\tbrowser = browserInfo ?? {};\n\t\t} else {\n\t\t\tbrowser = await defaultBrowser();\n\t\t}\n\n\t\tif (browser.id in ids) {\n\t\t\tconst browserName = ids[browser.id.toLowerCase()];\n\n\t\t\tif (app === 'browserPrivate') {\n\t\t\t\t// Safari doesn't support private mode via command line\n\t\t\t\tif (browserName === 'safari') {\n\t\t\t\t\tthrow new Error('Safari doesn\\'t support opening in private mode via command line');\n\t\t\t\t}\n\n\t\t\t\tappArguments.push(flags[browserName]);\n\t\t\t}\n\n\t\t\treturn baseOpen({\n\t\t\t\t...options,\n\t\t\t\tapp: {\n\t\t\t\t\tname: apps[browserName],\n\t\t\t\t\targuments: appArguments,\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\tthrow new Error(`${browser.name} is not supported as a default browser`);\n\t}\n\n\tlet command;\n\tconst cliArguments = [];\n\tconst childProcessOptions = {};\n\n\t// Determine if we should use Windows/PowerShell behavior in WSL.\n\t// We only use Windows integration if PowerShell is actually accessible.\n\t// This allows the package to work in sandboxed WSL environments where Windows access is restricted.\n\tlet shouldUseWindowsInWsl = false;\n\tif (isWsl && !isInsideContainer() && !isInSsh && !app) {\n\t\tshouldUseWindowsInWsl = await canAccessPowerShell();\n\t}\n\n\tif (platform === 'darwin') {\n\t\tcommand = 'open';\n\n\t\tif (options.wait) {\n\t\t\tcliArguments.push('--wait-apps');\n\t\t}\n\n\t\tif (options.background) {\n\t\t\tcliArguments.push('--background');\n\t\t}\n\n\t\tif (options.newInstance) {\n\t\t\tcliArguments.push('--new');\n\t\t}\n\n\t\tif (app) {\n\t\t\tcliArguments.push('-a', app);\n\t\t}\n\t} else if (platform === 'win32' || shouldUseWindowsInWsl) {\n\t\tcommand = await powerShellPath();\n\n\t\tcliArguments.push(...executePowerShell.argumentsPrefix);\n\n\t\tif (!isWsl) {\n\t\t\tchildProcessOptions.windowsVerbatimArguments = true;\n\t\t}\n\n\t\t// Convert WSL Linux paths to Windows paths\n\t\tif (isWsl && options.target) {\n\t\t\toptions.target = await convertWslPathToWindows(options.target);\n\t\t}\n\n\t\t// Suppress PowerShell progress messages that are written to stderr\n\t\tconst encodedArguments = ['$ProgressPreference = \\'SilentlyContinue\\';', 'Start'];\n\n\t\tif (options.wait) {\n\t\t\tencodedArguments.push('-Wait');\n\t\t}\n\n\t\tif (app) {\n\t\t\tencodedArguments.push(executePowerShell.escapeArgument(app));\n\t\t\tif (options.target) {\n\t\t\t\tappArguments.push(options.target);\n\t\t\t}\n\t\t} else if (options.target) {\n\t\t\tencodedArguments.push(executePowerShell.escapeArgument(options.target));\n\t\t}\n\n\t\tif (appArguments.length > 0) {\n\t\t\tappArguments = appArguments.map(argument => executePowerShell.escapeArgument(argument));\n\t\t\tencodedArguments.push('-ArgumentList', appArguments.join(','));\n\t\t}\n\n\t\t// Using Base64-encoded command, accepted by PowerShell, to allow special characters.\n\t\toptions.target = executePowerShell.encodeCommand(encodedArguments.join(' '));\n\n\t\tif (!options.wait) {\n\t\t\t// PowerShell will keep the parent process alive unless stdio is ignored.\n\t\t\tchildProcessOptions.stdio = 'ignore';\n\t\t}\n\t} else {\n\t\tif (app) {\n\t\t\tcommand = app;\n\t\t} else {\n\t\t\t// When bundled by Webpack, there's no actual package file path and no local `xdg-open`.\n\t\t\tconst isBundled = !__dirname || __dirname === '/';\n\n\t\t\t// Check if local `xdg-open` exists and is executable.\n\t\t\tlet exeLocalXdgOpen = false;\n\t\t\ttry {\n\t\t\t\tawait fs.access(localXdgOpenPath, fsConstants.X_OK);\n\t\t\t\texeLocalXdgOpen = true;\n\t\t\t} catch {}\n\n\t\t\tconst useSystemXdgOpen = process.versions.electron\n\t\t\t\t?? (platform === 'android' || isBundled || !exeLocalXdgOpen);\n\t\t\tcommand = useSystemXdgOpen ? 'xdg-open' : localXdgOpenPath;\n\t\t}\n\n\t\tif (appArguments.length > 0) {\n\t\t\tcliArguments.push(...appArguments);\n\t\t}\n\n\t\tif (!options.wait) {\n\t\t\t// `xdg-open` will block the process unless stdio is ignored\n\t\t\t// and it's detached from the parent even if it's unref'd.\n\t\t\tchildProcessOptions.stdio = 'ignore';\n\t\t\tchildProcessOptions.detached = true;\n\t\t}\n\t}\n\n\tif (platform === 'darwin' && appArguments.length > 0) {\n\t\tcliArguments.push('--args', ...appArguments);\n\t}\n\n\t// IMPORTANT: On macOS, the target MUST come AFTER '--args'.\n\t// When using --args, ALL following arguments are passed to the app.\n\t// Example: open -a \"chrome\" --args --incognito https://site.com\n\t// This passes BOTH --incognito AND https://site.com to Chrome.\n\t// Without this order, Chrome won't open in incognito. See #332.\n\tif (options.target) {\n\t\tcliArguments.push(options.target);\n\t}\n\n\tconst subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);\n\n\tif (options.wait) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tsubprocess.once('error', reject);\n\n\t\t\tsubprocess.once('close', exitCode => {\n\t\t\t\tif (!options.allowNonzeroExitCode && exitCode !== 0) {\n\t\t\t\t\treject(new Error(`Exited with code ${exitCode}`));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tresolve(subprocess);\n\t\t\t});\n\t\t});\n\t}\n\n\t// When we're in a fallback attempt, we need to detect launch failures before trying the next app.\n\t// Wait for the close event to check the exit code before unreffing.\n\t// The launcher (open/xdg-open/PowerShell) exits quickly (~10-30ms) even on success.\n\tif (isFallbackAttempt) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tsubprocess.once('error', reject);\n\n\t\t\tsubprocess.once('spawn', () => {\n\t\t\t\t// Keep error handler active for post-spawn errors\n\t\t\t\tsubprocess.once('close', exitCode => {\n\t\t\t\t\tsubprocess.off('error', reject);\n\n\t\t\t\t\tif (exitCode !== 0) {\n\t\t\t\t\t\treject(new Error(`Exited with code ${exitCode}`));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tsubprocess.unref();\n\t\t\t\t\tresolve(subprocess);\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\tsubprocess.unref();\n\n\t// Handle spawn errors before the caller can attach listeners.\n\t// This prevents unhandled error events from crashing the process.\n\treturn new Promise((resolve, reject) => {\n\t\tsubprocess.once('error', reject);\n\n\t\t// Wait for the subprocess to spawn before resolving.\n\t\t// This ensures the process is established before the caller continues,\n\t\t// preventing issues when process.exit() is called immediately after.\n\t\tsubprocess.once('spawn', () => {\n\t\t\tsubprocess.off('error', reject);\n\t\t\tresolve(subprocess);\n\t\t});\n\t});\n};\n\nconst open = (target, options) => {\n\tif (typeof target !== 'string') {\n\t\tthrow new TypeError('Expected a `target`');\n\t}\n\n\treturn baseOpen({\n\t\t...options,\n\t\ttarget,\n\t});\n};\n\nexport const openApp = (name, options) => {\n\tif (typeof name !== 'string' && !Array.isArray(name)) {\n\t\tthrow new TypeError('Expected a valid `name`');\n\t}\n\n\tconst {arguments: appArguments = []} = options ?? {};\n\tif (appArguments !== undefined && appArguments !== null && !Array.isArray(appArguments)) {\n\t\tthrow new TypeError('Expected `appArguments` as Array type');\n\t}\n\n\treturn baseOpen({\n\t\t...options,\n\t\tapp: {\n\t\t\tname,\n\t\t\targuments: appArguments,\n\t\t},\n\t});\n};\n\nfunction detectArchBinary(binary) {\n\tif (typeof binary === 'string' || Array.isArray(binary)) {\n\t\treturn binary;\n\t}\n\n\tconst {[arch]: archBinary} = binary;\n\n\tif (!archBinary) {\n\t\tthrow new Error(`${arch} is not supported`);\n\t}\n\n\treturn archBinary;\n}\n\nfunction detectPlatformBinary({[platform]: platformBinary}, {wsl} = {}) {\n\tif (wsl && isWsl) {\n\t\treturn detectArchBinary(wsl);\n\t}\n\n\tif (!platformBinary) {\n\t\tthrow new Error(`${platform} is not supported`);\n\t}\n\n\treturn detectArchBinary(platformBinary);\n}\n\nexport const apps = {\n\tbrowser: 'browser',\n\tbrowserPrivate: 'browserPrivate',\n};\n\ndefineLazyProperty(apps, 'chrome', () => detectPlatformBinary({\n\tdarwin: 'google chrome',\n\twin32: 'chrome',\n\t// `chromium-browser` is the older deb package name used by Ubuntu/Debian before snap.\n\tlinux: ['google-chrome', 'google-chrome-stable', 'chromium', 'chromium-browser'],\n}, {\n\twsl: {\n\t\tia32: '/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe',\n\t\tx64: ['/mnt/c/Program Files/Google/Chrome/Application/chrome.exe', '/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe'],\n\t},\n}));\n\ndefineLazyProperty(apps, 'brave', () => detectPlatformBinary({\n\tdarwin: 'brave browser',\n\twin32: 'brave',\n\tlinux: ['brave-browser', 'brave'],\n}, {\n\twsl: {\n\t\tia32: '/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe',\n\t\tx64: ['/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe', '/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe'],\n\t},\n}));\n\ndefineLazyProperty(apps, 'firefox', () => detectPlatformBinary({\n\tdarwin: 'firefox',\n\twin32: String.raw`C:\\Program Files\\Mozilla Firefox\\firefox.exe`,\n\tlinux: 'firefox',\n}, {\n\twsl: '/mnt/c/Program Files/Mozilla Firefox/firefox.exe',\n}));\n\ndefineLazyProperty(apps, 'edge', () => detectPlatformBinary({\n\tdarwin: 'microsoft edge',\n\twin32: 'msedge',\n\tlinux: ['microsoft-edge', 'microsoft-edge-dev'],\n}, {\n\twsl: '/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe',\n}));\n\ndefineLazyProperty(apps, 'safari', () => detectPlatformBinary({\n\tdarwin: 'Safari',\n}));\n\nexport default open;\n",
6
- "import {promisify} from 'node:util';\nimport childProcess from 'node:child_process';\nimport fs, {constants as fsConstants} from 'node:fs/promises';\nimport isWsl from 'is-wsl';\nimport {powerShellPath as windowsPowerShellPath, executePowerShell} from 'powershell-utils';\nimport {parseMountPointFromConfig} from './utilities.js';\n\nconst execFile = promisify(childProcess.execFile);\n\nexport const wslDrivesMountPoint = (() => {\n\t// Default value for \"root\" param\n\t// according to https://docs.microsoft.com/en-us/windows/wsl/wsl-config\n\tconst defaultMountPoint = '/mnt/';\n\n\tlet mountPoint;\n\n\treturn async function () {\n\t\tif (mountPoint) {\n\t\t\t// Return memoized mount point value\n\t\t\treturn mountPoint;\n\t\t}\n\n\t\tconst configFilePath = '/etc/wsl.conf';\n\n\t\tlet isConfigFileExists = false;\n\t\ttry {\n\t\t\tawait fs.access(configFilePath, fsConstants.F_OK);\n\t\t\tisConfigFileExists = true;\n\t\t} catch {}\n\n\t\tif (!isConfigFileExists) {\n\t\t\treturn defaultMountPoint;\n\t\t}\n\n\t\tconst configContent = await fs.readFile(configFilePath, {encoding: 'utf8'});\n\t\tconst parsedMountPoint = parseMountPointFromConfig(configContent);\n\n\t\tif (parsedMountPoint === undefined) {\n\t\t\treturn defaultMountPoint;\n\t\t}\n\n\t\tmountPoint = parsedMountPoint;\n\t\tmountPoint = mountPoint.endsWith('/') ? mountPoint : `${mountPoint}/`;\n\n\t\treturn mountPoint;\n\t};\n})();\n\nexport const powerShellPathFromWsl = async () => {\n\tconst mountPoint = await wslDrivesMountPoint();\n\treturn `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;\n};\n\nexport const powerShellPath = isWsl ? powerShellPathFromWsl : windowsPowerShellPath;\n\n// Cache for PowerShell accessibility check\nlet canAccessPowerShellPromise;\n\nexport const canAccessPowerShell = async () => {\n\tcanAccessPowerShellPromise ??= (async () => {\n\t\ttry {\n\t\t\tconst psPath = await powerShellPath();\n\t\t\tawait fs.access(psPath, fsConstants.X_OK);\n\t\t\treturn true;\n\t\t} catch {\n\t\t\t// PowerShell is not accessible (either doesn't exist, no execute permission, or other error)\n\t\t\treturn false;\n\t\t}\n\t})();\n\n\treturn canAccessPowerShellPromise;\n};\n\nexport const wslDefaultBrowser = async () => {\n\tconst psPath = await powerShellPath();\n\tconst command = String.raw`(Get-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice\").ProgId`;\n\n\tconst {stdout} = await executePowerShell(command, {powerShellPath: psPath});\n\n\treturn stdout.trim();\n};\n\nexport const convertWslPathToWindows = async path => {\n\t// Don't convert URLs\n\tif (/^[a-z]+:\\/\\//i.test(path)) {\n\t\treturn path;\n\t}\n\n\ttry {\n\t\tconst {stdout} = await execFile('wslpath', ['-aw', path], {encoding: 'utf8'});\n\t\treturn stdout.trim();\n\t} catch {\n\t\t// If wslpath fails, return the original path\n\t\treturn path;\n\t}\n};\n\nexport {default as isWsl} from 'is-wsl';\n",
7
- "import process from 'node:process';\nimport os from 'node:os';\nimport fs from 'node:fs';\nimport isInsideContainer from 'is-inside-container';\n\nconst isWsl = () => {\n\tif (process.platform !== 'linux') {\n\t\treturn false;\n\t}\n\n\tif (os.release().toLowerCase().includes('microsoft')) {\n\t\tif (isInsideContainer()) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\ttry {\n\t\tif (fs.readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft')) {\n\t\t\treturn !isInsideContainer();\n\t\t}\n\t} catch {}\n\n\t// Fallback for custom kernels: check WSL-specific paths.\n\tif (\n\t\tfs.existsSync('/proc/sys/fs/binfmt_misc/WSLInterop')\n\t\t|| fs.existsSync('/run/WSL')\n\t) {\n\t\treturn !isInsideContainer();\n\t}\n\n\treturn false;\n};\n\nexport default process.env.__IS_WSL_TEST__ ? isWsl : isWsl();\n",
8
- "import fs from 'node:fs';\nimport isDocker from 'is-docker';\n\nlet cachedResult;\n\n// Podman detection\nconst hasContainerEnv = () => {\n\ttry {\n\t\tfs.statSync('/run/.containerenv');\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\nexport default function isInsideContainer() {\n\t// TODO: Use `??=` when targeting Node.js 16.\n\tif (cachedResult === undefined) {\n\t\tcachedResult = hasContainerEnv() || isDocker();\n\t}\n\n\treturn cachedResult;\n}\n",
9
- "import fs from 'node:fs';\n\nlet isDockerCached;\n\nfunction hasDockerEnv() {\n\ttry {\n\t\tfs.statSync('/.dockerenv');\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nfunction hasDockerCGroup() {\n\ttry {\n\t\treturn fs.readFileSync('/proc/self/cgroup', 'utf8').includes('docker');\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nexport default function isDocker() {\n\t// TODO: Use `??=` when targeting Node.js 16.\n\tif (isDockerCached === undefined) {\n\t\tisDockerCached = hasDockerEnv() || hasDockerCGroup();\n\t}\n\n\treturn isDockerCached;\n}\n",
10
- "import process from 'node:process';\nimport {Buffer} from 'node:buffer';\nimport {promisify} from 'node:util';\nimport childProcess from 'node:child_process';\nimport fs, {constants as fsConstants} from 'node:fs/promises';\n\nconst execFile = promisify(childProcess.execFile);\n\nexport const powerShellPath = () => `${process.env.SYSTEMROOT || process.env.windir || String.raw`C:\\Windows`}\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe`;\n\n// Cache for PowerShell accessibility check\nlet canAccessCache;\n\nexport const canAccessPowerShell = async () => {\n\tcanAccessCache ??= (async () => {\n\t\ttry {\n\t\t\tawait fs.access(powerShellPath(), fsConstants.X_OK);\n\t\t\treturn true;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t})();\n\n\treturn canAccessCache;\n};\n\nexport const executePowerShell = async (command, options = {}) => {\n\tconst {\n\t\tpowerShellPath: psPath,\n\t\t...execFileOptions\n\t} = options;\n\n\tconst encodedCommand = executePowerShell.encodeCommand(command);\n\n\treturn execFile(\n\t\tpsPath ?? powerShellPath(),\n\t\t[\n\t\t\t...executePowerShell.argumentsPrefix,\n\t\t\tencodedCommand,\n\t\t],\n\t\t{\n\t\t\tencoding: 'utf8',\n\t\t\t...execFileOptions,\n\t\t},\n\t);\n};\n\nexecutePowerShell.argumentsPrefix = [\n\t'-NoProfile',\n\t'-NonInteractive',\n\t'-ExecutionPolicy',\n\t'Bypass',\n\t'-EncodedCommand',\n];\n\nexecutePowerShell.encodeCommand = command => Buffer.from(command, 'utf16le').toString('base64');\n\nexecutePowerShell.escapeArgument = value => `'${String(value).replaceAll('\\'', '\\'\\'')}'`;\n",
11
- "export function parseMountPointFromConfig(content) {\n\tfor (const line of content.split('\\n')) {\n\t\t// Skip comment lines\n\t\tif (/^\\s*#/.test(line)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Match root at start of line (after optional whitespace)\n\t\tconst match = /^\\s*root\\s*=\\s*(?<mountPoint>\"[^\"]*\"|'[^']*'|[^#]*)/.exec(line);\n\t\tif (!match) {\n\t\t\tcontinue;\n\t\t}\n\n\t\treturn match.groups.mountPoint\n\t\t\t.trim()\n\t\t\t// Strip surrounding quotes\n\t\t\t.replaceAll(/^[\"']|[\"']$/g, '');\n\t}\n}\n",
12
- "export default function defineLazyProperty(object, propertyName, valueGetter) {\n\tconst define = value => Object.defineProperty(object, propertyName, {value, enumerable: true, writable: true});\n\n\tObject.defineProperty(object, propertyName, {\n\t\tconfigurable: true,\n\t\tenumerable: true,\n\t\tget() {\n\t\t\tconst result = valueGetter();\n\t\t\tdefine(result);\n\t\t\treturn result;\n\t\t},\n\t\tset(value) {\n\t\t\tdefine(value);\n\t\t}\n\t});\n\n\treturn object;\n}\n",
13
- "import {promisify} from 'node:util';\nimport process from 'node:process';\nimport {execFile} from 'node:child_process';\nimport defaultBrowserId from 'default-browser-id';\nimport bundleName from 'bundle-name';\nimport windows from './windows.js';\n\nexport {_windowsBrowserProgIdMap} from './windows.js';\n\nconst execFileAsync = promisify(execFile);\n\n// Inlined: https://github.com/sindresorhus/titleize/blob/main/index.js\nconst titleize = string => string.toLowerCase().replaceAll(/(?:^|\\s|-)\\S/g, x => x.toUpperCase());\n\nexport default async function defaultBrowser() {\n\tif (process.platform === 'darwin') {\n\t\tconst id = await defaultBrowserId();\n\t\tconst name = await bundleName(id);\n\t\treturn {name, id};\n\t}\n\n\tif (process.platform === 'linux') {\n\t\tconst {stdout} = await execFileAsync('xdg-mime', ['query', 'default', 'x-scheme-handler/http']);\n\t\tconst id = stdout.trim();\n\t\tconst name = titleize(id.replace(/.desktop$/, '').replace('-', ' '));\n\t\treturn {name, id};\n\t}\n\n\tif (process.platform === 'win32') {\n\t\treturn windows();\n\t}\n\n\tthrow new Error('Only macOS, Linux, and Windows are supported');\n}\n",
14
- "import {promisify} from 'node:util';\nimport process from 'node:process';\nimport {execFile} from 'node:child_process';\n\nconst execFileAsync = promisify(execFile);\n\nexport default async function defaultBrowserId() {\n\tif (process.platform !== 'darwin') {\n\t\tthrow new Error('macOS only');\n\t}\n\n\tconst {stdout} = await execFileAsync('defaults', ['read', 'com.apple.LaunchServices/com.apple.launchservices.secure', 'LSHandlers']);\n\n\t// `(?!-)` is to prevent matching `LSHandlerRoleAll = \"-\";`.\n\tconst match = /LSHandlerRoleAll = \"(?!-)(?<id>[^\"]+?)\";\\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);\n\n\tconst browserId = match?.groups.id ?? 'com.apple.Safari';\n\n\t// Correct the case for Safari's bundle identifier\n\tif (browserId === 'com.apple.safari') {\n\t\treturn 'com.apple.Safari';\n\t}\n\n\treturn browserId;\n}\n",
15
- "import process from 'node:process';\nimport {promisify} from 'node:util';\nimport {execFile, execFileSync} from 'node:child_process';\n\nconst execFileAsync = promisify(execFile);\n\nexport async function runAppleScript(script, {humanReadableOutput = true, signal} = {}) {\n\tif (process.platform !== 'darwin') {\n\t\tthrow new Error('macOS only');\n\t}\n\n\tconst outputArguments = humanReadableOutput ? [] : ['-ss'];\n\n\tconst execOptions = {};\n\tif (signal) {\n\t\texecOptions.signal = signal;\n\t}\n\n\tconst {stdout} = await execFileAsync('osascript', ['-e', script, outputArguments], execOptions);\n\treturn stdout.trim();\n}\n\nexport function runAppleScriptSync(script, {humanReadableOutput = true} = {}) {\n\tif (process.platform !== 'darwin') {\n\t\tthrow new Error('macOS only');\n\t}\n\n\tconst outputArguments = humanReadableOutput ? [] : ['-ss'];\n\n\tconst stdout = execFileSync('osascript', ['-e', script, ...outputArguments], {\n\t\tencoding: 'utf8',\n\t\tstdio: ['ignore', 'pipe', 'ignore'],\n\t\ttimeout: 500,\n\t});\n\n\treturn stdout.trim();\n}\n",
16
- "import {runAppleScript} from 'run-applescript';\n\nexport default async function bundleName(bundleId) {\n\treturn runAppleScript(`tell application \"Finder\" to set app_path to application file id \"${bundleId}\" as string\\ntell application \"System Events\" to get value of property list item \"CFBundleName\" of property list file (app_path & \":Contents:Info.plist\")`);\n}\n",
17
- "import {promisify} from 'node:util';\nimport {execFile} from 'node:child_process';\n\nconst execFileAsync = promisify(execFile);\n\n// TODO: Fix the casing of bundle identifiers in the next major version.\n\n// Windows doesn't have browser IDs in the same way macOS/Linux does so we give fake\n// ones that look real and match the macOS/Linux versions for cross-platform apps.\nconst windowsBrowserProgIds = {\n\tMSEdgeHTM: {name: 'Edge', id: 'com.microsoft.edge'}, // The missing `L` is correct.\n\tMSEdgeBHTML: {name: 'Edge Beta', id: 'com.microsoft.edge.beta'},\n\tMSEdgeDHTML: {name: 'Edge Dev', id: 'com.microsoft.edge.dev'},\n\tAppXq0fevzme2pys62n3e0fbqa7peapykr8v: {name: 'Edge', id: 'com.microsoft.edge.old'},\n\tChromeHTML: {name: 'Chrome', id: 'com.google.chrome'},\n\tChromeBHTML: {name: 'Chrome Beta', id: 'com.google.chrome.beta'},\n\tChromeDHTML: {name: 'Chrome Dev', id: 'com.google.chrome.dev'},\n\tChromiumHTM: {name: 'Chromium', id: 'org.chromium.Chromium'},\n\tBraveHTML: {name: 'Brave', id: 'com.brave.Browser'},\n\tBraveBHTML: {name: 'Brave Beta', id: 'com.brave.Browser.beta'},\n\tBraveDHTML: {name: 'Brave Dev', id: 'com.brave.Browser.dev'},\n\tBraveSSHTM: {name: 'Brave Nightly', id: 'com.brave.Browser.nightly'},\n\tFirefoxURL: {name: 'Firefox', id: 'org.mozilla.firefox'},\n\tOperaStable: {name: 'Opera', id: 'com.operasoftware.Opera'},\n\tVivaldiHTM: {name: 'Vivaldi', id: 'com.vivaldi.Vivaldi'},\n\t'IE.HTTP': {name: 'Internet Explorer', id: 'com.microsoft.ie'},\n};\n\nexport const _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));\n\nexport class UnknownBrowserError extends Error {}\n\nexport default async function defaultBrowser(_execFileAsync = execFileAsync) {\n\tconst {stdout} = await _execFileAsync('reg', [\n\t\t'QUERY',\n\t\t' HKEY_CURRENT_USER\\\\Software\\\\Microsoft\\\\Windows\\\\Shell\\\\Associations\\\\UrlAssociations\\\\http\\\\UserChoice',\n\t\t'/v',\n\t\t'ProgId',\n\t]);\n\n\tconst match = /ProgId\\s*REG_SZ\\s*(?<id>\\S+)/.exec(stdout);\n\tif (!match) {\n\t\tthrow new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);\n\t}\n\n\tconst {id} = match.groups;\n\n\t// Windows can append a hash suffix to ProgIds using a dot or hyphen\n\t// (e.g., `ChromeHTML.ABC123`, `FirefoxURL-6F193CCC56814779`).\n\t// Try exact match first, then try without the suffix.\n\tconst dotIndex = id.lastIndexOf('.');\n\tconst hyphenIndex = id.lastIndexOf('-');\n\tconst baseIdByDot = dotIndex === -1 ? undefined : id.slice(0, dotIndex);\n\tconst baseIdByHyphen = hyphenIndex === -1 ? undefined : id.slice(0, hyphenIndex);\n\n\treturn windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? {name: id, id};\n}\n",
18
- "import process from 'node:process';\n\nconst isInSsh = Boolean(process.env.SSH_CONNECTION\n\t|| process.env.SSH_CLIENT\n\t|| process.env.SSH_TTY);\n\nexport default isInSsh;\n"
19
- ],
20
- "mappings": ";4BAAA,uBACA,qBACA,wBAAQ,aACR,8BACA,wBAAY,qBCJZ,oBAAQ,cACR,8BACA,uBAAY,oBCFZ,uBACA,mBACA,kBCFA,mBCAA,kBAEA,IAAI,EAEJ,SAAS,EAAY,EAAG,CACvB,GAAI,CAEH,OADA,EAAG,SAAS,aAAa,EAClB,GACN,KAAM,CACP,MAAO,IAIT,SAAS,EAAe,EAAG,CAC1B,GAAI,CACH,OAAO,EAAG,aAAa,oBAAqB,MAAM,EAAE,SAAS,QAAQ,EACpE,KAAM,CACP,MAAO,IAIT,SAAwB,CAAQ,EAAG,CAElC,GAAI,IAAmB,OACtB,EAAiB,GAAa,GAAK,GAAgB,EAGpD,OAAO,EDxBR,IAAI,EAGE,GAAkB,IAAM,CAC7B,GAAI,CAEH,OADA,GAAG,SAAS,oBAAoB,EACzB,GACN,KAAM,CACP,MAAO,KAIT,SAAwB,CAAiB,EAAG,CAE3C,GAAI,IAAiB,OACpB,EAAe,GAAgB,GAAK,EAAS,EAG9C,OAAO,EDhBR,IAAM,EAAQ,IAAM,CACnB,GAAI,EAAQ,WAAa,QACxB,MAAO,GAGR,GAAI,GAAG,QAAQ,EAAE,YAAY,EAAE,SAAS,WAAW,EAAG,CACrD,GAAI,EAAkB,EACrB,MAAO,GAGR,MAAO,GAGR,GAAI,CACH,GAAI,EAAG,aAAa,gBAAiB,MAAM,EAAE,YAAY,EAAE,SAAS,WAAW,EAC9E,MAAO,CAAC,EAAkB,EAE1B,K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