@visulima/packem-rollup 1.0.0-alpha.65 → 1.0.0-alpha.67

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.
Files changed (116) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/LICENSE.md +9 -534
  3. package/dist/index.d.ts +680 -25
  4. package/dist/index.js +1 -1
  5. package/dist/packem_shared/browserslistToEsbuild-HD6SaWPt.js +1 -0
  6. package/dist/packem_shared/esbuildPlugin-BStpbA6S.js +1 -0
  7. package/dist/packem_shared/swcPlugin-DBBN5mct.js +1 -0
  8. package/dist/packem_shared/types.d-Dmpk2asd.d.ts +7 -0
  9. package/dist/packem_shared/types.d-DrgzeMBs.d-CG9J1x6q.d.ts +6 -0
  10. package/dist/packem_shared/types.d-KBgVO47q.d.ts +658 -0
  11. package/dist/plugins/chunk-splitter/index.d.ts +2 -5
  12. package/dist/plugins/chunk-splitter/index.js +1 -0
  13. package/dist/plugins/cjs-interop.d.ts +9 -5
  14. package/dist/plugins/cjs-interop.js +2 -2
  15. package/dist/plugins/esbuild/index.d.ts +11 -3
  16. package/dist/plugins/esbuild/index.js +1 -1
  17. package/dist/plugins/json.d.ts +5 -4
  18. package/dist/plugins/json.js +1 -1
  19. package/dist/plugins/jsx-remove-attributes.d.ts +9 -5
  20. package/dist/plugins/jsx-remove-attributes.js +1 -1
  21. package/dist/plugins/preserve-directives.d.ts +14 -15
  22. package/dist/plugins/preserve-directives.js +3 -3
  23. package/dist/plugins/pure-new-expression-plugin.d.ts +10 -9
  24. package/dist/plugins/pure-new-expression-plugin.js +1 -0
  25. package/dist/plugins/sucrase/index.d.ts +101 -7
  26. package/dist/plugins/sucrase/index.js +1 -1
  27. package/dist/plugins/swc/index.d.ts +11 -2
  28. package/dist/plugins/swc/index.js +1 -1
  29. package/package.json +22 -105
  30. package/dist/packem_shared/browserslistToEsbuild-C0IWmbNe.js +0 -1
  31. package/dist/packem_shared/cachingPlugin-DLKoeQeF.js +0 -1
  32. package/dist/packem_shared/chunkSplitter-DWAy1JkE.js +0 -1
  33. package/dist/packem_shared/createSplitChunks-BrEBZq7d.js +0 -1
  34. package/dist/packem_shared/esbuildPlugin-C5x4_cXf.js +0 -1
  35. package/dist/packem_shared/fixDynamicImportExtension-BBGNRniz.js +0 -1
  36. package/dist/packem_shared/getCustomModuleLayer-d8i66lfh.js +0 -1
  37. package/dist/packem_shared/getModuleLayer-rF9RxnJ5.js +0 -1
  38. package/dist/packem_shared/index-QEzU3Fey.js +0 -1
  39. package/dist/packem_shared/metafilePlugin-CVcqFpPJ.js +0 -1
  40. package/dist/packem_shared/oxcResolvePlugin-SH1JFonc.js +0 -1
  41. package/dist/packem_shared/oxcTransformPlugin-BGmQroQ4.js +0 -4
  42. package/dist/packem_shared/patchTypescriptTypes-CZ4v3hr9.js +0 -6
  43. package/dist/packem_shared/pureNewExpressionPlugin-DX9yMcH2.js +0 -1
  44. package/dist/packem_shared/resolveFileUrlPlugin-BkpjVHeK.js +0 -1
  45. package/dist/packem_shared/resolveTsconfigPathsPlugin-CEasmDpi.js +0 -1
  46. package/dist/packem_shared/resolveTsconfigRootDirectoriesPlugin-Cwj3tqCJ.js +0 -1
  47. package/dist/packem_shared/resolveTypescriptMjsCtsPlugin-DX9at4BX.js +0 -1
  48. package/dist/packem_shared/swcPlugin-Boip4lWG.js +0 -1
  49. package/dist/plugins/babel/index.d.ts +0 -10
  50. package/dist/plugins/babel/index.js +0 -1
  51. package/dist/plugins/cache-plugin.d.ts +0 -11
  52. package/dist/plugins/chunk-splitter/gather.d.ts +0 -8
  53. package/dist/plugins/chunk-splitter/parse/index.d.ts +0 -4
  54. package/dist/plugins/chunk-splitter/parse/types.d.ts +0 -24
  55. package/dist/plugins/copy.d.ts +0 -23
  56. package/dist/plugins/copy.js +0 -1
  57. package/dist/plugins/data-uri.d.ts +0 -25
  58. package/dist/plugins/data-uri.js +0 -1
  59. package/dist/plugins/debarrel.d.ts +0 -7
  60. package/dist/plugins/debarrel.js +0 -2
  61. package/dist/plugins/esbuild/browserslist-to-esbuild.d.ts +0 -2
  62. package/dist/plugins/esbuild/esbuild-plugin.d.ts +0 -3
  63. package/dist/plugins/esbuild/types.d.ts +0 -39
  64. package/dist/plugins/esbuild/utils/get-render-chunk.d.ts +0 -14
  65. package/dist/plugins/esbuild/utils/optimize-deps.d.ts +0 -3
  66. package/dist/plugins/esbuild/utils/warn.d.ts +0 -4
  67. package/dist/plugins/esm-shim-cjs-syntax.d.ts +0 -9
  68. package/dist/plugins/esm-shim-cjs-syntax.js +0 -11
  69. package/dist/plugins/fix-dts-default-cjs-exports-util.d.ts +0 -35
  70. package/dist/plugins/fix-dts-default-cjs-exports.d.ts +0 -26
  71. package/dist/plugins/fix-dts-default-cjs-exports.js +0 -26
  72. package/dist/plugins/fix-dynamic-import-extension.d.ts +0 -3
  73. package/dist/plugins/import-attributes.d.ts +0 -2
  74. package/dist/plugins/import-attributes.js +0 -1
  75. package/dist/plugins/license.d.ts +0 -17
  76. package/dist/plugins/license.js +0 -13
  77. package/dist/plugins/metafile.d.ts +0 -3
  78. package/dist/plugins/minify-html-literals/index.d.ts +0 -41
  79. package/dist/plugins/minify-html-literals/index.js +0 -3
  80. package/dist/plugins/minify-html-literals/lib/minify-html-literals.d.ts +0 -200
  81. package/dist/plugins/minify-html-literals/lib/models.d.ts +0 -25
  82. package/dist/plugins/minify-html-literals/lib/parse-literals.d.ts +0 -13
  83. package/dist/plugins/minify-html-literals/lib/strategy.d.ts +0 -69
  84. package/dist/plugins/minify-html-literals/lib/typescript.d.ts +0 -23
  85. package/dist/plugins/native-modules-plugin.d.ts +0 -14
  86. package/dist/plugins/native-modules-plugin.js +0 -1
  87. package/dist/plugins/oxc/index.d.ts +0 -3
  88. package/dist/plugins/oxc/index.js +0 -1
  89. package/dist/plugins/oxc/oxc-resolve-plugin.d.ts +0 -4
  90. package/dist/plugins/oxc/oxc-transformer-plugin.d.ts +0 -3
  91. package/dist/plugins/oxc/types.d.ts +0 -16
  92. package/dist/plugins/raw.d.ts +0 -7
  93. package/dist/plugins/raw.js +0 -6
  94. package/dist/plugins/require-cjs-transformer.d.ts +0 -43
  95. package/dist/plugins/require-cjs-transformer.js +0 -21
  96. package/dist/plugins/resolve-file-url.d.ts +0 -3
  97. package/dist/plugins/shebang.d.ts +0 -9
  98. package/dist/plugins/shebang.js +0 -4
  99. package/dist/plugins/source-maps.d.ts +0 -7
  100. package/dist/plugins/source-maps.js +0 -1
  101. package/dist/plugins/swc/swc-plugin.d.ts +0 -3
  102. package/dist/plugins/swc/types.d.ts +0 -6
  103. package/dist/plugins/typescript/index.d.ts +0 -7
  104. package/dist/plugins/typescript/index.js +0 -1
  105. package/dist/plugins/typescript/patch-typescript-types.d.ts +0 -13
  106. package/dist/plugins/typescript/resolve-tsconfig-paths-plugin.d.ts +0 -11
  107. package/dist/plugins/typescript/resolve-tsconfig-root-dirs.d.ts +0 -24
  108. package/dist/plugins/typescript/resolve-typescript-mjs-cjs.d.ts +0 -3
  109. package/dist/plugins/url.d.ts +0 -72
  110. package/dist/plugins/url.js +0 -1
  111. package/dist/types.d.ts +0 -127
  112. package/dist/utils/chunks/create-split-chunks.d.ts +0 -11
  113. package/dist/utils/chunks/get-custom-module-layer.d.ts +0 -2
  114. package/dist/utils/chunks/get-module-layer.d.ts +0 -10
  115. package/dist/utils/index.d.ts +0 -4
  116. package/dist/utils/is-pure-cjs.d.ts +0 -9
