@visulima/email 2.1.6 → 2.1.7
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/CHANGELOG.md +7 -0
- package/dist/crypto/index.d.ts +183 -183
- package/dist/crypto/index.js +1 -1
- package/dist/deliverability/dmarc-report.d.ts +43 -43
- package/dist/deliverability/dmarc-report.js +1 -1
- package/dist/deliverability/index.d.ts +201 -201
- package/dist/events/index.d.ts +17 -17
- package/dist/inbound/index.d.ts +180 -180
- package/dist/index.d.ts +35 -46
- package/dist/index.js +1 -1
- package/dist/middleware/index.d.ts +213 -216
- package/dist/middleware/index.js +1 -1
- package/dist/packem_shared/{DkimSigner-CiLBaXrg.js → DkimSigner-sLcIw9bp.js} +6 -6
- package/dist/packem_shared/{DraftMailMessage-CGTVuy2z.js → DraftMailMessage-C3YTXqWo.js} +1 -1
- package/dist/packem_shared/EmailError-CDvYwuqz.js +1 -0
- package/dist/packem_shared/{Mail-CYAwMRnX.js → Mail-CIyxkmxu.js} +1 -1
- package/dist/packem_shared/MailMessage-DuEXJiCg.js +1 -0
- package/dist/packem_shared/{RequiredOptionError-DuNNY_a5.js → RequiredOptionError-DU2lxzk3.js} +1 -1
- package/dist/packem_shared/SmimeEncrypter-CzTbQM-z.js +6 -0
- package/dist/packem_shared/SmimeSigner-DjLShaOw.js +8 -0
- package/dist/packem_shared/{ahaSendProvider-DSuZIzaQ.js → ahaSendProvider-br1yB2un.js} +1 -1
- package/dist/packem_shared/arcMessageSignatureBase-D54jQIWu.js +17 -0
- package/dist/packem_shared/attachment-processor-D1cbAhQi.js +1 -0
- package/dist/packem_shared/{autoSendProvider-DqAoelWR.js → autoSendProvider-BSP8ueOC.js} +1 -1
- package/dist/packem_shared/{awsSesProvider-ClK1FUln.js → awsSesProvider-zRICW1pH.js} +13 -13
- package/dist/packem_shared/azureProvider-DwN4c5dC.js +1 -0
- package/dist/packem_shared/{brevoProvider-CIzuIDlt.js → brevoProvider-C491beE_.js} +1 -1
- package/dist/packem_shared/{build-mime-message-BW5FQ2Bt.js → build-mime-message-DT67qfMp.js} +1 -1
- package/dist/packem_shared/{circuitBreakerMiddleware-D2SA_07f.js → circuitBreakerMiddleware-N0CKF90q.js} +1 -1
- package/dist/packem_shared/{cloudflareEmailProvider-B8mOEl3N.js → cloudflareEmailProvider-8JxzLbpX.js} +1 -1
- package/dist/packem_shared/{createTestEmail-f12yLlWn.js → createTestEmail-D_ksEez3.js} +1 -1
- package/dist/packem_shared/dedupeMiddleware-CYYI_O7S.js +1 -0
- package/dist/packem_shared/{detectMimeType-DFH3kp6K.js → detectMimeType-CmYmWDXE.js} +1 -1
- package/dist/packem_shared/event-bus.d-BNQA-FZE.d.ts +104 -0
- package/dist/packem_shared/{failoverProvider-BgX6zfnY.js → failoverProvider-6qwE_HSJ.js} +1 -1
- package/dist/packem_shared/generate-boundary-0xGe9GqK.js +1 -0
- package/dist/packem_shared/{httpProvider-aBfTXyCT.js → httpProvider-BqrdZhGw.js} +1 -1
- package/dist/packem_shared/index-Gd7m-UQA.js +11 -0
- package/dist/packem_shared/{infobipProvider-DxzsONUX.js → infobipProvider-C2FU6VMP.js} +1 -1
- package/dist/packem_shared/isValidSigningCertUrl-DNxPA0Q-.js +3 -0
- package/dist/packem_shared/{loopsProvider-QBsAH6Ee.js → loopsProvider-Bz63so6m.js} +1 -1
- package/dist/packem_shared/mail.d-xKtvoKMK.d.ts +909 -0
- package/dist/packem_shared/{mailCrabProvider-DRE5snM9.js → mailCrabProvider-bkQy-2a1.js} +1 -1
- package/dist/packem_shared/{mailPaceProvider-DCa-4ghl.js → mailPaceProvider-S1AB-AYq.js} +1 -1
- package/dist/packem_shared/{mailchannelsProvider-GiwkYBdD.js → mailchannelsProvider-B_K6X4VY.js} +1 -1
- package/dist/packem_shared/{mailerSendProvider-RK6IbUrL.js → mailerSendProvider-DPEww2H1.js} +1 -1
- package/dist/packem_shared/mailgunProvider-DKxzVbDW.js +1 -0
- package/dist/packem_shared/mailjetProvider-C2TQcujL.js +1 -0
- package/dist/packem_shared/{mailomatProvider-DPDpVS8r.js → mailomatProvider-B8-5bQsu.js} +1 -1
- package/dist/packem_shared/{mailtrapProvider-DtrS4Q34.js → mailtrapProvider-DW7TLOdG.js} +1 -1
- package/dist/packem_shared/{make-request-B9XjBynA.js → make-request-CylyuRaN.js} +1 -1
- package/dist/packem_shared/{mandrillProvider-B84zH-eV.js → mandrillProvider-S-0lKNGd.js} +1 -1
- package/dist/packem_shared/{mockProvider-Behywbl1.js → mockProvider-BAl292mW.js} +1 -1
- package/dist/packem_shared/{netcoreProvider-D-wtCyJj.js → netcoreProvider-DajMprlo.js} +1 -1
- package/dist/packem_shared/{nodemailerProvider-BFHobXxt.js → nodemailerProvider-DRo0lJ6g.js} +1 -1
- package/dist/packem_shared/{opentelemetryProvider-ByHC01ub.js → opentelemetryProvider-C6spx2CD.js} +1 -1
- package/dist/packem_shared/{outlook365Provider-Btk4Emig.js → outlook365Provider-B0o7UZBW.js} +1 -1
- package/dist/packem_shared/{plunkProvider-Bw8e6460.js → plunkProvider-DJzEUEtU.js} +1 -1
- package/dist/packem_shared/{postalProvider-CT8zr89z.js → postalProvider-DHFjFE3Y.js} +1 -1
- package/dist/packem_shared/{postmarkProvider-CQSqZWDs.js → postmarkProvider-Dt1EGGBA.js} +1 -1
- package/dist/packem_shared/{provider-base-C7PuopYK.js → provider-base-DjPzWncP.js} +1 -1
- package/dist/packem_shared/{provider.d-J-y6iogK.d.ts → provider.d-Cx5YQJdP.d.ts} +9 -9
- package/dist/packem_shared/{resendProvider-drJYlvLP.js → resendProvider-qjI86j_d.js} +1 -1
- package/dist/packem_shared/{retry-ipI5DRJ8.js → retry-CG9iT2wF.js} +1 -1
- package/dist/packem_shared/{roundRobinProvider-D1by5KGW.js → roundRobinProvider-CO5YvhgR.js} +1 -1
- package/dist/packem_shared/{scalewayProvider-DU5gXQrl.js → scalewayProvider-CihQKhw6.js} +1 -1
- package/dist/packem_shared/{sendGridProvider-BuTbEXW8.js → sendGridProvider-Dkc5AKlC.js} +1 -1
- package/dist/packem_shared/{smtpProvider-5MI3-EPh.js → smtpProvider-CIXMxPu-.js} +12 -12
- package/dist/packem_shared/{sparkpostProvider-UAsFYIjP.js → sparkpostProvider-CKxQhpyB.js} +1 -1
- package/dist/packem_shared/{sweegoProvider-SUz0LIcA.js → sweegoProvider-DjmAs6La.js} +1 -1
- package/dist/packem_shared/{tracer.d-MU42G1jG.d.ts → tracer.d-sb5yrt_n.d.ts} +2 -2
- package/dist/packem_shared/types.d-B0t3PQ3t.d.ts +107 -0
- package/dist/packem_shared/{types.d-ejzh-xBP.d.ts → types.d-B9295M4_.d.ts} +82 -82
- package/dist/packem_shared/types.d-BzoHR9nB.d.ts +61 -0
- package/dist/packem_shared/types.d-C5geVKes.d.ts +51 -0
- package/dist/packem_shared/types.d-GKqPNk0I.d.ts +24 -0
- package/dist/packem_shared/types.d-I-KeZ5w2.d.ts +9 -0
- package/dist/packem_shared/types.d-kHO4kX9q.d.ts +69 -0
- package/dist/packem_shared/utils-DjEtR3qT.js +1 -0
- package/dist/packem_shared/verifyMailgunWebhook-DNk080BF.js +1 -0
- package/dist/packem_shared/verifyPostmarkWebhook-B4OIEHQF.js +1 -0
- package/dist/packem_shared/verifyResendWebhook-C7E32LZ1.js +1 -0
- package/dist/packem_shared/verifySendGridWebhook-1l9bqIMw.js +1 -0
- package/dist/packem_shared/withEvents-CytsykaK.js +1 -0
- package/dist/packem_shared/{withSuppression-DBaZDMAr.js → withSuppression-BoaO4Qdz.js} +1 -1
- package/dist/packem_shared/{zeptomailProvider-DXNX9mG_.js → zeptomailProvider-DSTC9pUi.js} +1 -1
- package/dist/providers/ahasend/index.d.ts +18 -18
- package/dist/providers/ahasend/index.js +1 -1
- package/dist/providers/autosend/index.d.ts +30 -30
- package/dist/providers/autosend/index.js +1 -1
- package/dist/providers/aws-ses/index.d.ts +20 -20
- package/dist/providers/aws-ses/index.js +1 -1
- package/dist/providers/azure/index.d.ts +26 -26
- package/dist/providers/azure/index.js +1 -1
- package/dist/providers/brevo/index.d.ts +35 -35
- package/dist/providers/brevo/index.js +1 -1
- package/dist/providers/cloudflare-email/index.d.ts +25 -25
- package/dist/providers/cloudflare-email/index.js +1 -1
- package/dist/providers/failover/index.d.ts +14 -14
- package/dist/providers/failover/index.js +1 -1
- package/dist/providers/http/index.d.ts +15 -15
- package/dist/providers/http/index.js +1 -1
- package/dist/providers/infobip/index.d.ts +28 -28
- package/dist/providers/infobip/index.js +1 -1
- package/dist/providers/loops/index.d.ts +25 -25
- package/dist/providers/loops/index.js +1 -1
- package/dist/providers/mailchannels/index.d.ts +13 -13
- package/dist/providers/mailchannels/index.js +1 -1
- package/dist/providers/mailcrab/index.d.ts +17 -17
- package/dist/providers/mailcrab/index.js +1 -1
- package/dist/providers/mailersend/index.d.ts +24 -24
- package/dist/providers/mailersend/index.js +1 -1
- package/dist/providers/mailgun/index.d.ts +37 -37
- package/dist/providers/mailgun/index.js +1 -1
- package/dist/providers/mailjet/index.d.ts +36 -36
- package/dist/providers/mailjet/index.js +1 -1
- package/dist/providers/mailomat/index.d.ts +20 -20
- package/dist/providers/mailomat/index.js +1 -1
- package/dist/providers/mailpace/index.d.ts +24 -24
- package/dist/providers/mailpace/index.js +1 -1
- package/dist/providers/mailtrap/index.d.ts +22 -22
- package/dist/providers/mailtrap/index.js +1 -1
- package/dist/providers/mandrill/index.d.ts +36 -36
- package/dist/providers/mandrill/index.js +1 -1
- package/dist/providers/mock/index.d.ts +8 -8
- package/dist/providers/mock/index.js +1 -1
- package/dist/providers/netcore/index.d.ts +17 -17
- package/dist/providers/netcore/index.js +1 -1
- package/dist/providers/nodemailer/index.d.ts +22 -22
- package/dist/providers/nodemailer/index.js +1 -1
- package/dist/providers/opentelemetry/index.d.ts +20 -20
- package/dist/providers/opentelemetry/index.js +1 -1
- package/dist/providers/outlook365/index.d.ts +82 -82
- package/dist/providers/outlook365/index.js +1 -1
- package/dist/providers/plunk/index.d.ts +18 -18
- package/dist/providers/plunk/index.js +1 -1
- package/dist/providers/postal/index.d.ts +24 -24
- package/dist/providers/postal/index.js +1 -1
- package/dist/providers/postmark/index.d.ts +30 -30
- package/dist/providers/postmark/index.js +1 -1
- package/dist/providers/resend/index.d.ts +24 -24
- package/dist/providers/resend/index.js +1 -1
- package/dist/providers/roundrobin/index.d.ts +14 -14
- package/dist/providers/roundrobin/index.js +1 -1
- package/dist/providers/scaleway/index.d.ts +22 -22
- package/dist/providers/scaleway/index.js +1 -1
- package/dist/providers/sendgrid/index.d.ts +25 -25
- package/dist/providers/sendgrid/index.js +1 -1
- package/dist/providers/smtp/index.d.ts +11 -11
- package/dist/providers/smtp/index.js +1 -1
- package/dist/providers/sparkpost/index.d.ts +21 -21
- package/dist/providers/sparkpost/index.js +1 -1
- package/dist/providers/sweego/index.d.ts +20 -20
- package/dist/providers/sweego/index.js +1 -1
- package/dist/providers/zeptomail/index.d.ts +17 -17
- package/dist/providers/zeptomail/index.js +1 -1
- package/dist/queue/bullmq-queue.d.ts +26 -26
- package/dist/queue/index.d.ts +86 -86
- package/dist/queue/pg-boss-queue.d.ts +13 -13
- package/dist/queue/sqs-queue.d.ts +20 -20
- package/dist/queue/unstorage-queue.d.ts +47 -47
- package/dist/queue/unstorage-queue.js +1 -1
- package/dist/render/cid.d.ts +12 -12
- package/dist/render/css-inline.d.ts +12 -12
- package/dist/render/css-inline.js +1 -1
- package/dist/render/dark-mode.d.ts +12 -12
- package/dist/render/preheader.d.ts +16 -16
- package/dist/template-engines/handlebars.d.ts +19 -19
- package/dist/template-engines/handlebars.js +1 -1
- package/dist/template-engines/html-to-text.d.ts +12 -12
- package/dist/template-engines/html-to-text.js +1 -1
- package/dist/template-engines/i18n.d.ts +43 -43
- package/dist/template-engines/i18n.js +1 -1
- package/dist/template-engines/jsx-email.d.ts +8 -8
- package/dist/template-engines/jsx-email.js +1 -1
- package/dist/template-engines/liquid.d.ts +9 -9
- package/dist/template-engines/liquid.js +1 -1
- package/dist/template-engines/mjml.d.ts +9 -9
- package/dist/template-engines/mjml.js +1 -1
- package/dist/template-engines/react-email.d.ts +8 -8
- package/dist/template-engines/react-email.js +1 -1
- package/dist/template-engines/vue-email.d.ts +8 -8
- package/dist/template-engines/vue-email.js +1 -1
- package/dist/test/index.d.ts +89 -89
- package/dist/test/index.js +1 -1
- package/dist/utils/cache.d.ts +27 -27
- package/dist/utils/format-email-address.d.ts +6 -6
- package/dist/utils/format-email-address.js +1 -1
- package/dist/utils/normalize-email-aliases.d.ts +19 -19
- package/dist/utils/parse-address.d.ts +16 -16
- package/dist/utils/parse-eml.d.ts +18 -18
- package/dist/utils/result.d.ts +30 -30
- package/dist/utils/result.js +1 -1
- package/dist/utils/validation/check-feature-support.d.ts +33 -33
- package/dist/utils/validation/validate-email.d.ts +4 -4
- package/dist/webhooks/index.d.ts +134 -134
- package/dist/webhooks/index.js +1 -1
- package/package.json +1 -1
- package/dist/packem_shared/EmailError-B-sEf3bp.js +0 -1
- package/dist/packem_shared/MailMessage-DQRgs5Dz.js +0 -1
- package/dist/packem_shared/SmimeEncrypter-DavopRlE.js +0 -6
- package/dist/packem_shared/SmimeSigner-0onWksAv.js +0 -8
- package/dist/packem_shared/arcMessageSignatureBase-DDLEHW2E.js +0 -17
- package/dist/packem_shared/attachment-processor-CMp7qqMI.js +0 -1
- package/dist/packem_shared/azureProvider-Cw_Tmde6.js +0 -1
- package/dist/packem_shared/dedupeMiddleware-B6ajWOTi.js +0 -1
- package/dist/packem_shared/event-bus.d-DEl3w_EW.d.ts +0 -104
- package/dist/packem_shared/generate-boundary-DQbzDiOI.js +0 -1
- package/dist/packem_shared/index-BoZvzveg.js +0 -11
- package/dist/packem_shared/isValidSigningCertUrl-Bii1AMGC.js +0 -3
- package/dist/packem_shared/mail.d-B9SSqyy0.d.ts +0 -909
- package/dist/packem_shared/mailgunProvider-D9HUWGKN.js +0 -1
- package/dist/packem_shared/mailjetProvider-DelLs2Vt.js +0 -1
- package/dist/packem_shared/types.d-BId55FW2.d.ts +0 -107
- package/dist/packem_shared/types.d-CmoWvdZi.d.ts +0 -61
- package/dist/packem_shared/types.d-DCkecJse.d.ts +0 -51
- package/dist/packem_shared/types.d-Mpu0HZoG.d.ts +0 -24
- package/dist/packem_shared/types.d-lcJZmwRK.d.ts +0 -69
- package/dist/packem_shared/types.d-nyR1ty1Q.d.ts +0 -9
- package/dist/packem_shared/utils-BfYfPB_I.js +0 -1
- package/dist/packem_shared/verifyMailgunWebhook-Cwl0OD3P.js +0 -1
- package/dist/packem_shared/verifyPostmarkWebhook-C72ZvbrG.js +0 -1
- package/dist/packem_shared/verifyResendWebhook-YK2zNDXR.js +0 -1
- package/dist/packem_shared/verifySendGridWebhook-Dbwc1tfG.js +0 -1
- package/dist/packem_shared/withEvents-CCVblSqj.js +0 -1
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{createRequire as It}from"node:module";const Pt=It(import.meta.url),de=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Dt=t=>{if(typeof de<"u"&&de.versions&&de.versions.node){const[e,o]=de.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return de.getBuiltinModule(t)}return Pt(t)},{createRequire:S}=Dt("node:module"),Gt=/^[A-Z]:\//i,Ut=(t="")=>t&&t.replaceAll("\\","/").replace(Gt,e=>e.toUpperCase()),zt=S(import.meta.url),be=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Kt=t=>{if(typeof be<"u"&&be.versions&&be.versions.node){const[e,o]=be.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return be.getBuiltinModule(t)}return zt(t)},{fileURLToPath:Ft}=Kt("node:url");function Xt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var dt,bt;function jt(){return bt||(bt=1,dt=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),dt}var Qt=jt();const Wt=Xt(Qt);new Set(Wt);const qt=t=>Ut(t instanceof URL?Ft(t):t),Zt=t=>{if(!t||!(t instanceof URL)&&typeof t!="string")throw new TypeError("Path must be a non-empty string or URL.")},Vt=S(import.meta.url),he=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Yt=t=>{if(typeof he<"u"&&he.versions&&he.versions.node){const[e,o]=he.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return he.getBuiltinModule(t)}return Vt(t)};Yt("node:fs/promises");const Jt=S(import.meta.url),me=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,eo=t=>{if(typeof me<"u"&&me.versions&&me.versions.node){const[e,o]=me.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return me.getBuiltinModule(t)}return Jt(t)};eo("node:fs");const to=S(import.meta.url),ye=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,oo=t=>{if(typeof ye<"u"&&ye.versions&&ye.versions.node){const[e,o]=ye.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return ye.getBuiltinModule(t)}return to(t)};oo("node:fs/promises");const so=S(import.meta.url),ve=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ro=t=>{if(typeof ve<"u"&&ve.versions&&ve.versions.node){const[e,o]=ve.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return ve.getBuiltinModule(t)}return so(t)};ro("node:fs");const no=S(import.meta.url),$e=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,uo=t=>{if(typeof $e<"u"&&$e.versions&&$e.versions.node){const[e,o]=$e.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return $e.getBuiltinModule(t)}return no(t)};uo("node:fs/promises");const io=S(import.meta.url),Ee=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,lo=t=>{if(typeof Ee<"u"&&Ee.versions&&Ee.versions.node){const[e,o]=Ee.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ee.getBuiltinModule(t)}return io(t)};lo("node:fs");const ao=S(import.meta.url),Re=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,po=t=>{if(typeof Re<"u"&&Re.versions&&Re.versions.node){const[e,o]=Re.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Re.getBuiltinModule(t)}return ao(t)};po("node:fs/promises");const co=S(import.meta.url),_e=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,fo=t=>{if(typeof _e<"u"&&_e.versions&&_e.versions.node){const[e,o]=_e.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return _e.getBuiltinModule(t)}return co(t)};fo("node:fs");const go=S(import.meta.url),Ae=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,bo=t=>{if(typeof Ae<"u"&&Ae.versions&&Ae.versions.node){const[e,o]=Ae.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ae.getBuiltinModule(t)}return go(t)};bo("node:fs/promises");const ho=S(import.meta.url),Te=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,mo=t=>{if(typeof Te<"u"&&Te.versions&&Te.versions.node){const[e,o]=Te.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Te.getBuiltinModule(t)}return ho(t)};mo("node:fs");S(import.meta.url);const yo=S(import.meta.url),xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,vo=t=>{if(typeof xe<"u"&&xe.versions&&xe.versions.node){const[e,o]=xe.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return xe.getBuiltinModule(t)}return yo(t)};vo("node:fs/promises");const $o=S(import.meta.url),Ce=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Eo=t=>{if(typeof Ce<"u"&&Ce.versions&&Ce.versions.node){const[e,o]=Ce.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ce.getBuiltinModule(t)}return $o(t)};Eo("node:fs");const Ro=S(import.meta.url),Se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_o=t=>{if(typeof Se<"u"&&Se.versions&&Se.versions.node){const[e,o]=Se.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Se.getBuiltinModule(t)}return Ro(t)};_o("node:fs/promises");const Ao=S(import.meta.url),Oe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,To=t=>{if(typeof Oe<"u"&&Oe.versions&&Oe.versions.node){const[e,o]=Oe.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Oe.getBuiltinModule(t)}return Ao(t)};To("node:fs");function ct(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ht={},ot,mt;function et(){if(mt)return ot;mt=1;const t="[^\\\\/]",e=Symbol("unignore"),o="\\.",H="\\+",b="\\?",n="\\/",l="(?=.)",f="[^/]",a=`(?:${n}|$)`,R=`(?:^|${n})`,g=`${o}{1,2}${a}`,T=`(?!${o})`,C=`(?!${R}${g})`,_=`(?!${o}{0,1}${a})`,L=`(?!${g})`,te=`[^.${n}]`,q=`${f}*?`,Z="/",M={DOT_LITERAL:o,PLUS_LITERAL:H,QMARK_LITERAL:b,SLASH_LITERAL:n,ONE_CHAR:l,QMARK:f,END_ANCHOR:a,DOTS_SLASH:g,NO_DOT:T,NO_DOTS:C,NO_DOT_SLASH:_,NO_DOTS_SLASH:L,QMARK_NO_DOT:te,STAR:q,START_ANCHOR:R,SEP:Z},d={...M,SLASH_LITERAL:"[\\\\/]",QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${o}{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[\\\\/])${o}{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},h={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return ot={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:h,UNIGNORE:e,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(s){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${s.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(s){return s===!0?d:M}},ot}var yt;function tt(){return yt||(yt=1,(function(t){const{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:H,REGEX_SPECIAL_CHARS_GLOBAL:b}=et();t.isObject=n=>n!==null&&typeof n=="object"&&!Array.isArray(n),t.hasRegexChars=n=>H.test(n),t.isRegexChar=n=>n.length===1&&t.hasRegexChars(n),t.escapeRegex=n=>n.replace(b,"\\$1"),t.toPosixSlashes=n=>n.replace(e,"/"),t.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const n=navigator.platform.toLowerCase();return n==="win32"||n==="windows"}return process.platform?process.platform==="win32":!1},t.removeBackslashes=n=>n.replace(o,l=>l==="\\"?"":l),t.escapeLast=(n,l,f)=>{const a=n.lastIndexOf(l,f);return a===-1?n:n[a-1]==="\\"?t.escapeLast(n,l,a-1):`${n.slice(0,a)}\\${n.slice(a)}`},t.removePrefix=(n,l={})=>{let f=n;return f.startsWith("./")&&(f=f.slice(2),l.prefix="./"),f},t.wrapOutput=(n,l={},f={})=>{const a=f.contains?"":"^",R=f.contains?"":"$";let g=`${a}(?:${n})${R}`;return l.negated===!0&&(g=`(?:^(?!${g}).*$)`),g},t.basename=(n,{windows:l}={})=>{const f=n.split(l?/[\\/]/:"/"),a=f[f.length-1];return a===""?f[f.length-2]:a}})(ht)),ht}var st,vt;function xo(){if(vt)return st;vt=1;const t=tt(),{CHAR_ASTERISK:e,CHAR_AT:o,CHAR_BACKWARD_SLASH:H,CHAR_COMMA:b,CHAR_DOT:n,CHAR_EXCLAMATION_MARK:l,CHAR_FORWARD_SLASH:f,CHAR_LEFT_CURLY_BRACE:a,CHAR_LEFT_PARENTHESES:R,CHAR_LEFT_SQUARE_BRACKET:g,CHAR_PLUS:T,CHAR_QUESTION_MARK:C,CHAR_RIGHT_CURLY_BRACE:_,CHAR_RIGHT_PARENTHESES:L,CHAR_RIGHT_SQUARE_BRACKET:te}=et(),q=M=>M===f||M===H,Z=M=>{M.isPrefix!==!0&&(M.depth=M.isGlobstar?1/0:1)};return st=(M,d)=>{const h=d||{},s=M.length-1,$=h.parts===!0||h.scanToEnd===!0,O=[],m=[],E=[];let y=M,F=-1,U=0,Y=0,ae=!1,J=!1,z=!1,ee=!1,pe=!1,re=!1,oe=!1,D=!1,ne=!1,j=!1,ce=0,Q,v,k={value:"",depth:0,isGlob:!1};const X=()=>F>=s,i=()=>y.charCodeAt(F+1),I=()=>(Q=v,y.charCodeAt(++F));for(;F<s;){v=I();let W;if(v===H){oe=k.backslashes=!0,v=I(),v===a&&(re=!0);continue}if(re===!0||v===a){for(ce++;X()!==!0&&(v=I());){if(v===H){oe=k.backslashes=!0,I();continue}if(v===a){ce++;continue}if(re!==!0&&v===n&&(v=I())===n){if(ae=k.isBrace=!0,z=k.isGlob=!0,j=!0,$===!0)continue;break}if(re!==!0&&v===b){if(ae=k.isBrace=!0,z=k.isGlob=!0,j=!0,$===!0)continue;break}if(v===_&&(ce--,ce===0)){re=!1,ae=k.isBrace=!0,j=!0;break}}if($===!0)continue;break}if(v===f){if(O.push(F),m.push(k),k={value:"",depth:0,isGlob:!1},j===!0)continue;if(Q===n&&F===U+1){U+=2;continue}Y=F+1;continue}if(h.noext!==!0&&(v===T||v===o||v===e||v===C||v===l)&&i()===R){if(z=k.isGlob=!0,ee=k.isExtglob=!0,j=!0,v===l&&F===U&&(ne=!0),$===!0){for(;X()!==!0&&(v=I());){if(v===H){oe=k.backslashes=!0,v=I();continue}if(v===L){z=k.isGlob=!0,j=!0;break}}continue}break}if(v===e){if(Q===e&&(pe=k.isGlobstar=!0),z=k.isGlob=!0,j=!0,$===!0)continue;break}if(v===C){if(z=k.isGlob=!0,j=!0,$===!0)continue;break}if(v===g){for(;X()!==!0&&(W=I());){if(W===H){oe=k.backslashes=!0,I();continue}if(W===te){J=k.isBracket=!0,z=k.isGlob=!0,j=!0;break}}if($===!0)continue;break}if(h.nonegate!==!0&&v===l&&F===U){D=k.negated=!0,U++;continue}if(h.noparen!==!0&&v===R){if(z=k.isGlob=!0,$===!0){for(;X()!==!0&&(v=I());){if(v===R){oe=k.backslashes=!0,v=I();continue}if(v===L){j=!0;break}}continue}break}if(z===!0){if(j=!0,$===!0)continue;break}}h.noext===!0&&(ee=!1,z=!1);let B=y,fe="",r="";U>0&&(fe=y.slice(0,U),y=y.slice(U),Y-=U),B&&z===!0&&Y>0?(B=y.slice(0,Y),r=y.slice(Y)):z===!0?(B="",r=y):B=y,B&&B!==""&&B!=="/"&&B!==y&&q(B.charCodeAt(B.length-1))&&(B=B.slice(0,-1)),h.unescape===!0&&(r&&(r=t.removeBackslashes(r)),B&&oe===!0&&(B=t.removeBackslashes(B)));const u={prefix:fe,input:M,start:U,base:B,glob:r,isBrace:ae,isBracket:J,isGlob:z,isExtglob:ee,isGlobstar:pe,negated:D,negatedExtglob:ne};if(h.tokens===!0&&(u.maxDepth=0,q(v)||m.push(k),u.tokens=m),h.parts===!0||h.tokens===!0){let W;for(let w=0;w<O.length;w++){const se=W?W+1:U,ue=O[w],V=M.slice(se,ue);h.tokens&&(w===0&&U!==0?(m[w].isPrefix=!0,m[w].value=fe):m[w].value=V,Z(m[w]),u.maxDepth+=m[w].depth),(w!==0||V!=="")&&E.push(V),W=ue}if(W&&W+1<M.length){const w=M.slice(W+1);E.push(w),h.tokens&&(m[m.length-1].value=w,Z(m[m.length-1]),u.maxDepth+=m[m.length-1].depth)}u.slashes=O,u.parts=E}return u},st}var rt,$t;function Co(){if($t)return rt;$t=1;const t=et(),e=tt(),{MAX_LENGTH:o,POSIX_REGEX_SOURCE:H,REGEX_NON_SPECIAL_CHARS:b,REGEX_SPECIAL_CHARS_BACKREF:n,REPLACEMENTS:l}=t,f=(d,h)=>typeof h.expandRange=="function"?h.expandRange(...d,h):(d.sort(),`[${d.join("-")}]`),a=(d,h)=>`Missing ${d}: "${h}" - use "\\\\${h}" to match literal characters`,R=d=>{const h=[];let s=0,$=0,O=0,m="",E=!1;for(const y of d){if(E===!0){m+=y,E=!1;continue}if(y==="\\"){m+=y,E=!0;continue}if(y==='"'){O=O===1?0:1,m+=y;continue}if(O===0){if(y==="[")s++;else if(y==="]"&&s>0)s--;else if(s===0){if(y==="(")$++;else if(y===")"&&$>0)$--;else if(y==="|"&&$===0){h.push(m),m="";continue}}}m+=y}return h.push(m),h},g=d=>{let h=!1;for(const s of d){if(h===!0){h=!1;continue}if(s==="\\"){h=!0;continue}if(/[?*+@!()[\]{}]/.test(s))return!1}return!0},T=d=>{let h=d.trim(),s=!0;for(;s===!0;)s=!1,/^@\([^\\()[\]{}|]+\)$/.test(h)&&(h=h.slice(2,-1),s=!0);if(g(h))return h.replace(/\\(.)/g,"$1")},C=d=>{const h=d.map(T).filter(Boolean);for(let s=0;s<h.length;s++)for(let $=s+1;$<h.length;$++){const O=h[s],m=h[$],E=O[0];if(!(!E||O!==E.repeat(O.length)||m!==E.repeat(m.length))&&(O===m||O.startsWith(m)||m.startsWith(O)))return!0}return!1},_=(d,h=!0)=>{if(d[0]!=="+"&&d[0]!=="*"||d[1]!=="(")return;let s=0,$=0,O=0,m=!1;for(let E=1;E<d.length;E++){const y=d[E];if(m===!0){m=!1;continue}if(y==="\\"){m=!0;continue}if(y==='"'){O=O===1?0:1;continue}if(O!==1){if(y==="["){s++;continue}if(y==="]"&&s>0){s--;continue}if(!(s>0)){if(y==="("){$++;continue}if(y===")"&&($--,$===0))return h===!0&&E!==d.length-1?void 0:{type:d[0],body:d.slice(2,E),end:E}}}}},L=d=>`${d.length===1?e.escapeRegex(d[0]):`[${d.map(h=>e.escapeRegex(h)).join("")}]`}*`,te=d=>{let h=0;const s=[];for(;h<d.length;){const $=_(d.slice(h),!1);if(!$||$.type!=="*")return;const O=R($.body).map(E=>E.trim());if(O.length!==1)return;const m=T(O[0]);if(!m||m.length!==1)return;s.push(m),h+=$.end+1}if(!(s.length<1))return s},q=d=>{let h=0,s=d.trim(),$=_(s);for(;$;)h++,s=$.body.trim(),$=_(s);return h},Z=(d,h)=>{if(h.maxExtglobRecursion===!1)return{risky:!1};const s=typeof h.maxExtglobRecursion=="number"?h.maxExtglobRecursion:t.DEFAULT_MAX_EXTGLOB_RECURSION,$=R(d).map(y=>y.trim());if($.length>1&&($.some(y=>y==="")||$.some(y=>/^[*?]+$/.test(y))||C($)))return{risky:!0};const O=[];let m=!1,E=!0;for(const y of $){const F=te(y);if(F){m=!0,O.push(...F);continue}const U=T(y);if(U&&U.length===1){O.push(U);continue}if(E=!1,q(y)>s)return{risky:!0}}return m?E?{risky:!0,safeOutput:L([...new Set(O)])}:{risky:!0}:{risky:!1}},M=(d,h)=>{if(typeof d!="string")throw new TypeError("Expected a string");d=l[d]||d;const s={...h},$=typeof s.maxLength=="number"?Math.min(o,s.maxLength):o;let O=d.length;if(O>$)throw new SyntaxError(`Input length: ${O}, exceeds maximum allowed length: ${$}`);const m={type:"bos",value:"",output:s.prepend||""},E=[m],y=s.capture?"":"?:",F=t.globChars(s.windows),U=t.extglobChars(F),{DOT_LITERAL:Y,PLUS_LITERAL:ae,SLASH_LITERAL:J,ONE_CHAR:z,DOTS_SLASH:ee,NO_DOT:pe,NO_DOT_SLASH:re,NO_DOTS_SLASH:oe,QMARK:D,QMARK_NO_DOT:ne,STAR:j,START_ANCHOR:ce}=F,Q=c=>`(${y}(?:(?!${ce}${c.dot?ee:Y}).)*?)`,v=s.dot?"":pe,k=s.dot?D:ne;let X=s.bash===!0?Q(s):j;s.capture&&(X=`(${X})`),typeof s.noext=="boolean"&&(s.noextglob=s.noext);const i={input:d,index:-1,start:0,dot:s.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:E};d=e.removePrefix(d,i),O=d.length;const I=[],B=[],fe=[];let r=m,u;const W=()=>i.index===O-1,w=i.peek=(c=1)=>d[i.index+c],se=i.advance=()=>d[++i.index]||"",ue=()=>d.slice(i.index+1),V=(c="",P=0)=>{i.consumed+=c,i.index+=P},Ve=c=>{i.output+=c.output!=null?c.output:c.value,V(c.value)},Mt=()=>{let c=1;for(;w()==="!"&&(w(2)!=="("||w(3)==="?");)se(),i.start++,c++;return c%2===0?!1:(i.negated=!0,i.start++,!0)},Ye=c=>{i[c]++,fe.push(c)},ge=c=>{i[c]--,fe.pop()},A=c=>{if(r.type==="globstar"){const P=i.braces>0&&(c.type==="comma"||c.type==="brace"),p=c.extglob===!0||I.length&&(c.type==="pipe"||c.type==="paren");c.type!=="slash"&&c.type!=="paren"&&!P&&!p&&(i.output=i.output.slice(0,-r.output.length),r.type="star",r.value="*",r.output=X,i.output+=r.output)}if(I.length&&c.type!=="paren"&&(I[I.length-1].inner+=c.value),(c.value||c.output)&&Ve(c),r&&r.type==="text"&&c.type==="text"){r.output=(r.output||r.value)+c.value,r.value+=c.value;return}c.prev=r,E.push(c),r=c},Je=(c,P)=>{const p={...U[P],conditions:1,inner:""};p.prev=r,p.parens=i.parens,p.output=i.output,p.startIndex=i.index,p.tokensIndex=E.length;const x=(s.capture?"(":"")+p.open;Ye("parens"),A({type:c,value:P,output:i.output?"":z}),A({type:"paren",extglob:!0,value:se(),output:x}),I.push(p)},Bt=c=>{const P=d.slice(c.startIndex,i.index+1),p=d.slice(c.startIndex+2,i.index),x=Z(p,s);if((c.type==="plus"||c.type==="star")&&x.risky){const N=x.safeOutput?(c.output?"":z)+(s.capture?`(${x.safeOutput})`:x.safeOutput):void 0,ie=E[c.tokensIndex];ie.type="text",ie.value=P,ie.output=N||e.escapeRegex(P);for(let le=c.tokensIndex+1;le<E.length;le++)E[le].value="",E[le].output="",delete E[le].suffix;i.output=c.output+ie.output,i.backtrack=!0,A({type:"paren",extglob:!0,value:u,output:""}),ge("parens");return}let G=c.close+(s.capture?")":""),K;if(c.type==="negate"){let N=X;if(c.inner&&c.inner.length>1&&c.inner.includes("/")&&(N=Q(s)),(N!==X||W()||/^\)+$/.test(ue()))&&(G=c.close=`)$))${N}`),c.inner.includes("*")&&(K=ue())&&/^\.[^\\/.]+$/.test(K)){const ie=M(K,{...h,fastpaths:!1}).output;G=c.close=`)${ie})${N})`}c.prev.type==="bos"&&(i.negatedExtglob=!0)}A({type:"paren",extglob:!0,value:u,output:G}),ge("parens")};if(s.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(d)){let c=!1,P=d.replace(n,(p,x,G,K,N,ie)=>K==="\\"?(c=!0,p):K==="?"?x?x+K+(N?D.repeat(N.length):""):ie===0?k+(N?D.repeat(N.length):""):D.repeat(G.length):K==="."?Y.repeat(G.length):K==="*"?x?x+K+(N?X:""):X:x?p:`\\${p}`);return c===!0&&(s.unescape===!0?P=P.replace(/\\/g,""):P=P.replace(/\\+/g,p=>p.length%2===0?"\\\\":p?"\\":"")),P===d&&s.contains===!0?(i.output=d,i):(i.output=e.wrapOutput(P,i,h),i)}for(;!W();){if(u=se(),u==="\0")continue;if(u==="\\"){const p=w();if(p==="/"&&s.bash!==!0||p==="."||p===";")continue;if(!p){u+="\\",A({type:"text",value:u});continue}const x=/^\\+/.exec(ue());let G=0;if(x&&x[0].length>2&&(G=x[0].length,i.index+=G,G%2!==0&&(u+="\\")),s.unescape===!0?u=se():u+=se(),i.brackets===0){A({type:"text",value:u});continue}}if(i.brackets>0&&(u!=="]"||r.value==="["||r.value==="[^")){if(s.posix!==!1&&u===":"){const p=r.value.slice(1);if(p.includes("[")&&(r.posix=!0,p.includes(":"))){const x=r.value.lastIndexOf("["),G=r.value.slice(0,x),K=r.value.slice(x+2),N=H[K];if(N){r.value=G+N,i.backtrack=!0,se(),!m.output&&E.indexOf(r)===1&&(m.output=z);continue}}}(u==="["&&w()!==":"||u==="-"&&w()==="]")&&(u=`\\${u}`),u==="]"&&(r.value==="["||r.value==="[^")&&(u=`\\${u}`),s.posix===!0&&u==="!"&&r.value==="["&&(u="^"),r.value+=u,Ve({value:u});continue}if(i.quotes===1&&u!=='"'){u=e.escapeRegex(u),r.value+=u,Ve({value:u});continue}if(u==='"'){i.quotes=i.quotes===1?0:1,s.keepQuotes===!0&&A({type:"text",value:u});continue}if(u==="("){Ye("parens"),A({type:"paren",value:u});continue}if(u===")"){if(i.parens===0&&s.strictBrackets===!0)throw new SyntaxError(a("opening","("));const p=I[I.length-1];if(p&&i.parens===p.parens+1){Bt(I.pop());continue}A({type:"paren",value:u,output:i.parens?")":"\\)"}),ge("parens");continue}if(u==="["){if(s.nobracket===!0||!ue().includes("]")){if(s.nobracket!==!0&&s.strictBrackets===!0)throw new SyntaxError(a("closing","]"));u=`\\${u}`}else Ye("brackets");A({type:"bracket",value:u});continue}if(u==="]"){if(s.nobracket===!0||r&&r.type==="bracket"&&r.value.length===1){A({type:"text",value:u,output:`\\${u}`});continue}if(i.brackets===0){if(s.strictBrackets===!0)throw new SyntaxError(a("opening","["));A({type:"text",value:u,output:`\\${u}`});continue}ge("brackets");const p=r.value.slice(1);if(r.posix!==!0&&p[0]==="^"&&!p.includes("/")&&(u=`/${u}`),r.value+=u,Ve({value:u}),s.literalBrackets===!1||e.hasRegexChars(p))continue;const x=e.escapeRegex(r.value);if(i.output=i.output.slice(0,-r.value.length),s.literalBrackets===!0){i.output+=x,r.value=x;continue}r.value=`(${y}${x}|${r.value})`,i.output+=r.value;continue}if(u==="{"&&s.nobrace!==!0){Ye("braces");const p={type:"brace",value:u,output:"(",outputIndex:i.output.length,tokensIndex:i.tokens.length};B.push(p),A(p);continue}if(u==="}"){const p=B[B.length-1];if(s.nobrace===!0||!p){A({type:"text",value:u,output:u});continue}let x=")";if(p.dots===!0){const G=E.slice(),K=[];for(let N=G.length-1;N>=0&&(E.pop(),G[N].type!=="brace");N--)G[N].type!=="dots"&&K.unshift(G[N].value);x=f(K,s),i.backtrack=!0}if(p.comma!==!0&&p.dots!==!0){const G=i.output.slice(0,p.outputIndex),K=i.tokens.slice(p.tokensIndex);p.value=p.output="\\{",u=x="\\}",i.output=G;for(const N of K)i.output+=N.output||N.value}A({type:"brace",value:u,output:x}),ge("braces"),B.pop();continue}if(u==="|"){I.length>0&&I[I.length-1].conditions++,A({type:"text",value:u});continue}if(u===","){let p=u;const x=B[B.length-1];x&&fe[fe.length-1]==="braces"&&(x.comma=!0,p="|"),A({type:"comma",value:u,output:p});continue}if(u==="/"){if(r.type==="dot"&&i.index===i.start+1){i.start=i.index+1,i.consumed="",i.output="",E.pop(),r=m;continue}A({type:"slash",value:u,output:J});continue}if(u==="."){if(i.braces>0&&r.type==="dot"){r.value==="."&&(r.output=Y);const p=B[B.length-1];r.type="dots",r.output+=u,r.value+=u,p.dots=!0;continue}if(i.braces+i.parens===0&&r.type!=="bos"&&r.type!=="slash"){A({type:"text",value:u,output:Y});continue}A({type:"dot",value:u,output:Y});continue}if(u==="?"){if(!(r&&r.value==="(")&&s.noextglob!==!0&&w()==="("&&w(2)!=="?"){Je("qmark",u);continue}if(r&&r.type==="paren"){const p=w();let x=u;(r.value==="("&&!/[!=<:]/.test(p)||p==="<"&&!/<([!=]|\w+>)/.test(ue()))&&(x=`\\${u}`),A({type:"text",value:u,output:x});continue}if(s.dot!==!0&&(r.type==="slash"||r.type==="bos")){A({type:"qmark",value:u,output:ne});continue}A({type:"qmark",value:u,output:D});continue}if(u==="!"){if(s.noextglob!==!0&&w()==="("&&(w(2)!=="?"||!/[!=<:]/.test(w(3)))){Je("negate",u);continue}if(s.nonegate!==!0&&i.index===0){Mt();continue}}if(u==="+"){if(s.noextglob!==!0&&w()==="("&&w(2)!=="?"){Je("plus",u);continue}if(r&&r.value==="("||s.regex===!1){A({type:"plus",value:u,output:ae});continue}if(r&&(r.type==="bracket"||r.type==="paren"||r.type==="brace")||i.parens>0){A({type:"plus",value:u});continue}A({type:"plus",value:ae});continue}if(u==="@"){if(s.noextglob!==!0&&w()==="("&&w(2)!=="?"){A({type:"at",extglob:!0,value:u,output:""});continue}A({type:"text",value:u});continue}if(u!=="*"){(u==="$"||u==="^")&&(u=`\\${u}`);const p=b.exec(ue());p&&(u+=p[0],i.index+=p[0].length),A({type:"text",value:u});continue}if(r&&(r.type==="globstar"||r.star===!0)){r.type="star",r.star=!0,r.value+=u,r.output=X,i.backtrack=!0,i.globstar=!0,V(u);continue}let c=ue();if(s.noextglob!==!0&&/^\([^?]/.test(c)){Je("star",u);continue}if(r.type==="star"){if(s.noglobstar===!0){V(u);continue}const p=r.prev,x=p.prev,G=p.type==="slash"||p.type==="bos",K=x&&(x.type==="star"||x.type==="globstar");if(s.bash===!0&&(!G||c[0]&&c[0]!=="/")){A({type:"star",value:u,output:""});continue}const N=i.braces>0&&(p.type==="comma"||p.type==="brace"),ie=I.length&&(p.type==="pipe"||p.type==="paren");if(!G&&p.type!=="paren"&&!N&&!ie){A({type:"star",value:u,output:""});continue}for(;c.slice(0,3)==="/**";){const le=d[i.index+4];if(le&&le!=="/")break;c=c.slice(3),V("/**",3)}if(p.type==="bos"&&W()){r.type="globstar",r.value+=u,r.output=Q(s),i.output=r.output,i.globstar=!0,V(u);continue}if(p.type==="slash"&&p.prev.type!=="bos"&&!K&&W()){i.output=i.output.slice(0,-(p.output+r.output).length),p.output=`(?:${p.output}`,r.type="globstar",r.output=Q(s)+(s.strictSlashes?")":"|$)"),r.value+=u,i.globstar=!0,i.output+=p.output+r.output,V(u);continue}if(p.type==="slash"&&p.prev.type!=="bos"&&c[0]==="/"){const le=c[1]!==void 0?"|$":"";i.output=i.output.slice(0,-(p.output+r.output).length),p.output=`(?:${p.output}`,r.type="globstar",r.output=`${Q(s)}${J}|${J}${le})`,r.value+=u,i.output+=p.output+r.output,i.globstar=!0,V(u+se()),A({type:"slash",value:"/",output:""});continue}if(p.type==="bos"&&c[0]==="/"){r.type="globstar",r.value+=u,r.output=`(?:^|${J}|${Q(s)}${J})`,i.output=r.output,i.globstar=!0,V(u+se()),A({type:"slash",value:"/",output:""});continue}if(N&&c[0]==="/"){r.type="globstar",r.value+=u,r.output=`(?:^|${J}|${Q(s)}${J})`,i.output+=r.output,i.globstar=!0,V(u+se()),A({type:"slash",value:"/",output:""});continue}i.output=i.output.slice(0,-r.output.length),r.type="globstar",r.output=Q(s),r.value+=u,i.output+=r.output,i.globstar=!0,V(u);continue}const P={type:"star",value:u,output:X};if(s.bash===!0){P.output=".*?",(r.type==="bos"||r.type==="slash")&&(P.output=v+P.output),A(P);continue}if(r&&(r.type==="bracket"||r.type==="paren")&&s.regex===!0){P.output=u,A(P);continue}(i.index===i.start||r.type==="slash"||r.type==="dot")&&(r.type==="dot"?(i.output+=re,r.output+=re):s.dot===!0?(i.output+=oe,r.output+=oe):(i.output+=v,r.output+=v),w()!=="*"&&(i.output+=z,r.output+=z)),A(P)}for(;i.brackets>0;){if(s.strictBrackets===!0)throw new SyntaxError(a("closing","]"));i.output=e.escapeLast(i.output,"["),ge("brackets")}for(;i.parens>0;){if(s.strictBrackets===!0)throw new SyntaxError(a("closing",")"));i.output=e.escapeLast(i.output,"("),ge("parens")}for(;i.braces>0;){if(s.strictBrackets===!0)throw new SyntaxError(a("closing","}"));i.output=e.escapeLast(i.output,"{"),ge("braces")}if(s.strictSlashes!==!0&&(r.type==="star"||r.type==="bracket")&&A({type:"maybe_slash",value:"",output:`${J}?`}),i.backtrack===!0){i.output="";for(const c of i.tokens)i.output+=c.output!=null?c.output:c.value,c.suffix&&(i.output+=c.suffix)}return i};return M.fastpaths=(d,h)=>{const s={...h},$=typeof s.maxLength=="number"?Math.min(o,s.maxLength):o,O=d.length;if(O>$)throw new SyntaxError(`Input length: ${O}, exceeds maximum allowed length: ${$}`);d=l[d]||d;const{DOT_LITERAL:m,SLASH_LITERAL:E,ONE_CHAR:y,DOTS_SLASH:F,NO_DOT:U,NO_DOTS:Y,NO_DOTS_SLASH:ae,STAR:J,START_ANCHOR:z}=t.globChars(s.windows),ee=s.dot?Y:U,pe=s.dot?ae:U,re=s.capture?"":"?:",oe={negated:!1,prefix:""};let D=s.bash===!0?".*?":J;s.capture&&(D=`(${D})`);const ne=v=>v.noglobstar===!0?D:`(${re}(?:(?!${z}${v.dot?F:m}).)*?)`,j=v=>{switch(v){case"*":return`${ee}${y}${D}`;case".*":return`${m}${y}${D}`;case"*.*":return`${ee}${D}${m}${y}${D}`;case"*/*":return`${ee}${D}${E}${y}${pe}${D}`;case"**":return ee+ne(s);case"**/*":return`(?:${ee}${ne(s)}${E})?${pe}${y}${D}`;case"**/*.*":return`(?:${ee}${ne(s)}${E})?${pe}${D}${m}${y}${D}`;case"**/.*":return`(?:${ee}${ne(s)}${E})?${m}${y}${D}`;default:{const k=/^(.*?)\.(\w+)$/.exec(v);if(!k)return;const X=j(k[1]);return X?X+m+k[2]:void 0}}},ce=e.removePrefix(d,oe);let Q=j(ce);return Q&&s.strictSlashes!==!0&&(Q+=`${E}?`),Q},rt=M,rt}var nt,Et;function So(){if(Et)return nt;Et=1;const t=xo(),e=Co(),o=tt(),H=et(),b=l=>l&&typeof l=="object"&&!Array.isArray(l),n=(l,f,a=!1)=>{if(Array.isArray(l)){const q=l.map(Z=>n(Z,f,a));return Z=>{for(const M of q){const d=M(Z);if(d)return d}return!1}}const R=b(l)&&l.tokens&&l.input;if(l===""||typeof l!="string"&&!R)throw new TypeError("Expected pattern to be a non-empty string");const g=f||{},T=g.windows,C=R?n.compileRe(l,f):n.makeRe(l,f,!1,!0),_=C.state;delete C.state;let L=()=>!1;if(g.ignore){const q={...f,ignore:null,onMatch:null,onResult:null};L=n(g.ignore,q,a)}const te=(q,Z=!1)=>{const{isMatch:M,match:d,output:h}=n.test(q,C,f,{glob:l,posix:T}),s={glob:l,state:_,regex:C,posix:T,input:q,output:h,match:d,isMatch:M};if(typeof g.onResult=="function"&&g.onResult(s),M===!1)return s.isMatch=!1,Z?s:!1;e:if(L(q)){if(typeof g.onIgnore=="function"&&g.onIgnore(s)===H.UNIGNORE){s.isMatch=!0;break e}return s.isMatch=!1,Z?s:!1}return typeof g.onMatch=="function"&&g.onMatch(s),Z?s:!0};return a&&(te.state=_),te};return n.test=(l,f,a,{glob:R,posix:g}={})=>{if(typeof l!="string")throw new TypeError("Expected input to be a string");if(l==="")return{isMatch:!1,output:""};const T=a||{},C=T.format||(g?o.toPosixSlashes:null);let _=l===R,L=_&&C?C(l):l;return _===!1&&(L=C?C(l):l,_=L===R),(_===!1||T.capture===!0)&&(T.matchBase===!0||T.basename===!0?_=n.matchBase(l,f,a,g):_=f.exec(L)),{isMatch:!!_,match:_,output:L}},n.matchBase=(l,f,a,R=a&&a.windows)=>(f instanceof RegExp?f:n.makeRe(f,a)).test(o.basename(l,{windows:R})),n.isMatch=(l,f,a)=>n(f,a)(l),n.parse=(l,f)=>Array.isArray(l)?l.map(a=>n.parse(a,f)):e(l,{...f,fastpaths:!1}),n.scan=(l,f)=>t(l,f),n.compileRe=(l,f,a=!1,R=!1)=>{if(a===!0)return l.output;const g=f||{},T=g.contains?"":"^",C=g.contains?"":"$";let _=`${T}(?:${l.output})${C}`;l&&l.negated===!0&&(_=`^(?!${_}).*$`);const L=n.toRegex(_,f);return R===!0&&(L.state=l),L},n.makeRe=(l,f={},a=!1,R=!1)=>{if(!l||typeof l!="string")throw new TypeError("Expected a non-empty string");let g={negated:!1,fastpaths:!0};return f.fastpaths!==!1&&(l[0]==="."||l[0]==="*")&&(g.output=e.fastpaths(l,f)),g.output||(g=e(l,f)),n.compileRe(g,f,a,R)},n.toRegex=(l,f)=>{try{const a=f||{};return new RegExp(l,a.flags||(a.nocase?"i":""))}catch(a){if(f&&f.debug===!0)throw a;return/$^/}},n.constants=H,nt=n,nt}var ut,Rt;function Oo(){if(Rt)return ut;Rt=1;const t=So(),e=tt();function o(H,b,n=!1){return b&&(b.windows===null||b.windows===void 0)&&(b={...b,windows:e.isWindows()}),t(H,b,n)}return Object.assign(o,t),ut=o,ut}var wo=Oo();ct(wo);const ko=S(import.meta.url),we=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ze=t=>{if(typeof we<"u"&&we.versions&&we.versions.node){const[e,o]=we.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return we.getBuiltinModule(t)}return ko(t)};Ze("fs");Ze("fs");Ze("path");Ze("url");const{createRequire:Ho}=Ze("module");var _t=Ho(import.meta.url);try{_t.resolve("picomatch"),_t("picomatch")}catch{}var it,At;function No(){if(At)return it;At=1;/*!
|
|
2
|
-
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
5
|
-
* Licensed under the MIT License.
|
|
6
|
-
*/return it=function(t){if(typeof t!="string"||t==="")return!1;for(var e;e=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(e[2])return!0;t=t.slice(e.index+e[0].length)}return!1},it}var lt,Tt;function St(){if(Tt)return lt;Tt=1;/*!
|
|
7
|
-
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
10
|
-
* Released under the MIT License.
|
|
11
|
-
*/var t=No(),e={"{":"}","(":")","[":"]"},o=function(b){if(b[0]==="!")return!0;for(var n=0,l=-2,f=-2,a=-2,R=-2,g=-2;n<b.length;){if(b[n]==="*"||b[n+1]==="?"&&/[\].+)]/.test(b[n])||f!==-1&&b[n]==="["&&b[n+1]!=="]"&&(f<n&&(f=b.indexOf("]",n)),f>n&&(g===-1||g>f||(g=b.indexOf("\\",n),g===-1||g>f)))||a!==-1&&b[n]==="{"&&b[n+1]!=="}"&&(a=b.indexOf("}",n),a>n&&(g=b.indexOf("\\",n),g===-1||g>a))||R!==-1&&b[n]==="("&&b[n+1]==="?"&&/[:!=]/.test(b[n+2])&&b[n+3]!==")"&&(R=b.indexOf(")",n),R>n&&(g=b.indexOf("\\",n),g===-1||g>R))||l!==-1&&b[n]==="("&&b[n+1]!=="|"&&(l<n&&(l=b.indexOf("|",n)),l!==-1&&b[l+1]!==")"&&(R=b.indexOf(")",l),R>l&&(g=b.indexOf("\\",l),g===-1||g>R))))return!0;if(b[n]==="\\"){var T=b[n+1];n+=2;var C=e[T];if(C){var _=b.indexOf(C,n);_!==-1&&(n=_+1)}if(b[n]==="!")return!0}else n++}return!1},H=function(b){if(b[0]==="!")return!0;for(var n=0;n<b.length;){if(/[*?{}()[\]]/.test(b[n]))return!0;if(b[n]==="\\"){var l=b[n+1];n+=2;var f=e[l];if(f){var a=b.indexOf(f,n);a!==-1&&(n=a+1)}if(b[n]==="!")return!0}else n++}return!1};return lt=function(b,n){if(typeof b!="string"||b==="")return!1;if(t(b))return!0;var l=o;return n&&n.strict===!1&&(l=H),l(b)},lt}const Lo=S(import.meta.url),ke=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ot=t=>{if(typeof ke<"u"&&ke.versions&&ke.versions.node){const[e,o]=ke.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return ke.getBuiltinModule(t)}return Lo(t)},Mo=Ot("path"),Bo=Ot("os");var at,xt;function Io(){if(xt)return at;xt=1;var t=St(),e=Mo.posix.dirname,o=Bo.platform()==="win32",H="/",b=/\\/g,n=/\\([!*?|[\](){}])/g;at=function(a,R){var g=Object.assign({flipBackslashes:!0},R);g.flipBackslashes&&o&&a.indexOf(H)<0&&(a=a.replace(b,H)),l(a)&&(a+=H),a+="a";do a=e(a);while(f(a));return a.replace(n,"$1")};function l(a){var R=a.slice(-1),g;switch(R){case"}":g="{";break;case"]":g="[";break;default:return!1}var T=a.indexOf(g);return T<0?!1:a.slice(T+1,-1).includes(H)}function f(a){return/\([^()]+$/.test(a)||a[0]==="{"||a[0]==="["||/[^\\][{[]/.test(a)?!0:t(a)}return at}var Po=Io();ct(Po);const Do=S(import.meta.url),He=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Go=t=>{if(typeof He<"u"&&He.versions&&He.versions.node){const[e,o]=He.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return He.getBuiltinModule(t)}return Do(t)};Go("node:fs/promises");const Uo=S(import.meta.url),Ne=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,zo=t=>{if(typeof Ne<"u"&&Ne.versions&&Ne.versions.node){const[e,o]=Ne.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ne.getBuiltinModule(t)}return Uo(t)};zo("node:fs");var Ko=St();ct(Ko);const Fo=S(import.meta.url),Le=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,wt=t=>{if(typeof Le<"u"&&Le.versions&&Le.versions.node){const[e,o]=Le.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Le.getBuiltinModule(t)}return Fo(t)};wt("node:fs/promises");wt("node:fs");let Xo=class extends Error{constructor(e){super(`ENOENT: ${e}`)}get code(){return"ENOENT"}set code(e){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(e){throw new Error("Cannot overwrite name of NotFoundError")}},jo=class extends Error{constructor(e){super(`EPERM: Operation not permitted, ${e}`)}get code(){return"EPERM"}set code(e){throw new Error("Cannot overwrite code EPERM")}get name(){return"PermissionError"}set name(e){throw new Error("Cannot overwrite name of PermissionError")}};const Qo=(t,e)=>{const o=t?.code;return o==="ENOENT"?new Xo(`no such file or directory, open '${e}'`):o==="EACCES"||o==="EPERM"?new jo(`unable to read the non-readable file: ${e}`):t},Wo=S(import.meta.url),Me=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,kt=t=>{if(typeof Me<"u"&&Me.versions&&Me.versions.node){const[e,o]=Me.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Me.getBuiltinModule(t)}return Wo(t)},{readFile:qo}=kt("node:fs/promises"),{unzip:Zo,brotliDecompress:Vo}=kt("node:zlib"),Yo={brotli:Vo,gzip:Zo,none:(t,e)=>{e(null,t)}},ks=async(t,e)=>{Zt(t),t=qt(t);const{buffer:o,compression:H,encoding:b,flag:n}=e??{};let l;try{l=await qo(t,n?{flag:n}:{})}catch(f){throw Qo(f,t)}return await new Promise((f,a)=>{Yo[H??"none"](l,(R,g)=>{R?a(R):f(o?g:g.toString(b??"utf8"))})})},Jo=S(import.meta.url),Be=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ht=t=>{if(typeof Be<"u"&&Be.versions&&Be.versions.node){const[e,o]=Be.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Be.getBuiltinModule(t)}return Jo(t)};Ht("node:fs");Ht("node:zlib");const es=S(import.meta.url),Ie=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ts=t=>{if(typeof Ie<"u"&&Ie.versions&&Ie.versions.node){const[e,o]=Ie.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ie.getBuiltinModule(t)}return es(t)},{createRequire:Nt}=ts("node:module"),os=new Map([["Error",Error],["EvalError",EvalError],["RangeError",RangeError],["ReferenceError",ReferenceError],["SyntaxError",SyntaxError],["TypeError",TypeError],["URIError",URIError]]);typeof AggregateError<"u"&&os.set("AggregateError",AggregateError);const ss=Nt(import.meta.url),Pe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,rs=t=>{if(typeof Pe<"u"&&Pe.versions&&Pe.versions.node){const[e,o]=Pe.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Pe.getBuiltinModule(t)}return ss(t)};rs("node:util");const ns=Nt(import.meta.url),De=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ft=t=>{if(typeof De<"u"&&De.versions&&De.versions.node){const[e,o]=De.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return De.getBuiltinModule(t)}return ns(t)};ft("node:fs");ft("node:path");ft("node:url");const us=S(import.meta.url),Ge=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Lt=t=>{if(typeof Ge<"u"&&Ge.versions&&Ge.versions.node){const[e,o]=Ge.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ge.getBuiltinModule(t)}return us(t)};Lt("node:fs");Lt("node:fs/promises");const is=S(import.meta.url),Ue=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ls=t=>{if(typeof Ue<"u"&&Ue.versions&&Ue.versions.node){const[e,o]=Ue.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ue.getBuiltinModule(t)}return is(t)};ls("node:fs");const as=S(import.meta.url),ze=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ps=t=>{if(typeof ze<"u"&&ze.versions&&ze.versions.node){const[e,o]=ze.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return ze.getBuiltinModule(t)}return as(t)};ps("node:fs/promises");const cs=S(import.meta.url),Ke=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,fs=t=>{if(typeof Ke<"u"&&Ke.versions&&Ke.versions.node){const[e,o]=Ke.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ke.getBuiltinModule(t)}return cs(t)};fs("node:fs");S(import.meta.url);const gs=S(import.meta.url),Fe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ds=t=>{if(typeof Fe<"u"&&Fe.versions&&Fe.versions.node){const[e,o]=Fe.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Fe.getBuiltinModule(t)}return gs(t)};ds("node:crypto");new TextEncoder;const bs=S(import.meta.url),Xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,hs=t=>{if(typeof Xe<"u"&&Xe.versions&&Xe.versions.node){const[e,o]=Xe.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Xe.getBuiltinModule(t)}return bs(t)};hs("node:fs/promises");const ms=S(import.meta.url),je=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ys=t=>{if(typeof je<"u"&&je.versions&&je.versions.node){const[e,o]=je.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return je.getBuiltinModule(t)}return ms(t)};ys("node:fs");const vs=S(import.meta.url),Qe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,$s=t=>{if(typeof Qe<"u"&&Qe.versions&&Qe.versions.node){const[e,o]=Qe.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Qe.getBuiltinModule(t)}return vs(t)};$s("node:fs/promises");const Es=S(import.meta.url),We=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Rs=t=>{if(typeof We<"u"&&We.versions&&We.versions.node){const[e,o]=We.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return We.getBuiltinModule(t)}return Es(t)};Rs("node:fs");const _s=S(import.meta.url),qe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,gt=t=>{if(typeof qe<"u"&&qe.versions&&qe.versions.node){const[e,o]=qe.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return qe.getBuiltinModule(t)}return _s(t)},As=gt("fs"),Ts=gt("os"),xs=gt("path");var pt={},Ct;function Cs(){if(Ct)return pt;Ct=1;var t=Object.defineProperty,e=(g,T)=>t(g,"name",{value:T,configurable:!0}),o=As,H=Ts,b=xs;const n=e(g=>{let T="";for(let C=0;C<g.length;C+=1){const _=g[C],L=_.toUpperCase();T+=_===L?_.toLowerCase():L}return T},"invertCase"),l=new Map,f=e((g,T)=>{const C=b.join(g,`.is-fs-case-sensitive-test-${process.pid}`);try{return T.writeFileSync(C,""),!T.existsSync(n(C))}finally{try{T.unlinkSync(C)}catch{}}},"checkDirectoryCaseWithWrite"),a=e((g,T,C)=>{try{return f(g,C)}catch(_){if(T===void 0)return f(H.tmpdir(),C);throw _}},"checkDirectoryCaseWithFallback"),R=e((g,T=o,C=!0)=>{const _=g??process.cwd();if(C&&l.has(_))return l.get(_);let L;const te=n(_);return te!==_&&T.existsSync(_)?L=!T.existsSync(te):L=a(_,g,T),C&&l.set(_,L),L},"isFsCaseSensitive");return pt.isFsCaseSensitive=R,pt}Cs();export{ks as z};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{createRequire as g}from"node:module";import o from"./EmailError-B-sEf3bp.js";const p=g(import.meta.url),n=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,u=e=>{if(typeof n<"u"&&n.versions&&n.versions.node){const[t,s]=n.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return n.getBuiltinModule(e)}return p(e)},{Buffer:m}=u("node:buffer"),{X509Certificate:d,createVerify:S}=u("node:crypto"),y={Notification:["Message","MessageId","Subject","Timestamp","TopicArn","Type"],SubscriptionConfirmation:["Message","MessageId","SubscribeURL","Timestamp","Token","TopicArn","Type"],UnsubscribeConfirmation:["Message","MessageId","SubscribeURL","Timestamp","Token","TopicArn","Type"]},b=/^sns\.[a-z0-9-]+\.amazonaws\.com(?:\.cn)?$/,w=/\.$/,h=e=>{let t;try{t=new URL(e)}catch{return!1}if(t.protocol!=="https:"||t.username!==""||t.password!==""||t.port!=="")return!1;const s=t.hostname.toLowerCase().replace(w,"");return b.test(s)},T=async e=>{if(!h(e))throw new o("webhooks",`Refusing to fetch SNS signing certificate from untrusted URL: ${e}`);const t=await fetch(e,{signal:AbortSignal.timeout(5e3)});if(!t.ok)throw new o("webhooks",`Failed to fetch SNS signing certificate (status ${String(t.status)})`);return await t.text()},v=e=>{const t=y[e.Type??""];if(!t)return;let s="";for(const i of t){const r=e[i];typeof r=="string"&&(s+=`${i}
|
|
2
|
-
${r}
|
|
3
|
-
`)}return s},M=async(e,t={})=>{const{certificateResolver:s=T}=t;if(!e.Signature||!e.SigningCertURL)return{reason:"missing-signature",valid:!1};const i=v(e);if(i===void 0)return{reason:"unknown-message-type",valid:!1};let r;if(e.SignatureVersion==="1")r="RSA-SHA1";else if(e.SignatureVersion==="2")r="RSA-SHA256";else return{reason:"unknown-signature-version",valid:!1};const f=await s(e.SigningCertURL);let a;try{a=new d(f).publicKey}catch(l){throw new o("webhooks","Failed to parse SNS signing certificate",{cause:l})}let c;try{c=S(r).update(i,"utf8").verify(a,m.from(e.Signature,"base64"))}catch{return{reason:"signature-malformed",valid:!1}}return c?{valid:!0}:{reason:"signature-mismatch",valid:!1}};export{h as isValidSigningCertUrl,M as verifySnsMessage};
|