mongoku 2.0.3 → 2.1.0

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 (418) hide show
  1. package/Dockerfile +3 -1
  2. package/README.md +23 -9
  3. package/build/client/_app/immutable/assets/0.egX7ddQL.css +1 -0
  4. package/build/client/_app/immutable/assets/0.egX7ddQL.css.br +0 -0
  5. package/build/client/_app/immutable/assets/0.egX7ddQL.css.gz +0 -0
  6. package/build/client/_app/immutable/assets/10.59aTjJn9.css +1 -0
  7. package/build/client/_app/immutable/assets/10.59aTjJn9.css.br +0 -0
  8. package/build/client/_app/immutable/assets/10.59aTjJn9.css.gz +0 -0
  9. package/build/client/_app/immutable/assets/11.CEtFGlZU.css +1 -0
  10. package/build/client/_app/immutable/assets/11.CEtFGlZU.css.br +1 -0
  11. package/build/client/_app/immutable/assets/11.CEtFGlZU.css.gz +0 -0
  12. package/build/client/_app/immutable/assets/12.BdCOhvz0.css +1 -0
  13. package/build/client/_app/immutable/assets/12.BdCOhvz0.css.br +0 -0
  14. package/build/client/_app/immutable/assets/12.BdCOhvz0.css.gz +0 -0
  15. package/build/client/_app/immutable/assets/JsonValue.BEbzuWqZ.css +1 -0
  16. package/build/client/_app/immutable/assets/JsonValue.BEbzuWqZ.css.br +0 -0
  17. package/build/client/_app/immutable/assets/JsonValue.BEbzuWqZ.css.gz +0 -0
  18. package/build/client/_app/immutable/assets/Modal.DIIFkbGB.css +1 -0
  19. package/build/client/_app/immutable/assets/Modal.DIIFkbGB.css.br +0 -0
  20. package/build/client/_app/immutable/assets/Modal.DIIFkbGB.css.gz +0 -0
  21. package/build/client/_app/immutable/assets/Panel.B3aWupye.css +1 -0
  22. package/build/client/_app/immutable/assets/Panel.B3aWupye.css.br +0 -0
  23. package/build/client/_app/immutable/assets/Panel.B3aWupye.css.gz +0 -0
  24. package/build/client/_app/immutable/chunks/7rjwS0Fa.js +1 -0
  25. package/build/client/_app/immutable/chunks/7rjwS0Fa.js.br +0 -0
  26. package/build/client/_app/immutable/chunks/7rjwS0Fa.js.gz +0 -0
  27. package/build/client/_app/immutable/chunks/BLDrwdCC.js +1 -0
  28. package/build/client/_app/immutable/chunks/BLDrwdCC.js.br +0 -0
  29. package/build/client/_app/immutable/chunks/BLDrwdCC.js.gz +0 -0
  30. package/build/client/_app/immutable/chunks/BNpv6iz_.js +1 -0
  31. package/build/client/_app/immutable/chunks/BNpv6iz_.js.br +0 -0
  32. package/build/client/_app/immutable/chunks/BNpv6iz_.js.gz +0 -0
  33. package/build/client/_app/immutable/chunks/BY7rCWFm.js +1 -0
  34. package/build/client/_app/immutable/chunks/BY7rCWFm.js.br +0 -0
  35. package/build/client/_app/immutable/chunks/BY7rCWFm.js.gz +0 -0
  36. package/build/client/_app/immutable/chunks/BirzSxMb.js +2 -0
  37. package/build/client/_app/immutable/chunks/BirzSxMb.js.br +0 -0
  38. package/build/client/_app/immutable/chunks/BirzSxMb.js.gz +0 -0
  39. package/build/client/_app/immutable/chunks/BsxVnnsB.js +1 -0
  40. package/build/client/_app/immutable/chunks/BsxVnnsB.js.br +0 -0
  41. package/build/client/_app/immutable/chunks/BsxVnnsB.js.gz +0 -0
  42. package/build/client/_app/immutable/chunks/BtVcRw28.js +29 -0
  43. package/build/client/_app/immutable/chunks/BtVcRw28.js.br +0 -0
  44. package/build/client/_app/immutable/chunks/BtVcRw28.js.gz +0 -0
  45. package/build/client/_app/immutable/chunks/CdQ4HxbR.js +2 -0
  46. package/build/client/_app/immutable/chunks/CdQ4HxbR.js.br +0 -0
  47. package/build/client/_app/immutable/chunks/CdQ4HxbR.js.gz +0 -0
  48. package/build/client/_app/immutable/chunks/CeUVbZ2h.js +1 -0
  49. package/build/client/_app/immutable/chunks/CeUVbZ2h.js.br +0 -0
  50. package/build/client/_app/immutable/chunks/CeUVbZ2h.js.gz +0 -0
  51. package/build/client/_app/immutable/chunks/CsO4V9Pl.js +1 -0
  52. package/build/client/_app/immutable/chunks/CsO4V9Pl.js.br +0 -0
  53. package/build/client/_app/immutable/chunks/CsO4V9Pl.js.gz +0 -0
  54. package/build/client/_app/immutable/chunks/Cy5AtpEx.js +1 -0
  55. package/build/client/_app/immutable/chunks/Cy5AtpEx.js.br +0 -0
  56. package/build/client/_app/immutable/chunks/Cy5AtpEx.js.gz +0 -0
  57. package/build/client/_app/immutable/chunks/DD3Ma7mI.js +1 -0
  58. package/build/client/_app/immutable/chunks/DD3Ma7mI.js.br +1 -0
  59. package/build/client/_app/immutable/chunks/DD3Ma7mI.js.gz +0 -0
  60. package/build/client/_app/immutable/chunks/DDOxwa8G.js +1 -0
  61. package/build/client/_app/immutable/chunks/DDOxwa8G.js.br +0 -0
  62. package/build/client/_app/immutable/chunks/DDOxwa8G.js.gz +0 -0
  63. package/build/client/_app/immutable/chunks/DPilZ31q.js +4 -0
  64. package/build/client/_app/immutable/chunks/DPilZ31q.js.br +0 -0
  65. package/build/client/_app/immutable/chunks/DPilZ31q.js.gz +0 -0
  66. package/build/client/_app/immutable/chunks/DkcM24tw.js +1 -0
  67. package/build/client/_app/immutable/chunks/DkcM24tw.js.br +0 -0
  68. package/build/client/_app/immutable/chunks/DkcM24tw.js.gz +0 -0
  69. package/build/client/_app/immutable/chunks/{uMNMODvc.js → DzIzGsAN.js} +1 -1
  70. package/build/client/_app/immutable/chunks/DzIzGsAN.js.br +0 -0
  71. package/build/client/_app/immutable/chunks/DzIzGsAN.js.gz +0 -0
  72. package/build/client/_app/immutable/chunks/Dzn375RV.js +1 -0
  73. package/build/client/_app/immutable/chunks/Dzn375RV.js.br +0 -0
  74. package/build/client/_app/immutable/chunks/Dzn375RV.js.gz +0 -0
  75. package/build/client/_app/immutable/chunks/hzkOq89z.js +1 -0
  76. package/build/client/_app/immutable/chunks/hzkOq89z.js.br +0 -0
  77. package/build/client/_app/immutable/chunks/hzkOq89z.js.gz +0 -0
  78. package/build/client/_app/immutable/chunks/myWOS8Ad.js +1 -0
  79. package/build/client/_app/immutable/chunks/myWOS8Ad.js.br +0 -0
  80. package/build/client/_app/immutable/chunks/myWOS8Ad.js.gz +0 -0
  81. package/build/client/_app/immutable/chunks/{BKCvWebR.js → pwiEVMhR.js} +1 -1
  82. package/build/client/_app/immutable/chunks/pwiEVMhR.js.br +0 -0
  83. package/build/client/_app/immutable/chunks/pwiEVMhR.js.gz +0 -0
  84. package/build/client/_app/immutable/chunks/woTmcqT7.js +1 -0
  85. package/build/client/_app/immutable/chunks/woTmcqT7.js.br +0 -0
  86. package/build/client/_app/immutable/chunks/woTmcqT7.js.gz +0 -0
  87. package/build/client/_app/immutable/chunks/zDi6mm3o.js +1 -0
  88. package/build/client/_app/immutable/chunks/zDi6mm3o.js.br +0 -0
  89. package/build/client/_app/immutable/chunks/zDi6mm3o.js.gz +0 -0
  90. package/build/client/_app/immutable/entry/app.CxQNYOR7.js +2 -0
  91. package/build/client/_app/immutable/entry/app.CxQNYOR7.js.br +0 -0
  92. package/build/client/_app/immutable/entry/app.CxQNYOR7.js.gz +0 -0
  93. package/build/client/_app/immutable/entry/start.CUo1ZpWZ.js +1 -0
  94. package/build/client/_app/immutable/entry/start.CUo1ZpWZ.js.br +2 -0
  95. package/build/client/_app/immutable/entry/start.CUo1ZpWZ.js.gz +0 -0
  96. package/build/client/_app/immutable/nodes/0.NM9sLghd.js +5 -0
  97. package/build/client/_app/immutable/nodes/0.NM9sLghd.js.br +0 -0
  98. package/build/client/_app/immutable/nodes/0.NM9sLghd.js.gz +0 -0
  99. package/build/client/_app/immutable/nodes/1.DbC3260o.js +1 -0
  100. package/build/client/_app/immutable/nodes/1.DbC3260o.js.br +2 -0
  101. package/build/client/_app/immutable/nodes/1.DbC3260o.js.gz +0 -0
  102. package/build/client/_app/immutable/nodes/10.BVQvX3m0.js +2 -0
  103. package/build/client/_app/immutable/nodes/10.BVQvX3m0.js.br +0 -0
  104. package/build/client/_app/immutable/nodes/10.BVQvX3m0.js.gz +0 -0
  105. package/build/client/_app/immutable/nodes/11.Bxvf_-yk.js +1 -0
  106. package/build/client/_app/immutable/nodes/11.Bxvf_-yk.js.br +0 -0
  107. package/build/client/_app/immutable/nodes/11.Bxvf_-yk.js.gz +0 -0
  108. package/build/client/_app/immutable/nodes/12.Prhpx9Ma.js +1 -0
  109. package/build/client/_app/immutable/nodes/12.Prhpx9Ma.js.br +0 -0
  110. package/build/client/_app/immutable/nodes/12.Prhpx9Ma.js.gz +0 -0
  111. package/build/client/_app/immutable/nodes/13.Bgj5oOSN.js +66 -0
  112. package/build/client/_app/immutable/nodes/13.Bgj5oOSN.js.br +0 -0
  113. package/build/client/_app/immutable/nodes/13.Bgj5oOSN.js.gz +0 -0
  114. package/build/client/_app/immutable/nodes/2.UoL1FlSn.js +1 -0
  115. package/build/client/_app/immutable/nodes/2.UoL1FlSn.js.br +1 -0
  116. package/build/client/_app/immutable/nodes/2.UoL1FlSn.js.gz +0 -0
  117. package/build/client/_app/immutable/nodes/3.oJ7_29Md.js +1 -0
  118. package/build/client/_app/immutable/nodes/3.oJ7_29Md.js.br +0 -0
  119. package/build/client/_app/immutable/nodes/3.oJ7_29Md.js.gz +0 -0
  120. package/build/client/_app/immutable/nodes/4.BbmkM0ZH.js +1 -0
  121. package/build/client/_app/immutable/nodes/4.BbmkM0ZH.js.br +0 -0
  122. package/build/client/_app/immutable/nodes/4.BbmkM0ZH.js.gz +0 -0
  123. package/build/client/_app/immutable/nodes/5.CUeb6mKm.js +1 -0
  124. package/build/client/_app/immutable/nodes/5.CUeb6mKm.js.br +0 -0
  125. package/build/client/_app/immutable/nodes/5.CUeb6mKm.js.gz +0 -0
  126. package/build/client/_app/immutable/nodes/7.BiyUd38g.js +1 -0
  127. package/build/client/_app/immutable/nodes/7.BiyUd38g.js.br +0 -0
  128. package/build/client/_app/immutable/nodes/7.BiyUd38g.js.gz +0 -0
  129. package/build/client/_app/immutable/nodes/8.DhezXfEp.js +1 -0
  130. package/build/client/_app/immutable/nodes/8.DhezXfEp.js.br +0 -0
  131. package/build/client/_app/immutable/nodes/8.DhezXfEp.js.gz +0 -0
  132. package/build/client/_app/immutable/nodes/9.tIbM6W_7.js +2 -0
  133. package/build/client/_app/immutable/nodes/9.tIbM6W_7.js.br +0 -0
  134. package/build/client/_app/immutable/nodes/9.tIbM6W_7.js.gz +0 -0
  135. package/build/client/_app/version.json +1 -1
  136. package/build/client/_app/version.json.br +0 -0
  137. package/build/client/_app/version.json.gz +0 -0
  138. package/build/handler.js +14 -0
  139. package/build/server/chunks/{0-C1NyHW8A.js → 0-Xn_28PLT.js} +7 -6
  140. package/build/server/chunks/0-Xn_28PLT.js.map +1 -0
  141. package/build/server/chunks/1-CBgVE2FQ.js +9 -0
  142. package/build/server/chunks/1-CBgVE2FQ.js.map +1 -0
  143. package/build/server/chunks/10-nsD-CCn7.js +212 -0
  144. package/build/server/chunks/10-nsD-CCn7.js.map +1 -0
  145. package/build/server/chunks/11-BmqLuLNb.js +41 -0
  146. package/build/server/chunks/11-BmqLuLNb.js.map +1 -0
  147. package/build/server/chunks/12-PgTuaplb.js +101 -0
  148. package/build/server/chunks/12-PgTuaplb.js.map +1 -0
  149. package/build/server/chunks/13-BSGYMCpC.js +51 -0
  150. package/build/server/chunks/13-BSGYMCpC.js.map +1 -0
  151. package/build/server/chunks/2-BJxJqjul.js +24 -0
  152. package/build/server/chunks/2-BJxJqjul.js.map +1 -0
  153. package/build/server/chunks/3-D2ftoQkX.js +25 -0
  154. package/build/server/chunks/3-D2ftoQkX.js.map +1 -0
  155. package/build/server/chunks/4-CdkZadEU.js +25 -0
  156. package/build/server/chunks/4-CdkZadEU.js.map +1 -0
  157. package/build/server/chunks/5-ClD9AjJX.js +25 -0
  158. package/build/server/chunks/5-ClD9AjJX.js.map +1 -0
  159. package/build/server/chunks/{2-B39zPvzn.js → 6-ifXBeMPA.js} +2 -2
  160. package/build/server/chunks/{2-B39zPvzn.js.map → 6-ifXBeMPA.js.map} +1 -1
  161. package/build/server/chunks/7-D0jTAIl_.js +81 -0
  162. package/build/server/chunks/7-D0jTAIl_.js.map +1 -0
  163. package/build/server/chunks/{4-Dfbpsagm.js → 8-CgDL2fiA.js} +18 -10
  164. package/build/server/chunks/8-CgDL2fiA.js.map +1 -0
  165. package/build/server/chunks/{5-DLB6GOjf.js → 9-Dn6eMY6x.js} +6 -8
  166. package/build/server/chunks/9-Dn6eMY6x.js.map +1 -0
  167. package/build/server/chunks/JsonValue-DjUulYwg.js +290 -0
  168. package/build/server/chunks/JsonValue-DjUulYwg.js.map +1 -0
  169. package/build/server/chunks/Modal-zVnoAfFx.js +36 -0
  170. package/build/server/chunks/Modal-zVnoAfFx.js.map +1 -0
  171. package/build/server/chunks/{Panel-Box8ld78.js → Panel-BM545RWK.js} +4 -3
  172. package/build/server/chunks/Panel-BM545RWK.js.map +1 -0
  173. package/build/server/chunks/PrettyJson-CVemKT9n.js +137 -0
  174. package/build/server/chunks/PrettyJson-CVemKT9n.js.map +1 -0
  175. package/build/server/chunks/Tooltip-ByN2a8nn.js +38 -0
  176. package/build/server/chunks/Tooltip-ByN2a8nn.js.map +1 -0
  177. package/build/server/chunks/TooltipTable-CftpgkMV.js +60 -0
  178. package/build/server/chunks/TooltipTable-CftpgkMV.js.map +1 -0
  179. package/build/server/chunks/_layout.svelte-D8Erqrch.js +163 -0
  180. package/build/server/chunks/_layout.svelte-D8Erqrch.js.map +1 -0
  181. package/build/server/chunks/{_page.svelte-PuIVQ52p.js → _page.svelte-BZL67-Tl.js} +32 -13
  182. package/build/server/chunks/_page.svelte-BZL67-Tl.js.map +1 -0
  183. package/build/server/chunks/{_page.svelte-B_T8EFk3.js → _page.svelte-BwdDcghe.js} +63 -13
  184. package/build/server/chunks/_page.svelte-BwdDcghe.js.map +1 -0
  185. package/build/server/chunks/{_page.svelte-CflJkclc.js → _page.svelte-CwGhs70Z.js} +9 -6
  186. package/build/server/chunks/_page.svelte-CwGhs70Z.js.map +1 -0
  187. package/build/server/chunks/_page.svelte-DI3cZxuK.js +197 -0
  188. package/build/server/chunks/_page.svelte-DI3cZxuK.js.map +1 -0
  189. package/build/server/chunks/_page.svelte-DPUr13fG.js +203 -0
  190. package/build/server/chunks/_page.svelte-DPUr13fG.js.map +1 -0
  191. package/build/server/chunks/{_page.svelte-zlHeUnJK.js → _page.svelte-mO3b8YSb.js} +37 -20
  192. package/build/server/chunks/_page.svelte-mO3b8YSb.js.map +1 -0
  193. package/build/server/chunks/{_page.svelte-D1QIZqLv.js → _page.svelte-mPOsEew6.js} +105 -30
  194. package/build/server/chunks/_page.svelte-mPOsEew6.js.map +1 -0
  195. package/build/server/chunks/_server.ts-06lGoPp8.js +8 -0
  196. package/build/server/chunks/_server.ts-06lGoPp8.js.map +1 -0
  197. package/build/server/chunks/async-lVJA8xJZ.js +9 -0
  198. package/build/server/chunks/async-lVJA8xJZ.js.map +1 -0
  199. package/build/server/chunks/client-BFlyU7ZU.js +7 -0
  200. package/build/server/chunks/{client-bj7sePQc.js.map → client-BFlyU7ZU.js.map} +1 -1
  201. package/build/server/chunks/{client2-BX4-xbM4.js → client2-DYaMKWrc.js} +4 -4
  202. package/build/server/chunks/{client2-BX4-xbM4.js.map → client2-DYaMKWrc.js.map} +1 -1
  203. package/build/server/chunks/{async-BfR0vYHo.js → context-C22hLSHK.js} +2 -8
  204. package/build/server/chunks/context-C22hLSHK.js.map +1 -0
  205. package/build/server/chunks/error.svelte-BENdaVOT.js +19 -0
  206. package/build/server/chunks/error.svelte-BENdaVOT.js.map +1 -0
  207. package/build/server/chunks/event-DVH-6ISX.js.map +1 -1
  208. package/build/server/chunks/{index-EKt9-9bV.js → index-DFXVwu6p.js} +2 -2
  209. package/build/server/chunks/{index-EKt9-9bV.js.map → index-DFXVwu6p.js.map} +1 -1
  210. package/build/server/chunks/index-Djsj11qr.js.map +1 -1
  211. package/build/server/chunks/index-server-Bf-hP5gL.js +5 -0
  212. package/build/server/chunks/index-server-Bf-hP5gL.js.map +1 -0
  213. package/build/server/chunks/{routing-Ddj5b-2K.js → index2-d4SCF7oA.js} +8 -88
  214. package/build/server/chunks/index2-d4SCF7oA.js.map +1 -0
  215. package/build/server/chunks/{index3-DquTjlmp.js → index3-CoOO2o9t.js} +6 -6
  216. package/build/server/chunks/index3-CoOO2o9t.js.map +1 -0
  217. package/build/server/chunks/jsonParser-CraFXJs8.js +174 -0
  218. package/build/server/chunks/jsonParser-CraFXJs8.js.map +1 -0
  219. package/build/server/chunks/layout.svelte-CJcHX-Na.js +10 -0
  220. package/build/server/chunks/layout.svelte-CJcHX-Na.js.map +1 -0
  221. package/build/server/chunks/{mongo-dLmCShL_.js → mongo-DMG2RTBR.js} +51 -10
  222. package/build/server/chunks/mongo-DMG2RTBR.js.map +1 -0
  223. package/build/server/chunks/remote-xxtqbu-BUzBKv3P.js +16 -0
  224. package/build/server/chunks/remote-xxtqbu-BUzBKv3P.js.map +1 -0
  225. package/build/server/chunks/routing-e10vGH37.js +81 -0
  226. package/build/server/chunks/routing-e10vGH37.js.map +1 -0
  227. package/build/server/chunks/{server2-BOoUfKd7.js → server2-_mGVuBoG.js} +2 -2
  228. package/build/server/chunks/{server2-BOoUfKd7.js.map → server2-_mGVuBoG.js.map} +1 -1
  229. package/build/server/chunks/servers.remote-DKhy8wTJ.js +678 -0
  230. package/build/server/chunks/servers.remote-DKhy8wTJ.js.map +1 -0
  231. package/build/server/chunks/shared-Buki-xt5.js +506 -0
  232. package/build/server/chunks/shared-Buki-xt5.js.map +1 -0
  233. package/build/server/chunks/{state.svelte-CRHA9yov.js → state.svelte-C8IWmp_n.js} +2 -2
  234. package/build/server/chunks/{state.svelte-CRHA9yov.js.map → state.svelte-C8IWmp_n.js.map} +1 -1
  235. package/build/server/chunks/{utils-DGYJFmnf.js → utils-kjxf7BZO.js} +2 -2
  236. package/build/server/chunks/{utils-DGYJFmnf.js.map → utils-kjxf7BZO.js.map} +1 -1
  237. package/build/server/index.js +188 -609
  238. package/build/server/index.js.map +1 -1
  239. package/build/server/manifest.js +45 -18
  240. package/build/server/manifest.js.map +1 -1
  241. package/cli.ts +7 -1
  242. package/dist/cli.js +7 -1
  243. package/ecosystem.config.js +0 -3
  244. package/package.json +13 -2
  245. package/src/api/servers.remote.ts +369 -20
  246. package/src/app.css +98 -3
  247. package/src/app.html +15 -0
  248. package/src/lib/actions/jsonTextarea.ts +395 -0
  249. package/src/lib/components/Breadcrumbs.svelte +7 -58
  250. package/src/lib/components/JsonValue.svelte +279 -85
  251. package/src/lib/components/Modal.svelte +59 -0
  252. package/src/lib/components/OriginWarning.svelte +109 -0
  253. package/src/lib/components/PageSwitcher.svelte +37 -0
  254. package/src/lib/components/Panel.svelte +1 -1
  255. package/src/lib/components/PrettyJson.svelte +124 -38
  256. package/src/lib/components/SearchBox.svelte +161 -97
  257. package/src/lib/components/ThemeSwitcher.svelte +66 -0
  258. package/src/lib/components/Tooltip.svelte +83 -0
  259. package/src/lib/components/TooltipTable.svelte +45 -102
  260. package/src/lib/server/HostsManager.ts +4 -0
  261. package/src/lib/server/aggregation.ts +62 -0
  262. package/src/lib/server/mongo.ts +75 -13
  263. package/src/lib/types.ts +60 -0
  264. package/src/lib/utils/isEmptyObject.ts +6 -0
  265. package/src/lib/utils/jsonParser.ts +9 -1
  266. package/src/lib/utils/omit.ts +3 -0
  267. package/src/routes/+layout.server.ts +2 -1
  268. package/src/routes/+layout.svelte +11 -2
  269. package/src/routes/favicon.ico/+server.ts +8 -0
  270. package/src/routes/servers/+page.server.ts +22 -10
  271. package/src/routes/servers/+page.svelte +44 -10
  272. package/src/routes/servers/[server]/databases/+layout.ts +8 -0
  273. package/src/routes/servers/[server]/databases/+page.server.ts +14 -4
  274. package/src/routes/servers/[server]/databases/[database]/collections/+layout.ts +9 -0
  275. package/src/routes/servers/[server]/databases/[database]/collections/+page.server.ts +0 -2
  276. package/src/routes/servers/[server]/databases/[database]/collections/+page.svelte +67 -8
  277. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/+layout.ts +9 -0
  278. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/documents/+page.server.ts +216 -0
  279. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/documents/+page.svelte +337 -0
  280. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/documents/+page.ts +10 -0
  281. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/documents/[document]/+layout.ts +9 -0
  282. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/documents/[document]/+page.server.ts +15 -12
  283. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/documents/[document]/+page.svelte +79 -5
  284. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/indexes/+page.server.ts +87 -0
  285. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/indexes/+page.svelte +333 -0
  286. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/indexes/+page.ts +10 -0
  287. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/mappings/+page.server.ts +18 -0
  288. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/mappings/+page.svelte +377 -0
  289. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/mappings/+page.ts +10 -0
  290. package/src/tests/api/aggregation.test.ts +125 -0
  291. package/build/client/_app/immutable/assets/0.BHsXFfsc.css +0 -1
  292. package/build/client/_app/immutable/assets/0.BHsXFfsc.css.br +0 -0
  293. package/build/client/_app/immutable/assets/0.BHsXFfsc.css.gz +0 -0
  294. package/build/client/_app/immutable/assets/6.DawdmtJd.css +0 -1
  295. package/build/client/_app/immutable/assets/6.DawdmtJd.css.br +0 -2
  296. package/build/client/_app/immutable/assets/6.DawdmtJd.css.gz +0 -0
  297. package/build/client/_app/immutable/assets/Panel.BDHMtO-3.css +0 -1
  298. package/build/client/_app/immutable/assets/Panel.BDHMtO-3.css.br +0 -0
  299. package/build/client/_app/immutable/assets/Panel.BDHMtO-3.css.gz +0 -0
  300. package/build/client/_app/immutable/assets/PrettyJson.CtngcfyW.css +0 -1
  301. package/build/client/_app/immutable/assets/PrettyJson.CtngcfyW.css.br +0 -0
  302. package/build/client/_app/immutable/assets/PrettyJson.CtngcfyW.css.gz +0 -0
  303. package/build/client/_app/immutable/chunks/BAM9w9EL.js +0 -1
  304. package/build/client/_app/immutable/chunks/BAM9w9EL.js.br +0 -0
  305. package/build/client/_app/immutable/chunks/BAM9w9EL.js.gz +0 -0
  306. package/build/client/_app/immutable/chunks/BKCvWebR.js.br +0 -0
  307. package/build/client/_app/immutable/chunks/BKCvWebR.js.gz +0 -0
  308. package/build/client/_app/immutable/chunks/BMa204Dm.js +0 -14
  309. package/build/client/_app/immutable/chunks/BMa204Dm.js.br +0 -0
  310. package/build/client/_app/immutable/chunks/BMa204Dm.js.gz +0 -0
  311. package/build/client/_app/immutable/chunks/BN_N9-2s.js +0 -1
  312. package/build/client/_app/immutable/chunks/BN_N9-2s.js.br +0 -0
  313. package/build/client/_app/immutable/chunks/BN_N9-2s.js.gz +0 -0
  314. package/build/client/_app/immutable/chunks/BY57TmdO.js +0 -1
  315. package/build/client/_app/immutable/chunks/BY57TmdO.js.br +0 -0
  316. package/build/client/_app/immutable/chunks/BY57TmdO.js.gz +0 -0
  317. package/build/client/_app/immutable/chunks/BaB-cr9N.js +0 -2
  318. package/build/client/_app/immutable/chunks/BaB-cr9N.js.br +0 -0
  319. package/build/client/_app/immutable/chunks/BaB-cr9N.js.gz +0 -0
  320. package/build/client/_app/immutable/chunks/BdR-m9Ad.js +0 -1
  321. package/build/client/_app/immutable/chunks/BdR-m9Ad.js.br +0 -0
  322. package/build/client/_app/immutable/chunks/BdR-m9Ad.js.gz +0 -0
  323. package/build/client/_app/immutable/chunks/ByjLCPv2.js +0 -1
  324. package/build/client/_app/immutable/chunks/ByjLCPv2.js.br +0 -0
  325. package/build/client/_app/immutable/chunks/ByjLCPv2.js.gz +0 -0
  326. package/build/client/_app/immutable/chunks/BzAcxkRZ.js +0 -4
  327. package/build/client/_app/immutable/chunks/BzAcxkRZ.js.br +0 -0
  328. package/build/client/_app/immutable/chunks/BzAcxkRZ.js.gz +0 -0
  329. package/build/client/_app/immutable/chunks/CyQLXPZI.js +0 -2
  330. package/build/client/_app/immutable/chunks/CyQLXPZI.js.br +0 -0
  331. package/build/client/_app/immutable/chunks/CyQLXPZI.js.gz +0 -0
  332. package/build/client/_app/immutable/chunks/D17Lj1H7.js +0 -1
  333. package/build/client/_app/immutable/chunks/D17Lj1H7.js.br +0 -0
  334. package/build/client/_app/immutable/chunks/D17Lj1H7.js.gz +0 -0
  335. package/build/client/_app/immutable/chunks/D4VhtiDg.js +0 -1
  336. package/build/client/_app/immutable/chunks/D4VhtiDg.js.br +0 -0
  337. package/build/client/_app/immutable/chunks/D4VhtiDg.js.gz +0 -0
  338. package/build/client/_app/immutable/chunks/D72Du7TF.js +0 -1
  339. package/build/client/_app/immutable/chunks/D72Du7TF.js.br +0 -2
  340. package/build/client/_app/immutable/chunks/D72Du7TF.js.gz +0 -0
  341. package/build/client/_app/immutable/chunks/XYFbSe2V.js +0 -1
  342. package/build/client/_app/immutable/chunks/XYFbSe2V.js.br +0 -0
  343. package/build/client/_app/immutable/chunks/XYFbSe2V.js.gz +0 -0
  344. package/build/client/_app/immutable/chunks/iHsChU5o.js +0 -1
  345. package/build/client/_app/immutable/chunks/iHsChU5o.js.br +0 -0
  346. package/build/client/_app/immutable/chunks/iHsChU5o.js.gz +0 -0
  347. package/build/client/_app/immutable/chunks/p23QjN60.js +0 -1
  348. package/build/client/_app/immutable/chunks/p23QjN60.js.br +0 -2
  349. package/build/client/_app/immutable/chunks/p23QjN60.js.gz +0 -0
  350. package/build/client/_app/immutable/chunks/sBKW2MYH.js +0 -1
  351. package/build/client/_app/immutable/chunks/sBKW2MYH.js.br +0 -0
  352. package/build/client/_app/immutable/chunks/sBKW2MYH.js.gz +0 -0
  353. package/build/client/_app/immutable/chunks/uMNMODvc.js.br +0 -0
  354. package/build/client/_app/immutable/chunks/uMNMODvc.js.gz +0 -0
  355. package/build/client/_app/immutable/entry/app.9nC_873E.js +0 -2
  356. package/build/client/_app/immutable/entry/app.9nC_873E.js.br +0 -0
  357. package/build/client/_app/immutable/entry/app.9nC_873E.js.gz +0 -0
  358. package/build/client/_app/immutable/entry/start.Bn88Alw2.js +0 -1
  359. package/build/client/_app/immutable/entry/start.Bn88Alw2.js.br +0 -2
  360. package/build/client/_app/immutable/entry/start.Bn88Alw2.js.gz +0 -0
  361. package/build/client/_app/immutable/nodes/0.COxTCtn2.js +0 -1
  362. package/build/client/_app/immutable/nodes/0.COxTCtn2.js.br +0 -0
  363. package/build/client/_app/immutable/nodes/0.COxTCtn2.js.gz +0 -0
  364. package/build/client/_app/immutable/nodes/1.Bc8yPK_D.js +0 -1
  365. package/build/client/_app/immutable/nodes/1.Bc8yPK_D.js.br +0 -0
  366. package/build/client/_app/immutable/nodes/1.Bc8yPK_D.js.gz +0 -0
  367. package/build/client/_app/immutable/nodes/3.CI2GcqTf.js +0 -1
  368. package/build/client/_app/immutable/nodes/3.CI2GcqTf.js.br +0 -0
  369. package/build/client/_app/immutable/nodes/3.CI2GcqTf.js.gz +0 -0
  370. package/build/client/_app/immutable/nodes/4.ChSdW7ac.js +0 -1
  371. package/build/client/_app/immutable/nodes/4.ChSdW7ac.js.br +0 -0
  372. package/build/client/_app/immutable/nodes/4.ChSdW7ac.js.gz +0 -0
  373. package/build/client/_app/immutable/nodes/5.DaMML2go.js +0 -1
  374. package/build/client/_app/immutable/nodes/5.DaMML2go.js.br +0 -0
  375. package/build/client/_app/immutable/nodes/5.DaMML2go.js.gz +0 -0
  376. package/build/client/_app/immutable/nodes/6.Dcq0qwvO.js +0 -1
  377. package/build/client/_app/immutable/nodes/6.Dcq0qwvO.js.br +0 -0
  378. package/build/client/_app/immutable/nodes/6.Dcq0qwvO.js.gz +0 -0
  379. package/build/client/_app/immutable/nodes/7.CU-ncPes.js +0 -1
  380. package/build/client/_app/immutable/nodes/7.CU-ncPes.js.br +0 -0
  381. package/build/client/_app/immutable/nodes/7.CU-ncPes.js.gz +0 -0
  382. package/build/server/chunks/0-C1NyHW8A.js.map +0 -1
  383. package/build/server/chunks/1-CThf4W5r.js +0 -9
  384. package/build/server/chunks/1-CThf4W5r.js.map +0 -1
  385. package/build/server/chunks/3-CJf0NbiV.js +0 -69
  386. package/build/server/chunks/3-CJf0NbiV.js.map +0 -1
  387. package/build/server/chunks/4-Dfbpsagm.js.map +0 -1
  388. package/build/server/chunks/5-DLB6GOjf.js.map +0 -1
  389. package/build/server/chunks/6-DfCARDKO.js +0 -202
  390. package/build/server/chunks/6-DfCARDKO.js.map +0 -1
  391. package/build/server/chunks/7-B5o4OymX.js +0 -42
  392. package/build/server/chunks/7-B5o4OymX.js.map +0 -1
  393. package/build/server/chunks/Panel-Box8ld78.js.map +0 -1
  394. package/build/server/chunks/PrettyJson-C2c9xGNo.js +0 -290
  395. package/build/server/chunks/PrettyJson-C2c9xGNo.js.map +0 -1
  396. package/build/server/chunks/TooltipTable-0z4HkHlH.js +0 -17
  397. package/build/server/chunks/TooltipTable-0z4HkHlH.js.map +0 -1
  398. package/build/server/chunks/_layout.svelte-CU7AVRSZ.js +0 -111
  399. package/build/server/chunks/_layout.svelte-CU7AVRSZ.js.map +0 -1
  400. package/build/server/chunks/_page.svelte-B_T8EFk3.js.map +0 -1
  401. package/build/server/chunks/_page.svelte-CflJkclc.js.map +0 -1
  402. package/build/server/chunks/_page.svelte-D1QIZqLv.js.map +0 -1
  403. package/build/server/chunks/_page.svelte-PuIVQ52p.js.map +0 -1
  404. package/build/server/chunks/_page.svelte-zlHeUnJK.js.map +0 -1
  405. package/build/server/chunks/async-BfR0vYHo.js.map +0 -1
  406. package/build/server/chunks/client-bj7sePQc.js +0 -7
  407. package/build/server/chunks/error.svelte-D5sIJv3P.js +0 -18
  408. package/build/server/chunks/error.svelte-D5sIJv3P.js.map +0 -1
  409. package/build/server/chunks/index3-DquTjlmp.js.map +0 -1
  410. package/build/server/chunks/mongo-dLmCShL_.js.map +0 -1
  411. package/build/server/chunks/remote-xxtqbu-BFzaWXy0.js +0 -234
  412. package/build/server/chunks/remote-xxtqbu-BFzaWXy0.js.map +0 -1
  413. package/build/server/chunks/routing-Ddj5b-2K.js.map +0 -1
  414. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/+page.server.ts +0 -106
  415. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/+page.svelte +0 -174
  416. /package/build/client/_app/immutable/assets/{3.CRKE8WvY.css → 7.CRKE8WvY.css} +0 -0
  417. /package/build/client/_app/immutable/assets/{3.CRKE8WvY.css.br → 7.CRKE8WvY.css.br} +0 -0
  418. /package/build/client/_app/immutable/assets/{3.CRKE8WvY.css.gz → 7.CRKE8WvY.css.gz} +0 -0
