d1s 0.2.2 → 0.2.3

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 (44) hide show
  1. package/dist/.next/.next/BUILD_ID +1 -1
  2. package/dist/.next/.next/app-build-manifest.json +16 -16
  3. package/dist/.next/.next/app-path-routes-manifest.json +1 -1
  4. package/dist/.next/.next/build-manifest.json +2 -2
  5. package/dist/.next/.next/cache/.tsbuildinfo +1 -1
  6. package/dist/.next/.next/cache/webpack/client-production/4.pack +0 -0
  7. package/dist/.next/.next/cache/webpack/client-production/5.pack +0 -0
  8. package/dist/.next/.next/cache/webpack/client-production/index.pack +0 -0
  9. package/dist/.next/.next/cache/webpack/client-production/index.pack.old +0 -0
  10. package/dist/.next/.next/cache/webpack/server-production/3.pack +0 -0
  11. package/dist/.next/.next/cache/webpack/server-production/4.pack +0 -0
  12. package/dist/.next/.next/cache/webpack/server-production/index.pack +0 -0
  13. package/dist/.next/.next/cache/webpack/server-production/index.pack.old +0 -0
  14. package/dist/.next/.next/next-minimal-server.js.nft.json +1 -1
  15. package/dist/.next/.next/next-server.js.nft.json +1 -1
  16. package/dist/.next/.next/prerender-manifest.json +1 -1
  17. package/dist/.next/.next/server/app/_not-found.html +1 -1
  18. package/dist/.next/.next/server/app/_not-found.rsc +1 -1
  19. package/dist/.next/.next/server/app/api/cloudflare/route.js +1 -1
  20. package/dist/.next/.next/server/app/api/databases/route.js +1 -1
  21. package/dist/.next/.next/server/app/api/migrations/sync/route.js +1 -1
  22. package/dist/.next/.next/server/app/api/migrations/sync-files/route.js +1 -1
  23. package/dist/.next/.next/server/app/api/pull-remote/confirm/route.js +1 -1
  24. package/dist/.next/.next/server/app/api/pull-remote/preview/route.js +1 -1
  25. package/dist/.next/.next/server/app/api/push-remote/confirm/route.js +1 -1
  26. package/dist/.next/.next/server/app/api/push-remote/preview/route.js +1 -1
  27. package/dist/.next/.next/server/app/api/query/route.js +1 -1
  28. package/dist/.next/.next/server/app/api/tables/[name]/route.js +1 -1
  29. package/dist/.next/.next/server/app/api/tables/route.js +1 -1
  30. package/dist/.next/.next/server/app/index.html +1 -1
  31. package/dist/.next/.next/server/app/index.rsc +1 -1
  32. package/dist/.next/.next/server/app/page.js +6 -6
  33. package/dist/.next/.next/server/app-paths-manifest.json +3 -3
  34. package/dist/.next/.next/server/chunks/336.js +1 -1
  35. package/dist/.next/.next/server/chunks/973.js +1 -1
  36. package/dist/.next/.next/server/chunks/992.js +2 -2
  37. package/dist/.next/.next/server/pages/404.html +1 -1
  38. package/dist/.next/.next/server/pages/500.html +1 -1
  39. package/dist/.next/.next/static/YIuXI2CxMwg2fuuUEBsXL/_buildManifest.js +1 -0
  40. package/dist/.next/.next/static/YIuXI2CxMwg2fuuUEBsXL/_ssgManifest.js +1 -0
  41. package/dist/.next/.next/trace +3 -3
  42. package/dist/d1-studio.js +25 -1
  43. package/package.json +1 -1
  44. package/scripts/studio.js +25 -1
