@theobourgeois/ytdb 0.3.0 → 0.4.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 (216) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +8 -3
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/routes-manifest.json +32 -0
  5. package/.next/server/app/[connectionId]/[schema]/[table]/page.js +1 -1
  6. package/.next/server/app/[connectionId]/[schema]/[table]/page_client-reference-manifest.js +1 -1
  7. package/.next/server/app/[connectionId]/diff/page.js +2 -2
  8. package/.next/server/app/[connectionId]/diff/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/[connectionId]/migrations/(index)/page.js +1 -1
  10. package/.next/server/app/[connectionId]/migrations/(index)/page.js.nft.json +1 -1
  11. package/.next/server/app/[connectionId]/migrations/(index)/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/[connectionId]/migrations/(index)/release/page.js +1 -0
  13. package/.next/server/app/[connectionId]/migrations/(index)/release/page.js.nft.json +1 -0
  14. package/.next/server/app/[connectionId]/migrations/(index)/release/page_client-reference-manifest.js +1 -0
  15. package/.next/server/app/[connectionId]/migrations/(index)/timeline/page.js +1 -1
  16. package/.next/server/app/[connectionId]/migrations/(index)/timeline/page.js.nft.json +1 -1
  17. package/.next/server/app/[connectionId]/migrations/(index)/timeline/page_client-reference-manifest.js +1 -1
  18. package/.next/server/app/[connectionId]/migrations/[setId]/diagram/page.js +1 -1
  19. package/.next/server/app/[connectionId]/migrations/[setId]/diagram/page.js.nft.json +1 -1
  20. package/.next/server/app/[connectionId]/migrations/[setId]/diagram/page_client-reference-manifest.js +1 -1
  21. package/.next/server/app/[connectionId]/migrations/[setId]/page.js +1 -1
  22. package/.next/server/app/[connectionId]/migrations/[setId]/page.js.nft.json +1 -1
  23. package/.next/server/app/[connectionId]/migrations/[setId]/page_client-reference-manifest.js +1 -1
  24. package/.next/server/app/[connectionId]/migrations/[setId]/schema/page.js +1 -1
  25. package/.next/server/app/[connectionId]/migrations/[setId]/schema/page.js.nft.json +1 -1
  26. package/.next/server/app/[connectionId]/migrations/[setId]/schema/page_client-reference-manifest.js +1 -1
  27. package/.next/server/app/[connectionId]/migrations/[setId]/timeline/page.js +1 -1
  28. package/.next/server/app/[connectionId]/migrations/[setId]/timeline/page.js.nft.json +1 -1
  29. package/.next/server/app/[connectionId]/migrations/[setId]/timeline/page_client-reference-manifest.js +1 -1
  30. package/.next/server/app/[connectionId]/page.js +1 -1
  31. package/.next/server/app/[connectionId]/page_client-reference-manifest.js +1 -1
  32. package/.next/server/app/[connectionId]/query/page.js +1 -1
  33. package/.next/server/app/[connectionId]/query/page_client-reference-manifest.js +1 -1
  34. package/.next/server/app/_global-error/page.js +2 -2
  35. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  36. package/.next/server/app/_global-error.html +1 -1
  37. package/.next/server/app/_global-error.rsc +1 -1
  38. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  39. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  40. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  41. package/.next/server/app/_not-found/page.js +1 -1
  42. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  43. package/.next/server/app/_not-found.html +1 -1
  44. package/.next/server/app/_not-found.rsc +2 -2
  45. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  46. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  47. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  48. package/.next/server/app/api/activity/route.js +2 -2
  49. package/.next/server/app/api/activity/route.js.nft.json +1 -1
  50. package/.next/server/app/api/adopt/route.js +1 -1
  51. package/.next/server/app/api/adopt/route.js.nft.json +1 -1
  52. package/.next/server/app/api/cell/route.js +2 -2
  53. package/.next/server/app/api/cell/route.js.nft.json +1 -1
  54. package/.next/server/app/api/definition/route.js +2 -2
  55. package/.next/server/app/api/definition/route.js.nft.json +1 -1
  56. package/.next/server/app/api/delete-rows/route.js +2 -2
  57. package/.next/server/app/api/delete-rows/route.js.nft.json +1 -1
  58. package/.next/server/app/api/detect/route.js +1 -1
  59. package/.next/server/app/api/detect/route.js.nft.json +1 -1
  60. package/.next/server/app/api/health/route.js +1 -1
  61. package/.next/server/app/api/insert-row/route.js +2 -2
  62. package/.next/server/app/api/insert-row/route.js.nft.json +1 -1
  63. package/.next/server/app/api/ledger/route.js +1 -1
  64. package/.next/server/app/api/ledger/route.js.nft.json +1 -1
  65. package/.next/server/app/api/lookup/route.js +2 -2
  66. package/.next/server/app/api/lookup/route.js.nft.json +1 -1
  67. package/.next/server/app/api/migrate/route.js +1 -1
  68. package/.next/server/app/api/migrate/route.js.nft.json +1 -1
  69. package/.next/server/app/api/note/route.js +1 -1
  70. package/.next/server/app/api/note/route.js.nft.json +1 -1
  71. package/.next/server/app/api/query/route.js +2 -2
  72. package/.next/server/app/api/query/route.js.nft.json +1 -1
  73. package/.next/server/app/api/reconcile/route.js +2 -2
  74. package/.next/server/app/api/reconcile/route.js.nft.json +1 -1
  75. package/.next/server/app/api/rehearse/route.js +1 -1
  76. package/.next/server/app/api/rehearse/route.js.nft.json +1 -1
  77. package/.next/server/app/api/related/route.js +1 -1
  78. package/.next/server/app/api/related/route.js.nft.json +1 -1
  79. package/.next/server/app/api/release/label/route.js +1 -0
  80. package/.next/server/app/api/release/label/route.js.nft.json +1 -0
  81. package/.next/server/app/api/release/label/route_client-reference-manifest.js +1 -0
  82. package/.next/server/app/api/release/merge/route.js +1 -0
  83. package/.next/server/app/api/release/merge/route.js.nft.json +1 -0
  84. package/.next/server/app/api/release/merge/route_client-reference-manifest.js +1 -0
  85. package/.next/server/app/api/release/route.js +1 -0
  86. package/.next/server/app/api/release/route.js.nft.json +1 -0
  87. package/.next/server/app/api/release/route_client-reference-manifest.js +1 -0
  88. package/.next/server/app/api/release/sync/route.js +1 -0
  89. package/.next/server/app/api/release/sync/route.js.nft.json +1 -0
  90. package/.next/server/app/api/release/sync/route_client-reference-manifest.js +1 -0
  91. package/.next/server/app/api/repo/route.js +1 -1
  92. package/.next/server/app/api/repo/route.js.nft.json +1 -1
  93. package/.next/server/app/api/rows/route.js +2 -2
  94. package/.next/server/app/api/rows/route.js.nft.json +1 -1
  95. package/.next/server/app/api/schema/route.js +1 -1
  96. package/.next/server/app/api/schema/route.js.nft.json +1 -1
  97. package/.next/server/app/api/tables/route.js +2 -2
  98. package/.next/server/app/api/tables/route.js.nft.json +1 -1
  99. package/.next/server/app/api/timeline/route.js +1 -1
  100. package/.next/server/app/api/timeline/route.js.nft.json +1 -1
  101. package/.next/server/app/api/update-row/route.js +1 -1
  102. package/.next/server/app/api/update-row/route.js.nft.json +1 -1
  103. package/.next/server/app/favicon.ico/route.js +1 -1
  104. package/.next/server/app/icon.svg/route.js +1 -1
  105. package/.next/server/app/index.html +1 -1
  106. package/.next/server/app/index.rsc +3 -3
  107. package/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
  108. package/.next/server/app/index.segments/_full.segment.rsc +3 -3
  109. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  110. package/.next/server/app/page.js +2 -2
  111. package/.next/server/app/page_client-reference-manifest.js +1 -1
  112. package/.next/server/app-paths-manifest.json +8 -3
  113. package/.next/server/chunks/2783.js +2 -0
  114. package/.next/server/chunks/3128.js +1 -0
  115. package/.next/server/chunks/4809.js +1 -1
  116. package/.next/server/chunks/535.js +1 -1
  117. package/.next/server/chunks/6326.js +1 -0
  118. package/.next/server/chunks/6433.js +1 -1
  119. package/.next/server/chunks/6729.js +1 -1
  120. package/.next/server/chunks/7605.js +1 -1
  121. package/.next/server/chunks/8842.js +1 -1
  122. package/.next/server/middleware-build-manifest.js +1 -1
  123. package/.next/server/pages/404.html +1 -1
  124. package/.next/server/pages/500.html +1 -1
  125. package/.next/static/chunks/5882-80bb4c4b772c9896.js +1 -0
  126. package/.next/static/chunks/6090-6747af370e06526b.js +1 -0
  127. package/.next/static/chunks/app/[connectionId]/migrations/(index)/layout-4156ea75d3316171.js +1 -0
  128. package/.next/static/chunks/app/[connectionId]/migrations/(index)/page-10c95b58565e06ec.js +1 -0
  129. package/.next/static/chunks/app/[connectionId]/migrations/(index)/release/page-10c95b58565e06ec.js +1 -0
  130. package/.next/static/chunks/app/[connectionId]/migrations/(index)/timeline/page-10c95b58565e06ec.js +1 -0
  131. package/.next/static/chunks/app/[connectionId]/migrations/[setId]/diagram/page-10c95b58565e06ec.js +1 -0
  132. package/.next/static/chunks/app/[connectionId]/migrations/[setId]/layout-a4421cb4d144bdb0.js +1 -0
  133. package/.next/static/chunks/app/[connectionId]/migrations/[setId]/page-10c95b58565e06ec.js +1 -0
  134. package/.next/static/chunks/app/[connectionId]/migrations/[setId]/schema/page-10c95b58565e06ec.js +1 -0
  135. package/.next/static/chunks/app/[connectionId]/migrations/[setId]/timeline/page-10c95b58565e06ec.js +1 -0
  136. package/.next/static/chunks/app/[connectionId]/page-33495fc674565a49.js +1 -0
  137. package/.next/static/chunks/app/_global-error/page-10c95b58565e06ec.js +1 -0
  138. package/.next/static/chunks/app/api/activity/route-10c95b58565e06ec.js +1 -0
  139. package/.next/static/chunks/app/api/adopt/route-10c95b58565e06ec.js +1 -0
  140. package/.next/static/chunks/app/api/cell/route-10c95b58565e06ec.js +1 -0
  141. package/.next/static/chunks/app/api/definition/route-10c95b58565e06ec.js +1 -0
  142. package/.next/static/chunks/app/api/delete-rows/route-10c95b58565e06ec.js +1 -0
  143. package/.next/static/chunks/app/api/detect/route-10c95b58565e06ec.js +1 -0
  144. package/.next/static/chunks/app/api/health/route-10c95b58565e06ec.js +1 -0
  145. package/.next/static/chunks/app/api/insert-row/route-10c95b58565e06ec.js +1 -0
  146. package/.next/static/chunks/app/api/ledger/route-10c95b58565e06ec.js +1 -0
  147. package/.next/static/chunks/app/api/lookup/route-10c95b58565e06ec.js +1 -0
  148. package/.next/static/chunks/app/api/migrate/route-10c95b58565e06ec.js +1 -0
  149. package/.next/static/chunks/app/api/note/route-10c95b58565e06ec.js +1 -0
  150. package/.next/static/chunks/app/api/query/route-10c95b58565e06ec.js +1 -0
  151. package/.next/static/chunks/app/api/reconcile/route-10c95b58565e06ec.js +1 -0
  152. package/.next/static/chunks/app/api/rehearse/route-10c95b58565e06ec.js +1 -0
  153. package/.next/static/chunks/app/api/related/route-10c95b58565e06ec.js +1 -0
  154. package/.next/static/chunks/app/api/release/label/route-10c95b58565e06ec.js +1 -0
  155. package/.next/static/chunks/app/api/release/merge/route-10c95b58565e06ec.js +1 -0
  156. package/.next/static/chunks/app/api/release/route-10c95b58565e06ec.js +1 -0
  157. package/.next/static/chunks/app/api/release/sync/route-10c95b58565e06ec.js +1 -0
  158. package/.next/static/chunks/app/api/repo/route-10c95b58565e06ec.js +1 -0
  159. package/.next/static/chunks/app/api/rows/route-10c95b58565e06ec.js +1 -0
  160. package/.next/static/chunks/app/api/schema/route-10c95b58565e06ec.js +1 -0
  161. package/.next/static/chunks/app/api/tables/route-10c95b58565e06ec.js +1 -0
  162. package/.next/static/chunks/app/api/timeline/route-10c95b58565e06ec.js +1 -0
  163. package/.next/static/chunks/app/api/update-row/route-10c95b58565e06ec.js +1 -0
  164. package/.next/static/chunks/f97e080b-153a1a5ae19cb7a0.js +1 -0
  165. package/.next/static/chunks/next/dist/client/components/builtin/app-error-10c95b58565e06ec.js +1 -0
  166. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-10c95b58565e06ec.js +1 -0
  167. package/.next/static/chunks/next/dist/client/components/builtin/not-found-10c95b58565e06ec.js +1 -0
  168. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-10c95b58565e06ec.js +1 -0
  169. package/.next/static/chunks/{webpack-6451386e3f1b2ec9.js → webpack-469ae59d9719e191.js} +1 -1
  170. package/.next/static/css/3f63e021c3018af1.css +1 -0
  171. package/.next/static/o6yjJlz_K9qa2rPdFBH6P/_buildManifest.js +1 -0
  172. package/package.json +1 -1
  173. package/.next/server/chunks/5816.js +0 -1
  174. package/.next/server/chunks/8161.js +0 -2
  175. package/.next/static/NB4JOC2i3ctixKpjpc7WH/_buildManifest.js +0 -1
  176. package/.next/static/chunks/228-332e8b6e327f10da.js +0 -1
  177. package/.next/static/chunks/6090-97474bba31339e8e.js +0 -1
  178. package/.next/static/chunks/app/[connectionId]/migrations/(index)/layout-2635a5499e0b928c.js +0 -1
  179. package/.next/static/chunks/app/[connectionId]/migrations/(index)/page-e85d6ff71aeabe8d.js +0 -1
  180. package/.next/static/chunks/app/[connectionId]/migrations/(index)/timeline/page-e85d6ff71aeabe8d.js +0 -1
  181. package/.next/static/chunks/app/[connectionId]/migrations/[setId]/diagram/page-e85d6ff71aeabe8d.js +0 -1
  182. package/.next/static/chunks/app/[connectionId]/migrations/[setId]/layout-31e703f1a9beebf7.js +0 -1
  183. package/.next/static/chunks/app/[connectionId]/migrations/[setId]/page-e85d6ff71aeabe8d.js +0 -1
  184. package/.next/static/chunks/app/[connectionId]/migrations/[setId]/schema/page-e85d6ff71aeabe8d.js +0 -1
  185. package/.next/static/chunks/app/[connectionId]/migrations/[setId]/timeline/page-e85d6ff71aeabe8d.js +0 -1
  186. package/.next/static/chunks/app/[connectionId]/page-78a06e32a2658d3b.js +0 -1
  187. package/.next/static/chunks/app/_global-error/page-e85d6ff71aeabe8d.js +0 -1
  188. package/.next/static/chunks/app/api/activity/route-e85d6ff71aeabe8d.js +0 -1
  189. package/.next/static/chunks/app/api/adopt/route-e85d6ff71aeabe8d.js +0 -1
  190. package/.next/static/chunks/app/api/cell/route-e85d6ff71aeabe8d.js +0 -1
  191. package/.next/static/chunks/app/api/definition/route-e85d6ff71aeabe8d.js +0 -1
  192. package/.next/static/chunks/app/api/delete-rows/route-e85d6ff71aeabe8d.js +0 -1
  193. package/.next/static/chunks/app/api/detect/route-e85d6ff71aeabe8d.js +0 -1
  194. package/.next/static/chunks/app/api/health/route-e85d6ff71aeabe8d.js +0 -1
  195. package/.next/static/chunks/app/api/insert-row/route-e85d6ff71aeabe8d.js +0 -1
  196. package/.next/static/chunks/app/api/ledger/route-e85d6ff71aeabe8d.js +0 -1
  197. package/.next/static/chunks/app/api/lookup/route-e85d6ff71aeabe8d.js +0 -1
  198. package/.next/static/chunks/app/api/migrate/route-e85d6ff71aeabe8d.js +0 -1
  199. package/.next/static/chunks/app/api/note/route-e85d6ff71aeabe8d.js +0 -1
  200. package/.next/static/chunks/app/api/query/route-e85d6ff71aeabe8d.js +0 -1
  201. package/.next/static/chunks/app/api/reconcile/route-e85d6ff71aeabe8d.js +0 -1
  202. package/.next/static/chunks/app/api/rehearse/route-e85d6ff71aeabe8d.js +0 -1
  203. package/.next/static/chunks/app/api/related/route-e85d6ff71aeabe8d.js +0 -1
  204. package/.next/static/chunks/app/api/repo/route-e85d6ff71aeabe8d.js +0 -1
  205. package/.next/static/chunks/app/api/rows/route-e85d6ff71aeabe8d.js +0 -1
  206. package/.next/static/chunks/app/api/schema/route-e85d6ff71aeabe8d.js +0 -1
  207. package/.next/static/chunks/app/api/tables/route-e85d6ff71aeabe8d.js +0 -1
  208. package/.next/static/chunks/app/api/timeline/route-e85d6ff71aeabe8d.js +0 -1
  209. package/.next/static/chunks/app/api/update-row/route-e85d6ff71aeabe8d.js +0 -1
  210. package/.next/static/chunks/f97e080b-58fc9570cf11a0c7.js +0 -1
  211. package/.next/static/chunks/next/dist/client/components/builtin/app-error-e85d6ff71aeabe8d.js +0 -1
  212. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-e85d6ff71aeabe8d.js +0 -1
  213. package/.next/static/chunks/next/dist/client/components/builtin/not-found-e85d6ff71aeabe8d.js +0 -1
  214. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-e85d6ff71aeabe8d.js +0 -1
  215. package/.next/static/css/0e3fe8b2c0252430.css +0 -1
  216. /package/.next/static/{NB4JOC2i3ctixKpjpc7WH → o6yjJlz_K9qa2rPdFBH6P}/_ssgManifest.js +0 -0
