@cleocode/cleo 2026.9.7 → 2026.9.9

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 (690) hide show
  1. package/dist/cli/index.js +3766 -2232
  2. package/package.json +14 -13
  3. package/scripts/check-cleo-tarball-size.mjs +105 -0
  4. package/scripts/copy-studio-dist.mjs +33 -9
  5. package/studio-dist/client/_app/immutable/chunks/{wI_OOyoh.js → BB7zPpV2.js} +1 -1
  6. package/studio-dist/client/_app/immutable/chunks/{D8NsLz6i.js → BOnrCZaR.js} +1 -1
  7. package/studio-dist/client/_app/immutable/chunks/{TX-23QW3.js → BiaAd37T.js} +1 -1
  8. package/studio-dist/client/_app/immutable/chunks/C6jhAnil.js +1 -0
  9. package/studio-dist/client/_app/immutable/chunks/C87Q3uxm.js +1 -0
  10. package/studio-dist/client/_app/immutable/chunks/{CqF5Lomf.js → CTLGzgdN.js} +1 -1
  11. package/studio-dist/client/_app/immutable/chunks/{o1PZ6Kzq.js → CY3heNub.js} +1 -1
  12. package/studio-dist/client/_app/immutable/chunks/{RptFUp2P.js → Cge6qiwc.js} +1 -1
  13. package/studio-dist/client/_app/immutable/chunks/{BRgWBQlV.js → CnwXLaZJ.js} +1 -1
  14. package/studio-dist/client/_app/immutable/chunks/{Bxz2A0ZC.js → DEH43YwF.js} +1 -1
  15. package/studio-dist/client/_app/immutable/chunks/DGftG5oL.js +3 -0
  16. package/studio-dist/client/_app/immutable/chunks/{DVHIxkgs.js → DV2HHHkd.js} +1 -1
  17. package/studio-dist/client/_app/immutable/chunks/{eK8hf4s7.js → DXxEgUey.js} +1 -1
  18. package/studio-dist/client/_app/immutable/chunks/{CEqOYim7.js → DZrdToAH.js} +1 -1
  19. package/studio-dist/client/_app/immutable/chunks/EZwHPWle.js +2 -0
  20. package/studio-dist/client/_app/immutable/chunks/{B9psmq5-.js → rB_71s8h.js} +1 -1
  21. package/studio-dist/client/_app/immutable/chunks/{JPJd4fEI.js → rUtW7Hx6.js} +1 -1
  22. package/studio-dist/client/_app/immutable/chunks/zWFSpNUo.js +1 -0
  23. package/studio-dist/client/_app/immutable/entry/app.AR3q6Ydw.js +2 -0
  24. package/studio-dist/client/_app/immutable/entry/start.Cf2RUEwO.js +1 -0
  25. package/studio-dist/client/_app/immutable/nodes/{0.CZzEEyVh.js → 0.BEkWfyyt.js} +1 -1
  26. package/studio-dist/client/_app/immutable/nodes/{1.Bj3Opbua.js → 1.DfbrPFgR.js} +1 -1
  27. package/studio-dist/client/_app/immutable/nodes/{10.xe_Mc2Ko.js → 10.3rxHNnSx.js} +1 -1
  28. package/studio-dist/client/_app/immutable/nodes/{11.DuKPA7JD.js → 11.B6jWv3Kz.js} +1 -1
  29. package/studio-dist/client/_app/immutable/nodes/{12.BoZ_QrUS.js → 12.BrDHeTEq.js} +1 -1
  30. package/studio-dist/client/_app/immutable/nodes/{13.DFJiUiv8.js → 13.CE5bd4JV.js} +1 -1
  31. package/studio-dist/client/_app/immutable/nodes/{14.eaAlFU4w.js → 14.DgXD2LRx.js} +1 -1
  32. package/studio-dist/client/_app/immutable/nodes/{15.BfXgiwMC.js → 15.CdRO2NCB.js} +1 -1
  33. package/studio-dist/client/_app/immutable/nodes/{16.mEwy9cqh.js → 16.Cr01BBgh.js} +1 -1
  34. package/studio-dist/client/_app/immutable/nodes/{17.DP2QtQGn.js → 17.PZ1GrCot.js} +1 -1
  35. package/studio-dist/client/_app/immutable/nodes/{18.Bu0054sX.js → 18.Crly2qhe.js} +1 -1
  36. package/studio-dist/client/_app/immutable/nodes/{19.UWt6QbCm.js → 19.su55K8y_.js} +1 -1
  37. package/studio-dist/client/_app/immutable/nodes/{2.y5jKpHiR.js → 2.mqgFVWFQ.js} +1 -1
  38. package/studio-dist/client/_app/immutable/nodes/{20.B1AIHdkP.js → 20.DqQjto4P.js} +1 -1
  39. package/studio-dist/client/_app/immutable/nodes/{21.CpAN71H8.js → 21.BhwhdQCq.js} +1 -1
  40. package/studio-dist/client/_app/immutable/nodes/{22.CrYKrN4c.js → 22.BmJEWwER.js} +1 -1
  41. package/studio-dist/client/_app/immutable/nodes/{23.pGRaHQjq.js → 23.CAVIJEH-.js} +1 -1
  42. package/studio-dist/client/_app/immutable/nodes/{24.BUoUu37z.js → 24.BIypnou8.js} +1 -1
  43. package/studio-dist/client/_app/immutable/nodes/25.CllbQ5CT.js +39 -0
  44. package/studio-dist/client/_app/immutable/nodes/26.DILkE52_.js +1 -0
  45. package/studio-dist/client/_app/immutable/nodes/{28.DcmYM7lb.js → 28.D64RBcfs.js} +1 -1
  46. package/studio-dist/client/_app/immutable/nodes/{29.lbHbMqNO.js → 29.yfuBeH1x.js} +1 -1
  47. package/studio-dist/client/_app/immutable/nodes/{3.Dyir4xXj.js → 3.ChHbetZy.js} +1 -1
  48. package/studio-dist/client/_app/immutable/nodes/{30.DXj0Wm2A.js → 30.1WUv5bh9.js} +1 -1
  49. package/studio-dist/client/_app/immutable/nodes/4.D6vXYBoQ.js +1 -0
  50. package/studio-dist/client/_app/immutable/nodes/{5.VWSdP7oc.js → 5.hjw2O-4e.js} +1 -1
  51. package/studio-dist/client/_app/immutable/nodes/{6.Dl-XLwOj.js → 6.CAoDfDt6.js} +1 -1
  52. package/studio-dist/client/_app/immutable/nodes/{7.CFuC5L-y.js → 7.CLgPSQ8Z.js} +1 -1
  53. package/studio-dist/client/_app/immutable/nodes/{8.BCJ0DhOb.js → 8.zuaO1Hik.js} +1 -1
  54. package/studio-dist/client/_app/immutable/nodes/{9.Bq4SUzL9.js → 9.Cdsd85m2.js} +1 -1
  55. package/studio-dist/client/_app/version.json +1 -1
  56. package/studio-dist/server/chunks/0-BvvArN5K.js +41 -0
  57. package/studio-dist/server/chunks/1-rLPlIpIR.js +9 -0
  58. package/studio-dist/server/chunks/{10-DvOD4ksa.js → 10-CYLc3d5x.js} +3 -3
  59. package/studio-dist/server/chunks/{11-DMnBZ02H.js → 11-DcIYR5vm.js} +3 -3
  60. package/studio-dist/server/chunks/{12-CCyRyRWX.js → 12-WE1u104t.js} +3 -3
  61. package/studio-dist/server/chunks/{13-Dx1c3a_X.js → 13-joBDoxhK.js} +3 -3
  62. package/studio-dist/server/chunks/{14-Bo-dTCaZ.js → 14-Doj5F4uJ.js} +3 -3
  63. package/studio-dist/server/chunks/{15-BvUNl3KL.js → 15-BlL3H5S5.js} +3 -3
  64. package/studio-dist/server/chunks/{16-De6EzPSa.js → 16-C-UvTi7Z.js} +5 -4
  65. package/studio-dist/server/chunks/{17-CZNsiZhi.js → 17-C790IKoE.js} +10 -93
  66. package/studio-dist/server/chunks/{18-CbxxjZox.js → 18-6VS9Vgfx.js} +5 -4
  67. package/studio-dist/server/chunks/{19-DqHyladS.js → 19-BAQHPrMB.js} +3 -3
  68. package/studio-dist/server/chunks/{2-COvmA-ZA.js → 2-DXSVVaej.js} +10 -93
  69. package/studio-dist/server/chunks/20-DUG4_xXL.js +57 -0
  70. package/studio-dist/server/chunks/{21-DXK9ptAC.js → 21-qhGjkW41.js} +4 -31
  71. package/studio-dist/server/chunks/{22-DD5CLWJC.js → 22-Byy16hFA.js} +3 -3
  72. package/studio-dist/server/chunks/23-CZpFrGp4.js +97 -0
  73. package/studio-dist/server/chunks/24-CkIGZX8S.js +67 -0
  74. package/studio-dist/server/chunks/{25-CAg6Xcmn.js → 25-CHBaeXym.js} +15 -96
  75. package/studio-dist/server/chunks/{26-_nfVTvNi.js → 26-BbDd--8j.js} +12 -93
  76. package/studio-dist/server/chunks/{27-C9edghG4.js → 27-Cqzlh9gZ.js} +3 -2
  77. package/studio-dist/server/chunks/{28-VemTJGyc.js → 28-DeYe2rpm.js} +8 -62
  78. package/studio-dist/server/chunks/{29-CXP-m29t.js → 29-6pjLM0Z1.js} +10 -93
  79. package/studio-dist/server/chunks/{3-B8KhfvHp.js → 3-DMSsQV71.js} +9 -25
  80. package/studio-dist/server/chunks/{30-QiM1S4cJ.js → 30-Dw317sSW.js} +10 -93
  81. package/studio-dist/server/chunks/{31-BwdY9NnB.js → 31-Q4kHbp8j.js} +3 -2
  82. package/studio-dist/server/chunks/{4-CSaG4HjO.js → 4-C9BMSh4K.js} +4 -3
  83. package/studio-dist/server/chunks/{5-i5ry4y3C.js → 5-C0CF4WKG.js} +3 -3
  84. package/studio-dist/server/chunks/{6-DR1GWBMT.js → 6-BWyOJust.js} +3 -3
  85. package/studio-dist/server/chunks/{7-DSNwn3aQ.js → 7-CK4MK5gy.js} +3 -3
  86. package/studio-dist/server/chunks/{8-Bj0bx07K.js → 8-CiX7Xk9k.js} +3 -3
  87. package/studio-dist/server/chunks/{9-B3Tz0mZq.js → 9-Be5118w4.js} +3 -3
  88. package/studio-dist/server/chunks/{HeroHeader-v4Q9vaGr.js → HeroHeader-BrGN5WPw.js} +2 -2
  89. package/studio-dist/server/chunks/{Sparkline-BJ-GuhRd.js → Sparkline-DU_NVxz9.js} +2 -2
  90. package/studio-dist/server/chunks/{StatBlock-DHJMmOCx.js → StatBlock-jNsxycS1.js} +2 -2
  91. package/studio-dist/server/chunks/{Tabs-DzG6Bn9a.js → Tabs-DQKDflnT.js} +2 -2
  92. package/studio-dist/server/chunks/_dispatch-DTWViLGL.js +145 -0
  93. package/studio-dist/server/chunks/{_layout.svelte-BEIGQcIv.js → _layout.svelte-BjSWu4Fw.js} +7 -9
  94. package/studio-dist/server/chunks/{_page.svelte-al08ovKm.js → _page.svelte-6iMiGR11.js} +5 -5
  95. package/studio-dist/server/chunks/{_page.svelte-Byz2djto.js → _page.svelte-B-YXGvAW.js} +5 -5
  96. package/studio-dist/server/chunks/{_page.svelte-UYiF7YBK.js → _page.svelte-BCRyjlk2.js} +5 -5
  97. package/studio-dist/server/chunks/{_page.svelte-2cgtvHwW.js → _page.svelte-BdkomWnj.js} +13 -71
  98. package/studio-dist/server/chunks/{_page.svelte-CCoTp89s.js → _page.svelte-BoYafqft.js} +3 -3
  99. package/studio-dist/server/chunks/{_page.svelte-nzffIbBP.js → _page.svelte-C7Wm6_HB.js} +3 -3
  100. package/studio-dist/server/chunks/{_page.svelte-Wfx7ww_h.js → _page.svelte-CIyzbngu.js} +11 -13
  101. package/studio-dist/server/chunks/{_page.svelte-C_VSL8NW.js → _page.svelte-CmbOzJ6A.js} +13 -71
  102. package/studio-dist/server/chunks/{_page.svelte-CophUar3.js → _page.svelte-CqI6hqMm.js} +5 -5
  103. package/studio-dist/server/chunks/{_page.svelte-tYN7_LXI.js → _page.svelte-CtSwzG-R.js} +9 -11
  104. package/studio-dist/server/chunks/{_page.svelte-DYNorA0S.js → _page.svelte-Cx9Ptecp.js} +10 -67
  105. package/studio-dist/server/chunks/{_page.svelte-9OQphlnm.js → _page.svelte-D4Uf5q1X.js} +14 -69
  106. package/studio-dist/server/chunks/{_page.svelte-BIlhmugm.js → _page.svelte-DRjD44sK.js} +11 -13
  107. package/studio-dist/server/chunks/{_page.svelte-BVVTrzTL.js → _page.svelte-DaheDIRs.js} +5 -5
  108. package/studio-dist/server/chunks/{_page.svelte-DOWw416I.js → _page.svelte-DfIiE7gL.js} +11 -13
  109. package/studio-dist/server/chunks/{_page.svelte-M5D2QnMS.js → _page.svelte-Dm8y5a8S.js} +10 -67
  110. package/studio-dist/server/chunks/{_page.svelte-B_pq-Z98.js → _page.svelte-DqXxyNsF.js} +7 -7
  111. package/studio-dist/server/chunks/{_page.svelte-C3aIui4o.js → _page.svelte-DqsbnAhk.js} +4 -4
  112. package/studio-dist/server/chunks/{_page.svelte-ksTJUXce.js → _page.svelte-Dt0_c1T-.js} +3 -3
  113. package/studio-dist/server/chunks/{_page.svelte-bGhsrIjS.js → _page.svelte-Dv6iwhu7.js} +3 -3
  114. package/studio-dist/server/chunks/{_page.svelte-BXyoMME1.js → _page.svelte-GPiHej3P.js} +5 -5
  115. package/studio-dist/server/chunks/{_page.svelte-CYDjW1R0.js → _page.svelte-LuRm8XxE.js} +5 -5
  116. package/studio-dist/server/chunks/{_page.svelte-Clbkk1gm.js → _page.svelte-Z7nL9SC-.js} +8 -9
  117. package/studio-dist/server/chunks/{_page.svelte-DUWbZjC7.js → _page.svelte-_kntHS6v.js} +4 -4
  118. package/studio-dist/server/chunks/{_page.svelte-l4Z_xjl9.js → _page.svelte-k-4NCnbz.js} +9 -11
  119. package/studio-dist/server/chunks/{_page.svelte-CHzXuw2Q.js → _page.svelte-me5SUosG.js} +3 -3
  120. package/studio-dist/server/chunks/{_page.svelte-BgwL2Gyu.js → _page.svelte-sHj6UAzC.js} +11 -13
  121. package/studio-dist/server/chunks/{_server.ts-DSzRdt1U.js → _server.ts--2m_U4SL.js} +11 -94
  122. package/studio-dist/server/chunks/{_server.ts-ujoDR2_g.js → _server.ts--sGLmBsz.js} +10 -92
  123. package/studio-dist/server/chunks/{_server.ts-k2fApwOp.js → _server.ts-0ukyuE0I.js} +5 -60
  124. package/studio-dist/server/chunks/_server.ts-1eW2mTeh.js +40 -0
  125. package/studio-dist/server/chunks/{_server.ts-Bfr4u3EP.js → _server.ts-3LzqLzt0.js} +10 -92
  126. package/studio-dist/server/chunks/_server.ts-5euivmMj.js +38 -0
  127. package/studio-dist/server/chunks/{_server.ts-CShsBkeE.js → _server.ts-B0uoay97.js} +7 -23
  128. package/studio-dist/server/chunks/{_server.ts-hL92cV7Z.js → _server.ts-B5vYKkI6.js} +9 -63
  129. package/studio-dist/server/chunks/{_server.ts-_RJXtmfi.js → _server.ts-B8dTbPHd.js} +8 -23
  130. package/studio-dist/server/chunks/{_server.ts-C3Jo-ju8.js → _server.ts-BA8Xdegq.js} +10 -92
  131. package/studio-dist/server/chunks/_server.ts-BBClE0n9.js +54 -0
  132. package/studio-dist/server/chunks/{_server.ts-CJA1djzJ.js → _server.ts-BCnr9uaO.js} +8 -92
  133. package/studio-dist/server/chunks/{_server.ts-ZS1_yMwR.js → _server.ts-BDwMoyZ_.js} +6 -32
  134. package/studio-dist/server/chunks/{_server.ts-sv4pA808.js → _server.ts-BE-Uhx4N.js} +5 -46
  135. package/studio-dist/server/chunks/{_server.ts-DV6pzF-M.js → _server.ts-BSHADOUJ.js} +4 -3
  136. package/studio-dist/server/chunks/{_server.ts-BdN4AJ6o.js → _server.ts-BSgLJPPQ.js} +10 -91
  137. package/studio-dist/server/chunks/_server.ts-Bl9tMqwZ.js +159 -0
  138. package/studio-dist/server/chunks/_server.ts-BlzDnRI0.js +51 -0
  139. package/studio-dist/server/chunks/{_server.ts-DnE0f-iC.js → _server.ts-BtuemCsf.js} +4 -3
  140. package/studio-dist/server/chunks/{_server.ts-BPcErnS0.js → _server.ts-C2nYqbd9.js} +10 -92
  141. package/studio-dist/server/chunks/{_server.ts-4p6cp9ke.js → _server.ts-C6IDM_3I.js} +10 -92
  142. package/studio-dist/server/chunks/_server.ts-C8Z32vuL.js +45 -0
  143. package/studio-dist/server/chunks/_server.ts-CBXyadsy.js +26 -0
  144. package/studio-dist/server/chunks/{_server.ts-Do9RIPRo.js → _server.ts-CE6h2ATE.js} +5 -32
  145. package/studio-dist/server/chunks/_server.ts-CGROl_5b.js +122 -0
  146. package/studio-dist/server/chunks/_server.ts-CH06JVqZ.js +65 -0
  147. package/studio-dist/server/chunks/_server.ts-CNqcws-M.js +29 -0
  148. package/studio-dist/server/chunks/{_server.ts-uUx7uT2Y.js → _server.ts-CYv5YuHd.js} +6 -43
  149. package/studio-dist/server/chunks/{_server.ts-DSAv66wD.js → _server.ts-CbThsyhY.js} +4 -3
  150. package/studio-dist/server/chunks/{_server.ts-DgbY5EB3.js → _server.ts-CeQolQOK.js} +10 -92
  151. package/studio-dist/server/chunks/_server.ts-ChoGyX5C.js +61 -0
  152. package/studio-dist/server/chunks/_server.ts-CjJYkLJH.js +61 -0
  153. package/studio-dist/server/chunks/{_server.ts-lPlBUIJX.js → _server.ts-CtjArzxf.js} +5 -60
  154. package/studio-dist/server/chunks/{_server.ts-Cq60m8Pw.js → _server.ts-D3QWZwt_.js} +4 -3
  155. package/studio-dist/server/chunks/{_server.ts-CkoJ2HCW.js → _server.ts-D6wP5bCh.js} +10 -92
  156. package/studio-dist/server/chunks/{_server.ts-DwTRjS4y.js → _server.ts-D7JwQTun.js} +10 -93
  157. package/studio-dist/server/chunks/_server.ts-DKFJdXPK.js +97 -0
  158. package/studio-dist/server/chunks/_server.ts-DNAPGKEF.js +55 -0
  159. package/studio-dist/server/chunks/_server.ts-DQiTiY3E.js +78 -0
  160. package/studio-dist/server/chunks/{_server.ts-B2E7fxo9.js → _server.ts-DUPODxVZ.js} +6 -91
  161. package/studio-dist/server/chunks/{_server.ts-BT0Uq2yq.js → _server.ts-DUyeSXbV.js} +10 -92
  162. package/studio-dist/server/chunks/{_server.ts-DRVz9D-J.js → _server.ts-DY7BwZCv.js} +9 -24
  163. package/studio-dist/server/chunks/{_server.ts-Cz0zgaUV.js → _server.ts-D_E276ms.js} +3 -2
  164. package/studio-dist/server/chunks/{_server.ts-B5g3eScF.js → _server.ts-DgtmTAp5.js} +5 -60
  165. package/studio-dist/server/chunks/{_server.ts-CboRJY0Q.js → _server.ts-DhTKaw7h.js} +10 -63
  166. package/studio-dist/server/chunks/_server.ts-DqKBSCPT.js +31 -0
  167. package/studio-dist/server/chunks/{_server.ts-CpmMp5D8.js → _server.ts-DyXBNnRD.js} +4 -3
  168. package/studio-dist/server/chunks/_server.ts-DzjUpduu.js +25 -0
  169. package/studio-dist/server/chunks/{_server.ts-CGiAXy5i.js → _server.ts-Dznqw6Dg.js} +8 -23
  170. package/studio-dist/server/chunks/{_server.ts-tKMjUFUP.js → _server.ts-EVwS7UXb.js} +4 -3
  171. package/studio-dist/server/chunks/_server.ts-J17j25VG.js +62 -0
  172. package/studio-dist/server/chunks/{_server.ts-C4BcDGqS.js → _server.ts-XLV5SvjH.js} +7 -63
  173. package/studio-dist/server/chunks/_server.ts-jZgqFIJz.js +45 -0
  174. package/studio-dist/server/chunks/{_server.ts-Bw7A4zgb.js → _server.ts-lyiGGv7w.js} +5 -3
  175. package/studio-dist/server/chunks/_server.ts-n0fpsfkk.js +67 -0
  176. package/studio-dist/server/chunks/{brain-CXR7ZT7S.js → brain-xt_NeshR.js} +2 -2
  177. package/studio-dist/server/chunks/cleo-home-_XIqkZaL.js +109 -0
  178. package/studio-dist/server/chunks/{cli-action-DQcaqcfn.js → cli-action-VJPEn1pY.js} +2 -2
  179. package/studio-dist/server/chunks/{client-CgX38JBu.js → client-CrfCXSXZ.js} +5 -6
  180. package/studio-dist/server/chunks/cluster-label-layer-CysRMvhi.js +6721 -0
  181. package/studio-dist/server/chunks/connections-CWLPjwBP.js +15 -0
  182. package/studio-dist/server/chunks/{connections2-mi7mZqJM.js → connections2-DHVs5ytW.js} +32 -19
  183. package/studio-dist/server/chunks/{dev-BNpEUZI3.js → dev-Br5zieNA.js} +2 -2
  184. package/studio-dist/server/chunks/dist-BR1f34Gj.js +18726 -0
  185. package/studio-dist/server/chunks/{error.svelte-CplNulnS.js → error.svelte-CmR0NUCQ.js} +6 -8
  186. package/studio-dist/server/chunks/{explorer-loader-BN_mkt3_.js → explorer-loader-B_uCSs9_.js} +2 -2
  187. package/studio-dist/server/chunks/exports-Dg-gdPPq.js +124 -0
  188. package/studio-dist/server/chunks/{hooks.server-DBsyphiX.js → hooks.server-CWBRp8NI.js} +10 -93
  189. package/studio-dist/server/chunks/{http-CRTZe306.js → http-Dso0FRxT.js} +3 -4
  190. package/studio-dist/server/chunks/{index-server-DocJvixA.js → index-server-BgfA6C0S.js} +17 -4
  191. package/studio-dist/server/chunks/{internal-D6eWgsHJ.js → internal-DYUO6aQs.js} +56 -92
  192. package/studio-dist/server/chunks/{memory2-Cgc_4D5q.js → memory-BZHnDZzu.js} +4 -4
  193. package/studio-dist/server/chunks/{nexus-adapter-9EL_VlGI.js → nexus-adapter-D1ryYG1Z.js} +5 -5
  194. package/studio-dist/server/chunks/{no-face-up-DcejJLy-.js → no-face-up-B_3h6Hgs.js} +2 -2
  195. package/studio-dist/server/chunks/project-context-BAXQmgch.js +188 -0
  196. package/studio-dist/server/chunks/{src-BUqGet2c.js → src-D2rW9bIF.js} +422 -5
  197. package/studio-dist/server/chunks/{stores-5DmdjPCH.js → stores-CS6eY2sx.js} +3 -3
  198. package/studio-dist/server/chunks/{tasks2-Bf9VHrv-.js → tasks-sWuEmiGW.js} +2349 -9
  199. package/studio-dist/server/chunks/{ui-DR8zOSpC.js → ui-CkQ-pCs3.js} +2 -2
  200. package/studio-dist/server/chunks/utils-g564cUMV.js +151 -0
  201. package/studio-dist/server/index.js +5 -16
  202. package/studio-dist/server/manifest.js +88 -88
  203. package/dist/cli/index.js.map +0 -6
  204. package/studio-dist/client/_app/immutable/assets/parse-worker.CSEr67Qi.js +0 -1127
  205. package/studio-dist/client/_app/immutable/chunks/2mEksghu2.js +0 -1
  206. package/studio-dist/client/_app/immutable/chunks/3KebaI-z.js +0 -53
  207. package/studio-dist/client/_app/immutable/chunks/3y2yNYEk2.js +0 -3
  208. package/studio-dist/client/_app/immutable/chunks/7UXYlaI1.js +0 -1
  209. package/studio-dist/client/_app/immutable/chunks/83VLmCvk.js +0 -4
  210. package/studio-dist/client/_app/immutable/chunks/84Rhmi6r.js +0 -2
  211. package/studio-dist/client/_app/immutable/chunks/9CV9TXTg2.js +0 -92
  212. package/studio-dist/client/_app/immutable/chunks/9LFtcz24.js +0 -1
  213. package/studio-dist/client/_app/immutable/chunks/9bLMgKwu2.js +0 -1
  214. package/studio-dist/client/_app/immutable/chunks/9kKqohVR2.js +0 -37
  215. package/studio-dist/client/_app/immutable/chunks/B-Ye28EY.js +0 -7
  216. package/studio-dist/client/_app/immutable/chunks/B-jnUl7o.js +0 -1
  217. package/studio-dist/client/_app/immutable/chunks/B0ORuy8x2.js +0 -1
  218. package/studio-dist/client/_app/immutable/chunks/B0xCM1wN2.js +0 -1
  219. package/studio-dist/client/_app/immutable/chunks/B0zCN4sX.js +0 -1
  220. package/studio-dist/client/_app/immutable/chunks/B1wt-iGW.js +0 -7
  221. package/studio-dist/client/_app/immutable/chunks/B2F3KUIU.js +0 -1
  222. package/studio-dist/client/_app/immutable/chunks/B2_6RrlL2.js +0 -1
  223. package/studio-dist/client/_app/immutable/chunks/B2qKEYxA2.js +0 -1
  224. package/studio-dist/client/_app/immutable/chunks/B2u2rNyI2.js +0 -8
  225. package/studio-dist/client/_app/immutable/chunks/B3_X3Lhd2.js +0 -1
  226. package/studio-dist/client/_app/immutable/chunks/B3sNtbqf.js +0 -1
  227. package/studio-dist/client/_app/immutable/chunks/B4NQP1Ax2.js +0 -6
  228. package/studio-dist/client/_app/immutable/chunks/BAtZg5v5.js +0 -2
  229. package/studio-dist/client/_app/immutable/chunks/BB6WKLm82.js +0 -1
  230. package/studio-dist/client/_app/immutable/chunks/BBX8UDtn.js +0 -1
  231. package/studio-dist/client/_app/immutable/chunks/BBs1U1iU.js +0 -1
  232. package/studio-dist/client/_app/immutable/chunks/BEli_4Jp2.js +0 -1
  233. package/studio-dist/client/_app/immutable/chunks/BEt2wIUt.js +0 -1
  234. package/studio-dist/client/_app/immutable/chunks/BEyM8qSW2.js +0 -1
  235. package/studio-dist/client/_app/immutable/chunks/BFZA3Dsk2.js +0 -1
  236. package/studio-dist/client/_app/immutable/chunks/BGdPweG1.js +0 -2
  237. package/studio-dist/client/_app/immutable/chunks/BGiusSqE.js +0 -1
  238. package/studio-dist/client/_app/immutable/chunks/BGmpyfzD.js +0 -1
  239. package/studio-dist/client/_app/immutable/chunks/BH5rhSIR.js +0 -1
  240. package/studio-dist/client/_app/immutable/chunks/BHciFt922.js +0 -2
  241. package/studio-dist/client/_app/immutable/chunks/BHnFwTQY.js +0 -1
  242. package/studio-dist/client/_app/immutable/chunks/BIvye3XP2.js +0 -59
  243. package/studio-dist/client/_app/immutable/chunks/BJ8mcpQA2.js +0 -1
  244. package/studio-dist/client/_app/immutable/chunks/BK17qSHw.js +0 -2
  245. package/studio-dist/client/_app/immutable/chunks/BLkgUtyb.js +0 -1
  246. package/studio-dist/client/_app/immutable/chunks/BMUko3r62.js +0 -5
  247. package/studio-dist/client/_app/immutable/chunks/BMwzdEaa.js +0 -2
  248. package/studio-dist/client/_app/immutable/chunks/BQZx6brg.js +0 -2
  249. package/studio-dist/client/_app/immutable/chunks/BUPJTTTd.js +0 -2
  250. package/studio-dist/client/_app/immutable/chunks/BVNGAeZe2.js +0 -146
  251. package/studio-dist/client/_app/immutable/chunks/BWfLryGm.js +0 -1
  252. package/studio-dist/client/_app/immutable/chunks/BXIfeogw.js +0 -1
  253. package/studio-dist/client/_app/immutable/chunks/BXTfFyUU.js +0 -1
  254. package/studio-dist/client/_app/immutable/chunks/BYJC6_MM.js +0 -2
  255. package/studio-dist/client/_app/immutable/chunks/BZV1ZJzH.js +0 -2
  256. package/studio-dist/client/_app/immutable/chunks/BZu9rehd.js +0 -1
  257. package/studio-dist/client/_app/immutable/chunks/Bbzm48C52.js +0 -1
  258. package/studio-dist/client/_app/immutable/chunks/BfGnlwjH.js +0 -1
  259. package/studio-dist/client/_app/immutable/chunks/Bfjb9LPp.js +0 -2
  260. package/studio-dist/client/_app/immutable/chunks/BieFfu-R.js +0 -1
  261. package/studio-dist/client/_app/immutable/chunks/Bmv63uXe2.js +0 -1
  262. package/studio-dist/client/_app/immutable/chunks/BtBW1A0u.js +0 -1
  263. package/studio-dist/client/_app/immutable/chunks/BxISGQCl2.js +0 -1
  264. package/studio-dist/client/_app/immutable/chunks/ByNR_KvT.js +0 -2
  265. package/studio-dist/client/_app/immutable/chunks/BzjhD6Hr2.js +0 -2
  266. package/studio-dist/client/_app/immutable/chunks/BzpWnq0c2.js +0 -1
  267. package/studio-dist/client/_app/immutable/chunks/C-yJVcyI2.js +0 -1
  268. package/studio-dist/client/_app/immutable/chunks/C0cQ-8kS2.js +0 -1
  269. package/studio-dist/client/_app/immutable/chunks/C1vWmhYe.js +0 -48
  270. package/studio-dist/client/_app/immutable/chunks/C1w6bBje.js +0 -1
  271. package/studio-dist/client/_app/immutable/chunks/C243sn7r.js +0 -4
  272. package/studio-dist/client/_app/immutable/chunks/C2oZaDvt.js +0 -67
  273. package/studio-dist/client/_app/immutable/chunks/C3OziSQx.js +0 -1
  274. package/studio-dist/client/_app/immutable/chunks/C3hFPbMK.js +0 -2
  275. package/studio-dist/client/_app/immutable/chunks/C4P9oFvU2.js +0 -6
  276. package/studio-dist/client/_app/immutable/chunks/C5Nlanei.js +0 -8
  277. package/studio-dist/client/_app/immutable/chunks/C6KBAXPl.js +0 -15
  278. package/studio-dist/client/_app/immutable/chunks/C8MZnWta.js +0 -1
  279. package/studio-dist/client/_app/immutable/chunks/CAoan3K12.js +0 -1
  280. package/studio-dist/client/_app/immutable/chunks/CBpcINYH.js +0 -29
  281. package/studio-dist/client/_app/immutable/chunks/CE7phgWq.js +0 -1
  282. package/studio-dist/client/_app/immutable/chunks/CFb4Co_K.js +0 -2
  283. package/studio-dist/client/_app/immutable/chunks/CGWoRK3t2.js +0 -1
  284. package/studio-dist/client/_app/immutable/chunks/CH3t4xo1.js +0 -1
  285. package/studio-dist/client/_app/immutable/chunks/CHJgk6g-.js +0 -1
  286. package/studio-dist/client/_app/immutable/chunks/CHgPjuDQ.js +0 -17
  287. package/studio-dist/client/_app/immutable/chunks/CHkCZrnr.js +0 -1
  288. package/studio-dist/client/_app/immutable/chunks/CI_91WUN.js +0 -4
  289. package/studio-dist/client/_app/immutable/chunks/CJ7-hP0H.js +0 -1
  290. package/studio-dist/client/_app/immutable/chunks/CKIrNnkY2.js +0 -1
  291. package/studio-dist/client/_app/immutable/chunks/CKoQ7Ko5.js +0 -1
  292. package/studio-dist/client/_app/immutable/chunks/CM8O4zqs.js +0 -56
  293. package/studio-dist/client/_app/immutable/chunks/CMz3AVRO.js +0 -1
  294. package/studio-dist/client/_app/immutable/chunks/CNToUR3P.js +0 -13
  295. package/studio-dist/client/_app/immutable/chunks/CNuQG1yl2.js +0 -1
  296. package/studio-dist/client/_app/immutable/chunks/CQLIZtxj.js +0 -2
  297. package/studio-dist/client/_app/immutable/chunks/CQYVNgM0.js +0 -20
  298. package/studio-dist/client/_app/immutable/chunks/CQeVOmFO2.js +0 -1
  299. package/studio-dist/client/_app/immutable/chunks/CSPHHq09.js +0 -1
  300. package/studio-dist/client/_app/immutable/chunks/CTJEdbIn.js +0 -1
  301. package/studio-dist/client/_app/immutable/chunks/CTTT3wYw.js +0 -35
  302. package/studio-dist/client/_app/immutable/chunks/CV4ck7fz.js +0 -2
  303. package/studio-dist/client/_app/immutable/chunks/CXQrVnHf.js +0 -11
  304. package/studio-dist/client/_app/immutable/chunks/CXTCtOUQ.js +0 -1
  305. package/studio-dist/client/_app/immutable/chunks/C_CsU7Qq.js +0 -1
  306. package/studio-dist/client/_app/immutable/chunks/C_IZx3682.js +0 -2
  307. package/studio-dist/client/_app/immutable/chunks/CbTnu2Po2.js +0 -1
  308. package/studio-dist/client/_app/immutable/chunks/Cba8RZ1a2.js +0 -8
  309. package/studio-dist/client/_app/immutable/chunks/Cc8xxDr5.js +0 -1
  310. package/studio-dist/client/_app/immutable/chunks/CdPxoldu.js +0 -1
  311. package/studio-dist/client/_app/immutable/chunks/CdqDTozW.js +0 -1
  312. package/studio-dist/client/_app/immutable/chunks/CdsmcCfC.js +0 -25
  313. package/studio-dist/client/_app/immutable/chunks/CeYPAoY9.js +0 -1
  314. package/studio-dist/client/_app/immutable/chunks/Cf4kGS9y.js +0 -1
  315. package/studio-dist/client/_app/immutable/chunks/CfWEqXtJ2.js +0 -1
  316. package/studio-dist/client/_app/immutable/chunks/Cg7Wj2b9.js +0 -2
  317. package/studio-dist/client/_app/immutable/chunks/CgTpKZfi2.js +0 -1
  318. package/studio-dist/client/_app/immutable/chunks/Chpy9ca7.js +0 -2
  319. package/studio-dist/client/_app/immutable/chunks/CiLKuLrQ.js +0 -4
  320. package/studio-dist/client/_app/immutable/chunks/CjNDJjwu.js +0 -1
  321. package/studio-dist/client/_app/immutable/chunks/Cjde0ZKr2.js +0 -1
  322. package/studio-dist/client/_app/immutable/chunks/Cjgnade02.js +0 -3
  323. package/studio-dist/client/_app/immutable/chunks/Ckp90om52.js +0 -2
  324. package/studio-dist/client/_app/immutable/chunks/ClAPVhCD.js +0 -1
  325. package/studio-dist/client/_app/immutable/chunks/ClT89UdO.js +0 -11
  326. package/studio-dist/client/_app/immutable/chunks/CnJf5tML.js +0 -1
  327. package/studio-dist/client/_app/immutable/chunks/CpF4Rrcc2.js +0 -1
  328. package/studio-dist/client/_app/immutable/chunks/CqCka5yX2.js +0 -1
  329. package/studio-dist/client/_app/immutable/chunks/CqtqZrOl.js +0 -1
  330. package/studio-dist/client/_app/immutable/chunks/CrJdywQt.js +0 -1
  331. package/studio-dist/client/_app/immutable/chunks/Cs0zC2l2.js +0 -1
  332. package/studio-dist/client/_app/immutable/chunks/CsMn5fBs.js +0 -141
  333. package/studio-dist/client/_app/immutable/chunks/CsvKLHQQ2.js +0 -2
  334. package/studio-dist/client/_app/immutable/chunks/Ctaresvj.js +0 -1
  335. package/studio-dist/client/_app/immutable/chunks/Ctetf8vc2.js +0 -2
  336. package/studio-dist/client/_app/immutable/chunks/Cv7yW6MG.js +0 -1
  337. package/studio-dist/client/_app/immutable/chunks/CxRIz-Zd.js +0 -1
  338. package/studio-dist/client/_app/immutable/chunks/CxbvtjIH.js +0 -3
  339. package/studio-dist/client/_app/immutable/chunks/CxfeoXkZ.js +0 -2
  340. package/studio-dist/client/_app/immutable/chunks/CySLscL2.js +0 -2
  341. package/studio-dist/client/_app/immutable/chunks/D0PKQAbM.js +0 -87
  342. package/studio-dist/client/_app/immutable/chunks/D0WQsLTu.js +0 -1
  343. package/studio-dist/client/_app/immutable/chunks/D1LBVx6r2.js +0 -1
  344. package/studio-dist/client/_app/immutable/chunks/D1NlFXu9.js +0 -1
  345. package/studio-dist/client/_app/immutable/chunks/D1QfC4hu2.js +0 -1
  346. package/studio-dist/client/_app/immutable/chunks/D1yrHAn72.js +0 -1
  347. package/studio-dist/client/_app/immutable/chunks/D2pa4reh.js +0 -7
  348. package/studio-dist/client/_app/immutable/chunks/D3QsWcIw2.js +0 -2
  349. package/studio-dist/client/_app/immutable/chunks/D4OkQuPl2.js +0 -1
  350. package/studio-dist/client/_app/immutable/chunks/D6UDnATk2.js +0 -1
  351. package/studio-dist/client/_app/immutable/chunks/D7w7HllH.js +0 -38
  352. package/studio-dist/client/_app/immutable/chunks/D93KpglN.js +0 -1
  353. package/studio-dist/client/_app/immutable/chunks/D99fQj2G2.js +0 -1
  354. package/studio-dist/client/_app/immutable/chunks/DB5ifLM-.js +0 -3
  355. package/studio-dist/client/_app/immutable/chunks/DBhP8ifO2.js +0 -15
  356. package/studio-dist/client/_app/immutable/chunks/DF_4OWhj.js +0 -2
  357. package/studio-dist/client/_app/immutable/chunks/DFpNK1vs2.js +0 -1
  358. package/studio-dist/client/_app/immutable/chunks/DGRYMk-W.js +0 -142
  359. package/studio-dist/client/_app/immutable/chunks/DH3CcQwq.js +0 -1
  360. package/studio-dist/client/_app/immutable/chunks/DHQfJeLU.js +0 -4
  361. package/studio-dist/client/_app/immutable/chunks/DL89yEDy2.js +0 -1
  362. package/studio-dist/client/_app/immutable/chunks/DLRku_0p2.js +0 -2
  363. package/studio-dist/client/_app/immutable/chunks/DMZkjPYT2.js +0 -1
  364. package/studio-dist/client/_app/immutable/chunks/DNP72foU.js +0 -1
  365. package/studio-dist/client/_app/immutable/chunks/DO2GztVm.js +0 -1
  366. package/studio-dist/client/_app/immutable/chunks/DOVNXmCK2.js +0 -1
  367. package/studio-dist/client/_app/immutable/chunks/DOqzs8kl2.js +0 -1
  368. package/studio-dist/client/_app/immutable/chunks/DQnR63hh2.js +0 -7
  369. package/studio-dist/client/_app/immutable/chunks/DTxtWPkw.js +0 -1
  370. package/studio-dist/client/_app/immutable/chunks/DVDgCC9A2.js +0 -20
  371. package/studio-dist/client/_app/immutable/chunks/DVVCJYjz.js +0 -1
  372. package/studio-dist/client/_app/immutable/chunks/DWRhYUMj2.js +0 -1
  373. package/studio-dist/client/_app/immutable/chunks/DWavBJBI.js +0 -4
  374. package/studio-dist/client/_app/immutable/chunks/DXDSWRw-.js +0 -1
  375. package/studio-dist/client/_app/immutable/chunks/DXoHaH4a.js +0 -2
  376. package/studio-dist/client/_app/immutable/chunks/DXpCX2Hi.js +0 -1
  377. package/studio-dist/client/_app/immutable/chunks/DYP3EJMY.js +0 -1
  378. package/studio-dist/client/_app/immutable/chunks/DYQphR_V.js +0 -1
  379. package/studio-dist/client/_app/immutable/chunks/DYUlIivP.js +0 -1
  380. package/studio-dist/client/_app/immutable/chunks/DYo2ye8X2.js +0 -1
  381. package/studio-dist/client/_app/immutable/chunks/DYxFu8yV.js +0 -1
  382. package/studio-dist/client/_app/immutable/chunks/DZ66sRb6.js +0 -1
  383. package/studio-dist/client/_app/immutable/chunks/D_XTiylm2.js +0 -1
  384. package/studio-dist/client/_app/immutable/chunks/DaRv9jn22.js +0 -1
  385. package/studio-dist/client/_app/immutable/chunks/DaXb9i_E.js +0 -1
  386. package/studio-dist/client/_app/immutable/chunks/Dccf4VP2.js +0 -24
  387. package/studio-dist/client/_app/immutable/chunks/DdODs-Sb.js +0 -1
  388. package/studio-dist/client/_app/immutable/chunks/DdekYWer.js +0 -2
  389. package/studio-dist/client/_app/immutable/chunks/DeHaovsF.js +0 -1
  390. package/studio-dist/client/_app/immutable/chunks/DeRRkRO52.js +0 -1
  391. package/studio-dist/client/_app/immutable/chunks/DeWI5qCn.js +0 -1
  392. package/studio-dist/client/_app/immutable/chunks/DfivR-Md.js +0 -1
  393. package/studio-dist/client/_app/immutable/chunks/DgmxpSo7.js +0 -1
  394. package/studio-dist/client/_app/immutable/chunks/DhPLWrun2.js +0 -1
  395. package/studio-dist/client/_app/immutable/chunks/DhhrVdfi.js +0 -2
  396. package/studio-dist/client/_app/immutable/chunks/Djr2dbcc2.js +0 -37
  397. package/studio-dist/client/_app/immutable/chunks/DjuRo5vv.js +0 -1
  398. package/studio-dist/client/_app/immutable/chunks/Djz4EDzO.js +0 -1
  399. package/studio-dist/client/_app/immutable/chunks/DkRfaw-K2.js +0 -1
  400. package/studio-dist/client/_app/immutable/chunks/DksB5g4W2.js +0 -1
  401. package/studio-dist/client/_app/immutable/chunks/Dmqenb5z2.js +0 -1
  402. package/studio-dist/client/_app/immutable/chunks/DnbToVyf.js +0 -2
  403. package/studio-dist/client/_app/immutable/chunks/DpGZwlmj.js +0 -1
  404. package/studio-dist/client/_app/immutable/chunks/Dq0lE5C32.js +0 -1
  405. package/studio-dist/client/_app/immutable/chunks/Dq54XqHT2.js +0 -1
  406. package/studio-dist/client/_app/immutable/chunks/DqK84mbb.js +0 -1
  407. package/studio-dist/client/_app/immutable/chunks/DqjFtSJD.js +0 -2
  408. package/studio-dist/client/_app/immutable/chunks/DrKWWDpL.js +0 -1
  409. package/studio-dist/client/_app/immutable/chunks/DsQIgu-4.js +0 -1
  410. package/studio-dist/client/_app/immutable/chunks/DsqdgJHS2.js +0 -1
  411. package/studio-dist/client/_app/immutable/chunks/DtNkZUkq.js +0 -17
  412. package/studio-dist/client/_app/immutable/chunks/DutIls4V2.js +0 -1
  413. package/studio-dist/client/_app/immutable/chunks/DvxYFW4C.js +0 -1
  414. package/studio-dist/client/_app/immutable/chunks/Dwp-76GQ.js +0 -2
  415. package/studio-dist/client/_app/immutable/chunks/DxSZd548.js +0 -1
  416. package/studio-dist/client/_app/immutable/chunks/DxiUMhk0.js +0 -5
  417. package/studio-dist/client/_app/immutable/chunks/DxslLswf.js +0 -23
  418. package/studio-dist/client/_app/immutable/chunks/Dy7EjGgb2.js +0 -9
  419. package/studio-dist/client/_app/immutable/chunks/DyGQ_VXC.js +0 -3
  420. package/studio-dist/client/_app/immutable/chunks/DySe3kTV2.js +0 -1
  421. package/studio-dist/client/_app/immutable/chunks/DyzE2Uxw.js +0 -1
  422. package/studio-dist/client/_app/immutable/chunks/DzhuJaxE2.js +0 -2
  423. package/studio-dist/client/_app/immutable/chunks/FmMHyrh6.js +0 -1
  424. package/studio-dist/client/_app/immutable/chunks/Gxs0J274.js +0 -5
  425. package/studio-dist/client/_app/immutable/chunks/HwtzDYxN.js +0 -2
  426. package/studio-dist/client/_app/immutable/chunks/ITRz_Q7H2.js +0 -15
  427. package/studio-dist/client/_app/immutable/chunks/KDNP98XY2.js +0 -1
  428. package/studio-dist/client/_app/immutable/chunks/LmVjFhpk2.js +0 -1
  429. package/studio-dist/client/_app/immutable/chunks/MiAejGV_.js +0 -1
  430. package/studio-dist/client/_app/immutable/chunks/Ml4JR6Jz2.js +0 -2
  431. package/studio-dist/client/_app/immutable/chunks/NU5S3nNs2.js +0 -2
  432. package/studio-dist/client/_app/immutable/chunks/Oh5zPjv3.js +0 -2
  433. package/studio-dist/client/_app/immutable/chunks/QZkvJ9vi.js +0 -1
  434. package/studio-dist/client/_app/immutable/chunks/Rbn8UpBm.js +0 -1
  435. package/studio-dist/client/_app/immutable/chunks/SPX3gYwn2.js +0 -1
  436. package/studio-dist/client/_app/immutable/chunks/UyeQuL132.js +0 -12
  437. package/studio-dist/client/_app/immutable/chunks/VQszoXcV.js +0 -1
  438. package/studio-dist/client/_app/immutable/chunks/VtZsEMxD.js +0 -1
  439. package/studio-dist/client/_app/immutable/chunks/W2IeK61p2.js +0 -1
  440. package/studio-dist/client/_app/immutable/chunks/Wadww7ZG.js +0 -1
  441. package/studio-dist/client/_app/immutable/chunks/WgfA1zWk2.js +0 -1
  442. package/studio-dist/client/_app/immutable/chunks/WxIgAS1f.js +0 -21
  443. package/studio-dist/client/_app/immutable/chunks/XrsBoOj9.js +0 -2
  444. package/studio-dist/client/_app/immutable/chunks/Y3PX4poR.js +0 -2
  445. package/studio-dist/client/_app/immutable/chunks/YxfwqiF32.js +0 -1
  446. package/studio-dist/client/_app/immutable/chunks/Z7uO1YaO.js +0 -1
  447. package/studio-dist/client/_app/immutable/chunks/_4ykQk_8.js +0 -1
  448. package/studio-dist/client/_app/immutable/chunks/_kRcZFVn.js +0 -1
  449. package/studio-dist/client/_app/immutable/chunks/aQNM7eVA2.js +0 -1
  450. package/studio-dist/client/_app/immutable/chunks/bHKz_Fb2.js +0 -45
  451. package/studio-dist/client/_app/immutable/chunks/bJRyRGSZ.js +0 -1
  452. package/studio-dist/client/_app/immutable/chunks/dlzF6lnR.js +0 -1
  453. package/studio-dist/client/_app/immutable/chunks/fjRbpfEr2.js +0 -26
  454. package/studio-dist/client/_app/immutable/chunks/imLk4if5.js +0 -3
  455. package/studio-dist/client/_app/immutable/chunks/lgRG0R-32.js +0 -1
  456. package/studio-dist/client/_app/immutable/chunks/mFhCjxQJ2.js +0 -1
  457. package/studio-dist/client/_app/immutable/chunks/mgnH6qYg.js +0 -1
  458. package/studio-dist/client/_app/immutable/chunks/n6M_5LoW.js +0 -1
  459. package/studio-dist/client/_app/immutable/chunks/nLIOiDZp2.js +0 -1
  460. package/studio-dist/client/_app/immutable/chunks/nab7WB3u2.js +0 -1
  461. package/studio-dist/client/_app/immutable/chunks/orUmAKoW2.js +0 -1
  462. package/studio-dist/client/_app/immutable/chunks/p-fLQDfY2.js +0 -63
  463. package/studio-dist/client/_app/immutable/chunks/s0-WkOGk2.js +0 -1
  464. package/studio-dist/client/_app/immutable/chunks/sPuXfbUF.js +0 -1
  465. package/studio-dist/client/_app/immutable/chunks/t4h0vrqR2.js +0 -2
  466. package/studio-dist/client/_app/immutable/chunks/uE83FKL-.js +0 -1
  467. package/studio-dist/client/_app/immutable/chunks/uzhXlm0g2.js +0 -1
  468. package/studio-dist/client/_app/immutable/chunks/vTrEsGlD2.js +0 -1
  469. package/studio-dist/client/_app/immutable/chunks/xJgCk3dx2.js +0 -28
  470. package/studio-dist/client/_app/immutable/chunks/z0Mt579s2.js +0 -13
  471. package/studio-dist/client/_app/immutable/entry/app.BoQ7cgT2.js +0 -2
  472. package/studio-dist/client/_app/immutable/entry/start.Cg1v8DU4.js +0 -1
  473. package/studio-dist/client/_app/immutable/nodes/25.ddZ1_EFk.js +0 -1
  474. package/studio-dist/client/_app/immutable/nodes/26.6OcmQbLV.js +0 -1
  475. package/studio-dist/client/_app/immutable/nodes/4.CCjOEwVU.js +0 -1
  476. package/studio-dist/server/chunks/0-CvsKDxQ6.js +0 -126
  477. package/studio-dist/server/chunks/1-ck_x2Hf0.js +0 -9
  478. package/studio-dist/server/chunks/20-DVU22np7.js +0 -142
  479. package/studio-dist/server/chunks/23-D_tUnnoc.js +0 -181
  480. package/studio-dist/server/chunks/24-CVlymvLF.js +0 -151
  481. package/studio-dist/server/chunks/AwsRestJsonProtocol-BZuoNBmL.js +0 -416
  482. package/studio-dist/server/chunks/UnionSerde-BflIkhKj.js +0 -2653
  483. package/studio-dist/server/chunks/_dispatch-ncuRztUQ.js +0 -5597
  484. package/studio-dist/server/chunks/_server.ts-4NyKAneX.js +0 -116
  485. package/studio-dist/server/chunks/_server.ts-7hGdxdEI.js +0 -136
  486. package/studio-dist/server/chunks/_server.ts-B6b3b-yA.js +0 -131
  487. package/studio-dist/server/chunks/_server.ts-BOgGqaZp.js +0 -144
  488. package/studio-dist/server/chunks/_server.ts-BV1HiKZ0.js +0 -120
  489. package/studio-dist/server/chunks/_server.ts-BWp3g6Cr.js +0 -110
  490. package/studio-dist/server/chunks/_server.ts-C5NF-UgC.js +0 -122
  491. package/studio-dist/server/chunks/_server.ts-CDMurH5m.js +0 -2301
  492. package/studio-dist/server/chunks/_server.ts-COJHCgbq.js +0 -127
  493. package/studio-dist/server/chunks/_server.ts-CUl-Utkt.js +0 -148
  494. package/studio-dist/server/chunks/_server.ts-D0GAFJRb.js +0 -156
  495. package/studio-dist/server/chunks/_server.ts-DA6p3pmi.js +0 -117
  496. package/studio-dist/server/chunks/_server.ts-DThYFaZj.js +0 -160
  497. package/studio-dist/server/chunks/_server.ts-D_3Pm0gr.js +0 -179
  498. package/studio-dist/server/chunks/_server.ts-DcHxdMsm.js +0 -144
  499. package/studio-dist/server/chunks/_server.ts-Dlfadh2I.js +0 -144
  500. package/studio-dist/server/chunks/_server.ts-JallJnps.js +0 -240
  501. package/studio-dist/server/chunks/_server.ts-NEFTbJpM.js +0 -142
  502. package/studio-dist/server/chunks/_server.ts-d-2NvRwX.js +0 -122
  503. package/studio-dist/server/chunks/_server.ts-rUWMLkIw.js +0 -146
  504. package/studio-dist/server/chunks/abort-events-CDRAJSqb.js +0 -30
  505. package/studio-dist/server/chunks/adapters-BkMgPNUM.js +0 -359
  506. package/studio-dist/server/chunks/adapters2-CQ3PzoaK.js +0 -28
  507. package/studio-dist/server/chunks/api-mode2-3W-I1-XO.js +0 -36
  508. package/studio-dist/server/chunks/api2-CmNQzb0b.js +0 -96
  509. package/studio-dist/server/chunks/attention-consolidate-CidG1jfH.js +0 -485
  510. package/studio-dist/server/chunks/audit3-DMO_fUGp.js +0 -52
  511. package/studio-dist/server/chunks/auto-extract-B84La1Vs.js +0 -34
  512. package/studio-dist/server/chunks/brain-consolidator-JGm6mzFf.js +0 -373
  513. package/studio-dist/server/chunks/brain-doctor-Dc2WqVbs.js +0 -311
  514. package/studio-dist/server/chunks/brain-embedding-Djw9ekXu.js +0 -42
  515. package/studio-dist/server/chunks/brain-lifecycle-BOOa876K.js +0 -969
  516. package/studio-dist/server/chunks/brain-maintenance-U6VvsvmK.js +0 -133
  517. package/studio-dist/server/chunks/brain-maintenance2-CwVSmfDT.js +0 -43
  518. package/studio-dist/server/chunks/brain-retrieval2-exR8mdgh.js +0 -751
  519. package/studio-dist/server/chunks/brain-search-CpSh-SNi.js +0 -48
  520. package/studio-dist/server/chunks/brain-search2-CwI2cXgg.js +0 -716
  521. package/studio-dist/server/chunks/brain-similarity-DI4yzm9e.js +0 -113
  522. package/studio-dist/server/chunks/brain-stdp2-BxSBIlSr.js +0 -960
  523. package/studio-dist/server/chunks/brain-writer-handlers-Dwu0QCAA.js +0 -188
  524. package/studio-dist/server/chunks/brain-writer-thread-6n7wI7Gy.js +0 -360
  525. package/studio-dist/server/chunks/branch-lock-Cq7zzmFK.js +0 -1118
  526. package/studio-dist/server/chunks/branch-lock2-CmDc4CZW.js +0 -45
  527. package/studio-dist/server/chunks/cancelled-child-waiver-audit-DkesrN83.js +0 -54
  528. package/studio-dist/server/chunks/catalog-model-resolver-Bas9qnoP.js +0 -9
  529. package/studio-dist/server/chunks/catalog-model-resolver2-Cexk2TN0.js +0 -237
  530. package/studio-dist/server/chunks/catalog-resolver-CLot3XJO.js +0 -260
  531. package/studio-dist/server/chunks/catalog-resolver2-JmKb91kY.js +0 -33
  532. package/studio-dist/server/chunks/chunk-DDP5xfzh.js +0 -39
  533. package/studio-dist/server/chunks/cleo-home-CCfe6kAQ.js +0 -64
  534. package/studio-dist/server/chunks/concrete-session2-bb_vxJ2N.js +0 -43
  535. package/studio-dist/server/chunks/config-DHj9CcFs.js +0 -386
  536. package/studio-dist/server/chunks/config2-F6PPIn7D.js +0 -35
  537. package/studio-dist/server/chunks/connections-BMGJVYcS.js +0 -98
  538. package/studio-dist/server/chunks/credential-pool-vF6NdtT9.js +0 -4600
  539. package/studio-dist/server/chunks/credentials-C7EJFf5O.js +0 -35
  540. package/studio-dist/server/chunks/credentials-store-CFygIuB2.js +0 -35
  541. package/studio-dist/server/chunks/cross-db-cleanup-1LWTUKPi.js +0 -147
  542. package/studio-dist/server/chunks/data-accessor-CWgVndbR.js +0 -72
  543. package/studio-dist/server/chunks/data-safety-central-DaFxK27G.js +0 -683
  544. package/studio-dist/server/chunks/decisions-CmVXV2-H.js +0 -574
  545. package/studio-dist/server/chunks/decisions2-XQsSYdxa.js +0 -48
  546. package/studio-dist/server/chunks/depends-waiver-audit-CUmlBYHx.js +0 -56
  547. package/studio-dist/server/chunks/dialectic-evaluator2-BOyyXhdI.js +0 -96
  548. package/studio-dist/server/chunks/dist-es2-DQy2Mjn_.js +0 -43
  549. package/studio-dist/server/chunks/dist-es3-CBygU4n5.js +0 -365
  550. package/studio-dist/server/chunks/dist-es4-CavbNu4B.js +0 -162
  551. package/studio-dist/server/chunks/dist-es5-Crpm8Wsl.js +0 -465
  552. package/studio-dist/server/chunks/dist-es6-CgePHzh4.js +0 -99
  553. package/studio-dist/server/chunks/dist-es7-k6c5GEd7.js +0 -311
  554. package/studio-dist/server/chunks/dist-es8-Bd9v0_pE.js +0 -91
  555. package/studio-dist/server/chunks/dist3-23bsJhRw.js +0 -27
  556. package/studio-dist/server/chunks/dist4-DmC1zSXi.js +0 -35618
  557. package/studio-dist/server/chunks/dual-scope-db-DKnWu1KM.js +0 -5672
  558. package/studio-dist/server/chunks/dual-scope-db2-Dht3luRw.js +0 -31
  559. package/studio-dist/server/chunks/duplicate-bypass-audit-BN5w1H2y.js +0 -36
  560. package/studio-dist/server/chunks/duplicate-detector-CaVFMKdE.js +0 -692
  561. package/studio-dist/server/chunks/edge-types-CgBvb0w1.js +0 -28
  562. package/studio-dist/server/chunks/embedding-local-xEnym8Ho.js +0 -92
  563. package/studio-dist/server/chunks/event-streams-Bi2p_fVo.js +0 -232
  564. package/studio-dist/server/chunks/execution-learning-BVCw7Plq.js +0 -278
  565. package/studio-dist/server/chunks/exodus-BBuuN6aA.js +0 -2594
  566. package/studio-dist/server/chunks/externalDataInterceptor-C3C4cObe.js +0 -21
  567. package/studio-dist/server/chunks/extraction-gate-DDNBq7gu.js +0 -48
  568. package/studio-dist/server/chunks/extraction-gate2-D77EZBQ6.js +0 -375
  569. package/studio-dist/server/chunks/getSSOTokenFromFile-yZAJxDci.js +0 -21
  570. package/studio-dist/server/chunks/governor2-CtfV3wfX.js +0 -923
  571. package/studio-dist/server/chunks/graph-auto-populate-Dmsr9ZJM.js +0 -42
  572. package/studio-dist/server/chunks/graph-auto-populate2-Cz0qeebM.js +0 -156
  573. package/studio-dist/server/chunks/graph-memory-bridge-CY8ft_d7.js +0 -43
  574. package/studio-dist/server/chunks/graph-memory-bridge2-Cd0XZwqc.js +0 -429
  575. package/studio-dist/server/chunks/handler-helpers-AANBGA_p.js +0 -49
  576. package/studio-dist/server/chunks/hash-Cm6yMET4.js +0 -14
  577. package/studio-dist/server/chunks/health-monitor-FepUZN1m.js +0 -106
  578. package/studio-dist/server/chunks/identity-DRpurt56.js +0 -30
  579. package/studio-dist/server/chunks/identity2-DeAB5RXE.js +0 -114
  580. package/studio-dist/server/chunks/index-61916rmV.js +0 -632
  581. package/studio-dist/server/chunks/index-DAgVDouG.js +0 -268
  582. package/studio-dist/server/chunks/index-Dtt_h58T.js +0 -2116
  583. package/studio-dist/server/chunks/indexes-DZ52grq6.js +0 -615
  584. package/studio-dist/server/chunks/json-Bfixam3g.js +0 -126
  585. package/studio-dist/server/chunks/learnings-D6Y3YGMU.js +0 -47
  586. package/studio-dist/server/chunks/learnings2-MwBdR9vb.js +0 -171
  587. package/studio-dist/server/chunks/lifecycle-ops2-V2CR5-7X.js +0 -121
  588. package/studio-dist/server/chunks/list-BhObczvn.js +0 -229
  589. package/studio-dist/server/chunks/living-brain2-j0B_Ir8j.js +0 -285
  590. package/studio-dist/server/chunks/llm-backend-resolver-D4ANvUPL.js +0 -295
  591. package/studio-dist/server/chunks/llm-extraction-DVCu4heR.js +0 -408
  592. package/studio-dist/server/chunks/loadSharedConfigFiles-umvW7kuz.js +0 -73
  593. package/studio-dist/server/chunks/loadSso-iidd5iKx.js +0 -599
  594. package/studio-dist/server/chunks/local-model-fit-B0TxifnX.js +0 -53
  595. package/studio-dist/server/chunks/local-model-fit2-BMqo6GJm.js +0 -2664
  596. package/studio-dist/server/chunks/lock-CA7d6lj7.js +0 -57
  597. package/studio-dist/server/chunks/logger-DQIoyZbq.js +0 -34
  598. package/studio-dist/server/chunks/memory-BUbicBbE.js +0 -618
  599. package/studio-dist/server/chunks/memory-accessor-i3P-RHSg.js +0 -42
  600. package/studio-dist/server/chunks/memory-accessor2-B981tHDR.js +0 -467
  601. package/studio-dist/server/chunks/memory-bridge-BOlEWg9w.js +0 -424
  602. package/studio-dist/server/chunks/memory-sqlite2-B7dq8doO.js +0 -42
  603. package/studio-dist/server/chunks/model-runner2-B71xjp4y.js +0 -43
  604. package/studio-dist/server/chunks/mvi-helpers-BNsJ8ZpQ.js +0 -59
  605. package/studio-dist/server/chunks/nexus-plasticity-BTfU8cW_.js +0 -269
  606. package/studio-dist/server/chunks/nexus-risk-audit-p379-TU5.js +0 -54
  607. package/studio-dist/server/chunks/nexus-schema-zeygY8OD.js +0 -11
  608. package/studio-dist/server/chunks/nexus-schema2-DP0Qd7CA.js +0 -444
  609. package/studio-dist/server/chunks/nexus-sqlite-BVNIpwc7.js +0 -36
  610. package/studio-dist/server/chunks/nexus-sqlite2-BBfY2xnY.js +0 -1103
  611. package/studio-dist/server/chunks/node-http-handler-CJI8kn7X.js +0 -386
  612. package/studio-dist/server/chunks/observe-Bo9veHGe.js +0 -47
  613. package/studio-dist/server/chunks/observe2-wzO0MaMY.js +0 -245
  614. package/studio-dist/server/chunks/observer-reflector-BwNOuq1d.js +0 -62
  615. package/studio-dist/server/chunks/observer-reflector2-ggtC1hmk.js +0 -478
  616. package/studio-dist/server/chunks/on-open-Wpcw7DV4.js +0 -740
  617. package/studio-dist/server/chunks/open-cleo-db--8sYNaYY.js +0 -70
  618. package/studio-dist/server/chunks/parseKnownFiles-Dg0pMFcT.js +0 -18
  619. package/studio-dist/server/chunks/parseUrl-qgGfl-Vh.js +0 -120
  620. package/studio-dist/server/chunks/paths-CV7S5-Zm.js +0 -30012
  621. package/studio-dist/server/chunks/patterns-lh5kn13I.js +0 -48
  622. package/studio-dist/server/chunks/patterns2-CzIcT-ai.js +0 -177
  623. package/studio-dist/server/chunks/pipeline-stage-IB_pOft-.js +0 -63
  624. package/studio-dist/server/chunks/prediction-D1lSGJ4c.js +0 -217
  625. package/studio-dist/server/chunks/premature-close-audit-VG09uAco.js +0 -53
  626. package/studio-dist/server/chunks/project-context-BjiqfEBi.js +0 -166
  627. package/studio-dist/server/chunks/provider-registry2-Cu7rAF0R.js +0 -35
  628. package/studio-dist/server/chunks/quality-feedback-CuCGEI6S.js +0 -371
  629. package/studio-dist/server/chunks/quality-scoring-CCPuRQmJ.js +0 -160
  630. package/studio-dist/server/chunks/query-ops-DCrjbZb9.js +0 -78
  631. package/studio-dist/server/chunks/query-promise-BkPmGPJy.js +0 -1257
  632. package/studio-dist/server/chunks/readFile-CxwXhymG.js +0 -31
  633. package/studio-dist/server/chunks/registry-CL2gN1zd.js +0 -27
  634. package/studio-dist/server/chunks/registry2-DoPYJnUW.js +0 -233
  635. package/studio-dist/server/chunks/registry3-BajEb-ll.js +0 -42
  636. package/studio-dist/server/chunks/registry4-DCqffZkT.js +0 -142
  637. package/studio-dist/server/chunks/retry-B3oEKYpp.js +0 -105
  638. package/studio-dist/server/chunks/role-executor-CC8BU54L.js +0 -25379
  639. package/studio-dist/server/chunks/role-resolver-D9QaDT0e.js +0 -6544
  640. package/studio-dist/server/chunks/role-resolver2-nkhzS1oy.js +0 -37
  641. package/studio-dist/server/chunks/rollup-CiefjN_Y.js +0 -194
  642. package/studio-dist/server/chunks/safety-data-accessor-CniDmGJO.js +0 -276
  643. package/studio-dist/server/chunks/service-connections-accessor-yBCdcgU-.js +0 -282
  644. package/studio-dist/server/chunks/session-factory-vbengc42.js +0 -96
  645. package/studio-dist/server/chunks/session-grade-BF4ZZtN_.js +0 -244
  646. package/studio-dist/server/chunks/session-journal-Bvey70Ur.js +0 -235
  647. package/studio-dist/server/chunks/session-narrative-BirZINSU.js +0 -304
  648. package/studio-dist/server/chunks/session-store--N_xHxUH.js +0 -557
  649. package/studio-dist/server/chunks/session-store2-DAM-eVTH.js +0 -43
  650. package/studio-dist/server/chunks/sessions-33DD4hkt.js +0 -2273
  651. package/studio-dist/server/chunks/sessions2-BHswKRDP.js +0 -50
  652. package/studio-dist/server/chunks/sigil-B-RznFXz.js +0 -33
  653. package/studio-dist/server/chunks/sigil2-jRMG5DuR.js +0 -47
  654. package/studio-dist/server/chunks/signin-BAsW3mM8.js +0 -644
  655. package/studio-dist/server/chunks/sleep-consolidation-BnSwXrvq.js +0 -823
  656. package/studio-dist/server/chunks/specialists-B_ZbpQlK.js +0 -441
  657. package/studio-dist/server/chunks/sqlite-Bm5LzbPs.js +0 -5977
  658. package/studio-dist/server/chunks/sqlite-backup-CFG1-b2e.js +0 -42
  659. package/studio-dist/server/chunks/sqlite-data-accessor-DD_RFX6r.js +0 -987
  660. package/studio-dist/server/chunks/sqlite-data-accessor2-CRmgNBnq.js +0 -44
  661. package/studio-dist/server/chunks/sqlite-native-BwlIqtbs.js +0 -42
  662. package/studio-dist/server/chunks/sqlite2-CUPut2fh.js +0 -42
  663. package/studio-dist/server/chunks/src2-DK8DKufK.js +0 -290
  664. package/studio-dist/server/chunks/src3-BJjf7XRG.js +0 -798
  665. package/studio-dist/server/chunks/src4-DNleK_t_.js +0 -28
  666. package/studio-dist/server/chunks/sso-oidc-eUvwseuL.js +0 -861
  667. package/studio-dist/server/chunks/storage-B9UA3BHR.js +0 -198
  668. package/studio-dist/server/chunks/sts-g7LDMLEd.js +0 -4655
  669. package/studio-dist/server/chunks/surprisal-CwTfWQi8.js +0 -224
  670. package/studio-dist/server/chunks/surprisal-tree-7dfHsuw1.js +0 -230
  671. package/studio-dist/server/chunks/system-resolver2-Bzhue_zQ.js +0 -53
  672. package/studio-dist/server/chunks/tasks-SHX7UPGY.js +0 -19694
  673. package/studio-dist/server/chunks/tasks-schema2-CTMoQKQy.js +0 -42
  674. package/studio-dist/server/chunks/temporal-supersession-DP4GPG_B.js +0 -298
  675. package/studio-dist/server/chunks/token-cAhAD9f9.js +0 -139
  676. package/studio-dist/server/chunks/token-util-D6drEz8_.js +0 -353
  677. package/studio-dist/server/chunks/token-util2-8UPSGvbb.js +0 -97
  678. package/studio-dist/server/chunks/transcript-scanner-kJWhWmlg.js +0 -53
  679. package/studio-dist/server/chunks/transformers.node-_xbxmK5p.js +0 -38475
  680. package/studio-dist/server/chunks/typed-query-l1D_QElt.js +0 -18
  681. package/studio-dist/server/chunks/unique-constraint-BZrrwgwc.js +0 -88
  682. package/studio-dist/server/chunks/update-B2YVBZG0.js +0 -1594
  683. package/studio-dist/server/chunks/user-profile-B61ZhVmC.js +0 -89
  684. package/studio-dist/server/chunks/utils-BPSZyajG.js +0 -1176
  685. package/studio-dist/server/chunks/validation-rules-CE27rtoF.js +0 -44
  686. package/studio-dist/server/chunks/zod-DsAeKNLm.js +0 -141
  687. /package/studio-dist/client/_app/immutable/chunks/{CQCxd1p9.js → B8WnZMYa.js} +0 -0
  688. /package/studio-dist/client/_app/immutable/chunks/{D13Quv9e2.js → B_0_YCYG.js} +0 -0
  689. /package/studio-dist/client/_app/immutable/chunks/{djL6V-tr.js → CqgtdAx_.js} +0 -0
  690. /package/studio-dist/client/_app/immutable/chunks/{_FU7h_8p2.js → KrUPZzXZ.js} +0 -0