@@ -1 +1 @@
1
- (()=>{var e={};e.id=952,e.ids=[952],e.modules={846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9748:e=>{"use strict";e.exports=require("fs/promises")},1820:e=>{"use strict";e.exports=require("os")},7910:e=>{"use strict";e.exports=require("stream")},3997:e=>{"use strict";e.exports=require("tty")},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")},6731:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>x,routeModule:()=>l,serverHooks:()=>f,workAsyncStorage:()=>p,workUnitAsyncStorage:()=>g});var s={};t.r(s),t.d(s,{GET:()=>c,OPTIONS:()=>d});var o=t(2706),n=t(8203),a=t(5994),i=t(9187),u=t(5949);async function c(){try{let e=process.env.D1_PROJECT_DIR;if(!e)return console.error("D1_PROJECT_DIR environment variable is not set"),i.NextResponse.json({error:"Project directory not configured"},{status:500});console.log("Looking for Wrangler configuration in:",e);let r=await (0,u.S)(e);if(!r||!r.config)return i.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let t=r.config;if(!t.d1_databases?.length)return i.NextResponse.json({error:"No D1 databases configured in Wrangler configuration"},{status:404});return i.NextResponse.json({databases:t.d1_databases,debug:{projectDir:e,configPath:r.configPath||"N/A",databaseCount:t.d1_databases.length}})}catch(e){return console.error("Error reading database configuration:",e),i.NextResponse.json({error:"Failed to read database configuration",details:e.message,debug:{errorCode:e.code,errorStack:e.stack}},{status:500})}}async function d(){return new i.NextResponse(null,{status:204,headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, OPTIONS","Access-Control-Allow-Headers":"Content-Type"}})}let l=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/databases/route",pathname:"/api/databases",filename:"route",bundlePath:"app/api/databases/route"},resolvedPagePath:"/Users/karenredona/Desktop/d1studio/src/app/api/databases/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:p,workUnitAsyncStorage:g,serverHooks:f}=l;function x(){return(0,a.patchFetch)({workAsyncStorage:p,workUnitAsyncStorage:g})}},6487:()=>{},8335:()=>{},5949:(e,r,t)=>{"use strict";t.d(r,{S:()=>u});var s=t(9748),o=t(3149),n=t(2537),a=t(6789),i=t(872);async function u(e){try{let r;if(!e||"string"!=typeof e)throw Error("Project path is required and must be a string");console.log(i.blue("Looking for wrangler configuration in:"),e);let t=null,u=null;for(let r of["wrangler.toml","wrangler.json","wrangler.jsonc"])if(t=await (0,o.dJ)(r,{cwd:e})){u=r;break}if(!t)return console.log(i.yellow("No Wrangler configuration file found in:"),e),null;console.log(i.green(`Found ${u} at:`),t);let c=await (0,s.readFile)(t,"utf-8");return u.endsWith(".toml")?r=(0,n.parse)(c):(u.endsWith(".jsonc")&&(c=(0,a.A)(c)),r=JSON.parse(c)),{config:r,projectPath:e}}catch(e){throw console.error(i.red("Error reading Wrangler configuration:"),e.message),e}}}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[638,973],()=>t(6731));module.exports=s})();
1
+ (()=>{var e={};e.id=952,e.ids=[952],e.modules={846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9748:e=>{"use strict";e.exports=require("fs/promises")},1820:e=>{"use strict";e.exports=require("os")},7910:e=>{"use strict";e.exports=require("stream")},3997:e=>{"use strict";e.exports=require("tty")},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")},6731:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>x,routeModule:()=>l,serverHooks:()=>f,workAsyncStorage:()=>p,workUnitAsyncStorage:()=>g});var s={};t.r(s),t.d(s,{GET:()=>c,OPTIONS:()=>d});var o=t(2706),n=t(8203),a=t(5994),i=t(9187),u=t(5949);async function c(){try{let e=process.env.D1_PROJECT_DIR;if(!e)return console.error("D1_PROJECT_DIR environment variable is not set"),i.NextResponse.json({error:"Project directory not configured"},{status:500});console.log("Looking for Wrangler configuration in:",e);let r=await (0,u.S)(e);if(!r||!r.config)return i.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let t=r.config;if(!t.d1_databases?.length)return i.NextResponse.json({error:"No D1 databases configured in Wrangler configuration"},{status:404});return i.NextResponse.json({databases:t.d1_databases,debug:{projectDir:e,configPath:r.configPath||"N/A",databaseCount:t.d1_databases.length}})}catch(e){return console.error("Error reading database configuration:",e),i.NextResponse.json({error:"Failed to read database configuration",details:e.message,debug:{errorCode:e.code,errorStack:e.stack}},{status:500})}}async function d(){return new i.NextResponse(null,{status:204,headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, OPTIONS","Access-Control-Allow-Headers":"Content-Type"}})}let l=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/databases/route",pathname:"/api/databases",filename:"route",bundlePath:"app/api/databases/route"},resolvedPagePath:"/Users/karenredona/Desktop/d1studio/src/app/api/databases/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:p,workUnitAsyncStorage:g,serverHooks:f}=l;function x(){return(0,a.patchFetch)({workAsyncStorage:p,workUnitAsyncStorage:g})}},6487:()=>{},8335:()=>{},5949:(e,r,t)=>{"use strict";t.d(r,{S:()=>u});var s=t(9748),o=t(3149),n=t(2537),a=t(6789),i=t(872);async function u(e){try{let r;if(!e||"string"!=typeof e)throw Error("Project path is required and must be a string");console.log(i.blue("Looking for wrangler configuration in:"),e);let t=null,u=null;for(let r of["wrangler.toml","wrangler.json","wrangler.jsonc"])if(t=await (0,o.dJ)(r,{cwd:e})){u=r;break}if(!t)return console.log(i.yellow("No Wrangler configuration file found in:"),e),null;console.log(i.green(`Found ${u} at:`),t);let c=await (0,s.readFile)(t,"utf-8");return u.endsWith(".toml")?r=(0,n.parse)(c):(u.endsWith(".jsonc")&&(c=(0,a.A)(c)),r=JSON.parse(c)),{config:r,projectPath:e}}catch(e){throw console.error(i.red("Error reading Wrangler configuration:"),e.message),e}}}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[638,973],()=>t(6731));module.exports=s})();
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var e={};e.id=105,e.ids=[105],e.modules={846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},9748:e=>{e.exports=require("fs/promises")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},3997:e=>{e.exports=require("tty")},8354:e=>{e.exports=require("util")},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")},6675:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>A,routeModule:()=>g,serverHooks:()=>f,workAsyncStorage:()=>N,workUnitAsyncStorage:()=>R});var s={};t.r(s),t.d(s,{OPTIONS:()=>x,POST:()=>E});var a=t(2706),n=t(8203),o=t(5994),i=t(9187),p=t(5949),u=t(9748),c=t(3873),d=t(961),m=t(8354),l=t(9646);let T=(0,m.promisify)(l.exec);async function E(e){try{let{accountId:r,apiToken:t}=await e.json(),s=process.env.D1_PROJECT_DIR;if(!s)return i.NextResponse.json({error:"Project directory not configured"},{status:500});let a=await (0,p.S)(s);if(!a||!a.config)return i.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let n=a.config;if(!n.d1_databases?.length)return i.NextResponse.json({error:"No D1 databases configured"},{status:404});let o=n.d1_databases[0].database_name;await T(`wrangler d1 execute ${o} --remote --command="
1
+ "use strict";(()=>{var e={};e.id=105,e.ids=[105],e.modules={846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},9748:e=>{e.exports=require("fs/promises")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},3997:e=>{e.exports=require("tty")},8354:e=>{e.exports=require("util")},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")},6675:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>A,routeModule:()=>g,serverHooks:()=>f,workAsyncStorage:()=>N,workUnitAsyncStorage:()=>R});var s={};t.r(s),t.d(s,{OPTIONS:()=>x,POST:()=>E});var a=t(2706),n=t(8203),o=t(5994),i=t(9187),p=t(5949),u=t(9748),c=t(3873),d=t(961),m=t(8354),l=t(9646);let T=(0,m.promisify)(l.exec);async function E(e){try{let{accountId:r,apiToken:t}=await e.json(),s=process.env.D1_PROJECT_DIR;if(!s)return i.NextResponse.json({error:"Project directory not configured"},{status:500});let a=await (0,p.S)(s);if(!a||!a.config)return i.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let n=a.config;if(!n.d1_databases?.length)return i.NextResponse.json({error:"No D1 databases configured"},{status:404});let o=n.d1_databases[0].database_name;await T(`wrangler d1 execute ${o} --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
- "use strict";(()=>{var e={};e.id=51,e.ids=[51],e.modules={846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},9748:e=>{e.exports=require("fs/promises")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},3997:e=>{e.exports=require("tty")},8354:e=>{e.exports=require("util")},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")},7147:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>j,routeModule:()=>q,serverHooks:()=>R,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>E});var s={};t.r(s),t.d(s,{OPTIONS:()=>w,POST:()=>y});var a=t(2706),o=t(8203),n=t(5994),i=t(9187),u=t(5949),d=t(9748),c=t(3873),p=t(8354),l=t(9646),m=t(961);let g=(0,p.promisify)(l.exec);async function x(e,r){try{let{stdout:t}=await g(`wrangler d1 execute ${r} --local --command="SELECT name, checksum FROM d1_migrations;" --json`,{cwd:e}),s=JSON.parse(t);return s.results?.[0]?.results||[]}catch(e){throw console.error("Error getting database migrations:",e),Error("Failed to get database migrations")}}async function f(e){try{let r=c.join(e,"migrations"),t=await (0,d.readdir)(r);return(await Promise.all(t.filter(e=>e.endsWith(".sql")).map(async e=>{let t=c.join(r,e),s=await (0,d.readFile)(t,"utf8");return{name:e,path:t,content:s,checksum:(0,m.Sl)(s)}}))).sort((e,r)=>e.name.localeCompare(r.name))}catch(e){if("ENOENT"===e.code)return[];throw Error("Failed to read migration files")}}async function h(e,r,t){try{return await g(`wrangler d1 execute ${r} --local --command="${t.replace(/"/g,'\\"')}"`,{cwd:e}),!0}catch(e){throw console.error("Query execution error:",e),Error("Failed to execute database query")}}async function y(e){try{let e=process.env.D1_PROJECT_DIR;if(!e)return i.NextResponse.json({error:"Project directory not configured"},{status:500});let r=await (0,u.S)(e);if(!r||!r.config)return i.NextResponse.json({error:"Could not find Wrangler configuration"},{status:404});let t=r.config;if(!t.d1_databases?.length)return i.NextResponse.json({error:"No D1 databases configured"},{status:404});let s=t.d1_databases[0].database_name,[a,o]=await Promise.all([x(e,s),f(e)]),n=new Map(a.map(e=>[e.name,e])),d=new Map(o.map(e=>[e.name,e])),c={added:[],removed:[],unchanged:[]};for(let[e]of n)d.has(e)||c.removed.push(e);if(c.removed.length>0){let r=c.removed.map(e=>`'${e}'`).join(",");await h(e,s,`DELETE FROM d1_migrations WHERE name IN (${r});`)}for(let[r,t]of d)n.get(r)?c.unchanged.push(r):(c.added.push(r),await h(e,s,`INSERT OR REPLACE INTO d1_migrations (name, checksum) VALUES ('${r}', '${t.checksum}');`));return i.NextResponse.json({success:!0,details:{added:c.added,removed:c.removed,unchanged:c.unchanged}})}catch(e){return console.error("Migration file sync error:",e),i.NextResponse.json({error:e.message||"Failed to sync migrations"},{status:500})}}async function w(){return new i.NextResponse(null,{status:204})}let q=new a.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/migrations/sync-files/route",pathname:"/api/migrations/sync-files",filename:"route",bundlePath:"app/api/migrations/sync-files/route"},resolvedPagePath:"/Users/karenredona/Desktop/d1studio/src/app/api/migrations/sync-files/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:v,workUnitAsyncStorage:E,serverHooks:R}=q;function j(){return(0,n.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:E})}}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[638,973,801],()=>t(7147));module.exports=s})();
1
+ "use strict";(()=>{var e={};e.id=51,e.ids=[51],e.modules={846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},9748:e=>{e.exports=require("fs/promises")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},3997:e=>{e.exports=require("tty")},8354:e=>{e.exports=require("util")},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")},7147:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>j,routeModule:()=>q,serverHooks:()=>R,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>E});var s={};t.r(s),t.d(s,{OPTIONS:()=>w,POST:()=>y});var a=t(2706),o=t(8203),n=t(5994),i=t(9187),u=t(5949),d=t(9748),c=t(3873),p=t(8354),l=t(9646),m=t(961);let g=(0,p.promisify)(l.exec);async function x(e,r){try{let{stdout:t}=await g(`wrangler d1 execute ${r} --local --command="SELECT name, checksum FROM d1_migrations;" --json`,{cwd:e}),s=JSON.parse(t);return s.results?.[0]?.results||[]}catch(e){throw console.error("Error getting database migrations:",e),Error("Failed to get database migrations")}}async function f(e){try{let r=c.join(e,"migrations"),t=await (0,d.readdir)(r);return(await Promise.all(t.filter(e=>e.endsWith(".sql")).map(async e=>{let t=c.join(r,e),s=await (0,d.readFile)(t,"utf8");return{name:e,path:t,content:s,checksum:(0,m.Sl)(s)}}))).sort((e,r)=>e.name.localeCompare(r.name))}catch(e){if("ENOENT"===e.code)return[];throw Error("Failed to read migration files")}}async function h(e,r,t){try{return await g(`wrangler d1 execute ${r} --local --command="${t.replace(/"/g,'\\"')}"`,{cwd:e}),!0}catch(e){throw console.error("Query execution error:",e),Error("Failed to execute database query")}}async function y(e){try{let e=process.env.D1_PROJECT_DIR;if(!e)return i.NextResponse.json({error:"Project directory not configured"},{status:500});let r=await (0,u.S)(e);if(!r||!r.config)return i.NextResponse.json({error:"Could not find Wrangler configuration"},{status:404});let t=r.config;if(!t.d1_databases?.length)return i.NextResponse.json({error:"No D1 databases configured"},{status:404});let s=t.d1_databases[0].database_name,[a,o]=await Promise.all([x(e,s),f(e)]),n=new Map(a.map(e=>[e.name,e])),d=new Map(o.map(e=>[e.name,e])),c={added:[],removed:[],unchanged:[]};for(let[e]of n)d.has(e)||c.removed.push(e);if(c.removed.length>0){let r=c.removed.map(e=>`'${e}'`).join(",");await h(e,s,`DELETE FROM d1_migrations WHERE name IN (${r});`)}for(let[r,t]of d)n.get(r)?c.unchanged.push(r):(c.added.push(r),await h(e,s,`INSERT OR REPLACE INTO d1_migrations (name, checksum) VALUES ('${r}', '${t.checksum}');`));return i.NextResponse.json({success:!0,details:{added:c.added,removed:c.removed,unchanged:c.unchanged}})}catch(e){return console.error("Migration file sync error:",e),i.NextResponse.json({error:e.message||"Failed to sync migrations"},{status:500})}}async function w(){return new i.NextResponse(null,{status:204})}let q=new a.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/migrations/sync-files/route",pathname:"/api/migrations/sync-files",filename:"route",bundlePath:"app/api/migrations/sync-files/route"},resolvedPagePath:"/Users/karenredona/Desktop/d1studio/src/app/api/migrations/sync-files/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:v,workUnitAsyncStorage:E,serverHooks:R}=q;function j(){return(0,n.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:E})}}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[638,973,801],()=>t(7147));module.exports=s})();
@@ -1 +1 @@
1
- "use strict";(()=>{var e={};e.id=223,e.ids=[223],e.modules={846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},9748:e=>{e.exports=require("fs/promises")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},3997:e=>{e.exports=require("tty")},8354:e=>{e.exports=require("util")},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")},9556:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>E,routeModule:()=>y,serverHooks:()=>R,workAsyncStorage:()=>h,workUnitAsyncStorage:()=>x});var o={};t.r(o),t.d(o,{OPTIONS:()=>w,POST:()=>f});var i=t(2706),s=t(8203),a=t(5994),n=t(9187),l=t(9748),c=t(3873),p=t(5949),g=t(9421),u=t(4218),m=t(961);async function d(e,r,t,o){let i={...process.env,CLOUDFLARE_API_TOKEN:t,CLOUDFLARE_ACCOUNT_ID:r};try{let r=c.join(e,"migrations"),t=c.join(e,"migrations-temp");await (0,l.mkdir)(r,{recursive:!0}),await (0,l.mkdir)(t,{recursive:!0});let s=await (0,l.readdir)(t).catch(()=>[]);await Promise.all(s.map(e=>(0,l.unlink)(c.join(t,e)))),console.log("Fetching remote migration metadata...");let a=await (0,m.GS)(e,o,i);console.log("Remote migration metadata:",a),console.log("Fetching migration file content from remote...");let n=new Map;for(let r of a)try{let s=r.name,a=await (0,g.sP)(e,o,s,i);n.set(s,a),console.log(`Staged migration file: ${s}`),await (0,l.writeFile)(c.join(t,s),a,"utf8")}catch(e){throw console.error(`Error fetching content for migration ${r.name}:`,e),Error(`Failed to fetch migration file content for ${r.name}`)}console.log("Fetching local schema for destructive update...");let p=await (0,u.ZX)(e,o,i,!1),d=p.filter(e=>"table"===e.type&&e.name&&"if"!==e.name.toLowerCase());console.log("Local table schema:",d);let f=d.length>0?(0,u.IC)(d.map(e=>({tableName:e.name,sql:e.sql,type:e.type}))):[];console.log("Computed drop order:",f),console.log("Beginning destructive update...");try{for(let r of(console.log("Disabling foreign keys..."),await (0,g.KK)(e,o,"PRAGMA foreign_keys=OFF;",i,!1),p.filter(e=>"trigger"===e.type)))console.log(`Dropping trigger: ${r.name}`),await (0,g.KK)(e,o,(0,g.z6)(`DROP TRIGGER IF EXISTS ${r.name}`),i,!1);for(let r of p.filter(e=>"index"===e.type))console.log(`Dropping index: ${r.name}`),await (0,g.KK)(e,o,(0,g.z6)(`DROP INDEX IF EXISTS ${r.name}`),i,!1);for(let r of f.reverse())console.log(`Dropping table: ${r}`),await (0,g.KK)(e,o,(0,g.z6)(`DROP TABLE IF EXISTS ${r}`),i,!1);console.log("Re-enabling foreign keys..."),await (0,g.KK)(e,o,"PRAGMA foreign_keys=ON;",i,!1)}catch(e){throw Error(`Error dropping existing objects: ${e.message}`)}try{console.log("Resetting local migrations table..."),await (0,m.k0)(e,o,"local",!0)}catch(e){throw Error(`Error resetting migrations table: ${e.message}`)}let w={preview:[]},y="";try{for(let[t,s]of n.entries()){y=t,console.log(`Applying migration: ${t}`),await (0,l.writeFile)(c.join(r,t),s,"utf8");let a=require("crypto").createHash("sha256").update(s).digest("hex");console.log(`Recording migration: ${t} with checksum ${a}`),await (0,m.CM)(e,o,{name:t,checksum:a},i,!1),await (0,g.KK)(e,o,s,i,!1),w.preview.push({migration:t,action:"applied"})}}catch(e){throw Error(`Error applying migration ${y}: ${e.message}`)}console.log("Replacing main migrations folder with staged files...");let h=await (0,l.readdir)(r).catch(()=>[]);if(h.length)for(let e of h)console.log(`Deleting local migration file: ${e}`),await (0,l.unlink)(c.join(r,e));for(let[e,t]of n.entries())console.log(`Copying staged file ${e} to main migrations folder`),await (0,l.writeFile)(c.join(r,e),t,"utf8");return console.log("Pull migration applied successfully."),{appliedMigrations:Array.from(n.keys()),details:w}}catch(e){throw console.error("Pull migration error:",e),e}}async function f(e){try{let{accountId:r,apiToken:t}=await e.json(),o=process.env.D1_PROJECT_DIR;if(!o)return n.NextResponse.json({success:!1,error:{type:g.wU.VALIDATION_ERROR,message:"Project directory not configured"}},{status:500});let i=await (0,p.S)(o);if(!i||!i.config)return n.NextResponse.json({success:!1,error:{type:g.wU.VALIDATION_ERROR,message:"Could not find Wrangler configuration"}},{status:400});let s=i.config;if(!s.d1_databases?.length)return n.NextResponse.json({success:!1,error:{type:g.wU.VALIDATION_ERROR,message:"No D1 databases configured"}},{status:400});let a=s.d1_databases[0].database_name,l=await d(o,r,t,a);return n.NextResponse.json({success:!0,message:"Pull migrations applied successfully",details:l})}catch(e){return console.error("Pull remote confirm error:",e),n.NextResponse.json({success:!1,error:{type:e.type||g.wU.EXECUTION_ERROR,message:e.message||"Failed to apply pull migrations",details:e.details||{suggestions:["Check your Cloudflare credentials","Verify database permissions","Ensure all migration files are accessible"]}}},{status:500})}}async function w(){return new n.NextResponse(null,{status:204})}let y=new i.AppRouteRouteModule({definition:{kind:s.RouteKind.APP_ROUTE,page:"/api/pull-remote/confirm/route",pathname:"/api/pull-remote/confirm",filename:"route",bundlePath:"app/api/pull-remote/confirm/route"},resolvedPagePath:"/Users/karenredona/Desktop/d1studio/src/app/api/pull-remote/confirm/route.js",nextConfigOutput:"",userland:o}),{workAsyncStorage:h,workUnitAsyncStorage:x,serverHooks:R}=y;function E(){return(0,a.patchFetch)({workAsyncStorage:h,workUnitAsyncStorage:x})}}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),o=r.X(0,[638,973,801],()=>t(9556));module.exports=o})();
1
+ "use strict";(()=>{var e={};e.id=223,e.ids=[223],e.modules={846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},9748:e=>{e.exports=require("fs/promises")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},3997:e=>{e.exports=require("tty")},8354:e=>{e.exports=require("util")},3024:e=>{e.exports=require("node:fs")},6760:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},3136:e=>{e.exports=require("node:url")},9556:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>E,routeModule:()=>y,serverHooks:()=>R,workAsyncStorage:()=>h,workUnitAsyncStorage:()=>x});var o={};t.r(o),t.d(o,{OPTIONS:()=>w,POST:()=>f});var i=t(2706),s=t(8203),a=t(5994),n=t(9187),l=t(9748),c=t(3873),p=t(5949),g=t(9421),u=t(4218),m=t(961);async function d(e,r,t,o){let i={...process.env,CLOUDFLARE_API_TOKEN:t,CLOUDFLARE_ACCOUNT_ID:r};try{let r=c.join(e,"migrations"),t=c.join(e,"migrations-temp");await (0,l.mkdir)(r,{recursive:!0}),await (0,l.mkdir)(t,{recursive:!0});let s=await (0,l.readdir)(t).catch(()=>[]);await Promise.all(s.map(e=>(0,l.unlink)(c.join(t,e)))),console.log("Fetching remote migration metadata...");let a=await (0,m.GS)(e,o,i);console.log("Remote migration metadata:",a),console.log("Fetching migration file content from remote...");let n=new Map;for(let r of a)try{let s=r.name,a=await (0,g.sP)(e,o,s,i);n.set(s,a),console.log(`Staged migration file: ${s}`),await (0,l.writeFile)(c.join(t,s),a,"utf8")}catch(e){throw console.error(`Error fetching content for migration ${r.name}:`,e),Error(`Failed to fetch migration file content for ${r.name}`)}console.log("Fetching local schema for destructive update...");let p=await (0,u.ZX)(e,o,i,!1),d=p.filter(e=>"table"===e.type&&e.name&&"if"!==e.name.toLowerCase());console.log("Local table schema:",d);let f=d.length>0?(0,u.IC)(d.map(e=>({tableName:e.name,sql:e.sql,type:e.type}))):[];console.log("Computed drop order:",f),console.log("Beginning destructive update...");try{for(let r of(console.log("Disabling foreign keys..."),await (0,g.KK)(e,o,"PRAGMA foreign_keys=OFF;",i,!1),p.filter(e=>"trigger"===e.type)))console.log(`Dropping trigger: ${r.name}`),await (0,g.KK)(e,o,(0,g.z6)(`DROP TRIGGER IF EXISTS ${r.name}`),i,!1);for(let r of p.filter(e=>"index"===e.type))console.log(`Dropping index: ${r.name}`),await (0,g.KK)(e,o,(0,g.z6)(`DROP INDEX IF EXISTS ${r.name}`),i,!1);for(let r of f.reverse())console.log(`Dropping table: ${r}`),await (0,g.KK)(e,o,(0,g.z6)(`DROP TABLE IF EXISTS ${r}`),i,!1);console.log("Re-enabling foreign keys..."),await (0,g.KK)(e,o,"PRAGMA foreign_keys=ON;",i,!1)}catch(e){throw Error(`Error dropping existing objects: ${e.message}`)}try{console.log("Resetting local migrations table..."),await (0,m.k0)(e,o,"local",!0)}catch(e){throw Error(`Error resetting migrations table: ${e.message}`)}let w={preview:[]},y="";try{for(let[t,s]of n.entries()){y=t,console.log(`Applying migration: ${t}`),await (0,l.writeFile)(c.join(r,t),s,"utf8");let a=require("crypto").createHash("sha256").update(s).digest("hex");console.log(`Recording migration: ${t} with checksum ${a}`),await (0,m.CM)(e,o,{name:t,checksum:a},i,!1),await (0,g.KK)(e,o,s,i,!1),w.preview.push({migration:t,action:"applied"})}}catch(e){throw Error(`Error applying migration ${y}: ${e.message}`)}console.log("Replacing main migrations folder with staged files...");let h=await (0,l.readdir)(r).catch(()=>[]);if(h.length)for(let e of h)console.log(`Deleting local migration file: ${e}`),await (0,l.unlink)(c.join(r,e));for(let[e,t]of n.entries())console.log(`Copying staged file ${e} to main migrations folder`),await (0,l.writeFile)(c.join(r,e),t,"utf8");return console.log("Pull migration applied successfully."),{appliedMigrations:Array.from(n.keys()),details:w}}catch(e){throw console.error("Pull migration error:",e),e}}async function f(e){try{let{accountId:r,apiToken:t}=await e.json(),o=process.env.D1_PROJECT_DIR;if(!o)return n.NextResponse.json({success:!1,error:{type:g.wU.VALIDATION_ERROR,message:"Project directory not configured"}},{status:500});let i=await (0,p.S)(o);if(!i||!i.config)return n.NextResponse.json({success:!1,error:{type:g.wU.VALIDATION_ERROR,message:"Could not find Wrangler configuration"}},{status:400});let s=i.config;if(!s.d1_databases?.length)return n.NextResponse.json({success:!1,error:{type:g.wU.VALIDATION_ERROR,message:"No D1 databases configured"}},{status:400});let a=s.d1_databases[0].database_name,l=await d(o,r,t,a);return n.NextResponse.json({success:!0,message:"Pull migrations applied successfully",details:l})}catch(e){return console.error("Pull remote confirm error:",e),n.NextResponse.json({success:!1,error:{type:e.type||g.wU.EXECUTION_ERROR,message:e.message||"Failed to apply pull migrations",details:e.details||{suggestions:["Check your Cloudflare credentials","Verify database permissions","Ensure all migration files are accessible"]}}},{status:500})}}async function w(){return new n.NextResponse(null,{status:204})}let y=new i.AppRouteRouteModule({definition:{kind:s.RouteKind.APP_ROUTE,page:"/api/pull-remote/confirm/route",pathname:"/api/pull-remote/confirm",filename:"route",bundlePath:"app/api/pull-remote/confirm/route"},resolvedPagePath:"/Users/karenredona/Desktop/d1studio/src/app/api/pull-remote/confirm/route.js",nextConfigOutput:"",userland:o}),{workAsyncStorage:h,workUnitAsyncStorage:x,serverHooks:R}=y;function E(){return(0,a.patchFetch)({workAsyncStorage:h,workUnitAsyncStorage:x})}}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),o=r.X(0,[638,973,801],()=>t(9556));module.exports=o})();
@@ -1 +1 @@
1
- "use strict";(()=>{var e={};e.id=399,e.ids=[399],e.modules={846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},9748:e=>{e.exports=require("fs/promises")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},3997:e=>{e.exports=require("tty")},8354:e=>{e.exports=require("util")},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")},6216:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>f,routeModule:()=>m,serverHooks:()=>v,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>R});var s={};t.r(s),t.d(s,{OPTIONS:()=>g,POST:()=>x});var o=t(2706),a=t(8203),n=t(5994),i=t(9187),p=t(5949),u=t(9421),l=t(4218),c=t(961);async function d(e,r,t,s){let o={...process.env,CLOUDFLARE_API_TOKEN:t,CLOUDFLARE_ACCOUNT_ID:r};try{let r=await (0,l.ZX)(e,s,o,!0),t=await (0,c.GS)(e,s,o),a=(0,l.IC)(r),n={preview:[],totalTables:r.length,totalMigrations:t.length};return a.forEach((e,t)=>{r.find(r=>r.name===e)&&n.preview.push({name:e,type:"table",action:"will be created",order:t+1})}),t.forEach(e=>{n.preview.push({name:e.name,type:"migration",action:"will be tracked"})}),n}catch(e){throw console.error("Pull preview generation error:",e),e}}async function x(e){try{let{accountId:r,apiToken:t}=await e.json(),s=process.env.D1_PROJECT_DIR;if(!s)return i.NextResponse.json({success:!1,error:{type:u.wU.VALIDATION_ERROR,message:"Project directory not configured"}},{status:500});let o=await (0,p.S)(s);if(!o||!o.config)return i.NextResponse.json({success:!1,error:{type:u.wU.VALIDATION_ERROR,message:"Could not find Wrangler configuration"}},{status:400});let a=o.config;if(!a.d1_databases?.length)return i.NextResponse.json({success:!1,error:{type:u.wU.VALIDATION_ERROR,message:"No D1 databases configured"}},{status:400});let n=a.d1_databases[0].database_name,l=await d(s,r,t,n);return i.NextResponse.json({success:!0,message:"Pull migration preview generated",details:l})}catch(e){return console.error("Pull remote preview error:",e),i.NextResponse.json({success:!1,error:{type:e.type||u.wU.EXECUTION_ERROR,message:e.message||"Failed to generate pull migration preview",details:e.details}},{status:500})}}async function g(){return new i.NextResponse(null,{status:204})}let m=new o.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/pull-remote/preview/route",pathname:"/api/pull-remote/preview",filename:"route",bundlePath:"app/api/pull-remote/preview/route"},resolvedPagePath:"/Users/karenredona/Desktop/d1studio/src/app/api/pull-remote/preview/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:w,workUnitAsyncStorage:R,serverHooks:v}=m;function f(){return(0,n.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:R})}}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[638,973,801],()=>t(6216));module.exports=s})();
1
+ "use strict";(()=>{var e={};e.id=399,e.ids=[399],e.modules={846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},9748:e=>{e.exports=require("fs/promises")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},3997:e=>{e.exports=require("tty")},8354:e=>{e.exports=require("util")},3024:e=>{e.exports=require("node:fs")},6760:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},3136:e=>{e.exports=require("node:url")},6216:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>f,routeModule:()=>m,serverHooks:()=>v,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>R});var s={};t.r(s),t.d(s,{OPTIONS:()=>g,POST:()=>x});var o=t(2706),a=t(8203),n=t(5994),i=t(9187),p=t(5949),u=t(9421),l=t(4218),c=t(961);async function d(e,r,t,s){let o={...process.env,CLOUDFLARE_API_TOKEN:t,CLOUDFLARE_ACCOUNT_ID:r};try{let r=await (0,l.ZX)(e,s,o,!0),t=await (0,c.GS)(e,s,o),a=(0,l.IC)(r),n={preview:[],totalTables:r.length,totalMigrations:t.length};return a.forEach((e,t)=>{r.find(r=>r.name===e)&&n.preview.push({name:e,type:"table",action:"will be created",order:t+1})}),t.forEach(e=>{n.preview.push({name:e.name,type:"migration",action:"will be tracked"})}),n}catch(e){throw console.error("Pull preview generation error:",e),e}}async function x(e){try{let{accountId:r,apiToken:t}=await e.json(),s=process.env.D1_PROJECT_DIR;if(!s)return i.NextResponse.json({success:!1,error:{type:u.wU.VALIDATION_ERROR,message:"Project directory not configured"}},{status:500});let o=await (0,p.S)(s);if(!o||!o.config)return i.NextResponse.json({success:!1,error:{type:u.wU.VALIDATION_ERROR,message:"Could not find Wrangler configuration"}},{status:400});let a=o.config;if(!a.d1_databases?.length)return i.NextResponse.json({success:!1,error:{type:u.wU.VALIDATION_ERROR,message:"No D1 databases configured"}},{status:400});let n=a.d1_databases[0].database_name,l=await d(s,r,t,n);return i.NextResponse.json({success:!0,message:"Pull migration preview generated",details:l})}catch(e){return console.error("Pull remote preview error:",e),i.NextResponse.json({success:!1,error:{type:e.type||u.wU.EXECUTION_ERROR,message:e.message||"Failed to generate pull migration preview",details:e.details}},{status:500})}}async function g(){return new i.NextResponse(null,{status:204})}let m=new o.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/pull-remote/preview/route",pathname:"/api/pull-remote/preview",filename:"route",bundlePath:"app/api/pull-remote/preview/route"},resolvedPagePath:"/Users/karenredona/Desktop/d1studio/src/app/api/pull-remote/preview/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:w,workUnitAsyncStorage:R,serverHooks:v}=m;function f(){return(0,n.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:R})}}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[638,973,801],()=>t(6216));module.exports=s})();
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var e={};e.id=680,e.ids=[680],e.modules={846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},9748:e=>{e.exports=require("fs/promises")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},3997:e=>{e.exports=require("tty")},8354:e=>{e.exports=require("util")},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")},7628:(e,r,s)=>{s.r(r),s.d(r,{patchFetch:()=>N,routeModule:()=>R,serverHooks:()=>x,workAsyncStorage:()=>g,workUnitAsyncStorage:()=>h});var t={};s.r(t),s.d(t,{OPTIONS:()=>T,POST:()=>E});var a=s(2706),i=s(8203),o=s(5994),n=s(9187),p=s(9748),d=s(3873),u=s(5949),l=s(9421),c=s(961);async function m(e,r,s,t,a=!1){let i={...process.env,CLOUDFLARE_ACCOUNT_ID:r,CLOUDFLARE_API_TOKEN:s};try{let r=`
1
+ "use strict";(()=>{var e={};e.id=680,e.ids=[680],e.modules={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")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},9748:e=>{e.exports=require("fs/promises")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},3997:e=>{e.exports=require("tty")},8354:e=>{e.exports=require("util")},3024:e=>{e.exports=require("node:fs")},6760:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},3136:e=>{e.exports=require("node:url")},7628:(e,r,s)=>{s.r(r),s.d(r,{patchFetch:()=>N,routeModule:()=>R,serverHooks:()=>x,workAsyncStorage:()=>g,workUnitAsyncStorage:()=>h});var t={};s.r(t),s.d(t,{OPTIONS:()=>T,POST:()=>E});var a=s(2706),i=s(8203),o=s(5994),n=s(9187),p=s(9748),d=s(3873),u=s(5949),l=s(9421),c=s(961);async function m(e,r,s,t,a=!1){let i={...process.env,CLOUDFLARE_ACCOUNT_ID:r,CLOUDFLARE_API_TOKEN:s};try{let r=`
2
2
  CREATE TABLE IF NOT EXISTS d1_migrations (
3
3
  id INTEGER PRIMARY KEY AUTOINCREMENT,
4
4
  name TEXT NOT NULL UNIQUE,
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var e={};e.id=868,e.ids=[868],e.modules={846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},9748:e=>{e.exports=require("fs/promises")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},3997:e=>{e.exports=require("tty")},8354:e=>{e.exports=require("util")},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")},9330:(e,r,s)=>{s.r(r),s.d(r,{patchFetch:()=>x,routeModule:()=>m,serverHooks:()=>h,workAsyncStorage:()=>g,workUnitAsyncStorage:()=>w});var t={};s.r(t),s.d(t,{OPTIONS:()=>T,POST:()=>R});var a=s(2706),o=s(8203),i=s(5994),n=s(9187),p=s(9748),u=s(3873),d=s(5949),l=s(9421),c=s(961);async function E(e,r,s,t,a=!0){let o={...process.env,CLOUDFLARE_ACCOUNT_ID:r,CLOUDFLARE_API_TOKEN:s};try{let r=`
1
+ "use strict";(()=>{var e={};e.id=868,e.ids=[868],e.modules={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")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},9748:e=>{e.exports=require("fs/promises")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},3997:e=>{e.exports=require("tty")},8354:e=>{e.exports=require("util")},3024:e=>{e.exports=require("node:fs")},6760:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},3136:e=>{e.exports=require("node:url")},9330:(e,r,s)=>{s.r(r),s.d(r,{patchFetch:()=>x,routeModule:()=>m,serverHooks:()=>h,workAsyncStorage:()=>g,workUnitAsyncStorage:()=>w});var t={};s.r(t),s.d(t,{OPTIONS:()=>T,POST:()=>R});var a=s(2706),o=s(8203),i=s(5994),n=s(9187),p=s(9748),u=s(3873),d=s(5949),l=s(9421),c=s(961);async function E(e,r,s,t,a=!0){let o={...process.env,CLOUDFLARE_ACCOUNT_ID:r,CLOUDFLARE_API_TOKEN:s};try{let r=`
2
2
  CREATE TABLE IF NOT EXISTS d1_migrations (
3
3
  id INTEGER PRIMARY KEY AUTOINCREMENT,
4
4
  name TEXT NOT NULL UNIQUE,
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var e={};e.id=58,e.ids=[58],e.modules={846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},9748:e=>{e.exports=require("fs/promises")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},3997:e=>{e.exports=require("tty")},8354:e=>{e.exports=require("util")},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")},5999:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>g,routeModule:()=>E,serverHooks:()=>T,workAsyncStorage:()=>N,workUnitAsyncStorage:()=>O});var s={};t.r(s),t.d(s,{OPTIONS:()=>p,POST:()=>R});var o=t(2706),n=t(8203),a=t(5994),i=t(9187),l=t(5949),c=t(9421),d=t(961);let u={SYNTAX_ERROR:"SYNTAX_ERROR",EXECUTION_ERROR:"EXECUTION_ERROR",TABLE_NOT_FOUND:"TABLE_NOT_FOUND",TABLE_EXISTS:"TABLE_EXISTS",FOREIGN_KEY_ERROR:"FOREIGN_KEY_ERROR",UNIQUE_CONSTRAINT_ERROR:"UNIQUE_CONSTRAINT_ERROR",NOT_NULL_CONSTRAINT_ERROR:"NOT_NULL_CONSTRAINT_ERROR",CHECK_CONSTRAINT_ERROR:"CHECK_CONSTRAINT_ERROR",UNKNOWN_ERROR:"UNKNOWN_ERROR"};async function R(e){try{let r;let t=process.env.D1_PROJECT_DIR;if(!t)return i.NextResponse.json({error:"Project directory not configured"},{status:500});let{query:s}=await e.json();if(console.log("Received query:",s),!s?.trim())return i.NextResponse.json({success:!1,error:{message:"Query cannot be empty"}},{status:400});let o=await (0,l.S)(t);if(!o||!o.config)return i.NextResponse.json({success:!1,error:{message:"No Wrangler configuration file found"}},{status:404});let n=o.config;if(!n.d1_databases?.length)return i.NextResponse.json({success:!1,error:{message:"No D1 databases configured"}},{status:404});let a=n.d1_databases[0].database_name;console.log("Using database:",a);let u=(0,c.mA)(s);if(console.log("Parsed statements:",u),!u.length)return i.NextResponse.json({success:!1,error:{message:"No valid SQL statements found"}},{status:400});u=u.map(c.Gq),console.log("Validated statements:",u);let R=`
1
+ "use strict";(()=>{var e={};e.id=58,e.ids=[58],e.modules={846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},9748:e=>{e.exports=require("fs/promises")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},3997:e=>{e.exports=require("tty")},8354:e=>{e.exports=require("util")},3024:e=>{e.exports=require("node:fs")},6760:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},3136:e=>{e.exports=require("node:url")},5999:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>g,routeModule:()=>E,serverHooks:()=>T,workAsyncStorage:()=>N,workUnitAsyncStorage:()=>O});var s={};t.r(s),t.d(s,{OPTIONS:()=>p,POST:()=>R});var o=t(2706),n=t(8203),a=t(5994),i=t(9187),l=t(5949),c=t(9421),d=t(961);let u={SYNTAX_ERROR:"SYNTAX_ERROR",EXECUTION_ERROR:"EXECUTION_ERROR",TABLE_NOT_FOUND:"TABLE_NOT_FOUND",TABLE_EXISTS:"TABLE_EXISTS",FOREIGN_KEY_ERROR:"FOREIGN_KEY_ERROR",UNIQUE_CONSTRAINT_ERROR:"UNIQUE_CONSTRAINT_ERROR",NOT_NULL_CONSTRAINT_ERROR:"NOT_NULL_CONSTRAINT_ERROR",CHECK_CONSTRAINT_ERROR:"CHECK_CONSTRAINT_ERROR",UNKNOWN_ERROR:"UNKNOWN_ERROR"};async function R(e){try{let r;let t=process.env.D1_PROJECT_DIR;if(!t)return i.NextResponse.json({error:"Project directory not configured"},{status:500});let{query:s}=await e.json();if(console.log("Received query:",s),!s?.trim())return i.NextResponse.json({success:!1,error:{message:"Query cannot be empty"}},{status:400});let o=await (0,l.S)(t);if(!o||!o.config)return i.NextResponse.json({success:!1,error:{message:"No Wrangler configuration file found"}},{status:404});let n=o.config;if(!n.d1_databases?.length)return i.NextResponse.json({success:!1,error:{message:"No D1 databases configured"}},{status:404});let a=n.d1_databases[0].database_name;console.log("Using database:",a);let u=(0,c.mA)(s);if(console.log("Parsed statements:",u),!u.length)return i.NextResponse.json({success:!1,error:{message:"No valid SQL statements found"}},{status:400});u=u.map(c.Gq),console.log("Validated statements:",u);let R=`
2
2
  CREATE TABLE IF NOT EXISTS d1_migrations (
3
3
  id INTEGER PRIMARY KEY AUTOINCREMENT,
4
4
  name TEXT NOT NULL UNIQUE,
@@ -1,4 +1,4 @@
1
- (()=>{var e={};e.id=175,e.ids=[175],e.modules={846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9646:e=>{"use strict";e.exports=require("child_process")},9748:e=>{"use strict";e.exports=require("fs/promises")},1820:e=>{"use strict";e.exports=require("os")},7910:e=>{"use strict";e.exports=require("stream")},3997:e=>{"use strict";e.exports=require("tty")},8354:e=>{"use strict";e.exports=require("util")},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")},2616:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>N,routeModule:()=>q,serverHooks:()=>j,workAsyncStorage:()=>E,workUnitAsyncStorage:()=>P});var s={};t.r(s),t.d(s,{GET:()=>x,OPTIONS:()=>y,dynamic:()=>m,runtime:()=>f});var o=t(2706),n=t(8203),a=t(5994),i=t(9187),u=t(8354),c=t(9646),l=t(5949);class p{constructor(){this.queue=[],this.isProcessing=!1}async add(e){return new Promise((r,t)=>{this.queue.push({operation:e,resolve:r,reject:t}),this.processNext()})}async processNext(){if(this.isProcessing||0===this.queue.length)return;this.isProcessing=!0;let{operation:e,resolve:r,reject:t}=this.queue.shift();try{let t=await e();r(t)}catch(e){t(e)}finally{this.isProcessing=!1,this.processNext()}}}let d=new p,g=(0,u.promisify)(c.exec),f="nodejs",m="force-dynamic",h=!1;async function w(e,r,t){try{for(;h;)await new Promise(e=>setTimeout(e,100));h=!0;let{stdout:s}=await g(`wrangler d1 execute ${t} --local --command="${e.replace(/"/g,'\\"')}" --json`,{cwd:r}),o=JSON.parse(s);return o[0]?.results||[]}catch(e){throw console.error("Query execution error:",e),e}finally{h=!1}}async function x(e,r){return d.add(async()=>{try{let{name:t}=await r.params,{searchParams:s}=new URL(e.url),o=parseInt(s.get("page"))||1,n=parseInt(s.get("limit"))||50,a=(o-1)*n,u=process.env.D1_PROJECT_DIR;if(!u)throw Error("Project directory not configured");let c=await (0,l.S)(u);if(!c||!c.config)throw Error("No Wrangler configuration file found");let p=c.config;if(!p.d1_databases?.length)throw Error("No D1 databases configured");let d=p.d1_databases[0].database_name,g=`PRAGMA table_info(${t});`,f=await w(g,u,d),m=`SELECT sql FROM sqlite_master WHERE type='table' AND name='${t}';`,h=await w(m,u,d),x=h[0]?.sql||"",y=function(e){let r;let t={},s=/CHECK\s*\(\s*(\w+)\s+IN\s*\((.*?)\)\s*\)/gi;for(;null!==(r=s.exec(e));){let e=r[1],s=r[2].split(",").map(e=>e.trim().replace(/^'|'$/g,""));t[e]=s}return t}(x),q=f.map(e=>({...e,check:y[e.name]||null})),E=`SELECT COUNT(*) as total FROM ${t};`,P=await w(E,u,d),j=P[0]?.total||0,N=f.find(e=>1===e.pk)?.name||f[0]?.name,R=`
1
+ (()=>{var e={};e.id=175,e.ids=[175],e.modules={846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9646:e=>{"use strict";e.exports=require("child_process")},9748:e=>{"use strict";e.exports=require("fs/promises")},1820:e=>{"use strict";e.exports=require("os")},7910:e=>{"use strict";e.exports=require("stream")},3997:e=>{"use strict";e.exports=require("tty")},8354:e=>{"use strict";e.exports=require("util")},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")},2616:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>N,routeModule:()=>q,serverHooks:()=>j,workAsyncStorage:()=>E,workUnitAsyncStorage:()=>P});var s={};t.r(s),t.d(s,{GET:()=>x,OPTIONS:()=>y,dynamic:()=>m,runtime:()=>f});var o=t(2706),n=t(8203),a=t(5994),i=t(9187),u=t(8354),c=t(9646),l=t(5949);class p{constructor(){this.queue=[],this.isProcessing=!1}async add(e){return new Promise((r,t)=>{this.queue.push({operation:e,resolve:r,reject:t}),this.processNext()})}async processNext(){if(this.isProcessing||0===this.queue.length)return;this.isProcessing=!0;let{operation:e,resolve:r,reject:t}=this.queue.shift();try{let t=await e();r(t)}catch(e){t(e)}finally{this.isProcessing=!1,this.processNext()}}}let d=new p,g=(0,u.promisify)(c.exec),f="nodejs",m="force-dynamic",h=!1;async function w(e,r,t){try{for(;h;)await new Promise(e=>setTimeout(e,100));h=!0;let{stdout:s}=await g(`wrangler d1 execute ${t} --local --command="${e.replace(/"/g,'\\"')}" --json`,{cwd:r}),o=JSON.parse(s);return o[0]?.results||[]}catch(e){throw console.error("Query execution error:",e),e}finally{h=!1}}async function x(e,r){return d.add(async()=>{try{let{name:t}=await r.params,{searchParams:s}=new URL(e.url),o=parseInt(s.get("page"))||1,n=parseInt(s.get("limit"))||50,a=(o-1)*n,u=process.env.D1_PROJECT_DIR;if(!u)throw Error("Project directory not configured");let c=await (0,l.S)(u);if(!c||!c.config)throw Error("No Wrangler configuration file found");let p=c.config;if(!p.d1_databases?.length)throw Error("No D1 databases configured");let d=p.d1_databases[0].database_name,g=`PRAGMA table_info(${t});`,f=await w(g,u,d),m=`SELECT sql FROM sqlite_master WHERE type='table' AND name='${t}';`,h=await w(m,u,d),x=h[0]?.sql||"",y=function(e){let r;let t={},s=/CHECK\s*\(\s*(\w+)\s+IN\s*\((.*?)\)\s*\)/gi;for(;null!==(r=s.exec(e));){let e=r[1],s=r[2].split(",").map(e=>e.trim().replace(/^'|'$/g,""));t[e]=s}return t}(x),q=f.map(e=>({...e,check:y[e.name]||null})),E=`SELECT COUNT(*) as total FROM ${t};`,P=await w(E,u,d),j=P[0]?.total||0,N=f.find(e=>1===e.pk)?.name||f[0]?.name,R=`
2
2
  SELECT * FROM ${t}
3
3
  ORDER BY ${N} DESC
4
4
  LIMIT ${n} OFFSET ${a};
@@ -1,4 +1,4 @@
1
- (()=>{var e={};e.id=761,e.ids=[761],e.modules={846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9646:e=>{"use strict";e.exports=require("child_process")},9748:e=>{"use strict";e.exports=require("fs/promises")},1820:e=>{"use strict";e.exports=require("os")},7910:e=>{"use strict";e.exports=require("stream")},3997:e=>{"use strict";e.exports=require("tty")},8354:e=>{"use strict";e.exports=require("util")},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")},8343:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>y,routeModule:()=>m,serverHooks:()=>h,workAsyncStorage:()=>x,workUnitAsyncStorage:()=>w});var s={};t.r(s),t.d(s,{GET:()=>g,OPTIONS:()=>f});var o=t(2706),n=t(8203),a=t(5994),i=t(9187),u=t(8354),l=t(9646),c=t(5949);let d=(0,u.promisify)(l.exec);async function p(e,r=3,t=1e3){for(let s=0;s<r;s++)try{return await e()}catch(e){if(s===r-1)throw e;if(e.message.includes("database is locked")){console.log(`Database locked, retrying in ${t}ms... (attempt ${s+1}/${r})`),await new Promise(e=>setTimeout(e,t));continue}throw e}}async function g(){try{var e;let r=process.env.D1_PROJECT_DIR;if(!r)return console.error("D1_PROJECT_DIR environment variable is not set"),i.NextResponse.json({error:"Project directory not configured"},{status:500});let t=await (0,c.S)(r);if(!t||!t.config)return i.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let s=t.config;if(!s.d1_databases?.length)return i.NextResponse.json({error:"No D1 databases configured in Wrangler configuration"},{status:404});let o=s.d1_databases[0].database_name,n=`
1
+ (()=>{var e={};e.id=761,e.ids=[761],e.modules={846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9646:e=>{"use strict";e.exports=require("child_process")},9748:e=>{"use strict";e.exports=require("fs/promises")},1820:e=>{"use strict";e.exports=require("os")},7910:e=>{"use strict";e.exports=require("stream")},3997:e=>{"use strict";e.exports=require("tty")},8354:e=>{"use strict";e.exports=require("util")},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")},8343:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>y,routeModule:()=>m,serverHooks:()=>h,workAsyncStorage:()=>x,workUnitAsyncStorage:()=>w});var s={};t.r(s),t.d(s,{GET:()=>g,OPTIONS:()=>f});var o=t(2706),n=t(8203),a=t(5994),i=t(9187),u=t(8354),l=t(9646),c=t(5949);let d=(0,u.promisify)(l.exec);async function p(e,r=3,t=1e3){for(let s=0;s<r;s++)try{return await e()}catch(e){if(s===r-1)throw e;if(e.message.includes("database is locked")){console.log(`Database locked, retrying in ${t}ms... (attempt ${s+1}/${r})`),await new Promise(e=>setTimeout(e,t));continue}throw e}}async function g(){try{var e;let r=process.env.D1_PROJECT_DIR;if(!r)return console.error("D1_PROJECT_DIR environment variable is not set"),i.NextResponse.json({error:"Project directory not configured"},{status:500});let t=await (0,c.S)(r);if(!t||!t.config)return i.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let s=t.config;if(!s.d1_databases?.length)return i.NextResponse.json({error:"No D1 databases configured in Wrangler configuration"},{status:404});let o=s.d1_databases[0].database_name,n=`
2
2
  SELECT name FROM sqlite_master
3
3
  WHERE type='table'
4
4
  AND name NOT LIKE 'sqlite_%'
@@ -1,3 +1,3 @@
1
1
  <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/569ce4b8f30dc480-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/93f479601ee12b01-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/c51a7ef325e30c16.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-c76ac1e586b2802a.js"/><script src="/_next/static/chunks/4bd1b696-8c908eb707f85a27.js" async=""></script><script src="/_next/static/chunks/517-3b698a5d3da06ff7.js" async=""></script><script src="/_next/static/chunks/main-app-d36cdfb402b40f13.js" async=""></script><script src="/_next/static/chunks/692-ede418e1d28a1394.js" async=""></script><script src="/_next/static/chunks/92-c4466e0f1ca8a3a8.js" async=""></script><script src="/_next/static/chunks/735-c9144179c6bd7d06.js" async=""></script><script src="/_next/static/chunks/app/layout-8360fab69b848283.js" async=""></script><script src="/_next/static/chunks/422-6fa3c14fc64ad67b.js" async=""></script><script src="/_next/static/chunks/app/page-75081ac7a88cb706.js" async=""></script><meta name="next-size-adjust" content=""/><title>d1-studio</title><meta name="description" content="Native D1 database studio."/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_4d318d __variable_ea5f4b antialiased"><div class="flex h-screen bg-background"><aside class="w-64 border-r flex-shrink-0 bg-neutral-50 p-4"><div class="font-sans"><div class="flex items-center gap-2 mb-6"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-table2 h-5 w-5"><path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"></path></svg><span class="font-mono font-bold text-sm">d1-studio</span></div><div class="flex items-center justify-between mb-6"><div><div class="text-xs text-muted-foreground mb-1">Database name</div><div class="font-semibold text-sm">No database found</div></div><button type="button" role="combobox" aria-controls="radix-:R9lbrb:" aria-expanded="false" aria-autocomplete="none" dir="ltr" data-state="closed" class="flex h-9 items-center justify-between whitespace-nowrap rounded-md border px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&amp;&gt;span]:line-clamp-1 w-[104px] bg-white border-neutral-200 font-medium"><div class="flex items-center gap-1 text-sm"><span style="pointer-events:none"></span></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down h-4 w-4 opacity-50" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></button><select aria-hidden="true" tabindex="-1" style="position:absolute;border:0;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;word-wrap:normal"></select></div><div class="mb-6"><button class="w-full flex items-center gap-x-1 border rounded-md text-sm font-medium transition-colors px-2 py-2
2
2
  bg-neutral-900 text-white"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-square-terminal h-[16px] w-[16px]"><path d="m7 11 2-2-2-2"></path><path d="M11 13h4"></path><rect width="18" height="18" x="3" y="3" rx="2" ry="2"></rect></svg>SQL editor</button></div><div class="relative mb-6 bg-white"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-search absolute left-2 top-2.5 h-4 w-4 text-neutral-500"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.3-4.3"></path></svg><input class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm pl-7" placeholder="Search tables" value=""/></div><div><div class="flex items-center justify-between mb-1"><h3 class="text-sm font-medium text-muted-foreground">Tables </h3><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-loader-circle h-4 w-4 animate-spin text-muted-foreground"><path d="M21 12a9 9 0 1 1-6.219-8.56"></path></svg></div><div class="space-y-1 font-sans"></div></div></div></aside><main class="flex-1 overflow-hidden"><div class="h-full flex flex-col bg-white text-neutral-900 font-sans"><div class="px-4 py-2 bg-neutral-100 border-b flex items-center gap-4"><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&amp;_svg]:pointer-events-none [&amp;_svg]:size-4 [&amp;_svg]:shrink-0 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-8 rounded-md px-3 text-xs" type="button" id="radix-:R5jrb:" aria-haspopup="menu" aria-expanded="false" data-state="closed">Query Templates<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down ml-2 h-4 w-4"><path d="m6 9 6 6 6-6"></path></svg></button></div><div class="relative pt-2 overflow-hidden" style="height:300px;min-height:100px"><section style="display:flex;position:relative;text-align:initial;width:100%;height:100%"><div style="display:flex;height:100%;width:100%;justify-content:center;align-items:center">Loading...</div><div style="width:100%;display:none"></div></section></div><div class="relative h-0.5 cursor-row-resize bg-neutral-200 group hover:bg-neutral-300"><div class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-neutral-900 rounded-sm px-0.5
3
- invisible group-hover:visible"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-grip-horizontal h-3 w-3 text-white"><circle cx="12" cy="9" r="1"></circle><circle cx="19" cy="9" r="1"></circle><circle cx="5" cy="9" r="1"></circle><circle cx="12" cy="15" r="1"></circle><circle cx="19" cy="15" r="1"></circle><circle cx="5" cy="15" r="1"></circle></svg></div></div><div class="px-4 py-3 bg-neutral-100 border-b font-sans"><div class="flex justify-between items-center"><h3 class="text-sm font-medium">Results</h3><button class="justify-center whitespace-nowrap transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&amp;_svg]:pointer-events-none [&amp;_svg]:size-4 [&amp;_svg]:shrink-0 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-8 rounded-md px-3 flex items-center gap-1 text-sm font-medium">Run<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-command h-4 w-4"><path d="M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-corner-down-left h-4 w-4"><polyline points="9 10 4 15 9 20"></polyline><path d="M20 4v7a4 4 0 0 1-4 4H4"></path></svg></button></div></div><div class="flex-1 overflow-auto p-4 bg-white"><div class="text-sm text-neutral-500 font-sans">Run the query to see the results.</div></div></div></main></div><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div> <script src="/_next/static/chunks/webpack-c76ac1e586b2802a.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[33,[\"692\",\"static/chunks/692-ede418e1d28a1394.js\",\"92\",\"static/chunks/92-c4466e0f1ca8a3a8.js\",\"735\",\"static/chunks/735-c9144179c6bd7d06.js\",\"177\",\"static/chunks/app/layout-8360fab69b848283.js\"],\"DatabaseProvider\"]\n3:I[5244,[],\"\"]\n4:I[3866,[],\"\"]\n5:I[6124,[\"692\",\"static/chunks/692-ede418e1d28a1394.js\",\"92\",\"static/chunks/92-c4466e0f1ca8a3a8.js\",\"735\",\"static/chunks/735-c9144179c6bd7d06.js\",\"177\",\"static/chunks/app/layout-8360fab69b848283.js\"],\"Toaster\"]\n6:I[7033,[],\"ClientPageRoot\"]\n7:I[2624,[\"692\",\"static/chunks/692-ede418e1d28a1394.js\",\"422\",\"static/chunks/422-6fa3c14fc64ad67b.js\",\"735\",\"static/chunks/735-c9144179c6bd7d06.js\",\"974\",\"static/chunks/app/page-75081ac7a88cb706.js\"],\"default\"]\na:I[6213,[],\"OutletBoundary\"]\nc:I[6213,[],\"MetadataBoundary\"]\ne:I[6213,[],\"ViewportBoundary\"]\n10:I[4835,[],\"\"]\n:HL[\"/_next/static/media/569ce4b8f30dc480-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/93f479601ee12b01-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/c51a7ef325e30c16.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"_t0S4u4KzUwKctaxLKvx4\",\"p\":\"\",\"c\":[\"\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/c51a7ef325e30c16.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"__variable_4d318d __variable_ea5f4b antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[],[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],[\"$\",\"$L5\",null,{}],\" \"]}]}]}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L6\",null,{\"Component\":\"$7\",\"searchParams\":{},\"params\":{},\"promises\":[\"$@8\",\"$@9\"]}],null,[\"$\",\"$La\",null,{\"children\":\"$Lb\"}]]}],{},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$1\",\"YVCjSBsiVAmBGbqMoy6ZD\",{\"children\":[[\"$\",\"$Lc\",null,{\"children\":\"$Ld\"}],[\"$\",\"$Le\",null,{\"children\":\"$Lf\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$10\",\"$undefined\"],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:{}\n9:{}\n"])</script><script>self.__next_f.push([1,"f:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\nd:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"1\",{\"children\":\"d1-studio\"}],[\"$\",\"meta\",\"2\",{\"name\":\"description\",\"content\":\"Native D1 database studio.\"}]]\n"])</script><script>self.__next_f.push([1,"b:null\n"])</script></body></html>
3
+ invisible group-hover:visible"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-grip-horizontal h-3 w-3 text-white"><circle cx="12" cy="9" r="1"></circle><circle cx="19" cy="9" r="1"></circle><circle cx="5" cy="9" r="1"></circle><circle cx="12" cy="15" r="1"></circle><circle cx="19" cy="15" r="1"></circle><circle cx="5" cy="15" r="1"></circle></svg></div></div><div class="px-4 py-3 bg-neutral-100 border-b font-sans"><div class="flex justify-between items-center"><h3 class="text-sm font-medium">Results</h3><button class="justify-center whitespace-nowrap transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&amp;_svg]:pointer-events-none [&amp;_svg]:size-4 [&amp;_svg]:shrink-0 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-8 rounded-md px-3 flex items-center gap-1 text-sm font-medium">Run<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-command h-4 w-4"><path d="M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-corner-down-left h-4 w-4"><polyline points="9 10 4 15 9 20"></polyline><path d="M20 4v7a4 4 0 0 1-4 4H4"></path></svg></button></div></div><div class="flex-1 overflow-auto p-4 bg-white"><div class="text-sm text-neutral-500 font-sans">Run the query to see the results.</div></div></div></main></div><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div> <script src="/_next/static/chunks/webpack-c76ac1e586b2802a.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[33,[\"692\",\"static/chunks/692-ede418e1d28a1394.js\",\"92\",\"static/chunks/92-c4466e0f1ca8a3a8.js\",\"735\",\"static/chunks/735-c9144179c6bd7d06.js\",\"177\",\"static/chunks/app/layout-8360fab69b848283.js\"],\"DatabaseProvider\"]\n3:I[5244,[],\"\"]\n4:I[3866,[],\"\"]\n5:I[6124,[\"692\",\"static/chunks/692-ede418e1d28a1394.js\",\"92\",\"static/chunks/92-c4466e0f1ca8a3a8.js\",\"735\",\"static/chunks/735-c9144179c6bd7d06.js\",\"177\",\"static/chunks/app/layout-8360fab69b848283.js\"],\"Toaster\"]\n6:I[7033,[],\"ClientPageRoot\"]\n7:I[2624,[\"692\",\"static/chunks/692-ede418e1d28a1394.js\",\"422\",\"static/chunks/422-6fa3c14fc64ad67b.js\",\"735\",\"static/chunks/735-c9144179c6bd7d06.js\",\"974\",\"static/chunks/app/page-75081ac7a88cb706.js\"],\"default\"]\na:I[6213,[],\"OutletBoundary\"]\nc:I[6213,[],\"MetadataBoundary\"]\ne:I[6213,[],\"ViewportBoundary\"]\n10:I[4835,[],\"\"]\n:HL[\"/_next/static/media/569ce4b8f30dc480-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/93f479601ee12b01-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/c51a7ef325e30c16.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"YIuXI2CxMwg2fuuUEBsXL\",\"p\":\"\",\"c\":[\"\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/c51a7ef325e30c16.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"__variable_4d318d __variable_ea5f4b antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[],[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],[\"$\",\"$L5\",null,{}],\" \"]}]}]}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L6\",null,{\"Component\":\"$7\",\"searchParams\":{},\"params\":{},\"promises\":[\"$@8\",\"$@9\"]}],null,[\"$\",\"$La\",null,{\"children\":\"$Lb\"}]]}],{},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$1\",\"EUjn4becVHHWD_2F3aAR4\",{\"children\":[[\"$\",\"$Lc\",null,{\"children\":\"$Ld\"}],[\"$\",\"$Le\",null,{\"children\":\"$Lf\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$10\",\"$undefined\"],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:{}\n9:{}\n"])</script><script>self.__next_f.push([1,"f:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\nd:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"1\",{\"children\":\"d1-studio\"}],[\"$\",\"meta\",\"2\",{\"name\":\"description\",\"content\":\"Native D1 database studio.\"}]]\n"])</script><script>self.__next_f.push([1,"b:null\n"])</script></body></html>
@@ -12,7 +12,7 @@ e:I[6213,[],"ViewportBoundary"]
12
12
  :HL["/_next/static/media/569ce4b8f30dc480-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
13
13
  :HL["/_next/static/media/93f479601ee12b01-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
14
14
  :HL["/_next/static/css/c51a7ef325e30c16.css","style"]
15
- 0:{"P":null,"b":"_t0S4u4KzUwKctaxLKvx4","p":"","c":["",""],"i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/c51a7ef325e30c16.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__variable_4d318d __variable_ea5f4b antialiased","children":["$","$L2",null,{"children":[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[],[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]]],"forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L5",null,{}]," "]}]}]}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","searchParams":{},"params":{},"promises":["$@8","$@9"]}],null,["$","$La",null,{"children":"$Lb"}]]}],{},null,false]},null,false],["$","$1","h",{"children":[null,["$","$1","YVCjSBsiVAmBGbqMoy6ZD",{"children":[["$","$Lc",null,{"children":"$Ld"}],["$","$Le",null,{"children":"$Lf"}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}]]}],false]],"m":"$undefined","G":["$10","$undefined"],"s":false,"S":true}
15
+ 0:{"P":null,"b":"YIuXI2CxMwg2fuuUEBsXL","p":"","c":["",""],"i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/c51a7ef325e30c16.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__variable_4d318d __variable_ea5f4b antialiased","children":["$","$L2",null,{"children":[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[],[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]]],"forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L5",null,{}]," "]}]}]}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","searchParams":{},"params":{},"promises":["$@8","$@9"]}],null,["$","$La",null,{"children":"$Lb"}]]}],{},null,false]},null,false],["$","$1","h",{"children":[null,["$","$1","EUjn4becVHHWD_2F3aAR4",{"children":[["$","$Lc",null,{"children":"$Ld"}],["$","$Le",null,{"children":"$Lf"}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}]]}],false]],"m":"$undefined","G":["$10","$undefined"],"s":false,"S":true}
16
16
  8:{}
17
17
  9:{}
18
18
  f:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]