@@ -1 +0,0 @@
1
- var u=Object.defineProperty;var m=(o,a)=>u(o,"name",{value:a,configurable:!0});const r={"application/prs.cww":["cww"],"application/prs.xsf+xml":["xsf"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["*xfdf"],"application/vnd.age":["age"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.autodesk.fbx":["fbx"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dcmp+xml":["dcmp"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["*fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.slides":["ggs"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.drawing":["gdraw"],"application/vnd.google-apps.form":["gform"],"application/vnd.google-apps.jam":["gjam"],"application/vnd.google-apps.map":["gmap"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.script":["gscript"],"application/vnd.google-apps.site":["gsite"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.gov.sk.xmldatacontainer+xml":["xdcf"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["*mpp","mpt"],"application/vnd.ms-visio.viewer":["vdx"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.nato.bindingdataobject+xml":["bdo"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.procrate.brushset":["brushset"],"application/vnd.procreate.brush":["brush"],"application/vnd.procreate.dream":["drm"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.pwg-xhtml-print+xml":["xhtm"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml","uo"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw","vsdx","vtx"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blender":["blend"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-compressed":["*rar"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-ipynb+json":["ipynb"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["*prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["*sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zip-compressed":["*zip"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["*aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif","btf"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.blockfact.facti":["facti"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-adobe-dng":["dng"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.bary":["bary"],"model/vnd.cld":["cld"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["*mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.pytha.pyox":["pyo","pyox"],"model/vnd.sap.vds":["vds"],"model/vnd.usda":["usda"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.familysearch.gedcom":["ged"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};Object.freeze(r);const f={"application/andrew-inset":["ez"],"application/appinstaller":["appinstaller"],"application/applixware":["aw"],"application/appx":["appx"],"application/appxbundle":["appxbundle"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/automationml-aml+xml":["aml"],"application/automationml-amlx+zip":["amlx"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cpl+xml":["cpl"],"application/cu-seeme":["cu"],"application/cwl":["cwl"],"application/dash+xml":["mpd"],"application/dash-patch+xml":["mpp"],"application/davmount+xml":["davmount"],"application/dicom":["dcm"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdf":["fdf"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["*js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/media-policy-dataset+xml":["mpf"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["*mp4","*mpg4","mp4s","m4p"],"application/msix":["msix"],"application/msixbundle":["msixbundle"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg","one","onea"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-keys":["asc"],"application/pgp-signature":["sig","*asc"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/sql":["sql"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/watcherinfo+xml":["wif"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xfdf":["xfdf"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"application/zip+dotlottie":["lottie"],"audio/3gpp":["*3gpp"],"audio/aac":["adts","aac"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a","m4b"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avci":["avci"],"image/avcs":["avcs"],"image/avif":["avif"],"image/bmp":["bmp","dib"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/dpx":["dpx"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/ief":["ief"],"image/jaii":["jaii"],"image/jais":["jais"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpg","jpeg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm","jpgm"],"image/jpx":["jpx","jpf"],"image/jxl":["jxl"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/pjpeg":["jfif"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime","mht","mhtml"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/jt":["jt"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/prc":["prc"],"model/step":["step","stp","stpnc","p21","210"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/u3d":["u3d"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js","mjs"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["md","markdown"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/wgsl":["wgsl"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","*jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts","m2t","m2ts","mts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};Object.freeze(f);var b=Object.defineProperty,h=m((o,a)=>b(o,"name",{value:a,configurable:!0}),"g"),t=m(function(o,a,n,i){if(typeof a=="function"?o!==a||!i:!a.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(o):i?i.value:a.get(o)},"n"),c,d,l;class w{static{m(this,"p")}static{h(this,"Mime")}constructor(...a){c.set(this,new Map),d.set(this,new Map),l.set(this,new Map);for(const n of a)this.define(n)}define(a,n=!1){for(let[i,e]of Object.entries(a)){i=i.toLowerCase(),e=e.map(p=>p.toLowerCase()),t(this,l,"f").has(i)||t(this,l,"f").set(i,new Set);const g=t(this,l,"f").get(i);let x=!0;for(let p of e){const v=p.startsWith("*");if(p=v?p.slice(1):p,g?.add(p),x&&t(this,d,"f").set(i,p),x=!1,v)continue;const s=t(this,c,"f").get(p);if(s&&s!=i&&!n)throw new Error(`"${i} -> ${p}" conflicts with "${s} -> ${p}". Pass \`force=true\` to override this definition.`);t(this,c,"f").set(p,i)}}return this}getType(a){if(typeof a!="string")return null;const n=a.replace(/^.*[/\\]/s,"").toLowerCase(),i=n.replace(/^.*\./s,"").toLowerCase(),e=n.length<a.length;return!(i.length<n.length-1)&&e?null:t(this,c,"f").get(i)??null}getExtension(a){return typeof a!="string"?null:(a=a?.split?.(";")[0],(a&&t(this,d,"f").get(a.trim().toLowerCase()))??null)}getAllExtensions(a){return typeof a!="string"?null:t(this,l,"f").get(a.toLowerCase())??null}_freeze(){this.define=()=>{throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances")},Object.freeze(this);for(const a of t(this,l,"f").values())Object.freeze(a);return this}_getTestState(){return{types:t(this,c,"f"),extensions:t(this,d,"f")}}}c=new WeakMap,d=new WeakMap,l=new WeakMap;const j=new w(f,r)._freeze();export{j as R};
@@ -1 +0,0 @@
1
- var f=Object.defineProperty;var a=(e,t)=>f(e,"name",{value:t,configurable:!0});import{ENDING_REGEX as l}from"@visulima/packem-share";var c=Object.defineProperty,u=a((e,t)=>c(e,"name",{value:t,configurable:!0}),"o");const g=u(()=>({async generateBundle(e,t){const r=[];for(const s of this.getModuleIds()){const o=this.getModuleInfo(s);if(o!=null&&!o.isExternal)for(const n of o.importedIds)r.push({source:s,target:n})}if(Array.isArray(r)&&r.length===0)return;const i=Object.keys(t);this.emitFile({fileName:`metafile-${i[0].replace(l,"")}-${e.format}.json`,source:JSON.stringify(r,void 0,2),type:"asset"})},name:"packem:metafile"}),"metafilePlugin");export{g as default};
@@ -1 +0,0 @@
1
- var P=Object.defineProperty;var h=(t,e)=>P(t,"name",{value:e,configurable:!0});import{createFilter as R}from"@rollup/pluginutils";import{findPackageJson as M}from"@visulima/package/package-json";import{dirname as n}from"@visulima/path";import{ResolverFactory as A}from"oxc-resolver";var J=Object.defineProperty,m=h((t,e)=>J(t,"name",{value:e,configurable:!0}),"a");let b;const O=new Map,z=m((t,e,E,u)=>{const{ignoreSideEffectsForRoot:w,...a}=t;let c=b;return c||(c=b=new A({...a,roots:[...a.roots??[],e],tsconfig:u?{configFile:u,references:"auto"}:void 0})),{name:"oxc-resolve",resolveId:{async handler(p,l,v){const{isEntry:F}=v,x=F||!l?n(p):n(l),{error:y,path:o}=await c.async(x,p);if(y){E.debug(y,{context:[{basedir:e,extensions:a.extensions,id:o}]});return}let f=m(s=>!1,"hasModuleSideEffects");try{const{packageJson:s,path:S}=await M(n(o),{cache:O}),g=n(S);if(!w||e!==g){const i=s.sideEffects;if(typeof i=="boolean")f=m(()=>i,"hasModuleSideEffects");else if(Array.isArray(i)){const k=i.map(d=>d.includes("/")?d:`**/${d}`);f=R(k,void 0,{resolve:g})}}}catch(s){console.debug(s.message,{context:[{basedir:x,caller:"Resolver",error:s,extensions:a.extensions,id:o}]})}const r=await this.resolve(o,l,{skipSelf:!0,...v});if(r)return r.external?!1:r.id!==o?r:{id:o,meta:r.meta,moduleSideEffects:f(o)}},order:"post"}}},"oxcResolvePlugin");export{z as default};
@@ -1,4 +0,0 @@
1
- var f=Object.defineProperty;var a=(r,e)=>f(r,"name",{value:e,configurable:!0});import{createFilter as p}from"@rollup/pluginutils";import{EXCLUDE_REGEXP as l}from"@visulima/packem-share/constants";import{transform as d}from"oxc-transform";var E=Object.defineProperty,g=a((r,e)=>E(r,"name",{value:e,configurable:!0}),"m");const x=g(({exclude:r,include:e,...m})=>{const s=p(e,r??l);return{name:"packem:oxc-transform",async transform(c,t){if(!s(t))return;const n=await d(t,c,{...m,sourcemap:!0});if(!n)return;const{code:i,errors:o=[],map:u}=n;return o&&o.length>0?this.error({message:[`
2
- transform errors:`,...o].join(`
3
-
4
- `),pluginCode:"ERR_TRANSFORM"}):{code:i,map:u}}}},"oxcTransformPlugin");x.NAME="oxc";export{x as default};
@@ -1,6 +0,0 @@
1
- var w=Object.defineProperty;var l=(e,n)=>w(e,"name",{value:n,configurable:!0});import{parse as $}from"@babel/parser";import{w as y}from"./index-Dq8IUFTs.js";import T from"magic-string";import{findStaticImports as b}from"mlly";var C=Object.defineProperty,s=l((e,n)=>C(e,"name",{value:n,configurable:!0}),"r");const S=/\/\*[^*]*\*+(?:[^/*][^*]*\*+)*\//g,x=/MIT License|MIT license|BSD license/,N=/\n{2,}/g,k=/\b(\w+)\$\d+\b/g,v=/[-/\\^$*+?.()|[\]{}]/g,A=s(e=>e.replaceAll(v,String.raw`\$&`),"escapeRegex"),I=s(e=>[...new Set(e)],"unique"),R=s(e=>e.replaceAll(S,n=>x.test(n)?"":n).replaceAll(N,`
2
-
3
- `),"cleanUnnecessaryComments"),d=new Map;function g(e,n,{identifierReplacements:r},a){const p=b(e);for(const t in r){const o=p.find(i=>i.specifier===t&&i.imports.includes("{"));if(!o){this.warn(`${n.fileName} does not import "${t}" for replacement`),process.exitCode=1;continue}const c=r[t];for(const i in c){if(!o.imports.includes(i))throw new Error(`${n.fileName} does not import "${i}" from "${t}" for replacement`);const f=c[i],u=A(i);f.includes(".")&&(e=e.replace(new RegExp(String.raw`\b\w+\b as ${u},?\s?`),"")),e=e.replaceAll(new RegExp(String.raw`\b${u}\b`,"g"),f)}}const m=I(Array.from(e.matchAll(k),t=>t[0]));if(m.length>0){const t=m.map(c=>`
4
- - ${c}`).join(""),o=n.fileName.replace(/\.[^/.]+$/,"");d.has(o)||a.warn({message:`${n.fileName} contains confusing identifier names${t}
5
-
6
- To replace these, add them to the "rollup -> patchTypes -> identifierReplacements" option in your packem config.`,prefix:"plugin:patch-types"}),d.set(o,!0)}return e}l(g,"I");s(g,"replaceConfusingTypeNames");const E=s((e,n)=>{if(n.leadingComments?.some(r=>r.type==="CommentBlock"&&r.value.includes("@internal"))){const r=e.original[n.end]===","?n.end+1:n.end;return e.remove(n.leadingComments[0].start,r),!0}return!1},"removeInternal");function h(e,n){if(e.includes("@internal")){const r=new T(e),a=$(e,{plugins:["typescript"],sourceType:"module"});if(y(a,{enter(p){E(r,p)&&this.skip()}}),e=r.toString(),e.includes("@internal"))throw new Error(`${n.fileName} has unhandled @internal declarations`)}return e}l(h,"P");s(h,"stripInternalTypes");const D=s((e,n)=>({name:"packem:patch-types",renderChunk(r,a){return r=g.call(this,r,a,e,n),r=h.call(this,r,a),r=R(r),r}}),"patchTypescriptTypes");export{D as patchTypescriptTypes};
@@ -1 +0,0 @@
1
- var c=Object.defineProperty;var u=(r,e)=>c(r,"name",{value:e,configurable:!0});import{w as f}from"./index-Dq8IUFTs.js";import m from"magic-string";var d=Object.defineProperty,w=u((r,e)=>d(r,"name",{value:e,configurable:!0}),"p");const y=w(r=>{const e=new Set(r.constructors.filter(t=>!t.includes(".")));return{name:"packem:pure-new-expression",transform:{handler(t){if(e.size===0)return;let i=!1;for(const a of e)if(t.includes(a)){i=!0;break}if(!i)return;let o;try{o=this.parse(t)}catch{return}if(!o)return;const s=new m(t);let p=!1;if(f(o,{enter(a){const n=a;n.type==="NewExpression"&&n.callee.type==="Identifier"&&e.has(n.callee.name)&&!n._rollupAnnotations?.some(l=>l.type==="pure")&&(s.prependLeft(n.start,"/* @__PURE__ */ "),p=!0)}}),!!p)return{code:s.toString(),map:r.sourcemap?s.generateMap({hires:!0}):void 0}},order:"post"}}},"pureNewExpressionPlugin");export{y as pureNewExpressionPlugin};
@@ -1 +0,0 @@
1
- var l=Object.defineProperty;var t=(e,r)=>l(e,"name",{value:r,configurable:!0});import{fileURLToPath as a}from"node:url";var i=Object.defineProperty,o=t((e,r)=>i(e,"name",{value:r,configurable:!0}),"r");const n=o(()=>({name:"packem:resolve-file-url",resolveId(e){if(e.startsWith("file://"))return a(e)}}),"resolveFileUrl");export{n as default};
@@ -1 +0,0 @@
1
- var b=Object.defineProperty;var d=(t,e)=>b(t,"name",{value:e,configurable:!0});import{isAbsolute as P,join as $,dirname as O,resolve as k}from"@visulima/path";import{isRelative as y}from"@visulima/path/utils";var j=Object.defineProperty,o=d((t,e)=>j(t,"name",{value:e,configurable:!0}),"o");const S=42,U=o(t=>{let e=!1;for(let s=0;s<t.length;s++)if(t.codePointAt(s)===S){if(e)return!1;e=!0}return!0},"hasZeroOrOneAsteriskCharacter"),W=o(t=>{const e=t.indexOf("*");return e===-1?void 0:{prefix:t.slice(0,e),suffix:t.slice(e+1)}},"tryParsePattern"),A=o(({prefix:t,suffix:e},s)=>s.length>=t.length+e.length&&s.startsWith(t)&&s.endsWith(e),"isPatternMatch"),T=o((t,e,s)=>{let i,r=-1;for(const f of t){const a=e(f);A(a,s)&&a.prefix.length>r&&(r=a.prefix.length,i=f)}return i},"findBestPatternMatch"),q=o((t,e)=>{const s=[];for(const i of t){if(!U(i))continue;const r=W(i);if(r)s.push(r);else if(i===e)return i}return T(s,i=>i,e)},"matchPatternOrExact"),B=o((t,e)=>e.substring(t.prefix.length,e.length-t.suffix.length),"matchedText"),R=o(({prefix:t,suffix:e})=>`${t}*${e}`,"patternText"),w=o((t,e,s)=>{let i=O(e.path);e.config.compilerOptions?.baseUrl&&(i=k(t,e.config.compilerOptions.baseUrl)),s?.debug({message:`Resolved baseUrl to ${i}`,prefix:"plugin:resolve-tsconfig-paths"});const r=e.config.compilerOptions?.paths??{};return Object.keys(r).length===0&&s?.debug({message:"No paths found in tsconfig.json",prefix:"plugin:resolve-tsconfig-paths"}),{paths:r,resolvedBaseUrl:i}},"getTsconfigPaths"),_=o((t,e,s,i)=>{const{paths:r,resolvedBaseUrl:f}=w(t,e,s),a=Object.keys(r);return{name:"plugin:resolve-tsconfig-paths",async resolveId(n,m,v){if(a.length===0)return;if(n.includes("\0")){s.debug({message:`Skipping resolution of ${n} as it is a virtual module`,prefix:"plugin:resolve-tsconfig-paths"});return}if(n.includes("node_modules")){s.debug({message:`Skipping request as it is inside node_modules ${n}`,prefix:"plugin:resolve-tsconfig-paths"});return}if(!i.resolveAbsolutePath&&P(n)){s.debug({message:`Skipping request as it is an absolute path ${n}`,prefix:"plugin:resolve-tsconfig-paths"});return}if(y(n)){s.debug({message:`Skipping request as it is a relative path ${n}`,prefix:"plugin:resolve-tsconfig-paths"});return}const l=q(a,n);if(!l){s.debug({message:`moduleName did not match any paths pattern ${n}`,prefix:"plugin:resolve-tsconfig-paths"});return}const u=typeof l=="string"?void 0:B(l,n),x=typeof l=="string"?l:R(l);for await(const c of r[x]){const p=u?c.replace("*",u):c;if(p.endsWith(".d.ts")||p.endsWith(".d.cts")||p.endsWith(".d.mts"))continue;const h=$(f,p);try{const g=await this.resolve(h,m,{skipSelf:!0,...v});if(g)return g}catch(g){s.debug({context:[g],message:`Failed to resolve ${h} from ${n}`,prefix:"plugin:resolve-tsconfig-paths"})}}}}},"resolveTsconfigPathsPlugin");export{_ as resolveTsconfigPathsPlugin};
@@ -1 +0,0 @@
1
- var v=Object.defineProperty;var a=(o,r)=>v(o,"name",{value:r,configurable:!0});import{join as d,resolve as p}from"@visulima/path";var g=Object.defineProperty,c=a((o,r)=>g(o,"name",{value:r,configurable:!0}),"u");const m=c((o,r)=>{if(!r)return;const{config:s,path:t}=r;if(!s.compilerOptions)return;const{rootDirs:e}=s.compilerOptions;if(!e)return;const n=[];for(const i of e){if(i.startsWith("."))throw new Error(`Invalid rootDir value '.' in ${t}.`);if(i.startsWith(".."))throw new Error(`Invalid rootDir value '..' in ${t}.`);n.push(p(o,i))}return n},"getRootDirectories"),w=c((o,r,s)=>{const t=m(o,s);return{name:"packem:resolve-tsconfig-root-dirs",async resolveId(e,n,i){if(!(t===void 0||t.length===0)&&e.startsWith("."))for(const l of t){const u=d(l,e),f=await this.resolve(u,n,{skipSelf:!0,...i});if(f)return r.debug({message:`Resolved ${e} to ${f.id} using rootDirs from tsconfig.json.`,prefix:"plugin:resolve-tsconfig-root-dirs"}),f.id}}}},"resolveTsconfigRootDirectories");export{w as default};
@@ -1 +0,0 @@
1
- var m=Object.defineProperty;var u=(e,t)=>m(e,"name",{value:t,configurable:!0});import{isAbsolute as p}from"node:path";var v=Object.defineProperty,l=u((e,t)=>v(e,"name",{value:t,configurable:!0}),"i");const d={".cjs":[".cts"],".js":[".ts",".tsx"],".jsx":[".tsx",".ts"],".mjs":[".mts"]},x=/\.(?:[mc]?js|jsx)$/,h=l(e=>{const t=e[0];return!(t==="."||t==="/"||t==="#"||p(e))},"isBareSpecifier"),w=l(()=>({name:"packem:resolve-typescript-mjs-cjs",async resolveId(e,t,j){if(!t)return;const n=x.exec(e);if(!n)return;const i=n[0],r=d[i];if(!r)return;const a=e.slice(0,-i.length),o={...j,skipSelf:!0};if(!h(e)&&!t.includes("/node_modules/")){for(const c of r){const s=await this.resolve(a+c,t,o);if(s)return s}return}const f=await this.resolve(e,t,o);if(f)return f;for(const c of r)try{const s=await this.resolve(a+c,t,o);if(s)return s}catch{}}}),"resolveTypescriptMjsCts");export{w as default};
@@ -1 +0,0 @@
1
- var s=Object.defineProperty;var t=(e,r)=>s(e,"name",{value:r,configurable:!0});import{createFilter as i}from"@rollup/pluginutils";import{transform as l}from"@swc/core";import{EXCLUDE_REGEXP as u}from"@visulima/packem-share/constants";var p=Object.defineProperty,d=t((e,r)=>p(e,"name",{value:r,configurable:!0}),"e");const w=d(({exclude:e,include:r,...c})=>{const n=i(r,e??u);return{name:"packem:swc",async transform(o,a){if(!n(a))return;const{code:f,map:m}=await l(o,{...c,configFile:!1,filename:a,swcrc:!1});return{code:f,map:m}}}},"swcPlugin");w.NAME="swc";export{w as default};
@@ -1,10 +0,0 @@
1
- import type { TransformOptions } from "@babel/core";
2
- import type { FilterPattern } from "@rollup/pluginutils";
3
- import type { Plugin } from "rollup";
4
- export interface BabelPluginConfig extends Omit<TransformOptions, "filename" | "sourceFileName" | "exclude" | "include"> {
5
- exclude?: FilterPattern;
6
- filename?: string;
7
- include?: FilterPattern;
8
- sourceFileName?: string;
9
- }
10
- export declare const babelTransformPlugin: ({ exclude, filename, generatorOpts, include, sourceFileName, ...transformOptions }: BabelPluginConfig) => Plugin;
@@ -1 +0,0 @@
1
- var y=Object.defineProperty;var g=(r,e)=>y(r,"name",{value:e,configurable:!0});import{transformAsync as A}from"@babel/core";import{createFilter as b}from"@rollup/pluginutils";import{EXCLUDE_REGEXP as h}from"@visulima/packem-share/constants";var x=Object.defineProperty,c=g((r,e)=>x(r,"name",{value:e,configurable:!0}),"a");const O=/\.tsx?$/,w=c(r=>{if(r)return r.find(e=>e==="babel-plugin-react-compiler"||Array.isArray(e)&&e[0]==="babel-plugin-react-compiler")},"getReactCompilerPlugin"),E=c((r,e)=>{if(!r||!Array.isArray(r)||r.length===0)return;const t=w(r),p=/['"]use memo['"]/;if(!(!t||!Array.isArray(t))&&t[1]?.compilationMode==="annotation"&&!p.test(e)){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}},"filterReactCompilerByAnnotation"),C=c(({exclude:r,filename:e,generatorOpts:t,include:p,sourceFileName:i,...n})=>{const d=b(p,r??h);return{name:"packem:babel",async transform(m,s){if(!d(s))return;let a=[];n.plugins&&Array.isArray(n.plugins)&&(a=[...n.plugins]),a.length>0&&E(a,m);const o=[];(s.endsWith(".jsx")||s.endsWith(".tsx"))&&o.push("jsx"),O.test(s)&&o.push("typescript");const u=n.parserOpts?.plugins;u&&Array.isArray(u)&&o.unshift(...u);const f=[...new Set(o)],l=await A(m,{...n,filename:e??s,generatorOpts:{...t,decoratorsBeforeExport:!0,importAttributesKeyword:"with"},parserOpts:{...n.parserOpts,allowAwaitOutsideFunction:!0,plugins:f.length>0?f:[],sourceType:"module"},plugins:a.length>0?a:[],sourceFileName:i??s});if(!(!l||!l.code))return{code:l.code,map:l.map||void 0}}}},"babelTransformPlugin");export{C as babelTransformPlugin};
@@ -1,11 +0,0 @@
1
- import type { FileCache } from "@visulima/packem-share/utils";
2
- import type { Plugin } from "rollup";
3
- /**
4
- * Wrap a Rollup plugin to add caching to various hooks.
5
- * @param plugin
6
- * @param cache
7
- * @param subDirectory
8
- * @returns
9
- */
10
- declare const cachePlugin: (plugin: Plugin, cache: FileCache, subDirectory?: string) => Plugin;
11
- export default cachePlugin;
@@ -1,8 +0,0 @@
1
- import type { ModuleInfo, PluginContext } from "rollup";
2
- interface ExportInfo {
3
- exportedName: string;
4
- id: string;
5
- sourceName: string;
6
- }
7
- declare const gatherExports: (context: PluginContext, module_: ModuleInfo) => AsyncGenerator<ExportInfo>;
8
- export default gatherExports;
@@ -1,4 +0,0 @@
1
- import type { ModuleInfo, PluginContext } from "rollup";
2
- import type { ParsedExportInfo } from "./types.d.ts";
3
- declare const parseExports: (context: PluginContext, module_: ModuleInfo) => Generator<ParsedExportInfo>;
4
- export default parseExports;
@@ -1,24 +0,0 @@
1
- export interface BarrelReExport {
2
- from: "other";
3
- source: string;
4
- type: "barrel";
5
- }
6
- export interface ExportBinding {
7
- exportedName: string;
8
- importedName: string;
9
- }
10
- export interface NamedReExport {
11
- bindings: ExportBinding[];
12
- from: "other";
13
- source: string;
14
- type: "named";
15
- }
16
- /**
17
- * Modified copy of https://github.com/cprecioso/rollup-plugin-chunk-per-export/blob/main/src/parse/types.ts
18
- */
19
- export interface NamedSelfExport {
20
- exportedName: string;
21
- from: "self";
22
- type: "named";
23
- }
24
- export type ParsedExportInfo = BarrelReExport | NamedReExport | NamedSelfExport;
@@ -1,23 +0,0 @@
1
- import type { Plugin } from "rollup";
2
- export type CopyPluginOptions = {
3
- /**
4
- * Copy items once. Useful in watch mode.
5
- * @default false
6
- */
7
- copyOnce?: boolean;
8
- exactFileNames?: boolean;
9
- /**
10
- * Remove the directory structure of copied files.
11
- * @default true
12
- */
13
- flatten?: boolean;
14
- targets: MultipleTargetsDesc;
15
- };
16
- type MultipleTargetsDesc = SingleTargetDesc | SingleTargetDesc[] | string[] | string;
17
- type SingleTargetDesc = {
18
- dest?: string;
19
- exclude?: string[] | string;
20
- src: string[] | string;
21
- };
22
- export declare const copyPlugin: (options: CopyPluginOptions, logger: Console) => Plugin;
23
- export {};
@@ -1 +0,0 @@
1
- var g=Object.defineProperty;var f=(c,a)=>g(c,"name",{value:a,configurable:!0});import{stat as x}from"node:fs/promises";import{readFile as h}from"@visulima/fs";import{arrayify as y}from"@visulima/packem-share/utils";import{normalize as b,join as u,relative as w,dirname as F,basename as A}from"@visulima/path";import P from"glob-parent";import{glob as $}from"tinyglobby";var v=Object.defineProperty,j=f((c,a)=>v(c,"name",{value:a,configurable:!0}),"f");const C=j((c,a)=>{const n=new Map,p={copyOnce:!0,exactFileNames:!0,flatten:!1,...c};let{targets:o}=p;return Array.isArray(o)?o=o.map(s=>{if(typeof s=="string")return{src:s};if(typeof s=="object"&&"src"in s)return s}).filter(Boolean):typeof o=="string"&&(o=[{src:o}]),{async buildStart(){const s=await Promise.all(o.flatMap(e=>Array.isArray(e.src)?e.src.map(r=>({...e,src:r})):e).map(async e=>await $(y(e.src),{ignore:y(e.exclude).filter(Boolean)}).then(r=>({dest:e.dest??"",parent:P(e.src),src:r}))));for(const e of s)for(const r of e.src){let i;n.has(r)?i=n.get(r):(i={copied:[],dest:[],timestamp:0},n.set(r,i));const t=p.flatten?b(e.dest):u(e.dest,w(e.parent,F(r)));i.dest.includes(t)||i.dest.push(t),this.addWatchFile(r)}a.info({message:"Copying files...",prefix:"plugin:copy"}),await Promise.all(Array.from(n,async([e,r])=>{let i;try{const t=await x(e);if(!t.isFile())return;const l=t.mtime.getTime();l>r.timestamp&&(r.timestamp=l,r.copied=[]),i=await h(e,{buffer:!0})}catch(t){a.error({context:[t],message:`error reading file ${e}`,prefix:"plugin:copy"});return}for(const t of r.dest){if(p.copyOnce&&r.copied.includes(t))continue;const l=A(e),m=u(t,l);try{this.emitFile({[p.exactFileNames?"fileName":"name"]:m,source:i,type:"asset"}),a.debug({message:`copied ${e} → ${m}`,prefix:"plugin:copy"}),r.copied.push(t)}catch(d){a.error({context:[d],message:`error copying file ${e} → ${m}`,prefix:"plugin:copy"})}}}))},name:"packem:copy"}},"copyPlugin");export{C as copyPlugin};
@@ -1,25 +0,0 @@
1
- import type { FilterPattern } from "@rollup/pluginutils";
2
- import type { Plugin } from "rollup";
3
- export type DataUriPluginOptions = {
4
- exclude?: FilterPattern;
5
- include?: FilterPattern;
6
- /** Encode spaces for use in srcset attribute */
7
- srcset?: boolean;
8
- };
9
- /**
10
- * Data URI plugin that converts files to data URIs for inline embedding.
11
- *
12
- * Query parameters:
13
- * - ?data-uri - Basic data URI conversion
14
- * - ?data-uri and encoding=css - Use CSS-optimized SVG encoding
15
- * - ?data-uri and encoding=tiny - Use tiny SVG encoding (default)
16
- * - ?data-uri and srcset - Encode spaces as %20 for srcset compatibility
17
- *
18
- * Examples:
19
- * - ./icon.svg?data-uri - Tiny SVG encoding
20
- * - ./icon.svg?data-uri and encoding=css - CSS-optimized SVG encoding
21
- * - ./icon.svg?data-uri and srcset - Tiny SVG with srcset compatibility
22
- * - ./icon.svg?data-uri and encoding=css and srcset - CSS encoding with srcset compatibility
23
- */
24
- export declare const dataUriPlugin: (options?: DataUriPluginOptions) => Plugin;
25
- export default dataUriPlugin;
@@ -1 +0,0 @@
1
- var p=Object.defineProperty;var c=(a,e)=>p(a,"name",{value:e,configurable:!0});import{createFilter as g}from"@rollup/pluginutils";import{readFile as u}from"@visulima/fs";import{svgToCssDataUri as h,svgToTinyDataUri as b}from"@visulima/packem-share";import{R as v}from"../packem_shared/index-QEzU3Fey.js";var x=Object.defineProperty,$=c((a,e)=>x(a,"name",{value:e,configurable:!0}),"l");const F=$((a={})=>{const e=g(a.include??[/\?data-uri/],a.exclude);return{async load(s){if(!e(s)||!s.includes("?data-uri"))return;const i=new URL(s,"file://"),t=i.pathname,f=i.searchParams.get("encoding")||"tiny",l=i.searchParams.has("srcset")||a.srcset;this.addWatchFile(t);const r=v.getType(t)||"application/octet-stream";if(r==="image/svg+xml"){const n=await u(t,{buffer:!1}),o=f==="css"?h(n):b(n);return`export default "${l?o.replaceAll(" ","%20"):o}"`}const d=await u(t,{buffer:!0}),m=Buffer.from(d).toString("base64");return`export default "${`${r.startsWith("text/")?`data:${r};charset=utf-8;base64,`:`data:${r};base64,`}${m}`}"`},name:"packem:data-uri"}},"dataUriPlugin");export{F as dataUriPlugin,F as default};
@@ -1,7 +0,0 @@
1
- import type { FilterPattern } from "@rollup/pluginutils";
2
- import type { Plugin } from "rollup";
3
- export interface DebarrelPluginOptions {
4
- include?: FilterPattern;
5
- possibleBarrelFiles?: (RegExp | string)[];
6
- }
7
- export declare const debarrelPlugin: (options: DebarrelPluginOptions, logger: Console) => Plugin;
@@ -1,2 +0,0 @@
1
- var I=Object.defineProperty;var $=(e,t)=>I(e,"name",{value:t,configurable:!0});import j from"node:fs/promises";import{createFilter as M}from"@rollup/pluginutils";import B from"magic-string";import*as E from"rs-module-lexer";var A=Object.defineProperty,d=$((e,t)=>A(e,"name",{value:t,configurable:!0}),"c");const D=/\.[mc]?tsx?(?:\?.*)?$/,O=/(?:\.(?:[tj]s|[tj]sx)|\/index\.(?:[tj]s|[tj]sx))(?:\?.*)?$/,k=/^\s*export/,z={exports:[],facade:!1,imports:[]},b=d(e=>D.test(e),"isSourceFile"),y=d(e=>e.includes("/build/cache/vite/")||e.includes("/node_modules/"),"isIgnoredModule"),K=d((e,t)=>y(e)?!1:O.test(e)?!0:t.possibleBarrelFiles?t.possibleBarrelFiles.some(r=>e.match(r)):!1,"isPossibleBarrelSpecifier"),N=d(e=>k.test(e)?"export":"import","getDeclarationKind"),{parseAsync:R}=E,C=d(async(e,t,r)=>{try{const{output:a}=await R({input:[{code:t,filename:e}]});return a[0]}catch(a){return r.debug({message:`Failed to parse ${e}:
2
- ${a instanceof Error?a.message:String(a)}`,prefix:"plugin:debarrel"}),z}},"safeParse"),T=d(async(e,t,r,a)=>{const s=e.parseCache.get(t);if(s!==void 0)return s;const i=await C(t,r,a);return e.parseCache.set(t,i),i},"parsePotentialBarrelFile"),P=d((e,t)=>{const r=e.fileCache.get(t);if(r!==void 0)return r;const a=j.readFile(t,"utf8");return e.fileCache.set(t,a),a},"readFileCached"),S=d(e=>{const t=/^(?:import|export)\s+([\w$]+)/,r=/([\w$]+)\s*,\s*\{|\}\s*,\s*([\w$]+)/,a=/[{,]\s*(type\s+)?([\w$]+)(?:\s+as\s+([\w$]+))?/gi;a.lastIndex=0;const s=[];if(e.includes("*"))return s;if(!e.includes("{")){const n=e.match(t);return n&&s.push({imported:"default",local:n[1]}),s}const i=e.match(r);i&&s.push({imported:"default",local:i[1]||i[2]});let o;for(;o=a.exec(e);)o[1]||o[2]&&s.push({imported:o[2],local:o[3]});return s},"getImportNames"),_=d((e,t,r)=>{let a=e.ln,s=t.find(i=>i.ss<e.s&&i.se>e.e&&i.d===-1);if(!s||!s.n){const i=a||r.slice(e.s).match(/default\s+([a-zA-Z_$][\w$]*)(?:;|\n|$)/)?.[1];i&&(s=t.find(o=>{const n=S(r.slice(o.ss,o.s)).find(l=>l.local===i);return n&&(a=n.imported),n}))}if(s&&!a){const i=r.slice(s.ss,e.s);if(!i.includes("*")){const o=i.match(/([\w$]+)\s*as\s*$/)?.[1];o&&(a=o)}}return{imp:s,localExportName:a}},"findMatchingImport"),v=d(async(e,t,r,a,s)=>{const{resolve:i}=e,o=await P(e,t),{exports:n,imports:l}=await T(e,t,o,s);for await(const c of n){const u=c.n;if(u!==r)continue;const f=_(c,l,o),{imp:p,localExportName:h}=f;if(!p||!p.n)return{exportName:r,id:t,resolved:!0};if(p.d>-1)return{exportName:r,id:t,resolved:!0};let g;const x=o.slice(p.ss,c.s);if(N(x)==="import"&&/\bas\b/.test(x)){const F=new RegExp(String.raw`(\w+)\s+as\s+${r}(?!\w)`);g=x.match(F)?.[0]}const w=(await i(p.n,t))?.id;return w?K(w,a)?v(e,w,h||u,a,s):{aliasedImportName:g,exportName:h||r,id:w,resolved:!1}:{aliasedImportName:g,exportName:h,id:t,resolved:!1}}const m=l.filter(c=>/^export\s+\*(?!\s+as)/.test(o.slice(c.ss,c.s)));if(m.length===1){const c=m[0]?.n,u=c?(await e.resolve(c,t))?.id:void 0;if(!u)return{exportName:r,id:t,resolved:!1};const f=await v(e,u,r,a,s);if(f.resolved)return f}else if(m.length>1){const c=(await Promise.all(m.map(async u=>{const f=u.n,p=f?(await e.resolve(f,t))?.id:void 0;if(p)return v(e,p,r,a,s)}))).find(u=>u?.resolved);if(c)return c}return{exportName:r,id:t,resolved:!1}},"resolveThroughBarrel"),J=d((e,t,r)=>{const{aliasedImportName:a,exportName:s}=e,i=t.local||t.imported;return a?`{${a}}`:s==="default"&&r!=="export"?i:`{${s!==i?`${s} as ${i}`:s}}`},"getDeclarationClause"),L=d(async(e,t,r,a,s)=>{const i=[],o=await P(e,t),{imports:n}=await C(t,o,s);return await Promise.all(n.map(async l=>{if(!l.n||l.d!==-1)return;const m=o.slice(l.ss,l.s),c=S(m);if(c.length===0)return;const u=(await e.resolve(l.n,t))?.id;if(!u||!b(u)||y(u))return;const f=N(m);try{const p=await Promise.all(c.map(async h=>{const g=await v(e,u,h.imported,a,s);if(!g)return;const x=J(g,h,f),w=JSON.stringify(g.id);return`${f} ${x} from ${w}`}));if(p.includes(void 0))return;i.push([l.ss,l.se,p.join(";")])}catch(p){s.warn({context:{error:p},message:String(p),prefix:"plugin:debarrel"})}})),i},"getDebarrelModifications"),X=d((e,t,r,a)=>{if(r.length===0)return;const s=new B(t,{filename:e});for(const[i,o,n]of r)s.update(i,o,n);return{code:s.toString(),map:a?s.generateMap({file:e}):void 0}},"applyModifications"),Q=d((e,t)=>{const r=new Map,a=new Map,s=d(()=>{r.clear(),a.clear()},"purgeCaches"),i=e.include?M(e.include,[]):void 0;let o=!0;return{buildEnd:s,buildStart:s,async load(n){const l=r.get(n);if(l)return await l},name:"packem:debarrel",options(n){(n.output&&(Array.isArray(n.output)?n.output[0]?.sourcemap:n?.output?.sourcemap))===!1&&(o=!1)},async transform(n,l){if(!b(l)||i&&!i(l))return;const m={fileCache:r,parseCache:a,resolve:this.resolve.bind(this)},c=await L(m,l,n,e,t);return X(l,n,c,o)},watchChange(n){r.delete(n),a.delete(n)}}},"debarrelPlugin");export{Q as debarrelPlugin};
@@ -1,2 +0,0 @@
1
- declare const browserslistToEsbuild: (browserList: string[]) => string[];
2
- export default browserslistToEsbuild;
@@ -1,3 +0,0 @@
1
- import type { TransformerFn as TransformerFunction } from "../../types.d.ts";
2
- declare const _default: TransformerFunction;
3
- export default _default;
@@ -1,39 +0,0 @@
1
- /**
2
- * Modified copy of https://github.com/egoist/rollup-plugin-esbuild/blob/dev/src/index.ts
3
- *
4
- * MIT License
5
- *
6
- * Copyright (c) 2020 EGOIST
7
- */
8
- import type { FilterPattern } from "@rollup/pluginutils";
9
- import type { BuildOptions as EsbuildOptions, Loader, TransformOptions } from "esbuild";
10
- type MarkOptional<Type, Keys extends keyof Type> = Type extends Type ? Omit<Type, Keys> & Partial<Pick<Type, Keys>> : never;
11
- export type EsbuildPluginConfig = Options & {
12
- logger: Console;
13
- };
14
- export type Optimized = Map<string, {
15
- file: string;
16
- }>;
17
- export type OptimizeDepsOptions = {
18
- cwd: string;
19
- esbuildOptions?: EsbuildOptions;
20
- exclude?: string[];
21
- include: string[];
22
- sourceMap: boolean;
23
- };
24
- export type OptimizeDepsResult = {
25
- cacheDir: string;
26
- optimized: Optimized;
27
- };
28
- export type Options = Omit<TransformOptions, "loader" | "sourcemap"> & {
29
- exclude?: FilterPattern;
30
- include?: FilterPattern;
31
- /**
32
- * Map extension to esbuild loader
33
- * Note that each entry (the extension) needs to start with a dot
34
- */
35
- loaders?: Record<string, Loader | false>;
36
- optimizeDeps?: MarkOptional<OptimizeDepsOptions, "cwd" | "sourceMap">;
37
- sourceMap?: boolean;
38
- };
39
- export {};
@@ -1,14 +0,0 @@
1
- /**
2
- * Modified copy of https://github.com/egoist/rollup-plugin-esbuild/blob/dev/src/minify.ts
3
- *
4
- * MIT License
5
- *
6
- * Copyright (c) 2020 EGOIST
7
- */
8
- import type { TransformOptions } from "esbuild";
9
- import type { Plugin } from "rollup";
10
- type Options = Omit<TransformOptions, "sourcemap"> & {
11
- sourceMap?: boolean;
12
- };
13
- declare const getRenderChunk: ({ sourceMap, ...options }: Options) => Plugin["renderChunk"];
14
- export default getRenderChunk;
@@ -1,3 +0,0 @@
1
- import type { OptimizeDepsOptions, OptimizeDepsResult } from "../types.d.ts";
2
- declare const optimizeDeps: (options: OptimizeDepsOptions) => Promise<OptimizeDepsResult>;
3
- export default optimizeDeps;
@@ -1,4 +0,0 @@
1
- import type { Message } from "esbuild";
2
- import type { PluginContext } from "rollup";
3
- declare const warn: (pluginContext: PluginContext, messages: Message[]) => Promise<void>;
4
- export default warn;
@@ -1,9 +0,0 @@
1
- import type { FilterPattern } from "@rollup/pluginutils";
2
- import type { PackageJson } from "@visulima/package";
3
- import type { Plugin } from "rollup";
4
- export declare const GLOBAL_REQUIRE_REGEX: RegExp;
5
- export interface EsmShimCjsSyntaxOptions {
6
- exclude?: FilterPattern;
7
- include?: FilterPattern;
8
- }
9
- export declare const esmShimCjsSyntaxPlugin: (packageJson: PackageJson, options: EsmShimCjsSyntaxOptions) => Plugin;
@@ -1,11 +0,0 @@
1
- var c=Object.defineProperty;var s=(e,r)=>c(e,"name",{value:r,configurable:!0});import{env as u}from"node:process";import{createFilter as l}from"@rollup/pluginutils";import p from"magic-string";import{findStaticImports as d}from"mlly";import{minVersion as f}from"semver";var S=Object.defineProperty,a=s((e,r)=>S(e,"name",{value:r,configurable:!0}),"t");const h=/(?:^|[^.\w'"`])require(\.resolve)?\(\s*([\w'"`])/,C=a((e,r)=>{if(u.INTERNAL_PACKEM_BUILD!=="1"&&(e.includes("// -- packem CommonJS __filename shim")||e.includes("// -- packem CommonJS __dirname shim")||e.includes("// -- packem CommonJS require shim")))return;let o=!1,m=!1,n=!1;if(e.includes("__filename")&&(o=!0),e.includes("__dirname")&&(m=!0),h.test(e)&&(n=!0),!o&&!m&&!n)return;const t=d(e).pop(),_=t?t.end:0,i=new p(e);return i.appendRight(_,r(o,m,n)),{code:i.toString(),map:i.generateMap()}},"CJSToESM"),j=a((e,r,o)=>{let m="";return(e||r)&&(m+=`import __cjs_url__ from "node:url"; // -- packem CommonJS __filename shim --
2
- `),r&&(m+=`import __cjs_path__ from "node:path"; // -- packem CommonJS __dirname shim --
3
- `),o&&(m+=`import __cjs_mod__ from "node:module"; // -- packem CommonJS require shim --
4
- `),(e||r)&&(m+=`const __filename = __cjs_url__.fileURLToPath(import.meta.url);
5
- `),r&&(m+=`const __dirname = __cjs_path__.dirname(__filename);
6
- `),o&&(m+=`const require = __cjs_mod__.createRequire(import.meta.url);
7
- `),m},"generateCJSShim"),J=a((e,r,o)=>{let m="";return o&&(m+=`import __cjs_mod__ from "node:module"; // -- packem CommonJS require shim --
8
- `),e&&(m+=`const __filename = import.meta.filename; // -- packem CommonJS __filename shim --
9
- `),r&&(m+=`const __dirname = import.meta.dirname; // -- packem CommonJS __dirname shim --
10
- `),o&&(m+=`const require = __cjs_mod__.createRequire(import.meta.url);
11
- `),m},"generateCJSShimNode20_11"),x=a((e,r)=>{const o=l(r.include,r.exclude);return{name:"packem:esm-shim-cjs-syntax",renderChunk(m,n,t){if(t.format==="es"&&o(n.fileName)){let _=j;if(e.engines?.node){const i=f(e.engines.node);i&&i.major>=20&&i.minor>=11&&(_=J)}return C(m,_)}}}},"esmShimCjsSyntaxPlugin");export{h as GLOBAL_REQUIRE_REGEX,x as esmShimCjsSyntaxPlugin};
@@ -1,35 +0,0 @@
1
- import type { LoggingFunction, SourceMapInput } from "rollup";
2
- /**
3
- * Options for the plugin.
4
- */
5
- type Options = {
6
- /**
7
- * Rollup's warning function.
8
- */
9
- warn?: LoggingFunction;
10
- };
11
- /**
12
- * Information about the code being processed.
13
- */
14
- interface CodeInfo {
15
- /**
16
- * The name of the file.
17
- */
18
- fileName: string;
19
- /**
20
- * A list of import specifiers in the file.
21
- */
22
- imports: string[];
23
- }
24
- /**
25
- * Main internal function to transform ES module default exports in .d.ts files to be CJS compatible.
26
- * @param code The code of the chunk.
27
- * @param info Information about the file (name, imports).
28
- * @param options Plugin options, including the warning function.
29
- * @returns An object with the transformed code and a null map, or undefined if no transformation occurs or an error happens.
30
- */
31
- declare const fixDtsDefaultCJSExports: (code: string, info: CodeInfo, options: Options) => {
32
- code: string;
33
- map: SourceMapInput | undefined;
34
- } | undefined;
35
- export default fixDtsDefaultCJSExports;
@@ -1,26 +0,0 @@
1
- import type { Plugin, RenderedChunk } from "rollup";
2
- export type FixDtsDefaultCjsExportsPluginOptions = {
3
- /**
4
- * A function to determine if a chunk should be processed by this plugin.
5
- * Defaults to processing .d.ts, .d.cts, or .d.mts files that are entry chunks and have exports.
6
- * @param info The Rollup RenderedChunk object.
7
- * @returns True if the chunk should be processed, false otherwise.
8
- */
9
- matcher?: (info: RenderedChunk) => boolean;
10
- };
11
- /**
12
- * A Rollup plugin to fix default exports in TypeScript declaration files (.d.ts)
13
- * to ensure they are CJS compatible (using `export = ...` and namespaces).
14
- * This is particularly useful for libraries that want to support both ESM and CJS consumers correctly.
15
- *
16
- * The plugin handles various scenarios:
17
- * - `export { MyClass as default };`
18
- * - `export { default } from 'some-module';`
19
- * - `export { name as default } from 'some-module';`
20
- * - `export default from 'some-module';` (an mlly quirk)
21
- * - Combinations with named exports (value and type exports), creating namespaces where appropriate.
22
- * - Pure type-only exports like `export { type Foo, type Bar };`
23
- * @param options Optional configuration for the plugin.
24
- * @returns The Rollup plugin object.
25
- */
26
- export declare const fixDtsDefaultCjsExportsPlugin: (options?: FixDtsDefaultCjsExportsPluginOptions) => Plugin;
@@ -1,26 +0,0 @@
1
- var N=Object.defineProperty;var E=(r,t)=>N(r,"name",{value:t,configurable:!0});import y from"magic-string";import{findExports as j,findStaticImports as I,parseStaticImport as A}from"mlly";import{parseSync as C}from"oxc-parser";var T=Object.defineProperty,g=E((r,t)=>T(r,"name",{value:t,configurable:!0}),"h");const _=g((r,t,a)=>{const i=j(r).find(e=>e.names?.includes("default")),o=r.match(/^export\s+default\s+(\w+);/m);if(o&&o[1])return{defaultAlias:o[1],defaultExport:{code:o[0],end:o.index===void 0?void 0:o.index+o[0].length,names:["default"],specifier:void 0,start:o.index,type:"default"},exports:[]};if(!i)return;const p=i.code.match(/export\s*\{([^}]*)\}/);if(!p?.length){a.warn?.(`A default export was indicated in ${t.fileName}, but its structure could not be parsed.`);return}let l;const c=[];for(const e of p[1].split(",").map(n=>n.trim())){if(e==="default"){l=e;continue}const n=e.match(/\s*as\s+default\s*/);n?l=e.replace(n[0],""):c.push(e)}if(!l){a.warn?.(`A default export was indicated in ${t.fileName}, but its alias could not be determined from the export statement.`);return}return{defaultAlias:l,defaultExport:i,exports:c}},"extractExports"),k=g((r,t,a)=>{if("declarations"in t&&t.declarations.length>0){const i=t.declarations[0];if(i&&i.id.type==="Identifier"){r.set(i.id.name,{declare:t.declare===!0,end:t.end,isVariable:!0,start:t.start});return}}if("id"in t&&t.id&&t.id.type==="Identifier"){const{name:i}=t.id;r.set(i,{declare:t.declare===!0,end:t.end,isClass:t.type==="ClassDeclaration",start:t.start});return}r.set(a(),{declare:t.declare===!0,end:t.end,start:t.start})},"prepareDeclaration"),D=g((r,t,a,i)=>{const o=C(a.fileName,r,{astType:"ts",lang:"ts",sourceType:"module"});let p,l=0;const c=g(()=>(l+=1,`__unnamed_${l}$$`),"generateUnnamed"),e=new Map,n=new Map,{program:m}=o;for(const s of m.body)if(s.type==="ExportNamedDeclaration")for(const f of s.specifiers)f.exported.type==="Identifier"&&(f.exported.name==="default"?f.local.type==="Identifier"&&(p={end:f.end,local:f.local.name,start:f.start}):f.exported.type==="Identifier"&&n.set(f.exported.name,{type:f.exportKind==="type"}));else{if(s.type==="ImportDeclaration")continue;switch(s.type){case"ClassDeclaration":case"FunctionDeclaration":case"TSDeclareFunction":case"TSEnumDeclaration":case"TSInterfaceDeclaration":case"TSTypeAliasDeclaration":case"VariableDeclaration":{k(e,s,c);break}case"TSImportEqualsDeclaration":case"TSModuleDeclaration":{e.set(c(),{declare:!1,end:s.end,start:s.start});break}}}const x=[];if(p)for(const[s,f]of n.entries())s!==p.local&&f.type&&x.push(s);if(!p){const s=[...n.values()].every(f=>f.type);return t.startsWith("export type")&&n.size>0&&s||i.warn?.(`Cannot infer default export from the file: ${a.fileName}`),t}if(!e.get(p.local))return i.warn?.(`Cannot infer default export from the file: ${a.fileName}. Declaration for '${p.local}' not found.`),t;const u=t,d=new y(`${u}
2
- declare namespace ${p.local} {
3
- `);for(const[s,f]of e.entries()){if(x.includes(s)&&s!==p.local)continue;const h=r.slice(f.start,f.end).replace(/\s+\}$/," }");d.append(" "),f.declare?d.append(h.replace("declare","export").replaceAll(" "," ")):d.append(`export ${h}`.replaceAll(" "," ")),d.append(`
4
- `)}return d.append(` import _default = ${p.local};
5
- export { _default as default };
6
- `),d.append(`}
7
- export = ${p.local};
8
- `),d.toString()},"createCjsNamespace"),v=g((r,t,a)=>{const{defaultExport:i,exports:o}=t;if(a){let x="";x=o.length===0?`export = ${a.defaultImport};`:`// @ts-ignore
9
- export = ${a.defaultImport};
10
- export { ${o.join(", ")} } from '${i.specifier}'`;const u=r.replace(i.code.replace(/;$/,""),x.replace(/;$/,""));return u.endsWith(";")?u:`${u};`}const p=`import _default from '${i.specifier}';`,l=new y(r),c=I(r),e=c.length>0?c.at(-1):void 0;e?.end!==void 0&&e.end>0?l.appendRight(e.end,`
11
- ${p}
12
- `):l.prepend(`${p}
13
- `);let n=l.toString();n=n.replaceAll(/(\r?\n\s*){2,}/g,`
14
- `);let m;if(o.length===0)m=n.replace(i.code.replace(/;$/,""),"export = _default");else{const x=`// @ts-ignore
15
- export = _default;
16
- export { ${o.join(", ")} } from '${i.specifier}';`;m=n.replace(i.code.replace(/;$/,""),x)}return m.replaceAll(";;",";")},"handleDefaultCJSExportAsDefault"),M=g((r,t,a,i,o,p)=>{const{defaultAlias:l,defaultExport:c,exports:e}=a;if(p){if(p.namedImports?.[l]===l){if(e.length===0)return r.replace(c.code,`export = ${l}`);const d=`export { ${e.join(", ")} } from '${c.specifier}'`,s=new y(r).replace(c.code,d).toString();return D(r,s,t,o)}o.warn?.(`Cannot parse "${l}" named export from ${p.specifier} import at ${t.fileName}!.`);return}const n=`import { ${l} } from '${c.specifier}';
17
- `;let m=r;const x=i.length>0?i.at(-1)?.end??0:0,u=new y(m);if(x>0?u.appendRight(x,`
18
- ${n}`):u.prepend(n),m=u.toString(),e.length>0){const d=`export { ${e.join(", ")} } from '${c.specifier}'`,s=new y(m).replace(c.code,d).toString();return D(r,s,t,o)}return new y(m).replace(c.code,`export = ${l}`).toString()},"handleDefaultNamedCJSExport"),S=g((r,t,{defaultAlias:a,defaultExport:i,exports:o},p)=>{const l=o.filter(e=>/^type\s+/.test(e)),c=o.filter(e=>!/^type\s+/.test(e));if(l.length>0){let e="";return a&&(e+=`// @ts-ignore
19
- ${a};
20
- `),e+=`export type { ${l.map(n=>n.replace(/^type\s+/,"").trim()).join(", ")} };
21
- `,c.length>0&&(e+=`export { ${c.join(", ")} };
22
- `),D(r,e.trim(),t,p)}if(a&&c.length>0&&l.length===0){let e=`// @ts-ignore
23
- ${a};
24
- `;return e+=`export { ${c.join(", ")} };
25
- `,D(r,e.trim(),t,p)}if(a&&c.length===0&&l.length===0){const e=new RegExp(String.raw`^export\\s+default\\s+${a};`,"m"),n=r.match(e);return n?`${r.slice(0,Math.max(0,n.index??0))}export = ${a};`:r.replace(i.code,`export = ${a};`).replace(";;",";")}},"handleNoSpecifierDefaultCJSExport"),P=/^export\s+default\s+from\s+['"]([^'"]+)['"];?$/m,J=g((r,t,a)=>{const i=r.match(P);if(i)return{code:`import _default from '${i[1]}';
26
- export = _default;`,map:void 0};const o=_(r,t,a);if(o){let e;if(o.defaultExport.specifier){const{specifier:n}=o.defaultExport,m=I(r),x=m.filter($=>$.imports).map($=>A($)),u=x.find($=>$.specifier===n),{defaultAlias:d,defaultExport:s,exports:f}=o,h=s.exports;if(d==="default"&&s.specifier&&f.length>0)e=v(r,o,u);else if(d==="default"&&s.specifier&&f.length===0&&h&&/\bas\s+default\b/.test(h))x.find($=>$.specifier===s.specifier)?.defaultImport?e=v(r,o,u):(a.warn?.(`Cannot parse default export name from ${s.specifier} import at ${t.fileName}!. The module might not have a default export, or it's aliased as 'default'.`),e=void 0);else if(d==="default"&&s.specifier&&f.length===0)e=v(r,o,u);else if(s.specifier&&d!=="default"){e=M(r,t,o,m,a,u);const $=u&&o.defaultExport.specifier&&d!=="default"&&(!u.namedImports||u.namedImports[d]!==d);if(!(e===void 0&&$)&&e===void 0&&!(d==="default"&&f.length===0&&h&&/\bas\s+default\b/.test(h))){const w=S(r,t,o,a);w&&(e=w)}}}else e=S(r,t,o,a);return e?{code:e,map:void 0}:void 0}const p=C(t.fileName,r,{astType:"ts",lang:"ts",sourceType:"module"});let l=[],c=!1;if(p.program.body.length>0){const e=p.program.body.at(-1);e?.type==="ExportNamedDeclaration"&&!e.declaration&&e.specifiers.length>0&&e.specifiers.every(n=>n.exportKind==="type")&&(c=!0,l=e.specifiers.map(n=>n.local.type==="Identifier"?n.local.name:"").filter(Boolean))}if(c&&l.length>0){const e=`export type { ${l.join(", ")} };`,n=D(r,e,t,a);return n?{code:n,map:void 0}:void 0}},"fixDtsDefaultCJSExports");var R=Object.defineProperty,b=E((r,t)=>R(r,"name",{value:t,configurable:!0}),"n");const W=b((r={})=>{const{matcher:t=b(a=>(a.type==="chunk"||a.type==="asset")&&a.exports?.length>0&&/\.d\.c?ts$/.test(a.fileName)&&a.isEntry,"matcher")}=r;return{name:"packem:fix-dts-default-cjs-exports-plugin",renderChunk(a,i){return t(i)?J(a,{fileName:i.fileName,imports:i.imports},{warn:this.warn}):void 0}}},"fixDtsDefaultCjsExportsPlugin");export{W as fixDtsDefaultCjsExportsPlugin};
@@ -1,3 +0,0 @@
1
- import type { Plugin } from "rollup";
2
- declare const fixDynamicImportExtension: () => Plugin;
3
- export default fixDynamicImportExtension;
@@ -1,2 +0,0 @@
1
- import type { Plugin } from "rollup";
2
- export declare const importAttributesPlugin: () => Plugin;