@@ -1,2116 +0,0 @@
1
- import { ad as commonjsGlobal, R as getDefaultExportFromCjs } from './paths-CV7S5-Zm.js';
2
- import path from 'path';
3
- import fs$2 from 'fs';
4
- import require$$0 from 'constants';
5
- import require$$0$1 from 'stream';
6
- import require$$4 from 'util';
7
- import Mi from 'assert';
8
- import require$$1 from 'events';
9
-
10
- var properLockfile = {exports: {}};
11
-
12
- var lockfile$1 = {};
13
-
14
- var polyfills;
15
- var hasRequiredPolyfills;
16
-
17
- function requirePolyfills () {
18
- if (hasRequiredPolyfills) return polyfills;
19
- hasRequiredPolyfills = 1;
20
- var constants = require$$0;
21
-
22
- var origCwd = process.cwd;
23
- var cwd = null;
24
-
25
- var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
26
-
27
- process.cwd = function() {
28
- if (!cwd)
29
- cwd = origCwd.call(process);
30
- return cwd
31
- };
32
- try {
33
- process.cwd();
34
- } catch (er) {}
35
-
36
- // This check is needed until node.js 12 is required
37
- if (typeof process.chdir === 'function') {
38
- var chdir = process.chdir;
39
- process.chdir = function (d) {
40
- cwd = null;
41
- chdir.call(process, d);
42
- };
43
- if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
44
- }
45
-
46
- polyfills = patch;
47
-
48
- function patch (fs) {
49
- // (re-)implement some things that are known busted or missing.
50
-
51
- // lchmod, broken prior to 0.6.2
52
- // back-port the fix here.
53
- if (constants.hasOwnProperty('O_SYMLINK') &&
54
- process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
55
- patchLchmod(fs);
56
- }
57
-
58
- // lutimes implementation, or no-op
59
- if (!fs.lutimes) {
60
- patchLutimes(fs);
61
- }
62
-
63
- // https://github.com/isaacs/node-graceful-fs/issues/4
64
- // Chown should not fail on einval or eperm if non-root.
65
- // It should not fail on enosys ever, as this just indicates
66
- // that a fs doesn't support the intended operation.
67
-
68
- fs.chown = chownFix(fs.chown);
69
- fs.fchown = chownFix(fs.fchown);
70
- fs.lchown = chownFix(fs.lchown);
71
-
72
- fs.chmod = chmodFix(fs.chmod);
73
- fs.fchmod = chmodFix(fs.fchmod);
74
- fs.lchmod = chmodFix(fs.lchmod);
75
-
76
- fs.chownSync = chownFixSync(fs.chownSync);
77
- fs.fchownSync = chownFixSync(fs.fchownSync);
78
- fs.lchownSync = chownFixSync(fs.lchownSync);
79
-
80
- fs.chmodSync = chmodFixSync(fs.chmodSync);
81
- fs.fchmodSync = chmodFixSync(fs.fchmodSync);
82
- fs.lchmodSync = chmodFixSync(fs.lchmodSync);
83
-
84
- fs.stat = statFix(fs.stat);
85
- fs.fstat = statFix(fs.fstat);
86
- fs.lstat = statFix(fs.lstat);
87
-
88
- fs.statSync = statFixSync(fs.statSync);
89
- fs.fstatSync = statFixSync(fs.fstatSync);
90
- fs.lstatSync = statFixSync(fs.lstatSync);
91
-
92
- // if lchmod/lchown do not exist, then make them no-ops
93
- if (fs.chmod && !fs.lchmod) {
94
- fs.lchmod = function (path, mode, cb) {
95
- if (cb) process.nextTick(cb);
96
- };
97
- fs.lchmodSync = function () {};
98
- }
99
- if (fs.chown && !fs.lchown) {
100
- fs.lchown = function (path, uid, gid, cb) {
101
- if (cb) process.nextTick(cb);
102
- };
103
- fs.lchownSync = function () {};
104
- }
105
-
106
- // on Windows, A/V software can lock the directory, causing this
107
- // to fail with an EACCES or EPERM if the directory contains newly
108
- // created files. Try again on failure, for up to 60 seconds.
109
-
110
- // Set the timeout this long because some Windows Anti-Virus, such as Parity
111
- // bit9, may lock files for up to a minute, causing npm package install
112
- // failures. Also, take care to yield the scheduler. Windows scheduling gives
113
- // CPU to a busy looping process, which can cause the program causing the lock
114
- // contention to be starved of CPU by node, so the contention doesn't resolve.
115
- if (platform === "win32") {
116
- fs.rename = typeof fs.rename !== 'function' ? fs.rename
117
- : (function (fs$rename) {
118
- function rename (from, to, cb) {
119
- var start = Date.now();
120
- var backoff = 0;
121
- fs$rename(from, to, function CB (er) {
122
- if (er
123
- && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY")
124
- && Date.now() - start < 60000) {
125
- setTimeout(function() {
126
- fs.stat(to, function (stater, st) {
127
- if (stater && stater.code === "ENOENT")
128
- fs$rename(from, to, CB);
129
- else
130
- cb(er);
131
- });
132
- }, backoff);
133
- if (backoff < 100)
134
- backoff += 10;
135
- return;
136
- }
137
- if (cb) cb(er);
138
- });
139
- }
140
- if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
141
- return rename
142
- })(fs.rename);
143
- }
144
-
145
- // if read() returns EAGAIN, then just try it again.
146
- fs.read = typeof fs.read !== 'function' ? fs.read
147
- : (function (fs$read) {
148
- function read (fd, buffer, offset, length, position, callback_) {
149
- var callback;
150
- if (callback_ && typeof callback_ === 'function') {
151
- var eagCounter = 0;
152
- callback = function (er, _, __) {
153
- if (er && er.code === 'EAGAIN' && eagCounter < 10) {
154
- eagCounter ++;
155
- return fs$read.call(fs, fd, buffer, offset, length, position, callback)
156
- }
157
- callback_.apply(this, arguments);
158
- };
159
- }
160
- return fs$read.call(fs, fd, buffer, offset, length, position, callback)
161
- }
162
-
163
- // This ensures `util.promisify` works as it does for native `fs.read`.
164
- if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
165
- return read
166
- })(fs.read);
167
-
168
- fs.readSync = typeof fs.readSync !== 'function' ? fs.readSync
169
- : (function (fs$readSync) { return function (fd, buffer, offset, length, position) {
170
- var eagCounter = 0;
171
- while (true) {
172
- try {
173
- return fs$readSync.call(fs, fd, buffer, offset, length, position)
174
- } catch (er) {
175
- if (er.code === 'EAGAIN' && eagCounter < 10) {
176
- eagCounter ++;
177
- continue
178
- }
179
- throw er
180
- }
181
- }
182
- }})(fs.readSync);
183
-
184
- function patchLchmod (fs) {
185
- fs.lchmod = function (path, mode, callback) {
186
- fs.open( path
187
- , constants.O_WRONLY | constants.O_SYMLINK
188
- , mode
189
- , function (err, fd) {
190
- if (err) {
191
- if (callback) callback(err);
192
- return
193
- }
194
- // prefer to return the chmod error, if one occurs,
195
- // but still try to close, and report closing errors if they occur.
196
- fs.fchmod(fd, mode, function (err) {
197
- fs.close(fd, function(err2) {
198
- if (callback) callback(err || err2);
199
- });
200
- });
201
- });
202
- };
203
-
204
- fs.lchmodSync = function (path, mode) {
205
- var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode);
206
-
207
- // prefer to return the chmod error, if one occurs,
208
- // but still try to close, and report closing errors if they occur.
209
- var threw = true;
210
- var ret;
211
- try {
212
- ret = fs.fchmodSync(fd, mode);
213
- threw = false;
214
- } finally {
215
- if (threw) {
216
- try {
217
- fs.closeSync(fd);
218
- } catch (er) {}
219
- } else {
220
- fs.closeSync(fd);
221
- }
222
- }
223
- return ret
224
- };
225
- }
226
-
227
- function patchLutimes (fs) {
228
- if (constants.hasOwnProperty("O_SYMLINK") && fs.futimes) {
229
- fs.lutimes = function (path, at, mt, cb) {
230
- fs.open(path, constants.O_SYMLINK, function (er, fd) {
231
- if (er) {
232
- if (cb) cb(er);
233
- return
234
- }
235
- fs.futimes(fd, at, mt, function (er) {
236
- fs.close(fd, function (er2) {
237
- if (cb) cb(er || er2);
238
- });
239
- });
240
- });
241
- };
242
-
243
- fs.lutimesSync = function (path, at, mt) {
244
- var fd = fs.openSync(path, constants.O_SYMLINK);
245
- var ret;
246
- var threw = true;
247
- try {
248
- ret = fs.futimesSync(fd, at, mt);
249
- threw = false;
250
- } finally {
251
- if (threw) {
252
- try {
253
- fs.closeSync(fd);
254
- } catch (er) {}
255
- } else {
256
- fs.closeSync(fd);
257
- }
258
- }
259
- return ret
260
- };
261
-
262
- } else if (fs.futimes) {
263
- fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb); };
264
- fs.lutimesSync = function () {};
265
- }
266
- }
267
-
268
- function chmodFix (orig) {
269
- if (!orig) return orig
270
- return function (target, mode, cb) {
271
- return orig.call(fs, target, mode, function (er) {
272
- if (chownErOk(er)) er = null;
273
- if (cb) cb.apply(this, arguments);
274
- })
275
- }
276
- }
277
-
278
- function chmodFixSync (orig) {
279
- if (!orig) return orig
280
- return function (target, mode) {
281
- try {
282
- return orig.call(fs, target, mode)
283
- } catch (er) {
284
- if (!chownErOk(er)) throw er
285
- }
286
- }
287
- }
288
-
289
-
290
- function chownFix (orig) {
291
- if (!orig) return orig
292
- return function (target, uid, gid, cb) {
293
- return orig.call(fs, target, uid, gid, function (er) {
294
- if (chownErOk(er)) er = null;
295
- if (cb) cb.apply(this, arguments);
296
- })
297
- }
298
- }
299
-
300
- function chownFixSync (orig) {
301
- if (!orig) return orig
302
- return function (target, uid, gid) {
303
- try {
304
- return orig.call(fs, target, uid, gid)
305
- } catch (er) {
306
- if (!chownErOk(er)) throw er
307
- }
308
- }
309
- }
310
-
311
- function statFix (orig) {
312
- if (!orig) return orig
313
- // Older versions of Node erroneously returned signed integers for
314
- // uid + gid.
315
- return function (target, options, cb) {
316
- if (typeof options === 'function') {
317
- cb = options;
318
- options = null;
319
- }
320
- function callback (er, stats) {
321
- if (stats) {
322
- if (stats.uid < 0) stats.uid += 0x100000000;
323
- if (stats.gid < 0) stats.gid += 0x100000000;
324
- }
325
- if (cb) cb.apply(this, arguments);
326
- }
327
- return options ? orig.call(fs, target, options, callback)
328
- : orig.call(fs, target, callback)
329
- }
330
- }
331
-
332
- function statFixSync (orig) {
333
- if (!orig) return orig
334
- // Older versions of Node erroneously returned signed integers for
335
- // uid + gid.
336
- return function (target, options) {
337
- var stats = options ? orig.call(fs, target, options)
338
- : orig.call(fs, target);
339
- if (stats) {
340
- if (stats.uid < 0) stats.uid += 0x100000000;
341
- if (stats.gid < 0) stats.gid += 0x100000000;
342
- }
343
- return stats;
344
- }
345
- }
346
-
347
- // ENOSYS means that the fs doesn't support the op. Just ignore
348
- // that, because it doesn't matter.
349
- //
350
- // if there's no getuid, or if getuid() is something other
351
- // than 0, and the error is EINVAL or EPERM, then just ignore
352
- // it.
353
- //
354
- // This specific case is a silent failure in cp, install, tar,
355
- // and most other unix tools that manage permissions.
356
- //
357
- // When running as root, or if other types of errors are
358
- // encountered, then it's strict.
359
- function chownErOk (er) {
360
- if (!er)
361
- return true
362
-
363
- if (er.code === "ENOSYS")
364
- return true
365
-
366
- var nonroot = !process.getuid || process.getuid() !== 0;
367
- if (nonroot) {
368
- if (er.code === "EINVAL" || er.code === "EPERM")
369
- return true
370
- }
371
-
372
- return false
373
- }
374
- }
375
- return polyfills;
376
- }
377
-
378
- var legacyStreams;
379
- var hasRequiredLegacyStreams;
380
-
381
- function requireLegacyStreams () {
382
- if (hasRequiredLegacyStreams) return legacyStreams;
383
- hasRequiredLegacyStreams = 1;
384
- var Stream = require$$0$1.Stream;
385
-
386
- legacyStreams = legacy;
387
-
388
- function legacy (fs) {
389
- return {
390
- ReadStream: ReadStream,
391
- WriteStream: WriteStream
392
- }
393
-
394
- function ReadStream (path, options) {
395
- if (!(this instanceof ReadStream)) return new ReadStream(path, options);
396
-
397
- Stream.call(this);
398
-
399
- var self = this;
400
-
401
- this.path = path;
402
- this.fd = null;
403
- this.readable = true;
404
- this.paused = false;
405
-
406
- this.flags = 'r';
407
- this.mode = 438; /*=0666*/
408
- this.bufferSize = 64 * 1024;
409
-
410
- options = options || {};
411
-
412
- // Mixin options into this
413
- var keys = Object.keys(options);
414
- for (var index = 0, length = keys.length; index < length; index++) {
415
- var key = keys[index];
416
- this[key] = options[key];
417
- }
418
-
419
- if (this.encoding) this.setEncoding(this.encoding);
420
-
421
- if (this.start !== undefined) {
422
- if ('number' !== typeof this.start) {
423
- throw TypeError('start must be a Number');
424
- }
425
- if (this.end === undefined) {
426
- this.end = Infinity;
427
- } else if ('number' !== typeof this.end) {
428
- throw TypeError('end must be a Number');
429
- }
430
-
431
- if (this.start > this.end) {
432
- throw new Error('start must be <= end');
433
- }
434
-
435
- this.pos = this.start;
436
- }
437
-
438
- if (this.fd !== null) {
439
- process.nextTick(function() {
440
- self._read();
441
- });
442
- return;
443
- }
444
-
445
- fs.open(this.path, this.flags, this.mode, function (err, fd) {
446
- if (err) {
447
- self.emit('error', err);
448
- self.readable = false;
449
- return;
450
- }
451
-
452
- self.fd = fd;
453
- self.emit('open', fd);
454
- self._read();
455
- });
456
- }
457
-
458
- function WriteStream (path, options) {
459
- if (!(this instanceof WriteStream)) return new WriteStream(path, options);
460
-
461
- Stream.call(this);
462
-
463
- this.path = path;
464
- this.fd = null;
465
- this.writable = true;
466
-
467
- this.flags = 'w';
468
- this.encoding = 'binary';
469
- this.mode = 438; /*=0666*/
470
- this.bytesWritten = 0;
471
-
472
- options = options || {};
473
-
474
- // Mixin options into this
475
- var keys = Object.keys(options);
476
- for (var index = 0, length = keys.length; index < length; index++) {
477
- var key = keys[index];
478
- this[key] = options[key];
479
- }
480
-
481
- if (this.start !== undefined) {
482
- if ('number' !== typeof this.start) {
483
- throw TypeError('start must be a Number');
484
- }
485
- if (this.start < 0) {
486
- throw new Error('start must be >= zero');
487
- }
488
-
489
- this.pos = this.start;
490
- }
491
-
492
- this.busy = false;
493
- this._queue = [];
494
-
495
- if (this.fd === null) {
496
- this._open = fs.open;
497
- this._queue.push([this._open, this.path, this.flags, this.mode, undefined]);
498
- this.flush();
499
- }
500
- }
501
- }
502
- return legacyStreams;
503
- }
504
-
505
- var clone_1;
506
- var hasRequiredClone;
507
-
508
- function requireClone () {
509
- if (hasRequiredClone) return clone_1;
510
- hasRequiredClone = 1;
511
-
512
- clone_1 = clone;
513
-
514
- var getPrototypeOf = Object.getPrototypeOf || function (obj) {
515
- return obj.__proto__
516
- };
517
-
518
- function clone (obj) {
519
- if (obj === null || typeof obj !== 'object')
520
- return obj
521
-
522
- if (obj instanceof Object)
523
- var copy = { __proto__: getPrototypeOf(obj) };
524
- else
525
- var copy = Object.create(null);
526
-
527
- Object.getOwnPropertyNames(obj).forEach(function (key) {
528
- Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
529
- });
530
-
531
- return copy
532
- }
533
- return clone_1;
534
- }
535
-
536
- var gracefulFs;
537
- var hasRequiredGracefulFs;
538
-
539
- function requireGracefulFs () {
540
- if (hasRequiredGracefulFs) return gracefulFs;
541
- hasRequiredGracefulFs = 1;
542
- var fs = fs$2;
543
- var polyfills = requirePolyfills();
544
- var legacy = requireLegacyStreams();
545
- var clone = requireClone();
546
-
547
- var util = require$$4;
548
-
549
- /* istanbul ignore next - node 0.x polyfill */
550
- var gracefulQueue;
551
- var previousSymbol;
552
-
553
- /* istanbul ignore else - node 0.x polyfill */
554
- if (typeof Symbol === 'function' && typeof Symbol.for === 'function') {
555
- gracefulQueue = Symbol.for('graceful-fs.queue');
556
- // This is used in testing by future versions
557
- previousSymbol = Symbol.for('graceful-fs.previous');
558
- } else {
559
- gracefulQueue = '___graceful-fs.queue';
560
- previousSymbol = '___graceful-fs.previous';
561
- }
562
-
563
- function noop () {}
564
-
565
- function publishQueue(context, queue) {
566
- Object.defineProperty(context, gracefulQueue, {
567
- get: function() {
568
- return queue
569
- }
570
- });
571
- }
572
-
573
- var debug = noop;
574
- if (util.debuglog)
575
- debug = util.debuglog('gfs4');
576
- else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ''))
577
- debug = function() {
578
- var m = util.format.apply(util, arguments);
579
- m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ');
580
- console.error(m);
581
- };
582
-
583
- // Once time initialization
584
- if (!fs[gracefulQueue]) {
585
- // This queue can be shared by multiple loaded instances
586
- var queue = commonjsGlobal[gracefulQueue] || [];
587
- publishQueue(fs, queue);
588
-
589
- // Patch fs.close/closeSync to shared queue version, because we need
590
- // to retry() whenever a close happens *anywhere* in the program.
591
- // This is essential when multiple graceful-fs instances are
592
- // in play at the same time.
593
- fs.close = (function (fs$close) {
594
- function close (fd, cb) {
595
- return fs$close.call(fs, fd, function (err) {
596
- // This function uses the graceful-fs shared queue
597
- if (!err) {
598
- resetQueue();
599
- }
600
-
601
- if (typeof cb === 'function')
602
- cb.apply(this, arguments);
603
- })
604
- }
605
-
606
- Object.defineProperty(close, previousSymbol, {
607
- value: fs$close
608
- });
609
- return close
610
- })(fs.close);
611
-
612
- fs.closeSync = (function (fs$closeSync) {
613
- function closeSync (fd) {
614
- // This function uses the graceful-fs shared queue
615
- fs$closeSync.apply(fs, arguments);
616
- resetQueue();
617
- }
618
-
619
- Object.defineProperty(closeSync, previousSymbol, {
620
- value: fs$closeSync
621
- });
622
- return closeSync
623
- })(fs.closeSync);
624
-
625
- if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) {
626
- process.on('exit', function() {
627
- debug(fs[gracefulQueue]);
628
- Mi.equal(fs[gracefulQueue].length, 0);
629
- });
630
- }
631
- }
632
-
633
- if (!commonjsGlobal[gracefulQueue]) {
634
- publishQueue(commonjsGlobal, fs[gracefulQueue]);
635
- }
636
-
637
- gracefulFs = patch(clone(fs));
638
- if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {
639
- gracefulFs = patch(fs);
640
- fs.__patched = true;
641
- }
642
-
643
- function patch (fs) {
644
- // Everything that references the open() function needs to be in here
645
- polyfills(fs);
646
- fs.gracefulify = patch;
647
-
648
- fs.createReadStream = createReadStream;
649
- fs.createWriteStream = createWriteStream;
650
- var fs$readFile = fs.readFile;
651
- fs.readFile = readFile;
652
- function readFile (path, options, cb) {
653
- if (typeof options === 'function')
654
- cb = options, options = null;
655
-
656
- return go$readFile(path, options, cb)
657
-
658
- function go$readFile (path, options, cb, startTime) {
659
- return fs$readFile(path, options, function (err) {
660
- if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
661
- enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()]);
662
- else {
663
- if (typeof cb === 'function')
664
- cb.apply(this, arguments);
665
- }
666
- })
667
- }
668
- }
669
-
670
- var fs$writeFile = fs.writeFile;
671
- fs.writeFile = writeFile;
672
- function writeFile (path, data, options, cb) {
673
- if (typeof options === 'function')
674
- cb = options, options = null;
675
-
676
- return go$writeFile(path, data, options, cb)
677
-
678
- function go$writeFile (path, data, options, cb, startTime) {
679
- return fs$writeFile(path, data, options, function (err) {
680
- if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
681
- enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]);
682
- else {
683
- if (typeof cb === 'function')
684
- cb.apply(this, arguments);
685
- }
686
- })
687
- }
688
- }
689
-
690
- var fs$appendFile = fs.appendFile;
691
- if (fs$appendFile)
692
- fs.appendFile = appendFile;
693
- function appendFile (path, data, options, cb) {
694
- if (typeof options === 'function')
695
- cb = options, options = null;
696
-
697
- return go$appendFile(path, data, options, cb)
698
-
699
- function go$appendFile (path, data, options, cb, startTime) {
700
- return fs$appendFile(path, data, options, function (err) {
701
- if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
702
- enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]);
703
- else {
704
- if (typeof cb === 'function')
705
- cb.apply(this, arguments);
706
- }
707
- })
708
- }
709
- }
710
-
711
- var fs$copyFile = fs.copyFile;
712
- if (fs$copyFile)
713
- fs.copyFile = copyFile;
714
- function copyFile (src, dest, flags, cb) {
715
- if (typeof flags === 'function') {
716
- cb = flags;
717
- flags = 0;
718
- }
719
- return go$copyFile(src, dest, flags, cb)
720
-
721
- function go$copyFile (src, dest, flags, cb, startTime) {
722
- return fs$copyFile(src, dest, flags, function (err) {
723
- if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
724
- enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()]);
725
- else {
726
- if (typeof cb === 'function')
727
- cb.apply(this, arguments);
728
- }
729
- })
730
- }
731
- }
732
-
733
- var fs$readdir = fs.readdir;
734
- fs.readdir = readdir;
735
- var noReaddirOptionVersions = /^v[0-5]\./;
736
- function readdir (path, options, cb) {
737
- if (typeof options === 'function')
738
- cb = options, options = null;
739
-
740
- var go$readdir = noReaddirOptionVersions.test(process.version)
741
- ? function go$readdir (path, options, cb, startTime) {
742
- return fs$readdir(path, fs$readdirCallback(
743
- path, options, cb, startTime
744
- ))
745
- }
746
- : function go$readdir (path, options, cb, startTime) {
747
- return fs$readdir(path, options, fs$readdirCallback(
748
- path, options, cb, startTime
749
- ))
750
- };
751
-
752
- return go$readdir(path, options, cb)
753
-
754
- function fs$readdirCallback (path, options, cb, startTime) {
755
- return function (err, files) {
756
- if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
757
- enqueue([
758
- go$readdir,
759
- [path, options, cb],
760
- err,
761
- startTime || Date.now(),
762
- Date.now()
763
- ]);
764
- else {
765
- if (files && files.sort)
766
- files.sort();
767
-
768
- if (typeof cb === 'function')
769
- cb.call(this, err, files);
770
- }
771
- }
772
- }
773
- }
774
-
775
- if (process.version.substr(0, 4) === 'v0.8') {
776
- var legStreams = legacy(fs);
777
- ReadStream = legStreams.ReadStream;
778
- WriteStream = legStreams.WriteStream;
779
- }
780
-
781
- var fs$ReadStream = fs.ReadStream;
782
- if (fs$ReadStream) {
783
- ReadStream.prototype = Object.create(fs$ReadStream.prototype);
784
- ReadStream.prototype.open = ReadStream$open;
785
- }
786
-
787
- var fs$WriteStream = fs.WriteStream;
788
- if (fs$WriteStream) {
789
- WriteStream.prototype = Object.create(fs$WriteStream.prototype);
790
- WriteStream.prototype.open = WriteStream$open;
791
- }
792
-
793
- Object.defineProperty(fs, 'ReadStream', {
794
- get: function () {
795
- return ReadStream
796
- },
797
- set: function (val) {
798
- ReadStream = val;
799
- },
800
- enumerable: true,
801
- configurable: true
802
- });
803
- Object.defineProperty(fs, 'WriteStream', {
804
- get: function () {
805
- return WriteStream
806
- },
807
- set: function (val) {
808
- WriteStream = val;
809
- },
810
- enumerable: true,
811
- configurable: true
812
- });
813
-
814
- // legacy names
815
- var FileReadStream = ReadStream;
816
- Object.defineProperty(fs, 'FileReadStream', {
817
- get: function () {
818
- return FileReadStream
819
- },
820
- set: function (val) {
821
- FileReadStream = val;
822
- },
823
- enumerable: true,
824
- configurable: true
825
- });
826
- var FileWriteStream = WriteStream;
827
- Object.defineProperty(fs, 'FileWriteStream', {
828
- get: function () {
829
- return FileWriteStream
830
- },
831
- set: function (val) {
832
- FileWriteStream = val;
833
- },
834
- enumerable: true,
835
- configurable: true
836
- });
837
-
838
- function ReadStream (path, options) {
839
- if (this instanceof ReadStream)
840
- return fs$ReadStream.apply(this, arguments), this
841
- else
842
- return ReadStream.apply(Object.create(ReadStream.prototype), arguments)
843
- }
844
-
845
- function ReadStream$open () {
846
- var that = this;
847
- open(that.path, that.flags, that.mode, function (err, fd) {
848
- if (err) {
849
- if (that.autoClose)
850
- that.destroy();
851
-
852
- that.emit('error', err);
853
- } else {
854
- that.fd = fd;
855
- that.emit('open', fd);
856
- that.read();
857
- }
858
- });
859
- }
860
-
861
- function WriteStream (path, options) {
862
- if (this instanceof WriteStream)
863
- return fs$WriteStream.apply(this, arguments), this
864
- else
865
- return WriteStream.apply(Object.create(WriteStream.prototype), arguments)
866
- }
867
-
868
- function WriteStream$open () {
869
- var that = this;
870
- open(that.path, that.flags, that.mode, function (err, fd) {
871
- if (err) {
872
- that.destroy();
873
- that.emit('error', err);
874
- } else {
875
- that.fd = fd;
876
- that.emit('open', fd);
877
- }
878
- });
879
- }
880
-
881
- function createReadStream (path, options) {
882
- return new fs.ReadStream(path, options)
883
- }
884
-
885
- function createWriteStream (path, options) {
886
- return new fs.WriteStream(path, options)
887
- }
888
-
889
- var fs$open = fs.open;
890
- fs.open = open;
891
- function open (path, flags, mode, cb) {
892
- if (typeof mode === 'function')
893
- cb = mode, mode = null;
894
-
895
- return go$open(path, flags, mode, cb)
896
-
897
- function go$open (path, flags, mode, cb, startTime) {
898
- return fs$open(path, flags, mode, function (err, fd) {
899
- if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
900
- enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()]);
901
- else {
902
- if (typeof cb === 'function')
903
- cb.apply(this, arguments);
904
- }
905
- })
906
- }
907
- }
908
-
909
- return fs
910
- }
911
-
912
- function enqueue (elem) {
913
- debug('ENQUEUE', elem[0].name, elem[1]);
914
- fs[gracefulQueue].push(elem);
915
- retry();
916
- }
917
-
918
- // keep track of the timeout between retry() calls
919
- var retryTimer;
920
-
921
- // reset the startTime and lastTime to now
922
- // this resets the start of the 60 second overall timeout as well as the
923
- // delay between attempts so that we'll retry these jobs sooner
924
- function resetQueue () {
925
- var now = Date.now();
926
- for (var i = 0; i < fs[gracefulQueue].length; ++i) {
927
- // entries that are only a length of 2 are from an older version, don't
928
- // bother modifying those since they'll be retried anyway.
929
- if (fs[gracefulQueue][i].length > 2) {
930
- fs[gracefulQueue][i][3] = now; // startTime
931
- fs[gracefulQueue][i][4] = now; // lastTime
932
- }
933
- }
934
- // call retry to make sure we're actively processing the queue
935
- retry();
936
- }
937
-
938
- function retry () {
939
- // clear the timer and remove it to help prevent unintended concurrency
940
- clearTimeout(retryTimer);
941
- retryTimer = undefined;
942
-
943
- if (fs[gracefulQueue].length === 0)
944
- return
945
-
946
- var elem = fs[gracefulQueue].shift();
947
- var fn = elem[0];
948
- var args = elem[1];
949
- // these items may be unset if they were added by an older graceful-fs
950
- var err = elem[2];
951
- var startTime = elem[3];
952
- var lastTime = elem[4];
953
-
954
- // if we don't have a startTime we have no way of knowing if we've waited
955
- // long enough, so go ahead and retry this item now
956
- if (startTime === undefined) {
957
- debug('RETRY', fn.name, args);
958
- fn.apply(null, args);
959
- } else if (Date.now() - startTime >= 60000) {
960
- // it's been more than 60 seconds total, bail now
961
- debug('TIMEOUT', fn.name, args);
962
- var cb = args.pop();
963
- if (typeof cb === 'function')
964
- cb.call(null, err);
965
- } else {
966
- // the amount of time between the last attempt and right now
967
- var sinceAttempt = Date.now() - lastTime;
968
- // the amount of time between when we first tried, and when we last tried
969
- // rounded up to at least 1
970
- var sinceStart = Math.max(lastTime - startTime, 1);
971
- // backoff. wait longer than the total time we've been retrying, but only
972
- // up to a maximum of 100ms
973
- var desiredDelay = Math.min(sinceStart * 1.2, 100);
974
- // it's been long enough since the last retry, do it again
975
- if (sinceAttempt >= desiredDelay) {
976
- debug('RETRY', fn.name, args);
977
- fn.apply(null, args.concat([startTime]));
978
- } else {
979
- // if we can't do this job yet, push it to the end of the queue
980
- // and let the next iteration check again
981
- fs[gracefulQueue].push(elem);
982
- }
983
- }
984
-
985
- // schedule our next run if one isn't already scheduled
986
- if (retryTimer === undefined) {
987
- retryTimer = setTimeout(retry, 0);
988
- }
989
- }
990
- return gracefulFs;
991
- }
992
-
993
- var retry$1 = {};
994
-
995
- var retry_operation;
996
- var hasRequiredRetry_operation;
997
-
998
- function requireRetry_operation () {
999
- if (hasRequiredRetry_operation) return retry_operation;
1000
- hasRequiredRetry_operation = 1;
1001
- function RetryOperation(timeouts, options) {
1002
- // Compatibility for the old (timeouts, retryForever) signature
1003
- if (typeof options === 'boolean') {
1004
- options = { forever: options };
1005
- }
1006
-
1007
- this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));
1008
- this._timeouts = timeouts;
1009
- this._options = options || {};
1010
- this._maxRetryTime = options && options.maxRetryTime || Infinity;
1011
- this._fn = null;
1012
- this._errors = [];
1013
- this._attempts = 1;
1014
- this._operationTimeout = null;
1015
- this._operationTimeoutCb = null;
1016
- this._timeout = null;
1017
- this._operationStart = null;
1018
-
1019
- if (this._options.forever) {
1020
- this._cachedTimeouts = this._timeouts.slice(0);
1021
- }
1022
- }
1023
- retry_operation = RetryOperation;
1024
-
1025
- RetryOperation.prototype.reset = function() {
1026
- this._attempts = 1;
1027
- this._timeouts = this._originalTimeouts;
1028
- };
1029
-
1030
- RetryOperation.prototype.stop = function() {
1031
- if (this._timeout) {
1032
- clearTimeout(this._timeout);
1033
- }
1034
-
1035
- this._timeouts = [];
1036
- this._cachedTimeouts = null;
1037
- };
1038
-
1039
- RetryOperation.prototype.retry = function(err) {
1040
- if (this._timeout) {
1041
- clearTimeout(this._timeout);
1042
- }
1043
-
1044
- if (!err) {
1045
- return false;
1046
- }
1047
- var currentTime = new Date().getTime();
1048
- if (err && currentTime - this._operationStart >= this._maxRetryTime) {
1049
- this._errors.unshift(new Error('RetryOperation timeout occurred'));
1050
- return false;
1051
- }
1052
-
1053
- this._errors.push(err);
1054
-
1055
- var timeout = this._timeouts.shift();
1056
- if (timeout === undefined) {
1057
- if (this._cachedTimeouts) {
1058
- // retry forever, only keep last error
1059
- this._errors.splice(this._errors.length - 1, this._errors.length);
1060
- this._timeouts = this._cachedTimeouts.slice(0);
1061
- timeout = this._timeouts.shift();
1062
- } else {
1063
- return false;
1064
- }
1065
- }
1066
-
1067
- var self = this;
1068
- var timer = setTimeout(function() {
1069
- self._attempts++;
1070
-
1071
- if (self._operationTimeoutCb) {
1072
- self._timeout = setTimeout(function() {
1073
- self._operationTimeoutCb(self._attempts);
1074
- }, self._operationTimeout);
1075
-
1076
- if (self._options.unref) {
1077
- self._timeout.unref();
1078
- }
1079
- }
1080
-
1081
- self._fn(self._attempts);
1082
- }, timeout);
1083
-
1084
- if (this._options.unref) {
1085
- timer.unref();
1086
- }
1087
-
1088
- return true;
1089
- };
1090
-
1091
- RetryOperation.prototype.attempt = function(fn, timeoutOps) {
1092
- this._fn = fn;
1093
-
1094
- if (timeoutOps) {
1095
- if (timeoutOps.timeout) {
1096
- this._operationTimeout = timeoutOps.timeout;
1097
- }
1098
- if (timeoutOps.cb) {
1099
- this._operationTimeoutCb = timeoutOps.cb;
1100
- }
1101
- }
1102
-
1103
- var self = this;
1104
- if (this._operationTimeoutCb) {
1105
- this._timeout = setTimeout(function() {
1106
- self._operationTimeoutCb();
1107
- }, self._operationTimeout);
1108
- }
1109
-
1110
- this._operationStart = new Date().getTime();
1111
-
1112
- this._fn(this._attempts);
1113
- };
1114
-
1115
- RetryOperation.prototype.try = function(fn) {
1116
- console.log('Using RetryOperation.try() is deprecated');
1117
- this.attempt(fn);
1118
- };
1119
-
1120
- RetryOperation.prototype.start = function(fn) {
1121
- console.log('Using RetryOperation.start() is deprecated');
1122
- this.attempt(fn);
1123
- };
1124
-
1125
- RetryOperation.prototype.start = RetryOperation.prototype.try;
1126
-
1127
- RetryOperation.prototype.errors = function() {
1128
- return this._errors;
1129
- };
1130
-
1131
- RetryOperation.prototype.attempts = function() {
1132
- return this._attempts;
1133
- };
1134
-
1135
- RetryOperation.prototype.mainError = function() {
1136
- if (this._errors.length === 0) {
1137
- return null;
1138
- }
1139
-
1140
- var counts = {};
1141
- var mainError = null;
1142
- var mainErrorCount = 0;
1143
-
1144
- for (var i = 0; i < this._errors.length; i++) {
1145
- var error = this._errors[i];
1146
- var message = error.message;
1147
- var count = (counts[message] || 0) + 1;
1148
-
1149
- counts[message] = count;
1150
-
1151
- if (count >= mainErrorCount) {
1152
- mainError = error;
1153
- mainErrorCount = count;
1154
- }
1155
- }
1156
-
1157
- return mainError;
1158
- };
1159
- return retry_operation;
1160
- }
1161
-
1162
- var hasRequiredRetry$1;
1163
-
1164
- function requireRetry$1 () {
1165
- if (hasRequiredRetry$1) return retry$1;
1166
- hasRequiredRetry$1 = 1;
1167
- (function (exports$1) {
1168
- var RetryOperation = requireRetry_operation();
1169
-
1170
- exports$1.operation = function(options) {
1171
- var timeouts = exports$1.timeouts(options);
1172
- return new RetryOperation(timeouts, {
1173
- forever: options && options.forever,
1174
- unref: options && options.unref,
1175
- maxRetryTime: options && options.maxRetryTime
1176
- });
1177
- };
1178
-
1179
- exports$1.timeouts = function(options) {
1180
- if (options instanceof Array) {
1181
- return [].concat(options);
1182
- }
1183
-
1184
- var opts = {
1185
- retries: 10,
1186
- factor: 2,
1187
- minTimeout: 1 * 1000,
1188
- maxTimeout: Infinity,
1189
- randomize: false
1190
- };
1191
- for (var key in options) {
1192
- opts[key] = options[key];
1193
- }
1194
-
1195
- if (opts.minTimeout > opts.maxTimeout) {
1196
- throw new Error('minTimeout is greater than maxTimeout');
1197
- }
1198
-
1199
- var timeouts = [];
1200
- for (var i = 0; i < opts.retries; i++) {
1201
- timeouts.push(this.createTimeout(i, opts));
1202
- }
1203
-
1204
- if (options && options.forever && !timeouts.length) {
1205
- timeouts.push(this.createTimeout(i, opts));
1206
- }
1207
-
1208
- // sort the array numerically ascending
1209
- timeouts.sort(function(a,b) {
1210
- return a - b;
1211
- });
1212
-
1213
- return timeouts;
1214
- };
1215
-
1216
- exports$1.createTimeout = function(attempt, opts) {
1217
- var random = (opts.randomize)
1218
- ? (Math.random() + 1)
1219
- : 1;
1220
-
1221
- var timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt));
1222
- timeout = Math.min(timeout, opts.maxTimeout);
1223
-
1224
- return timeout;
1225
- };
1226
-
1227
- exports$1.wrap = function(obj, options, methods) {
1228
- if (options instanceof Array) {
1229
- methods = options;
1230
- options = null;
1231
- }
1232
-
1233
- if (!methods) {
1234
- methods = [];
1235
- for (var key in obj) {
1236
- if (typeof obj[key] === 'function') {
1237
- methods.push(key);
1238
- }
1239
- }
1240
- }
1241
-
1242
- for (var i = 0; i < methods.length; i++) {
1243
- var method = methods[i];
1244
- var original = obj[method];
1245
-
1246
- obj[method] = function retryWrapper(original) {
1247
- var op = exports$1.operation(options);
1248
- var args = Array.prototype.slice.call(arguments, 1);
1249
- var callback = args.pop();
1250
-
1251
- args.push(function(err) {
1252
- if (op.retry(err)) {
1253
- return;
1254
- }
1255
- if (err) {
1256
- arguments[0] = op.mainError();
1257
- }
1258
- callback.apply(this, arguments);
1259
- });
1260
-
1261
- op.attempt(function() {
1262
- original.apply(obj, args);
1263
- });
1264
- }.bind(obj, original);
1265
- obj[method].options = options;
1266
- }
1267
- };
1268
- } (retry$1));
1269
- return retry$1;
1270
- }
1271
-
1272
- var retry;
1273
- var hasRequiredRetry;
1274
-
1275
- function requireRetry () {
1276
- if (hasRequiredRetry) return retry;
1277
- hasRequiredRetry = 1;
1278
- retry = requireRetry$1();
1279
- return retry;
1280
- }
1281
-
1282
- var signalExit = {exports: {}};
1283
-
1284
- var signals = {exports: {}};
1285
-
1286
- var hasRequiredSignals;
1287
-
1288
- function requireSignals () {
1289
- if (hasRequiredSignals) return signals.exports;
1290
- hasRequiredSignals = 1;
1291
- (function (module) {
1292
- // This is not the set of all possible signals.
1293
- //
1294
- // It IS, however, the set of all signals that trigger
1295
- // an exit on either Linux or BSD systems. Linux is a
1296
- // superset of the signal names supported on BSD, and
1297
- // the unknown signals just fail to register, so we can
1298
- // catch that easily enough.
1299
- //
1300
- // Don't bother with SIGKILL. It's uncatchable, which
1301
- // means that we can't fire any callbacks anyway.
1302
- //
1303
- // If a user does happen to register a handler on a non-
1304
- // fatal signal like SIGWINCH or something, and then
1305
- // exit, it'll end up firing `process.emit('exit')`, so
1306
- // the handler will be fired anyway.
1307
- //
1308
- // SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
1309
- // artificially, inherently leave the process in a
1310
- // state from which it is not safe to try and enter JS
1311
- // listeners.
1312
- module.exports = [
1313
- 'SIGABRT',
1314
- 'SIGALRM',
1315
- 'SIGHUP',
1316
- 'SIGINT',
1317
- 'SIGTERM'
1318
- ];
1319
-
1320
- if (process.platform !== 'win32') {
1321
- module.exports.push(
1322
- 'SIGVTALRM',
1323
- 'SIGXCPU',
1324
- 'SIGXFSZ',
1325
- 'SIGUSR2',
1326
- 'SIGTRAP',
1327
- 'SIGSYS',
1328
- 'SIGQUIT',
1329
- 'SIGIOT'
1330
- // should detect profiler and enable/disable accordingly.
1331
- // see #21
1332
- // 'SIGPROF'
1333
- );
1334
- }
1335
-
1336
- if (process.platform === 'linux') {
1337
- module.exports.push(
1338
- 'SIGIO',
1339
- 'SIGPOLL',
1340
- 'SIGPWR',
1341
- 'SIGSTKFLT',
1342
- 'SIGUNUSED'
1343
- );
1344
- }
1345
- } (signals));
1346
- return signals.exports;
1347
- }
1348
-
1349
- var hasRequiredSignalExit;
1350
-
1351
- function requireSignalExit () {
1352
- if (hasRequiredSignalExit) return signalExit.exports;
1353
- hasRequiredSignalExit = 1;
1354
- // Note: since nyc uses this module to output coverage, any lines
1355
- // that are in the direct sync flow of nyc's outputCoverage are
1356
- // ignored, since we can never get coverage for them.
1357
- // grab a reference to node's real process object right away
1358
- var process = commonjsGlobal.process;
1359
-
1360
- const processOk = function (process) {
1361
- return process &&
1362
- typeof process === 'object' &&
1363
- typeof process.removeListener === 'function' &&
1364
- typeof process.emit === 'function' &&
1365
- typeof process.reallyExit === 'function' &&
1366
- typeof process.listeners === 'function' &&
1367
- typeof process.kill === 'function' &&
1368
- typeof process.pid === 'number' &&
1369
- typeof process.on === 'function'
1370
- };
1371
-
1372
- // some kind of non-node environment, just no-op
1373
- /* istanbul ignore if */
1374
- if (!processOk(process)) {
1375
- signalExit.exports = function () {
1376
- return function () {}
1377
- };
1378
- } else {
1379
- var assert = Mi;
1380
- var signals = requireSignals();
1381
- var isWin = /^win/i.test(process.platform);
1382
-
1383
- var EE = require$$1;
1384
- /* istanbul ignore if */
1385
- if (typeof EE !== 'function') {
1386
- EE = EE.EventEmitter;
1387
- }
1388
-
1389
- var emitter;
1390
- if (process.__signal_exit_emitter__) {
1391
- emitter = process.__signal_exit_emitter__;
1392
- } else {
1393
- emitter = process.__signal_exit_emitter__ = new EE();
1394
- emitter.count = 0;
1395
- emitter.emitted = {};
1396
- }
1397
-
1398
- // Because this emitter is a global, we have to check to see if a
1399
- // previous version of this library failed to enable infinite listeners.
1400
- // I know what you're about to say. But literally everything about
1401
- // signal-exit is a compromise with evil. Get used to it.
1402
- if (!emitter.infinite) {
1403
- emitter.setMaxListeners(Infinity);
1404
- emitter.infinite = true;
1405
- }
1406
-
1407
- signalExit.exports = function (cb, opts) {
1408
- /* istanbul ignore if */
1409
- if (!processOk(commonjsGlobal.process)) {
1410
- return function () {}
1411
- }
1412
- assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler');
1413
-
1414
- if (loaded === false) {
1415
- load();
1416
- }
1417
-
1418
- var ev = 'exit';
1419
- if (opts && opts.alwaysLast) {
1420
- ev = 'afterexit';
1421
- }
1422
-
1423
- var remove = function () {
1424
- emitter.removeListener(ev, cb);
1425
- if (emitter.listeners('exit').length === 0 &&
1426
- emitter.listeners('afterexit').length === 0) {
1427
- unload();
1428
- }
1429
- };
1430
- emitter.on(ev, cb);
1431
-
1432
- return remove
1433
- };
1434
-
1435
- var unload = function unload () {
1436
- if (!loaded || !processOk(commonjsGlobal.process)) {
1437
- return
1438
- }
1439
- loaded = false;
1440
-
1441
- signals.forEach(function (sig) {
1442
- try {
1443
- process.removeListener(sig, sigListeners[sig]);
1444
- } catch (er) {}
1445
- });
1446
- process.emit = originalProcessEmit;
1447
- process.reallyExit = originalProcessReallyExit;
1448
- emitter.count -= 1;
1449
- };
1450
- signalExit.exports.unload = unload;
1451
-
1452
- var emit = function emit (event, code, signal) {
1453
- /* istanbul ignore if */
1454
- if (emitter.emitted[event]) {
1455
- return
1456
- }
1457
- emitter.emitted[event] = true;
1458
- emitter.emit(event, code, signal);
1459
- };
1460
-
1461
- // { <signal>: <listener fn>, ... }
1462
- var sigListeners = {};
1463
- signals.forEach(function (sig) {
1464
- sigListeners[sig] = function listener () {
1465
- /* istanbul ignore if */
1466
- if (!processOk(commonjsGlobal.process)) {
1467
- return
1468
- }
1469
- // If there are no other listeners, an exit is coming!
1470
- // Simplest way: remove us and then re-send the signal.
1471
- // We know that this will kill the process, so we can
1472
- // safely emit now.
1473
- var listeners = process.listeners(sig);
1474
- if (listeners.length === emitter.count) {
1475
- unload();
1476
- emit('exit', null, sig);
1477
- /* istanbul ignore next */
1478
- emit('afterexit', null, sig);
1479
- /* istanbul ignore next */
1480
- if (isWin && sig === 'SIGHUP') {
1481
- // "SIGHUP" throws an `ENOSYS` error on Windows,
1482
- // so use a supported signal instead
1483
- sig = 'SIGINT';
1484
- }
1485
- /* istanbul ignore next */
1486
- process.kill(process.pid, sig);
1487
- }
1488
- };
1489
- });
1490
-
1491
- signalExit.exports.signals = function () {
1492
- return signals
1493
- };
1494
-
1495
- var loaded = false;
1496
-
1497
- var load = function load () {
1498
- if (loaded || !processOk(commonjsGlobal.process)) {
1499
- return
1500
- }
1501
- loaded = true;
1502
-
1503
- // This is the number of onSignalExit's that are in play.
1504
- // It's important so that we can count the correct number of
1505
- // listeners on signals, and don't wait for the other one to
1506
- // handle it instead of us.
1507
- emitter.count += 1;
1508
-
1509
- signals = signals.filter(function (sig) {
1510
- try {
1511
- process.on(sig, sigListeners[sig]);
1512
- return true
1513
- } catch (er) {
1514
- return false
1515
- }
1516
- });
1517
-
1518
- process.emit = processEmit;
1519
- process.reallyExit = processReallyExit;
1520
- };
1521
- signalExit.exports.load = load;
1522
-
1523
- var originalProcessReallyExit = process.reallyExit;
1524
- var processReallyExit = function processReallyExit (code) {
1525
- /* istanbul ignore if */
1526
- if (!processOk(commonjsGlobal.process)) {
1527
- return
1528
- }
1529
- process.exitCode = code || /* istanbul ignore next */ 0;
1530
- emit('exit', process.exitCode, null);
1531
- /* istanbul ignore next */
1532
- emit('afterexit', process.exitCode, null);
1533
- /* istanbul ignore next */
1534
- originalProcessReallyExit.call(process, process.exitCode);
1535
- };
1536
-
1537
- var originalProcessEmit = process.emit;
1538
- var processEmit = function processEmit (ev, arg) {
1539
- if (ev === 'exit' && processOk(commonjsGlobal.process)) {
1540
- /* istanbul ignore else */
1541
- if (arg !== undefined) {
1542
- process.exitCode = arg;
1543
- }
1544
- var ret = originalProcessEmit.apply(this, arguments);
1545
- /* istanbul ignore next */
1546
- emit('exit', process.exitCode, null);
1547
- /* istanbul ignore next */
1548
- emit('afterexit', process.exitCode, null);
1549
- /* istanbul ignore next */
1550
- return ret
1551
- } else {
1552
- return originalProcessEmit.apply(this, arguments)
1553
- }
1554
- };
1555
- }
1556
- return signalExit.exports;
1557
- }
1558
-
1559
- var mtimePrecision = {};
1560
-
1561
- var hasRequiredMtimePrecision;
1562
-
1563
- function requireMtimePrecision () {
1564
- if (hasRequiredMtimePrecision) return mtimePrecision;
1565
- hasRequiredMtimePrecision = 1;
1566
-
1567
- const cacheSymbol = Symbol();
1568
-
1569
- function probe(file, fs, callback) {
1570
- const cachedPrecision = fs[cacheSymbol];
1571
-
1572
- if (cachedPrecision) {
1573
- return fs.stat(file, (err, stat) => {
1574
- /* istanbul ignore if */
1575
- if (err) {
1576
- return callback(err);
1577
- }
1578
-
1579
- callback(null, stat.mtime, cachedPrecision);
1580
- });
1581
- }
1582
-
1583
- // Set mtime by ceiling Date.now() to seconds + 5ms so that it's "not on the second"
1584
- const mtime = new Date((Math.ceil(Date.now() / 1000) * 1000) + 5);
1585
-
1586
- fs.utimes(file, mtime, mtime, (err) => {
1587
- /* istanbul ignore if */
1588
- if (err) {
1589
- return callback(err);
1590
- }
1591
-
1592
- fs.stat(file, (err, stat) => {
1593
- /* istanbul ignore if */
1594
- if (err) {
1595
- return callback(err);
1596
- }
1597
-
1598
- const precision = stat.mtime.getTime() % 1000 === 0 ? 's' : 'ms';
1599
-
1600
- // Cache the precision in a non-enumerable way
1601
- Object.defineProperty(fs, cacheSymbol, { value: precision });
1602
-
1603
- callback(null, stat.mtime, precision);
1604
- });
1605
- });
1606
- }
1607
-
1608
- function getMtime(precision) {
1609
- let now = Date.now();
1610
-
1611
- if (precision === 's') {
1612
- now = Math.ceil(now / 1000) * 1000;
1613
- }
1614
-
1615
- return new Date(now);
1616
- }
1617
-
1618
- mtimePrecision.probe = probe;
1619
- mtimePrecision.getMtime = getMtime;
1620
- return mtimePrecision;
1621
- }
1622
-
1623
- var hasRequiredLockfile;
1624
-
1625
- function requireLockfile () {
1626
- if (hasRequiredLockfile) return lockfile$1;
1627
- hasRequiredLockfile = 1;
1628
-
1629
- const path$1 = path;
1630
- const fs = requireGracefulFs();
1631
- const retry = requireRetry();
1632
- const onExit = requireSignalExit();
1633
- const mtimePrecision = requireMtimePrecision();
1634
-
1635
- const locks = {};
1636
-
1637
- function getLockFile(file, options) {
1638
- return options.lockfilePath || `${file}.lock`;
1639
- }
1640
-
1641
- function resolveCanonicalPath(file, options, callback) {
1642
- if (!options.realpath) {
1643
- return callback(null, path$1.resolve(file));
1644
- }
1645
-
1646
- // Use realpath to resolve symlinks
1647
- // It also resolves relative paths
1648
- options.fs.realpath(file, callback);
1649
- }
1650
-
1651
- function acquireLock(file, options, callback) {
1652
- const lockfilePath = getLockFile(file, options);
1653
-
1654
- // Use mkdir to create the lockfile (atomic operation)
1655
- options.fs.mkdir(lockfilePath, (err) => {
1656
- if (!err) {
1657
- // At this point, we acquired the lock!
1658
- // Probe the mtime precision
1659
- return mtimePrecision.probe(lockfilePath, options.fs, (err, mtime, mtimePrecision) => {
1660
- // If it failed, try to remove the lock..
1661
- /* istanbul ignore if */
1662
- if (err) {
1663
- options.fs.rmdir(lockfilePath, () => {});
1664
-
1665
- return callback(err);
1666
- }
1667
-
1668
- callback(null, mtime, mtimePrecision);
1669
- });
1670
- }
1671
-
1672
- // If error is not EEXIST then some other error occurred while locking
1673
- if (err.code !== 'EEXIST') {
1674
- return callback(err);
1675
- }
1676
-
1677
- // Otherwise, check if lock is stale by analyzing the file mtime
1678
- if (options.stale <= 0) {
1679
- return callback(Object.assign(new Error('Lock file is already being held'), { code: 'ELOCKED', file }));
1680
- }
1681
-
1682
- options.fs.stat(lockfilePath, (err, stat) => {
1683
- if (err) {
1684
- // Retry if the lockfile has been removed (meanwhile)
1685
- // Skip stale check to avoid recursiveness
1686
- if (err.code === 'ENOENT') {
1687
- return acquireLock(file, { ...options, stale: 0 }, callback);
1688
- }
1689
-
1690
- return callback(err);
1691
- }
1692
-
1693
- if (!isLockStale(stat, options)) {
1694
- return callback(Object.assign(new Error('Lock file is already being held'), { code: 'ELOCKED', file }));
1695
- }
1696
-
1697
- // If it's stale, remove it and try again!
1698
- // Skip stale check to avoid recursiveness
1699
- removeLock(file, options, (err) => {
1700
- if (err) {
1701
- return callback(err);
1702
- }
1703
-
1704
- acquireLock(file, { ...options, stale: 0 }, callback);
1705
- });
1706
- });
1707
- });
1708
- }
1709
-
1710
- function isLockStale(stat, options) {
1711
- return stat.mtime.getTime() < Date.now() - options.stale;
1712
- }
1713
-
1714
- function removeLock(file, options, callback) {
1715
- // Remove lockfile, ignoring ENOENT errors
1716
- options.fs.rmdir(getLockFile(file, options), (err) => {
1717
- if (err && err.code !== 'ENOENT') {
1718
- return callback(err);
1719
- }
1720
-
1721
- callback();
1722
- });
1723
- }
1724
-
1725
- function updateLock(file, options) {
1726
- const lock = locks[file];
1727
-
1728
- // Just for safety, should never happen
1729
- /* istanbul ignore if */
1730
- if (lock.updateTimeout) {
1731
- return;
1732
- }
1733
-
1734
- lock.updateDelay = lock.updateDelay || options.update;
1735
- lock.updateTimeout = setTimeout(() => {
1736
- lock.updateTimeout = null;
1737
-
1738
- // Stat the file to check if mtime is still ours
1739
- // If it is, we can still recover from a system sleep or a busy event loop
1740
- options.fs.stat(lock.lockfilePath, (err, stat) => {
1741
- const isOverThreshold = lock.lastUpdate + options.stale < Date.now();
1742
-
1743
- // If it failed to update the lockfile, keep trying unless
1744
- // the lockfile was deleted or we are over the threshold
1745
- if (err) {
1746
- if (err.code === 'ENOENT' || isOverThreshold) {
1747
- return setLockAsCompromised(file, lock, Object.assign(err, { code: 'ECOMPROMISED' }));
1748
- }
1749
-
1750
- lock.updateDelay = 1000;
1751
-
1752
- return updateLock(file, options);
1753
- }
1754
-
1755
- const isMtimeOurs = lock.mtime.getTime() === stat.mtime.getTime();
1756
-
1757
- if (!isMtimeOurs) {
1758
- return setLockAsCompromised(
1759
- file,
1760
- lock,
1761
- Object.assign(
1762
- new Error('Unable to update lock within the stale threshold'),
1763
- { code: 'ECOMPROMISED' }
1764
- ));
1765
- }
1766
-
1767
- const mtime = mtimePrecision.getMtime(lock.mtimePrecision);
1768
-
1769
- options.fs.utimes(lock.lockfilePath, mtime, mtime, (err) => {
1770
- const isOverThreshold = lock.lastUpdate + options.stale < Date.now();
1771
-
1772
- // Ignore if the lock was released
1773
- if (lock.released) {
1774
- return;
1775
- }
1776
-
1777
- // If it failed to update the lockfile, keep trying unless
1778
- // the lockfile was deleted or we are over the threshold
1779
- if (err) {
1780
- if (err.code === 'ENOENT' || isOverThreshold) {
1781
- return setLockAsCompromised(file, lock, Object.assign(err, { code: 'ECOMPROMISED' }));
1782
- }
1783
-
1784
- lock.updateDelay = 1000;
1785
-
1786
- return updateLock(file, options);
1787
- }
1788
-
1789
- // All ok, keep updating..
1790
- lock.mtime = mtime;
1791
- lock.lastUpdate = Date.now();
1792
- lock.updateDelay = null;
1793
- updateLock(file, options);
1794
- });
1795
- });
1796
- }, lock.updateDelay);
1797
-
1798
- // Unref the timer so that the nodejs process can exit freely
1799
- // This is safe because all acquired locks will be automatically released
1800
- // on process exit
1801
-
1802
- // We first check that `lock.updateTimeout.unref` exists because some users
1803
- // may be using this module outside of NodeJS (e.g., in an electron app),
1804
- // and in those cases `setTimeout` return an integer.
1805
- /* istanbul ignore else */
1806
- if (lock.updateTimeout.unref) {
1807
- lock.updateTimeout.unref();
1808
- }
1809
- }
1810
-
1811
- function setLockAsCompromised(file, lock, err) {
1812
- // Signal the lock has been released
1813
- lock.released = true;
1814
-
1815
- // Cancel lock mtime update
1816
- // Just for safety, at this point updateTimeout should be null
1817
- /* istanbul ignore if */
1818
- if (lock.updateTimeout) {
1819
- clearTimeout(lock.updateTimeout);
1820
- }
1821
-
1822
- if (locks[file] === lock) {
1823
- delete locks[file];
1824
- }
1825
-
1826
- lock.options.onCompromised(err);
1827
- }
1828
-
1829
- // ----------------------------------------------------------
1830
-
1831
- function lock(file, options, callback) {
1832
- /* istanbul ignore next */
1833
- options = {
1834
- stale: 10000,
1835
- update: null,
1836
- realpath: true,
1837
- retries: 0,
1838
- fs,
1839
- onCompromised: (err) => { throw err; },
1840
- ...options,
1841
- };
1842
-
1843
- options.retries = options.retries || 0;
1844
- options.retries = typeof options.retries === 'number' ? { retries: options.retries } : options.retries;
1845
- options.stale = Math.max(options.stale || 0, 2000);
1846
- options.update = options.update == null ? options.stale / 2 : options.update || 0;
1847
- options.update = Math.max(Math.min(options.update, options.stale / 2), 1000);
1848
-
1849
- // Resolve to a canonical file path
1850
- resolveCanonicalPath(file, options, (err, file) => {
1851
- if (err) {
1852
- return callback(err);
1853
- }
1854
-
1855
- // Attempt to acquire the lock
1856
- const operation = retry.operation(options.retries);
1857
-
1858
- operation.attempt(() => {
1859
- acquireLock(file, options, (err, mtime, mtimePrecision) => {
1860
- if (operation.retry(err)) {
1861
- return;
1862
- }
1863
-
1864
- if (err) {
1865
- return callback(operation.mainError());
1866
- }
1867
-
1868
- // We now own the lock
1869
- const lock = locks[file] = {
1870
- lockfilePath: getLockFile(file, options),
1871
- mtime,
1872
- mtimePrecision,
1873
- options,
1874
- lastUpdate: Date.now(),
1875
- };
1876
-
1877
- // We must keep the lock fresh to avoid staleness
1878
- updateLock(file, options);
1879
-
1880
- callback(null, (releasedCallback) => {
1881
- if (lock.released) {
1882
- return releasedCallback &&
1883
- releasedCallback(Object.assign(new Error('Lock is already released'), { code: 'ERELEASED' }));
1884
- }
1885
-
1886
- // Not necessary to use realpath twice when unlocking
1887
- unlock(file, { ...options, realpath: false }, releasedCallback);
1888
- });
1889
- });
1890
- });
1891
- });
1892
- }
1893
-
1894
- function unlock(file, options, callback) {
1895
- options = {
1896
- fs,
1897
- realpath: true,
1898
- ...options,
1899
- };
1900
-
1901
- // Resolve to a canonical file path
1902
- resolveCanonicalPath(file, options, (err, file) => {
1903
- if (err) {
1904
- return callback(err);
1905
- }
1906
-
1907
- // Skip if the lock is not acquired
1908
- const lock = locks[file];
1909
-
1910
- if (!lock) {
1911
- return callback(Object.assign(new Error('Lock is not acquired/owned by you'), { code: 'ENOTACQUIRED' }));
1912
- }
1913
-
1914
- lock.updateTimeout && clearTimeout(lock.updateTimeout); // Cancel lock mtime update
1915
- lock.released = true; // Signal the lock has been released
1916
- delete locks[file]; // Delete from locks
1917
-
1918
- removeLock(file, options, callback);
1919
- });
1920
- }
1921
-
1922
- function check(file, options, callback) {
1923
- options = {
1924
- stale: 10000,
1925
- realpath: true,
1926
- fs,
1927
- ...options,
1928
- };
1929
-
1930
- options.stale = Math.max(options.stale || 0, 2000);
1931
-
1932
- // Resolve to a canonical file path
1933
- resolveCanonicalPath(file, options, (err, file) => {
1934
- if (err) {
1935
- return callback(err);
1936
- }
1937
-
1938
- // Check if lockfile exists
1939
- options.fs.stat(getLockFile(file, options), (err, stat) => {
1940
- if (err) {
1941
- // If does not exist, file is not locked. Otherwise, callback with error
1942
- return err.code === 'ENOENT' ? callback(null, false) : callback(err);
1943
- }
1944
-
1945
- // Otherwise, check if lock is stale by analyzing the file mtime
1946
- return callback(null, !isLockStale(stat, options));
1947
- });
1948
- });
1949
- }
1950
-
1951
- function getLocks() {
1952
- return locks;
1953
- }
1954
-
1955
- // Remove acquired locks on exit
1956
- /* istanbul ignore next */
1957
- onExit(() => {
1958
- for (const file in locks) {
1959
- const options = locks[file].options;
1960
-
1961
- try { options.fs.rmdirSync(getLockFile(file, options)); } catch (e) { /* Empty */ }
1962
- }
1963
- });
1964
-
1965
- lockfile$1.lock = lock;
1966
- lockfile$1.unlock = unlock;
1967
- lockfile$1.check = check;
1968
- lockfile$1.getLocks = getLocks;
1969
- return lockfile$1;
1970
- }
1971
-
1972
- var adapter;
1973
- var hasRequiredAdapter;
1974
-
1975
- function requireAdapter () {
1976
- if (hasRequiredAdapter) return adapter;
1977
- hasRequiredAdapter = 1;
1978
-
1979
- const fs = requireGracefulFs();
1980
-
1981
- function createSyncFs(fs) {
1982
- const methods = ['mkdir', 'realpath', 'stat', 'rmdir', 'utimes'];
1983
- const newFs = { ...fs };
1984
-
1985
- methods.forEach((method) => {
1986
- newFs[method] = (...args) => {
1987
- const callback = args.pop();
1988
- let ret;
1989
-
1990
- try {
1991
- ret = fs[`${method}Sync`](...args);
1992
- } catch (err) {
1993
- return callback(err);
1994
- }
1995
-
1996
- callback(null, ret);
1997
- };
1998
- });
1999
-
2000
- return newFs;
2001
- }
2002
-
2003
- // ----------------------------------------------------------
2004
-
2005
- function toPromise(method) {
2006
- return (...args) => new Promise((resolve, reject) => {
2007
- args.push((err, result) => {
2008
- if (err) {
2009
- reject(err);
2010
- } else {
2011
- resolve(result);
2012
- }
2013
- });
2014
-
2015
- method(...args);
2016
- });
2017
- }
2018
-
2019
- function toSync(method) {
2020
- return (...args) => {
2021
- let err;
2022
- let result;
2023
-
2024
- args.push((_err, _result) => {
2025
- err = _err;
2026
- result = _result;
2027
- });
2028
-
2029
- method(...args);
2030
-
2031
- if (err) {
2032
- throw err;
2033
- }
2034
-
2035
- return result;
2036
- };
2037
- }
2038
-
2039
- function toSyncOptions(options) {
2040
- // Shallow clone options because we are oging to mutate them
2041
- options = { ...options };
2042
-
2043
- // Transform fs to use the sync methods instead
2044
- options.fs = createSyncFs(options.fs || fs);
2045
-
2046
- // Retries are not allowed because it requires the flow to be sync
2047
- if (
2048
- (typeof options.retries === 'number' && options.retries > 0) ||
2049
- (options.retries && typeof options.retries.retries === 'number' && options.retries.retries > 0)
2050
- ) {
2051
- throw Object.assign(new Error('Cannot use retries with the sync api'), { code: 'ESYNC' });
2052
- }
2053
-
2054
- return options;
2055
- }
2056
-
2057
- adapter = {
2058
- toPromise,
2059
- toSync,
2060
- toSyncOptions,
2061
- };
2062
- return adapter;
2063
- }
2064
-
2065
- var hasRequiredProperLockfile;
2066
-
2067
- function requireProperLockfile () {
2068
- if (hasRequiredProperLockfile) return properLockfile.exports;
2069
- hasRequiredProperLockfile = 1;
2070
-
2071
- const lockfile = requireLockfile();
2072
- const { toPromise, toSync, toSyncOptions } = requireAdapter();
2073
-
2074
- async function lock(file, options) {
2075
- const release = await toPromise(lockfile.lock)(file, options);
2076
-
2077
- return toPromise(release);
2078
- }
2079
-
2080
- function lockSync(file, options) {
2081
- const release = toSync(lockfile.lock)(file, toSyncOptions(options));
2082
-
2083
- return toSync(release);
2084
- }
2085
-
2086
- function unlock(file, options) {
2087
- return toPromise(lockfile.unlock)(file, options);
2088
- }
2089
-
2090
- function unlockSync(file, options) {
2091
- return toSync(lockfile.unlock)(file, toSyncOptions(options));
2092
- }
2093
-
2094
- function check(file, options) {
2095
- return toPromise(lockfile.check)(file, options);
2096
- }
2097
-
2098
- function checkSync(file, options) {
2099
- return toSync(lockfile.check)(file, toSyncOptions(options));
2100
- }
2101
-
2102
- properLockfile.exports = lock;
2103
- properLockfile.exports.lock = lock;
2104
- properLockfile.exports.unlock = unlock;
2105
- properLockfile.exports.lockSync = lockSync;
2106
- properLockfile.exports.unlockSync = unlockSync;
2107
- properLockfile.exports.check = check;
2108
- properLockfile.exports.checkSync = checkSync;
2109
- return properLockfile.exports;
2110
- }
2111
-
2112
- var properLockfileExports = requireProperLockfile();
2113
- var lockfile = /*@__PURE__*/getDefaultExportFromCjs(properLockfileExports);
2114
-
2115
- export { lockfile as l, properLockfileExports as p };
2116
- //# sourceMappingURL=index-Dtt_h58T.js.map