d1s 0.2.13 → 0.3.0
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 +14 -1
- package/dist/.next/.next/BUILD_ID +1 -1
- package/dist/.next/.next/app-build-manifest.json +121 -79
- package/dist/.next/.next/app-path-routes-manifest.json +1 -1
- package/dist/.next/.next/build-manifest.json +7 -7
- 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/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/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/index.pack.gz +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/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/react-loadable-manifest.json +11 -1
- package/dist/.next/.next/required-server-files.json +1 -1
- package/dist/.next/.next/routes-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.js.nft.json +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 +5 -5
- 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/list/route.js +26 -0
- package/dist/.next/.next/server/app/api/migrations/list/route.js.nft.json +1 -0
- package/dist/.next/.next/server/app/api/migrations/list/route_client-reference-manifest.js +1 -0
- package/dist/.next/.next/server/app/api/migrations/sync/route.js +5 -5
- 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 +4 -4
- 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/pro/route.js +1 -0
- package/dist/.next/.next/server/app/api/pro/route.js.nft.json +1 -0
- package/dist/.next/.next/server/app/api/pro/route_client-reference-manifest.js +1 -0
- package/dist/.next/.next/server/app/api/pull-data/confirm/route.js +1 -1
- package/dist/.next/.next/server/app/api/pull-data/confirm/route.js.nft.json +1 -1
- package/dist/.next/.next/server/app/api/pull-data/confirm/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/pull-remote/confirm/route.js +4 -4
- 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 +4 -4
- 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 +6 -6
- 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 +6 -6
- 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 +9 -9
- 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/schema/route.js +1 -0
- package/dist/.next/.next/server/app/api/schema/route.js.nft.json +1 -0
- package/dist/.next/.next/server/app/api/schema/route_client-reference-manifest.js +1 -0
- package/dist/.next/.next/server/app/api/tables/[name]/import/route.js +1 -0
- package/dist/.next/.next/server/app/api/tables/[name]/import/route.js.nft.json +1 -0
- package/dist/.next/.next/server/app/api/tables/[name]/import/route_client-reference-manifest.js +1 -0
- package/dist/.next/.next/server/app/api/tables/[name]/route.js +5 -5
- 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/time-travel/preview/route.js +1 -0
- package/dist/.next/.next/server/app/api/time-travel/preview/route.js.nft.json +1 -0
- package/dist/.next/.next/server/app/api/time-travel/preview/route_client-reference-manifest.js +1 -0
- package/dist/.next/.next/server/app/api/time-travel/restore/route.js +1 -0
- package/dist/.next/.next/server/app/api/time-travel/restore/route.js.nft.json +1 -0
- package/dist/.next/.next/server/app/api/time-travel/restore/route_client-reference-manifest.js +1 -0
- package/dist/.next/.next/server/app/api/update/route.js +1 -1
- package/dist/.next/.next/server/app/api/update/route.js.nft.json +1 -1
- package/dist/.next/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/index.html +5 -3
- package/dist/.next/.next/server/app/index.rsc +6 -6
- package/dist/.next/.next/server/app/page.js +15 -15
- package/dist/.next/.next/server/app/page.js.nft.json +1 -1
- package/dist/.next/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app-paths-manifest.json +10 -4
- package/dist/.next/.next/server/chunks/226.js +12 -12
- package/dist/.next/.next/server/chunks/391.js +1 -1
- package/dist/.next/.next/server/chunks/452.js +1 -1
- package/dist/.next/.next/server/chunks/487.js +1 -0
- package/dist/.next/.next/server/chunks/572.js +1 -1
- package/dist/.next/.next/server/chunks/992.js +3 -3
- package/dist/.next/{server/chunks/638.js → .next/server/chunks/994.js} +3 -3
- package/dist/.next/.next/server/middleware-build-manifest.js +1 -1
- package/dist/.next/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/dist/.next/.next/server/next-font-manifest.js +1 -1
- package/dist/.next/.next/server/next-font-manifest.json +1 -1
- 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-manifest.json +1 -1
- package/dist/.next/.next/server/server-reference-manifest.json +1 -1
- package/dist/.next/.next/static/-OO4tE7EKr8o62Bne-ODo/_buildManifest.js +1 -0
- package/dist/.next/.next/static/3kAeIJC56X7aw1Fk5_OXO/_buildManifest.js +1 -0
- package/dist/.next/.next/static/J8r9W6xxmYYvuKehItNuW/_buildManifest.js +1 -0
- package/dist/.next/.next/static/arc9h7hbaQzL1Dl0iuVrT/_buildManifest.js +1 -0
- package/dist/.next/.next/static/chunks/1a258343.3b3e7ba5ba0bd0d2.js +1 -0
- package/dist/.next/.next/static/chunks/345.8fc37569d5708622.js +1 -0
- package/dist/.next/.next/static/chunks/480-85b6c8ae3f51b156.js +1 -0
- package/dist/.next/.next/static/chunks/52.2cdc9bdb75e1fc2e.js +1 -0
- package/dist/.next/.next/static/chunks/803-a2fcfbd00e6b3b38.js +1 -0
- package/dist/.next/.next/static/chunks/{92-5f7522943fcb72a8.js → 92-a84bdac2be7c8d7a.js} +1 -1
- package/dist/.next/.next/static/chunks/app/api/cloudflare/route-d0c1dc2a9e7dce36.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/databases/route-cd322321212797cf.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/migrations/list/route-cd710ff75b6bcd02.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/migrations/sync/route-ee522f232b9f0a9c.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/migrations/sync-files/route-79ee2c26f87d3bc7.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/pro/route-c90c1f901fc00d38.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/pull-data/confirm/route-118764086af798f8.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/pull-remote/confirm/route-2b0ade4ebfcea0bc.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/pull-remote/preview/route-342db7ea13e6f447.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/push-remote/confirm/route-b778c053bd515abd.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/push-remote/preview/route-ab090482f299f57f.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/query/route-4d21a8b1d34491f1.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/schema/route-cb17a387d6b557ad.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/tables/[name]/import/route-510472de7a5c29bd.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/tables/[name]/route-6a1fa95c303ce0de.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/tables/route-daa975df4ea8e8f8.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/time-travel/preview/route-5787d7e8f17bd539.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/time-travel/restore/route-84b64a27e831e21c.js +1 -0
- package/dist/.next/.next/static/chunks/app/api/update/route-54ee900537982652.js +1 -0
- package/dist/.next/.next/static/chunks/app/{layout-40ec07d04681ba81.js → layout-f0ec4d636ee0f763.js} +1 -1
- package/dist/.next/.next/static/chunks/app/page-358bf2112802ff85.js +1 -0
- package/dist/.next/.next/static/chunks/webpack-024900a94af4f0a7.js +1 -0
- package/dist/.next/.next/static/css/2c165a0ede9b2442.css +3 -0
- package/dist/.next/.next/static/css/32df9a4d493f8b0f.css +31 -0
- package/dist/.next/.next/static/fiesjBWbrmSSyLf4biwrX/_buildManifest.js +1 -0
- package/dist/.next/.next/static/ft39e6W6vSgUL7peRo7pE/_buildManifest.js +1 -0
- package/dist/.next/.next/static/media/4cf2300e9c8272f7-s.p.woff2 +0 -0
- package/dist/.next/.next/static/u7ssdTycF4iQ-w-pQZhxg/_buildManifest.js +1 -0
- package/dist/.next/.next/trace +3 -3
- package/dist/.next/.next/types/app/api/migrations/list/route.ts +347 -0
- package/dist/.next/.next/types/app/api/pro/route.ts +347 -0
- package/dist/.next/.next/types/app/api/schema/route.ts +347 -0
- package/dist/.next/.next/types/app/api/tables/[name]/import/route.ts +347 -0
- package/dist/.next/.next/types/app/api/time-travel/preview/route.ts +347 -0
- package/dist/.next/.next/types/app/api/time-travel/restore/route.ts +347 -0
- package/dist/.next/BUILD_ID +1 -1
- package/dist/.next/app-build-manifest.json +122 -80
- package/dist/.next/app-path-routes-manifest.json +1 -1
- package/dist/.next/build-manifest.json +7 -7
- 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/react-loadable-manifest.json +11 -1
- package/dist/.next/required-server-files.json +1 -1
- package/dist/.next/routes-manifest.json +1 -1
- package/dist/.next/server/app/_not-found/page.js +1 -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.rsc +5 -5
- 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 +26 -0
- package/dist/.next/server/app/api/migrations/list/route.js.nft.json +1 -0
- package/dist/.next/server/app/api/migrations/list/route_client-reference-manifest.js +1 -0
- package/dist/.next/server/app/api/migrations/sync/route.js +5 -5
- 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 +4 -4
- 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 -0
- package/dist/.next/server/app/api/pro/route.js.nft.json +1 -0
- package/dist/.next/server/app/api/pro/route_client-reference-manifest.js +1 -0
- 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 +4 -4
- 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 +4 -4
- 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 +6 -6
- 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 +6 -6
- 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 -0
- package/dist/.next/server/app/api/schema/route.js.nft.json +1 -0
- package/dist/.next/server/app/api/schema/route_client-reference-manifest.js +1 -0
- package/dist/.next/server/app/api/tables/[name]/import/route.js +1 -0
- package/dist/.next/server/app/api/tables/[name]/import/route.js.nft.json +1 -0
- package/dist/.next/server/app/api/tables/[name]/import/route_client-reference-manifest.js +1 -0
- 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 -0
- package/dist/.next/server/app/api/time-travel/preview/route.js.nft.json +1 -0
- package/dist/.next/server/app/api/time-travel/preview/route_client-reference-manifest.js +1 -0
- package/dist/.next/server/app/api/time-travel/restore/route.js +1 -0
- package/dist/.next/server/app/api/time-travel/restore/route.js.nft.json +1 -0
- package/dist/.next/server/app/api/time-travel/restore/route_client-reference-manifest.js +1 -0
- 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 +5 -3
- package/dist/.next/server/app/index.rsc +6 -6
- package/dist/.next/server/app/page.js +15 -15
- 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 +11 -5
- package/dist/.next/server/chunks/226.js +12 -12
- package/dist/.next/server/chunks/391.js +1 -1
- package/dist/.next/server/chunks/452.js +1 -1
- package/dist/.next/server/chunks/487.js +1 -0
- package/dist/.next/server/chunks/572.js +1 -1
- package/dist/.next/server/chunks/992.js +3 -3
- package/dist/.next/{.next/server/chunks/638.js → server/chunks/994.js} +3 -3
- 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/next-font-manifest.js +1 -1
- package/dist/.next/server/next-font-manifest.json +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-manifest.json +1 -1
- package/dist/.next/server/server-reference-manifest.json +1 -1
- package/dist/.next/static/chunks/1a258343.3b3e7ba5ba0bd0d2.js +1 -0
- package/dist/.next/static/chunks/345.8fc37569d5708622.js +1 -0
- package/dist/.next/static/chunks/480-85b6c8ae3f51b156.js +1 -0
- package/dist/.next/static/chunks/52.2cdc9bdb75e1fc2e.js +1 -0
- package/dist/.next/static/chunks/803-a2fcfbd00e6b3b38.js +1 -0
- package/dist/.next/static/chunks/{92-5f7522943fcb72a8.js → 92-a84bdac2be7c8d7a.js} +1 -1
- package/dist/.next/static/chunks/app/api/cloudflare/route-d0c1dc2a9e7dce36.js +1 -0
- package/dist/.next/static/chunks/app/api/databases/route-cd322321212797cf.js +1 -0
- package/dist/.next/static/chunks/app/api/migrations/list/route-cd710ff75b6bcd02.js +1 -0
- package/dist/.next/static/chunks/app/api/migrations/sync/route-ee522f232b9f0a9c.js +1 -0
- package/dist/.next/static/chunks/app/api/migrations/sync-files/route-79ee2c26f87d3bc7.js +1 -0
- package/dist/.next/static/chunks/app/api/pro/route-c90c1f901fc00d38.js +1 -0
- package/dist/.next/static/chunks/app/api/pull-data/confirm/route-118764086af798f8.js +1 -0
- package/dist/.next/static/chunks/app/api/pull-remote/confirm/route-2b0ade4ebfcea0bc.js +1 -0
- package/dist/.next/static/chunks/app/api/pull-remote/preview/route-342db7ea13e6f447.js +1 -0
- package/dist/.next/static/chunks/app/api/push-remote/confirm/route-b778c053bd515abd.js +1 -0
- package/dist/.next/static/chunks/app/api/push-remote/preview/route-ab090482f299f57f.js +1 -0
- package/dist/.next/static/chunks/app/api/query/route-4d21a8b1d34491f1.js +1 -0
- package/dist/.next/static/chunks/app/api/schema/route-cb17a387d6b557ad.js +1 -0
- package/dist/.next/static/chunks/app/api/tables/[name]/import/route-510472de7a5c29bd.js +1 -0
- package/dist/.next/static/chunks/app/api/tables/[name]/route-6a1fa95c303ce0de.js +1 -0
- package/dist/.next/static/chunks/app/api/tables/route-daa975df4ea8e8f8.js +1 -0
- package/dist/.next/static/chunks/app/api/time-travel/preview/route-5787d7e8f17bd539.js +1 -0
- package/dist/.next/static/chunks/app/api/time-travel/restore/route-84b64a27e831e21c.js +1 -0
- package/dist/.next/static/chunks/app/api/update/route-54ee900537982652.js +1 -0
- package/dist/.next/static/chunks/app/{layout-40ec07d04681ba81.js → layout-f0ec4d636ee0f763.js} +1 -1
- package/dist/.next/static/chunks/app/page-358bf2112802ff85.js +1 -0
- package/dist/.next/static/chunks/webpack-024900a94af4f0a7.js +1 -0
- package/dist/.next/static/css/2c165a0ede9b2442.css +3 -0
- package/dist/.next/static/css/32df9a4d493f8b0f.css +31 -0
- package/dist/.next/static/media/4cf2300e9c8272f7-s.p.woff2 +0 -0
- package/dist/.next/static/zh4Fz2tbm8GRka4woRrGp/_buildManifest.js +1 -0
- package/dist/.next/trace +18 -3
- package/dist/.next/types/app/api/migrations/list/route.ts +347 -0
- package/dist/.next/types/app/api/pro/route.ts +347 -0
- package/dist/.next/types/app/api/schema/route.ts +347 -0
- package/dist/.next/types/app/api/tables/[name]/import/route.ts +347 -0
- package/dist/.next/types/app/api/time-travel/preview/route.ts +347 -0
- package/dist/.next/types/app/api/time-travel/restore/route.ts +347 -0
- package/dist/app/api/databases/route.js +2 -1
- package/dist/app/api/migrations/list/route.js +137 -0
- package/dist/app/api/migrations/sync-files/route.js +2 -1
- package/dist/app/api/pro/route.js +7 -0
- package/dist/app/api/pull-remote/confirm/route.js +138 -146
- package/dist/app/api/pull-remote/preview/route.js +49 -84
- package/dist/app/api/push-remote/confirm/route.js +31 -12
- package/dist/app/api/push-remote/preview/route.js +27 -12
- package/dist/app/api/query/route.js +24 -13
- package/dist/app/api/schema/route.js +63 -0
- package/dist/app/api/tables/[name]/import/route.js +112 -0
- package/dist/app/api/tables/[name]/route.js +38 -29
- package/dist/app/api/tables/route.js +29 -16
- package/dist/app/api/time-travel/preview/route.js +122 -0
- package/dist/app/api/time-travel/restore/route.js +106 -0
- package/dist/app/page.jsx +26 -8
- package/dist/d1-studio.js +129 -23
- package/dist/lib/license.js +99 -71
- package/dist/lib/local-db.js +223 -0
- package/dist/lib/migrations.js +40 -2
- package/dist/lib/parse-sql-error.js +99 -160
- package/dist/lib/sql-operations.js +28 -10
- package/dist/lib/telemetry.js +39 -0
- package/package.json +6 -2
- 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/static/FEsQ9jwPUQv5A3fwg6Opl/_buildManifest.js +0 -1
- package/dist/.next/.next/static/Y9mYu4WBghepP5oT_3OdR/_buildManifest.js +0 -1
- package/dist/.next/.next/static/ae3gNmoSGm-R5LJC4UagI/_buildManifest.js +0 -1
- package/dist/.next/.next/static/bKfUJeuvAQlBmR3TjrfkH/_buildManifest.js +0 -1
- package/dist/.next/.next/static/chunks/576-18a2209e1ed26aad.js +0 -1
- package/dist/.next/.next/static/chunks/735-b885dfec6353171d.js +0 -1
- package/dist/.next/.next/static/chunks/app/api/cloudflare/route-b77846f372b01f38.js +0 -1
- package/dist/.next/.next/static/chunks/app/api/databases/route-407794f8145d9a0b.js +0 -1
- package/dist/.next/.next/static/chunks/app/api/migrations/sync/route-9f480f5590369a8f.js +0 -1
- package/dist/.next/.next/static/chunks/app/api/migrations/sync-files/route-92010db279b4dd8e.js +0 -1
- package/dist/.next/.next/static/chunks/app/api/pull-data/confirm/route-a02fe6d3cdd0a535.js +0 -1
- package/dist/.next/.next/static/chunks/app/api/pull-remote/confirm/route-f401a03507d1da50.js +0 -1
- package/dist/.next/.next/static/chunks/app/api/pull-remote/preview/route-3c53814b5cb8b6b0.js +0 -1
- package/dist/.next/.next/static/chunks/app/api/push-remote/confirm/route-8f359249e907c63b.js +0 -1
- package/dist/.next/.next/static/chunks/app/api/push-remote/preview/route-b51bf94f39c17a9d.js +0 -1
- package/dist/.next/.next/static/chunks/app/api/query/route-87bae2d4aebaf859.js +0 -1
- package/dist/.next/.next/static/chunks/app/api/tables/[name]/route-d20ca163b9c03e7c.js +0 -1
- package/dist/.next/.next/static/chunks/app/api/tables/route-0f46f911562abcdf.js +0 -1
- package/dist/.next/.next/static/chunks/app/api/update/route-14edc1917760bce0.js +0 -1
- package/dist/.next/.next/static/chunks/app/page-f05cd0fc436bf9bc.js +0 -1
- package/dist/.next/.next/static/chunks/app/page-f2bc307c0d8acdaa.js +0 -1
- package/dist/.next/.next/static/chunks/webpack-c76ac1e586b2802a.js +0 -1
- package/dist/.next/.next/static/css/7c16f57d325d0d7d.css +0 -3
- package/dist/.next/.next/static/ejYPqJ2kVicVp5EFWOZIC/_buildManifest.js +0 -1
- package/dist/.next/.next/static/gABGrAoO8IPArDo_Ns_7g/_buildManifest.js +0 -1
- package/dist/.next/.next/static/gh-QfIUVo4FTTduYCVKT6/_buildManifest.js +0 -1
- package/dist/.next/.next/static/media/569ce4b8f30dc480-s.p.woff2 +0 -0
- package/dist/.next/.next/static/thaCy2qVeNqYYhdayr13C/_buildManifest.js +0 -1
- package/dist/.next/.next/static/ybCx6L6gHqtODbKmlhU-d/_buildManifest.js +0 -1
- package/dist/.next/.next/static/ybCx6L6gHqtODbKmlhU-d/_ssgManifest.js +0 -1
- package/dist/.next/cache/webpack/client-production/1.pack +0 -0
- package/dist/.next/cache/webpack/client-production/2.pack +0 -0
- package/dist/.next/cache/webpack/client-production/index.pack.old +0 -0
- package/dist/.next/static/IX-QLbm7scYnyqWeeimal/_buildManifest.js +0 -1
- package/dist/.next/static/IX-QLbm7scYnyqWeeimal/_ssgManifest.js +0 -1
- package/dist/.next/static/chunks/576-18a2209e1ed26aad.js +0 -1
- package/dist/.next/static/chunks/735-b885dfec6353171d.js +0 -1
- package/dist/.next/static/chunks/app/api/cloudflare/route-b77846f372b01f38.js +0 -1
- package/dist/.next/static/chunks/app/api/databases/route-407794f8145d9a0b.js +0 -1
- package/dist/.next/static/chunks/app/api/migrations/sync/route-9f480f5590369a8f.js +0 -1
- package/dist/.next/static/chunks/app/api/migrations/sync-files/route-92010db279b4dd8e.js +0 -1
- package/dist/.next/static/chunks/app/api/pull-data/confirm/route-a02fe6d3cdd0a535.js +0 -1
- package/dist/.next/static/chunks/app/api/pull-remote/confirm/route-f401a03507d1da50.js +0 -1
- package/dist/.next/static/chunks/app/api/pull-remote/preview/route-3c53814b5cb8b6b0.js +0 -1
- package/dist/.next/static/chunks/app/api/push-remote/confirm/route-8f359249e907c63b.js +0 -1
- package/dist/.next/static/chunks/app/api/push-remote/preview/route-b51bf94f39c17a9d.js +0 -1
- package/dist/.next/static/chunks/app/api/query/route-87bae2d4aebaf859.js +0 -1
- package/dist/.next/static/chunks/app/api/tables/[name]/route-d20ca163b9c03e7c.js +0 -1
- package/dist/.next/static/chunks/app/api/tables/route-0f46f911562abcdf.js +0 -1
- package/dist/.next/static/chunks/app/api/update/route-14edc1917760bce0.js +0 -1
- package/dist/.next/static/chunks/app/page-f05cd0fc436bf9bc.js +0 -1
- package/dist/.next/static/chunks/webpack-c76ac1e586b2802a.js +0 -1
- package/dist/.next/static/css/7c16f57d325d0d7d.css +0 -3
- package/dist/.next/static/media/569ce4b8f30dc480-s.p.woff2 +0 -0
- /package/dist/.next/.next/static/{FEsQ9jwPUQv5A3fwg6Opl → -OO4tE7EKr8o62Bne-ODo}/_ssgManifest.js +0 -0
- /package/dist/.next/.next/static/{Y9mYu4WBghepP5oT_3OdR → 3kAeIJC56X7aw1Fk5_OXO}/_ssgManifest.js +0 -0
- /package/dist/.next/.next/static/{ae3gNmoSGm-R5LJC4UagI → J8r9W6xxmYYvuKehItNuW}/_ssgManifest.js +0 -0
- /package/dist/.next/.next/static/{bKfUJeuvAQlBmR3TjrfkH → arc9h7hbaQzL1Dl0iuVrT}/_ssgManifest.js +0 -0
- /package/dist/.next/.next/static/chunks/{4bd1b696-8c908eb707f85a27.js → 4bd1b696-124ea104c06f6cea.js} +0 -0
- /package/dist/.next/.next/static/chunks/{517-3b698a5d3da06ff7.js → 517-c876ce2f00030cd0.js} +0 -0
- /package/dist/.next/.next/static/chunks/{692-ede418e1d28a1394.js → 692-9e59d546afd11ec3.js} +0 -0
- /package/dist/.next/.next/static/chunks/app/_not-found/{page-b786c3dd79ad15a5.js → page-3e24b81707d98126.js} +0 -0
- /package/dist/.next/.next/static/{ejYPqJ2kVicVp5EFWOZIC → fiesjBWbrmSSyLf4biwrX}/_ssgManifest.js +0 -0
- /package/dist/.next/.next/static/{gABGrAoO8IPArDo_Ns_7g → ft39e6W6vSgUL7peRo7pE}/_ssgManifest.js +0 -0
- /package/dist/.next/.next/static/{gh-QfIUVo4FTTduYCVKT6 → u7ssdTycF4iQ-w-pQZhxg}/_ssgManifest.js +0 -0
- /package/dist/.next/static/chunks/{4bd1b696-8c908eb707f85a27.js → 4bd1b696-124ea104c06f6cea.js} +0 -0
- /package/dist/.next/static/chunks/{517-3b698a5d3da06ff7.js → 517-c876ce2f00030cd0.js} +0 -0
- /package/dist/.next/static/chunks/{692-ede418e1d28a1394.js → 692-9e59d546afd11ec3.js} +0 -0
- /package/dist/.next/static/chunks/app/_not-found/{page-b786c3dd79ad15a5.js → page-3e24b81707d98126.js} +0 -0
- /package/dist/.next/{.next/static/thaCy2qVeNqYYhdayr13C → static/zh4Fz2tbm8GRka4woRrGp}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
// File: /Volumes/ProjectSpace/_wip/d1studio/src/app/api/time-travel/preview/route.js
|
|
2
|
+
import * as entry from '../../../../../../src/app/api/time-travel/preview/route.js'
|
|
3
|
+
import type { NextRequest } from 'next/server.js'
|
|
4
|
+
|
|
5
|
+
type TEntry = typeof import('../../../../../../src/app/api/time-travel/preview/route.js')
|
|
6
|
+
|
|
7
|
+
type SegmentParams<T extends Object = any> = T extends Record<string, any>
|
|
8
|
+
? { [K in keyof T]: T[K] extends string ? string | string[] | undefined : never }
|
|
9
|
+
: T
|
|
10
|
+
|
|
11
|
+
// Check that the entry is a valid entry
|
|
12
|
+
checkFields<Diff<{
|
|
13
|
+
GET?: Function
|
|
14
|
+
HEAD?: Function
|
|
15
|
+
OPTIONS?: Function
|
|
16
|
+
POST?: Function
|
|
17
|
+
PUT?: Function
|
|
18
|
+
DELETE?: Function
|
|
19
|
+
PATCH?: Function
|
|
20
|
+
config?: {}
|
|
21
|
+
generateStaticParams?: Function
|
|
22
|
+
revalidate?: RevalidateRange<TEntry> | false
|
|
23
|
+
dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
|
|
24
|
+
dynamicParams?: boolean
|
|
25
|
+
fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
|
|
26
|
+
preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
|
|
27
|
+
runtime?: 'nodejs' | 'experimental-edge' | 'edge'
|
|
28
|
+
maxDuration?: number
|
|
29
|
+
|
|
30
|
+
}, TEntry, ''>>()
|
|
31
|
+
|
|
32
|
+
type RouteContext = { params: Promise<SegmentParams> }
|
|
33
|
+
// Check the prop type of the entry function
|
|
34
|
+
if ('GET' in entry) {
|
|
35
|
+
checkFields<
|
|
36
|
+
Diff<
|
|
37
|
+
ParamCheck<Request | NextRequest>,
|
|
38
|
+
{
|
|
39
|
+
__tag__: 'GET'
|
|
40
|
+
__param_position__: 'first'
|
|
41
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'GET'>>
|
|
42
|
+
},
|
|
43
|
+
'GET'
|
|
44
|
+
>
|
|
45
|
+
>()
|
|
46
|
+
checkFields<
|
|
47
|
+
Diff<
|
|
48
|
+
ParamCheck<RouteContext>,
|
|
49
|
+
{
|
|
50
|
+
__tag__: 'GET'
|
|
51
|
+
__param_position__: 'second'
|
|
52
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'GET'>>
|
|
53
|
+
},
|
|
54
|
+
'GET'
|
|
55
|
+
>
|
|
56
|
+
>()
|
|
57
|
+
|
|
58
|
+
checkFields<
|
|
59
|
+
Diff<
|
|
60
|
+
{
|
|
61
|
+
__tag__: 'GET',
|
|
62
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
__tag__: 'GET',
|
|
66
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'GET'>>
|
|
67
|
+
},
|
|
68
|
+
'GET'
|
|
69
|
+
>
|
|
70
|
+
>()
|
|
71
|
+
}
|
|
72
|
+
// Check the prop type of the entry function
|
|
73
|
+
if ('HEAD' in entry) {
|
|
74
|
+
checkFields<
|
|
75
|
+
Diff<
|
|
76
|
+
ParamCheck<Request | NextRequest>,
|
|
77
|
+
{
|
|
78
|
+
__tag__: 'HEAD'
|
|
79
|
+
__param_position__: 'first'
|
|
80
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'HEAD'>>
|
|
81
|
+
},
|
|
82
|
+
'HEAD'
|
|
83
|
+
>
|
|
84
|
+
>()
|
|
85
|
+
checkFields<
|
|
86
|
+
Diff<
|
|
87
|
+
ParamCheck<RouteContext>,
|
|
88
|
+
{
|
|
89
|
+
__tag__: 'HEAD'
|
|
90
|
+
__param_position__: 'second'
|
|
91
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'HEAD'>>
|
|
92
|
+
},
|
|
93
|
+
'HEAD'
|
|
94
|
+
>
|
|
95
|
+
>()
|
|
96
|
+
|
|
97
|
+
checkFields<
|
|
98
|
+
Diff<
|
|
99
|
+
{
|
|
100
|
+
__tag__: 'HEAD',
|
|
101
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
__tag__: 'HEAD',
|
|
105
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'HEAD'>>
|
|
106
|
+
},
|
|
107
|
+
'HEAD'
|
|
108
|
+
>
|
|
109
|
+
>()
|
|
110
|
+
}
|
|
111
|
+
// Check the prop type of the entry function
|
|
112
|
+
if ('OPTIONS' in entry) {
|
|
113
|
+
checkFields<
|
|
114
|
+
Diff<
|
|
115
|
+
ParamCheck<Request | NextRequest>,
|
|
116
|
+
{
|
|
117
|
+
__tag__: 'OPTIONS'
|
|
118
|
+
__param_position__: 'first'
|
|
119
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'OPTIONS'>>
|
|
120
|
+
},
|
|
121
|
+
'OPTIONS'
|
|
122
|
+
>
|
|
123
|
+
>()
|
|
124
|
+
checkFields<
|
|
125
|
+
Diff<
|
|
126
|
+
ParamCheck<RouteContext>,
|
|
127
|
+
{
|
|
128
|
+
__tag__: 'OPTIONS'
|
|
129
|
+
__param_position__: 'second'
|
|
130
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'OPTIONS'>>
|
|
131
|
+
},
|
|
132
|
+
'OPTIONS'
|
|
133
|
+
>
|
|
134
|
+
>()
|
|
135
|
+
|
|
136
|
+
checkFields<
|
|
137
|
+
Diff<
|
|
138
|
+
{
|
|
139
|
+
__tag__: 'OPTIONS',
|
|
140
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
__tag__: 'OPTIONS',
|
|
144
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'OPTIONS'>>
|
|
145
|
+
},
|
|
146
|
+
'OPTIONS'
|
|
147
|
+
>
|
|
148
|
+
>()
|
|
149
|
+
}
|
|
150
|
+
// Check the prop type of the entry function
|
|
151
|
+
if ('POST' in entry) {
|
|
152
|
+
checkFields<
|
|
153
|
+
Diff<
|
|
154
|
+
ParamCheck<Request | NextRequest>,
|
|
155
|
+
{
|
|
156
|
+
__tag__: 'POST'
|
|
157
|
+
__param_position__: 'first'
|
|
158
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'POST'>>
|
|
159
|
+
},
|
|
160
|
+
'POST'
|
|
161
|
+
>
|
|
162
|
+
>()
|
|
163
|
+
checkFields<
|
|
164
|
+
Diff<
|
|
165
|
+
ParamCheck<RouteContext>,
|
|
166
|
+
{
|
|
167
|
+
__tag__: 'POST'
|
|
168
|
+
__param_position__: 'second'
|
|
169
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'POST'>>
|
|
170
|
+
},
|
|
171
|
+
'POST'
|
|
172
|
+
>
|
|
173
|
+
>()
|
|
174
|
+
|
|
175
|
+
checkFields<
|
|
176
|
+
Diff<
|
|
177
|
+
{
|
|
178
|
+
__tag__: 'POST',
|
|
179
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
__tag__: 'POST',
|
|
183
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'POST'>>
|
|
184
|
+
},
|
|
185
|
+
'POST'
|
|
186
|
+
>
|
|
187
|
+
>()
|
|
188
|
+
}
|
|
189
|
+
// Check the prop type of the entry function
|
|
190
|
+
if ('PUT' in entry) {
|
|
191
|
+
checkFields<
|
|
192
|
+
Diff<
|
|
193
|
+
ParamCheck<Request | NextRequest>,
|
|
194
|
+
{
|
|
195
|
+
__tag__: 'PUT'
|
|
196
|
+
__param_position__: 'first'
|
|
197
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'PUT'>>
|
|
198
|
+
},
|
|
199
|
+
'PUT'
|
|
200
|
+
>
|
|
201
|
+
>()
|
|
202
|
+
checkFields<
|
|
203
|
+
Diff<
|
|
204
|
+
ParamCheck<RouteContext>,
|
|
205
|
+
{
|
|
206
|
+
__tag__: 'PUT'
|
|
207
|
+
__param_position__: 'second'
|
|
208
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'PUT'>>
|
|
209
|
+
},
|
|
210
|
+
'PUT'
|
|
211
|
+
>
|
|
212
|
+
>()
|
|
213
|
+
|
|
214
|
+
checkFields<
|
|
215
|
+
Diff<
|
|
216
|
+
{
|
|
217
|
+
__tag__: 'PUT',
|
|
218
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
__tag__: 'PUT',
|
|
222
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'PUT'>>
|
|
223
|
+
},
|
|
224
|
+
'PUT'
|
|
225
|
+
>
|
|
226
|
+
>()
|
|
227
|
+
}
|
|
228
|
+
// Check the prop type of the entry function
|
|
229
|
+
if ('DELETE' in entry) {
|
|
230
|
+
checkFields<
|
|
231
|
+
Diff<
|
|
232
|
+
ParamCheck<Request | NextRequest>,
|
|
233
|
+
{
|
|
234
|
+
__tag__: 'DELETE'
|
|
235
|
+
__param_position__: 'first'
|
|
236
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'DELETE'>>
|
|
237
|
+
},
|
|
238
|
+
'DELETE'
|
|
239
|
+
>
|
|
240
|
+
>()
|
|
241
|
+
checkFields<
|
|
242
|
+
Diff<
|
|
243
|
+
ParamCheck<RouteContext>,
|
|
244
|
+
{
|
|
245
|
+
__tag__: 'DELETE'
|
|
246
|
+
__param_position__: 'second'
|
|
247
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'DELETE'>>
|
|
248
|
+
},
|
|
249
|
+
'DELETE'
|
|
250
|
+
>
|
|
251
|
+
>()
|
|
252
|
+
|
|
253
|
+
checkFields<
|
|
254
|
+
Diff<
|
|
255
|
+
{
|
|
256
|
+
__tag__: 'DELETE',
|
|
257
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
__tag__: 'DELETE',
|
|
261
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'DELETE'>>
|
|
262
|
+
},
|
|
263
|
+
'DELETE'
|
|
264
|
+
>
|
|
265
|
+
>()
|
|
266
|
+
}
|
|
267
|
+
// Check the prop type of the entry function
|
|
268
|
+
if ('PATCH' in entry) {
|
|
269
|
+
checkFields<
|
|
270
|
+
Diff<
|
|
271
|
+
ParamCheck<Request | NextRequest>,
|
|
272
|
+
{
|
|
273
|
+
__tag__: 'PATCH'
|
|
274
|
+
__param_position__: 'first'
|
|
275
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'PATCH'>>
|
|
276
|
+
},
|
|
277
|
+
'PATCH'
|
|
278
|
+
>
|
|
279
|
+
>()
|
|
280
|
+
checkFields<
|
|
281
|
+
Diff<
|
|
282
|
+
ParamCheck<RouteContext>,
|
|
283
|
+
{
|
|
284
|
+
__tag__: 'PATCH'
|
|
285
|
+
__param_position__: 'second'
|
|
286
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'PATCH'>>
|
|
287
|
+
},
|
|
288
|
+
'PATCH'
|
|
289
|
+
>
|
|
290
|
+
>()
|
|
291
|
+
|
|
292
|
+
checkFields<
|
|
293
|
+
Diff<
|
|
294
|
+
{
|
|
295
|
+
__tag__: 'PATCH',
|
|
296
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
__tag__: 'PATCH',
|
|
300
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'PATCH'>>
|
|
301
|
+
},
|
|
302
|
+
'PATCH'
|
|
303
|
+
>
|
|
304
|
+
>()
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// Check the arguments and return type of the generateStaticParams function
|
|
308
|
+
if ('generateStaticParams' in entry) {
|
|
309
|
+
checkFields<Diff<{ params: SegmentParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
|
|
310
|
+
checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export interface PageProps {
|
|
314
|
+
params?: Promise<SegmentParams>
|
|
315
|
+
searchParams?: Promise<any>
|
|
316
|
+
}
|
|
317
|
+
export interface LayoutProps {
|
|
318
|
+
children?: React.ReactNode
|
|
319
|
+
|
|
320
|
+
params?: Promise<SegmentParams>
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// =============
|
|
324
|
+
// Utility types
|
|
325
|
+
type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
|
|
326
|
+
|
|
327
|
+
// If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
|
|
328
|
+
type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
|
|
329
|
+
type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
|
|
330
|
+
|
|
331
|
+
type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
|
|
332
|
+
type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
|
|
333
|
+
type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
|
|
334
|
+
|
|
335
|
+
type ParamCheck<T> = {
|
|
336
|
+
__tag__: string
|
|
337
|
+
__param_position__: string
|
|
338
|
+
__param_type__: T
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
function checkFields<_ extends { [k in keyof any]: never }>() {}
|
|
342
|
+
|
|
343
|
+
// https://github.com/sindresorhus/type-fest
|
|
344
|
+
type Numeric = number | bigint
|
|
345
|
+
type Zero = 0 | 0n
|
|
346
|
+
type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
|
|
347
|
+
type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
// File: /Volumes/ProjectSpace/_wip/d1studio/src/app/api/time-travel/restore/route.js
|
|
2
|
+
import * as entry from '../../../../../../src/app/api/time-travel/restore/route.js'
|
|
3
|
+
import type { NextRequest } from 'next/server.js'
|
|
4
|
+
|
|
5
|
+
type TEntry = typeof import('../../../../../../src/app/api/time-travel/restore/route.js')
|
|
6
|
+
|
|
7
|
+
type SegmentParams<T extends Object = any> = T extends Record<string, any>
|
|
8
|
+
? { [K in keyof T]: T[K] extends string ? string | string[] | undefined : never }
|
|
9
|
+
: T
|
|
10
|
+
|
|
11
|
+
// Check that the entry is a valid entry
|
|
12
|
+
checkFields<Diff<{
|
|
13
|
+
GET?: Function
|
|
14
|
+
HEAD?: Function
|
|
15
|
+
OPTIONS?: Function
|
|
16
|
+
POST?: Function
|
|
17
|
+
PUT?: Function
|
|
18
|
+
DELETE?: Function
|
|
19
|
+
PATCH?: Function
|
|
20
|
+
config?: {}
|
|
21
|
+
generateStaticParams?: Function
|
|
22
|
+
revalidate?: RevalidateRange<TEntry> | false
|
|
23
|
+
dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
|
|
24
|
+
dynamicParams?: boolean
|
|
25
|
+
fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
|
|
26
|
+
preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
|
|
27
|
+
runtime?: 'nodejs' | 'experimental-edge' | 'edge'
|
|
28
|
+
maxDuration?: number
|
|
29
|
+
|
|
30
|
+
}, TEntry, ''>>()
|
|
31
|
+
|
|
32
|
+
type RouteContext = { params: Promise<SegmentParams> }
|
|
33
|
+
// Check the prop type of the entry function
|
|
34
|
+
if ('GET' in entry) {
|
|
35
|
+
checkFields<
|
|
36
|
+
Diff<
|
|
37
|
+
ParamCheck<Request | NextRequest>,
|
|
38
|
+
{
|
|
39
|
+
__tag__: 'GET'
|
|
40
|
+
__param_position__: 'first'
|
|
41
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'GET'>>
|
|
42
|
+
},
|
|
43
|
+
'GET'
|
|
44
|
+
>
|
|
45
|
+
>()
|
|
46
|
+
checkFields<
|
|
47
|
+
Diff<
|
|
48
|
+
ParamCheck<RouteContext>,
|
|
49
|
+
{
|
|
50
|
+
__tag__: 'GET'
|
|
51
|
+
__param_position__: 'second'
|
|
52
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'GET'>>
|
|
53
|
+
},
|
|
54
|
+
'GET'
|
|
55
|
+
>
|
|
56
|
+
>()
|
|
57
|
+
|
|
58
|
+
checkFields<
|
|
59
|
+
Diff<
|
|
60
|
+
{
|
|
61
|
+
__tag__: 'GET',
|
|
62
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
__tag__: 'GET',
|
|
66
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'GET'>>
|
|
67
|
+
},
|
|
68
|
+
'GET'
|
|
69
|
+
>
|
|
70
|
+
>()
|
|
71
|
+
}
|
|
72
|
+
// Check the prop type of the entry function
|
|
73
|
+
if ('HEAD' in entry) {
|
|
74
|
+
checkFields<
|
|
75
|
+
Diff<
|
|
76
|
+
ParamCheck<Request | NextRequest>,
|
|
77
|
+
{
|
|
78
|
+
__tag__: 'HEAD'
|
|
79
|
+
__param_position__: 'first'
|
|
80
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'HEAD'>>
|
|
81
|
+
},
|
|
82
|
+
'HEAD'
|
|
83
|
+
>
|
|
84
|
+
>()
|
|
85
|
+
checkFields<
|
|
86
|
+
Diff<
|
|
87
|
+
ParamCheck<RouteContext>,
|
|
88
|
+
{
|
|
89
|
+
__tag__: 'HEAD'
|
|
90
|
+
__param_position__: 'second'
|
|
91
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'HEAD'>>
|
|
92
|
+
},
|
|
93
|
+
'HEAD'
|
|
94
|
+
>
|
|
95
|
+
>()
|
|
96
|
+
|
|
97
|
+
checkFields<
|
|
98
|
+
Diff<
|
|
99
|
+
{
|
|
100
|
+
__tag__: 'HEAD',
|
|
101
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
__tag__: 'HEAD',
|
|
105
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'HEAD'>>
|
|
106
|
+
},
|
|
107
|
+
'HEAD'
|
|
108
|
+
>
|
|
109
|
+
>()
|
|
110
|
+
}
|
|
111
|
+
// Check the prop type of the entry function
|
|
112
|
+
if ('OPTIONS' in entry) {
|
|
113
|
+
checkFields<
|
|
114
|
+
Diff<
|
|
115
|
+
ParamCheck<Request | NextRequest>,
|
|
116
|
+
{
|
|
117
|
+
__tag__: 'OPTIONS'
|
|
118
|
+
__param_position__: 'first'
|
|
119
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'OPTIONS'>>
|
|
120
|
+
},
|
|
121
|
+
'OPTIONS'
|
|
122
|
+
>
|
|
123
|
+
>()
|
|
124
|
+
checkFields<
|
|
125
|
+
Diff<
|
|
126
|
+
ParamCheck<RouteContext>,
|
|
127
|
+
{
|
|
128
|
+
__tag__: 'OPTIONS'
|
|
129
|
+
__param_position__: 'second'
|
|
130
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'OPTIONS'>>
|
|
131
|
+
},
|
|
132
|
+
'OPTIONS'
|
|
133
|
+
>
|
|
134
|
+
>()
|
|
135
|
+
|
|
136
|
+
checkFields<
|
|
137
|
+
Diff<
|
|
138
|
+
{
|
|
139
|
+
__tag__: 'OPTIONS',
|
|
140
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
__tag__: 'OPTIONS',
|
|
144
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'OPTIONS'>>
|
|
145
|
+
},
|
|
146
|
+
'OPTIONS'
|
|
147
|
+
>
|
|
148
|
+
>()
|
|
149
|
+
}
|
|
150
|
+
// Check the prop type of the entry function
|
|
151
|
+
if ('POST' in entry) {
|
|
152
|
+
checkFields<
|
|
153
|
+
Diff<
|
|
154
|
+
ParamCheck<Request | NextRequest>,
|
|
155
|
+
{
|
|
156
|
+
__tag__: 'POST'
|
|
157
|
+
__param_position__: 'first'
|
|
158
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'POST'>>
|
|
159
|
+
},
|
|
160
|
+
'POST'
|
|
161
|
+
>
|
|
162
|
+
>()
|
|
163
|
+
checkFields<
|
|
164
|
+
Diff<
|
|
165
|
+
ParamCheck<RouteContext>,
|
|
166
|
+
{
|
|
167
|
+
__tag__: 'POST'
|
|
168
|
+
__param_position__: 'second'
|
|
169
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'POST'>>
|
|
170
|
+
},
|
|
171
|
+
'POST'
|
|
172
|
+
>
|
|
173
|
+
>()
|
|
174
|
+
|
|
175
|
+
checkFields<
|
|
176
|
+
Diff<
|
|
177
|
+
{
|
|
178
|
+
__tag__: 'POST',
|
|
179
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
__tag__: 'POST',
|
|
183
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'POST'>>
|
|
184
|
+
},
|
|
185
|
+
'POST'
|
|
186
|
+
>
|
|
187
|
+
>()
|
|
188
|
+
}
|
|
189
|
+
// Check the prop type of the entry function
|
|
190
|
+
if ('PUT' in entry) {
|
|
191
|
+
checkFields<
|
|
192
|
+
Diff<
|
|
193
|
+
ParamCheck<Request | NextRequest>,
|
|
194
|
+
{
|
|
195
|
+
__tag__: 'PUT'
|
|
196
|
+
__param_position__: 'first'
|
|
197
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'PUT'>>
|
|
198
|
+
},
|
|
199
|
+
'PUT'
|
|
200
|
+
>
|
|
201
|
+
>()
|
|
202
|
+
checkFields<
|
|
203
|
+
Diff<
|
|
204
|
+
ParamCheck<RouteContext>,
|
|
205
|
+
{
|
|
206
|
+
__tag__: 'PUT'
|
|
207
|
+
__param_position__: 'second'
|
|
208
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'PUT'>>
|
|
209
|
+
},
|
|
210
|
+
'PUT'
|
|
211
|
+
>
|
|
212
|
+
>()
|
|
213
|
+
|
|
214
|
+
checkFields<
|
|
215
|
+
Diff<
|
|
216
|
+
{
|
|
217
|
+
__tag__: 'PUT',
|
|
218
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
__tag__: 'PUT',
|
|
222
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'PUT'>>
|
|
223
|
+
},
|
|
224
|
+
'PUT'
|
|
225
|
+
>
|
|
226
|
+
>()
|
|
227
|
+
}
|
|
228
|
+
// Check the prop type of the entry function
|
|
229
|
+
if ('DELETE' in entry) {
|
|
230
|
+
checkFields<
|
|
231
|
+
Diff<
|
|
232
|
+
ParamCheck<Request | NextRequest>,
|
|
233
|
+
{
|
|
234
|
+
__tag__: 'DELETE'
|
|
235
|
+
__param_position__: 'first'
|
|
236
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'DELETE'>>
|
|
237
|
+
},
|
|
238
|
+
'DELETE'
|
|
239
|
+
>
|
|
240
|
+
>()
|
|
241
|
+
checkFields<
|
|
242
|
+
Diff<
|
|
243
|
+
ParamCheck<RouteContext>,
|
|
244
|
+
{
|
|
245
|
+
__tag__: 'DELETE'
|
|
246
|
+
__param_position__: 'second'
|
|
247
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'DELETE'>>
|
|
248
|
+
},
|
|
249
|
+
'DELETE'
|
|
250
|
+
>
|
|
251
|
+
>()
|
|
252
|
+
|
|
253
|
+
checkFields<
|
|
254
|
+
Diff<
|
|
255
|
+
{
|
|
256
|
+
__tag__: 'DELETE',
|
|
257
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
__tag__: 'DELETE',
|
|
261
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'DELETE'>>
|
|
262
|
+
},
|
|
263
|
+
'DELETE'
|
|
264
|
+
>
|
|
265
|
+
>()
|
|
266
|
+
}
|
|
267
|
+
// Check the prop type of the entry function
|
|
268
|
+
if ('PATCH' in entry) {
|
|
269
|
+
checkFields<
|
|
270
|
+
Diff<
|
|
271
|
+
ParamCheck<Request | NextRequest>,
|
|
272
|
+
{
|
|
273
|
+
__tag__: 'PATCH'
|
|
274
|
+
__param_position__: 'first'
|
|
275
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'PATCH'>>
|
|
276
|
+
},
|
|
277
|
+
'PATCH'
|
|
278
|
+
>
|
|
279
|
+
>()
|
|
280
|
+
checkFields<
|
|
281
|
+
Diff<
|
|
282
|
+
ParamCheck<RouteContext>,
|
|
283
|
+
{
|
|
284
|
+
__tag__: 'PATCH'
|
|
285
|
+
__param_position__: 'second'
|
|
286
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'PATCH'>>
|
|
287
|
+
},
|
|
288
|
+
'PATCH'
|
|
289
|
+
>
|
|
290
|
+
>()
|
|
291
|
+
|
|
292
|
+
checkFields<
|
|
293
|
+
Diff<
|
|
294
|
+
{
|
|
295
|
+
__tag__: 'PATCH',
|
|
296
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
__tag__: 'PATCH',
|
|
300
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'PATCH'>>
|
|
301
|
+
},
|
|
302
|
+
'PATCH'
|
|
303
|
+
>
|
|
304
|
+
>()
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// Check the arguments and return type of the generateStaticParams function
|
|
308
|
+
if ('generateStaticParams' in entry) {
|
|
309
|
+
checkFields<Diff<{ params: SegmentParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
|
|
310
|
+
checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export interface PageProps {
|
|
314
|
+
params?: Promise<SegmentParams>
|
|
315
|
+
searchParams?: Promise<any>
|
|
316
|
+
}
|
|
317
|
+
export interface LayoutProps {
|
|
318
|
+
children?: React.ReactNode
|
|
319
|
+
|
|
320
|
+
params?: Promise<SegmentParams>
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// =============
|
|
324
|
+
// Utility types
|
|
325
|
+
type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
|
|
326
|
+
|
|
327
|
+
// If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
|
|
328
|
+
type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
|
|
329
|
+
type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
|
|
330
|
+
|
|
331
|
+
type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
|
|
332
|
+
type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
|
|
333
|
+
type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
|
|
334
|
+
|
|
335
|
+
type ParamCheck<T> = {
|
|
336
|
+
__tag__: string
|
|
337
|
+
__param_position__: string
|
|
338
|
+
__param_type__: T
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
function checkFields<_ extends { [k in keyof any]: never }>() {}
|
|
342
|
+
|
|
343
|
+
// https://github.com/sindresorhus/type-fest
|
|
344
|
+
type Numeric = number | bigint
|
|
345
|
+
type Zero = 0 | 0n
|
|
346
|
+
type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
|
|
347
|
+
type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { NextResponse } from 'next/server';
|
|
4
4
|
import { findWranglerConfig } from '@/lib/find-wrangler-config.js';
|
|
5
|
+
import { hasLocalDb } from '@/lib/local-db.js';
|
|
5
6
|
import logger from '@/lib/logger';
|
|
6
7
|
|
|
7
8
|
export async function GET() {
|
|
@@ -34,7 +35,7 @@ export async function GET() {
|
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
return NextResponse.json({
|
|
37
|
-
databases: config.d1_databases,
|
|
38
|
+
databases: config.d1_databases.map(db => ({ ...db, hasLocal: hasLocalDb(projectDir, db) })),
|
|
38
39
|
debug: {
|
|
39
40
|
projectDir,
|
|
40
41
|
// Exposing the path from the helper for debugging consistency
|