d1s 0.2.6 → 0.2.8

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 (247) hide show
  1. package/README.md +3 -1
  2. package/dist/.next/.next/BUILD_ID +1 -1
  3. package/dist/.next/.next/app-build-manifest.json +34 -27
  4. package/dist/.next/.next/app-path-routes-manifest.json +1 -1
  5. package/dist/.next/.next/build-manifest.json +2 -2
  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/2.pack.gz +0 -0
  11. package/dist/.next/.next/cache/webpack/client-development/3.pack.gz +0 -0
  12. package/dist/.next/.next/cache/webpack/client-development/4.pack.gz +0 -0
  13. package/dist/.next/.next/cache/webpack/client-development/index.pack.gz +0 -0
  14. package/dist/.next/.next/cache/webpack/client-development/index.pack.gz.old +0 -0
  15. package/dist/.next/.next/cache/webpack/client-production/0.pack +0 -0
  16. package/dist/.next/.next/cache/webpack/client-production/1.pack +0 -0
  17. package/dist/.next/.next/cache/webpack/client-production/10.pack +0 -0
  18. package/dist/.next/.next/cache/webpack/client-production/11.pack +0 -0
  19. package/dist/.next/.next/cache/webpack/client-production/12.pack +0 -0
  20. package/dist/.next/.next/cache/webpack/client-production/13.pack +0 -0
  21. package/dist/.next/.next/cache/webpack/client-production/14.pack +0 -0
  22. package/dist/.next/.next/cache/webpack/client-production/2.pack +0 -0
  23. package/dist/.next/.next/cache/webpack/client-production/3.pack +0 -0
  24. package/dist/.next/.next/cache/webpack/client-production/4.pack +0 -0
  25. package/dist/.next/.next/cache/webpack/client-production/5.pack +0 -0
  26. package/dist/.next/.next/cache/webpack/client-production/6.pack +0 -0
  27. package/dist/.next/.next/cache/webpack/client-production/7.pack +0 -0
  28. package/dist/.next/.next/cache/webpack/client-production/8.pack +0 -0
  29. package/dist/.next/.next/cache/webpack/client-production/9.pack +0 -0
  30. package/dist/.next/.next/cache/webpack/client-production/index.pack +0 -0
  31. package/dist/.next/.next/cache/webpack/client-production/index.pack.old +0 -0
  32. package/dist/.next/.next/cache/webpack/edge-server-production/index.pack +0 -0
  33. package/dist/.next/.next/cache/webpack/server-development/0.pack.gz +0 -0
  34. package/dist/.next/.next/cache/webpack/server-development/1.pack.gz +0 -0
  35. package/dist/.next/.next/cache/webpack/server-development/2.pack.gz +0 -0
  36. package/dist/.next/.next/cache/webpack/server-development/3.pack.gz +0 -0
  37. package/dist/.next/.next/cache/webpack/server-development/4.pack.gz +0 -0
  38. package/dist/.next/.next/cache/webpack/server-development/index.pack.gz +0 -0
  39. package/dist/.next/.next/cache/webpack/server-development/index.pack.gz.old +0 -0
  40. package/dist/.next/.next/cache/webpack/server-production/0.pack +0 -0
  41. package/dist/.next/.next/cache/webpack/server-production/1.pack +0 -0
  42. package/dist/.next/.next/cache/webpack/server-production/10.pack +0 -0
  43. package/dist/.next/.next/cache/webpack/server-production/11.pack +0 -0
  44. package/dist/.next/.next/cache/webpack/server-production/12.pack +0 -0
  45. package/dist/.next/.next/cache/webpack/server-production/13.pack +0 -0
  46. package/dist/.next/.next/cache/webpack/server-production/2.pack +0 -0
  47. package/dist/.next/.next/cache/webpack/server-production/3.pack +0 -0
  48. package/dist/.next/.next/cache/webpack/server-production/4.pack +0 -0
  49. package/dist/.next/.next/cache/webpack/server-production/5.pack +0 -0
  50. package/dist/.next/.next/cache/webpack/server-production/6.pack +0 -0
  51. package/dist/.next/.next/cache/webpack/server-production/7.pack +0 -0
  52. package/dist/.next/.next/cache/webpack/server-production/8.pack +0 -0
  53. package/dist/.next/.next/cache/webpack/server-production/9.pack +0 -0
  54. package/dist/.next/.next/cache/webpack/server-production/index.pack +0 -0
  55. package/dist/.next/.next/cache/webpack/server-production/index.pack.old +0 -0
  56. package/dist/.next/.next/next-minimal-server.js.nft.json +1 -1
  57. package/dist/.next/.next/next-server.js.nft.json +1 -1
  58. package/dist/.next/.next/prerender-manifest.json +1 -1
  59. package/dist/.next/.next/server/app/_not-found/page.js +1 -1
  60. package/dist/.next/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  61. package/dist/.next/.next/server/app/_not-found.html +1 -1
  62. package/dist/.next/.next/server/app/_not-found.rsc +2 -2
  63. package/dist/.next/.next/server/app/api/cloudflare/route.js +1 -1
  64. package/dist/.next/.next/server/app/api/cloudflare/route.js.nft.json +1 -1
  65. package/dist/.next/.next/server/app/api/cloudflare/route_client-reference-manifest.js +1 -1
  66. package/dist/.next/.next/server/app/api/databases/route.js +1 -1
  67. package/dist/.next/.next/server/app/api/databases/route.js.nft.json +1 -1
  68. package/dist/.next/.next/server/app/api/databases/route_client-reference-manifest.js +1 -1
  69. package/dist/.next/.next/server/app/api/migrations/sync/route.js +3 -3
  70. package/dist/.next/.next/server/app/api/migrations/sync/route.js.nft.json +1 -1
  71. package/dist/.next/.next/server/app/api/migrations/sync/route_client-reference-manifest.js +1 -1
  72. package/dist/.next/.next/server/app/api/migrations/sync-files/route.js +1 -1
  73. package/dist/.next/.next/server/app/api/migrations/sync-files/route.js.nft.json +1 -1
  74. package/dist/.next/.next/server/app/api/migrations/sync-files/route_client-reference-manifest.js +1 -1
  75. package/dist/.next/.next/server/app/api/pull-remote/confirm/route.js +1 -1
  76. package/dist/.next/.next/server/app/api/pull-remote/confirm/route.js.nft.json +1 -1
  77. package/dist/.next/.next/server/app/api/pull-remote/confirm/route_client-reference-manifest.js +1 -1
  78. package/dist/.next/.next/server/app/api/pull-remote/preview/route.js +1 -1
  79. package/dist/.next/.next/server/app/api/pull-remote/preview/route.js.nft.json +1 -1
  80. package/dist/.next/.next/server/app/api/pull-remote/preview/route_client-reference-manifest.js +1 -1
  81. package/dist/.next/.next/server/app/api/push-remote/confirm/route.js +2 -2
  82. package/dist/.next/.next/server/app/api/push-remote/confirm/route.js.nft.json +1 -1
  83. package/dist/.next/.next/server/app/api/push-remote/confirm/route_client-reference-manifest.js +1 -1
  84. package/dist/.next/.next/server/app/api/push-remote/preview/route.js +2 -2
  85. package/dist/.next/.next/server/app/api/push-remote/preview/route.js.nft.json +1 -1
  86. package/dist/.next/.next/server/app/api/push-remote/preview/route_client-reference-manifest.js +1 -1
  87. package/dist/.next/.next/server/app/api/query/route.js +2 -2
  88. package/dist/.next/.next/server/app/api/query/route.js.nft.json +1 -1
  89. package/dist/.next/.next/server/app/api/query/route_client-reference-manifest.js +1 -1
  90. package/dist/.next/.next/server/app/api/tables/[name]/route.js +4 -4
  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/update/route.js +5 -0
  97. package/dist/.next/.next/server/app/api/update/route.js.nft.json +1 -0
  98. package/dist/.next/.next/server/app/api/update/route_client-reference-manifest.js +1 -0
  99. package/dist/.next/.next/server/app/index.html +3 -3
  100. package/dist/.next/.next/server/app/index.rsc +3 -3
  101. package/dist/.next/.next/server/app/page.js +14 -12
  102. package/dist/.next/.next/server/app/page_client-reference-manifest.js +1 -1
  103. package/dist/.next/.next/server/app-paths-manifest.json +4 -3
  104. package/dist/.next/.next/server/chunks/336.js +1 -1
  105. package/dist/.next/.next/server/chunks/391.js +23 -0
  106. package/dist/.next/.next/server/chunks/452.js +1 -0
  107. package/dist/.next/.next/server/chunks/627.js +3 -3
  108. package/dist/.next/.next/server/chunks/638.js +3 -3
  109. package/dist/.next/.next/server/chunks/801.js +55 -0
  110. package/dist/.next/.next/server/chunks/992.js +3 -3
  111. package/dist/.next/.next/server/pages/404.html +1 -1
  112. package/dist/.next/.next/server/pages/500.html +1 -1
  113. package/dist/.next/.next/server/pages/_app.js +1 -1
  114. package/dist/.next/.next/server/pages/_document.js +1 -1
  115. package/dist/.next/.next/server/pages/_error.js +1 -1
  116. package/dist/.next/.next/server/pages-manifest.json +1 -1
  117. package/dist/.next/.next/server/server-reference-manifest.json +1 -1
  118. package/dist/.next/.next/static/JrwgdSDcipr0Zh7k19Cj_/_buildManifest.js +1 -0
  119. package/dist/.next/.next/static/chunks/958-98887928efebfdf7.js +1 -0
  120. package/dist/.next/.next/static/chunks/app/api/cloudflare/route-5133155a604f2719.js +1 -0
  121. package/dist/.next/.next/static/chunks/app/api/databases/route-63a31080b565794e.js +1 -0
  122. package/dist/.next/.next/static/chunks/app/api/migrations/sync/route-d97667565b4a59b6.js +1 -0
  123. package/dist/.next/.next/static/chunks/app/api/migrations/sync-files/route-7089bcbfeb6b5260.js +1 -0
  124. package/dist/.next/.next/static/chunks/app/api/pull-remote/confirm/route-9143e6e4c3f05162.js +1 -0
  125. package/dist/.next/.next/static/chunks/app/api/pull-remote/preview/route-c963d143a51aed66.js +1 -0
  126. package/dist/.next/.next/static/chunks/app/api/push-remote/confirm/route-072132c0a6cb3df3.js +1 -0
  127. package/dist/.next/.next/static/chunks/app/api/push-remote/preview/route-ca6bf35aa72661ee.js +1 -0
  128. package/dist/.next/.next/static/chunks/app/api/query/route-1466f6b7ffd8b6c0.js +1 -0
  129. package/dist/.next/.next/static/chunks/app/api/tables/[name]/route-898d3f85fc8544c4.js +1 -0
  130. package/dist/.next/.next/static/chunks/app/api/tables/route-91650359fc3735cb.js +1 -0
  131. package/dist/.next/.next/static/chunks/app/api/update/route-504d663df9124f97.js +1 -0
  132. package/dist/.next/.next/static/chunks/app/page-2c28a255a4ecd8d4.js +1 -0
  133. package/dist/.next/.next/static/chunks/app/page-3db7feef57019055.js +1 -0
  134. package/dist/.next/.next/static/css/4957328384ed5c42.css +3 -0
  135. package/dist/.next/.next/static/gc8l1G6KXOeLLOM7VJip6/_buildManifest.js +1 -0
  136. package/dist/.next/.next/static/kYsJoni86CJWDuTkc1xU6/_buildManifest.js +1 -0
  137. package/dist/.next/.next/static/kYsJoni86CJWDuTkc1xU6/_ssgManifest.js +1 -0
  138. package/dist/.next/.next/static/scC5qwQC9H7rR1groM0Q-/_ssgManifest.js +1 -0
  139. package/dist/.next/.next/static/tEHOI_-t-iqfJClNzuo9m/_buildManifest.js +1 -0
  140. package/dist/.next/.next/static/tEHOI_-t-iqfJClNzuo9m/_ssgManifest.js +1 -0
  141. package/dist/.next/.next/static/vin2VQs5pM_dH2e2_I7AN/_buildManifest.js +1 -0
  142. package/dist/.next/.next/static/vin2VQs5pM_dH2e2_I7AN/_ssgManifest.js +1 -0
  143. package/dist/.next/.next/static/wHKwQhaxin5_i06GFVDHb/_buildManifest.js +1 -0
  144. package/dist/.next/.next/static/wHKwQhaxin5_i06GFVDHb/_ssgManifest.js +1 -0
  145. package/dist/.next/.next/static/xW4MspD8XibrhXDi_q2IO/_ssgManifest.js +1 -0
  146. package/dist/.next/.next/trace +3 -3
  147. package/dist/.next/.next/types/app/api/update/route.ts +347 -0
  148. package/dist/.next/BUILD_ID +1 -1
  149. package/dist/.next/app-build-manifest.json +17 -17
  150. package/dist/.next/app-path-routes-manifest.json +1 -1
  151. package/dist/.next/build-manifest.json +2 -2
  152. package/dist/.next/cache/.rscinfo +1 -1
  153. package/dist/.next/cache/.tsbuildinfo +1 -1
  154. package/dist/.next/cache/webpack/client-production/0.pack +0 -0
  155. package/dist/.next/cache/webpack/client-production/index.pack +0 -0
  156. package/dist/.next/cache/webpack/edge-server-production/index.pack +0 -0
  157. package/dist/.next/cache/webpack/server-production/0.pack +0 -0
  158. package/dist/.next/cache/webpack/server-production/index.pack +0 -0
  159. package/dist/.next/next-minimal-server.js.nft.json +1 -1
  160. package/dist/.next/next-server.js.nft.json +1 -1
  161. package/dist/.next/prerender-manifest.json +1 -1
  162. package/dist/.next/server/app/_not-found.html +1 -1
  163. package/dist/.next/server/app/_not-found.rsc +1 -1
  164. package/dist/.next/server/app/api/cloudflare/route.js +1 -1
  165. package/dist/.next/server/app/api/databases/route.js +1 -1
  166. package/dist/.next/server/app/api/migrations/sync/route.js +3 -3
  167. package/dist/.next/server/app/api/migrations/sync/route.js.nft.json +1 -1
  168. package/dist/.next/server/app/api/migrations/sync-files/route.js +1 -1
  169. package/dist/.next/server/app/api/migrations/sync-files/route.js.nft.json +1 -1
  170. package/dist/.next/server/app/api/pull-remote/confirm/route.js +1 -1
  171. package/dist/.next/server/app/api/pull-remote/confirm/route.js.nft.json +1 -1
  172. package/dist/.next/server/app/api/pull-remote/preview/route.js +1 -1
  173. package/dist/.next/server/app/api/pull-remote/preview/route.js.nft.json +1 -1
  174. package/dist/.next/server/app/api/push-remote/confirm/route.js +2 -2
  175. package/dist/.next/server/app/api/push-remote/confirm/route.js.nft.json +1 -1
  176. package/dist/.next/server/app/api/push-remote/preview/route.js +2 -2
  177. package/dist/.next/server/app/api/push-remote/preview/route.js.nft.json +1 -1
  178. package/dist/.next/server/app/api/query/route.js +2 -2
  179. package/dist/.next/server/app/api/query/route.js.nft.json +1 -1
  180. package/dist/.next/server/app/api/tables/[name]/route.js +4 -4
  181. package/dist/.next/server/app/api/tables/route.js +2 -2
  182. package/dist/.next/server/app/index.html +1 -1
  183. package/dist/.next/server/app/index.rsc +1 -1
  184. package/dist/.next/server/app-paths-manifest.json +6 -6
  185. package/dist/.next/server/chunks/801.js +55 -0
  186. package/dist/.next/server/pages/404.html +1 -1
  187. package/dist/.next/server/pages/500.html +1 -1
  188. package/dist/.next/server/server-reference-manifest.json +1 -1
  189. package/dist/.next/static/ZwNOdZJ0LOtE0AJMNWwzY/_buildManifest.js +1 -0
  190. package/dist/.next/static/ZwNOdZJ0LOtE0AJMNWwzY/_ssgManifest.js +1 -0
  191. package/dist/.next/trace +14 -14
  192. package/dist/app/api/cloudflare/route.js +5 -1
  193. package/dist/app/api/databases/route.js +3 -4
  194. package/dist/app/api/migrations/sync/route.js +5 -3
  195. package/dist/app/api/pull-remote/confirm/route.js +24 -23
  196. package/dist/app/api/pull-remote/preview/route.js +4 -3
  197. package/dist/app/api/push-remote/preview/route.js +3 -2
  198. package/dist/app/api/query/route.js +11 -3
  199. package/dist/app/api/tables/[name]/route.js +3 -2
  200. package/dist/app/api/tables/route.js +6 -2
  201. package/dist/app/app/api/cloudflare/route.js +5 -1
  202. package/dist/app/app/api/databases/route.js +3 -4
  203. package/dist/app/app/api/migrations/sync/route.js +5 -3
  204. package/dist/app/app/api/pull-remote/confirm/route.js +24 -23
  205. package/dist/app/app/api/pull-remote/preview/route.js +4 -3
  206. package/dist/app/app/api/push-remote/preview/route.js +3 -2
  207. package/dist/app/app/api/query/route.js +11 -3
  208. package/dist/app/app/api/tables/[name]/route.js +3 -2
  209. package/dist/app/app/api/tables/route.js +6 -2
  210. package/dist/app/app/api/update/route.js +11 -0
  211. package/dist/app/app/page.jsx +7 -1
  212. package/dist/d1-studio.js +94 -58
  213. package/dist/lib/database-queue.js +34 -30
  214. package/dist/lib/find-wrangler-config.js +14 -8
  215. package/dist/lib/logger.js +11 -2
  216. package/dist/lib/migrations.js +4 -4
  217. package/dist/lib/schema-operations.js +4 -1
  218. package/dist/lib/sql-operations.js +8 -1
  219. package/package.json +3 -1
  220. package/scripts/studio.js +94 -58
  221. package/scripts/test.js +280 -82
  222. package/src/app/api/cloudflare/route.js +5 -1
  223. package/src/app/api/databases/route.js +3 -4
  224. package/src/app/api/migrations/sync/route.js +5 -3
  225. package/src/app/api/pull-remote/confirm/route.js +24 -23
  226. package/src/app/api/pull-remote/preview/route.js +4 -3
  227. package/src/app/api/push-remote/preview/route.js +3 -2
  228. package/src/app/api/query/route.js +11 -3
  229. package/src/app/api/tables/[name]/route.js +3 -2
  230. package/src/app/api/tables/route.js +6 -2
  231. package/src/app/api/update/route.js +11 -0
  232. package/src/app/page.jsx +7 -1
  233. package/src/components/update-banner.jsx +64 -0
  234. package/src/lib/database-queue.js +34 -30
  235. package/src/lib/find-wrangler-config.js +14 -8
  236. package/src/lib/logger.js +11 -2
  237. package/src/lib/migrations.js +4 -4
  238. package/src/lib/schema-operations.js +4 -1
  239. package/src/lib/sql-operations.js +8 -1
  240. package/dist/.next/.next/server/chunks/603.js +0 -55
  241. package/dist/.next/server/chunks/603.js +0 -55
  242. /package/dist/.next/.next/static/{HsZ8OanS5v86DqC9rErO- → IWRJZhjf8U8mjzz4h0VNE}/_buildManifest.js +0 -0
  243. /package/dist/.next/.next/static/{HsZ8OanS5v86DqC9rErO- → IWRJZhjf8U8mjzz4h0VNE}/_ssgManifest.js +0 -0
  244. /package/dist/.next/.next/static/{q6WmQmyONe88bMN0_jrC2 → JrwgdSDcipr0Zh7k19Cj_}/_ssgManifest.js +0 -0
  245. /package/dist/.next/{static/Tk1fnz_CXLavm23ZEeChG → .next/static/gc8l1G6KXOeLLOM7VJip6}/_ssgManifest.js +0 -0
  246. /package/dist/.next/.next/static/{q6WmQmyONe88bMN0_jrC2 → scC5qwQC9H7rR1groM0Q-}/_buildManifest.js +0 -0
  247. /package/dist/.next/{static/Tk1fnz_CXLavm23ZEeChG → .next/static/xW4MspD8XibrhXDi_q2IO}/_buildManifest.js +0 -0
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/migrations/sync-files/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","name":"*","chunks":[],"async":false}},"2624":{"*":{"id":"7135","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/page.jsx":{"id":2624,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","422","static/chunks/422-6fa3c14fc64ad67b.js","735","static/chunks/735-c9144179c6bd7d06.js","974","static/chunks/app/page-79049bfa6cc07e11.js"],"async":false}},"entryCSSFiles":{"/Users/karenredona/Desktop/d1studio/src/":[],"/Users/karenredona/Desktop/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/cf41da7a0d47f779.css"}],"/Users/karenredona/Desktop/d1studio/src/app/page":[],"/Users/karenredona/Desktop/d1studio/src/app/api/migrations/sync-files/route":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","name":"*","chunks":[],"async":false}},"2624":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/migrations/sync-files/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"57174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"87190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"33875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"88903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"84178","name":"*","chunks":[],"async":false}},"5612":{"*":{"id":"56053","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"52652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"61365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"66959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/page.jsx":{"id":5612,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","958","static/chunks/958-98887928efebfdf7.js","735","static/chunks/735-c9144179c6bd7d06.js","974","static/chunks/app/page-2c28a255a4ecd8d4.js"],"async":false}},"entryCSSFiles":{"/Users/karenredona/Desktop/d1studio/src/":[],"/Users/karenredona/Desktop/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/4957328384ed5c42.css"}],"/Users/karenredona/Desktop/d1studio/src/app/page":[],"/Users/karenredona/Desktop/d1studio/src/app/api/migrations/sync-files/route":[]},"rscModuleMapping":{"33":{"*":{"id":"91831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"40802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"48530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"34863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"25155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"5612":{"*":{"id":"46487","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"13164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"88921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"13219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -1 +1 @@
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")},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")},9556:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>q,routeModule:()=>x,serverHooks:()=>R,workAsyncStorage:()=>y,workUnitAsyncStorage:()=>h});var s={};t.r(s),t.d(s,{OPTIONS:()=>w,POST:()=>g});var a=t(2706),o=t(8203),i=t(5994),n=t(9187),p=t(9748),l=t(3873),u=t(9999),c=t(9421),d=t(4218),f=t(961);async function m(e,r,t,s){let a={...process.env,CLOUDFLARE_API_TOKEN:t,CLOUDFLARE_ACCOUNT_ID:r};try{let r=l.join(e,"migrations"),t=l.join(e,"migrations-temp");await (0,p.mkdir)(r,{recursive:!0}),await (0,p.mkdir)(t,{recursive:!0});let o=await (0,p.readdir)(t).catch(()=>[]);await Promise.all(o.map(e=>(0,p.unlink)(l.join(t,e))));let i=await (0,f.GS)(e,s,a),n=new Map;for(let r of i)try{let o=r.name,i=await (0,c.sP)(e,s,o,a);n.set(o,i),await (0,p.writeFile)(l.join(t,o),i,"utf8")}catch(e){throw console.error(`Error fetching content for migration ${r.name}:`,e),Error(`Failed to fetch migration file content for ${r.name}`)}let u=await (0,d.ZX)(e,s,a,!1),m=u.filter(e=>"table"===e.type&&e.name&&"if"!==e.name.toLowerCase()),g=m.length>0?(0,d.IC)(m.map(e=>({tableName:e.name,sql:e.sql,type:e.type}))):[];try{for(let r of(await (0,c.KK)(e,s,"PRAGMA foreign_keys=OFF;",a,!1),u.filter(e=>"trigger"===e.type)))await (0,c.KK)(e,s,(0,c.z6)(`DROP TRIGGER IF EXISTS ${r.name}`),a,!1);for(let r of u.filter(e=>"index"===e.type))await (0,c.KK)(e,s,(0,c.z6)(`DROP INDEX IF EXISTS ${r.name}`),a,!1);for(let r of g.reverse())await (0,c.KK)(e,s,(0,c.z6)(`DROP TABLE IF EXISTS ${r}`),a,!1);await (0,c.KK)(e,s,"PRAGMA foreign_keys=ON;",a,!1)}catch(e){throw Error(`Error dropping existing objects: ${e.message}`)}try{await (0,f.k0)(e,s,"local",!0)}catch(e){throw Error(`Error resetting migrations table: ${e.message}`)}let w={preview:[]},x="";try{for(let[t,o]of n.entries()){x=t,await (0,p.writeFile)(l.join(r,t),o,"utf8");let i=require("crypto").createHash("sha256").update(o).digest("hex");await (0,f.CM)(e,s,{name:t,checksum:i},a,!1),await (0,c.KK)(e,s,o,a,!1),w.preview.push({migration:t,action:"applied"})}}catch(e){throw Error(`Error applying migration ${x}: ${e.message}`)}let y=await (0,p.readdir)(r).catch(()=>[]);if(y.length)for(let e of y)await (0,p.unlink)(l.join(r,e));for(let[e,t]of n.entries())await (0,p.writeFile)(l.join(r,e),t,"utf8");return{appliedMigrations:Array.from(n.keys()),details:w}}catch(e){throw console.error("Pull migration error:",e),e}}async function g(e){try{let{accountId:r,apiToken:t}=await e.json(),s=process.env.D1_PROJECT_DIR;if(!s)return n.NextResponse.json({success:!1,error:{type:c.wU.VALIDATION_ERROR,message:"Project directory not configured"}},{status:500});let a=await (0,u.S)(s);if(!a||!a.config)return n.NextResponse.json({success:!1,error:{type:c.wU.VALIDATION_ERROR,message:"Could not find Wrangler configuration"}},{status:400});let o=a.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 i=o.d1_databases[0].database_name,p=await m(s,r,t,i);return n.NextResponse.json({success:!0,message:"Pull migrations applied successfully",details:p})}catch(e){return console.error("Pull remote confirm error:",e),n.NextResponse.json({success:!1,error:{type:e.type||c.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 x=new a.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:"/Users/karenredona/Desktop/d1studio/src/app/api/pull-remote/confirm/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:y,workUnitAsyncStorage:h,serverHooks:R}=x;function q(){return(0,i.patchFetch)({workAsyncStorage:y,workUnitAsyncStorage:h})}}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[638,686,603],()=>t(9556));module.exports=s})();
1
+ "use strict";(()=>{var e={};e.id=223,e.ids=[223],e.modules={10846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},44870: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")},29294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},63033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},94735:e=>{e.exports=require("events")},29021:e=>{e.exports=require("fs")},79748:e=>{e.exports=require("fs/promises")},81630:e=>{e.exports=require("http")},55591:e=>{e.exports=require("https")},21820:e=>{e.exports=require("os")},33873:e=>{e.exports=require("path")},27910:e=>{e.exports=require("stream")},41204:e=>{e.exports=require("string_decoder")},28354:e=>{e.exports=require("util")},74075:e=>{e.exports=require("zlib")},73024:e=>{e.exports=require("node:fs")},76760:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},73136:e=>{e.exports=require("node:url")},99556:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>R,routeModule:()=>A,serverHooks:()=>b,workAsyncStorage:()=>h,workUnitAsyncStorage:()=>y});var i={};t.r(i),t.d(i,{OPTIONS:()=>x,POST:()=>w});var a=t(42706),o=t(28203),s=t(45994),n=t(39187),u=t(79748),l=t(33873),p=t(65949),d=t(19421),g=t(44218),c=t(30961),m=t(81804);async function f(e,r,t,i){let a={...process.env,CLOUDFLARE_API_TOKEN:t,CLOUDFLARE_ACCOUNT_ID:r};try{let r=l.join(e,"migrations"),t=l.join(e,"migrations-temp");await (0,u.mkdir)(r,{recursive:!0}),await (0,u.mkdir)(t,{recursive:!0});let o=await (0,u.readdir)(t).catch(()=>[]);await Promise.all(o.map(e=>(0,u.unlink)(l.join(t,e)))),m.A.debug("Fetching remote migration metadata...");let s=await (0,c.GS)(e,i,a);m.A.debug("Remote migration metadata:",s),m.A.debug("Fetching migration file content from remote...");let n=new Map;for(let r of s)try{let o=r.name,s=await (0,d.sP)(e,i,o,a);n.set(o,s),m.A.debug(`Staged migration file: ${o}`),await (0,u.writeFile)(l.join(t,o),s,"utf8")}catch(e){throw m.A.error(`Error fetching content for migration ${r.name}:`,e),Error(`Failed to fetch migration file content for ${r.name}`)}m.A.debug("Fetching local schema for destructive update...");let p=await (0,g.ZX)(e,i,a,!1),f=p.filter(e=>"table"===e.type&&e.name&&"if"!==e.name.toLowerCase());m.A.debug("Local table schema:",f);let w=f.length>0?(0,g.IC)(f.map(e=>({tableName:e.name,sql:e.sql,type:e.type}))):[];m.A.debug("Computed drop order:",w),m.A.debug("Beginning destructive update...");try{for(let r of(m.A.debug("Disabling foreign keys..."),await (0,d.KK)(e,i,"PRAGMA foreign_keys=OFF;",a,!1),p.filter(e=>"trigger"===e.type)))m.A.debug(`Dropping trigger: ${r.name}`),await (0,d.KK)(e,i,(0,d.z6)(`DROP TRIGGER IF EXISTS ${r.name}`),a,!1);for(let r of p.filter(e=>"index"===e.type))m.A.debug(`Dropping index: ${r.name}`),await (0,d.KK)(e,i,(0,d.z6)(`DROP INDEX IF EXISTS ${r.name}`),a,!1);for(let r of w.reverse())m.A.debug(`Dropping table: ${r}`),await (0,d.KK)(e,i,(0,d.z6)(`DROP TABLE IF EXISTS ${r}`),a,!1);m.A.debug("Re-enabling foreign keys..."),await (0,d.KK)(e,i,"PRAGMA foreign_keys=ON;",a,!1)}catch(e){throw Error(`Error dropping existing objects: ${e.message}`)}try{m.A.debug("Resetting local migrations table..."),await (0,c.k0)(e,i,"local",!0)}catch(e){throw Error(`Error resetting migrations table: ${e.message}`)}let x={preview:[]},A="";try{for(let[t,o]of n.entries()){A=t,m.A.debug(`Applying migration: ${t}`),await (0,u.writeFile)(l.join(r,t),o,"utf8");let s=require("crypto").createHash("sha256").update(o).digest("hex");m.A.debug(`Recording migration: ${t} with checksum ${s}`),await (0,c.CM)(e,i,{name:t,checksum:s},a,!1),await (0,d.KK)(e,i,o,a,!1),x.preview.push({migration:t,action:"applied"})}}catch(e){throw Error(`Error applying migration ${A}: ${e.message}`)}m.A.debug("Replacing main migrations folder with staged files...");let h=await (0,u.readdir)(r).catch(()=>[]);if(h.length)for(let e of h)m.A.debug(`Deleting local migration file: ${e}`),await (0,u.unlink)(l.join(r,e));for(let[e,t]of n.entries())m.A.debug(`Copying staged file ${e} to main migrations folder`),await (0,u.writeFile)(l.join(r,e),t,"utf8");return m.A.debug("Pull migration applied successfully."),{appliedMigrations:Array.from(n.keys()),details:x}}catch(e){throw m.A.error("Pull migration error:",e),e}}async function w(e){try{let{accountId:r,apiToken:t}=await e.json(),i=process.env.D1_PROJECT_DIR;if(!i)return n.NextResponse.json({success:!1,error:{type:d.wU.VALIDATION_ERROR,message:"Project directory not configured"}},{status:500});let a=await (0,p.S)(i);if(!a||!a.config)return n.NextResponse.json({success:!1,error:{type:d.wU.VALIDATION_ERROR,message:"Could not find Wrangler configuration"}},{status:400});let o=a.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,u=await f(i,r,t,s);return n.NextResponse.json({success:!0,message:"Pull migrations applied successfully",details:u})}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 x(){return new n.NextResponse(null,{status:204})}let A=new a.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:"/Users/karenredona/Desktop/d1studio/src/app/api/pull-remote/confirm/route.js",nextConfigOutput:"",userland:i}),{workAsyncStorage:h,workUnitAsyncStorage:y,serverHooks:b}=A;function R(){return(0,s.patchFetch)({workAsyncStorage:h,workUnitAsyncStorage:y})}}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),i=r.X(0,[638,452,391,801],()=>t(99556));module.exports=i})();
@@ -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/603.js","../../../../chunks/638.js","../../../../chunks/686.js","../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
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/391.js","../../../../chunks/452.js","../../../../chunks/638.js","../../../../chunks/801.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":"7135","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/page.jsx":{"id":2624,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","422","static/chunks/422-6fa3c14fc64ad67b.js","735","static/chunks/735-c9144179c6bd7d06.js","974","static/chunks/app/page-79049bfa6cc07e11.js"],"async":false}},"entryCSSFiles":{"/Users/karenredona/Desktop/d1studio/src/":[],"/Users/karenredona/Desktop/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/cf41da7a0d47f779.css"}],"/Users/karenredona/Desktop/d1studio/src/app/page":[],"/Users/karenredona/Desktop/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":"57174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"87190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"33875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"88903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"84178","name":"*","chunks":[],"async":false}},"5612":{"*":{"id":"56053","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"52652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"61365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"66959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/page.jsx":{"id":5612,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","958","static/chunks/958-98887928efebfdf7.js","735","static/chunks/735-c9144179c6bd7d06.js","974","static/chunks/app/page-2c28a255a4ecd8d4.js"],"async":false}},"entryCSSFiles":{"/Users/karenredona/Desktop/d1studio/src/":[],"/Users/karenredona/Desktop/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/4957328384ed5c42.css"}],"/Users/karenredona/Desktop/d1studio/src/app/page":[],"/Users/karenredona/Desktop/d1studio/src/app/api/pull-remote/confirm/route":[]},"rscModuleMapping":{"33":{"*":{"id":"91831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"40802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"48530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"34863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"25155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"5612":{"*":{"id":"46487","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"13164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"88921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"13219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -1 +1 @@
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")},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")},6216:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>f,routeModule:()=>m,serverHooks:()=>R,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>v});var s={};t.r(s),t.d(s,{OPTIONS:()=>g,POST:()=>x});var o=t(2706),a=t(8203),n=t(5994),i=t(9187),p=t(9999),u=t(9421),l=t(4218),c=t(961);async function d(e,r,t,s){let o={...process.env,CLOUDFLARE_API_TOKEN:t,CLOUDFLARE_ACCOUNT_ID:r};try{let r=await (0,l.ZX)(e,s,o,!0),t=await (0,c.GS)(e,s,o),a=(0,l.IC)(r),n={preview:[],totalTables:r.length,totalMigrations:t.length};return a.forEach((e,t)=>{r.find(r=>r.name===e)&&n.preview.push({name:e,type:"table",action:"will be created",order:t+1})}),t.forEach(e=>{n.preview.push({name:e.name,type:"migration",action:"will be tracked"})}),n}catch(e){throw console.error("Pull preview generation error:",e),e}}async function x(e){try{let{accountId:r,apiToken:t}=await e.json(),s=process.env.D1_PROJECT_DIR;if(!s)return i.NextResponse.json({success:!1,error:{type:u.wU.VALIDATION_ERROR,message:"Project directory not configured"}},{status:500});let o=await (0,p.S)(s);if(!o||!o.config)return i.NextResponse.json({success:!1,error:{type:u.wU.VALIDATION_ERROR,message:"Could not find Wrangler configuration"}},{status:400});let a=o.config;if(!a.d1_databases?.length)return i.NextResponse.json({success:!1,error:{type:u.wU.VALIDATION_ERROR,message:"No D1 databases configured"}},{status:400});let n=a.d1_databases[0].database_name,l=await d(s,r,t,n);return i.NextResponse.json({success:!0,message:"Pull migration preview generated",details:l})}catch(e){return console.error("Pull remote preview error:",e),i.NextResponse.json({success:!1,error:{type:e.type||u.wU.EXECUTION_ERROR,message:e.message||"Failed to generate pull migration preview",details:e.details}},{status:500})}}async function g(){return new i.NextResponse(null,{status:204})}let m=new o.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/pull-remote/preview/route",pathname:"/api/pull-remote/preview",filename:"route",bundlePath:"app/api/pull-remote/preview/route"},resolvedPagePath:"/Users/karenredona/Desktop/d1studio/src/app/api/pull-remote/preview/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:w,workUnitAsyncStorage:v,serverHooks:R}=m;function f(){return(0,n.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:v})}}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[638,686,603],()=>t(6216));module.exports=s})();
1
+ "use strict";(()=>{var e={};e.id=399,e.ids=[399],e.modules={10846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},44870: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")},29294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},63033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},94735:e=>{e.exports=require("events")},29021:e=>{e.exports=require("fs")},79748:e=>{e.exports=require("fs/promises")},81630:e=>{e.exports=require("http")},55591:e=>{e.exports=require("https")},21820:e=>{e.exports=require("os")},33873:e=>{e.exports=require("path")},27910:e=>{e.exports=require("stream")},41204:e=>{e.exports=require("string_decoder")},28354:e=>{e.exports=require("util")},74075:e=>{e.exports=require("zlib")},73024:e=>{e.exports=require("node:fs")},76760:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},73136:e=>{e.exports=require("node:url")},66216:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>q,routeModule:()=>w,serverHooks:()=>f,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>R});var s={};t.r(s),t.d(s,{OPTIONS:()=>m,POST:()=>g});var o=t(42706),a=t(28203),n=t(45994),i=t(39187),p=t(65949),u=t(19421),l=t(44218),d=t(30961),c=t(81804);async function x(e,r,t,s){let o={...process.env,CLOUDFLARE_API_TOKEN:t,CLOUDFLARE_ACCOUNT_ID:r};try{let r=await (0,l.ZX)(e,s,o,!0),t=await (0,d.GS)(e,s,o),a=(0,l.IC)(r),n={preview:[],totalTables:r.length,totalMigrations:t.length};return a.forEach((e,t)=>{r.find(r=>r.name===e)&&n.preview.push({name:e,type:"table",action:"will be created",order:t+1})}),t.forEach(e=>{n.preview.push({name:e.name,type:"migration",action:"will be tracked"})}),n}catch(e){throw c.A.error("Pull preview generation error:",e),e}}async function g(e){try{let{accountId:r,apiToken:t}=await e.json(),s=process.env.D1_PROJECT_DIR;if(!s)return i.NextResponse.json({success:!1,error:{type:u.wU.VALIDATION_ERROR,message:"Project directory not configured"}},{status:500});let o=await (0,p.S)(s);if(!o||!o.config)return i.NextResponse.json({success:!1,error:{type:u.wU.VALIDATION_ERROR,message:"Could not find Wrangler configuration"}},{status:400});let a=o.config;if(!a.d1_databases?.length)return i.NextResponse.json({success:!1,error:{type:u.wU.VALIDATION_ERROR,message:"No D1 databases configured"}},{status:400});let n=a.d1_databases[0].database_name,l=await x(s,r,t,n);return i.NextResponse.json({success:!0,message:"Pull migration preview generated",details:l})}catch(e){return c.A.error("Pull remote preview error:",e),i.NextResponse.json({success:!1,error:{type:e.type||u.wU.EXECUTION_ERROR,message:e.message||"Failed to generate pull migration preview",details:e.details}},{status:500})}}async function m(){return new i.NextResponse(null,{status:204})}let w=new o.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/pull-remote/preview/route",pathname:"/api/pull-remote/preview",filename:"route",bundlePath:"app/api/pull-remote/preview/route"},resolvedPagePath:"/Users/karenredona/Desktop/d1studio/src/app/api/pull-remote/preview/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:v,workUnitAsyncStorage:R,serverHooks:f}=w;function q(){return(0,n.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:R})}}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[638,452,391,801],()=>t(66216));module.exports=s})();
@@ -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/603.js","../../../../chunks/638.js","../../../../chunks/686.js","../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
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/391.js","../../../../chunks/452.js","../../../../chunks/638.js","../../../../chunks/801.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":"7135","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/page.jsx":{"id":2624,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","422","static/chunks/422-6fa3c14fc64ad67b.js","735","static/chunks/735-c9144179c6bd7d06.js","974","static/chunks/app/page-79049bfa6cc07e11.js"],"async":false}},"entryCSSFiles":{"/Users/karenredona/Desktop/d1studio/src/":[],"/Users/karenredona/Desktop/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/cf41da7a0d47f779.css"}],"/Users/karenredona/Desktop/d1studio/src/app/page":[],"/Users/karenredona/Desktop/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":"57174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"87190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"33875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"88903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"84178","name":"*","chunks":[],"async":false}},"5612":{"*":{"id":"56053","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"52652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"61365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"66959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/page.jsx":{"id":5612,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","958","static/chunks/958-98887928efebfdf7.js","735","static/chunks/735-c9144179c6bd7d06.js","974","static/chunks/app/page-2c28a255a4ecd8d4.js"],"async":false}},"entryCSSFiles":{"/Users/karenredona/Desktop/d1studio/src/":[],"/Users/karenredona/Desktop/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/4957328384ed5c42.css"}],"/Users/karenredona/Desktop/d1studio/src/app/page":[],"/Users/karenredona/Desktop/d1studio/src/app/api/pull-remote/preview/route":[]},"rscModuleMapping":{"33":{"*":{"id":"91831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"40802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"48530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"34863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"25155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"5612":{"*":{"id":"46487","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"13164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"88921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"13219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -1,4 +1,4 @@
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")},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")},7628:(e,r,s)=>{s.r(r),s.d(r,{patchFetch:()=>f,routeModule:()=>R,serverHooks:()=>g,workAsyncStorage:()=>x,workUnitAsyncStorage:()=>h});var t={};s.r(t),s.d(t,{OPTIONS:()=>T,POST:()=>E});var a=s(2706),i=s(8203),o=s(5994),n=s(9187),p=s(9748),u=s(3873),d=s(9999),l=s(9421),c=s(961);async function m(e,r,s,t,a=!1){let i={...process.env,CLOUDFLARE_ACCOUNT_ID:r,CLOUDFLARE_API_TOKEN:s};try{let r=`
1
+ "use strict";(()=>{var e={};e.id=680,e.ids=[680],e.modules={10846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},44870: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")},29294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},63033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},94735:e=>{e.exports=require("events")},29021:e=>{e.exports=require("fs")},79748:e=>{e.exports=require("fs/promises")},81630:e=>{e.exports=require("http")},55591:e=>{e.exports=require("https")},21820:e=>{e.exports=require("os")},33873:e=>{e.exports=require("path")},27910:e=>{e.exports=require("stream")},41204:e=>{e.exports=require("string_decoder")},28354:e=>{e.exports=require("util")},74075:e=>{e.exports=require("zlib")},73024:e=>{e.exports=require("node:fs")},76760:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},73136:e=>{e.exports=require("node:url")},47628:(e,r,s)=>{s.r(r),s.d(r,{patchFetch:()=>f,routeModule:()=>R,serverHooks:()=>g,workAsyncStorage:()=>x,workUnitAsyncStorage:()=>h});var t={};s.r(t),s.d(t,{OPTIONS:()=>T,POST:()=>E});var a=s(42706),i=s(28203),o=s(45994),n=s(39187),p=s(79748),u=s(33873),d=s(65949),l=s(19421),c=s(30961);async function m(e,r,s,t,a=!1){let i={...process.env,CLOUDFLARE_ACCOUNT_ID:r,CLOUDFLARE_API_TOKEN:s};try{let 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,4 +11,4 @@
11
11
  name TEXT NOT NULL UNIQUE,
12
12
  applied_at DATETIME DEFAULT CURRENT_TIMESTAMP
13
13
  );
14
- `;await (0,l.KK)(e,t,r),await (0,l.KK)(e,t,s,i,!0);let o=await (0,l.KK)(e,t,"SELECT name FROM d1_migrations ORDER BY applied_at;",i,!0),n=new Map((e=>{try{let r=JSON.parse(e);return r[0]?.results||[]}catch{return[]}})(o).map(e=>[e.name,e])),d=u.join(e,"migrations"),m=(await (0,p.readdir)(d)).filter(e=>e.endsWith(".sql")).sort(),E={applied:[],skipped:[],preview:[]};for(let r of m){let s=u.join(d,r),o={name:r,action:"",reason:""};try{if(!(await (0,c.JD)(s)).isValid){o.action="failed validation",o.reason="Migration validation failed",E.preview.push(o);continue}if(n.has(r)){o.action="skipped",o.reason="Already applied",E.preview.push(o),E.skipped.push({name:r,reason:o.reason});continue}let u=await (0,p.readFile)(s,"utf8");u=(0,l.bp)(u);let d=(0,l.By)(u),m=d.tableName;if("CREATE_TABLE"===d.type&&m&&await (0,l.F9)(e,t,i,m,!0)){o.action="skipped",o.reason=`Table "${m}" already exists`,E.skipped.push({name:r,reason:o.reason}),E.preview.push(o);continue}o.action="will be applied",E.preview.push(o),a||(await (0,l.KK)(e,t,u,i,!0),await (0,l.KK)(e,t,`INSERT INTO d1_migrations (name) VALUES ('${r}');`,i,!0),o.action="applied",E.applied.push({name:r}))}catch(t){let e=t.message||"",s=t.details&&t.details.stderr||"";e.includes("already exists")||s.includes("already exists")?(o.action="skipped",o.reason="Already applied"):(o.action="failed",o.reason=e||"Failed to apply migration"),E.skipped.push({name:r,reason:o.reason}),E.preview.push(o)}}return{success:!0,preview:!1,applied:E.applied.length,skipped:E.skipped.length,details:E}}catch(e){throw{type:l.wU.EXECUTION_ERROR,message:e.message||"Failed to push migrations",details:e.details||{error:e.stderr||e.message}}}}async function E(e){try{let{accountId:r,apiToken:s}=await e.json(),t=process.env.D1_PROJECT_DIR;if(!t)return n.NextResponse.json({success:!1,error:{message:"Project directory not configured",type:l.wU.VALIDATION_ERROR}},{status:500});let a=await (0,d.S)(t);if(!a||!a.config)return n.NextResponse.json({success:!1,error:{message:"Could not find Wrangler configuration",type:l.wU.VALIDATION_ERROR}},{status:400});let i=a.config;if(!i.d1_databases?.length)return n.NextResponse.json({success:!1,error:{message:"No D1 databases configured",type:l.wU.VALIDATION_ERROR}},{status:400});let o=i.d1_databases[0].database_name,p=await m(t,r,s,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||l.wU.EXECUTION_ERROR,message:e.message||"Failed to push to remote",details:e.details||{error:e.stderr||e.message}}},{status:e.type===l.wU.VALIDATION_ERROR?400:500})}}async function T(){return new n.NextResponse(null,{status:204})}let R=new a.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:"/Users/karenredona/Desktop/d1studio/src/app/api/push-remote/confirm/route.js",nextConfigOutput:"",userland:t}),{workAsyncStorage:x,workUnitAsyncStorage:h,serverHooks:g}=R;function f(){return(0,o.patchFetch)({workAsyncStorage:x,workUnitAsyncStorage:h})}}};var r=require("../../../../webpack-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[638,686,603],()=>s(7628));module.exports=t})();
14
+ `;await (0,l.KK)(e,t,r),await (0,l.KK)(e,t,s,i,!0);let o=await (0,l.KK)(e,t,"SELECT name FROM d1_migrations ORDER BY applied_at;",i,!0),n=new Map((e=>{try{let r=JSON.parse(e);return r[0]?.results||[]}catch{return[]}})(o).map(e=>[e.name,e])),d=u.join(e,"migrations"),m=(await (0,p.readdir)(d)).filter(e=>e.endsWith(".sql")).sort(),E={applied:[],skipped:[],preview:[]};for(let r of m){let s=u.join(d,r),o={name:r,action:"",reason:""};try{if(!(await (0,c.JD)(s)).isValid){o.action="failed validation",o.reason="Migration validation failed",E.preview.push(o);continue}if(n.has(r)){o.action="skipped",o.reason="Already applied",E.preview.push(o),E.skipped.push({name:r,reason:o.reason});continue}let u=await (0,p.readFile)(s,"utf8");u=(0,l.bp)(u);let d=(0,l.By)(u),m=d.tableName;if("CREATE_TABLE"===d.type&&m&&await (0,l.F9)(e,t,i,m,!0)){o.action="skipped",o.reason=`Table "${m}" already exists`,E.skipped.push({name:r,reason:o.reason}),E.preview.push(o);continue}o.action="will be applied",E.preview.push(o),a||(await (0,l.KK)(e,t,u,i,!0),await (0,l.KK)(e,t,`INSERT INTO d1_migrations (name) VALUES ('${r}');`,i,!0),o.action="applied",E.applied.push({name:r}))}catch(t){let e=t.message||"",s=t.details&&t.details.stderr||"";e.includes("already exists")||s.includes("already exists")?(o.action="skipped",o.reason="Already applied"):(o.action="failed",o.reason=e||"Failed to apply migration"),E.skipped.push({name:r,reason:o.reason}),E.preview.push(o)}}return{success:!0,preview:!1,applied:E.applied.length,skipped:E.skipped.length,details:E}}catch(e){throw{type:l.wU.EXECUTION_ERROR,message:e.message||"Failed to push migrations",details:e.details||{error:e.stderr||e.message}}}}async function E(e){try{let{accountId:r,apiToken:s}=await e.json(),t=process.env.D1_PROJECT_DIR;if(!t)return n.NextResponse.json({success:!1,error:{message:"Project directory not configured",type:l.wU.VALIDATION_ERROR}},{status:500});let a=await (0,d.S)(t);if(!a||!a.config)return n.NextResponse.json({success:!1,error:{message:"Could not find Wrangler configuration",type:l.wU.VALIDATION_ERROR}},{status:400});let i=a.config;if(!i.d1_databases?.length)return n.NextResponse.json({success:!1,error:{message:"No D1 databases configured",type:l.wU.VALIDATION_ERROR}},{status:400});let o=i.d1_databases[0].database_name,p=await m(t,r,s,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||l.wU.EXECUTION_ERROR,message:e.message||"Failed to push to remote",details:e.details||{error:e.stderr||e.message}}},{status:e.type===l.wU.VALIDATION_ERROR?400:500})}}async function T(){return new n.NextResponse(null,{status:204})}let R=new a.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:"/Users/karenredona/Desktop/d1studio/src/app/api/push-remote/confirm/route.js",nextConfigOutput:"",userland:t}),{workAsyncStorage:x,workUnitAsyncStorage:h,serverHooks:g}=R;function f(){return(0,o.patchFetch)({workAsyncStorage:x,workUnitAsyncStorage:h})}}};var r=require("../../../../webpack-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[638,452,391,801],()=>s(47628));module.exports=t})();
@@ -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/603.js","../../../../chunks/638.js","../../../../chunks/686.js","../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
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/391.js","../../../../chunks/452.js","../../../../chunks/638.js","../../../../chunks/801.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":"7135","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/page.jsx":{"id":2624,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","422","static/chunks/422-6fa3c14fc64ad67b.js","735","static/chunks/735-c9144179c6bd7d06.js","974","static/chunks/app/page-79049bfa6cc07e11.js"],"async":false}},"entryCSSFiles":{"/Users/karenredona/Desktop/d1studio/src/":[],"/Users/karenredona/Desktop/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/cf41da7a0d47f779.css"}],"/Users/karenredona/Desktop/d1studio/src/app/page":[],"/Users/karenredona/Desktop/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":"57174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"87190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"33875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"88903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"84178","name":"*","chunks":[],"async":false}},"5612":{"*":{"id":"56053","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"52652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"61365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"66959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/page.jsx":{"id":5612,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","958","static/chunks/958-98887928efebfdf7.js","735","static/chunks/735-c9144179c6bd7d06.js","974","static/chunks/app/page-2c28a255a4ecd8d4.js"],"async":false}},"entryCSSFiles":{"/Users/karenredona/Desktop/d1studio/src/":[],"/Users/karenredona/Desktop/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/4957328384ed5c42.css"}],"/Users/karenredona/Desktop/d1studio/src/app/page":[],"/Users/karenredona/Desktop/d1studio/src/app/api/push-remote/confirm/route":[]},"rscModuleMapping":{"33":{"*":{"id":"91831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"40802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"48530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"34863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"25155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"5612":{"*":{"id":"46487","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"13164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"88921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"13219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var e={};e.id=868,e.ids=[868],e.modules={846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{e.exports=require("buffer")},9646:e=>{e.exports=require("child_process")},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")},9330:(e,r,s)=>{s.r(r),s.d(r,{patchFetch:()=>w,routeModule:()=>m,serverHooks:()=>h,workAsyncStorage:()=>x,workUnitAsyncStorage:()=>g});var t={};s.r(t),s.d(t,{OPTIONS:()=>T,POST:()=>R});var a=s(2706),i=s(8203),o=s(5994),p=s(9187),n=s(9748),u=s(3873),d=s(9999),c=s(9421),l=s(961);async function E(e,r,s,t,a=!0){let i={...process.env,CLOUDFLARE_ACCOUNT_ID:r,CLOUDFLARE_API_TOKEN:s};try{let r=`
1
+ "use strict";(()=>{var e={};e.id=868,e.ids=[868],e.modules={10846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},44870: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")},29294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},63033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},94735:e=>{e.exports=require("events")},29021:e=>{e.exports=require("fs")},79748:e=>{e.exports=require("fs/promises")},81630:e=>{e.exports=require("http")},55591:e=>{e.exports=require("https")},21820:e=>{e.exports=require("os")},33873:e=>{e.exports=require("path")},27910:e=>{e.exports=require("stream")},41204:e=>{e.exports=require("string_decoder")},28354:e=>{e.exports=require("util")},74075:e=>{e.exports=require("zlib")},73024:e=>{e.exports=require("node:fs")},76760:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},73136:e=>{e.exports=require("node:url")},19330:(e,r,s)=>{s.r(r),s.d(r,{patchFetch:()=>N,routeModule:()=>x,serverHooks:()=>w,workAsyncStorage:()=>g,workUnitAsyncStorage:()=>h});var t={};s.r(t),s.d(t,{OPTIONS:()=>m,POST:()=>T});var a=s(42706),i=s(28203),o=s(45994),p=s(39187),n=s(79748),u=s(33873),d=s(65949),c=s(19421),l=s(30961),E=s(81804);async function R(e,r,s,t,a=!0){let i={...process.env,CLOUDFLARE_ACCOUNT_ID:r,CLOUDFLARE_API_TOKEN:s};try{let 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,4 +11,4 @@
11
11
  name TEXT NOT NULL UNIQUE,
12
12
  applied_at DATETIME DEFAULT CURRENT_TIMESTAMP
13
13
  );
14
- `;await (0,c.KK)(e,t,r),await (0,c.KK)(e,t,s,i,!0);let a=await (0,c.KK)(e,t,"SELECT name FROM d1_migrations ORDER BY applied_at;",i,!0),o=new Map((e=>{try{let r=JSON.parse(e);return r[0]?.results||[]}catch{return[]}})(a).map(e=>[e.name,e])),p=u.join(e,"migrations"),d=(await (0,n.readdir)(p)).filter(e=>e.endsWith(".sql")).sort(),E={applied:[],skipped:[],preview:[]};for(let e of d){let r=u.join(p,e),s={name:e,action:"",reason:""};try{if(!(await (0,l.JD)(r)).isValid){s.action="failed validation",s.reason="Migration validation failed",E.preview.push(s);continue}if(o.has(e)){s.action="skipped",s.reason="Already applied",E.preview.push(s),E.skipped.push({name:e,reason:s.reason});continue}s.action="will be applied",E.preview.push(s)}catch(r){s.action="failed",s.reason=r.message||"Failed to process migration",E.preview.push(s),E.skipped.push({name:e,reason:s.reason})}}return{success:!0,preview:!0,applied:E.applied.length,skipped:E.skipped.length,details:E}}catch(e){throw{type:c.wU.EXECUTION_ERROR,message:e.message||"Failed to push migrations",details:e.details||{error:e.stderr||e.message}}}}async function R(e){try{let{accountId:r,apiToken:s}=await e.json(),t=process.env.D1_PROJECT_DIR;if(!t)return p.NextResponse.json({success:!1,error:{type:c.wU.VALIDATION_ERROR,message:"Project directory not configured"}},{status:500});let a=await (0,d.S)(t);if(!a||!a.config)return p.NextResponse.json({success:!1,error:{type:c.wU.VALIDATION_ERROR,message:"Could not find Wrangler configuration"}},{status:400});let i=a.config;if(!i.d1_databases?.length)return p.NextResponse.json({success:!1,error:{type:c.wU.VALIDATION_ERROR,message:"No D1 databases configured"}},{status:400});let o=i.d1_databases[0].database_name,n=await E(t,r,s,o,!0);return p.NextResponse.json({success:!0,message:"Preview generated for migrations to be pushed to remote",details:n})}catch(e){return console.error("Push to remote preview error:",e),p.NextResponse.json({success:!1,error:{type:e.type||c.wU.EXECUTION_ERROR,message:e.message||"Failed to push to remote preview",details:e.details||{error:e.stderr||e.message}}},{status:e.type===c.wU.VALIDATION_ERROR?400:500})}}async function T(){return new p.NextResponse(null,{status:204})}let m=new a.AppRouteRouteModule({definition:{kind:i.RouteKind.APP_ROUTE,page:"/api/push-remote/preview/route",pathname:"/api/push-remote/preview",filename:"route",bundlePath:"app/api/push-remote/preview/route"},resolvedPagePath:"/Users/karenredona/Desktop/d1studio/src/app/api/push-remote/preview/route.js",nextConfigOutput:"",userland:t}),{workAsyncStorage:x,workUnitAsyncStorage:g,serverHooks:h}=m;function w(){return(0,o.patchFetch)({workAsyncStorage:x,workUnitAsyncStorage:g})}}};var r=require("../../../../webpack-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[638,686,603],()=>s(9330));module.exports=t})();
14
+ `;await (0,c.KK)(e,t,r),await (0,c.KK)(e,t,s,i,!0);let a=await (0,c.KK)(e,t,"SELECT name FROM d1_migrations ORDER BY applied_at;",i,!0),o=new Map((e=>{try{let r=JSON.parse(e);return r[0]?.results||[]}catch{return[]}})(a).map(e=>[e.name,e])),p=u.join(e,"migrations"),d=(await (0,n.readdir)(p)).filter(e=>e.endsWith(".sql")).sort(),R={applied:[],skipped:[],preview:[]};for(let e of d){let r=u.join(p,e),s={name:e,action:"",reason:""};try{if(!(await (0,l.JD)(r)).isValid){s.action="failed validation",s.reason="Migration validation failed",R.preview.push(s);continue}if(o.has(e)){s.action="skipped",s.reason="Already applied",R.preview.push(s),R.skipped.push({name:e,reason:s.reason});continue}s.action="will be applied",R.preview.push(s)}catch(r){s.action="failed",s.reason=r.message||"Failed to process migration",R.preview.push(s),R.skipped.push({name:e,reason:s.reason})}}return E.A.debug("Push Preview Result (server):",R),{success:!0,preview:!0,applied:R.applied.length,skipped:R.skipped.length,details:R}}catch(e){throw{type:c.wU.EXECUTION_ERROR,message:e.message||"Failed to push migrations",details:e.details||{error:e.stderr||e.message}}}}async function T(e){try{let{accountId:r,apiToken:s}=await e.json(),t=process.env.D1_PROJECT_DIR;if(!t)return p.NextResponse.json({success:!1,error:{type:c.wU.VALIDATION_ERROR,message:"Project directory not configured"}},{status:500});let a=await (0,d.S)(t);if(!a||!a.config)return p.NextResponse.json({success:!1,error:{type:c.wU.VALIDATION_ERROR,message:"Could not find Wrangler configuration"}},{status:400});let i=a.config;if(!i.d1_databases?.length)return p.NextResponse.json({success:!1,error:{type:c.wU.VALIDATION_ERROR,message:"No D1 databases configured"}},{status:400});let o=i.d1_databases[0].database_name,n=await R(t,r,s,o,!0);return p.NextResponse.json({success:!0,message:"Preview generated for migrations to be pushed to remote",details:n})}catch(e){return E.A.error("Push to remote preview error:",e),p.NextResponse.json({success:!1,error:{type:e.type||c.wU.EXECUTION_ERROR,message:e.message||"Failed to push to remote preview",details:e.details||{error:e.stderr||e.message}}},{status:e.type===c.wU.VALIDATION_ERROR?400:500})}}async function m(){return new p.NextResponse(null,{status:204})}let x=new a.AppRouteRouteModule({definition:{kind:i.RouteKind.APP_ROUTE,page:"/api/push-remote/preview/route",pathname:"/api/push-remote/preview",filename:"route",bundlePath:"app/api/push-remote/preview/route"},resolvedPagePath:"/Users/karenredona/Desktop/d1studio/src/app/api/push-remote/preview/route.js",nextConfigOutput:"",userland:t}),{workAsyncStorage:g,workUnitAsyncStorage:h,serverHooks:w}=x;function N(){return(0,o.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:h})}}};var r=require("../../../../webpack-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[638,452,391,801],()=>s(19330));module.exports=t})();
@@ -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/603.js","../../../../chunks/638.js","../../../../chunks/686.js","../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
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/391.js","../../../../chunks/452.js","../../../../chunks/638.js","../../../../chunks/801.js","../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/push-remote/preview/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","name":"*","chunks":[],"async":false}},"2624":{"*":{"id":"7135","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/page.jsx":{"id":2624,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","422","static/chunks/422-6fa3c14fc64ad67b.js","735","static/chunks/735-c9144179c6bd7d06.js","974","static/chunks/app/page-79049bfa6cc07e11.js"],"async":false}},"entryCSSFiles":{"/Users/karenredona/Desktop/d1studio/src/":[],"/Users/karenredona/Desktop/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/cf41da7a0d47f779.css"}],"/Users/karenredona/Desktop/d1studio/src/app/page":[],"/Users/karenredona/Desktop/d1studio/src/app/api/push-remote/preview/route":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","name":"*","chunks":[],"async":false}},"2624":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/push-remote/preview/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"57174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"87190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"33875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"88903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"84178","name":"*","chunks":[],"async":false}},"5612":{"*":{"id":"56053","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"52652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"61365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"66959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/page.jsx":{"id":5612,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","958","static/chunks/958-98887928efebfdf7.js","735","static/chunks/735-c9144179c6bd7d06.js","974","static/chunks/app/page-2c28a255a4ecd8d4.js"],"async":false}},"entryCSSFiles":{"/Users/karenredona/Desktop/d1studio/src/":[],"/Users/karenredona/Desktop/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/4957328384ed5c42.css"}],"/Users/karenredona/Desktop/d1studio/src/app/page":[],"/Users/karenredona/Desktop/d1studio/src/app/api/push-remote/preview/route":[]},"rscModuleMapping":{"33":{"*":{"id":"91831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"40802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"48530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"34863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"25155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"5612":{"*":{"id":"46487","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"13164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"88921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"13219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -1,8 +1,8 @@
1
- "use strict";(()=>{var e={};e.id=58,e.ids=[58],e.modules={846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{e.exports=require("buffer")},9646:e=>{e.exports=require("child_process")},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")},5999:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>g,routeModule:()=>E,serverHooks:()=>O,workAsyncStorage:()=>N,workUnitAsyncStorage:()=>T});var s={};t.r(s),t.d(s,{OPTIONS:()=>R,POST:()=>p});var o=t(2706),n=t(8203),a=t(5994),i=t(9187),u=t(9999),d=t(9421),l=t(961);let c={SYNTAX_ERROR:"SYNTAX_ERROR",EXECUTION_ERROR:"EXECUTION_ERROR",TABLE_NOT_FOUND:"TABLE_NOT_FOUND",TABLE_EXISTS:"TABLE_EXISTS",FOREIGN_KEY_ERROR:"FOREIGN_KEY_ERROR",UNIQUE_CONSTRAINT_ERROR:"UNIQUE_CONSTRAINT_ERROR",NOT_NULL_CONSTRAINT_ERROR:"NOT_NULL_CONSTRAINT_ERROR",CHECK_CONSTRAINT_ERROR:"CHECK_CONSTRAINT_ERROR",UNKNOWN_ERROR:"UNKNOWN_ERROR"};async function p(e){try{let r;let t=process.env.D1_PROJECT_DIR;if(!t)return i.NextResponse.json({error:"Project directory not configured"},{status:500});let{query:s}=await e.json();if(!s?.trim())return i.NextResponse.json({success:!1,error:{message:"Query cannot be empty"}},{status:400});let o=await (0,u.S)(t);if(!o||!o.config)return i.NextResponse.json({success:!1,error:{message:"No Wrangler configuration file found"}},{status:404});let n=o.config;if(!n.d1_databases?.length)return i.NextResponse.json({success:!1,error:{message:"No D1 databases configured"}},{status:404});let a=n.d1_databases[0].database_name,c=(0,d.mA)(s);if(!c.length)return i.NextResponse.json({success:!1,error:{message:"No valid SQL statements found"}},{status:400});c=c.map(d.Gq);let p=`
1
+ "use strict";(()=>{var e={};e.id=58,e.ids=[58],e.modules={10846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},44870: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")},29294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},63033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},94735:e=>{e.exports=require("events")},29021:e=>{e.exports=require("fs")},79748:e=>{e.exports=require("fs/promises")},81630:e=>{e.exports=require("http")},55591:e=>{e.exports=require("https")},21820:e=>{e.exports=require("os")},33873:e=>{e.exports=require("path")},27910:e=>{e.exports=require("stream")},41204:e=>{e.exports=require("string_decoder")},28354:e=>{e.exports=require("util")},74075:e=>{e.exports=require("zlib")},73024:e=>{e.exports=require("node:fs")},76760:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},73136:e=>{e.exports=require("node:url")},5999:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>f,routeModule:()=>N,serverHooks:()=>g,workAsyncStorage:()=>T,workUnitAsyncStorage:()=>O});var s={};t.r(s),t.d(s,{OPTIONS:()=>E,POST:()=>R});var o=t(42706),n=t(28203),a=t(45994),i=t(39187),u=t(65949),d=t(19421),l=t(30961);let c={SYNTAX_ERROR:"SYNTAX_ERROR",EXECUTION_ERROR:"EXECUTION_ERROR",TABLE_NOT_FOUND:"TABLE_NOT_FOUND",TABLE_EXISTS:"TABLE_EXISTS",FOREIGN_KEY_ERROR:"FOREIGN_KEY_ERROR",UNIQUE_CONSTRAINT_ERROR:"UNIQUE_CONSTRAINT_ERROR",NOT_NULL_CONSTRAINT_ERROR:"NOT_NULL_CONSTRAINT_ERROR",CHECK_CONSTRAINT_ERROR:"CHECK_CONSTRAINT_ERROR",UNKNOWN_ERROR:"UNKNOWN_ERROR"};var p=t(81804);async function R(e){p.A.logRequest("POST","/api/query");try{let r;let t=process.env.D1_PROJECT_DIR;if(!t)return p.A.error("Project directory not configured"),i.NextResponse.json({error:"Project directory not configured"},{status:500});let{query:s}=await e.json();if(p.A.shouldLog("debug")&&p.A.debug("Received query:",s),!s?.trim())return i.NextResponse.json({success:!1,error:{message:"Query cannot be empty"}},{status:400});let o=await (0,u.S)(t);if(!o||!o.config)return p.A.error("No Wrangler configuration file found"),i.NextResponse.json({success:!1,error:{message:"No Wrangler configuration file found"}},{status:404});let n=o.config;if(!n.d1_databases?.length)return i.NextResponse.json({success:!1,error:{message:"No D1 databases configured"}},{status:404});let a=n.d1_databases[0].database_name,c=(0,d.mA)(s);if(!c.length)return i.NextResponse.json({success:!1,error:{message:"No valid SQL statements found"}},{status:400});c=c.map(d.Gq);let R=`
2
2
  CREATE TABLE IF NOT EXISTS d1_migrations (
3
3
  id INTEGER PRIMARY KEY AUTOINCREMENT,
4
4
  name TEXT NOT NULL UNIQUE,
5
5
  checksum TEXT NOT NULL,
6
6
  applied_at DATETIME DEFAULT CURRENT_TIMESTAMP
7
7
  );
8
- `;if(await (0,d.KK)(t,a,p),c.some(d.QQ)){let e=await (0,l.Gc)(t,a,c);console.log("Schema changes processed:",e),r={success:!0,migrations:e,results:[{results:[]}]}}else{let e=[];for(let r of c){let s=await (0,d.KK)(t,a,r.sql);try{let r=JSON.parse(s),t=r[0]?.results||[];e.push(...t)}catch(e){continue}}r={success:!0,results:[{results:e}]}}return i.NextResponse.json(r)}catch(t){console.error("Query execution error:",t);let e=function(e){if(console.debug("parseSQLError - Received error:",e),!e)return console.debug("parseSQLError - error is null or undefined."),{type:c.UNKNOWN_ERROR,message:"An unknown error occurred",details:{}};let r="",t=null,s=null,o=e.cmd||e.details&&e.details.command;if(o){let e=o.match(/--command="(.+?)"/s);e&&console.debug("parseSQLError - Extracted original query:",s=e[1].replace(/\\n/g,"\n"))}let n=e.stderr||e.details&&e.details.stderr;if(n){let a=n.replace(/\x1B\[[0-9;]*[a-zA-Z]/g,"");if(console.debug("parseSQLError - Cleaned stderr:",a),a.includes("env: node: No such file or directory"))return console.debug("parseSQLError - Detected 'env: node: No such file or directory' error."),{type:c.EXECUTION_ERROR,message:e.message||"Execution error: env: node: No such file or directory",details:{originalQuery:s,stderr:a}};let i=a.match(/near "([^"]+)": syntax error at offset (\d+)/);if(i){let[e,o,n]=i;return t=parseInt(n,10),r=`Syntax error near "${o}" at position ${t}`,console.debug("parseSQLError - Syntax error detected:",{near:o,offset:t}),{type:c.SYNTAX_ERROR,message:r,details:{originalQuery:s,errorLocation:{offset:t,near:o},stderr:a}}}if(a.includes("UNIQUE constraint failed")){let[e,r,t]=a.match(/UNIQUE constraint failed: (\w+)\.(\w+)/)||[];return console.debug("parseSQLError - UNIQUE constraint error detected:",{table:r,column:t}),{type:c.UNIQUE_CONSTRAINT_ERROR,message:`Unique constraint violation updating ${r}.${t}`,details:{originalQuery:s,stderr:a}}}if(a.includes("NOT NULL constraint failed")){let[e,r,t]=a.match(/NOT NULL constraint failed: (\w+)\.(\w+)/)||[];return console.debug("parseSQLError - NOT NULL constraint error detected:",{table:r,column:t}),{type:c.NOT_NULL_CONSTRAINT_ERROR,message:`NOT NULL constraint violation updating ${r}.${t}`,details:{originalQuery:s,stderr:a}}}if(a.includes("CHECK constraint failed")){let[e,r]=a.match(/CHECK constraint failed: (\w+)/)||[];return console.debug("parseSQLError - CHECK constraint error detected:",{constraintName:r}),{type:c.CHECK_CONSTRAINT_ERROR,message:`Check constraint violation updating ${r}`,details:{originalQuery:s,stderr:a}}}if(a.includes("FOREIGN KEY constraint failed")){console.debug("parseSQLError - FOREIGN KEY constraint error detected.");let e=/--command="([^"]+)"/.exec(o||""),r=e?e[1]:null,t={};if(r){let e=/UPDATE\s+(\w+)\s+SET\s+(\w+)\s*=/.exec(r);e&&(t={table:e[1],column:e[2]})}let s=t.table?`Foreign key constraint violation updating ${t.table}.${t.column}`:"Foreign key constraint violation";return{type:c.FOREIGN_KEY_ERROR,message:s,details:{...t,originalQuery:r,stderr:a}}}if(a.includes("no such table")){let[e,r]=a.match(/no such table: (\w+)/)||[];return console.debug("parseSQLError - Table not found error detected:",{table:r}),{type:c.TABLE_NOT_FOUND,message:`Table not found: ${r}`,details:{originalQuery:s,stderr:a}}}if(a.includes("already exists")){let[e,r]=a.match(/table (\w+) already exists/)||[];return console.debug("parseSQLError - Table exists error detected:",{table:r}),{type:c.TABLE_EXISTS,message:`Table already exists: ${r}`,details:{originalQuery:s,stderr:a}}}return console.debug("parseSQLError - No specific error match found. Using fallback for execution error."),{type:c.EXECUTION_ERROR,message:e.message||"Failed to execute SQL command",details:{originalQuery:s,stderr:a}}}return console.debug("parseSQLError - No stderr available; using default error handling."),{type:c.UNKNOWN_ERROR,message:e.message||"An unknown error occurred",details:{}}}(t),r=t.type===d.wU.VALIDATION_ERROR?400:t.type===d.wU.DEPENDENCY_ERROR?409:500;return i.NextResponse.json({success:!1,error:e},{status:r})}}async function R(){return new i.NextResponse(null,{status:204,headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type"}})}let E=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/query/route",pathname:"/api/query",filename:"route",bundlePath:"app/api/query/route"},resolvedPagePath:"/Users/karenredona/Desktop/d1studio/src/app/api/query/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:N,workUnitAsyncStorage:T,serverHooks:O}=E;function g(){return(0,a.patchFetch)({workAsyncStorage:N,workUnitAsyncStorage:T})}}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[638,686,603],()=>t(5999));module.exports=s})();
8
+ `;if(await (0,d.KK)(t,a,R),c.some(d.QQ)){let e=await (0,l.Gc)(t,a,c);r={success:!0,migrations:e,results:[{results:[]}]}}else{let e=[];for(let r of c){let s=await (0,d.KK)(t,a,r.sql);try{let r=JSON.parse(s),t=r[0]?.results||[];e.push(...t)}catch(e){continue}}r={success:!0,results:[{results:e}]}}return i.NextResponse.json(r)}catch(t){p.A.logError(t,"query-route");let e=function(e){if(console.debug("parseSQLError - Received error:",e),!e)return console.debug("parseSQLError - error is null or undefined."),{type:c.UNKNOWN_ERROR,message:"An unknown error occurred",details:{}};let r="",t=null,s=null,o=e.cmd||e.details&&e.details.command;if(o){let e=o.match(/--command="(.+?)"/s);e&&console.debug("parseSQLError - Extracted original query:",s=e[1].replace(/\\n/g,"\n"))}let n=e.stderr||e.details&&e.details.stderr;if(n){let a=n.replace(/\x1B\[[0-9;]*[a-zA-Z]/g,"");if(console.debug("parseSQLError - Cleaned stderr:",a),a.includes("env: node: No such file or directory"))return console.debug("parseSQLError - Detected 'env: node: No such file or directory' error."),{type:c.EXECUTION_ERROR,message:e.message||"Execution error: env: node: No such file or directory",details:{originalQuery:s,stderr:a}};let i=a.match(/near "([^"]+)": syntax error at offset (\d+)/);if(i){let[e,o,n]=i;return t=parseInt(n,10),r=`Syntax error near "${o}" at position ${t}`,console.debug("parseSQLError - Syntax error detected:",{near:o,offset:t}),{type:c.SYNTAX_ERROR,message:r,details:{originalQuery:s,errorLocation:{offset:t,near:o},stderr:a}}}if(a.includes("UNIQUE constraint failed")){let[e,r,t]=a.match(/UNIQUE constraint failed: (\w+)\.(\w+)/)||[];return console.debug("parseSQLError - UNIQUE constraint error detected:",{table:r,column:t}),{type:c.UNIQUE_CONSTRAINT_ERROR,message:`Unique constraint violation updating ${r}.${t}`,details:{originalQuery:s,stderr:a}}}if(a.includes("NOT NULL constraint failed")){let[e,r,t]=a.match(/NOT NULL constraint failed: (\w+)\.(\w+)/)||[];return console.debug("parseSQLError - NOT NULL constraint error detected:",{table:r,column:t}),{type:c.NOT_NULL_CONSTRAINT_ERROR,message:`NOT NULL constraint violation updating ${r}.${t}`,details:{originalQuery:s,stderr:a}}}if(a.includes("CHECK constraint failed")){let[e,r]=a.match(/CHECK constraint failed: (\w+)/)||[];return console.debug("parseSQLError - CHECK constraint error detected:",{constraintName:r}),{type:c.CHECK_CONSTRAINT_ERROR,message:`Check constraint violation updating ${r}`,details:{originalQuery:s,stderr:a}}}if(a.includes("FOREIGN KEY constraint failed")){console.debug("parseSQLError - FOREIGN KEY constraint error detected.");let e=/--command="([^"]+)"/.exec(o||""),r=e?e[1]:null,t={};if(r){let e=/UPDATE\s+(\w+)\s+SET\s+(\w+)\s*=/.exec(r);e&&(t={table:e[1],column:e[2]})}let s=t.table?`Foreign key constraint violation updating ${t.table}.${t.column}`:"Foreign key constraint violation";return{type:c.FOREIGN_KEY_ERROR,message:s,details:{...t,originalQuery:r,stderr:a}}}if(a.includes("no such table")){let[e,r]=a.match(/no such table: (\w+)/)||[];return console.debug("parseSQLError - Table not found error detected:",{table:r}),{type:c.TABLE_NOT_FOUND,message:`Table not found: ${r}`,details:{originalQuery:s,stderr:a}}}if(a.includes("already exists")){let[e,r]=a.match(/table (\w+) already exists/)||[];return console.debug("parseSQLError - Table exists error detected:",{table:r}),{type:c.TABLE_EXISTS,message:`Table already exists: ${r}`,details:{originalQuery:s,stderr:a}}}return console.debug("parseSQLError - No specific error match found. Using fallback for execution error."),{type:c.EXECUTION_ERROR,message:e.message||"Failed to execute SQL command",details:{originalQuery:s,stderr:a}}}return console.debug("parseSQLError - No stderr available; using default error handling."),{type:c.UNKNOWN_ERROR,message:e.message||"An unknown error occurred",details:{}}}(t),r=t.type===d.wU.VALIDATION_ERROR?400:t.type===d.wU.DEPENDENCY_ERROR?409:500;return i.NextResponse.json({success:!1,error:e},{status:r})}}async function E(){return new i.NextResponse(null,{status:204,headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type"}})}let N=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/query/route",pathname:"/api/query",filename:"route",bundlePath:"app/api/query/route"},resolvedPagePath:"/Users/karenredona/Desktop/d1studio/src/app/api/query/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:T,workUnitAsyncStorage:O,serverHooks:g}=N;function f(){return(0,a.patchFetch)({workAsyncStorage:T,workUnitAsyncStorage:O})}}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[638,452,391,801],()=>t(5999));module.exports=s})();
@@ -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/603.js","../../../chunks/638.js","../../../chunks/686.js","../../../webpack-runtime.js","route_client-reference-manifest.js"]}
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/391.js","../../../chunks/452.js","../../../chunks/638.js","../../../chunks/801.js","../../../webpack-runtime.js","route_client-reference-manifest.js"]}