stackscan 0.1.6

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 (369) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +222 -0
  3. package/dist/add.d.mts +3 -0
  4. package/dist/add.d.ts +3 -0
  5. package/dist/add.js +83 -0
  6. package/dist/add.mjs +7 -0
  7. package/dist/batch-import.d.mts +6 -0
  8. package/dist/batch-import.d.ts +6 -0
  9. package/dist/batch-import.js +5724 -0
  10. package/dist/batch-import.mjs +12 -0
  11. package/dist/chunk-22J2UHU7.mjs +1980 -0
  12. package/dist/chunk-2KG7JDHY.mjs +19 -0
  13. package/dist/chunk-2O2NMD7M.mjs +127 -0
  14. package/dist/chunk-3HEYJTUE.mjs +157 -0
  15. package/dist/chunk-3LPZV7KA.mjs +15 -0
  16. package/dist/chunk-3O2C34CJ.mjs +174 -0
  17. package/dist/chunk-3R4TXOZA.mjs +179 -0
  18. package/dist/chunk-3RJHZIII.mjs +174 -0
  19. package/dist/chunk-3XKWCBY6.mjs +105 -0
  20. package/dist/chunk-4OMBB3R6.mjs +52 -0
  21. package/dist/chunk-4THN5TT4.mjs +185 -0
  22. package/dist/chunk-4WCVZS6B.mjs +178 -0
  23. package/dist/chunk-5MNAT56X.mjs +23 -0
  24. package/dist/chunk-5VH7N3X6.mjs +109 -0
  25. package/dist/chunk-6A4WEZDZ.mjs +14 -0
  26. package/dist/chunk-6MIRBLO4.mjs +15 -0
  27. package/dist/chunk-6RCTNUF4.mjs +17 -0
  28. package/dist/chunk-7F4KWGMM.mjs +45 -0
  29. package/dist/chunk-7KF2HEU2.mjs +56 -0
  30. package/dist/chunk-7KONWCSX.mjs +15 -0
  31. package/dist/chunk-7TIXAYVC.mjs +10122 -0
  32. package/dist/chunk-ADMVFPX7.mjs +150 -0
  33. package/dist/chunk-AFJCX5SK.mjs +22 -0
  34. package/dist/chunk-ATNEVZPV.mjs +25 -0
  35. package/dist/chunk-BBP27ZGZ.mjs +4841 -0
  36. package/dist/chunk-BGT3PANW.mjs +64 -0
  37. package/dist/chunk-BJIQZNKU.mjs +184 -0
  38. package/dist/chunk-BKQW4ZNZ.mjs +19 -0
  39. package/dist/chunk-BMQTYZOD.mjs +144 -0
  40. package/dist/chunk-CZADURZD.mjs +674 -0
  41. package/dist/chunk-D2DOGM2Y.mjs +19 -0
  42. package/dist/chunk-D32C3FU6.mjs +45 -0
  43. package/dist/chunk-D6FFDX4P.mjs +158 -0
  44. package/dist/chunk-DUAFJVBN.mjs +44 -0
  45. package/dist/chunk-E24PAHCZ.mjs +146 -0
  46. package/dist/chunk-E3OD2BXY.mjs +14 -0
  47. package/dist/chunk-E4K5XYFI.mjs +210767 -0
  48. package/dist/chunk-EH2SEQZP.mjs +10119 -0
  49. package/dist/chunk-EH4FWTP5.mjs +21 -0
  50. package/dist/chunk-EOKQCSHI.mjs +10 -0
  51. package/dist/chunk-EQ4WRCPP.mjs +16 -0
  52. package/dist/chunk-EYXTSAAW.mjs +64 -0
  53. package/dist/chunk-F6Z4WXOF.mjs +146 -0
  54. package/dist/chunk-FM5BCBKT.mjs +77 -0
  55. package/dist/chunk-GXKIDBAX.mjs +146 -0
  56. package/dist/chunk-H6HA3IZE.mjs +1980 -0
  57. package/dist/chunk-H7WNQ3SS.mjs +23 -0
  58. package/dist/chunk-HBJEQ63D.mjs +205 -0
  59. package/dist/chunk-HTTDBNRT.mjs +146 -0
  60. package/dist/chunk-HYUKJUPF.mjs +177 -0
  61. package/dist/chunk-IFEEO473.mjs +49 -0
  62. package/dist/chunk-IILZ43EE.mjs +25 -0
  63. package/dist/chunk-ITGRHGUT.mjs +158 -0
  64. package/dist/chunk-J5JVDMED.mjs +45 -0
  65. package/dist/chunk-JH3SW4KH.mjs +4896 -0
  66. package/dist/chunk-JHVWSHNY.mjs +32 -0
  67. package/dist/chunk-JLFOQXQG.mjs +26 -0
  68. package/dist/chunk-K4BNSVJP.mjs +16 -0
  69. package/dist/chunk-KCDUZXVN.mjs +157 -0
  70. package/dist/chunk-KMDEPBKS.mjs +685 -0
  71. package/dist/chunk-L4AQWDD2.mjs +92 -0
  72. package/dist/chunk-L7I4UC35.mjs +158 -0
  73. package/dist/chunk-LB3L25FS.mjs +1980 -0
  74. package/dist/chunk-LDA354A3.mjs +158 -0
  75. package/dist/chunk-LSUI3VI4.mjs +19 -0
  76. package/dist/chunk-MB2X3DXF.mjs +45 -0
  77. package/dist/chunk-MBL4CIFG.mjs +28 -0
  78. package/dist/chunk-MLAUEAUQ.mjs +27 -0
  79. package/dist/chunk-NGEKE4DQ.mjs +23 -0
  80. package/dist/chunk-NJ4FK5BO.mjs +19 -0
  81. package/dist/chunk-OJZZPNXQ.mjs +1985 -0
  82. package/dist/chunk-P24PKCUA.mjs +25 -0
  83. package/dist/chunk-PFQIKEIL.mjs +15 -0
  84. package/dist/chunk-Q5ASM7HE.mjs +45 -0
  85. package/dist/chunk-Q7X2R7N7.mjs +16 -0
  86. package/dist/chunk-QAIJCQWH.mjs +157 -0
  87. package/dist/chunk-QQAUZGVG.mjs +2166 -0
  88. package/dist/chunk-QUIF3FJ2.mjs +55 -0
  89. package/dist/chunk-RDFZ4GVM.mjs +23 -0
  90. package/dist/chunk-RFRKMUNA.mjs +49 -0
  91. package/dist/chunk-RIIQA6S6.mjs +2204 -0
  92. package/dist/chunk-SGOSAU2P.mjs +51 -0
  93. package/dist/chunk-SLYSEMYE.mjs +21 -0
  94. package/dist/chunk-SNKLZ7VB.mjs +36 -0
  95. package/dist/chunk-TKKUEAN6.mjs +45 -0
  96. package/dist/chunk-TMH7EUXF.mjs +179 -0
  97. package/dist/chunk-TP55TF47.mjs +1980 -0
  98. package/dist/chunk-U4AFTAZI.mjs +1980 -0
  99. package/dist/chunk-U4EXCWGR.mjs +174 -0
  100. package/dist/chunk-U4OINWJM.mjs +42 -0
  101. package/dist/chunk-U63TGBAS.mjs +179 -0
  102. package/dist/chunk-UESFH6US.mjs +210773 -0
  103. package/dist/chunk-UITLHBZA.mjs +164 -0
  104. package/dist/chunk-VFD26CTJ.mjs +16 -0
  105. package/dist/chunk-VSWWWPO7.mjs +205 -0
  106. package/dist/chunk-VUVPGH7A.mjs +157 -0
  107. package/dist/chunk-W34IFT2J.mjs +45 -0
  108. package/dist/chunk-WPSGF5DK.mjs +92 -0
  109. package/dist/chunk-WPU2XV5B.mjs +25 -0
  110. package/dist/chunk-WTPR7TOE.mjs +146 -0
  111. package/dist/chunk-X3ATBJ5Q.mjs +14 -0
  112. package/dist/chunk-XMZATJRD.mjs +23 -0
  113. package/dist/chunk-Y2Y225MR.mjs +117 -0
  114. package/dist/chunk-YNDKJ5QJ.mjs +89 -0
  115. package/dist/chunk-YPQNYUP3.mjs +92 -0
  116. package/dist/chunk-ZH22D4SN.mjs +179 -0
  117. package/dist/chunk-ZSJJGBQR.mjs +39 -0
  118. package/dist/chunk-ZSMMBZHO.mjs +64 -0
  119. package/dist/chunk-ZTXCA3NN.mjs +74 -0
  120. package/dist/chunk-ZYMQR24Z.mjs +145 -0
  121. package/dist/cli.d.mts +1 -0
  122. package/dist/cli.d.ts +1 -0
  123. package/dist/cli.js +5770 -0
  124. package/dist/cli.mjs +25 -0
  125. package/dist/config.d.mts +5 -0
  126. package/dist/config.d.ts +5 -0
  127. package/dist/config.js +41 -0
  128. package/dist/config.mjs +7 -0
  129. package/dist/defaults.d.mts +3 -0
  130. package/dist/defaults.d.ts +3 -0
  131. package/dist/defaults.js +47 -0
  132. package/dist/defaults.mjs +7 -0
  133. package/dist/detectors/ci.d.mts +5 -0
  134. package/dist/detectors/ci.d.ts +5 -0
  135. package/dist/detectors/ci.js +59 -0
  136. package/dist/detectors/ci.mjs +7 -0
  137. package/dist/detectors/docker.d.mts +5 -0
  138. package/dist/detectors/docker.d.ts +5 -0
  139. package/dist/detectors/docker.js +50 -0
  140. package/dist/detectors/docker.mjs +7 -0
  141. package/dist/detectors/next.d.mts +7 -0
  142. package/dist/detectors/next.d.ts +7 -0
  143. package/dist/detectors/next.js +49 -0
  144. package/dist/detectors/next.mjs +7 -0
  145. package/dist/detectors/prisma.d.mts +7 -0
  146. package/dist/detectors/prisma.d.ts +7 -0
  147. package/dist/detectors/prisma.js +48 -0
  148. package/dist/detectors/prisma.mjs +7 -0
  149. package/dist/import.d.mts +2 -0
  150. package/dist/import.d.ts +2 -0
  151. package/dist/import.js +2062 -0
  152. package/dist/import.mjs +53 -0
  153. package/dist/output.d.mts +7 -0
  154. package/dist/output.d.ts +7 -0
  155. package/dist/output.js +3619 -0
  156. package/dist/output.mjs +13 -0
  157. package/dist/scan.d.mts +7 -0
  158. package/dist/scan.d.ts +7 -0
  159. package/dist/scan.js +5725 -0
  160. package/dist/scan.mjs +12 -0
  161. package/dist/scanner.d.mts +5 -0
  162. package/dist/scanner.d.ts +5 -0
  163. package/dist/scanner.js +5514 -0
  164. package/dist/scanner.mjs +14 -0
  165. package/dist/simple-icons-hex.d.mts +6751 -0
  166. package/dist/simple-icons-hex.d.ts +6751 -0
  167. package/dist/simple-icons-hex.js +10118 -0
  168. package/dist/simple-icons-hex.mjs +6736 -0
  169. package/dist/sync.d.mts +7 -0
  170. package/dist/sync.d.ts +7 -0
  171. package/dist/sync.js +5725 -0
  172. package/dist/sync.mjs +160 -0
  173. package/dist/techDefinitions.d.mts +5 -0
  174. package/dist/techDefinitions.d.ts +5 -0
  175. package/dist/techDefinitions.js +2004 -0
  176. package/dist/techDefinitions.mjs +7 -0
  177. package/dist/techMap.d.mts +5 -0
  178. package/dist/techMap.d.ts +5 -0
  179. package/dist/techMap.js +2018 -0
  180. package/dist/techMap.mjs +8 -0
  181. package/dist/types.d.mts +24 -0
  182. package/dist/types.d.ts +24 -0
  183. package/dist/types.js +18 -0
  184. package/dist/types.mjs +1 -0
  185. package/dist/typescript-7Q5RIVZY.mjs +6 -0
  186. package/dist/typescript-T5HXSZZS.mjs +5 -0
  187. package/dist/watch.d.mts +3 -0
  188. package/dist/watch.d.ts +3 -0
  189. package/dist/watch.js +2122 -0
  190. package/dist/watch.mjs +13 -0
  191. package/package.json +57 -0
  192. package/public/assets/logos/ai/huggingface.svg +1 -0
  193. package/public/assets/logos/ai/langchain.svg +1 -0
  194. package/public/assets/logos/ai/openai.svg +1 -0
  195. package/public/assets/logos/ai/replicate.svg +1 -0
  196. package/public/assets/logos/ai/tensorflow.svg +1 -0
  197. package/public/assets/logos/api/apollographql.svg +1 -0
  198. package/public/assets/logos/api/graphql.svg +1 -0
  199. package/public/assets/logos/api/relay.svg +1 -0
  200. package/public/assets/logos/api/trpc.svg +1 -0
  201. package/public/assets/logos/auth/argo.svg +1 -0
  202. package/public/assets/logos/auth/auth0.svg +1 -0
  203. package/public/assets/logos/auth/authjs.svg +73 -0
  204. package/public/assets/logos/auth/clerk.svg +1 -0
  205. package/public/assets/logos/auth/firebase.svg +1 -0
  206. package/public/assets/logos/auth/jsonwebtokens.svg +1 -0
  207. package/public/assets/logos/auth/keycloak.svg +1 -0
  208. package/public/assets/logos/auth/passport.svg +1 -0
  209. package/public/assets/logos/automation/lerna.svg +1 -0
  210. package/public/assets/logos/automation/nx.svg +1 -0
  211. package/public/assets/logos/automation/turborepo.svg +1 -0
  212. package/public/assets/logos/backend/adonisjs.svg +1 -0
  213. package/public/assets/logos/backend/express.svg +1 -0
  214. package/public/assets/logos/backend/fastify.svg +1 -0
  215. package/public/assets/logos/backend/koa.svg +1 -0
  216. package/public/assets/logos/backend/nestjs.svg +1 -0
  217. package/public/assets/logos/build/babel.svg +1 -0
  218. package/public/assets/logos/build/esbuild.svg +1 -0
  219. package/public/assets/logos/build/rollupdotjs.svg +1 -0
  220. package/public/assets/logos/build/snowpack.svg +1 -0
  221. package/public/assets/logos/build/swc.svg +1 -0
  222. package/public/assets/logos/build/vite.svg +15 -0
  223. package/public/assets/logos/build/webpack.svg +1 -0
  224. package/public/assets/logos/ci/circleci.svg +1 -0
  225. package/public/assets/logos/ci/githubactions.svg +1 -0
  226. package/public/assets/logos/ci/gitlab.svg +1 -0
  227. package/public/assets/logos/ci/jenkins.svg +1 -0
  228. package/public/assets/logos/ci/travisci.svg +1 -0
  229. package/public/assets/logos/cloud/cloudflare.svg +1 -0
  230. package/public/assets/logos/cloud/googlecloud.svg +1 -0
  231. package/public/assets/logos/cloud/microsoftazure.svg +1 -0
  232. package/public/assets/logos/cms/contentful.svg +1 -0
  233. package/public/assets/logos/cms/directus.svg +1 -0
  234. package/public/assets/logos/cms/ghost.svg +1 -0
  235. package/public/assets/logos/cms/keystone.svg +1 -0
  236. package/public/assets/logos/cms/sanity.svg +1 -0
  237. package/public/assets/logos/cms/shopify.svg +1 -0
  238. package/public/assets/logos/cms/strapi.svg +1 -0
  239. package/public/assets/logos/cms/wordpress.svg +1 -0
  240. package/public/assets/logos/container/docker.svg +1 -0
  241. package/public/assets/logos/container/kubernetes.svg +1 -0
  242. package/public/assets/logos/css/antdesign.svg +1 -0
  243. package/public/assets/logos/css/bootstrap.svg +1 -0
  244. package/public/assets/logos/css/bulma.svg +1 -0
  245. package/public/assets/logos/css/chakraui.svg +1 -0
  246. package/public/assets/logos/css/daisyui.svg +1 -0
  247. package/public/assets/logos/css/fallback/mantine-logo.svg +1 -0
  248. package/public/assets/logos/css/fallback/shadcnui.svg +1 -0
  249. package/public/assets/logos/css/foundation.svg +1 -0
  250. package/public/assets/logos/css/headlessui.svg +1 -0
  251. package/public/assets/logos/css/less.svg +1 -0
  252. package/public/assets/logos/css/mui.svg +1 -0
  253. package/public/assets/logos/css/postcss.svg +1 -0
  254. package/public/assets/logos/css/radixui.svg +1 -0
  255. package/public/assets/logos/css/sass.svg +1 -0
  256. package/public/assets/logos/css/shadcnui.svg +1 -0
  257. package/public/assets/logos/css/styledcomponents.svg +1 -0
  258. package/public/assets/logos/css/tailwindcss.svg +1 -0
  259. package/public/assets/logos/database/amazondynamodb.svg +1 -0
  260. package/public/assets/logos/database/apachecassandra.svg +1 -0
  261. package/public/assets/logos/database/cockroachlabs.svg +1 -0
  262. package/public/assets/logos/database/duckdb.svg +1 -0
  263. package/public/assets/logos/database/elasticsearch.svg +1 -0
  264. package/public/assets/logos/database/fauna.svg +3 -0
  265. package/public/assets/logos/database/mariadb.svg +1 -0
  266. package/public/assets/logos/database/mongodb.svg +1 -0
  267. package/public/assets/logos/database/mysql.svg +1 -0
  268. package/public/assets/logos/database/planetscale.svg +1 -0
  269. package/public/assets/logos/database/postgresql.svg +1 -0
  270. package/public/assets/logos/database/redis.svg +1 -0
  271. package/public/assets/logos/database/sqlite.svg +1 -0
  272. package/public/assets/logos/database/supabase.svg +1 -0
  273. package/public/assets/logos/database/surrealdb.svg +1 -0
  274. package/public/assets/logos/devops/ansible.svg +1 -0
  275. package/public/assets/logos/devops/pulumi.svg +1 -0
  276. package/public/assets/logos/devops/serverless.svg +1 -0
  277. package/public/assets/logos/devops/terraform.svg +1 -0
  278. package/public/assets/logos/fallback/31557565.svg +32 -0
  279. package/public/assets/logos/fallback/Drizzle--Streamline-Simple-Icons.svg +7 -0
  280. package/public/assets/logos/fallback/changesets.svg +43 -0
  281. package/public/assets/logos/fallback/lemonsqueezy.svg +8 -0
  282. package/public/assets/logos/fallback/mantine-logo.svg +1 -0
  283. package/public/assets/logos/fallback/reactquery.svg +12 -0
  284. package/public/assets/logos/fallback/shadcnui.svg +21 -0
  285. package/public/assets/logos/fallback/stitches.svg +10 -0
  286. package/public/assets/logos/format/prettier.svg +1 -0
  287. package/public/assets/logos/frontend/alpinedotjs.svg +1 -0
  288. package/public/assets/logos/frontend/angular.svg +1 -0
  289. package/public/assets/logos/frontend/astro.svg +1 -0
  290. package/public/assets/logos/frontend/backbone.svg +1 -0
  291. package/public/assets/logos/frontend/emberdotjs.svg +1 -0
  292. package/public/assets/logos/frontend/htmx.svg +1 -0
  293. package/public/assets/logos/frontend/lit.svg +1 -0
  294. package/public/assets/logos/frontend/nextdotjs.svg +1 -0
  295. package/public/assets/logos/frontend/nuxt.svg +1 -0
  296. package/public/assets/logos/frontend/preact.svg +1 -0
  297. package/public/assets/logos/frontend/qwik.svg +1 -0
  298. package/public/assets/logos/frontend/react.svg +1 -0
  299. package/public/assets/logos/frontend/remix.svg +1 -0
  300. package/public/assets/logos/frontend/solid.svg +1 -0
  301. package/public/assets/logos/frontend/svelte.svg +1 -0
  302. package/public/assets/logos/frontend/vuedotjs.svg +1 -0
  303. package/public/assets/logos/hosting/netlify.svg +1 -0
  304. package/public/assets/logos/hosting/railway.svg +1 -0
  305. package/public/assets/logos/hosting/render.svg +1 -0
  306. package/public/assets/logos/hosting/vercel.svg +1 -0
  307. package/public/assets/logos/language/csharp.svg +1 -0
  308. package/public/assets/logos/language/go.svg +1 -0
  309. package/public/assets/logos/language/javascript.svg +1 -0
  310. package/public/assets/logos/language/openjdk.svg +1 -0
  311. package/public/assets/logos/language/php.svg +1 -0
  312. package/public/assets/logos/language/python.svg +1 -0
  313. package/public/assets/logos/language/ruby.svg +1 -0
  314. package/public/assets/logos/language/rust.svg +1 -0
  315. package/public/assets/logos/language/typescript.svg +1 -0
  316. package/public/assets/logos/lint/commitlint.svg +1 -0
  317. package/public/assets/logos/lint/eslint.svg +1 -0
  318. package/public/assets/logos/lint/husky.svg +3 -0
  319. package/public/assets/logos/lint/lintstaged.svg +3 -0
  320. package/public/assets/logos/mobile/capacitor.svg +1 -0
  321. package/public/assets/logos/mobile/expo.svg +1 -0
  322. package/public/assets/logos/mobile/flutter.svg +1 -0
  323. package/public/assets/logos/mobile/ionic.svg +1 -0
  324. package/public/assets/logos/mobile/react.svg +1 -0
  325. package/public/assets/logos/network/axios.svg +1 -0
  326. package/public/assets/logos/network/brandfetch.svg +1 -0
  327. package/public/assets/logos/network/grpc.svg +1 -0
  328. package/public/assets/logos/network/openapiinitiative.svg +1 -0
  329. package/public/assets/logos/network/swr.svg +1 -0
  330. package/public/assets/logos/orm/drizzle.svg +1 -0
  331. package/public/assets/logos/orm/mongoose.svg +1 -0
  332. package/public/assets/logos/orm/prisma.svg +1 -0
  333. package/public/assets/logos/orm/typeorm.svg +1 -0
  334. package/public/assets/logos/package/npm.svg +1 -0
  335. package/public/assets/logos/package/pnpm.svg +1 -0
  336. package/public/assets/logos/package/yarn.svg +1 -0
  337. package/public/assets/logos/payment/fallback/lemonsqueezy.svg +1 -0
  338. package/public/assets/logos/payment/paypal.svg +1 -0
  339. package/public/assets/logos/payment/stripe.svg +1 -0
  340. package/public/assets/logos/runtime/bun.svg +1 -0
  341. package/public/assets/logos/runtime/deno.svg +1 -0
  342. package/public/assets/logos/ssg/eleventy.svg +1 -0
  343. package/public/assets/logos/ssg/gatsby.svg +1 -0
  344. package/public/assets/logos/ssg/hugo.svg +1 -0
  345. package/public/assets/logos/ssg/jekyll.svg +1 -0
  346. package/public/assets/logos/state/mobx.svg +1 -0
  347. package/public/assets/logos/state/recoil.svg +1 -0
  348. package/public/assets/logos/state/redux.svg +1 -0
  349. package/public/assets/logos/state/xstate.svg +1 -0
  350. package/public/assets/logos/state/zustand.svg +1 -0
  351. package/public/assets/logos/testing/chai.svg +1 -0
  352. package/public/assets/logos/testing/cypress.svg +1 -0
  353. package/public/assets/logos/testing/jasmine.svg +1 -0
  354. package/public/assets/logos/testing/jest.svg +1 -0
  355. package/public/assets/logos/testing/mocha.svg +1 -0
  356. package/public/assets/logos/testing/playwright.svg +1 -0
  357. package/public/assets/logos/testing/puppeteer.svg +1 -0
  358. package/public/assets/logos/testing/storybook.svg +1 -0
  359. package/public/assets/logos/testing/testinglibrary.svg +1 -0
  360. package/public/assets/logos/testing/vitest.svg +1 -0
  361. package/public/assets/logos/utility/d3.svg +1 -0
  362. package/public/assets/logos/utility/leaflet.svg +1 -0
  363. package/public/assets/logos/utility/lodash.svg +1 -0
  364. package/public/assets/logos/utility/pyup.svg +1 -0
  365. package/public/assets/logos/utility/reactivex.svg +1 -0
  366. package/public/assets/logos/utility/threedotjs.svg +1 -0
  367. package/public/assets/logos/utility/zod.svg +1 -0
  368. package/public/stackscan-white.svg +26 -0
  369. package/public/stackscan.svg +26 -0
