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,4 +1,4 @@
1
- "use strict";(()=>{var e={};e.id=868,e.ids=[868],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")},1925:(e,t,r)=>{r.r(t),r.d(t,{patchFetch:()=>f,routeModule:()=>g,serverHooks:()=>N,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>h});var a={};r.r(a),r.d(a,{OPTIONS:()=>R,POST:()=>m});var s=r(2706),i=r(8203),o=r(5994),n=r(9187),p=r(9748),l=r(3873),c=r(5949),d=r(9421),u=r(3159),E=r(1804);async function T(e,t,r,a,s=!0){let i={...process.env,CLOUDFLARE_ACCOUNT_ID:t,CLOUDFLARE_API_TOKEN:r};try{let t=`
1
+ "use strict";(()=>{var e={};e.id=868,e.ids=[868],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")},1704:(e,t,r)=>{r.r(t),r.d(t,{patchFetch:()=>f,routeModule:()=>g,serverHooks:()=>N,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>h});var a={};r.r(a),r.d(a,{OPTIONS:()=>R,POST:()=>T});var s=r(2706),i=r(8203),o=r(5994),n=r(9187),p=r(9748),l=r(3873),c=r(5949),d=r(9421),u=r(3159),E=r(1804);async function m(e,t,r,a,s=!0){let i={...process.env,CLOUDFLARE_ACCOUNT_ID:t,CLOUDFLARE_API_TOKEN:r};try{let t=`
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
  name TEXT NOT NULL UNIQUE,
12
12
  applied_at DATETIME DEFAULT CURRENT_TIMESTAMP
13
13
  );
14
- `;await (0,d.KK)(e,a,t),await (0,d.KK)(e,a,r,i,!0);let s=await (0,d.KK)(e,a,"SELECT name FROM d1_migrations ORDER BY applied_at;",i,!0),o=new Map((e=>{try{let t=JSON.parse(e);return t[0]?.results||[]}catch{return[]}})(s).map(e=>[e.name,e])),n=l.join(e,"migrations"),c=(await (0,p.readdir)(n)).filter(e=>e.endsWith(".sql")).sort(),T={applied:[],skipped:[],preview:[]};for(let e of c){let t=l.join(n,e),r={name:e,action:"",reason:""};try{if(!(await (0,u.JD)(t)).isValid){r.action="failed validation",r.reason="Migration validation failed",T.preview.push(r);continue}if(o.has(e)){r.action="skipped",r.reason="Already applied",T.preview.push(r),T.skipped.push({name:e,reason:r.reason});continue}r.action="will be applied",T.preview.push(r)}catch(t){r.action="failed",r.reason=t.message||"Failed to process migration",T.preview.push(r),T.skipped.push({name:e,reason:r.reason})}}return E.A.debug("Push Preview Result (server):",T),{success:!0,preview:!0,applied:T.applied.length,skipped:T.skipped.length,details:T}}catch(e){throw{type:d.wU.EXECUTION_ERROR,message:e.message||"Failed to push migrations",details:e.details||{error:e.stderr||e.message}}}}async function m(e){try{let{accountId:t,apiToken:r}=await e.json(),a=process.env.D1_PROJECT_DIR;if(!a)return n.NextResponse.json({success:!1,error:{type:d.wU.VALIDATION_ERROR,message:"Project directory not configured"}},{status:500});let s=await (0,c.S)(a);if(!s||!s.config)return n.NextResponse.json({success:!1,error:{type:d.wU.VALIDATION_ERROR,message:"Could not find Wrangler configuration"}},{status:400});let i=s.config;if(!i.d1_databases?.length)return n.NextResponse.json({success:!1,error:{type:d.wU.VALIDATION_ERROR,message:"No D1 databases configured"}},{status:400});let o=i.d1_databases[0].database_name,p=await T(a,t,r,o,!0);return n.NextResponse.json({success:!0,message:"Preview generated for migrations to be pushed to remote",details:p})}catch(e){return E.A.error("Push to remote preview error:",e),n.NextResponse.json({success:!1,error:{type:e.type||d.wU.EXECUTION_ERROR,message:e.message||"Failed to push to remote preview",details:e.details||{error:e.stderr||e.message}}},{status:e.type===d.wU.VALIDATION_ERROR?400:500})}}async function R(){return new n.NextResponse(null,{status:204})}let g=new s.AppRouteRouteModule({definition:{kind:i.RouteKind.APP_ROUTE,page:"/api/push-remote/preview/route",pathname:"/api/push-remote/preview",filename:"route",bundlePath:"app/api/push-remote/preview/route"},resolvedPagePath:"/Users/kona/Desktop/d1studio/src/app/api/push-remote/preview/route.js",nextConfigOutput:"",userland:a}),{workAsyncStorage:w,workUnitAsyncStorage:h,serverHooks:N}=g;function f(){return(0,o.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:h})}},3159:(e,t,r)=>{r.d(t,{hI:()=>w,Sl:()=>h,GS:()=>m,Gc:()=>N,k0:()=>u,CM:()=>g,ai:()=>R,JD:()=>T});var a=r(9748),s=r(8354),i=r(9646);let o=require("crypto");var n=r(3873),p=r(9421),l=r(4218),c=r(1804);let d=(0,s.promisify)(i.exec);async function u(e,t,r="local",a=!1){let s="remote"===r?"--remote":"--local",i="remote"===r?`
14
+ `;await (0,d.KK)(e,a,t),await (0,d.KK)(e,a,r,i,!0);let s=await (0,d.KK)(e,a,"SELECT name FROM d1_migrations ORDER BY applied_at;",i,!0),o=new Map((e=>{try{let t=JSON.parse(e);return t[0]?.results||[]}catch{return[]}})(s).map(e=>[e.name,e])),n=l.join(e,"migrations"),c=(await (0,p.readdir)(n)).filter(e=>e.endsWith(".sql")).sort(),m={applied:[],skipped:[],preview:[]};for(let e of c){let t=l.join(n,e),r={name:e,action:"",reason:""};try{if(!(await (0,u.JD)(t)).isValid){r.action="failed validation",r.reason="Migration validation failed",m.preview.push(r);continue}if(o.has(e)){r.action="skipped",r.reason="Already applied",m.preview.push(r),m.skipped.push({name:e,reason:r.reason});continue}r.action="will be applied",m.preview.push(r)}catch(t){r.action="failed",r.reason=t.message||"Failed to process migration",m.preview.push(r),m.skipped.push({name:e,reason:r.reason})}}return E.A.debug("Push Preview Result (server):",m),{success:!0,preview:!0,applied:m.applied.length,skipped:m.skipped.length,details:m}}catch(e){throw{type:d.wU.EXECUTION_ERROR,message:e.message||"Failed to push migrations",details:e.details||{error:e.stderr||e.message}}}}async function T(e){try{let{accountId:t,apiToken:r}=await e.json(),a=process.env.D1_PROJECT_DIR;if(!a)return n.NextResponse.json({success:!1,error:{type:d.wU.VALIDATION_ERROR,message:"Project directory not configured"}},{status:500});let s=await (0,c.S)(a);if(!s||!s.config)return n.NextResponse.json({success:!1,error:{type:d.wU.VALIDATION_ERROR,message:"Could not find Wrangler configuration"}},{status:400});let i=s.config;if(!i.d1_databases?.length)return n.NextResponse.json({success:!1,error:{type:d.wU.VALIDATION_ERROR,message:"No D1 databases configured"}},{status:400});let o=i.d1_databases[0].database_name,p=await m(a,t,r,o,!0);return n.NextResponse.json({success:!0,message:"Preview generated for migrations to be pushed to remote",details:p})}catch(e){return E.A.error("Push to remote preview error:",e),n.NextResponse.json({success:!1,error:{type:e.type||d.wU.EXECUTION_ERROR,message:e.message||"Failed to push to remote preview",details:e.details||{error:e.stderr||e.message}}},{status:e.type===d.wU.VALIDATION_ERROR?400:500})}}async function R(){return new n.NextResponse(null,{status:204})}let g=new s.AppRouteRouteModule({definition:{kind:i.RouteKind.APP_ROUTE,page:"/api/push-remote/preview/route",pathname:"/api/push-remote/preview",filename:"route",bundlePath:"app/api/push-remote/preview/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/push-remote/preview/route.js",nextConfigOutput:"",userland:a}),{workAsyncStorage:w,workUnitAsyncStorage:h,serverHooks:N}=g;function f(){return(0,o.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:h})}},3159:(e,t,r)=>{r.d(t,{hI:()=>w,Sl:()=>h,GS:()=>T,Gc:()=>N,k0:()=>u,CM:()=>g,ai:()=>R,JD:()=>m});var a=r(9748),s=r(8354),i=r(9646);let o=require("crypto");var n=r(3873),p=r(9421),l=r(4218),c=r(1804);let d=(0,s.promisify)(i.exec);async function u(e,t,r="local",a=!1){let s="remote"===r?"--remote":"--local",i="remote"===r?`
15
15
  CREATE TABLE IF NOT EXISTS d1_migrations (
16
16
  id INTEGER PRIMARY KEY AUTOINCREMENT,
17
17
  name TEXT NOT NULL UNIQUE,
@@ -24,7 +24,7 @@
24
24
  checksum TEXT NULL,
25
25
  applied_at DATETIME DEFAULT CURRENT_TIMESTAMP
26
26
  );
27
- `;try{await d(`wrangler d1 execute ${t} ${s} --command="${i.replace(/"/g,'\\"')}"`,{cwd:e}),a&&await d(`wrangler d1 execute ${t} ${s} --command="${"DELETE FROM d1_migrations;".replace(/"/g,'\\"')}"`,{cwd:e})}catch(e){throw c.A.error(`Failed to initialize migrations table in ${r}:`,e),e}}function E(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 T(e){let t=await (0,a.readFile)(e,"utf8");try{let e=(0,p.By)(t);return(0,p.Gq)(e),{isValid:!0,statement:e}}catch(e){return{isValid:!1,errors:e}}}async function m(e,t,r){try{let a=await (0,p.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:p.wU.EXECUTION_ERROR,message:"Failed to get remote migrations",details:{error:e.message,suggestions:["Check remote database permissions","Verify credentials and connection"]}}}}async function R(e,t,{name:r,checksum:a},s="local"){let i="remote"===s?"--remote":"--local";if("local"===s&&a)try{await d(`wrangler d1 execute ${t} ${i} --command="SELECT checksum FROM d1_migrations LIMIT 1;"`,{cwd:e}).catch(()=>!1)||await d(`wrangler d1 execute ${t} ${i} --command="ALTER TABLE d1_migrations ADD COLUMN checksum TEXT;"`,{cwd:e})}catch(e){}let o="remote"!==s&&a?`
27
+ `;try{await d(`wrangler d1 execute ${t} ${s} --command="${i.replace(/"/g,'\\"')}"`,{cwd:e}),a&&await d(`wrangler d1 execute ${t} ${s} --command="${"DELETE FROM d1_migrations;".replace(/"/g,'\\"')}"`,{cwd:e})}catch(e){throw c.A.error(`Failed to initialize migrations table in ${r}:`,e),e}}function E(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 m(e){let t=await (0,a.readFile)(e,"utf8");try{let e=(0,p.By)(t);return(0,p.Gq)(e),{isValid:!0,statement:e}}catch(e){return{isValid:!1,errors:e}}}async function T(e,t,r){try{let a=await (0,p.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:p.wU.EXECUTION_ERROR,message:"Failed to get remote migrations",details:{error:e.message,suggestions:["Check remote database permissions","Verify credentials and connection"]}}}}async function R(e,t,{name:r,checksum:a},s="local"){let i="remote"===s?"--remote":"--local";if("local"===s&&a)try{await d(`wrangler d1 execute ${t} ${i} --command="SELECT checksum FROM d1_migrations LIMIT 1;"`,{cwd:e}).catch(()=>!1)||await d(`wrangler d1 execute ${t} ${i} --command="ALTER TABLE d1_migrations ADD COLUMN checksum TEXT;"`,{cwd:e})}catch(e){}let o="remote"!==s&&a?`
28
28
  INSERT OR REPLACE INTO d1_migrations (name, checksum, applied_at)
29
29
  VALUES ('${r}', '${a}', CURRENT_TIMESTAMP);
30
30
  `:`
@@ -36,4 +36,4 @@
36
36
  `:`
37
37
  INSERT OR REPLACE INTO d1_migrations (name, checksum, applied_at)
38
38
  VALUES ('${r}', '${a}', CURRENT_TIMESTAMP);
39
- `;try{await (0,p.KK)(e,t,o,s,i)}catch(e){throw{type:p.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 m(e,t,{}),a=new Map(r.map(e=>[e.name,e]));return{applied:Array.from(a.keys()),count:a.size}}catch(e){throw c.A.error("Failed to compare migrations:",e),e}}function h(e){return(0,o.createHash)("sha256").update(e).digest("hex")}async function N(e,t,r){try{let s=n.join(e,"migrations");await (0,a.mkdir)(s,{recursive:!0});let i=[],o=[],c=[];for(let e of r)e.type===p.Pg.DATA_MODIFICATION?c.push(e):o.push(e);let d=new Map,u="__no_table__";for(let e of o){let t=e.tableName?e.tableName.toLowerCase():u;d.has(t)||d.set(t,[]),d.get(t).push(e)}let T=[...d.keys()].filter(e=>e!==u),m=[];if(T.length>0){let e=T.map(e=>d.get(e)[0]);m=(0,l.IC)(e)}for(let r of m){for(let o of d.get(r)||[])try{if(o.type===p.Pg.DROP_TABLE&&!await (0,p.F9)(e,t,{},o.tableName,!1))throw Error(`no such table: ${o.tableName}`);let r=await (0,p.KK)(e,t,o.sql);if(r&&(r.toLowerCase().includes("syntax error")||r.toLowerCase().includes("sqlite_error")))throw Error(r);let l=E(o),c=n.join(s,l),d=(0,p.tn)(o.sql);await (0,a.writeFile)(c,d,"utf8");let u=h(o.sql);await R(e,t,{name:l,checksum:u},"local"),i.push({type:o.type,table:o.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,p.KK)(e,t,r.sql);let o=E(r),l=n.join(s,o),c=(0,p.tn)(r.sql);await (0,a.writeFile)(l,c,"utf8");let d=h(r.sql);await R(e,t,{name:o,checksum:d},"local"),i.push({type:r.type,table:r.tableName||null,migration:o,checksum:d})}catch(e){throw e}for(let r of c)try{await (0,p.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(1925));module.exports=a})();
39
+ `;try{await (0,p.KK)(e,t,o,s,i)}catch(e){throw{type:p.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 c.A.error("Failed to compare migrations:",e),e}}function h(e){return(0,o.createHash)("sha256").update(e).digest("hex")}async function N(e,t,r){try{let s=n.join(e,"migrations");await (0,a.mkdir)(s,{recursive:!0});let i=[],o=[],c=[];for(let e of r)e.type===p.Pg.DATA_MODIFICATION?c.push(e):o.push(e);let d=new Map,u="__no_table__";for(let e of o){let t=e.tableName?e.tableName.toLowerCase():u;d.has(t)||d.set(t,[]),d.get(t).push(e)}let m=[...d.keys()].filter(e=>e!==u),T=[];if(m.length>0){let e=m.map(e=>d.get(e)[0]);T=(0,l.IC)(e)}for(let r of T){for(let o of d.get(r)||[])try{if(o.type===p.Pg.DROP_TABLE&&!await (0,p.F9)(e,t,{},o.tableName,!1))throw Error(`no such table: ${o.tableName}`);let r=await (0,p.KK)(e,t,o.sql);if(r&&(r.toLowerCase().includes("syntax error")||r.toLowerCase().includes("sqlite_error")))throw Error(r);let l=E(o),c=n.join(s,l),d=(0,p.tn)(o.sql);await (0,a.writeFile)(c,d,"utf8");let u=h(o.sql);await R(e,t,{name:l,checksum:u},"local"),i.push({type:o.type,table:o.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,p.KK)(e,t,r.sql);let o=E(r),l=n.join(s,o),c=(0,p.tn)(r.sql);await (0,a.writeFile)(l,c,"utf8");let d=h(r.sql);await R(e,t,{name:o,checksum:d},"local"),i.push({type:r.type,table:r.tableName||null,migration:o,checksum:d})}catch(e){throw e}for(let r of c)try{await (0,p.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(1704));module.exports=a})();
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/push-remote/preview/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/push-remote/preview/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/push-remote/preview/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/push-remote/preview/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,11 +1,11 @@
1
- "use strict";(()=>{var e={};e.id=58,e.ids=[58],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")},3195:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>f,routeModule:()=>T,serverHooks:()=>m,workAsyncStorage:()=>N,workUnitAsyncStorage:()=>g});var a={};t.r(a),t.d(a,{OPTIONS:()=>R,POST:()=>p});var s=t(2706),o=t(8203),n=t(5994),i=t(9187),l=t(5949),c=t(9421),d=t(3159);let u={SYNTAX_ERROR:"SYNTAX_ERROR",EXECUTION_ERROR:"EXECUTION_ERROR",TABLE_NOT_FOUND:"TABLE_NOT_FOUND",TABLE_EXISTS:"TABLE_EXISTS",FOREIGN_KEY_ERROR:"FOREIGN_KEY_ERROR",UNIQUE_CONSTRAINT_ERROR:"UNIQUE_CONSTRAINT_ERROR",NOT_NULL_CONSTRAINT_ERROR:"NOT_NULL_CONSTRAINT_ERROR",CHECK_CONSTRAINT_ERROR:"CHECK_CONSTRAINT_ERROR",UNKNOWN_ERROR:"UNKNOWN_ERROR"};var E=t(1804);async function p(e){E.A.logRequest("POST","/api/query");try{let r;let t=process.env.D1_PROJECT_DIR;if(!t)return E.A.error("Project directory not configured"),i.NextResponse.json({error:"Project directory not configured"},{status:500});let{query:a}=await e.json();if(E.A.shouldLog("debug")&&E.A.debug("Received query:",a),!a?.trim())return i.NextResponse.json({success:!1,error:{message:"Query cannot be empty"}},{status:400});let s=await (0,l.S)(t);if(!s||!s.config)return E.A.error("No Wrangler configuration file found"),i.NextResponse.json({success:!1,error:{message:"No Wrangler configuration file found"}},{status:404});let o=s.config;if(!o.d1_databases?.length)return i.NextResponse.json({success:!1,error:{message:"No D1 databases configured"}},{status:404});let n=o.d1_databases[0].database_name,u=(0,c.mA)(a);if(!u.length)return i.NextResponse.json({success:!1,error:{message:"No valid SQL statements found"}},{status:400});u=u.map(c.Gq);let p=`
1
+ "use strict";(()=>{var e={};e.id=58,e.ids=[58],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")},271:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>f,routeModule:()=>T,serverHooks:()=>m,workAsyncStorage:()=>N,workUnitAsyncStorage:()=>g});var a={};t.r(a),t.d(a,{OPTIONS:()=>R,POST:()=>p});var s=t(2706),o=t(8203),n=t(5994),i=t(9187),l=t(5949),c=t(9421),d=t(3159);let u={SYNTAX_ERROR:"SYNTAX_ERROR",EXECUTION_ERROR:"EXECUTION_ERROR",TABLE_NOT_FOUND:"TABLE_NOT_FOUND",TABLE_EXISTS:"TABLE_EXISTS",FOREIGN_KEY_ERROR:"FOREIGN_KEY_ERROR",UNIQUE_CONSTRAINT_ERROR:"UNIQUE_CONSTRAINT_ERROR",NOT_NULL_CONSTRAINT_ERROR:"NOT_NULL_CONSTRAINT_ERROR",CHECK_CONSTRAINT_ERROR:"CHECK_CONSTRAINT_ERROR",UNKNOWN_ERROR:"UNKNOWN_ERROR"};var E=t(1804);async function p(e){E.A.logRequest("POST","/api/query");try{let r;let t=process.env.D1_PROJECT_DIR;if(!t)return E.A.error("Project directory not configured"),i.NextResponse.json({error:"Project directory not configured"},{status:500});let{query:a}=await e.json();if(E.A.shouldLog("debug")&&E.A.debug("Received query:",a),!a?.trim())return i.NextResponse.json({success:!1,error:{message:"Query cannot be empty"}},{status:400});let s=await (0,l.S)(t);if(!s||!s.config)return E.A.error("No Wrangler configuration file found"),i.NextResponse.json({success:!1,error:{message:"No Wrangler configuration file found"}},{status:404});let o=s.config;if(!o.d1_databases?.length)return i.NextResponse.json({success:!1,error:{message:"No D1 databases configured"}},{status:404});let n=o.d1_databases[0].database_name,u=(0,c.mA)(a);if(!u.length)return i.NextResponse.json({success:!1,error:{message:"No valid SQL statements found"}},{status:400});u=u.map(c.Gq);let p=`
2
2
  CREATE TABLE IF NOT EXISTS d1_migrations (
3
3
  id INTEGER PRIMARY KEY AUTOINCREMENT,
4
4
  name TEXT NOT NULL UNIQUE,
5
5
  checksum TEXT NOT NULL,
6
6
  applied_at DATETIME DEFAULT CURRENT_TIMESTAMP
7
7
  );
8
- `;if(await (0,c.KK)(t,n,p),u.some(c.QQ)){let e=await (0,d.Gc)(t,n,u);r={success:!0,migrations:e,results:[{results:[]}]}}else{let e=[];for(let r of u){let a=await (0,c.KK)(t,n,r.sql);try{let r=JSON.parse(a),t=r[0]?.results||[];e.push(...t)}catch(e){continue}}r={success:!0,results:[{results:e}]}}return i.NextResponse.json(r)}catch(t){E.A.logError(t,"query-route");let e=function(e){if(console.debug("parseSQLError - Received error:",e),!e)return console.debug("parseSQLError - error is null or undefined."),{type:u.UNKNOWN_ERROR,message:"An unknown error occurred",details:{}};let r="",t=null,a=null,s=e.cmd||e.details&&e.details.command;if(s){let e=s.match(/--command="(.+?)"/s);e&&console.debug("parseSQLError - Extracted original query:",a=e[1].replace(/\\n/g,"\n"))}let o=e.stderr||e.details&&e.details.stderr;if(o){let n=o.replace(/\x1B\[[0-9;]*[a-zA-Z]/g,"");if(console.debug("parseSQLError - Cleaned stderr:",n),n.includes("env: node: No such file or directory"))return console.debug("parseSQLError - Detected 'env: node: No such file or directory' error."),{type:u.EXECUTION_ERROR,message:e.message||"Execution error: env: node: No such file or directory",details:{originalQuery:a,stderr:n}};let i=n.match(/near "([^"]+)": syntax error at offset (\d+)/);if(i){let[e,s,o]=i;return t=parseInt(o,10),r=`Syntax error near "${s}" at position ${t}`,console.debug("parseSQLError - Syntax error detected:",{near:s,offset:t}),{type:u.SYNTAX_ERROR,message:r,details:{originalQuery:a,errorLocation:{offset:t,near:s},stderr:n}}}if(n.includes("UNIQUE constraint failed")){let[e,r,t]=n.match(/UNIQUE constraint failed: (\w+)\.(\w+)/)||[];return console.debug("parseSQLError - UNIQUE constraint error detected:",{table:r,column:t}),{type:u.UNIQUE_CONSTRAINT_ERROR,message:`Unique constraint violation updating ${r}.${t}`,details:{originalQuery:a,stderr:n}}}if(n.includes("NOT NULL constraint failed")){let[e,r,t]=n.match(/NOT NULL constraint failed: (\w+)\.(\w+)/)||[];return console.debug("parseSQLError - NOT NULL constraint error detected:",{table:r,column:t}),{type:u.NOT_NULL_CONSTRAINT_ERROR,message:`NOT NULL constraint violation updating ${r}.${t}`,details:{originalQuery:a,stderr:n}}}if(n.includes("CHECK constraint failed")){let[e,r]=n.match(/CHECK constraint failed: (\w+)/)||[];return console.debug("parseSQLError - CHECK constraint error detected:",{constraintName:r}),{type:u.CHECK_CONSTRAINT_ERROR,message:`Check constraint violation updating ${r}`,details:{originalQuery:a,stderr:n}}}if(n.includes("FOREIGN KEY constraint failed")){console.debug("parseSQLError - FOREIGN KEY constraint error detected.");let e=/--command="([^"]+)"/.exec(s||""),r=e?e[1]:null,t={};if(r){let e=/UPDATE\s+(\w+)\s+SET\s+(\w+)\s*=/.exec(r);e&&(t={table:e[1],column:e[2]})}let a=t.table?`Foreign key constraint violation updating ${t.table}.${t.column}`:"Foreign key constraint violation";return{type:u.FOREIGN_KEY_ERROR,message:a,details:{...t,originalQuery:r,stderr:n}}}if(n.includes("no such table")){let[e,r]=n.match(/no such table: (\w+)/)||[];return console.debug("parseSQLError - Table not found error detected:",{table:r}),{type:u.TABLE_NOT_FOUND,message:`Table not found: ${r}`,details:{originalQuery:a,stderr:n}}}if(n.includes("already exists")){let[e,r]=n.match(/table (\w+) already exists/)||[];return console.debug("parseSQLError - Table exists error detected:",{table:r}),{type:u.TABLE_EXISTS,message:`Table already exists: ${r}`,details:{originalQuery:a,stderr:n}}}return console.debug("parseSQLError - No specific error match found. Using fallback for execution error."),{type:u.EXECUTION_ERROR,message:e.message||"Failed to execute SQL command",details:{originalQuery:a,stderr:n}}}return console.debug("parseSQLError - No stderr available; using default error handling."),{type:u.UNKNOWN_ERROR,message:e.message||"An unknown error occurred",details:{}}}(t),r=t.type===c.wU.VALIDATION_ERROR?400:t.type===c.wU.DEPENDENCY_ERROR?409:500;return i.NextResponse.json({success:!1,error:e},{status:r})}}async function R(){return new i.NextResponse(null,{status:204,headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type"}})}let T=new s.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/query/route",pathname:"/api/query",filename:"route",bundlePath:"app/api/query/route"},resolvedPagePath:"/Users/kona/Desktop/d1studio/src/app/api/query/route.js",nextConfigOutput:"",userland:a}),{workAsyncStorage:N,workUnitAsyncStorage:g,serverHooks:m}=T;function f(){return(0,n.patchFetch)({workAsyncStorage:N,workUnitAsyncStorage:g})}},3159:(e,r,t)=>{t.d(r,{hI:()=>m,Sl:()=>f,GS:()=>T,Gc:()=>O,k0:()=>E,CM:()=>g,ai:()=>N,JD:()=>R});var a=t(9748),s=t(8354),o=t(9646);let n=require("crypto");var i=t(3873),l=t(9421),c=t(4218),d=t(1804);let u=(0,s.promisify)(o.exec);async function E(e,r,t="local",a=!1){let s="remote"===t?"--remote":"--local",o="remote"===t?`
8
+ `;if(await (0,c.KK)(t,n,p),u.some(c.QQ)){let e=await (0,d.Gc)(t,n,u);r={success:!0,migrations:e,results:[{results:[]}]}}else{let e=[];for(let r of u){let a=await (0,c.KK)(t,n,r.sql);try{let r=JSON.parse(a),t=r[0]?.results||[];e.push(...t)}catch(e){continue}}r={success:!0,results:[{results:e}]}}return i.NextResponse.json(r)}catch(t){E.A.logError(t,"query-route");let e=function(e){if(console.debug("parseSQLError - Received error:",e),!e)return console.debug("parseSQLError - error is null or undefined."),{type:u.UNKNOWN_ERROR,message:"An unknown error occurred",details:{}};let r="",t=null,a=null,s=e.cmd||e.details&&e.details.command;if(s){let e=s.match(/--command="(.+?)"/s);e&&console.debug("parseSQLError - Extracted original query:",a=e[1].replace(/\\n/g,"\n"))}let o=e.stderr||e.details&&e.details.stderr;if(o){let n=o.replace(/\x1B\[[0-9;]*[a-zA-Z]/g,"");if(console.debug("parseSQLError - Cleaned stderr:",n),n.includes("env: node: No such file or directory"))return console.debug("parseSQLError - Detected 'env: node: No such file or directory' error."),{type:u.EXECUTION_ERROR,message:e.message||"Execution error: env: node: No such file or directory",details:{originalQuery:a,stderr:n}};let i=n.match(/near "([^"]+)": syntax error at offset (\d+)/);if(i){let[e,s,o]=i;return t=parseInt(o,10),r=`Syntax error near "${s}" at position ${t}`,console.debug("parseSQLError - Syntax error detected:",{near:s,offset:t}),{type:u.SYNTAX_ERROR,message:r,details:{originalQuery:a,errorLocation:{offset:t,near:s},stderr:n}}}if(n.includes("UNIQUE constraint failed")){let[e,r,t]=n.match(/UNIQUE constraint failed: (\w+)\.(\w+)/)||[];return console.debug("parseSQLError - UNIQUE constraint error detected:",{table:r,column:t}),{type:u.UNIQUE_CONSTRAINT_ERROR,message:`Unique constraint violation updating ${r}.${t}`,details:{originalQuery:a,stderr:n}}}if(n.includes("NOT NULL constraint failed")){let[e,r,t]=n.match(/NOT NULL constraint failed: (\w+)\.(\w+)/)||[];return console.debug("parseSQLError - NOT NULL constraint error detected:",{table:r,column:t}),{type:u.NOT_NULL_CONSTRAINT_ERROR,message:`NOT NULL constraint violation updating ${r}.${t}`,details:{originalQuery:a,stderr:n}}}if(n.includes("CHECK constraint failed")){let[e,r]=n.match(/CHECK constraint failed: (\w+)/)||[];return console.debug("parseSQLError - CHECK constraint error detected:",{constraintName:r}),{type:u.CHECK_CONSTRAINT_ERROR,message:`Check constraint violation updating ${r}`,details:{originalQuery:a,stderr:n}}}if(n.includes("FOREIGN KEY constraint failed")){console.debug("parseSQLError - FOREIGN KEY constraint error detected.");let e=/--command="([^"]+)"/.exec(s||""),r=e?e[1]:null,t={};if(r){let e=/UPDATE\s+(\w+)\s+SET\s+(\w+)\s*=/.exec(r);e&&(t={table:e[1],column:e[2]})}let a=t.table?`Foreign key constraint violation updating ${t.table}.${t.column}`:"Foreign key constraint violation";return{type:u.FOREIGN_KEY_ERROR,message:a,details:{...t,originalQuery:r,stderr:n}}}if(n.includes("no such table")){let[e,r]=n.match(/no such table: (\w+)/)||[];return console.debug("parseSQLError - Table not found error detected:",{table:r}),{type:u.TABLE_NOT_FOUND,message:`Table not found: ${r}`,details:{originalQuery:a,stderr:n}}}if(n.includes("already exists")){let[e,r]=n.match(/table (\w+) already exists/)||[];return console.debug("parseSQLError - Table exists error detected:",{table:r}),{type:u.TABLE_EXISTS,message:`Table already exists: ${r}`,details:{originalQuery:a,stderr:n}}}return console.debug("parseSQLError - No specific error match found. Using fallback for execution error."),{type:u.EXECUTION_ERROR,message:e.message||"Failed to execute SQL command",details:{originalQuery:a,stderr:n}}}return console.debug("parseSQLError - No stderr available; using default error handling."),{type:u.UNKNOWN_ERROR,message:e.message||"An unknown error occurred",details:{}}}(t),r=t.type===c.wU.VALIDATION_ERROR?400:t.type===c.wU.DEPENDENCY_ERROR?409:500;return i.NextResponse.json({success:!1,error:e},{status:r})}}async function R(){return new i.NextResponse(null,{status:204,headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type"}})}let T=new s.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/query/route",pathname:"/api/query",filename:"route",bundlePath:"app/api/query/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/query/route.js",nextConfigOutput:"",userland:a}),{workAsyncStorage:N,workUnitAsyncStorage:g,serverHooks:m}=T;function f(){return(0,n.patchFetch)({workAsyncStorage:N,workUnitAsyncStorage:g})}},3159:(e,r,t)=>{t.d(r,{hI:()=>m,Sl:()=>f,GS:()=>T,Gc:()=>O,k0:()=>E,CM:()=>g,ai:()=>N,JD:()=>R});var a=t(9748),s=t(8354),o=t(9646);let n=require("crypto");var i=t(3873),l=t(9421),c=t(4218),d=t(1804);let u=(0,s.promisify)(o.exec);async function E(e,r,t="local",a=!1){let s="remote"===t?"--remote":"--local",o="remote"===t?`
9
9
  CREATE TABLE IF NOT EXISTS d1_migrations (
10
10
  id INTEGER PRIMARY KEY AUTOINCREMENT,
11
11
  name TEXT NOT NULL UNIQUE,
@@ -30,4 +30,4 @@
30
30
  `:`
31
31
  INSERT OR REPLACE INTO d1_migrations (name, checksum, applied_at)
32
32
  VALUES ('${t}', '${a}', CURRENT_TIMESTAMP);
33
- `;try{await (0,l.KK)(e,r,n,s,o)}catch(e){throw{type:l.wU.EXECUTION_ERROR,message:`Failed to record migration ${t}`,details:{file:t,error:e.message,suggestions:["Check if migration is already recorded"]}}}}async function m(e,r){try{let t=await T(e,r,{}),a=new Map(t.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,n.createHash)("sha256").update(e).digest("hex")}async function O(e,r,t){try{let s=i.join(e,"migrations");await (0,a.mkdir)(s,{recursive:!0});let o=[],n=[],d=[];for(let e of t)e.type===l.Pg.DATA_MODIFICATION?d.push(e):n.push(e);let u=new Map,E="__no_table__";for(let e of n){let r=e.tableName?e.tableName.toLowerCase():E;u.has(r)||u.set(r,[]),u.get(r).push(e)}let R=[...u.keys()].filter(e=>e!==E),T=[];if(R.length>0){let e=R.map(e=>u.get(e)[0]);T=(0,c.IC)(e)}for(let t of T){for(let n of u.get(t)||[])try{if(n.type===l.Pg.DROP_TABLE&&!await (0,l.F9)(e,r,{},n.tableName,!1))throw Error(`no such table: ${n.tableName}`);let t=await (0,l.KK)(e,r,n.sql);if(t&&(t.toLowerCase().includes("syntax error")||t.toLowerCase().includes("sqlite_error")))throw Error(t);let c=p(n),d=i.join(s,c),u=(0,l.tn)(n.sql);await (0,a.writeFile)(d,u,"utf8");let E=f(n.sql);await N(e,r,{name:c,checksum:E},"local"),o.push({type:n.type,table:n.tableName,migration:c,checksum:E})}catch(e){throw e}u.delete(t)}if(u.has(E))for(let t of u.get(E))try{await (0,l.KK)(e,r,t.sql);let n=p(t),c=i.join(s,n),d=(0,l.tn)(t.sql);await (0,a.writeFile)(c,d,"utf8");let u=f(t.sql);await N(e,r,{name:n,checksum:u},"local"),o.push({type:t.type,table:t.tableName||null,migration:n,checksum:u})}catch(e){throw e}for(let t of d)try{await (0,l.KK)(e,r,t.sql),o.push({type:t.type,table:t.tableName||null,executed:!0})}catch(e){throw e}return o}catch(e){throw e}}}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),a=r.X(0,[638,452,391,226],()=>t(3195));module.exports=a})();
33
+ `;try{await (0,l.KK)(e,r,n,s,o)}catch(e){throw{type:l.wU.EXECUTION_ERROR,message:`Failed to record migration ${t}`,details:{file:t,error:e.message,suggestions:["Check if migration is already recorded"]}}}}async function m(e,r){try{let t=await T(e,r,{}),a=new Map(t.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,n.createHash)("sha256").update(e).digest("hex")}async function O(e,r,t){try{let s=i.join(e,"migrations");await (0,a.mkdir)(s,{recursive:!0});let o=[],n=[],d=[];for(let e of t)e.type===l.Pg.DATA_MODIFICATION?d.push(e):n.push(e);let u=new Map,E="__no_table__";for(let e of n){let r=e.tableName?e.tableName.toLowerCase():E;u.has(r)||u.set(r,[]),u.get(r).push(e)}let R=[...u.keys()].filter(e=>e!==E),T=[];if(R.length>0){let e=R.map(e=>u.get(e)[0]);T=(0,c.IC)(e)}for(let t of T){for(let n of u.get(t)||[])try{if(n.type===l.Pg.DROP_TABLE&&!await (0,l.F9)(e,r,{},n.tableName,!1))throw Error(`no such table: ${n.tableName}`);let t=await (0,l.KK)(e,r,n.sql);if(t&&(t.toLowerCase().includes("syntax error")||t.toLowerCase().includes("sqlite_error")))throw Error(t);let c=p(n),d=i.join(s,c),u=(0,l.tn)(n.sql);await (0,a.writeFile)(d,u,"utf8");let E=f(n.sql);await N(e,r,{name:c,checksum:E},"local"),o.push({type:n.type,table:n.tableName,migration:c,checksum:E})}catch(e){throw e}u.delete(t)}if(u.has(E))for(let t of u.get(E))try{await (0,l.KK)(e,r,t.sql);let n=p(t),c=i.join(s,n),d=(0,l.tn)(t.sql);await (0,a.writeFile)(c,d,"utf8");let u=f(t.sql);await N(e,r,{name:n,checksum:u},"local"),o.push({type:t.type,table:t.tableName||null,migration:n,checksum:u})}catch(e){throw e}for(let t of d)try{await (0,l.KK)(e,r,t.sql),o.push({type:t.type,table:t.tableName||null,executed:!0})}catch(e){throw e}return o}catch(e){throw e}}}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),a=r.X(0,[638,452,391,226],()=>t(271));module.exports=a})();
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/query/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/query/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/query/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/query/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,5 +1,5 @@
1
- (()=>{var e={};e.id=175,e.ids=[175],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")},9646:e=>{"use strict";e.exports=require("child_process")},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")},2981:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>v,routeModule:()=>E,serverHooks:()=>A,workAsyncStorage:()=>b,workUnitAsyncStorage:()=>$});var s={};t.r(s),t.d(s,{GET:()=>q,OPTIONS:()=>y,dynamic:()=>h,runtime:()=>m});var o=t(2706),n=t(8203),a=t(5994),i=t(9187),u=t(8354),c=t(9646),l=t(5949),p=t(1804);class d{constructor(){this.queue=[],this.isProcessing=!1}async add(e){return new Promise((r,t)=>{this.queue.push({operation:e,resolve:r,reject:t}),this.processNext()})}async processNext(){if(this.isProcessing||0===this.queue.length)return;this.isProcessing=!0;let{operation:e,resolve:r,reject:t}=this.queue.shift();try{let t=await e();r(t)}catch(e){p.A.error("Error processing database queue operation:",e),t(e)}finally{this.isProcessing=!1,this.processNext()}}}let g=new d,f=(0,u.promisify)(c.exec),m="nodejs",h="force-dynamic",w=!1;async function x(e,r,t){try{for(;w;)await new Promise(e=>setTimeout(e,100));w=!0;let{stdout:s}=await f(`wrangler d1 execute ${t} --local --command="${e.replace(/"/g,'\\"')}" --json`,{cwd:r}),o=JSON.parse(s);return o[0]?.results||[]}catch(e){throw p.A.error("Query execution error:",e),e}finally{w=!1}}async function q(e,r){return g.add(async()=>{try{let{name:t}=await r.params,{searchParams:s}=new URL(e.url),o=parseInt(s.get("page"))||1,n=parseInt(s.get("limit"))||50,a=(o-1)*n,u=process.env.D1_PROJECT_DIR;if(!u)throw Error("Project directory not configured");let c=await (0,l.S)(u);if(!c||!c.config)throw Error("No Wrangler configuration file found");let p=c.config;if(!p.d1_databases?.length)throw Error("No D1 databases configured");let d=p.d1_databases[0].database_name,g=`PRAGMA table_info(${t});`,f=await x(g,u,d),m=`SELECT sql FROM sqlite_master WHERE type='table' AND name='${t}';`,h=await x(m,u,d),w=h[0]?.sql||"",q=function(e){let r;let t={},s=/CHECK\s*\(\s*(\w+)\s+IN\s*\((.*?)\)\s*\)/gi;for(;null!==(r=s.exec(e));){let e=r[1],s=r[2].split(",").map(e=>e.trim().replace(/^'|'$/g,""));t[e]=s}return t}(w),y=f.map(e=>({...e,check:q[e.name]||null})),E=`SELECT COUNT(*) as total FROM ${t};`,b=await x(E,u,d),$=b[0]?.total||0,A=f.find(e=>1===e.pk)?.name||f[0]?.name,v=`
2
- SELECT * FROM ${t}
3
- ORDER BY ${A} DESC
4
- LIMIT ${n} OFFSET ${a};
5
- `,P=await x(v,u,d);return i.NextResponse.json({success:!0,schema:y,data:P,meta:{tableName:t,total:$,page:o,limit:n,totalPages:Math.ceil($/n),rowCount:P.length,columnCount:f.length}})}catch(e){return p.A.error("Error handling request:",e),i.NextResponse.json({success:!1,error:{message:e.message,details:e.stack}},{status:e.message.includes("not configured")?500:e.message.includes("not found")?404:500})}})}async function y(){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 E=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/tables/[name]/route",pathname:"/api/tables/[name]",filename:"route",bundlePath:"app/api/tables/[name]/route"},resolvedPagePath:"/Users/kona/Desktop/d1studio/src/app/api/tables/[name]/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:b,workUnitAsyncStorage:$,serverHooks:A}=E;function v(){return(0,a.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:$})}},6487:()=>{},8335:()=>{},5949:(e,r,t)=>{"use strict";t.d(r,{S:()=>l});var s=t(9748),o=t(3149),n=t(2537),a=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 p=await (0,s.readFile)(t,"utf-8");return l.endsWith(".toml")?r=(0,n.parse)(p):(l.endsWith(".jsonc")&&(p=(0,a.A)(p)),r=JSON.parse(p)),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:()=>p});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}),l=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})]});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 p=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(2981));module.exports=s})();
1
+ (()=>{var e={};e.id=175,e.ids=[175],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")},9646:e=>{"use strict";e.exports=require("child_process")},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")},7322:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>T,routeModule:()=>y,serverHooks:()=>$,workAsyncStorage:()=>R,workUnitAsyncStorage:()=>b});var s={};t.r(s),t.d(s,{GET:()=>A,OPTIONS:()=>q,dynamic:()=>w,runtime:()=>h});var n=t(2706),o=t(8203),a=t(5994),i=t(9187),u=t(8354),l=t(9646),c=t(5949),p=t(1804);class d{constructor(){this.queue=[],this.isProcessing=!1}async add(e){return new Promise((r,t)=>{this.queue.push({operation:e,resolve:r,reject:t}),this.processNext()})}async processNext(){if(this.isProcessing||0===this.queue.length)return;this.isProcessing=!0;let{operation:e,resolve:r,reject:t}=this.queue.shift();try{let t=await e();r(t)}catch(e){p.A.error("Error processing database queue operation:",e),t(e)}finally{this.isProcessing=!1,this.processNext()}}}let g=new d;var m=t(3648);let f=(0,u.promisify)(l.exec),h="nodejs",w="force-dynamic",E=!1;async function x(e,r,t){try{for(;E;)await new Promise(e=>setTimeout(e,100));E=!0;let{stdout:s}=await f(`wrangler d1 execute ${t} --local --command="${e.replace(/"/g,'\\"')}" --json`,{cwd:r}),n=JSON.parse(s);return n[0]?.results||[]}catch(e){throw p.A.error("Query execution error:",e),e}finally{E=!1}}async function A(e,r){return g.add(async()=>{try{let{name:t}=await r.params,{searchParams:s}=new URL(e.url),n=parseInt(s.get("page"))||1,o=parseInt(s.get("limit"))||50,a=(n-1)*o,u=process.env.D1_PROJECT_DIR;if(!u)throw Error("Project directory not configured");let l=await (0,c.S)(u);if(!l||!l.config)throw Error("No Wrangler configuration file found");let p=l.config;if(!p.d1_databases?.length)throw Error("No D1 databases configured");let d=p.d1_databases[0].database_name,g=(0,m.nZ)(t),f=`PRAGMA table_info(${g});`,h=await x(f,u,d),w=`SELECT sql FROM sqlite_master WHERE type='table' AND name='${t.replace(/'/g,"''")}';`,E=await x(w,u,d),A=E[0]?.sql||"",q=function(e){let r;let t={},s=/CHECK\s*\(\s*(\w+)\s+IN\s*\((.*?)\)\s*\)/gi;for(;null!==(r=s.exec(e));){let e=r[1],s=r[2].split(",").map(e=>e.trim().replace(/^'|'$/g,""));t[e]=s}return t}(A),y=h.map(e=>({...e,check:q[e.name]||null})),R=`SELECT COUNT(*) as total FROM ${g};`,b=await x(R,u,d),$=b[0]?.total||0,T=h.find(e=>1===e.pk)?.name||h[0]?.name,N=T?(0,m.r0)(T):"*",C=Math.max(1,Math.min(parseInt(o)||50,1e3)),P=Math.max(0,parseInt(a)||0),v=`
2
+ SELECT * FROM ${g}
3
+ ORDER BY ${N} DESC
4
+ LIMIT ${C} OFFSET ${P};
5
+ `,O=await x(v,u,d);return i.NextResponse.json({success:!0,schema:y,data:O,meta:{tableName:t,total:$,page:n,limit:o,totalPages:Math.ceil($/o),rowCount:O.length,columnCount:h.length}})}catch(e){return p.A.error("Error handling request:",e),i.NextResponse.json({success:!1,error:{message:e.message,details:e.stack}},{status:e.message.includes("not configured")?500:e.message.includes("not found")?404:500})}})}async function q(){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 y=new n.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/tables/[name]/route",pathname:"/api/tables/[name]",filename:"route",bundlePath:"app/api/tables/[name]/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/tables/[name]/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:R,workUnitAsyncStorage:b,serverHooks:$}=y;function T(){return(0,a.patchFetch)({workAsyncStorage:R,workUnitAsyncStorage:b})}},6487:()=>{},8335:()=>{},5949:(e,r,t)=>{"use strict";t.d(r,{S:()=>c});var s=t(9748),n=t(3149),o=t(2537),a=t(6789),i=t(1804);let u=null,l=null;async function c(e){try{let r;if(!e||"string"!=typeof e)throw Error("Project path is required and must be a string");if(u&&l===e)return u;let t=null,c=null;for(let r of["wrangler.toml","wrangler.json","wrangler.jsonc"])if(t=await (0,n.dJ)(r,{cwd:e})){c=r;break}if(!t)return i.A.warn(`No Wrangler configuration file found in: ${e}`),null;i.A.info(`Found ${c} at: ${t}`);let p=await (0,s.readFile)(t,"utf-8");return c.endsWith(".toml")?r=(0,o.parse)(p):(c.endsWith(".jsonc")&&(p=(0,a.A)(p)),r=JSON.parse(p)),u={config:r,projectPath:e},l=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:()=>p});var s=t(6399);let{combine:n,timestamp:o,printf:a,colorize:i}=s.format,u="true"===process.env.DEBUG,l=a(({level:e,message:r,timestamp:t,...s})=>{let n=`${t} ${e}: ${r}`;return Object.keys(s).length>0&&(n+=` ${JSON.stringify(s)}`),n}),c=s.createLogger({level:u?"debug":"warn",format:n(o({format:"YYYY-MM-DD HH:mm:ss"}),i(),l),transports:[new s.transports.Console({level:u?"debug":"warn",silent:!1})]});c.logRequest=(e,r,t={})=>{c.debug(`Request: ${e} ${r}`,t)},c.logError=(e,r="unknown")=>{c.error(`Error in ${r}: ${e.message}`,{error:e.stack||e.message,source:r})},c.shouldLog=e=>{let r=c.level,t={error:0,warn:1,info:2,debug:3};return t[e]<=t[r]};let p=c},3648:(e,r,t)=>{"use strict";function s(e){if(!e||"string"!=typeof e)throw Error("Table name must be a non-empty string");if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(e))throw Error(`Invalid table name: ${e}. Must start with letter or underscore and contain only letters, digits, and underscores.`);if(["SELECT","FROM","WHERE","INSERT","UPDATE","DELETE","CREATE","DROP","ALTER","TABLE","INDEX","VIEW","TRIGGER","PRAGMA","VACUUM","REINDEX","EXPLAIN","QUERY","PLAN","TRANSACTION","BEGIN","COMMIT","ROLLBACK"].includes(e.toUpperCase()))throw Error(`Table name cannot be a reserved word: ${e}`);return`"${e}"`}function n(e){if(!e||"string"!=typeof e)throw Error("Column name must be a non-empty string");if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(e))throw Error(`Invalid column name: ${e}. Must start with letter or underscore and contain only letters, digits, and underscores.`);return`"${e}"`}t.d(r,{nZ:()=>s,r0:()=>n})}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[638,452,391],()=>t(7322));module.exports=s})();
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/tables/[name]/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/tables/route":[],"/Users/kona/Desktop/d1studio/src/app/api/tables/[name]/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/tables/[name]/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/tables/route":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/tables/[name]/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,7 +1,7 @@
1
- (()=>{var e={};e.id=761,e.ids=[761],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")},9646:e=>{"use strict";e.exports=require("child_process")},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")},328:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>q,routeModule:()=>x,serverHooks:()=>h,workAsyncStorage:()=>b,workUnitAsyncStorage:()=>w});var s={};t.r(s),t.d(s,{GET:()=>f,OPTIONS:()=>m});var o=t(2706),n=t(8203),a=t(5994),i=t(9187),u=t(8354),l=t(9646),c=t(5949),d=t(1804);let p=(0,u.promisify)(l.exec);async function g(e,r=3,t=1e3){for(let s=0;s<r;s++)try{return await e()}catch(e){if(s===r-1)throw e;if(e.message.includes("database is locked")){console.log(`Database locked, retrying in ${t}ms... (attempt ${s+1}/${r})`),await new Promise(e=>setTimeout(e,t));continue}throw e}}async function f(){d.A.logRequest("GET","/api/tables");try{var e;let r=process.env.D1_PROJECT_DIR;if(!r)return d.A.error("D1_PROJECT_DIR environment variable is not set"),i.NextResponse.json({error:"Project directory not configured"},{status:500});let t=await (0,c.S)(r);if(!t||!t.config)return d.A.error("No Wrangler configuration file found"),i.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let s=t.config;if(!s.d1_databases?.length)return i.NextResponse.json({error:"No D1 databases configured in Wrangler configuration"},{status:404});let o=s.d1_databases[0].database_name,n=`
1
+ (()=>{var e={};e.id=761,e.ids=[761],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")},9646:e=>{"use strict";e.exports=require("child_process")},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")},1296:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>q,routeModule:()=>x,serverHooks:()=>h,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>b});var s={};t.r(s),t.d(s,{GET:()=>f,OPTIONS:()=>m});var o=t(2706),n=t(8203),a=t(5994),i=t(9187),u=t(8354),l=t(9646),c=t(5949),p=t(1804);let d=(0,u.promisify)(l.exec);async function g(e,r=3,t=1e3){for(let s=0;s<r;s++)try{return await e()}catch(e){if(s===r-1)throw e;if(e.message.includes("database is locked")){console.log(`Database locked, retrying in ${t}ms... (attempt ${s+1}/${r})`),await new Promise(e=>setTimeout(e,t));continue}throw e}}async function f(){p.A.logRequest("GET","/api/tables");try{var e;let r=process.env.D1_PROJECT_DIR;if(!r)return p.A.error("D1_PROJECT_DIR environment variable is not set"),i.NextResponse.json({error:"Project directory not configured"},{status:500});let t=await (0,c.S)(r);if(!t||!t.config)return p.A.error("No Wrangler configuration file found"),i.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let s=t.config;if(!s.d1_databases?.length)return i.NextResponse.json({error:"No D1 databases configured in Wrangler configuration"},{status:404});let o=s.d1_databases[0].database_name,n=`
2
2
  SELECT name FROM sqlite_master
3
3
  WHERE type='table'
4
4
  AND name NOT LIKE 'sqlite_%'
5
5
  AND name NOT LIKE '_cf_%'
6
6
  ORDER BY name;
7
- `,{stdout:a}=await g(async()=>p(`wrangler d1 execute ${o} --local --command="${n}"`,{cwd:r,timeout:5e3})),u=(e=function(e){try{return JSON.parse(e)}catch(t){let r=-1!==e.indexOf("[")?e.indexOf("["):e.indexOf("{");if(-1===r)return null;try{let t=e.substring(r);return JSON.parse(t)}catch(e){return console.error("Error parsing JSON portion:",e),null}}}(a))?Array.isArray(e)&&e[0]?.results?e[0].results.map(e=>e.name):e.results?.[0]?.results?e.results[0].results.map(e=>e.name):[]:[];return i.NextResponse.json({success:!0,tables:u,debug:{projectDir:r,tableCount:u.length}})}catch(r){d.A.logError(r,"tables-route");let e={error:"Failed to fetch tables",details:r.message,debug:{errorCode:r.code,errorStack:r.stack}};return r.message.includes("database is locked")&&(e.error="Database is temporarily locked",e.retryAfter=1e3),i.NextResponse.json(e,{status:r.message.includes("database is locked")?503:500})}}async function m(){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 x=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/tables/route",pathname:"/api/tables",filename:"route",bundlePath:"app/api/tables/route"},resolvedPagePath:"/Users/kona/Desktop/d1studio/src/app/api/tables/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:b,workUnitAsyncStorage:w,serverHooks:h}=x;function q(){return(0,a.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:w})}},6487:()=>{},8335:()=>{},5949:(e,r,t)=>{"use strict";t.d(r,{S:()=>c});var s=t(9748),o=t(3149),n=t(2537),a=t(6789),i=t(1804);let u=null,l=null;async function c(e){try{let r;if(!e||"string"!=typeof e)throw Error("Project path is required and must be a string");if(u&&l===e)return u;let t=null,c=null;for(let r of["wrangler.toml","wrangler.json","wrangler.jsonc"])if(t=await (0,o.dJ)(r,{cwd:e})){c=r;break}if(!t)return i.A.warn(`No Wrangler configuration file found in: ${e}`),null;i.A.info(`Found ${c} at: ${t}`);let d=await (0,s.readFile)(t,"utf-8");return c.endsWith(".toml")?r=(0,n.parse)(d):(c.endsWith(".jsonc")&&(d=(0,a.A)(d)),r=JSON.parse(d)),u={config:r,projectPath:e},l=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:n,printf:a,colorize:i}=s.format,u="true"===process.env.DEBUG,l=a(({level:e,message:r,timestamp:t,...s})=>{let o=`${t} ${e}: ${r}`;return Object.keys(s).length>0&&(o+=` ${JSON.stringify(s)}`),o}),c=s.createLogger({level:u?"debug":"warn",format:o(n({format:"YYYY-MM-DD HH:mm:ss"}),i(),l),transports:[new s.transports.Console({level:u?"debug":"warn",silent:!1})]});c.logRequest=(e,r,t={})=>{c.debug(`Request: ${e} ${r}`,t)},c.logError=(e,r="unknown")=>{c.error(`Error in ${r}: ${e.message}`,{error:e.stack||e.message,source:r})},c.shouldLog=e=>{let r=c.level,t={error:0,warn:1,info:2,debug:3};return t[e]<=t[r]};let d=c}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[638,452,391],()=>t(328));module.exports=s})();
7
+ `,{stdout:a}=await g(async()=>d(`wrangler d1 execute ${o} --local --command="${n}"`,{cwd:r,timeout:5e3})),u=(e=function(e){try{return JSON.parse(e)}catch(t){let r=-1!==e.indexOf("[")?e.indexOf("["):e.indexOf("{");if(-1===r)return null;try{let t=e.substring(r);return JSON.parse(t)}catch(e){return console.error("Error parsing JSON portion:",e),null}}}(a))?Array.isArray(e)&&e[0]?.results?e[0].results.map(e=>e.name):e.results?.[0]?.results?e.results[0].results.map(e=>e.name):[]:[];return i.NextResponse.json({success:!0,tables:u,debug:{projectDir:r,tableCount:u.length}})}catch(r){p.A.logError(r,"tables-route");let e={error:"Failed to fetch tables",details:r.message,debug:{errorCode:r.code,errorStack:r.stack}};return r.message.includes("database is locked")&&(e.error="Database is temporarily locked",e.retryAfter=1e3),i.NextResponse.json(e,{status:r.message.includes("database is locked")?503:500})}}async function m(){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 x=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/tables/route",pathname:"/api/tables",filename:"route",bundlePath:"app/api/tables/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/tables/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:w,workUnitAsyncStorage:b,serverHooks:h}=x;function q(){return(0,a.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:b})}},6487:()=>{},8335:()=>{},5949:(e,r,t)=>{"use strict";t.d(r,{S:()=>c});var s=t(9748),o=t(3149),n=t(2537),a=t(6789),i=t(1804);let u=null,l=null;async function c(e){try{let r;if(!e||"string"!=typeof e)throw Error("Project path is required and must be a string");if(u&&l===e)return u;let t=null,c=null;for(let r of["wrangler.toml","wrangler.json","wrangler.jsonc"])if(t=await (0,o.dJ)(r,{cwd:e})){c=r;break}if(!t)return i.A.warn(`No Wrangler configuration file found in: ${e}`),null;i.A.info(`Found ${c} at: ${t}`);let p=await (0,s.readFile)(t,"utf-8");return c.endsWith(".toml")?r=(0,n.parse)(p):(c.endsWith(".jsonc")&&(p=(0,a.A)(p)),r=JSON.parse(p)),u={config:r,projectPath:e},l=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:()=>p});var s=t(6399);let{combine:o,timestamp:n,printf:a,colorize:i}=s.format,u="true"===process.env.DEBUG,l=a(({level:e,message:r,timestamp:t,...s})=>{let o=`${t} ${e}: ${r}`;return Object.keys(s).length>0&&(o+=` ${JSON.stringify(s)}`),o}),c=s.createLogger({level:u?"debug":"warn",format:o(n({format:"YYYY-MM-DD HH:mm:ss"}),i(),l),transports:[new s.transports.Console({level:u?"debug":"warn",silent:!1})]});c.logRequest=(e,r,t={})=>{c.debug(`Request: ${e} ${r}`,t)},c.logError=(e,r="unknown")=>{c.error(`Error in ${r}: ${e.message}`,{error:e.stack||e.message,source:r})},c.shouldLog=e=>{let r=c.level,t={error:0,warn:1,info:2,debug:3};return t[e]<=t[r]};let p=c}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[638,452,391],()=>t(1296));module.exports=s})();
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/tables/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/tables/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/tables/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/tables/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=437,e.ids=[437],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")},271:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>h,routeModule:()=>d,serverHooks:()=>x,workAsyncStorage:()=>c,workUnitAsyncStorage:()=>l});var s={};r.r(s),r.d(s,{GET:()=>i});var a=r(2706),o=r(8203),n=r(5994),p=r(9187);let u={rE:"0.2.11"};async function i(){try{let e=u.rE,t=await fetch("https://registry.npmjs.org/d1s/latest",{headers:{Accept:"application/json","User-Agent":"d1-studio"},cache:"no-cache"});if(!t.ok)throw Error("Failed to check for updates");let r=(await t.json()).version;if(r&&e&&r!==e)return console.log(`Update available: ${e} → ${r}`),p.NextResponse.json({update:{latest:r,current:e}});return p.NextResponse.json({update:null})}catch(e){return console.error("Error checking for updates:",e),p.NextResponse.json({update:null})}}let d=new a.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/update/route",pathname:"/api/update",filename:"route",bundlePath:"app/api/update/route"},resolvedPagePath:"/Users/kona/Desktop/d1studio/src/app/api/update/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:c,workUnitAsyncStorage:l,serverHooks:x}=d;function h(){return(0,n.patchFetch)({workAsyncStorage:c,workUnitAsyncStorage:l})}},6487:()=>{},8335:()=>{}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[638,452],()=>r(271));module.exports=s})();
1
+ (()=>{var e={};e.id=437,e.ids=[437],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")},1101:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>h,routeModule:()=>d,serverHooks:()=>x,workAsyncStorage:()=>c,workUnitAsyncStorage:()=>l});var s={};r.r(s),r.d(s,{GET:()=>i});var a=r(2706),o=r(8203),n=r(5994),p=r(9187);let u={rE:"0.2.13"};async function i(){try{let e=u.rE,t=await fetch("https://registry.npmjs.org/d1s/latest",{headers:{Accept:"application/json","User-Agent":"d1-studio"},cache:"no-cache"});if(!t.ok)throw Error("Failed to check for updates");let r=(await t.json()).version;if(r&&e&&r!==e)return console.log(`Update available: ${e} → ${r}`),p.NextResponse.json({update:{latest:r,current:e}});return p.NextResponse.json({update:null})}catch(e){return console.error("Error checking for updates:",e),p.NextResponse.json({update:null})}}let d=new a.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/update/route",pathname:"/api/update",filename:"route",bundlePath:"app/api/update/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/update/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:c,workUnitAsyncStorage:l,serverHooks:x}=d;function h(){return(0,n.patchFetch)({workAsyncStorage:c,workUnitAsyncStorage:l})}},6487:()=>{},8335:()=>{}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[638,452],()=>r(1101));module.exports=s})();
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/update/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/update/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/update/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/update/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":{}}