@@ -1,6 +1,6 @@
1
1
  1:"$Sreact.fragment"
2
2
  2:I[61304,[],"ClientPageRoot"]
3
- 3:I[23042,["4506","static/chunks/f97e080b-58fc9570cf11a0c7.js","1731","static/chunks/1731-6dec4b981289174f.js","8026","static/chunks/8026-d0db1e7b45d32046.js","2435","static/chunks/2435-240bc4349cace375.js","8361","static/chunks/8361-d0f8ce41b74637bf.js","544","static/chunks/544-624e05bf7e7a38d4.js","577","static/chunks/577-d6d889d30c9375d9.js","8974","static/chunks/app/page-52545dcc822c61da.js"],"default"]
3
+ 3:I[23042,["4506","static/chunks/f97e080b-153a1a5ae19cb7a0.js","1731","static/chunks/1731-6dec4b981289174f.js","8026","static/chunks/8026-d0db1e7b45d32046.js","2435","static/chunks/2435-240bc4349cace375.js","8361","static/chunks/8361-d0f8ce41b74637bf.js","544","static/chunks/544-624e05bf7e7a38d4.js","577","static/chunks/577-d6d889d30c9375d9.js","8974","static/chunks/app/page-52545dcc822c61da.js"],"default"]
4
4
  6:I[90484,[],"OutletBoundary"]
