d1s 0.2.13 → 0.3.1

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 (406) hide show
  1. package/README.md +18 -1
  2. package/dist/.next/.next/BUILD_ID +1 -1
  3. package/dist/.next/.next/app-build-manifest.json +119 -77
  4. package/dist/.next/.next/app-path-routes-manifest.json +1 -1
  5. package/dist/.next/.next/build-manifest.json +7 -7
  6. package/dist/.next/.next/cache/.rscinfo +1 -1
  7. package/dist/.next/.next/cache/.tsbuildinfo +1 -1
  8. package/dist/.next/.next/cache/webpack/client-development/0.pack.gz +0 -0
  9. package/dist/.next/.next/cache/webpack/client-development/1.pack.gz +0 -0
  10. package/dist/.next/.next/cache/webpack/client-development/index.pack.gz +0 -0
  11. package/dist/.next/.next/cache/webpack/client-development/index.pack.gz.old +0 -0
  12. package/dist/.next/.next/cache/webpack/client-production/0.pack +0 -0
  13. package/dist/.next/.next/cache/webpack/client-production/1.pack +0 -0
  14. package/dist/.next/.next/cache/webpack/client-production/10.pack +0 -0
  15. package/dist/.next/.next/cache/webpack/client-production/11.pack +0 -0
  16. package/dist/.next/.next/cache/webpack/client-production/12.pack +0 -0
  17. package/dist/.next/.next/cache/webpack/client-production/2.pack +0 -0
  18. package/dist/.next/.next/cache/webpack/client-production/3.pack +0 -0
  19. package/dist/.next/.next/cache/webpack/client-production/4.pack +0 -0
  20. package/dist/.next/.next/cache/webpack/client-production/5.pack +0 -0
  21. package/dist/.next/.next/cache/webpack/client-production/6.pack +0 -0
  22. package/dist/.next/.next/cache/webpack/client-production/7.pack +0 -0
  23. package/dist/.next/.next/cache/webpack/client-production/8.pack +0 -0
  24. package/dist/.next/.next/cache/webpack/client-production/9.pack +0 -0
  25. package/dist/.next/.next/cache/webpack/client-production/index.pack +0 -0
  26. package/dist/.next/.next/cache/webpack/client-production/index.pack.old +0 -0
  27. package/dist/.next/.next/cache/webpack/edge-server-production/index.pack +0 -0
  28. package/dist/.next/.next/cache/webpack/server-development/0.pack.gz +0 -0
  29. package/dist/.next/.next/cache/webpack/server-development/1.pack.gz +0 -0
  30. package/dist/.next/.next/cache/webpack/server-development/index.pack.gz +0 -0
  31. package/dist/.next/.next/cache/webpack/server-production/0.pack +0 -0
  32. package/dist/.next/.next/cache/webpack/server-production/1.pack +0 -0
  33. package/dist/.next/.next/cache/webpack/server-production/2.pack +0 -0
  34. package/dist/.next/.next/cache/webpack/server-production/3.pack +0 -0
  35. package/dist/.next/.next/cache/webpack/server-production/index.pack +0 -0
  36. package/dist/.next/.next/cache/webpack/server-production/index.pack.old +0 -0
  37. package/dist/.next/.next/next-minimal-server.js.nft.json +1 -1
  38. package/dist/.next/.next/next-server.js.nft.json +1 -1
  39. package/dist/.next/.next/prerender-manifest.json +1 -1
  40. package/dist/.next/.next/react-loadable-manifest.json +11 -1
  41. package/dist/.next/.next/required-server-files.json +1 -1
  42. package/dist/.next/.next/routes-manifest.json +1 -1
  43. package/dist/.next/.next/server/app/_not-found/page.js +1 -1
  44. package/dist/.next/.next/server/app/_not-found/page.js.nft.json +1 -1
  45. package/dist/.next/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  46. package/dist/.next/.next/server/app/_not-found.html +1 -1
  47. package/dist/.next/.next/server/app/_not-found.rsc +5 -5
  48. package/dist/.next/.next/server/app/api/cloudflare/route.js +1 -1
  49. package/dist/.next/.next/server/app/api/cloudflare/route.js.nft.json +1 -1
  50. package/dist/.next/.next/server/app/api/cloudflare/route_client-reference-manifest.js +1 -1
  51. package/dist/.next/.next/server/app/api/databases/route.js +1 -1
  52. package/dist/.next/.next/server/app/api/databases/route.js.nft.json +1 -1
  53. package/dist/.next/.next/server/app/api/databases/route_client-reference-manifest.js +1 -1
  54. package/dist/.next/.next/server/app/api/migrations/list/route.js +26 -0
  55. package/dist/.next/.next/server/app/api/migrations/list/route.js.nft.json +1 -0
  56. package/dist/.next/.next/server/app/api/migrations/list/route_client-reference-manifest.js +1 -0
  57. package/dist/.next/.next/server/app/api/migrations/sync/route.js +5 -5
  58. package/dist/.next/.next/server/app/api/migrations/sync/route.js.nft.json +1 -1
  59. package/dist/.next/.next/server/app/api/migrations/sync/route_client-reference-manifest.js +1 -1
  60. package/dist/.next/.next/server/app/api/migrations/sync-files/route.js +4 -4
  61. package/dist/.next/.next/server/app/api/migrations/sync-files/route.js.nft.json +1 -1
  62. package/dist/.next/.next/server/app/api/migrations/sync-files/route_client-reference-manifest.js +1 -1
  63. package/dist/.next/.next/server/app/api/pro/route.js +1 -0
  64. package/dist/.next/.next/server/app/api/pro/route.js.nft.json +1 -0
  65. package/dist/.next/.next/server/app/api/pro/route_client-reference-manifest.js +1 -0
  66. package/dist/.next/.next/server/app/api/pull-data/confirm/route.js +1 -1
  67. package/dist/.next/.next/server/app/api/pull-data/confirm/route.js.nft.json +1 -1
  68. package/dist/.next/.next/server/app/api/pull-data/confirm/route_client-reference-manifest.js +1 -1
  69. package/dist/.next/.next/server/app/api/pull-remote/confirm/route.js +4 -4
  70. package/dist/.next/.next/server/app/api/pull-remote/confirm/route.js.nft.json +1 -1
  71. package/dist/.next/.next/server/app/api/pull-remote/confirm/route_client-reference-manifest.js +1 -1
  72. package/dist/.next/.next/server/app/api/pull-remote/preview/route.js +4 -4
  73. package/dist/.next/.next/server/app/api/pull-remote/preview/route.js.nft.json +1 -1
  74. package/dist/.next/.next/server/app/api/pull-remote/preview/route_client-reference-manifest.js +1 -1
  75. package/dist/.next/.next/server/app/api/push-remote/confirm/route.js +6 -6
  76. package/dist/.next/.next/server/app/api/push-remote/confirm/route.js.nft.json +1 -1
  77. package/dist/.next/.next/server/app/api/push-remote/confirm/route_client-reference-manifest.js +1 -1
  78. package/dist/.next/.next/server/app/api/push-remote/preview/route.js +6 -6
  79. package/dist/.next/.next/server/app/api/push-remote/preview/route.js.nft.json +1 -1
  80. package/dist/.next/.next/server/app/api/push-remote/preview/route_client-reference-manifest.js +1 -1
  81. package/dist/.next/.next/server/app/api/query/route.js +9 -9
  82. package/dist/.next/.next/server/app/api/query/route.js.nft.json +1 -1
  83. package/dist/.next/.next/server/app/api/query/route_client-reference-manifest.js +1 -1
  84. package/dist/.next/.next/server/app/api/schema/route.js +1 -0
  85. package/dist/.next/.next/server/app/api/schema/route.js.nft.json +1 -0
  86. package/dist/.next/.next/server/app/api/schema/route_client-reference-manifest.js +1 -0
  87. package/dist/.next/.next/server/app/api/tables/[name]/import/route.js +1 -0
  88. package/dist/.next/.next/server/app/api/tables/[name]/import/route.js.nft.json +1 -0
  89. package/dist/.next/.next/server/app/api/tables/[name]/import/route_client-reference-manifest.js +1 -0
  90. package/dist/.next/.next/server/app/api/tables/[name]/route.js +5 -5
  91. package/dist/.next/.next/server/app/api/tables/[name]/route.js.nft.json +1 -1
  92. package/dist/.next/.next/server/app/api/tables/[name]/route_client-reference-manifest.js +1 -1
  93. package/dist/.next/.next/server/app/api/tables/route.js +2 -2
  94. package/dist/.next/.next/server/app/api/tables/route.js.nft.json +1 -1
  95. package/dist/.next/.next/server/app/api/tables/route_client-reference-manifest.js +1 -1
  96. package/dist/.next/.next/server/app/api/time-travel/preview/route.js +1 -0
  97. package/dist/.next/.next/server/app/api/time-travel/preview/route.js.nft.json +1 -0
  98. package/dist/.next/.next/server/app/api/time-travel/preview/route_client-reference-manifest.js +1 -0
  99. package/dist/.next/.next/server/app/api/time-travel/restore/route.js +1 -0
  100. package/dist/.next/.next/server/app/api/time-travel/restore/route.js.nft.json +1 -0
  101. package/dist/.next/.next/server/app/api/time-travel/restore/route_client-reference-manifest.js +1 -0
  102. package/dist/.next/.next/server/app/api/update/route.js +1 -1
  103. package/dist/.next/.next/server/app/api/update/route.js.nft.json +1 -1
  104. package/dist/.next/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
  105. package/dist/.next/.next/server/app/index.html +5 -3
  106. package/dist/.next/.next/server/app/index.rsc +6 -6
  107. package/dist/.next/.next/server/app/page.js +15 -15
  108. package/dist/.next/.next/server/app/page.js.nft.json +1 -1
  109. package/dist/.next/.next/server/app/page_client-reference-manifest.js +1 -1
  110. package/dist/.next/.next/server/app-paths-manifest.json +8 -2
  111. package/dist/.next/.next/server/chunks/226.js +12 -12
  112. package/dist/.next/.next/server/chunks/452.js +1 -1
  113. package/dist/.next/.next/server/chunks/487.js +1 -0
  114. package/dist/.next/.next/server/chunks/572.js +1 -1
  115. package/dist/.next/.next/server/chunks/992.js +2 -2
  116. package/dist/.next/.next/server/chunks/{638.js → 994.js} +3 -3
  117. package/dist/.next/.next/server/middleware-build-manifest.js +1 -1
  118. package/dist/.next/.next/server/middleware-react-loadable-manifest.js +1 -1
  119. package/dist/.next/.next/server/next-font-manifest.js +1 -1
  120. package/dist/.next/.next/server/next-font-manifest.json +1 -1
  121. package/dist/.next/.next/server/pages/404.html +1 -1
  122. package/dist/.next/.next/server/pages/500.html +1 -1
  123. package/dist/.next/.next/server/server-reference-manifest.json +1 -1
  124. package/dist/.next/.next/static/-OO4tE7EKr8o62Bne-ODo/_buildManifest.js +1 -0
  125. package/dist/.next/.next/static/3kAeIJC56X7aw1Fk5_OXO/_buildManifest.js +1 -0
  126. package/dist/.next/.next/static/J8r9W6xxmYYvuKehItNuW/_buildManifest.js +1 -0
  127. package/dist/.next/.next/static/ZmKZbpam0G_d3SphfZPJ7/_buildManifest.js +1 -0
  128. package/dist/.next/.next/static/arc9h7hbaQzL1Dl0iuVrT/_buildManifest.js +1 -0
  129. package/dist/.next/.next/static/chunks/1a258343.3b3e7ba5ba0bd0d2.js +1 -0
  130. package/dist/.next/.next/static/chunks/345.8fc37569d5708622.js +1 -0
  131. package/dist/.next/.next/static/chunks/480-85b6c8ae3f51b156.js +1 -0
  132. package/dist/.next/.next/static/chunks/52.2cdc9bdb75e1fc2e.js +1 -0
  133. package/dist/.next/.next/static/chunks/803-a2fcfbd00e6b3b38.js +1 -0
  134. package/dist/.next/.next/static/chunks/{92-5f7522943fcb72a8.js → 92-a84bdac2be7c8d7a.js} +1 -1
  135. package/dist/.next/.next/static/chunks/app/api/cloudflare/route-d0c1dc2a9e7dce36.js +1 -0
  136. package/dist/.next/.next/static/chunks/app/api/databases/route-cd322321212797cf.js +1 -0
  137. package/dist/.next/.next/static/chunks/app/api/migrations/list/route-cd710ff75b6bcd02.js +1 -0
  138. package/dist/.next/.next/static/chunks/app/api/migrations/sync/route-ee522f232b9f0a9c.js +1 -0
  139. package/dist/.next/.next/static/chunks/app/api/migrations/sync-files/route-79ee2c26f87d3bc7.js +1 -0
  140. package/dist/.next/.next/static/chunks/app/api/pro/route-c90c1f901fc00d38.js +1 -0
  141. package/dist/.next/.next/static/chunks/app/api/pull-data/confirm/route-118764086af798f8.js +1 -0
  142. package/dist/.next/.next/static/chunks/app/api/pull-remote/confirm/route-2b0ade4ebfcea0bc.js +1 -0
  143. package/dist/.next/.next/static/chunks/app/api/pull-remote/preview/route-342db7ea13e6f447.js +1 -0
  144. package/dist/.next/.next/static/chunks/app/api/push-remote/confirm/route-b778c053bd515abd.js +1 -0
  145. package/dist/.next/.next/static/chunks/app/api/push-remote/preview/route-ab090482f299f57f.js +1 -0
  146. package/dist/.next/.next/static/chunks/app/api/query/route-4d21a8b1d34491f1.js +1 -0
  147. package/dist/.next/.next/static/chunks/app/api/schema/route-cb17a387d6b557ad.js +1 -0
  148. package/dist/.next/.next/static/chunks/app/api/tables/[name]/import/route-510472de7a5c29bd.js +1 -0
  149. package/dist/.next/.next/static/chunks/app/api/tables/[name]/route-6a1fa95c303ce0de.js +1 -0
  150. package/dist/.next/.next/static/chunks/app/api/tables/route-daa975df4ea8e8f8.js +1 -0
  151. package/dist/.next/.next/static/chunks/app/api/time-travel/preview/route-5787d7e8f17bd539.js +1 -0
  152. package/dist/.next/.next/static/chunks/app/api/time-travel/restore/route-84b64a27e831e21c.js +1 -0
  153. package/dist/.next/.next/static/chunks/app/api/update/route-54ee900537982652.js +1 -0
  154. package/dist/.next/.next/static/chunks/app/{layout-40ec07d04681ba81.js → layout-f0ec4d636ee0f763.js} +1 -1
  155. package/dist/.next/.next/static/chunks/app/page-358bf2112802ff85.js +1 -0
  156. package/dist/.next/.next/static/chunks/app/page-3ec9d72ecb052d39.js +1 -0
  157. package/dist/.next/.next/static/chunks/webpack-024900a94af4f0a7.js +1 -0
  158. package/dist/.next/.next/static/css/2c165a0ede9b2442.css +3 -0
  159. package/dist/.next/.next/static/css/32df9a4d493f8b0f.css +31 -0
  160. package/dist/.next/.next/static/f_PVCmmSeM5SwW3M1tw7Q/_buildManifest.js +1 -0
  161. package/dist/.next/.next/static/fiesjBWbrmSSyLf4biwrX/_buildManifest.js +1 -0
  162. package/dist/.next/.next/static/ft39e6W6vSgUL7peRo7pE/_buildManifest.js +1 -0
  163. package/dist/.next/.next/static/media/4cf2300e9c8272f7-s.p.woff2 +0 -0
  164. package/dist/.next/.next/static/u7ssdTycF4iQ-w-pQZhxg/_buildManifest.js +1 -0
  165. package/dist/.next/.next/static/v-i2YsOGT890zutOSiqqK/_buildManifest.js +1 -0
  166. package/dist/.next/.next/trace +3 -3
  167. package/dist/.next/.next/types/app/api/migrations/list/route.ts +347 -0
  168. package/dist/.next/.next/types/app/api/pro/route.ts +347 -0
  169. package/dist/.next/.next/types/app/api/schema/route.ts +347 -0
  170. package/dist/.next/.next/types/app/api/tables/[name]/import/route.ts +347 -0
  171. package/dist/.next/.next/types/app/api/time-travel/preview/route.ts +347 -0
  172. package/dist/.next/.next/types/app/api/time-travel/restore/route.ts +347 -0
  173. package/dist/.next/BUILD_ID +1 -1
  174. package/dist/.next/app-build-manifest.json +122 -80
  175. package/dist/.next/app-path-routes-manifest.json +1 -1
  176. package/dist/.next/build-manifest.json +7 -7
  177. package/dist/.next/cache/.rscinfo +1 -1
  178. package/dist/.next/cache/.tsbuildinfo +1 -1
  179. package/dist/.next/cache/webpack/client-production/0.pack +0 -0
  180. package/dist/.next/cache/webpack/client-production/index.pack +0 -0
  181. package/dist/.next/cache/webpack/edge-server-production/index.pack +0 -0
  182. package/dist/.next/cache/webpack/server-production/0.pack +0 -0
  183. package/dist/.next/cache/webpack/server-production/index.pack +0 -0
  184. package/dist/.next/next-minimal-server.js.nft.json +1 -1
  185. package/dist/.next/next-server.js.nft.json +1 -1
  186. package/dist/.next/prerender-manifest.json +1 -1
  187. package/dist/.next/react-loadable-manifest.json +11 -1
  188. package/dist/.next/required-server-files.json +1 -1
  189. package/dist/.next/routes-manifest.json +1 -1
  190. package/dist/.next/server/app/_not-found/page.js +1 -1
  191. package/dist/.next/server/app/_not-found/page.js.nft.json +1 -1
  192. package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  193. package/dist/.next/server/app/_not-found.html +1 -1
  194. package/dist/.next/server/app/_not-found.rsc +5 -5
  195. package/dist/.next/server/app/api/cloudflare/route.js +1 -1
  196. package/dist/.next/server/app/api/cloudflare/route.js.nft.json +1 -1
  197. package/dist/.next/server/app/api/cloudflare/route_client-reference-manifest.js +1 -1
  198. package/dist/.next/server/app/api/databases/route.js +1 -1
  199. package/dist/.next/server/app/api/databases/route.js.nft.json +1 -1
  200. package/dist/.next/server/app/api/databases/route_client-reference-manifest.js +1 -1
  201. package/dist/.next/server/app/api/migrations/list/route.js +26 -0
  202. package/dist/.next/server/app/api/migrations/list/route.js.nft.json +1 -0
  203. package/dist/.next/server/app/api/migrations/list/route_client-reference-manifest.js +1 -0
  204. package/dist/.next/server/app/api/migrations/sync/route.js +5 -5
  205. package/dist/.next/server/app/api/migrations/sync/route.js.nft.json +1 -1
  206. package/dist/.next/server/app/api/migrations/sync/route_client-reference-manifest.js +1 -1
  207. package/dist/.next/server/app/api/migrations/sync-files/route.js +4 -4
  208. package/dist/.next/server/app/api/migrations/sync-files/route.js.nft.json +1 -1
  209. package/dist/.next/server/app/api/migrations/sync-files/route_client-reference-manifest.js +1 -1
  210. package/dist/.next/server/app/api/pro/route.js +1 -0
  211. package/dist/.next/server/app/api/pro/route.js.nft.json +1 -0
  212. package/dist/.next/server/app/api/pro/route_client-reference-manifest.js +1 -0
  213. package/dist/.next/server/app/api/pull-data/confirm/route.js +1 -1
  214. package/dist/.next/server/app/api/pull-data/confirm/route.js.nft.json +1 -1
  215. package/dist/.next/server/app/api/pull-data/confirm/route_client-reference-manifest.js +1 -1
  216. package/dist/.next/server/app/api/pull-remote/confirm/route.js +4 -4
  217. package/dist/.next/server/app/api/pull-remote/confirm/route.js.nft.json +1 -1
  218. package/dist/.next/server/app/api/pull-remote/confirm/route_client-reference-manifest.js +1 -1
  219. package/dist/.next/server/app/api/pull-remote/preview/route.js +4 -4
  220. package/dist/.next/server/app/api/pull-remote/preview/route.js.nft.json +1 -1
  221. package/dist/.next/server/app/api/pull-remote/preview/route_client-reference-manifest.js +1 -1
  222. package/dist/.next/server/app/api/push-remote/confirm/route.js +6 -6
  223. package/dist/.next/server/app/api/push-remote/confirm/route.js.nft.json +1 -1
  224. package/dist/.next/server/app/api/push-remote/confirm/route_client-reference-manifest.js +1 -1
  225. package/dist/.next/server/app/api/push-remote/preview/route.js +6 -6
  226. package/dist/.next/server/app/api/push-remote/preview/route.js.nft.json +1 -1
  227. package/dist/.next/server/app/api/push-remote/preview/route_client-reference-manifest.js +1 -1
  228. package/dist/.next/server/app/api/query/route.js +9 -9
  229. package/dist/.next/server/app/api/query/route.js.nft.json +1 -1
  230. package/dist/.next/server/app/api/query/route_client-reference-manifest.js +1 -1
  231. package/dist/.next/server/app/api/schema/route.js +1 -0
  232. package/dist/.next/server/app/api/schema/route.js.nft.json +1 -0
  233. package/dist/.next/server/app/api/schema/route_client-reference-manifest.js +1 -0
  234. package/dist/.next/server/app/api/tables/[name]/import/route.js +1 -0
  235. package/dist/.next/server/app/api/tables/[name]/import/route.js.nft.json +1 -0
  236. package/dist/.next/server/app/api/tables/[name]/import/route_client-reference-manifest.js +1 -0
  237. package/dist/.next/server/app/api/tables/[name]/route.js +5 -5
  238. package/dist/.next/server/app/api/tables/[name]/route.js.nft.json +1 -1
  239. package/dist/.next/server/app/api/tables/[name]/route_client-reference-manifest.js +1 -1
  240. package/dist/.next/server/app/api/tables/route.js +2 -2
  241. package/dist/.next/server/app/api/tables/route.js.nft.json +1 -1
  242. package/dist/.next/server/app/api/tables/route_client-reference-manifest.js +1 -1
  243. package/dist/.next/server/app/api/time-travel/preview/route.js +1 -0
  244. package/dist/.next/server/app/api/time-travel/preview/route.js.nft.json +1 -0
  245. package/dist/.next/server/app/api/time-travel/preview/route_client-reference-manifest.js +1 -0
  246. package/dist/.next/server/app/api/time-travel/restore/route.js +1 -0
  247. package/dist/.next/server/app/api/time-travel/restore/route.js.nft.json +1 -0
  248. package/dist/.next/server/app/api/time-travel/restore/route_client-reference-manifest.js +1 -0
  249. package/dist/.next/server/app/api/update/route.js +1 -1
  250. package/dist/.next/server/app/api/update/route.js.nft.json +1 -1
  251. package/dist/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
  252. package/dist/.next/server/app/index.html +5 -3
  253. package/dist/.next/server/app/index.rsc +6 -6
  254. package/dist/.next/server/app/page.js +15 -15
  255. package/dist/.next/server/app/page.js.nft.json +1 -1
  256. package/dist/.next/server/app/page_client-reference-manifest.js +1 -1
  257. package/dist/.next/server/app-paths-manifest.json +11 -5
  258. package/dist/.next/server/chunks/226.js +12 -12
  259. package/dist/.next/server/chunks/391.js +1 -1
  260. package/dist/.next/server/chunks/452.js +1 -1
  261. package/dist/.next/server/chunks/487.js +1 -0
  262. package/dist/.next/server/chunks/572.js +1 -1
  263. package/dist/.next/server/chunks/992.js +3 -3
  264. package/dist/.next/server/chunks/{638.js → 994.js} +3 -3
  265. package/dist/.next/server/middleware-build-manifest.js +1 -1
  266. package/dist/.next/server/middleware-react-loadable-manifest.js +1 -1
  267. package/dist/.next/server/next-font-manifest.js +1 -1
  268. package/dist/.next/server/next-font-manifest.json +1 -1
  269. package/dist/.next/server/pages/404.html +1 -1
  270. package/dist/.next/server/pages/500.html +1 -1
  271. package/dist/.next/server/pages-manifest.json +1 -1
  272. package/dist/.next/server/server-reference-manifest.json +1 -1
  273. package/dist/.next/static/chunks/1a258343.3b3e7ba5ba0bd0d2.js +1 -0
  274. package/dist/.next/static/chunks/345.8fc37569d5708622.js +1 -0
  275. package/dist/.next/static/chunks/480-85b6c8ae3f51b156.js +1 -0
  276. package/dist/.next/static/chunks/52.2cdc9bdb75e1fc2e.js +1 -0
  277. package/dist/.next/static/chunks/803-a2fcfbd00e6b3b38.js +1 -0
  278. package/dist/.next/static/chunks/{92-5f7522943fcb72a8.js → 92-a84bdac2be7c8d7a.js} +1 -1
  279. package/dist/.next/static/chunks/app/api/cloudflare/route-d0c1dc2a9e7dce36.js +1 -0
  280. package/dist/.next/static/chunks/app/api/databases/route-cd322321212797cf.js +1 -0
  281. package/dist/.next/static/chunks/app/api/migrations/list/route-cd710ff75b6bcd02.js +1 -0
  282. package/dist/.next/static/chunks/app/api/migrations/sync/route-ee522f232b9f0a9c.js +1 -0
  283. package/dist/.next/static/chunks/app/api/migrations/sync-files/route-79ee2c26f87d3bc7.js +1 -0
  284. package/dist/.next/static/chunks/app/api/pro/route-c90c1f901fc00d38.js +1 -0
  285. package/dist/.next/static/chunks/app/api/pull-data/confirm/route-118764086af798f8.js +1 -0
  286. package/dist/.next/static/chunks/app/api/pull-remote/confirm/route-2b0ade4ebfcea0bc.js +1 -0
  287. package/dist/.next/static/chunks/app/api/pull-remote/preview/route-342db7ea13e6f447.js +1 -0
  288. package/dist/.next/static/chunks/app/api/push-remote/confirm/route-b778c053bd515abd.js +1 -0
  289. package/dist/.next/static/chunks/app/api/push-remote/preview/route-ab090482f299f57f.js +1 -0
  290. package/dist/.next/static/chunks/app/api/query/route-4d21a8b1d34491f1.js +1 -0
  291. package/dist/.next/static/chunks/app/api/schema/route-cb17a387d6b557ad.js +1 -0
  292. package/dist/.next/static/chunks/app/api/tables/[name]/import/route-510472de7a5c29bd.js +1 -0
  293. package/dist/.next/static/chunks/app/api/tables/[name]/route-6a1fa95c303ce0de.js +1 -0
  294. package/dist/.next/static/chunks/app/api/tables/route-daa975df4ea8e8f8.js +1 -0
  295. package/dist/.next/static/chunks/app/api/time-travel/preview/route-5787d7e8f17bd539.js +1 -0
  296. package/dist/.next/static/chunks/app/api/time-travel/restore/route-84b64a27e831e21c.js +1 -0
  297. package/dist/.next/static/chunks/app/api/update/route-54ee900537982652.js +1 -0
  298. package/dist/.next/static/chunks/app/{layout-40ec07d04681ba81.js → layout-f0ec4d636ee0f763.js} +1 -1
  299. package/dist/.next/static/chunks/app/page-358bf2112802ff85.js +1 -0
  300. package/dist/.next/static/chunks/webpack-024900a94af4f0a7.js +1 -0
  301. package/dist/.next/static/css/2c165a0ede9b2442.css +3 -0
  302. package/dist/.next/static/css/32df9a4d493f8b0f.css +31 -0
  303. package/dist/.next/static/media/4cf2300e9c8272f7-s.p.woff2 +0 -0
  304. package/dist/.next/static/zh4Fz2tbm8GRka4woRrGp/_buildManifest.js +1 -0
  305. package/dist/.next/static/zh4Fz2tbm8GRka4woRrGp/_ssgManifest.js +1 -0
  306. package/dist/.next/trace +18 -3
  307. package/dist/.next/types/app/api/migrations/list/route.ts +347 -0
  308. package/dist/.next/types/app/api/pro/route.ts +347 -0
  309. package/dist/.next/types/app/api/schema/route.ts +347 -0
  310. package/dist/.next/types/app/api/tables/[name]/import/route.ts +347 -0
  311. package/dist/.next/types/app/api/time-travel/preview/route.ts +347 -0
  312. package/dist/.next/types/app/api/time-travel/restore/route.ts +347 -0
  313. package/dist/app/api/databases/route.js +2 -1
  314. package/dist/app/api/migrations/list/route.js +137 -0
  315. package/dist/app/api/migrations/sync-files/route.js +2 -1
  316. package/dist/app/api/pro/route.js +7 -0
  317. package/dist/app/api/pull-remote/confirm/route.js +138 -146
  318. package/dist/app/api/pull-remote/preview/route.js +49 -84
  319. package/dist/app/api/push-remote/confirm/route.js +31 -12
  320. package/dist/app/api/push-remote/preview/route.js +27 -12
  321. package/dist/app/api/query/route.js +24 -13
  322. package/dist/app/api/schema/route.js +63 -0
  323. package/dist/app/api/tables/[name]/import/route.js +112 -0
  324. package/dist/app/api/tables/[name]/route.js +38 -29
  325. package/dist/app/api/tables/route.js +29 -16
  326. package/dist/app/api/time-travel/preview/route.js +122 -0
  327. package/dist/app/api/time-travel/restore/route.js +106 -0
  328. package/dist/app/page.jsx +26 -8
  329. package/dist/d1-studio.js +129 -23
  330. package/dist/lib/license.js +99 -71
  331. package/dist/lib/local-db.js +223 -0
  332. package/dist/lib/migrations.js +40 -2
  333. package/dist/lib/parse-sql-error.js +99 -160
  334. package/dist/lib/sql-operations.js +28 -10
  335. package/dist/lib/telemetry.js +39 -0
  336. package/package.json +6 -2
  337. package/dist/.next/.next/static/FEsQ9jwPUQv5A3fwg6Opl/_buildManifest.js +0 -1
  338. package/dist/.next/.next/static/Y9mYu4WBghepP5oT_3OdR/_buildManifest.js +0 -1
  339. package/dist/.next/.next/static/ae3gNmoSGm-R5LJC4UagI/_buildManifest.js +0 -1
  340. package/dist/.next/.next/static/bKfUJeuvAQlBmR3TjrfkH/_buildManifest.js +0 -1
  341. package/dist/.next/.next/static/chunks/576-18a2209e1ed26aad.js +0 -1
  342. package/dist/.next/.next/static/chunks/735-b885dfec6353171d.js +0 -1
  343. package/dist/.next/.next/static/chunks/app/api/cloudflare/route-b77846f372b01f38.js +0 -1
  344. package/dist/.next/.next/static/chunks/app/api/databases/route-407794f8145d9a0b.js +0 -1
  345. package/dist/.next/.next/static/chunks/app/api/migrations/sync/route-9f480f5590369a8f.js +0 -1
  346. package/dist/.next/.next/static/chunks/app/api/migrations/sync-files/route-92010db279b4dd8e.js +0 -1
  347. package/dist/.next/.next/static/chunks/app/api/pull-data/confirm/route-a02fe6d3cdd0a535.js +0 -1
  348. package/dist/.next/.next/static/chunks/app/api/pull-remote/confirm/route-f401a03507d1da50.js +0 -1
  349. package/dist/.next/.next/static/chunks/app/api/pull-remote/preview/route-3c53814b5cb8b6b0.js +0 -1
  350. package/dist/.next/.next/static/chunks/app/api/push-remote/confirm/route-8f359249e907c63b.js +0 -1
  351. package/dist/.next/.next/static/chunks/app/api/push-remote/preview/route-b51bf94f39c17a9d.js +0 -1
  352. package/dist/.next/.next/static/chunks/app/api/query/route-87bae2d4aebaf859.js +0 -1
  353. package/dist/.next/.next/static/chunks/app/api/tables/[name]/route-d20ca163b9c03e7c.js +0 -1
  354. package/dist/.next/.next/static/chunks/app/api/tables/route-0f46f911562abcdf.js +0 -1
  355. package/dist/.next/.next/static/chunks/app/api/update/route-14edc1917760bce0.js +0 -1
  356. package/dist/.next/.next/static/chunks/app/page-f05cd0fc436bf9bc.js +0 -1
  357. package/dist/.next/.next/static/chunks/app/page-f2bc307c0d8acdaa.js +0 -1
  358. package/dist/.next/.next/static/chunks/webpack-c76ac1e586b2802a.js +0 -1
  359. package/dist/.next/.next/static/css/7c16f57d325d0d7d.css +0 -3
  360. package/dist/.next/.next/static/ejYPqJ2kVicVp5EFWOZIC/_buildManifest.js +0 -1
  361. package/dist/.next/.next/static/gABGrAoO8IPArDo_Ns_7g/_buildManifest.js +0 -1
  362. package/dist/.next/.next/static/gh-QfIUVo4FTTduYCVKT6/_buildManifest.js +0 -1
  363. package/dist/.next/.next/static/media/569ce4b8f30dc480-s.p.woff2 +0 -0
  364. package/dist/.next/.next/static/thaCy2qVeNqYYhdayr13C/_buildManifest.js +0 -1
  365. package/dist/.next/.next/static/ybCx6L6gHqtODbKmlhU-d/_buildManifest.js +0 -1
  366. package/dist/.next/cache/webpack/client-production/1.pack +0 -0
  367. package/dist/.next/cache/webpack/client-production/2.pack +0 -0
  368. package/dist/.next/cache/webpack/client-production/index.pack.old +0 -0
  369. package/dist/.next/static/IX-QLbm7scYnyqWeeimal/_buildManifest.js +0 -1
  370. package/dist/.next/static/chunks/576-18a2209e1ed26aad.js +0 -1
  371. package/dist/.next/static/chunks/735-b885dfec6353171d.js +0 -1
  372. package/dist/.next/static/chunks/app/api/cloudflare/route-b77846f372b01f38.js +0 -1
  373. package/dist/.next/static/chunks/app/api/databases/route-407794f8145d9a0b.js +0 -1
  374. package/dist/.next/static/chunks/app/api/migrations/sync/route-9f480f5590369a8f.js +0 -1
  375. package/dist/.next/static/chunks/app/api/migrations/sync-files/route-92010db279b4dd8e.js +0 -1
  376. package/dist/.next/static/chunks/app/api/pull-data/confirm/route-a02fe6d3cdd0a535.js +0 -1
  377. package/dist/.next/static/chunks/app/api/pull-remote/confirm/route-f401a03507d1da50.js +0 -1
  378. package/dist/.next/static/chunks/app/api/pull-remote/preview/route-3c53814b5cb8b6b0.js +0 -1
  379. package/dist/.next/static/chunks/app/api/push-remote/confirm/route-8f359249e907c63b.js +0 -1
  380. package/dist/.next/static/chunks/app/api/push-remote/preview/route-b51bf94f39c17a9d.js +0 -1
  381. package/dist/.next/static/chunks/app/api/query/route-87bae2d4aebaf859.js +0 -1
  382. package/dist/.next/static/chunks/app/api/tables/[name]/route-d20ca163b9c03e7c.js +0 -1
  383. package/dist/.next/static/chunks/app/api/tables/route-0f46f911562abcdf.js +0 -1
  384. package/dist/.next/static/chunks/app/api/update/route-14edc1917760bce0.js +0 -1
  385. package/dist/.next/static/chunks/app/page-f05cd0fc436bf9bc.js +0 -1
  386. package/dist/.next/static/chunks/webpack-c76ac1e586b2802a.js +0 -1
  387. package/dist/.next/static/css/7c16f57d325d0d7d.css +0 -3
  388. package/dist/.next/static/media/569ce4b8f30dc480-s.p.woff2 +0 -0
  389. /package/dist/.next/.next/static/{FEsQ9jwPUQv5A3fwg6Opl → -OO4tE7EKr8o62Bne-ODo}/_ssgManifest.js +0 -0
  390. /package/dist/.next/.next/static/{Y9mYu4WBghepP5oT_3OdR → 3kAeIJC56X7aw1Fk5_OXO}/_ssgManifest.js +0 -0
  391. /package/dist/.next/.next/static/{ae3gNmoSGm-R5LJC4UagI → J8r9W6xxmYYvuKehItNuW}/_ssgManifest.js +0 -0
  392. /package/dist/.next/.next/static/{bKfUJeuvAQlBmR3TjrfkH → ZmKZbpam0G_d3SphfZPJ7}/_ssgManifest.js +0 -0
  393. /package/dist/.next/.next/static/{ejYPqJ2kVicVp5EFWOZIC → arc9h7hbaQzL1Dl0iuVrT}/_ssgManifest.js +0 -0
  394. /package/dist/.next/.next/static/chunks/{4bd1b696-8c908eb707f85a27.js → 4bd1b696-124ea104c06f6cea.js} +0 -0
  395. /package/dist/.next/.next/static/chunks/{517-3b698a5d3da06ff7.js → 517-c876ce2f00030cd0.js} +0 -0
  396. /package/dist/.next/.next/static/chunks/{692-ede418e1d28a1394.js → 692-9e59d546afd11ec3.js} +0 -0
  397. /package/dist/.next/.next/static/chunks/app/_not-found/{page-b786c3dd79ad15a5.js → page-3e24b81707d98126.js} +0 -0
  398. /package/dist/.next/.next/static/{gABGrAoO8IPArDo_Ns_7g → f_PVCmmSeM5SwW3M1tw7Q}/_ssgManifest.js +0 -0
  399. /package/dist/.next/.next/static/{gh-QfIUVo4FTTduYCVKT6 → fiesjBWbrmSSyLf4biwrX}/_ssgManifest.js +0 -0
  400. /package/dist/.next/.next/static/{thaCy2qVeNqYYhdayr13C → ft39e6W6vSgUL7peRo7pE}/_ssgManifest.js +0 -0
  401. /package/dist/.next/.next/static/{ybCx6L6gHqtODbKmlhU-d → u7ssdTycF4iQ-w-pQZhxg}/_ssgManifest.js +0 -0
  402. /package/dist/.next/{static/IX-QLbm7scYnyqWeeimal → .next/static/v-i2YsOGT890zutOSiqqK}/_ssgManifest.js +0 -0
  403. /package/dist/.next/static/chunks/{4bd1b696-8c908eb707f85a27.js → 4bd1b696-124ea104c06f6cea.js} +0 -0
  404. /package/dist/.next/static/chunks/{517-3b698a5d3da06ff7.js → 517-c876ce2f00030cd0.js} +0 -0
  405. /package/dist/.next/static/chunks/{692-ede418e1d28a1394.js → 692-9e59d546afd11ec3.js} +0 -0
  406. /package/dist/.next/static/chunks/app/_not-found/{page-b786c3dd79ad15a5.js → page-3e24b81707d98126.js} +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var e={};e.id=223,e.ids=[223],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")},4358:(e,t,r)=>{r.r(t),r.d(t,{patchFetch:()=>A,routeModule:()=>h,serverHooks:()=>T,workAsyncStorage:()=>R,workUnitAsyncStorage:()=>y});var a={};r.r(a),r.d(a,{OPTIONS:()=>w,POST:()=>E});var i=r(2706),o=r(8203),s=r(5994),n=r(9187),l=r(9748),c=r(3873),p=r(5949),d=r(9421),u=r(4218),g=r(3159),m=r(1804);async function f(e,t,r,a){let i={...process.env,CLOUDFLARE_API_TOKEN:r,CLOUDFLARE_ACCOUNT_ID:t};try{let t=c.join(e,"migrations"),r=c.join(e,"migrations-temp");await (0,l.mkdir)(t,{recursive:!0}),await (0,l.mkdir)(r,{recursive:!0});let o=await (0,l.readdir)(r).catch(()=>[]);await Promise.all(o.map(e=>(0,l.unlink)(c.join(r,e)))),m.A.debug("Fetching remote migration metadata...");let s=await (0,g.GS)(e,a,i);m.A.debug("Remote migration metadata:",s),m.A.debug("Fetching migration file content from remote...");let n=new Map;for(let t of s)try{let o=t.name,s=await (0,d.sP)(e,a,o,i);n.set(o,s),m.A.debug(`Staged migration file: ${o}`),await (0,l.writeFile)(c.join(r,o),s,"utf8")}catch(e){throw m.A.error(`Error fetching content for migration ${t.name}:`,e),Error(`Failed to fetch migration file content for ${t.name}`)}m.A.debug("Fetching local schema for destructive update...");let p=await (0,u.ZX)(e,a,i,!1),f=p.filter(e=>"table"===e.type&&e.name&&"if"!==e.name.toLowerCase());m.A.debug("Local table schema:",f);let E=f.length>0?(0,u.IC)(f.map(e=>({tableName:e.name,sql:e.sql,type:e.type}))):[];m.A.debug("Computed drop order:",E),m.A.debug("Beginning destructive update...");try{for(let t of(m.A.debug("Disabling foreign keys..."),await (0,d.KK)(e,a,"PRAGMA foreign_keys=OFF;",i,!1),p.filter(e=>"trigger"===e.type)))m.A.debug(`Dropping trigger: ${t.name}`),await (0,d.KK)(e,a,(0,d.z6)(`DROP TRIGGER IF EXISTS ${t.name}`),i,!1);for(let t of p.filter(e=>"index"===e.type))m.A.debug(`Dropping index: ${t.name}`),await (0,d.KK)(e,a,(0,d.z6)(`DROP INDEX IF EXISTS ${t.name}`),i,!1);for(let t of E.reverse())m.A.debug(`Dropping table: ${t}`),await (0,d.KK)(e,a,(0,d.z6)(`DROP TABLE IF EXISTS ${t}`),i,!1);m.A.debug("Re-enabling foreign keys..."),await (0,d.KK)(e,a,"PRAGMA foreign_keys=ON;",i,!1)}catch(e){throw Error(`Error dropping existing objects: ${e.message}`)}try{m.A.debug("Resetting local migrations table..."),await (0,g.k0)(e,a,"local",!0)}catch(e){throw Error(`Error resetting migrations table: ${e.message}`)}let w={preview:[]},h="";try{for(let[r,o]of n.entries()){h=r,m.A.debug(`Applying migration: ${r}`),await (0,l.writeFile)(c.join(t,r),o,"utf8");let s=require("crypto").createHash("sha256").update(o).digest("hex");m.A.debug(`Recording migration: ${r} with checksum ${s}`),await (0,g.CM)(e,a,{name:r,checksum:s},i,!1),await (0,d.KK)(e,a,o,i,!1),w.preview.push({migration:r,action:"applied"})}}catch(e){throw Error(`Error applying migration ${h}: ${e.message}`)}m.A.debug("Replacing main migrations folder with staged files...");let R=await (0,l.readdir)(t).catch(()=>[]);if(R.length)for(let e of R)m.A.debug(`Deleting local migration file: ${e}`),await (0,l.unlink)(c.join(t,e));for(let[e,r]of n.entries())m.A.debug(`Copying staged file ${e} to main migrations folder`),await (0,l.writeFile)(c.join(t,e),r,"utf8");return m.A.debug("Pull migration applied successfully."),{appliedMigrations:Array.from(n.keys()),details:w}}catch(e){throw m.A.error("Pull migration error:",e),e}}async function E(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 i=await (0,p.S)(a);if(!i||!i.config)return n.NextResponse.json({success:!1,error:{type:d.wU.VALIDATION_ERROR,message:"Could not find Wrangler configuration"}},{status:400});let o=i.config;if(!o.d1_databases?.length)return n.NextResponse.json({success:!1,error:{type:d.wU.VALIDATION_ERROR,message:"No D1 databases configured"}},{status:400});let s=o.d1_databases[0].database_name,l=await f(a,t,r,s);return n.NextResponse.json({success:!0,message:"Pull migrations applied successfully",details:l})}catch(e){return m.A.error("Pull remote confirm error:",e),n.NextResponse.json({success:!1,error:{type:e.type||d.wU.EXECUTION_ERROR,message:e.message||"Failed to apply pull migrations",details:e.details||{suggestions:["Check your Cloudflare credentials","Verify database permissions","Ensure all migration files are accessible"]}}},{status:500})}}async function w(){return new n.NextResponse(null,{status:204})}let h=new i.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/pull-remote/confirm/route",pathname:"/api/pull-remote/confirm",filename:"route",bundlePath:"app/api/pull-remote/confirm/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/pull-remote/confirm/route.js",nextConfigOutput:"",userland:a}),{workAsyncStorage:R,workUnitAsyncStorage:y,serverHooks:T}=h;function A(){return(0,s.patchFetch)({workAsyncStorage:R,workUnitAsyncStorage:y})}},3159:(e,t,r)=>{r.d(t,{hI:()=>h,Sl:()=>R,GS:()=>f,Gc:()=>y,k0:()=>u,CM:()=>w,ai:()=>E,JD:()=>m});var a=r(9748),i=r(8354),o=r(9646);let s=require("crypto");var n=r(3873),l=r(9421),c=r(4218),p=r(1804);let d=(0,i.promisify)(o.exec);async function u(e,t,r="local",a=!1){let i="remote"===r?"--remote":"--local",o="remote"===r?`
1
+ "use strict";(()=>{var e={};e.id=223,e.ids=[223,487],e.modules={7550:e=>{e.exports=require("better-sqlite3")},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")},5511:e=>{e.exports=require("crypto")},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")},4358:(e,t,r)=>{r.r(t),r.d(t,{patchFetch:()=>N,routeModule:()=>_,serverHooks:()=>x,workAsyncStorage:()=>b,workUnitAsyncStorage:()=>I});var a={};r.r(a),r.d(a,{OPTIONS:()=>A,POST:()=>T});var i=r(2706),s=r(8203),n=r(5994),o=r(9187),l=r(9748),c=r(5511),d=r(3873),u=r(8354),p=r(9646),m=r(5949),g=r(9421),f=r(4218),w=r(961),E=r(3868),h=r(1804);let y=(0,u.promisify)(p.exec);async function R(e,t){let r=t.database_name,a=process.env;try{let i=t.migrations_dir?d.join(e,t.migrations_dir):d.join(e,"migrations"),s=d.join(e,"migrations-temp");await (0,l.mkdir)(i,{recursive:!0}),await (0,l.mkdir)(s,{recursive:!0});let n=await (0,l.readdir)(s).catch(()=>[]);await Promise.all(n.map(e=>(0,l.unlink)(d.join(s,e)))),h.A.debug("Fetching remote migration metadata...");let o=await (0,w.GS)(e,r,a);h.A.debug("Remote migration metadata:",o),h.A.debug("Reading migration files from local migrations folder...");let u=new Map;for(let e of o){let t=e.name,r=d.join(i,t);try{let e=await (0,l.readFile)(r,"utf8");u.set(t,e),await (0,l.writeFile)(d.join(s,t),e,"utf8"),h.A.debug(`Staged migration file: ${t}`)}catch(e){throw h.A.error(`Migration file not found locally: ${t}`,e.message),Error(`Migration file not found locally: ${t}`)}}h.A.debug("Fetching local schema...");let p=await (0,f.ZX)(e,r,a,!1),m=p.filter(e=>"table"===e.type&&e.name&&"if"!==e.name.toLowerCase()),R=m.length>0?(0,f.IC)(m.map(e=>({tableName:e.name,sql:e.sql,type:e.type}))):[],T=/^(_cf_|sqlite_)/i,A=p.filter(e=>"trigger"===e.type&&!T.test(e.name)),_=p.filter(e=>"index"===e.type&&!T.test(e.name)),b=[...R].filter(e=>!T.test(e)).reverse();h.A.debug("Beginning destructive update...");let I=(0,E.w1)(e,t);if(I)try{for(let e of(I.pragma("foreign_keys = OFF"),A))h.A.debug(`Dropping trigger: ${e.name}`),I.prepare(`DROP TRIGGER IF EXISTS "${e.name}"`).run();for(let e of _)h.A.debug(`Dropping index: ${e.name}`),I.prepare(`DROP INDEX IF EXISTS "${e.name}"`).run();for(let e of b)h.A.debug(`Dropping table: ${e}`),I.prepare(`DROP TABLE IF EXISTS "${e}"`).run()}finally{I.pragma("foreign_keys = ON")}else{h.A.debug("better-sqlite3 unavailable, falling back to wrangler CLI for destructive update");let i=[...A.map(e=>`DROP TRIGGER IF EXISTS "${e.name}"`),..._.map(e=>`DROP INDEX IF EXISTS "${e.name}"`),...b.map(e=>`DROP TABLE IF EXISTS "${e}"`)];i.length>0&&await (0,g.KK)(e,r,i.join(";\n")+";",a,!1,t)}h.A.debug("Resetting local migrations table...");try{await (0,w.k0)(e,r,"local",!0)}catch(e){throw Error(`Error resetting migrations table: ${e.message}`)}(0,E.n3)(e,r);let x="win32"===process.platform?"npx.cmd":"npx",N={preview:[]},O="";try{for(let[s,n]of u.entries()){O=s,h.A.debug(`Applying migration: ${s}`);let o=d.join(i,s);await (0,l.writeFile)(o,n,"utf8");let u=c.createHash("sha256").update(n).digest("hex");await (0,w.CM)(e,r,{name:s,checksum:u},a,!1);let p=!1;try{let r=(0,E.executeLocalSQL)(e,t,n);null!==r&&(p=!0)}catch(e){throw e}if(!p){h.A.debug(`Applying ${s} via wrangler --file`);let{stdout:t}=await y(`${x} wrangler d1 execute ${r} --local --file="${o}" --json`,{cwd:e,env:{...process.env,...a},maxBuffer:0xa00000}),i=t?.trim();if(i?.startsWith("{")){let e=JSON.parse(i);if(e?.error)throw Error(e.error.text||JSON.stringify(e.error))}}N.preview.push({migration:s,action:"applied"})}}catch(e){throw Error(`Error applying migration ${O}: ${e.message}`)}for(let e of(h.A.debug("Replacing migrations folder with staged files..."),await (0,l.readdir)(i).catch(()=>[])))await (0,l.unlink)(d.join(i,e));for(let[e,t]of u.entries())await (0,l.writeFile)(d.join(i,e),t,"utf8");return h.A.debug("Pull migration applied successfully."),{appliedMigrations:Array.from(u.keys()),details:N}}catch(e){throw h.A.error("Pull migration error:",e),e}}async function T(e){if("true"!==process.env.D1_IS_PRO)return o.NextResponse.json({success:!1,error:{type:"PRO_REQUIRED",message:"Pro license required. Run: d1s --license YOUR-KEY"}},{status:402});try{let t=process.env.D1_PROJECT_DIR;if(!t)return o.NextResponse.json({success:!1,error:{type:g.wU.VALIDATION_ERROR,message:"Project directory not configured"}},{status:500});let r=await (0,m.S)(t);if(!r?.config)return o.NextResponse.json({success:!1,error:{type:g.wU.VALIDATION_ERROR,message:"Could not find Wrangler configuration"}},{status:400});let a=r.config;if(!a.d1_databases?.length)return o.NextResponse.json({success:!1,error:{type:g.wU.VALIDATION_ERROR,message:"No D1 databases configured"}},{status:400});let i=await e.json().catch(()=>({})),s=i?.db,n=s?a.d1_databases.find(e=>e.database_name===s):a.d1_databases[0];if(!n)return o.NextResponse.json({success:!1,error:{type:g.wU.VALIDATION_ERROR,message:`Database not found: ${s}`}},{status:400});let l=await R(t,n);return o.NextResponse.json({success:!0,message:"Pull migrations applied successfully",details:l})}catch(e){return h.A.error("Pull remote confirm error:",e),o.NextResponse.json({success:!1,error:{type:e.type||g.wU.EXECUTION_ERROR,message:e.message||"Failed to apply pull migrations",details:e.details||{}}},{status:500})}}async function A(){return new o.NextResponse(null,{status:204})}let _=new i.AppRouteRouteModule({definition:{kind:s.RouteKind.APP_ROUTE,page:"/api/pull-remote/confirm/route",pathname:"/api/pull-remote/confirm",filename:"route",bundlePath:"app/api/pull-remote/confirm/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/pull-remote/confirm/route.js",nextConfigOutput:"",userland:a}),{workAsyncStorage:b,workUnitAsyncStorage:I,serverHooks:x}=_;function N(){return(0,n.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:I})}},3868:(e,t,r)=>{r.d(t,{executeLocalSQL:()=>m,k5:()=>u,n3:()=>g,w1:()=>p});var a=r(5511),i=r(3873),s=r(9021),n=r(7550),o=r(1804);let l=i.join(".wrangler","state","v3","d1","miniflare-D1DatabaseObject"),c=new Map;function d(e,t){let r=i.join(e,l);if(!s.existsSync(r))return null;let{database_id:n,database_name:c,binding:d}=t,u=[n,c,d].filter(Boolean),p=["","miniflare-D1DatabaseObject:","D1DatabaseObject:","d1:"],m=u.flatMap(e=>p.map(t=>{var r;return r=`${t}${e}`,a.createHash("sha256").update(r).digest("hex")})).map(e=>i.join(r,`${e}.sqlite`)).find(e=>s.existsSync(e));if(m)return m;let g=s.readdirSync(r).filter(e=>e.endsWith(".sqlite")).map(e=>({name:e,fullPath:i.join(r,e),mtime:s.statSync(i.join(r,e)).mtimeMs})).sort((e,t)=>t.mtime-e.mtime);return 1===g.length?g[0].fullPath:(g.length>1&&o.A.debug(`[local-db] Multiple SQLite files, no hash matched — falling back to wrangler CLI. dir=${r}, tried ids=${JSON.stringify(u)}`),o.A.debug(`[local-db] No SQLite files found. dir=${r}, tried ids=${JSON.stringify(u)}`),null)}function u(e,t){return null!==d(e,t)}function p(e,t){let r=`${e}:${t.database_name}`,a=d(e,t);if(c.has(r)){let e=c.get(r);if(e.path!==a){try{e.db.close()}catch{}c.delete(r)}else try{return e.db.prepare("SELECT 1").get(),e.db}catch{c.delete(r)}}if(!a)return null;try{let e=new n(a,{fileMustExist:!1});return e.pragma("journal_mode = WAL"),e.pragma("foreign_keys = ON"),c.set(r,{db:e,path:a}),e}catch{return null}}function m(e,t,r){let a=p(e,t);if(!a)return null;let i=r.trim(),s=i.toUpperCase().replace(/\s+/g," "),n=i.split(";").map(e=>e.trim()).filter(Boolean);if(n.length>1){let e=[],t=0,r=0;return a.transaction(()=>{for(let i of n){let s=i.toUpperCase().replace(/\s+/g," ");if(s.startsWith("SELECT")||s.startsWith("PRAGMA")||s.startsWith("EXPLAIN")){let t=a.prepare(i).all();e=e.concat(t)}else{let e=a.prepare(i).run();t+=e.changes,r=e.lastInsertRowid}}})(),JSON.stringify([{results:e,success:!0,meta:{changes:t,last_row_id:r,rows_read:e.length,rows_written:t}}])}if(s.startsWith("SELECT")||s.startsWith("PRAGMA")||s.startsWith("EXPLAIN")){let e=a.prepare(i).all();return JSON.stringify([{results:e,success:!0,meta:{rows_read:e.length,rows_written:0,changed_db:!1}}])}let o=a.prepare(i).run();return JSON.stringify([{results:[],success:!0,meta:{changes:o.changes,last_row_id:o.lastInsertRowid,rows_read:0,rows_written:o.changes,changed_db:o.changes>0}}])}function g(e,t){let r=`${e}:${t}`,a=c.get(r);if(a){try{a.db.close()}catch{}c.delete(r)}}},961:(e,t,r)=>{r.d(t,{A8:()=>R,CM:()=>E,GS:()=>f,Gc:()=>T,JD:()=>g,Sl:()=>y,ai:()=>w,hI:()=>h,k0:()=>p});var a=r(9748),i=r(8354),s=r(9646),n=r(5511),o=r(3873),l=r(9421),c=r(4218),d=r(1804);let u=(0,i.promisify)(s.exec);async function p(e,t,r="local",a=!1){let i="remote"===r?"--remote":"--local",s="remote"===r?`
2
2
  CREATE TABLE IF NOT EXISTS d1_migrations (
3
3
  id INTEGER PRIMARY KEY AUTOINCREMENT,
4
4
  name TEXT NOT NULL UNIQUE,
@@ -11,16 +11,16 @@
11
11
  checksum TEXT NULL,
12
12
  applied_at DATETIME DEFAULT CURRENT_TIMESTAMP
13
13
  );
14
- `;try{await d(`wrangler d1 execute ${t} ${i} --command="${o.replace(/"/g,'\\"')}"`,{cwd:e}),a&&await d(`wrangler d1 execute ${t} ${i} --command="${"DELETE FROM d1_migrations;".replace(/"/g,'\\"')}"`,{cwd:e})}catch(e){throw p.A.error(`Failed to initialize migrations table in ${r}:`,e),e}}function g(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,l.By)(t);return(0,l.Gq)(e),{isValid:!0,statement:e}}catch(e){return{isValid:!1,errors:e}}}async function f(e,t,r){try{let a=await (0,l.KK)(e,t,"SELECT name, applied_at FROM d1_migrations ORDER BY applied_at;",r,!0);if("string"==typeof a){let e=a.indexOf("[");if(-1!==e){let t=a.substring(e),r=JSON.parse(t);return r[0]?.results||[]}}return[]}catch(e){throw{type:l.wU.EXECUTION_ERROR,message:"Failed to get remote migrations",details:{error:e.message,suggestions:["Check remote database permissions","Verify credentials and connection"]}}}}async function E(e,t,{name:r,checksum:a},i="local"){let o="remote"===i?"--remote":"--local";if("local"===i&&a)try{await d(`wrangler d1 execute ${t} ${o} --command="SELECT checksum FROM d1_migrations LIMIT 1;"`,{cwd:e}).catch(()=>!1)||await d(`wrangler d1 execute ${t} ${o} --command="ALTER TABLE d1_migrations ADD COLUMN checksum TEXT;"`,{cwd:e})}catch(e){}let s="remote"!==i&&a?`
14
+ `;try{await u(`wrangler d1 execute ${t} ${i} --command="${s.replace(/"/g,'\\"')}"`,{cwd:e}),a&&await u(`wrangler d1 execute ${t} ${i} --command="${"DELETE FROM d1_migrations;".replace(/"/g,'\\"')}"`,{cwd:e})}catch(e){throw d.A.error(`Failed to initialize migrations table in ${r}:`,e),e}}function m(e){let t=new Date().toISOString().replace(/[^0-9]/g,"").slice(0,-3),r=e.type.toLowerCase().replace(/_/g,"-");if("CREATE_INDEX"===e.type){let r=e.description.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-_]/g,"");return`${t}_create-index_${r}.sql`}{let a=`${t}_${{"create-table":"create-table","alter-table":"alter-table","drop-table":"drop-table","drop-index":"drop-index","create-view":"create-view","drop-view":"drop-view","add-foreign-key":"add-foreign-key","drop-foreign-key":"drop-foreign-key","add-constraint":"add-constraint","drop-constraint":"drop-constraint"}[r]||r}_${e.tableName}`;return"ALTER_TABLE"===e.type&&e.description&&(a+=`_${e.description}`),(a=a.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-_]/g,""))+".sql"}}async function g(e){let t=await (0,a.readFile)(e,"utf8");try{let e=(0,l.By)(t);return(0,l.Gq)(e),{isValid:!0,statement:e}}catch(e){return{isValid:!1,errors:e}}}async function f(e,t,r){try{let a=await (0,l.KK)(e,t,"SELECT name, applied_at FROM d1_migrations ORDER BY applied_at;",r,!0);if("string"==typeof a){let e=a.indexOf("[");if(-1!==e){let t=a.substring(e),r=JSON.parse(t);return r[0]?.results||[]}}return[]}catch(t){let e=[t.message,t.details?.originalError,t.details?.stderr,t.details?.stdout].filter(Boolean).join(" ");if(e.includes("no such table")||e.includes("d1_migrations"))return[];throw{type:l.wU.EXECUTION_ERROR,message:"Failed to get remote migrations",details:{error:e||"Failed to execute SQL command",suggestions:["Check remote database permissions","Verify credentials and connection"]}}}}async function w(e,t,{name:r,checksum:a},i="local"){let s="remote"===i?"--remote":"--local";if("local"===i&&a)try{await u(`wrangler d1 execute ${t} ${s} --command="SELECT checksum FROM d1_migrations LIMIT 1;"`,{cwd:e}).catch(()=>!1)||await u(`wrangler d1 execute ${t} ${s} --command="ALTER TABLE d1_migrations ADD COLUMN checksum TEXT;"`,{cwd:e})}catch(e){}let n="remote"!==i&&a?`
15
15
  INSERT OR REPLACE INTO d1_migrations (name, checksum, applied_at)
16
16
  VALUES ('${r}', '${a}', CURRENT_TIMESTAMP);
17
17
  `:`
18
18
  INSERT OR REPLACE INTO d1_migrations (name, applied_at)
19
19
  VALUES ('${r}', CURRENT_TIMESTAMP);
20
- `;try{await d(`wrangler d1 execute ${t} ${o} --command="${s.replace(/"/g,'\\"')}"`,{cwd:e})}catch(e){throw p.A.error("Failed to track migration:",e),e}}async function w(e,t,{name:r,checksum:a},i={},o=!1){let s=o||!a?`
20
+ `;try{await u(`wrangler d1 execute ${t} ${s} --command="${n.replace(/"/g,'\\"')}"`,{cwd:e})}catch(e){throw d.A.error("Failed to track migration:",e),e}}async function E(e,t,{name:r,checksum:a},i={},s=!1){let n=s||!a?`
21
21
  INSERT OR REPLACE INTO d1_migrations (name, applied_at)
