@nexload-sdk/logger 1.0.1
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/.turbo/turbo-build.log +10 -0
- package/.turbo/turbo-lint.log +13 -0
- package/CHANGELOG.md +18 -0
- package/dist/index.cjs +29 -0
- package/dist/index.cjs.map +7 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +29 -0
- package/dist/index.mjs.map +7 -0
- package/dist/next-js.d.ts +25 -0
- package/dist/next-js.d.ts.map +1 -0
- package/esbuild.config.mjs +5 -0
- package/eslint.config.mjs +4 -0
- package/package.json +32 -0
- package/src/index.ts +38 -0
- package/src/next-js.ts +105 -0
- package/tsconfig.json +10 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @nexload-sdk/logger@0.0.0 build /Users/mm25zamanian/Codes/nexload-sdk/packages/logger
|
|
4
|
+
> node esbuild.config.mjs
|
|
5
|
+
|
|
6
|
+
1. Cleaning dist directory...
|
|
7
|
+
2. Building JS outputs (CJS & ESM) via esbuild...
|
|
8
|
+
3. Generating TypeScript declarations via tsc...
|
|
9
|
+
Build successful!
|
|
10
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @nexload-sdk/logger@0.0.0 lint /Users/mm25zamanian/Codes/nexload-sdk/packages/logger
|
|
4
|
+
> eslint .
|
|
5
|
+
|
|
6
|
+
[0m[0m
|
|
7
|
+
[0m[4m/Users/mm25zamanian/Codes/nexload-sdk/packages/logger/index.ts[24m[0m
|
|
8
|
+
[0m [2m1:1[22m [33mwarning[39m Unexpected console statement [2mno-console[22m[0m
|
|
9
|
+
[0m [2m1:23[22m [33mwarning[39m Newline required at end of file but not found [2m@stylistic/eol-last[22m[0m
|
|
10
|
+
[0m[0m
|
|
11
|
+
[0m[33m[1m✖ 2 problems (0 errors, 2 warnings)[22m[39m[0m
|
|
12
|
+
[0m[33m[1m[22m[39m[33m[1m 0 errors and 1 warning potentially fixable with the `--fix` option.[22m[39m[0m
|
|
13
|
+
[0m[33m[1m[22m[39m[0m
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# @nexload-sdk/logger
|
|
2
|
+
|
|
3
|
+
## 1.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c96fe18: publish access
|
|
8
|
+
|
|
9
|
+
## 1.0.0
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
12
|
+
|
|
13
|
+
- 8093666: initial first verison
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [8093666]
|
|
18
|
+
- @nexload-sdk/env@1.0.0
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// @nexload-sdk/logger v0.0.0 (build 2025-10-29T16:03:29.224Z)
|
|
2
|
+
"use strict";var $o=Object.create;var Oe=Object.defineProperty;var Ro=Object.getOwnPropertyDescriptor;var Io=Object.getOwnPropertyNames;var ko=Object.getPrototypeOf,Fo=Object.prototype.hasOwnProperty;var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Wo=(e,t)=>{for(var r in t)Oe(e,r,{get:t[r],enumerable:!0})},$r=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Io(t))!Fo.call(e,i)&&i!==r&&Oe(e,i,{get:()=>t[i],enumerable:!(n=Ro(t,i))||n.enumerable});return e};var Rr=(e,t,r)=>(r=e!=null?$o(ko(e)):{},$r(t||!e||!e.__esModule?Oe(r,"default",{value:e,enumerable:!0}):r,e)),Ko=e=>$r(Oe({},"__esModule",{value:!0}),e);var ut=v((bg,Gr)=>{"use strict";var de=e=>e&&typeof e.message=="string",ot=e=>{if(!e)return;let t=e.cause;if(typeof t=="function"){let r=e.cause();return de(r)?r:void 0}else return de(t)?t:void 0},Vr=(e,t)=>{if(!de(e))return"";let r=e.stack||"";if(t.has(e))return r+`
|
|
3
|
+
causes have become circular...`;let n=ot(e);return n?(t.add(e),r+`
|
|
4
|
+
caused by: `+Vr(n,t)):r},tu=e=>Vr(e,new Set),Ur=(e,t,r)=>{if(!de(e))return"";let n=r?"":e.message||"";if(t.has(e))return n+": ...";let i=ot(e);if(i){t.add(e);let s=typeof e.cause=="function";return n+(s?"":": ")+Ur(i,t,s)}else return n},ru=e=>Ur(e,new Set);Gr.exports={isErrorLike:de,getErrorCause:ot,stackWithCauses:tu,messageWithCauses:ru}});var ft=v((wg,Jr)=>{"use strict";var nu=Symbol("circular-ref-tag"),_e=Symbol("pino-raw-err-ref"),Hr=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[_e]},set:function(e){this[_e]=e}}});Object.defineProperty(Hr,_e,{writable:!0,value:{}});Jr.exports={pinoErrProto:Hr,pinoErrorSymbols:{seen:nu,rawSymbol:_e}}});var Zr=v((Sg,Xr)=>{"use strict";Xr.exports=lt;var{messageWithCauses:iu,stackWithCauses:su,isErrorLike:Yr}=ut(),{pinoErrProto:ou,pinoErrorSymbols:uu}=ft(),{seen:ct}=uu,{toString:fu}=Object.prototype;function lt(e){if(!Yr(e))return e;e[ct]=void 0;let t=Object.create(ou);t.type=fu.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=iu(e),t.stack=su(e),Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>lt(r)));for(let r in e)if(t[r]===void 0){let n=e[r];Yr(n)?r!=="cause"&&!Object.prototype.hasOwnProperty.call(n,ct)&&(t[r]=lt(n)):t[r]=n}return delete e[ct],t.raw=e,t}});var en=v((Eg,Qr)=>{"use strict";Qr.exports=xe;var{isErrorLike:at}=ut(),{pinoErrProto:cu,pinoErrorSymbols:lu}=ft(),{seen:Le}=lu,{toString:au}=Object.prototype;function xe(e){if(!at(e))return e;e[Le]=void 0;let t=Object.create(cu);t.type=au.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=e.message,t.stack=e.stack,Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>xe(r))),at(e.cause)&&!Object.prototype.hasOwnProperty.call(e.cause,Le)&&(t.cause=xe(e.cause));for(let r in e)if(t[r]===void 0){let n=e[r];at(n)?Object.prototype.hasOwnProperty.call(n,Le)||(t[r]=xe(n)):t[r]=n}return delete e[Le],t.raw=e,t}});var sn=v((vg,nn)=>{"use strict";nn.exports={mapHttpRequest:du,reqSerializer:rn};var dt=Symbol("pino-raw-req-ref"),tn=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[dt]},set:function(e){this[dt]=e}}});Object.defineProperty(tn,dt,{writable:!0,value:{}});function rn(e){let t=e.info||e.socket,r=Object.create(tn);if(r.id=typeof e.id=="function"?e.id():e.id||(e.info?e.info.id:void 0),r.method=e.method,e.originalUrl)r.url=e.originalUrl;else{let n=e.path;r.url=typeof n=="string"?n:e.url?e.url.path||e.url:void 0}return e.query&&(r.query=e.query),e.params&&(r.params=e.params),r.headers=e.headers,r.remoteAddress=t&&t.remoteAddress,r.remotePort=t&&t.remotePort,r.raw=e.raw||e,r}function du(e){return{req:rn(e)}}});var cn=v((Og,fn)=>{"use strict";fn.exports={mapHttpResponse:hu,resSerializer:un};var ht=Symbol("pino-raw-res-ref"),on=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[ht]},set:function(e){this[ht]=e}}});Object.defineProperty(on,ht,{writable:!0,value:{}});function un(e){let t=Object.create(on);return t.statusCode=e.headersSent?e.statusCode:null,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}function hu(e){return{res:un(e)}}});var gt=v((_g,ln)=>{"use strict";var yt=Zr(),yu=en(),Ce=sn(),Te=cn();ln.exports={err:yt,errWithCause:yu,mapHttpRequest:Ce.mapHttpRequest,mapHttpResponse:Te.mapHttpResponse,req:Ce.reqSerializer,res:Te.resSerializer,wrapErrorSerializer:function(t){return t===yt?t:function(n){return t(yt(n))}},wrapRequestSerializer:function(t){return t===Ce.reqSerializer?t:function(n){return t(Ce.reqSerializer(n))}},wrapResponseSerializer:function(t){return t===Te.resSerializer?t:function(n){return t(Te.resSerializer(n))}}}});var pt=v((Lg,an)=>{"use strict";function gu(e,t){return t}an.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=gu;let r=new Error().stack;if(Error.prepareStackTrace=t,!Array.isArray(r))return;let n=r.slice(2),i=[];for(let s of n)s&&i.push(s.getFileName());return i}});var mn=v((xg,pn)=>{"use strict";function mt(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array){let t=[];for(let r=0;r<e.length;r++)t[r]=mt(e[r]);return t}if(typeof e=="object"){let t=Object.create(Object.getPrototypeOf(e));for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=mt(e[r]));return t}return e}function dn(e){let t=[],r="",n=!1,i=!1,s="";for(let o=0;o<e.length;o++){let u=e[o];!n&&u==="."?r&&(t.push(r),r=""):u==="["?(r&&(t.push(r),r=""),n=!0):u==="]"&&n?(t.push(r),r="",n=!1,i=!1):(u==='"'||u==="'")&&n?i?u===s?(i=!1,s=""):r+=u:(i=!0,s=u):r+=u}return r&&t.push(r),t}function hn(e,t,r){let n=e;for(let s=0;s<t.length-1;s++){let o=t[s];if(typeof n!="object"||n===null||!(o in n)||typeof n[o]!="object"||n[o]===null)return!1;n=n[o]}let i=t[t.length-1];if(i==="*"){if(Array.isArray(n))for(let s=0;s<n.length;s++)n[s]=r;else if(typeof n=="object"&&n!==null)for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&(n[s]=r)}else typeof n=="object"&&n!==null&&i in n&&Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=r);return!0}function yn(e,t){let r=e;for(let i=0;i<t.length-1;i++){let s=t[i];if(typeof r!="object"||r===null||!(s in r)||typeof r[s]!="object"||r[s]===null)return!1;r=r[s]}let n=t[t.length-1];if(n==="*"){if(Array.isArray(r))for(let i=0;i<r.length;i++)r[i]=void 0;else if(typeof r=="object"&&r!==null)for(let i in r)Object.prototype.hasOwnProperty.call(r,i)&&delete r[i]}else typeof r=="object"&&r!==null&&n in r&&Object.prototype.hasOwnProperty.call(r,n)&&delete r[n];return!0}var Ae=Symbol("PATH_NOT_FOUND");function pu(e,t){let r=e;for(let n of t){if(r==null||typeof r!="object"||r===null||!(n in r))return Ae;r=r[n]}return r}function mu(e,t){let r=e;for(let n of t){if(r==null||typeof r!="object"||r===null)return;r=r[n]}return r}function bu(e,t,r,n=!1){for(let i of t){let s=dn(i);if(s.includes("*"))gn(e,s,r,i,n);else if(n)yn(e,s);else{let o=pu(e,s);if(o===Ae)continue;let u=typeof r=="function"?r(o,s):r;hn(e,s,u)}}}function gn(e,t,r,n,i=!1){let s=t.indexOf("*");if(s===t.length-1){let o=t.slice(0,-1),u=e;for(let f of o){if(u==null||typeof u!="object"||u===null)return;u=u[f]}if(Array.isArray(u))if(i)for(let f=0;f<u.length;f++)u[f]=void 0;else for(let f=0;f<u.length;f++){let a=[...o,f.toString()],d=typeof r=="function"?r(u[f],a):r;u[f]=d}else if(typeof u=="object"&&u!==null)if(i){let f=[];for(let a in u)Object.prototype.hasOwnProperty.call(u,a)&&f.push(a);for(let a of f)delete u[a]}else for(let f in u){let a=[...o,f],d=typeof r=="function"?r(u[f],a):r;u[f]=d}}else wu(e,t,r,s,n,i)}function wu(e,t,r,n,i,s=!1){let o=t.slice(0,n),u=t.slice(n+1),f=[];function a(d,c){if(c===o.length){if(Array.isArray(d))for(let y=0;y<d.length;y++)f[c]=y.toString(),a(d[y],c+1);else if(typeof d=="object"&&d!==null)for(let y in d)f[c]=y,a(d[y],c+1)}else if(c<o.length){let y=o[c];d&&typeof d=="object"&&d!==null&&y in d&&(f[c]=y,a(d[y],c+1))}else if(u.includes("*"))gn(d,u,typeof r=="function"?(h,l)=>{let m=[...f.slice(0,c),...l];return r(h,m)}:r,i,s);else if(s)yn(d,u);else{let y=typeof r=="function"?r(mu(d,u),[...f.slice(0,c),...u]):r;hn(d,u,y)}}if(o.length===0)a(e,0);else{let d=e;for(let c=0;c<o.length;c++){let y=o[c];if(d==null||typeof d!="object"||d===null)return;d=d[y],f[c]=y}d!=null&&a(d,o.length)}}function Su(e){if(e.length===0)return null;let t=new Map;for(let r of e){let n=dn(r),i=t;for(let s=0;s<n.length;s++){let o=n[s];i.has(o)||i.set(o,new Map),i=i.get(o)}}return t}function Eu(e,t){if(!t)return e;function r(n,i,s=0){if(!i||i.size===0||n===null||typeof n!="object")return n;if(n instanceof Date)return new Date(n.getTime());if(Array.isArray(n)){let u=[];for(let f=0;f<n.length;f++){let a=f.toString();i.has(a)||i.has("*")?u[f]=r(n[f],i.get(a)||i.get("*")):u[f]=n[f]}return u}let o=Object.create(Object.getPrototypeOf(n));for(let u in n)Object.prototype.hasOwnProperty.call(n,u)&&(i.has(u)||i.has("*")?o[u]=r(n[u],i.get(u)||i.get("*")):o[u]=n[u]);return o}return r(e,t)}function vu(e){if(typeof e!="string")throw new Error("Paths must be (non-empty) strings");if(e==="")throw new Error("Invalid redaction path ()");if(e.includes(".."))throw new Error(`Invalid redaction path (${e})`);if(e.includes(","))throw new Error(`Invalid redaction path (${e})`);let t=0,r=!1,n="";for(let i=0;i<e.length;i++){let s=e[i];if((s==='"'||s==="'")&&t>0)r?s===n&&(r=!1,n=""):(r=!0,n=s);else if(s==="["&&!r)t++;else if(s==="]"&&!r&&(t--,t<0))throw new Error(`Invalid redaction path (${e})`)}if(t!==0)throw new Error(`Invalid redaction path (${e})`)}function Ou(e){if(!Array.isArray(e))throw new TypeError("paths must be an array");for(let t of e)vu(t)}function _u(e={}){let{paths:t=[],censor:r="[REDACTED]",serialize:n=JSON.stringify,strict:i=!0,remove:s=!1}=e;Ou(t);let o=Su(t);return function(f){if(i&&(f===null||typeof f!="object")&&(f==null||typeof f!="object"))return n?n(f):f;let a=Eu(f,o),d=f,c=r;return typeof r=="function"&&(c=r),bu(a,t,c,s),n===!1?(a.restore=function(){return mt(d)},a):typeof n=="function"?n(a):JSON.stringify(a)}}pn.exports=_u});var ne=v((Cg,bn)=>{"use strict";var Lu=Symbol("pino.setLevel"),xu=Symbol("pino.getLevel"),Cu=Symbol("pino.levelVal"),Tu=Symbol("pino.levelComp"),Au=Symbol("pino.useLevelLabels"),ju=Symbol("pino.useOnlyCustomLevels"),Pu=Symbol("pino.mixin"),Nu=Symbol("pino.lsCache"),Bu=Symbol("pino.chindings"),Du=Symbol("pino.asJson"),Mu=Symbol("pino.write"),qu=Symbol("pino.redactFmt"),$u=Symbol("pino.time"),Ru=Symbol("pino.timeSliceIndex"),Iu=Symbol("pino.stream"),ku=Symbol("pino.stringify"),Fu=Symbol("pino.stringifySafe"),Wu=Symbol("pino.stringifiers"),Ku=Symbol("pino.end"),zu=Symbol("pino.formatOpts"),Vu=Symbol("pino.messageKey"),Uu=Symbol("pino.errorKey"),Gu=Symbol("pino.nestedKey"),Hu=Symbol("pino.nestedKeyStr"),Ju=Symbol("pino.mixinMergeStrategy"),Yu=Symbol("pino.msgPrefix"),Xu=Symbol("pino.wildcardFirst"),Zu=Symbol.for("pino.serializers"),Qu=Symbol.for("pino.formatters"),ef=Symbol.for("pino.hooks"),tf=Symbol.for("pino.metadata");bn.exports={setLevelSym:Lu,getLevelSym:xu,levelValSym:Cu,levelCompSym:Tu,useLevelLabelsSym:Au,mixinSym:Pu,lsCacheSym:Nu,chindingsSym:Bu,asJsonSym:Du,writeSym:Mu,serializersSym:Zu,redactFmtSym:qu,timeSym:$u,timeSliceIndexSym:Ru,streamSym:Iu,stringifySym:ku,stringifySafeSym:Fu,stringifiersSym:Wu,endSym:Ku,formatOptsSym:zu,messageKeySym:Vu,errorKeySym:Uu,nestedKeySym:Gu,wildcardFirstSym:Xu,needsMetadataGsym:tf,useOnlyCustomLevelsSym:ju,formattersSym:Qu,hooksSym:ef,nestedKeyStrSym:Hu,mixinMergeStrategySym:Ju,msgPrefixSym:Yu}});var wt=v((Tg,vn)=>{"use strict";var wn=mn(),{redactFmtSym:rf,wildcardFirstSym:je}=ne(),bt=/[^.[\]]+|\[([^[\]]*?)\]/g,Sn="[Redacted]",En=!1;function nf(e,t){let{paths:r,censor:n,remove:i}=sf(e),s=r.reduce((f,a)=>{bt.lastIndex=0;let d=bt.exec(a),c=bt.exec(a),y=d[1]!==void 0?d[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):d[0];if(y==="*"&&(y=je),c===null)return f[y]=null,f;if(f[y]===null)return f;let{index:h}=c,l=`${a.substr(h,a.length-1)}`;return f[y]=f[y]||[],y!==je&&f[y].length===0&&f[y].push(...f[je]||[]),y===je&&Object.keys(f).forEach(function(m){f[m]&&f[m].push(l)}),f[y].push(l),f},{}),o={[rf]:wn({paths:r,censor:n,serialize:t,strict:En,remove:i})},u=(...f)=>t(typeof n=="function"?n(...f):n);return[...Object.keys(s),...Object.getOwnPropertySymbols(s)].reduce((f,a)=>{if(s[a]===null)f[a]=d=>u(d,[a]);else{let d=typeof n=="function"?(c,y)=>n(c,[a,...y]):n;f[a]=wn({paths:s[a],censor:d,serialize:t,strict:En,remove:i})}return f},o)}function sf(e){if(Array.isArray(e))return e={paths:e,censor:Sn},e;let{paths:t,censor:r=Sn,remove:n}=e;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return n===!0&&(r=void 0),{paths:t,censor:r,remove:n}}vn.exports=nf});var Ln=v((Ag,_n)=>{"use strict";var of=()=>"",uf=()=>`,"time":${Date.now()}`,ff=()=>`,"time":${Math.round(Date.now()/1e3)}`,cf=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,lf=1000000n,On=1000000000n,af=BigInt(Date.now())*lf,df=process.hrtime.bigint(),hf=()=>{let e=process.hrtime.bigint()-df,t=af+e,r=t/On,n=t%On,i=Number(r*1000n+n/1000000n),s=new Date(i),o=s.getUTCFullYear(),u=(s.getUTCMonth()+1).toString().padStart(2,"0"),f=s.getUTCDate().toString().padStart(2,"0"),a=s.getUTCHours().toString().padStart(2,"0"),d=s.getUTCMinutes().toString().padStart(2,"0"),c=s.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${o}-${u}-${f}T${a}:${d}:${c}.${n.toString().padStart(9,"0")}Z"`};_n.exports={nullTime:of,epochTime:uf,unixTime:ff,isoTime:cf,isoTimeNano:hf}});var Cn=v((jg,xn)=>{"use strict";function yf(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}xn.exports=gf;function gf(e,t,r){var n=r&&r.stringify||yf,i=1;if(typeof e=="object"&&e!==null){var s=t.length+i;if(s===1)return e;var o=new Array(s);o[0]=n(e);for(var u=1;u<s;u++)o[u]=n(t[u]);return o.join(" ")}if(typeof e!="string")return e;var f=t.length;if(f===0)return e;for(var a="",d=1-i,c=-1,y=e&&e.length||0,h=0;h<y;){if(e.charCodeAt(h)===37&&h+1<y){switch(c=c>-1?c:0,e.charCodeAt(h+1)){case 100:case 102:if(d>=f||t[d]==null)break;c<h&&(a+=e.slice(c,h)),a+=Number(t[d]),c=h+2,h++;break;case 105:if(d>=f||t[d]==null)break;c<h&&(a+=e.slice(c,h)),a+=Math.floor(Number(t[d])),c=h+2,h++;break;case 79:case 111:case 106:if(d>=f||t[d]===void 0)break;c<h&&(a+=e.slice(c,h));var l=typeof t[d];if(l==="string"){a+="'"+t[d]+"'",c=h+2,h++;break}if(l==="function"){a+=t[d].name||"<anonymous>",c=h+2,h++;break}a+=n(t[d]),c=h+2,h++;break;case 115:if(d>=f)break;c<h&&(a+=e.slice(c,h)),a+=String(t[d]),c=h+2,h++;break;case 37:c<h&&(a+=e.slice(c,h)),a+="%",c=h+2,h++,d--;break}++d}++h}return c===-1?e:(c<y&&(a+=e.slice(c)),a)}});var Et=v((Pg,St)=>{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let t=function(r){if((r>0&&r<1/0)===!1)throw typeof r!="number"&&typeof r!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(e,0,0,Number(r))},e=new Int32Array(new SharedArrayBuffer(4));St.exports=t}else{let e=function(t){if((t>0&&t<1/0)===!1)throw typeof t!="number"&&typeof t!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let n=Date.now()+Number(t);for(;n>Date.now(););};St.exports=e}});var _t=v((Ng,Dn)=>{"use strict";var D=require("fs"),pf=require("events"),mf=require("util").inherits,Tn=require("path"),Ot=Et(),bf=require("assert"),Pe=100,Ne=Buffer.allocUnsafe(0),wf=16*1024,An="buffer",jn="utf8",[Sf,Ef]=(process.versions.node||"0.0").split(".").map(Number),vf=Sf>=22&&Ef>=7;function Pn(e,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function r(s,o){if(s){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",s)}):t.emit("error",s);return}let u=t._reopening;t.fd=o,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t.destroyed&&(!t._writing&&t._len>t.minLength||t._flushPending?t._actualWrite():u&&process.nextTick(()=>t.emit("drain")))}let n=t.append?"a":"w",i=t.mode;if(t.sync)try{t.mkdir&&D.mkdirSync(Tn.dirname(e),{recursive:!0});let s=D.openSync(e,n,i);r(null,s)}catch(s){throw r(s),s}else t.mkdir?D.mkdir(Tn.dirname(e),{recursive:!0},s=>{if(s)return r(s);D.open(e,n,i,r)}):D.open(e,n,i,r)}function I(e){if(!(this instanceof I))return new I(e);let{fd:t,dest:r,minLength:n,maxLength:i,maxWrite:s,periodicFlush:o,sync:u,append:f=!0,mkdir:a,retryEAGAIN:d,fsync:c,contentMode:y,mode:h}=e||{};t=t||r,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(n||0,16387),this.file=null,this.destroyed=!1,this.minLength=n||0,this.maxLength=i||0,this.maxWrite=s||wf,this._periodicFlush=o||0,this._periodicFlushTimer=void 0,this.sync=u||!1,this.writable=!0,this._fsync=c||!1,this.append=f||!1,this.mode=h,this.retryEAGAIN=d||(()=>!0),this.mkdir=a||!1;let l,m;if(y===An)this._writingBuf=Ne,this.write=Lf,this.flush=Cf,this.flushSync=Af,this._actualWrite=Pf,l=()=>D.writeSync(this.fd,this._writingBuf),m=()=>D.write(this.fd,this._writingBuf,this.release);else if(y===void 0||y===jn)this._writingBuf="",this.write=_f,this.flush=xf,this.flushSync=Tf,this._actualWrite=jf,l=()=>D.writeSync(this.fd,this._writingBuf,"utf8"),m=()=>D.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${jn}" and "${An}", but passed ${y}`);if(typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")Pn(t,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(p,b)=>{if(p){if((p.code==="EAGAIN"||p.code==="EBUSY")&&this.retryEAGAIN(p,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{Ot(Pe),this.release(void 0,0)}catch(O){this.release(O)}else setTimeout(m,Pe);else this._writing=!1,this.emit("error",p);return}this.emit("write",b);let w=vt(this._writingBuf,this._len,b);if(this._len=w.len,this._writingBuf=w.writingBuf,this._writingBuf.length){if(!this.sync){m();return}try{do{let O=l(),x=vt(this._writingBuf,this._len,O);this._len=x.len,this._writingBuf=x.writingBuf}while(this._writingBuf.length)}catch(O){this.release(O);return}}this._fsync&&D.fsyncSync(this.fd);let S=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):S>this.minLength?this._actualWrite():this._ending?S>0?this._actualWrite():(this._writing=!1,Be(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(Of,this)):this.emit("drain"))},this.on("newListener",function(p){p==="drain"&&(this._asyncDrainScheduled=!1)}),this._periodicFlush!==0&&(this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref())}function vt(e,t,r){return typeof e=="string"&&Buffer.byteLength(e)!==r&&(r=Buffer.from(e).subarray(0,r).toString().length),t=Math.max(t-r,0),e=e.slice(r),{writingBuf:e,len:t}}function Of(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}mf(I,pf);function Nn(e,t){return e.length===0?Ne:e.length===1?e[0]:Buffer.concat(e,t)}function _f(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||r[r.length-1].length+e.length>this.maxWrite?r.push(""+e):r[r.length-1]+=e,this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function Lf(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs,n=this._lens;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||n[n.length-1]+e.length>this.maxWrite?(r.push([e]),n.push(e.length)):(r[r.length-1].push(e),n[n.length-1]+=e.length),this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function Bn(e){this._flushPending=!0;let t=()=>{if(this._fsync)this._flushPending=!1,e();else try{D.fsync(this.fd,n=>{this._flushPending=!1,e(n)})}catch(n){e(n)}this.off("error",r)},r=n=>{this._flushPending=!1,e(n),this.off("drain",t)};this.once("drain",t),this.once("error",r)}function xf(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e==null||e();return}e&&Bn.call(this,e),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function Cf(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e==null||e();return}e&&Bn.call(this,e),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}I.prototype.reopen=function(e){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(e)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(e&&(this.file=e),this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&D.close(t,r=>{if(r)return this.emit("error",r)})}),Pn(this.file,this)};I.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?this._actualWrite():Be(this)))};function Tf(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let e="";for(;this._bufs.length||e;){e.length<=0&&(e=this._bufs[0]);try{let t=D.writeSync(this.fd,e,"utf8"),r=vt(e,this._len,t);e=r.writingBuf,this._len=r.len,e.length<=0&&this._bufs.shift()}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;Ot(Pe)}}try{D.fsyncSync(this.fd)}catch{}}function Af(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=Ne);let e=Ne;for(;this._bufs.length||e.length;){e.length<=0&&(e=Nn(this._bufs[0],this._lens[0]));try{let t=D.writeSync(this.fd,e);e=e.subarray(t),this._len=Math.max(this._len-t,0),e.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;Ot(Pe)}}}I.prototype.destroy=function(){this.destroyed||Be(this)};function jf(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf||this._bufs.shift()||"",this.sync)try{let t=D.writeSync(this.fd,this._writingBuf,"utf8");e(null,t)}catch(t){e(t)}else D.write(this.fd,this._writingBuf,"utf8",e)}function Pf(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:Nn(this._bufs.shift(),this._lens.shift()),this.sync)try{let t=D.writeSync(this.fd,this._writingBuf);e(null,t)}catch(t){e(t)}else vf&&(this._writingBuf=Buffer.from(this._writingBuf)),D.write(this.fd,this._writingBuf,e)}function Be(e){if(e.fd===-1){e.once("ready",Be.bind(null,e));return}e._periodicFlushTimer!==void 0&&clearInterval(e._periodicFlushTimer),e.destroyed=!0,e._bufs=[],e._lens=[],bf(typeof e.fd=="number",`sonic.fd must be a number, got ${typeof e.fd}`);try{D.fsync(e.fd,t)}catch{}function t(){e.fd!==1&&e.fd!==2?D.close(e.fd,r):r()}function r(n){if(n){e.emit("error",n);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}}I.SonicBoom=I;I.default=I;Dn.exports=I});var De=v((Bg,In)=>{"use strict";var k={exit:[],beforeExit:[]},Mn={exit:Df,beforeExit:Mf},ie;function Nf(){ie===void 0&&(ie=new FinalizationRegistry(qf))}function Bf(e){k[e].length>0||process.on(e,Mn[e])}function qn(e){k[e].length>0||(process.removeListener(e,Mn[e]),k.exit.length===0&&k.beforeExit.length===0&&(ie=void 0))}function Df(){$n("exit")}function Mf(){$n("beforeExit")}function $n(e){for(let t of k[e]){let r=t.deref(),n=t.fn;r!==void 0&&n(r,e)}k[e]=[]}function qf(e){for(let t of["exit","beforeExit"]){let r=k[t].indexOf(e);k[t].splice(r,r+1),qn(t)}}function Rn(e,t,r){if(t===void 0)throw new Error("the object can't be undefined");Bf(e);let n=new WeakRef(t);n.fn=r,Nf(),ie.register(t,n),k[e].push(n)}function $f(e,t){Rn("exit",e,t)}function Rf(e,t){Rn("beforeExit",e,t)}function If(e){if(ie!==void 0){ie.unregister(e);for(let t of["exit","beforeExit"])k[t]=k[t].filter(r=>{let n=r.deref();return n&&n!==e}),qn(t)}}In.exports={register:$f,registerBeforeExit:Rf,unregister:If}});var kn=v((Dg,kf)=>{kf.exports={name:"thread-stream",version:"3.1.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",dependencies:{"real-require":"^0.2.0"},devDependencies:{"@types/node":"^20.1.0","@types/tap":"^15.0.0","@yao-pkg/pkg":"^5.11.5",desm:"^1.3.0",fastbench:"^1.0.1",husky:"^9.0.6","pino-elasticsearch":"^8.0.0","sonic-boom":"^4.0.1",standard:"^17.0.0",tap:"^16.2.0","ts-node":"^10.8.0",typescript:"^5.3.2","why-is-node-running":"^2.2.2"},scripts:{build:"tsc --noEmit",test:'standard && npm run build && npm run transpile && tap "test/**/*.test.*js" && tap --ts test/*.test.*ts',"test:ci":"standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts","test:ci:js":'tap --no-check-coverage --timeout=120 --coverage-report=lcovonly "test/**/*.test.*js"',"test:ci:ts":'tap --ts --no-check-coverage --coverage-report=lcovonly "test/**/*.test.*ts"',"test:yarn":'npm run transpile && tap "test/**/*.test.js" --no-check-coverage',transpile:"sh ./test/ts/transpile.sh",prepare:"husky install"},standard:{ignore:["test/ts/**/*","test/syntax-error.mjs"]},repository:{type:"git",url:"git+https://github.com/mcollina/thread-stream.git"},keywords:["worker","thread","threads","stream"],author:"Matteo Collina <hello@matteocollina.com>",license:"MIT",bugs:{url:"https://github.com/mcollina/thread-stream/issues"},homepage:"https://github.com/mcollina/thread-stream#readme"}});var Wn=v((Mg,Fn)=>{"use strict";function Ff(e,t,r,n,i){let s=Date.now()+n,o=Atomics.load(e,t);if(o===r){i(null,"ok");return}let u=o,f=a=>{Date.now()>s?i(null,"timed-out"):setTimeout(()=>{u=o,o=Atomics.load(e,t),o===u?f(a>=1e3?1e3:a*2):o===r?i(null,"ok"):i(null,"not-equal")},a)};f(1)}function Wf(e,t,r,n,i){let s=Date.now()+n,o=Atomics.load(e,t);if(o!==r){i(null,"ok");return}let u=f=>{Date.now()>s?i(null,"timed-out"):setTimeout(()=>{o=Atomics.load(e,t),o!==r?i(null,"ok"):u(f>=1e3?1e3:f*2)},f)};u(1)}Fn.exports={wait:Ff,waitDiff:Wf}});var zn=v((qg,Kn)=>{"use strict";Kn.exports={WRITE_INDEX:4,READ_INDEX:8}});var Jn=v(($g,Hn)=>{"use strict";var{version:Kf}=kn(),{EventEmitter:zf}=require("events"),{Worker:Vf}=require("worker_threads"),{join:Uf}=require("path"),{pathToFileURL:Gf}=require("url"),{wait:Hf}=Wn(),{WRITE_INDEX:q,READ_INDEX:F}=zn(),Jf=require("buffer"),Yf=require("assert"),g=Symbol("kImpl"),Xf=Jf.constants.MAX_STRING_LENGTH,he=class{constructor(t){this._value=t}deref(){return this._value}},qe=class{register(){}unregister(){}},Zf=process.env.NODE_V8_COVERAGE?qe:global.FinalizationRegistry||qe,Qf=process.env.NODE_V8_COVERAGE?he:global.WeakRef||he,Vn=new Zf(e=>{e.exited||e.terminate()});function ec(e,t){let{filename:r,workerData:n}=t,s=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||Uf(__dirname,"lib","worker.js"),o=new Vf(s,{...t.workerOpts,trackUnmanagedFds:!1,workerData:{filename:r.indexOf("file://")===0?r:Gf(r).href,dataBuf:e[g].dataBuf,stateBuf:e[g].stateBuf,workerData:{$context:{threadStreamVersion:Kf},...n}}});return o.stream=new he(e),o.on("message",tc),o.on("exit",Gn),Vn.register(e,o),o}function Un(e){Yf(!e[g].sync),e[g].needDrain&&(e[g].needDrain=!1,e.emit("drain"))}function Me(e){let t=Atomics.load(e[g].state,q),r=e[g].data.length-t;if(r>0){if(e[g].buf.length===0){e[g].flushing=!1,e[g].ending?At(e):e[g].needDrain&&process.nextTick(Un,e);return}let n=e[g].buf.slice(0,r),i=Buffer.byteLength(n);i<=r?(e[g].buf=e[g].buf.slice(r),$e(e,n,Me.bind(null,e))):e.flush(()=>{if(!e.destroyed){for(Atomics.store(e[g].state,F,0),Atomics.store(e[g].state,q,0);i>e[g].data.length;)r=r/2,n=e[g].buf.slice(0,r),i=Buffer.byteLength(n);e[g].buf=e[g].buf.slice(r),$e(e,n,Me.bind(null,e))}})}else if(r===0){if(t===0&&e[g].buf.length===0)return;e.flush(()=>{Atomics.store(e[g].state,F,0),Atomics.store(e[g].state,q,0),Me(e)})}else W(e,new Error("overwritten"))}function tc(e){let t=this.stream.deref();if(t===void 0){this.exited=!0,this.terminate();return}switch(e.code){case"READY":this.stream=new Qf(t),t.flush(()=>{t[g].ready=!0,t.emit("ready")});break;case"ERROR":W(t,e.err);break;case"EVENT":Array.isArray(e.args)?t.emit(e.name,...e.args):t.emit(e.name,e.args);break;case"WARNING":process.emitWarning(e.err);break;default:W(t,new Error("this should not happen: "+e.code))}}function Gn(e){let t=this.stream.deref();t!==void 0&&(Vn.unregister(t),t.worker.exited=!0,t.worker.off("exit",Gn),W(t,e!==0?new Error("the worker thread exited"):null))}var xt=class extends zf{constructor(t={}){if(super(),t.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[g]={},this[g].stateBuf=new SharedArrayBuffer(128),this[g].state=new Int32Array(this[g].stateBuf),this[g].dataBuf=new SharedArrayBuffer(t.bufferSize||4*1024*1024),this[g].data=Buffer.from(this[g].dataBuf),this[g].sync=t.sync||!1,this[g].ending=!1,this[g].ended=!1,this[g].needDrain=!1,this[g].destroyed=!1,this[g].flushing=!1,this[g].ready=!1,this[g].finished=!1,this[g].errored=null,this[g].closed=!1,this[g].buf="",this.worker=ec(this,t),this.on("message",(r,n)=>{this.worker.postMessage(r,n)})}write(t){if(this[g].destroyed)return Ct(this,new Error("the worker has exited")),!1;if(this[g].ending)return Ct(this,new Error("the worker is ending")),!1;if(this[g].flushing&&this[g].buf.length+t.length>=Xf)try{Lt(this),this[g].flushing=!0}catch(r){return W(this,r),!1}if(this[g].buf+=t,this[g].sync)try{return Lt(this),!0}catch(r){return W(this,r),!1}return this[g].flushing||(this[g].flushing=!0,setImmediate(Me,this)),this[g].needDrain=this[g].data.length-this[g].buf.length-Atomics.load(this[g].state,q)<=0,!this[g].needDrain}end(){this[g].destroyed||(this[g].ending=!0,At(this))}flush(t){if(this[g].destroyed){typeof t=="function"&&process.nextTick(t,new Error("the worker has exited"));return}let r=Atomics.load(this[g].state,q);Hf(this[g].state,F,r,1/0,(n,i)=>{if(n){W(this,n),process.nextTick(t,n);return}if(i==="not-equal"){this.flush(t);return}process.nextTick(t)})}flushSync(){this[g].destroyed||(Lt(this),Tt(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[g].ready}get destroyed(){return this[g].destroyed}get closed(){return this[g].closed}get writable(){return!this[g].destroyed&&!this[g].ending}get writableEnded(){return this[g].ending}get writableFinished(){return this[g].finished}get writableNeedDrain(){return this[g].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[g].errored}};function Ct(e,t){setImmediate(()=>{e.emit("error",t)})}function W(e,t){e[g].destroyed||(e[g].destroyed=!0,t&&(e[g].errored=t,Ct(e,t)),e.worker.exited?setImmediate(()=>{e[g].closed=!0,e.emit("close")}):e.worker.terminate().catch(()=>{}).then(()=>{e[g].closed=!0,e.emit("close")}))}function $e(e,t,r){let n=Atomics.load(e[g].state,q),i=Buffer.byteLength(t);return e[g].data.write(t,n),Atomics.store(e[g].state,q,n+i),Atomics.notify(e[g].state,q),r(),!0}function At(e){if(!(e[g].ended||!e[g].ending||e[g].flushing)){e[g].ended=!0;try{e.flushSync();let t=Atomics.load(e[g].state,F);Atomics.store(e[g].state,q,-1),Atomics.notify(e[g].state,q);let r=0;for(;t!==-1;){if(Atomics.wait(e[g].state,F,t,1e3),t=Atomics.load(e[g].state,F),t===-2){W(e,new Error("end() failed"));return}if(++r===10){W(e,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{e[g].finished=!0,e.emit("finish")})}catch(t){W(e,t)}}}function Lt(e){let t=()=>{e[g].ending?At(e):e[g].needDrain&&process.nextTick(Un,e)};for(e[g].flushing=!1;e[g].buf.length!==0;){let r=Atomics.load(e[g].state,q),n=e[g].data.length-r;if(n===0){Tt(e),Atomics.store(e[g].state,F,0),Atomics.store(e[g].state,q,0);continue}else if(n<0)throw new Error("overwritten");let i=e[g].buf.slice(0,n),s=Buffer.byteLength(i);if(s<=n)e[g].buf=e[g].buf.slice(n),$e(e,i,t);else{for(Tt(e),Atomics.store(e[g].state,F,0),Atomics.store(e[g].state,q,0);s>e[g].buf.length;)n=n/2,i=e[g].buf.slice(0,n),s=Buffer.byteLength(i);e[g].buf=e[g].buf.slice(n),$e(e,i,t)}}}function Tt(e){if(e[g].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(e[g].state,q),r=0;for(;;){let n=Atomics.load(e[g].state,F);if(n===-2)throw Error("_flushSync failed");if(n!==t)Atomics.wait(e[g].state,F,n,1e3);else break;if(++r===10)throw new Error("_flushSync took too long (10s)")}}Hn.exports=xt});var Nt=v((Rg,Yn)=>{"use strict";var{createRequire:rc}=require("module"),nc=pt(),{join:jt,isAbsolute:ic,sep:sc}=require("node:path"),oc=Et(),Pt=De(),uc=Jn();function fc(e){Pt.register(e,lc),Pt.registerBeforeExit(e,ac),e.on("close",function(){Pt.unregister(e)})}function cc(e,t,r,n){let i=new uc({filename:e,workerData:t,workerOpts:r,sync:n});i.on("ready",s),i.on("close",function(){process.removeListener("exit",o)}),process.on("exit",o);function s(){process.removeListener("exit",o),i.unref(),r.autoEnd!==!1&&fc(i)}function o(){i.closed||(i.flushSync(),oc(100),i.end())}return i}function lc(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}function ac(e){e.flushSync()}function dc(e){let{pipeline:t,targets:r,levels:n,dedupe:i,worker:s={},caller:o=nc(),sync:u=!1}=e,f={...e.options},a=typeof o=="string"?[o]:o,d="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},c=e.target;if(c&&r)throw new Error("only one of target or targets can be specified");return r?(c=d["pino-worker"]||jt(__dirname,"worker.js"),f.targets=r.filter(h=>h.target).map(h=>({...h,target:y(h.target)})),f.pipelines=r.filter(h=>h.pipeline).map(h=>h.pipeline.map(l=>({...l,level:h.level,target:y(l.target)})))):t&&(c=d["pino-worker"]||jt(__dirname,"worker.js"),f.pipelines=[t.map(h=>({...h,target:y(h.target)}))]),n&&(f.levels=n),i&&(f.dedupe=i),f.pinoWillSendConfig=!0,cc(y(c),f,s,u);function y(h){if(h=d[h]||h,ic(h)||h.indexOf("file://")===0)return h;if(h==="pino/file")return jt(__dirname,"..","file.js");let l;for(let m of a)try{let p=m==="node:repl"?process.cwd()+sc:m;l=rc(p).resolve(h);break}catch{continue}if(!l)throw new Error(`unable to determine transport target for "${h}"`);return l}}Yn.exports=dc});var ke=v((Ig,ci)=>{"use strict";var hc=require("node:diagnostics_channel"),Xn=Cn(),{mapHttpRequest:yc,mapHttpResponse:gc}=gt(),Dt=_t(),Zn=De(),{lsCacheSym:pc,chindingsSym:ni,writeSym:Qn,serializersSym:ii,formatOptsSym:ei,endSym:mc,stringifiersSym:si,stringifySym:oi,stringifySafeSym:Mt,wildcardFirstSym:ui,nestedKeySym:bc,formattersSym:fi,messageKeySym:wc,errorKeySym:Sc,nestedKeyStrSym:Ec,msgPrefixSym:Re}=ne(),{isMainThread:vc}=require("worker_threads"),Oc=Nt(),ti=hc.tracingChannel("pino_asJson");function se(){}function _c(e,t){if(!t)return r;return function(...i){t.call(this,i,r,e)};function r(n,...i){if(typeof n=="object"){let s=n;n!==null&&(n.method&&n.headers&&n.socket?n=yc(n):typeof n.setHeader=="function"&&(n=gc(n)));let o;s===null&&i.length===0?o=[null]:(s=i.shift(),o=i),typeof this[Re]=="string"&&s!==void 0&&s!==null&&(s=this[Re]+s),this[Qn](n,Xn(s,o,this[ei]),e)}else{let s=n===void 0?i.shift():n;typeof this[Re]=="string"&&s!==void 0&&s!==null&&(s=this[Re]+s),this[Qn](null,Xn(s,i,this[ei]),e)}}}function Bt(e){let t="",r=0,n=!1,i=255,s=e.length;if(s>100)return JSON.stringify(e);for(var o=0;o<s&&i>=32;o++)i=e.charCodeAt(o),(i===34||i===92)&&(t+=e.slice(r,o)+"\\",r=o,n=!0);return n?t+=e.slice(r):t=e,i<32?JSON.stringify(e):'"'+t+'"'}function Lc(e,t,r,n){if(ti.hasSubscribers===!1)return ri.call(this,e,t,r,n);let i={instance:this,arguments};return ti.traceSync(ri,i,this,e,t,r,n)}function ri(e,t,r,n){let i=this[oi],s=this[Mt],o=this[si],u=this[mc],f=this[ni],a=this[ii],d=this[fi],c=this[wc],y=this[Sc],h=this[pc][r]+n;h=h+f;let l;d.log&&(e=d.log(e));let m=o[ui],p="";for(let w in e)if(l=e[w],Object.prototype.hasOwnProperty.call(e,w)&&l!==void 0){a[w]?l=a[w](l):w===y&&a.err&&(l=a.err(l));let S=o[w]||m;switch(typeof l){case"undefined":case"function":continue;case"number":Number.isFinite(l)===!1&&(l=null);case"boolean":S&&(l=S(l));break;case"string":l=(S||Bt)(l);break;default:l=(S||i)(l,s)}if(l===void 0)continue;let O=Bt(w);p+=","+O+":"+l}let b="";if(t!==void 0){l=a[c]?a[c](t):t;let w=o[c]||m;switch(typeof l){case"function":break;case"number":Number.isFinite(l)===!1&&(l=null);case"boolean":w&&(l=w(l)),b=',"'+c+'":'+l;break;case"string":l=(w||Bt)(l),b=',"'+c+'":'+l;break;default:l=(w||i)(l,s),b=',"'+c+'":'+l}}return this[bc]&&p?h+this[Ec]+p.slice(1)+"}"+b+u:h+p+b+u}function xc(e,t){let r,n=e[ni],i=e[oi],s=e[Mt],o=e[si],u=o[ui],f=e[ii],a=e[fi].bindings;t=a(t);for(let d in t)if(r=t[d],((d.length<5||d!=="level"&&d!=="serializers"&&d!=="formatters"&&d!=="customLevels")&&t.hasOwnProperty(d)&&r!==void 0)===!0){if(r=f[d]?f[d](r):r,r=(o[d]||u||i)(r,s),r===void 0)continue;n+=',"'+d+'":'+r}return n}function Cc(e){return e.write!==e.constructor.prototype.write}function Ie(e){let t=new Dt(e);return t.on("error",r),!e.sync&&vc&&(Zn.register(t,Tc),t.on("close",function(){Zn.unregister(t)})),t;function r(n){if(n.code==="EPIPE"){t.write=se,t.end=se,t.flushSync=se,t.destroy=se;return}t.removeListener("error",r),t.emit("error",n)}}function Tc(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}function Ac(e){return function(r,n,i={},s){if(typeof i=="string")s=Ie({dest:i}),i={};else if(typeof s=="string"){if(i&&i.transport)throw Error("only one of option.transport or stream can be specified");s=Ie({dest:s})}else if(i instanceof Dt||i.writable||i._writableState)s=i,i={};else if(i.transport){if(i.transport instanceof Dt||i.transport.writable||i.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(i.transport.targets&&i.transport.targets.length&&i.formatters&&typeof i.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let f;i.customLevels&&(f=i.useOnlyCustomLevels?i.customLevels:Object.assign({},i.levels,i.customLevels)),s=Oc({caller:n,...i.transport,levels:f})}if(i=Object.assign({},e,i),i.serializers=Object.assign({},e.serializers,i.serializers),i.formatters=Object.assign({},e.formatters,i.formatters),i.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:o,onChild:u}=i;return o===!1&&(i.level="silent"),u||(i.onChild=se),s||(Cc(process.stdout)?s=process.stdout:s=Ie({fd:process.stdout.fd||1})),{opts:i,stream:s}}}function jc(e,t){try{return JSON.stringify(e)}catch{try{return(t||this[Mt])(e)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function Pc(e,t,r){return{level:e,bindings:t,log:r}}function Nc(e){let t=Number(e);return typeof e=="string"&&Number.isFinite(t)?t:e===void 0?1:e}ci.exports={noop:se,buildSafeSonicBoom:Ie,asChindings:xc,asJson:Lc,genLog:_c,createArgsNormalizer:Ac,stringify:jc,buildFormatters:Pc,normalizeDestFileDescriptor:Nc}});var Fe=v((kg,li)=>{var Bc={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},Dc={ASC:"ASC",DESC:"DESC"};li.exports={DEFAULT_LEVELS:Bc,SORTING_ORDER:Dc}});var Rt=v((Fg,yi)=>{"use strict";var{lsCacheSym:Mc,levelValSym:qt,useOnlyCustomLevelsSym:qc,streamSym:$c,formattersSym:Rc,hooksSym:Ic,levelCompSym:ai}=ne(),{noop:kc,genLog:X}=ke(),{DEFAULT_LEVELS:K,SORTING_ORDER:di}=Fe(),hi={fatal:e=>{let t=X(K.fatal,e);return function(...r){let n=this[$c];if(t.call(this,...r),typeof n.flushSync=="function")try{n.flushSync()}catch{}}},error:e=>X(K.error,e),warn:e=>X(K.warn,e),info:e=>X(K.info,e),debug:e=>X(K.debug,e),trace:e=>X(K.trace,e)},$t=Object.keys(K).reduce((e,t)=>(e[K[t]]=t,e),{}),Fc=Object.keys($t).reduce((e,t)=>(e[t]='{"level":'+Number(t),e),{});function Wc(e){let t=e[Rc].level,{labels:r}=e.levels,n={};for(let i in r){let s=t(r[i],Number(i));n[i]=JSON.stringify(s).slice(0,-1)}return e[Mc]=n,e}function Kc(e,t){if(t)return!1;switch(e){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function zc(e){let{labels:t,values:r}=this.levels;if(typeof e=="number"){if(t[e]===void 0)throw Error("unknown level value"+e);e=t[e]}if(r[e]===void 0)throw Error("unknown level "+e);let n=this[qt],i=this[qt]=r[e],s=this[qc],o=this[ai],u=this[Ic].logMethod;for(let f in r){if(o(r[f],i)===!1){this[f]=kc;continue}this[f]=Kc(f,s)?hi[f](u):X(r[f],u)}this.emit("level-change",e,i,t[n],n,this)}function Vc(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""}function Uc(e){let{values:t}=this.levels,r=t[e];return r!==void 0&&this[ai](r,this[qt])}function Gc(e,t,r){return e===di.DESC?t<=r:t>=r}function Hc(e){return typeof e=="string"?Gc.bind(null,e):e}function Jc(e=null,t=!1){let r=e?Object.keys(e).reduce((s,o)=>(s[e[o]]=o,s),{}):null,n=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:$t,r),i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:K,e);return{labels:n,values:i}}function Yc(e,t,r){if(typeof e=="number"){if(![].concat(Object.keys(t||{}).map(s=>t[s]),r?[]:Object.keys($t).map(s=>+s),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}let n=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:K,t);if(!(e in n))throw Error(`default level:${e} must be included in custom levels`)}function Xc(e,t){let{labels:r,values:n}=e;for(let i in t){if(i in n)throw Error("levels cannot be overridden");if(t[i]in r)throw Error("pre-existing level values cannot be used for new levels")}}function Zc(e){if(typeof e!="function"&&!(typeof e=="string"&&Object.values(di).includes(e)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}yi.exports={initialLsCache:Fc,genLsCache:Wc,levelMethods:hi,getLevel:Vc,setLevel:zc,isLevelEnabled:Uc,mappings:Jc,assertNoLevelCollisions:Xc,assertDefaultLevelFound:Yc,genLevelComparison:Hc,assertLevelComparison:Zc}});var It=v((Wg,gi)=>{"use strict";gi.exports={version:"10.1.0"}});var Oi=v((zg,vi)=>{"use strict";var{EventEmitter:Qc}=require("node:events"),{lsCacheSym:el,levelValSym:tl,setLevelSym:Ft,getLevelSym:pi,chindingsSym:Ke,mixinSym:rl,asJsonSym:bi,writeSym:nl,mixinMergeStrategySym:il,timeSym:sl,timeSliceIndexSym:ol,streamSym:wi,serializersSym:Z,formattersSym:ye,errorKeySym:ul,messageKeySym:fl,useOnlyCustomLevelsSym:cl,needsMetadataGsym:ll,redactFmtSym:al,stringifySym:dl,formatOptsSym:hl,stringifiersSym:yl,msgPrefixSym:Wt,hooksSym:gl}=ne(),{getLevel:pl,setLevel:ml,isLevelEnabled:bl,mappings:wl,initialLsCache:Sl,genLsCache:El,assertNoLevelCollisions:vl}=Rt(),{asChindings:Kt,asJson:Ol,buildFormatters:kt,stringify:mi,noop:Si}=ke(),{version:_l}=It(),Ll=wt(),xl=class{},Ei={constructor:xl,child:Cl,bindings:Tl,setBindings:Al,flush:Nl,isLevelEnabled:bl,version:_l,get level(){return this[pi]()},set level(e){this[Ft](e)},get levelVal(){return this[tl]},set levelVal(e){throw Error("levelVal is read-only")},get msgPrefix(){return this[Wt]},get[Symbol.toStringTag](){return"Pino"},[el]:Sl,[nl]:Pl,[bi]:Ol,[pi]:pl,[Ft]:ml};Object.setPrototypeOf(Ei,Qc.prototype);vi.exports=function(){return Object.create(Ei)};var We=e=>e;function Cl(e,t){if(!e)throw Error("missing bindings for child Pino");let r=this[Z],n=this[ye],i=Object.create(this);if(t==null)return i[ye].bindings!==We&&(i[ye]=kt(n.level,We,n.log)),i[Ke]=Kt(i,e),this.onChild!==Si&&this.onChild(i),i;if(t.hasOwnProperty("serializers")===!0){i[Z]=Object.create(null);for(let a in r)i[Z][a]=r[a];let u=Object.getOwnPropertySymbols(r);for(var s=0;s<u.length;s++){let a=u[s];i[Z][a]=r[a]}for(let a in t.serializers)i[Z][a]=t.serializers[a];let f=Object.getOwnPropertySymbols(t.serializers);for(var o=0;o<f.length;o++){let a=f[o];i[Z][a]=t.serializers[a]}}else i[Z]=r;if(t.hasOwnProperty("formatters")){let{level:u,bindings:f,log:a}=t.formatters;i[ye]=kt(u||n.level,f||We,a||n.log)}else i[ye]=kt(n.level,We,n.log);if(t.hasOwnProperty("customLevels")===!0&&(vl(this.levels,t.customLevels),i.levels=wl(t.customLevels,i[cl]),El(i)),typeof t.redact=="object"&&t.redact!==null||Array.isArray(t.redact)){i.redact=t.redact;let u=Ll(i.redact,mi),f={stringify:u[al]};i[dl]=mi,i[yl]=u,i[hl]=f}if(typeof t.msgPrefix=="string"&&(i[Wt]=(this[Wt]||"")+t.msgPrefix),i[Ke]=Kt(i,e),t.level!==void 0&&t.level!==this.level||t.hasOwnProperty("customLevels")){let u=t.level||this.level;i[Ft](u)}return this.onChild(i),i}function Tl(){let t=`{${this[Ke].substr(1)}}`,r=JSON.parse(t);return delete r.pid,delete r.hostname,r}function Al(e){let t=Kt(this,e);this[Ke]=t}function jl(e,t){return Object.assign(t,e)}function Pl(e,t,r){let n=this[sl](),i=this[rl],s=this[ul],o=this[fl],u=this[il]||jl,f,a=this[gl].streamWrite;e==null?f={}:e instanceof Error?(f={[s]:e},t===void 0&&(t=e.message)):(f=e,t===void 0&&e[o]===void 0&&e[s]&&(t=e[s].message)),i&&(f=u(f,i(f,r,this)));let d=this[bi](f,t,r,n),c=this[wi];c[ll]===!0&&(c.lastLevel=r,c.lastObj=f,c.lastMsg=t,c.lastTime=n.slice(this[ol]),c.lastLogger=this),c.write(a?a(d):d)}function Nl(e){if(e!=null&&typeof e!="function")throw Error("callback must be a function");let t=this[wi];typeof t.flush=="function"?t.flush(e||Si):e&&e()}});var Ci=v((Gt,xi)=>{"use strict";var{hasOwnProperty:ge}=Object.prototype,ee=Ut();ee.configure=Ut;ee.stringify=ee;ee.default=ee;Gt.stringify=ee;Gt.configure=Ut;xi.exports=ee;var Bl=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function U(e){return e.length<5e3&&!Bl.test(e)?`"${e}"`:JSON.stringify(e)}function zt(e,t){if(e.length>200||t)return e.sort(t);for(let r=1;r<e.length;r++){let n=e[r],i=r;for(;i!==0&&e[i-1]>n;)e[i]=e[i-1],i--;e[i]=n}return e}var Dl=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Vt(e){return Dl.call(e)!==void 0&&e.length!==0}function _i(e,t,r){e.length<r&&(r=e.length);let n=t===","?"":" ",i=`"0":${n}${e[0]}`;for(let s=1;s<r;s++)i+=`${t}"${s}":${n}${e[s]}`;return i}function Ml(e){if(ge.call(e,"circularValue")){let t=e.circularValue;if(typeof t=="string")return`"${t}"`;if(t==null)return t;if(t===Error||t===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function ql(e){let t;if(ge.call(e,"deterministic")&&(t=e.deterministic,typeof t!="boolean"&&typeof t!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return t===void 0?!0:t}function $l(e,t){let r;if(ge.call(e,t)&&(r=e[t],typeof r!="boolean"))throw new TypeError(`The "${t}" argument must be of type boolean`);return r===void 0?!0:r}function Li(e,t){let r;if(ge.call(e,t)){if(r=e[t],typeof r!="number")throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${t}" argument must be an integer`);if(r<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return r===void 0?1/0:r}function Q(e){return e===1?"1 item":`${e} items`}function Rl(e){let t=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&t.add(String(r));return t}function Il(e){if(ge.call(e,"strict")){let t=e.strict;if(typeof t!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(t)return r=>{let n=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(n+=` (${r.toString()})`),new Error(n)}}}function Ut(e){e={...e};let t=Il(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=Ml(e),n=$l(e,"bigint"),i=ql(e),s=typeof i=="function"?i:void 0,o=Li(e,"maximumDepth"),u=Li(e,"maximumBreadth");function f(h,l,m,p,b,w){let S=l[h];switch(typeof S=="object"&&S!==null&&typeof S.toJSON=="function"&&(S=S.toJSON(h)),S=p.call(l,h,S),typeof S){case"string":return U(S);case"object":{if(S===null)return"null";if(m.indexOf(S)!==-1)return r;let O="",x=",",P=w;if(Array.isArray(S)){if(S.length===0)return"[]";if(o<m.length+1)return'"[Array]"';m.push(S),b!==""&&(w+=b,O+=`
|
|
5
|
+
${w}`,x=`,
|
|
6
|
+
${w}`);let A=Math.min(S.length,u),E=0;for(;E<A-1;E++){let $=f(String(E),S,m,p,b,w);O+=$!==void 0?$:"null",O+=x}let M=f(String(E),S,m,p,b,w);if(O+=M!==void 0?M:"null",S.length-1>u){let $=S.length-u-1;O+=`${x}"... ${Q($)} not stringified"`}return b!==""&&(O+=`
|
|
7
|
+
${P}`),m.pop(),`[${O}]`}let T=Object.keys(S),j=T.length;if(j===0)return"{}";if(o<m.length+1)return'"[Object]"';let _="",N="";b!==""&&(w+=b,x=`,
|
|
8
|
+
${w}`,_=" ");let B=Math.min(j,u);i&&!Vt(S)&&(T=zt(T,s)),m.push(S);for(let A=0;A<B;A++){let E=T[A],M=f(E,S,m,p,b,w);M!==void 0&&(O+=`${N}${U(E)}:${_}${M}`,N=x)}if(j>u){let A=j-u;O+=`${N}"...":${_}"${Q(A)} not stringified"`,N=x}return b!==""&&N.length>1&&(O=`
|
|
9
|
+
${w}${O}
|
|
10
|
+
${P}`),m.pop(),`{${O}}`}case"number":return isFinite(S)?String(S):t?t(S):"null";case"boolean":return S===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(S);default:return t?t(S):void 0}}function a(h,l,m,p,b,w){switch(typeof l=="object"&&l!==null&&typeof l.toJSON=="function"&&(l=l.toJSON(h)),typeof l){case"string":return U(l);case"object":{if(l===null)return"null";if(m.indexOf(l)!==-1)return r;let S=w,O="",x=",";if(Array.isArray(l)){if(l.length===0)return"[]";if(o<m.length+1)return'"[Array]"';m.push(l),b!==""&&(w+=b,O+=`
|
|
11
|
+
${w}`,x=`,
|
|
12
|
+
${w}`);let j=Math.min(l.length,u),_=0;for(;_<j-1;_++){let B=a(String(_),l[_],m,p,b,w);O+=B!==void 0?B:"null",O+=x}let N=a(String(_),l[_],m,p,b,w);if(O+=N!==void 0?N:"null",l.length-1>u){let B=l.length-u-1;O+=`${x}"... ${Q(B)} not stringified"`}return b!==""&&(O+=`
|
|
13
|
+
${S}`),m.pop(),`[${O}]`}m.push(l);let P="";b!==""&&(w+=b,x=`,
|
|
14
|
+
${w}`,P=" ");let T="";for(let j of p){let _=a(j,l[j],m,p,b,w);_!==void 0&&(O+=`${T}${U(j)}:${P}${_}`,T=x)}return b!==""&&T.length>1&&(O=`
|
|
15
|
+
${w}${O}
|
|
16
|
+
${S}`),m.pop(),`{${O}}`}case"number":return isFinite(l)?String(l):t?t(l):"null";case"boolean":return l===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(l);default:return t?t(l):void 0}}function d(h,l,m,p,b){switch(typeof l){case"string":return U(l);case"object":{if(l===null)return"null";if(typeof l.toJSON=="function"){if(l=l.toJSON(h),typeof l!="object")return d(h,l,m,p,b);if(l===null)return"null"}if(m.indexOf(l)!==-1)return r;let w=b;if(Array.isArray(l)){if(l.length===0)return"[]";if(o<m.length+1)return'"[Array]"';m.push(l),b+=p;let _=`
|
|
17
|
+
${b}`,N=`,
|
|
18
|
+
${b}`,B=Math.min(l.length,u),A=0;for(;A<B-1;A++){let M=d(String(A),l[A],m,p,b);_+=M!==void 0?M:"null",_+=N}let E=d(String(A),l[A],m,p,b);if(_+=E!==void 0?E:"null",l.length-1>u){let M=l.length-u-1;_+=`${N}"... ${Q(M)} not stringified"`}return _+=`
|
|
19
|
+
${w}`,m.pop(),`[${_}]`}let S=Object.keys(l),O=S.length;if(O===0)return"{}";if(o<m.length+1)return'"[Object]"';b+=p;let x=`,
|
|
20
|
+
${b}`,P="",T="",j=Math.min(O,u);Vt(l)&&(P+=_i(l,x,u),S=S.slice(l.length),j-=l.length,T=x),i&&(S=zt(S,s)),m.push(l);for(let _=0;_<j;_++){let N=S[_],B=d(N,l[N],m,p,b);B!==void 0&&(P+=`${T}${U(N)}: ${B}`,T=x)}if(O>u){let _=O-u;P+=`${T}"...": "${Q(_)} not stringified"`,T=x}return T!==""&&(P=`
|
|
21
|
+
${b}${P}
|
|
22
|
+
${w}`),m.pop(),`{${P}}`}case"number":return isFinite(l)?String(l):t?t(l):"null";case"boolean":return l===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(l);default:return t?t(l):void 0}}function c(h,l,m){switch(typeof l){case"string":return U(l);case"object":{if(l===null)return"null";if(typeof l.toJSON=="function"){if(l=l.toJSON(h),typeof l!="object")return c(h,l,m);if(l===null)return"null"}if(m.indexOf(l)!==-1)return r;let p="",b=l.length!==void 0;if(b&&Array.isArray(l)){if(l.length===0)return"[]";if(o<m.length+1)return'"[Array]"';m.push(l);let P=Math.min(l.length,u),T=0;for(;T<P-1;T++){let _=c(String(T),l[T],m);p+=_!==void 0?_:"null",p+=","}let j=c(String(T),l[T],m);if(p+=j!==void 0?j:"null",l.length-1>u){let _=l.length-u-1;p+=`,"... ${Q(_)} not stringified"`}return m.pop(),`[${p}]`}let w=Object.keys(l),S=w.length;if(S===0)return"{}";if(o<m.length+1)return'"[Object]"';let O="",x=Math.min(S,u);b&&Vt(l)&&(p+=_i(l,",",u),w=w.slice(l.length),x-=l.length,O=","),i&&(w=zt(w,s)),m.push(l);for(let P=0;P<x;P++){let T=w[P],j=c(T,l[T],m);j!==void 0&&(p+=`${O}${U(T)}:${j}`,O=",")}if(S>u){let P=S-u;p+=`${O}"...":"${Q(P)} not stringified"`}return m.pop(),`{${p}}`}case"number":return isFinite(l)?String(l):t?t(l):"null";case"boolean":return l===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(l);default:return t?t(l):void 0}}function y(h,l,m){if(arguments.length>1){let p="";if(typeof m=="number"?p=" ".repeat(Math.min(m,10)):typeof m=="string"&&(p=m.slice(0,10)),l!=null){if(typeof l=="function")return f("",{"":h},[],l,p,"");if(Array.isArray(l))return a("",h,[],Rl(l),p,"")}if(p.length!==0)return d("",h,[],p,"")}return c("",h,[])}return y}});var Pi=v((Vg,ji)=>{"use strict";var Ht=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:Ai}=Fe(),kl=Ai.info;function Fl(e,t){e=e||[],t=t||{dedupe:!1};let r=Object.create(Ai);r.silent=1/0,t.levels&&typeof t.levels=="object"&&Object.keys(t.levels).forEach(c=>{r[c]=t.levels[c]});let n={write:i,add:u,remove:f,emit:s,flushSync:o,end:a,minLevel:0,lastId:0,streams:[],clone:d,[Ht]:!0,streamLevels:r};return Array.isArray(e)?e.forEach(u,n):u.call(n,e),e=null,n;function i(c){let y,h=this.lastLevel,{streams:l}=this,m=0,p;for(let b=Wl(l.length,t.dedupe);zl(b,l.length,t.dedupe);b=Kl(b,t.dedupe))if(y=l[b],y.level<=h){if(m!==0&&m!==y.level)break;if(p=y.stream,p[Ht]){let{lastTime:w,lastMsg:S,lastObj:O,lastLogger:x}=this;p.lastLevel=h,p.lastTime=w,p.lastMsg=S,p.lastObj=O,p.lastLogger=x}p.write(c),t.dedupe&&(m=y.level)}else if(!t.dedupe)break}function s(...c){for(let{stream:y}of this.streams)typeof y.emit=="function"&&y.emit(...c)}function o(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync()}function u(c){if(!c)return n;let y=typeof c.write=="function"||c.stream,h=c.write?c:c.stream;if(!y)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:l,streamLevels:m}=this,p;typeof c.levelVal=="number"?p=c.levelVal:typeof c.level=="string"?p=m[c.level]:typeof c.level=="number"?p=c.level:p=kl;let b={stream:h,level:p,levelVal:void 0,id:++n.lastId};return l.unshift(b),l.sort(Ti),this.minLevel=l[0].level,n}function f(c){let{streams:y}=this,h=y.findIndex(l=>l.id===c);return h>=0&&(y.splice(h,1),y.sort(Ti),this.minLevel=y.length>0?y[0].level:-1),n}function a(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync(),c.end()}function d(c){let y=new Array(this.streams.length);for(let h=0;h<y.length;h++)y[h]={level:c,stream:this.streams[h].stream};return{write:i,add:u,remove:f,minLevel:c,streams:y,clone:d,emit:s,flushSync:o,[Ht]:!0}}}function Ti(e,t){return e.level-t.level}function Wl(e,t){return t?e-1:0}function Kl(e,t){return t?e-1:e+1}function zl(e,t,r){return r?e>=0:e<t}ji.exports=Fl});var Vi=v((Ug,R)=>{"use strict";var Vl=require("node:os"),Ii=gt(),Ul=pt(),Gl=wt(),ki=Ln(),Hl=Oi(),Fi=ne(),{configure:Jl}=Ci(),{assertDefaultLevelFound:Yl,mappings:Wi,genLsCache:Xl,genLevelComparison:Zl,assertLevelComparison:Ql}=Rt(),{DEFAULT_LEVELS:Ki,SORTING_ORDER:ea}=Fe(),{createArgsNormalizer:ta,asChindings:ra,buildSafeSonicBoom:Ni,buildFormatters:na,stringify:Jt,normalizeDestFileDescriptor:Bi,noop:ia}=ke(),{version:sa}=It(),{chindingsSym:Di,redactFmtSym:oa,serializersSym:Mi,timeSym:ua,timeSliceIndexSym:fa,streamSym:ca,stringifySym:qi,stringifySafeSym:Yt,stringifiersSym:$i,setLevelSym:la,endSym:aa,formatOptsSym:da,messageKeySym:ha,errorKeySym:ya,nestedKeySym:ga,mixinSym:pa,levelCompSym:ma,useOnlyCustomLevelsSym:ba,formattersSym:Ri,hooksSym:wa,nestedKeyStrSym:Sa,mixinMergeStrategySym:Ea,msgPrefixSym:va}=Fi,{epochTime:zi,nullTime:Oa}=ki,{pid:_a}=process,La=Vl.hostname(),xa=Ii.err,Ca={level:"info",levelComparison:ea.ASC,levels:Ki,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:_a,hostname:La},serializers:Object.assign(Object.create(null),{err:xa}),formatters:Object.assign(Object.create(null),{bindings(e){return e},level(e,t){return{level:t}}}),hooks:{logMethod:void 0,streamWrite:void 0},timestamp:zi,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},Ta=ta(Ca),Aa=Object.assign(Object.create(null),Ii);function Xt(...e){let t={},{opts:r,stream:n}=Ta(t,Ul(),...e);r.level&&typeof r.level=="string"&&Ki[r.level.toLowerCase()]!==void 0&&(r.level=r.level.toLowerCase());let{redact:i,crlf:s,serializers:o,timestamp:u,messageKey:f,errorKey:a,nestedKey:d,base:c,name:y,level:h,customLevels:l,levelComparison:m,mixin:p,mixinMergeStrategy:b,useOnlyCustomLevels:w,formatters:S,hooks:O,depthLimit:x,edgeLimit:P,onChild:T,msgPrefix:j}=r,_=Jl({maximumDepth:x,maximumBreadth:P}),N=na(S.level,S.bindings,S.log),B=Jt.bind({[Yt]:_}),A=i?Gl(i,B):{},E=i?{stringify:A[oa]}:{stringify:B},M="}"+(s?`\r
|
|
23
|
+
`:`
|
|
24
|
+
`),$=ra.bind(null,{[Di]:"",[Mi]:o,[$i]:A,[qi]:Jt,[Yt]:_,[Ri]:N}),Y="";c!==null&&(y===void 0?Y=$(c):Y=$(Object.assign({},c,{name:y})));let Mr=u instanceof Function?u:u?zi:Oa,Mo=Mr().indexOf(":")+1;if(w&&!l)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(p&&typeof p!="function")throw Error(`Unknown mixin type "${typeof p}" - expected "function"`);if(j&&typeof j!="string")throw Error(`Unknown msgPrefix type "${typeof j}" - expected "string"`);Yl(h,l,w);let qr=Wi(l,w);typeof n.emit=="function"&&n.emit("message",{code:"PINO_CONFIG",config:{levels:qr,messageKey:f,errorKey:a}}),Ql(m);let qo=Zl(m);return Object.assign(t,{levels:qr,[ma]:qo,[ba]:w,[ca]:n,[ua]:Mr,[fa]:Mo,[qi]:Jt,[Yt]:_,[$i]:A,[aa]:M,[da]:E,[ha]:f,[ya]:a,[ga]:d,[Sa]:d?`,${JSON.stringify(d)}:{`:"",[Mi]:o,[pa]:p,[Ea]:b,[Di]:Y,[Ri]:N,[wa]:O,silent:ia,onChild:T,[va]:j}),Object.setPrototypeOf(t,Hl()),Xl(t),t[la](h),t}R.exports=Xt;R.exports.destination=(e=process.stdout.fd)=>typeof e=="object"?(e.dest=Bi(e.dest||process.stdout.fd),Ni(e)):Ni({dest:Bi(e),minLength:0});R.exports.transport=Nt();R.exports.multistream=Pi();R.exports.levels=Wi();R.exports.stdSerializers=Aa;R.exports.stdTimeFunctions=Object.assign({},ki);R.exports.symbols=Fi;R.exports.version=sa;R.exports.default=Xt;R.exports.pino=Xt});var Qt=v(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});var ja=require("tty");function Pa(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if(r!=="default"){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var Zt=Pa(ja),{env:G={},argv:Gi=[],platform:Na=""}=typeof process>"u"?{}:process,Ba="NO_COLOR"in G||Gi.includes("--no-color"),Da="FORCE_COLOR"in G||Gi.includes("--color"),Ma=Na==="win32",Hi=G.TERM==="dumb",qa=Zt&&Zt.isatty&&Zt.isatty(1)&&G.TERM&&!Hi,$a="CI"in G&&("GITHUB_ACTIONS"in G||"GITLAB_CI"in G||"CIRCLECI"in G),Ji=!Ba&&(Da||Ma&&!Hi||qa||$a),Yi=(e,t,r,n,i=t.substring(0,e)+n,s=t.substring(e+r.length),o=s.indexOf(r))=>i+(o<0?s:Yi(o,s,r,n)),Ra=(e,t,r,n,i)=>e<0?r+t+n:r+Yi(e,t,n,i)+n,Ia=(e,t,r=e,n=e.length+1)=>i=>i||!(i===""||i===void 0)?Ra((""+i).indexOf(t,n),i,e,t,r):"",C=(e,t,r)=>Ia(`\x1B[${e}m`,`\x1B[${t}m`,r),Ui={reset:C(0,0),bold:C(1,22,"\x1B[22m\x1B[1m"),dim:C(2,22,"\x1B[22m\x1B[2m"),italic:C(3,23),underline:C(4,24),inverse:C(7,27),hidden:C(8,28),strikethrough:C(9,29),black:C(30,39),red:C(31,39),green:C(32,39),yellow:C(33,39),blue:C(34,39),magenta:C(35,39),cyan:C(36,39),white:C(37,39),gray:C(90,39),bgBlack:C(40,49),bgRed:C(41,49),bgGreen:C(42,49),bgYellow:C(43,49),bgBlue:C(44,49),bgMagenta:C(45,49),bgCyan:C(46,49),bgWhite:C(47,49),blackBright:C(90,39),redBright:C(91,39),greenBright:C(92,39),yellowBright:C(93,39),blueBright:C(94,39),magentaBright:C(95,39),cyanBright:C(96,39),whiteBright:C(97,39),bgBlackBright:C(100,49),bgRedBright:C(101,49),bgGreenBright:C(102,49),bgYellowBright:C(103,49),bgBlueBright:C(104,49),bgMagentaBright:C(105,49),bgCyanBright:C(106,49),bgWhiteBright:C(107,49)},Xi=({useColor:e=Ji}={})=>e?Ui:Object.keys(Ui).reduce((t,r)=>({...t,[r]:String}),{}),{reset:ka,bold:Fa,dim:Wa,italic:Ka,underline:za,inverse:Va,hidden:Ua,strikethrough:Ga,black:Ha,red:Ja,green:Ya,yellow:Xa,blue:Za,magenta:Qa,cyan:ed,white:td,gray:rd,bgBlack:nd,bgRed:id,bgGreen:sd,bgYellow:od,bgBlue:ud,bgMagenta:fd,bgCyan:cd,bgWhite:ld,blackBright:ad,redBright:dd,greenBright:hd,yellowBright:yd,blueBright:gd,magentaBright:pd,cyanBright:md,whiteBright:bd,bgBlackBright:wd,bgRedBright:Sd,bgGreenBright:Ed,bgYellowBright:vd,bgBlueBright:Od,bgMagentaBright:_d,bgCyanBright:Ld,bgWhiteBright:xd}=Xi();L.bgBlack=nd;L.bgBlackBright=wd;L.bgBlue=ud;L.bgBlueBright=Od;L.bgCyan=cd;L.bgCyanBright=Ld;L.bgGreen=sd;L.bgGreenBright=Ed;L.bgMagenta=fd;L.bgMagentaBright=_d;L.bgRed=id;L.bgRedBright=Sd;L.bgWhite=ld;L.bgWhiteBright=xd;L.bgYellow=od;L.bgYellowBright=vd;L.black=Ha;L.blackBright=ad;L.blue=Za;L.blueBright=gd;L.bold=Fa;L.createColors=Xi;L.cyan=ed;L.cyanBright=md;L.dim=Wa;L.gray=rd;L.green=Ya;L.greenBright=hd;L.hidden=Ua;L.inverse=Va;L.isColorSupported=Ji;L.italic=Ka;L.magenta=Qa;L.magentaBright=pd;L.red=Ja;L.redBright=dd;L.reset=ka;L.strikethrough=Ga;L.underline=za;L.white=td;L.whiteBright=bd;L.yellow=Xa;L.yellowBright=yd});var es=v((Hg,Qi)=>{Qi.exports=Zi;function Zi(e,t){if(e&&t)return Zi(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(n){r[n]=e[n]}),r;function r(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];var s=e.apply(this,n),o=n[n.length-1];return typeof s=="function"&&s!==o&&Object.keys(o).forEach(function(u){s[u]=o[u]}),s}}});var tr=v((Jg,er)=>{var ts=es();er.exports=ts(ze);er.exports.strict=ts(rs);ze.proto=ze(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return ze(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return rs(this)},configurable:!0})});function ze(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function rs(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}});var ss=v((Yg,is)=>{var Cd=tr(),Td=function(){},Ad=global.Bare?queueMicrotask:process.nextTick.bind(process),jd=function(e){return e.setHeader&&typeof e.abort=="function"},Pd=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},ns=function(e,t,r){if(typeof t=="function")return ns(e,null,t);t||(t={}),r=Cd(r||Td);var n=e._writableState,i=e._readableState,s=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,u=!1,f=function(){e.writable||a()},a=function(){o=!1,s||r.call(e)},d=function(){s=!1,o||r.call(e)},c=function(p){r.call(e,p?new Error("exited with error code: "+p):null)},y=function(p){r.call(e,p)},h=function(){Ad(l)},l=function(){if(!u){if(s&&!(i&&i.ended&&!i.destroyed))return r.call(e,new Error("premature close"));if(o&&!(n&&n.ended&&!n.destroyed))return r.call(e,new Error("premature close"))}},m=function(){e.req.on("finish",a)};return jd(e)?(e.on("complete",a),e.on("abort",h),e.req?m():e.on("request",m)):o&&!n&&(e.on("end",f),e.on("close",f)),Pd(e)&&e.on("exit",c),e.on("end",d),e.on("finish",a),t.error!==!1&&e.on("error",y),e.on("close",h),function(){u=!0,e.removeListener("complete",a),e.removeListener("abort",h),e.removeListener("request",m),e.req&&e.req.removeListener("finish",a),e.removeListener("end",f),e.removeListener("close",f),e.removeListener("finish",a),e.removeListener("exit",c),e.removeListener("end",d),e.removeListener("error",y),e.removeListener("close",h)}};is.exports=ns});var fs=v((Xg,us)=>{var Nd=tr(),Bd=ss(),Ve;try{Ve=require("fs")}catch{}var pe=function(){},Dd=typeof process>"u"?!1:/^v?\.0/.test(process.version),Ue=function(e){return typeof e=="function"},Md=function(e){return!Dd||!Ve?!1:(e instanceof(Ve.ReadStream||pe)||e instanceof(Ve.WriteStream||pe))&&Ue(e.close)},qd=function(e){return e.setHeader&&Ue(e.abort)},$d=function(e,t,r,n){n=Nd(n);var i=!1;e.on("close",function(){i=!0}),Bd(e,{readable:t,writable:r},function(o){if(o)return n(o);i=!0,n()});var s=!1;return function(o){if(!i&&!s){if(s=!0,Md(e))return e.close(pe);if(qd(e))return e.abort();if(Ue(e.destroy))return e.destroy();n(o||new Error("stream was destroyed"))}}},os=function(e){e()},Rd=function(e,t){return e.pipe(t)},Id=function(){var e=Array.prototype.slice.call(arguments),t=Ue(e[e.length-1]||pe)&&e.pop()||pe;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r,n=e.map(function(i,s){var o=s<e.length-1,u=s>0;return $d(i,o,u,function(f){r||(r=f),f&&n.forEach(os),!o&&(n.forEach(os),t(r))})});return e.reduce(Rd)};us.exports=Id});var ds=v((Zg,as)=>{"use strict";var{Transform:kd}=require("stream"),{StringDecoder:Fd}=require("string_decoder"),H=Symbol("last"),Ge=Symbol("decoder");function Wd(e,t,r){let n;if(this.overflow){if(n=this[Ge].write(e).split(this.matcher),n.length===1)return r();n.shift(),this.overflow=!1}else this[H]+=this[Ge].write(e),n=this[H].split(this.matcher);this[H]=n.pop();for(let i=0;i<n.length;i++)try{ls(this,this.mapper(n[i]))}catch(s){return r(s)}if(this.overflow=this[H].length>this.maxLength,this.overflow&&!this.skipOverflow){r(new Error("maximum buffer reached"));return}r()}function Kd(e){if(this[H]+=this[Ge].end(),this[H])try{ls(this,this.mapper(this[H]))}catch(t){return e(t)}e()}function ls(e,t){t!==void 0&&e.push(t)}function cs(e){return e}function zd(e,t,r){switch(e=e||/\r?\n/,t=t||cs,r=r||{},arguments.length){case 1:typeof e=="function"?(t=e,e=/\r?\n/):typeof e=="object"&&!(e instanceof RegExp)&&!e[Symbol.split]&&(r=e,e=/\r?\n/);break;case 2:typeof e=="function"?(r=t,t=e,e=/\r?\n/):typeof t=="object"&&(r=t,t=cs)}r=Object.assign({},r),r.autoDestroy=!0,r.transform=Wd,r.flush=Kd,r.readableObjectMode=!0;let n=new kd(r);return n[H]="",n[Ge]=new Fd("utf8"),n.matcher=e,n.mapper=t,n.maxLength=r.maxLength,n.skipOverflow=r.skipOverflow||!1,n.overflow=!1,n._destroy=function(i,s){this._writableState.errorEmitted=!1,s(i)},n}as.exports=zd});var ps=v((Qg,gs)=>{"use strict";var hs=Symbol.for("pino.metadata"),Vd=ds(),{Duplex:Ud}=require("stream"),{parentPort:ys,workerData:oe}=require("worker_threads");function Gd(){let e,t,r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r}gs.exports=function(t,r={}){var a,d;let n=r.expectPinoConfig===!0&&((a=oe==null?void 0:oe.workerData)==null?void 0:a.pinoWillSendConfig)===!0,i=r.parse==="lines",s=typeof r.parseLine=="function"?r.parseLine:JSON.parse,o=r.close||Hd,u=Vd(function(c){let y;try{y=s(c)}catch(h){this.emit("unknown",c,h);return}if(y===null){this.emit("unknown",c,"Null value ignored");return}return typeof y!="object"&&(y={data:y,time:Date.now()}),u[hs]&&(u.lastTime=y.time,u.lastLevel=y.level,u.lastObj=y),i?c:y},{autoDestroy:!0});if(u._destroy=function(c,y){let h=o(c,y);h&&typeof h.then=="function"&&h.then(y,y)},r.expectPinoConfig===!0&&((d=oe==null?void 0:oe.workerData)==null?void 0:d.pinoWillSendConfig)!==!0&&setImmediate(()=>{u.emit("error",new Error("This transport is not compatible with the current version of pino. Please upgrade pino to the latest version."))}),r.metadata!==!1&&(u[hs]=!0,u.lastTime=0,u.lastLevel=0,u.lastObj=null),n){let c={},y=Gd();return ys.on("message",function h(l){l.code==="PINO_CONFIG"&&(c=l.config,y.resolve(),ys.off("message",h))}),Object.defineProperties(u,{levels:{get(){return c.levels}},messageKey:{get(){return c.messageKey}},errorKey:{get(){return c.errorKey}}}),y.then(f)}return f();function f(){let c=t(u);if(c&&typeof c.catch=="function")c.catch(y=>{u.destroy(y)}),c=null;else if(r.enablePipelining&&c)return Ud.from({writable:u,readable:c});return u}};function Hd(e,t){process.nextTick(t,e)}});var V=v((ep,ms)=>{"use strict";ms.exports={DATE_FORMAT:"yyyy-mm-dd HH:MM:ss.l o",DATE_FORMAT_SIMPLE:"HH:MM:ss.l",ERROR_LIKE_KEYS:["err","error"],MESSAGE_KEY:"msg",LEVEL_KEY:"level",LEVEL_LABEL:"levelLabel",TIMESTAMP_KEY:"time",LEVELS:{default:"USERLVL",60:"FATAL",50:"ERROR",40:"WARN",30:"INFO",20:"DEBUG",10:"TRACE"},LEVEL_NAMES:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},LOGGER_KEYS:["pid","hostname","name","level","time","timestamp","caller"]}});var He=v((tp,Ss)=>{"use strict";Ss.exports=Jd;var{LEVELS:bs,LEVEL_NAMES:ws}=V();function Jd(e,t,r){let n=e?t||bs:Object.assign({},bs,t),i=e?r||ws:Object.assign({},ws,r);return function(s){let o="default";return Number.isInteger(+s)?o=Object.prototype.hasOwnProperty.call(n,s)?s:o:o=Object.prototype.hasOwnProperty.call(i,s.toLowerCase())?i[s.toLowerCase()]:o,[n[o],o]}}});var sr=v((rp,_s)=>{"use strict";var z=e=>e,Je={default:z,60:z,50:z,40:z,30:z,20:z,10:z,message:z,greyMessage:z,property:z},{createColors:Es}=Qt(),Yd=He(),be=Es({useColor:!0}),{white:rr,bgRed:Xd,red:Zd,yellow:Qd,green:eh,blue:th,gray:nr,cyan:vs,magenta:Os}=be,me={default:rr,60:Xd,50:Zd,40:Qd,30:eh,20:th,10:nr,message:vs,greyMessage:nr,property:Os};function rh(e){return e.reduce(function(t,[r,n]){return t[r]=typeof be[n]=="function"?be[n]:rr,t},{default:rr,message:vs,greyMessage:nr,property:Os})}function ir(e){return function(t,r,{customLevels:n,customLevelNames:i}={}){let[s,o]=Yd(e,n,i)(t);return Object.prototype.hasOwnProperty.call(r,o)?r[o](s):r.default(s)}}function nh(e){let t=ir(e),r=function(n,i){return t(n,Je,i)};return r.message=Je.message,r.greyMessage=Je.greyMessage,r.property=Je.property,r.colors=Es({useColor:!1}),r}function ih(e){let t=ir(e),r=function(n,i){return t(n,me,i)};return r.message=me.message,r.property=me.property,r.greyMessage=me.greyMessage,r.colors=be,r}function sh(e,t){let r=rh(e),n=t?r:Object.assign({},me,r),i=ir(t),s=function(o,u){return i(o,n,u)};return s.colors=be,s.message=s.message||n.message,s.property=s.property||n.property,s.greyMessage=s.greyMessage||n.greyMessage,s}_s.exports=function(t=!1,r,n){return t&&r!==void 0?sh(r,n):t?ih(n):nh(n)}});var or=v((np,Ls)=>{"use strict";Ls.exports=function(){}});var Cs=v((ip,xs)=>{"use strict";xs.exports=fh;var{isMainThread:oh}=require("node:worker_threads"),uh=_t(),Ye=or();function fh(e){let t=new uh(e);return t.on("error",r),!e.sync&&oh&&ch(t),t;function r(n){if(n.code==="EPIPE"){t.write=Ye,t.end=Ye,t.flushSync=Ye,t.destroy=Ye;return}t.removeListener("error",r)}}function ch(e){if(global.WeakRef&&global.WeakMap&&global.FinalizationRegistry){let t=De();t.register(e,lh),e.on("close",function(){t.unregister(e)})}}function lh(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}});var Xe=v((sp,Ts)=>{"use strict";Ts.exports=ah;function ah(e){return e instanceof Date&&!Number.isNaN(e.getTime())}});var ur=v((op,As)=>{"use strict";As.exports=hh;var dh=Xe();function hh(e){let t=new Date(e);return dh(t)||(t=new Date(+e)),t}});var Ze=v((up,js)=>{"use strict";js.exports=yh;function yh(e){let t=[],r=!1,n="";for(let i=0;i<e.length;i++){let s=e.charAt(i);if(s==="\\"){r=!0;continue}if(r){r=!1,n+=s;continue}if(s==="."){t.push(n),n="";continue}n+=s}return n.length&&t.push(n),t}});var ue=v((fp,Ps)=>{"use strict";Ps.exports=ph;var gh=Ze();function ph(e,t){let r=Array.isArray(t)?t:gh(t);for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))return;e=e[n]}return e}});var fr=v((cp,Ns)=>{"use strict";Ns.exports=wh;var mh=ue(),bh=Ze();function wh(e,t){let r=bh(t),n=r.pop();e=mh(e,r),e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}});var Ks=v(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});var Sh=Function.prototype.toString,cr=Object.create,Eh=Object.prototype.toString,vh=(function(){function e(){this._keys=[],this._values=[]}return e.prototype.has=function(t){return!!~this._keys.indexOf(t)},e.prototype.get=function(t){return this._values[this._keys.indexOf(t)]},e.prototype.set=function(t,r){this._keys.push(t),this._values.push(r)},e})();function Oh(){return new vh}function _h(){return new WeakMap}var Lh=typeof WeakMap<"u"?_h:Oh;function ar(e){if(!e)return cr(null);var t=e.constructor;if(t===Object)return e===Object.prototype?{}:cr(e);if(t&&~Sh.call(t).indexOf("[native code]"))try{return new t}catch{}return cr(e)}function xh(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}function Ch(e){return e.flags}var Th=/test/g.flags==="g"?Ch:xh;function Bs(e){var t=Eh.call(e);return t.substring(8,t.length-1)}function Ah(e){return e[Symbol.toStringTag]||Bs(e)}var jh=typeof Symbol<"u"?Ah:Bs,Ph=Object.defineProperty,Nh=Object.getOwnPropertyDescriptor,Ds=Object.getOwnPropertyNames,dr=Object.getOwnPropertySymbols,Ms=Object.prototype,qs=Ms.hasOwnProperty,Bh=Ms.propertyIsEnumerable,$s=typeof dr=="function";function Dh(e){return Ds(e).concat(dr(e))}var Mh=$s?Dh:Ds;function et(e,t,r){for(var n=Mh(e),i=0,s=n.length,o=void 0,u=void 0;i<s;++i)if(o=n[i],!(o==="callee"||o==="caller")){if(u=Nh(e,o),!u){t[o]=r.copier(e[o],r);continue}!u.get&&!u.set&&(u.value=r.copier(u.value,r));try{Ph(t,o,u)}catch{t[o]=u.value}}return t}function qh(e,t){var r=new t.Constructor;t.cache.set(e,r);for(var n=0,i=e.length;n<i;++n)r[n]=t.copier(e[n],t);return r}function $h(e,t){var r=new t.Constructor;return t.cache.set(e,r),et(e,r,t)}function Rs(e,t){return e.slice(0)}function Rh(e,t){return e.slice(0,e.size,e.type)}function Ih(e,t){return new t.Constructor(Rs(e.buffer))}function kh(e,t){return new t.Constructor(e.getTime())}function Is(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach(function(n,i){r.set(i,t.copier(n,t))}),r}function Fh(e,t){return et(e,Is(e,t),t)}function Wh(e,t){var r=ar(t.prototype);t.cache.set(e,r);for(var n in e)qs.call(e,n)&&(r[n]=t.copier(e[n],t));return r}function Kh(e,t){var r=ar(t.prototype);t.cache.set(e,r);for(var n in e)qs.call(e,n)&&(r[n]=t.copier(e[n],t));for(var i=dr(e),s=0,o=i.length,u=void 0;s<o;++s)u=i[s],Bh.call(e,u)&&(r[u]=t.copier(e[u],t));return r}var zh=$s?Kh:Wh;function Vh(e,t){var r=ar(t.prototype);return t.cache.set(e,r),et(e,r,t)}function lr(e,t){return new t.Constructor(e.valueOf())}function Uh(e,t){var r=new t.Constructor(e.source,Th(e));return r.lastIndex=e.lastIndex,r}function Qe(e,t){return e}function ks(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach(function(n){r.add(t.copier(n,t))}),r}function Gh(e,t){return et(e,ks(e,t),t)}var Hh=Array.isArray,hr=Object.assign,Jh=Object.getPrototypeOf||(function(e){return e.__proto__}),Fs={array:qh,arrayBuffer:Rs,blob:Rh,dataView:Ih,date:kh,error:Qe,map:Is,object:zh,regExp:Uh,set:ks},Yh=hr({},Fs,{array:$h,map:Fh,object:Vh,set:Gh});function Xh(e){return{Arguments:e.object,Array:e.array,ArrayBuffer:e.arrayBuffer,Blob:e.blob,Boolean:lr,DataView:e.dataView,Date:e.date,Error:e.error,Float32Array:e.arrayBuffer,Float64Array:e.arrayBuffer,Int8Array:e.arrayBuffer,Int16Array:e.arrayBuffer,Int32Array:e.arrayBuffer,Map:e.map,Number:lr,Object:e.object,Promise:Qe,RegExp:e.regExp,Set:e.set,String:lr,WeakMap:Qe,WeakSet:Qe,Uint8Array:e.arrayBuffer,Uint8ClampedArray:e.arrayBuffer,Uint16Array:e.arrayBuffer,Uint32Array:e.arrayBuffer,Uint64Array:e.arrayBuffer}}function yr(e){var t=hr({},Fs,e),r=Xh(t),n=r.Array,i=r.Object;function s(o,u){if(u.prototype=u.Constructor=void 0,!o||typeof o!="object")return o;if(u.cache.has(o))return u.cache.get(o);if(u.prototype=Jh(o),u.Constructor=u.prototype&&u.prototype.constructor,!u.Constructor||u.Constructor===Object)return i(o,u);if(Hh(o))return n(o,u);var f=r[jh(o)];return f?f(o,u):typeof o.then=="function"?o:i(o,u)}return function(u){return s(u,{Constructor:void 0,cache:Lh(),copier:s,prototype:void 0})}}function Ws(e){return yr(hr({},Yh,e))}var Zh=Ws({}),Qh=yr({});fe.copyStrict=Zh;fe.createCopier=yr;fe.createStrictCopier=Ws;fe.default=Qh});var gr=v((ap,zs)=>{"use strict";zs.exports=ny;var{createCopier:ey}=Ks(),ty=ey({}),ry=fr();function ny({log:e,context:t}){let{ignoreKeys:r,includeKeys:n}=t,i=ty(e);if(n){let s={};return n.forEach(o=>{s[o]=i[o]}),s}return r.forEach(s=>{ry(i,s)}),i}});var Us=v((pr,Vs)=>{"use strict";function ce(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ce=function(r){return typeof r}:ce=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ce(e)}(function(e){var t=arguments,r=(function(){var f=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,a=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g;return function(c,y,h,l){if(t.length===1&&u(c)==="string"&&!/\d/.test(c)&&(y=c,c=void 0),c=c||c===0?c:new Date,c instanceof Date||(c=new Date(c)),isNaN(c))throw TypeError("Invalid date");y=String(r.masks[y]||y||r.masks.default);var m=y.slice(0,4);(m==="UTC:"||m==="GMT:")&&(y=y.slice(4),h=!0,m==="GMT:"&&(l=!0));var p=function(){return h?"getUTC":"get"},b=function(){return c[p()+"Date"]()},w=function(){return c[p()+"Day"]()},S=function(){return c[p()+"Month"]()},O=function(){return c[p()+"FullYear"]()},x=function(){return c[p()+"Hours"]()},P=function(){return c[p()+"Minutes"]()},T=function(){return c[p()+"Seconds"]()},j=function(){return c[p()+"Milliseconds"]()},_=function(){return h?0:c.getTimezoneOffset()},N=function(){return s(c)},B=function(){return o(c)},A={d:function(){return b()},dd:function(){return n(b())},ddd:function(){return r.i18n.dayNames[w()]},DDD:function(){return i({y:O(),m:S(),d:b(),_:p(),dayName:r.i18n.dayNames[w()],short:!0})},dddd:function(){return r.i18n.dayNames[w()+7]},DDDD:function(){return i({y:O(),m:S(),d:b(),_:p(),dayName:r.i18n.dayNames[w()+7]})},m:function(){return S()+1},mm:function(){return n(S()+1)},mmm:function(){return r.i18n.monthNames[S()]},mmmm:function(){return r.i18n.monthNames[S()+12]},yy:function(){return String(O()).slice(2)},yyyy:function(){return n(O(),4)},h:function(){return x()%12||12},hh:function(){return n(x()%12||12)},H:function(){return x()},HH:function(){return n(x())},M:function(){return P()},MM:function(){return n(P())},s:function(){return T()},ss:function(){return n(T())},l:function(){return n(j(),3)},L:function(){return n(Math.floor(j()/10))},t:function(){return x()<12?r.i18n.timeNames[0]:r.i18n.timeNames[1]},tt:function(){return x()<12?r.i18n.timeNames[2]:r.i18n.timeNames[3]},T:function(){return x()<12?r.i18n.timeNames[4]:r.i18n.timeNames[5]},TT:function(){return x()<12?r.i18n.timeNames[6]:r.i18n.timeNames[7]},Z:function(){return l?"GMT":h?"UTC":(String(c).match(a)||[""]).pop().replace(d,"").replace(/GMT\+0000/g,"UTC")},o:function(){return(_()>0?"-":"+")+n(Math.floor(Math.abs(_())/60)*100+Math.abs(_())%60,4)},p:function(){return(_()>0?"-":"+")+n(Math.floor(Math.abs(_())/60),2)+":"+n(Math.floor(Math.abs(_())%60),2)},S:function(){return["th","st","nd","rd"][b()%10>3?0:(b()%100-b()%10!=10)*b()%10]},W:function(){return N()},WW:function(){return n(N())},N:function(){return B()}};return y.replace(f,function(E){return E in A?A[E]():E.slice(1,E.length-1)})}})();r.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},r.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]};var n=function(a,d){for(a=String(a),d=d||2;a.length<d;)a="0"+a;return a},i=function(a){var d=a.y,c=a.m,y=a.d,h=a._,l=a.dayName,m=a.short,p=m===void 0?!1:m,b=new Date,w=new Date;w.setDate(w[h+"Date"]()-1);var S=new Date;S.setDate(S[h+"Date"]()+1);var O=function(){return b[h+"Date"]()},x=function(){return b[h+"Month"]()},P=function(){return b[h+"FullYear"]()},T=function(){return w[h+"Date"]()},j=function(){return w[h+"Month"]()},_=function(){return w[h+"FullYear"]()},N=function(){return S[h+"Date"]()},B=function(){return S[h+"Month"]()},A=function(){return S[h+"FullYear"]()};return P()===d&&x()===c&&O()===y?p?"Tdy":"Today":_()===d&&j()===c&&T()===y?p?"Ysd":"Yesterday":A()===d&&B()===c&&N()===y?p?"Tmw":"Tomorrow":l},s=function(a){var d=new Date(a.getFullYear(),a.getMonth(),a.getDate());d.setDate(d.getDate()-(d.getDay()+6)%7+3);var c=new Date(d.getFullYear(),0,4);c.setDate(c.getDate()-(c.getDay()+6)%7+3);var y=d.getTimezoneOffset()-c.getTimezoneOffset();d.setHours(d.getHours()-y);var h=(d-c)/(864e5*7);return 1+Math.floor(h)},o=function(a){var d=a.getDay();return d===0&&(d=7),d},u=function(a){return a===null?"null":a===void 0?"undefined":ce(a)!=="object"?ce(a):Array.isArray(a)?"array":{}.toString.call(a).slice(8,-1).toLowerCase()};typeof define=="function"&&define.amd?define(function(){return r}):(typeof pr>"u"?"undefined":ce(pr))==="object"?Vs.exports=r:e.dateFormat=r})(void 0)});var mr=v((dp,Gs)=>{"use strict";Gs.exports=fy;var{DATE_FORMAT:iy,DATE_FORMAT_SIMPLE:sy}=V(),we=Us(),oy=ur(),uy=Xe();function fy(e,t=!1){if(t===!1)return e;let r=oy(e);if(!uy(r))return e;if(t===!0)return we(r,sy);let n=t.toUpperCase();if(n==="SYS:STANDARD")return we(r,iy);let i=n.substr(0,4);return i==="SYS:"||i==="UTC:"?i==="UTC:"?we(r,t):we(r,t.slice(4)):we(r,`UTC:${t}`)}});var br=v((hp,Hs)=>{"use strict";Hs.exports=cy;function cy(e){return e?typeof e=="string"?e.split(",").reduce((t,r,n)=>{let[i,s=n]=r.split(":");return t[i.toLowerCase()]=s,t},{}):Object.prototype.toString.call(e)==="[object Object]"?Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{}):{}:{}}});var wr=v((yp,Js)=>{"use strict";Js.exports=ly;function ly(e){return e?typeof e=="string"?e.split(",").reduce((t,r,n)=>{let[i,s=n]=r.split(":");return t[s]=i.toUpperCase(),t},{default:"USERLVL"}):Object.prototype.toString.call(e)==="[object Object]"?Object.keys(e).reduce((t,r)=>(t[e[r]]=r.toUpperCase(),t),{default:"USERLVL"}):{}:{}}});var Sr=v((gp,Ys)=>{"use strict";Ys.exports=dy;var ay=ue();function dy(e,t){return e=e.replace(/{if (.*?)}(.*?){end}/g,r),e=e.replace(/{if (.*?)}/g,""),e=e.replace(/{end}/g,""),e.replace(/\s+/g," ").trim();function r(n,i,s){let o=ay(t,i);return o&&s.includes(i)?s.replace(new RegExp("{"+i+"}","g"),o):""}}});var tt=v((pp,Xs)=>{"use strict";Xs.exports=hy;function hy(e){return Object.prototype.toString.apply(e)==="[object Object]"}});var Se=v((mp,Zs)=>{"use strict";Zs.exports=yy;function yy({input:e,ident:t=" ",eol:r=`
|
|
25
|
+
`}){let n=e.split(/\r?\n/);for(let i=1;i<n.length;i+=1)n[i]=t+n[i];return n.join(r)}});var ro=v((bp,to)=>{"use strict";to.exports=by;var{LEVEL_NAMES:Qs}=V(),eo=sr(),gy=wr(),py=br(),my=He();function by(e){let t=e.crlf?`\r
|
|
26
|
+
`:`
|
|
27
|
+
`,r=" ",{customPrettifiers:n,errorLikeObjectKeys:i,hideObject:s,levelFirst:o,levelKey:u,levelLabel:f,messageFormat:a,messageKey:d,minimumLevel:c,singleLine:y,timestampKey:h,translateTime:l}=e,m=e.errorProps.split(","),p=typeof e.useOnlyCustomProps=="boolean"?e.useOnlyCustomProps:e.useOnlyCustomProps==="true",b=gy(e.customLevels),w=py(e.customLevels),S=my(p,b,w),O;if(e.customColors)if(typeof e.customColors=="string")O=e.customColors.split(",").reduce((N,B)=>{let[A,E]=B.split(":"),$=(p?e.customLevels:w[A]!==void 0)?w[A]:Qs[A],Y=$!==void 0?$:A;return N.push([Y,E]),N},[]);else if(typeof e.customColors=="object")O=Object.keys(e.customColors).reduce((N,B)=>{let[A,E]=[B,e.customColors[B]],$=(p?e.customLevels:w[A]!==void 0)?w[A]:Qs[A],Y=$!==void 0?$:A;return N.push([Y,E]),N},[]);else throw new Error("options.customColors must be of type string or object.");let x={customLevels:b,customLevelNames:w};p===!0&&!e.customLevels&&(x.customLevels=void 0,x.customLevelNames=void 0);let P=e.include!==void 0?new Set(e.include.split(",")):void 0,T=!P&&e.ignore?new Set(e.ignore.split(",")):void 0,j=eo(e.colorize,O,p),_=e.colorizeObjects?j:eo(!1,[],!1);return{EOL:t,IDENT:r,colorizer:j,customColors:O,customLevelNames:w,customLevels:b,customPrettifiers:n,customProperties:x,errorLikeObjectKeys:i,errorProps:m,getLevelLabelData:S,hideObject:s,ignoreKeys:T,includeKeys:P,levelFirst:o,levelKey:u,levelLabel:f,messageFormat:a,messageKey:d,minimumLevel:c,objectColorizer:_,singleLine:y,timestampKey:h,translateTime:l,useOnlyCustomProps:p}}});var fo=v((wp,uo)=>{uo.exports=Ee;Ee.default=Ee;Ee.stable=so;Ee.stableStringify=so;var rt="[...]",no="[Circular]",re=[],te=[];function io(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Ee(e,t,r,n){typeof n>"u"&&(n=io()),Er(e,"",0,[],void 0,0,n);var i;try{te.length===0?i=JSON.stringify(e,t,r):i=JSON.stringify(e,oo(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;re.length!==0;){var s=re.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function le(e,t,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==void 0?i.configurable?(Object.defineProperty(n,r,{value:e}),re.push([n,r,t,i])):te.push([t,r,e]):(n[r]=e,re.push([n,r,t]))}function Er(e,t,r,n,i,s,o){s+=1;var u;if(typeof e=="object"&&e!==null){for(u=0;u<n.length;u++)if(n[u]===e){le(no,e,t,i);return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){le(rt,e,t,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){le(rt,e,t,i);return}if(n.push(e),Array.isArray(e))for(u=0;u<e.length;u++)Er(e[u],u,u,n,e,s,o);else{var f=Object.keys(e);for(u=0;u<f.length;u++){var a=f[u];Er(e[a],a,u,n,e,s,o)}}n.pop()}}function wy(e,t){return e<t?-1:e>t?1:0}function so(e,t,r,n){typeof n>"u"&&(n=io());var i=vr(e,"",0,[],void 0,0,n)||e,s;try{te.length===0?s=JSON.stringify(i,t,r):s=JSON.stringify(i,oo(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;re.length!==0;){var o=re.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return s}function vr(e,t,r,n,i,s,o){s+=1;var u;if(typeof e=="object"&&e!==null){for(u=0;u<n.length;u++)if(n[u]===e){le(no,e,t,i);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){le(rt,e,t,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){le(rt,e,t,i);return}if(n.push(e),Array.isArray(e))for(u=0;u<e.length;u++)vr(e[u],u,u,n,e,s,o);else{var f={},a=Object.keys(e).sort(wy);for(u=0;u<a.length;u++){var d=a[u];vr(e[d],d,u,n,e,s,o),f[d]=e[d]}if(typeof i<"u")re.push([i,t,e]),i[t]=f;else return f}n.pop()}}function oo(e){return e=typeof e<"u"?e:function(t,r){return r},function(t,r){if(te.length>0)for(var n=0;n<te.length;n++){var i=te[n];if(i[1]===t&&i[0]===r){r=i[2],te.splice(n,1);break}}return e.call(this,t,r)}}});var Or=v((Sp,co)=>{"use strict";co.exports=Ey;var Sy=Se();function Ey({keyName:e,lines:t,eol:r,ident:n}){let i="",s=Sy({input:t,ident:n,eol:r}),o=`${n}${e}: ${s}${r}`.split(r);for(let u=0;u<o.length;u+=1){u!==0&&(i+=r);let f=o[u];if(/^\s*"stack"/.test(f)){let a=/^(\s*"stack":)\s*(".*"),?$/.exec(f);if(a&&a.length===3){let d=/^\s*/.exec(f)[0].length+4,c=" ".repeat(d),y=a[2];i+=a[1]+r+c+JSON.parse(y).replace(/\n/g,r+c)}else i+=f}else i+=f}return i}});var nt=v((Ep,lo)=>{"use strict";lo.exports=Ly;var{LOGGER_KEYS:vy}=V(),_r=fo(),Oy=Se(),_y=Or();function Ly({log:e,excludeLoggerKeys:t=!0,skipKeys:r=[],context:n}){let{EOL:i,IDENT:s,customPrettifiers:o,errorLikeObjectKeys:u,objectColorizer:f,singleLine:a,colorizer:d}=n,c=[].concat(r);t===!0&&Array.prototype.push.apply(c,vy);let y="",{plain:h,errors:l}=Object.entries(e).reduce(({plain:m,errors:p},[b,w])=>{if(c.includes(b)===!1){let S=typeof o[b]=="function"?o[b](w,b,e,{colors:d.colors}):w;u.includes(b)?p[b]=S:m[b]=S}return{plain:m,errors:p}},{plain:{},errors:{}});return a?(Object.keys(h).length>0&&(y+=f.greyMessage(_r(h))),y+=i,y=y.replace(/\\\\/gi,"\\")):Object.entries(h).forEach(([m,p])=>{let b=typeof o[m]=="function"?p:_r(p,null,2);if(b===void 0)return;b=b.replace(/\\\\/gi,"\\");let w=Oy({input:b,ident:s,eol:i});y+=`${s}${f.property(m)}:${w.startsWith(i)?"":" "}${w}${i}`}),Object.entries(l).forEach(([m,p])=>{let b=typeof o[m]=="function"?p:_r(p,null,2);b!==void 0&&(y+=_y({keyName:m,lines:b,eol:i,ident:s}))}),y}});var Lr=v((vp,ao)=>{"use strict";ao.exports=jy;var{LOGGER_KEYS:xy}=V(),Cy=tt(),Ty=Se(),Ay=nt();function jy({log:e,context:t}){let{EOL:r,IDENT:n,errorProps:i,messageKey:s}=t,o=e.stack,u=Ty({input:o,ident:n,eol:r}),f=`${n}${u}${r}`;if(i.length>0){let a=xy.concat(s,"type","stack"),d;i[0]==="*"?d=Object.keys(e).filter(c=>a.includes(c)===!1):d=i.filter(c=>a.includes(c)===!1);for(let c=0;c<d.length;c+=1){let y=d[c];if(y in e){if(Cy(e[y])){let h=Ay({log:e[y],excludeLoggerKeys:!1,context:{...t,IDENT:n+n}});f=`${f}${n}${y}: {${r}${h}${n}}${r}`;continue}f=`${f}${n}${y}: ${e[y]}${r}`}}}return f}});var xr=v((Op,ho)=>{"use strict";ho.exports=Ny;var Py=ue();function Ny({log:e,context:t}){var d;let{colorizer:r,customLevels:n,customLevelNames:i,levelKey:s,getLevelLabelData:o}=t,u=(d=t.customPrettifiers)==null?void 0:d.level,f=Py(e,s);if(f===void 0)return;let a=r(f,{customLevels:n,customLevelNames:i});if(u){let[c]=o(f);return u(f,s,e,{label:c,labelColorized:a,colors:r.colors})}return a}});var Cr=v((_p,go)=>{"use strict";go.exports=My;var{LEVELS:By}=V(),yo=ue(),Dy=Sr();function My({log:e,context:t}){let{colorizer:r,customLevels:n,levelKey:i,levelLabel:s,messageFormat:o,messageKey:u,useOnlyCustomProps:f}=t;if(o&&typeof o=="string"){let a=Dy(o,e),d=String(a).replace(/{([^{}]+)}/g,function(c,y){let h;return y===s&&(h=yo(e,i))!==void 0?(f?n===void 0:n[h]===void 0)?By[h]:n[h]:yo(e,y)||""});return r.message(d)}if(o&&typeof o=="function"){let a=o(e,u,s,{colors:r.colors});return r.message(a)}if(u in e&&!(typeof e[u]!="string"&&typeof e[u]!="number"&&typeof e[u]!="boolean"))return r.message(e[u])}});var Tr=v((Lp,po)=>{"use strict";po.exports=qy;function qy({log:e,context:t}){let{customPrettifiers:r,colorizer:n}=t,i="";if(e.name||e.pid||e.hostname){if(i+="(",e.name&&(i+=r.name?r.name(e.name,"name",e,{colors:n.colors}):e.name),e.pid){let s=r.pid?r.pid(e.pid,"pid",e,{colors:n.colors}):e.pid;e.name&&e.pid?i+="/"+s:i+=s}if(e.hostname){let s=r.hostname?r.hostname(e.hostname,"hostname",e,{colors:n.colors}):e.hostname;i+=`${i==="("?"on":" on"} ${s}`}i+=")"}if(e.caller){let s=r.caller?r.caller(e.caller,"caller",e,{colors:n.colors}):e.caller;i+=`${i===""?"":" "}<${s}>`}if(i!=="")return i}});var Ar=v((xp,mo)=>{"use strict";mo.exports=Ry;var $y=mr();function Ry({log:e,context:t}){var u;let{timestampKey:r,translateTime:n}=t,i=(u=t.customPrettifiers)==null?void 0:u.time,s=null;if(r in e?s=e[r]:"timestamp"in e&&(s=e.timestamp),s===null)return;let o=n?$y(s,n):s;return i?i(o):`[${o}]`}});var wo=v((Cp,bo)=>{"use strict";bo.exports={buildSafeSonicBoom:Cs(),createDate:ur(),deleteLogProperty:fr(),filterLog:gr(),formatTime:mr(),getPropertyValue:ue(),handleCustomLevelsNamesOpts:br(),handleCustomLevelsOpts:wr(),interpretConditionals:Sr(),isObject:tt(),isValidDate:Xe(),joinLinesWithIndentation:Se(),noop:or(),parseFactoryOptions:ro(),prettifyErrorLog:Lr(),prettifyError:Or(),prettifyLevel:xr(),prettifyMessage:Cr(),prettifyMetadata:Tr(),prettifyObject:nt(),prettifyTime:Ar(),splitPropertyKey:Ze(),getLevelLabelData:He()}});var _o=v((Tp,ae)=>{"use strict";var Iy=typeof Buffer<"u",So=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Eo=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function vo(e,t,r){r==null&&t!==null&&typeof t=="object"&&(r=t,t=void 0),Iy&&Buffer.isBuffer(e)&&(e=e.toString()),e&&e.charCodeAt(0)===65279&&(e=e.slice(1));let n=JSON.parse(e,t);if(n===null||typeof n!="object")return n;let i=r&&r.protoAction||"error",s=r&&r.constructorAction||"error";if(i==="ignore"&&s==="ignore")return n;if(i!=="ignore"&&s!=="ignore"){if(So.test(e)===!1&&Eo.test(e)===!1)return n}else if(i!=="ignore"&&s==="ignore"){if(So.test(e)===!1)return n}else if(Eo.test(e)===!1)return n;return Oo(n,{protoAction:i,constructorAction:s,safe:r&&r.safe})}function Oo(e,{protoAction:t="error",constructorAction:r="error",safe:n}={}){let i=[e];for(;i.length;){let s=i;i=[];for(let o of s){if(t!=="ignore"&&Object.prototype.hasOwnProperty.call(o,"__proto__")){if(n===!0)return null;if(t==="error")throw new SyntaxError("Object contains forbidden prototype property");delete o.__proto__}if(r!=="ignore"&&Object.prototype.hasOwnProperty.call(o,"constructor")&&o.constructor!==null&&typeof o.constructor=="object"&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype")){if(n===!0)return null;if(r==="error")throw new SyntaxError("Object contains forbidden prototype property");delete o.constructor}for(let u in o){let f=o[u];f&&typeof f=="object"&&i.push(f)}}}return e}function jr(e,t,r){let{stackTraceLimit:n}=Error;Error.stackTraceLimit=0;try{return vo(e,t,r)}finally{Error.stackTraceLimit=n}}function ky(e,t){let{stackTraceLimit:r}=Error;Error.stackTraceLimit=0;try{return vo(e,t,{safe:!0})}catch{return}finally{Error.stackTraceLimit=r}}ae.exports=jr;ae.exports.default=jr;ae.exports.parse=jr;ae.exports.safeParse=ky;ae.exports.scan=Oo});var Co=v((Ap,xo)=>{"use strict";xo.exports=Zy;var Fy=_o(),Lo=tt(),Wy=Lr(),Ky=xr(),zy=Cr(),Vy=Tr(),Uy=nt(),Gy=Ar(),Hy=gr(),{LEVELS:Jy,LEVEL_KEY:Yy,LEVEL_NAMES:Pr}=V(),Xy=e=>{try{return{value:Fy.parse(e,{protoAction:"remove"})}}catch(t){return{err:t}}};function Zy(e){let t;if(Lo(e))t=e;else{let u=Xy(e);if(u.err||!Lo(u.value))return e+this.EOL;t=u.value}if(this.minimumLevel){let u;this.useOnlyCustomProps?u=this.customLevels:u=this.customLevelNames[this.minimumLevel]!==void 0;let f;if(u?f=this.customLevelNames[this.minimumLevel]:f=Pr[this.minimumLevel],f||(f=typeof this.minimumLevel=="string"?Pr[this.minimumLevel]:Pr[Jy[this.minimumLevel].toLowerCase()]),t[this.levelKey===void 0?Yy:this.levelKey]<f)return}let r=zy({log:t,context:this.context});(this.ignoreKeys||this.includeKeys)&&(t=Hy({log:t,context:this.context}));let n=Ky({log:t,context:{...this.context,...this.context.customProperties}}),i=Vy({log:t,context:this.context}),s=Gy({log:t,context:this.context}),o="";if(this.levelFirst&&n&&(o=`${n}`),s&&o===""?o=`${s}`:s&&(o=`${o} ${s}`),!this.levelFirst&&n&&(o.length>0?o=`${o} ${n}`:o=n),i&&(o.length>0?o=`${o} ${i}:`:o=i),o.endsWith(":")===!1&&o!==""&&(o+=":"),r!==void 0&&(o.length>0?o=`${o} ${r}`:o=r),o.length>0&&!this.singleLine&&(o+=this.EOL),t.type==="Error"&&typeof t.stack=="string"){let u=Wy({log:t,context:this.context});this.singleLine&&(o+=this.EOL),o+=u}else if(this.hideObject===!1){let u=[this.messageKey,this.levelKey,this.timestampKey].map(a=>a.replaceAll(/\\/g,"")).filter(a=>typeof t[a]=="string"||typeof t[a]=="number"||typeof t[a]=="boolean"),f=Uy({log:t,skipKeys:u,context:this.context});this.singleLine&&!/^\s$/.test(f)&&(o+=" "),o+=f}return o}});var jo=v((jp,J)=>{"use strict";var{isColorSupported:To}=Qt(),Qy=fs(),{Transform:eg}=require("node:stream"),tg=ps(),rg=sr(),{ERROR_LIKE_KEYS:Ao,LEVEL_KEY:ng,LEVEL_LABEL:ig,MESSAGE_KEY:sg,TIMESTAMP_KEY:og}=V(),{buildSafeSonicBoom:ug,parseFactoryOptions:fg}=wo(),cg=Co(),lg={colorize:To,colorizeObjects:!0,crlf:!1,customColors:null,customLevels:null,customPrettifiers:{},errorLikeObjectKeys:Ao,errorProps:"",hideObject:!1,ignore:"hostname",include:void 0,levelFirst:!1,levelKey:ng,levelLabel:ig,messageFormat:null,messageKey:sg,minimumLevel:void 0,outputStream:process.stdout,singleLine:!1,timestampKey:og,translateTime:!0,useOnlyCustomProps:!0};function Nr(e){let t=fg(Object.assign({},lg,e));return cg.bind({...t,context:t})}function it(e={}){let t=Nr(e),r;return tg(function(n){n.on("message",function s(o){!o||o.code!=="PINO_CONFIG"||(Object.assign(e,{messageKey:o.config.messageKey,errorLikeObjectKeys:Array.from(new Set([...e.errorLikeObjectKeys||Ao,o.config.errorKey])),customLevels:o.config.levels.values}),t=Nr(e),n.off("message",s))});let i=new eg({objectMode:!0,autoDestroy:!0,transform(s,o,u){let f=t(s);u(null,f)}});return typeof e.destination=="object"&&typeof e.destination.write=="function"?r=e.destination:r=ug({dest:e.destination||1,append:e.append,mkdir:e.mkdir,sync:e.sync}),n.on("unknown",function(s){r.write(s+`
|
|
28
|
+
`)}),Qy(n,i,r),i},{parse:"lines",close(n,i){r.on("close",()=>{i(n)})}})}J.exports=it;J.exports.build=it;J.exports.PinoPretty=it;J.exports.prettyFactory=Nr;J.exports.colorizerFactory=rg;J.exports.isColorSupported=To;J.exports.default=it});var hg={};Wo(hg,{default:()=>ve,withLogger:()=>No});module.exports=Ko(hg);var zo=Object.defineProperty,Vo=(e,t,r)=>t in e?zo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,kr=(e,t,r)=>Vo(e,typeof t!="symbol"?t+"":t,r),Uo=new RegExp("([\\p{Ll}\\d])(\\p{Lu})","gu"),Go=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),Ho=new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d","u"),Jo=/[^\p{L}\d]+/giu,Ir="$1\0$2";function Fr(e){let t=e.trim();t=t.replace(Uo,Ir).replace(Go,Ir),t=t.replace(Jo,"\0");let r=0,n=t.length;for(;t.charAt(r)==="\0";)r++;if(r===n)return[];for(;t.charAt(n-1)==="\0";)n--;return t.slice(r,n).split(/\0/g)}function Yo(e){let t=Fr(e);for(let r=0;r<t.length;r++){let n=t[r],i=Ho.exec(n);if(i){let s=i.index+(i[1]??i[2]).length;t.splice(r,1,n.slice(0,s),n.slice(s))}}return t}function Xo(e,t){let[r,n,i]=Qo(e,t);return r+n.map(Zo(t==null?void 0:t.locale)).join((t==null?void 0:t.delimiter)??"_")+i}function Zo(e){return e===!1?t=>t.toUpperCase():t=>t.toLocaleUpperCase(e)}function Qo(e,t={}){let r=t.split??(t.separateNumbers?Yo:Fr),n=t.prefixCharacters??"",i=t.suffixCharacters??"",s=0,o=e.length;for(;s<e.length;){let u=e.charAt(s);if(!n.includes(u))break;s++}for(;o>s;){let u=o-1,f=e.charAt(u);if(!i.includes(f))break;o=u}return[e.slice(0,s),r(e.slice(s,o)),e.slice(o)]}var eu=class st{constructor(t){kr(this,"serviceName"),this.serviceName=Xo(t)}log(t,...r){let{color:n,reset:i}=st.getColor(t),s=[st.getSymbols(t)+"{ENV}",n+`[${this.serviceName}]:`+i,...r];t==="success"?console.log(...s):console[t](...s)}static getColor(t){let r="\x1B[34m";return t==="success"&&(r="\x1B[32m"),t==="warn"&&(r="\x1B[33m"),t==="error"&&(r="\x1B[31m"),{color:r,reset:"\x1B[0m"}}static getSymbols(t){let{color:r,reset:n}=this.getColor(t);return t==="success"?r+" \u2714 "+n:t==="warn"?r+" \u25B2 "+n:t==="error"?r+" \u2717 "+n:r+" \uFFEE "+n}};function Wr(...e){return e.reduce((t,r)=>({...t,...r}),{})}var Kr=class extends eu{constructor(e,t){super(e),this.variables=t,kr(this,"env",new Map),this.validate(),this.load()}validate(){let e=Object.keys(this.variables);for(let t of e){let r=this.variables[t],n=process.env[t];if(n==null){r.default?this.log("warn",`'${t}' not exists and default:`,r.default):this.log("error",`'${t}' not exists and not have defaults`);continue}if(r.type==="number"&&isNaN(Number(n))){this.log("warn",`is '${typeof n}', but must 'number'`);continue}if(r.type==="boolean"&&n!=="true"&&n!=="false"){this.log("warn",`'${t}' should be boolean ('true' or 'false')`);continue}this.log("success",`'${t}' successfully loaded`)}}load(){let e=Object.keys(this.variables);for(let t of e)this.$(t,!1);this.env.set("SERVICE_NAME",this.serviceName)}$(e,t=!0){if(t&&this.env.has(String(e)))return this.env.get(String(e));let r=this.variables[e],n=process.env[e]||r.default;return r.type==="number"&&(n=Number(n)),r.type==="boolean"&&(n=n==="true"),r.type==="string"&&(n=String(n)),this.env.set(String(e),n),n}};var zr={NODE_ENV:{type:"string",default:"development"},LOG_LEVEL:{type:"string",default:"info"},SERVICE_NAME:{type:"string",default:"UNKNOWN"}};var Br=Rr(Vi(),1),Dr=Rr(jo(),1);var Po=(e,t)=>{if("timing"in e){let r=e.timing;return{...e,timing:{...Object.fromEntries(Object.entries(r).map(([n,i])=>[n,i.toFixed(2)+"ms"])),total:Object.values(r).reduce((n,i)=>n+i,0).toFixed(2)+"ms"}}}return{...e,duration:t}};async function No(e,t){let r=performance.now(),n=e.type==="render"?"Rendering":"Getting data",i={route:e.route,...e.type==="get-data"&&e.functionName?{functionName:e.functionName}:{}};ve.debug(i,`${n} start`);let s=o=>{let u=performance.now()-r;r=performance.now(),i.timing??={},i.timing[String(o)]=u};try{let o=await Promise.resolve(t(s)),u=performance.now()-r;return ve.debug(Po(i,`${u.toFixed(2)}ms`),`${n} completed`),o}catch(o){let u=performance.now()-r;throw ve.error(Po(i,`${u.toFixed(2)}ms`),`${n} failed`,o),o}}var Bo=new Kr("logger",Wr(zr)),ag=Bo.$("SERVICE_NAME"),dg=(0,Dr.default)({colorize:Dr.default.isColorSupported,ignore:"pid,hostname"}),Do=(0,Br.default)({name:ag,level:Bo.$("LOG_LEVEL"),timestamp:Br.default.stdTimeFunctions.isoTime,formatters:{level(e){return{level:e.toUpperCase()}}},base:{pid:process.pid},redact:{paths:["req.headers.authorization","req.headers.cookie","user.password","user.secret"],censor:"[REDACTED]"}},dg),ve=Do;Do.warn({module:"core"},"hello");0&&(module.exports={withLogger});
|
|
29
|
+
//# sourceMappingURL=index.cjs.map
|