@@ -0,0 +1,2166 @@
1
+ import {
2
+ __commonJS,
3
+ __require
4
+ } from "./chunk-4OMBB3R6.mjs";
5
+
6
+ // node_modules/universalify/index.js
7
+ var require_universalify = __commonJS({
8
+ "node_modules/universalify/index.js"(exports) {
9
+ "use strict";
10
+ exports.fromCallback = function(fn) {
11
+ return Object.defineProperty(function(...args) {
12
+ if (typeof args[args.length - 1] === "function") fn.apply(this, args);
13
+ else {
14
+ return new Promise((resolve, reject) => {
15
+ args.push((err, res) => err != null ? reject(err) : resolve(res));
16
+ fn.apply(this, args);
17
+ });
18
+ }
19
+ }, "name", { value: fn.name });
20
+ };
21
+ exports.fromPromise = function(fn) {
22
+ return Object.defineProperty(function(...args) {
23
+ const cb = args[args.length - 1];
24
+ if (typeof cb !== "function") return fn.apply(this, args);
25
+ else {
26
+ args.pop();
27
+ fn.apply(this, args).then((r) => cb(null, r), cb);
28
+ }
29
+ }, "name", { value: fn.name });
30
+ };
31
+ }
32
+ });
33
+
34
+ // node_modules/graceful-fs/polyfills.js
35
+ var require_polyfills = __commonJS({
36
+ "node_modules/graceful-fs/polyfills.js"(exports, module) {
37
+ "use strict";
38
+ var constants = __require("constants");
39
+ var origCwd = process.cwd;
40
+ var cwd = null;
41
+ var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
42
+ process.cwd = function() {
43
+ if (!cwd)
44
+ cwd = origCwd.call(process);
45
+ return cwd;
46
+ };
47
+ try {
48
+ process.cwd();
49
+ } catch (er) {
50
+ }
51
+ if (typeof process.chdir === "function") {
52
+ chdir = process.chdir;
53
+ process.chdir = function(d) {
54
+ cwd = null;
55
+ chdir.call(process, d);
56
+ };
57
+ if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
58
+ }
59
+ var chdir;
60
+ module.exports = patch;
61
+ function patch(fs) {
62
+ if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
63
+ patchLchmod(fs);
64
+ }
65
+ if (!fs.lutimes) {
66
+ patchLutimes(fs);
67
+ }
68
+ fs.chown = chownFix(fs.chown);
69
+ fs.fchown = chownFix(fs.fchown);
70
+ fs.lchown = chownFix(fs.lchown);
71
+ fs.chmod = chmodFix(fs.chmod);
72
+ fs.fchmod = chmodFix(fs.fchmod);
73
+ fs.lchmod = chmodFix(fs.lchmod);
74
+ fs.chownSync = chownFixSync(fs.chownSync);
75
+ fs.fchownSync = chownFixSync(fs.fchownSync);
76
+ fs.lchownSync = chownFixSync(fs.lchownSync);
77
+ fs.chmodSync = chmodFixSync(fs.chmodSync);
78
+ fs.fchmodSync = chmodFixSync(fs.fchmodSync);
79
+ fs.lchmodSync = chmodFixSync(fs.lchmodSync);
80
+ fs.stat = statFix(fs.stat);
81
+ fs.fstat = statFix(fs.fstat);
82
+ fs.lstat = statFix(fs.lstat);
83
+ fs.statSync = statFixSync(fs.statSync);
84
+ fs.fstatSync = statFixSync(fs.fstatSync);
85
+ fs.lstatSync = statFixSync(fs.lstatSync);
86
+ if (fs.chmod && !fs.lchmod) {
87
+ fs.lchmod = function(path, mode, cb) {
88
+ if (cb) process.nextTick(cb);
89
+ };
90
+ fs.lchmodSync = function() {
91
+ };
92
+ }
93
+ if (fs.chown && !fs.lchown) {
94
+ fs.lchown = function(path, uid, gid, cb) {
95
+ if (cb) process.nextTick(cb);
96
+ };
97
+ fs.lchownSync = function() {
98
+ };
99
+ }
100
+ if (platform === "win32") {
101
+ fs.rename = typeof fs.rename !== "function" ? fs.rename : (function(fs$rename) {
102
+ function rename(from, to, cb) {
103
+ var start = Date.now();
104
+ var backoff = 0;
105
+ fs$rename(from, to, function CB(er) {
106
+ if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
107
+ setTimeout(function() {
108
+ fs.stat(to, function(stater, st) {
109
+ if (stater && stater.code === "ENOENT")
110
+ fs$rename(from, to, CB);
111
+ else
112
+ cb(er);
113
+ });
114
+ }, backoff);
115
+ if (backoff < 100)
116
+ backoff += 10;
117
+ return;
118
+ }
119
+ if (cb) cb(er);
120
+ });
121
+ }
122
+ if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
123
+ return rename;
124
+ })(fs.rename);
125
+ }
126
+ fs.read = typeof fs.read !== "function" ? fs.read : (function(fs$read) {
127
+ function read(fd, buffer, offset, length, position, callback_) {
128
+ var callback;
129
+ if (callback_ && typeof callback_ === "function") {
130
+ var eagCounter = 0;
131
+ callback = function(er, _, __) {
132
+ if (er && er.code === "EAGAIN" && eagCounter < 10) {
133
+ eagCounter++;
134
+ return fs$read.call(fs, fd, buffer, offset, length, position, callback);
135
+ }
136
+ callback_.apply(this, arguments);
137
+ };
138
+ }
139
+ return fs$read.call(fs, fd, buffer, offset, length, position, callback);
140
+ }
141
+ if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
142
+ return read;
143
+ })(fs.read);
144
+ fs.readSync = typeof fs.readSync !== "function" ? fs.readSync : /* @__PURE__ */ (function(fs$readSync) {
145
+ return function(fd, buffer, offset, length, position) {
146
+ var eagCounter = 0;
147
+ while (true) {
148
+ try {
149
+ return fs$readSync.call(fs, fd, buffer, offset, length, position);
150
+ } catch (er) {
151
+ if (er.code === "EAGAIN" && eagCounter < 10) {
152
+ eagCounter++;
153
+ continue;
154
+ }
155
+ throw er;
156
+ }
157
+ }
158
+ };
159
+ })(fs.readSync);
160
+ function patchLchmod(fs2) {
161
+ fs2.lchmod = function(path, mode, callback) {
162
+ fs2.open(
163
+ path,
164
+ constants.O_WRONLY | constants.O_SYMLINK,
165
+ mode,
166
+ function(err, fd) {
167
+ if (err) {
168
+ if (callback) callback(err);
169
+ return;
170
+ }
171
+ fs2.fchmod(fd, mode, function(err2) {
172
+ fs2.close(fd, function(err22) {
173
+ if (callback) callback(err2 || err22);
174
+ });
175
+ });
176
+ }
177
+ );
178
+ };
179
+ fs2.lchmodSync = function(path, mode) {
180
+ var fd = fs2.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode);
181
+ var threw = true;
182
+ var ret;
183
+ try {
184
+ ret = fs2.fchmodSync(fd, mode);
185
+ threw = false;
186
+ } finally {
187
+ if (threw) {
188
+ try {
189
+ fs2.closeSync(fd);
190
+ } catch (er) {
191
+ }
192
+ } else {
193
+ fs2.closeSync(fd);
194
+ }
195
+ }
196
+ return ret;
197
+ };
198
+ }
199
+ function patchLutimes(fs2) {
200
+ if (constants.hasOwnProperty("O_SYMLINK") && fs2.futimes) {
201
+ fs2.lutimes = function(path, at, mt, cb) {
202
+ fs2.open(path, constants.O_SYMLINK, function(er, fd) {
203
+ if (er) {
204
+ if (cb) cb(er);
205
+ return;
206
+ }
207
+ fs2.futimes(fd, at, mt, function(er2) {
208
+ fs2.close(fd, function(er22) {
209
+ if (cb) cb(er2 || er22);
210
+ });
211
+ });
212
+ });
213
+ };
214
+ fs2.lutimesSync = function(path, at, mt) {
215
+ var fd = fs2.openSync(path, constants.O_SYMLINK);
216
+ var ret;
217
+ var threw = true;
218
+ try {
219
+ ret = fs2.futimesSync(fd, at, mt);
220
+ threw = false;
221
+ } finally {
222
+ if (threw) {
223
+ try {
224
+ fs2.closeSync(fd);
225
+ } catch (er) {
226
+ }
227
+ } else {
228
+ fs2.closeSync(fd);
229
+ }
230
+ }
231
+ return ret;
232
+ };
233
+ } else if (fs2.futimes) {
234
+ fs2.lutimes = function(_a, _b, _c, cb) {
235
+ if (cb) process.nextTick(cb);
236
+ };
237
+ fs2.lutimesSync = function() {
238
+ };
239
+ }
240
+ }
241
+ function chmodFix(orig) {
242
+ if (!orig) return orig;
243
+ return function(target, mode, cb) {
244
+ return orig.call(fs, target, mode, function(er) {
245
+ if (chownErOk(er)) er = null;
246
+ if (cb) cb.apply(this, arguments);
247
+ });
248
+ };
249
+ }
250
+ function chmodFixSync(orig) {
251
+ if (!orig) return orig;
252
+ return function(target, mode) {
253
+ try {
254
+ return orig.call(fs, target, mode);
255
+ } catch (er) {
256
+ if (!chownErOk(er)) throw er;
257
+ }
258
+ };
259
+ }
260
+ function chownFix(orig) {
261
+ if (!orig) return orig;
262
+ return function(target, uid, gid, cb) {
263
+ return orig.call(fs, target, uid, gid, function(er) {
264
+ if (chownErOk(er)) er = null;
265
+ if (cb) cb.apply(this, arguments);
266
+ });
267
+ };
268
+ }
269
+ function chownFixSync(orig) {
270
+ if (!orig) return orig;
271
+ return function(target, uid, gid) {
272
+ try {
273
+ return orig.call(fs, target, uid, gid);
274
+ } catch (er) {
275
+ if (!chownErOk(er)) throw er;
276
+ }
277
+ };
278
+ }
279
+ function statFix(orig) {
280
+ if (!orig) return orig;
281
+ return function(target, options, cb) {
282
+ if (typeof options === "function") {
283
+ cb = options;
284
+ options = null;
285
+ }
286
+ function callback(er, stats) {
287
+ if (stats) {
288
+ if (stats.uid < 0) stats.uid += 4294967296;
289
+ if (stats.gid < 0) stats.gid += 4294967296;
290
+ }
291
+ if (cb) cb.apply(this, arguments);
292
+ }
293
+ return options ? orig.call(fs, target, options, callback) : orig.call(fs, target, callback);
294
+ };
295
+ }
296
+ function statFixSync(orig) {
297
+ if (!orig) return orig;
298
+ return function(target, options) {
299
+ var stats = options ? orig.call(fs, target, options) : orig.call(fs, target);
300
+ if (stats) {
301
+ if (stats.uid < 0) stats.uid += 4294967296;
302
+ if (stats.gid < 0) stats.gid += 4294967296;
303
+ }
304
+ return stats;
305
+ };
306
+ }
307
+ function chownErOk(er) {
308
+ if (!er)
309
+ return true;
310
+ if (er.code === "ENOSYS")
311
+ return true;
312
+ var nonroot = !process.getuid || process.getuid() !== 0;
313
+ if (nonroot) {
314
+ if (er.code === "EINVAL" || er.code === "EPERM")
315
+ return true;
316
+ }
317
+ return false;
318
+ }
319
+ }
320
+ }
321
+ });
322
+
323
+ // node_modules/graceful-fs/legacy-streams.js
324
+ var require_legacy_streams = __commonJS({
325
+ "node_modules/graceful-fs/legacy-streams.js"(exports, module) {
326
+ "use strict";
327
+ var Stream = __require("stream").Stream;
328
+ module.exports = legacy;
329
+ function legacy(fs) {
330
+ return {
331
+ ReadStream,
332
+ WriteStream
333
+ };
334
+ function ReadStream(path, options) {
335
+ if (!(this instanceof ReadStream)) return new ReadStream(path, options);
336
+ Stream.call(this);
337
+ var self = this;
338
+ this.path = path;
339
+ this.fd = null;
340
+ this.readable = true;
341
+ this.paused = false;
342
+ this.flags = "r";
343
+ this.mode = 438;
344
+ this.bufferSize = 64 * 1024;
345
+ options = options || {};
346
+ var keys = Object.keys(options);
347
+ for (var index = 0, length = keys.length; index < length; index++) {
348
+ var key = keys[index];
349
+ this[key] = options[key];
350
+ }
351
+ if (this.encoding) this.setEncoding(this.encoding);
352
+ if (this.start !== void 0) {
353
+ if ("number" !== typeof this.start) {
354
+ throw TypeError("start must be a Number");
355
+ }
356
+ if (this.end === void 0) {
357
+ this.end = Infinity;
358
+ } else if ("number" !== typeof this.end) {
359
+ throw TypeError("end must be a Number");
360
+ }
361
+ if (this.start > this.end) {
362
+ throw new Error("start must be <= end");
363
+ }
364
+ this.pos = this.start;
365
+ }
366
+ if (this.fd !== null) {
367
+ process.nextTick(function() {
368
+ self._read();
369
+ });
370
+ return;
371
+ }
372
+ fs.open(this.path, this.flags, this.mode, function(err, fd) {
373
+ if (err) {
374
+ self.emit("error", err);
375
+ self.readable = false;
376
+ return;
377
+ }
378
+ self.fd = fd;
379
+ self.emit("open", fd);
380
+ self._read();
381
+ });
382
+ }
383
+ function WriteStream(path, options) {
384
+ if (!(this instanceof WriteStream)) return new WriteStream(path, options);
385
+ Stream.call(this);
386
+ this.path = path;
387
+ this.fd = null;
388
+ this.writable = true;
389
+ this.flags = "w";
390
+ this.encoding = "binary";
391
+ this.mode = 438;
392
+ this.bytesWritten = 0;
393
+ options = options || {};
394
+ var keys = Object.keys(options);
395
+ for (var index = 0, length = keys.length; index < length; index++) {
396
+ var key = keys[index];
397
+ this[key] = options[key];
398
+ }
399
+ if (this.start !== void 0) {
400
+ if ("number" !== typeof this.start) {
401
+ throw TypeError("start must be a Number");
402
+ }
403
+ if (this.start < 0) {
404
+ throw new Error("start must be >= zero");
405
+ }
406
+ this.pos = this.start;
407
+ }
408
+ this.busy = false;
409
+ this._queue = [];
410
+ if (this.fd === null) {
411
+ this._open = fs.open;
412
+ this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
413
+ this.flush();
414
+ }
415
+ }
416
+ }
417
+ }
418
+ });
419
+
420
+ // node_modules/graceful-fs/clone.js
421
+ var require_clone = __commonJS({
422
+ "node_modules/graceful-fs/clone.js"(exports, module) {
423
+ "use strict";
424
+ module.exports = clone;
425
+ var getPrototypeOf = Object.getPrototypeOf || function(obj) {
426
+ return obj.__proto__;
427
+ };
428
+ function clone(obj) {
429
+ if (obj === null || typeof obj !== "object")
430
+ return obj;
431
+ if (obj instanceof Object)
432
+ var copy = { __proto__: getPrototypeOf(obj) };
433
+ else
434
+ var copy = /* @__PURE__ */ Object.create(null);
435
+ Object.getOwnPropertyNames(obj).forEach(function(key) {
436
+ Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
437
+ });
438
+ return copy;
439
+ }
440
+ }
441
+ });
442
+
443
+ // node_modules/graceful-fs/graceful-fs.js
444
+ var require_graceful_fs = __commonJS({
445
+ "node_modules/graceful-fs/graceful-fs.js"(exports, module) {
446
+ "use strict";
447
+ var fs = __require("fs");
448
+ var polyfills = require_polyfills();
449
+ var legacy = require_legacy_streams();
450
+ var clone = require_clone();
451
+ var util = __require("util");
452
+ var gracefulQueue;
453
+ var previousSymbol;
454
+ if (typeof Symbol === "function" && typeof Symbol.for === "function") {
455
+ gracefulQueue = Symbol.for("graceful-fs.queue");
456
+ previousSymbol = Symbol.for("graceful-fs.previous");
457
+ } else {
458
+ gracefulQueue = "___graceful-fs.queue";
459
+ previousSymbol = "___graceful-fs.previous";
460
+ }
461
+ function noop() {
462
+ }
463
+ function publishQueue(context, queue2) {
464
+ Object.defineProperty(context, gracefulQueue, {
465
+ get: function() {
466
+ return queue2;
467
+ }
468
+ });
469
+ }
470
+ var debug = noop;
471
+ if (util.debuglog)
472
+ debug = util.debuglog("gfs4");
473
+ else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
474
+ debug = function() {
475
+ var m = util.format.apply(util, arguments);
476
+ m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
477
+ console.error(m);
478
+ };
479
+ if (!fs[gracefulQueue]) {
480
+ queue = global[gracefulQueue] || [];
481
+ publishQueue(fs, queue);
482
+ fs.close = (function(fs$close) {
483
+ function close(fd, cb) {
484
+ return fs$close.call(fs, fd, function(err) {
485
+ if (!err) {
486
+ resetQueue();
487
+ }
488
+ if (typeof cb === "function")
489
+ cb.apply(this, arguments);
490
+ });
491
+ }
492
+ Object.defineProperty(close, previousSymbol, {
493
+ value: fs$close
494
+ });
495
+ return close;
496
+ })(fs.close);
497
+ fs.closeSync = (function(fs$closeSync) {
498
+ function closeSync(fd) {
499
+ fs$closeSync.apply(fs, arguments);
500
+ resetQueue();
501
+ }
502
+ Object.defineProperty(closeSync, previousSymbol, {
503
+ value: fs$closeSync
504
+ });
505
+ return closeSync;
506
+ })(fs.closeSync);
507
+ if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
508
+ process.on("exit", function() {
509
+ debug(fs[gracefulQueue]);
510
+ __require("assert").equal(fs[gracefulQueue].length, 0);
511
+ });
512
+ }
513
+ }
514
+ var queue;
515
+ if (!global[gracefulQueue]) {
516
+ publishQueue(global, fs[gracefulQueue]);
517
+ }
518
+ module.exports = patch(clone(fs));
519
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {
520
+ module.exports = patch(fs);
521
+ fs.__patched = true;
522
+ }
523
+ function patch(fs2) {
524
+ polyfills(fs2);
525
+ fs2.gracefulify = patch;
526
+ fs2.createReadStream = createReadStream;
527
+ fs2.createWriteStream = createWriteStream;
528
+ var fs$readFile = fs2.readFile;
529
+ fs2.readFile = readFile;
530
+ function readFile(path, options, cb) {
531
+ if (typeof options === "function")
532
+ cb = options, options = null;
533
+ return go$readFile(path, options, cb);
534
+ function go$readFile(path2, options2, cb2, startTime) {
535
+ return fs$readFile(path2, options2, function(err) {
536
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
537
+ enqueue([go$readFile, [path2, options2, cb2], err, startTime || Date.now(), Date.now()]);
538
+ else {
539
+ if (typeof cb2 === "function")
540
+ cb2.apply(this, arguments);
541
+ }
542
+ });
543
+ }
544
+ }
545
+ var fs$writeFile = fs2.writeFile;
546
+ fs2.writeFile = writeFile;
547
+ function writeFile(path, data, options, cb) {
548
+ if (typeof options === "function")
549
+ cb = options, options = null;
550
+ return go$writeFile(path, data, options, cb);
551
+ function go$writeFile(path2, data2, options2, cb2, startTime) {
552
+ return fs$writeFile(path2, data2, options2, function(err) {
553
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
554
+ enqueue([go$writeFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
555
+ else {
556
+ if (typeof cb2 === "function")
557
+ cb2.apply(this, arguments);
558
+ }
559
+ });
560
+ }
561
+ }
562
+ var fs$appendFile = fs2.appendFile;
563
+ if (fs$appendFile)
564
+ fs2.appendFile = appendFile;
565
+ function appendFile(path, data, options, cb) {
566
+ if (typeof options === "function")
567
+ cb = options, options = null;
568
+ return go$appendFile(path, data, options, cb);
569
+ function go$appendFile(path2, data2, options2, cb2, startTime) {
570
+ return fs$appendFile(path2, data2, options2, function(err) {
571
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
572
+ enqueue([go$appendFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
573
+ else {
574
+ if (typeof cb2 === "function")
575
+ cb2.apply(this, arguments);
576
+ }
577
+ });
578
+ }
579
+ }
580
+ var fs$copyFile = fs2.copyFile;
581
+ if (fs$copyFile)
582
+ fs2.copyFile = copyFile;
583
+ function copyFile(src, dest, flags, cb) {
584
+ if (typeof flags === "function") {
585
+ cb = flags;
586
+ flags = 0;
587
+ }
588
+ return go$copyFile(src, dest, flags, cb);
589
+ function go$copyFile(src2, dest2, flags2, cb2, startTime) {
590
+ return fs$copyFile(src2, dest2, flags2, function(err) {
591
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
592
+ enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]);
593
+ else {
594
+ if (typeof cb2 === "function")
595
+ cb2.apply(this, arguments);
596
+ }
597
+ });
598
+ }
599
+ }
600
+ var fs$readdir = fs2.readdir;
601
+ fs2.readdir = readdir;
602
+ var noReaddirOptionVersions = /^v[0-5]\./;
603
+ function readdir(path, options, cb) {
604
+ if (typeof options === "function")
605
+ cb = options, options = null;
606
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path2, options2, cb2, startTime) {
607
+ return fs$readdir(path2, fs$readdirCallback(
608
+ path2,
609
+ options2,
610
+ cb2,
611
+ startTime
612
+ ));
613
+ } : function go$readdir2(path2, options2, cb2, startTime) {
614
+ return fs$readdir(path2, options2, fs$readdirCallback(
615
+ path2,
616
+ options2,
617
+ cb2,
618
+ startTime
619
+ ));
620
+ };
621
+ return go$readdir(path, options, cb);
622
+ function fs$readdirCallback(path2, options2, cb2, startTime) {
623
+ return function(err, files) {
624
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
625
+ enqueue([
626
+ go$readdir,
627
+ [path2, options2, cb2],
628
+ err,
629
+ startTime || Date.now(),
630
+ Date.now()
631
+ ]);
632
+ else {
633
+ if (files && files.sort)
634
+ files.sort();
635
+ if (typeof cb2 === "function")
636
+ cb2.call(this, err, files);
637
+ }
638
+ };
639
+ }
640
+ }
641
+ if (process.version.substr(0, 4) === "v0.8") {
642
+ var legStreams = legacy(fs2);
643
+ ReadStream = legStreams.ReadStream;
644
+ WriteStream = legStreams.WriteStream;
645
+ }
646
+ var fs$ReadStream = fs2.ReadStream;
647
+ if (fs$ReadStream) {
648
+ ReadStream.prototype = Object.create(fs$ReadStream.prototype);
649
+ ReadStream.prototype.open = ReadStream$open;
650
+ }
651
+ var fs$WriteStream = fs2.WriteStream;
652
+ if (fs$WriteStream) {
653
+ WriteStream.prototype = Object.create(fs$WriteStream.prototype);
654
+ WriteStream.prototype.open = WriteStream$open;
655
+ }
656
+ Object.defineProperty(fs2, "ReadStream", {
657
+ get: function() {
658
+ return ReadStream;
659
+ },
660
+ set: function(val) {
661
+ ReadStream = val;
662
+ },
663
+ enumerable: true,
664
+ configurable: true
665
+ });
666
+ Object.defineProperty(fs2, "WriteStream", {
667
+ get: function() {
668
+ return WriteStream;
669
+ },
670
+ set: function(val) {
671
+ WriteStream = val;
672
+ },
673
+ enumerable: true,
674
+ configurable: true
675
+ });
676
+ var FileReadStream = ReadStream;
677
+ Object.defineProperty(fs2, "FileReadStream", {
678
+ get: function() {
679
+ return FileReadStream;
680
+ },
681
+ set: function(val) {
682
+ FileReadStream = val;
683
+ },
684
+ enumerable: true,
685
+ configurable: true
686
+ });
687
+ var FileWriteStream = WriteStream;
688
+ Object.defineProperty(fs2, "FileWriteStream", {
689
+ get: function() {
690
+ return FileWriteStream;
691
+ },
692
+ set: function(val) {
693
+ FileWriteStream = val;
694
+ },
695
+ enumerable: true,
696
+ configurable: true
697
+ });
698
+ function ReadStream(path, options) {
699
+ if (this instanceof ReadStream)
700
+ return fs$ReadStream.apply(this, arguments), this;
701
+ else
702
+ return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
703
+ }
704
+ function ReadStream$open() {
705
+ var that = this;
706
+ open(that.path, that.flags, that.mode, function(err, fd) {
707
+ if (err) {
708
+ if (that.autoClose)
709
+ that.destroy();
710
+ that.emit("error", err);
711
+ } else {
712
+ that.fd = fd;
713
+ that.emit("open", fd);
714
+ that.read();
715
+ }
716
+ });
717
+ }
718
+ function WriteStream(path, options) {
719
+ if (this instanceof WriteStream)
720
+ return fs$WriteStream.apply(this, arguments), this;
721
+ else
722
+ return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
723
+ }
724
+ function WriteStream$open() {
725
+ var that = this;
726
+ open(that.path, that.flags, that.mode, function(err, fd) {
727
+ if (err) {
728
+ that.destroy();
729
+ that.emit("error", err);
730
+ } else {
731
+ that.fd = fd;
732
+ that.emit("open", fd);
733
+ }
734
+ });
735
+ }
736
+ function createReadStream(path, options) {
737
+ return new fs2.ReadStream(path, options);
738
+ }
739
+ function createWriteStream(path, options) {
740
+ return new fs2.WriteStream(path, options);
741
+ }
742
+ var fs$open = fs2.open;
743
+ fs2.open = open;
744
+ function open(path, flags, mode, cb) {
745
+ if (typeof mode === "function")
746
+ cb = mode, mode = null;
747
+ return go$open(path, flags, mode, cb);
748
+ function go$open(path2, flags2, mode2, cb2, startTime) {
749
+ return fs$open(path2, flags2, mode2, function(err, fd) {
750
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
751
+ enqueue([go$open, [path2, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
752
+ else {
753
+ if (typeof cb2 === "function")
754
+ cb2.apply(this, arguments);
755
+ }
756
+ });
757
+ }
758
+ }
759
+ return fs2;
760
+ }
761
+ function enqueue(elem) {
762
+ debug("ENQUEUE", elem[0].name, elem[1]);
763
+ fs[gracefulQueue].push(elem);
764
+ retry();
765
+ }
766
+ var retryTimer;
767
+ function resetQueue() {
768
+ var now = Date.now();
769
+ for (var i = 0; i < fs[gracefulQueue].length; ++i) {
770
+ if (fs[gracefulQueue][i].length > 2) {
771
+ fs[gracefulQueue][i][3] = now;
772
+ fs[gracefulQueue][i][4] = now;
773
+ }
774
+ }
775
+ retry();
776
+ }
777
+ function retry() {
778
+ clearTimeout(retryTimer);
779
+ retryTimer = void 0;
780
+ if (fs[gracefulQueue].length === 0)
781
+ return;
782
+ var elem = fs[gracefulQueue].shift();
783
+ var fn = elem[0];
784
+ var args = elem[1];
785
+ var err = elem[2];
786
+ var startTime = elem[3];
787
+ var lastTime = elem[4];
788
+ if (startTime === void 0) {
789
+ debug("RETRY", fn.name, args);
790
+ fn.apply(null, args);
791
+ } else if (Date.now() - startTime >= 6e4) {
792
+ debug("TIMEOUT", fn.name, args);
793
+ var cb = args.pop();
794
+ if (typeof cb === "function")
795
+ cb.call(null, err);
796
+ } else {
797
+ var sinceAttempt = Date.now() - lastTime;
798
+ var sinceStart = Math.max(lastTime - startTime, 1);
799
+ var desiredDelay = Math.min(sinceStart * 1.2, 100);
800
+ if (sinceAttempt >= desiredDelay) {
801
+ debug("RETRY", fn.name, args);
802
+ fn.apply(null, args.concat([startTime]));
803
+ } else {
804
+ fs[gracefulQueue].push(elem);
805
+ }
806
+ }
807
+ if (retryTimer === void 0) {
808
+ retryTimer = setTimeout(retry, 0);
809
+ }
810
+ }
811
+ }
812
+ });
813
+
814
+ // node_modules/fs-extra/lib/fs/index.js
815
+ var require_fs = __commonJS({
816
+ "node_modules/fs-extra/lib/fs/index.js"(exports) {
817
+ "use strict";
818
+ var u = require_universalify().fromCallback;
819
+ var fs = require_graceful_fs();
820
+ var api = [
821
+ "access",
822
+ "appendFile",
823
+ "chmod",
824
+ "chown",
825
+ "close",
826
+ "copyFile",
827
+ "cp",
828
+ "fchmod",
829
+ "fchown",
830
+ "fdatasync",
831
+ "fstat",
832
+ "fsync",
833
+ "ftruncate",
834
+ "futimes",
835
+ "glob",
836
+ "lchmod",
837
+ "lchown",
838
+ "lutimes",
839
+ "link",
840
+ "lstat",
841
+ "mkdir",
842
+ "mkdtemp",
843
+ "open",
844
+ "opendir",
845
+ "readdir",
846
+ "readFile",
847
+ "readlink",
848
+ "realpath",
849
+ "rename",
850
+ "rm",
851
+ "rmdir",
852
+ "stat",
853
+ "statfs",
854
+ "symlink",
855
+ "truncate",
856
+ "unlink",
857
+ "utimes",
858
+ "writeFile"
859
+ ].filter((key) => {
860
+ return typeof fs[key] === "function";
861
+ });
862
+ Object.assign(exports, fs);
863
+ api.forEach((method) => {
864
+ exports[method] = u(fs[method]);
865
+ });
866
+ exports.exists = function(filename, callback) {
867
+ if (typeof callback === "function") {
868
+ return fs.exists(filename, callback);
869
+ }
870
+ return new Promise((resolve) => {
871
+ return fs.exists(filename, resolve);
872
+ });
873
+ };
874
+ exports.read = function(fd, buffer, offset, length, position, callback) {
875
+ if (typeof callback === "function") {
876
+ return fs.read(fd, buffer, offset, length, position, callback);
877
+ }
878
+ return new Promise((resolve, reject) => {
879
+ fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
880
+ if (err) return reject(err);
881
+ resolve({ bytesRead, buffer: buffer2 });
882
+ });
883
+ });
884
+ };
885
+ exports.write = function(fd, buffer, ...args) {
886
+ if (typeof args[args.length - 1] === "function") {
887
+ return fs.write(fd, buffer, ...args);
888
+ }
889
+ return new Promise((resolve, reject) => {
890
+ fs.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
891
+ if (err) return reject(err);
892
+ resolve({ bytesWritten, buffer: buffer2 });
893
+ });
894
+ });
895
+ };
896
+ exports.readv = function(fd, buffers, ...args) {
897
+ if (typeof args[args.length - 1] === "function") {
898
+ return fs.readv(fd, buffers, ...args);
899
+ }
900
+ return new Promise((resolve, reject) => {
901
+ fs.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
902
+ if (err) return reject(err);
903
+ resolve({ bytesRead, buffers: buffers2 });
904
+ });
905
+ });
906
+ };
907
+ exports.writev = function(fd, buffers, ...args) {
908
+ if (typeof args[args.length - 1] === "function") {
909
+ return fs.writev(fd, buffers, ...args);
910
+ }
911
+ return new Promise((resolve, reject) => {
912
+ fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
913
+ if (err) return reject(err);
914
+ resolve({ bytesWritten, buffers: buffers2 });
915
+ });
916
+ });
917
+ };
918
+ if (typeof fs.realpath.native === "function") {
919
+ exports.realpath.native = u(fs.realpath.native);
920
+ } else {
921
+ process.emitWarning(
922
+ "fs.realpath.native is not a function. Is fs being monkey-patched?",
923
+ "Warning",
924
+ "fs-extra-WARN0003"
925
+ );
926
+ }
927
+ }
928
+ });
929
+
930
+ // node_modules/fs-extra/lib/mkdirs/utils.js
931
+ var require_utils = __commonJS({
932
+ "node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module) {
933
+ "use strict";
934
+ var path = __require("path");
935
+ module.exports.checkPath = function checkPath(pth) {
936
+ if (process.platform === "win32") {
937
+ const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ""));
938
+ if (pathHasInvalidWinCharacters) {
939
+ const error = new Error(`Path contains invalid characters: ${pth}`);
940
+ error.code = "EINVAL";
941
+ throw error;
942
+ }
943
+ }
944
+ };
945
+ }
946
+ });
947
+
948
+ // node_modules/fs-extra/lib/mkdirs/make-dir.js
949
+ var require_make_dir = __commonJS({
950
+ "node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module) {
951
+ "use strict";
952
+ var fs = require_fs();
953
+ var { checkPath } = require_utils();
954
+ var getMode = (options) => {
955
+ const defaults = { mode: 511 };
956
+ if (typeof options === "number") return options;
957
+ return { ...defaults, ...options }.mode;
958
+ };
959
+ module.exports.makeDir = async (dir, options) => {
960
+ checkPath(dir);
961
+ return fs.mkdir(dir, {
962
+ mode: getMode(options),
963
+ recursive: true
964
+ });
965
+ };
966
+ module.exports.makeDirSync = (dir, options) => {
967
+ checkPath(dir);
968
+ return fs.mkdirSync(dir, {
969
+ mode: getMode(options),
970
+ recursive: true
971
+ });
972
+ };
973
+ }
974
+ });
975
+
976
+ // node_modules/fs-extra/lib/mkdirs/index.js
977
+ var require_mkdirs = __commonJS({
978
+ "node_modules/fs-extra/lib/mkdirs/index.js"(exports, module) {
979
+ "use strict";
980
+ var u = require_universalify().fromPromise;
981
+ var { makeDir: _makeDir, makeDirSync } = require_make_dir();
982
+ var makeDir = u(_makeDir);
983
+ module.exports = {
984
+ mkdirs: makeDir,
985
+ mkdirsSync: makeDirSync,
986
+ // alias
987
+ mkdirp: makeDir,
988
+ mkdirpSync: makeDirSync,
989
+ ensureDir: makeDir,
990
+ ensureDirSync: makeDirSync
991
+ };
992
+ }
993
+ });
994
+
995
+ // node_modules/fs-extra/lib/path-exists/index.js
996
+ var require_path_exists = __commonJS({
997
+ "node_modules/fs-extra/lib/path-exists/index.js"(exports, module) {
998
+ "use strict";
999
+ var u = require_universalify().fromPromise;
1000
+ var fs = require_fs();
1001
+ function pathExists(path) {
1002
+ return fs.access(path).then(() => true).catch(() => false);
1003
+ }
1004
+ module.exports = {
1005
+ pathExists: u(pathExists),
1006
+ pathExistsSync: fs.existsSync
1007
+ };
1008
+ }
1009
+ });
1010
+
1011
+ // node_modules/fs-extra/lib/util/utimes.js
1012
+ var require_utimes = __commonJS({
1013
+ "node_modules/fs-extra/lib/util/utimes.js"(exports, module) {
1014
+ "use strict";
1015
+ var fs = require_fs();
1016
+ var u = require_universalify().fromPromise;
1017
+ async function utimesMillis(path, atime, mtime) {
1018
+ const fd = await fs.open(path, "r+");
1019
+ let closeErr = null;
1020
+ try {
1021
+ await fs.futimes(fd, atime, mtime);
1022
+ } finally {
1023
+ try {
1024
+ await fs.close(fd);
1025
+ } catch (e) {
1026
+ closeErr = e;
1027
+ }
1028
+ }
1029
+ if (closeErr) {
1030
+ throw closeErr;
1031
+ }
1032
+ }
1033
+ function utimesMillisSync(path, atime, mtime) {
1034
+ const fd = fs.openSync(path, "r+");
1035
+ fs.futimesSync(fd, atime, mtime);
1036
+ return fs.closeSync(fd);
1037
+ }
1038
+ module.exports = {
1039
+ utimesMillis: u(utimesMillis),
1040
+ utimesMillisSync
1041
+ };
1042
+ }
1043
+ });
1044
+
1045
+ // node_modules/fs-extra/lib/util/stat.js
1046
+ var require_stat = __commonJS({
1047
+ "node_modules/fs-extra/lib/util/stat.js"(exports, module) {
1048
+ "use strict";
1049
+ var fs = require_fs();
1050
+ var path = __require("path");
1051
+ var u = require_universalify().fromPromise;
1052
+ function getStats(src, dest, opts) {
1053
+ const statFunc = opts.dereference ? (file) => fs.stat(file, { bigint: true }) : (file) => fs.lstat(file, { bigint: true });
1054
+ return Promise.all([
1055
+ statFunc(src),
1056
+ statFunc(dest).catch((err) => {
1057
+ if (err.code === "ENOENT") return null;
1058
+ throw err;
1059
+ })
1060
+ ]).then(([srcStat, destStat]) => ({ srcStat, destStat }));
1061
+ }
1062
+ function getStatsSync(src, dest, opts) {
1063
+ let destStat;
1064
+ const statFunc = opts.dereference ? (file) => fs.statSync(file, { bigint: true }) : (file) => fs.lstatSync(file, { bigint: true });
1065
+ const srcStat = statFunc(src);
1066
+ try {
1067
+ destStat = statFunc(dest);
1068
+ } catch (err) {
1069
+ if (err.code === "ENOENT") return { srcStat, destStat: null };
1070
+ throw err;
1071
+ }
1072
+ return { srcStat, destStat };
1073
+ }
1074
+ async function checkPaths(src, dest, funcName, opts) {
1075
+ const { srcStat, destStat } = await getStats(src, dest, opts);
1076
+ if (destStat) {
1077
+ if (areIdentical(srcStat, destStat)) {
1078
+ const srcBaseName = path.basename(src);
1079
+ const destBaseName = path.basename(dest);
1080
+ if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
1081
+ return { srcStat, destStat, isChangingCase: true };
1082
+ }
1083
+ throw new Error("Source and destination must not be the same.");
1084
+ }
1085
+ if (srcStat.isDirectory() && !destStat.isDirectory()) {
1086
+ throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`);
1087
+ }
1088
+ if (!srcStat.isDirectory() && destStat.isDirectory()) {
1089
+ throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`);
1090
+ }
1091
+ }
1092
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
1093
+ throw new Error(errMsg(src, dest, funcName));
1094
+ }
1095
+ return { srcStat, destStat };
1096
+ }
1097
+ function checkPathsSync(src, dest, funcName, opts) {
1098
+ const { srcStat, destStat } = getStatsSync(src, dest, opts);
1099
+ if (destStat) {
1100
+ if (areIdentical(srcStat, destStat)) {
1101
+ const srcBaseName = path.basename(src);
1102
+ const destBaseName = path.basename(dest);
1103
+ if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
1104
+ return { srcStat, destStat, isChangingCase: true };
1105
+ }
1106
+ throw new Error("Source and destination must not be the same.");
1107
+ }
1108
+ if (srcStat.isDirectory() && !destStat.isDirectory()) {
1109
+ throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`);
1110
+ }
1111
+ if (!srcStat.isDirectory() && destStat.isDirectory()) {
1112
+ throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`);
1113
+ }
1114
+ }
1115
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
1116
+ throw new Error(errMsg(src, dest, funcName));
1117
+ }
1118
+ return { srcStat, destStat };
1119
+ }
1120
+ async function checkParentPaths(src, srcStat, dest, funcName) {
1121
+ const srcParent = path.resolve(path.dirname(src));
1122
+ const destParent = path.resolve(path.dirname(dest));
1123
+ if (destParent === srcParent || destParent === path.parse(destParent).root) return;
1124
+ let destStat;
1125
+ try {
1126
+ destStat = await fs.stat(destParent, { bigint: true });
1127
+ } catch (err) {
1128
+ if (err.code === "ENOENT") return;
1129
+ throw err;
1130
+ }
1131
+ if (areIdentical(srcStat, destStat)) {
1132
+ throw new Error(errMsg(src, dest, funcName));
1133
+ }
1134
+ return checkParentPaths(src, srcStat, destParent, funcName);
1135
+ }
1136
+ function checkParentPathsSync(src, srcStat, dest, funcName) {
1137
+ const srcParent = path.resolve(path.dirname(src));
1138
+ const destParent = path.resolve(path.dirname(dest));
1139
+ if (destParent === srcParent || destParent === path.parse(destParent).root) return;
1140
+ let destStat;
1141
+ try {
1142
+ destStat = fs.statSync(destParent, { bigint: true });
1143
+ } catch (err) {
1144
+ if (err.code === "ENOENT") return;
1145
+ throw err;
1146
+ }
1147
+ if (areIdentical(srcStat, destStat)) {
1148
+ throw new Error(errMsg(src, dest, funcName));
1149
+ }
1150
+ return checkParentPathsSync(src, srcStat, destParent, funcName);
1151
+ }
1152
+ function areIdentical(srcStat, destStat) {
1153
+ return destStat.ino !== void 0 && destStat.dev !== void 0 && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
1154
+ }
1155
+ function isSrcSubdir(src, dest) {
1156
+ const srcArr = path.resolve(src).split(path.sep).filter((i) => i);
1157
+ const destArr = path.resolve(dest).split(path.sep).filter((i) => i);
1158
+ return srcArr.every((cur, i) => destArr[i] === cur);
1159
+ }
1160
+ function errMsg(src, dest, funcName) {
1161
+ return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`;
1162
+ }
1163
+ module.exports = {
1164
+ // checkPaths
1165
+ checkPaths: u(checkPaths),
1166
+ checkPathsSync,
1167
+ // checkParent
1168
+ checkParentPaths: u(checkParentPaths),
1169
+ checkParentPathsSync,
1170
+ // Misc
1171
+ isSrcSubdir,
1172
+ areIdentical
1173
+ };
1174
+ }
1175
+ });
1176
+
1177
+ // node_modules/fs-extra/lib/util/async.js
1178
+ var require_async = __commonJS({
1179
+ "node_modules/fs-extra/lib/util/async.js"(exports, module) {
1180
+ "use strict";
1181
+ async function asyncIteratorConcurrentProcess(iterator, fn) {
1182
+ const promises = [];
1183
+ for await (const item of iterator) {
1184
+ promises.push(
1185
+ fn(item).then(
1186
+ () => null,
1187
+ (err) => err ?? new Error("unknown error")
1188
+ )
1189
+ );
1190
+ }
1191
+ await Promise.all(
1192
+ promises.map(
1193
+ (promise) => promise.then((possibleErr) => {
1194
+ if (possibleErr !== null) throw possibleErr;
1195
+ })
1196
+ )
1197
+ );
1198
+ }
1199
+ module.exports = {
1200
+ asyncIteratorConcurrentProcess
1201
+ };
1202
+ }
1203
+ });
1204
+
1205
+ // node_modules/fs-extra/lib/copy/copy.js
1206
+ var require_copy = __commonJS({
1207
+ "node_modules/fs-extra/lib/copy/copy.js"(exports, module) {
1208
+ "use strict";
1209
+ var fs = require_fs();
1210
+ var path = __require("path");
1211
+ var { mkdirs } = require_mkdirs();
1212
+ var { pathExists } = require_path_exists();
1213
+ var { utimesMillis } = require_utimes();
1214
+ var stat = require_stat();
1215
+ var { asyncIteratorConcurrentProcess } = require_async();
1216
+ async function copy(src, dest, opts = {}) {
1217
+ if (typeof opts === "function") {
1218
+ opts = { filter: opts };
1219
+ }
1220
+ opts.clobber = "clobber" in opts ? !!opts.clobber : true;
1221
+ opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
1222
+ if (opts.preserveTimestamps && process.arch === "ia32") {
1223
+ process.emitWarning(
1224
+ "Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269",
1225
+ "Warning",
1226
+ "fs-extra-WARN0001"
1227
+ );
1228
+ }
1229
+ const { srcStat, destStat } = await stat.checkPaths(src, dest, "copy", opts);
1230
+ await stat.checkParentPaths(src, srcStat, dest, "copy");
1231
+ const include = await runFilter(src, dest, opts);
1232
+ if (!include) return;
1233
+ const destParent = path.dirname(dest);
1234
+ const dirExists = await pathExists(destParent);
1235
+ if (!dirExists) {
1236
+ await mkdirs(destParent);
1237
+ }
1238
+ await getStatsAndPerformCopy(destStat, src, dest, opts);
1239
+ }
1240
+ async function runFilter(src, dest, opts) {
1241
+ if (!opts.filter) return true;
1242
+ return opts.filter(src, dest);
1243
+ }
1244
+ async function getStatsAndPerformCopy(destStat, src, dest, opts) {
1245
+ const statFn = opts.dereference ? fs.stat : fs.lstat;
1246
+ const srcStat = await statFn(src);
1247
+ if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
1248
+ if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
1249
+ if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts);
1250
+ if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`);
1251
+ if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`);
1252
+ throw new Error(`Unknown file: ${src}`);
1253
+ }
1254
+ async function onFile(srcStat, destStat, src, dest, opts) {
1255
+ if (!destStat) return copyFile(srcStat, src, dest, opts);
1256
+ if (opts.overwrite) {
1257
+ await fs.unlink(dest);
1258
+ return copyFile(srcStat, src, dest, opts);
1259
+ }
1260
+ if (opts.errorOnExist) {
1261
+ throw new Error(`'${dest}' already exists`);
1262
+ }
1263
+ }
1264
+ async function copyFile(srcStat, src, dest, opts) {
1265
+ await fs.copyFile(src, dest);
1266
+ if (opts.preserveTimestamps) {
1267
+ if (fileIsNotWritable(srcStat.mode)) {
1268
+ await makeFileWritable(dest, srcStat.mode);
1269
+ }
1270
+ const updatedSrcStat = await fs.stat(src);
1271
+ await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
1272
+ }
1273
+ return fs.chmod(dest, srcStat.mode);
1274
+ }
1275
+ function fileIsNotWritable(srcMode) {
1276
+ return (srcMode & 128) === 0;
1277
+ }
1278
+ function makeFileWritable(dest, srcMode) {
1279
+ return fs.chmod(dest, srcMode | 128);
1280
+ }
1281
+ async function onDir(srcStat, destStat, src, dest, opts) {
1282
+ if (!destStat) {
1283
+ await fs.mkdir(dest);
1284
+ }
1285
+ await asyncIteratorConcurrentProcess(await fs.opendir(src), async (item) => {
1286
+ const srcItem = path.join(src, item.name);
1287
+ const destItem = path.join(dest, item.name);
1288
+ const include = await runFilter(srcItem, destItem, opts);
1289
+ if (include) {
1290
+ const { destStat: destStat2 } = await stat.checkPaths(srcItem, destItem, "copy", opts);
1291
+ await getStatsAndPerformCopy(destStat2, srcItem, destItem, opts);
1292
+ }
1293
+ });
1294
+ if (!destStat) {
1295
+ await fs.chmod(dest, srcStat.mode);
1296
+ }
1297
+ }
1298
+ async function onLink(destStat, src, dest, opts) {
1299
+ let resolvedSrc = await fs.readlink(src);
1300
+ if (opts.dereference) {
1301
+ resolvedSrc = path.resolve(process.cwd(), resolvedSrc);
1302
+ }
1303
+ if (!destStat) {
1304
+ return fs.symlink(resolvedSrc, dest);
1305
+ }
1306
+ let resolvedDest = null;
1307
+ try {
1308
+ resolvedDest = await fs.readlink(dest);
1309
+ } catch (e) {
1310
+ if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs.symlink(resolvedSrc, dest);
1311
+ throw e;
1312
+ }
1313
+ if (opts.dereference) {
1314
+ resolvedDest = path.resolve(process.cwd(), resolvedDest);
1315
+ }
1316
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
1317
+ throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
1318
+ }
1319
+ if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
1320
+ throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
1321
+ }
1322
+ await fs.unlink(dest);
1323
+ return fs.symlink(resolvedSrc, dest);
1324
+ }
1325
+ module.exports = copy;
1326
+ }
1327
+ });
1328
+
1329
+ // node_modules/fs-extra/lib/copy/copy-sync.js
1330
+ var require_copy_sync = __commonJS({
1331
+ "node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module) {
1332
+ "use strict";
1333
+ var fs = require_graceful_fs();
1334
+ var path = __require("path");
1335
+ var mkdirsSync = require_mkdirs().mkdirsSync;
1336
+ var utimesMillisSync = require_utimes().utimesMillisSync;
1337
+ var stat = require_stat();
1338
+ function copySync(src, dest, opts) {
1339
+ if (typeof opts === "function") {
1340
+ opts = { filter: opts };
1341
+ }
1342
+ opts = opts || {};
1343
+ opts.clobber = "clobber" in opts ? !!opts.clobber : true;
1344
+ opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
1345
+ if (opts.preserveTimestamps && process.arch === "ia32") {
1346
+ process.emitWarning(
1347
+ "Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269",
1348
+ "Warning",
1349
+ "fs-extra-WARN0002"
1350
+ );
1351
+ }
1352
+ const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
1353
+ stat.checkParentPathsSync(src, srcStat, dest, "copy");
1354
+ if (opts.filter && !opts.filter(src, dest)) return;
1355
+ const destParent = path.dirname(dest);
1356
+ if (!fs.existsSync(destParent)) mkdirsSync(destParent);
1357
+ return getStats(destStat, src, dest, opts);
1358
+ }
1359
+ function getStats(destStat, src, dest, opts) {
1360
+ const statSync = opts.dereference ? fs.statSync : fs.lstatSync;
1361
+ const srcStat = statSync(src);
1362
+ if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
1363
+ else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
1364
+ else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts);
1365
+ else if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`);
1366
+ else if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`);
1367
+ throw new Error(`Unknown file: ${src}`);
1368
+ }
1369
+ function onFile(srcStat, destStat, src, dest, opts) {
1370
+ if (!destStat) return copyFile(srcStat, src, dest, opts);
1371
+ return mayCopyFile(srcStat, src, dest, opts);
1372
+ }
1373
+ function mayCopyFile(srcStat, src, dest, opts) {
1374
+ if (opts.overwrite) {
1375
+ fs.unlinkSync(dest);
1376
+ return copyFile(srcStat, src, dest, opts);
1377
+ } else if (opts.errorOnExist) {
1378
+ throw new Error(`'${dest}' already exists`);
1379
+ }
1380
+ }
1381
+ function copyFile(srcStat, src, dest, opts) {
1382
+ fs.copyFileSync(src, dest);
1383
+ if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest);
1384
+ return setDestMode(dest, srcStat.mode);
1385
+ }
1386
+ function handleTimestamps(srcMode, src, dest) {
1387
+ if (fileIsNotWritable(srcMode)) makeFileWritable(dest, srcMode);
1388
+ return setDestTimestamps(src, dest);
1389
+ }
1390
+ function fileIsNotWritable(srcMode) {
1391
+ return (srcMode & 128) === 0;
1392
+ }
1393
+ function makeFileWritable(dest, srcMode) {
1394
+ return setDestMode(dest, srcMode | 128);
1395
+ }
1396
+ function setDestMode(dest, srcMode) {
1397
+ return fs.chmodSync(dest, srcMode);
1398
+ }
1399
+ function setDestTimestamps(src, dest) {
1400
+ const updatedSrcStat = fs.statSync(src);
1401
+ return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
1402
+ }
1403
+ function onDir(srcStat, destStat, src, dest, opts) {
1404
+ if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts);
1405
+ return copyDir(src, dest, opts);
1406
+ }
1407
+ function mkDirAndCopy(srcMode, src, dest, opts) {
1408
+ fs.mkdirSync(dest);
1409
+ copyDir(src, dest, opts);
1410
+ return setDestMode(dest, srcMode);
1411
+ }
1412
+ function copyDir(src, dest, opts) {
1413
+ const dir = fs.opendirSync(src);
1414
+ try {
1415
+ let dirent;
1416
+ while ((dirent = dir.readSync()) !== null) {
1417
+ copyDirItem(dirent.name, src, dest, opts);
1418
+ }
1419
+ } finally {
1420
+ dir.closeSync();
1421
+ }
1422
+ }
1423
+ function copyDirItem(item, src, dest, opts) {
1424
+ const srcItem = path.join(src, item);
1425
+ const destItem = path.join(dest, item);
1426
+ if (opts.filter && !opts.filter(srcItem, destItem)) return;
1427
+ const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
1428
+ return getStats(destStat, srcItem, destItem, opts);
1429
+ }
1430
+ function onLink(destStat, src, dest, opts) {
1431
+ let resolvedSrc = fs.readlinkSync(src);
1432
+ if (opts.dereference) {
1433
+ resolvedSrc = path.resolve(process.cwd(), resolvedSrc);
1434
+ }
1435
+ if (!destStat) {
1436
+ return fs.symlinkSync(resolvedSrc, dest);
1437
+ } else {
1438
+ let resolvedDest;
1439
+ try {
1440
+ resolvedDest = fs.readlinkSync(dest);
1441
+ } catch (err) {
1442
+ if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs.symlinkSync(resolvedSrc, dest);
1443
+ throw err;
1444
+ }
1445
+ if (opts.dereference) {
1446
+ resolvedDest = path.resolve(process.cwd(), resolvedDest);
1447
+ }
1448
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
1449
+ throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
1450
+ }
1451
+ if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
1452
+ throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
1453
+ }
1454
+ return copyLink(resolvedSrc, dest);
1455
+ }
1456
+ }
1457
+ function copyLink(resolvedSrc, dest) {
1458
+ fs.unlinkSync(dest);
1459
+ return fs.symlinkSync(resolvedSrc, dest);
1460
+ }
1461
+ module.exports = copySync;
1462
+ }
1463
+ });
1464
+
1465
+ // node_modules/fs-extra/lib/copy/index.js
1466
+ var require_copy2 = __commonJS({
1467
+ "node_modules/fs-extra/lib/copy/index.js"(exports, module) {
1468
+ "use strict";
1469
+ var u = require_universalify().fromPromise;
1470
+ module.exports = {
1471
+ copy: u(require_copy()),
1472
+ copySync: require_copy_sync()
1473
+ };
1474
+ }
1475
+ });
1476
+
1477
+ // node_modules/fs-extra/lib/remove/index.js
1478
+ var require_remove = __commonJS({
1479
+ "node_modules/fs-extra/lib/remove/index.js"(exports, module) {
1480
+ "use strict";
1481
+ var fs = require_graceful_fs();
1482
+ var u = require_universalify().fromCallback;
1483
+ function remove(path, callback) {
1484
+ fs.rm(path, { recursive: true, force: true }, callback);
1485
+ }
1486
+ function removeSync(path) {
1487
+ fs.rmSync(path, { recursive: true, force: true });
1488
+ }
1489
+ module.exports = {
1490
+ remove: u(remove),
1491
+ removeSync
1492
+ };
1493
+ }
1494
+ });
1495
+
1496
+ // node_modules/fs-extra/lib/empty/index.js
1497
+ var require_empty = __commonJS({
1498
+ "node_modules/fs-extra/lib/empty/index.js"(exports, module) {
1499
+ "use strict";
1500
+ var u = require_universalify().fromPromise;
1501
+ var fs = require_fs();
1502
+ var path = __require("path");
1503
+ var mkdir = require_mkdirs();
1504
+ var remove = require_remove();
1505
+ var emptyDir = u(async function emptyDir2(dir) {
1506
+ let items;
1507
+ try {
1508
+ items = await fs.readdir(dir);
1509
+ } catch {
1510
+ return mkdir.mkdirs(dir);
1511
+ }
1512
+ return Promise.all(items.map((item) => remove.remove(path.join(dir, item))));
1513
+ });
1514
+ function emptyDirSync(dir) {
1515
+ let items;
1516
+ try {
1517
+ items = fs.readdirSync(dir);
1518
+ } catch {
1519
+ return mkdir.mkdirsSync(dir);
1520
+ }
1521
+ items.forEach((item) => {
1522
+ item = path.join(dir, item);
1523
+ remove.removeSync(item);
1524
+ });
1525
+ }
1526
+ module.exports = {
1527
+ emptyDirSync,
1528
+ emptydirSync: emptyDirSync,
1529
+ emptyDir,
1530
+ emptydir: emptyDir
1531
+ };
1532
+ }
1533
+ });
1534
+
1535
+ // node_modules/fs-extra/lib/ensure/file.js
1536
+ var require_file = __commonJS({
1537
+ "node_modules/fs-extra/lib/ensure/file.js"(exports, module) {
1538
+ "use strict";
1539
+ var u = require_universalify().fromPromise;
1540
+ var path = __require("path");
1541
+ var fs = require_fs();
1542
+ var mkdir = require_mkdirs();
1543
+ async function createFile(file) {
1544
+ let stats;
1545
+ try {
1546
+ stats = await fs.stat(file);
1547
+ } catch {
1548
+ }
1549
+ if (stats && stats.isFile()) return;
1550
+ const dir = path.dirname(file);
1551
+ let dirStats = null;
1552
+ try {
1553
+ dirStats = await fs.stat(dir);
1554
+ } catch (err) {
1555
+ if (err.code === "ENOENT") {
1556
+ await mkdir.mkdirs(dir);
1557
+ await fs.writeFile(file, "");
1558
+ return;
1559
+ } else {
1560
+ throw err;
1561
+ }
1562
+ }
1563
+ if (dirStats.isDirectory()) {
1564
+ await fs.writeFile(file, "");
1565
+ } else {
1566
+ await fs.readdir(dir);
1567
+ }
1568
+ }
1569
+ function createFileSync(file) {
1570
+ let stats;
1571
+ try {
1572
+ stats = fs.statSync(file);
1573
+ } catch {
1574
+ }
1575
+ if (stats && stats.isFile()) return;
1576
+ const dir = path.dirname(file);
1577
+ try {
1578
+ if (!fs.statSync(dir).isDirectory()) {
1579
+ fs.readdirSync(dir);
1580
+ }
1581
+ } catch (err) {
1582
+ if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir);
1583
+ else throw err;
1584
+ }
1585
+ fs.writeFileSync(file, "");
1586
+ }
1587
+ module.exports = {
1588
+ createFile: u(createFile),
1589
+ createFileSync
1590
+ };
1591
+ }
1592
+ });
1593
+
1594
+ // node_modules/fs-extra/lib/ensure/link.js
1595
+ var require_link = __commonJS({
1596
+ "node_modules/fs-extra/lib/ensure/link.js"(exports, module) {
1597
+ "use strict";
1598
+ var u = require_universalify().fromPromise;
1599
+ var path = __require("path");
1600
+ var fs = require_fs();
1601
+ var mkdir = require_mkdirs();
1602
+ var { pathExists } = require_path_exists();
1603
+ var { areIdentical } = require_stat();
1604
+ async function createLink(srcpath, dstpath) {
1605
+ let dstStat;
1606
+ try {
1607
+ dstStat = await fs.lstat(dstpath);
1608
+ } catch {
1609
+ }
1610
+ let srcStat;
1611
+ try {
1612
+ srcStat = await fs.lstat(srcpath);
1613
+ } catch (err) {
1614
+ err.message = err.message.replace("lstat", "ensureLink");
1615
+ throw err;
1616
+ }
1617
+ if (dstStat && areIdentical(srcStat, dstStat)) return;
1618
+ const dir = path.dirname(dstpath);
1619
+ const dirExists = await pathExists(dir);
1620
+ if (!dirExists) {
1621
+ await mkdir.mkdirs(dir);
1622
+ }
1623
+ await fs.link(srcpath, dstpath);
1624
+ }
1625
+ function createLinkSync(srcpath, dstpath) {
1626
+ let dstStat;
1627
+ try {
1628
+ dstStat = fs.lstatSync(dstpath);
1629
+ } catch {
1630
+ }
1631
+ try {
1632
+ const srcStat = fs.lstatSync(srcpath);
1633
+ if (dstStat && areIdentical(srcStat, dstStat)) return;
1634
+ } catch (err) {
1635
+ err.message = err.message.replace("lstat", "ensureLink");
1636
+ throw err;
1637
+ }
1638
+ const dir = path.dirname(dstpath);
1639
+ const dirExists = fs.existsSync(dir);
1640
+ if (dirExists) return fs.linkSync(srcpath, dstpath);
1641
+ mkdir.mkdirsSync(dir);
1642
+ return fs.linkSync(srcpath, dstpath);
1643
+ }
1644
+ module.exports = {
1645
+ createLink: u(createLink),
1646
+ createLinkSync
1647
+ };
1648
+ }
1649
+ });
1650
+
1651
+ // node_modules/fs-extra/lib/ensure/symlink-paths.js
1652
+ var require_symlink_paths = __commonJS({
1653
+ "node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module) {
1654
+ "use strict";
1655
+ var path = __require("path");
1656
+ var fs = require_fs();
1657
+ var { pathExists } = require_path_exists();
1658
+ var u = require_universalify().fromPromise;
1659
+ async function symlinkPaths(srcpath, dstpath) {
1660
+ if (path.isAbsolute(srcpath)) {
1661
+ try {
1662
+ await fs.lstat(srcpath);
1663
+ } catch (err) {
1664
+ err.message = err.message.replace("lstat", "ensureSymlink");
1665
+ throw err;
1666
+ }
1667
+ return {
1668
+ toCwd: srcpath,
1669
+ toDst: srcpath
1670
+ };
1671
+ }
1672
+ const dstdir = path.dirname(dstpath);
1673
+ const relativeToDst = path.join(dstdir, srcpath);
1674
+ const exists = await pathExists(relativeToDst);
1675
+ if (exists) {
1676
+ return {
1677
+ toCwd: relativeToDst,
1678
+ toDst: srcpath
1679
+ };
1680
+ }
1681
+ try {
1682
+ await fs.lstat(srcpath);
1683
+ } catch (err) {
1684
+ err.message = err.message.replace("lstat", "ensureSymlink");
1685
+ throw err;
1686
+ }
1687
+ return {
1688
+ toCwd: srcpath,
1689
+ toDst: path.relative(dstdir, srcpath)
1690
+ };
1691
+ }
1692
+ function symlinkPathsSync(srcpath, dstpath) {
1693
+ if (path.isAbsolute(srcpath)) {
1694
+ const exists2 = fs.existsSync(srcpath);
1695
+ if (!exists2) throw new Error("absolute srcpath does not exist");
1696
+ return {
1697
+ toCwd: srcpath,
1698
+ toDst: srcpath
1699
+ };
1700
+ }
1701
+ const dstdir = path.dirname(dstpath);
1702
+ const relativeToDst = path.join(dstdir, srcpath);
1703
+ const exists = fs.existsSync(relativeToDst);
1704
+ if (exists) {
1705
+ return {
1706
+ toCwd: relativeToDst,
1707
+ toDst: srcpath
1708
+ };
1709
+ }
1710
+ const srcExists = fs.existsSync(srcpath);
1711
+ if (!srcExists) throw new Error("relative srcpath does not exist");
1712
+ return {
1713
+ toCwd: srcpath,
1714
+ toDst: path.relative(dstdir, srcpath)
1715
+ };
1716
+ }
1717
+ module.exports = {
1718
+ symlinkPaths: u(symlinkPaths),
1719
+ symlinkPathsSync
1720
+ };
1721
+ }
1722
+ });
1723
+
1724
+ // node_modules/fs-extra/lib/ensure/symlink-type.js
1725
+ var require_symlink_type = __commonJS({
1726
+ "node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module) {
1727
+ "use strict";
1728
+ var fs = require_fs();
1729
+ var u = require_universalify().fromPromise;
1730
+ async function symlinkType(srcpath, type) {
1731
+ if (type) return type;
1732
+ let stats;
1733
+ try {
1734
+ stats = await fs.lstat(srcpath);
1735
+ } catch {
1736
+ return "file";
1737
+ }
1738
+ return stats && stats.isDirectory() ? "dir" : "file";
1739
+ }
1740
+ function symlinkTypeSync(srcpath, type) {
1741
+ if (type) return type;
1742
+ let stats;
1743
+ try {
1744
+ stats = fs.lstatSync(srcpath);
1745
+ } catch {
1746
+ return "file";
1747
+ }
1748
+ return stats && stats.isDirectory() ? "dir" : "file";
1749
+ }
1750
+ module.exports = {
1751
+ symlinkType: u(symlinkType),
1752
+ symlinkTypeSync
1753
+ };
1754
+ }
1755
+ });
1756
+
1757
+ // node_modules/fs-extra/lib/ensure/symlink.js
1758
+ var require_symlink = __commonJS({
1759
+ "node_modules/fs-extra/lib/ensure/symlink.js"(exports, module) {
1760
+ "use strict";
1761
+ var u = require_universalify().fromPromise;
1762
+ var path = __require("path");
1763
+ var fs = require_fs();
1764
+ var { mkdirs, mkdirsSync } = require_mkdirs();
1765
+ var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
1766
+ var { symlinkType, symlinkTypeSync } = require_symlink_type();
1767
+ var { pathExists } = require_path_exists();
1768
+ var { areIdentical } = require_stat();
1769
+ async function createSymlink(srcpath, dstpath, type) {
1770
+ let stats;
1771
+ try {
1772
+ stats = await fs.lstat(dstpath);
1773
+ } catch {
1774
+ }
1775
+ if (stats && stats.isSymbolicLink()) {
1776
+ const [srcStat, dstStat] = await Promise.all([
1777
+ fs.stat(srcpath),
1778
+ fs.stat(dstpath)
1779
+ ]);
1780
+ if (areIdentical(srcStat, dstStat)) return;
1781
+ }
1782
+ const relative = await symlinkPaths(srcpath, dstpath);
1783
+ srcpath = relative.toDst;
1784
+ const toType = await symlinkType(relative.toCwd, type);
1785
+ const dir = path.dirname(dstpath);
1786
+ if (!await pathExists(dir)) {
1787
+ await mkdirs(dir);
1788
+ }
1789
+ return fs.symlink(srcpath, dstpath, toType);
1790
+ }
1791
+ function createSymlinkSync(srcpath, dstpath, type) {
1792
+ let stats;
1793
+ try {
1794
+ stats = fs.lstatSync(dstpath);
1795
+ } catch {
1796
+ }
1797
+ if (stats && stats.isSymbolicLink()) {
1798
+ const srcStat = fs.statSync(srcpath);
1799
+ const dstStat = fs.statSync(dstpath);
1800
+ if (areIdentical(srcStat, dstStat)) return;
1801
+ }
1802
+ const relative = symlinkPathsSync(srcpath, dstpath);
1803
+ srcpath = relative.toDst;
1804
+ type = symlinkTypeSync(relative.toCwd, type);
1805
+ const dir = path.dirname(dstpath);
1806
+ const exists = fs.existsSync(dir);
1807
+ if (exists) return fs.symlinkSync(srcpath, dstpath, type);
1808
+ mkdirsSync(dir);
1809
+ return fs.symlinkSync(srcpath, dstpath, type);
1810
+ }
1811
+ module.exports = {
1812
+ createSymlink: u(createSymlink),
1813
+ createSymlinkSync
1814
+ };
1815
+ }
1816
+ });
1817
+
1818
+ // node_modules/fs-extra/lib/ensure/index.js
1819
+ var require_ensure = __commonJS({
1820
+ "node_modules/fs-extra/lib/ensure/index.js"(exports, module) {
1821
+ "use strict";
1822
+ var { createFile, createFileSync } = require_file();
1823
+ var { createLink, createLinkSync } = require_link();
1824
+ var { createSymlink, createSymlinkSync } = require_symlink();
1825
+ module.exports = {
1826
+ // file
1827
+ createFile,
1828
+ createFileSync,
1829
+ ensureFile: createFile,
1830
+ ensureFileSync: createFileSync,
1831
+ // link
1832
+ createLink,
1833
+ createLinkSync,
1834
+ ensureLink: createLink,
1835
+ ensureLinkSync: createLinkSync,
1836
+ // symlink
1837
+ createSymlink,
1838
+ createSymlinkSync,
1839
+ ensureSymlink: createSymlink,
1840
+ ensureSymlinkSync: createSymlinkSync
1841
+ };
1842
+ }
1843
+ });
1844
+
1845
+ // node_modules/jsonfile/utils.js
1846
+ var require_utils2 = __commonJS({
1847
+ "node_modules/jsonfile/utils.js"(exports, module) {
1848
+ "use strict";
1849
+ function stringify(obj, { EOL = "\n", finalEOL = true, replacer = null, spaces } = {}) {
1850
+ const EOF = finalEOL ? EOL : "";
1851
+ const str = JSON.stringify(obj, replacer, spaces);
1852
+ return str.replace(/\n/g, EOL) + EOF;
1853
+ }
1854
+ function stripBom(content) {
1855
+ if (Buffer.isBuffer(content)) content = content.toString("utf8");
1856
+ return content.replace(/^\uFEFF/, "");
1857
+ }
1858
+ module.exports = { stringify, stripBom };
1859
+ }
1860
+ });
1861
+
1862
+ // node_modules/jsonfile/index.js
1863
+ var require_jsonfile = __commonJS({
1864
+ "node_modules/jsonfile/index.js"(exports, module) {
1865
+ "use strict";
1866
+ var _fs;
1867
+ try {
1868
+ _fs = require_graceful_fs();
1869
+ } catch (_) {
1870
+ _fs = __require("fs");
1871
+ }
1872
+ var universalify = require_universalify();
1873
+ var { stringify, stripBom } = require_utils2();
1874
+ async function _readFile(file, options = {}) {
1875
+ if (typeof options === "string") {
1876
+ options = { encoding: options };
1877
+ }
1878
+ const fs = options.fs || _fs;
1879
+ const shouldThrow = "throws" in options ? options.throws : true;
1880
+ let data = await universalify.fromCallback(fs.readFile)(file, options);
1881
+ data = stripBom(data);
1882
+ let obj;
1883
+ try {
1884
+ obj = JSON.parse(data, options ? options.reviver : null);
1885
+ } catch (err) {
1886
+ if (shouldThrow) {
1887
+ err.message = `${file}: ${err.message}`;
1888
+ throw err;
1889
+ } else {
1890
+ return null;
1891
+ }
1892
+ }
1893
+ return obj;
1894
+ }
1895
+ var readFile = universalify.fromPromise(_readFile);
1896
+ function readFileSync(file, options = {}) {
1897
+ if (typeof options === "string") {
1898
+ options = { encoding: options };
1899
+ }
1900
+ const fs = options.fs || _fs;
1901
+ const shouldThrow = "throws" in options ? options.throws : true;
1902
+ try {
1903
+ let content = fs.readFileSync(file, options);
1904
+ content = stripBom(content);
1905
+ return JSON.parse(content, options.reviver);
1906
+ } catch (err) {
1907
+ if (shouldThrow) {
1908
+ err.message = `${file}: ${err.message}`;
1909
+ throw err;
1910
+ } else {
1911
+ return null;
1912
+ }
1913
+ }
1914
+ }
1915
+ async function _writeFile(file, obj, options = {}) {
1916
+ const fs = options.fs || _fs;
1917
+ const str = stringify(obj, options);
1918
+ await universalify.fromCallback(fs.writeFile)(file, str, options);
1919
+ }
1920
+ var writeFile = universalify.fromPromise(_writeFile);
1921
+ function writeFileSync(file, obj, options = {}) {
1922
+ const fs = options.fs || _fs;
1923
+ const str = stringify(obj, options);
1924
+ return fs.writeFileSync(file, str, options);
1925
+ }
1926
+ module.exports = {
1927
+ readFile,
1928
+ readFileSync,
1929
+ writeFile,
1930
+ writeFileSync
1931
+ };
1932
+ }
1933
+ });
1934
+
1935
+ // node_modules/fs-extra/lib/json/jsonfile.js
1936
+ var require_jsonfile2 = __commonJS({
1937
+ "node_modules/fs-extra/lib/json/jsonfile.js"(exports, module) {
1938
+ "use strict";
1939
+ var jsonFile = require_jsonfile();
1940
+ module.exports = {
1941
+ // jsonfile exports
1942
+ readJson: jsonFile.readFile,
1943
+ readJsonSync: jsonFile.readFileSync,
1944
+ writeJson: jsonFile.writeFile,
1945
+ writeJsonSync: jsonFile.writeFileSync
1946
+ };
1947
+ }
1948
+ });
1949
+
1950
+ // node_modules/fs-extra/lib/output-file/index.js
1951
+ var require_output_file = __commonJS({
1952
+ "node_modules/fs-extra/lib/output-file/index.js"(exports, module) {
1953
+ "use strict";
1954
+ var u = require_universalify().fromPromise;
1955
+ var fs = require_fs();
1956
+ var path = __require("path");
1957
+ var mkdir = require_mkdirs();
1958
+ var pathExists = require_path_exists().pathExists;
1959
+ async function outputFile(file, data, encoding = "utf-8") {
1960
+ const dir = path.dirname(file);
1961
+ if (!await pathExists(dir)) {
1962
+ await mkdir.mkdirs(dir);
1963
+ }
1964
+ return fs.writeFile(file, data, encoding);
1965
+ }
1966
+ function outputFileSync(file, ...args) {
1967
+ const dir = path.dirname(file);
1968
+ if (!fs.existsSync(dir)) {
1969
+ mkdir.mkdirsSync(dir);
1970
+ }
1971
+ fs.writeFileSync(file, ...args);
1972
+ }
1973
+ module.exports = {
1974
+ outputFile: u(outputFile),
1975
+ outputFileSync
1976
+ };
1977
+ }
1978
+ });
1979
+
1980
+ // node_modules/fs-extra/lib/json/output-json.js
1981
+ var require_output_json = __commonJS({
1982
+ "node_modules/fs-extra/lib/json/output-json.js"(exports, module) {
1983
+ "use strict";
1984
+ var { stringify } = require_utils2();
1985
+ var { outputFile } = require_output_file();
1986
+ async function outputJson(file, data, options = {}) {
1987
+ const str = stringify(data, options);
1988
+ await outputFile(file, str, options);
1989
+ }
1990
+ module.exports = outputJson;
1991
+ }
1992
+ });
1993
+
1994
+ // node_modules/fs-extra/lib/json/output-json-sync.js
1995
+ var require_output_json_sync = __commonJS({
1996
+ "node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module) {
1997
+ "use strict";
1998
+ var { stringify } = require_utils2();
1999
+ var { outputFileSync } = require_output_file();
2000
+ function outputJsonSync(file, data, options) {
2001
+ const str = stringify(data, options);
2002
+ outputFileSync(file, str, options);
2003
+ }
2004
+ module.exports = outputJsonSync;
2005
+ }
2006
+ });
2007
+
2008
+ // node_modules/fs-extra/lib/json/index.js
2009
+ var require_json = __commonJS({
2010
+ "node_modules/fs-extra/lib/json/index.js"(exports, module) {
2011
+ "use strict";
2012
+ var u = require_universalify().fromPromise;
2013
+ var jsonFile = require_jsonfile2();
2014
+ jsonFile.outputJson = u(require_output_json());
2015
+ jsonFile.outputJsonSync = require_output_json_sync();
2016
+ jsonFile.outputJSON = jsonFile.outputJson;
2017
+ jsonFile.outputJSONSync = jsonFile.outputJsonSync;
2018
+ jsonFile.writeJSON = jsonFile.writeJson;
2019
+ jsonFile.writeJSONSync = jsonFile.writeJsonSync;
2020
+ jsonFile.readJSON = jsonFile.readJson;
2021
+ jsonFile.readJSONSync = jsonFile.readJsonSync;
2022
+ module.exports = jsonFile;
2023
+ }
2024
+ });
2025
+
2026
+ // node_modules/fs-extra/lib/move/move.js
2027
+ var require_move = __commonJS({
2028
+ "node_modules/fs-extra/lib/move/move.js"(exports, module) {
2029
+ "use strict";
2030
+ var fs = require_fs();
2031
+ var path = __require("path");
2032
+ var { copy } = require_copy2();
2033
+ var { remove } = require_remove();
2034
+ var { mkdirp } = require_mkdirs();
2035
+ var { pathExists } = require_path_exists();
2036
+ var stat = require_stat();
2037
+ async function move(src, dest, opts = {}) {
2038
+ const overwrite = opts.overwrite || opts.clobber || false;
2039
+ const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
2040
+ await stat.checkParentPaths(src, srcStat, dest, "move");
2041
+ const destParent = path.dirname(dest);
2042
+ const parsedParentPath = path.parse(destParent);
2043
+ if (parsedParentPath.root !== destParent) {
2044
+ await mkdirp(destParent);
2045
+ }
2046
+ return doRename(src, dest, overwrite, isChangingCase);
2047
+ }
2048
+ async function doRename(src, dest, overwrite, isChangingCase) {
2049
+ if (!isChangingCase) {
2050
+ if (overwrite) {
2051
+ await remove(dest);
2052
+ } else if (await pathExists(dest)) {
2053
+ throw new Error("dest already exists.");
2054
+ }
2055
+ }
2056
+ try {
2057
+ await fs.rename(src, dest);
2058
+ } catch (err) {
2059
+ if (err.code !== "EXDEV") {
2060
+ throw err;
2061
+ }
2062
+ await moveAcrossDevice(src, dest, overwrite);
2063
+ }
2064
+ }
2065
+ async function moveAcrossDevice(src, dest, overwrite) {
2066
+ const opts = {
2067
+ overwrite,
2068
+ errorOnExist: true,
2069
+ preserveTimestamps: true
2070
+ };
2071
+ await copy(src, dest, opts);
2072
+ return remove(src);
2073
+ }
2074
+ module.exports = move;
2075
+ }
2076
+ });
2077
+
2078
+ // node_modules/fs-extra/lib/move/move-sync.js
2079
+ var require_move_sync = __commonJS({
2080
+ "node_modules/fs-extra/lib/move/move-sync.js"(exports, module) {
2081
+ "use strict";
2082
+ var fs = require_graceful_fs();
2083
+ var path = __require("path");
2084
+ var copySync = require_copy2().copySync;
2085
+ var removeSync = require_remove().removeSync;
2086
+ var mkdirpSync = require_mkdirs().mkdirpSync;
2087
+ var stat = require_stat();
2088
+ function moveSync(src, dest, opts) {
2089
+ opts = opts || {};
2090
+ const overwrite = opts.overwrite || opts.clobber || false;
2091
+ const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
2092
+ stat.checkParentPathsSync(src, srcStat, dest, "move");
2093
+ if (!isParentRoot(dest)) mkdirpSync(path.dirname(dest));
2094
+ return doRename(src, dest, overwrite, isChangingCase);
2095
+ }
2096
+ function isParentRoot(dest) {
2097
+ const parent = path.dirname(dest);
2098
+ const parsedPath = path.parse(parent);
2099
+ return parsedPath.root === parent;
2100
+ }
2101
+ function doRename(src, dest, overwrite, isChangingCase) {
2102
+ if (isChangingCase) return rename(src, dest, overwrite);
2103
+ if (overwrite) {
2104
+ removeSync(dest);
2105
+ return rename(src, dest, overwrite);
2106
+ }
2107
+ if (fs.existsSync(dest)) throw new Error("dest already exists.");
2108
+ return rename(src, dest, overwrite);
2109
+ }
2110
+ function rename(src, dest, overwrite) {
2111
+ try {
2112
+ fs.renameSync(src, dest);
2113
+ } catch (err) {
2114
+ if (err.code !== "EXDEV") throw err;
2115
+ return moveAcrossDevice(src, dest, overwrite);
2116
+ }
2117
+ }
2118
+ function moveAcrossDevice(src, dest, overwrite) {
2119
+ const opts = {
2120
+ overwrite,
2121
+ errorOnExist: true,
2122
+ preserveTimestamps: true
2123
+ };
2124
+ copySync(src, dest, opts);
2125
+ return removeSync(src);
2126
+ }
2127
+ module.exports = moveSync;
2128
+ }
2129
+ });
2130
+
2131
+ // node_modules/fs-extra/lib/move/index.js
2132
+ var require_move2 = __commonJS({
2133
+ "node_modules/fs-extra/lib/move/index.js"(exports, module) {
2134
+ "use strict";
2135
+ var u = require_universalify().fromPromise;
2136
+ module.exports = {
2137
+ move: u(require_move()),
2138
+ moveSync: require_move_sync()
2139
+ };
2140
+ }
2141
+ });
2142
+
2143
+ // node_modules/fs-extra/lib/index.js
2144
+ var require_lib = __commonJS({
2145
+ "node_modules/fs-extra/lib/index.js"(exports, module) {
2146
+ "use strict";
2147
+ module.exports = {
2148
+ // Export promiseified graceful-fs:
2149
+ ...require_fs(),
2150
+ // Export extra methods:
2151
+ ...require_copy2(),
2152
+ ...require_empty(),
2153
+ ...require_ensure(),
2154
+ ...require_json(),
2155
+ ...require_mkdirs(),
2156
+ ...require_move2(),
2157
+ ...require_output_file(),
2158
+ ...require_path_exists(),
2159
+ ...require_remove()
2160
+ };
2161
+ }
2162
+ });
2163
+
2164
+ export {
2165
+ require_lib
2166
+ };