d1s 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/README.md +4 -0
  2. package/dist/.next/.next/BUILD_ID +1 -1
  3. package/dist/.next/.next/app-build-manifest.json +27 -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/.tsbuildinfo +1 -1
  7. package/dist/.next/.next/cache/webpack/client-production/0.pack +0 -0
  8. package/dist/.next/.next/cache/webpack/client-production/12.pack +0 -0
  9. package/dist/.next/.next/cache/webpack/client-production/2.pack +0 -0
  10. package/dist/.next/.next/cache/webpack/client-production/3.pack +0 -0
  11. package/dist/.next/.next/cache/webpack/client-production/4.pack +0 -0
  12. package/dist/.next/.next/cache/webpack/client-production/5.pack +0 -0
  13. package/dist/.next/.next/cache/webpack/client-production/6.pack +0 -0
  14. package/dist/.next/.next/cache/webpack/client-production/7.pack +0 -0
  15. package/dist/.next/.next/cache/webpack/client-production/8.pack +0 -0
  16. package/dist/.next/.next/cache/webpack/client-production/index.pack +0 -0
  17. package/dist/.next/.next/cache/webpack/client-production/index.pack.old +0 -0
  18. package/dist/.next/.next/cache/webpack/server-production/0.pack +0 -0
  19. package/dist/.next/.next/cache/webpack/server-production/1.pack +0 -0
  20. package/dist/.next/.next/cache/webpack/server-production/2.pack +0 -0
  21. package/dist/.next/.next/cache/webpack/server-production/3.pack +0 -0
  22. package/dist/.next/.next/cache/webpack/server-production/index.pack +0 -0
  23. package/dist/.next/.next/cache/webpack/server-production/index.pack.old +0 -0
  24. package/dist/.next/.next/next-minimal-server.js.nft.json +1 -1
  25. package/dist/.next/.next/next-server.js.nft.json +1 -1
  26. package/dist/.next/.next/prerender-manifest.json +1 -1
  27. package/dist/.next/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  28. package/dist/.next/.next/server/app/_not-found.html +1 -1
  29. package/dist/.next/.next/server/app/_not-found.rsc +1 -1
  30. package/dist/.next/.next/server/app/api/cloudflare/route.js +1 -1
  31. package/dist/.next/.next/server/app/api/cloudflare/route_client-reference-manifest.js +1 -1
  32. package/dist/.next/.next/server/app/api/databases/route.js +1 -1
  33. package/dist/.next/.next/server/app/api/databases/route_client-reference-manifest.js +1 -1
  34. package/dist/.next/.next/server/app/api/migrations/list/route.js +1 -1
  35. package/dist/.next/.next/server/app/api/migrations/list/route_client-reference-manifest.js +1 -1
  36. package/dist/.next/.next/server/app/api/migrations/sync/route.js +1 -1
  37. package/dist/.next/.next/server/app/api/migrations/sync/route_client-reference-manifest.js +1 -1
  38. package/dist/.next/.next/server/app/api/migrations/sync-files/route.js +1 -1
  39. package/dist/.next/.next/server/app/api/migrations/sync-files/route_client-reference-manifest.js +1 -1
  40. package/dist/.next/.next/server/app/api/pro/route_client-reference-manifest.js +1 -1
  41. package/dist/.next/.next/server/app/api/pull-data/confirm/route.js +1 -1
  42. package/dist/.next/.next/server/app/api/pull-data/confirm/route_client-reference-manifest.js +1 -1
  43. package/dist/.next/.next/server/app/api/pull-remote/confirm/route.js +1 -1
  44. package/dist/.next/.next/server/app/api/pull-remote/confirm/route_client-reference-manifest.js +1 -1
  45. package/dist/.next/.next/server/app/api/pull-remote/preview/route.js +1 -1
  46. package/dist/.next/.next/server/app/api/pull-remote/preview/route_client-reference-manifest.js +1 -1
  47. package/dist/.next/.next/server/app/api/push-remote/confirm/route.js +1 -1
  48. package/dist/.next/.next/server/app/api/push-remote/confirm/route_client-reference-manifest.js +1 -1
  49. package/dist/.next/.next/server/app/api/push-remote/preview/route.js +1 -1
  50. package/dist/.next/.next/server/app/api/push-remote/preview/route_client-reference-manifest.js +1 -1
  51. package/dist/.next/.next/server/app/api/query/route.js +1 -1
  52. package/dist/.next/.next/server/app/api/query/route_client-reference-manifest.js +1 -1
  53. package/dist/.next/.next/server/app/api/schema/route.js +1 -1
  54. package/dist/.next/.next/server/app/api/schema/route_client-reference-manifest.js +1 -1
  55. package/dist/.next/.next/server/app/api/tables/[name]/import/route.js +1 -1
  56. package/dist/.next/.next/server/app/api/tables/[name]/import/route_client-reference-manifest.js +1 -1
  57. package/dist/.next/.next/server/app/api/tables/[name]/route.js +1 -1
  58. package/dist/.next/.next/server/app/api/tables/[name]/route_client-reference-manifest.js +1 -1
  59. package/dist/.next/.next/server/app/api/tables/route.js +1 -1
  60. package/dist/.next/.next/server/app/api/tables/route_client-reference-manifest.js +1 -1
  61. package/dist/.next/.next/server/app/api/time-travel/preview/route.js +1 -1
  62. package/dist/.next/.next/server/app/api/time-travel/preview/route_client-reference-manifest.js +1 -1
  63. package/dist/.next/.next/server/app/api/time-travel/restore/route.js +1 -1
  64. package/dist/.next/.next/server/app/api/time-travel/restore/route_client-reference-manifest.js +1 -1
  65. package/dist/.next/.next/server/app/api/update/route.js +1 -1
  66. package/dist/.next/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
  67. package/dist/.next/.next/server/app/index.html +2 -2
  68. package/dist/.next/.next/server/app/index.rsc +2 -2
  69. package/dist/.next/.next/server/app/page.js +2 -2
  70. package/dist/.next/.next/server/app/page_client-reference-manifest.js +1 -1
  71. package/dist/.next/.next/server/app-paths-manifest.json +5 -5
  72. package/dist/.next/.next/server/chunks/391.js +1 -1
  73. package/dist/.next/.next/server/chunks/572.js +1 -1
  74. package/dist/.next/.next/server/chunks/992.js +2 -2
  75. package/dist/.next/.next/server/pages/404.html +1 -1
  76. package/dist/.next/.next/server/pages/500.html +1 -1
  77. package/dist/.next/.next/server/pages-manifest.json +1 -1
  78. package/dist/.next/.next/static/ZmKZbpam0G_d3SphfZPJ7/_buildManifest.js +1 -0
  79. package/dist/.next/.next/static/ZmKZbpam0G_d3SphfZPJ7/_ssgManifest.js +1 -0
  80. package/dist/.next/.next/static/chunks/app/page-3ec9d72ecb052d39.js +1 -0
  81. package/dist/.next/.next/static/f_PVCmmSeM5SwW3M1tw7Q/_buildManifest.js +1 -0
  82. package/dist/.next/.next/static/f_PVCmmSeM5SwW3M1tw7Q/_ssgManifest.js +1 -0
  83. package/dist/.next/.next/static/v-i2YsOGT890zutOSiqqK/_buildManifest.js +1 -0
  84. package/dist/.next/.next/static/v-i2YsOGT890zutOSiqqK/_ssgManifest.js +1 -0
  85. package/dist/.next/.next/trace +3 -3
  86. package/package.json +1 -1
@@ -10,7 +10,7 @@ c:I[4835,[],""]
10
10
  :HL["/_next/static/media/4cf2300e9c8272f7-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
11
11
  :HL["/_next/static/media/93f479601ee12b01-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
12
12
  :HL["/_next/static/css/2c165a0ede9b2442.css","style"]
13
- 0:{"P":null,"b":"ft39e6W6vSgUL7peRo7pE","p":"","c":["","_not-found"],"i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2c165a0ede9b2442.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__variable_188709 __variable_9a8899 antialiased","children":["$","$L2",null,{"children":[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[],[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]]],"forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L5",null,{}]," "]}]}]}]]}],{"children":["/_not-found",["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","/_not-found","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L6",null,{"children":"$L7"}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$1","VT4Mcb_Wcb22L9vL44B9e",{"children":[["$","$L8",null,{"children":"$L9"}],["$","$La",null,{"children":"$Lb"}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}]]}],false]],"m":"$undefined","G":["$c","$undefined"],"s":false,"S":true}
13
+ 0:{"P":null,"b":"f_PVCmmSeM5SwW3M1tw7Q","p":"","c":["","_not-found"],"i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2c165a0ede9b2442.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__variable_188709 __variable_9a8899 antialiased","children":["$","$L2",null,{"children":[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[],[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]]],"forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L5",null,{}]," "]}]}]}]]}],{"children":["/_not-found",["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","/_not-found","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L6",null,{"children":"$L7"}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$1","9DS2p6lEMGGVeFux8W6lt",{"children":[["$","$L8",null,{"children":"$L9"}],["$","$La",null,{"children":"$Lb"}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}]]}],false]],"m":"$undefined","G":["$c","$undefined"],"s":false,"S":true}
14
14
  b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
15
15
  9:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"d1-studio"}],["$","meta","2",{"name":"description","content":"Native D1 database studio."}]]
16
16
  7:null
