d1s 0.2.5 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/.next/.next/BUILD_ID +1 -1
- package/dist/.next/.next/app-build-manifest.json +31 -24
- package/dist/.next/.next/app-path-routes-manifest.json +1 -1
- package/dist/.next/.next/build-manifest.json +2 -2
- package/dist/.next/.next/cache/.rscinfo +1 -1
- package/dist/.next/.next/cache/.tsbuildinfo +1 -1
- package/dist/.next/.next/cache/webpack/client-development/0.pack.gz +0 -0
- package/dist/.next/.next/cache/webpack/client-development/1.pack.gz +0 -0
- package/dist/.next/.next/cache/webpack/client-development/2.pack.gz +0 -0
- package/dist/.next/.next/cache/webpack/client-development/3.pack.gz +0 -0
- package/dist/.next/.next/cache/webpack/client-development/4.pack.gz +0 -0
- package/dist/.next/.next/cache/webpack/client-development/index.pack.gz +0 -0
- package/dist/.next/.next/cache/webpack/client-development/index.pack.gz.old +0 -0
- package/dist/.next/.next/cache/webpack/client-production/0.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/1.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/10.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/11.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/12.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/13.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/14.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/2.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/3.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/4.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/5.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/6.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/7.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/8.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/9.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/index.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/index.pack.old +0 -0
- package/dist/.next/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/dist/.next/.next/cache/webpack/server-development/0.pack.gz +0 -0
- package/dist/.next/.next/cache/webpack/server-development/1.pack.gz +0 -0
- package/dist/.next/.next/cache/webpack/server-development/2.pack.gz +0 -0
- package/dist/.next/.next/cache/webpack/server-development/3.pack.gz +0 -0
- package/dist/.next/.next/cache/webpack/server-development/4.pack.gz +0 -0
- package/dist/.next/.next/cache/webpack/server-development/index.pack.gz +0 -0
- package/dist/.next/.next/cache/webpack/server-development/index.pack.gz.old +0 -0
- package/dist/.next/.next/cache/webpack/server-production/0.pack +0 -0
- package/dist/.next/.next/cache/webpack/server-production/1.pack +0 -0
- package/dist/.next/.next/cache/webpack/server-production/10.pack +0 -0
- package/dist/.next/.next/cache/webpack/server-production/11.pack +0 -0
- package/dist/.next/.next/cache/webpack/server-production/12.pack +0 -0
- package/dist/.next/.next/cache/webpack/server-production/13.pack +0 -0
- package/dist/.next/.next/cache/webpack/server-production/2.pack +0 -0
- package/dist/.next/.next/cache/webpack/server-production/3.pack +0 -0
- package/dist/.next/.next/cache/webpack/server-production/4.pack +0 -0
- package/dist/.next/.next/cache/webpack/server-production/5.pack +0 -0
- package/dist/.next/.next/cache/webpack/server-production/6.pack +0 -0
- package/dist/.next/.next/cache/webpack/server-production/7.pack +0 -0
- package/dist/.next/.next/cache/webpack/server-production/8.pack +0 -0
- package/dist/.next/.next/cache/webpack/server-production/9.pack +0 -0
- package/dist/.next/.next/cache/webpack/server-production/index.pack +0 -0
- package/dist/.next/.next/cache/webpack/server-production/index.pack.old +0 -0
- package/dist/.next/.next/next-minimal-server.js.nft.json +1 -1
- package/dist/.next/.next/next-server.js.nft.json +1 -1
- package/dist/.next/.next/prerender-manifest.json +1 -1
- package/dist/.next/.next/server/app/_not-found/page.js +1 -1
- package/dist/.next/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/_not-found.html +1 -1
- package/dist/.next/.next/server/app/_not-found.rsc +2 -2
- package/dist/.next/.next/server/app/api/cloudflare/route.js +1 -1
- package/dist/.next/.next/server/app/api/cloudflare/route.js.nft.json +1 -1
- package/dist/.next/.next/server/app/api/cloudflare/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/databases/route.js +1 -1
- package/dist/.next/.next/server/app/api/databases/route.js.nft.json +1 -1
- package/dist/.next/.next/server/app/api/databases/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/migrations/sync/route.js +3 -3
- package/dist/.next/.next/server/app/api/migrations/sync/route.js.nft.json +1 -1
- package/dist/.next/.next/server/app/api/migrations/sync/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/migrations/sync-files/route.js +1 -1
- package/dist/.next/.next/server/app/api/migrations/sync-files/route.js.nft.json +1 -1
- package/dist/.next/.next/server/app/api/migrations/sync-files/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/pull-remote/confirm/route.js +1 -1
- package/dist/.next/.next/server/app/api/pull-remote/confirm/route.js.nft.json +1 -1
- package/dist/.next/.next/server/app/api/pull-remote/confirm/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/pull-remote/preview/route.js +1 -1
- package/dist/.next/.next/server/app/api/pull-remote/preview/route.js.nft.json +1 -1
- package/dist/.next/.next/server/app/api/pull-remote/preview/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/push-remote/confirm/route.js +2 -2
- package/dist/.next/.next/server/app/api/push-remote/confirm/route.js.nft.json +1 -1
- package/dist/.next/.next/server/app/api/push-remote/confirm/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/push-remote/preview/route.js +2 -2
- package/dist/.next/.next/server/app/api/push-remote/preview/route.js.nft.json +1 -1
- package/dist/.next/.next/server/app/api/push-remote/preview/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/query/route.js +2 -2
- package/dist/.next/.next/server/app/api/query/route.js.nft.json +1 -1
- package/dist/.next/.next/server/app/api/query/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/tables/[name]/route.js +4 -4
- package/dist/.next/.next/server/app/api/tables/[name]/route.js.nft.json +1 -1
- package/dist/.next/.next/server/app/api/tables/[name]/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/tables/route.js +2 -2
- package/dist/.next/.next/server/app/api/tables/route.js.nft.json +1 -1
- package/dist/.next/.next/server/app/api/tables/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/update/route.js +5 -0
- package/dist/.next/.next/server/app/api/update/route.js.nft.json +1 -0
- package/dist/.next/.next/server/app/api/update/route_client-reference-manifest.js +1 -0
- package/dist/.next/.next/server/app/index.html +3 -3
- package/dist/.next/.next/server/app/index.rsc +3 -3
- package/dist/.next/.next/server/app/page.js +14 -12
- package/dist/.next/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app-paths-manifest.json +2 -1
- package/dist/.next/.next/server/chunks/336.js +1 -1
- package/dist/.next/.next/server/chunks/391.js +23 -0
- package/dist/.next/.next/server/chunks/452.js +1 -0
- package/dist/.next/.next/server/chunks/627.js +3 -3
- package/dist/.next/.next/server/chunks/638.js +3 -3
- package/dist/.next/.next/server/chunks/686.js +1 -1
- package/dist/.next/.next/server/chunks/801.js +55 -0
- package/dist/.next/.next/server/chunks/992.js +3 -3
- package/dist/.next/.next/server/pages/404.html +1 -1
- package/dist/.next/.next/server/pages/500.html +1 -1
- package/dist/.next/.next/server/pages/_app.js +1 -1
- package/dist/.next/.next/server/pages/_document.js +1 -1
- package/dist/.next/.next/server/pages/_error.js +1 -1
- package/dist/.next/.next/server/pages-manifest.json +1 -1
- package/dist/.next/.next/server/server-reference-manifest.json +1 -1
- package/dist/.next/.next/static/JrwgdSDcipr0Zh7k19Cj_/_buildManifest.js +1 -0
- package/dist/.next/.next/static/chunks/958-98887928efebfdf7.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/cloudflare/route-5133155a604f2719.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/databases/route-63a31080b565794e.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/migrations/sync/route-d97667565b4a59b6.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/migrations/sync-files/route-7089bcbfeb6b5260.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/pull-remote/confirm/route-9143e6e4c3f05162.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/pull-remote/preview/route-c963d143a51aed66.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/push-remote/confirm/route-072132c0a6cb3df3.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/push-remote/preview/route-ca6bf35aa72661ee.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/query/route-1466f6b7ffd8b6c0.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/tables/[name]/route-898d3f85fc8544c4.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/tables/route-91650359fc3735cb.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/update/route-504d663df9124f97.js +1 -0
- package/dist/.next/.next/static/chunks/app/page-2c28a255a4ecd8d4.js +1 -0
- package/dist/.next/.next/static/chunks/app/page-3db7feef57019055.js +1 -0
- package/dist/.next/.next/static/css/4957328384ed5c42.css +3 -0
- package/dist/.next/.next/static/gc8l1G6KXOeLLOM7VJip6/_buildManifest.js +1 -0
- package/dist/.next/.next/static/gc8l1G6KXOeLLOM7VJip6/_ssgManifest.js +1 -0
- package/dist/.next/.next/static/kYsJoni86CJWDuTkc1xU6/_buildManifest.js +1 -0
- package/dist/.next/.next/static/kYsJoni86CJWDuTkc1xU6/_ssgManifest.js +1 -0
- package/dist/.next/.next/static/scC5qwQC9H7rR1groM0Q-/_ssgManifest.js +1 -0
- package/dist/.next/.next/static/tEHOI_-t-iqfJClNzuo9m/_buildManifest.js +1 -0
- package/dist/.next/.next/static/tEHOI_-t-iqfJClNzuo9m/_ssgManifest.js +1 -0
- package/dist/.next/.next/static/vin2VQs5pM_dH2e2_I7AN/_buildManifest.js +1 -0
- package/dist/.next/.next/static/vin2VQs5pM_dH2e2_I7AN/_ssgManifest.js +1 -0
- package/dist/.next/.next/static/wHKwQhaxin5_i06GFVDHb/_buildManifest.js +1 -0
- package/dist/.next/.next/static/wHKwQhaxin5_i06GFVDHb/_ssgManifest.js +1 -0
- package/dist/.next/.next/static/xW4MspD8XibrhXDi_q2IO/_buildManifest.js +1 -0
- package/dist/.next/.next/static/xW4MspD8XibrhXDi_q2IO/_ssgManifest.js +1 -0
- package/dist/.next/.next/trace +3 -3
- package/dist/.next/.next/types/app/api/update/route.ts +347 -0
- package/dist/.next/BUILD_ID +1 -1
- package/dist/.next/app-build-manifest.json +17 -17
- package/dist/.next/app-path-routes-manifest.json +1 -1
- package/dist/.next/build-manifest.json +2 -2
- package/dist/.next/cache/.rscinfo +1 -1
- package/dist/.next/cache/.tsbuildinfo +1 -1
- package/dist/.next/cache/webpack/client-production/0.pack +0 -0
- package/dist/.next/cache/webpack/client-production/index.pack +0 -0
- package/dist/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/dist/.next/cache/webpack/server-production/0.pack +0 -0
- package/dist/.next/cache/webpack/server-production/index.pack +0 -0
- 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 +1 -1
- package/dist/.next/server/app/_not-found.html +1 -1
- package/dist/.next/server/app/_not-found.rsc +1 -1
- package/dist/.next/server/app/api/cloudflare/route.js +1 -1
- package/dist/.next/server/app/api/databases/route.js +1 -1
- package/dist/.next/server/app/api/migrations/sync/route.js +3 -3
- package/dist/.next/server/app/api/migrations/sync/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/migrations/sync-files/route.js +1 -1
- package/dist/.next/server/app/api/migrations/sync-files/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/pull-remote/confirm/route.js +1 -1
- package/dist/.next/server/app/api/pull-remote/confirm/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/pull-remote/preview/route.js +1 -1
- package/dist/.next/server/app/api/pull-remote/preview/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/push-remote/confirm/route.js +2 -2
- package/dist/.next/server/app/api/push-remote/confirm/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/push-remote/preview/route.js +2 -2
- package/dist/.next/server/app/api/push-remote/preview/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/query/route.js +2 -2
- package/dist/.next/server/app/api/query/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/tables/[name]/route.js +4 -4
- package/dist/.next/server/app/api/tables/route.js +2 -2
- package/dist/.next/server/app/index.html +1 -1
- package/dist/.next/server/app/index.rsc +1 -1
- package/dist/.next/server/app-paths-manifest.json +6 -6
- package/dist/.next/server/chunks/801.js +55 -0
- package/dist/.next/server/pages/404.html +1 -1
- package/dist/.next/server/pages/500.html +1 -1
- package/dist/.next/server/server-reference-manifest.json +1 -1
- package/dist/.next/static/ZwNOdZJ0LOtE0AJMNWwzY/_buildManifest.js +1 -0
- package/dist/.next/static/ZwNOdZJ0LOtE0AJMNWwzY/_ssgManifest.js +1 -0
- package/dist/.next/trace +14 -14
- package/dist/app/api/cloudflare/route.js +5 -1
- package/dist/app/api/databases/route.js +3 -4
- package/dist/app/api/migrations/sync/route.js +5 -3
- package/dist/app/api/pull-remote/confirm/route.js +24 -23
- package/dist/app/api/pull-remote/preview/route.js +4 -3
- package/dist/app/api/push-remote/preview/route.js +3 -2
- package/dist/app/api/query/route.js +11 -3
- package/dist/app/api/tables/[name]/route.js +3 -2
- package/dist/app/api/tables/route.js +6 -2
- package/dist/app/app/api/cloudflare/route.js +5 -1
- package/dist/app/app/api/databases/route.js +3 -4
- package/dist/app/app/api/migrations/sync/route.js +5 -3
- package/dist/app/app/api/pull-remote/confirm/route.js +24 -23
- package/dist/app/app/api/pull-remote/preview/route.js +4 -3
- package/dist/app/app/api/push-remote/preview/route.js +3 -2
- package/dist/app/app/api/query/route.js +11 -3
- package/dist/app/app/api/tables/[name]/route.js +3 -2
- package/dist/app/app/api/tables/route.js +6 -2
- package/dist/app/app/api/update/route.js +11 -0
- package/dist/app/app/page.jsx +7 -1
- package/dist/d1-studio.js +94 -58
- package/dist/lib/database-queue.js +34 -30
- package/dist/lib/find-wrangler-config.js +14 -8
- package/dist/lib/logger.js +11 -2
- package/dist/lib/migrations.js +4 -4
- package/dist/lib/schema-operations.js +4 -1
- package/dist/lib/sql-operations.js +8 -1
- package/package.json +5 -2
- package/scripts/studio.js +94 -58
- package/scripts/test.js +280 -82
- package/src/app/api/cloudflare/route.js +5 -1
- package/src/app/api/databases/route.js +3 -4
- package/src/app/api/migrations/sync/route.js +5 -3
- package/src/app/api/pull-remote/confirm/route.js +24 -23
- package/src/app/api/pull-remote/preview/route.js +4 -3
- package/src/app/api/push-remote/preview/route.js +3 -2
- package/src/app/api/query/route.js +11 -3
- package/src/app/api/tables/[name]/route.js +3 -2
- package/src/app/api/tables/route.js +6 -2
- package/src/app/api/update/route.js +11 -0
- package/src/app/page.jsx +7 -1
- package/src/components/update-banner.jsx +64 -0
- package/src/lib/database-queue.js +34 -30
- package/src/lib/find-wrangler-config.js +14 -8
- package/src/lib/logger.js +11 -2
- package/src/lib/migrations.js +4 -4
- package/src/lib/schema-operations.js +4 -1
- package/src/lib/sql-operations.js +8 -1
- package/dist/.next/.next/server/chunks/603.js +0 -55
- package/dist/.next/server/chunks/603.js +0 -55
- /package/dist/.next/.next/static/{q6WmQmyONe88bMN0_jrC2 → IWRJZhjf8U8mjzz4h0VNE}/_buildManifest.js +0 -0
- /package/dist/.next/.next/static/{q6WmQmyONe88bMN0_jrC2 → IWRJZhjf8U8mjzz4h0VNE}/_ssgManifest.js +0 -0
- /package/dist/.next/{static/Tk1fnz_CXLavm23ZEeChG → .next/static/JrwgdSDcipr0Zh7k19Cj_}/_ssgManifest.js +0 -0
- /package/dist/.next/{static/Tk1fnz_CXLavm23ZEeChG → .next/static/scC5qwQC9H7rR1groM0Q-}/_buildManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/_not-found/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/_not-found/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"57174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"87190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"33875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"88903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"84178","name":"*","chunks":[],"async":false}},"5612":{"*":{"id":"56053","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"52652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"61365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"66959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/page.jsx":{"id":5612,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","958","static/chunks/958-98887928efebfdf7.js","735","static/chunks/735-c9144179c6bd7d06.js","974","static/chunks/app/page-2c28a255a4ecd8d4.js"],"async":false}},"entryCSSFiles":{"/Users/karenredona/Desktop/d1studio/src/":[],"/Users/karenredona/Desktop/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/4957328384ed5c42.css"}],"/Users/karenredona/Desktop/d1studio/src/app/page":[],"/Users/karenredona/Desktop/d1studio/src/app/_not-found/page":[]},"rscModuleMapping":{"33":{"*":{"id":"91831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"40802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"48530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"34863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"25155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"5612":{"*":{"id":"46487","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"13164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"88921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"13219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/569ce4b8f30dc480-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/93f479601ee12b01-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/569ce4b8f30dc480-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/93f479601ee12b01-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/4957328384ed5c42.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-c76ac1e586b2802a.js"/><script src="/_next/static/chunks/4bd1b696-8c908eb707f85a27.js" async=""></script><script src="/_next/static/chunks/517-3b698a5d3da06ff7.js" async=""></script><script src="/_next/static/chunks/main-app-d36cdfb402b40f13.js" async=""></script><script src="/_next/static/chunks/692-ede418e1d28a1394.js" async=""></script><script src="/_next/static/chunks/92-c4466e0f1ca8a3a8.js" async=""></script><script src="/_next/static/chunks/735-c9144179c6bd7d06.js" async=""></script><script src="/_next/static/chunks/app/layout-8360fab69b848283.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>d1-studio</title><meta name="description" content="Native D1 database studio."/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_4d318d __variable_ea5f4b antialiased"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>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)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div> <script src="/_next/static/chunks/webpack-c76ac1e586b2802a.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[33,[\"692\",\"static/chunks/692-ede418e1d28a1394.js\",\"92\",\"static/chunks/92-c4466e0f1ca8a3a8.js\",\"735\",\"static/chunks/735-c9144179c6bd7d06.js\",\"177\",\"static/chunks/app/layout-8360fab69b848283.js\"],\"DatabaseProvider\"]\n3:I[5244,[],\"\"]\n4:I[3866,[],\"\"]\n5:I[6124,[\"692\",\"static/chunks/692-ede418e1d28a1394.js\",\"92\",\"static/chunks/92-c4466e0f1ca8a3a8.js\",\"735\",\"static/chunks/735-c9144179c6bd7d06.js\",\"177\",\"static/chunks/app/layout-8360fab69b848283.js\"],\"Toaster\"]\n6:I[6213,[],\"OutletBoundary\"]\n8:I[6213,[],\"MetadataBoundary\"]\na:I[6213,[],\"ViewportBoundary\"]\nc:I[4835,[],\"\"]\n:HL[\"/_next/static/media/569ce4b8f30dc480-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/93f479601ee12b01-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/4957328384ed5c42.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"kYsJoni86CJWDuTkc1xU6\",\"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/4957328384ed5c42.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"__variable_4d318d __variable_ea5f4b antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[],[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],[\"$\",\"$L5\",null,{}],\" \"]}]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L6\",null,{\"children\":\"$L7\"}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$1\",\"C_2laESCPS4CthoEimBz4\",{\"children\":[[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",\"$undefined\"],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"1\",{\"children\":\"d1-studio\"}],[\"$\",\"meta\",\"2\",{\"name\":\"description\",\"content\":\"Native D1 database studio.\"}]]\n"])</script><script>self.__next_f.push([1,"7:null\n"])</script></body></html>
|
|
@@ -9,8 +9,8 @@ a:I[6213,[],"ViewportBoundary"]
|
|
|
9
9
|
c:I[4835,[],""]
|
|
10
10
|
:HL["/_next/static/media/569ce4b8f30dc480-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
11
11
|
:HL["/_next/static/media/93f479601ee12b01-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
12
|
-
:HL["/_next/static/css/
|
|
13
|
-
0:{"P":null,"b":"
|
|
12
|
+
:HL["/_next/static/css/4957328384ed5c42.css","style"]
|
|
13
|
+
0:{"P":null,"b":"kYsJoni86CJWDuTkc1xU6","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/4957328384ed5c42.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__variable_4d318d __variable_ea5f4b antialiased","children":["$","$L2",null,{"children":[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[],[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]]],"forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L5",null,{}]," "]}]}]}]]}],{"children":["/_not-found",["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","/_not-found","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:0:props:notFound:1:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L6",null,{"children":"$L7"}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$1","C_2laESCPS4CthoEimBz4",{"children":[["$","$L8",null,{"children":"$L9"}],["$","$La",null,{"children":"$Lb"}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}]]}],false]],"m":"$undefined","G":["$c","$undefined"],"s":false,"S":true}
|
|
14
14
|
b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
|
15
15
|
9:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"d1-studio"}],["$","meta","2",{"name":"description","content":"Native D1 database studio."}]]
|
|
16
16
|
7:null
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var e={};e.id=999,e.ids=[999],e.modules={
|
|
1
|
+
(()=>{var e={};e.id=999,e.ids=[999],e.modules={10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},44870: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")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},79428:e=>{"use strict";e.exports=require("buffer")},94735:e=>{"use strict";e.exports=require("events")},29021:e=>{"use strict";e.exports=require("fs")},79748:e=>{"use strict";e.exports=require("fs/promises")},81630:e=>{"use strict";e.exports=require("http")},55591:e=>{"use strict";e.exports=require("https")},21820:e=>{"use strict";e.exports=require("os")},33873:e=>{"use strict";e.exports=require("path")},27910:e=>{"use strict";e.exports=require("stream")},41204:e=>{"use strict";e.exports=require("string_decoder")},28354:e=>{"use strict";e.exports=require("util")},74075:e=>{"use strict";e.exports=require("zlib")},73024:e=>{"use strict";e.exports=require("node:fs")},76760:e=>{"use strict";e.exports=require("node:path")},1708:e=>{"use strict";e.exports=require("node:process")},73136:e=>{"use strict";e.exports=require("node:url")},60093:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>j,routeModule:()=>g,serverHooks:()=>w,workAsyncStorage:()=>h,workUnitAsyncStorage:()=>m});var s={};t.r(s),t.d(s,{OPTIONS:()=>x,POST:()=>f});var o=t(42706),a=t(28203),n=t(45994),i=t(39187),u=t(65949),c=t(81804);async function d(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 l(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 d(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 l(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 x(){return new i.NextResponse(null,{status:204})}let g=new o.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/cloudflare/route",pathname:"/api/cloudflare",filename:"route",bundlePath:"app/api/cloudflare/route"},resolvedPagePath:"/Users/karenredona/Desktop/d1studio/src/app/api/cloudflare/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:h,workUnitAsyncStorage:m,serverHooks:w}=g;function j(){return(0,n.patchFetch)({workAsyncStorage:h,workUnitAsyncStorage:m})}},96487:()=>{},78335:()=>{},65949:(e,r,t)=>{"use strict";t.d(r,{S:()=>d});var s=t(79748),o=t(43149),a=t(72537),n=t(26789),i=t(81804);let u=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(u&&c===e)return u;let t=null,d=null;for(let r of["wrangler.toml","wrangler.json","wrangler.jsonc"])if(t=await (0,o.dJ)(r,{cwd:e})){d=r;break}if(!t)return i.A.warn(`No Wrangler configuration file found in: ${e}`),null;i.A.info(`Found ${d} at: ${t}`);let l=await (0,s.readFile)(t,"utf-8");return d.endsWith(".toml")?r=(0,a.parse)(l):(d.endsWith(".jsonc")&&(l=(0,n.A)(l)),r=JSON.parse(l)),u={config:r,projectPath:e},c=e,u}catch(e){throw i.A.error(`Error reading Wrangler configuration: ${e.message}`),e}}},81804:(e,r,t)=>{"use strict";t.d(r,{A:()=>c});var s=t(26399);let{combine:o,timestamp:a,printf:n,colorize:i}=s.format,u=(process.env.DEBUG,n(({level:e,message:r,timestamp:t})=>`${t} ${e}: ${r}`)),c=s.createLogger({level:"warn",format:o(a({format:"YYYY-MM-DD HH:mm:ss"}),i(),u),transports:[new s.transports.Console({level:"warn",silent:!1})]})}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[638,452,391],()=>t(60093));module.exports=s})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/
|
|
1
|
+
{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/391.js","../../../chunks/452.js","../../../chunks/638.js","../../../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/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/cloudflare/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"57174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"87190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"33875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"88903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"84178","name":"*","chunks":[],"async":false}},"5612":{"*":{"id":"56053","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"52652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"61365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"66959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/page.jsx":{"id":5612,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","958","static/chunks/958-98887928efebfdf7.js","735","static/chunks/735-c9144179c6bd7d06.js","974","static/chunks/app/page-2c28a255a4ecd8d4.js"],"async":false}},"entryCSSFiles":{"/Users/karenredona/Desktop/d1studio/src/":[],"/Users/karenredona/Desktop/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/4957328384ed5c42.css"}],"/Users/karenredona/Desktop/d1studio/src/app/page":[],"/Users/karenredona/Desktop/d1studio/src/app/api/cloudflare/route":[]},"rscModuleMapping":{"33":{"*":{"id":"91831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"40802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"48530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"34863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"25155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"5612":{"*":{"id":"46487","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"13164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"88921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"13219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var e={};e.id=952,e.ids=[952],e.modules={
|
|
1
|
+
(()=>{var e={};e.id=952,e.ids=[952],e.modules={10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},44870: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")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},79428:e=>{"use strict";e.exports=require("buffer")},94735:e=>{"use strict";e.exports=require("events")},29021:e=>{"use strict";e.exports=require("fs")},79748:e=>{"use strict";e.exports=require("fs/promises")},81630:e=>{"use strict";e.exports=require("http")},55591:e=>{"use strict";e.exports=require("https")},21820:e=>{"use strict";e.exports=require("os")},33873:e=>{"use strict";e.exports=require("path")},27910:e=>{"use strict";e.exports=require("stream")},41204:e=>{"use strict";e.exports=require("string_decoder")},28354:e=>{"use strict";e.exports=require("util")},74075:e=>{"use strict";e.exports=require("zlib")},73024:e=>{"use strict";e.exports=require("node:fs")},76760:e=>{"use strict";e.exports=require("node:path")},1708:e=>{"use strict";e.exports=require("node:process")},73136:e=>{"use strict";e.exports=require("node:url")},16731:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>h,routeModule:()=>l,serverHooks:()=>x,workAsyncStorage:()=>f,workUnitAsyncStorage:()=>g});var s={};t.r(s),t.d(s,{GET:()=>d,OPTIONS:()=>p});var o=t(42706),n=t(28203),a=t(45994),i=t(39187),u=t(65949),c=t(81804);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"),i.NextResponse.json({error:"Project directory not configured"},{status:500});let r=await (0,u.S)(e);if(!r||!r.config)return i.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let t=r.config;if(!t.d1_databases?.length)return i.NextResponse.json({error:"No D1 databases configured in Wrangler configuration"},{status:404});return i.NextResponse.json({databases:t.d1_databases,debug:{projectDir:e,configPath:r.configPath||"N/A",databaseCount:t.d1_databases.length}})}catch(e){return c.A.error("Error reading database configuration:",e),i.NextResponse.json({error:"Failed to read database configuration",details:e.message,debug:{errorCode:e.code,errorStack:e.stack}},{status:500})}}async function p(){return new i.NextResponse(null,{status:204,headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, OPTIONS","Access-Control-Allow-Headers":"Content-Type"}})}let l=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/databases/route",pathname:"/api/databases",filename:"route",bundlePath:"app/api/databases/route"},resolvedPagePath:"/Users/karenredona/Desktop/d1studio/src/app/api/databases/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:f,workUnitAsyncStorage:g,serverHooks:x}=l;function h(){return(0,a.patchFetch)({workAsyncStorage:f,workUnitAsyncStorage:g})}},96487:()=>{},78335:()=>{},65949:(e,r,t)=>{"use strict";t.d(r,{S:()=>d});var s=t(79748),o=t(43149),n=t(72537),a=t(26789),i=t(81804);let u=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(u&&c===e)return u;let t=null,d=null;for(let r of["wrangler.toml","wrangler.json","wrangler.jsonc"])if(t=await (0,o.dJ)(r,{cwd:e})){d=r;break}if(!t)return i.A.warn(`No Wrangler configuration file found in: ${e}`),null;i.A.info(`Found ${d} at: ${t}`);let p=await (0,s.readFile)(t,"utf-8");return d.endsWith(".toml")?r=(0,n.parse)(p):(d.endsWith(".jsonc")&&(p=(0,a.A)(p)),r=JSON.parse(p)),u={config:r,projectPath:e},c=e,u}catch(e){throw i.A.error(`Error reading Wrangler configuration: ${e.message}`),e}}},81804:(e,r,t)=>{"use strict";t.d(r,{A:()=>c});var s=t(26399);let{combine:o,timestamp:n,printf:a,colorize:i}=s.format,u=(process.env.DEBUG,a(({level:e,message:r,timestamp:t})=>`${t} ${e}: ${r}`)),c=s.createLogger({level:"warn",format:o(n({format:"YYYY-MM-DD HH:mm:ss"}),i(),u),transports:[new s.transports.Console({level:"warn",silent:!1})]})}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[638,452,391],()=>t(16731));module.exports=s})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/
|
|
1
|
+
{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/391.js","../../../chunks/452.js","../../../chunks/638.js","../../../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/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/databases/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"57174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"87190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"33875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"88903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"84178","name":"*","chunks":[],"async":false}},"5612":{"*":{"id":"56053","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"52652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"61365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"66959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/page.jsx":{"id":5612,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","958","static/chunks/958-98887928efebfdf7.js","735","static/chunks/735-c9144179c6bd7d06.js","974","static/chunks/app/page-2c28a255a4ecd8d4.js"],"async":false}},"entryCSSFiles":{"/Users/karenredona/Desktop/d1studio/src/":[],"/Users/karenredona/Desktop/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/4957328384ed5c42.css"}],"/Users/karenredona/Desktop/d1studio/src/app/page":[],"/Users/karenredona/Desktop/d1studio/src/app/api/databases/route":[]},"rscModuleMapping":{"33":{"*":{"id":"91831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"40802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"48530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"34863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"25155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"5612":{"*":{"id":"46487","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"13164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"88921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"13219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";(()=>{var e={};e.id=105,e.ids=[105],e.modules={
|
|
1
|
+
"use strict";(()=>{var e={};e.id=105,e.ids=[105],e.modules={10846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},44870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},29294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},63033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},94735:e=>{e.exports=require("events")},29021:e=>{e.exports=require("fs")},79748:e=>{e.exports=require("fs/promises")},81630:e=>{e.exports=require("http")},55591:e=>{e.exports=require("https")},21820:e=>{e.exports=require("os")},33873:e=>{e.exports=require("path")},27910:e=>{e.exports=require("stream")},41204:e=>{e.exports=require("string_decoder")},28354:e=>{e.exports=require("util")},74075:e=>{e.exports=require("zlib")},73024:e=>{e.exports=require("node:fs")},76760:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},73136:e=>{e.exports=require("node:url")},86675:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>h,routeModule:()=>f,serverHooks:()=>N,workAsyncStorage:()=>R,workUnitAsyncStorage:()=>A});var s={};t.r(s),t.d(s,{OPTIONS:()=>g,POST:()=>E});var o=t(42706),n=t(28203),a=t(45994),i=t(39187),p=t(65949),u=t(79748),c=t(33873),d=t(30961),m=t(28354),l=t(79646),x=t(81804);let T=(0,m.promisify)(l.exec);async function E(e){x.A.logRequest("POST","/api/migrations/sync");try{let{accountId:r,apiToken:t}=await e.json(),s=process.env.D1_PROJECT_DIR;if(!s)return x.A.error("Project directory not configured"),i.NextResponse.json({error:"Project directory not configured"},{status:500});let o=await (0,p.S)(s);if(!o||!o.config)return i.NextResponse.json({error:"No Wrangler configuration file found in project directory"},{status:404});let n=o.config;if(!n.d1_databases?.length)return i.NextResponse.json({error:"No D1 databases configured"},{status:404});let a=n.d1_databases[0].database_name;await T(`wrangler d1 execute ${a} --remote --command="
|
|
2
2
|
CREATE TABLE IF NOT EXISTS d1_migrations (
|
|
3
3
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
4
4
|
name TEXT NOT NULL UNIQUE,
|
|
5
5
|
applied_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
|
6
|
-
);"`,{env:{...process.env,CLOUDFLARE_ACCOUNT_ID:r,CLOUDFLARE_API_TOKEN:t},cwd:s}),await
|
|
6
|
+
);"`,{env:{...process.env,CLOUDFLARE_ACCOUNT_ID:r,CLOUDFLARE_API_TOKEN:t},cwd:s}),await T(`wrangler d1 execute ${a} --local --command="
|
|
7
7
|
CREATE TABLE IF NOT EXISTS d1_migrations (
|
|
8
8
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
9
9
|
name TEXT NOT NULL UNIQUE,
|
|
10
10
|
checksum TEXT DEFAULT NULL,
|
|
11
11
|
applied_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
|
12
|
-
);"`,{cwd:s});let m=await (0,d.hI)(s,a),l={applied:[],failed:[],skipped:[]};for(let e of m.pending)try{let o=c.join(s,"migrations",e.name),n=await (0,u.readFile)(o,"utf8"),i=await
|
|
12
|
+
);"`,{cwd:s});let m=await (0,d.hI)(s,a),l={applied:[],failed:[],skipped:[]};for(let e of m.pending)try{let o=c.join(s,"migrations",e.name),n=await (0,u.readFile)(o,"utf8"),i=await T(`wrangler d1 execute ${a} --remote --command='${n.replace(/'/g,"''")}'`,{env:{...i.env,CLOUDFLARE_ACCOUNT_ID:r,CLOUDFLARE_API_TOKEN:t},cwd:s});await (0,d.ai)(s,a,{name:e.name,environment:"remote",status:"applied",checksum:(0,d.Sl)(n),version:e.version}),l.applied.push(e.name)}catch(r){console.error(`Failed to apply migration ${e.name}:`,r),await (0,d.ai)(s,a,{name:e.name,environment:"remote",status:"failed",checksum:e.checksum,version:e.version,errorMessage:r.message}),l.failed.push({name:e.name,error:r.message})}for(let e of m.conflicts)l.skipped.push({name:e.name,reason:"Checksum mismatch between environments"});return i.NextResponse.json({success:!0,results:{...l,synced:m.synced}})}catch(e){return x.A.logError(e,"migrations-sync-route"),i.NextResponse.json({success:!1,error:{message:"Failed to sync migrations",details:e.message}},{status:500})}}async function g(){return new i.NextResponse(null,{status:204})}let f=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/migrations/sync/route",pathname:"/api/migrations/sync",filename:"route",bundlePath:"app/api/migrations/sync/route"},resolvedPagePath:"/Users/karenredona/Desktop/d1studio/src/app/api/migrations/sync/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:R,workUnitAsyncStorage:A,serverHooks:N}=f;function h(){return(0,a.patchFetch)({workAsyncStorage:R,workUnitAsyncStorage:A})}}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[638,452,391,801],()=>t(86675));module.exports=s})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/
|
|
1
|
+
{"version":1,"files":["../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/391.js","../../../../chunks/452.js","../../../../chunks/638.js","../../../../chunks/801.js","../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/migrations/sync/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/migrations/sync/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"57174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"87190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"33875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"88903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"84178","name":"*","chunks":[],"async":false}},"5612":{"*":{"id":"56053","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"52652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"61365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"66959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-c4466e0f1ca8a3a8.js","735","static/chunks/735-c9144179c6bd7d06.js","177","static/chunks/app/layout-8360fab69b848283.js"],"async":false},"/Users/karenredona/Desktop/d1studio/src/app/page.jsx":{"id":5612,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","958","static/chunks/958-98887928efebfdf7.js","735","static/chunks/735-c9144179c6bd7d06.js","974","static/chunks/app/page-2c28a255a4ecd8d4.js"],"async":false}},"entryCSSFiles":{"/Users/karenredona/Desktop/d1studio/src/":[],"/Users/karenredona/Desktop/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/4957328384ed5c42.css"}],"/Users/karenredona/Desktop/d1studio/src/app/page":[],"/Users/karenredona/Desktop/d1studio/src/app/api/migrations/sync/route":[]},"rscModuleMapping":{"33":{"*":{"id":"91831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"40802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"48530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"34863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"25155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"5612":{"*":{"id":"46487","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"13164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"88921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"13219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var e={};e.id=51,e.ids=[51],e.modules={
|
|
1
|
+
"use strict";(()=>{var e={};e.id=51,e.ids=[51],e.modules={10846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},44870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},29294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},63033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},94735:e=>{e.exports=require("events")},29021:e=>{e.exports=require("fs")},79748:e=>{e.exports=require("fs/promises")},81630:e=>{e.exports=require("http")},55591:e=>{e.exports=require("https")},21820:e=>{e.exports=require("os")},33873:e=>{e.exports=require("path")},27910:e=>{e.exports=require("stream")},41204:e=>{e.exports=require("string_decoder")},28354:e=>{e.exports=require("util")},74075:e=>{e.exports=require("zlib")},73024:e=>{e.exports=require("node:fs")},76760:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},73136:e=>{e.exports=require("node:url")},87147:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>j,routeModule:()=>w,serverHooks:()=>R,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>E});var s={};t.r(s),t.d(s,{OPTIONS:()=>y,POST:()=>q});var o=t(42706),a=t(28203),n=t(45994),i=t(39187),u=t(65949),d=t(79748),p=t(33873),c=t(28354),l=t(79646),m=t(30961);let x=(0,c.promisify)(l.exec);async function g(e,r){try{let{stdout:t}=await x(`wrangler d1 execute ${r} --local --command="SELECT name, checksum FROM d1_migrations;" --json`,{cwd:e}),s=JSON.parse(t);return s.results?.[0]?.results||[]}catch(e){throw console.error("Error getting database migrations:",e),Error("Failed to get database migrations")}}async function f(e){try{let r=p.join(e,"migrations"),t=await (0,d.readdir)(r);return(await Promise.all(t.filter(e=>e.endsWith(".sql")).map(async e=>{let t=p.join(r,e),s=await (0,d.readFile)(t,"utf8");return{name:e,path:t,content:s,checksum:(0,m.Sl)(s)}}))).sort((e,r)=>e.name.localeCompare(r.name))}catch(e){if("ENOENT"===e.code)return[];throw Error("Failed to read migration files")}}async function h(e,r,t){try{return await x(`wrangler d1 execute ${r} --local --command="${t.replace(/"/g,'\\"')}"`,{cwd:e}),!0}catch(e){throw console.error("Query execution error:",e),Error("Failed to execute database query")}}async function q(e){try{let e=process.env.D1_PROJECT_DIR;if(!e)return i.NextResponse.json({error:"Project directory not configured"},{status:500});let r=await (0,u.S)(e);if(!r||!r.config)return i.NextResponse.json({error:"Could not find Wrangler configuration"},{status:404});let t=r.config;if(!t.d1_databases?.length)return i.NextResponse.json({error:"No D1 databases configured"},{status:404});let s=t.d1_databases[0].database_name,[o,a]=await Promise.all([g(e,s),f(e)]),n=new Map(o.map(e=>[e.name,e])),d=new Map(a.map(e=>[e.name,e])),p={added:[],removed:[],unchanged:[]};for(let[e]of n)d.has(e)||p.removed.push(e);if(p.removed.length>0){let r=p.removed.map(e=>`'${e}'`).join(",");await h(e,s,`DELETE FROM d1_migrations WHERE name IN (${r});`)}for(let[r,t]of d)n.get(r)?p.unchanged.push(r):(p.added.push(r),await h(e,s,`INSERT OR REPLACE INTO d1_migrations (name, checksum) VALUES ('${r}', '${t.checksum}');`));return i.NextResponse.json({success:!0,details:{added:p.added,removed:p.removed,unchanged:p.unchanged}})}catch(e){return console.error("Migration file sync error:",e),i.NextResponse.json({error:e.message||"Failed to sync migrations"},{status:500})}}async function y(){return new i.NextResponse(null,{status:204})}let w=new o.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/migrations/sync-files/route",pathname:"/api/migrations/sync-files",filename:"route",bundlePath:"app/api/migrations/sync-files/route"},resolvedPagePath:"/Users/karenredona/Desktop/d1studio/src/app/api/migrations/sync-files/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:v,workUnitAsyncStorage:E,serverHooks:R}=w;function j(){return(0,n.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:E})}}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[638,452,391,801],()=>t(87147));module.exports=s})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/
|
|
1
|
+
{"version":1,"files":["../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/391.js","../../../../chunks/452.js","../../../../chunks/638.js","../../../../chunks/801.js","../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
|