@@ -0,0 +1,197 @@
1
+ import './async-lVJA8xJZ.js';
2
+ import { s as stringify, a as attr, e as ensure_array_like } from './index2-d4SCF7oA.js';
3
+ import './servers.remote-DKhy8wTJ.js';
4
+ import { r as resolve } from './server2-_mGVuBoG.js';
5
+ import { P as Panel } from './Panel-BM545RWK.js';
6
+ import { e as escape_html } from './context-C22hLSHK.js';
7
+ import './event-DVH-6ISX.js';
8
+ import './utils-kjxf7BZO.js';
9
+ import './shared-Buki-xt5.js';
10
+ import './index-Djsj11qr.js';
11
+ import './jsonParser-CraFXJs8.js';
12
+ import 'esprima';
13
+ import './JsonEncoder-jJ2OBaud.js';
14
+ import 'mongodb';
15
+ import './mongo-DMG2RTBR.js';
16
+ import 'url';
17
+ import 'node:fs';
18
+ import 'node:os';
19
+ import 'node:path';
20
+ import 'zod';
21
+ import './routing-e10vGH37.js';
22
+
23
+ function _page($$renderer, $$props) {
24
+ $$renderer.component(($$renderer2) => {
25
+ let { data } = $$props;
26
+ let mappingsArray = Object.entries(data.mappings).map(([fieldPath, targets]) => ({
27
+ fieldPath,
28
+ targets: Array.isArray(targets) ? targets : [targets]
29
+ }));
30
+ `I need help generating MongoDB collection mappings for my database.
31
+
32
+ **Context:**
33
+ - Database: ${data.database}
34
+ - Collection: ${data.collection}
35
+ - Available collections: ${data.availableCollections.join(", ")}
36
+
37
+ **Task:**
38
+ Please analyze my codebase to identify relationships between the "${data.collection}" collection and other collections. Look for:
39
+ 1. Fields that reference documents in other collections (foreign keys)
40
+ 2. Nested fields within arrays or objects that reference other documents
41
+ 3. Common patterns like userId, authorId, etc.
42
+
43
+ If you have access to the MongoDB MCP server, use it to:
44
+ 1. Query sample documents from the "${data.collection}" collection
45
+ 2. Analyze the schema and field types
46
+ 3. Identify potential foreign key relationships
47
+
48
+ **Output Format:**
49
+ Create a file named \`${data.collection}.mappings.json\` with the following structure:
50
+
51
+ \`\`\`json
52
+ {
53
+ "_id": "${data.collection}",
54
+ "mappings": {
55
+ "fieldPath": { "collection": "targetCollection", "on": "targetField" },
56
+ "nested.fieldPath": { "collection": "targetCollection", "on": "targetField" }
57
+ }
58
+ }
59
+ \`\`\`
60
+
61
+ **Example:**
62
+ If the collection has documents like:
63
+ \`\`\`json
64
+ {
65
+ "_id": "post1",
66
+ "authorId": "user123",
67
+ "comments": [
68
+ { "authorId": "user456", "text": "Great post!" }
69
+ ]
70
+ }
71
+ \`\`\`
72
+
73
+ The mappings would be:
74
+ \`\`\`json
75
+ {
76
+ "_id": "${data.collection}",
77
+ "mappings": {
78
+ "authorId": { "collection": "users", "on": "_id" },
79
+ "comments.authorId": { "collection": "users", "on": "_id" }
80
+ }
81
+ }
82
+ \`\`\`
83
+
84
+ **Notes:**
85
+ - Use dot notation for nested fields (e.g., "comments.authorId")
86
+ - Multiple mappings for the same field can be expressed as an array
87
+ - Target field is usually "_id" but can be any unique field
88
+
89
+ Please analyze the codebase and database, then generate the appropriate mappings file.`;
90
+ {
91
+ let actions = function($$renderer3) {
92
+ if (!data.readOnly) {
93
+ $$renderer3.push("<!--[-->");
94
+ $$renderer3.push(`<button class="btn btn-outline-light btn-sm -my-2">🤖 AI Helper</button> <button class="btn btn-success btn-sm -my-2">Save</button>`);
95
+ } else {
96
+ $$renderer3.push("<!--[!-->");
97
+ }
98
+ $$renderer3.push(`<!--]-->`);
99
+ };
100
+ Panel($$renderer2, {
101
+ title: `Mappings for ${stringify(data.collection)}`,
102
+ actions,
103
+ children: ($$renderer3) => {
104
+ $$renderer3.push(`<div class="p-4"><div class="mb-4"><p class="mb-3">Define relationships between collections to enable hover tooltips and navigation on foreign key fields. This
105
+ will be stored in the <code class="px-1 bg-[var(--light-background)] rounded">mongoku.mappings</code> collection
106
+ as a document with <a${attr("href", resolve(`/servers/${data.server}/databases/${data.database}/collections/mongoku.mappings/documents/${data.collection}`))} class="text-blue-500">_id: "${escape_html(data.collection)}"</a>.</p> <details class="mb-2" style="color: var(--text-secondary);"><summary class="cursor-pointer font-medium mb-2">Example</summary> <div class="mt-2"><div class="mb-1">Document in collection <code class="px-1 bg-[var(--light-background)] rounded">posts</code>:</div> <code class="block px-2 py-1 bg-[var(--light-background)] rounded text-xs mb-2">{ _id: "post1", title: "Hello", authorId: "user123", comments: [{authorId: "user456", text:
107
+ "Nice!"}] }</code> <div class="text space-y-1"><div>→ Mapping 1: Field path <code class="px-1 bg-[var(--light-background)] rounded">authorId</code>, target
108
+ collection <code class="px-1 bg-[var(--light-background)] rounded">users</code>, target field <code class="px-1 bg-[var(--light-background)] rounded">_id</code></div> <div>→ Mapping 2: Field path <code class="px-1 bg-[var(--light-background)] rounded">comments.authorId</code>,
109
+ target collection <code class="px-1 bg-[var(--light-background)] rounded">users</code>, target field <code class="px-1 bg-[var(--light-background)] rounded">_id</code></div></div></div></details></div> `);
110
+ if (mappingsArray.length > 0) {
111
+ $$renderer3.push("<!--[-->");
112
+ $$renderer3.push(`<div class="space-y-4"><!--[-->`);
113
+ const each_array = ensure_array_like(mappingsArray);
114
+ for (let entryIndex = 0, $$length = each_array.length; entryIndex < $$length; entryIndex++) {
115
+ let entry = each_array[entryIndex];
116
+ $$renderer3.push(`<div class="border border-[var(--border-color)] rounded p-4"><div class="flex items-start gap-4 mb-3"><div class="flex-1"><label class="block text-sm font-medium mb-1">Field Path <input type="text"${attr("value", entry.fieldPath)} placeholder="e.g., authorId or comments.authorId" class="w-full px-3 py-2 bg-[var(--color-1)] border border-[var(--border-color)] rounded text-sm mt-1"${attr("disabled", data.readOnly, true)}/></label></div> `);
117
+ if (!data.readOnly) {
118
+ $$renderer3.push("<!--[-->");
119
+ $$renderer3.push(`<button class="btn btn-outline-danger btn-sm mt-6">Remove Mapping</button>`);
120
+ } else {
121
+ $$renderer3.push("<!--[!-->");
122
+ }
123
+ $$renderer3.push(`<!--]--></div> <div class="space-y-2"><!--[-->`);
124
+ const each_array_1 = ensure_array_like(entry.targets);
125
+ for (let targetIndex = 0, $$length2 = each_array_1.length; targetIndex < $$length2; targetIndex++) {
126
+ let target = each_array_1[targetIndex];
127
+ $$renderer3.push(`<div class="flex items-start gap-2 pl-4 border-l-2 border-[var(--color-3)]"><div class="flex-1"><label class="block text-xs mb-1">Target Collection `);
128
+ $$renderer3.select(
129
+ {
130
+ value: target.collection,
131
+ class: "w-full px-3 py-2 bg-[var(--color-1)] border border-[var(--border-color)] rounded text-sm mt-1",
132
+ disabled: data.readOnly
133
+ },
134
+ ($$renderer4) => {
135
+ $$renderer4.option({ value: "" }, ($$renderer5) => {
136
+ $$renderer5.push(`Select collection...`);
137
+ });
138
+ $$renderer4.push(`<!--[-->`);
139
+ const each_array_2 = ensure_array_like(data.availableCollections);
140
+ for (let $$index = 0, $$length3 = each_array_2.length; $$index < $$length3; $$index++) {
141
+ let col = each_array_2[$$index];
142
+ $$renderer4.option({ value: col }, ($$renderer5) => {
143
+ $$renderer5.push(`${escape_html(col)}`);
144
+ });
145
+ }
146
+ $$renderer4.push(`<!--]-->`);
147
+ }
148
+ );
149
+ $$renderer3.push(`</label></div> <div class="flex-1"><label class="block text-xs mb-1">Target Field <input type="text"${attr("value", target.on)} placeholder="_id" class="w-full px-3 py-2 bg-[var(--color-1)] border border-[var(--border-color)] rounded text-sm mt-1"${attr("disabled", data.readOnly, true)}/></label></div> `);
150
+ if (!data.readOnly) {
151
+ $$renderer3.push("<!--[-->");
152
+ $$renderer3.push(`<button class="btn btn-outline-danger btn-sm mt-5"${attr("disabled", entry.targets.length === 1, true)}>×</button>`);
153
+ } else {
154
+ $$renderer3.push("<!--[!-->");
155
+ }
156
+ $$renderer3.push(`<!--]--></div>`);
157
+ }
158
+ $$renderer3.push(`<!--]--></div> `);
159
+ if (!data.readOnly) {
160
+ $$renderer3.push("<!--[-->");
161
+ $$renderer3.push(`<button class="btn btn-outline-light btn-sm mt-2 ml-4">+ Add Alternative Target</button>`);
162
+ } else {
163
+ $$renderer3.push("<!--[!-->");
164
+ }
165
+ $$renderer3.push(`<!--]--></div>`);
166
+ }
167
+ $$renderer3.push(`<!--]--></div>`);
168
+ } else {
169
+ $$renderer3.push("<!--[!-->");
170
+ $$renderer3.push(`<div class="text-center py-8" style="color: var(--text-secondary);">No mappings defined yet.</div>`);
171
+ }
172
+ $$renderer3.push(`<!--]--> `);
173
+ if (!data.readOnly) {
174
+ $$renderer3.push("<!--[-->");
175
+ $$renderer3.push(`<div class="mt-4">`);
176
+ {
177
+ $$renderer3.push("<!--[-->");
178
+ $$renderer3.push(`<button class="btn btn-success">+ Add New Mapping</button>`);
179
+ }
180
+ $$renderer3.push(`<!--]--></div>`);
181
+ } else {
182
+ $$renderer3.push("<!--[!-->");
183
+ }
184
+ $$renderer3.push(`<!--]--></div>`);
185
+ }
186
+ });
187
+ }
188
+ $$renderer2.push(`<!----> `);
189
+ {
190
+ $$renderer2.push("<!--[!-->");
191
+ }
192
+ $$renderer2.push(`<!--]-->`);
193
+ });
194
+ }
195
+
196
+ export { _page as default };
197
+ //# sourceMappingURL=_page.svelte-DI3cZxuK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_page.svelte-DI3cZxuK.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/servers/_server_/databases/_database_/collections/_collection_/mappings/_page.svelte.js"],"sourcesContent":["import \"../../../../../../../../../chunks/async.js\";\nimport { x as attr, w as ensure_array_like, z as stringify } from \"../../../../../../../../../chunks/index2.js\";\nimport \"../../../../../../../../../chunks/servers.remote.js\";\nimport { r as resolve } from \"../../../../../../../../../chunks/server2.js\";\nimport { P as Panel } from \"../../../../../../../../../chunks/Panel.js\";\nimport { e as escape_html } from \"../../../../../../../../../chunks/context.js\";\nfunction _page($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n let { data } = $$props;\n let mappingsArray = Object.entries(data.mappings).map(([fieldPath, targets]) => ({\n fieldPath,\n targets: Array.isArray(targets) ? targets : [targets]\n }));\n `I need help generating MongoDB collection mappings for my database.\n\n**Context:**\n- Database: ${data.database}\n- Collection: ${data.collection}\n- Available collections: ${data.availableCollections.join(\", \")}\n\n**Task:**\nPlease analyze my codebase to identify relationships between the \"${data.collection}\" collection and other collections. Look for:\n1. Fields that reference documents in other collections (foreign keys)\n2. Nested fields within arrays or objects that reference other documents\n3. Common patterns like userId, authorId, etc.\n\nIf you have access to the MongoDB MCP server, use it to:\n1. Query sample documents from the \"${data.collection}\" collection\n2. Analyze the schema and field types\n3. Identify potential foreign key relationships\n\n**Output Format:**\nCreate a file named \\`${data.collection}.mappings.json\\` with the following structure:\n\n\\`\\`\\`json\n{\n \"_id\": \"${data.collection}\",\n \"mappings\": {\n \"fieldPath\": { \"collection\": \"targetCollection\", \"on\": \"targetField\" },\n \"nested.fieldPath\": { \"collection\": \"targetCollection\", \"on\": \"targetField\" }\n }\n}\n\\`\\`\\`\n\n**Example:**\nIf the collection has documents like:\n\\`\\`\\`json\n{\n \"_id\": \"post1\",\n \"authorId\": \"user123\",\n \"comments\": [\n { \"authorId\": \"user456\", \"text\": \"Great post!\" }\n ]\n}\n\\`\\`\\`\n\nThe mappings would be:\n\\`\\`\\`json\n{\n \"_id\": \"${data.collection}\",\n \"mappings\": {\n \"authorId\": { \"collection\": \"users\", \"on\": \"_id\" },\n \"comments.authorId\": { \"collection\": \"users\", \"on\": \"_id\" }\n }\n}\n\\`\\`\\`\n\n**Notes:**\n- Use dot notation for nested fields (e.g., \"comments.authorId\")\n- Multiple mappings for the same field can be expressed as an array\n- Target field is usually \"_id\" but can be any unique field\n\nPlease analyze the codebase and database, then generate the appropriate mappings file.`;\n {\n let actions = function($$renderer3) {\n if (!data.readOnly) {\n $$renderer3.push(\"<!--[-->\");\n $$renderer3.push(`<button class=\"btn btn-outline-light btn-sm -my-2\">🤖 AI Helper</button> <button class=\"btn btn-success btn-sm -my-2\">Save</button>`);\n } else {\n $$renderer3.push(\"<!--[!-->\");\n }\n $$renderer3.push(`<!--]-->`);\n };\n Panel($$renderer2, {\n title: `Mappings for ${stringify(data.collection)}`,\n actions,\n children: ($$renderer3) => {\n $$renderer3.push(`<div class=\"p-4\"><div class=\"mb-4\"><p class=\"mb-3\">Define relationships between collections to enable hover tooltips and navigation on foreign key fields. This\n\t\t\t\twill be stored in the <code class=\"px-1 bg-[var(--light-background)] rounded\">mongoku.mappings</code> collection\n\t\t\t\tas a document with <a${attr(\"href\", resolve(`/servers/${data.server}/databases/${data.database}/collections/mongoku.mappings/documents/${data.collection}`))} class=\"text-blue-500\">_id: \"${escape_html(data.collection)}\"</a>.</p> <details class=\"mb-2\" style=\"color: var(--text-secondary);\"><summary class=\"cursor-pointer font-medium mb-2\">Example</summary> <div class=\"mt-2\"><div class=\"mb-1\">Document in collection <code class=\"px-1 bg-[var(--light-background)] rounded\">posts</code>:</div> <code class=\"block px-2 py-1 bg-[var(--light-background)] rounded text-xs mb-2\">{ _id: \"post1\", title: \"Hello\", authorId: \"user123\", comments: [{authorId: \"user456\", text:\n\t\t\t\t\t\t\"Nice!\"}] }</code> <div class=\"text space-y-1\"><div>→ Mapping 1: Field path <code class=\"px-1 bg-[var(--light-background)] rounded\">authorId</code>, target\n\t\t\t\t\t\t\tcollection <code class=\"px-1 bg-[var(--light-background)] rounded\">users</code>, target field <code class=\"px-1 bg-[var(--light-background)] rounded\">_id</code></div> <div>→ Mapping 2: Field path <code class=\"px-1 bg-[var(--light-background)] rounded\">comments.authorId</code>,\n\t\t\t\t\t\t\ttarget collection <code class=\"px-1 bg-[var(--light-background)] rounded\">users</code>, target field <code class=\"px-1 bg-[var(--light-background)] rounded\">_id</code></div></div></div></details></div> `);\n if (mappingsArray.length > 0) {\n $$renderer3.push(\"<!--[-->\");\n $$renderer3.push(`<div class=\"space-y-4\"><!--[-->`);\n const each_array = ensure_array_like(mappingsArray);\n for (let entryIndex = 0, $$length = each_array.length; entryIndex < $$length; entryIndex++) {\n let entry = each_array[entryIndex];\n $$renderer3.push(`<div class=\"border border-[var(--border-color)] rounded p-4\"><div class=\"flex items-start gap-4 mb-3\"><div class=\"flex-1\"><label class=\"block text-sm font-medium mb-1\">Field Path <input type=\"text\"${attr(\"value\", entry.fieldPath)} placeholder=\"e.g., authorId or comments.authorId\" class=\"w-full px-3 py-2 bg-[var(--color-1)] border border-[var(--border-color)] rounded text-sm mt-1\"${attr(\"disabled\", data.readOnly, true)}/></label></div> `);\n if (!data.readOnly) {\n $$renderer3.push(\"<!--[-->\");\n $$renderer3.push(`<button class=\"btn btn-outline-danger btn-sm mt-6\">Remove Mapping</button>`);\n } else {\n $$renderer3.push(\"<!--[!-->\");\n }\n $$renderer3.push(`<!--]--></div> <div class=\"space-y-2\"><!--[-->`);\n const each_array_1 = ensure_array_like(entry.targets);\n for (let targetIndex = 0, $$length2 = each_array_1.length; targetIndex < $$length2; targetIndex++) {\n let target = each_array_1[targetIndex];\n $$renderer3.push(`<div class=\"flex items-start gap-2 pl-4 border-l-2 border-[var(--color-3)]\"><div class=\"flex-1\"><label class=\"block text-xs mb-1\">Target Collection `);\n $$renderer3.select(\n {\n value: target.collection,\n class: \"w-full px-3 py-2 bg-[var(--color-1)] border border-[var(--border-color)] rounded text-sm mt-1\",\n disabled: data.readOnly\n },\n ($$renderer4) => {\n $$renderer4.option({ value: \"\" }, ($$renderer5) => {\n $$renderer5.push(`Select collection...`);\n });\n $$renderer4.push(`<!--[-->`);\n const each_array_2 = ensure_array_like(data.availableCollections);\n for (let $$index = 0, $$length3 = each_array_2.length; $$index < $$length3; $$index++) {\n let col = each_array_2[$$index];\n $$renderer4.option({ value: col }, ($$renderer5) => {\n $$renderer5.push(`${escape_html(col)}`);\n });\n }\n $$renderer4.push(`<!--]-->`);\n }\n );\n $$renderer3.push(`</label></div> <div class=\"flex-1\"><label class=\"block text-xs mb-1\">Target Field <input type=\"text\"${attr(\"value\", target.on)} placeholder=\"_id\" class=\"w-full px-3 py-2 bg-[var(--color-1)] border border-[var(--border-color)] rounded text-sm mt-1\"${attr(\"disabled\", data.readOnly, true)}/></label></div> `);\n if (!data.readOnly) {\n $$renderer3.push(\"<!--[-->\");\n $$renderer3.push(`<button class=\"btn btn-outline-danger btn-sm mt-5\"${attr(\"disabled\", entry.targets.length === 1, true)}>×</button>`);\n } else {\n $$renderer3.push(\"<!--[!-->\");\n }\n $$renderer3.push(`<!--]--></div>`);\n }\n $$renderer3.push(`<!--]--></div> `);\n if (!data.readOnly) {\n $$renderer3.push(\"<!--[-->\");\n $$renderer3.push(`<button class=\"btn btn-outline-light btn-sm mt-2 ml-4\">+ Add Alternative Target</button>`);\n } else {\n $$renderer3.push(\"<!--[!-->\");\n }\n $$renderer3.push(`<!--]--></div>`);\n }\n $$renderer3.push(`<!--]--></div>`);\n } else {\n $$renderer3.push(\"<!--[!-->\");\n $$renderer3.push(`<div class=\"text-center py-8\" style=\"color: var(--text-secondary);\">No mappings defined yet.</div>`);\n }\n $$renderer3.push(`<!--]--> `);\n if (!data.readOnly) {\n $$renderer3.push(\"<!--[-->\");\n $$renderer3.push(`<div class=\"mt-4\">`);\n {\n $$renderer3.push(\"<!--[-->\");\n $$renderer3.push(`<button class=\"btn btn-success\">+ Add New Mapping</button>`);\n }\n $$renderer3.push(`<!--]--></div>`);\n } else {\n $$renderer3.push(\"<!--[!-->\");\n }\n $$renderer3.push(`<!--]--></div>`);\n }\n });\n }\n $$renderer2.push(`<!----> `);\n {\n $$renderer2.push(\"<!--[!-->\");\n }\n $$renderer2.push(`<!--]-->`);\n });\n}\nexport {\n _page as default\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAMA,SAAS,KAAK,CAAC,UAAU,EAAE,OAAO,EAAE;AACpC,EAAE,UAAU,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AAW,CAAC;AACnC,IAAI;AACJ,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;AAChC,EAAE,CAAC,CAAC;AACJ;;;;"}
@@ -0,0 +1,203 @@
1
+ import './async-lVJA8xJZ.js';
2
+ import { d as await_block, e as ensure_array_like, b as attr_class, a as attr } from './index2-d4SCF7oA.js';
3
+ import './servers.remote-DKhy8wTJ.js';
4
+ import './client-BFlyU7ZU.js';
5
+ import { J as JsonValue_1 } from './JsonValue-DjUulYwg.js';
6
+ import { M as Modal } from './Modal-zVnoAfFx.js';
7
+ import { P as Panel } from './Panel-BM545RWK.js';
8
+ import { f as formatBytes } from './filters-CbFjTNFI.js';
9
+ import { e as escape_html } from './context-C22hLSHK.js';
10
+ import './event-DVH-6ISX.js';
11
+ import './utils-kjxf7BZO.js';
12
+ import './shared-Buki-xt5.js';
13
+ import './index-Djsj11qr.js';
14
+ import './jsonParser-CraFXJs8.js';
15
+ import 'esprima';
16
+ import './JsonEncoder-jJ2OBaud.js';
17
+ import 'mongodb';
18
+ import './mongo-DMG2RTBR.js';
19
+ import 'url';
20
+ import 'node:fs';
21
+ import 'node:os';
22
+ import 'node:path';
23
+ import 'zod';
24
+ import './state.svelte-C8IWmp_n.js';
25
+ import './client2-DYaMKWrc.js';
26
+ import './exports-Cv9LZeD1.js';
27
+ import './index-DFXVwu6p.js';
28
+ import './Tooltip-ByN2a8nn.js';
29
+
30
+ function omit(obj, keys) {
31
+ return Object.fromEntries(Object.entries(obj).filter(([key]) => !keys.includes(key)));
32
+ }
33
+ function _page($$renderer, $$props) {
34
+ $$renderer.component(($$renderer2) => {
35
+ const { data } = $$props;
36
+ const readOnly = data.readOnly;
37
+ let loadingIndexes = /* @__PURE__ */ new Set();
38
+ let showDropModal = false;
39
+ let indexToDrop = null;
40
+ const indexesData = data.indexes;
41
+ function closeDropModal() {
42
+ showDropModal = false;
43
+ indexToDrop = null;
44
+ }
45
+ await_block(
46
+ $$renderer2,
47
+ indexesData,
48
+ () => {
49
+ Panel($$renderer2, {
50
+ title: "Indexes",
51
+ children: ($$renderer3) => {
52
+ $$renderer3.push(`<div class="loading">Loading indexes...</div>`);
53
+ }
54
+ });
55
+ },
56
+ (result) => {
57
+ if (result.error) {
58
+ $$renderer2.push("<!--[-->");
59
+ Panel($$renderer2, {
60
+ title: "Indexes",
61
+ children: ($$renderer3) => {
62
+ $$renderer3.push(`<div class="p-4"><p class="error">${escape_html(result.error)}</p></div>`);
63
+ }
64
+ });
65
+ } else {
66
+ $$renderer2.push("<!--[!-->");
67
+ if (result.data.length === 0) {
68
+ $$renderer2.push("<!--[-->");
69
+ Panel($$renderer2, {
70
+ title: "Indexes",
71
+ children: ($$renderer3) => {
72
+ $$renderer3.push(`<div class="text-center p-4" style="color: var(--text-darker)">No indexes found</div>`);
73
+ }
74
+ });
75
+ } else {
76
+ $$renderer2.push("<!--[!-->");
77
+ Panel($$renderer2, {
78
+ title: "Indexes",
79
+ children: ($$renderer3) => {
80
+ $$renderer3.push(`<table class="table svelte-l3ef1w"><thead><tr><th class="shrink-column svelte-l3ef1w">Name</th><th>Keys</th><th>Properties</th><th class="shrink-column svelte-l3ef1w">Size</th><th class="shrink-column svelte-l3ef1w">Usage</th><th style="min-width: 300px">Details</th>`);
81
+ if (!readOnly) {
82
+ $$renderer3.push("<!--[-->");
83
+ $$renderer3.push(`<th style="width: 120px">Actions</th>`);
84
+ } else {
85
+ $$renderer3.push("<!--[!-->");
86
+ }
87
+ $$renderer3.push(`<!--]--></tr></thead><tbody class="svelte-l3ef1w"><!--[-->`);
88
+ const each_array = ensure_array_like(result.data);
89
+ for (let $$index_1 = 0, $$length = each_array.length; $$index_1 < $$length; $$index_1++) {
90
+ let index = each_array[$$index_1];
91
+ const isLoading = loadingIndexes.has(index.name);
92
+ $$renderer3.push(`<tr${attr_class("group", void 0, { "opacity-50": isLoading })}><td class="svelte-l3ef1w"><span class="font-mono text-sm">${escape_html(index.name)}</span></td><td class="svelte-l3ef1w">`);
93
+ if (index.key) {
94
+ $$renderer3.push("<!--[-->");
95
+ $$renderer3.push(`<div class="flex flex-wrap gap-2"><!--[-->`);
96
+ const each_array_1 = ensure_array_like(Object.entries(index.key));
97
+ for (let i = 0, $$length2 = each_array_1.length; i < $$length2; i++) {
98
+ let [field, direction] = each_array_1[i];
99
+ $$renderer3.push(`<span class="index-key svelte-l3ef1w">${escape_html(field)}: ${escape_html(direction === 1 ? "↑" : direction === -1 ? "↓" : direction)}</span>`);
100
+ }
101
+ $$renderer3.push(`<!--]--></div>`);
102
+ } else {
103
+ $$renderer3.push("<!--[!-->");
104
+ $$renderer3.push(`<span style="color: var(--text-darker)">-</span>`);
105
+ }
106
+ $$renderer3.push(`<!--]--></td><td class="svelte-l3ef1w"><div class="flex flex-wrap gap-2">`);
107
+ if (index.hidden) {
108
+ $$renderer3.push("<!--[-->");
109
+ $$renderer3.push(`<span class="badge badge-hidden svelte-l3ef1w">hidden</span>`);
110
+ } else {
111
+ $$renderer3.push("<!--[!-->");
112
+ }
113
+ $$renderer3.push(`<!--]--> `);
114
+ if (index.unique) {
115
+ $$renderer3.push("<!--[-->");
116
+ $$renderer3.push(`<span class="badge badge-unique svelte-l3ef1w">unique</span>`);
117
+ } else {
118
+ $$renderer3.push("<!--[!-->");
119
+ }
120
+ $$renderer3.push(`<!--]--> `);
121
+ if (index.sparse) {
122
+ $$renderer3.push("<!--[-->");
123
+ $$renderer3.push(`<span class="badge badge-sparse svelte-l3ef1w">sparse</span>`);
124
+ } else {
125
+ $$renderer3.push("<!--[!-->");
126
+ }
127
+ $$renderer3.push(`<!--]--> `);
128
+ if (index.partialFilterExpression) {
129
+ $$renderer3.push("<!--[-->");
130
+ $$renderer3.push(`<span class="badge badge-partial svelte-l3ef1w">partial</span>`);
131
+ } else {
132
+ $$renderer3.push("<!--[!-->");
133
+ }
134
+ $$renderer3.push(`<!--]--> `);
135
+ if (!index.hidden && !index.unique && !index.sparse && !index.partialFilterExpression) {
136
+ $$renderer3.push("<!--[-->");
137
+ $$renderer3.push(`<span style="color: var(--text-darker)">-</span>`);
138
+ } else {
139
+ $$renderer3.push("<!--[!-->");
140
+ }
141
+ $$renderer3.push(`<!--]--></div></td><td class="svelte-l3ef1w">`);
142
+ if (index.size) {
143
+ $$renderer3.push("<!--[-->");
144
+ $$renderer3.push(`<span class="text-sm whitespace-nowrap">${escape_html(formatBytes(index.size))}</span>`);
145
+ } else {
146
+ $$renderer3.push("<!--[!-->");
147
+ $$renderer3.push(`<span style="color: var(--text-darker)">-</span>`);
148
+ }
149
+ $$renderer3.push(`<!--]--></td><td class="svelte-l3ef1w">`);
150
+ if (index.stats) {
151
+ $$renderer3.push("<!--[-->");
152
+ $$renderer3.push(`<div class="text-sm mt-1"><div>${escape_html(index.stats.ops.toLocaleString())}</div></div>`);
153
+ } else {
154
+ $$renderer3.push("<!--[!-->");
155
+ $$renderer3.push(`<span style="color: var(--text-darker)">-</span>`);
156
+ }
157
+ $$renderer3.push(`<!--]--></td><td class="svelte-l3ef1w"><details class="cursor-pointer"><summary class="details-link svelte-l3ef1w">View full</summary> <div class="details-content svelte-l3ef1w">`);
158
+ JsonValue_1($$renderer3, { value: omit(index, ["stats"]), collapsed: false });
159
+ $$renderer3.push(`<!----></div></details></td>`);
160
+ if (!readOnly) {
161
+ $$renderer3.push("<!--[-->");
162
+ $$renderer3.push(`<td class="svelte-l3ef1w">`);
163
+ if (index.name !== "_id_") {
164
+ $$renderer3.push("<!--[-->");
165
+ $$renderer3.push(`<div class="flex gap-2 hidden group-hover:flex -my-2"><button class="btn btn-outline-light btn-sm svelte-l3ef1w"${attr("disabled", isLoading, true)}>${escape_html(index.hidden ? "Unhide" : "Hide")}</button> <button class="btn btn-outline-danger btn-sm"${attr("disabled", isLoading, true)}>Drop</button></div>`);
166
+ } else {
167
+ $$renderer3.push("<!--[!-->");
168
+ }
169
+ $$renderer3.push(`<!--]--></td>`);
170
+ } else {
171
+ $$renderer3.push("<!--[!-->");
172
+ }
173
+ $$renderer3.push(`<!--]--></tr>`);
174
+ }
175
+ $$renderer3.push(`<!--]--></tbody></table>`);
176
+ }
177
+ });
178
+ }
179
+ $$renderer2.push(`<!--]-->`);
180
+ }
181
+ $$renderer2.push(`<!--]-->`);
182
+ }
183
+ );
184
+ $$renderer2.push(`<!--]--> `);
185
+ {
186
+ let footer = function($$renderer3) {
187
+ $$renderer3.push(`<button class="btn btn-default btn-sm">Cancel</button> <button class="btn btn-danger btn-sm">Drop Index</button>`);
188
+ };
189
+ Modal($$renderer2, {
190
+ show: showDropModal,
191
+ onclose: closeDropModal,
192
+ footer,
193
+ children: ($$renderer3) => {
194
+ $$renderer3.push(`<p>Are you sure you want to drop the index <strong>${escape_html(indexToDrop)}</strong>?</p> <p class="text-sm mt-2" style="color: var(--text-darker)">This action cannot be undone. The index will need to be recreated if needed again.</p>`);
195
+ }
196
+ });
197
+ }
198
+ $$renderer2.push(`<!---->`);
199
+ });
200
+ }
201
+
202
+ export { _page as default };
203
+ //# sourceMappingURL=_page.svelte-DPUr13fG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_page.svelte-DPUr13fG.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/servers/_server_/databases/_database_/collections/_collection_/indexes/_page.svelte.js"],"sourcesContent":["import \"../../../../../../../../../chunks/async.js\";\nimport { G as await_block, w as ensure_array_like, y as attr_class, x as attr } from \"../../../../../../../../../chunks/index2.js\";\nimport \"../../../../../../../../../chunks/servers.remote.js\";\nimport \"../../../../../../../../../chunks/client.js\";\nimport { J as JsonValue_1 } from \"../../../../../../../../../chunks/JsonValue.js\";\nimport { M as Modal } from \"../../../../../../../../../chunks/Modal.js\";\nimport { P as Panel } from \"../../../../../../../../../chunks/Panel.js\";\nimport { f as formatBytes } from \"../../../../../../../../../chunks/filters.js\";\nimport { e as escape_html } from \"../../../../../../../../../chunks/context.js\";\nfunction omit(obj, keys) {\n return Object.fromEntries(Object.entries(obj).filter(([key]) => !keys.includes(key)));\n}\nfunction _page($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n const { data } = $$props;\n const readOnly = data.readOnly;\n let loadingIndexes = /* @__PURE__ */ new Set();\n let showDropModal = false;\n let indexToDrop = null;\n const indexesData = data.indexes;\n function closeDropModal() {\n showDropModal = false;\n indexToDrop = null;\n }\n await_block(\n $$renderer2,\n indexesData,\n () => {\n Panel($$renderer2, {\n title: \"Indexes\",\n children: ($$renderer3) => {\n $$renderer3.push(`<div class=\"loading\">Loading indexes...</div>`);\n }\n });\n },\n (result) => {\n if (result.error) {\n $$renderer2.push(\"<!--[-->\");\n Panel($$renderer2, {\n title: \"Indexes\",\n children: ($$renderer3) => {\n $$renderer3.push(`<div class=\"p-4\"><p class=\"error\">${escape_html(result.error)}</p></div>`);\n }\n });\n } else {\n $$renderer2.push(\"<!--[!-->\");\n if (result.data.length === 0) {\n $$renderer2.push(\"<!--[-->\");\n Panel($$renderer2, {\n title: \"Indexes\",\n children: ($$renderer3) => {\n $$renderer3.push(`<div class=\"text-center p-4\" style=\"color: var(--text-darker)\">No indexes found</div>`);\n }\n });\n } else {\n $$renderer2.push(\"<!--[!-->\");\n Panel($$renderer2, {\n title: \"Indexes\",\n children: ($$renderer3) => {\n $$renderer3.push(`<table class=\"table svelte-l3ef1w\"><thead><tr><th class=\"shrink-column svelte-l3ef1w\">Name</th><th>Keys</th><th>Properties</th><th class=\"shrink-column svelte-l3ef1w\">Size</th><th class=\"shrink-column svelte-l3ef1w\">Usage</th><th style=\"min-width: 300px\">Details</th>`);\n if (!readOnly) {\n $$renderer3.push(\"<!--[-->\");\n $$renderer3.push(`<th style=\"width: 120px\">Actions</th>`);\n } else {\n $$renderer3.push(\"<!--[!-->\");\n }\n $$renderer3.push(`<!--]--></tr></thead><tbody class=\"svelte-l3ef1w\"><!--[-->`);\n const each_array = ensure_array_like(result.data);\n for (let $$index_1 = 0, $$length = each_array.length; $$index_1 < $$length; $$index_1++) {\n let index = each_array[$$index_1];\n const isLoading = loadingIndexes.has(index.name);\n $$renderer3.push(`<tr${attr_class(\"group\", void 0, { \"opacity-50\": isLoading })}><td class=\"svelte-l3ef1w\"><span class=\"font-mono text-sm\">${escape_html(index.name)}</span></td><td class=\"svelte-l3ef1w\">`);\n if (index.key) {\n $$renderer3.push(\"<!--[-->\");\n $$renderer3.push(`<div class=\"flex flex-wrap gap-2\"><!--[-->`);\n const each_array_1 = ensure_array_like(Object.entries(index.key));\n for (let i = 0, $$length2 = each_array_1.length; i < $$length2; i++) {\n let [field, direction] = each_array_1[i];\n $$renderer3.push(`<span class=\"index-key svelte-l3ef1w\">${escape_html(field)}: ${escape_html(direction === 1 ? \"↑\" : direction === -1 ? \"↓\" : direction)}</span>`);\n }\n $$renderer3.push(`<!--]--></div>`);\n } else {\n $$renderer3.push(\"<!--[!-->\");\n $$renderer3.push(`<span style=\"color: var(--text-darker)\">-</span>`);\n }\n $$renderer3.push(`<!--]--></td><td class=\"svelte-l3ef1w\"><div class=\"flex flex-wrap gap-2\">`);\n if (index.hidden) {\n $$renderer3.push(\"<!--[-->\");\n $$renderer3.push(`<span class=\"badge badge-hidden svelte-l3ef1w\">hidden</span>`);\n } else {\n $$renderer3.push(\"<!--[!-->\");\n }\n $$renderer3.push(`<!--]--> `);\n if (index.unique) {\n $$renderer3.push(\"<!--[-->\");\n $$renderer3.push(`<span class=\"badge badge-unique svelte-l3ef1w\">unique</span>`);\n } else {\n $$renderer3.push(\"<!--[!-->\");\n }\n $$renderer3.push(`<!--]--> `);\n if (index.sparse) {\n $$renderer3.push(\"<!--[-->\");\n $$renderer3.push(`<span class=\"badge badge-sparse svelte-l3ef1w\">sparse</span>`);\n } else {\n $$renderer3.push(\"<!--[!-->\");\n }\n $$renderer3.push(`<!--]--> `);\n if (index.partialFilterExpression) {\n $$renderer3.push(\"<!--[-->\");\n $$renderer3.push(`<span class=\"badge badge-partial svelte-l3ef1w\">partial</span>`);\n } else {\n $$renderer3.push(\"<!--[!-->\");\n }\n $$renderer3.push(`<!--]--> `);\n if (!index.hidden && !index.unique && !index.sparse && !index.partialFilterExpression) {\n $$renderer3.push(\"<!--[-->\");\n $$renderer3.push(`<span style=\"color: var(--text-darker)\">-</span>`);\n } else {\n $$renderer3.push(\"<!--[!-->\");\n }\n $$renderer3.push(`<!--]--></div></td><td class=\"svelte-l3ef1w\">`);\n if (index.size) {\n $$renderer3.push(\"<!--[-->\");\n $$renderer3.push(`<span class=\"text-sm whitespace-nowrap\">${escape_html(formatBytes(index.size))}</span>`);\n } else {\n $$renderer3.push(\"<!--[!-->\");\n $$renderer3.push(`<span style=\"color: var(--text-darker)\">-</span>`);\n }\n $$renderer3.push(`<!--]--></td><td class=\"svelte-l3ef1w\">`);\n if (index.stats) {\n $$renderer3.push(\"<!--[-->\");\n $$renderer3.push(`<div class=\"text-sm mt-1\"><div>${escape_html(index.stats.ops.toLocaleString())}</div></div>`);\n } else {\n $$renderer3.push(\"<!--[!-->\");\n $$renderer3.push(`<span style=\"color: var(--text-darker)\">-</span>`);\n }\n $$renderer3.push(`<!--]--></td><td class=\"svelte-l3ef1w\"><details class=\"cursor-pointer\"><summary class=\"details-link svelte-l3ef1w\">View full</summary> <div class=\"details-content svelte-l3ef1w\">`);\n JsonValue_1($$renderer3, { value: omit(index, [\"stats\"]), collapsed: false });\n $$renderer3.push(`<!----></div></details></td>`);\n if (!readOnly) {\n $$renderer3.push(\"<!--[-->\");\n $$renderer3.push(`<td class=\"svelte-l3ef1w\">`);\n if (index.name !== \"_id_\") {\n $$renderer3.push(\"<!--[-->\");\n $$renderer3.push(`<div class=\"flex gap-2 hidden group-hover:flex -my-2\"><button class=\"btn btn-outline-light btn-sm svelte-l3ef1w\"${attr(\"disabled\", isLoading, true)}>${escape_html(index.hidden ? \"Unhide\" : \"Hide\")}</button> <button class=\"btn btn-outline-danger btn-sm\"${attr(\"disabled\", isLoading, true)}>Drop</button></div>`);\n } else {\n $$renderer3.push(\"<!--[!-->\");\n }\n $$renderer3.push(`<!--]--></td>`);\n } else {\n $$renderer3.push(\"<!--[!-->\");\n }\n $$renderer3.push(`<!--]--></tr>`);\n }\n $$renderer3.push(`<!--]--></tbody></table>`);\n }\n });\n }\n $$renderer2.push(`<!--]-->`);\n }\n $$renderer2.push(`<!--]-->`);\n }\n );\n $$renderer2.push(`<!--]--> `);\n {\n let footer = function($$renderer3) {\n $$renderer3.push(`<button class=\"btn btn-default btn-sm\">Cancel</button> <button class=\"btn btn-danger btn-sm\">Drop Index</button>`);\n };\n Modal($$renderer2, {\n show: showDropModal,\n onclose: closeDropModal,\n footer,\n children: ($$renderer3) => {\n $$renderer3.push(`<p>Are you sure you want to drop the index <strong>${escape_html(indexToDrop)}</strong>?</p> <p class=\"text-sm mt-2\" style=\"color: var(--text-darker)\">This action cannot be undone. The index will need to be recreated if needed again.</p>`);\n }\n });\n }\n $$renderer2.push(`<!---->`);\n });\n}\nexport {\n _page as default\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,SAAS,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE;AACzB,EAAE,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AACvF;AACA,SAAS,KAAK,CAAC,UAAU,EAAE,OAAO,EAAE;AACpC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,WAAW,KAAK;AACxC,IAAI,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO;AAC5B,IAAI,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ;AAClC,IAAI,IAAI,cAAc,mBAAmB,IAAI,GAAG,EAAE;AAClD,IAAI,IAAI,aAAa,GAAG,KAAK;AAC7B,IAAI,IAAI,WAAW,GAAG,IAAI;AAC1B,IAAI,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO;AACpC,IAAI,SAAS,cAAc,GAAG;AAC9B,MAAM,aAAa,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K,CAAC,WAAW,EAAE;AACzB,QAAQ,IAAI,EAAE,aAAa;AAC3B,QAAQ,OAAO,EAAE,cAAc;AAC/B,QAAQ,MAAM;AACd,QAAQ,QAAQ,EAAE,CAAC,WAAW,KAAK;AACnC,UAAU,WAAW,CAAC,IAAI,CAAC,CAAC,mDAAmD,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC,+JAA+J,CAAC,CAAC;AAC3Q,QAAQ;AACR,OAAO,CAAC;AACR,IAAI;AACJ,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;AAC/B,EAAE,CAAC,CAAC;AACJ;;;;"}
@@ -1,26 +1,32 @@
1
- import './async-BfR0vYHo.js';
2
- import { u as updateDocument, d as deleteDocument } from './remote-xxtqbu-BFzaWXy0.js';
3
- import { g as goto } from './client2-BX4-xbM4.js';
4
- import { r as resolve } from './server2-BOoUfKd7.js';
5
- import { P as PrettyJson } from './PrettyJson-C2c9xGNo.js';
1
+ import './async-lVJA8xJZ.js';
2
+ import { u as updateDocument, d as deleteDocument } from './servers.remote-DKhy8wTJ.js';
3
+ import { g as goto } from './client2-DYaMKWrc.js';
4
+ import { r as resolve } from './server2-_mGVuBoG.js';
5
+ import { P as PrettyJson } from './PrettyJson-CVemKT9n.js';
6
6
  import { n as notificationStore } from './notifications.svelte-CIqkoPWX.js';