@@ -1 +1 @@
1
- (()=>{var e={};e.id=999,e.ids=[999],e.modules={846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{"use strict";e.exports=require("buffer")},4735:e=>{"use strict";e.exports=require("events")},9021:e=>{"use strict";e.exports=require("fs")},9748:e=>{"use strict";e.exports=require("fs/promises")},1630:e=>{"use strict";e.exports=require("http")},5591:e=>{"use strict";e.exports=require("https")},1820:e=>{"use strict";e.exports=require("os")},3873:e=>{"use strict";e.exports=require("path")},7910:e=>{"use strict";e.exports=require("stream")},1204:e=>{"use strict";e.exports=require("string_decoder")},8354:e=>{"use strict";e.exports=require("util")},4075:e=>{"use strict";e.exports=require("zlib")},3024:e=>{"use strict";e.exports=require("node:fs")},6760:e=>{"use strict";e.exports=require("node:path")},1708:e=>{"use strict";e.exports=require("node:process")},3136:e=>{"use strict";e.exports=require("node:url")},5597:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>j,routeModule:()=>h,serverHooks:()=>w,workAsyncStorage:()=>x,workUnitAsyncStorage:()=>m});var s={};t.r(s),t.d(s,{OPTIONS:()=>g,POST:()=>f});var o=t(2706),a=t(8203),n=t(5994),i=t(9187),u=t(5949),c=t(1804);async function l(e,r){let t=await fetch(`https://api.cloudflare.com/client/v4/accounts/${e}/d1/database`,{headers:{Authorization:`Bearer ${r}`,"Content-Type":"application/json"}});if(!t.ok)throw Error("Invalid Cloudflare credentials");return t.json()}async function d(e,r,t){let s=await fetch(`https://api.cloudflare.com/client/v4/accounts/${e}/d1/database`,{headers:{Authorization:`Bearer ${r}`,"Content-Type":"application/json"}});if(!s.ok)throw Error("Failed to fetch databases");let{result:o}=await s.json();return o.find(e=>e.name===t)}async function p(e,r,t){let s=await fetch(`https://api.cloudflare.com/client/v4/accounts/${e}/d1/database`,{method:"POST",headers:{Authorization:`Bearer ${r}`,"Content-Type":"application/json"},body:JSON.stringify({name:t})});if(!s.ok)throw Error("Failed to create database");return s.json()}async function f(e){try{let{accountId:r,apiToken:t}=await e.json(),s=process.env.D1_PROJECT_DIR;if(!s)return c.A.error("Project directory not configured"),i.NextResponse.json({error:"Project directory not configured"},{status:500});await l(r,t);let o=await (0,u.S)(s);if(!o||!o.config)return c.A.error("No Wrangler configuration file found in project directory"),i.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let a=o.config;if(!a.d1_databases?.length)return i.NextResponse.json({error:"No D1 databases configured in Wrangler configuration"},{status:400});let n=a.d1_databases[0],f=await d(r,t,n.database_name);return f||(f=(await p(r,t,n.database_name)).result),i.NextResponse.json({success:!0,database:{id:f.uuid,name:f.name}})}catch(e){return c.A.error("Cloudflare API error:",e),i.NextResponse.json({error:e.message},{status:e.message.includes("Invalid credentials")?401:500})}}async function g(){return new i.NextResponse(null,{status:204})}let h=new o.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/cloudflare/route",pathname:"/api/cloudflare",filename:"route",bundlePath:"app/api/cloudflare/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/cloudflare/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:x,workUnitAsyncStorage:m,serverHooks:w}=h;function j(){return(0,n.patchFetch)({workAsyncStorage:x,workUnitAsyncStorage:m})}},6487:()=>{},8335:()=>{},5949:(e,r,t)=>{"use strict";t.d(r,{S:()=>l});var s=t(9748),o=t(3149),a=t(2537),n=t(6789),i=t(1804);let u=null,c=null;async function l(e){try{let r;if(!e||"string"!=typeof e)throw Error("Project path is required and must be a string");if(u&&c===e)return u;let t=null,l=null;for(let r of["wrangler.toml","wrangler.json","wrangler.jsonc"])if(t=await (0,o.dJ)(r,{cwd:e})){l=r;break}if(!t)return i.A.warn(`No Wrangler configuration file found in: ${e}`),null;i.A.info(`Found ${l} at: ${t}`);let d=await (0,s.readFile)(t,"utf-8");return l.endsWith(".toml")?r=(0,a.parse)(d):(l.endsWith(".jsonc")&&(d=(0,n.A)(d)),r=JSON.parse(d)),u={config:r,projectPath:e},c=e,u}catch(e){throw i.A.error(`Error reading Wrangler configuration: ${e.message}`),e}}},1804:(e,r,t)=>{"use strict";t.d(r,{A:()=>d});var s=t(6399);let{combine:o,timestamp:a,printf:n,colorize:i}=s.format,u="true"===process.env.DEBUG,c=n(({level:e,message:r,timestamp:t,...s})=>{let o=`${t} ${e}: ${r}`;return Object.keys(s).length>0&&(o+=` ${JSON.stringify(s)}`),o}),l=s.createLogger({level:u?"debug":"warn",format:o(a({format:"YYYY-MM-DD HH:mm:ss"}),i(),c),transports:[new s.transports.Console({level:u?"debug":"warn",silent:!1})]});l.logRequest=(e,r,t={})=>{l.debug(`Request: ${e} ${r}`,t)},l.logError=(e,r="unknown")=>{l.error(`Error in ${r}: ${e.message}`,{error:e.stack||e.message,source:r})},l.shouldLog=e=>{let r=l.level,t={error:0,warn:1,info:2,debug:3};return t[e]<=t[r]};let d=l}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[994,452,391],()=>t(5597));module.exports=s})();
1
+ (()=>{var e={};e.id=999,e.ids=[999],e.modules={846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{"use strict";e.exports=require("buffer")},4735:e=>{"use strict";e.exports=require("events")},9021:e=>{"use strict";e.exports=require("fs")},9748:e=>{"use strict";e.exports=require("fs/promises")},1630:e=>{"use strict";e.exports=require("http")},5591:e=>{"use strict";e.exports=require("https")},1820:e=>{"use strict";e.exports=require("os")},3873:e=>{"use strict";e.exports=require("path")},7910:e=>{"use strict";e.exports=require("stream")},1204:e=>{"use strict";e.exports=require("string_decoder")},8354:e=>{"use strict";e.exports=require("util")},4075:e=>{"use strict";e.exports=require("zlib")},643:e=>{"use strict";e.exports=require("node:fs")},4379:e=>{"use strict";e.exports=require("node:path")},1708:e=>{"use strict";e.exports=require("node:process")},3136:e=>{"use strict";e.exports=require("node:url")},5597:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>j,routeModule:()=>h,serverHooks:()=>w,workAsyncStorage:()=>x,workUnitAsyncStorage:()=>m});var s={};t.r(s),t.d(s,{OPTIONS:()=>g,POST:()=>f});var o=t(2706),a=t(8203),n=t(5994),i=t(9187),u=t(5949),c=t(1804);async function l(e,r){let t=await fetch(`https://api.cloudflare.com/client/v4/accounts/${e}/d1/database`,{headers:{Authorization:`Bearer ${r}`,"Content-Type":"application/json"}});if(!t.ok)throw Error("Invalid Cloudflare credentials");return t.json()}async function d(e,r,t){let s=await fetch(`https://api.cloudflare.com/client/v4/accounts/${e}/d1/database`,{headers:{Authorization:`Bearer ${r}`,"Content-Type":"application/json"}});if(!s.ok)throw Error("Failed to fetch databases");let{result:o}=await s.json();return o.find(e=>e.name===t)}async function p(e,r,t){let s=await fetch(`https://api.cloudflare.com/client/v4/accounts/${e}/d1/database`,{method:"POST",headers:{Authorization:`Bearer ${r}`,"Content-Type":"application/json"},body:JSON.stringify({name:t})});if(!s.ok)throw Error("Failed to create database");return s.json()}async function f(e){try{let{accountId:r,apiToken:t}=await e.json(),s=process.env.D1_PROJECT_DIR;if(!s)return c.A.error("Project directory not configured"),i.NextResponse.json({error:"Project directory not configured"},{status:500});await l(r,t);let o=await (0,u.S)(s);if(!o||!o.config)return c.A.error("No Wrangler configuration file found in project directory"),i.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let a=o.config;if(!a.d1_databases?.length)return i.NextResponse.json({error:"No D1 databases configured in Wrangler configuration"},{status:400});let n=a.d1_databases[0],f=await d(r,t,n.database_name);return f||(f=(await p(r,t,n.database_name)).result),i.NextResponse.json({success:!0,database:{id:f.uuid,name:f.name}})}catch(e){return c.A.error("Cloudflare API error:",e),i.NextResponse.json({error:e.message},{status:e.message.includes("Invalid credentials")?401:500})}}async function g(){return new i.NextResponse(null,{status:204})}let h=new o.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/cloudflare/route",pathname:"/api/cloudflare",filename:"route",bundlePath:"app/api/cloudflare/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/cloudflare/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:x,workUnitAsyncStorage:m,serverHooks:w}=h;function j(){return(0,n.patchFetch)({workAsyncStorage:x,workUnitAsyncStorage:m})}},6487:()=>{},8335:()=>{},5949:(e,r,t)=>{"use strict";t.d(r,{S:()=>l});var s=t(9748),o=t(3149),a=t(2537),n=t(6789),i=t(1804);let u=null,c=null;async function l(e){try{let r;if(!e||"string"!=typeof e)throw Error("Project path is required and must be a string");if(u&&c===e)return u;let t=null,l=null;for(let r of["wrangler.toml","wrangler.json","wrangler.jsonc"])if(t=await (0,o.dJ)(r,{cwd:e})){l=r;break}if(!t)return i.A.warn(`No Wrangler configuration file found in: ${e}`),null;i.A.info(`Found ${l} at: ${t}`);let d=await (0,s.readFile)(t,"utf-8");return l.endsWith(".toml")?r=(0,a.parse)(d):(l.endsWith(".jsonc")&&(d=(0,n.A)(d)),r=JSON.parse(d)),u={config:r,projectPath:e},c=e,u}catch(e){throw i.A.error(`Error reading Wrangler configuration: ${e.message}`),e}}},1804:(e,r,t)=>{"use strict";t.d(r,{A:()=>d});var s=t(6399);let{combine:o,timestamp:a,printf:n,colorize:i}=s.format,u="true"===process.env.DEBUG,c=n(({level:e,message:r,timestamp:t,...s})=>{let o=`${t} ${e}: ${r}`;return Object.keys(s).length>0&&(o+=` ${JSON.stringify(s)}`),o}),l=s.createLogger({level:u?"debug":"warn",format:o(a({format:"YYYY-MM-DD HH:mm:ss"}),i(),c),transports:[new s.transports.Console({level:u?"debug":"warn",silent:!1})]});l.logRequest=(e,r,t={})=>{l.debug(`Request: ${e} ${r}`,t)},l.logError=(e,r="unknown")=>{l.error(`Error in ${r}: ${e.message}`,{error:e.stack||e.message,source:r})},l.shouldLog=e=>{let r=l.level,t={error:0,warn:1,info:2,debug:3};return t[e]<=t[r]};let d=l}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[994,452,391],()=>t(5597));module.exports=s})();
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/cloudflare/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"7098","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":6311,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","803","static/chunks/803-a2fcfbd00e6b3b38.js","480","static/chunks/480-85b6c8ae3f51b156.js","974","static/chunks/app/page-358bf2112802ff85.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/2c165a0ede9b2442.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/cloudflare/route":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/cloudflare/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"7098","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":6311,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","803","static/chunks/803-a2fcfbd00e6b3b38.js","480","static/chunks/480-85b6c8ae3f51b156.js","974","static/chunks/app/page-3ec9d72ecb052d39.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/2c165a0ede9b2442.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/cloudflare/route":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -1 +1 @@
1
- (()=>{var e={};e.id=952,e.ids=[487,952],e.modules={7550:e=>{"use strict";e.exports=require("better-sqlite3")},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{"use strict";e.exports=require("buffer")},5511:e=>{"use strict";e.exports=require("crypto")},4735:e=>{"use strict";e.exports=require("events")},9021:e=>{"use strict";e.exports=require("fs")},9748:e=>{"use strict";e.exports=require("fs/promises")},1630:e=>{"use strict";e.exports=require("http")},5591:e=>{"use strict";e.exports=require("https")},1820:e=>{"use strict";e.exports=require("os")},3873:e=>{"use strict";e.exports=require("path")},7910:e=>{"use strict";e.exports=require("stream")},1204:e=>{"use strict";e.exports=require("string_decoder")},8354:e=>{"use strict";e.exports=require("util")},4075:e=>{"use strict";e.exports=require("zlib")},3024:e=>{"use strict";e.exports=require("node:fs")},6760:e=>{"use strict";e.exports=require("node:path")},1708:e=>{"use strict";e.exports=require("node:process")},3136:e=>{"use strict";e.exports=require("node:url")},5650:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>x,routeModule:()=>g,serverHooks:()=>m,workAsyncStorage:()=>f,workUnitAsyncStorage:()=>h});var s={};t.r(s),t.d(s,{GET:()=>d,OPTIONS:()=>p});var a=t(2706),n=t(8203),i=t(5994),o=t(9187),u=t(5949),l=t(3868),c=t(1804);async function d(){try{let e=process.env.D1_PROJECT_DIR;if(!e)return c.A.error("D1_PROJECT_DIR environment variable is not set"),o.NextResponse.json({error:"Project directory not configured"},{status:500});let r=await (0,u.S)(e);if(!r||!r.config)return o.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let t=r.config;if(!t.d1_databases?.length)return o.NextResponse.json({error:"No D1 databases configured in Wrangler configuration"},{status:404});return o.NextResponse.json({databases:t.d1_databases.map(r=>({...r,hasLocal:(0,l.k5)(e,r)})),debug:{projectDir:e,configPath:r.configPath||"N/A",databaseCount:t.d1_databases.length}})}catch(e){return c.A.error("Error reading database configuration:",e),o.NextResponse.json({error:"Failed to read database configuration",details:e.message,debug:{errorCode:e.code,errorStack:e.stack}},{status:500})}}async function p(){return new o.NextResponse(null,{status:204,headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, OPTIONS","Access-Control-Allow-Headers":"Content-Type"}})}let g=new a.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/databases/route",pathname:"/api/databases",filename:"route",bundlePath:"app/api/databases/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/databases/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:f,workUnitAsyncStorage:h,serverHooks:m}=g;function x(){return(0,i.patchFetch)({workAsyncStorage:f,workUnitAsyncStorage:h})}},6487:()=>{},8335:()=>{},5949:(e,r,t)=>{"use strict";t.d(r,{S:()=>c});var s=t(9748),a=t(3149),n=t(2537),i=t(6789),o=t(1804);let u=null,l=null;async function c(e){try{let r;if(!e||"string"!=typeof e)throw Error("Project path is required and must be a string");if(u&&l===e)return u;let t=null,c=null;for(let r of["wrangler.toml","wrangler.json","wrangler.jsonc"])if(t=await (0,a.dJ)(r,{cwd:e})){c=r;break}if(!t)return o.A.warn(`No Wrangler configuration file found in: ${e}`),null;o.A.info(`Found ${c} at: ${t}`);let d=await (0,s.readFile)(t,"utf-8");return c.endsWith(".toml")?r=(0,n.parse)(d):(c.endsWith(".jsonc")&&(d=(0,i.A)(d)),r=JSON.parse(d)),u={config:r,projectPath:e},l=e,u}catch(e){throw o.A.error(`Error reading Wrangler configuration: ${e.message}`),e}}},3868:(e,r,t)=>{"use strict";t.d(r,{executeLocalSQL:()=>g,k5:()=>d,n3:()=>f,w1:()=>p});var s=t(5511),a=t(3873),n=t(9021),i=t(7550),o=t(1804);let u=a.join(".wrangler","state","v3","d1","miniflare-D1DatabaseObject"),l=new Map;function c(e,r){let t=a.join(e,u);if(!n.existsSync(t))return null;let{database_id:i,database_name:l,binding:c}=r,d=[i,l,c].filter(Boolean),p=["","miniflare-D1DatabaseObject:","D1DatabaseObject:","d1:"],g=d.flatMap(e=>p.map(r=>{var t;return t=`${r}${e}`,s.createHash("sha256").update(t).digest("hex")})).map(e=>a.join(t,`${e}.sqlite`)).find(e=>n.existsSync(e));if(g)return g;let f=n.readdirSync(t).filter(e=>e.endsWith(".sqlite")).map(e=>({name:e,fullPath:a.join(t,e),mtime:n.statSync(a.join(t,e)).mtimeMs})).sort((e,r)=>r.mtime-e.mtime);return 1===f.length?f[0].fullPath:(f.length>1&&o.A.debug(`[local-db] Multiple SQLite files, no hash matched — falling back to wrangler CLI. dir=${t}, tried ids=${JSON.stringify(d)}`),o.A.debug(`[local-db] No SQLite files found. dir=${t}, tried ids=${JSON.stringify(d)}`),null)}function d(e,r){return null!==c(e,r)}function p(e,r){let t=`${e}:${r.database_name}`,s=c(e,r);if(l.has(t)){let e=l.get(t);if(e.path!==s){try{e.db.close()}catch{}l.delete(t)}else try{return e.db.prepare("SELECT 1").get(),e.db}catch{l.delete(t)}}if(!s)return null;try{let e=new i(s,{fileMustExist:!1});return e.pragma("journal_mode = WAL"),e.pragma("foreign_keys = ON"),l.set(t,{db:e,path:s}),e}catch{return null}}function g(e,r,t){let s=p(e,r);if(!s)return null;let a=t.trim(),n=a.toUpperCase().replace(/\s+/g," "),i=a.split(";").map(e=>e.trim()).filter(Boolean);if(i.length>1){let e=[],r=0,t=0;return s.transaction(()=>{for(let a of i){let n=a.toUpperCase().replace(/\s+/g," ");if(n.startsWith("SELECT")||n.startsWith("PRAGMA")||n.startsWith("EXPLAIN")){let r=s.prepare(a).all();e=e.concat(r)}else{let e=s.prepare(a).run();r+=e.changes,t=e.lastInsertRowid}}})(),JSON.stringify([{results:e,success:!0,meta:{changes:r,last_row_id:t,rows_read:e.length,rows_written:r}}])}if(n.startsWith("SELECT")||n.startsWith("PRAGMA")||n.startsWith("EXPLAIN")){let e=s.prepare(a).all();return JSON.stringify([{results:e,success:!0,meta:{rows_read:e.length,rows_written:0,changed_db:!1}}])}let o=s.prepare(a).run();return JSON.stringify([{results:[],success:!0,meta:{changes:o.changes,last_row_id:o.lastInsertRowid,rows_read:0,rows_written:o.changes,changed_db:o.changes>0}}])}function f(e,r){let t=`${e}:${r}`,s=l.get(t);if(s){try{s.db.close()}catch{}l.delete(t)}}},1804:(e,r,t)=>{"use strict";t.d(r,{A:()=>d});var s=t(6399);let{combine:a,timestamp:n,printf:i,colorize:o}=s.format,u="true"===process.env.DEBUG,l=i(({level:e,message:r,timestamp:t,...s})=>{let a=`${t} ${e}: ${r}`;return Object.keys(s).length>0&&(a+=` ${JSON.stringify(s)}`),a}),c=s.createLogger({level:u?"debug":"warn",format:a(n({format:"YYYY-MM-DD HH:mm:ss"}),o(),l),transports:[new s.transports.Console({level:u?"debug":"warn",silent:!1})]});c.logRequest=(e,r,t={})=>{c.debug(`Request: ${e} ${r}`,t)},c.logError=(e,r="unknown")=>{c.error(`Error in ${r}: ${e.message}`,{error:e.stack||e.message,source:r})},c.shouldLog=e=>{let r=c.level,t={error:0,warn:1,info:2,debug:3};return t[e]<=t[r]};let d=c}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[994,452,391],()=>t(5650));module.exports=s})();
1
+ (()=>{var e={};e.id=952,e.ids=[487,952],e.modules={7550:e=>{"use strict";e.exports=require("better-sqlite3")},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{"use strict";e.exports=require("buffer")},5511:e=>{"use strict";e.exports=require("crypto")},4735:e=>{"use strict";e.exports=require("events")},9021:e=>{"use strict";e.exports=require("fs")},9748:e=>{"use strict";e.exports=require("fs/promises")},1630:e=>{"use strict";e.exports=require("http")},5591:e=>{"use strict";e.exports=require("https")},1820:e=>{"use strict";e.exports=require("os")},3873:e=>{"use strict";e.exports=require("path")},7910:e=>{"use strict";e.exports=require("stream")},1204:e=>{"use strict";e.exports=require("string_decoder")},8354:e=>{"use strict";e.exports=require("util")},4075:e=>{"use strict";e.exports=require("zlib")},643:e=>{"use strict";e.exports=require("node:fs")},4379:e=>{"use strict";e.exports=require("node:path")},1708:e=>{"use strict";e.exports=require("node:process")},3136:e=>{"use strict";e.exports=require("node:url")},5650:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>x,routeModule:()=>g,serverHooks:()=>m,workAsyncStorage:()=>f,workUnitAsyncStorage:()=>h});var s={};t.r(s),t.d(s,{GET:()=>d,OPTIONS:()=>p});var a=t(2706),n=t(8203),i=t(5994),o=t(9187),u=t(5949),l=t(3868),c=t(1804);async function d(){try{let e=process.env.D1_PROJECT_DIR;if(!e)return c.A.error("D1_PROJECT_DIR environment variable is not set"),o.NextResponse.json({error:"Project directory not configured"},{status:500});let r=await (0,u.S)(e);if(!r||!r.config)return o.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let t=r.config;if(!t.d1_databases?.length)return o.NextResponse.json({error:"No D1 databases configured in Wrangler configuration"},{status:404});return o.NextResponse.json({databases:t.d1_databases.map(r=>({...r,hasLocal:(0,l.k5)(e,r)})),debug:{projectDir:e,configPath:r.configPath||"N/A",databaseCount:t.d1_databases.length}})}catch(e){return c.A.error("Error reading database configuration:",e),o.NextResponse.json({error:"Failed to read database configuration",details:e.message,debug:{errorCode:e.code,errorStack:e.stack}},{status:500})}}async function p(){return new o.NextResponse(null,{status:204,headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, OPTIONS","Access-Control-Allow-Headers":"Content-Type"}})}let g=new a.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/databases/route",pathname:"/api/databases",filename:"route",bundlePath:"app/api/databases/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/databases/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:f,workUnitAsyncStorage:h,serverHooks:m}=g;function x(){return(0,i.patchFetch)({workAsyncStorage:f,workUnitAsyncStorage:h})}},6487:()=>{},8335:()=>{},5949:(e,r,t)=>{"use strict";t.d(r,{S:()=>c});var s=t(9748),a=t(3149),n=t(2537),i=t(6789),o=t(1804);let u=null,l=null;async function c(e){try{let r;if(!e||"string"!=typeof e)throw Error("Project path is required and must be a string");if(u&&l===e)return u;let t=null,c=null;for(let r of["wrangler.toml","wrangler.json","wrangler.jsonc"])if(t=await (0,a.dJ)(r,{cwd:e})){c=r;break}if(!t)return o.A.warn(`No Wrangler configuration file found in: ${e}`),null;o.A.info(`Found ${c} at: ${t}`);let d=await (0,s.readFile)(t,"utf-8");return c.endsWith(".toml")?r=(0,n.parse)(d):(c.endsWith(".jsonc")&&(d=(0,i.A)(d)),r=JSON.parse(d)),u={config:r,projectPath:e},l=e,u}catch(e){throw o.A.error(`Error reading Wrangler configuration: ${e.message}`),e}}},3868:(e,r,t)=>{"use strict";t.d(r,{executeLocalSQL:()=>g,k5:()=>d,n3:()=>f,w1:()=>p});var s=t(5511),a=t(3873),n=t(9021),i=t(7550),o=t(1804);let u=a.join(".wrangler","state","v3","d1","miniflare-D1DatabaseObject"),l=new Map;function c(e,r){let t=a.join(e,u);if(!n.existsSync(t))return null;let{database_id:i,database_name:l,binding:c}=r,d=[i,l,c].filter(Boolean),p=["","miniflare-D1DatabaseObject:","D1DatabaseObject:","d1:"],g=d.flatMap(e=>p.map(r=>{var t;return t=`${r}${e}`,s.createHash("sha256").update(t).digest("hex")})).map(e=>a.join(t,`${e}.sqlite`)).find(e=>n.existsSync(e));if(g)return g;let f=n.readdirSync(t).filter(e=>e.endsWith(".sqlite")).map(e=>({name:e,fullPath:a.join(t,e),mtime:n.statSync(a.join(t,e)).mtimeMs})).sort((e,r)=>r.mtime-e.mtime);return 1===f.length?f[0].fullPath:(f.length>1&&o.A.debug(`[local-db] Multiple SQLite files, no hash matched — falling back to wrangler CLI. dir=${t}, tried ids=${JSON.stringify(d)}`),o.A.debug(`[local-db] No SQLite files found. dir=${t}, tried ids=${JSON.stringify(d)}`),null)}function d(e,r){return null!==c(e,r)}function p(e,r){let t=`${e}:${r.database_name}`,s=c(e,r);if(l.has(t)){let e=l.get(t);if(e.path!==s){try{e.db.close()}catch{}l.delete(t)}else try{return e.db.prepare("SELECT 1").get(),e.db}catch{l.delete(t)}}if(!s)return null;try{let e=new i(s,{fileMustExist:!1});return e.pragma("journal_mode = WAL"),e.pragma("foreign_keys = ON"),l.set(t,{db:e,path:s}),e}catch{return null}}function g(e,r,t){let s=p(e,r);if(!s)return null;let a=t.trim(),n=a.toUpperCase().replace(/\s+/g," "),i=a.split(";").map(e=>e.trim()).filter(Boolean);if(i.length>1){let e=[],r=0,t=0;return s.transaction(()=>{for(let a of i){let n=a.toUpperCase().replace(/\s+/g," ");if(n.startsWith("SELECT")||n.startsWith("PRAGMA")||n.startsWith("EXPLAIN")){let r=s.prepare(a).all();e=e.concat(r)}else{let e=s.prepare(a).run();r+=e.changes,t=e.lastInsertRowid}}})(),JSON.stringify([{results:e,success:!0,meta:{changes:r,last_row_id:t,rows_read:e.length,rows_written:r}}])}if(n.startsWith("SELECT")||n.startsWith("PRAGMA")||n.startsWith("EXPLAIN")){let e=s.prepare(a).all();return JSON.stringify([{results:e,success:!0,meta:{rows_read:e.length,rows_written:0,changed_db:!1}}])}let o=s.prepare(a).run();return JSON.stringify([{results:[],success:!0,meta:{changes:o.changes,last_row_id:o.lastInsertRowid,rows_read:0,rows_written:o.changes,changed_db:o.changes>0}}])}function f(e,r){let t=`${e}:${r}`,s=l.get(t);if(s){try{s.db.close()}catch{}l.delete(t)}}},1804:(e,r,t)=>{"use strict";t.d(r,{A:()=>d});var s=t(6399);let{combine:a,timestamp:n,printf:i,colorize:o}=s.format,u="true"===process.env.DEBUG,l=i(({level:e,message:r,timestamp:t,...s})=>{let a=`${t} ${e}: ${r}`;return Object.keys(s).length>0&&(a+=` ${JSON.stringify(s)}`),a}),c=s.createLogger({level:u?"debug":"warn",format:a(n({format:"YYYY-MM-DD HH:mm:ss"}),o(),l),transports:[new s.transports.Console({level:u?"debug":"warn",silent:!1})]});c.logRequest=(e,r,t={})=>{c.debug(`Request: ${e} ${r}`,t)},c.logError=(e,r="unknown")=>{c.error(`Error in ${r}: ${e.message}`,{error:e.stack||e.message,source:r})},c.shouldLog=e=>{let r=c.level,t={error:0,warn:1,info:2,debug:3};return t[e]<=t[r]};let d=c}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[994,452,391],()=>t(5650));module.exports=s})();
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/databases/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"7098","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":6311,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","803","static/chunks/803-a2fcfbd00e6b3b38.js","480","static/chunks/480-85b6c8ae3f51b156.js","974","static/chunks/app/page-358bf2112802ff85.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/2c165a0ede9b2442.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/databases/route":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/databases/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"7098","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":6311,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","803","static/chunks/803-a2fcfbd00e6b3b38.js","480","static/chunks/480-85b6c8ae3f51b156.js","974","static/chunks/app/page-3ec9d72ecb052d39.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/2c165a0ede9b2442.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/databases/route":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var e={};e.id=520,e.ids=[487,520],e.modules={7550:e=>{e.exports=require("better-sqlite3")},846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{e.exports=require("buffer")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},4735:e=>{e.exports=require("events")},9021:e=>{e.exports=require("fs")},9748:e=>{e.exports=require("fs/promises")},1630:e=>{e.exports=require("http")},5591:e=>{e.exports=require("https")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},1204:e=>{e.exports=require("string_decoder")},8354:e=>{e.exports=require("util")},4075:e=>{e.exports=require("zlib")},3024:e=>{e.exports=require("node:fs")},6760:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},3136:e=>{e.exports=require("node:url")},6814:(e,t,r)=>{r.r(t),r.d(t,{patchFetch:()=>A,routeModule:()=>T,serverHooks:()=>x,workAsyncStorage:()=>y,workUnitAsyncStorage:()=>R});var a={};r.r(a),r.d(a,{GET:()=>w,OPTIONS:()=>_});var i=r(2706),s=r(8203),n=r(5994),o=r(9187),l=r(5949),c=r(8354),d=r(9646),u=r(9748),p=r(3873),m=r(1804),g=r(961),h=r(3868);let f=(0,c.promisify)(d.exec);async function E(e,t){let r=t.database_name;try{let r=(0,h.executeLocalSQL)(e,t,"SELECT name, checksum, applied_at FROM d1_migrations ORDER BY applied_at ASC;");if(null!==r){let e=JSON.parse(r);return e[0]?.results||[]}}catch(r){if((r?.message||"").includes("no such column"))try{let r=(0,h.executeLocalSQL)(e,t,"SELECT name, applied_at FROM d1_migrations ORDER BY applied_at ASC;");if(null!==r){let e=JSON.parse(r);return(e[0]?.results||[]).map(e=>({...e,checksum:null}))}}catch{}}try{await (0,g.A8)(e,r);let{stdout:t}=await f(`wrangler d1 execute ${r} --local --command="SELECT name, checksum, applied_at FROM d1_migrations ORDER BY applied_at ASC;" --json`,{cwd:e,timeout:15e3}),a=JSON.parse(t);return a[0]?.results||[]}catch{return[]}}async function w(e){try{let{searchParams:t}=new URL(e.url),r=t.get("db"),a=process.env.D1_PROJECT_DIR;if(!a)throw Error("Project directory not configured");let i=await (0,l.S)(a);if(!i?.config)throw Error("No Wrangler configuration found");let s=i.config;if(!s.d1_databases?.length)throw Error("No D1 databases configured");let n=r?s.d1_databases.find(e=>e.database_name===r):s.d1_databases[0];if(!n)throw Error(`Database not found: ${r}`);n.database_name;let c=n.migrations_dir?p.join(a,n.migrations_dir):p.join(a,"migrations"),d=[];try{d=(await (0,u.readdir)(c)).filter(e=>e.endsWith(".sql")).sort()}catch{}let m=await E(a,n),g=new Map(m.map(e=>[e.name,e])),h=d.map(e=>{let t=g.get(e);return{name:e,applied:!!t,applied_at:t?.applied_at||null,checksum:t?.checksum||null}});return m.forEach(e=>{d.includes(e.name)||h.push({name:e.name,applied:!0,applied_at:e.applied_at,checksum:e.checksum,orphaned:!0})}),o.NextResponse.json({success:!0,migrations:h,migrationsDir:c})}catch(e){return m.A.error("Migrations list error:",e),o.NextResponse.json({success:!1,error:e.message},{status:500})}}async function _(){return new o.NextResponse(null,{status:204})}let T=new i.AppRouteRouteModule({definition:{kind:s.RouteKind.APP_ROUTE,page:"/api/migrations/list/route",pathname:"/api/migrations/list",filename:"route",bundlePath:"app/api/migrations/list/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/migrations/list/route.js",nextConfigOutput:"",userland:a}),{workAsyncStorage:y,workUnitAsyncStorage:R,serverHooks:x}=T;function A(){return(0,n.patchFetch)({workAsyncStorage:y,workUnitAsyncStorage:R})}},3868:(e,t,r)=>{r.d(t,{executeLocalSQL:()=>m,k5:()=>u,n3:()=>g,w1:()=>p});var a=r(5511),i=r(3873),s=r(9021),n=r(7550),o=r(1804);let l=i.join(".wrangler","state","v3","d1","miniflare-D1DatabaseObject"),c=new Map;function d(e,t){let r=i.join(e,l);if(!s.existsSync(r))return null;let{database_id:n,database_name:c,binding:d}=t,u=[n,c,d].filter(Boolean),p=["","miniflare-D1DatabaseObject:","D1DatabaseObject:","d1:"],m=u.flatMap(e=>p.map(t=>{var r;return r=`${t}${e}`,a.createHash("sha256").update(r).digest("hex")})).map(e=>i.join(r,`${e}.sqlite`)).find(e=>s.existsSync(e));if(m)return m;let g=s.readdirSync(r).filter(e=>e.endsWith(".sqlite")).map(e=>({name:e,fullPath:i.join(r,e),mtime:s.statSync(i.join(r,e)).mtimeMs})).sort((e,t)=>t.mtime-e.mtime);return 1===g.length?g[0].fullPath:(g.length>1&&o.A.debug(`[local-db] Multiple SQLite files, no hash matched — falling back to wrangler CLI. dir=${r}, tried ids=${JSON.stringify(u)}`),o.A.debug(`[local-db] No SQLite files found. dir=${r}, tried ids=${JSON.stringify(u)}`),null)}function u(e,t){return null!==d(e,t)}function p(e,t){let r=`${e}:${t.database_name}`,a=d(e,t);if(c.has(r)){let e=c.get(r);if(e.path!==a){try{e.db.close()}catch{}c.delete(r)}else try{return e.db.prepare("SELECT 1").get(),e.db}catch{c.delete(r)}}if(!a)return null;try{let e=new n(a,{fileMustExist:!1});return e.pragma("journal_mode = WAL"),e.pragma("foreign_keys = ON"),c.set(r,{db:e,path:a}),e}catch{return null}}function m(e,t,r){let a=p(e,t);if(!a)return null;let i=r.trim(),s=i.toUpperCase().replace(/\s+/g," "),n=i.split(";").map(e=>e.trim()).filter(Boolean);if(n.length>1){let e=[],t=0,r=0;return a.transaction(()=>{for(let i of n){let s=i.toUpperCase().replace(/\s+/g," ");if(s.startsWith("SELECT")||s.startsWith("PRAGMA")||s.startsWith("EXPLAIN")){let t=a.prepare(i).all();e=e.concat(t)}else{let e=a.prepare(i).run();t+=e.changes,r=e.lastInsertRowid}}})(),JSON.stringify([{results:e,success:!0,meta:{changes:t,last_row_id:r,rows_read:e.length,rows_written:t}}])}if(s.startsWith("SELECT")||s.startsWith("PRAGMA")||s.startsWith("EXPLAIN")){let e=a.prepare(i).all();return JSON.stringify([{results:e,success:!0,meta:{rows_read:e.length,rows_written:0,changed_db:!1}}])}let o=a.prepare(i).run();return JSON.stringify([{results:[],success:!0,meta:{changes:o.changes,last_row_id:o.lastInsertRowid,rows_read:0,rows_written:o.changes,changed_db:o.changes>0}}])}function g(e,t){let r=`${e}:${t}`,a=c.get(r);if(a){try{a.db.close()}catch{}c.delete(r)}}},961:(e,t,r)=>{r.d(t,{A8:()=>T,CM:()=>E,GS:()=>h,Gc:()=>y,JD:()=>g,Sl:()=>_,ai:()=>f,hI:()=>w,k0:()=>p});var a=r(9748),i=r(8354),s=r(9646),n=r(5511),o=r(3873),l=r(9421),c=r(4218),d=r(1804);let u=(0,i.promisify)(s.exec);async function p(e,t,r="local",a=!1){let i="remote"===r?"--remote":"--local",s="remote"===r?`
1
+ "use strict";(()=>{var e={};e.id=520,e.ids=[487,520],e.modules={7550:e=>{e.exports=require("better-sqlite3")},846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{e.exports=require("buffer")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},4735:e=>{e.exports=require("events")},9021:e=>{e.exports=require("fs")},9748:e=>{e.exports=require("fs/promises")},1630:e=>{e.exports=require("http")},5591:e=>{e.exports=require("https")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},1204:e=>{e.exports=require("string_decoder")},8354:e=>{e.exports=require("util")},4075:e=>{e.exports=require("zlib")},643:e=>{e.exports=require("node:fs")},4379:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},3136:e=>{e.exports=require("node:url")},6814:(e,t,r)=>{r.r(t),r.d(t,{patchFetch:()=>A,routeModule:()=>T,serverHooks:()=>x,workAsyncStorage:()=>y,workUnitAsyncStorage:()=>R});var a={};r.r(a),r.d(a,{GET:()=>w,OPTIONS:()=>_});var i=r(2706),s=r(8203),n=r(5994),o=r(9187),l=r(5949),c=r(8354),d=r(9646),u=r(9748),p=r(3873),m=r(1804),g=r(961),h=r(3868);let f=(0,c.promisify)(d.exec);async function E(e,t){let r=t.database_name;try{let r=(0,h.executeLocalSQL)(e,t,"SELECT name, checksum, applied_at FROM d1_migrations ORDER BY applied_at ASC;");if(null!==r){let e=JSON.parse(r);return e[0]?.results||[]}}catch(r){if((r?.message||"").includes("no such column"))try{let r=(0,h.executeLocalSQL)(e,t,"SELECT name, applied_at FROM d1_migrations ORDER BY applied_at ASC;");if(null!==r){let e=JSON.parse(r);return(e[0]?.results||[]).map(e=>({...e,checksum:null}))}}catch{}}try{await (0,g.A8)(e,r);let{stdout:t}=await f(`wrangler d1 execute ${r} --local --command="SELECT name, checksum, applied_at FROM d1_migrations ORDER BY applied_at ASC;" --json`,{cwd:e,timeout:15e3}),a=JSON.parse(t);return a[0]?.results||[]}catch{return[]}}async function w(e){try{let{searchParams:t}=new URL(e.url),r=t.get("db"),a=process.env.D1_PROJECT_DIR;if(!a)throw Error("Project directory not configured");let i=await (0,l.S)(a);if(!i?.config)throw Error("No Wrangler configuration found");let s=i.config;if(!s.d1_databases?.length)throw Error("No D1 databases configured");let n=r?s.d1_databases.find(e=>e.database_name===r):s.d1_databases[0];if(!n)throw Error(`Database not found: ${r}`);n.database_name;let c=n.migrations_dir?p.join(a,n.migrations_dir):p.join(a,"migrations"),d=[];try{d=(await (0,u.readdir)(c)).filter(e=>e.endsWith(".sql")).sort()}catch{}let m=await E(a,n),g=new Map(m.map(e=>[e.name,e])),h=d.map(e=>{let t=g.get(e);return{name:e,applied:!!t,applied_at:t?.applied_at||null,checksum:t?.checksum||null}});return m.forEach(e=>{d.includes(e.name)||h.push({name:e.name,applied:!0,applied_at:e.applied_at,checksum:e.checksum,orphaned:!0})}),o.NextResponse.json({success:!0,migrations:h,migrationsDir:c})}catch(e){return m.A.error("Migrations list error:",e),o.NextResponse.json({success:!1,error:e.message},{status:500})}}async function _(){return new o.NextResponse(null,{status:204})}let T=new i.AppRouteRouteModule({definition:{kind:s.RouteKind.APP_ROUTE,page:"/api/migrations/list/route",pathname:"/api/migrations/list",filename:"route",bundlePath:"app/api/migrations/list/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/migrations/list/route.js",nextConfigOutput:"",userland:a}),{workAsyncStorage:y,workUnitAsyncStorage:R,serverHooks:x}=T;function A(){return(0,n.patchFetch)({workAsyncStorage:y,workUnitAsyncStorage:R})}},3868:(e,t,r)=>{r.d(t,{executeLocalSQL:()=>m,k5:()=>u,n3:()=>g,w1:()=>p});var a=r(5511),i=r(3873),s=r(9021),n=r(7550),o=r(1804);let l=i.join(".wrangler","state","v3","d1","miniflare-D1DatabaseObject"),c=new Map;function d(e,t){let r=i.join(e,l);if(!s.existsSync(r))return null;let{database_id:n,database_name:c,binding:d}=t,u=[n,c,d].filter(Boolean),p=["","miniflare-D1DatabaseObject:","D1DatabaseObject:","d1:"],m=u.flatMap(e=>p.map(t=>{var r;return r=`${t}${e}`,a.createHash("sha256").update(r).digest("hex")})).map(e=>i.join(r,`${e}.sqlite`)).find(e=>s.existsSync(e));if(m)return m;let g=s.readdirSync(r).filter(e=>e.endsWith(".sqlite")).map(e=>({name:e,fullPath:i.join(r,e),mtime:s.statSync(i.join(r,e)).mtimeMs})).sort((e,t)=>t.mtime-e.mtime);return 1===g.length?g[0].fullPath:(g.length>1&&o.A.debug(`[local-db] Multiple SQLite files, no hash matched — falling back to wrangler CLI. dir=${r}, tried ids=${JSON.stringify(u)}`),o.A.debug(`[local-db] No SQLite files found. dir=${r}, tried ids=${JSON.stringify(u)}`),null)}function u(e,t){return null!==d(e,t)}function p(e,t){let r=`${e}:${t.database_name}`,a=d(e,t);if(c.has(r)){let e=c.get(r);if(e.path!==a){try{e.db.close()}catch{}c.delete(r)}else try{return e.db.prepare("SELECT 1").get(),e.db}catch{c.delete(r)}}if(!a)return null;try{let e=new n(a,{fileMustExist:!1});return e.pragma("journal_mode = WAL"),e.pragma("foreign_keys = ON"),c.set(r,{db:e,path:a}),e}catch{return null}}function m(e,t,r){let a=p(e,t);if(!a)return null;let i=r.trim(),s=i.toUpperCase().replace(/\s+/g," "),n=i.split(";").map(e=>e.trim()).filter(Boolean);if(n.length>1){let e=[],t=0,r=0;return a.transaction(()=>{for(let i of n){let s=i.toUpperCase().replace(/\s+/g," ");if(s.startsWith("SELECT")||s.startsWith("PRAGMA")||s.startsWith("EXPLAIN")){let t=a.prepare(i).all();e=e.concat(t)}else{let e=a.prepare(i).run();t+=e.changes,r=e.lastInsertRowid}}})(),JSON.stringify([{results:e,success:!0,meta:{changes:t,last_row_id:r,rows_read:e.length,rows_written:t}}])}if(s.startsWith("SELECT")||s.startsWith("PRAGMA")||s.startsWith("EXPLAIN")){let e=a.prepare(i).all();return JSON.stringify([{results:e,success:!0,meta:{rows_read:e.length,rows_written:0,changed_db:!1}}])}let o=a.prepare(i).run();return JSON.stringify([{results:[],success:!0,meta:{changes:o.changes,last_row_id:o.lastInsertRowid,rows_read:0,rows_written:o.changes,changed_db:o.changes>0}}])}function g(e,t){let r=`${e}:${t}`,a=c.get(r);if(a){try{a.db.close()}catch{}c.delete(r)}}},961:(e,t,r)=>{r.d(t,{A8:()=>T,CM:()=>E,GS:()=>h,Gc:()=>y,JD:()=>g,Sl:()=>_,ai:()=>f,hI:()=>w,k0:()=>p});var a=r(9748),i=r(8354),s=r(9646),n=r(5511),o=r(3873),l=r(9421),c=r(4218),d=r(1804);let u=(0,i.promisify)(s.exec);async function p(e,t,r="local",a=!1){let i="remote"===r?"--remote":"--local",s="remote"===r?`
2
2
  CREATE TABLE IF NOT EXISTS d1_migrations (
3
3
  id INTEGER PRIMARY KEY AUTOINCREMENT,
4
4
  name TEXT NOT NULL UNIQUE,
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/migrations/list/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"7098","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":6311,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","803","static/chunks/803-a2fcfbd00e6b3b38.js","480","static/chunks/480-85b6c8ae3f51b156.js","974","static/chunks/app/page-358bf2112802ff85.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/2c165a0ede9b2442.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/migrations/list/route":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/migrations/list/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"7098","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":6311,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","803","static/chunks/803-a2fcfbd00e6b3b38.js","480","static/chunks/480-85b6c8ae3f51b156.js","974","static/chunks/app/page-3ec9d72ecb052d39.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/2c165a0ede9b2442.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/migrations/list/route":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var e={};e.id=105,e.ids=[105],e.modules={7550:e=>{e.exports=require("better-sqlite3")},846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{e.exports=require("buffer")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},4735:e=>{e.exports=require("events")},9021:e=>{e.exports=require("fs")},9748:e=>{e.exports=require("fs/promises")},1630:e=>{e.exports=require("http")},5591:e=>{e.exports=require("https")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},1204:e=>{e.exports=require("string_decoder")},8354:e=>{e.exports=require("util")},4075:e=>{e.exports=require("zlib")},3024:e=>{e.exports=require("node:fs")},6760:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},3136:e=>{e.exports=require("node:url")},2010:(e,t,r)=>{r.r(t),r.d(t,{patchFetch:()=>N,routeModule:()=>R,serverHooks:()=>A,workAsyncStorage:()=>f,workUnitAsyncStorage:()=>h});var a={};r.r(a),r.d(a,{OPTIONS:()=>w,POST:()=>g});var i=r(2706),o=r(8203),s=r(5994),n=r(9187),c=r(5949),l=r(9748),d=r(3873),p=r(961),u=r(8354),m=r(9646),E=r(1804);let T=(0,u.promisify)(m.exec);async function g(e){E.A.logRequest("POST","/api/migrations/sync");try{let{accountId:t,apiToken:r}=await e.json(),a=process.env.D1_PROJECT_DIR;if(!a)return E.A.error("Project directory not configured"),n.NextResponse.json({error:"Project directory not configured"},{status:500});let i=await (0,c.S)(a);if(!i||!i.config)return n.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let o=i.config;if(!o.d1_databases?.length)return n.NextResponse.json({error:"No D1 databases configured"},{status:404});let s=o.d1_databases[0].database_name;await T(`wrangler d1 execute ${s} --remote --command="
1
+ "use strict";(()=>{var e={};e.id=105,e.ids=[105],e.modules={7550:e=>{e.exports=require("better-sqlite3")},846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{e.exports=require("buffer")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},4735:e=>{e.exports=require("events")},9021:e=>{e.exports=require("fs")},9748:e=>{e.exports=require("fs/promises")},1630:e=>{e.exports=require("http")},5591:e=>{e.exports=require("https")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},1204:e=>{e.exports=require("string_decoder")},8354:e=>{e.exports=require("util")},4075:e=>{e.exports=require("zlib")},643:e=>{e.exports=require("node:fs")},4379:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},3136:e=>{e.exports=require("node:url")},2010:(e,t,r)=>{r.r(t),r.d(t,{patchFetch:()=>N,routeModule:()=>R,serverHooks:()=>A,workAsyncStorage:()=>f,workUnitAsyncStorage:()=>h});var a={};r.r(a),r.d(a,{OPTIONS:()=>w,POST:()=>g});var i=r(2706),o=r(8203),s=r(5994),n=r(9187),c=r(5949),l=r(9748),d=r(3873),p=r(961),u=r(8354),m=r(9646),E=r(1804);let T=(0,u.promisify)(m.exec);async function g(e){E.A.logRequest("POST","/api/migrations/sync");try{let{accountId:t,apiToken:r}=await e.json(),a=process.env.D1_PROJECT_DIR;if(!a)return E.A.error("Project directory not configured"),n.NextResponse.json({error:"Project directory not configured"},{status:500});let i=await (0,c.S)(a);if(!i||!i.config)return n.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let o=i.config;if(!o.d1_databases?.length)return n.NextResponse.json({error:"No D1 databases configured"},{status:404});let s=o.d1_databases[0].database_name;await T(`wrangler d1 execute ${s} --remote --command="
2
2
  CREATE TABLE IF NOT EXISTS d1_migrations (
3
3
  id INTEGER PRIMARY KEY AUTOINCREMENT,
4
4
  name TEXT NOT NULL UNIQUE,
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/migrations/sync/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"7098","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":6311,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","803","static/chunks/803-a2fcfbd00e6b3b38.js","480","static/chunks/480-85b6c8ae3f51b156.js","974","static/chunks/app/page-358bf2112802ff85.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/2c165a0ede9b2442.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/migrations/sync/route":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/migrations/sync/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"7098","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":6311,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","803","static/chunks/803-a2fcfbd00e6b3b38.js","480","static/chunks/480-85b6c8ae3f51b156.js","974","static/chunks/app/page-3ec9d72ecb052d39.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/2c165a0ede9b2442.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/migrations/sync/route":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var e={};e.id=51,e.ids=[51],e.modules={7550:e=>{e.exports=require("better-sqlite3")},846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{e.exports=require("buffer")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},4735:e=>{e.exports=require("events")},9021:e=>{e.exports=require("fs")},9748:e=>{e.exports=require("fs/promises")},1630:e=>{e.exports=require("http")},5591:e=>{e.exports=require("https")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},1204:e=>{e.exports=require("string_decoder")},8354:e=>{e.exports=require("util")},4075:e=>{e.exports=require("zlib")},3024:e=>{e.exports=require("node:fs")},6760:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},3136:e=>{e.exports=require("node:url")},4763:(e,t,r)=>{r.r(t),r.d(t,{patchFetch:()=>N,routeModule:()=>y,serverHooks:()=>_,workAsyncStorage:()=>R,workUnitAsyncStorage:()=>x});var a={};r.r(a),r.d(a,{OPTIONS:()=>h,POST:()=>T});var o=r(2706),i=r(8203),s=r(5994),n=r(9187),c=r(5949),l=r(9748),d=r(3873),u=r(8354),p=r(9646),m=r(961);let E=(0,u.promisify)(p.exec);async function g(e,t){try{await (0,m.A8)(e,t);let{stdout:r}=await E(`wrangler d1 execute ${t} --local --command="SELECT name, checksum FROM d1_migrations;" --json`,{cwd:e}),a=JSON.parse(r);return a.results?.[0]?.results||[]}catch(e){throw console.error("Error getting database migrations:",e),Error("Failed to get database migrations")}}async function w(e){try{let t=d.join(e,"migrations"),r=await (0,l.readdir)(t);return(await Promise.all(r.filter(e=>e.endsWith(".sql")).map(async e=>{let r=d.join(t,e),a=await (0,l.readFile)(r,"utf8");return{name:e,path:r,content:a,checksum:(0,m.Sl)(a)}}))).sort((e,t)=>e.name.localeCompare(t.name))}catch(e){if("ENOENT"===e.code)return[];throw Error("Failed to read migration files")}}async function f(e,t,r){try{return await E(`wrangler d1 execute ${t} --local --command="${r.replace(/"/g,'\\"')}"`,{cwd:e}),!0}catch(e){throw console.error("Query execution error:",e),Error("Failed to execute database query")}}async function T(e){try{let e=process.env.D1_PROJECT_DIR;if(!e)return n.NextResponse.json({error:"Project directory not configured"},{status:500});let t=await (0,c.S)(e);if(!t||!t.config)return n.NextResponse.json({error:"Could not find Wrangler configuration"},{status:404});let r=t.config;if(!r.d1_databases?.length)return n.NextResponse.json({error:"No D1 databases configured"},{status:404});let a=r.d1_databases[0].database_name,[o,i]=await Promise.all([g(e,a),w(e)]),s=new Map(o.map(e=>[e.name,e])),l=new Map(i.map(e=>[e.name,e])),d={added:[],removed:[],unchanged:[]};for(let[e]of s)l.has(e)||d.removed.push(e);if(d.removed.length>0){let t=d.removed.map(e=>`'${e}'`).join(",");await f(e,a,`DELETE FROM d1_migrations WHERE name IN (${t});`)}for(let[t,r]of l)s.get(t)?d.unchanged.push(t):(d.added.push(t),await f(e,a,`INSERT OR REPLACE INTO d1_migrations (name, checksum) VALUES ('${t}', '${r.checksum}');`));return n.NextResponse.json({success:!0,details:{added:d.added,removed:d.removed,unchanged:d.unchanged}})}catch(e){return console.error("Migration file sync error:",e),n.NextResponse.json({error:e.message||"Failed to sync migrations"},{status:500})}}async function h(){return new n.NextResponse(null,{status:204})}let y=new o.AppRouteRouteModule({definition:{kind:i.RouteKind.APP_ROUTE,page:"/api/migrations/sync-files/route",pathname:"/api/migrations/sync-files",filename:"route",bundlePath:"app/api/migrations/sync-files/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/migrations/sync-files/route.js",nextConfigOutput:"",userland:a}),{workAsyncStorage:R,workUnitAsyncStorage:x,serverHooks:_}=y;function N(){return(0,s.patchFetch)({workAsyncStorage:R,workUnitAsyncStorage:x})}},961:(e,t,r)=>{r.d(t,{A8:()=>y,CM:()=>f,GS:()=>g,Gc:()=>R,JD:()=>E,Sl:()=>h,ai:()=>w,hI:()=>T,k0:()=>p});var a=r(9748),o=r(8354),i=r(9646),s=r(5511),n=r(3873),c=r(9421),l=r(4218),d=r(1804);let u=(0,o.promisify)(i.exec);async function p(e,t,r="local",a=!1){let o="remote"===r?"--remote":"--local",i="remote"===r?`
1
+ "use strict";(()=>{var e={};e.id=51,e.ids=[51],e.modules={7550:e=>{e.exports=require("better-sqlite3")},846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{e.exports=require("buffer")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},4735:e=>{e.exports=require("events")},9021:e=>{e.exports=require("fs")},9748:e=>{e.exports=require("fs/promises")},1630:e=>{e.exports=require("http")},5591:e=>{e.exports=require("https")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},1204:e=>{e.exports=require("string_decoder")},8354:e=>{e.exports=require("util")},4075:e=>{e.exports=require("zlib")},643:e=>{e.exports=require("node:fs")},4379:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},3136:e=>{e.exports=require("node:url")},4763:(e,t,r)=>{r.r(t),r.d(t,{patchFetch:()=>N,routeModule:()=>y,serverHooks:()=>_,workAsyncStorage:()=>R,workUnitAsyncStorage:()=>x});var a={};r.r(a),r.d(a,{OPTIONS:()=>h,POST:()=>T});var o=r(2706),i=r(8203),s=r(5994),n=r(9187),c=r(5949),l=r(9748),d=r(3873),u=r(8354),p=r(9646),m=r(961);let E=(0,u.promisify)(p.exec);async function g(e,t){try{await (0,m.A8)(e,t);let{stdout:r}=await E(`wrangler d1 execute ${t} --local --command="SELECT name, checksum FROM d1_migrations;" --json`,{cwd:e}),a=JSON.parse(r);return a.results?.[0]?.results||[]}catch(e){throw console.error("Error getting database migrations:",e),Error("Failed to get database migrations")}}async function w(e){try{let t=d.join(e,"migrations"),r=await (0,l.readdir)(t);return(await Promise.all(r.filter(e=>e.endsWith(".sql")).map(async e=>{let r=d.join(t,e),a=await (0,l.readFile)(r,"utf8");return{name:e,path:r,content:a,checksum:(0,m.Sl)(a)}}))).sort((e,t)=>e.name.localeCompare(t.name))}catch(e){if("ENOENT"===e.code)return[];throw Error("Failed to read migration files")}}async function f(e,t,r){try{return await E(`wrangler d1 execute ${t} --local --command="${r.replace(/"/g,'\\"')}"`,{cwd:e}),!0}catch(e){throw console.error("Query execution error:",e),Error("Failed to execute database query")}}async function T(e){try{let e=process.env.D1_PROJECT_DIR;if(!e)return n.NextResponse.json({error:"Project directory not configured"},{status:500});let t=await (0,c.S)(e);if(!t||!t.config)return n.NextResponse.json({error:"Could not find Wrangler configuration"},{status:404});let r=t.config;if(!r.d1_databases?.length)return n.NextResponse.json({error:"No D1 databases configured"},{status:404});let a=r.d1_databases[0].database_name,[o,i]=await Promise.all([g(e,a),w(e)]),s=new Map(o.map(e=>[e.name,e])),l=new Map(i.map(e=>[e.name,e])),d={added:[],removed:[],unchanged:[]};for(let[e]of s)l.has(e)||d.removed.push(e);if(d.removed.length>0){let t=d.removed.map(e=>`'${e}'`).join(",");await f(e,a,`DELETE FROM d1_migrations WHERE name IN (${t});`)}for(let[t,r]of l)s.get(t)?d.unchanged.push(t):(d.added.push(t),await f(e,a,`INSERT OR REPLACE INTO d1_migrations (name, checksum) VALUES ('${t}', '${r.checksum}');`));return n.NextResponse.json({success:!0,details:{added:d.added,removed:d.removed,unchanged:d.unchanged}})}catch(e){return console.error("Migration file sync error:",e),n.NextResponse.json({error:e.message||"Failed to sync migrations"},{status:500})}}async function h(){return new n.NextResponse(null,{status:204})}let y=new o.AppRouteRouteModule({definition:{kind:i.RouteKind.APP_ROUTE,page:"/api/migrations/sync-files/route",pathname:"/api/migrations/sync-files",filename:"route",bundlePath:"app/api/migrations/sync-files/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/migrations/sync-files/route.js",nextConfigOutput:"",userland:a}),{workAsyncStorage:R,workUnitAsyncStorage:x,serverHooks:_}=y;function N(){return(0,s.patchFetch)({workAsyncStorage:R,workUnitAsyncStorage:x})}},961:(e,t,r)=>{r.d(t,{A8:()=>y,CM:()=>f,GS:()=>g,Gc:()=>R,JD:()=>E,Sl:()=>h,ai:()=>w,hI:()=>T,k0:()=>p});var a=r(9748),o=r(8354),i=r(9646),s=r(5511),n=r(3873),c=r(9421),l=r(4218),d=r(1804);let u=(0,o.promisify)(i.exec);async function p(e,t,r="local",a=!1){let o="remote"===r?"--remote":"--local",i="remote"===r?`
2
2
  CREATE TABLE IF NOT EXISTS d1_migrations (
3
3
  id INTEGER PRIMARY KEY AUTOINCREMENT,
4
4
  name TEXT NOT NULL UNIQUE,
@@ -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}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"7098","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":6311,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","803","static/chunks/803-a2fcfbd00e6b3b38.js","480","static/chunks/480-85b6c8ae3f51b156.js","974","static/chunks/app/page-358bf2112802ff85.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/2c165a0ede9b2442.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/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}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
1
+ 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}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"7098","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":6311,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","803","static/chunks/803-a2fcfbd00e6b3b38.js","480","static/chunks/480-85b6c8ae3f51b156.js","974","static/chunks/app/page-3ec9d72ecb052d39.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/2c165a0ede9b2442.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/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}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/pro/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"7098","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":6311,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","803","static/chunks/803-a2fcfbd00e6b3b38.js","480","static/chunks/480-85b6c8ae3f51b156.js","974","static/chunks/app/page-358bf2112802ff85.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/2c165a0ede9b2442.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/pro/route":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/pro/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"7098","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":6311,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","803","static/chunks/803-a2fcfbd00e6b3b38.js","480","static/chunks/480-85b6c8ae3f51b156.js","974","static/chunks/app/page-3ec9d72ecb052d39.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/2c165a0ede9b2442.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/pro/route":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -1 +1 @@
1
- "use strict";(()=>{var e={};e.id=377,e.ids=[377],e.modules={7550:e=>{e.exports=require("better-sqlite3")},846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{e.exports=require("buffer")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},4735:e=>{e.exports=require("events")},9021:e=>{e.exports=require("fs")},9748:e=>{e.exports=require("fs/promises")},1630:e=>{e.exports=require("http")},5591:e=>{e.exports=require("https")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},1204:e=>{e.exports=require("string_decoder")},8354:e=>{e.exports=require("util")},4075:e=>{e.exports=require("zlib")},3024:e=>{e.exports=require("node:fs")},6760:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},3136:e=>{e.exports=require("node:url")},2918:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>h,routeModule:()=>m,serverHooks:()=>A,workAsyncStorage:()=>b,workUnitAsyncStorage:()=>x});var s={};t.r(s),t.d(s,{OPTIONS:()=>g,POST:()=>f});var a=t(2706),o=t(8203),n=t(5994),u=t(9187),i=t(9421),l=t(4218),p=t(5949),d=t(1804);async function c(e,r,t,s){d.A.debug("Starting data pull process...");let a={...process.env,CLOUDFLARE_API_TOKEN:t,CLOUDFLARE_ACCOUNT_ID:r};d.A.debug("Fetching current schema for data pull...");let o=(await (0,l.ZX)(e,s,a,!1)).filter(e=>"table"===e.type&&e.name);d.A.debug("Local table schema for data pull:",o.map(e=>e.name));let n=function(e){let r={};e.forEach(e=>{let t;r[e.name]=new Set;let s=/FOREIGN KEY\s*\([^)]*\)\s+REFERENCES\s+(\w+)/gi;for(;null!==(t=s.exec(e.sql));){let s=t[1];r[e.name].add(s)}}),d.A.debug("Computed dependency graph:",r);let t=[],s={};return Object.keys(r).forEach(e=>{s[e]||function e(a){if("temp"===s[a])throw Error(`Cycle detected in dependencies at table ${a}`);s[a]||(s[a]="temp",r[a].forEach(t=>{r[t]&&e(t)}),s[a]="perm",t.push(a))}(e)}),d.A.debug("Computed insertion order (parent tables first):",t),t}(o);for(let r of(d.A.debug("Final computed insertion order:",n),n)){let t=o.find(e=>e.name===r);if(!t){d.A.debug(`Skipping table ${r} as it is not in the current schema list.`);continue}d.A.debug(`Processing table: ${r}`);let n=function(e){let r=e.columns?.find(e=>e.isPrimaryKey),t=r?r.name:"rowid";return d.A.debug(`Determined ordering column for table ${e.name||"unknown"}: ${t}`),t}(t);d.A.debug(`Fetching data for table: ${r} ordered by ${n}`);let u=await (0,i.h3)(e,s,r,a,75,n);if(d.A.debug(`Fetched ${u.length} records for table: ${r}`),u.length>0){let t=(0,i.xk)(r,u);d.A.debug(`Generated bulk insert SQL for ${r}: ${t}`);try{await (0,i.KK)(e,s,t,a,!1),d.A.debug(`Bulk inserted ${u.length} records into table: ${r}`)}catch(e){throw d.A.error(`Error inserting data into table ${r}:`,e),Error(`Data pull failed for table ${r}: ${e.message}`)}}else d.A.debug(`No data fetched for table: ${r}`)}return d.A.debug("Data pull process completed successfully."),{message:"All data pulled successfully."}}async function f(e){try{d.A.debug("Received request for data pull.");let{accountId:r,apiToken:t}=await e.json(),s=process.env.D1_PROJECT_DIR;if(!s)return u.NextResponse.json({success:!1,error:{type:"VALIDATION_ERROR",message:"Project directory not configured"}},{status:500});let a=await (0,p.S)(s);if(!a||!a.config)return u.NextResponse.json({success:!1,error:{type:"VALIDATION_ERROR",message:"Could not find Wrangler configuration"}},{status:400});let o=a.config;if(!o.d1_databases?.length)return u.NextResponse.json({success:!1,error:{type:"VALIDATION_ERROR",message:"No D1 databases configured"}},{status:400});let n=o.d1_databases[0].database_name;d.A.debug(`Initiating data pull for database: ${n}`);let i=await c(s,r,t,n);return d.A.debug("Data pull result:",i),u.NextResponse.json({success:!0,message:i.message,details:i})}catch(e){return d.A.error("Pull data confirm error:",e),u.NextResponse.json({success:!1,error:{type:e.type||"EXECUTION_ERROR",message:e.message||"Failed to apply data pull"}},{status:500})}}async function g(){return new u.NextResponse(null,{status:204})}let m=new a.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/pull-data/confirm/route",pathname:"/api/pull-data/confirm",filename:"route",bundlePath:"app/api/pull-data/confirm/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/pull-data/confirm/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:b,workUnitAsyncStorage:x,serverHooks:A}=m;function h(){return(0,n.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:x})}}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[994,452,391,226],()=>t(2918));module.exports=s})();
1
+ "use strict";(()=>{var e={};e.id=377,e.ids=[377],e.modules={7550:e=>{e.exports=require("better-sqlite3")},846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{e.exports=require("buffer")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},4735:e=>{e.exports=require("events")},9021:e=>{e.exports=require("fs")},9748:e=>{e.exports=require("fs/promises")},1630:e=>{e.exports=require("http")},5591:e=>{e.exports=require("https")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},1204:e=>{e.exports=require("string_decoder")},8354:e=>{e.exports=require("util")},4075:e=>{e.exports=require("zlib")},643:e=>{e.exports=require("node:fs")},4379:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},3136:e=>{e.exports=require("node:url")},2918:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>h,routeModule:()=>m,serverHooks:()=>A,workAsyncStorage:()=>b,workUnitAsyncStorage:()=>x});var s={};t.r(s),t.d(s,{OPTIONS:()=>g,POST:()=>f});var a=t(2706),o=t(8203),n=t(5994),u=t(9187),i=t(9421),l=t(4218),p=t(5949),d=t(1804);async function c(e,r,t,s){d.A.debug("Starting data pull process...");let a={...process.env,CLOUDFLARE_API_TOKEN:t,CLOUDFLARE_ACCOUNT_ID:r};d.A.debug("Fetching current schema for data pull...");let o=(await (0,l.ZX)(e,s,a,!1)).filter(e=>"table"===e.type&&e.name);d.A.debug("Local table schema for data pull:",o.map(e=>e.name));let n=function(e){let r={};e.forEach(e=>{let t;r[e.name]=new Set;let s=/FOREIGN KEY\s*\([^)]*\)\s+REFERENCES\s+(\w+)/gi;for(;null!==(t=s.exec(e.sql));){let s=t[1];r[e.name].add(s)}}),d.A.debug("Computed dependency graph:",r);let t=[],s={};return Object.keys(r).forEach(e=>{s[e]||function e(a){if("temp"===s[a])throw Error(`Cycle detected in dependencies at table ${a}`);s[a]||(s[a]="temp",r[a].forEach(t=>{r[t]&&e(t)}),s[a]="perm",t.push(a))}(e)}),d.A.debug("Computed insertion order (parent tables first):",t),t}(o);for(let r of(d.A.debug("Final computed insertion order:",n),n)){let t=o.find(e=>e.name===r);if(!t){d.A.debug(`Skipping table ${r} as it is not in the current schema list.`);continue}d.A.debug(`Processing table: ${r}`);let n=function(e){let r=e.columns?.find(e=>e.isPrimaryKey),t=r?r.name:"rowid";return d.A.debug(`Determined ordering column for table ${e.name||"unknown"}: ${t}`),t}(t);d.A.debug(`Fetching data for table: ${r} ordered by ${n}`);let u=await (0,i.h3)(e,s,r,a,75,n);if(d.A.debug(`Fetched ${u.length} records for table: ${r}`),u.length>0){let t=(0,i.xk)(r,u);d.A.debug(`Generated bulk insert SQL for ${r}: ${t}`);try{await (0,i.KK)(e,s,t,a,!1),d.A.debug(`Bulk inserted ${u.length} records into table: ${r}`)}catch(e){throw d.A.error(`Error inserting data into table ${r}:`,e),Error(`Data pull failed for table ${r}: ${e.message}`)}}else d.A.debug(`No data fetched for table: ${r}`)}return d.A.debug("Data pull process completed successfully."),{message:"All data pulled successfully."}}async function f(e){try{d.A.debug("Received request for data pull.");let{accountId:r,apiToken:t}=await e.json(),s=process.env.D1_PROJECT_DIR;if(!s)return u.NextResponse.json({success:!1,error:{type:"VALIDATION_ERROR",message:"Project directory not configured"}},{status:500});let a=await (0,p.S)(s);if(!a||!a.config)return u.NextResponse.json({success:!1,error:{type:"VALIDATION_ERROR",message:"Could not find Wrangler configuration"}},{status:400});let o=a.config;if(!o.d1_databases?.length)return u.NextResponse.json({success:!1,error:{type:"VALIDATION_ERROR",message:"No D1 databases configured"}},{status:400});let n=o.d1_databases[0].database_name;d.A.debug(`Initiating data pull for database: ${n}`);let i=await c(s,r,t,n);return d.A.debug("Data pull result:",i),u.NextResponse.json({success:!0,message:i.message,details:i})}catch(e){return d.A.error("Pull data confirm error:",e),u.NextResponse.json({success:!1,error:{type:e.type||"EXECUTION_ERROR",message:e.message||"Failed to apply data pull"}},{status:500})}}async function g(){return new u.NextResponse(null,{status:204})}let m=new a.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/pull-data/confirm/route",pathname:"/api/pull-data/confirm",filename:"route",bundlePath:"app/api/pull-data/confirm/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/pull-data/confirm/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:b,workUnitAsyncStorage:x,serverHooks:A}=m;function h(){return(0,n.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:x})}}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[994,452,391,226],()=>t(2918));module.exports=s})();