5
5
  7:"$Sreact.suspense"
6
6
  b:I[90484,[],"ViewportBoundary"]
@@ -13,9 +13,9 @@ f:I[72737,["223","static/chunks/223-ae41c085e76173d8.js","7177","static/chunks/a
13
13
  13:I[57121,[],""]
14
14
  14:I[74581,[],""]
15
15
  :HL["/_next/static/css/5df9ea52964d1443.css","style"]
16
- :HL["/_next/static/css/0e3fe8b2c0252430.css","style"]
16
+ :HL["/_next/static/css/3f63e021c3018af1.css","style"]
17
17
  a:X
18
- 0:{"buildId":"NB4JOC2i3ctixKpjpc7WH","data":[{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":"$@9","staleTime":"$a","varyParams":null},{"rsc":["$","$1","h",{"children":[null,["$","$Lb",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$Lc",null,{"children":["$","$7",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"YTDB"}],["$","meta","1",{"name":"description","content":"A database management UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?603d046c9a6fdfbb","type":"image/x-icon","sizes":"16x16"}],["$","link","3",{"rel":"icon","href":"/icon.svg?38bdd49dcdf01715","type":"image/svg+xml","sizes":"any"}],["$","$Ld","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":"$@e","staleTime":"$a","varyParams":null},{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/5df9ea52964d1443.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/0e3fe8b2c0252430.css","precedence":"next"}]],["$","html",null,{"lang":"en","className":"__variable_8eaea4 __variable_8c25df dark h-full","data-theme":"dark","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var allowed=[\"dark\",\"light\",\"one-dark-pro\",\"nord\",\"dracula\",\"tokyo-night\"];var light=[\"light\"];var id=\"dark\";var raw=localStorage.getItem(\"ytdb:theme\")||localStorage.getItem(\"db-studio:theme\");if(raw){var parsed=JSON.parse(raw);var value=parsed&&parsed.state&&parsed.state.theme;if(typeof value===\"string\"&&allowed.indexOf(value)!==-1)id=value;}var root=document.documentElement;root.setAttribute(\"data-theme\",id);root.classList.toggle(\"dark\",light.indexOf(id)===-1);}catch(e){}})();"}}]}],["$","body",null,{"className":"flex min-h-full flex-col","children":["$","$Lf",null,{"children":["$","$L10",null,{"children":[["$","$L11",null,{}],["$","$L12",null,{"children":["$","$L13",null,{"parallelRouterKey":"children","template":["$","$L14",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]]}]}]}]]}]]}],"isPartial":"$@15","staleTime":"$a","varyParams":null}],"isUpgradeableISRFallback":false,"a":"$@16","rootVaryParams":null,"needsRuntimeRequest":"$@17"}
18
+ 0:{"buildId":"o6yjJlz_K9qa2rPdFBH6P","data":[{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":"$@9","staleTime":"$a","varyParams":null},{"rsc":["$","$1","h",{"children":[null,["$","$Lb",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$Lc",null,{"children":["$","$7",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"YTDB"}],["$","meta","1",{"name":"description","content":"A database management UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?603d046c9a6fdfbb","type":"image/x-icon","sizes":"16x16"}],["$","link","3",{"rel":"icon","href":"/icon.svg?38bdd49dcdf01715","type":"image/svg+xml","sizes":"any"}],["$","$Ld","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":"$@e","staleTime":"$a","varyParams":null},{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/5df9ea52964d1443.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/3f63e021c3018af1.css","precedence":"next"}]],["$","html",null,{"lang":"en","className":"__variable_8eaea4 __variable_8c25df dark h-full","data-theme":"dark","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var allowed=[\"dark\",\"light\",\"one-dark-pro\",\"nord\",\"dracula\",\"tokyo-night\"];var light=[\"light\"];var id=\"dark\";var raw=localStorage.getItem(\"ytdb:theme\")||localStorage.getItem(\"db-studio:theme\");if(raw){var parsed=JSON.parse(raw);var value=parsed&&parsed.state&&parsed.state.theme;if(typeof value===\"string\"&&allowed.indexOf(value)!==-1)id=value;}var root=document.documentElement;root.setAttribute(\"data-theme\",id);root.classList.toggle(\"dark\",light.indexOf(id)===-1);}catch(e){}})();"}}]}],["$","body",null,{"className":"flex min-h-full flex-col","children":["$","$Lf",null,{"children":["$","$L10",null,{"children":[["$","$L11",null,{}],["$","$L12",null,{"children":["$","$L13",null,{"parallelRouterKey":"children","template":["$","$L14",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]]}]}]}]]}]]}],"isPartial":"$@15","staleTime":"$a","varyParams":null}],"isUpgradeableISRFallback":false,"a":"$@16","rootVaryParams":null,"needsRuntimeRequest":"$@17"}
19
19
  4:{}
20
20
  5:"$0:data:0:rsc:props:children:0:props:serverProvidedParams:params"
21
21
  8:null
@@ -6,7 +6,7 @@
6
6
  6:I[57121,[],""]
7
7
  7:I[74581,[],""]
8
8
  8:I[61304,[],"ClientPageRoot"]
9
- 9:I[23042,["4506","static/chunks/f97e080b-58fc9570cf11a0c7.js","1731","static/chunks/1731-6dec4b981289174f.js","8026","static/chunks/8026-d0db1e7b45d32046.js","2435","static/chunks/2435-240bc4349cace375.js","8361","static/chunks/8361-d0f8ce41b74637bf.js","544","static/chunks/544-624e05bf7e7a38d4.js","577","static/chunks/577-d6d889d30c9375d9.js","8974","static/chunks/app/page-52545dcc822c61da.js"],"default"]
9
+ 9:I[23042,["4506","static/chunks/f97e080b-153a1a5ae19cb7a0.js","1731","static/chunks/1731-6dec4b981289174f.js","8026","static/chunks/8026-d0db1e7b45d32046.js","2435","static/chunks/2435-240bc4349cace375.js","8361","static/chunks/8361-d0f8ce41b74637bf.js","544","static/chunks/544-624e05bf7e7a38d4.js","577","static/chunks/577-d6d889d30c9375d9.js","8974","static/chunks/app/page-52545dcc822c61da.js"],"default"]
10
10
  c:I[90484,[],"OutletBoundary"]
11
11
  d:"$Sreact.suspense"
12
12
  f:I[90484,[],"ViewportBoundary"]