7
7
  import './event-DVH-6ISX.js';
8
- import './utils-DGYJFmnf.js';
8
+ import './utils-kjxf7BZO.js';
9
+ import './shared-Buki-xt5.js';
9
10
  import './index-Djsj11qr.js';
11
+ import './jsonParser-CraFXJs8.js';
12
+ import 'esprima';
10
13
  import './JsonEncoder-jJ2OBaud.js';
11
14
  import 'mongodb';
12
- import './mongo-dLmCShL_.js';
15
+ import './mongo-DMG2RTBR.js';
13
16
  import 'url';
14
17
  import 'node:fs';
15
18
  import 'node:os';
16
19
  import 'node:path';
17
20
  import 'zod';
18
21
  import './exports-Cv9LZeD1.js';
19
- import './index-EKt9-9bV.js';
20
- import './state.svelte-CRHA9yov.js';
21
- import './routing-Ddj5b-2K.js';
22
- import 'esprima';
23
- import './Panel-Box8ld78.js';
22
+ import './index-DFXVwu6p.js';
23
+ import './context-C22hLSHK.js';
24
+ import './state.svelte-C8IWmp_n.js';
25
+ import './routing-e10vGH37.js';
26
+ import './index2-d4SCF7oA.js';
27
+ import './JsonValue-DjUulYwg.js';
28
+ import './Tooltip-ByN2a8nn.js';
29
+ import './Panel-BM545RWK.js';
24
30
 
