d1s 0.3.7 → 0.3.10
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.
- package/dist/.next/BUILD_ID +1 -1
- package/dist/.next/app-build-manifest.json +125 -125
- package/dist/.next/app-path-routes-manifest.json +23 -1
- package/dist/.next/build-manifest.json +14 -14
- package/dist/.next/export-marker.json +6 -1
- package/dist/.next/images-manifest.json +58 -1
- package/dist/.next/next-minimal-server.js.nft.json +1 -1
- package/dist/.next/next-server.js.nft.json +1 -1
- package/dist/.next/prerender-manifest.json +61 -1
- package/dist/.next/react-loadable-manifest.json +5 -5
- package/dist/.next/required-server-files.json +325 -1
- package/dist/.next/routes-manifest.json +70 -1
- package/dist/.next/server/app/_not-found/page.js +2 -1
- package/dist/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/_not-found.html +1 -1
- package/dist/.next/server/app/_not-found.meta +1 -1
- package/dist/.next/server/app/_not-found.rsc +15 -12
- package/dist/.next/server/app/api/cloudflare/route.js +1 -1
- package/dist/.next/server/app/api/cloudflare/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/cloudflare/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/databases/route.js +1 -1
- package/dist/.next/server/app/api/databases/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/databases/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/migrations/list/route.js +8 -8
- package/dist/.next/server/app/api/migrations/list/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/migrations/list/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/migrations/sync/route.js +10 -10
- package/dist/.next/server/app/api/migrations/sync/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/migrations/sync/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/migrations/sync-files/route.js +8 -8
- package/dist/.next/server/app/api/migrations/sync-files/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/migrations/sync-files/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/pro/route.js +1 -1
- package/dist/.next/server/app/api/pro/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/pro/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/pull-data/confirm/route.js +1 -1
- package/dist/.next/server/app/api/pull-data/confirm/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/pull-data/confirm/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/pull-remote/confirm/route.js +8 -8
- package/dist/.next/server/app/api/pull-remote/confirm/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/pull-remote/confirm/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/pull-remote/preview/route.js +8 -8
- package/dist/.next/server/app/api/pull-remote/preview/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/pull-remote/preview/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/push-remote/confirm/route.js +10 -10
- package/dist/.next/server/app/api/push-remote/confirm/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/push-remote/confirm/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/push-remote/preview/route.js +10 -10
- package/dist/.next/server/app/api/push-remote/preview/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/push-remote/preview/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/query/route.js +9 -9
- package/dist/.next/server/app/api/query/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/query/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/schema/route.js +1 -1
- package/dist/.next/server/app/api/schema/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/schema/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/tables/[name]/import/route.js +1 -1
- package/dist/.next/server/app/api/tables/[name]/import/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/tables/[name]/import/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/tables/[name]/route.js +5 -5
- package/dist/.next/server/app/api/tables/[name]/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/tables/[name]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/tables/route.js +2 -2
- package/dist/.next/server/app/api/tables/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/tables/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/time-travel/preview/route.js +1 -1
- package/dist/.next/server/app/api/time-travel/preview/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/time-travel/preview/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/time-travel/restore/route.js +1 -1
- package/dist/.next/server/app/api/time-travel/restore/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/time-travel/restore/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/update/route.js +1 -1
- package/dist/.next/server/app/api/update/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/index.html +3 -3
- package/dist/.next/server/app/index.meta +1 -1
- package/dist/.next/server/app/index.rsc +18 -15
- package/dist/.next/server/app/page.js +15 -14
- package/dist/.next/server/app/page.js.nft.json +1 -1
- package/dist/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app-paths-manifest.json +4 -4
- package/dist/.next/server/chunks/347.js +23 -0
- package/dist/.next/server/chunks/366.js +1 -0
- package/dist/.next/server/chunks/386.js +9 -0
- package/dist/.next/server/chunks/611.js +6 -0
- package/dist/.next/server/chunks/626.js +30 -0
- package/dist/.next/server/chunks/692.js +1 -0
- package/dist/.next/server/chunks/839.js +1 -0
- package/dist/.next/server/chunks/873.js +22 -0
- package/dist/.next/server/functions-config-manifest.json +6 -1
- package/dist/.next/server/middleware-build-manifest.js +1 -1
- package/dist/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/dist/.next/server/pages/404.html +1 -1
- package/dist/.next/server/pages/500.html +1 -1
- package/dist/.next/server/pages/_app.js +1 -1
- package/dist/.next/server/pages/_document.js +1 -1
- package/dist/.next/server/pages/_document.js.nft.json +1 -1
- package/dist/.next/server/pages/_error.js +19 -1
- package/dist/.next/server/pages/_error.js.nft.json +1 -1
- package/dist/.next/server/pages-manifest.json +6 -1
- package/dist/.next/server/server-reference-manifest.json +1 -1
- package/dist/.next/server/webpack-runtime.js +1 -1
- package/dist/.next/static/{TqY9pInUBjZNteD9IEnz3 → TDqrfll63o1FXL7rpt5E_}/_buildManifest.js +1 -1
- package/dist/.next/static/chunks/1a258343.234dd786cf6c097e.js +1 -0
- package/dist/.next/static/chunks/255-4f212684648fcab9.js +1 -0
- package/dist/.next/static/chunks/421-55f8ce492f5bd9c3.js +1 -0
- package/dist/.next/static/chunks/4bd1b696-c023c6e3521b1417.js +1 -0
- package/dist/.next/static/chunks/654-f2f8931465d44ae7.js +1 -0
- package/dist/.next/static/chunks/69-00a70b2df83ed9ee.js +1 -0
- package/dist/.next/static/chunks/823-5f8f96173644e0cc.js +1 -0
- package/dist/.next/static/chunks/95.8b08bca2768cb67c.js +1 -0
- package/dist/.next/static/chunks/{52.2cdc9bdb75e1fc2e.js → 950.01ba9ad634bd1f43.js} +1 -1
- package/dist/.next/static/chunks/app/_not-found/page-255a8a616fa8d3a5.js +1 -0
- package/dist/.next/static/chunks/app/api/cloudflare/{route-d0c1dc2a9e7dce36.js → route-58aca057db1e5530.js} +1 -1
- package/dist/.next/static/chunks/app/api/databases/{route-cd322321212797cf.js → route-58aca057db1e5530.js} +1 -1
- package/dist/.next/static/chunks/app/api/migrations/list/{route-cd710ff75b6bcd02.js → route-58aca057db1e5530.js} +1 -1
- package/dist/.next/static/chunks/app/api/migrations/sync/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/migrations/sync-files/{route-79ee2c26f87d3bc7.js → route-58aca057db1e5530.js} +1 -1
- package/dist/.next/static/chunks/app/api/pro/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/pull-data/confirm/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/pull-remote/confirm/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/pull-remote/preview/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/push-remote/confirm/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/push-remote/preview/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/query/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/schema/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/tables/[name]/import/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/tables/[name]/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/tables/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/time-travel/preview/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/time-travel/restore/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/update/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/layout-a5219438265f0b6c.js +1 -0
- package/dist/.next/static/chunks/app/page-5f0b0b876d1c4c1c.js +1 -0
- package/dist/.next/static/chunks/framework-a6e0b7e30f98059a.js +1 -0
- package/dist/.next/static/chunks/main-0bd218f776705cbf.js +1 -0
- package/dist/.next/static/chunks/main-app-d20e9d5e211da7c8.js +1 -0
- package/dist/.next/static/chunks/pages/_app-7d307437aca18ad4.js +1 -0
- package/dist/.next/static/chunks/pages/_error-cb2a52f75f2162e2.js +1 -0
- package/dist/.next/static/chunks/webpack-c7b9f95656aa8fe9.js +1 -0
- package/dist/.next/static/css/599369d853c61df7.css +31 -0
- package/dist/.next/static/css/b69f03bff92613ce.css +3 -0
- package/dist/.next/trace +3 -3
- package/package.json +2 -2
- package/dist/.next/server/chunks/226.js +0 -30
- package/dist/.next/server/chunks/391.js +0 -23
- package/dist/.next/server/chunks/452.js +0 -1
- package/dist/.next/server/chunks/487.js +0 -1
- package/dist/.next/server/chunks/572.js +0 -1
- package/dist/.next/server/chunks/627.js +0 -6
- package/dist/.next/server/chunks/992.js +0 -3
- package/dist/.next/server/chunks/994.js +0 -13
- package/dist/.next/static/chunks/1a258343.3b3e7ba5ba0bd0d2.js +0 -1
- package/dist/.next/static/chunks/345.8fc37569d5708622.js +0 -1
- package/dist/.next/static/chunks/480-85b6c8ae3f51b156.js +0 -1
- package/dist/.next/static/chunks/4bd1b696-124ea104c06f6cea.js +0 -1
- package/dist/.next/static/chunks/517-c876ce2f00030cd0.js +0 -2
- package/dist/.next/static/chunks/692-9e59d546afd11ec3.js +0 -1
- package/dist/.next/static/chunks/803-a2fcfbd00e6b3b38.js +0 -1
- package/dist/.next/static/chunks/92-a84bdac2be7c8d7a.js +0 -1
- package/dist/.next/static/chunks/app/_not-found/page-3e24b81707d98126.js +0 -1
- package/dist/.next/static/chunks/app/api/migrations/sync/route-ee522f232b9f0a9c.js +0 -1
- package/dist/.next/static/chunks/app/api/pro/route-c90c1f901fc00d38.js +0 -1
- package/dist/.next/static/chunks/app/api/pull-data/confirm/route-118764086af798f8.js +0 -1
- package/dist/.next/static/chunks/app/api/pull-remote/confirm/route-2b0ade4ebfcea0bc.js +0 -1
- package/dist/.next/static/chunks/app/api/pull-remote/preview/route-342db7ea13e6f447.js +0 -1
- package/dist/.next/static/chunks/app/api/push-remote/confirm/route-b778c053bd515abd.js +0 -1
- package/dist/.next/static/chunks/app/api/push-remote/preview/route-ab090482f299f57f.js +0 -1
- package/dist/.next/static/chunks/app/api/query/route-4d21a8b1d34491f1.js +0 -1
- package/dist/.next/static/chunks/app/api/schema/route-cb17a387d6b557ad.js +0 -1
- package/dist/.next/static/chunks/app/api/tables/[name]/import/route-510472de7a5c29bd.js +0 -1
- package/dist/.next/static/chunks/app/api/tables/[name]/route-6a1fa95c303ce0de.js +0 -1
- package/dist/.next/static/chunks/app/api/tables/route-daa975df4ea8e8f8.js +0 -1
- package/dist/.next/static/chunks/app/api/time-travel/preview/route-5787d7e8f17bd539.js +0 -1
- package/dist/.next/static/chunks/app/api/time-travel/restore/route-84b64a27e831e21c.js +0 -1
- package/dist/.next/static/chunks/app/api/update/route-54ee900537982652.js +0 -1
- package/dist/.next/static/chunks/app/layout-f0ec4d636ee0f763.js +0 -1
- package/dist/.next/static/chunks/app/page-6bcbc40fdbc40128.js +0 -1
- package/dist/.next/static/chunks/framework-d29117d969504448.js +0 -1
- package/dist/.next/static/chunks/main-8d0ab17774ffa031.js +0 -1
- package/dist/.next/static/chunks/main-app-4506e88db72db4b7.js +0 -1
- package/dist/.next/static/chunks/pages/_app-d23763e3e6c904ff.js +0 -1
- package/dist/.next/static/chunks/pages/_error-9b7125ad1a1e68fa.js +0 -1
- package/dist/.next/static/chunks/webpack-024900a94af4f0a7.js +0 -1
- package/dist/.next/static/css/2c165a0ede9b2442.css +0 -3
- package/dist/.next/static/css/32df9a4d493f8b0f.css +0 -31
- /package/dist/.next/static/{TqY9pInUBjZNteD9IEnz3 → TDqrfll63o1FXL7rpt5E_}/_ssgManifest.js +0 -0
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
1:"$Sreact.fragment"
|
|
2
|
-
2:I[
|
|
3
|
-
3:I[
|
|
4
|
-
4:I[
|
|
5
|
-
5:I[
|
|
6
|
-
6:I[
|
|
7
|
-
8:I[
|
|
8
|
-
a:I[
|
|
9
|
-
c:I[
|
|
2
|
+
2:I[3190,["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-5f8f96173644e0cc.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"DatabaseProvider"]
|
|
3
|
+
3:I[9766,[],""]
|
|
4
|
+
4:I[8924,[],""]
|
|
5
|
+
5:I[7747,["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-5f8f96173644e0cc.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"Toaster"]
|
|
6
|
+
6:I[4431,[],"OutletBoundary"]
|
|
7
|
+
8:I[5278,[],"AsyncMetadataOutlet"]
|
|
8
|
+
a:I[4431,[],"ViewportBoundary"]
|
|
9
|
+
c:I[4431,[],"MetadataBoundary"]
|
|
10
|
+
d:"$Sreact.suspense"
|
|
11
|
+
f:I[7150,[],""]
|
|
10
12
|
:HL["/_next/static/media/4cf2300e9c8272f7-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
11
13
|
:HL["/_next/static/media/93f479601ee12b01-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
12
|
-
:HL["/_next/static/css/
|
|
13
|
-
0:{"P":null,"b":"
|
|
14
|
-
b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
|
15
|
-
9:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"d1-studio"}],["$","meta","2",{"name":"description","content":"Native D1 database studio."}]]
|
|
14
|
+
:HL["/_next/static/css/b69f03bff92613ce.css","style"]
|
|
15
|
+
0:{"P":null,"b":"TDqrfll63o1FXL7rpt5E_","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/b69f03bff92613ce.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","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L5",null,{}]," "]}]}]}]]}],{"children":["/_not-found",["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"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":{"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."}]}]]}]}]],null,["$","$L6",null,{"children":["$L7",["$","$L8",null,{"promise":"$@9"}]]}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],[["$","$La",null,{"children":"$Lb"}],["$","meta",null,{"name":"next-size-adjust","content":""}]],["$","$Lc",null,{"children":["$","div",null,{"hidden":true,"children":["$","$d",null,{"fallback":null,"children":"$Le"}]}]}]]}],false]],"m":"$undefined","G":["$f",[]],"s":false,"S":true}
|
|
16
|
+
b:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
|
16
17
|
7:null
|
|
18
|
+
9:{"metadata":[["$","title","0",{"children":"d1-studio"}],["$","meta","1",{"name":"description","content":"Native D1 database studio."}]],"error":null,"digest":"$undefined"}
|
|
19
|
+
e:"$9:metadata"
|
|
@@ -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:()=>x,serverHooks:()=>w,workAsyncStorage:()=>h,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 x=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:h,workUnitAsyncStorage:m,serverHooks:w}=x;function j(){return(0,n.patchFetch)({workAsyncStorage:h,workUnitAsyncStorage:m})}},6487:()=>{},8335:()=>{},5949:(e,r,t)=>{"use strict";t.d(r,{S:()=>d});var s=t(9748),o=t(3873),a=t(3149),n=t(2537),i=t(6789),u=t(1804);let c=null,l=null;async function d(e){try{let r;if(!e||"string"!=typeof e)throw Error("Project path is required and must be a string");if(c&&l===e)return c;let t=null,d=null;for(let r of["wrangler.toml","wrangler.json","wrangler.jsonc"])if(t=await (0,a.dJ)(r,{cwd:e})){d=r;break}if(!t)return u.A.warn(`No Wrangler configuration file found in: ${e}`),null;u.A.info(`Found ${d} at: ${t}`);let p=await (0,s.readFile)(t,"utf-8");d.endsWith(".toml")?r=(0,n.parse)(p):(d.endsWith(".jsonc")&&(p=(0,i.A)(p)),r=JSON.parse(p));let f=(0,o.dirname)(t);return c={config:r,projectPath:f,configPath:t,configFile:d},l=e,c}catch(e){throw u.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 a={};a.id=999,a.ids=[999],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1708:a=>{"use strict";a.exports=require("node:process")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},41204:a=>{"use strict";a.exports=require("string_decoder")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51082:(a,b,c)=>{"use strict";c.d(b,{A:()=>l});var d=c(41193);let{combine:e,timestamp:f,printf:g,colorize:h}=d.format,i="true"===process.env.DEBUG,j=g(({level:a,message:b,timestamp:c,...d})=>{let e=`${c} ${a}: ${b}`;return Object.keys(d).length>0&&(e+=` ${JSON.stringify(d)}`),e}),k=d.createLogger({level:i?"debug":"warn",format:e(f({format:"YYYY-MM-DD HH:mm:ss"}),h(),j),transports:[new d.transports.Console({level:i?"debug":"warn",silent:!1})]});k.logRequest=(a,b,c={})=>{k.debug(`Request: ${a} ${b}`,c)},k.logError=(a,b="unknown")=>{k.error(`Error in ${b}: ${a.message}`,{error:a.stack||a.message,source:b})},k.shouldLog=a=>{let b=k.level,c={error:0,warn:1,info:2,debug:3};return c[a]<=c[b]};let l=k},55591:a=>{"use strict";a.exports=require("https")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63491:(a,b,c)=>{"use strict";c.d(b,{S:()=>l});var d=c(79748),e=c(33873),f=c(82707),g=c(54027),h=c(11795),i=c(51082);let j=null,k=null;async function l(a){try{let b;if(!a||"string"!=typeof a)throw Error("Project path is required and must be a string");if(j&&k===a)return j;let c=null,l=null;for(let b of["wrangler.toml","wrangler.json","wrangler.jsonc"])if(c=await (0,f.dJ)(b,{cwd:a})){l=b;break}if(!c)return i.A.warn(`No Wrangler configuration file found in: ${a}`),null;i.A.info(`Found ${l} at: ${c}`);let m=await (0,d.readFile)(c,"utf-8");l.endsWith(".toml")?b=(0,g.parse)(m):(l.endsWith(".jsonc")&&(m=(0,h.A)(m)),b=JSON.parse(m));let n=(0,e.dirname)(c);return j={config:b,projectPath:n,configPath:c,configFile:l},k=a,j}catch(a){throw i.A.error(`Error reading Wrangler configuration: ${a.message}`),a}}},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},74075:a=>{"use strict";a.exports=require("zlib")},76760:a=>{"use strict";a.exports=require("node:path")},78335:()=>{},79428:a=>{"use strict";a.exports=require("buffer")},79748:a=>{"use strict";a.exports=require("fs/promises")},81334:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>H,patchFetch:()=>G,routeModule:()=>C,serverHooks:()=>F,workAsyncStorage:()=>D,workUnitAsyncStorage:()=>E});var d={};c.r(d),c.d(d,{OPTIONS:()=>B,POST:()=>A});var e=c(95736),f=c(9117),g=c(4044),h=c(39326),i=c(32324),j=c(261),k=c(54290),l=c(85328),m=c(38928),n=c(46595),o=c(3421),p=c(17679),q=c(41681),r=c(63446),s=c(86439),t=c(51356),u=c(10641),v=c(63491),w=c(51082);async function x(a,b){let c=await fetch(`https://api.cloudflare.com/client/v4/accounts/${a}/d1/database`,{headers:{Authorization:`Bearer ${b}`,"Content-Type":"application/json"}});if(!c.ok)throw Error("Invalid Cloudflare credentials");return c.json()}async function y(a,b,c){let d=await fetch(`https://api.cloudflare.com/client/v4/accounts/${a}/d1/database`,{headers:{Authorization:`Bearer ${b}`,"Content-Type":"application/json"}});if(!d.ok)throw Error("Failed to fetch databases");let{result:e}=await d.json();return e.find(a=>a.name===c)}async function z(a,b,c){let d=await fetch(`https://api.cloudflare.com/client/v4/accounts/${a}/d1/database`,{method:"POST",headers:{Authorization:`Bearer ${b}`,"Content-Type":"application/json"},body:JSON.stringify({name:c})});if(!d.ok)throw Error("Failed to create database");return d.json()}async function A(a){try{let{accountId:b,apiToken:c}=await a.json(),d=process.env.D1_PROJECT_DIR;if(!d)return w.A.error("Project directory not configured"),u.NextResponse.json({error:"Project directory not configured"},{status:500});await x(b,c);let e=await (0,v.S)(d);if(!e||!e.config)return w.A.error("No Wrangler configuration file found in project directory"),u.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let f=e.config;if(!f.d1_databases?.length)return u.NextResponse.json({error:"No D1 databases configured in Wrangler configuration"},{status:400});let g=f.d1_databases[0],h=await y(b,c,g.database_name);return h||(h=(await z(b,c,g.database_name)).result),u.NextResponse.json({success:!0,database:{id:h.uuid,name:h.name}})}catch(a){return w.A.error("Cloudflare API error:",a),u.NextResponse.json({error:a.message},{status:a.message.includes("Invalid credentials")?401:500})}}async function B(){return new u.NextResponse(null,{status:204})}let C=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/cloudflare/route",pathname:"/api/cloudflare",filename:"route",bundlePath:"app/api/cloudflare/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/cloudflare/route.js",nextConfigOutput:"",userland:d}),{workAsyncStorage:D,workUnitAsyncStorage:E,serverHooks:F}=C;function G(){return(0,g.patchFetch)({workAsyncStorage:D,workUnitAsyncStorage:E})}async function H(a,b,c){var d;let e="/api/cloudflare/route";"/index"===e&&(e="/");let g=await C.prepare(a,b,{srcPage:e,multiZoneDraftMode:!1});if(!g)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:u,params:v,nextConfig:w,isDraftMode:x,prerenderManifest:y,routerServerContext:z,isOnDemandRevalidate:A,revalidateOnlyGenerated:B,resolvedPathname:D}=g,E=(0,j.normalizeAppPath)(e),F=!!(y.dynamicRoutes[E]||y.routes[D]);if(F&&!x){let a=!!y.routes[D],b=y.dynamicRoutes[E];if(b&&!1===b.fallback&&!a)throw new s.NoFallbackError}let G=null;!F||C.isDev||x||(G="/index"===(G=D)?"/":G);let H=!0===C.isDev||!F,I=F&&!H,J=a.method||"GET",K=(0,i.getTracer)(),L=K.getActiveScopeSpan(),M={params:v,prerenderManifest:y,renderOpts:{experimental:{cacheComponents:!!w.experimental.cacheComponents,authInterrupts:!!w.experimental.authInterrupts},supportsDynamicResponse:H,incrementalCache:(0,h.getRequestMeta)(a,"incrementalCache"),cacheLifeProfiles:null==(d=w.experimental)?void 0:d.cacheLife,isRevalidate:I,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d)=>C.onRequestError(a,b,d,z)},sharedContext:{buildId:u}},N=new k.NodeNextRequest(a),O=new k.NodeNextResponse(b),P=l.NextRequestAdapter.fromNodeNextRequest(N,(0,l.signalFromNodeResponse)(b));try{let d=async c=>C.handle(P,M).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let d=K.getRootSpanAttributes();if(!d)return;if(d.get("next.span_type")!==m.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${d.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=d.get("next.route");if(e){let a=`${J} ${e}`;c.setAttributes({"next.route":e,"http.route":e,"next.span_name":a}),c.updateName(a)}else c.updateName(`${J} ${a.url}`)}),g=async g=>{var i,j;let k=async({previousCacheEntry:f})=>{try{if(!(0,h.getRequestMeta)(a,"minimalMode")&&A&&B&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let e=await d(g);a.fetchMetrics=M.renderOpts.fetchMetrics;let i=M.renderOpts.pendingWaitUntil;i&&c.waitUntil&&(c.waitUntil(i),i=void 0);let j=M.renderOpts.collectedTags;if(!F)return await (0,o.I)(N,O,e,M.renderOpts.pendingWaitUntil),null;{let a=await e.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(e.headers);j&&(b[r.NEXT_CACHE_TAGS_HEADER]=j),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==M.renderOpts.collectedRevalidate&&!(M.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&M.renderOpts.collectedRevalidate,d=void 0===M.renderOpts.collectedExpire||M.renderOpts.collectedExpire>=r.INFINITE_CACHE?void 0:M.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:e.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:d}}}}catch(b){throw(null==f?void 0:f.isStale)&&await C.onRequestError(a,b,{routerKind:"App Router",routePath:e,routeType:"route",revalidateReason:(0,n.c)({isRevalidate:I,isOnDemandRevalidate:A})},z),b}},l=await C.handleResponse({req:a,nextConfig:w,cacheKey:G,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:y,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:B,responseGenerator:k,waitUntil:c.waitUntil});if(!F)return null;if((null==l||null==(i=l.value)?void 0:i.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==l||null==(j=l.value)?void 0:j.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});(0,h.getRequestMeta)(a,"minimalMode")||b.setHeader("x-nextjs-cache",A?"REVALIDATED":l.isMiss?"MISS":l.isStale?"STALE":"HIT"),x&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let m=(0,p.fromNodeOutgoingHttpHeaders)(l.value.headers);return(0,h.getRequestMeta)(a,"minimalMode")&&F||m.delete(r.NEXT_CACHE_TAGS_HEADER),!l.cacheControl||b.getHeader("Cache-Control")||m.get("Cache-Control")||m.set("Cache-Control",(0,q.getCacheControlHeader)(l.cacheControl)),await (0,o.I)(N,O,new Response(l.value.body,{headers:m,status:l.value.status||200})),null};L?await g(L):await K.withPropagatedContext(a.headers,()=>K.trace(m.BaseServerSpan.handleRequest,{spanName:`${J} ${a.url}`,kind:i.SpanKind.SERVER,attributes:{"http.method":J,"http.target":a.url}},g))}catch(b){if(b instanceof s.NoFallbackError||await C.onRequestError(a,b,{routerKind:"App Router",routePath:E,routeType:"route",revalidateReason:(0,n.c)({isRevalidate:I,isOnDemandRevalidate:A})}),F)throw b;return await (0,o.I)(N,O,new Response(null,{status:500})),null}}},81630:a=>{"use strict";a.exports=require("http")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[873,692,347],()=>b(b.s=81334));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../node_modules/next/dist/server/app-render/
|
|
1
|
+
{"version":1,"files":["../../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../node_modules/next/dist/lib/constants.js","../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../node_modules/next/dist/lib/is-error.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../node_modules/next/dist/server/lib/cache-handlers/default.external.js","../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../../../../../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../../../../../node_modules/next/dist/shared/lib/segment.js","../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/347.js","../../../chunks/692.js","../../../chunks/873.js","../../../webpack-runtime.js","route_client-reference-manifest.js"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/cloudflare/route"]={"moduleLoading":{"prefix":"/_next/","
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/cloudflare/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"622":{"*":{"id":"82146","name":"*","chunks":[],"async":false}},"930":{"*":{"id":"32122","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"31603","name":"*","chunks":[],"async":false}},"3190":{"*":{"id":"60122","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"75170","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"12263","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"78922","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"54160","name":"*","chunks":[],"async":false}},"7747":{"*":{"id":"60673","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"68495","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"29234","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"77526","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":622,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":622,"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":5706,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-5f8f96173644e0cc.js","177","static/chunks/app/layout-a5219438265f0b6c.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":134,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-5f8f96173644e0cc.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":3673,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-5f8f96173644e0cc.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":7747,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-5f8f96173644e0cc.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":3190,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-5f8f96173644e0cc.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":930,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","69","static/chunks/69-00a70b2df83ed9ee.js","823","static/chunks/823-5f8f96173644e0cc.js","974","static/chunks/app/page-5f0b0b876d1c4c1c.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/b69f03bff92613ce.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/cloudflare/route":[]},"rscModuleMapping":{"622":{"*":{"id":"51384","name":"*","chunks":[],"async":false}},"930":{"*":{"id":"1905","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"23597","name":"*","chunks":[],"async":false}},"3190":{"*":{"id":"46254","name":"*","chunks":[],"async":false}},"3673":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"89748","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"73041","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"7184","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"81170","name":"*","chunks":[],"async":false}},"7747":{"*":{"id":"44158","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"36893","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"69576","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"6060","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:()=>d});var s=t(9748),a=t(3873),n=t(3149),i=t(2537),o=t(6789),u=t(1804);let l=null,c=null;async function d(e){try{let r;if(!e||"string"!=typeof e)throw Error("Project path is required and must be a string");if(l&&c===e)return l;let t=null,d=null;for(let r of["wrangler.toml","wrangler.json","wrangler.jsonc"])if(t=await (0,n.dJ)(r,{cwd:e})){d=r;break}if(!t)return u.A.warn(`No Wrangler configuration file found in: ${e}`),null;u.A.info(`Found ${d} at: ${t}`);let p=await (0,s.readFile)(t,"utf-8");d.endsWith(".toml")?r=(0,i.parse)(p):(d.endsWith(".jsonc")&&(p=(0,o.A)(p)),r=JSON.parse(p));let g=(0,a.dirname)(t);return l={config:r,projectPath:g,configPath:t,configFile:d},c=e,l}catch(e){throw u.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 a={};a.id=952,a.ids=[366,952],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1708:a=>{"use strict";a.exports=require("node:process")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10366:(a,b,c)=>{"use strict";c.d(b,{executeLocalSQL:()=>n,k5:()=>l,n3:()=>o,w1:()=>m});var d=c(55511),e=c(33873),f=c(29021),g=c(87550),h=c(51082);let i=e.join(".wrangler","state","v3","d1","miniflare-D1DatabaseObject"),j=new Map;function k(a,b){let c=e.join(a,i);if(!f.existsSync(c))return null;let{database_id:g,database_name:j,binding:k}=b,l=[g,j,k].filter(Boolean),m=["","miniflare-D1DatabaseObject:","D1DatabaseObject:","d1:"],n=l.flatMap(a=>m.map(b=>{var c;return c=`${b}${a}`,d.createHash("sha256").update(c).digest("hex")})).map(a=>e.join(c,`${a}.sqlite`)).find(a=>f.existsSync(a));if(n)return n;let o=f.readdirSync(c).filter(a=>a.endsWith(".sqlite")).map(a=>({name:a,fullPath:e.join(c,a),mtime:f.statSync(e.join(c,a)).mtimeMs})).sort((a,b)=>b.mtime-a.mtime);return 1===o.length?o[0].fullPath:(o.length>1&&h.A.debug(`[local-db] Multiple SQLite files, no hash matched — falling back to wrangler CLI. dir=${c}, tried ids=${JSON.stringify(l)}`),h.A.debug(`[local-db] No SQLite files found. dir=${c}, tried ids=${JSON.stringify(l)}`),null)}function l(a,b){return null!==k(a,b)}function m(a,b){let c=`${a}:${b.database_name}`,d=k(a,b);if(j.has(c)){let a=j.get(c);if(a.path!==d){try{a.db.close()}catch{}j.delete(c)}else try{return a.db.prepare("SELECT 1").get(),a.db}catch{j.delete(c)}}if(!d)return null;try{let a=new g(d,{fileMustExist:!1});return a.pragma("journal_mode = WAL"),a.pragma("foreign_keys = ON"),j.set(c,{db:a,path:d}),a}catch{return null}}function n(a,b,c){let d=m(a,b);if(!d)return null;let e=c.trim(),f=e.toUpperCase().replace(/\s+/g," "),g=e.split(";").map(a=>a.trim()).filter(Boolean);if(g.length>1){let a=[],b=0,c=0;return d.transaction(()=>{for(let e of g){let f=e.toUpperCase().replace(/\s+/g," ");if(f.startsWith("SELECT")||f.startsWith("PRAGMA")||f.startsWith("EXPLAIN")){let b=d.prepare(e).all();a=a.concat(b)}else{let a=d.prepare(e).run();b+=a.changes,c=a.lastInsertRowid}}})(),JSON.stringify([{results:a,success:!0,meta:{changes:b,last_row_id:c,rows_read:a.length,rows_written:b}}])}if(f.startsWith("SELECT")||f.startsWith("PRAGMA")||f.startsWith("EXPLAIN")){let a=d.prepare(e).all();return JSON.stringify([{results:a,success:!0,meta:{rows_read:a.length,rows_written:0,changed_db:!1}}])}let h=d.prepare(e).run();return JSON.stringify([{results:[],success:!0,meta:{changes:h.changes,last_row_id:h.lastInsertRowid,rows_read:0,rows_written:h.changes,changed_db:h.changes>0}}])}function o(a,b){let c=`${a}:${b}`,d=j.get(c);if(d){try{d.db.close()}catch{}j.delete(c)}}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},41204:a=>{"use strict";a.exports=require("string_decoder")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51082:(a,b,c)=>{"use strict";c.d(b,{A:()=>l});var d=c(41193);let{combine:e,timestamp:f,printf:g,colorize:h}=d.format,i="true"===process.env.DEBUG,j=g(({level:a,message:b,timestamp:c,...d})=>{let e=`${c} ${a}: ${b}`;return Object.keys(d).length>0&&(e+=` ${JSON.stringify(d)}`),e}),k=d.createLogger({level:i?"debug":"warn",format:e(f({format:"YYYY-MM-DD HH:mm:ss"}),h(),j),transports:[new d.transports.Console({level:i?"debug":"warn",silent:!1})]});k.logRequest=(a,b,c={})=>{k.debug(`Request: ${a} ${b}`,c)},k.logError=(a,b="unknown")=>{k.error(`Error in ${b}: ${a.message}`,{error:a.stack||a.message,source:b})},k.shouldLog=a=>{let b=k.level,c={error:0,warn:1,info:2,debug:3};return c[a]<=c[b]};let l=k},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63491:(a,b,c)=>{"use strict";c.d(b,{S:()=>l});var d=c(79748),e=c(33873),f=c(82707),g=c(54027),h=c(11795),i=c(51082);let j=null,k=null;async function l(a){try{let b;if(!a||"string"!=typeof a)throw Error("Project path is required and must be a string");if(j&&k===a)return j;let c=null,l=null;for(let b of["wrangler.toml","wrangler.json","wrangler.jsonc"])if(c=await (0,f.dJ)(b,{cwd:a})){l=b;break}if(!c)return i.A.warn(`No Wrangler configuration file found in: ${a}`),null;i.A.info(`Found ${l} at: ${c}`);let m=await (0,d.readFile)(c,"utf-8");l.endsWith(".toml")?b=(0,g.parse)(m):(l.endsWith(".jsonc")&&(m=(0,h.A)(m)),b=JSON.parse(m));let n=(0,e.dirname)(c);return j={config:b,projectPath:n,configPath:c,configFile:l},k=a,j}catch(a){throw i.A.error(`Error reading Wrangler configuration: ${a.message}`),a}}},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},74075:a=>{"use strict";a.exports=require("zlib")},76760:a=>{"use strict";a.exports=require("node:path")},76981:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>F,patchFetch:()=>E,routeModule:()=>A,serverHooks:()=>D,workAsyncStorage:()=>B,workUnitAsyncStorage:()=>C});var d={};c.r(d),c.d(d,{GET:()=>y,OPTIONS:()=>z});var e=c(95736),f=c(9117),g=c(4044),h=c(39326),i=c(32324),j=c(261),k=c(54290),l=c(85328),m=c(38928),n=c(46595),o=c(3421),p=c(17679),q=c(41681),r=c(63446),s=c(86439),t=c(51356),u=c(10641),v=c(63491),w=c(10366),x=c(51082);async function y(){try{let a=process.env.D1_PROJECT_DIR;if(!a)return x.A.error("D1_PROJECT_DIR environment variable is not set"),u.NextResponse.json({error:"Project directory not configured"},{status:500});let b=await (0,v.S)(a);if(!b||!b.config)return u.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let c=b.config;if(!c.d1_databases?.length)return u.NextResponse.json({error:"No D1 databases configured in Wrangler configuration"},{status:404});return u.NextResponse.json({databases:c.d1_databases.map(b=>({...b,hasLocal:(0,w.k5)(a,b)})),debug:{projectDir:a,configPath:b.configPath||"N/A",databaseCount:c.d1_databases.length}})}catch(a){return x.A.error("Error reading database configuration:",a),u.NextResponse.json({error:"Failed to read database configuration",details:a.message,debug:{errorCode:a.code,errorStack:a.stack}},{status:500})}}async function z(){return new u.NextResponse(null,{status:204,headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, OPTIONS","Access-Control-Allow-Headers":"Content-Type"}})}let A=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/databases/route",pathname:"/api/databases",filename:"route",bundlePath:"app/api/databases/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/databases/route.js",nextConfigOutput:"",userland:d}),{workAsyncStorage:B,workUnitAsyncStorage:C,serverHooks:D}=A;function E(){return(0,g.patchFetch)({workAsyncStorage:B,workUnitAsyncStorage:C})}async function F(a,b,c){var d;let e="/api/databases/route";"/index"===e&&(e="/");let g=await A.prepare(a,b,{srcPage:e,multiZoneDraftMode:!1});if(!g)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:u,params:v,nextConfig:w,isDraftMode:x,prerenderManifest:y,routerServerContext:z,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,resolvedPathname:D}=g,E=(0,j.normalizeAppPath)(e),F=!!(y.dynamicRoutes[E]||y.routes[D]);if(F&&!x){let a=!!y.routes[D],b=y.dynamicRoutes[E];if(b&&!1===b.fallback&&!a)throw new s.NoFallbackError}let G=null;!F||A.isDev||x||(G="/index"===(G=D)?"/":G);let H=!0===A.isDev||!F,I=F&&!H,J=a.method||"GET",K=(0,i.getTracer)(),L=K.getActiveScopeSpan(),M={params:v,prerenderManifest:y,renderOpts:{experimental:{cacheComponents:!!w.experimental.cacheComponents,authInterrupts:!!w.experimental.authInterrupts},supportsDynamicResponse:H,incrementalCache:(0,h.getRequestMeta)(a,"incrementalCache"),cacheLifeProfiles:null==(d=w.experimental)?void 0:d.cacheLife,isRevalidate:I,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d)=>A.onRequestError(a,b,d,z)},sharedContext:{buildId:u}},N=new k.NodeNextRequest(a),O=new k.NodeNextResponse(b),P=l.NextRequestAdapter.fromNodeNextRequest(N,(0,l.signalFromNodeResponse)(b));try{let d=async c=>A.handle(P,M).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let d=K.getRootSpanAttributes();if(!d)return;if(d.get("next.span_type")!==m.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${d.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=d.get("next.route");if(e){let a=`${J} ${e}`;c.setAttributes({"next.route":e,"http.route":e,"next.span_name":a}),c.updateName(a)}else c.updateName(`${J} ${a.url}`)}),g=async g=>{var i,j;let k=async({previousCacheEntry:f})=>{try{if(!(0,h.getRequestMeta)(a,"minimalMode")&&B&&C&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let e=await d(g);a.fetchMetrics=M.renderOpts.fetchMetrics;let i=M.renderOpts.pendingWaitUntil;i&&c.waitUntil&&(c.waitUntil(i),i=void 0);let j=M.renderOpts.collectedTags;if(!F)return await (0,o.I)(N,O,e,M.renderOpts.pendingWaitUntil),null;{let a=await e.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(e.headers);j&&(b[r.NEXT_CACHE_TAGS_HEADER]=j),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==M.renderOpts.collectedRevalidate&&!(M.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&M.renderOpts.collectedRevalidate,d=void 0===M.renderOpts.collectedExpire||M.renderOpts.collectedExpire>=r.INFINITE_CACHE?void 0:M.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:e.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:d}}}}catch(b){throw(null==f?void 0:f.isStale)&&await A.onRequestError(a,b,{routerKind:"App Router",routePath:e,routeType:"route",revalidateReason:(0,n.c)({isRevalidate:I,isOnDemandRevalidate:B})},z),b}},l=await A.handleResponse({req:a,nextConfig:w,cacheKey:G,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:y,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,responseGenerator:k,waitUntil:c.waitUntil});if(!F)return null;if((null==l||null==(i=l.value)?void 0:i.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==l||null==(j=l.value)?void 0:j.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});(0,h.getRequestMeta)(a,"minimalMode")||b.setHeader("x-nextjs-cache",B?"REVALIDATED":l.isMiss?"MISS":l.isStale?"STALE":"HIT"),x&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let m=(0,p.fromNodeOutgoingHttpHeaders)(l.value.headers);return(0,h.getRequestMeta)(a,"minimalMode")&&F||m.delete(r.NEXT_CACHE_TAGS_HEADER),!l.cacheControl||b.getHeader("Cache-Control")||m.get("Cache-Control")||m.set("Cache-Control",(0,q.getCacheControlHeader)(l.cacheControl)),await (0,o.I)(N,O,new Response(l.value.body,{headers:m,status:l.value.status||200})),null};L?await g(L):await K.withPropagatedContext(a.headers,()=>K.trace(m.BaseServerSpan.handleRequest,{spanName:`${J} ${a.url}`,kind:i.SpanKind.SERVER,attributes:{"http.method":J,"http.target":a.url}},g))}catch(b){if(b instanceof s.NoFallbackError||await A.onRequestError(a,b,{routerKind:"App Router",routePath:E,routeType:"route",revalidateReason:(0,n.c)({isRevalidate:I,isOnDemandRevalidate:B})}),F)throw b;return await (0,o.I)(N,O,new Response(null,{status:500})),null}}},78335:()=>{},79428:a=>{"use strict";a.exports=require("buffer")},79748:a=>{"use strict";a.exports=require("fs/promises")},81630:a=>{"use strict";a.exports=require("http")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},94735:a=>{"use strict";a.exports=require("events")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[873,692,347],()=>b(b.s=76981));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../node_modules/better-sqlite3/build/Release/better_sqlite3.node","../../../../../node_modules/better-sqlite3/lib/database.js","../../../../../node_modules/better-sqlite3/lib/index.js","../../../../../node_modules/better-sqlite3/lib/methods/aggregate.js","../../../../../node_modules/better-sqlite3/lib/methods/backup.js","../../../../../node_modules/better-sqlite3/lib/methods/function.js","../../../../../node_modules/better-sqlite3/lib/methods/inspect.js","../../../../../node_modules/better-sqlite3/lib/methods/pragma.js","../../../../../node_modules/better-sqlite3/lib/methods/serialize.js","../../../../../node_modules/better-sqlite3/lib/methods/table.js","../../../../../node_modules/better-sqlite3/lib/methods/transaction.js","../../../../../node_modules/better-sqlite3/lib/methods/wrappers.js","../../../../../node_modules/better-sqlite3/lib/sqlite-error.js","../../../../../node_modules/better-sqlite3/lib/util.js","../../../../../node_modules/better-sqlite3/package.json","../../../../../node_modules/bindings/bindings.js","../../../../../node_modules/bindings/package.json","../../../../../node_modules/file-uri-to-path/index.js","../../../../../node_modules/file-uri-to-path/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../node_modules/next/dist/server/app-render/
|
|
1
|
+
{"version":1,"files":["../../../../../node_modules/better-sqlite3/build/Release/better_sqlite3.node","../../../../../node_modules/better-sqlite3/lib/database.js","../../../../../node_modules/better-sqlite3/lib/index.js","../../../../../node_modules/better-sqlite3/lib/methods/aggregate.js","../../../../../node_modules/better-sqlite3/lib/methods/backup.js","../../../../../node_modules/better-sqlite3/lib/methods/function.js","../../../../../node_modules/better-sqlite3/lib/methods/inspect.js","../../../../../node_modules/better-sqlite3/lib/methods/pragma.js","../../../../../node_modules/better-sqlite3/lib/methods/serialize.js","../../../../../node_modules/better-sqlite3/lib/methods/table.js","../../../../../node_modules/better-sqlite3/lib/methods/transaction.js","../../../../../node_modules/better-sqlite3/lib/methods/wrappers.js","../../../../../node_modules/better-sqlite3/lib/sqlite-error.js","../../../../../node_modules/better-sqlite3/lib/util.js","../../../../../node_modules/better-sqlite3/package.json","../../../../../node_modules/bindings/bindings.js","../../../../../node_modules/bindings/package.json","../../../../../node_modules/file-uri-to-path/index.js","../../../../../node_modules/file-uri-to-path/package.json","../../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../node_modules/next/dist/lib/constants.js","../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../node_modules/next/dist/lib/is-error.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../node_modules/next/dist/server/lib/cache-handlers/default.external.js","../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../../../../../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../../../../../node_modules/next/dist/shared/lib/segment.js","../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/347.js","../../../chunks/692.js","../../../chunks/873.js","../../../webpack-runtime.js","route_client-reference-manifest.js"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/databases/route"]={"moduleLoading":{"prefix":"/_next/","
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/databases/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"622":{"*":{"id":"82146","name":"*","chunks":[],"async":false}},"930":{"*":{"id":"32122","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"31603","name":"*","chunks":[],"async":false}},"3190":{"*":{"id":"60122","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"75170","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"12263","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"78922","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"54160","name":"*","chunks":[],"async":false}},"7747":{"*":{"id":"60673","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"68495","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"29234","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"77526","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":622,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":622,"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":5706,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-5f8f96173644e0cc.js","177","static/chunks/app/layout-a5219438265f0b6c.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":134,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-5f8f96173644e0cc.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":3673,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-5f8f96173644e0cc.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":7747,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-5f8f96173644e0cc.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":3190,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-5f8f96173644e0cc.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":930,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","69","static/chunks/69-00a70b2df83ed9ee.js","823","static/chunks/823-5f8f96173644e0cc.js","974","static/chunks/app/page-5f0b0b876d1c4c1c.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/b69f03bff92613ce.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/databases/route":[]},"rscModuleMapping":{"622":{"*":{"id":"51384","name":"*","chunks":[],"async":false}},"930":{"*":{"id":"1905","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"23597","name":"*","chunks":[],"async":false}},"3190":{"*":{"id":"46254","name":"*","chunks":[],"async":false}},"3673":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"89748","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"73041","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"7184","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"81170","name":"*","chunks":[],"async":false}},"7747":{"*":{"id":"44158","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"36893","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"69576","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"6060","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var
|
|
1
|
+
"use strict";(()=>{var a={};a.id=520,a.ids=[366,520],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1708:a=>{a.exports=require("node:process")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10366:(a,b,c)=>{c.d(b,{executeLocalSQL:()=>n,k5:()=>l,n3:()=>o,w1:()=>m});var d=c(55511),e=c(33873),f=c(29021),g=c(87550),h=c(51082);let i=e.join(".wrangler","state","v3","d1","miniflare-D1DatabaseObject"),j=new Map;function k(a,b){let c=e.join(a,i);if(!f.existsSync(c))return null;let{database_id:g,database_name:j,binding:k}=b,l=[g,j,k].filter(Boolean),m=["","miniflare-D1DatabaseObject:","D1DatabaseObject:","d1:"],n=l.flatMap(a=>m.map(b=>{var c;return c=`${b}${a}`,d.createHash("sha256").update(c).digest("hex")})).map(a=>e.join(c,`${a}.sqlite`)).find(a=>f.existsSync(a));if(n)return n;let o=f.readdirSync(c).filter(a=>a.endsWith(".sqlite")).map(a=>({name:a,fullPath:e.join(c,a),mtime:f.statSync(e.join(c,a)).mtimeMs})).sort((a,b)=>b.mtime-a.mtime);return 1===o.length?o[0].fullPath:(o.length>1&&h.A.debug(`[local-db] Multiple SQLite files, no hash matched — falling back to wrangler CLI. dir=${c}, tried ids=${JSON.stringify(l)}`),h.A.debug(`[local-db] No SQLite files found. dir=${c}, tried ids=${JSON.stringify(l)}`),null)}function l(a,b){return null!==k(a,b)}function m(a,b){let c=`${a}:${b.database_name}`,d=k(a,b);if(j.has(c)){let a=j.get(c);if(a.path!==d){try{a.db.close()}catch{}j.delete(c)}else try{return a.db.prepare("SELECT 1").get(),a.db}catch{j.delete(c)}}if(!d)return null;try{let a=new g(d,{fileMustExist:!1});return a.pragma("journal_mode = WAL"),a.pragma("foreign_keys = ON"),j.set(c,{db:a,path:d}),a}catch{return null}}function n(a,b,c){let d=m(a,b);if(!d)return null;let e=c.trim(),f=e.toUpperCase().replace(/\s+/g," "),g=e.split(";").map(a=>a.trim()).filter(Boolean);if(g.length>1){let a=[],b=0,c=0;return d.transaction(()=>{for(let e of g){let f=e.toUpperCase().replace(/\s+/g," ");if(f.startsWith("SELECT")||f.startsWith("PRAGMA")||f.startsWith("EXPLAIN")){let b=d.prepare(e).all();a=a.concat(b)}else{let a=d.prepare(e).run();b+=a.changes,c=a.lastInsertRowid}}})(),JSON.stringify([{results:a,success:!0,meta:{changes:b,last_row_id:c,rows_read:a.length,rows_written:b}}])}if(f.startsWith("SELECT")||f.startsWith("PRAGMA")||f.startsWith("EXPLAIN")){let a=d.prepare(e).all();return JSON.stringify([{results:a,success:!0,meta:{rows_read:a.length,rows_written:0,changed_db:!1}}])}let h=d.prepare(e).run();return JSON.stringify([{results:[],success:!0,meta:{changes:h.changes,last_row_id:h.lastInsertRowid,rows_read:0,rows_written:h.changes,changed_db:h.changes>0}}])}function o(a,b){let c=`${a}:${b}`,d=j.get(c);if(d){try{d.db.close()}catch{}j.delete(c)}}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},55591:a=>{a.exports=require("https")},62435:(a,b,c)=>{c.d(b,{A8:()=>u,CM:()=>r,GS:()=>p,Gc:()=>v,JD:()=>o,Sl:()=>t,ai:()=>q,hI:()=>s,k0:()=>m});var d=c(79748),e=c(28354),f=c(79646),g=c(55511),h=c(33873),i=c(89827),j=c(40032),k=c(51082);let l=(0,e.promisify)(f.exec);async function m(a,b,c="local",d=!1){let e="remote"===c?"--remote":"--local",f="remote"===c?`
|
|
2
2
|
CREATE TABLE IF NOT EXISTS d1_migrations (
|
|
3
3
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
4
4
|
name TEXT NOT NULL UNIQUE,
|
|
@@ -11,16 +11,16 @@
|
|
|
11
11
|
checksum TEXT NULL,
|
|
12
12
|
applied_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
|
13
13
|
);
|
|
14
|
-
`;try{await
|
|
14
|
+
`;try{await l(`wrangler d1 execute ${b} ${e} --command="${f.replace(/"/g,'\\"')}"`,{cwd:a}),d&&await l(`wrangler d1 execute ${b} ${e} --command="${"DELETE FROM d1_migrations;".replace(/"/g,'\\"')}"`,{cwd:a})}catch(a){throw k.A.error(`Failed to initialize migrations table in ${c}:`,a),a}}function n(a){let b=new Date().toISOString().replace(/[^0-9]/g,"").slice(0,-3),c=a.type.toLowerCase().replace(/_/g,"-");if("CREATE_INDEX"===a.type){let c=a.description.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-_]/g,"");return`${b}_create-index_${c}.sql`}{let d=`${b}_${{"create-table":"create-table","alter-table":"alter-table","drop-table":"drop-table","drop-index":"drop-index","create-view":"create-view","drop-view":"drop-view","add-foreign-key":"add-foreign-key","drop-foreign-key":"drop-foreign-key","add-constraint":"add-constraint","drop-constraint":"drop-constraint"}[c]||c}_${a.tableName}`;return"ALTER_TABLE"===a.type&&a.description&&(d+=`_${a.description}`),(d=d.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-_]/g,""))+".sql"}}async function o(a){let b=await (0,d.readFile)(a,"utf8");try{let a=(0,i.By)(b);return(0,i.Gq)(a),{isValid:!0,statement:a}}catch(a){return{isValid:!1,errors:a}}}async function p(a,b,c){try{let d=await (0,i.KK)(a,b,"SELECT name, applied_at FROM d1_migrations ORDER BY applied_at;",c,!0);if("string"==typeof d){let a=d.indexOf("[");if(-1!==a){let b=d.substring(a),c=JSON.parse(b);return c[0]?.results||[]}}return[]}catch(b){let a=[b.message,b.details?.originalError,b.details?.stderr,b.details?.stdout].filter(Boolean).join(" ");if(a.includes("no such table")||a.includes("d1_migrations"))return[];throw{type:i.wU.EXECUTION_ERROR,message:"Failed to get remote migrations",details:{error:a||"Failed to execute SQL command",suggestions:["Check remote database permissions","Verify credentials and connection"]}}}}async function q(a,b,{name:c,checksum:d},e="local"){let f="remote"===e?"--remote":"--local";if("local"===e&&d)try{await l(`wrangler d1 execute ${b} ${f} --command="SELECT checksum FROM d1_migrations LIMIT 1;"`,{cwd:a}).catch(()=>!1)||await l(`wrangler d1 execute ${b} ${f} --command="ALTER TABLE d1_migrations ADD COLUMN checksum TEXT;"`,{cwd:a})}catch(a){}let g="remote"!==e&&d?`
|
|
15
15
|
INSERT OR REPLACE INTO d1_migrations (name, checksum, applied_at)
|
|
16
|
-
VALUES ('${
|
|
16
|
+
VALUES ('${c}', '${d}', CURRENT_TIMESTAMP);
|
|
17
17
|
`:`
|
|
18
18
|
INSERT OR REPLACE INTO d1_migrations (name, applied_at)
|
|
19
|
-
VALUES ('${
|
|
20
|
-
`;try{await
|
|
19
|
+
VALUES ('${c}', CURRENT_TIMESTAMP);
|
|
20
|
+
`;try{await l(`wrangler d1 execute ${b} ${f} --command="${g.replace(/"/g,'\\"')}"`,{cwd:a})}catch(a){throw k.A.error("Failed to track migration:",a),a}}async function r(a,b,{name:c,checksum:d},e={},f=!1){let g=f||!d?`
|
|
21
21
|
INSERT OR REPLACE INTO d1_migrations (name, applied_at)
|
|
22
|
-
VALUES ('${
|
|
22
|
+
VALUES ('${c}', CURRENT_TIMESTAMP);
|
|
23
23
|
`:`
|
|
24
24
|
INSERT OR REPLACE INTO d1_migrations (name, checksum, applied_at)
|
|
25
|
-
VALUES ('${
|
|
26
|
-
`;try{await (0,l.KK)(e,t,n,i,s)}catch(e){throw{type:l.wU.EXECUTION_ERROR,message:`Failed to record migration ${r}`,details:{file:r,error:e.message,suggestions:["Check if migration is already recorded"]}}}}async function w(e,t){try{let r=await h(e,t,{}),a=new Map(r.map(e=>[e.name,e]));return{applied:Array.from(a.keys()),count:a.size}}catch(e){throw d.A.error("Failed to compare migrations:",e),e}}function _(e){return(0,n.createHash)("sha256").update(e).digest("hex")}async function T(e,t){try{await u(`wrangler d1 execute ${t} --local --command="SELECT checksum FROM d1_migrations LIMIT 1;"`,{cwd:e})}catch{try{await u(`wrangler d1 execute ${t} --local --command="ALTER TABLE d1_migrations ADD COLUMN checksum TEXT;"`,{cwd:e})}catch{}}}async function y(e,t,r){try{let i=o.join(e,"migrations");await (0,a.mkdir)(i,{recursive:!0});let s=[],n=[],d=[];for(let e of r)e.type===l.Pg.DATA_MODIFICATION?d.push(e):n.push(e);let u=new Map,p="__no_table__";for(let e of n){let t=e.tableName?e.tableName.toLowerCase():p;u.has(t)||u.set(t,[]),u.get(t).push(e)}let g=[...u.keys()].filter(e=>e!==p),h=[];if(g.length>0){let e=g.map(e=>u.get(e)[0]);h=(0,c.IC)(e)}for(let r of h){for(let n of u.get(r)||[])try{if(n.type===l.Pg.DROP_TABLE&&!await (0,l.F9)(e,t,{},n.tableName,!1))throw Error(`no such table: ${n.tableName}`);let r=await (0,l.KK)(e,t,n.sql);if(r&&(r.toLowerCase().includes("syntax error")||r.toLowerCase().includes("sqlite_error")))throw Error(r);let c=m(n),d=o.join(i,c),u=(0,l.tn)(n.sql);await (0,a.writeFile)(d,u,"utf8");let p=_(n.sql);await f(e,t,{name:c,checksum:p},"local"),s.push({type:n.type,table:n.tableName,migration:c,checksum:p})}catch(e){throw e}u.delete(r)}if(u.has(p))for(let r of u.get(p))try{await (0,l.KK)(e,t,r.sql);let n=m(r),c=o.join(i,n),d=(0,l.tn)(r.sql);await (0,a.writeFile)(c,d,"utf8");let u=_(r.sql);await f(e,t,{name:n,checksum:u},"local"),s.push({type:r.type,table:r.tableName||null,migration:n,checksum:u})}catch(e){throw e}for(let r of d)try{await (0,l.KK)(e,t,r.sql),s.push({type:r.type,table:r.tableName||null,executed:!0})}catch(e){throw e}return s}catch(e){throw e}}}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[994,452,391,226],()=>r(6814));module.exports=a})();
|
|
25
|
+
VALUES ('${c}', '${d}', CURRENT_TIMESTAMP);
|
|
26
|
+
`;try{await (0,i.KK)(a,b,g,e,f)}catch(a){throw{type:i.wU.EXECUTION_ERROR,message:`Failed to record migration ${c}`,details:{file:c,error:a.message,suggestions:["Check if migration is already recorded"]}}}}async function s(a,b){try{let c=await p(a,b,{}),d=new Map(c.map(a=>[a.name,a]));return{applied:Array.from(d.keys()),count:d.size}}catch(a){throw k.A.error("Failed to compare migrations:",a),a}}function t(a){return(0,g.createHash)("sha256").update(a).digest("hex")}async function u(a,b){try{await l(`wrangler d1 execute ${b} --local --command="SELECT checksum FROM d1_migrations LIMIT 1;"`,{cwd:a})}catch{try{await l(`wrangler d1 execute ${b} --local --command="ALTER TABLE d1_migrations ADD COLUMN checksum TEXT;"`,{cwd:a})}catch{}}}async function v(a,b,c){try{let e=h.join(a,"migrations");await (0,d.mkdir)(e,{recursive:!0});let f=[],g=[],k=[];for(let a of c)a.type===i.Pg.DATA_MODIFICATION?k.push(a):g.push(a);let l=new Map,m="__no_table__";for(let a of g){let b=a.tableName?a.tableName.toLowerCase():m;l.has(b)||l.set(b,[]),l.get(b).push(a)}let o=[...l.keys()].filter(a=>a!==m),p=[];if(o.length>0){let a=o.map(a=>l.get(a)[0]);p=(0,j.IC)(a)}for(let c of p){for(let g of l.get(c)||[])try{if(g.type===i.Pg.DROP_TABLE&&!await (0,i.F9)(a,b,{},g.tableName,!1))throw Error(`no such table: ${g.tableName}`);let c=await (0,i.KK)(a,b,g.sql);if(c&&(c.toLowerCase().includes("syntax error")||c.toLowerCase().includes("sqlite_error")))throw Error(c);let j=n(g),k=h.join(e,j),l=(0,i.tn)(g.sql);await (0,d.writeFile)(k,l,"utf8");let m=t(g.sql);await q(a,b,{name:j,checksum:m},"local"),f.push({type:g.type,table:g.tableName,migration:j,checksum:m})}catch(a){throw a}l.delete(c)}if(l.has(m))for(let c of l.get(m))try{await (0,i.KK)(a,b,c.sql);let g=n(c),j=h.join(e,g),k=(0,i.tn)(c.sql);await (0,d.writeFile)(j,k,"utf8");let l=t(c.sql);await q(a,b,{name:g,checksum:l},"local"),f.push({type:c.type,table:c.tableName||null,migration:g,checksum:l})}catch(a){throw a}for(let c of k)try{await (0,i.KK)(a,b,c.sql),f.push({type:c.type,table:c.tableName||null,executed:!0})}catch(a){throw a}return f}catch(a){throw a}}},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},73136:a=>{a.exports=require("node:url")},74075:a=>{a.exports=require("zlib")},76760:a=>{a.exports=require("node:path")},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},81630:a=>{a.exports=require("http")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},94735:a=>{a.exports=require("events")},98315:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>M,patchFetch:()=>L,routeModule:()=>H,serverHooks:()=>K,workAsyncStorage:()=>I,workUnitAsyncStorage:()=>J});var d={};c.r(d),c.d(d,{GET:()=>F,OPTIONS:()=>G});var e=c(95736),f=c(9117),g=c(4044),h=c(39326),i=c(32324),j=c(261),k=c(54290),l=c(85328),m=c(38928),n=c(46595),o=c(3421),p=c(17679),q=c(41681),r=c(63446),s=c(86439),t=c(51356),u=c(10641),v=c(63491),w=c(28354),x=c(79646),y=c(79748),z=c(33873),A=c(51082),B=c(62435),C=c(10366);let D=(0,w.promisify)(x.exec);async function E(a,b){let c=b.database_name;try{let c=(0,C.executeLocalSQL)(a,b,"SELECT name, checksum, applied_at FROM d1_migrations ORDER BY applied_at ASC;");if(null!==c){let a=JSON.parse(c);return a[0]?.results||[]}}catch(c){if((c?.message||"").includes("no such column"))try{let c=(0,C.executeLocalSQL)(a,b,"SELECT name, applied_at FROM d1_migrations ORDER BY applied_at ASC;");if(null!==c){let a=JSON.parse(c);return(a[0]?.results||[]).map(a=>({...a,checksum:null}))}}catch{}}try{await (0,B.A8)(a,c);let{stdout:b}=await D(`wrangler d1 execute ${c} --local --command="SELECT name, checksum, applied_at FROM d1_migrations ORDER BY applied_at ASC;" --json`,{cwd:a,timeout:15e3}),d=JSON.parse(b);return d[0]?.results||[]}catch{return[]}}async function F(a){try{let{searchParams:b}=new URL(a.url),c=b.get("db"),d=process.env.D1_PROJECT_DIR;if(!d)throw Error("Project directory not configured");let e=await (0,v.S)(d);if(!e?.config)throw Error("No Wrangler configuration found");let f=e.config;if(!f.d1_databases?.length)throw Error("No D1 databases configured");let g=c?f.d1_databases.find(a=>a.database_name===c):f.d1_databases[0];if(!g)throw Error(`Database not found: ${c}`);g.database_name;let h=g.migrations_dir?z.join(d,g.migrations_dir):z.join(d,"migrations"),i=[];try{i=(await (0,y.readdir)(h)).filter(a=>a.endsWith(".sql")).sort()}catch{}let j=await E(d,g),k=new Map(j.map(a=>[a.name,a])),l=i.map(a=>{let b=k.get(a);return{name:a,applied:!!b,applied_at:b?.applied_at||null,checksum:b?.checksum||null}});return j.forEach(a=>{i.includes(a.name)||l.push({name:a.name,applied:!0,applied_at:a.applied_at,checksum:a.checksum,orphaned:!0})}),u.NextResponse.json({success:!0,migrations:l,migrationsDir:h})}catch(a){return A.A.error("Migrations list error:",a),u.NextResponse.json({success:!1,error:a.message},{status:500})}}async function G(){return new u.NextResponse(null,{status:204})}let H=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/migrations/list/route",pathname:"/api/migrations/list",filename:"route",bundlePath:"app/api/migrations/list/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/migrations/list/route.js",nextConfigOutput:"",userland:d}),{workAsyncStorage:I,workUnitAsyncStorage:J,serverHooks:K}=H;function L(){return(0,g.patchFetch)({workAsyncStorage:I,workUnitAsyncStorage:J})}async function M(a,b,c){var d;let e="/api/migrations/list/route";"/index"===e&&(e="/");let g=await H.prepare(a,b,{srcPage:e,multiZoneDraftMode:!1});if(!g)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:u,params:v,nextConfig:w,isDraftMode:x,prerenderManifest:y,routerServerContext:z,isOnDemandRevalidate:A,revalidateOnlyGenerated:B,resolvedPathname:C}=g,D=(0,j.normalizeAppPath)(e),E=!!(y.dynamicRoutes[D]||y.routes[C]);if(E&&!x){let a=!!y.routes[C],b=y.dynamicRoutes[D];if(b&&!1===b.fallback&&!a)throw new s.NoFallbackError}let F=null;!E||H.isDev||x||(F="/index"===(F=C)?"/":F);let G=!0===H.isDev||!E,I=E&&!G,J=a.method||"GET",K=(0,i.getTracer)(),L=K.getActiveScopeSpan(),M={params:v,prerenderManifest:y,renderOpts:{experimental:{cacheComponents:!!w.experimental.cacheComponents,authInterrupts:!!w.experimental.authInterrupts},supportsDynamicResponse:G,incrementalCache:(0,h.getRequestMeta)(a,"incrementalCache"),cacheLifeProfiles:null==(d=w.experimental)?void 0:d.cacheLife,isRevalidate:I,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d)=>H.onRequestError(a,b,d,z)},sharedContext:{buildId:u}},N=new k.NodeNextRequest(a),O=new k.NodeNextResponse(b),P=l.NextRequestAdapter.fromNodeNextRequest(N,(0,l.signalFromNodeResponse)(b));try{let d=async c=>H.handle(P,M).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let d=K.getRootSpanAttributes();if(!d)return;if(d.get("next.span_type")!==m.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${d.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=d.get("next.route");if(e){let a=`${J} ${e}`;c.setAttributes({"next.route":e,"http.route":e,"next.span_name":a}),c.updateName(a)}else c.updateName(`${J} ${a.url}`)}),g=async g=>{var i,j;let k=async({previousCacheEntry:f})=>{try{if(!(0,h.getRequestMeta)(a,"minimalMode")&&A&&B&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let e=await d(g);a.fetchMetrics=M.renderOpts.fetchMetrics;let i=M.renderOpts.pendingWaitUntil;i&&c.waitUntil&&(c.waitUntil(i),i=void 0);let j=M.renderOpts.collectedTags;if(!E)return await (0,o.I)(N,O,e,M.renderOpts.pendingWaitUntil),null;{let a=await e.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(e.headers);j&&(b[r.NEXT_CACHE_TAGS_HEADER]=j),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==M.renderOpts.collectedRevalidate&&!(M.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&M.renderOpts.collectedRevalidate,d=void 0===M.renderOpts.collectedExpire||M.renderOpts.collectedExpire>=r.INFINITE_CACHE?void 0:M.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:e.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:d}}}}catch(b){throw(null==f?void 0:f.isStale)&&await H.onRequestError(a,b,{routerKind:"App Router",routePath:e,routeType:"route",revalidateReason:(0,n.c)({isRevalidate:I,isOnDemandRevalidate:A})},z),b}},l=await H.handleResponse({req:a,nextConfig:w,cacheKey:F,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:y,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:B,responseGenerator:k,waitUntil:c.waitUntil});if(!E)return null;if((null==l||null==(i=l.value)?void 0:i.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==l||null==(j=l.value)?void 0:j.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});(0,h.getRequestMeta)(a,"minimalMode")||b.setHeader("x-nextjs-cache",A?"REVALIDATED":l.isMiss?"MISS":l.isStale?"STALE":"HIT"),x&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let m=(0,p.fromNodeOutgoingHttpHeaders)(l.value.headers);return(0,h.getRequestMeta)(a,"minimalMode")&&E||m.delete(r.NEXT_CACHE_TAGS_HEADER),!l.cacheControl||b.getHeader("Cache-Control")||m.get("Cache-Control")||m.set("Cache-Control",(0,q.getCacheControlHeader)(l.cacheControl)),await (0,o.I)(N,O,new Response(l.value.body,{headers:m,status:l.value.status||200})),null};L?await g(L):await K.withPropagatedContext(a.headers,()=>K.trace(m.BaseServerSpan.handleRequest,{spanName:`${J} ${a.url}`,kind:i.SpanKind.SERVER,attributes:{"http.method":J,"http.target":a.url}},g))}catch(b){if(b instanceof s.NoFallbackError||await H.onRequestError(a,b,{routerKind:"App Router",routePath:D,routeType:"route",revalidateReason:(0,n.c)({isRevalidate:I,isOnDemandRevalidate:A})}),E)throw b;return await (0,o.I)(N,O,new Response(null,{status:500})),null}}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[873,692,347,626],()=>b(b.s=98315));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../../node_modules/better-sqlite3/build/Release/better_sqlite3.node","../../../../../../node_modules/better-sqlite3/lib/database.js","../../../../../../node_modules/better-sqlite3/lib/index.js","../../../../../../node_modules/better-sqlite3/lib/methods/aggregate.js","../../../../../../node_modules/better-sqlite3/lib/methods/backup.js","../../../../../../node_modules/better-sqlite3/lib/methods/function.js","../../../../../../node_modules/better-sqlite3/lib/methods/inspect.js","../../../../../../node_modules/better-sqlite3/lib/methods/pragma.js","../../../../../../node_modules/better-sqlite3/lib/methods/serialize.js","../../../../../../node_modules/better-sqlite3/lib/methods/table.js","../../../../../../node_modules/better-sqlite3/lib/methods/transaction.js","../../../../../../node_modules/better-sqlite3/lib/methods/wrappers.js","../../../../../../node_modules/better-sqlite3/lib/sqlite-error.js","../../../../../../node_modules/better-sqlite3/lib/util.js","../../../../../../node_modules/better-sqlite3/package.json","../../../../../../node_modules/bindings/bindings.js","../../../../../../node_modules/bindings/package.json","../../../../../../node_modules/file-uri-to-path/index.js","../../../../../../node_modules/file-uri-to-path/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/
|
|
1
|
+
{"version":1,"files":["../../../../../../node_modules/better-sqlite3/build/Release/better_sqlite3.node","../../../../../../node_modules/better-sqlite3/lib/database.js","../../../../../../node_modules/better-sqlite3/lib/index.js","../../../../../../node_modules/better-sqlite3/lib/methods/aggregate.js","../../../../../../node_modules/better-sqlite3/lib/methods/backup.js","../../../../../../node_modules/better-sqlite3/lib/methods/function.js","../../../../../../node_modules/better-sqlite3/lib/methods/inspect.js","../../../../../../node_modules/better-sqlite3/lib/methods/pragma.js","../../../../../../node_modules/better-sqlite3/lib/methods/serialize.js","../../../../../../node_modules/better-sqlite3/lib/methods/table.js","../../../../../../node_modules/better-sqlite3/lib/methods/transaction.js","../../../../../../node_modules/better-sqlite3/lib/methods/wrappers.js","../../../../../../node_modules/better-sqlite3/lib/sqlite-error.js","../../../../../../node_modules/better-sqlite3/lib/util.js","../../../../../../node_modules/better-sqlite3/package.json","../../../../../../node_modules/bindings/bindings.js","../../../../../../node_modules/bindings/package.json","../../../../../../node_modules/file-uri-to-path/index.js","../../../../../../node_modules/file-uri-to-path/package.json","../../../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../../node_modules/next/dist/lib/constants.js","../../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../../node_modules/next/dist/lib/is-error.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/lib/cache-handlers/default.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../../../../../../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../../../../../../node_modules/next/dist/shared/lib/segment.js","../../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/347.js","../../../../chunks/366.js","../../../../chunks/626.js","../../../../chunks/692.js","../../../../chunks/873.js","../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
|