Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

petitio

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

petitio - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

26

CHANGELOG.md

@@ -1,2 +0,2 @@

# [1.1.0](https://github.com/helperdiscord/petitio/compare/v1.0.0...v1.1.0) (2021-03-22)
# [1.2.0](https://github.com/helperdiscord/petitio/compare/v1.1.0...v1.2.0) (2021-04-07)

@@ -6,8 +6,3 @@

* export correctly ([f4b7ec0](https://github.com/helperdiscord/petitio/commit/f4b7ec0a24f792c5efac1296ba7c84180d0ab561))
* fix tsdoc ([09fc989](https://github.com/helperdiscord/petitio/commit/09fc98998cfbe9b4ea46d4d6912175b3632dbf2e))
* make types correct ([53b257f](https://github.com/helperdiscord/petitio/commit/53b257f262a6ece7bb924af85827c26b053ed02f))
* naming ([a36eeb6](https://github.com/helperdiscord/petitio/commit/a36eeb66f42945b7ace6fd2393d18092789d5b6a))
* stronger typing ([643fee3](https://github.com/helperdiscord/petitio/commit/643fee386aab81fc21ec3b3aaaf133d87b8d2e55))
* uhh merge confligt?? ([b8b6b38](https://github.com/helperdiscord/petitio/commit/b8b6b38b8bb06b33a60cbb33c983f424e3460c4c))
* **PetitioResponse:** support non-ascii json responses ([#11](https://github.com/helperdiscord/petitio/issues/11)) ([d8344e4](https://github.com/helperdiscord/petitio/commit/d8344e44bb2ca247082c7f330354a76869e49793))

@@ -17,2 +12,15 @@

* add support for stream ([c706801](https://github.com/helperdiscord/petitio/commit/c7068011464ce003d4443ab975b48bab9b0ac74f))
* add text encoding option & tests ([7f6f5c6](https://github.com/helperdiscord/petitio/commit/7f6f5c63f3dddc2838c7dc1975c8a5c9335f120d))
### Performance Improvements
* remove spread operators and callback loops ([#12](https://github.com/helperdiscord/petitio/issues/12)) ([3bf48cc](https://github.com/helperdiscord/petitio/commit/3bf48cc1d002fb342af932f720dfc833c94461fe))
# [1.1.0](https://github.com/helperdiscord/petitio/compare/v1.0.0...v1.1.0) (2021-03-22)
### Features
* add _parseHeaders to PetitioResponse ([188bf94](https://github.com/helperdiscord/petitio/commit/188bf94cafa4df4f54f5354fa8b42313aace6e0d))

@@ -23,8 +31,4 @@ * add docs and adjust types [ci_release] ([76e8bf9](https://github.com/helperdiscord/petitio/commit/76e8bf92dfbe9c6aae18b76412024ba6897271e8))

* **tests:** finalize petitioresponse tests ([e0a770a](https://github.com/helperdiscord/petitio/commit/e0a770ad7f7a6ccbdcc0d240282de040c9869c36))
* **tests:** more tests ([abaaf03](https://github.com/helperdiscord/petitio/commit/abaaf03b4f5f0219a0570ccd5402e775ff5ef449))
* add client method ([b257087](https://github.com/helperdiscord/petitio/commit/b257087d3d92412857de2f0c733050b4f16a6c52))
* add deps ([b25fc9b](https://github.com/helperdiscord/petitio/commit/b25fc9bca2dae99ad74f83bd16cb6071361de8d4))
* add the stuff ([d4bed77](https://github.com/helperdiscord/petitio/commit/d4bed77c656599daa12d05362568d9015e6f6aeb))
* prelim unit tests ([26de291](https://github.com/helperdiscord/petitio/commit/26de2915c6cdd13a04585c36e3e68710fe760993))
* proper import mapping ([410e534](https://github.com/helperdiscord/petitio/commit/410e53457e7dcd87ed5f4f0bd6f536a0b66d547b))
* type the dispatch funcs ([c630078](https://github.com/helperdiscord/petitio/commit/c630078330877f46dd4dea6a4edb25b99753fd81))

@@ -1,5 +0,5 @@

var gt=Object.create,we=Object.defineProperty,yt=Object.getPrototypeOf,bt=Object.prototype.hasOwnProperty,wt=Object.getOwnPropertyNames,Tt=Object.getOwnPropertyDescriptor;var Et=t=>we(t,"__esModule",{value:!0});var B=(t,e)=>()=>(e||(e={exports:{}},t(e.exports,e)),e.exports);var kt=(t,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of wt(e))!bt.call(t,s)&&s!=="default"&&we(t,s,{get:()=>e[s],enumerable:!(r=Tt(e,s))||r.enumerable});return t},J=t=>kt(Et(we(t!=null?gt(yt(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var Ne=B((Zt,_e)=>{"use strict";var{HTTPParser:St}=process.binding("http_parser");_e.exports=St});var Te=B((er,Pe)=>{Pe.exports={kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kIdleTimeout:Symbol("idle timeout"),kIdleTimeoutValue:Symbol("idle timeout value"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kTLSServerName:Symbol("server name"),kHost:Symbol("host"),kTLSOpts:Symbol("TLS Options"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol("destroyed"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelinig"),kSocketPath:Symbol("socket path"),kSocket:Symbol("socket"),kTLSSession:Symbol("tls session cache"),kHostHeader:Symbol("host header"),kAgentOpts:Symbol("agent opts"),kAgentCache:Symbol("agent cache")}});var ae=B((tr,He)=>{"use strict";var S=class extends Error{constructor(e){super(e);this.name="UndiciError",this.code="UND_ERR"}},X=class extends S{constructor(e){super(e);Error.captureStackTrace(this,X),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}},Y=class extends S{constructor(e){super(e);Error.captureStackTrace(this,Y),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}},Z=class extends S{constructor(e){super(e);Error.captureStackTrace(this,Z),this.name="InvalidArgumentError",this.message=e||"Invalid Argument Error",this.code="UND_ERR_INVALID_ARG"}},ee=class extends S{constructor(e){super(e);Error.captureStackTrace(this,ee),this.name="InvalidReturnValueError",this.message=e||"Invalid Return Value Error",this.code="UND_ERR_INVALID_RETURN_VALUE"}},te=class extends S{constructor(e){super(e);Error.captureStackTrace(this,te),this.name="RequestAbortedError",this.message=e||"Request aborted",this.code="UND_ERR_ABORTED"}},re=class extends S{constructor(e){super(e);Error.captureStackTrace(this,re),this.name="InformationalError",this.message=e||"Request information",this.code="UND_ERR_INFO"}},se=class extends S{constructor(e){super(e);Error.captureStackTrace(this,se),this.name="ContentLengthMismatchError",this.message=e||"Request body length does not match content-length header",this.code="UND_ERR_CONTENT_LENGTH_MISMATCH"}},ne=class extends S{constructor(e){super(e);Error.captureStackTrace(this,ne),this.name="TrailerMismatchError",this.message=e||"Trailers does not match trailer header",this.code="UND_ERR_TRAILER_MISMATCH"}},ie=class extends S{constructor(e){super(e);Error.captureStackTrace(this,ie),this.name="ClientDestroyedError",this.message=e||"The client is destroyed",this.code="UND_ERR_DESTROYED"}},oe=class extends S{constructor(e){super(e);Error.captureStackTrace(this,oe),this.name="ClientClosedError",this.message=e||"The client is closed",this.code="UND_ERR_CLOSED"}},ue=class extends S{constructor(e){super(e);Error.captureStackTrace(this,ue),this.name="SocketError",this.message=e||"Socket error",this.code="UND_ERR_SOCKET"}},he=class extends S{constructor(e){super(e);Error.captureStackTrace(this,he),this.name="NotSupportedError",this.message=e||"Not supported error",this.code="UND_ERR_NOT_SUPPORTED"}};He.exports={UndiciError:S,HeadersTimeoutError:X,BodyTimeoutError:Y,ContentLengthMismatchError:se,TrailerMismatchError:ne,InvalidArgumentError:Z,InvalidReturnValueError:ee,RequestAbortedError:te,ClientDestroyedError:ie,ClientClosedError:oe,InformationalError:re,SocketError:ue,NotSupportedError:he}});var Ee=B((rr,De)=>{"use strict";var Ae=require("assert"),{kDestroyed:Ue}=Te(),{IncomingMessage:Rt}=require("http"),Ct=require("util"),vt=require("net"),{InvalidArgumentError:K}=ae();function Lt(){}function qe(t){return!!(t&&typeof t.on=="function")}function Ie(t){if(typeof t=="string"&&(t=new URL(t)),!t||typeof t!="object")throw new K("invalid url");if(t.port!=null&&t.port!==""&&!Number.isFinite(parseInt(t.port)))throw new K("invalid port");if(t.hostname!=null&&typeof t.hostname!="string")throw new K("invalid hostname");if(!/https?/.test(t.protocol))throw new K("invalid protocol");if(!(t instanceof URL)){let e=t.port||{"http:":80,"https:":443}[t.protocol];Ae(e!=null);let r=t.path||`${t.pathname||"/"}${t.search||""}`;t=new URL(`${t.protocol}//${t.hostname}:${e}${r}`)}return t}function Ot(t){if(t=Ie(t),/\/.+/.test(t.pathname)||t.search||t.hash)throw new K("invalid url");return t}function xt(t){if(!t)return null;let e=t;if(e.startsWith("[")){let r=e.indexOf("]");e=r===-1?e:e.substr(1,r-1)}else e=e.split(":",1)[0];return vt.isIP(e)&&(e=null),e}function _t(t){if(t&&typeof t.on=="function"){let e=t._readableState;return e&&e.ended===!0&&Number.isFinite(e.length)?e.length:null}return Ae(!t||Number.isFinite(t.byteLength)),t?t.length:0}function $e(t){return!t||!!(t.destroyed||t[Ue])}function Nt(t,e){!qe(t)||$e(t)||(typeof t.destroy=="function"?(e||Object.getPrototypeOf(t).constructor!==Rt)&&t.destroy(e):e&&process.nextTick((r,s)=>{r.emit("error",s)},t,e),t.destroyed!==!0&&(t[Ue]=!0))}var Pt=/timeout=(\d+)/;function Ht(t){let e=t.match(Pt);return e?parseInt(e[1])*1e3:null}function Dt(t,e={}){for(let r=0;r<t.length;r+=2){let s=t[r].toLowerCase(),n=e[s];n?(Array.isArray(n)||(n=[n],e[s]=n),n.push(t[r+1])):e[s]=t[r+1]}return e}function At(t){return t instanceof Uint8Array||Buffer.isBuffer(t)}function Ut(t,e){let r=Ct.getSystemErrorName(t),s=new Error(`${e} ${r}`);return s.errno=s,s.code=t,s.syscall=e,s}De.exports={nop:Lt,parseOrigin:Ot,parseURL:Ie,getServerName:xt,errnoException:Ut,isStream:qe,isDestroyed:$e,parseHeaders:Dt,parseKeepAliveTimeout:Ht,destroy:Nt,bodyLength:_t,isBuffer:At,queueMicrotask:global.queueMicrotask||(t=>Promise.resolve().then(t).catch(e=>setTimeout(()=>{throw e},0)))}});var ze=B((sr,Be)=>{"use strict";var{InvalidArgumentError:g,NotSupportedError:qt}=ae(),ke=Ee(),P=require("assert"),D=Symbol("handler"),It=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\x00a1-\xffff0-9]+-?)*[a-z\x00a1-\xffff0-9]+)(?:\.(?:[a-z\x00a1-\xffff0-9]+-?)*[a-z\x00a1-\xffff0-9]+)*(?:\.(?:[a-z\x00a1-\xffff]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/ius,Me=class{constructor({path:e,method:r,body:s,headers:n,idempotent:h,upgrade:o},l){if(typeof e!="string")throw new g("path must be a string");if(e[0]!=="/"&&!It.test(e))throw new g("path must be an absolute URL or start with a slash");if(typeof r!="string")throw new g("method must be a string");if(o&&typeof o!="string")throw new g("upgrade must be a string");if(this.method=r,s==null)this.body=null;else if(ke.isStream(s))this.body=s;else if(ke.isBuffer(s))this.body=s.length?s:null;else if(typeof s=="string")this.body=s.length?Buffer.from(s):null;else throw new g("body must be a string, a Buffer or a Readable stream");if(this.aborted=!1,this.upgrade=o||r==="CONNECT"||null,this.path=e,this.idempotent=h??(r==="HEAD"||r==="GET"),this.host=null,this.contentLength=null,this.headers="",Array.isArray(n)){if(n.length%2!=0)throw new g("headers array must be even");for(let d=0;d<n.length;d+=2)je(this,n[d+0],n[d+1])}else if(n&&typeof n=="object")for(let[d,a]of Object.entries(n))je(this,d,a);else if(n!=null)throw new g("headers must be an object or an array");if(typeof l.onConnect!="function")throw new g("invalid onConnect method");if(typeof l.onError!="function")throw new g("invalid onError method");if(this.upgrade){if(typeof l.onUpgrade!="function")throw new g("invalid onUpgrade method")}else{if(typeof l.onHeaders!="function")throw new g("invalid onHeaders method");if(typeof l.onData!="function")throw new g("invalid onData method");if(typeof l.onComplete!="function")throw new g("invalid onComplete method")}this[D]=l}onConnect(e){return P(!this.aborted),this[D].onConnect(e)}onHeaders(e,r,s){return P(!this.aborted),this[D].onHeaders(e,r,s)}onData(e){return P(!this.aborted),P(!this.upgrade),this[D].onData(e)}onUpgrade(e,r,s){return P(!this.aborted),P(this.upgrade),this[D].onUpgrade(e,r,s)}onComplete(e){return P(!this.aborted),P(!this.upgrade),this[D].onComplete(e)}onError(e){this.aborted||(this.aborted=!0,ke.queueMicrotask(()=>this[D].onError(e)))}};function je(t,e,r){if(r&&typeof r=="object")throw new g(`invalid ${e} header`);if(r===void 0)return;if(t.host===null&&e.length===4&&e.toLowerCase()==="host")t.host=r,t.headers+=`${e}: ${r}\r
var gt=Object.create,we=Object.defineProperty,yt=Object.getPrototypeOf,bt=Object.prototype.hasOwnProperty,wt=Object.getOwnPropertyNames,Tt=Object.getOwnPropertyDescriptor;var Et=t=>we(t,"__esModule",{value:!0});var $=(t,e)=>()=>(e||(e={exports:{}},t(e.exports,e)),e.exports);var kt=(t,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of wt(e))!bt.call(t,s)&&s!=="default"&&we(t,s,{get:()=>e[s],enumerable:!(r=Tt(e,s))||r.enumerable});return t},J=t=>kt(Et(we(t!=null?gt(yt(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var Ne=$((Zt,_e)=>{"use strict";var{HTTPParser:St}=process.binding("http_parser");_e.exports=St});var Te=$((er,Pe)=>{Pe.exports={kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kIdleTimeout:Symbol("idle timeout"),kIdleTimeoutValue:Symbol("idle timeout value"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kTLSServerName:Symbol("server name"),kHost:Symbol("host"),kTLSOpts:Symbol("TLS Options"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol("destroyed"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelinig"),kSocketPath:Symbol("socket path"),kSocket:Symbol("socket"),kTLSSession:Symbol("tls session cache"),kHostHeader:Symbol("host header"),kAgentOpts:Symbol("agent opts"),kAgentCache:Symbol("agent cache")}});var he=$((tr,De)=>{"use strict";var S=class extends Error{constructor(e){super(e);this.name="UndiciError",this.code="UND_ERR"}},X=class extends S{constructor(e){super(e);Error.captureStackTrace(this,X),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}},Y=class extends S{constructor(e){super(e);Error.captureStackTrace(this,Y),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}},Z=class extends S{constructor(e){super(e);Error.captureStackTrace(this,Z),this.name="InvalidArgumentError",this.message=e||"Invalid Argument Error",this.code="UND_ERR_INVALID_ARG"}},ee=class extends S{constructor(e){super(e);Error.captureStackTrace(this,ee),this.name="InvalidReturnValueError",this.message=e||"Invalid Return Value Error",this.code="UND_ERR_INVALID_RETURN_VALUE"}},te=class extends S{constructor(e){super(e);Error.captureStackTrace(this,te),this.name="RequestAbortedError",this.message=e||"Request aborted",this.code="UND_ERR_ABORTED"}},re=class extends S{constructor(e){super(e);Error.captureStackTrace(this,re),this.name="InformationalError",this.message=e||"Request information",this.code="UND_ERR_INFO"}},se=class extends S{constructor(e){super(e);Error.captureStackTrace(this,se),this.name="ContentLengthMismatchError",this.message=e||"Request body length does not match content-length header",this.code="UND_ERR_CONTENT_LENGTH_MISMATCH"}},ne=class extends S{constructor(e){super(e);Error.captureStackTrace(this,ne),this.name="TrailerMismatchError",this.message=e||"Trailers does not match trailer header",this.code="UND_ERR_TRAILER_MISMATCH"}},ie=class extends S{constructor(e){super(e);Error.captureStackTrace(this,ie),this.name="ClientDestroyedError",this.message=e||"The client is destroyed",this.code="UND_ERR_DESTROYED"}},oe=class extends S{constructor(e){super(e);Error.captureStackTrace(this,oe),this.name="ClientClosedError",this.message=e||"The client is closed",this.code="UND_ERR_CLOSED"}},ue=class extends S{constructor(e){super(e);Error.captureStackTrace(this,ue),this.name="SocketError",this.message=e||"Socket error",this.code="UND_ERR_SOCKET"}},ae=class extends S{constructor(e){super(e);Error.captureStackTrace(this,ae),this.name="NotSupportedError",this.message=e||"Not supported error",this.code="UND_ERR_NOT_SUPPORTED"}};De.exports={UndiciError:S,HeadersTimeoutError:X,BodyTimeoutError:Y,ContentLengthMismatchError:se,TrailerMismatchError:ne,InvalidArgumentError:Z,InvalidReturnValueError:ee,RequestAbortedError:te,ClientDestroyedError:ie,ClientClosedError:oe,InformationalError:re,SocketError:ue,NotSupportedError:ae}});var Ee=$((rr,Ae)=>{"use strict";var He=require("assert"),{kDestroyed:Ue}=Te(),{IncomingMessage:Rt}=require("http"),vt=require("util"),Ct=require("net"),{InvalidArgumentError:K}=he();function Lt(){}function qe(t){return!!(t&&typeof t.on=="function")}function Ie(t){if(typeof t=="string"&&(t=new URL(t)),!t||typeof t!="object")throw new K("invalid url");if(t.port!=null&&t.port!==""&&!Number.isFinite(parseInt(t.port)))throw new K("invalid port");if(t.hostname!=null&&typeof t.hostname!="string")throw new K("invalid hostname");if(!/https?/.test(t.protocol))throw new K("invalid protocol");if(!(t instanceof URL)){let e=t.port||{"http:":80,"https:":443}[t.protocol];He(e!=null);let r=t.path||`${t.pathname||"/"}${t.search||""}`;t=new URL(`${t.protocol}//${t.hostname}:${e}${r}`)}return t}function Ot(t){if(t=Ie(t),/\/.+/.test(t.pathname)||t.search||t.hash)throw new K("invalid url");return t}function xt(t){if(!t)return null;let e=t;if(e.startsWith("[")){let r=e.indexOf("]");e=r===-1?e:e.substr(1,r-1)}else e=e.split(":",1)[0];return Ct.isIP(e)&&(e=null),e}function _t(t){if(t&&typeof t.on=="function"){let e=t._readableState;return e&&e.ended===!0&&Number.isFinite(e.length)?e.length:null}return He(!t||Number.isFinite(t.byteLength)),t?t.length:0}function Be(t){return!t||!!(t.destroyed||t[Ue])}function Nt(t,e){!qe(t)||Be(t)||(typeof t.destroy=="function"?(e||Object.getPrototypeOf(t).constructor!==Rt)&&t.destroy(e):e&&process.nextTick((r,s)=>{r.emit("error",s)},t,e),t.destroyed!==!0&&(t[Ue]=!0))}var Pt=/timeout=(\d+)/;function Dt(t){let e=t.match(Pt);return e?parseInt(e[1])*1e3:null}function At(t,e={}){for(let r=0;r<t.length;r+=2){let s=t[r].toLowerCase(),n=e[s];n?(Array.isArray(n)||(n=[n],e[s]=n),n.push(t[r+1])):e[s]=t[r+1]}return e}function Ht(t){return t instanceof Uint8Array||Buffer.isBuffer(t)}function Ut(t,e){let r=vt.getSystemErrorName(t),s=new Error(`${e} ${r}`);return s.errno=s,s.code=t,s.syscall=e,s}Ae.exports={nop:Lt,parseOrigin:Ot,parseURL:Ie,getServerName:xt,errnoException:Ut,isStream:qe,isDestroyed:Be,parseHeaders:At,parseKeepAliveTimeout:Dt,destroy:Nt,bodyLength:_t,isBuffer:Ht,queueMicrotask:global.queueMicrotask||(t=>Promise.resolve().then(t).catch(e=>setTimeout(()=>{throw e},0)))}});var ze=$((sr,$e)=>{"use strict";var{InvalidArgumentError:g,NotSupportedError:qt}=he(),ke=Ee(),P=require("assert"),A=Symbol("handler"),It=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\x00a1-\xffff0-9]+-?)*[a-z\x00a1-\xffff0-9]+)(?:\.(?:[a-z\x00a1-\xffff0-9]+-?)*[a-z\x00a1-\xffff0-9]+)*(?:\.(?:[a-z\x00a1-\xffff]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/ius,Me=class{constructor({path:e,method:r,body:s,headers:n,idempotent:a,upgrade:o},l){if(typeof e!="string")throw new g("path must be a string");if(e[0]!=="/"&&!It.test(e))throw new g("path must be an absolute URL or start with a slash");if(typeof r!="string")throw new g("method must be a string");if(o&&typeof o!="string")throw new g("upgrade must be a string");if(this.method=r,s==null)this.body=null;else if(ke.isStream(s))this.body=s;else if(ke.isBuffer(s))this.body=s.length?s:null;else if(typeof s=="string")this.body=s.length?Buffer.from(s):null;else throw new g("body must be a string, a Buffer or a Readable stream");if(this.aborted=!1,this.upgrade=o||r==="CONNECT"||null,this.path=e,this.idempotent=a??(r==="HEAD"||r==="GET"),this.host=null,this.contentLength=null,this.headers="",Array.isArray(n)){if(n.length%2!=0)throw new g("headers array must be even");for(let d=0;d<n.length;d+=2)je(this,n[d+0],n[d+1])}else if(n&&typeof n=="object")for(let[d,h]of Object.entries(n))je(this,d,h);else if(n!=null)throw new g("headers must be an object or an array");if(typeof l.onConnect!="function")throw new g("invalid onConnect method");if(typeof l.onError!="function")throw new g("invalid onError method");if(this.upgrade){if(typeof l.onUpgrade!="function")throw new g("invalid onUpgrade method")}else{if(typeof l.onHeaders!="function")throw new g("invalid onHeaders method");if(typeof l.onData!="function")throw new g("invalid onData method");if(typeof l.onComplete!="function")throw new g("invalid onComplete method")}this[A]=l}onConnect(e){return P(!this.aborted),this[A].onConnect(e)}onHeaders(e,r,s){return P(!this.aborted),this[A].onHeaders(e,r,s)}onData(e){return P(!this.aborted),P(!this.upgrade),this[A].onData(e)}onUpgrade(e,r,s){return P(!this.aborted),P(this.upgrade),this[A].onUpgrade(e,r,s)}onComplete(e){return P(!this.aborted),P(!this.upgrade),this[A].onComplete(e)}onError(e){this.aborted||(this.aborted=!0,ke.queueMicrotask(()=>this[A].onError(e)))}};function je(t,e,r){if(r&&typeof r=="object")throw new g(`invalid ${e} header`);if(r===void 0)return;if(t.host===null&&e.length===4&&e.toLowerCase()==="host")t.host=r,t.headers+=`${e}: ${r}\r
`;else if(t.contentLength===null&&e.length===14&&e.toLowerCase()==="content-length"){if(t.contentLength=parseInt(r),!Number.isFinite(t.contentLength))throw new g("invalid content-length header")}else{if(e.length===17&&e.toLowerCase()==="transfer-encoding")throw new g("invalid transfer-encoding header");if(e.length===10&&e.toLowerCase()==="connection")throw new g("invalid connection header");if(e.length===10&&e.toLowerCase()==="keep-alive")throw new g("invalid keep-alive header");if(e.length===7&&e.toLowerCase()==="upgrade")throw new g("invalid upgrade header");if(e.length===6&&e.toLowerCase()==="expect")throw new qt("expect header not supported");t.headers+=`${e}: ${r}\r
`}}Be.exports=Me});var dt=B((nr,Ke)=>{"use strict";var Fe=require("net"),Ve=require("tls"),T=Ne(),$t=require("events"),f=require("assert"),u=Ee(),Bt=ze(),{ContentLengthMismatchError:Se,TrailerMismatchError:Ge,InvalidArgumentError:E,RequestAbortedError:Qe,HeadersTimeoutError:Mt,ClientDestroyedError:Re,ClientClosedError:jt,SocketError:le,InformationalError:M,BodyTimeoutError:zt}=ae(),{kUrl:N,kReset:O,kHost:de,kClient:j,kParser:ce,kConnect:Kt,kResuming:A,kWriting:U,kQueue:y,kNeedDrain:F,kTLSServerName:fe,kKeepAliveDefaultTimeout:Ce,kHostHeader:We,kTLSOpts:pe,kClosed:z,kDestroyed:H,kPendingIdx:R,kRunningIdx:b,kError:me,kOnDestroyed:q,kPipelining:I,kSocket:m,kSocketPath:V,kKeepAliveTimeoutValue:ge,kMaxHeadersSize:ve,kKeepAliveMaxTimeout:Je,kKeepAliveTimeoutThreshold:Xe,kTLSSession:G,kIdleTimeout:Q,kIdleTimeoutValue:ye,kHeadersTimeout:W,kBodyTimeout:Le}=Te(),Ye=process.version.split("."),be=parseInt(Ye[0].slice(1)),Ze=parseInt(Ye[1]),Ft=process.execArgv.includes("--insecure-http-parser");function et(t,e){return u.getServerName(e)||t[pe]&&t[pe].servername||u.getServerName(t[N].host||t[N].hostname)||null}var tt=class extends $t{constructor(e,{maxHeaderSize:r,headersTimeout:s,socketTimeout:n,requestTimeout:h,bodyTimeout:o,idleTimeout:l,keepAlive:d,keepAliveTimeout:a,maxKeepAliveTimeout:i,keepAliveMaxTimeout:c,keepAliveTimeoutThreshold:p,socketPath:k,pipelining:L,tls:_}={}){super();if(d!==void 0)throw new E("unsupported keepAlive, use pipelining=0 instead");if(n!==void 0)throw new E("unsupported socketTimeout, use headersTimeout & bodyTimeout instead");if(h!==void 0)throw new E("unsupported requestTimeout, use headersTimeout & bodyTimeout instead");if(l!==void 0)throw new E("unsupported idleTimeout, use keepAliveTimeout instead");if(i!==void 0)throw new E("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead");if(r!=null&&!Number.isFinite(r))throw new E("invalid maxHeaderSize");if(k!=null&&typeof k!="string")throw new E("invalid socketPath");if(a!=null&&(!Number.isFinite(a)||a<=0))throw new E("invalid keepAliveTimeout");if(c!=null&&(!Number.isFinite(c)||c<=0))throw new E("invalid keepAliveMaxTimeout");if(p!=null&&!Number.isFinite(p))throw new E("invalid keepAliveTimeoutThreshold");if(s!=null&&(!Number.isInteger(s)||s<0))throw new E("headersTimeout must be a positive integer or zero");if(o!=null&&(!Number.isInteger(o)||o<0))throw new E("bodyTimeout must be a positive integer or zero");this[m]=null,this[I]=L??1,this[ve]=r||16384,this[N]=u.parseOrigin(e),this[V]=k,this[Ce]=a??4e3,this[Je]=c??6e5,this[Xe]=p??1e3,this[ge]=this[Ce],this[z]=!1,this[H]=!1,this[pe]=_,this[fe]=et(this),this[de]=null,this[q]=[],this[A]=0,this[F]=0,this[G]=null,this[We]=`host: ${this[N].hostname}${this[N].port?`:${this[N].port}`:""}\r
`,this[Le]=o??3e4,this[W]=s??3e4,this[y]=[],this[b]=0,this[R]=0}get url(){return this[N]}get pipelining(){return this[I]}set pipelining(e){this[I]=e,x(this,!0)}get connected(){return this[m]&&this[m].connecting!==!0&&(this[m].authorized!==!1||this[m].authorizationError)&&!this[m].destroyed}get pending(){return this[y].length-this[R]}get running(){return this[R]-this[b]}get size(){return this[y].length-this[b]}get busy(){let e=this[m];return e&&(e[O]||e[U])||this.size>=(this[I]||1)||this.pending>0}get destroyed(){return this[H]}get closed(){return this[z]}[Kt](e){rt(this),this.once("connect",e)}dispatch(e,r){try{let s=new Bt(e,r);if(this[H])throw new Re;if(this[z])throw new jt;this[y].push(s),this[A]||(u.isStream(s.body)?(this[A]=1,process.nextTick(x,this)):x(this,!0))}catch(s){if(typeof r.onError!="function")throw new E("invalid onError method");r.onError(s)}}close(e){if(e===void 0)return new Promise((r,s)=>{this.close((n,h)=>n?s(n):r(h))});if(typeof e!="function")throw new E("invalid callback");if(this[H]){process.nextTick(e,new Re,null);return}this[z]=!0,this.size?this[q].push(e):this.destroy(e)}destroy(e,r){if(typeof e=="function"&&(r=e,e=null),r===void 0)return new Promise((n,h)=>{this.destroy(e,(o,l)=>o?h(o):n(l))});if(typeof r!="function")throw new E("invalid callback");if(this[H]){this[q]?this[q].push(r):process.nextTick(r,null,null);return}e||(e=new Re);for(let n of this[y].splice(this[R]))n.onError(e);this[z]=!0,this[H]=!0,this[q].push(r);let s=()=>{let n=this[q];this[q]=null;for(let h of n)h(null,null)};this[m]?u.destroy(this[m].on("close",s),e):process.nextTick(s),x(this)}},st=class extends T{constructor(e,r){if(be===12&&Ze<19){super();this.initialize(T.RESPONSE,{},0)}else if(be===12&&Ze>=19){super();this.initialize(T.RESPONSE,{},e[ve],0)}else if(be>12){super();this.initialize(T.RESPONSE,{},e[ve],Ft,0)}else super(T.RESPONSE,!1);this.client=e,this.socket=r,this.timeout=null,this.statusCode=null,this.upgrade=!1,this.headers=null,this.shouldKeepAlive=!1,this.request=null,this.paused=!1,this.resuming=!1,this.queue=[],this._resume=()=>{if(!(!this.paused||this.resuming)){for(this.paused=!1,this.resuming=!0;this.queue.length;){let[s,...n]=this.queue.shift();if(Reflect.apply(s,this,n),this.paused){this.resuming=!1;return}}this.resuming=!1,Qt(this.socket)}},this._pause=()=>{this.paused||(this.paused=!0,Gt(this.socket))}}[T.kOnHeaders](e){if(this.paused){this.queue.push([this[T.kOnHeaders],e]);return}this.headers?Array.prototype.push.apply(this.headers,e):this.headers=e}[T.kOnExecute](e){if(this.paused){this.queue.push([this[T.kOnExecute],e]);return}let{upgrade:r,socket:s}=this;if(!Number.isFinite(e)){f(e instanceof Error),u.destroy(s,e);return}if(r&&!s.destroyed){let{client:n,headers:h,statusCode:o,request:l}=this;f(!s.destroyed),f(s===n[m]),f(!s.isPaused()),f(s._handle&&s._handle.reading),f(l.upgrade),this.headers=null,this.statusCode=null,this.request=null,s._readableState.flowing=null,s.unshift(this.getCurrentBuffer().slice(e));try{l.onUpgrade(o,h,s),!s.destroyed&&!l.aborted&&(it(s),n[m]=null,n[y][n[b]++]=null,n.emit("disconnect",new M("upgrade"))),x(n)}catch(d){u.destroy(s,d)}}}[T.kOnHeadersComplete](e,r,s,n,h,o,l,d,a){if(this.paused){this.queue.push([this[T.kOnHeadersComplete],e,r,s,n,h,o,l,d,a]);return}let{client:i,socket:c}=this,p=i[y][i[b]];if(c.destroyed)return;if(clearTimeout(this.timeout),this.timeout=i[Le]?setTimeout(Vt,i[Le],this):null,f(!this.upgrade),f(this.statusCode<200),o===100)return u.destroy(c,new le("bad response")),1;if(p.upgrade!==!0&&d!==Boolean(p.upgrade))return u.destroy(c,new le("bad upgrade")),1;if(this.headers?Array.prototype.push.apply(this.headers,s):this.headers=s,this.statusCode=o,this.shouldKeepAlive=a,this.request=p,p.upgrade)return this.unconsume(),this.upgrade=!0,2;let k,L,{headers:_}=this;this.headers=null;for(let C=0;C<_.length;C+=2){let w=_[C+0],v=_[C+1];!k&&w.length===10&&w.toLowerCase()==="keep-alive"?k=v:!L&&w.length===7&&w.toLowerCase()==="trailer"&&(L=v)}if(this.trailers=L?L.toLowerCase().split(/,\s*/):null,a&&i[I]){let C=k?u.parseKeepAliveTimeout(k):null;if(C!=null){let w=Math.min(C-i[Xe],i[Je]);w<=0?c[O]=!0:i[ge]=w}else i[ge]=i[Ce]}else c[O]=!0;try{p.onHeaders(o,_,this._resume)===!1&&this._pause()}catch(C){return u.destroy(c,C),1}return p.method==="HEAD"||o<200?1:0}[T.kOnBody](e,r,s){if(this.paused){this.queue.push([this[T.kOnBody],e,r,s]);return}let{socket:n,statusCode:h,request:o,timeout:l}=this;if(!n.destroyed){l&&l.refresh&&l.refresh(),f(h>=200);try{o.onData(e.slice(r,r+s))===!1&&this._pause()}catch(d){u.destroy(n,d)}}}[T.kOnMessageComplete](){if(this.paused){this.queue.push([this[T.kOnMessageComplete]]);return}let{client:e,socket:r,statusCode:s,headers:n,upgrade:h,request:o,trailers:l}=this;if(!r.destroyed){if(f(s>=100),f(this.resuming||r._handle&&r._handle.reading),h){f(s<300||o.method==="CONNECT");return}if(this.statusCode=null,this.headers=null,this.request=null,this.trailers=null,clearTimeout(this.timeout),this.timeout=e[W]?setTimeout(nt,e[W],this):null,!(s<200)){try{if(l){if(!n)throw new Ge;for(let d of l){let a=!1;for(let i=0;i<n.length;i+=2){let c=n[i+0];if(c.length===d.length&&c.toLowerCase()===d.toLowerCase()){a=!0;break}}if(!a)throw new Ge}}try{o.onComplete(n)}catch(d){o.onError(d)}}catch(d){u.destroy(r,d);return}e[y][e[b]++]=null,r[U]?u.destroy(r,new M("reset")):this.shouldKeepAlive?r[O]&&!e.running?u.destroy(r,new M("reset")):x(e):u.destroy(r,new M("reset"))}}}destroy(){clearTimeout(this.timeout),this.timeout=null,this.unconsume(),setImmediate(e=>e.close(),this)}};function Vt(t){t.paused||u.destroy(t.socket,new zt)}function nt(t){u.destroy(t.socket,new Mt)}function Wt(){let{[j]:t}=this;t.emit("connect"),x(t)}function ot(t){let{[j]:e}=this;if(this[me]=t,t.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(f(!e.running);e.pending&&e[y][e[R]].host===e[de];)e[y][e[R]++].onError(t);else if(!e.running&&t.code!=="UND_ERR_INFO"&&t.code!=="UND_ERR_SOCKET"){f(e[R]===e[b]);for(let r of e[y].splice(e[b]))r.onError(t)}}function ut(){u.destroy(this,new le("other side closed"))}function it(t){clearTimeout(t[Q]),t[Q]=null,t[ye]=null,t[ce].destroy(),t[ce]=null,t[j]=null,t[me]=null,t.removeListener("session",at).removeListener("error",ot).removeListener("end",ut).removeListener("close",ht)}function ht(){let{[j]:t}=this,e=this[me]||new le("closed");if(it(this),t[m]=null,e.code!=="UND_ERR_INFO"&&(t[G]=null),t[H]){f(!t.pending);for(let r of t[y].splice(t[b]))r.onError(e);t[R]=t[b]}else t.running&&e.code!=="UND_ERR_INFO"&&(t[y][t[b]].onError(e),t[y][t[b]++]=null),t[R]=t[b],t.emit("disconnect",e);x(t)}function at(t){let{[j]:e}=this;e[G]=t}function rt(t){f(!t[m]);let{protocol:e,port:r,hostname:s}=t[N],n;if(e==="https:"){let o={...t[pe],servername:t[fe],session:t[G]};n=t[V]?Ve.connect(t[V],o):Ve.connect(r||443,s,o),n.on("session",at)}else n=t[V]?Fe.connect(t[V]):Fe.connect(r||80,s);t[m]=n;let h=new st(t,n);be>=12?(f(n._handle),h.consume(n._handle)):(f(n._handle&&n._handle._externalStream),h.consume(n._handle._externalStream)),n[Q]=null,n[ye]=null,n[U]=!1,n[O]=!1,n[me]=null,n[ce]=h,n[j]=t,n.setNoDelay(!0).on(e==="https:"?"secureConnect":"connect",Wt).on("error",ot).on("end",ut).on("close",ht)}function Gt(t){if(t._handle&&t._handle.reading){t._handle.reading=!1;let e=t._handle.readStop();e&&t.destroy(u.errnoException(e,"read"))}}function Qt(t){if(t._handle&&!t._handle.reading){t._handle.reading=!0;let e=t._handle.readStart();e&&t.destroy(u.errnoException(e,"read"))}}function lt(t){t[F]=0,t.emit("drain")}function x(t,e){t[A]!==2&&(t[A]=2,Jt(t,e),t[A]=0,t[b]>256&&(t[y].splice(0,t[b]),t[R]-=t[b],t[b]=0))}function Jt(t,e){for(;;){if(t[H]){f(!t.pending);return}if(t[z]&&!t.size){t.destroy(u.nop);continue}if(t[m]){let n=t[m],h=t.running?0:t[ge];n[ye]!==h&&(clearTimeout(n[Q]),h&&(n[Q]=setTimeout(o=>{u.destroy(o,new M("socket idle timeout"))},h,n)),n[ye]=h)}if(t.running){let{aborted:n}=t[y][t[b]];if(n){u.destroy(t[m]);return}}if(t.busy)t[F]=2;else if(t[F]===2){e?(t[F]=1,process.nextTick(lt,t)):lt(t);continue}if(!t.pending||t.running>=(t[I]||1))return;let r=t[m],s=t[y][t[R]];if(t[N].protocol==="https:"&&t[de]!==s.host){if(t.running)return;t[de]=s.host;let n=et(t,s.host);if(t[fe]!==n&&(t[fe]=n,t[G]=null,r)){u.destroy(r,new M("servername changed"));return}}if(!r){rt(t);return}if(!t.connected||r[U]||r[O]||t.running&&!s.idempotent||t.running&&s.upgrade||(u.isStream(s.body)&&u.bodyLength(s.body)===0&&(s.body.on("data",function(){f(!1)}).on("error",function(n){s.onError(n)}).on("end",function(){u.destroy(this)}),s.body=null),t.running&&u.isStream(s.body)))return;if(!s.aborted&&Xt(t,s)){let n=t[m][ce];!n.timeout&&t[W]&&(n.timeout=setTimeout(nt,t[W],n)),t[R]++}else t[y].splice(t[R],1)}}function Xt(t,e){let{body:r,method:s,path:n,host:h,upgrade:o,headers:l}=e,d=s==="PUT"||s==="POST"||s==="PATCH";r&&typeof r.read=="function"&&r.read(0);let a=u.bodyLength(r);if(a===null&&(a=e.contentLength),a===0&&!d&&(a=null),e.contentLength!==null&&e.contentLength!==a)return e.onError(new Se),!1;if(e.aborted)return!1;try{e.onConnect(p=>{e.aborted||(e.onError(p||new Qe),t[A]===0&&x(t,!0))})}catch(p){e.onError(p)}if(e.aborted)return!1;let i=t[m];s==="HEAD"&&(i[O]=!0),o&&(i[O]=!0);let c;if(typeof o=="string"?c=`${s} ${n} HTTP/1.1\r
`}}$e.exports=Me});var dt=$((nr,Ke)=>{"use strict";var Fe=require("net"),Ve=require("tls"),T=Ne(),Bt=require("events"),f=require("assert"),u=Ee(),$t=ze(),{ContentLengthMismatchError:Se,TrailerMismatchError:Ge,InvalidArgumentError:E,RequestAbortedError:Qe,HeadersTimeoutError:Mt,ClientDestroyedError:Re,ClientClosedError:jt,SocketError:le,InformationalError:M,BodyTimeoutError:zt}=he(),{kUrl:N,kReset:O,kHost:de,kClient:j,kParser:ce,kConnect:Kt,kResuming:H,kWriting:U,kQueue:y,kNeedDrain:F,kTLSServerName:fe,kKeepAliveDefaultTimeout:ve,kHostHeader:We,kTLSOpts:pe,kClosed:z,kDestroyed:D,kPendingIdx:R,kRunningIdx:b,kError:me,kOnDestroyed:q,kPipelining:I,kSocket:m,kSocketPath:V,kKeepAliveTimeoutValue:ge,kMaxHeadersSize:Ce,kKeepAliveMaxTimeout:Je,kKeepAliveTimeoutThreshold:Xe,kTLSSession:G,kIdleTimeout:Q,kIdleTimeoutValue:ye,kHeadersTimeout:W,kBodyTimeout:Le}=Te(),Ye=process.version.split("."),be=parseInt(Ye[0].slice(1)),Ze=parseInt(Ye[1]),Ft=process.execArgv.includes("--insecure-http-parser");function et(t,e){return u.getServerName(e)||t[pe]&&t[pe].servername||u.getServerName(t[N].host||t[N].hostname)||null}var tt=class extends Bt{constructor(e,{maxHeaderSize:r,headersTimeout:s,socketTimeout:n,requestTimeout:a,bodyTimeout:o,idleTimeout:l,keepAlive:d,keepAliveTimeout:h,maxKeepAliveTimeout:i,keepAliveMaxTimeout:c,keepAliveTimeoutThreshold:p,socketPath:k,pipelining:L,tls:_}={}){super();if(d!==void 0)throw new E("unsupported keepAlive, use pipelining=0 instead");if(n!==void 0)throw new E("unsupported socketTimeout, use headersTimeout & bodyTimeout instead");if(a!==void 0)throw new E("unsupported requestTimeout, use headersTimeout & bodyTimeout instead");if(l!==void 0)throw new E("unsupported idleTimeout, use keepAliveTimeout instead");if(i!==void 0)throw new E("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead");if(r!=null&&!Number.isFinite(r))throw new E("invalid maxHeaderSize");if(k!=null&&typeof k!="string")throw new E("invalid socketPath");if(h!=null&&(!Number.isFinite(h)||h<=0))throw new E("invalid keepAliveTimeout");if(c!=null&&(!Number.isFinite(c)||c<=0))throw new E("invalid keepAliveMaxTimeout");if(p!=null&&!Number.isFinite(p))throw new E("invalid keepAliveTimeoutThreshold");if(s!=null&&(!Number.isInteger(s)||s<0))throw new E("headersTimeout must be a positive integer or zero");if(o!=null&&(!Number.isInteger(o)||o<0))throw new E("bodyTimeout must be a positive integer or zero");this[m]=null,this[I]=L??1,this[Ce]=r||16384,this[N]=u.parseOrigin(e),this[V]=k,this[ve]=h??4e3,this[Je]=c??6e5,this[Xe]=p??1e3,this[ge]=this[ve],this[z]=!1,this[D]=!1,this[pe]=_,this[fe]=et(this),this[de]=null,this[q]=[],this[H]=0,this[F]=0,this[G]=null,this[We]=`host: ${this[N].hostname}${this[N].port?`:${this[N].port}`:""}\r
`,this[Le]=o??3e4,this[W]=s??3e4,this[y]=[],this[b]=0,this[R]=0}get url(){return this[N]}get pipelining(){return this[I]}set pipelining(e){this[I]=e,x(this,!0)}get connected(){return this[m]&&this[m].connecting!==!0&&(this[m].authorized!==!1||this[m].authorizationError)&&!this[m].destroyed}get pending(){return this[y].length-this[R]}get running(){return this[R]-this[b]}get size(){return this[y].length-this[b]}get busy(){let e=this[m];return e&&(e[O]||e[U])||this.size>=(this[I]||1)||this.pending>0}get destroyed(){return this[D]}get closed(){return this[z]}[Kt](e){rt(this),this.once("connect",e)}dispatch(e,r){try{let s=new $t(e,r);if(this[D])throw new Re;if(this[z])throw new jt;this[y].push(s),this[H]||(u.isStream(s.body)?(this[H]=1,process.nextTick(x,this)):x(this,!0))}catch(s){if(typeof r.onError!="function")throw new E("invalid onError method");r.onError(s)}}close(e){if(e===void 0)return new Promise((r,s)=>{this.close((n,a)=>n?s(n):r(a))});if(typeof e!="function")throw new E("invalid callback");if(this[D]){process.nextTick(e,new Re,null);return}this[z]=!0,this.size?this[q].push(e):this.destroy(e)}destroy(e,r){if(typeof e=="function"&&(r=e,e=null),r===void 0)return new Promise((n,a)=>{this.destroy(e,(o,l)=>o?a(o):n(l))});if(typeof r!="function")throw new E("invalid callback");if(this[D]){this[q]?this[q].push(r):process.nextTick(r,null,null);return}e||(e=new Re);for(let n of this[y].splice(this[R]))n.onError(e);this[z]=!0,this[D]=!0,this[q].push(r);let s=()=>{let n=this[q];this[q]=null;for(let a of n)a(null,null)};this[m]?u.destroy(this[m].on("close",s),e):process.nextTick(s),x(this)}},st=class extends T{constructor(e,r){if(be===12&&Ze<19){super();this.initialize(T.RESPONSE,{},0)}else if(be===12&&Ze>=19){super();this.initialize(T.RESPONSE,{},e[Ce],0)}else if(be>12){super();this.initialize(T.RESPONSE,{},e[Ce],Ft,0)}else super(T.RESPONSE,!1);this.client=e,this.socket=r,this.timeout=null,this.statusCode=null,this.upgrade=!1,this.headers=null,this.shouldKeepAlive=!1,this.request=null,this.paused=!1,this.resuming=!1,this.queue=[],this._resume=()=>{if(!(!this.paused||this.resuming)){for(this.paused=!1,this.resuming=!0;this.queue.length;){let[s,...n]=this.queue.shift();if(Reflect.apply(s,this,n),this.paused){this.resuming=!1;return}}this.resuming=!1,Qt(this.socket)}},this._pause=()=>{this.paused||(this.paused=!0,Gt(this.socket))}}[T.kOnHeaders](e){if(this.paused){this.queue.push([this[T.kOnHeaders],e]);return}this.headers?Array.prototype.push.apply(this.headers,e):this.headers=e}[T.kOnExecute](e){if(this.paused){this.queue.push([this[T.kOnExecute],e]);return}let{upgrade:r,socket:s}=this;if(!Number.isFinite(e)){f(e instanceof Error),u.destroy(s,e);return}if(r&&!s.destroyed){let{client:n,headers:a,statusCode:o,request:l}=this;f(!s.destroyed),f(s===n[m]),f(!s.isPaused()),f(s._handle&&s._handle.reading),f(l.upgrade),this.headers=null,this.statusCode=null,this.request=null,s._readableState.flowing=null,s.unshift(this.getCurrentBuffer().slice(e));try{l.onUpgrade(o,a,s),!s.destroyed&&!l.aborted&&(it(s),n[m]=null,n[y][n[b]++]=null,n.emit("disconnect",new M("upgrade"))),x(n)}catch(d){u.destroy(s,d)}}}[T.kOnHeadersComplete](e,r,s,n,a,o,l,d,h){if(this.paused){this.queue.push([this[T.kOnHeadersComplete],e,r,s,n,a,o,l,d,h]);return}let{client:i,socket:c}=this,p=i[y][i[b]];if(c.destroyed)return;if(clearTimeout(this.timeout),this.timeout=i[Le]?setTimeout(Vt,i[Le],this):null,f(!this.upgrade),f(this.statusCode<200),o===100)return u.destroy(c,new le("bad response")),1;if(p.upgrade!==!0&&d!==Boolean(p.upgrade))return u.destroy(c,new le("bad upgrade")),1;if(this.headers?Array.prototype.push.apply(this.headers,s):this.headers=s,this.statusCode=o,this.shouldKeepAlive=h,this.request=p,p.upgrade)return this.unconsume(),this.upgrade=!0,2;let k,L,{headers:_}=this;this.headers=null;for(let v=0;v<_.length;v+=2){let w=_[v+0],C=_[v+1];!k&&w.length===10&&w.toLowerCase()==="keep-alive"?k=C:!L&&w.length===7&&w.toLowerCase()==="trailer"&&(L=C)}if(this.trailers=L?L.toLowerCase().split(/,\s*/):null,h&&i[I]){let v=k?u.parseKeepAliveTimeout(k):null;if(v!=null){let w=Math.min(v-i[Xe],i[Je]);w<=0?c[O]=!0:i[ge]=w}else i[ge]=i[ve]}else c[O]=!0;try{p.onHeaders(o,_,this._resume)===!1&&this._pause()}catch(v){return u.destroy(c,v),1}return p.method==="HEAD"||o<200?1:0}[T.kOnBody](e,r,s){if(this.paused){this.queue.push([this[T.kOnBody],e,r,s]);return}let{socket:n,statusCode:a,request:o,timeout:l}=this;if(!n.destroyed){l&&l.refresh&&l.refresh(),f(a>=200);try{o.onData(e.slice(r,r+s))===!1&&this._pause()}catch(d){u.destroy(n,d)}}}[T.kOnMessageComplete](){if(this.paused){this.queue.push([this[T.kOnMessageComplete]]);return}let{client:e,socket:r,statusCode:s,headers:n,upgrade:a,request:o,trailers:l}=this;if(!r.destroyed){if(f(s>=100),f(this.resuming||r._handle&&r._handle.reading),a){f(s<300||o.method==="CONNECT");return}if(this.statusCode=null,this.headers=null,this.request=null,this.trailers=null,clearTimeout(this.timeout),this.timeout=e[W]?setTimeout(nt,e[W],this):null,!(s<200)){try{if(l){if(!n)throw new Ge;for(let d of l){let h=!1;for(let i=0;i<n.length;i+=2){let c=n[i+0];if(c.length===d.length&&c.toLowerCase()===d.toLowerCase()){h=!0;break}}if(!h)throw new Ge}}try{o.onComplete(n)}catch(d){o.onError(d)}}catch(d){u.destroy(r,d);return}e[y][e[b]++]=null,r[U]?u.destroy(r,new M("reset")):this.shouldKeepAlive?r[O]&&!e.running?u.destroy(r,new M("reset")):x(e):u.destroy(r,new M("reset"))}}}destroy(){clearTimeout(this.timeout),this.timeout=null,this.unconsume(),setImmediate(e=>e.close(),this)}};function Vt(t){t.paused||u.destroy(t.socket,new zt)}function nt(t){u.destroy(t.socket,new Mt)}function Wt(){let{[j]:t}=this;t.emit("connect"),x(t)}function ot(t){let{[j]:e}=this;if(this[me]=t,t.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(f(!e.running);e.pending&&e[y][e[R]].host===e[de];)e[y][e[R]++].onError(t);else if(!e.running&&t.code!=="UND_ERR_INFO"&&t.code!=="UND_ERR_SOCKET"){f(e[R]===e[b]);for(let r of e[y].splice(e[b]))r.onError(t)}}function ut(){u.destroy(this,new le("other side closed"))}function it(t){clearTimeout(t[Q]),t[Q]=null,t[ye]=null,t[ce].destroy(),t[ce]=null,t[j]=null,t[me]=null,t.removeListener("session",ht).removeListener("error",ot).removeListener("end",ut).removeListener("close",at)}function at(){let{[j]:t}=this,e=this[me]||new le("closed");if(it(this),t[m]=null,e.code!=="UND_ERR_INFO"&&(t[G]=null),t[D]){f(!t.pending);for(let r of t[y].splice(t[b]))r.onError(e);t[R]=t[b]}else t.running&&e.code!=="UND_ERR_INFO"&&(t[y][t[b]].onError(e),t[y][t[b]++]=null),t[R]=t[b],t.emit("disconnect",e);x(t)}function ht(t){let{[j]:e}=this;e[G]=t}function rt(t){f(!t[m]);let{protocol:e,port:r,hostname:s}=t[N],n;if(e==="https:"){let o={...t[pe],servername:t[fe],session:t[G]};n=t[V]?Ve.connect(t[V],o):Ve.connect(r||443,s,o),n.on("session",ht)}else n=t[V]?Fe.connect(t[V]):Fe.connect(r||80,s);t[m]=n;let a=new st(t,n);be>=12?(f(n._handle),a.consume(n._handle)):(f(n._handle&&n._handle._externalStream),a.consume(n._handle._externalStream)),n[Q]=null,n[ye]=null,n[U]=!1,n[O]=!1,n[me]=null,n[ce]=a,n[j]=t,n.setNoDelay(!0).on(e==="https:"?"secureConnect":"connect",Wt).on("error",ot).on("end",ut).on("close",at)}function Gt(t){if(t._handle&&t._handle.reading){t._handle.reading=!1;let e=t._handle.readStop();e&&t.destroy(u.errnoException(e,"read"))}}function Qt(t){if(t._handle&&!t._handle.reading){t._handle.reading=!0;let e=t._handle.readStart();e&&t.destroy(u.errnoException(e,"read"))}}function lt(t){t[F]=0,t.emit("drain")}function x(t,e){t[H]!==2&&(t[H]=2,Jt(t,e),t[H]=0,t[b]>256&&(t[y].splice(0,t[b]),t[R]-=t[b],t[b]=0))}function Jt(t,e){for(;;){if(t[D]){f(!t.pending);return}if(t[z]&&!t.size){t.destroy(u.nop);continue}if(t[m]){let n=t[m],a=t.running?0:t[ge];n[ye]!==a&&(clearTimeout(n[Q]),a&&(n[Q]=setTimeout(o=>{u.destroy(o,new M("socket idle timeout"))},a,n)),n[ye]=a)}if(t.running){let{aborted:n}=t[y][t[b]];if(n){u.destroy(t[m]);return}}if(t.busy)t[F]=2;else if(t[F]===2){e?(t[F]=1,process.nextTick(lt,t)):lt(t);continue}if(!t.pending||t.running>=(t[I]||1))return;let r=t[m],s=t[y][t[R]];if(t[N].protocol==="https:"&&t[de]!==s.host){if(t.running)return;t[de]=s.host;let n=et(t,s.host);if(t[fe]!==n&&(t[fe]=n,t[G]=null,r)){u.destroy(r,new M("servername changed"));return}}if(!r){rt(t);return}if(!t.connected||r[U]||r[O]||t.running&&!s.idempotent||t.running&&s.upgrade||(u.isStream(s.body)&&u.bodyLength(s.body)===0&&(s.body.on("data",function(){f(!1)}).on("error",function(n){s.onError(n)}).on("end",function(){u.destroy(this)}),s.body=null),t.running&&u.isStream(s.body)))return;if(!s.aborted&&Xt(t,s)){let n=t[m][ce];!n.timeout&&t[W]&&(n.timeout=setTimeout(nt,t[W],n)),t[R]++}else t[y].splice(t[R],1)}}function Xt(t,e){let{body:r,method:s,path:n,host:a,upgrade:o,headers:l}=e,d=s==="PUT"||s==="POST"||s==="PATCH";r&&typeof r.read=="function"&&r.read(0);let h=u.bodyLength(r);if(h===null&&(h=e.contentLength),h===0&&!d&&(h=null),e.contentLength!==null&&e.contentLength!==h)return e.onError(new Se),!1;if(e.aborted)return!1;try{e.onConnect(p=>{e.aborted||(e.onError(p||new Qe),t[H]===0&&x(t,!0))})}catch(p){e.onError(p)}if(e.aborted)return!1;let i=t[m];s==="HEAD"&&(i[O]=!0),o&&(i[O]=!0);let c;if(typeof o=="string"?c=`${s} ${n} HTTP/1.1\r
connection: upgrade\r

@@ -11,21 +11,21 @@ upgrade: ${o}\r

connection: close\r
`,h||(c+=t[We]),l&&(c+=l),!r)a===0?i.write(`${c}content-length: ${a}\r
`,a||(c+=t[We]),l&&(c+=l),!r)h===0?i.write(`${c}content-length: ${h}\r
\r
\r
`,"ascii"):(f(a===null,"no body must not have content length"),i.write(`${c}\r
`,"ascii"));else if(u.isBuffer(r))f(a!==null,"buffer body must have content length"),i.cork(),i.write(`${c}content-length: ${a}\r
`,"ascii"):(f(h===null,"no body must not have content length"),i.write(`${c}\r
`,"ascii"));else if(u.isBuffer(r))f(h!==null,"buffer body must have content length"),i.cork(),i.write(`${c}content-length: ${h}\r
\r
`,"ascii"),i.write(r),i.write(`\r
`,"ascii"),i.uncork(),d||(i[O]=!0);else{i[U]=!0,f(u.isStream(r)),f(a!==0||!t.running,"stream body cannot be pipelined");let p=!1,k=0,L=function(v){try{f(!p);let $=Buffer.byteLength(v);if(!$)return;if(a!==null&&k+$>a){u.destroy(i,new Se);return}k===0&&(d||(i[O]=!0),a===null?i.write(`${c}transfer-encoding: chunked\r
`,"ascii"):i.write(`${c}content-length: ${a}\r
`,"ascii"),i.uncork(),d||(i[O]=!0);else{i[U]=!0,f(u.isStream(r)),f(h!==0||!t.running,"stream body cannot be pipelined");let p=!1,k=0,L=function(C){try{f(!p);let B=Buffer.byteLength(C);if(!B)return;if(h!==null&&k+B>h){u.destroy(i,new Se);return}k===0&&(d||(i[O]=!0),h===null?i.write(`${c}transfer-encoding: chunked\r
`,"ascii"):i.write(`${c}content-length: ${h}\r
\r
`,"ascii")),a===null&&i.write(`\r
${$.toString(16)}\r
`,"ascii"),k+=$,!i.write(v)&&this.pause&&this.pause()}catch($){u.destroy(this,$)}},_=function(){f(!p),r.resume&&r.resume()},C=function(){w(new Qe)},w=function(v){p||(p=!0,f(i.destroyed||i[U]&&t.running<=1),i[U]=!1,!v&&a!==null&&k!==a&&(v=new Se),i.removeListener("drain",_).removeListener("error",w),r.removeListener("data",L).removeListener("end",w).removeListener("error",w).removeListener("close",C),u.destroy(r,v),v&&(f(t.running<=1,"pipeline should only contain this request"),u.destroy(i,v)),!i.destroyed&&(k===0?d?i.write(`${c}content-length: 0\r
`,"ascii")),h===null&&i.write(`\r
${B.toString(16)}\r
`,"ascii"),k+=B,!i.write(C)&&this.pause&&this.pause()}catch(B){u.destroy(this,B)}},_=function(){f(!p),r.resume&&r.resume()},v=function(){w(new Qe)},w=function(C){p||(p=!0,f(i.destroyed||i[U]&&t.running<=1),i[U]=!1,!C&&h!==null&&k!==h&&(C=new Se),i.removeListener("drain",_).removeListener("error",w),r.removeListener("data",L).removeListener("end",w).removeListener("error",w).removeListener("close",v),u.destroy(r,C),C&&(f(t.running<=1,"pipeline should only contain this request"),u.destroy(i,C)),!i.destroyed&&(k===0?d?i.write(`${c}content-length: 0\r
\r
\r
`,"ascii"):i.write(`${c}\r
`,"ascii"):a===null&&i.write(`\r
`,"ascii"):h===null&&i.write(`\r
0\r
\r
`,"ascii"),x(t)))};r.on("data",L).on("end",w).on("error",w).on("close",C),i.on("drain",_).on("error",w)}return!0}Ke.exports=tt});var ct=J(dt());var Oe=class{constructor(){this.body=Buffer.alloc(0);this.headers={};this.statusCode=null}_addChunk(e){this.body=Buffer.concat([this.body,e])}_parseHeaders(e){for(let r=1;r<e.length;r+=2){let s=e[r-1].toLowerCase(),n=this.headers[s];n?(Array.isArray(n)||(n=[n],this.headers[s]=n),n.push(e[r])):this.headers[s]=e[r]}}json(){return JSON.parse(String.fromCharCode(...this.body.toJSON().data))}text(){return this.body.toString("utf-8")}};var ft=J(require("url")),pt=J(require("path")),mt=J(require("querystring")),xe=class{constructor(e,r="GET"){this.coreOptions={};this.httpMethod="GET";this.reqHeaders={};this.timeoutOptions={};if(this.url=typeof e=="string"?new ft.URL(e):e,this.httpMethod=r,!["http:","https:"].includes(this.url.protocol))throw new Error(`Bad URL protocol: ${this.url.protocol}`)}client(e,r){return this.kClient=e,r&&(this.keepClient=!0),this}query(e,r){return typeof e=="object"?Object.keys(e).forEach(s=>{this.url.searchParams.append(s,e[s])}):this.url.searchParams.append(e,r),this}path(e){return this.url.pathname=(0,pt.join)(this.url.pathname,e),this}body(e,r){return r==="json"||typeof e=="object"&&!Buffer.isBuffer(e)?(this.reqHeaders["content-type"]="application/json",this.data=JSON.stringify(e)):r==="form"?(this.reqHeaders["content-type"]="application/x-www-form-urlencoded",this.data=(0,mt.stringify)(e)):this.data=e,this.reqHeaders["content-length"]=Buffer.byteLength(this.data).toString(),this}header(e,r){return typeof e=="object"?Object.keys(e).forEach(s=>{this.reqHeaders[s.toLowerCase()]=e[s]}):this.reqHeaders[e.toLowerCase()]=r,this}method(e){return this.httpMethod=e,this}timeout(e,r){return typeof e=="string"?this.timeoutOptions[e]=r:this.timeoutOptions.bodyTimeout=e,this}option(e,r){return typeof e=="object"?this.coreOptions={...this.coreOptions,...e}:this.coreOptions[e]=r,this}async json(){return(await this.send()).json()}async raw(){return(await this.send()).body}async text(){return(await this.send()).text()}send(){return new Promise((e,r)=>{let s={path:this.url.pathname+this.url.search,method:this.httpMethod,headers:this.reqHeaders,body:this.data},n=this.kClient??new ct.default(this.url.origin,this.coreOptions),h=new Oe;n.dispatch(s,{onData:o=>h._addChunk(o),onError:o=>r(o),onComplete:()=>{this.keepClient||n.close(),e(h)},onConnect:()=>null,onHeaders:(o,l,d)=>{h.statusCode=o,h._parseHeaders(l),d()}})})}};module.exports=function(e,r="GET"){return new xe(e,r)};
`,"ascii"),x(t)))};r.on("data",L).on("end",w).on("error",w).on("close",v),i.on("drain",_).on("error",w)}return!0}Ke.exports=tt});var ct=J(dt());var Oe=class{constructor(){this.body=Buffer.alloc(0);this.headers={};this.statusCode=null}_addChunk(e){this.body=Buffer.concat([this.body,e])}_parseHeaders(e){for(let r=1;r<e.length;r+=2){let s=e[r-1].toLowerCase(),n=this.headers[s];n?(Array.isArray(n)||(n=[n],this.headers[s]=n),n.push(e[r])):this.headers[s]=e[r]}}json(e="utf8"){return JSON.parse(this.body.toString(e))}text(e="utf8"){return this.body.toString(e)}};var ft=J(require("url")),pt=J(require("path")),mt=J(require("querystring")),xe=class{constructor(e,r="GET"){this.coreOptions={};this.httpMethod="GET";this.reqHeaders={};this.timeoutOptions={};if(this.url=typeof e=="string"?new ft.URL(e):e,this.httpMethod=r,!["http:","https:"].includes(this.url.protocol))throw new Error(`Bad URL protocol: ${this.url.protocol}`)}client(e,r){return this.kClient=e,r&&(this.keepClient=!0),this}query(e,r){if(typeof e=="object")for(let s of Object.keys(e))this.url.searchParams.append(s,e[s]);else this.url.searchParams.append(e,r);return this}path(e){return this.url.pathname=(0,pt.join)(this.url.pathname,e),this}body(e,r){switch(r){case"json":{this.data=JSON.stringify(e),this.header({"content-type":"application/json","content-length":Buffer.byteLength(this.data).toString()});break}case"form":{this.data=(0,mt.stringify)(e),this.header({"content-type":"application/x-www-form-urlencoded","content-length":Buffer.byteLength(this.data).toString()});break}case"stream":{this.data=e;break}default:{typeof e=="object"&&!Buffer.isBuffer(e)?(this.data=JSON.stringify(e),this.header({"content-type":"application/json","content-length":Buffer.byteLength(this.data).toString()})):(this.data=e,this.header("content-length",Buffer.byteLength(this.data).toString()));break}}return this}header(e,r){if(typeof e=="object")for(let s of Object.keys(e))this.reqHeaders[s.toLowerCase()]=e[s];else this.reqHeaders[e.toLowerCase()]=r;return this}method(e){return this.httpMethod=e,this}timeout(e,r){return typeof e=="string"?this.timeoutOptions[e]=r:this.timeoutOptions.bodyTimeout=e,this}option(e,r){return typeof e=="object"?Object.assign(this.coreOptions,e):this.coreOptions[e]=r,this}async json(){return(await this.send()).json()}async raw(){return(await this.send()).body}async text(){return(await this.send()).text()}send(){return new Promise((e,r)=>{let s={path:this.url.pathname+this.url.search,method:this.httpMethod,headers:this.reqHeaders,body:this.data},n=this.kClient??new ct.default(this.url.origin,this.coreOptions),a=new Oe;n.dispatch(s,{onData:o=>a._addChunk(o),onError:o=>r(o),onComplete:()=>{this.keepClient||n.close(),e(a)},onConnect:()=>null,onHeaders:(o,l,d)=>{a.statusCode=o,a._parseHeaders(l),d()}})})}};module.exports=function(e,r="GET"){return new xe(e,r)};

@@ -9,2 +9,3 @@ /**

import { PetitioResponse } from "./PetitioResponse";
import type { Readable } from "stream";
import { URL } from "url";

@@ -31,4 +32,6 @@ /**

* The data to be sent as the request body.
* This will be a buffer or string for normal requests, or a stream.Readable
* if the request is to be sent as a stream.
*/
data?: string | Buffer;
data?: Buffer | string | Readable;
/**

@@ -116,2 +119,9 @@ * @see [[HTTPMethod]]

/**
* @param {*} data The data to be set for the request body.
* @param {*} sendAs If data is a stream.Readable *AND* this is set to
* `stream`, the body will be sent as the stream with no modifications to
* it or the headers.
*/
body(data: Readable, sendAs: "stream"): this;
/**
* @param {*} header The encoded header name to set.

@@ -118,0 +128,0 @@ * @param {*} value The value to set the header to.

@@ -44,9 +44,11 @@ /**

* @template T Type casting parameter for the JSON result.
* @return {*} A serialized object result parsed from the response body.
* @param {BufferEncoding} [encoding="utf8"] The encoding to use when parsing the response body.
* @return {T} A serialized object result parsed from the response body.
*/
json<T = any>(): T;
json<T = any>(encoding?: BufferEncoding): T;
/**
* @return {*} The response body decoded as a UTF-8 string from the buffer.
* @param {BufferEncoding} [encoding="utf8"] The encoding to use.
* @return {string} The response body decoded as as a string from the buffer, using either the encoding specified in `encoding` or UTF-8 by default..
*/
text(): string;
text(encoding?: BufferEncoding): string;
}
{
"name": "petitio",
"version": "1.1.0",
"version": "1.2.0",
"description": "Zero-dependency HTTP library designed to be simple, fast, and type-strong.",

@@ -25,3 +25,4 @@ "main": "dist/index.js",

"test:coverage": "jest --coverage",
"lint": "eslint src tests --ext ts --fix"
"lint": "eslint src tests --ext ts --fix",
"lint:docs": "eslint docs --fix"
},

@@ -36,3 +37,4 @@ "author": "Vetlix <vetlixk@gmail.com> doge <doge@helper.wtf> Nytelife26 <nytelife@protonmail.com> (https://github.com/Nytelife26)",

"@jest/types": "^26.6.2",
"@kludge-cs/eslint-config-ts": "^1.0.8",
"@kludge-cs/eslint-config-js": "^1.2.0",
"@kludge-cs/eslint-config-ts": "^2.0.0",
"@semantic-release/changelog": "^5.0.1",

@@ -50,3 +52,3 @@ "@semantic-release/commit-analyzer": "^8.0.1",

"eslint": "^7.22.0",
"eslint-plugin-json": "^2.1.2",
"eslint-plugin-react": "^7.23.1",
"gen-esm-wrapper": "^1.1.1",

@@ -64,3 +66,6 @@ "husky": "^5.1.3",

"undici": "^3.3.3"
},
"engines": {
"node": ">=12.0.0"
}
}

@@ -11,4 +11,4 @@ # petitio

- [Docs](https://helperdiscord.github.io/petitio)
- [Usage examples](USAGE.md)
- [Benchmarks / comparison](PERFORMANCE.md)
- [Usage examples](https://github.com/helperdiscord/petitio/tree/master/USAGE.md)
- [Benchmarks / comparison](https://github.com/helperdiscord/petitio/tree/master/PERFORMANCE.md)

@@ -15,0 +15,0 @@ ## What's with the name?

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc