d1s 0.2.11 → 0.2.13

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 (318) hide show
  1. package/dist/.next/.next/BUILD_ID +1 -1
  2. package/dist/.next/.next/app-build-manifest.json +28 -28
  3. package/dist/.next/.next/app-path-routes-manifest.json +1 -1
  4. package/dist/.next/.next/build-manifest.json +3 -3
  5. package/dist/.next/.next/cache/.rscinfo +1 -1
  6. package/dist/.next/.next/cache/.tsbuildinfo +1 -1
  7. package/dist/.next/.next/cache/webpack/client-production/0.pack +0 -0
  8. package/dist/.next/.next/cache/webpack/client-production/1.pack +0 -0
  9. package/dist/.next/.next/cache/webpack/client-production/10.pack +0 -0
  10. package/dist/.next/.next/cache/webpack/client-production/11.pack +0 -0
  11. package/dist/.next/.next/cache/webpack/client-production/12.pack +0 -0
  12. package/dist/.next/.next/cache/webpack/client-production/2.pack +0 -0
  13. package/dist/.next/.next/cache/webpack/client-production/3.pack +0 -0
  14. package/dist/.next/.next/cache/webpack/client-production/4.pack +0 -0
  15. package/dist/.next/.next/cache/webpack/client-production/5.pack +0 -0
  16. package/dist/.next/.next/cache/webpack/client-production/6.pack +0 -0
  17. package/dist/.next/.next/cache/webpack/client-production/7.pack +0 -0
  18. package/dist/.next/.next/cache/webpack/client-production/8.pack +0 -0
  19. package/dist/.next/.next/cache/webpack/client-production/9.pack +0 -0
  20. package/dist/.next/.next/cache/webpack/client-production/index.pack +0 -0
  21. package/dist/.next/.next/cache/webpack/client-production/index.pack.old +0 -0
  22. package/dist/.next/.next/cache/webpack/edge-server-production/index.pack +0 -0
  23. package/dist/.next/.next/cache/webpack/server-production/0.pack +0 -0
  24. package/dist/.next/.next/cache/webpack/server-production/1.pack +0 -0
  25. package/dist/.next/.next/cache/webpack/server-production/2.pack +0 -0
  26. package/dist/.next/.next/cache/webpack/server-production/3.pack +0 -0
  27. package/dist/.next/.next/cache/webpack/server-production/index.pack +0 -0
  28. package/dist/.next/.next/cache/webpack/server-production/index.pack.old +0 -0
  29. package/dist/.next/.next/next-minimal-server.js.nft.json +1 -1
  30. package/dist/.next/.next/next-server.js.nft.json +1 -1
  31. package/dist/.next/.next/prerender-manifest.json +1 -1
  32. package/dist/.next/.next/required-server-files.json +1 -1
  33. package/dist/.next/.next/server/app/_not-found/page.js +1 -1
  34. package/dist/.next/.next/server/app/_not-found/page.js.nft.json +1 -1
  35. package/dist/.next/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  36. package/dist/.next/.next/server/app/_not-found.html +1 -1
  37. package/dist/.next/.next/server/app/_not-found.rsc +4 -4
  38. package/dist/.next/.next/server/app/api/cloudflare/route.js +1 -1
  39. package/dist/.next/.next/server/app/api/cloudflare/route_client-reference-manifest.js +1 -1
  40. package/dist/.next/.next/server/app/api/databases/route.js +1 -1
  41. package/dist/.next/.next/server/app/api/databases/route_client-reference-manifest.js +1 -1
  42. package/dist/.next/.next/server/app/api/migrations/sync/route.js +5 -5
  43. package/dist/.next/.next/server/app/api/migrations/sync/route_client-reference-manifest.js +1 -1
  44. package/dist/.next/.next/server/app/api/migrations/sync-files/route.js +3 -3
  45. package/dist/.next/.next/server/app/api/migrations/sync-files/route_client-reference-manifest.js +1 -1
  46. package/dist/.next/.next/server/app/api/pull-data/confirm/route.js +1 -1
  47. package/dist/.next/.next/server/app/api/pull-data/confirm/route_client-reference-manifest.js +1 -1
  48. package/dist/.next/.next/server/app/api/pull-remote/confirm/route.js +2 -2
  49. package/dist/.next/.next/server/app/api/pull-remote/confirm/route_client-reference-manifest.js +1 -1
  50. package/dist/.next/.next/server/app/api/pull-remote/preview/route.js +4 -4
  51. package/dist/.next/.next/server/app/api/pull-remote/preview/route_client-reference-manifest.js +1 -1
  52. package/dist/.next/.next/server/app/api/push-remote/confirm/route.js +5 -5
  53. package/dist/.next/.next/server/app/api/push-remote/confirm/route_client-reference-manifest.js +1 -1
  54. package/dist/.next/.next/server/app/api/push-remote/preview/route.js +4 -4
  55. package/dist/.next/.next/server/app/api/push-remote/preview/route_client-reference-manifest.js +1 -1
  56. package/dist/.next/.next/server/app/api/query/route.js +3 -3
  57. package/dist/.next/.next/server/app/api/query/route_client-reference-manifest.js +1 -1
  58. package/dist/.next/.next/server/app/api/tables/[name]/route.js +5 -5
  59. package/dist/.next/.next/server/app/api/tables/[name]/route_client-reference-manifest.js +1 -1
  60. package/dist/.next/.next/server/app/api/tables/route.js +2 -2
  61. package/dist/.next/.next/server/app/api/tables/route_client-reference-manifest.js +1 -1
  62. package/dist/.next/.next/server/app/api/update/route.js +1 -1
  63. package/dist/.next/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
  64. package/dist/.next/.next/server/app/index.html +2 -2
  65. package/dist/.next/.next/server/app/index.rsc +5 -5
  66. package/dist/.next/.next/server/app/page.js +7 -7
  67. package/dist/.next/.next/server/app/page.js.nft.json +1 -1
  68. package/dist/.next/.next/server/app/page_client-reference-manifest.js +1 -1
  69. package/dist/.next/.next/server/app-paths-manifest.json +1 -1
  70. package/dist/.next/.next/server/chunks/226.js +12 -12
  71. package/dist/.next/.next/server/chunks/391.js +1 -1
  72. package/dist/.next/.next/server/chunks/572.js +1 -0
  73. package/dist/.next/.next/server/chunks/992.js +3 -3
  74. package/dist/.next/.next/server/middleware-build-manifest.js +1 -1
  75. package/dist/.next/.next/server/next-font-manifest.js +1 -1
  76. package/dist/.next/.next/server/next-font-manifest.json +1 -1
  77. package/dist/.next/.next/server/pages/404.html +1 -1
  78. package/dist/.next/.next/server/pages/500.html +1 -1
  79. package/dist/.next/.next/server/server-reference-manifest.json +1 -1
  80. package/dist/.next/.next/static/chunks/{576-c4daf274bb6469a1.js → 576-18a2209e1ed26aad.js} +1 -1
  81. package/dist/.next/.next/static/chunks/{92-c4466e0f1ca8a3a8.js → 92-5f7522943fcb72a8.js} +1 -1
  82. package/dist/.next/.next/static/chunks/app/{layout-be6ee67cf0c92654.js → layout-40ec07d04681ba81.js} +1 -1
  83. package/dist/.next/.next/static/chunks/app/page-f05cd0fc436bf9bc.js +1 -0
  84. package/dist/.next/.next/static/chunks/app/page-f2bc307c0d8acdaa.js +1 -0
  85. package/dist/.next/.next/static/chunks/{main-app-fa35024de9bd9284.js → main-app-4506e88db72db4b7.js} +1 -1
  86. package/dist/.next/.next/static/css/{9f6c25c5400f83d3.css → 7c16f57d325d0d7d.css} +1 -1
  87. package/dist/.next/.next/static/ejYPqJ2kVicVp5EFWOZIC/_buildManifest.js +1 -0
  88. package/dist/.next/.next/static/ejYPqJ2kVicVp5EFWOZIC/_ssgManifest.js +1 -0
  89. package/dist/.next/.next/static/gABGrAoO8IPArDo_Ns_7g/_buildManifest.js +1 -0
  90. package/dist/.next/.next/static/gABGrAoO8IPArDo_Ns_7g/_ssgManifest.js +1 -0
  91. package/dist/.next/.next/static/gh-QfIUVo4FTTduYCVKT6/_buildManifest.js +1 -0
  92. package/dist/.next/.next/static/gh-QfIUVo4FTTduYCVKT6/_ssgManifest.js +1 -0
  93. package/dist/.next/.next/static/media/8d697b304b401681-s.woff2 +0 -0
  94. package/dist/.next/.next/static/media/9610d9e46709d722-s.woff2 +0 -0
  95. package/dist/.next/.next/static/thaCy2qVeNqYYhdayr13C/_buildManifest.js +1 -0
  96. package/dist/.next/.next/static/thaCy2qVeNqYYhdayr13C/_ssgManifest.js +1 -0
  97. package/dist/.next/.next/static/ybCx6L6gHqtODbKmlhU-d/_buildManifest.js +1 -0
  98. package/dist/.next/.next/static/ybCx6L6gHqtODbKmlhU-d/_ssgManifest.js +1 -0
  99. package/dist/.next/.next/trace +3 -3
  100. package/dist/.next/.next/types/app/api/cloudflare/route.ts +1 -1
  101. package/dist/.next/.next/types/app/api/databases/route.ts +1 -1
  102. package/dist/.next/.next/types/app/api/migrations/sync/route.ts +1 -1
  103. package/dist/.next/.next/types/app/api/migrations/sync-files/route.ts +1 -1
  104. package/dist/.next/.next/types/app/api/pull-data/confirm/route.ts +1 -1
  105. package/dist/.next/.next/types/app/api/pull-remote/confirm/route.ts +1 -1
  106. package/dist/.next/.next/types/app/api/pull-remote/preview/route.ts +1 -1
  107. package/dist/.next/.next/types/app/api/push-remote/confirm/route.ts +1 -1
  108. package/dist/.next/.next/types/app/api/push-remote/preview/route.ts +1 -1
  109. package/dist/.next/.next/types/app/api/query/route.ts +1 -1
  110. package/dist/.next/.next/types/app/api/tables/[name]/route.ts +1 -1
  111. package/dist/.next/.next/types/app/api/tables/route.ts +1 -1
  112. package/dist/.next/.next/types/app/api/update/route.ts +1 -1
  113. package/dist/.next/.next/types/app/page.ts +1 -1
  114. package/dist/.next/BUILD_ID +1 -1
  115. package/dist/.next/app-build-manifest.json +28 -28
  116. package/dist/.next/app-path-routes-manifest.json +1 -1
  117. package/dist/.next/build-manifest.json +3 -3
  118. package/dist/.next/cache/.rscinfo +1 -1
  119. package/dist/.next/cache/.tsbuildinfo +1 -1
  120. package/dist/.next/cache/webpack/client-production/0.pack +0 -0
  121. package/dist/.next/cache/webpack/client-production/1.pack +0 -0
  122. package/dist/.next/cache/webpack/client-production/2.pack +0 -0
  123. package/dist/.next/cache/webpack/client-production/index.pack +0 -0
  124. package/dist/.next/cache/webpack/client-production/index.pack.old +0 -0
  125. package/dist/.next/cache/webpack/edge-server-production/index.pack +0 -0
  126. package/dist/.next/cache/webpack/server-production/0.pack +0 -0
  127. package/dist/.next/cache/webpack/server-production/index.pack +0 -0
  128. package/dist/.next/next-minimal-server.js.nft.json +1 -1
  129. package/dist/.next/next-server.js.nft.json +1 -1
  130. package/dist/.next/prerender-manifest.json +1 -1
  131. package/dist/.next/required-server-files.json +1 -1
  132. package/dist/.next/server/app/_not-found/page.js +1 -1
  133. package/dist/.next/server/app/_not-found/page.js.nft.json +1 -1
  134. package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  135. package/dist/.next/server/app/_not-found.html +1 -1
  136. package/dist/.next/server/app/_not-found.rsc +4 -4
  137. package/dist/.next/server/app/api/cloudflare/route.js +1 -1
  138. package/dist/.next/server/app/api/cloudflare/route_client-reference-manifest.js +1 -1
  139. package/dist/.next/server/app/api/databases/route.js +1 -1
  140. package/dist/.next/server/app/api/databases/route_client-reference-manifest.js +1 -1
  141. package/dist/.next/server/app/api/migrations/sync/route.js +5 -5
  142. package/dist/.next/server/app/api/migrations/sync/route_client-reference-manifest.js +1 -1
  143. package/dist/.next/server/app/api/migrations/sync-files/route.js +3 -3
  144. package/dist/.next/server/app/api/migrations/sync-files/route_client-reference-manifest.js +1 -1
  145. package/dist/.next/server/app/api/pull-data/confirm/route.js +1 -1
  146. package/dist/.next/server/app/api/pull-data/confirm/route_client-reference-manifest.js +1 -1
  147. package/dist/.next/server/app/api/pull-remote/confirm/route.js +2 -2
  148. package/dist/.next/server/app/api/pull-remote/confirm/route_client-reference-manifest.js +1 -1
  149. package/dist/.next/server/app/api/pull-remote/preview/route.js +4 -4
  150. package/dist/.next/server/app/api/pull-remote/preview/route_client-reference-manifest.js +1 -1
  151. package/dist/.next/server/app/api/push-remote/confirm/route.js +5 -5
  152. package/dist/.next/server/app/api/push-remote/confirm/route_client-reference-manifest.js +1 -1
  153. package/dist/.next/server/app/api/push-remote/preview/route.js +4 -4
  154. package/dist/.next/server/app/api/push-remote/preview/route_client-reference-manifest.js +1 -1
  155. package/dist/.next/server/app/api/query/route.js +3 -3
  156. package/dist/.next/server/app/api/query/route_client-reference-manifest.js +1 -1
  157. package/dist/.next/server/app/api/tables/[name]/route.js +5 -5
  158. package/dist/.next/server/app/api/tables/[name]/route_client-reference-manifest.js +1 -1
  159. package/dist/.next/server/app/api/tables/route.js +2 -2
  160. package/dist/.next/server/app/api/tables/route_client-reference-manifest.js +1 -1
  161. package/dist/.next/server/app/api/update/route.js +1 -1
  162. package/dist/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
  163. package/dist/.next/server/app/index.html +2 -2
  164. package/dist/.next/server/app/index.rsc +5 -5
  165. package/dist/.next/server/app/page.js +7 -7
  166. package/dist/.next/server/app/page.js.nft.json +1 -1
  167. package/dist/.next/server/app/page_client-reference-manifest.js +1 -1
  168. package/dist/.next/server/app-paths-manifest.json +1 -1
  169. package/dist/.next/server/chunks/226.js +12 -12
  170. package/dist/.next/server/chunks/391.js +1 -1
  171. package/dist/.next/server/chunks/572.js +1 -0
  172. package/dist/.next/server/chunks/992.js +3 -3
  173. package/dist/.next/server/middleware-build-manifest.js +1 -1
  174. package/dist/.next/server/next-font-manifest.js +1 -1
  175. package/dist/.next/server/next-font-manifest.json +1 -1
  176. package/dist/.next/server/pages/404.html +1 -1
  177. package/dist/.next/server/pages/500.html +1 -1
  178. package/dist/.next/server/server-reference-manifest.json +1 -1
  179. package/dist/.next/static/IX-QLbm7scYnyqWeeimal/_buildManifest.js +1 -0
  180. package/dist/.next/static/IX-QLbm7scYnyqWeeimal/_ssgManifest.js +1 -0
  181. package/dist/.next/static/chunks/{576-c4daf274bb6469a1.js → 576-18a2209e1ed26aad.js} +1 -1
  182. package/dist/.next/static/chunks/{92-c4466e0f1ca8a3a8.js → 92-5f7522943fcb72a8.js} +1 -1
  183. package/dist/.next/static/chunks/app/{layout-be6ee67cf0c92654.js → layout-40ec07d04681ba81.js} +1 -1
  184. package/dist/.next/static/chunks/app/page-f05cd0fc436bf9bc.js +1 -0
  185. package/dist/.next/static/chunks/{main-app-fa35024de9bd9284.js → main-app-4506e88db72db4b7.js} +1 -1
  186. package/dist/.next/static/css/{9f6c25c5400f83d3.css → 7c16f57d325d0d7d.css} +1 -1
  187. package/dist/.next/static/media/8d697b304b401681-s.woff2 +0 -0
  188. package/dist/.next/static/media/9610d9e46709d722-s.woff2 +0 -0
  189. package/dist/.next/trace +3 -14
  190. package/dist/.next/types/app/api/cloudflare/route.ts +1 -1
  191. package/dist/.next/types/app/api/databases/route.ts +1 -1
  192. package/dist/.next/types/app/api/migrations/sync/route.ts +1 -1
  193. package/dist/.next/types/app/api/migrations/sync-files/route.ts +1 -1
  194. package/dist/.next/types/app/api/pull-data/confirm/route.ts +1 -1
  195. package/dist/.next/types/app/api/pull-remote/confirm/route.ts +1 -1
  196. package/dist/.next/types/app/api/pull-remote/preview/route.ts +1 -1
  197. package/dist/.next/types/app/api/push-remote/confirm/route.ts +1 -1
  198. package/dist/.next/types/app/api/push-remote/preview/route.ts +1 -1
  199. package/dist/.next/types/app/api/query/route.ts +1 -1
  200. package/dist/.next/types/app/api/tables/[name]/route.ts +1 -1
  201. package/dist/.next/types/app/api/tables/route.ts +1 -1
  202. package/dist/.next/types/app/api/update/route.ts +1 -1
  203. package/dist/.next/types/app/page.ts +1 -1
  204. package/dist/app/api/tables/[name]/route.js +22 -10
  205. package/dist/app/globals.css +39 -0
  206. package/dist/d1-studio.js +2 -2
  207. package/dist/lib/data-type-handlers.js +426 -0
  208. package/dist/lib/sql-operations.js +32 -8
  209. package/dist/lib/sql-sanitizer.js +233 -0
  210. package/package.json +3 -9
  211. package/dist/.next/.next/server/chunks/90.js +0 -1
  212. package/dist/.next/.next/static/chunks/app/page-36ed30b2266617f3.js +0 -1
  213. package/dist/.next/server/chunks/90.js +0 -1
  214. package/dist/.next/static/chunks/app/page-36ed30b2266617f3.js +0 -1
  215. package/dist/app/app/api/cloudflare/route.js +0 -150
  216. package/dist/app/app/api/databases/route.js +0 -71
  217. package/dist/app/app/api/migrations/sync/route.js +0 -174
  218. package/dist/app/app/api/migrations/sync-files/route.js +0 -172
  219. package/dist/app/app/api/pull-data/confirm/route.js +0 -230
  220. package/dist/app/app/api/pull-remote/confirm/route.js +0 -278
  221. package/dist/app/app/api/pull-remote/preview/route.js +0 -144
  222. package/dist/app/app/api/push-remote/confirm/route.js +0 -196
  223. package/dist/app/app/api/push-remote/preview/route.js +0 -179
  224. package/dist/app/app/api/query/route.js +0 -168
  225. package/dist/app/app/api/tables/[name]/route.js +0 -174
  226. package/dist/app/app/api/tables/route.js +0 -178
  227. package/dist/app/app/api/update/route.js +0 -45
  228. package/dist/app/app/globals.css +0 -93
  229. package/dist/app/app/layout.jsx +0 -35
  230. package/dist/app/app/page.jsx +0 -34
  231. package/next.config.mjs +0 -18
  232. package/postcss.config.mjs +0 -8
  233. package/scripts/studio.js +0 -199
  234. package/scripts/test.js +0 -366
  235. package/src/app/api/cloudflare/route.js +0 -150
  236. package/src/app/api/databases/route.js +0 -71
  237. package/src/app/api/migrations/sync/route.js +0 -174
  238. package/src/app/api/migrations/sync-files/route.js +0 -172
  239. package/src/app/api/pull-data/confirm/route.js +0 -230
  240. package/src/app/api/pull-remote/confirm/route.js +0 -278
  241. package/src/app/api/pull-remote/preview/route.js +0 -144
  242. package/src/app/api/push-remote/confirm/route.js +0 -196
  243. package/src/app/api/push-remote/preview/route.js +0 -179
  244. package/src/app/api/query/route.js +0 -168
  245. package/src/app/api/tables/[name]/route.js +0 -174
  246. package/src/app/api/tables/route.js +0 -178
  247. package/src/app/api/update/route.js +0 -45
  248. package/src/app/globals.css +0 -93
  249. package/src/app/layout.jsx +0 -35
  250. package/src/app/page.jsx +0 -34
  251. package/src/components/cloudflare-credentials-modal.jsx +0 -94
  252. package/src/components/column-selector.jsx +0 -133
  253. package/src/components/column-sorting.jsx +0 -65
  254. package/src/components/delete-records-dialog.jsx +0 -64
  255. package/src/components/download-button.jsx +0 -205
  256. package/src/components/edit-error-alert.jsx +0 -30
  257. package/src/components/editable-cell.jsx +0 -163
  258. package/src/components/editable-row.jsx +0 -169
  259. package/src/components/environment-handler.jsx +0 -332
  260. package/src/components/environment-select.jsx +0 -62
  261. package/src/components/pull-preview-toast.jsx +0 -215
  262. package/src/components/push-error-alert.jsx +0 -72
  263. package/src/components/push-preview-toast.jsx +0 -183
  264. package/src/components/query-results.jsx +0 -112
  265. package/src/components/refresh-button.jsx +0 -61
  266. package/src/components/resize-columns.jsx +0 -101
  267. package/src/components/sidebar.jsx +0 -254
  268. package/src/components/sql-editor.jsx +0 -411
  269. package/src/components/sql-error-display.jsx +0 -167
  270. package/src/components/sync-migrations-button.jsx +0 -87
  271. package/src/components/table-error-dialog.jsx +0 -65
  272. package/src/components/table-toolbar.jsx +0 -285
  273. package/src/components/table-view.jsx +0 -843
  274. package/src/components/ui/alert.jsx +0 -47
  275. package/src/components/ui/button.jsx +0 -48
  276. package/src/components/ui/card.jsx +0 -50
  277. package/src/components/ui/checkbox.jsx +0 -24
  278. package/src/components/ui/collapsible.jsx +0 -11
  279. package/src/components/ui/dialog.jsx +0 -96
  280. package/src/components/ui/dropdown-menu.jsx +0 -158
  281. package/src/components/ui/input.jsx +0 -19
  282. package/src/components/ui/scroll-area.jsx +0 -40
  283. package/src/components/ui/select.jsx +0 -121
  284. package/src/components/ui/separator.jsx +0 -25
  285. package/src/components/ui/sheet.jsx +0 -109
  286. package/src/components/ui/sidebar.jsx +0 -620
  287. package/src/components/ui/skeleton.jsx +0 -14
  288. package/src/components/ui/table.jsx +0 -86
  289. package/src/components/ui/tabs.jsx +0 -43
  290. package/src/components/ui/toast.jsx +0 -86
  291. package/src/components/ui/toaster.jsx +0 -35
  292. package/src/components/ui/tooltip.jsx +0 -28
  293. package/src/components/update-banner.jsx +0 -93
  294. package/src/context/database-context.js +0 -510
  295. package/src/hooks/use-mobile.jsx +0 -19
  296. package/src/hooks/use-sql-error.ts +0 -23
  297. package/src/hooks/use-toast.js +0 -155
  298. package/src/lib/database-queue.js +0 -37
  299. package/src/lib/error.js +0 -20
  300. package/src/lib/find-wrangler-config.js +0 -74
  301. package/src/lib/license.js +0 -99
  302. package/src/lib/logger.js +0 -58
  303. package/src/lib/migrations.js +0 -415
  304. package/src/lib/parse-sql-error.js +0 -200
  305. package/src/lib/request-deduplication.js +0 -24
  306. package/src/lib/schema-operations.js +0 -106
  307. package/src/lib/sql-error-types.js +0 -14
  308. package/src/lib/sql-operations.js +0 -647
  309. package/src/lib/utils.js +0 -6
  310. package/src/lib/version-utils.js +0 -34
  311. /package/dist/.next/.next/static/{OUHnbB-64afrrZQL0Srn5 → FEsQ9jwPUQv5A3fwg6Opl}/_buildManifest.js +0 -0
  312. /package/dist/.next/.next/static/{OUHnbB-64afrrZQL0Srn5 → FEsQ9jwPUQv5A3fwg6Opl}/_ssgManifest.js +0 -0
  313. /package/dist/.next/.next/static/{ZBTCAyp1kO5FdEHMU-Dw2 → Y9mYu4WBghepP5oT_3OdR}/_buildManifest.js +0 -0
  314. /package/dist/.next/.next/static/{ZBTCAyp1kO5FdEHMU-Dw2 → Y9mYu4WBghepP5oT_3OdR}/_ssgManifest.js +0 -0
  315. /package/dist/.next/.next/static/{bHYW7fgIBDF8-Q33_WPoE → ae3gNmoSGm-R5LJC4UagI}/_buildManifest.js +0 -0
  316. /package/dist/.next/.next/static/{bHYW7fgIBDF8-Q33_WPoE → ae3gNmoSGm-R5LJC4UagI}/_ssgManifest.js +0 -0
  317. /package/dist/.next/{static/ZBTCAyp1kO5FdEHMU-Dw2 → .next/static/bKfUJeuvAQlBmR3TjrfkH}/_buildManifest.js +0 -0
  318. /package/dist/.next/{static/ZBTCAyp1kO5FdEHMU-Dw2 → .next/static/bKfUJeuvAQlBmR3TjrfkH}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/_not-found/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","name":"*","chunks":[],"async":false}},"2624":{"*":{"id":"4535","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-be6ee67cf0c92654.js"],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-be6ee67cf0c92654.js"],"async":false},"/Users/kona/Desktop/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-be6ee67cf0c92654.js"],"async":false},"/Users/kona/Desktop/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-be6ee67cf0c92654.js"],"async":false},"/Users/kona/Desktop/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-be6ee67cf0c92654.js"],"async":false},"/Users/kona/Desktop/d1studio/src/app/page.jsx":{"id":2624,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","576","static/chunks/576-c4daf274bb6469a1.js","735","static/chunks/735-b885dfec6353171d.js","974","static/chunks/app/page-36ed30b2266617f3.js"],"async":false}},"entryCSSFiles":{"/Users/kona/Desktop/d1studio/src/":[],"/Users/kona/Desktop/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/9f6c25c5400f83d3.css"}],"/Users/kona/Desktop/d1studio/src/app/page":[],"/Users/kona/Desktop/d1studio/src/app/_not-found/page":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","name":"*","chunks":[],"async":false}},"2624":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/_not-found/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","name":"*","chunks":[],"async":false}},"2624":{"*":{"id":"4535","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":2624,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","576","static/chunks/576-18a2209e1ed26aad.js","735","static/chunks/735-b885dfec6353171d.js","974","static/chunks/app/page-f2bc307c0d8acdaa.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/7c16f57d325d0d7d.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/_not-found/page":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","name":"*","chunks":[],"async":false}},"2624":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/569ce4b8f30dc480-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/93f479601ee12b01-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/9f6c25c5400f83d3.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-c76ac1e586b2802a.js"/><script src="/_next/static/chunks/4bd1b696-8c908eb707f85a27.js" async=""></script><script src="/_next/static/chunks/517-3b698a5d3da06ff7.js" async=""></script><script src="/_next/static/chunks/main-app-fa35024de9bd9284.js" async=""></script><script src="/_next/static/chunks/692-ede418e1d28a1394.js" async=""></script><script src="/_next/static/chunks/92-c4466e0f1ca8a3a8.js" async=""></script><script src="/_next/static/chunks/735-b885dfec6353171d.js" async=""></script><script src="/_next/static/chunks/app/layout-be6ee67cf0c92654.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>d1-studio</title><meta name="description" content="Native D1 database studio."/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_4d318d __variable_ea5f4b antialiased"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>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)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div> <script src="/_next/static/chunks/webpack-c76ac1e586b2802a.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[33,[\"692\",\"static/chunks/692-ede418e1d28a1394.js\",\"92\",\"static/chunks/92-c4466e0f1ca8a3a8.js\",\"735\",\"static/chunks/735-b885dfec6353171d.js\",\"177\",\"static/chunks/app/layout-be6ee67cf0c92654.js\"],\"DatabaseProvider\"]\n3:I[5244,[],\"\"]\n4:I[3866,[],\"\"]\n5:I[6124,[\"692\",\"static/chunks/692-ede418e1d28a1394.js\",\"92\",\"static/chunks/92-c4466e0f1ca8a3a8.js\",\"735\",\"static/chunks/735-b885dfec6353171d.js\",\"177\",\"static/chunks/app/layout-be6ee67cf0c92654.js\"],\"Toaster\"]\n6:I[6213,[],\"OutletBoundary\"]\n8:I[6213,[],\"MetadataBoundary\"]\na:I[6213,[],\"ViewportBoundary\"]\nc:I[4835,[],\"\"]\n:HL[\"/_next/static/media/569ce4b8f30dc480-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/93f479601ee12b01-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/9f6c25c5400f83d3.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"OUHnbB-64afrrZQL0Srn5\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/9f6c25c5400f83d3.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"__variable_4d318d __variable_ea5f4b antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",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\"}],[\"$\",\"$L5\",null,{}],\" \"]}]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:style\",\"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\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L6\",null,{\"children\":\"$L7\"}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$1\",\"GDV9PQFhtKyXqGUW4exG7\",{\"children\":[[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",\"$undefined\"],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"1\",{\"children\":\"d1-studio\"}],[\"$\",\"meta\",\"2\",{\"name\":\"description\",\"content\":\"Native D1 database studio.\"}]]\n"])</script><script>self.__next_f.push([1,"7:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/569ce4b8f30dc480-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/93f479601ee12b01-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/7c16f57d325d0d7d.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-c76ac1e586b2802a.js"/><script src="/_next/static/chunks/4bd1b696-8c908eb707f85a27.js" async=""></script><script src="/_next/static/chunks/517-3b698a5d3da06ff7.js" async=""></script><script src="/_next/static/chunks/main-app-4506e88db72db4b7.js" async=""></script><script src="/_next/static/chunks/692-ede418e1d28a1394.js" async=""></script><script src="/_next/static/chunks/92-5f7522943fcb72a8.js" async=""></script><script src="/_next/static/chunks/735-b885dfec6353171d.js" async=""></script><script src="/_next/static/chunks/app/layout-40ec07d04681ba81.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>d1-studio</title><meta name="description" content="Native D1 database studio."/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_5cfdac __variable_9a8899 antialiased"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>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)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div> <script src="/_next/static/chunks/webpack-c76ac1e586b2802a.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[33,[\"692\",\"static/chunks/692-ede418e1d28a1394.js\",\"92\",\"static/chunks/92-5f7522943fcb72a8.js\",\"735\",\"static/chunks/735-b885dfec6353171d.js\",\"177\",\"static/chunks/app/layout-40ec07d04681ba81.js\"],\"DatabaseProvider\"]\n3:I[5244,[],\"\"]\n4:I[3866,[],\"\"]\n5:I[6124,[\"692\",\"static/chunks/692-ede418e1d28a1394.js\",\"92\",\"static/chunks/92-5f7522943fcb72a8.js\",\"735\",\"static/chunks/735-b885dfec6353171d.js\",\"177\",\"static/chunks/app/layout-40ec07d04681ba81.js\"],\"Toaster\"]\n6:I[6213,[],\"OutletBoundary\"]\n8:I[6213,[],\"MetadataBoundary\"]\na:I[6213,[],\"ViewportBoundary\"]\nc:I[4835,[],\"\"]\n:HL[\"/_next/static/media/569ce4b8f30dc480-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/93f479601ee12b01-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/7c16f57d325d0d7d.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"FEsQ9jwPUQv5A3fwg6Opl\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/7c16f57d325d0d7d.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"__variable_5cfdac __variable_9a8899 antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",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\"}],[\"$\",\"$L5\",null,{}],\" \"]}]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:style\",\"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\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L6\",null,{\"children\":\"$L7\"}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$1\",\"09R3k0g4SWiyJmNqMGOB_\",{\"children\":[[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",\"$undefined\"],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"1\",{\"children\":\"d1-studio\"}],[\"$\",\"meta\",\"2\",{\"name\":\"description\",\"content\":\"Native D1 database studio.\"}]]\n"])</script><script>self.__next_f.push([1,"7:null\n"])</script></body></html>
@@ -1,16 +1,16 @@
1
1
  1:"$Sreact.fragment"
2
- 2:I[33,["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-be6ee67cf0c92654.js"],"DatabaseProvider"]
2
+ 2:I[33,["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"DatabaseProvider"]
3
3
  3:I[5244,[],""]
4
4
  4:I[3866,[],""]
5
- 5:I[6124,["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-be6ee67cf0c92654.js"],"Toaster"]
5
+ 5:I[6124,["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"Toaster"]
6
6
  6:I[6213,[],"OutletBoundary"]
7
7
  8:I[6213,[],"MetadataBoundary"]
8
8
  a:I[6213,[],"ViewportBoundary"]
9
9
  c:I[4835,[],""]
10
10
  :HL["/_next/static/media/569ce4b8f30dc480-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
11
11
  :HL["/_next/static/media/93f479601ee12b01-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
12
- :HL["/_next/static/css/9f6c25c5400f83d3.css","style"]
13
- 0:{"P":null,"b":"OUHnbB-64afrrZQL0Srn5","p":"","c":["","_not-found"],"i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/9f6c25c5400f83d3.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__variable_4d318d __variable_ea5f4b antialiased","children":["$","$L2",null,{"children":[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",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"}],["$","$L5",null,{}]," "]}]}]}]]}],{"children":["/_not-found",["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","/_not-found","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:style","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":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L6",null,{"children":"$L7"}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$1","GDV9PQFhtKyXqGUW4exG7",{"children":[["$","$L8",null,{"children":"$L9"}],["$","$La",null,{"children":"$Lb"}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}]]}],false]],"m":"$undefined","G":["$c","$undefined"],"s":false,"S":true}
12
+ :HL["/_next/static/css/7c16f57d325d0d7d.css","style"]
13
+ 0:{"P":null,"b":"FEsQ9jwPUQv5A3fwg6Opl","p":"","c":["","_not-found"],"i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/7c16f57d325d0d7d.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__variable_5cfdac __variable_9a8899 antialiased","children":["$","$L2",null,{"children":[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",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"}],["$","$L5",null,{}]," "]}]}]}]]}],{"children":["/_not-found",["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","/_not-found","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:style","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":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L6",null,{"children":"$L7"}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$1","09R3k0g4SWiyJmNqMGOB_",{"children":[["$","$L8",null,{"children":"$L9"}],["$","$La",null,{"children":"$Lb"}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}]]}],false]],"m":"$undefined","G":["$c","$undefined"],"s":false,"S":true}
14
14
  b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