25
31
  function _page($$renderer, $$props) {
26
32
  $$renderer.component(($$renderer2) => {
@@ -28,8 +34,8 @@ function _page($$renderer, $$props) {
28
34
  let loading = false;
29
35
  let item = data.document;
30
36
  async function editDocument(json) {
31
- const newId = json?._id?.$value;
32
- const oldId = item?._id?.$value;
37
+ const newId = json?._id?.$value ?? json?._id;
38
+ const oldId = item?._id?.$value ?? item?._id;
33
39
  if (newId !== oldId) {
34
40
  notificationStore.notifyError("ObjectId changed. This is not supported, update canceled.");
35
41
  return;
@@ -56,7 +62,7 @@ function _page($$renderer, $$props) {
56
62
  }
57
63
  }
58
64
  async function removeDocument() {
59
- const documentId = item?._id?.$value;
65
+ const documentId = item?._id?.$value ?? item?._id;
60
66
  if (!documentId) return;
61
67
  try {
62
68
  await deleteDocument({
@@ -73,23 +79,34 @@ function _page($$renderer, $$props) {
73
79
  }
74
80
  if (loading) {
75
81
  $$renderer2.push("<!--[-->");
76
- $$renderer2.push(`<div class="loading">Loading...</div>`);
82
+ $$renderer2.push(`<div class="loading svelte-khslrq">Loading...</div>`);
77
83
  } else {
78
84
  $$renderer2.push("<!--[!-->");
79
85
  if (item) {
80
86
  $$renderer2.push("<!--[-->");
81
87
  PrettyJson($$renderer2, {
82
88
  json: item,
83
- readOnly: data.readOnly,
84
89
  onedit: editDocument,
85
90
  onremove: removeDocument,
86
91
  server: data.server,
87
92
  database: data.database,
88
- collection: data.collection
93
+ collection: data.collection,
94
+ mappings: data.mappings
89
95
  });
90
96
  } else {
91
97
  $$renderer2.push("<!--[!-->");
92
- $$renderer2.push(`<div class="text-center">Document not found</div>`);
98
+ {
99
+ $$renderer2.push("<!--[!-->");
100
+ $$renderer2.push(`<div class="not-found-container svelte-khslrq"><div class="text-center svelte-khslrq">Document not found</div> `);
101
+ if (!data.readOnly) {
102
+ $$renderer2.push("<!--[-->");
103
+ $$renderer2.push(`<button class="btn btn-success">Insert Document</button>`);
104
+ } else {
105
+ $$renderer2.push("<!--[!-->");
106
+ }
107
+ $$renderer2.push(`<!--]--></div>`);
108
+ }
109
+ $$renderer2.push(`<!--]-->`);
93
110
  }
94
111
  $$renderer2.push(`<!--]-->`);
95
112
  }
@@ -98,4 +115,4 @@ function _page($$renderer, $$props) {
98
115
  }
99
116
 
100
117
  export { _page as default };
101
- //# sourceMappingURL=_page.svelte-zlHeUnJK.js.map
118
+ //# sourceMappingURL=_page.svelte-mO3b8YSb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_page.svelte-mO3b8YSb.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/servers/_server_/databases/_database_/collections/_collection_/documents/_document_/_page.svelte.js"],"sourcesContent":["import \"../../../../../../../../../../chunks/async.js\";\nimport { u as updateDocument, d as deleteDocument } from \"../../../../../../../../../../chunks/servers.remote.js\";\nimport { g as goto } from \"../../../../../../../../../../chunks/client2.js\";\nimport { r as resolve } from \"../../../../../../../../../../chunks/server2.js\";\nimport { P as PrettyJson } from \"../../../../../../../../../../chunks/PrettyJson.js\";\nimport { n as notificationStore } from \"../../../../../../../../../../chunks/notifications.svelte.js\";\nfunction _page($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n let { data } = $$props;\n let loading = false;\n let item = data.document;\n async function editDocument(json) {\n const newId = json?._id?.$value ?? json?._id;\n const oldId = item?._id?.$value ?? item?._id;\n if (newId !== oldId) {\n notificationStore.notifyError(\"ObjectId changed. This is not supported, update canceled.\");\n return;\n }\n if (!oldId) return;\n loading = true;\n try {\n const result = await updateDocument({\n server: data.server,\n database: data.database,\n collection: data.collection,\n document: oldId,\n value: json,\n partial: false\n });\n if (result.ok) {\n notificationStore.notifySuccess(\"Document updated successfully\");\n item = result.update;\n }\n } catch (error) {\n notificationStore.notifyError(error, \"Failed to update document\");\n } finally {\n loading = false;\n }\n }\n async function removeDocument() {\n const documentId = item?._id?.$value ?? item?._id;\n if (!documentId) return;\n try {\n await deleteDocument({\n server: data.server,\n database: data.database,\n collection: data.collection,\n document: documentId\n });\n notificationStore.notifySuccess(\"Document removed successfully\");\n goto(resolve(`/servers/${encodeURIComponent(data.server)}/databases/${encodeURIComponent(data.database)}/collections/${encodeURIComponent(data.collection)}?query=${encodeURIComponent(\"{}\")}&sort=&project=&skip=0&limit=20`));\n } catch (error) {\n notificationStore.notifyError(error, \"Failed to remove document\");\n }\n }\n if (loading) {\n $$renderer2.push(\"<!--[-->\");\n $$renderer2.push(`<div class=\"loading svelte-khslrq\">Loading...</div>`);\n } else {\n $$renderer2.push(\"<!--[!-->\");\n if (item) {\n $$renderer2.push(\"<!--[-->\");\n PrettyJson($$renderer2, {\n json: item,\n onedit: editDocument,\n onremove: removeDocument,\n server: data.server,\n database: data.database,\n collection: data.collection,\n mappings: data.mappings\n });\n } else {\n $$renderer2.push(\"<!--[!-->\");\n {\n $$renderer2.push(\"<!--[!-->\");\n $$renderer2.push(`<div class=\"not-found-container svelte-khslrq\"><div class=\"text-center svelte-khslrq\">Document not found</div> `);\n if (!data.readOnly) {\n $$renderer2.push(\"<!--[-->\");\n $$renderer2.push(`<button class=\"btn btn-success\">Insert Document</button>`);\n } else {\n $$renderer2.push(\"<!--[!-->\");\n }\n $$renderer2.push(`<!--]--></div>`);\n }\n $$renderer2.push(`<!--]-->`);\n }\n $$renderer2.push(`<!--]-->`);\n }\n $$renderer2.push(`<!--]-->`);\n });\n}\nexport {\n _page as default\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,SAAS,KAAK,CAAC,UAAU,EAAE,OAAO,EAAE;AACpC,EAAE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