@@ -15,8 +15,8 @@ f:I[90484,[],"ViewportBoundary"]
15
15
  :HL["/_next/static/media/22a5144ee8d83bca-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
16
16
  :HL["/_next/static/media/7d4881bb7e1bf84d-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
17
17
  :HL["/_next/static/css/5df9ea52964d1443.css","style"]
18
- :HL["/_next/static/css/0e3fe8b2c0252430.css","style"]
19
- 0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{},"$undefined","$undefined",4608]},"$undefined","$undefined",4624],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/5df9ea52964d1443.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/0e3fe8b2c0252430.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"__variable_8eaea4 __variable_8c25df dark h-full","data-theme":"dark","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var allowed=[\"dark\",\"light\",\"one-dark-pro\",\"nord\",\"dracula\",\"tokyo-night\"];var light=[\"light\"];var id=\"dark\";var raw=localStorage.getItem(\"ytdb:theme\")||localStorage.getItem(\"db-studio:theme\");if(raw){var parsed=JSON.parse(raw);var value=parsed&&parsed.state&&parsed.state.theme;if(typeof value===\"string\"&&allowed.indexOf(value)!==-1)id=value;}var root=document.documentElement;root.setAttribute(\"data-theme\",id);root.classList.toggle(\"dark\",light.indexOf(id)===-1);}catch(e){}})();"}}]}],["$","body",null,{"className":"flex min-h-full flex-col","children":["$","$L2",null,{"children":["$","$L3",null,{"children":[["$","$L4",null,{}],["$","$L5",null,{"children":["$","$L6",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]}]}]]}]]}],{"children":[["$","$1","c",{"children":[["$","$L8",null,{"Component":"$9","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@a","$@b"]}}],null,["$","$Lc",null,{"children":["$","$d",null,{"name":"Next.MetadataOutlet","children":"$@e"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$Lf",null,{"children":"$L10"}],["$","div",null,{"hidden":true,"children":["$","$L11",null,{"children":["$","$d",null,{"name":"Next.Metadata","children":"$L12"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$13",[]],"S":true,"h":null,"r":"$undefined","s":"$undefined","a":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"NB4JOC2i3ctixKpjpc7WH"}
18
+ :HL["/_next/static/css/3f63e021c3018af1.css","style"]
19
+ 0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{},"$undefined","$undefined",4608]},"$undefined","$undefined",4624],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/5df9ea52964d1443.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/3f63e021c3018af1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"__variable_8eaea4 __variable_8c25df dark h-full","data-theme":"dark","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var allowed=[\"dark\",\"light\",\"one-dark-pro\",\"nord\",\"dracula\",\"tokyo-night\"];var light=[\"light\"];var id=\"dark\";var raw=localStorage.getItem(\"ytdb:theme\")||localStorage.getItem(\"db-studio:theme\");if(raw){var parsed=JSON.parse(raw);var value=parsed&&parsed.state&&parsed.state.theme;if(typeof value===\"string\"&&allowed.indexOf(value)!==-1)id=value;}var root=document.documentElement;root.setAttribute(\"data-theme\",id);root.classList.toggle(\"dark\",light.indexOf(id)===-1);}catch(e){}})();"}}]}],["$","body",null,{"className":"flex min-h-full flex-col","children":["$","$L2",null,{"children":["$","$L3",null,{"children":[["$","$L4",null,{}],["$","$L5",null,{"children":["$","$L6",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]}]}]]}]]}],{"children":[["$","$1","c",{"children":[["$","$L8",null,{"Component":"$9","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@a","$@b"]}}],null,["$","$Lc",null,{"children":["$","$d",null,{"name":"Next.MetadataOutlet","children":"$@e"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$Lf",null,{"children":"$L10"}],["$","div",null,{"hidden":true,"children":["$","$L11",null,{"children":["$","$d",null,{"name":"Next.Metadata","children":"$L12"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$13",[]],"S":true,"h":null,"r":"$undefined","s":"$undefined","a":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"o6yjJlz_K9qa2rPdFBH6P"}
20
20
  a:{}
21
21
  b:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params"
22
22
  10:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
@@ -1,5 +1,5 @@
1
1
  :HL["/_next/static/media/22a5144ee8d83bca-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
2
2
  :HL["/_next/static/media/7d4881bb7e1bf84d-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
3
3
  :HL["/_next/static/css/5df9ea52964d1443.css","style"]
4
- :HL["/_next/static/css/0e3fe8b2c0252430.css","style"]
5
- 0:{"tree":{"name":"","param":null,"prefetchHints":4176,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":4256,"slots":null}}},"staleTime":300,"buildId":"NB4JOC2i3ctixKpjpc7WH"}
4
+ :HL["/_next/static/css/3f63e021c3018af1.css","style"]
5
+ 0:{"tree":{"name":"","param":null,"prefetchHints":4176,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":4256,"slots":null}}},"staleTime":300,"buildId":"o6yjJlz_K9qa2rPdFBH6P"}
@@ -1,2 +1,2 @@
1
- (()=>{var a={};a.id=8974,a.ids=[8974],a.modules={3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4494:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/theobourgeois/code/db-studio/src/app/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/theobourgeois/code/db-studio/src/app/page.tsx","default")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},13595:(a,b,c)=>{Promise.resolve().then(c.bind(c,4494))},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},28354:a=>{"use strict";a.exports=require("util")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},38522:a=>{"use strict";a.exports=require("node:zlib")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},46060:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external.js")},50387:(a,b,c)=>{Promise.resolve().then(c.bind(c,86104))},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},86104:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>y});var d=c(48249),e=c(2116),f=c.n(e),g=c(67484),h=c(23171),i=c(25297),j=c(82244),k=c(91732),l=c(86408),m=c(78260),n=c(89267),o=c(30770),p=c(38393),q=c(4106),r=c(61561),s=c(16280);function t(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function u(){let a=(0,g.useRef)(null),[b,c]=(0,g.useState)(null),[e,f]=(0,g.useState)(null);function j(a){(0,q.L)("config.import",{connections:a.connections.length,exportedAt:a.exportedAt}),k.Z.setState({connections:a.connections}),l.lz.setState({browse:a.explorer.browse,tables:a.explorer.tables}),s.C.getState().setTheme(a.theme),f(null),c(null)}async function m(a){let b=a.target.files?.[0];if(a.target.value="",b)try{let a=function(a){let b;try{b=JSON.parse(a)}catch{throw Error("That file isn’t valid JSON.")}if(!t(b))throw Error("That file isn’t a YTDB config.");if(1!==b.version)throw Error("That config file isn’t supported.");if(!Array.isArray(b.connections))throw Error("That config file has no connections list.");let c=b.connections.map((a,b)=>(function(a,b){if(!t(a))throw Error(`Connection ${b+1} is invalid.`);if("string"!=typeof a.id||0===a.id.length)throw Error(`Connection ${b+1} is missing an id.`);if("string"!=typeof a.name||0===a.name.length)throw Error(`Connection ${b+1} is missing a name.`);if("string"!=typeof a.url||0===a.url.length)throw Error(`Connection ${b+1} is missing a URL.`);let c={id:a.id,name:a.name,url:a.url};return"string"==typeof a.color&&(c.color=a.color),"string"==typeof a.layoutGroup&&(c.layoutGroup=a.layoutGroup),c})(a,b)),d=t(b.explorer)?b.explorer:{},e=t(d.browse)?d.browse:{},f=t(d.tables)?d.tables:{},g=(0,r.Ff)(b.theme)?b.theme:s.C.getState().theme;return{version:1,exportedAt:"string"==typeof b.exportedAt?b.exportedAt:new Date().toISOString(),connections:c,explorer:{browse:e,tables:f},theme:g}}(await b.text());if(function(){let{connections:a}=k.Z.getState(),{browse:b,tables:c}=l.lz.getState();return a.length>0||Object.keys(b).length>0||Object.keys(c).length>0}()){c(null),f(a);return}j(a)}catch(a){f(null),c(a instanceof Error?a.message:"Couldn’t import that file.")}}return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(i.$,{size:"sm",variant:"ghost",onClick:()=>{let a,b,c,d;return a=function(){let{connections:a}=k.Z.getState(),{browse:b,tables:c}=l.lz.getState(),{theme:d}=s.C.getState();return{version:1,exportedAt:new Date().toISOString(),connections:a,explorer:{browse:b,tables:c},theme:d}}(),(0,q.L)("config.export",{connections:a.connections.length}),b=new Blob([`${JSON.stringify(a,null,2)}
2
- `],{type:"application/json"}),c=URL.createObjectURL(b),void((d=document.createElement("a")).href=c,d.download="ytdb.json",document.body.append(d),d.click(),d.remove(),URL.revokeObjectURL(c))},children:[(0,d.jsx)(h.Inw,{"data-icon":"inline-start"}),"Export"]}),(0,d.jsxs)(i.$,{size:"sm",variant:"ghost",onClick:()=>a.current?.click(),children:[(0,d.jsx)(h.FeY,{"data-icon":"inline-start"}),"Import"]}),(0,d.jsx)("input",{ref:a,type:"file",accept:"application/json,.json",className:"sr-only",onChange:m}),(0,d.jsx)(p.lG,{open:null!==e,onOpenChange:a=>!a&&f(null),children:(0,d.jsxs)(p.Cf,{children:[(0,d.jsxs)(p.c7,{children:[(0,d.jsx)(p.L3,{children:"Replace current config?"}),(0,d.jsx)(p.rr,{children:"This replaces connections, table layout, and theme. The file includes connection URLs, so treat it like a secret."})]}),(0,d.jsxs)(p.Es,{children:[(0,d.jsx)(i.$,{variant:"outline",onClick:()=>f(null),children:"Cancel"}),(0,d.jsx)(i.$,{onClick:()=>e&&j(e),children:"Replace"})]})]})}),(0,d.jsx)(p.lG,{open:null!==b,onOpenChange:a=>!a&&c(null),children:(0,d.jsxs)(p.Cf,{children:[(0,d.jsxs)(p.c7,{children:[(0,d.jsx)(p.L3,{children:"Couldn’t import"}),(0,d.jsx)(p.rr,{children:b})]}),(0,d.jsx)(p.Es,{children:(0,d.jsx)(i.$,{variant:"outline",onClick:()=>c(null),children:"Close"})})]})})]})}function v({connection:a,comparable:b,onEdit:c,onRemove:e}){let g=(0,l.gz)(a.id);return(0,d.jsxs)("li",{className:"group flex items-center gap-2 pr-1.5",children:[(0,d.jsxs)(f(),{href:`/${a.id}`,className:"flex flex-1 items-center gap-2.5 px-3 py-2.5 outline-none focus-visible:bg-muted/40",children:[(0,d.jsx)(o.F,{connection:a,className:"size-2.5"}),(0,d.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,d.jsx)("span",{className:"font-medium",children:a.name}),(0,d.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 font-mono text-xs text-muted-foreground",children:[(0,d.jsx)("span",{className:"truncate",children:function(a){try{return new URL(a).host}catch{return a}}(a.url)}),g.length>0&&(0,d.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-1 font-sans",children:[(0,d.jsx)(h.WnQ,{className:"size-3 shrink-0"}),(0,d.jsx)("span",{className:"truncate",children:g.map(a=>a.name).join(", ")})]})]})]})]}),(0,d.jsxs)(j.rI,{children:[(0,d.jsx)(j.ty,{render:(0,d.jsx)(i.$,{variant:"ghost",size:"icon-sm","aria-label":"More"}),className:"opacity-0 group-hover:opacity-100 data-open:opacity-100",children:(0,d.jsx)(h.YKd,{})}),(0,d.jsxs)(j.SQ,{align:"end",children:[(0,d.jsx)(j._2,{onClick:()=>c(a),children:"Edit"}),b&&(0,d.jsxs)(j._2,{render:(0,d.jsx)(f(),{href:`/${a.id}/diff`}),children:[(0,d.jsx)(h.R4X,{}),"Compare schema"]}),(0,d.jsx)(j._2,{variant:"destructive",onClick:()=>e(a.id),children:"Delete"})]})]})]})}function w(){let{connections:a,add:b,update:c,remove:e}=(0,k.Z)(),[f,j]=(0,g.useState)(null),[o,p]=(0,g.useState)(!1),q=(0,l.gz)(f?.id??"");function r(){j(null),p(!0)}function s(a){j(a),p(!0)}return(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,d.jsx)("h1",{className:"text-sm font-medium",children:"Connections"}),(0,d.jsxs)("div",{className:"flex items-center",children:[(0,d.jsx)(u,{}),(0,d.jsxs)(i.$,{size:"sm",variant:"ghost",onClick:r,children:[(0,d.jsx)(h.enO,{"data-icon":"inline-start"}),"New"]})]})]}),0===a.length?(0,d.jsx)("button",{onClick:r,className:"rounded-lg border border-dashed py-10 text-center text-muted-foreground hover:bg-muted/40",children:"Add a connection"}):(0,d.jsx)("ul",{className:"divide-y rounded-lg border",children:a.map(b=>(0,d.jsx)(v,{connection:b,comparable:a.length>1,onEdit:s,onRemove:e},b.id))}),(0,d.jsx)(n.f,{open:o,onOpenChange:p,connectionId:f?.id,initial:f?{name:f.name,url:f.url,color:(0,m.Mq)(f),shareWith:q.map(a=>a.id)}:void 0,onSubmit:function(a){let{shareWith:d,...e}=a;if(f){c(f.id,e),(0,l.mQ)(f.id,d);return}let g=b(e);(0,l.mQ)(g.id,d)}})]})}var x=c(98609);function y(){let a=(0,x.p)();return(0,d.jsx)("main",{className:"mx-auto w-full max-w-lg px-6 py-24",children:a&&(0,d.jsx)(w,{})})}},92606:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>p,handler:()=>r,routeModule:()=>q});var d=c(21635),e=c(86315),f=c(1020),g=c(61287),h={};for(let a in g)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(h[a]=()=>g[a]);c.d(b,h);let i=(0,d.p)(()=>Promise.resolve().then(c.bind(c,35780))),j=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),k=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),l=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),m=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),n={children:["",{children:["__PAGE__",{},{page:[(0,d.p)(()=>Promise.resolve().then(c.bind(c,4494))),"/Users/theobourgeois/code/db-studio/src/app/page.tsx"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a),async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,59645)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]},{layout:[i,"/Users/theobourgeois/code/db-studio/src/app/layout.tsx"],"global-error":[j,"next/dist/client/components/builtin/global-error.js"],"not-found":[k,"next/dist/client/components/builtin/not-found.js"],forbidden:[l,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[m,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a),async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,59645)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}},[]]}.children,o=(0,e.H)({tree:n,page:"/page",pathname:"/",require:c,loadChunk:()=>Promise.resolve(),interopDefault:f.T}),p=o.__next_app__,q=o.routeModule,r=o.handler}};var b=require("../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,2430,7928,8842,1421,5529],()=>b(b.s=92606));module.exports=c})();
1
+ (()=>{var a={};a.id=8974,a.ids=[8974],a.modules={3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4494:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/theobourgeois/code/db-studio/src/app/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/theobourgeois/code/db-studio/src/app/page.tsx","default")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},13595:(a,b,c)=>{Promise.resolve().then(c.bind(c,4494))},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},28354:a=>{"use strict";a.exports=require("util")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},38522:a=>{"use strict";a.exports=require("node:zlib")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},46060:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external.js")},50387:(a,b,c)=>{Promise.resolve().then(c.bind(c,86104))},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},67464:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>p,handler:()=>r,routeModule:()=>q});var d=c(21635),e=c(86315),f=c(1020),g=c(61287),h={};for(let a in g)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(h[a]=()=>g[a]);c.d(b,h);let i=(0,d.p)(()=>Promise.resolve().then(c.bind(c,35780))),j=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),k=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),l=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),m=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),n={children:["",{children:["__PAGE__",{},{page:[(0,d.p)(()=>Promise.resolve().then(c.bind(c,4494))),"/Users/theobourgeois/code/db-studio/src/app/page.tsx"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a),async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,59645)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]},{layout:[i,"/Users/theobourgeois/code/db-studio/src/app/layout.tsx"],"global-error":[j,"next/dist/client/components/builtin/global-error.js"],"not-found":[k,"next/dist/client/components/builtin/not-found.js"],forbidden:[l,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[m,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a),async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,59645)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}},[]]}.children,o=(0,e.H)({tree:n,page:"/page",pathname:"/",require:c,loadChunk:()=>Promise.resolve(),interopDefault:f.T}),p=o.__next_app__,q=o.routeModule,r=o.handler},86104:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>y});var d=c(48249),e=c(2116),f=c.n(e),g=c(67484),h=c(23171),i=c(25297),j=c(82244),k=c(91732),l=c(86408),m=c(78260),n=c(89267),o=c(30770),p=c(38393),q=c(4106),r=c(61561),s=c(16280);function t(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function u(){let a=(0,g.useRef)(null),[b,c]=(0,g.useState)(null),[e,f]=(0,g.useState)(null);function j(a){(0,q.L)("config.import",{connections:a.connections.length,exportedAt:a.exportedAt}),k.Z.setState({connections:a.connections}),l.lz.setState({browse:a.explorer.browse,tables:a.explorer.tables}),s.C.getState().setTheme(a.theme),f(null),c(null)}async function m(a){let b=a.target.files?.[0];if(a.target.value="",b)try{let a=function(a){let b;try{b=JSON.parse(a)}catch{throw Error("That file isn’t valid JSON.")}if(!t(b))throw Error("That file isn’t a YTDB config.");if(1!==b.version)throw Error("That config file isn’t supported.");if(!Array.isArray(b.connections))throw Error("That config file has no connections list.");let c=b.connections.map((a,b)=>(function(a,b){if(!t(a))throw Error(`Connection ${b+1} is invalid.`);if("string"!=typeof a.id||0===a.id.length)throw Error(`Connection ${b+1} is missing an id.`);if("string"!=typeof a.name||0===a.name.length)throw Error(`Connection ${b+1} is missing a name.`);if("string"!=typeof a.url||0===a.url.length)throw Error(`Connection ${b+1} is missing a URL.`);let c={id:a.id,name:a.name,url:a.url};return"string"==typeof a.color&&(c.color=a.color),"string"==typeof a.layoutGroup&&(c.layoutGroup=a.layoutGroup),c})(a,b)),d=t(b.explorer)?b.explorer:{},e=t(d.browse)?d.browse:{},f=t(d.tables)?d.tables:{},g=(0,r.Ff)(b.theme)?b.theme:s.C.getState().theme;return{version:1,exportedAt:"string"==typeof b.exportedAt?b.exportedAt:new Date().toISOString(),connections:c,explorer:{browse:e,tables:f},theme:g}}(await b.text());if(function(){let{connections:a}=k.Z.getState(),{browse:b,tables:c}=l.lz.getState();return a.length>0||Object.keys(b).length>0||Object.keys(c).length>0}()){c(null),f(a);return}j(a)}catch(a){f(null),c(a instanceof Error?a.message:"Couldn’t import that file.")}}return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(i.$,{size:"sm",variant:"ghost",onClick:()=>{let a,b,c,d;return a=function(){let{connections:a}=k.Z.getState(),{browse:b,tables:c}=l.lz.getState(),{theme:d}=s.C.getState();return{version:1,exportedAt:new Date().toISOString(),connections:a,explorer:{browse:b,tables:c},theme:d}}(),(0,q.L)("config.export",{connections:a.connections.length}),b=new Blob([`${JSON.stringify(a,null,2)}
2
+ `],{type:"application/json"}),c=URL.createObjectURL(b),void((d=document.createElement("a")).href=c,d.download="ytdb.json",document.body.append(d),d.click(),d.remove(),URL.revokeObjectURL(c))},children:[(0,d.jsx)(h.Inw,{"data-icon":"inline-start"}),"Export"]}),(0,d.jsxs)(i.$,{size:"sm",variant:"ghost",onClick:()=>a.current?.click(),children:[(0,d.jsx)(h.FeY,{"data-icon":"inline-start"}),"Import"]}),(0,d.jsx)("input",{ref:a,type:"file",accept:"application/json,.json",className:"sr-only",onChange:m}),(0,d.jsx)(p.lG,{open:null!==e,onOpenChange:a=>!a&&f(null),children:(0,d.jsxs)(p.Cf,{children:[(0,d.jsxs)(p.c7,{children:[(0,d.jsx)(p.L3,{children:"Replace current config?"}),(0,d.jsx)(p.rr,{children:"This replaces connections, table layout, and theme. The file includes connection URLs, so treat it like a secret."})]}),(0,d.jsxs)(p.Es,{children:[(0,d.jsx)(i.$,{variant:"outline",onClick:()=>f(null),children:"Cancel"}),(0,d.jsx)(i.$,{onClick:()=>e&&j(e),children:"Replace"})]})]})}),(0,d.jsx)(p.lG,{open:null!==b,onOpenChange:a=>!a&&c(null),children:(0,d.jsxs)(p.Cf,{children:[(0,d.jsxs)(p.c7,{children:[(0,d.jsx)(p.L3,{children:"Couldn’t import"}),(0,d.jsx)(p.rr,{children:b})]}),(0,d.jsx)(p.Es,{children:(0,d.jsx)(i.$,{variant:"outline",onClick:()=>c(null),children:"Close"})})]})})]})}function v({connection:a,comparable:b,onEdit:c,onRemove:e}){let g=(0,l.gz)(a.id);return(0,d.jsxs)("li",{className:"group flex items-center gap-2 pr-1.5",children:[(0,d.jsxs)(f(),{href:`/${a.id}`,className:"flex flex-1 items-center gap-2.5 px-3 py-2.5 outline-none focus-visible:bg-muted/40",children:[(0,d.jsx)(o.F,{connection:a,className:"size-2.5"}),(0,d.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,d.jsx)("span",{className:"font-medium",children:a.name}),(0,d.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 font-mono text-xs text-muted-foreground",children:[(0,d.jsx)("span",{className:"truncate",children:function(a){try{return new URL(a).host}catch{return a}}(a.url)}),g.length>0&&(0,d.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-1 font-sans",children:[(0,d.jsx)(h.WnQ,{className:"size-3 shrink-0"}),(0,d.jsx)("span",{className:"truncate",children:g.map(a=>a.name).join(", ")})]})]})]})]}),(0,d.jsxs)(j.rI,{children:[(0,d.jsx)(j.ty,{render:(0,d.jsx)(i.$,{variant:"ghost",size:"icon-sm","aria-label":"More"}),className:"opacity-0 group-hover:opacity-100 data-open:opacity-100",children:(0,d.jsx)(h.YKd,{})}),(0,d.jsxs)(j.SQ,{align:"end",children:[(0,d.jsx)(j._2,{onClick:()=>c(a),children:"Edit"}),b&&(0,d.jsxs)(j._2,{render:(0,d.jsx)(f(),{href:`/${a.id}/diff`}),children:[(0,d.jsx)(h.R4X,{}),"Compare schema"]}),(0,d.jsx)(j._2,{variant:"destructive",onClick:()=>e(a.id),children:"Delete"})]})]})]})}function w(){let{connections:a,add:b,update:c,remove:e}=(0,k.Z)(),[f,j]=(0,g.useState)(null),[o,p]=(0,g.useState)(!1),q=(0,l.gz)(f?.id??"");function r(){j(null),p(!0)}function s(a){j(a),p(!0)}return(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,d.jsx)("h1",{className:"text-sm font-medium",children:"Connections"}),(0,d.jsxs)("div",{className:"flex items-center",children:[(0,d.jsx)(u,{}),(0,d.jsxs)(i.$,{size:"sm",variant:"ghost",onClick:r,children:[(0,d.jsx)(h.enO,{"data-icon":"inline-start"}),"New"]})]})]}),0===a.length?(0,d.jsx)("button",{onClick:r,className:"rounded-lg border border-dashed py-10 text-center text-muted-foreground hover:bg-muted/40",children:"Add a connection"}):(0,d.jsx)("ul",{className:"divide-y rounded-lg border",children:a.map(b=>(0,d.jsx)(v,{connection:b,comparable:a.length>1,onEdit:s,onRemove:e},b.id))}),(0,d.jsx)(n.f,{open:o,onOpenChange:p,connectionId:f?.id,initial:f?{name:f.name,url:f.url,color:(0,m.Mq)(f),shareWith:q.map(a=>a.id)}:void 0,onSubmit:function(a){let{shareWith:d,...e}=a;if(f){c(f.id,e),(0,l.mQ)(f.id,d);return}let g=b(e);(0,l.mQ)(g.id,d)}})]})}var x=c(98609);function y(){let a=(0,x.p)();return(0,d.jsx)("main",{className:"mx-auto w-full max-w-lg px-6 py-24",children:a&&(0,d.jsx)(w,{})})}}};var b=require("../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,2430,7928,8842,1421,5529],()=>b(b.s=67464));module.exports=c})();
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/page"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"6044":{"*":{"id":"70344","name":"*","chunks":[],"async":false}},"21890":{"*":{"id":"41390","name":"*","chunks":[],"async":false}},"23042":{"*":{"id":"86104","name":"*","chunks":[],"async":false}},"27123":{"*":{"id":"81921","name":"*","chunks":[],"async":false}},"37875":{"*":{"id":"53371","name":"*","chunks":[],"async":false}},"48491":{"*":{"id":"8419","name":"*","chunks":[],"async":false}},"57121":{"*":{"id":"35421","name":"*","chunks":[],"async":false}},"61304":{"*":{"id":"60440","name":"*","chunks":[],"async":false}},"62592":{"*":{"id":"74316","name":"*","chunks":[],"async":false}},"64777":{"*":{"id":"82265","name":"*","chunks":[],"async":false}},"65377":{"*":{"id":"19047","name":"*","chunks":[],"async":false}},"69063":{"*":{"id":"81040","name":"*","chunks":[],"async":false}},"71362":{"*":{"id":"46070","name":"*","chunks":[],"async":false}},"72737":{"*":{"id":"4833","name":"*","chunks":[],"async":false}},"74581":{"*":{"id":"61335","name":"*","chunks":[],"async":false}},"78616":{"*":{"id":"84342","name":"*","chunks":[],"async":false}},"86869":{"*":{"id":"74661","name":"*","chunks":[],"async":false}},"90484":{"*":{"id":"70664","name":"*","chunks":[],"async":false}},"94821":{"*":{"id":"80189","name":"*","chunks":[],"async":false}},"96365":{"*":{"id":"61314","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/theobourgeois/code/db-studio/node_modules/next/dist/client/components/builtin/global-error.js":{"id":27123,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/client/components/builtin/global-error.js":{"id":27123,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/client/components/client-page.js":{"id":61304,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":61304,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/client/components/client-segment.js":{"id":78616,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":78616,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":64777,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":64777,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/client/components/layout-router.js":{"id":57121,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":57121,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":74581,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":74581,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/lib/framework/boundary-components.js":{"id":90484,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":90484,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":86869,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":86869,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"sans\"}":{"id":34244,"name":"*","chunks":["223","static/chunks/223-ae41c085e76173d8.js","7177","static/chunks/app/layout-2ed8b1f837adb32a.js"],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"mono\"}":{"id":64939,"name":"*","chunks":["223","static/chunks/223-ae41c085e76173d8.js","7177","static/chunks/app/layout-2ed8b1f837adb32a.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/app/globals.css":{"id":51743,"name":"*","chunks":["223","static/chunks/223-ae41c085e76173d8.js","7177","static/chunks/app/layout-2ed8b1f837adb32a.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/components/ConvexClientProvider.tsx":{"id":94821,"name":"*","chunks":["223","static/chunks/223-ae41c085e76173d8.js","7177","static/chunks/app/layout-2ed8b1f837adb32a.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/components/local-bridge-gate.tsx":{"id":65377,"name":"*","chunks":["223","static/chunks/223-ae41c085e76173d8.js","7177","static/chunks/app/layout-2ed8b1f837adb32a.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/components/navigation-tracker.tsx":{"id":48491,"name":"*","chunks":["223","static/chunks/223-ae41c085e76173d8.js","7177","static/chunks/app/layout-2ed8b1f837adb32a.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/components/theme-provider.tsx":{"id":72737,"name":"*","chunks":["223","static/chunks/223-ae41c085e76173d8.js","7177","static/chunks/app/layout-2ed8b1f837adb32a.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/app/page.tsx":{"id":23042,"name":"*","chunks":["4506","static/chunks/f97e080b-58fc9570cf11a0c7.js","1731","static/chunks/1731-6dec4b981289174f.js","8026","static/chunks/8026-d0db1e7b45d32046.js","2435","static/chunks/2435-240bc4349cace375.js","8361","static/chunks/8361-d0f8ce41b74637bf.js","544","static/chunks/544-624e05bf7e7a38d4.js","577","static/chunks/577-d6d889d30c9375d9.js","8974","static/chunks/app/page-52545dcc822c61da.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/components/explorer/explorer-shell.tsx":{"id":37875,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/src/components/table/table-view.tsx":{"id":71362,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/src/components/diff/schema-diff-view.tsx":{"id":6044,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/src/components/explorer/connection-home.tsx":{"id":21890,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/src/components/query/query-view.tsx":{"id":96365,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/src/components/migrations/migrations-index.tsx":{"id":69063,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/src/components/migrations/migration-detail.tsx":{"id":62592,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/theobourgeois/code/db-studio/src/":[],"/Users/theobourgeois/code/db-studio/src/app/layout":[{"inlined":false,"path":"static/css/5df9ea52964d1443.css"},{"inlined":false,"path":"static/css/0e3fe8b2c0252430.css"}],"/Users/theobourgeois/code/db-studio/src/app/page":[]},"rscModuleMapping":{"6044":{"*":{"id":"58977","name":"*","chunks":[],"async":false}},"21890":{"*":{"id":"52468","name":"*","chunks":[],"async":false}},"23042":{"*":{"id":"4494","name":"*","chunks":[],"async":false}},"27123":{"*":{"id":"95547","name":"*","chunks":[],"async":false}},"37875":{"*":{"id":"34766","name":"*","chunks":[],"async":false}},"48491":{"*":{"id":"19933","name":"*","chunks":[],"async":false}},"51743":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"57121":{"*":{"id":"98099","name":"*","chunks":[],"async":false}},"61304":{"*":{"id":"15098","name":"*","chunks":[],"async":false}},"62592":{"*":{"id":"97182","name":"*","chunks":[],"async":false}},"64777":{"*":{"id":"33859","name":"*","chunks":[],"async":false}},"65377":{"*":{"id":"17569","name":"*","chunks":[],"async":false}},"69063":{"*":{"id":"99432","name":"*","chunks":[],"async":false}},"71362":{"*":{"id":"12377","name":"*","chunks":[],"async":false}},"72737":{"*":{"id":"65223","name":"*","chunks":[],"async":false}},"74581":{"*":{"id":"16237","name":"*","chunks":[],"async":false}},"78616":{"*":{"id":"47644","name":"*","chunks":[],"async":false}},"86869":{"*":{"id":"36675","name":"*","chunks":[],"async":false}},"90484":{"*":{"id":"98562","name":"*","chunks":[],"async":false}},"94821":{"*":{"id":"88331","name":"*","chunks":[],"async":false}},"96365":{"*":{"id":"2781","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}};
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/page"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"6044":{"*":{"id":"70344","name":"*","chunks":[],"async":false}},"21890":{"*":{"id":"41390","name":"*","chunks":[],"async":false}},"23042":{"*":{"id":"86104","name":"*","chunks":[],"async":false}},"27123":{"*":{"id":"81921","name":"*","chunks":[],"async":false}},"28242":{"*":{"id":"53253","name":"*","chunks":[],"async":false}},"31664":{"*":{"id":"99551","name":"*","chunks":[],"async":false}},"37875":{"*":{"id":"53371","name":"*","chunks":[],"async":false}},"48491":{"*":{"id":"8419","name":"*","chunks":[],"async":false}},"57121":{"*":{"id":"35421","name":"*","chunks":[],"async":false}},"61304":{"*":{"id":"60440","name":"*","chunks":[],"async":false}},"64777":{"*":{"id":"82265","name":"*","chunks":[],"async":false}},"65377":{"*":{"id":"19047","name":"*","chunks":[],"async":false}},"71362":{"*":{"id":"46070","name":"*","chunks":[],"async":false}},"72737":{"*":{"id":"4833","name":"*","chunks":[],"async":false}},"74581":{"*":{"id":"61335","name":"*","chunks":[],"async":false}},"78616":{"*":{"id":"84342","name":"*","chunks":[],"async":false}},"86869":{"*":{"id":"74661","name":"*","chunks":[],"async":false}},"90484":{"*":{"id":"70664","name":"*","chunks":[],"async":false}},"94821":{"*":{"id":"80189","name":"*","chunks":[],"async":false}},"96365":{"*":{"id":"61314","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/theobourgeois/code/db-studio/node_modules/next/dist/client/components/builtin/global-error.js":{"id":27123,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/client/components/builtin/global-error.js":{"id":27123,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/client/components/client-page.js":{"id":61304,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":61304,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/client/components/client-segment.js":{"id":78616,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":78616,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":64777,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":64777,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/client/components/layout-router.js":{"id":57121,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":57121,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":74581,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":74581,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/lib/framework/boundary-components.js":{"id":90484,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":90484,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":86869,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":86869,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"sans\"}":{"id":34244,"name":"*","chunks":["223","static/chunks/223-ae41c085e76173d8.js","7177","static/chunks/app/layout-2ed8b1f837adb32a.js"],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"mono\"}":{"id":64939,"name":"*","chunks":["223","static/chunks/223-ae41c085e76173d8.js","7177","static/chunks/app/layout-2ed8b1f837adb32a.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/app/globals.css":{"id":51743,"name":"*","chunks":["223","static/chunks/223-ae41c085e76173d8.js","7177","static/chunks/app/layout-2ed8b1f837adb32a.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/components/ConvexClientProvider.tsx":{"id":94821,"name":"*","chunks":["223","static/chunks/223-ae41c085e76173d8.js","7177","static/chunks/app/layout-2ed8b1f837adb32a.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/components/local-bridge-gate.tsx":{"id":65377,"name":"*","chunks":["223","static/chunks/223-ae41c085e76173d8.js","7177","static/chunks/app/layout-2ed8b1f837adb32a.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/components/navigation-tracker.tsx":{"id":48491,"name":"*","chunks":["223","static/chunks/223-ae41c085e76173d8.js","7177","static/chunks/app/layout-2ed8b1f837adb32a.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/components/theme-provider.tsx":{"id":72737,"name":"*","chunks":["223","static/chunks/223-ae41c085e76173d8.js","7177","static/chunks/app/layout-2ed8b1f837adb32a.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/app/page.tsx":{"id":23042,"name":"*","chunks":["4506","static/chunks/f97e080b-153a1a5ae19cb7a0.js","1731","static/chunks/1731-6dec4b981289174f.js","8026","static/chunks/8026-d0db1e7b45d32046.js","2435","static/chunks/2435-240bc4349cace375.js","8361","static/chunks/8361-d0f8ce41b74637bf.js","544","static/chunks/544-624e05bf7e7a38d4.js","577","static/chunks/577-d6d889d30c9375d9.js","8974","static/chunks/app/page-52545dcc822c61da.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/components/explorer/explorer-shell.tsx":{"id":37875,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/src/components/table/table-view.tsx":{"id":71362,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/src/components/diff/schema-diff-view.tsx":{"id":6044,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/src/components/explorer/connection-home.tsx":{"id":21890,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/src/components/query/query-view.tsx":{"id":96365,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/src/components/migrations/migrations-index.tsx":{"id":31664,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/src/components/migrations/migration-detail.tsx":{"id":28242,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/theobourgeois/code/db-studio/src/":[],"/Users/theobourgeois/code/db-studio/src/app/layout":[{"inlined":false,"path":"static/css/5df9ea52964d1443.css"},{"inlined":false,"path":"static/css/3f63e021c3018af1.css"}],"/Users/theobourgeois/code/db-studio/src/app/page":[]},"rscModuleMapping":{"6044":{"*":{"id":"58977","name":"*","chunks":[],"async":false}},"21890":{"*":{"id":"52468","name":"*","chunks":[],"async":false}},"23042":{"*":{"id":"4494","name":"*","chunks":[],"async":false}},"27123":{"*":{"id":"95547","name":"*","chunks":[],"async":false}},"28242":{"*":{"id":"97182","name":"*","chunks":[],"async":false}},"31664":{"*":{"id":"99432","name":"*","chunks":[],"async":false}},"37875":{"*":{"id":"34766","name":"*","chunks":[],"async":false}},"48491":{"*":{"id":"19933","name":"*","chunks":[],"async":false}},"51743":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"57121":{"*":{"id":"98099","name":"*","chunks":[],"async":false}},"61304":{"*":{"id":"15098","name":"*","chunks":[],"async":false}},"64777":{"*":{"id":"33859","name":"*","chunks":[],"async":false}},"65377":{"*":{"id":"17569","name":"*","chunks":[],"async":false}},"71362":{"*":{"id":"12377","name":"*","chunks":[],"async":false}},"72737":{"*":{"id":"65223","name":"*","chunks":[],"async":false}},"74581":{"*":{"id":"16237","name":"*","chunks":[],"async":false}},"78616":{"*":{"id":"47644","name":"*","chunks":[],"async":false}},"86869":{"*":{"id":"36675","name":"*","chunks":[],"async":false}},"90484":{"*":{"id":"98562","name":"*","chunks":[],"async":false}},"94821":{"*":{"id":"88331","name":"*","chunks":[],"async":false}},"96365":{"*":{"id":"2781","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}};
@@ -5,10 +5,10 @@
5
5
  "/api/health/route": "app/api/health/route.js",
6
6
  "/favicon.ico/route": "app/favicon.ico/route.js",
7
7
  "/icon.svg/route": "app/icon.svg/route.js",
8
- "/api/adopt/route": "app/api/adopt/route.js",
9
8
  "/api/cell/route": "app/api/cell/route.js",
10
- "/api/definition/route": "app/api/definition/route.js",
9
+ "/api/adopt/route": "app/api/adopt/route.js",
11
10
  "/api/delete-rows/route": "app/api/delete-rows/route.js",
11
+ "/api/definition/route": "app/api/definition/route.js",
12
12
  "/api/detect/route": "app/api/detect/route.js",
13
13
  "/api/insert-row/route": "app/api/insert-row/route.js",
14
14
  "/api/ledger/route": "app/api/ledger/route.js",
@@ -18,8 +18,12 @@
18
18
  "/api/query/route": "app/api/query/route.js",
19
19
  "/api/reconcile/route": "app/api/reconcile/route.js",
20
20
  "/api/rehearse/route": "app/api/rehearse/route.js",
21
- "/api/repo/route": "app/api/repo/route.js",
21
+ "/api/release/label/route": "app/api/release/label/route.js",
22
22
  "/api/related/route": "app/api/related/route.js",
23
+ "/api/release/merge/route": "app/api/release/merge/route.js",
24
+ "/api/release/route": "app/api/release/route.js",
25
+ "/api/release/sync/route": "app/api/release/sync/route.js",
26
+ "/api/repo/route": "app/api/repo/route.js",
23
27
  "/api/rows/route": "app/api/rows/route.js",
24
28
  "/api/schema/route": "app/api/schema/route.js",
25
29
  "/api/tables/route": "app/api/tables/route.js",
@@ -31,6 +35,7 @@
31
35
  "/[connectionId]/page": "app/[connectionId]/page.js",
32
36
  "/[connectionId]/query/page": "app/[connectionId]/query/page.js",
33
37
  "/[connectionId]/migrations/(index)/page": "app/[connectionId]/migrations/(index)/page.js",
38
+ "/[connectionId]/migrations/(index)/release/page": "app/[connectionId]/migrations/(index)/release/page.js",
34
39
  "/[connectionId]/migrations/(index)/timeline/page": "app/[connectionId]/migrations/(index)/timeline/page.js",
35
40
  "/[connectionId]/migrations/[setId]/diagram/page": "app/[connectionId]/migrations/[setId]/diagram/page.js",
36
41
  "/[connectionId]/migrations/[setId]/page": "app/[connectionId]/migrations/[setId]/page.js",
@@ -0,0 +1,2 @@
1
+ "use strict";exports.id=2783,exports.ids=[2783],exports.modules={15024:(a,b,c)=>{c.d(b,{Ai:()=>n,Nz:()=>m,cM:()=>l});var d=c(51975);let e=new Set(["apply","up","forward"]),f=new Set(["revert","down","rollback","undo"]),g=[".up",".apply",".forward","_up","_apply","-up","-apply"],h=[".down",".revert",".rollback",".undo","_down","_revert","_rollback","_undo","-down","-revert","-rollback","-undo"];function i(a){return a.split("/").filter(a=>a.length>0)}function j(a){let b=/^[Vv](\d+(?:[._]\d+)*)__(.*)$/.exec(a);if(b)return{version:b[1].replace(/_/g,"."),name:k(b[2])};let c=/^(\d+(?:[-.]\d+)*)(?:[-_.\s]+(.*))?$/.exec(a);return c?{version:c[1],name:k(c[2]??"")}:{version:a,name:k(a)}}function k(a){return a.replace(/[-_]+/g," ").trim()}function l(a){let b=a.replace(/\r\n/g,"\n").trim(),c=0x811c9dc5,d=0x1000193;for(let a=0;a<b.length;a+=1){let e=b.charCodeAt(a);c=Math.imul(c^e,0x1000193)>>>0,d=Math.imul(d+e,0x85ebca6b)>>>0}return`${c.toString(16).padStart(8,"0")}${d.toString(16).padStart(8,"0")}`}function m(a){let b={applies:new Map,reverts:new Map,skipped:[],errors:[]},c=a.filter(a=>{var b;let c=i(b=a.path).at(-1)??b;return!c.startsWith(".")&&/\.sql$/i.test(c)});if(0===c.length)return b.errors.push("No .sql files in there."),b;let d=c.reduce((a,b)=>a+b.text.length,0);if(d>4e6)return b.errors.push(`That is ${o(d)} of SQL, over the ${o(4e6)} limit.`),b;let l=[];for(let a of c){if(a.text.length>5e5){b.skipped.push(`${a.path} — over ${o(5e5)}`);continue}if(a.text.includes("\0")){b.skipped.push(`${a.path} — not text`);continue}if(!a.text.trim()){b.skipped.push(`${a.path} — empty`);continue}l.push({file:a,...function(a){let b=i(a),c=(b.at(-1)??a).replace(/\.sql$/i,"");for(let a of b.slice(0,-1)){let b=a.toLowerCase();if(f.has(b))return{direction:"revert",stem:c};if(e.has(b))return{direction:"apply",stem:c}}let d=c.toLowerCase();for(let a of h)if(d.endsWith(a))return{direction:"revert",stem:c.slice(0,-a.length)};for(let a of g)if(d.endsWith(a))return{direction:"apply",stem:c.slice(0,-a.length)};return{direction:"apply",stem:c}}(a.path)})}let m=new Set,n=!1;for(let{direction:a,stem:b}of l){if("apply"!==a)continue;let{version:c}=j(b);m.has(c)&&(n=!0),m.add(c)}for(let{file:a,direction:c,stem:d}of l){let{version:e,name:f}=n?{version:d,name:k(d)}:j(d),g=("apply"===c?b.applies:b.reverts).get(e);if(g){b.skipped.push(`${a.path} — ${g.path} is already version ${e}`);continue}"apply"===c?b.applies.set(e,{path:a.path,sql:a.text,name:f}):b.reverts.set(e,{path:a.path,sql:a.text})}return 0===b.applies.size&&0===b.reverts.size&&b.errors.push("None of those .sql files could be read as a migration."),b}function n(a,b){let c=new Map(a.map(a=>[a.version,{...a}])),e=[...b.skipped],f=0,g=0,h=0;for(let[a,h]of b.applies){let b=c.get(a);if(b){b.applySql!==h.sql&&(g+=1),b.name=h.name||b.name,b.applyPath=h.path,b.applySql=h.sql,b.checksum=l(h.sql),b.transaction=(0,d.Ol)(h.sql).mode;continue}if(c.size>=500){e.push(`${h.path} — over 500 migrations`);continue}c.set(a,{version:a,name:h.name||a,applyPath:h.path,applySql:h.sql,checksum:l(h.sql),transaction:(0,d.Ol)(h.sql).mode}),f+=1}for(let[a,d]of b.reverts){let b=c.get(a);if(!b){e.push(`${d.path} — no migration ${a} to revert`);continue}b.revertPath=d.path,b.revertSql=d.sql,h+=1}return{steps:[...c.values()].sort((a,b)=>(function(a,b){let c=/(\d+)|(\D+)/g,d=a.match(c)??[],e=b.match(c)??[],f=Math.min(d.length,e.length);for(let a=0;a<f;a+=1){let b=d[a],c=e[a],f=/^\d+$/.test(b)&&/^\d+$/.test(c)?Number(b)-Number(c):b.localeCompare(c);if(0!==f)return f}return d.length-e.length})(a.version,b.version)),added:f,updated:g,reverts:h,skipped:e}}function o(a){return a<1024?`${a} B`:a<1048576?`${Math.round(a/1024)} KB`:`${(a/1048576).toFixed(1)} MB`}},21010:(a,b,c)=>{c.d(b,{Ab:()=>i,K9:()=>k,R9:()=>f,XG:()=>j,ZH:()=>h,aC:()=>e,hD:()=>g});var d=c(51473);let e="maintenance",f="ytdb_migrations";function g(a){return"string"==typeof a&&a.length>0&&a.length<=63&&/^[A-Za-z_][A-Za-z0-9_$]*$/.test(a)}function h(a){return g(a)?a:e}function i(a){return`${(0,d.v)(a)}.${(0,d.v)(f)}`}let j=2e4;function k(a){return`repo:${a}`}},51473:(a,b,c)=>{function d(a){return`"${a.replace(/"/g,'""')}"`}function e(a){return`${d(a.schema)}.${d(a.name)}`}c.d(b,{Z:()=>e,v:()=>d})},82783:(a,b,c)=>{c.d(b,{H6:()=>m,Hx:()=>n,IP:()=>z,f7:()=>x});var d=c(31421),e=c(51455),f=c(48161),g=c(76760),h=c(57975),i=c(15024),j=c(21010);let k=(0,h.promisify)(d.execFile),l=new Set(["node_modules",".git",".next","dist","build"]);function m(a){let b=a.trim();if(!b)throw Error("Missing folder");let c="~"===b?(0,f.homedir)():b.startsWith("~/")?(0,g.join)((0,f.homedir)(),b.slice(2)):b;if(!(0,g.isAbsolute)(c))throw Error(`"${b}" is not an absolute path`);return(0,g.resolve)(c)}let n=["readme.md","notes.md","note.md","readme.txt","notes.txt","note.txt"],o=["README.md","NOTES.md"];async function p(a){let b=(await (0,e.readdir)(a,{withFileTypes:!0})).filter(a=>a.isFile()).map(a=>a.name);for(let c of n){let d=b.find(a=>a.toLowerCase()===c);if(!d)continue;let f=(0,g.join)(a,d);if(!((await (0,e.stat)(f)).size>j.XG))return{note:(await (0,e.readFile)(f,"utf8")).trim(),notePath:f}}return null}async function q(a){try{return await (0,e.stat)(a),!0}catch{return!1}}async function r(a){try{return(await (0,e.stat)(a)).isDirectory()}catch{return!1}}async function s(a,b,c){if(!(b>6)&&!(c.length>=2e3))for(let d of(await (0,e.readdir)(a,{withFileTypes:!0})).sort((a,b)=>a.name.localeCompare(b.name))){if(d.name.startsWith(".")||l.has(d.name))continue;let e=(0,g.join)(a,d.name);if(d.isDirectory())await s(e,b+1,c);else if(d.isFile()&&/\.sql$/i.test(d.name)&&(c.push(e),c.length>=2e3))return}}async function t(a,b,c){let d=[];if(await s(b,0,d),0===d.length)return null;let f=0,h=[];for(let a of d){let[c,d]=await Promise.all([(0,e.readFile)(a,"utf8"),(0,e.stat)(a)]);h.push({path:(0,g.relative)(b,a).split(/[\\/]/).join("/"),text:c}),f=Math.max(f,d.mtimeMs)}let k=(0,i.Nz)(h);if(k.errors.length>0&&0===k.applies.size)return null;let l=(0,i.Ai)([],k),m=await p(b);return{id:(0,j.K9)(c),name:c,importedAt:Math.round(f),steps:l.steps,skipped:l.skipped,note:m?.note||void 0,source:{root:a,path:b,notePath:m?.notePath}}}async function u(a,b){try{let{stdout:c}=await k("git",["-C",a,...b],{timeout:5e3});return c.trim()}catch{return null}}async function v(a){let b=await u(a,["rev-parse","--abbrev-ref","HEAD"]);if(null===b)return null;let[c,d]=await Promise.all([u(a,["rev-parse","--short","HEAD"]),u(a,["status","--porcelain","--","."])]);return{branch:b,commit:c??"",dirty:!!d}}async function w(a){let[b,c]=await Promise.all([u(a,["rev-parse","--show-toplevel"]),u(a,["worktree","list","--porcelain"])]);if(!b||null===c)return null;let d=(0,g.relative)(b,await (0,e.realpath)(a)),f=[];for(let a of c.split(/\n\s*\n/)){let b=a.split("\n"),c=b.find(a=>a.startsWith("worktree "))?.slice("worktree ".length);if(!c)continue;let d=b.find(a=>a.startsWith("branch "))?.slice("branch ".length),e=b.find(a=>a.startsWith("HEAD "))?.slice("HEAD ".length)??"";f.push({path:c,branch:d?d.replace(/^refs\/heads\//,""):e.slice(0,7),usable:!b.some(a=>"bare"===a||a.startsWith("prunable"))})}let h=[];for(let[a,b]of f.entries())b.usable&&await r((0,g.join)(b.path,d))&&h.push({path:b.path,branch:b.branch,main:0===a});return{list:h,subpath:d,current:b}}async function x(a,b=null){let c=m(a),d=await r(c)?await w(c):null,e=b?d?.list.find(a=>a.path===(0,g.resolve)(b)):void 0,f=e&&d?(0,g.join)(e.path,d.subpath):c;return{...await y(f),git:await v(f),checkouts:d?.list??[],checkout:e?.path??d?.current??null}}async function y(a){if(!await r(a))throw Error(`${a} is not a folder`);let b=(await (0,e.readdir)(a,{withFileTypes:!0})).sort((a,b)=>a.name.localeCompare(b.name)),c=[],d=[],f=[];for(let e of b)if(!(e.name.startsWith(".")||l.has(e.name)))if(e.isDirectory()){if(c.length>=500){f.push(`${e.name} — over 500 folders`);continue}let b=await t(a,(0,g.join)(a,e.name),e.name);b&&c.push(b)}else e.isFile()&&/\.sql$/i.test(e.name)&&d.push(e.name);if(d.length>0){let b=[],h=0;for(let c of d){let d=(0,g.join)(a,c),[f,i]=await Promise.all([(0,e.readFile)(d,"utf8"),(0,e.stat)(d)]);b.push({path:c,text:f}),h=Math.max(h,i.mtimeMs)}let k=(0,i.Nz)(b),l=(0,i.Ai)([],k);if(f.push(...l.skipped),l.steps.length>0){let b=(0,g.basename)(a),d=await p(a);c.push({id:(0,j.K9)(b),name:b,importedAt:Math.round(h),steps:l.steps,skipped:[],note:d?.note||void 0,source:{root:a,path:a,notePath:d?.notePath}})}}return{root:a,sets:c,skipped:f}}async function z(a,b,c){let{root:d,sets:f}=await y(m(a)),h=(0,g.resolve)(b),i=f.find(a=>a.source?.path===h);if(!i?.source)throw Error(`${h} is not a migration in ${d}`);let k=c.replace(/\r\n/g,"\n").trim();if(k.length>j.XG)throw Error(`That note is over ${j.XG.toLocaleString()} characters`);let l=i.source.notePath;if(!k)return l&&await (0,e.unlink)(l),{note:null,notePath:null};let n=l;if(!n){for(let a of o)if(!await q((0,g.join)(h,a))){n=(0,g.join)(h,a);break}}if(!n)throw Error(`${h} already has a README.md and NOTES.md too long to be a note`);return await (0,e.writeFile)(n,`${k}
2
+ `,{encoding:"utf8",flag:l?"w":"wx"}),{note:k,notePath:n}}}};