22
22
  VALUES ('${r}', CURRENT_TIMESTAMP);
23
23
  `:`
24
24
  INSERT OR REPLACE INTO d1_migrations (name, checksum, applied_at)
25
25
  VALUES ('${r}', '${a}', CURRENT_TIMESTAMP);
26
- `;try{await (0,l.KK)(e,t,s,i,o)}catch(e){throw{type:l.wU.EXECUTION_ERROR,message:`Failed to record migration ${r}`,details:{file:r,error:e.message,suggestions:["Check if migration is already recorded"]}}}}async function h(e,t){try{let r=await f(e,t,{}),a=new Map(r.map(e=>[e.name,e]));return{applied:Array.from(a.keys()),count:a.size}}catch(e){throw p.A.error("Failed to compare migrations:",e),e}}function R(e){return(0,s.createHash)("sha256").update(e).digest("hex")}async function y(e,t,r){try{let i=n.join(e,"migrations");await (0,a.mkdir)(i,{recursive:!0});let o=[],s=[],p=[];for(let e of r)e.type===l.Pg.DATA_MODIFICATION?p.push(e):s.push(e);let d=new Map,u="__no_table__";for(let e of s){let t=e.tableName?e.tableName.toLowerCase():u;d.has(t)||d.set(t,[]),d.get(t).push(e)}let m=[...d.keys()].filter(e=>e!==u),f=[];if(m.length>0){let e=m.map(e=>d.get(e)[0]);f=(0,c.IC)(e)}for(let r of f){for(let s of d.get(r)||[])try{if(s.type===l.Pg.DROP_TABLE&&!await (0,l.F9)(e,t,{},s.tableName,!1))throw Error(`no such table: ${s.tableName}`);let r=await (0,l.KK)(e,t,s.sql);if(r&&(r.toLowerCase().includes("syntax error")||r.toLowerCase().includes("sqlite_error")))throw Error(r);let c=g(s),p=n.join(i,c),d=(0,l.tn)(s.sql);await (0,a.writeFile)(p,d,"utf8");let u=R(s.sql);await E(e,t,{name:c,checksum:u},"local"),o.push({type:s.type,table:s.tableName,migration:c,checksum:u})}catch(e){throw e}d.delete(r)}if(d.has(u))for(let r of d.get(u))try{await (0,l.KK)(e,t,r.sql);let s=g(r),c=n.join(i,s),p=(0,l.tn)(r.sql);await (0,a.writeFile)(c,p,"utf8");let d=R(r.sql);await E(e,t,{name:s,checksum:d},"local"),o.push({type:r.type,table:r.tableName||null,migration:s,checksum:d})}catch(e){throw e}for(let r of p)try{await (0,l.KK)(e,t,r.sql),o.push({type:r.type,table:r.tableName||null,executed:!0})}catch(e){throw e}return o}catch(e){throw e}}}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[638,452,391,226],()=>r(4358));module.exports=a})();
26
+ `;try{await (0,l.KK)(e,t,n,i,s)}catch(e){throw{type:l.wU.EXECUTION_ERROR,message:`Failed to record migration ${r}`,details:{file:r,error:e.message,suggestions:["Check if migration is already recorded"]}}}}async function h(e,t){try{let r=await f(e,t,{}),a=new Map(r.map(e=>[e.name,e]));return{applied:Array.from(a.keys()),count:a.size}}catch(e){throw d.A.error("Failed to compare migrations:",e),e}}function y(e){return(0,n.createHash)("sha256").update(e).digest("hex")}async function R(e,t){try{await u(`wrangler d1 execute ${t} --local --command="SELECT checksum FROM d1_migrations LIMIT 1;"`,{cwd:e})}catch{try{await u(`wrangler d1 execute ${t} --local --command="ALTER TABLE d1_migrations ADD COLUMN checksum TEXT;"`,{cwd:e})}catch{}}}async function T(e,t,r){try{let i=o.join(e,"migrations");await (0,a.mkdir)(i,{recursive:!0});let s=[],n=[],d=[];for(let e of r)e.type===l.Pg.DATA_MODIFICATION?d.push(e):n.push(e);let u=new Map,p="__no_table__";for(let e of n){let t=e.tableName?e.tableName.toLowerCase():p;u.has(t)||u.set(t,[]),u.get(t).push(e)}let g=[...u.keys()].filter(e=>e!==p),f=[];if(g.length>0){let e=g.map(e=>u.get(e)[0]);f=(0,c.IC)(e)}for(let r of f){for(let n of u.get(r)||[])try{if(n.type===l.Pg.DROP_TABLE&&!await (0,l.F9)(e,t,{},n.tableName,!1))throw Error(`no such table: ${n.tableName}`);let r=await (0,l.KK)(e,t,n.sql);if(r&&(r.toLowerCase().includes("syntax error")||r.toLowerCase().includes("sqlite_error")))throw Error(r);let c=m(n),d=o.join(i,c),u=(0,l.tn)(n.sql);await (0,a.writeFile)(d,u,"utf8");let p=y(n.sql);await w(e,t,{name:c,checksum:p},"local"),s.push({type:n.type,table:n.tableName,migration:c,checksum:p})}catch(e){throw e}u.delete(r)}if(u.has(p))for(let r of u.get(p))try{await (0,l.KK)(e,t,r.sql);let n=m(r),c=o.join(i,n),d=(0,l.tn)(r.sql);await (0,a.writeFile)(c,d,"utf8");let u=y(r.sql);await w(e,t,{name:n,checksum:u},"local"),s.push({type:r.type,table:r.tableName||null,migration:n,checksum:u})}catch(e){throw e}for(let r of d)try{await (0,l.KK)(e,t,r.sql),s.push({type:r.type,table:r.tableName||null,executed:!0})}catch(e){throw e}return s}catch(e){throw e}}}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[994,452,391,226],()=>r(4358));module.exports=a})();
@@ -1 +1 @@
1
- {"version":1,"files":["../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/226.js","../../../../chunks/391.js","../../../../chunks/452.js","../../../../chunks/638.js","../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
1
+ {"version":1,"files":["../../../../../../node_modules/better-sqlite3/build/Release/better_sqlite3.node","../../../../../../node_modules/better-sqlite3/lib/database.js","../../../../../../node_modules/better-sqlite3/lib/index.js","../../../../../../node_modules/better-sqlite3/lib/methods/aggregate.js","../../../../../../node_modules/better-sqlite3/lib/methods/backup.js","../../../../../../node_modules/better-sqlite3/lib/methods/function.js","../../../../../../node_modules/better-sqlite3/lib/methods/inspect.js","../../../../../../node_modules/better-sqlite3/lib/methods/pragma.js","../../../../../../node_modules/better-sqlite3/lib/methods/serialize.js","../../../../../../node_modules/better-sqlite3/lib/methods/table.js","../../../../../../node_modules/better-sqlite3/lib/methods/transaction.js","../../../../../../node_modules/better-sqlite3/lib/methods/wrappers.js","../../../../../../node_modules/better-sqlite3/lib/sqlite-error.js","../../../../../../node_modules/better-sqlite3/lib/util.js","../../../../../../node_modules/better-sqlite3/package.json","../../../../../../node_modules/bindings/bindings.js","../../../../../../node_modules/bindings/package.json","../../../../../../node_modules/file-uri-to-path/index.js","../../../../../../node_modules/file-uri-to-path/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/226.js","../../../../chunks/391.js","../../../../chunks/452.js","../../../../chunks/487.js","../../../../chunks/994.js","../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/pull-remote/confirm/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-f05cd0fc436bf9bc.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/pull-remote/confirm/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/pull-remote/confirm/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","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}},"6311":{"*":{"id":"7098","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-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.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-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":6311,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","803","static/chunks/803-a2fcfbd00e6b3b38.js","480","static/chunks/480-85b6c8ae3f51b156.js","974","static/chunks/app/page-358bf2112802ff85.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/2c165a0ede9b2442.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/pull-remote/confirm/route":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","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}},"6311":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var e={};e.id=399,e.ids=[399],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")},2464:(e,t,r)=>{r.r(t),r.d(t,{patchFetch:()=>h,routeModule:()=>w,serverHooks:()=>f,workAsyncStorage:()=>T,workUnitAsyncStorage:()=>R});var a={};r.r(a),r.d(a,{OPTIONS:()=>g,POST:()=>E});var i=r(2706),o=r(8203),s=r(5994),n=r(9187),l=r(5949),c=r(9421),p=r(4218),d=r(3159),u=r(1804);async function m(e,t,r,a){let i={...process.env,CLOUDFLARE_API_TOKEN:r,CLOUDFLARE_ACCOUNT_ID:t};try{let t=await (0,p.ZX)(e,a,i,!0),r=await (0,d.GS)(e,a,i),o=(0,p.IC)(t),s={preview:[],totalTables:t.length,totalMigrations:r.length};return o.forEach((e,r)=>{t.find(t=>t.name===e)&&s.preview.push({name:e,type:"table",action:"will be created",order:r+1})}),r.forEach(e=>{s.preview.push({name:e.name,type:"migration",action:"will be tracked"})}),s}catch(e){throw u.A.error("Pull preview generation error:",e),e}}async function E(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:c.wU.VALIDATION_ERROR,message:"Project directory not configured"}},{status:500});let i=await (0,l.S)(a);if(!i||!i.config)return n.NextResponse.json({success:!1,error:{type:c.wU.VALIDATION_ERROR,message:"Could not find Wrangler configuration"}},{status:400});let o=i.config;if(!o.d1_databases?.length)return n.NextResponse.json({success:!1,error:{type:c.wU.VALIDATION_ERROR,message:"No D1 databases configured"}},{status:400});let s=o.d1_databases[0].database_name,p=await m(a,t,r,s);return n.NextResponse.json({success:!0,message:"Pull migration preview generated",details:p})}catch(e){return u.A.error("Pull remote preview error:",e),n.NextResponse.json({success:!1,error:{type:e.type||c.wU.EXECUTION_ERROR,message:e.message||"Failed to generate pull migration preview",details:e.details}},{status:500})}}async function g(){return new n.NextResponse(null,{status:204})}let w=new i.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/pull-remote/preview/route",pathname:"/api/pull-remote/preview",filename:"route",bundlePath:"app/api/pull-remote/preview/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/pull-remote/preview/route.js",nextConfigOutput:"",userland:a}),{workAsyncStorage:T,workUnitAsyncStorage:R,serverHooks:f}=w;function h(){return(0,s.patchFetch)({workAsyncStorage:T,workUnitAsyncStorage:R})}},3159:(e,t,r)=>{r.d(t,{hI:()=>R,Sl:()=>f,GS:()=>g,Gc:()=>h,k0:()=>u,CM:()=>T,ai:()=>w,JD:()=>E});var a=r(9748),i=r(8354),o=r(9646);let s=require("crypto");var n=r(3873),l=r(9421),c=r(4218),p=r(1804);let d=(0,i.promisify)(o.exec);async function u(e,t,r="local",a=!1){let i="remote"===r?"--remote":"--local",o="remote"===r?`
1
+ "use strict";(()=>{var e={};e.id=399,e.ids=[399],e.modules={7550:e=>{e.exports=require("better-sqlite3")},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")},5511:e=>{e.exports=require("crypto")},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")},2464:(e,t,r)=>{r.r(t),r.d(t,{patchFetch:()=>y,routeModule:()=>R,serverHooks:()=>h,workAsyncStorage:()=>T,workUnitAsyncStorage:()=>f});var a={};r.r(a),r.d(a,{OPTIONS:()=>w,POST:()=>E});var s=r(2706),i=r(8203),o=r(5994),n=r(9187),l=r(9748),c=r(3873),p=r(5949),d=r(9421),u=r(961),m=r(1804);async function g(e,t,r){let a=process.env,s=await (0,u.GS)(e,t,a),i=r||c.join(e,"migrations"),o=new Set;try{let e=await (0,l.readdir)(i);o=new Set(e.filter(e=>e.endsWith(".sql")))}catch{}return{preview:s.map(e=>({name:e.name,type:"migration",action:o.has(e.name)?"will be applied":"file missing locally"})),totalMigrations:s.length}}async function E(e){if("true"!==process.env.D1_IS_PRO)return n.NextResponse.json({success:!1,error:{type:"PRO_REQUIRED",message:"Pro license required. Run: d1s --license YOUR-KEY"}},{status:402});try{let t=process.env.D1_PROJECT_DIR;if(!t)return n.NextResponse.json({success:!1,error:{type:d.wU.VALIDATION_ERROR,message:"Project directory not configured"}},{status:500});let r=await (0,p.S)(t);if(!r?.config)return n.NextResponse.json({success:!1,error:{type:d.wU.VALIDATION_ERROR,message:"Could not find Wrangler configuration"}},{status:400});let a=r.config;if(!a.d1_databases?.length)return n.NextResponse.json({success:!1,error:{type:d.wU.VALIDATION_ERROR,message:"No D1 databases configured"}},{status:400});let s=await e.json().catch(()=>({})),i=s?.db,o=i?a.d1_databases.find(e=>e.database_name===i):a.d1_databases[0];if(!o)return n.NextResponse.json({success:!1,error:{type:d.wU.VALIDATION_ERROR,message:`Database not found: ${i}`}},{status:400});let l=o.database_name,u=o.migrations_dir?c.join(t,o.migrations_dir):c.join(t,"migrations"),m=await g(t,l,u);return n.NextResponse.json({success:!0,message:"Pull migration preview generated",details:m})}catch(e){return m.A.error("Pull remote preview error:",e),n.NextResponse.json({success:!1,error:{type:e.type||d.wU.EXECUTION_ERROR,message:e.message||"Failed to generate pull migration preview",details:e.details}},{status:500})}}async function w(){return new n.NextResponse(null,{status:204})}let R=new s.AppRouteRouteModule({definition:{kind:i.RouteKind.APP_ROUTE,page:"/api/pull-remote/preview/route",pathname:"/api/pull-remote/preview",filename:"route",bundlePath:"app/api/pull-remote/preview/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/pull-remote/preview/route.js",nextConfigOutput:"",userland:a}),{workAsyncStorage:T,workUnitAsyncStorage:f,serverHooks:h}=R;function y(){return(0,o.patchFetch)({workAsyncStorage:T,workUnitAsyncStorage:f})}},961:(e,t,r)=>{r.d(t,{A8:()=>h,CM:()=>R,GS:()=>E,Gc:()=>y,JD:()=>g,Sl:()=>f,ai:()=>w,hI:()=>T,k0:()=>u});var a=r(9748),s=r(8354),i=r(9646),o=r(5511),n=r(3873),l=r(9421),c=r(4218),p=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?`
2
2
  CREATE TABLE IF NOT EXISTS d1_migrations (
3
3
  id INTEGER PRIMARY KEY AUTOINCREMENT,
4
4
  name TEXT NOT NULL UNIQUE,
@@ -11,16 +11,16 @@
11
11
  checksum TEXT NULL,
12
12
  applied_at DATETIME DEFAULT CURRENT_TIMESTAMP
13
13
  );
14
- `;try{await d(`wrangler d1 execute ${t} ${i} --command="${o.replace(/"/g,'\\"')}"`,{cwd:e}),a&&await d(`wrangler d1 execute ${t} ${i} --command="${"DELETE FROM d1_migrations;".replace(/"/g,'\\"')}"`,{cwd:e})}catch(e){throw p.A.error(`Failed to initialize migrations table in ${r}:`,e),e}}function m(e){let t=new Date().toISOString().replace(/[^0-9]/g,"").slice(0,-3),r=e.type.toLowerCase().replace(/_/g,"-");if("CREATE_INDEX"===e.type){let r=e.description.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-_]/g,"");return`${t}_create-index_${r}.sql`}{let a=`${t}_${{"create-table":"create-table","alter-table":"alter-table","drop-table":"drop-table","drop-index":"drop-index","create-view":"create-view","drop-view":"drop-view","add-foreign-key":"add-foreign-key","drop-foreign-key":"drop-foreign-key","add-constraint":"add-constraint","drop-constraint":"drop-constraint"}[r]||r}_${e.tableName}`;return"ALTER_TABLE"===e.type&&e.description&&(a+=`_${e.description}`),(a=a.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-_]/g,""))+".sql"}}async function E(e){let t=await (0,a.readFile)(e,"utf8");try{let e=(0,l.By)(t);return(0,l.Gq)(e),{isValid:!0,statement:e}}catch(e){return{isValid:!1,errors:e}}}async function g(e,t,r){try{let a=await (0,l.KK)(e,t,"SELECT name, applied_at FROM d1_migrations ORDER BY applied_at;",r,!0);if("string"==typeof a){let e=a.indexOf("[");if(-1!==e){let t=a.substring(e),r=JSON.parse(t);return r[0]?.results||[]}}return[]}catch(e){throw{type:l.wU.EXECUTION_ERROR,message:"Failed to get remote migrations",details:{error:e.message,suggestions:["Check remote database permissions","Verify credentials and connection"]}}}}async function w(e,t,{name:r,checksum:a},i="local"){let o="remote"===i?"--remote":"--local";if("local"===i&&a)try{await d(`wrangler d1 execute ${t} ${o} --command="SELECT checksum FROM d1_migrations LIMIT 1;"`,{cwd:e}).catch(()=>!1)||await d(`wrangler d1 execute ${t} ${o} --command="ALTER TABLE d1_migrations ADD COLUMN checksum TEXT;"`,{cwd:e})}catch(e){}let s="remote"!==i&&a?`
14
+ `;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 p.A.error(`Failed to initialize migrations table in ${r}:`,e),e}}function m(e){let t=new Date().toISOString().replace(/[^0-9]/g,"").slice(0,-3),r=e.type.toLowerCase().replace(/_/g,"-");if("CREATE_INDEX"===e.type){let r=e.description.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-_]/g,"");return`${t}_create-index_${r}.sql`}{let a=`${t}_${{"create-table":"create-table","alter-table":"alter-table","drop-table":"drop-table","drop-index":"drop-index","create-view":"create-view","drop-view":"drop-view","add-foreign-key":"add-foreign-key","drop-foreign-key":"drop-foreign-key","add-constraint":"add-constraint","drop-constraint":"drop-constraint"}[r]||r}_${e.tableName}`;return"ALTER_TABLE"===e.type&&e.description&&(a+=`_${e.description}`),(a=a.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-_]/g,""))+".sql"}}async function g(e){let t=await (0,a.readFile)(e,"utf8");try{let e=(0,l.By)(t);return(0,l.Gq)(e),{isValid:!0,statement:e}}catch(e){return{isValid:!1,errors:e}}}async function E(e,t,r){try{let a=await (0,l.KK)(e,t,"SELECT name, applied_at FROM d1_migrations ORDER BY applied_at;",r,!0);if("string"==typeof a){let e=a.indexOf("[");if(-1!==e){let t=a.substring(e),r=JSON.parse(t);return r[0]?.results||[]}}return[]}catch(t){let e=[t.message,t.details?.originalError,t.details?.stderr,t.details?.stdout].filter(Boolean).join(" ");if(e.includes("no such table")||e.includes("d1_migrations"))return[];throw{type:l.wU.EXECUTION_ERROR,message:"Failed to get remote migrations",details:{error:e||"Failed to execute SQL command",suggestions:["Check remote database permissions","Verify credentials and connection"]}}}}async function w(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?`
15
15
  INSERT OR REPLACE INTO d1_migrations (name, checksum, applied_at)
16
16
  VALUES ('${r}', '${a}', CURRENT_TIMESTAMP);
17
17
  `:`
18
18
  INSERT OR REPLACE INTO d1_migrations (name, applied_at)
19
19
  VALUES ('${r}', CURRENT_TIMESTAMP);
20
- `;try{await d(`wrangler d1 execute ${t} ${o} --command="${s.replace(/"/g,'\\"')}"`,{cwd:e})}catch(e){throw p.A.error("Failed to track migration:",e),e}}async function T(e,t,{name:r,checksum:a},i={},o=!1){let s=o||!a?`
20
+ `;try{await d(`wrangler d1 execute ${t} ${i} --command="${o.replace(/"/g,'\\"')}"`,{cwd:e})}catch(e){throw p.A.error("Failed to track migration:",e),e}}async function R(e,t,{name:r,checksum:a},s={},i=!1){let o=i||!a?`
21
21
  INSERT OR REPLACE INTO d1_migrations (name, applied_at)