15
15
  9:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"d1-studio"}],["$","meta","2",{"name":"description","content":"Native D1 database studio."}]]
16
16
  7:null
@@ -1 +1 @@
1
- (()=>{var e={};e.id=999,e.ids=[999],e.modules={846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{"use strict";e.exports=require("buffer")},4735:e=>{"use strict";e.exports=require("events")},9021:e=>{"use strict";e.exports=require("fs")},9748:e=>{"use strict";e.exports=require("fs/promises")},1630:e=>{"use strict";e.exports=require("http")},5591:e=>{"use strict";e.exports=require("https")},1820:e=>{"use strict";e.exports=require("os")},3873:e=>{"use strict";e.exports=require("path")},7910:e=>{"use strict";e.exports=require("stream")},1204:e=>{"use strict";e.exports=require("string_decoder")},8354:e=>{"use strict";e.exports=require("util")},4075:e=>{"use strict";e.exports=require("zlib")},3024:e=>{"use strict";e.exports=require("node:fs")},6760:e=>{"use strict";e.exports=require("node:path")},1708:e=>{"use strict";e.exports=require("node:process")},3136:e=>{"use strict";e.exports=require("node:url")},6632:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>j,routeModule:()=>h,serverHooks:()=>w,workAsyncStorage:()=>x,workUnitAsyncStorage:()=>m});var s={};t.r(s),t.d(s,{OPTIONS:()=>g,POST:()=>f});var o=t(2706),a=t(8203),n=t(5994),i=t(9187),u=t(5949),c=t(1804);async function l(e,r){let t=await fetch(`https://api.cloudflare.com/client/v4/accounts/${e}/d1/database`,{headers:{Authorization:`Bearer ${r}`,"Content-Type":"application/json"}});if(!t.ok)throw Error("Invalid Cloudflare credentials");return t.json()}async function d(e,r,t){let s=await fetch(`https://api.cloudflare.com/client/v4/accounts/${e}/d1/database`,{headers:{Authorization:`Bearer ${r}`,"Content-Type":"application/json"}});if(!s.ok)throw Error("Failed to fetch databases");let{result:o}=await s.json();return o.find(e=>e.name===t)}async function p(e,r,t){let s=await fetch(`https://api.cloudflare.com/client/v4/accounts/${e}/d1/database`,{method:"POST",headers:{Authorization:`Bearer ${r}`,"Content-Type":"application/json"},body:JSON.stringify({name:t})});if(!s.ok)throw Error("Failed to create database");return s.json()}async function f(e){try{let{accountId:r,apiToken:t}=await e.json(),s=process.env.D1_PROJECT_DIR;if(!s)return c.A.error("Project directory not configured"),i.NextResponse.json({error:"Project directory not configured"},{status:500});await l(r,t);let o=await (0,u.S)(s);if(!o||!o.config)return c.A.error("No Wrangler configuration file found in project directory"),i.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let a=o.config;if(!a.d1_databases?.length)return i.NextResponse.json({error:"No D1 databases configured in Wrangler configuration"},{status:400});let n=a.d1_databases[0],f=await d(r,t,n.database_name);return f||(f=(await p(r,t,n.database_name)).result),i.NextResponse.json({success:!0,database:{id:f.uuid,name:f.name}})}catch(e){return c.A.error("Cloudflare API error:",e),i.NextResponse.json({error:e.message},{status:e.message.includes("Invalid credentials")?401:500})}}async function g(){return new i.NextResponse(null,{status:204})}let h=new o.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/cloudflare/route",pathname:"/api/cloudflare",filename:"route",bundlePath:"app/api/cloudflare/route"},resolvedPagePath:"/Users/kona/Desktop/d1studio/src/app/api/cloudflare/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:x,workUnitAsyncStorage:m,serverHooks:w}=h;function j(){return(0,n.patchFetch)({workAsyncStorage:x,workUnitAsyncStorage:m})}},6487:()=>{},8335:()=>{},5949:(e,r,t)=>{"use strict";t.d(r,{S:()=>l});var s=t(9748),o=t(3149),a=t(2537),n=t(6789),i=t(1804);let u=null,c=null;async function l(e){try{let r;if(!e||"string"!=typeof e)throw Error("Project path is required and must be a string");if(u&&c===e)return u;let t=null,l=null;for(let r of["wrangler.toml","wrangler.json","wrangler.jsonc"])if(t=await (0,o.dJ)(r,{cwd:e})){l=r;break}if(!t)return i.A.warn(`No Wrangler configuration file found in: ${e}`),null;i.A.info(`Found ${l} at: ${t}`);let d=await (0,s.readFile)(t,"utf-8");return l.endsWith(".toml")?r=(0,a.parse)(d):(l.endsWith(".jsonc")&&(d=(0,n.A)(d)),r=JSON.parse(d)),u={config:r,projectPath:e},c=e,u}catch(e){throw i.A.error(`Error reading Wrangler configuration: ${e.message}`),e}}},1804:(e,r,t)=>{"use strict";t.d(r,{A:()=>d});var s=t(6399);let{combine:o,timestamp:a,printf:n,colorize:i}=s.format,u="true"===process.env.DEBUG,c=n(({level:e,message:r,timestamp:t,...s})=>{let o=`${t} ${e}: ${r}`;return Object.keys(s).length>0&&(o+=` ${JSON.stringify(s)}`),o}),l=s.createLogger({level:u?"debug":"warn",format:o(a({format:"YYYY-MM-DD HH:mm:ss"}),i(),c),transports:[new s.transports.Console({level:u?"debug":"warn",silent:!1})]});l.logRequest=(e,r,t={})=>{l.debug(`Request: ${e} ${r}`,t)},l.logError=(e,r="unknown")=>{l.error(`Error in ${r}: ${e.message}`,{error:e.stack||e.message,source:r})},l.shouldLog=e=>{let r=l.level,t={error:0,warn:1,info:2,debug:3};return t[e]<=t[r]};let d=l}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[638,452,391],()=>t(6632));module.exports=s})();
1
+ (()=>{var e={};e.id=999,e.ids=[999],e.modules={846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{"use strict";e.exports=require("buffer")},4735:e=>{"use strict";e.exports=require("events")},9021:e=>{"use strict";e.exports=require("fs")},9748:e=>{"use strict";e.exports=require("fs/promises")},1630:e=>{"use strict";e.exports=require("http")},5591:e=>{"use strict";e.exports=require("https")},1820:e=>{"use strict";e.exports=require("os")},3873:e=>{"use strict";e.exports=require("path")},7910:e=>{"use strict";e.exports=require("stream")},1204:e=>{"use strict";e.exports=require("string_decoder")},8354:e=>{"use strict";e.exports=require("util")},4075:e=>{"use strict";e.exports=require("zlib")},643:e=>{"use strict";e.exports=require("node:fs")},4379:e=>{"use strict";e.exports=require("node:path")},1708:e=>{"use strict";e.exports=require("node:process")},3136:e=>{"use strict";e.exports=require("node:url")},5597:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>j,routeModule:()=>h,serverHooks:()=>w,workAsyncStorage:()=>x,workUnitAsyncStorage:()=>m});var s={};t.r(s),t.d(s,{OPTIONS:()=>g,POST:()=>f});var o=t(2706),a=t(8203),n=t(5994),i=t(9187),u=t(5949),c=t(1804);async function l(e,r){let t=await fetch(`https://api.cloudflare.com/client/v4/accounts/${e}/d1/database`,{headers:{Authorization:`Bearer ${r}`,"Content-Type":"application/json"}});if(!t.ok)throw Error("Invalid Cloudflare credentials");return t.json()}async function d(e,r,t){let s=await fetch(`https://api.cloudflare.com/client/v4/accounts/${e}/d1/database`,{headers:{Authorization:`Bearer ${r}`,"Content-Type":"application/json"}});if(!s.ok)throw Error("Failed to fetch databases");let{result:o}=await s.json();return o.find(e=>e.name===t)}async function p(e,r,t){let s=await fetch(`https://api.cloudflare.com/client/v4/accounts/${e}/d1/database`,{method:"POST",headers:{Authorization:`Bearer ${r}`,"Content-Type":"application/json"},body:JSON.stringify({name:t})});if(!s.ok)throw Error("Failed to create database");return s.json()}async function f(e){try{let{accountId:r,apiToken:t}=await e.json(),s=process.env.D1_PROJECT_DIR;if(!s)return c.A.error("Project directory not configured"),i.NextResponse.json({error:"Project directory not configured"},{status:500});await l(r,t);let o=await (0,u.S)(s);if(!o||!o.config)return c.A.error("No Wrangler configuration file found in project directory"),i.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let a=o.config;if(!a.d1_databases?.length)return i.NextResponse.json({error:"No D1 databases configured in Wrangler configuration"},{status:400});let n=a.d1_databases[0],f=await d(r,t,n.database_name);return f||(f=(await p(r,t,n.database_name)).result),i.NextResponse.json({success:!0,database:{id:f.uuid,name:f.name}})}catch(e){return c.A.error("Cloudflare API error:",e),i.NextResponse.json({error:e.message},{status:e.message.includes("Invalid credentials")?401:500})}}async function g(){return new i.NextResponse(null,{status:204})}let h=new o.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/cloudflare/route",pathname:"/api/cloudflare",filename:"route",bundlePath:"app/api/cloudflare/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/cloudflare/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:x,workUnitAsyncStorage:m,serverHooks:w}=h;function j(){return(0,n.patchFetch)({workAsyncStorage:x,workUnitAsyncStorage:m})}},6487:()=>{},8335:()=>{},5949:(e,r,t)=>{"use strict";t.d(r,{S:()=>l});var s=t(9748),o=t(3149),a=t(2537),n=t(6789),i=t(1804);let u=null,c=null;async function l(e){try{let r;if(!e||"string"!=typeof e)throw Error("Project path is required and must be a string");if(u&&c===e)return u;let t=null,l=null;for(let r of["wrangler.toml","wrangler.json","wrangler.jsonc"])if(t=await (0,o.dJ)(r,{cwd:e})){l=r;break}if(!t)return i.A.warn(`No Wrangler configuration file found in: ${e}`),null;i.A.info(`Found ${l} at: ${t}`);let d=await (0,s.readFile)(t,"utf-8");return l.endsWith(".toml")?r=(0,a.parse)(d):(l.endsWith(".jsonc")&&(d=(0,n.A)(d)),r=JSON.parse(d)),u={config:r,projectPath:e},c=e,u}catch(e){throw i.A.error(`Error reading Wrangler configuration: ${e.message}`),e}}},1804:(e,r,t)=>{"use strict";t.d(r,{A:()=>d});var s=t(6399);let{combine:o,timestamp:a,printf:n,colorize:i}=s.format,u="true"===process.env.DEBUG,c=n(({level:e,message:r,timestamp:t,...s})=>{let o=`${t} ${e}: ${r}`;return Object.keys(s).length>0&&(o+=` ${JSON.stringify(s)}`),o}),l=s.createLogger({level:u?"debug":"warn",format:o(a({format:"YYYY-MM-DD HH:mm:ss"}),i(),c),transports:[new s.transports.Console({level:u?"debug":"warn",silent:!1})]});l.logRequest=(e,r,t={})=>{l.debug(`Request: ${e} ${r}`,t)},l.logError=(e,r="unknown")=>{l.error(`Error in ${r}: ${e.message}`,{error:e.stack||e.message,source:r})},l.shouldLog=e=>{let r=l.level,t={error:0,warn:1,info:2,debug:3};return t[e]<=t[r]};let d=l}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[638,452,391],()=>t(5597));module.exports=s})();
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/cloudflare/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","name":"*","chunks":[],"async":false}},"2624":{"*":{"id":"4535","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-be6ee67cf0c92654.js"],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-be6ee67cf0c92654.js"],"async":false},"/Users/kona/Desktop/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-be6ee67cf0c92654.js"],"async":false},"/Users/kona/Desktop/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-be6ee67cf0c92654.js"],"async":false},"/Users/kona/Desktop/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-be6ee67cf0c92654.js"],"async":false},"/Users/kona/Desktop/d1studio/src/app/page.jsx":{"id":2624,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","576","static/chunks/576-c4daf274bb6469a1.js","735","static/chunks/735-b885dfec6353171d.js","974","static/chunks/app/page-36ed30b2266617f3.js"],"async":false}},"entryCSSFiles":{"/Users/kona/Desktop/d1studio/src/":[],"/Users/kona/Desktop/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/9f6c25c5400f83d3.css"}],"/Users/kona/Desktop/d1studio/src/app/page":[],"/Users/kona/Desktop/d1studio/src/app/api/cloudflare/route":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","name":"*","chunks":[],"async":false}},"2624":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/cloudflare/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","name":"*","chunks":[],"async":false}},"2624":{"*":{"id":"4535","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":2624,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","576","static/chunks/576-18a2209e1ed26aad.js","735","static/chunks/735-b885dfec6353171d.js","974","static/chunks/app/page-f2bc307c0d8acdaa.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/7c16f57d325d0d7d.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/cloudflare/route":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","name":"*","chunks":[],"async":false}},"2624":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -1 +1 @@
1
- (()=>{var e={};e.id=952,e.ids=[952],e.modules={846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{"use strict";e.exports=require("buffer")},4735:e=>{"use strict";e.exports=require("events")},9021:e=>{"use strict";e.exports=require("fs")},9748:e=>{"use strict";e.exports=require("fs/promises")},1630:e=>{"use strict";e.exports=require("http")},5591:e=>{"use strict";e.exports=require("https")},1820:e=>{"use strict";e.exports=require("os")},3873:e=>{"use strict";e.exports=require("path")},7910:e=>{"use strict";e.exports=require("stream")},1204:e=>{"use strict";e.exports=require("string_decoder")},8354:e=>{"use strict";e.exports=require("util")},4075:e=>{"use strict";e.exports=require("zlib")},3024:e=>{"use strict";e.exports=require("node:fs")},6760:e=>{"use strict";e.exports=require("node:path")},1708:e=>{"use strict";e.exports=require("node:process")},3136:e=>{"use strict";e.exports=require("node:url")},8945:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>h,routeModule:()=>p,serverHooks:()=>x,workAsyncStorage:()=>g,workUnitAsyncStorage:()=>f});var s={};t.r(s),t.d(s,{GET:()=>d,OPTIONS:()=>l});var o=t(2706),n=t(8203),a=t(5994),i=t(9187),u=t(5949),c=t(1804);async function d(){try{let e=process.env.D1_PROJECT_DIR;if(!e)return c.A.error("D1_PROJECT_DIR environment variable is not set"),i.NextResponse.json({error:"Project directory not configured"},{status:500});let r=await (0,u.S)(e);if(!r||!r.config)return i.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let t=r.config;if(!t.d1_databases?.length)return i.NextResponse.json({error:"No D1 databases configured in Wrangler configuration"},{status:404});return i.NextResponse.json({databases:t.d1_databases,debug:{projectDir:e,configPath:r.configPath||"N/A",databaseCount:t.d1_databases.length}})}catch(e){return c.A.error("Error reading database configuration:",e),i.NextResponse.json({error:"Failed to read database configuration",details:e.message,debug:{errorCode:e.code,errorStack:e.stack}},{status:500})}}async function l(){return new i.NextResponse(null,{status:204,headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, OPTIONS","Access-Control-Allow-Headers":"Content-Type"}})}let p=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/databases/route",pathname:"/api/databases",filename:"route",bundlePath:"app/api/databases/route"},resolvedPagePath:"/Users/kona/Desktop/d1studio/src/app/api/databases/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:g,workUnitAsyncStorage:f,serverHooks:x}=p;function h(){return(0,a.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:f})}},6487:()=>{},8335:()=>{},5949:(e,r,t)=>{"use strict";t.d(r,{S:()=>d});var s=t(9748),o=t(3149),n=t(2537),a=t(6789),i=t(1804);let u=null,c=null;async function d(e){try{let r;if(!e||"string"!=typeof e)throw Error("Project path is required and must be a string");if(u&&c===e)return u;let t=null,d=null;for(let r of["wrangler.toml","wrangler.json","wrangler.jsonc"])if(t=await (0,o.dJ)(r,{cwd:e})){d=r;break}if(!t)return i.A.warn(`No Wrangler configuration file found in: ${e}`),null;i.A.info(`Found ${d} at: ${t}`);let l=await (0,s.readFile)(t,"utf-8");return d.endsWith(".toml")?r=(0,n.parse)(l):(d.endsWith(".jsonc")&&(l=(0,a.A)(l)),r=JSON.parse(l)),u={config:r,projectPath:e},c=e,u}catch(e){throw i.A.error(`Error reading Wrangler configuration: ${e.message}`),e}}},1804:(e,r,t)=>{"use strict";t.d(r,{A:()=>l});var s=t(6399);let{combine:o,timestamp:n,printf:a,colorize:i}=s.format,u="true"===process.env.DEBUG,c=a(({level:e,message:r,timestamp:t,...s})=>{let o=`${t} ${e}: ${r}`;return Object.keys(s).length>0&&(o+=` ${JSON.stringify(s)}`),o}),d=s.createLogger({level:u?"debug":"warn",format:o(n({format:"YYYY-MM-DD HH:mm:ss"}),i(),c),transports:[new s.transports.Console({level:u?"debug":"warn",silent:!1})]});d.logRequest=(e,r,t={})=>{d.debug(`Request: ${e} ${r}`,t)},d.logError=(e,r="unknown")=>{d.error(`Error in ${r}: ${e.message}`,{error:e.stack||e.message,source:r})},d.shouldLog=e=>{let r=d.level,t={error:0,warn:1,info:2,debug:3};return t[e]<=t[r]};let l=d}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[638,452,391],()=>t(8945));module.exports=s})();
1
+ (()=>{var e={};e.id=952,e.ids=[952],e.modules={846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{"use strict";e.exports=require("buffer")},4735:e=>{"use strict";e.exports=require("events")},9021:e=>{"use strict";e.exports=require("fs")},9748:e=>{"use strict";e.exports=require("fs/promises")},1630:e=>{"use strict";e.exports=require("http")},5591:e=>{"use strict";e.exports=require("https")},1820:e=>{"use strict";e.exports=require("os")},3873:e=>{"use strict";e.exports=require("path")},7910:e=>{"use strict";e.exports=require("stream")},1204:e=>{"use strict";e.exports=require("string_decoder")},8354:e=>{"use strict";e.exports=require("util")},4075:e=>{"use strict";e.exports=require("zlib")},643:e=>{"use strict";e.exports=require("node:fs")},4379:e=>{"use strict";e.exports=require("node:path")},1708:e=>{"use strict";e.exports=require("node:process")},3136:e=>{"use strict";e.exports=require("node:url")},5650:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>h,routeModule:()=>p,serverHooks:()=>x,workAsyncStorage:()=>g,workUnitAsyncStorage:()=>f});var s={};t.r(s),t.d(s,{GET:()=>d,OPTIONS:()=>l});var o=t(2706),n=t(8203),a=t(5994),i=t(9187),u=t(5949),c=t(1804);async function d(){try{let e=process.env.D1_PROJECT_DIR;if(!e)return c.A.error("D1_PROJECT_DIR environment variable is not set"),i.NextResponse.json({error:"Project directory not configured"},{status:500});let r=await (0,u.S)(e);if(!r||!r.config)return i.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let t=r.config;if(!t.d1_databases?.length)return i.NextResponse.json({error:"No D1 databases configured in Wrangler configuration"},{status:404});return i.NextResponse.json({databases:t.d1_databases,debug:{projectDir:e,configPath:r.configPath||"N/A",databaseCount:t.d1_databases.length}})}catch(e){return c.A.error("Error reading database configuration:",e),i.NextResponse.json({error:"Failed to read database configuration",details:e.message,debug:{errorCode:e.code,errorStack:e.stack}},{status:500})}}async function l(){return new i.NextResponse(null,{status:204,headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, OPTIONS","Access-Control-Allow-Headers":"Content-Type"}})}let p=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/databases/route",pathname:"/api/databases",filename:"route",bundlePath:"app/api/databases/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/databases/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:g,workUnitAsyncStorage:f,serverHooks:x}=p;function h(){return(0,a.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:f})}},6487:()=>{},8335:()=>{},5949:(e,r,t)=>{"use strict";t.d(r,{S:()=>d});var s=t(9748),o=t(3149),n=t(2537),a=t(6789),i=t(1804);let u=null,c=null;async function d(e){try{let r;if(!e||"string"!=typeof e)throw Error("Project path is required and must be a string");if(u&&c===e)return u;let t=null,d=null;for(let r of["wrangler.toml","wrangler.json","wrangler.jsonc"])if(t=await (0,o.dJ)(r,{cwd:e})){d=r;break}if(!t)return i.A.warn(`No Wrangler configuration file found in: ${e}`),null;i.A.info(`Found ${d} at: ${t}`);let l=await (0,s.readFile)(t,"utf-8");return d.endsWith(".toml")?r=(0,n.parse)(l):(d.endsWith(".jsonc")&&(l=(0,a.A)(l)),r=JSON.parse(l)),u={config:r,projectPath:e},c=e,u}catch(e){throw i.A.error(`Error reading Wrangler configuration: ${e.message}`),e}}},1804:(e,r,t)=>{"use strict";t.d(r,{A:()=>l});var s=t(6399);let{combine:o,timestamp:n,printf:a,colorize:i}=s.format,u="true"===process.env.DEBUG,c=a(({level:e,message:r,timestamp:t,...s})=>{let o=`${t} ${e}: ${r}`;return Object.keys(s).length>0&&(o+=` ${JSON.stringify(s)}`),o}),d=s.createLogger({level:u?"debug":"warn",format:o(n({format:"YYYY-MM-DD HH:mm:ss"}),i(),c),transports:[new s.transports.Console({level:u?"debug":"warn",silent:!1})]});d.logRequest=(e,r,t={})=>{d.debug(`Request: ${e} ${r}`,t)},d.logError=(e,r="unknown")=>{d.error(`Error in ${r}: ${e.message}`,{error:e.stack||e.message,source:r})},d.shouldLog=e=>{let r=d.level,t={error:0,warn:1,info:2,debug:3};return t[e]<=t[r]};let l=d}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[638,452,391],()=>t(5650));module.exports=s})();
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/databases/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","name":"*","chunks":[],"async":false}},"2624":{"*":{"id":"4535","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-be6ee67cf0c92654.js"],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-be6ee67cf0c92654.js"],"async":false},"/Users/kona/Desktop/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-be6ee67cf0c92654.js"],"async":false},"/Users/kona/Desktop/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-be6ee67cf0c92654.js"],"async":false},"/Users/kona/Desktop/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-be6ee67cf0c92654.js"],"async":false},"/Users/kona/Desktop/d1studio/src/app/page.jsx":{"id":2624,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","576","static/chunks/576-c4daf274bb6469a1.js","735","static/chunks/735-b885dfec6353171d.js","974","static/chunks/app/page-36ed30b2266617f3.js"],"async":false}},"entryCSSFiles":{"/Users/kona/Desktop/d1studio/src/":[],"/Users/kona/Desktop/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/9f6c25c5400f83d3.css"}],"/Users/kona/Desktop/d1studio/src/app/page":[],"/Users/kona/Desktop/d1studio/src/app/api/databases/route":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","name":"*","chunks":[],"async":false}},"2624":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/databases/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","name":"*","chunks":[],"async":false}},"2624":{"*":{"id":"4535","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":2624,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","576","static/chunks/576-18a2209e1ed26aad.js","735","static/chunks/735-b885dfec6353171d.js","974","static/chunks/app/page-f2bc307c0d8acdaa.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/7c16f57d325d0d7d.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/databases/route":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","name":"*","chunks":[],"async":false}},"2624":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var e={};e.id=105,e.ids=[105],e.modules={846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{e.exports=require("buffer")},9646:e=>{e.exports=require("child_process")},4735:e=>{e.exports=require("events")},9021:e=>{e.exports=require("fs")},9748:e=>{e.exports=require("fs/promises")},1630:e=>{e.exports=require("http")},5591:e=>{e.exports=require("https")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},1204:e=>{e.exports=require("string_decoder")},8354:e=>{e.exports=require("util")},4075:e=>{e.exports=require("zlib")},3024:e=>{e.exports=require("node:fs")},6760:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},3136:e=>{e.exports=require("node:url")},1471:(e,t,r)=>{r.r(t),r.d(t,{patchFetch:()=>h,routeModule:()=>w,serverHooks:()=>A,workAsyncStorage:()=>f,workUnitAsyncStorage:()=>N});var a={};r.r(a),r.d(a,{OPTIONS:()=>R,POST:()=>g});var i=r(2706),o=r(8203),s=r(5994),n=r(9187),c=r(5949),l=r(9748),d=r(3873),p=r(3159),u=r(8354),m=r(9646),E=r(1804);let T=(0,u.promisify)(m.exec);async function g(e){E.A.logRequest("POST","/api/migrations/sync");try{let{accountId:t,apiToken:r}=await e.json(),a=process.env.D1_PROJECT_DIR;if(!a)return E.A.error("Project directory not configured"),n.NextResponse.json({error:"Project directory not configured"},{status:500});let i=await (0,c.S)(a);if(!i||!i.config)return n.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let o=i.config;if(!o.d1_databases?.length)return n.NextResponse.json({error:"No D1 databases configured"},{status:404});let s=o.d1_databases[0].database_name;await T(`wrangler d1 execute ${s} --remote --command="
1
+ "use strict";(()=>{var e={};e.id=105,e.ids=[105],e.modules={846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{e.exports=require("buffer")},9646:e=>{e.exports=require("child_process")},4735:e=>{e.exports=require("events")},9021:e=>{e.exports=require("fs")},9748:e=>{e.exports=require("fs/promises")},1630:e=>{e.exports=require("http")},5591:e=>{e.exports=require("https")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},1204:e=>{e.exports=require("string_decoder")},8354:e=>{e.exports=require("util")},4075:e=>{e.exports=require("zlib")},643:e=>{e.exports=require("node:fs")},4379:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},3136:e=>{e.exports=require("node:url")},2010:(e,t,r)=>{r.r(t),r.d(t,{patchFetch:()=>h,routeModule:()=>R,serverHooks:()=>A,workAsyncStorage:()=>f,workUnitAsyncStorage:()=>N});var a={};r.r(a),r.d(a,{OPTIONS:()=>w,POST:()=>g});var i=r(2706),o=r(8203),s=r(5994),n=r(9187),c=r(5949),l=r(9748),p=r(3873),d=r(3159),u=r(8354),m=r(9646),E=r(1804);let T=(0,u.promisify)(m.exec);async function g(e){E.A.logRequest("POST","/api/migrations/sync");try{let{accountId:t,apiToken:r}=await e.json(),a=process.env.D1_PROJECT_DIR;if(!a)return E.A.error("Project directory not configured"),n.NextResponse.json({error:"Project directory not configured"},{status:500});let i=await (0,c.S)(a);if(!i||!i.config)return n.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let o=i.config;if(!o.d1_databases?.length)return n.NextResponse.json({error:"No D1 databases configured"},{status:404});let s=o.d1_databases[0].database_name;await T(`wrangler d1 execute ${s} --remote --command="
2
2
  CREATE TABLE IF NOT EXISTS d1_migrations (
3
3
  id INTEGER PRIMARY KEY AUTOINCREMENT,
4
4
  name TEXT NOT NULL UNIQUE,
@@ -9,7 +9,7 @@
9
9
  name TEXT NOT NULL UNIQUE,
10
10
  checksum TEXT DEFAULT NULL,
11
11
  applied_at DATETIME DEFAULT CURRENT_TIMESTAMP
12
- );"`,{cwd:a});let u=await (0,p.hI)(a,s),m={applied:[],failed:[],skipped:[]};for(let e of u.pending)try{let i=d.join(a,"migrations",e.name),o=await (0,l.readFile)(i,"utf8"),n=await T(`wrangler d1 execute ${s} --remote --command='${o.replace(/'/g,"''")}'`,{env:{...n.env,CLOUDFLARE_ACCOUNT_ID:t,CLOUDFLARE_API_TOKEN:r},cwd:a});await (0,p.ai)(a,s,{name:e.name,environment:"remote",status:"applied",checksum:(0,p.Sl)(o),version:e.version}),m.applied.push(e.name)}catch(t){console.error(`Failed to apply migration ${e.name}:`,t),await (0,p.ai)(a,s,{name:e.name,environment:"remote",status:"failed",checksum:e.checksum,version:e.version,errorMessage:t.message}),m.failed.push({name:e.name,error:t.message})}for(let e of u.conflicts)m.skipped.push({name:e.name,reason:"Checksum mismatch between environments"});return n.NextResponse.json({success:!0,results:{...m,synced:u.synced}})}catch(e){return E.A.logError(e,"migrations-sync-route"),n.NextResponse.json({success:!1,error:{message:"Failed to sync migrations",details:e.message}},{status:500})}}async function R(){return new n.NextResponse(null,{status:204})}let w=new i.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/migrations/sync/route",pathname:"/api/migrations/sync",filename:"route",bundlePath:"app/api/migrations/sync/route"},resolvedPagePath:"/Users/kona/Desktop/d1studio/src/app/api/migrations/sync/route.js",nextConfigOutput:"",userland:a}),{workAsyncStorage:f,workUnitAsyncStorage:N,serverHooks:A}=w;function h(){return(0,s.patchFetch)({workAsyncStorage:f,workUnitAsyncStorage:N})}},3159:(e,t,r)=>{r.d(t,{hI:()=>w,Sl:()=>f,GS:()=>T,Gc:()=>N,k0:()=>u,CM:()=>R,ai:()=>g,JD:()=>E});var a=r(9748),i=r(8354),o=r(9646);let s=require("crypto");var n=r(3873),c=r(9421),l=r(4218),d=r(1804);let p=(0,i.promisify)(o.exec);async function u(e,t,r="local",a=!1){let i="remote"===r?"--remote":"--local",o="remote"===r?`
12
+ );"`,{cwd:a});let u=await (0,d.hI)(a,s),m={applied:[],failed:[],skipped:[]};for(let e of u.pending)try{let i=p.join(a,"migrations",e.name),o=await (0,l.readFile)(i,"utf8"),n=await T(`wrangler d1 execute ${s} --remote --command='${o.replace(/'/g,"''")}'`,{env:{...n.env,CLOUDFLARE_ACCOUNT_ID:t,CLOUDFLARE_API_TOKEN:r},cwd:a});await (0,d.ai)(a,s,{name:e.name,environment:"remote",status:"applied",checksum:(0,d.Sl)(o),version:e.version}),m.applied.push(e.name)}catch(t){console.error(`Failed to apply migration ${e.name}:`,t),await (0,d.ai)(a,s,{name:e.name,environment:"remote",status:"failed",checksum:e.checksum,version:e.version,errorMessage:t.message}),m.failed.push({name:e.name,error:t.message})}for(let e of u.conflicts)m.skipped.push({name:e.name,reason:"Checksum mismatch between environments"});return n.NextResponse.json({success:!0,results:{...m,synced:u.synced}})}catch(e){return E.A.logError(e,"migrations-sync-route"),n.NextResponse.json({success:!1,error:{message:"Failed to sync migrations",details:e.message}},{status:500})}}async function w(){return new n.NextResponse(null,{status:204})}let R=new i.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/migrations/sync/route",pathname:"/api/migrations/sync",filename:"route",bundlePath:"app/api/migrations/sync/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/migrations/sync/route.js",nextConfigOutput:"",userland:a}),{workAsyncStorage:f,workUnitAsyncStorage:N,serverHooks:A}=R;function h(){return(0,s.patchFetch)({workAsyncStorage:f,workUnitAsyncStorage:N})}},3159:(e,t,r)=>{r.d(t,{hI:()=>R,Sl:()=>f,GS:()=>T,Gc:()=>N,k0:()=>u,CM:()=>w,ai:()=>g,JD:()=>E});var a=r(9748),i=r(8354),o=r(9646);let s=require("crypto");var n=r(3873),c=r(9421),l=r(4218),p=r(1804);let d=(0,i.promisify)(o.exec);async function u(e,t,r="local",a=!1){let i="remote"===r?"--remote":"--local",o="remote"===r?`
13
13
  CREATE TABLE IF NOT EXISTS d1_migrations (
14
14
  id INTEGER PRIMARY KEY AUTOINCREMENT,
15
15
  name TEXT NOT NULL UNIQUE,
@@ -22,16 +22,16 @@
22
22
  checksum TEXT NULL,
23
23
  applied_at DATETIME DEFAULT CURRENT_TIMESTAMP
24
24
  );
25
- `;try{await p(`wrangler d1 execute ${t} ${i} --command="${o.replace(/"/g,'\\"')}"`,{cwd:e}),a&&await p(`wrangler d1 execute ${t} ${i} --command="${"DELETE FROM d1_migrations;".replace(/"/g,'\\"')}"`,{cwd:e})}catch(e){throw d.A.error(`Failed to initialize migrations table in ${r}:`,e),e}}function m(e){let t=new Date().toISOString().replace(/[^0-9]/g,"").slice(0,-3),r=e.type.toLowerCase().replace(/_/g,"-");if("CREATE_INDEX"===e.type){let r=e.description.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-_]/g,"");return`${t}_create-index_${r}.sql`}{let a=`${t}_${{"create-table":"create-table","alter-table":"alter-table","drop-table":"drop-table","drop-index":"drop-index","create-view":"create-view","drop-view":"drop-view","add-foreign-key":"add-foreign-key","drop-foreign-key":"drop-foreign-key","add-constraint":"add-constraint","drop-constraint":"drop-constraint"}[r]||r}_${e.tableName}`;return"ALTER_TABLE"===e.type&&e.description&&(a+=`_${e.description}`),(a=a.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-_]/g,""))+".sql"}}async function E(e){let t=await (0,a.readFile)(e,"utf8");try{let e=(0,c.By)(t);return(0,c.Gq)(e),{isValid:!0,statement:e}}catch(e){return{isValid:!1,errors:e}}}async function T(e,t,r){try{let a=await (0,c.KK)(e,t,"SELECT name, applied_at FROM d1_migrations ORDER BY applied_at;",r,!0);if("string"==typeof a){let e=a.indexOf("[");if(-1!==e){let t=a.substring(e),r=JSON.parse(t);return r[0]?.results||[]}}return[]}catch(e){throw{type:c.wU.EXECUTION_ERROR,message:"Failed to get remote migrations",details:{error:e.message,suggestions:["Check remote database permissions","Verify credentials and connection"]}}}}async function g(e,t,{name:r,checksum:a},i="local"){let o="remote"===i?"--remote":"--local";if("local"===i&&a)try{await p(`wrangler d1 execute ${t} ${o} --command="SELECT checksum FROM d1_migrations LIMIT 1;"`,{cwd:e}).catch(()=>!1)||await p(`wrangler d1 execute ${t} ${o} --command="ALTER TABLE d1_migrations ADD COLUMN checksum TEXT;"`,{cwd:e})}catch(e){}let s="remote"!==i&&a?`
25
+ `;try{await d(`wrangler d1 execute ${t} ${i} --command="${o.replace(/"/g,'\\"')}"`,{cwd:e}),a&&await d(`wrangler d1 execute ${t} ${i} --command="${"DELETE FROM d1_migrations;".replace(/"/g,'\\"')}"`,{cwd:e})}catch(e){throw p.A.error(`Failed to initialize migrations table in ${r}:`,e),e}}function m(e){let t=new Date().toISOString().replace(/[^0-9]/g,"").slice(0,-3),r=e.type.toLowerCase().replace(/_/g,"-");if("CREATE_INDEX"===e.type){let r=e.description.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-_]/g,"");return`${t}_create-index_${r}.sql`}{let a=`${t}_${{"create-table":"create-table","alter-table":"alter-table","drop-table":"drop-table","drop-index":"drop-index","create-view":"create-view","drop-view":"drop-view","add-foreign-key":"add-foreign-key","drop-foreign-key":"drop-foreign-key","add-constraint":"add-constraint","drop-constraint":"drop-constraint"}[r]||r}_${e.tableName}`;return"ALTER_TABLE"===e.type&&e.description&&(a+=`_${e.description}`),(a=a.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-_]/g,""))+".sql"}}async function E(e){let t=await (0,a.readFile)(e,"utf8");try{let e=(0,c.By)(t);return(0,c.Gq)(e),{isValid:!0,statement:e}}catch(e){return{isValid:!1,errors:e}}}async function T(e,t,r){try{let a=await (0,c.KK)(e,t,"SELECT name, applied_at FROM d1_migrations ORDER BY applied_at;",r,!0);if("string"==typeof a){let e=a.indexOf("[");if(-1!==e){let t=a.substring(e),r=JSON.parse(t);return r[0]?.results||[]}}return[]}catch(e){throw{type:c.wU.EXECUTION_ERROR,message:"Failed to get remote migrations",details:{error:e.message,suggestions:["Check remote database permissions","Verify credentials and connection"]}}}}async function g(e,t,{name:r,checksum:a},i="local"){let o="remote"===i?"--remote":"--local";if("local"===i&&a)try{await d(`wrangler d1 execute ${t} ${o} --command="SELECT checksum FROM d1_migrations LIMIT 1;"`,{cwd:e}).catch(()=>!1)||await d(`wrangler d1 execute ${t} ${o} --command="ALTER TABLE d1_migrations ADD COLUMN checksum TEXT;"`,{cwd:e})}catch(e){}let s="remote"!==i&&a?`
26
26
  INSERT OR REPLACE INTO d1_migrations (name, checksum, applied_at)
27
27
  VALUES ('${r}', '${a}', CURRENT_TIMESTAMP);
28
28
  `:`
29
29
  INSERT OR REPLACE INTO d1_migrations (name, applied_at)
30
30
  VALUES ('${r}', CURRENT_TIMESTAMP);
31
- `;try{await p(`wrangler d1 execute ${t} ${o} --command="${s.replace(/"/g,'\\"')}"`,{cwd:e})}catch(e){throw d.A.error("Failed to track migration:",e),e}}async function R(e,t,{name:r,checksum:a},i={},o=!1){let s=o||!a?`
31
+ `;try{await d(`wrangler d1 execute ${t} ${o} --command="${s.replace(/"/g,'\\"')}"`,{cwd:e})}catch(e){throw p.A.error("Failed to track migration:",e),e}}async function w(e,t,{name:r,checksum:a},i={},o=!1){let s=o||!a?`
32
32
  INSERT OR REPLACE INTO d1_migrations (name, applied_at)
33
33
  VALUES ('${r}', CURRENT_TIMESTAMP);
34
34
  `:`
35
35
  INSERT OR REPLACE INTO d1_migrations (name, checksum, applied_at)
36
36
  VALUES ('${r}', '${a}', CURRENT_TIMESTAMP);
37
- `;try{await (0,c.KK)(e,t,s,i,o)}catch(e){throw{type:c.wU.EXECUTION_ERROR,message:`Failed to record migration ${r}`,details:{file:r,error:e.message,suggestions:["Check if migration is already recorded"]}}}}async function w(e,t){try{let r=await T(e,t,{}),a=new Map(r.map(e=>[e.name,e]));return{applied:Array.from(a.keys()),count:a.size}}catch(e){throw d.A.error("Failed to compare migrations:",e),e}}function f(e){return(0,s.createHash)("sha256").update(e).digest("hex")}async function N(e,t,r){try{let i=n.join(e,"migrations");await (0,a.mkdir)(i,{recursive:!0});let o=[],s=[],d=[];for(let e of r)e.type===c.Pg.DATA_MODIFICATION?d.push(e):s.push(e);let p=new Map,u="__no_table__";for(let e of s){let t=e.tableName?e.tableName.toLowerCase():u;p.has(t)||p.set(t,[]),p.get(t).push(e)}let E=[...p.keys()].filter(e=>e!==u),T=[];if(E.length>0){let e=E.map(e=>p.get(e)[0]);T=(0,l.IC)(e)}for(let r of T){for(let s of p.get(r)||[])try{if(s.type===c.Pg.DROP_TABLE&&!await (0,c.F9)(e,t,{},s.tableName,!1))throw Error(`no such table: ${s.tableName}`);let r=await (0,c.KK)(e,t,s.sql);if(r&&(r.toLowerCase().includes("syntax error")||r.toLowerCase().includes("sqlite_error")))throw Error(r);let l=m(s),d=n.join(i,l),p=(0,c.tn)(s.sql);await (0,a.writeFile)(d,p,"utf8");let u=f(s.sql);await g(e,t,{name:l,checksum:u},"local"),o.push({type:s.type,table:s.tableName,migration:l,checksum:u})}catch(e){throw e}p.delete(r)}if(p.has(u))for(let r of p.get(u))try{await (0,c.KK)(e,t,r.sql);let s=m(r),l=n.join(i,s),d=(0,c.tn)(r.sql);await (0,a.writeFile)(l,d,"utf8");let p=f(r.sql);await g(e,t,{name:s,checksum:p},"local"),o.push({type:r.type,table:r.tableName||null,migration:s,checksum:p})}catch(e){throw e}for(let r of d)try{await (0,c.KK)(e,t,r.sql),o.push({type:r.type,table:r.tableName||null,executed:!0})}catch(e){throw e}return o}catch(e){throw e}}}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[638,452,391,226],()=>r(1471));module.exports=a})();
37
+ `;try{await (0,c.KK)(e,t,s,i,o)}catch(e){throw{type:c.wU.EXECUTION_ERROR,message:`Failed to record migration ${r}`,details:{file:r,error:e.message,suggestions:["Check if migration is already recorded"]}}}}async function R(e,t){try{let r=await T(e,t,{}),a=new Map(r.map(e=>[e.name,e]));return{applied:Array.from(a.keys()),count:a.size}}catch(e){throw p.A.error("Failed to compare migrations:",e),e}}function f(e){return(0,s.createHash)("sha256").update(e).digest("hex")}async function N(e,t,r){try{let i=n.join(e,"migrations");await (0,a.mkdir)(i,{recursive:!0});let o=[],s=[],p=[];for(let e of r)e.type===c.Pg.DATA_MODIFICATION?p.push(e):s.push(e);let d=new Map,u="__no_table__";for(let e of s){let t=e.tableName?e.tableName.toLowerCase():u;d.has(t)||d.set(t,[]),d.get(t).push(e)}let E=[...d.keys()].filter(e=>e!==u),T=[];if(E.length>0){let e=E.map(e=>d.get(e)[0]);T=(0,l.IC)(e)}for(let r of T){for(let s of d.get(r)||[])try{if(s.type===c.Pg.DROP_TABLE&&!await (0,c.F9)(e,t,{},s.tableName,!1))throw Error(`no such table: ${s.tableName}`);let r=await (0,c.KK)(e,t,s.sql);if(r&&(r.toLowerCase().includes("syntax error")||r.toLowerCase().includes("sqlite_error")))throw Error(r);let l=m(s),p=n.join(i,l),d=(0,c.tn)(s.sql);await (0,a.writeFile)(p,d,"utf8");let u=f(s.sql);await g(e,t,{name:l,checksum:u},"local"),o.push({type:s.type,table:s.tableName,migration:l,checksum:u})}catch(e){throw e}d.delete(r)}if(d.has(u))for(let r of d.get(u))try{await (0,c.KK)(e,t,r.sql);let s=m(r),l=n.join(i,s),p=(0,c.tn)(r.sql);await (0,a.writeFile)(l,p,"utf8");let d=f(r.sql);await g(e,t,{name:s,checksum:d},"local"),o.push({type:r.type,table:r.tableName||null,migration:s,checksum:d})}catch(e){throw e}for(let r of p)try{await (0,c.KK)(e,t,r.sql),o.push({type:r.type,table:r.tableName||null,executed:!0})}catch(e){throw e}return o}catch(e){throw e}}}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[638,452,391,226],()=>r(2010));module.exports=a})();
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/migrations/sync/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","name":"*","chunks":[],"async":false}},"2624":{"*":{"id":"4535","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-be6ee67cf0c92654.js"],"async":false},"/Users/kona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-be6ee67cf0c92654.js"],"async":false},"/Users/kona/Desktop/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-be6ee67cf0c92654.js"],"async":false},"/Users/kona/Desktop/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-be6ee67cf0c92654.js"],"async":false},"/Users/kona/Desktop/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-be6ee67cf0c92654.js"],"async":false},"/Users/kona/Desktop/d1studio/src/app/page.jsx":{"id":2624,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","576","static/chunks/576-c4daf274bb6469a1.js","735","static/chunks/735-b885dfec6353171d.js","974","static/chunks/app/page-36ed30b2266617f3.js"],"async":false}},"entryCSSFiles":{"/Users/kona/Desktop/d1studio/src/":[],"/Users/kona/Desktop/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/9f6c25c5400f83d3.css"}],"/Users/kona/Desktop/d1studio/src/app/page":[],"/Users/kona/Desktop/d1studio/src/app/api/migrations/sync/route":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","name":"*","chunks":[],"async":false}},"2624":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/migrations/sync/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","name":"*","chunks":[],"async":false}},"2624":{"*":{"id":"4535","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":2624,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","576","static/chunks/576-18a2209e1ed26aad.js","735","static/chunks/735-b885dfec6353171d.js","974","static/chunks/app/page-f2bc307c0d8acdaa.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/7c16f57d325d0d7d.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/migrations/sync/route":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","name":"*","chunks":[],"async":false}},"2624":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var e={};e.id=51,e.ids=[51],e.modules={846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{e.exports=require("buffer")},9646:e=>{e.exports=require("child_process")},4735:e=>{e.exports=require("events")},9021:e=>{e.exports=require("fs")},9748:e=>{e.exports=require("fs/promises")},1630:e=>{e.exports=require("http")},5591:e=>{e.exports=require("https")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},1204:e=>{e.exports=require("string_decoder")},8354:e=>{e.exports=require("util")},4075:e=>{e.exports=require("zlib")},3024:e=>{e.exports=require("node:fs")},6760:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},3136:e=>{e.exports=require("node:url")},2240:(e,t,r)=>{r.r(t),r.d(t,{patchFetch:()=>_,routeModule:()=>y,serverHooks:()=>N,workAsyncStorage:()=>R,workUnitAsyncStorage:()=>x});var a={};r.r(a),r.d(a,{OPTIONS:()=>T,POST:()=>h});var o=r(2706),i=r(8203),s=r(5994),n=r(9187),l=r(5949),c=r(9748),d=r(3873),p=r(8354),u=r(9646),m=r(3159);let E=(0,p.promisify)(u.exec);async function g(e,t){try{let{stdout:r}=await E(`wrangler d1 execute ${t} --local --command="SELECT name, checksum FROM d1_migrations;" --json`,{cwd:e}),a=JSON.parse(r);return a.results?.[0]?.results||[]}catch(e){throw console.error("Error getting database migrations:",e),Error("Failed to get database migrations")}}async function f(e){try{let t=d.join(e,"migrations"),r=await (0,c.readdir)(t);return(await Promise.all(r.filter(e=>e.endsWith(".sql")).map(async e=>{let r=d.join(t,e),a=await (0,c.readFile)(r,"utf8");return{name:e,path:r,content:a,checksum:(0,m.Sl)(a)}}))).sort((e,t)=>e.name.localeCompare(t.name))}catch(e){if("ENOENT"===e.code)return[];throw Error("Failed to read migration files")}}async function w(e,t,r){try{return await E(`wrangler d1 execute ${t} --local --command="${r.replace(/"/g,'\\"')}"`,{cwd:e}),!0}catch(e){throw console.error("Query execution error:",e),Error("Failed to execute database query")}}async function h(e){try{let e=process.env.D1_PROJECT_DIR;if(!e)return n.NextResponse.json({error:"Project directory not configured"},{status:500});let t=await (0,l.S)(e);if(!t||!t.config)return n.NextResponse.json({error:"Could not find Wrangler configuration"},{status:404});let r=t.config;if(!r.d1_databases?.length)return n.NextResponse.json({error:"No D1 databases configured"},{status:404});let a=r.d1_databases[0].database_name,[o,i]=await Promise.all([g(e,a),f(e)]),s=new Map(o.map(e=>[e.name,e])),c=new Map(i.map(e=>[e.name,e])),d={added:[],removed:[],unchanged:[]};for(let[e]of s)c.has(e)||d.removed.push(e);if(d.removed.length>0){let t=d.removed.map(e=>`'${e}'`).join(",");await w(e,a,`DELETE FROM d1_migrations WHERE name IN (${t});`)}for(let[t,r]of c)s.get(t)?d.unchanged.push(t):(d.added.push(t),await w(e,a,`INSERT OR REPLACE INTO d1_migrations (name, checksum) VALUES ('${t}', '${r.checksum}');`));return n.NextResponse.json({success:!0,details:{added:d.added,removed:d.removed,unchanged:d.unchanged}})}catch(e){return console.error("Migration file sync error:",e),n.NextResponse.json({error:e.message||"Failed to sync migrations"},{status:500})}}async function T(){return new n.NextResponse(null,{status:204})}let y=new o.AppRouteRouteModule({definition:{kind:i.RouteKind.APP_ROUTE,page:"/api/migrations/sync-files/route",pathname:"/api/migrations/sync-files",filename:"route",bundlePath:"app/api/migrations/sync-files/route"},resolvedPagePath:"/Users/kona/Desktop/d1studio/src/app/api/migrations/sync-files/route.js",nextConfigOutput:"",userland:a}),{workAsyncStorage:R,workUnitAsyncStorage:x,serverHooks:N}=y;function _(){return(0,s.patchFetch)({workAsyncStorage:R,workUnitAsyncStorage:x})}},3159:(e,t,r)=>{r.d(t,{hI:()=>h,Sl:()=>T,GS:()=>g,Gc:()=>y,k0:()=>u,CM:()=>w,ai:()=>f,JD:()=>E});var a=r(9748),o=r(8354),i=r(9646);let s=require("crypto");var n=r(3873),l=r(9421),c=r(4218),d=r(1804);let p=(0,o.promisify)(i.exec);async function u(e,t,r="local",a=!1){let o="remote"===r?"--remote":"--local",i="remote"===r?`
1
+ "use strict";(()=>{var e={};e.id=51,e.ids=[51],e.modules={846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{e.exports=require("buffer")},9646:e=>{e.exports=require("child_process")},4735:e=>{e.exports=require("events")},9021:e=>{e.exports=require("fs")},9748:e=>{e.exports=require("fs/promises")},1630:e=>{e.exports=require("http")},5591:e=>{e.exports=require("https")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},1204:e=>{e.exports=require("string_decoder")},8354:e=>{e.exports=require("util")},4075:e=>{e.exports=require("zlib")},643:e=>{e.exports=require("node:fs")},4379:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},3136:e=>{e.exports=require("node:url")},4763:(e,t,r)=>{r.r(t),r.d(t,{patchFetch:()=>_,routeModule:()=>y,serverHooks:()=>N,workAsyncStorage:()=>R,workUnitAsyncStorage:()=>x});var a={};r.r(a),r.d(a,{OPTIONS:()=>T,POST:()=>h});var o=r(2706),i=r(8203),s=r(5994),n=r(9187),c=r(5949),l=r(9748),d=r(3873),p=r(8354),u=r(9646),m=r(3159);let E=(0,p.promisify)(u.exec);async function g(e,t){try{let{stdout:r}=await E(`wrangler d1 execute ${t} --local --command="SELECT name, checksum FROM d1_migrations;" --json`,{cwd:e}),a=JSON.parse(r);return a.results?.[0]?.results||[]}catch(e){throw console.error("Error getting database migrations:",e),Error("Failed to get database migrations")}}async function f(e){try{let t=d.join(e,"migrations"),r=await (0,l.readdir)(t);return(await Promise.all(r.filter(e=>e.endsWith(".sql")).map(async e=>{let r=d.join(t,e),a=await (0,l.readFile)(r,"utf8");return{name:e,path:r,content:a,checksum:(0,m.Sl)(a)}}))).sort((e,t)=>e.name.localeCompare(t.name))}catch(e){if("ENOENT"===e.code)return[];throw Error("Failed to read migration files")}}async function w(e,t,r){try{return await E(`wrangler d1 execute ${t} --local --command="${r.replace(/"/g,'\\"')}"`,{cwd:e}),!0}catch(e){throw console.error("Query execution error:",e),Error("Failed to execute database query")}}async function h(e){try{let e=process.env.D1_PROJECT_DIR;if(!e)return n.NextResponse.json({error:"Project directory not configured"},{status:500});let t=await (0,c.S)(e);if(!t||!t.config)return n.NextResponse.json({error:"Could not find Wrangler configuration"},{status:404});let r=t.config;if(!r.d1_databases?.length)return n.NextResponse.json({error:"No D1 databases configured"},{status:404});let a=r.d1_databases[0].database_name,[o,i]=await Promise.all([g(e,a),f(e)]),s=new Map(o.map(e=>[e.name,e])),l=new Map(i.map(e=>[e.name,e])),d={added:[],removed:[],unchanged:[]};for(let[e]of s)l.has(e)||d.removed.push(e);if(d.removed.length>0){let t=d.removed.map(e=>`'${e}'`).join(",");await w(e,a,`DELETE FROM d1_migrations WHERE name IN (${t});`)}for(let[t,r]of l)s.get(t)?d.unchanged.push(t):(d.added.push(t),await w(e,a,`INSERT OR REPLACE INTO d1_migrations (name, checksum) VALUES ('${t}', '${r.checksum}');`));return n.NextResponse.json({success:!0,details:{added:d.added,removed:d.removed,unchanged:d.unchanged}})}catch(e){return console.error("Migration file sync error:",e),n.NextResponse.json({error:e.message||"Failed to sync migrations"},{status:500})}}async function T(){return new n.NextResponse(null,{status:204})}let y=new o.AppRouteRouteModule({definition:{kind:i.RouteKind.APP_ROUTE,page:"/api/migrations/sync-files/route",pathname:"/api/migrations/sync-files",filename:"route",bundlePath:"app/api/migrations/sync-files/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/migrations/sync-files/route.js",nextConfigOutput:"",userland:a}),{workAsyncStorage:R,workUnitAsyncStorage:x,serverHooks:N}=y;function _(){return(0,s.patchFetch)({workAsyncStorage:R,workUnitAsyncStorage:x})}},3159:(e,t,r)=>{r.d(t,{hI:()=>h,Sl:()=>T,GS:()=>g,Gc:()=>y,k0:()=>u,CM:()=>w,ai:()=>f,JD:()=>E});var a=r(9748),o=r(8354),i=r(9646);let s=require("crypto");var n=r(3873),c=r(9421),l=r(4218),d=r(1804);let p=(0,o.promisify)(i.exec);async function u(e,t,r="local",a=!1){let o="remote"===r?"--remote":"--local",i="remote"===r?`
2
2
  CREATE TABLE IF NOT EXISTS d1_migrations (
3
3
  id INTEGER PRIMARY KEY AUTOINCREMENT,
4
4
  name TEXT NOT NULL UNIQUE,
@@ -11,7 +11,7 @@
11
11
  checksum TEXT NULL,
12
12
  applied_at DATETIME DEFAULT CURRENT_TIMESTAMP
13
13
  );
14
- `;try{await p(`wrangler d1 execute ${t} ${o} --command="${i.replace(/"/g,'\\"')}"`,{cwd:e}),a&&await p(`wrangler d1 execute ${t} ${o} --command="${"DELETE FROM d1_migrations;".replace(/"/g,'\\"')}"`,{cwd:e})}catch(e){throw d.A.error(`Failed to initialize migrations table in ${r}:`,e),e}}function m(e){let t=new Date().toISOString().replace(/[^0-9]/g,"").slice(0,-3),r=e.type.toLowerCase().replace(/_/g,"-");if("CREATE_INDEX"===e.type){let r=e.description.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-_]/g,"");return`${t}_create-index_${r}.sql`}{let a=`${t}_${{"create-table":"create-table","alter-table":"alter-table","drop-table":"drop-table","drop-index":"drop-index","create-view":"create-view","drop-view":"drop-view","add-foreign-key":"add-foreign-key","drop-foreign-key":"drop-foreign-key","add-constraint":"add-constraint","drop-constraint":"drop-constraint"}[r]||r}_${e.tableName}`;return"ALTER_TABLE"===e.type&&e.description&&(a+=`_${e.description}`),(a=a.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-_]/g,""))+".sql"}}async function E(e){let t=await (0,a.readFile)(e,"utf8");try{let e=(0,l.By)(t);return(0,l.Gq)(e),{isValid:!0,statement:e}}catch(e){return{isValid:!1,errors:e}}}async function g(e,t,r){try{let a=await (0,l.KK)(e,t,"SELECT name, applied_at FROM d1_migrations ORDER BY applied_at;",r,!0);if("string"==typeof a){let e=a.indexOf("[");if(-1!==e){let t=a.substring(e),r=JSON.parse(t);return r[0]?.results||[]}}return[]}catch(e){throw{type:l.wU.EXECUTION_ERROR,message:"Failed to get remote migrations",details:{error:e.message,suggestions:["Check remote database permissions","Verify credentials and connection"]}}}}async function f(e,t,{name:r,checksum:a},o="local"){let i="remote"===o?"--remote":"--local";if("local"===o&&a)try{await p(`wrangler d1 execute ${t} ${i} --command="SELECT checksum FROM d1_migrations LIMIT 1;"`,{cwd:e}).catch(()=>!1)||await p(`wrangler d1 execute ${t} ${i} --command="ALTER TABLE d1_migrations ADD COLUMN checksum TEXT;"`,{cwd:e})}catch(e){}let s="remote"!==o&&a?`
14
+ `;try{await p(`wrangler d1 execute ${t} ${o} --command="${i.replace(/"/g,'\\"')}"`,{cwd:e}),a&&await p(`wrangler d1 execute ${t} ${o} --command="${"DELETE FROM d1_migrations;".replace(/"/g,'\\"')}"`,{cwd:e})}catch(e){throw d.A.error(`Failed to initialize migrations table in ${r}:`,e),e}}function m(e){let t=new Date().toISOString().replace(/[^0-9]/g,"").slice(0,-3),r=e.type.toLowerCase().replace(/_/g,"-");if("CREATE_INDEX"===e.type){let r=e.description.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-_]/g,"");return`${t}_create-index_${r}.sql`}{let a=`${t}_${{"create-table":"create-table","alter-table":"alter-table","drop-table":"drop-table","drop-index":"drop-index","create-view":"create-view","drop-view":"drop-view","add-foreign-key":"add-foreign-key","drop-foreign-key":"drop-foreign-key","add-constraint":"add-constraint","drop-constraint":"drop-constraint"}[r]||r}_${e.tableName}`;return"ALTER_TABLE"===e.type&&e.description&&(a+=`_${e.description}`),(a=a.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-_]/g,""))+".sql"}}async function E(e){let t=await (0,a.readFile)(e,"utf8");try{let e=(0,c.By)(t);return(0,c.Gq)(e),{isValid:!0,statement:e}}catch(e){return{isValid:!1,errors:e}}}async function g(e,t,r){try{let a=await (0,c.KK)(e,t,"SELECT name, applied_at FROM d1_migrations ORDER BY applied_at;",r,!0);if("string"==typeof a){let e=a.indexOf("[");if(-1!==e){let t=a.substring(e),r=JSON.parse(t);return r[0]?.results||[]}}return[]}catch(e){throw{type:c.wU.EXECUTION_ERROR,message:"Failed to get remote migrations",details:{error:e.message,suggestions:["Check remote database permissions","Verify credentials and connection"]}}}}async function f(e,t,{name:r,checksum:a},o="local"){let i="remote"===o?"--remote":"--local";if("local"===o&&a)try{await p(`wrangler d1 execute ${t} ${i} --command="SELECT checksum FROM d1_migrations LIMIT 1;"`,{cwd:e}).catch(()=>!1)||await p(`wrangler d1 execute ${t} ${i} --command="ALTER TABLE d1_migrations ADD COLUMN checksum TEXT;"`,{cwd:e})}catch(e){}let s="remote"!==o&&a?`
15
15
  INSERT OR REPLACE INTO d1_migrations (name, checksum, applied_at)
16
16
  VALUES ('${r}', '${a}', CURRENT_TIMESTAMP);
17
17
  `:`
@@ -23,4 +23,4 @@
23
23
  `:`
24
24
  INSERT OR REPLACE INTO d1_migrations (name, checksum, applied_at)
25
25
  VALUES ('${r}', '${a}', CURRENT_TIMESTAMP);
26
- `;try{await (0,l.KK)(e,t,s,o,i)}catch(e){throw{type:l.wU.EXECUTION_ERROR,message:`Failed to record migration ${r}`,details:{file:r,error:e.message,suggestions:["Check if migration is already recorded"]}}}}async function h(e,t){try{let r=await g(e,t,{}),a=new Map(r.map(e=>[e.name,e]));return{applied:Array.from(a.keys()),count:a.size}}catch(e){throw d.A.error("Failed to compare migrations:",e),e}}function T(e){return(0,s.createHash)("sha256").update(e).digest("hex")}async function y(e,t,r){try{let o=n.join(e,"migrations");await (0,a.mkdir)(o,{recursive:!0});let i=[],s=[],d=[];for(let e of r)e.type===l.Pg.DATA_MODIFICATION?d.push(e):s.push(e);let p=new Map,u="__no_table__";for(let e of s){let t=e.tableName?e.tableName.toLowerCase():u;p.has(t)||p.set(t,[]),p.get(t).push(e)}let E=[...p.keys()].filter(e=>e!==u),g=[];if(E.length>0){let e=E.map(e=>p.get(e)[0]);g=(0,c.IC)(e)}for(let r of g){for(let s of p.get(r)||[])try{if(s.type===l.Pg.DROP_TABLE&&!await (0,l.F9)(e,t,{},s.tableName,!1))throw Error(`no such table: ${s.tableName}`);let r=await (0,l.KK)(e,t,s.sql);if(r&&(r.toLowerCase().includes("syntax error")||r.toLowerCase().includes("sqlite_error")))throw Error(r);let c=m(s),d=n.join(o,c),p=(0,l.tn)(s.sql);await (0,a.writeFile)(d,p,"utf8");let u=T(s.sql);await f(e,t,{name:c,checksum:u},"local"),i.push({type:s.type,table:s.tableName,migration:c,checksum:u})}catch(e){throw e}p.delete(r)}if(p.has(u))for(let r of p.get(u))try{await (0,l.KK)(e,t,r.sql);let s=m(r),c=n.join(o,s),d=(0,l.tn)(r.sql);await (0,a.writeFile)(c,d,"utf8");let p=T(r.sql);await f(e,t,{name:s,checksum:p},"local"),i.push({type:r.type,table:r.tableName||null,migration:s,checksum:p})}catch(e){throw e}for(let r of d)try{await (0,l.KK)(e,t,r.sql),i.push({type:r.type,table:r.tableName||null,executed:!0})}catch(e){throw e}return i}catch(e){throw e}}}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[638,452,391,226],()=>r(2240));module.exports=a})();
26
+ `;try{await (0,c.KK)(e,t,s,o,i)}catch(e){throw{type:c.wU.EXECUTION_ERROR,message:`Failed to record migration ${r}`,details:{file:r,error:e.message,suggestions:["Check if migration is already recorded"]}}}}async function h(e,t){try{let r=await g(e,t,{}),a=new Map(r.map(e=>[e.name,e]));return{applied:Array.from(a.keys()),count:a.size}}catch(e){throw d.A.error("Failed to compare migrations:",e),e}}function T(e){return(0,s.createHash)("sha256").update(e).digest("hex")}async function y(e,t,r){try{let o=n.join(e,"migrations");await (0,a.mkdir)(o,{recursive:!0});let i=[],s=[],d=[];for(let e of r)e.type===c.Pg.DATA_MODIFICATION?d.push(e):s.push(e);let p=new Map,u="__no_table__";for(let e of s){let t=e.tableName?e.tableName.toLowerCase():u;p.has(t)||p.set(t,[]),p.get(t).push(e)}let E=[...p.keys()].filter(e=>e!==u),g=[];if(E.length>0){let e=E.map(e=>p.get(e)[0]);g=(0,l.IC)(e)}for(let r of g){for(let s of p.get(r)||[])try{if(s.type===c.Pg.DROP_TABLE&&!await (0,c.F9)(e,t,{},s.tableName,!1))throw Error(`no such table: ${s.tableName}`);let r=await (0,c.KK)(e,t,s.sql);if(r&&(r.toLowerCase().includes("syntax error")||r.toLowerCase().includes("sqlite_error")))throw Error(r);let l=m(s),d=n.join(o,l),p=(0,c.tn)(s.sql);await (0,a.writeFile)(d,p,"utf8");let u=T(s.sql);await f(e,t,{name:l,checksum:u},"local"),i.push({type:s.type,table:s.tableName,migration:l,checksum:u})}catch(e){throw e}p.delete(r)}if(p.has(u))for(let r of p.get(u))try{await (0,c.KK)(e,t,r.sql);let s=m(r),l=n.join(o,s),d=(0,c.tn)(r.sql);await (0,a.writeFile)(l,d,"utf8");let p=T(r.sql);await f(e,t,{name:s,checksum:p},"local"),i.push({type:r.type,table:r.tableName||null,migration:s,checksum:p})}catch(e){throw e}for(let r of d)try{await (0,c.KK)(e,t,r.sql),i.push({type:r.type,table:r.tableName||null,executed:!0})}catch(e){throw e}return i}catch(e){throw e}}}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[638,452,391,226],()=>r(4763));module.exports=a})();