22
22
  VALUES ('${r}', CURRENT_TIMESTAMP);
23
23
  `:`
24
24
  INSERT OR REPLACE INTO d1_migrations (name, checksum, applied_at)
25
25
  VALUES ('${r}', '${a}', CURRENT_TIMESTAMP);
26
- `;try{await (0,l.KK)(e,t,s,i,o)}catch(e){throw{type:l.wU.EXECUTION_ERROR,message:`Failed to record migration ${r}`,details:{file:r,error:e.message,suggestions:["Check if migration is already recorded"]}}}}async function R(e,t){try{let r=await g(e,t,{}),a=new Map(r.map(e=>[e.name,e]));return{applied:Array.from(a.keys()),count:a.size}}catch(e){throw p.A.error("Failed to compare migrations:",e),e}}function f(e){return(0,s.createHash)("sha256").update(e).digest("hex")}async function h(e,t,r){try{let i=n.join(e,"migrations");await (0,a.mkdir)(i,{recursive:!0});let o=[],s=[],p=[];for(let e of r)e.type===l.Pg.DATA_MODIFICATION?p.push(e):s.push(e);let d=new Map,u="__no_table__";for(let e of s){let t=e.tableName?e.tableName.toLowerCase():u;d.has(t)||d.set(t,[]),d.get(t).push(e)}let E=[...d.keys()].filter(e=>e!==u),g=[];if(E.length>0){let e=E.map(e=>d.get(e)[0]);g=(0,c.IC)(e)}for(let r of g){for(let s of d.get(r)||[])try{if(s.type===l.Pg.DROP_TABLE&&!await (0,l.F9)(e,t,{},s.tableName,!1))throw Error(`no such table: ${s.tableName}`);let r=await (0,l.KK)(e,t,s.sql);if(r&&(r.toLowerCase().includes("syntax error")||r.toLowerCase().includes("sqlite_error")))throw Error(r);let c=m(s),p=n.join(i,c),d=(0,l.tn)(s.sql);await (0,a.writeFile)(p,d,"utf8");let u=f(s.sql);await w(e,t,{name:c,checksum:u},"local"),o.push({type:s.type,table:s.tableName,migration:c,checksum:u})}catch(e){throw e}d.delete(r)}if(d.has(u))for(let r of d.get(u))try{await (0,l.KK)(e,t,r.sql);let s=m(r),c=n.join(i,s),p=(0,l.tn)(r.sql);await (0,a.writeFile)(c,p,"utf8");let d=f(r.sql);await w(e,t,{name:s,checksum:d},"local"),o.push({type:r.type,table:r.tableName||null,migration:s,checksum:d})}catch(e){throw e}for(let r of p)try{await (0,l.KK)(e,t,r.sql),o.push({type:r.type,table:r.tableName||null,executed:!0})}catch(e){throw e}return o}catch(e){throw e}}}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[638,452,391,226],()=>r(2464));module.exports=a})();
26
+ `;try{await (0,l.KK)(e,t,o,s,i)}catch(e){throw{type:l.wU.EXECUTION_ERROR,message:`Failed to record migration ${r}`,details:{file:r,error:e.message,suggestions:["Check if migration is already recorded"]}}}}async function T(e,t){try{let r=await E(e,t,{}),a=new Map(r.map(e=>[e.name,e]));return{applied:Array.from(a.keys()),count:a.size}}catch(e){throw p.A.error("Failed to compare migrations:",e),e}}function f(e){return(0,o.createHash)("sha256").update(e).digest("hex")}async function h(e,t){try{await d(`wrangler d1 execute ${t} --local --command="SELECT checksum FROM d1_migrations LIMIT 1;"`,{cwd:e})}catch{try{await d(`wrangler d1 execute ${t} --local --command="ALTER TABLE d1_migrations ADD COLUMN checksum TEXT;"`,{cwd:e})}catch{}}}async function y(e,t,r){try{let s=n.join(e,"migrations");await (0,a.mkdir)(s,{recursive:!0});let i=[],o=[],p=[];for(let e of r)e.type===l.Pg.DATA_MODIFICATION?p.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 g=[...d.keys()].filter(e=>e!==u),E=[];if(g.length>0){let e=g.map(e=>d.get(e)[0]);E=(0,c.IC)(e)}for(let r of E){for(let o of d.get(r)||[])try{if(o.type===l.Pg.DROP_TABLE&&!await (0,l.F9)(e,t,{},o.tableName,!1))throw Error(`no such table: ${o.tableName}`);let r=await (0,l.KK)(e,t,o.sql);if(r&&(r.toLowerCase().includes("syntax error")||r.toLowerCase().includes("sqlite_error")))throw Error(r);let c=m(o),p=n.join(s,c),d=(0,l.tn)(o.sql);await (0,a.writeFile)(p,d,"utf8");let u=f(o.sql);await w(e,t,{name:c,checksum:u},"local"),i.push({type:o.type,table:o.tableName,migration:c,checksum:u})}catch(e){throw e}d.delete(r)}if(d.has(u))for(let r of d.get(u))try{await (0,l.KK)(e,t,r.sql);let o=m(r),c=n.join(s,o),p=(0,l.tn)(r.sql);await (0,a.writeFile)(c,p,"utf8");let d=f(r.sql);await w(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 p)try{await (0,l.KK)(e,t,r.sql),i.push({type:r.type,table:r.tableName||null,executed:!0})}catch(e){throw e}return i}catch(e){throw e}}}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[994,452,391,226],()=>r(2464));module.exports=a})();
@@ -1 +1 @@
1
- {"version":1,"files":["../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/226.js","../../../../chunks/391.js","../../../../chunks/452.js","../../../../chunks/638.js","../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
1
+ {"version":1,"files":["../../../../../../node_modules/better-sqlite3/build/Release/better_sqlite3.node","../../../../../../node_modules/better-sqlite3/lib/database.js","../../../../../../node_modules/better-sqlite3/lib/index.js","../../../../../../node_modules/better-sqlite3/lib/methods/aggregate.js","../../../../../../node_modules/better-sqlite3/lib/methods/backup.js","../../../../../../node_modules/better-sqlite3/lib/methods/function.js","../../../../../../node_modules/better-sqlite3/lib/methods/inspect.js","../../../../../../node_modules/better-sqlite3/lib/methods/pragma.js","../../../../../../node_modules/better-sqlite3/lib/methods/serialize.js","../../../../../../node_modules/better-sqlite3/lib/methods/table.js","../../../../../../node_modules/better-sqlite3/lib/methods/transaction.js","../../../../../../node_modules/better-sqlite3/lib/methods/wrappers.js","../../../../../../node_modules/better-sqlite3/lib/sqlite-error.js","../../../../../../node_modules/better-sqlite3/lib/util.js","../../../../../../node_modules/better-sqlite3/package.json","../../../../../../node_modules/bindings/bindings.js","../../../../../../node_modules/bindings/package.json","../../../../../../node_modules/file-uri-to-path/index.js","../../../../../../node_modules/file-uri-to-path/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/226.js","../../../../chunks/391.js","../../../../chunks/452.js","../../../../chunks/487.js","../../../../chunks/994.js","../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/pull-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-f05cd0fc436bf9bc.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/pull-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/pull-remote/preview/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","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}},"6311":{"*":{"id":"7098","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-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.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-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":6311,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","803","static/chunks/803-a2fcfbd00e6b3b38.js","480","static/chunks/480-85b6c8ae3f51b156.js","974","static/chunks/app/page-358bf2112802ff85.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/2c165a0ede9b2442.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/pull-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}},"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}},"6311":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -1,17 +1,17 @@
1
- "use strict";(()=>{var e={};e.id=680,e.ids=[680],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")},2055:(e,t,r)=>{r.r(t),r.d(t,{patchFetch:()=>f,routeModule:()=>R,serverHooks:()=>h,workAsyncStorage:()=>g,workUnitAsyncStorage:()=>w});var a={};r.r(a),r.d(a,{OPTIONS:()=>T,POST:()=>m});var i=r(2706),s=r(8203),o=r(5994),n=r(9187),p=r(9748),l=r(3873),c=r(5949),d=r(9421),u=r(3159);async function E(e,t,r,a,i=!1){let s={...process.env,CLOUDFLARE_ACCOUNT_ID:t,CLOUDFLARE_API_TOKEN:r};try{let t=`
1
+ "use strict";(()=>{var e={};e.id=680,e.ids=[680],e.modules={7550:e=>{e.exports=require("better-sqlite3")},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")},5511:e=>{e.exports=require("crypto")},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")},2055:(e,t,r)=>{r.r(t),r.d(t,{patchFetch:()=>h,routeModule:()=>g,serverHooks:()=>f,workAsyncStorage:()=>R,workUnitAsyncStorage:()=>w});var a={};r.r(a),r.d(a,{OPTIONS:()=>T,POST:()=>E});var s=r(2706),i=r(8203),o=r(5994),n=r(9187),l=r(9748),c=r(3873),p=r(5949),d=r(9421),u=r(961);async function m(e,t,r=!1,a){let s=process.env;try{let i=`
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
- `,r=`
8
+ `,o=`
9
9
  CREATE TABLE IF NOT EXISTS d1_migrations (
10
10
  id INTEGER PRIMARY KEY AUTOINCREMENT,
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,s,!0);let o=await (0,d.KK)(e,a,"SELECT name FROM d1_migrations ORDER BY applied_at;",s,!0),n=new Map((e=>{try{let t=JSON.parse(e);return t[0]?.results||[]}catch{return[]}})(o).map(e=>[e.name,e])),c=l.join(e,"migrations"),E=(await (0,p.readdir)(c)).filter(e=>e.endsWith(".sql")).sort(),m={applied:[],skipped:[],preview:[]};for(let t of E){let r=l.join(c,t),o={name:t,action:"",reason:""};try{if(!(await (0,u.JD)(r)).isValid){o.action="failed validation",o.reason="Migration validation failed",m.preview.push(o);continue}if(n.has(t)){o.action="skipped",o.reason="Already applied",m.preview.push(o),m.skipped.push({name:t,reason:o.reason});continue}let l=await (0,p.readFile)(r,"utf8");l=(0,d.bp)(l);let c=(0,d.By)(l),E=c.tableName;if("CREATE_TABLE"===c.type&&E&&await (0,d.F9)(e,a,s,E,!0)){o.action="skipped",o.reason=`Table "${E}" already exists`,m.skipped.push({name:t,reason:o.reason}),m.preview.push(o);continue}o.action="will be applied",m.preview.push(o),i||(await (0,d.KK)(e,a,l,s,!0),await (0,d.KK)(e,a,`INSERT INTO d1_migrations (name) VALUES ('${t}');`,s,!0),o.action="applied",m.applied.push({name:t}))}catch(a){let e=a.message||"",r=a.details&&a.details.stderr||"";e.includes("already exists")||r.includes("already exists")?(o.action="skipped",o.reason="Already applied"):(o.action="failed",o.reason=e||"Failed to apply migration"),m.skipped.push({name:t,reason:o.reason}),m.preview.push(o)}}return{success:!0,preview:!1,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 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:{message:"Project directory not configured",type:d.wU.VALIDATION_ERROR}},{status:500});let i=await (0,c.S)(a);if(!i||!i.config)return n.NextResponse.json({success:!1,error:{message:"Could not find Wrangler configuration",type:d.wU.VALIDATION_ERROR}},{status:400});let s=i.config;if(!s.d1_databases?.length)return n.NextResponse.json({success:!1,error:{message:"No D1 databases configured",type:d.wU.VALIDATION_ERROR}},{status:400});let o=s.d1_databases[0].database_name,p=await E(a,t,r,o,!1);return n.NextResponse.json({success:!0,message:"Successfully pushed migrations to remote",details:p})}catch(e){return console.error("Push to remote confirm error:",e),n.NextResponse.json({success:!1,error:{type:e.type||d.wU.EXECUTION_ERROR,message:e.message||"Failed to push to remote",details:e.details||{error:e.stderr||e.message}}},{status:e.type===d.wU.VALIDATION_ERROR?400:500})}}async function T(){return new n.NextResponse(null,{status:204})}let R=new i.AppRouteRouteModule({definition:{kind:s.RouteKind.APP_ROUTE,page:"/api/push-remote/confirm/route",pathname:"/api/push-remote/confirm",filename:"route",bundlePath:"app/api/push-remote/confirm/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/push-remote/confirm/route.js",nextConfigOutput:"",userland:a}),{workAsyncStorage:g,workUnitAsyncStorage:w,serverHooks:h}=R;function f(){return(0,o.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:w})}},3159:(e,t,r)=>{r.d(t,{hI:()=>w,Sl:()=>h,GS:()=>T,Gc:()=>f,k0:()=>u,CM:()=>g,ai:()=>R,JD:()=>m});var a=r(9748),i=r(8354),s=r(9646);let o=require("crypto");var n=r(3873),p=r(9421),l=r(4218),c=r(1804);let d=(0,i.promisify)(s.exec);async function u(e,t,r="local",a=!1){let i="remote"===r?"--remote":"--local",s="remote"===r?`
14
+ `;await (0,d.KK)(e,t,i),await (0,d.KK)(e,t,o,s,!0);let n=await (0,d.KK)(e,t,"SELECT name FROM d1_migrations ORDER BY applied_at;",s,!0),p=(e=>{try{let t=JSON.parse(e);return t[0]?.results||[]}catch{return[]}})(n);console.log(`[push-confirm] remote d1_migrations raw response: ${n}`),console.log(`[push-confirm] remote d1_migrations parsed rows (${p.length}): ${JSON.stringify(p)}`);let m=new Map(p.map(e=>[e.name,e])),E=a||c.join(e,"migrations"),T=(await (0,l.readdir)(E)).filter(e=>e.endsWith(".sql")&&!/seed/i.test(e)).sort(),g={applied:[],skipped:[],preview:[]};for(let a of T){let i=c.join(E,a),o={name:a,action:"",reason:""};try{if(!(await (0,u.JD)(i)).isValid){o.action="failed validation",o.reason="Migration validation failed",g.preview.push(o);continue}if(m.has(a)){console.log(`[push-confirm] SKIP ${a} — found in remote d1_migrations`),o.action="skipped",o.reason="Already applied",g.preview.push(o),g.skipped.push({name:a,reason:o.reason});continue}let n=await (0,l.readFile)(i,"utf8");n=(0,d.bp)(n);let c=(0,d.By)(n),p=c.tableName;if("CREATE_TABLE"===c.type&&p){let r=await (0,d.F9)(e,t,s,p,!0);if(console.log(`[push-confirm] tableExists(${p}, remote) = ${r}`),r){console.log(`[push-confirm] SKIP ${a} — table "${p}" already exists on remote`),o.action="skipped",o.reason=`Table "${p}" already exists`,g.skipped.push({name:a,reason:o.reason}),g.preview.push(o);continue}}o.action="will be applied",g.preview.push(o),r||(await (0,d.KK)(e,t,n,s,!0),await (0,d.KK)(e,t,`INSERT INTO d1_migrations (name) VALUES ('${a}');`,s,!0),o.action="applied",g.applied.push({name:a}))}catch(r){let e=r.message||"",t=r.details&&r.details.stderr||"";e.includes("already exists")||t.includes("already exists")?(o.action="skipped",o.reason="Already applied"):(o.action="failed",o.reason=e||"Failed to apply migration"),g.skipped.push({name:a,reason:o.reason}),g.preview.push(o)}}return{success:!0,preview:!1,applied:g.applied.length,skipped:g.skipped.length,details:g}}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 E(e){if("true"!==process.env.D1_IS_PRO)return n.NextResponse.json({success:!1,error:{type:"PRO_REQUIRED",message:"Pro license required. Run: d1s --license YOUR-KEY"}},{status:402});try{let t=process.env.D1_PROJECT_DIR;if(!t)return n.NextResponse.json({success:!1,error:{message:"Project directory not configured",type:d.wU.VALIDATION_ERROR}},{status:500});let r=await (0,p.S)(t);if(!r||!r.config)return n.NextResponse.json({success:!1,error:{message:"Could not find Wrangler configuration",type:d.wU.VALIDATION_ERROR}},{status:400});let a=r.config;if(!a.d1_databases?.length)return n.NextResponse.json({success:!1,error:{message:"No D1 databases configured",type:d.wU.VALIDATION_ERROR}},{status:400});let s=await e.json().catch(()=>({})),i=s?.db,o=i?a.d1_databases.find(e=>e.database_name===i):a.d1_databases[0];if(!o)return n.NextResponse.json({success:!1,error:{message:`Database not found: ${i}`,type:d.wU.VALIDATION_ERROR}},{status:400});let l=o.database_name,u=o.migrations_dir?c.join(t,o.migrations_dir):c.join(t,"migrations"),E=await m(t,l,!1,u);return n.NextResponse.json({success:!0,message:"Successfully pushed migrations to remote",details:E})}catch(e){return console.error("Push to remote confirm error:",e),n.NextResponse.json({success:!1,error:{type:e.type||d.wU.EXECUTION_ERROR,message:e.message||"Failed to push to remote",details:e.details||{error:e.stderr||e.message}}},{status:e.type===d.wU.VALIDATION_ERROR?400:500})}}async function T(){return new n.NextResponse(null,{status:204})}r(1804);let g=new s.AppRouteRouteModule({definition:{kind:i.RouteKind.APP_ROUTE,page:"/api/push-remote/confirm/route",pathname:"/api/push-remote/confirm",filename:"route",bundlePath:"app/api/push-remote/confirm/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/push-remote/confirm/route.js",nextConfigOutput:"",userland:a}),{workAsyncStorage:R,workUnitAsyncStorage:w,serverHooks:f}=g;function h(){return(0,o.patchFetch)({workAsyncStorage:R,workUnitAsyncStorage:w})}},961:(e,t,r)=>{r.d(t,{A8:()=>h,CM:()=>R,GS:()=>T,Gc:()=>N,JD:()=>E,Sl:()=>f,ai:()=>g,hI:()=>w,k0:()=>u});var a=r(9748),s=r(8354),i=r(9646),o=r(5511),n=r(3873),l=r(9421),c=r(4218),p=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,16 +24,16 @@
24
24
  checksum TEXT NULL,
25
25
  applied_at DATETIME DEFAULT CURRENT_TIMESTAMP
26
26
  );
27
- `;try{await d(`wrangler d1 execute ${t} ${i} --command="${s.replace(/"/g,'\\"')}"`,{cwd:e}),a&&await d(`wrangler d1 execute ${t} ${i} --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},i="local"){let s="remote"===i?"--remote":"--local";if("local"===i&&a)try{await d(`wrangler d1 execute ${t} ${s} --command="SELECT checksum FROM d1_migrations LIMIT 1;"`,{cwd:e}).catch(()=>!1)||await d(`wrangler d1 execute ${t} ${s} --command="ALTER TABLE d1_migrations ADD COLUMN checksum TEXT;"`,{cwd:e})}catch(e){}let o="remote"!==i&&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 p.A.error(`Failed to initialize migrations table in ${r}:`,e),e}}function m(e){let t=new Date().toISOString().replace(/[^0-9]/g,"").slice(0,-3),r=e.type.toLowerCase().replace(/_/g,"-");if("CREATE_INDEX"===e.type){let r=e.description.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-_]/g,"");return`${t}_create-index_${r}.sql`}{let a=`${t}_${{"create-table":"create-table","alter-table":"alter-table","drop-table":"drop-table","drop-index":"drop-index","create-view":"create-view","drop-view":"drop-view","add-foreign-key":"add-foreign-key","drop-foreign-key":"drop-foreign-key","add-constraint":"add-constraint","drop-constraint":"drop-constraint"}[r]||r}_${e.tableName}`;return"ALTER_TABLE"===e.type&&e.description&&(a+=`_${e.description}`),(a=a.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-_]/g,""))+".sql"}}async function E(e){let t=await (0,a.readFile)(e,"utf8");try{let e=(0,l.By)(t);return(0,l.Gq)(e),{isValid:!0,statement:e}}catch(e){return{isValid:!1,errors:e}}}async function T(e,t,r){try{let a=await (0,l.KK)(e,t,"SELECT name, applied_at FROM d1_migrations ORDER BY applied_at;",r,!0);if("string"==typeof a){let e=a.indexOf("[");if(-1!==e){let t=a.substring(e),r=JSON.parse(t);return r[0]?.results||[]}}return[]}catch(t){let e=[t.message,t.details?.originalError,t.details?.stderr,t.details?.stdout].filter(Boolean).join(" ");if(e.includes("no such table")||e.includes("d1_migrations"))return[];throw{type:l.wU.EXECUTION_ERROR,message:"Failed to get remote migrations",details:{error:e||"Failed to execute SQL command",suggestions:["Check remote database permissions","Verify credentials and connection"]}}}}async function g(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
  `:`
31
31
  INSERT OR REPLACE INTO d1_migrations (name, applied_at)
32
32
  VALUES ('${r}', CURRENT_TIMESTAMP);
33
- `;try{await d(`wrangler d1 execute ${t} ${s} --command="${o.replace(/"/g,'\\"')}"`,{cwd:e})}catch(e){throw c.A.error("Failed to track migration:",e),e}}async function g(e,t,{name:r,checksum:a},i={},s=!1){let o=s||!a?`
33
+ `;try{await d(`wrangler d1 execute ${t} ${i} --command="${o.replace(/"/g,'\\"')}"`,{cwd:e})}catch(e){throw p.A.error("Failed to track migration:",e),e}}async function R(e,t,{name:r,checksum:a},s={},i=!1){let o=i||!a?`
34
34
  INSERT OR REPLACE INTO d1_migrations (name, applied_at)
35
35
  VALUES ('${r}', CURRENT_TIMESTAMP);
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,i,s)}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 f(e,t,r){try{let i=n.join(e,"migrations");await (0,a.mkdir)(i,{recursive:!0});let s=[],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(i,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"),s.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(i,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"),s.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),s.push({type:r.type,table:r.tableName||null,executed:!0})}catch(e){throw e}return s}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(2055));module.exports=a})();
39
+ `;try{await (0,l.KK)(e,t,o,s,i)}catch(e){throw{type:l.wU.EXECUTION_ERROR,message:`Failed to record migration ${r}`,details:{file:r,error:e.message,suggestions:["Check if migration is already recorded"]}}}}async function 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 p.A.error("Failed to compare migrations:",e),e}}function f(e){return(0,o.createHash)("sha256").update(e).digest("hex")}async function h(e,t){try{await d(`wrangler d1 execute ${t} --local --command="SELECT checksum FROM d1_migrations LIMIT 1;"`,{cwd:e})}catch{try{await d(`wrangler d1 execute ${t} --local --command="ALTER TABLE d1_migrations ADD COLUMN checksum TEXT;"`,{cwd:e})}catch{}}}async function N(e,t,r){try{let s=n.join(e,"migrations");await (0,a.mkdir)(s,{recursive:!0});let i=[],o=[],p=[];for(let e of r)e.type===l.Pg.DATA_MODIFICATION?p.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 E=[...d.keys()].filter(e=>e!==u),T=[];if(E.length>0){let e=E.map(e=>d.get(e)[0]);T=(0,c.IC)(e)}for(let r of T){for(let o of d.get(r)||[])try{if(o.type===l.Pg.DROP_TABLE&&!await (0,l.F9)(e,t,{},o.tableName,!1))throw Error(`no such table: ${o.tableName}`);let r=await (0,l.KK)(e,t,o.sql);if(r&&(r.toLowerCase().includes("syntax error")||r.toLowerCase().includes("sqlite_error")))throw Error(r);let c=m(o),p=n.join(s,c),d=(0,l.tn)(o.sql);await (0,a.writeFile)(p,d,"utf8");let u=f(o.sql);await g(e,t,{name:c,checksum:u},"local"),i.push({type:o.type,table:o.tableName,migration:c,checksum:u})}catch(e){throw e}d.delete(r)}if(d.has(u))for(let r of d.get(u))try{await (0,l.KK)(e,t,r.sql);let o=m(r),c=n.join(s,o),p=(0,l.tn)(r.sql);await (0,a.writeFile)(c,p,"utf8");let d=f(r.sql);await g(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 p)try{await (0,l.KK)(e,t,r.sql),i.push({type:r.type,table:r.tableName||null,executed:!0})}catch(e){throw e}return i}catch(e){throw e}}}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[994,452,391,226],()=>r(2055));module.exports=a})();
@@ -1 +1 @@
1
- {"version":1,"files":["../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/226.js","../../../../chunks/391.js","../../../../chunks/452.js","../../../../chunks/638.js","../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
1
+ {"version":1,"files":["../../../../../../node_modules/better-sqlite3/build/Release/better_sqlite3.node","../../../../../../node_modules/better-sqlite3/lib/database.js","../../../../../../node_modules/better-sqlite3/lib/index.js","../../../../../../node_modules/better-sqlite3/lib/methods/aggregate.js","../../../../../../node_modules/better-sqlite3/lib/methods/backup.js","../../../../../../node_modules/better-sqlite3/lib/methods/function.js","../../../../../../node_modules/better-sqlite3/lib/methods/inspect.js","../../../../../../node_modules/better-sqlite3/lib/methods/pragma.js","../../../../../../node_modules/better-sqlite3/lib/methods/serialize.js","../../../../../../node_modules/better-sqlite3/lib/methods/table.js","../../../../../../node_modules/better-sqlite3/lib/methods/transaction.js","../../../../../../node_modules/better-sqlite3/lib/methods/wrappers.js","../../../../../../node_modules/better-sqlite3/lib/sqlite-error.js","../../../../../../node_modules/better-sqlite3/lib/util.js","../../../../../../node_modules/better-sqlite3/package.json","../../../../../../node_modules/bindings/bindings.js","../../../../../../node_modules/bindings/package.json","../../../../../../node_modules/file-uri-to-path/index.js","../../../../../../node_modules/file-uri-to-path/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/226.js","../../../../chunks/391.js","../../../../chunks/452.js","../../../../chunks/487.js","../../../../chunks/994.js","../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/push-remote/confirm/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-f05cd0fc436bf9bc.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/confirm/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/confirm/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","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}},"6311":{"*":{"id":"7098","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-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.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-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":6311,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","803","static/chunks/803-a2fcfbd00e6b3b38.js","480","static/chunks/480-85b6c8ae3f51b156.js","974","static/chunks/app/page-358bf2112802ff85.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/2c165a0ede9b2442.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/push-remote/confirm/route":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","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}},"6311":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}