d1s 0.3.7 → 0.3.11
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 +1 -1
- package/dist/.next/BUILD_ID +1 -1
- package/dist/.next/app-build-manifest.json +125 -125
- package/dist/.next/app-path-routes-manifest.json +23 -1
- package/dist/.next/build-manifest.json +14 -14
- package/dist/.next/export-marker.json +6 -1
- package/dist/.next/images-manifest.json +58 -1
- package/dist/.next/next-minimal-server.js.nft.json +1 -1
- package/dist/.next/next-server.js.nft.json +1 -1
- package/dist/.next/prerender-manifest.json +61 -1
- package/dist/.next/react-loadable-manifest.json +5 -5
- package/dist/.next/required-server-files.json +325 -1
- package/dist/.next/routes-manifest.json +70 -1
- package/dist/.next/server/app/_not-found/page.js +2 -1
- package/dist/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/_not-found.html +1 -1
- package/dist/.next/server/app/_not-found.meta +1 -1
- package/dist/.next/server/app/_not-found.rsc +15 -12
- package/dist/.next/server/app/api/cloudflare/route.js +1 -1
- package/dist/.next/server/app/api/cloudflare/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/cloudflare/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/databases/route.js +1 -1
- package/dist/.next/server/app/api/databases/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/databases/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/migrations/list/route.js +8 -8
- package/dist/.next/server/app/api/migrations/list/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/migrations/list/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/migrations/sync/route.js +10 -10
- package/dist/.next/server/app/api/migrations/sync/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/migrations/sync/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/migrations/sync-files/route.js +8 -8
- package/dist/.next/server/app/api/migrations/sync-files/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/migrations/sync-files/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/pro/route.js +1 -1
- package/dist/.next/server/app/api/pro/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/pro/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/pull-data/confirm/route.js +1 -1
- package/dist/.next/server/app/api/pull-data/confirm/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/pull-data/confirm/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/pull-remote/confirm/route.js +8 -8
- package/dist/.next/server/app/api/pull-remote/confirm/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/pull-remote/confirm/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/pull-remote/preview/route.js +8 -8
- package/dist/.next/server/app/api/pull-remote/preview/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/pull-remote/preview/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/push-remote/confirm/route.js +10 -10
- package/dist/.next/server/app/api/push-remote/confirm/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/push-remote/confirm/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/push-remote/preview/route.js +10 -10
- package/dist/.next/server/app/api/push-remote/preview/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/push-remote/preview/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/query/route.js +15 -15
- package/dist/.next/server/app/api/query/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/query/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/schema/route.js +1 -1
- package/dist/.next/server/app/api/schema/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/schema/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/tables/[name]/import/route.js +1 -1
- package/dist/.next/server/app/api/tables/[name]/import/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/tables/[name]/import/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/tables/[name]/route.js +5 -5
- package/dist/.next/server/app/api/tables/[name]/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/tables/[name]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/tables/route.js +2 -2
- package/dist/.next/server/app/api/tables/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/tables/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/time-travel/preview/route.js +1 -1
- package/dist/.next/server/app/api/time-travel/preview/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/time-travel/preview/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/time-travel/restore/route.js +1 -1
- package/dist/.next/server/app/api/time-travel/restore/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/time-travel/restore/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/update/route.js +1 -1
- package/dist/.next/server/app/api/update/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/index.html +3 -3
- package/dist/.next/server/app/index.meta +1 -1
- package/dist/.next/server/app/index.rsc +18 -15
- package/dist/.next/server/app/page.js +15 -14
- package/dist/.next/server/app/page.js.nft.json +1 -1
- package/dist/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app-paths-manifest.json +4 -4
- package/dist/.next/server/chunks/347.js +23 -0
- package/dist/.next/server/chunks/366.js +1 -0
- package/dist/.next/server/chunks/386.js +9 -0
- package/dist/.next/server/chunks/611.js +6 -0
- package/dist/.next/server/chunks/626.js +30 -0
- package/dist/.next/server/chunks/692.js +1 -0
- package/dist/.next/server/chunks/839.js +1 -0
- package/dist/.next/server/chunks/873.js +22 -0
- package/dist/.next/server/functions-config-manifest.json +6 -1
- package/dist/.next/server/middleware-build-manifest.js +1 -1
- package/dist/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/dist/.next/server/pages/404.html +1 -1
- package/dist/.next/server/pages/500.html +1 -1
- package/dist/.next/server/pages/_app.js +1 -1
- package/dist/.next/server/pages/_document.js +1 -1
- package/dist/.next/server/pages/_document.js.nft.json +1 -1
- package/dist/.next/server/pages/_error.js +19 -1
- package/dist/.next/server/pages/_error.js.nft.json +1 -1
- package/dist/.next/server/pages-manifest.json +6 -1
- package/dist/.next/server/server-reference-manifest.json +1 -1
- package/dist/.next/server/webpack-runtime.js +1 -1
- package/dist/.next/static/chunks/1a258343.234dd786cf6c097e.js +1 -0
- package/dist/.next/static/chunks/255-4f212684648fcab9.js +1 -0
- package/dist/.next/static/chunks/421-55f8ce492f5bd9c3.js +1 -0
- package/dist/.next/static/chunks/4bd1b696-c023c6e3521b1417.js +1 -0
- package/dist/.next/static/chunks/654-f2f8931465d44ae7.js +1 -0
- package/dist/.next/static/chunks/69-00a70b2df83ed9ee.js +1 -0
- package/dist/.next/static/chunks/823-77b9a2d152da81dd.js +1 -0
- package/dist/.next/static/chunks/95.8b08bca2768cb67c.js +1 -0
- package/dist/.next/static/chunks/950.edd33691c78c1807.js +1 -0
- package/dist/.next/static/chunks/app/_not-found/page-255a8a616fa8d3a5.js +1 -0
- package/dist/.next/static/chunks/app/api/cloudflare/{route-d0c1dc2a9e7dce36.js → route-58aca057db1e5530.js} +1 -1
- package/dist/.next/static/chunks/app/api/databases/{route-cd322321212797cf.js → route-58aca057db1e5530.js} +1 -1
- package/dist/.next/static/chunks/app/api/migrations/list/{route-cd710ff75b6bcd02.js → route-58aca057db1e5530.js} +1 -1
- package/dist/.next/static/chunks/app/api/migrations/sync/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/migrations/sync-files/{route-79ee2c26f87d3bc7.js → route-58aca057db1e5530.js} +1 -1
- package/dist/.next/static/chunks/app/api/pro/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/pull-data/confirm/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/pull-remote/confirm/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/pull-remote/preview/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/push-remote/confirm/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/push-remote/preview/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/query/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/schema/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/tables/[name]/import/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/tables/[name]/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/tables/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/time-travel/preview/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/time-travel/restore/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/api/update/route-58aca057db1e5530.js +1 -0
- package/dist/.next/static/chunks/app/layout-a5219438265f0b6c.js +1 -0
- package/dist/.next/static/chunks/app/page-4170252891367dde.js +1 -0
- package/dist/.next/static/chunks/framework-a6e0b7e30f98059a.js +1 -0
- package/dist/.next/static/chunks/main-0bd218f776705cbf.js +1 -0
- package/dist/.next/static/chunks/main-app-d20e9d5e211da7c8.js +1 -0
- package/dist/.next/static/chunks/pages/_app-7d307437aca18ad4.js +1 -0
- package/dist/.next/static/chunks/pages/_error-cb2a52f75f2162e2.js +1 -0
- package/dist/.next/static/chunks/webpack-d5e8b5757f0fec83.js +1 -0
- package/dist/.next/static/css/262ae258bbcfd289.css +3 -0
- package/dist/.next/static/css/599369d853c61df7.css +31 -0
- package/dist/.next/static/{TqY9pInUBjZNteD9IEnz3 → kGRfd0CDzKPsrYHw9rLTQ}/_buildManifest.js +1 -1
- package/dist/.next/trace +3 -3
- package/dist/app/api/query/route.js +35 -16
- package/dist/app/api/schema/route.js +16 -6
- package/dist/app/api/tables/[name]/route.js +23 -12
- package/dist/app/api/tables/route.js +21 -6
- package/dist/d1-studio.js +1 -0
- package/package.json +6 -2
- package/dist/.next/server/chunks/226.js +0 -30
- package/dist/.next/server/chunks/391.js +0 -23
- package/dist/.next/server/chunks/452.js +0 -1
- package/dist/.next/server/chunks/487.js +0 -1
- package/dist/.next/server/chunks/572.js +0 -1
- package/dist/.next/server/chunks/627.js +0 -6
- package/dist/.next/server/chunks/992.js +0 -3
- package/dist/.next/server/chunks/994.js +0 -13
- package/dist/.next/static/chunks/1a258343.3b3e7ba5ba0bd0d2.js +0 -1
- package/dist/.next/static/chunks/345.8fc37569d5708622.js +0 -1
- package/dist/.next/static/chunks/480-85b6c8ae3f51b156.js +0 -1
- package/dist/.next/static/chunks/4bd1b696-124ea104c06f6cea.js +0 -1
- package/dist/.next/static/chunks/517-c876ce2f00030cd0.js +0 -2
- package/dist/.next/static/chunks/52.2cdc9bdb75e1fc2e.js +0 -1
- package/dist/.next/static/chunks/692-9e59d546afd11ec3.js +0 -1
- package/dist/.next/static/chunks/803-a2fcfbd00e6b3b38.js +0 -1
- package/dist/.next/static/chunks/92-a84bdac2be7c8d7a.js +0 -1
- package/dist/.next/static/chunks/app/_not-found/page-3e24b81707d98126.js +0 -1
- package/dist/.next/static/chunks/app/api/migrations/sync/route-ee522f232b9f0a9c.js +0 -1
- package/dist/.next/static/chunks/app/api/pro/route-c90c1f901fc00d38.js +0 -1
- package/dist/.next/static/chunks/app/api/pull-data/confirm/route-118764086af798f8.js +0 -1
- package/dist/.next/static/chunks/app/api/pull-remote/confirm/route-2b0ade4ebfcea0bc.js +0 -1
- package/dist/.next/static/chunks/app/api/pull-remote/preview/route-342db7ea13e6f447.js +0 -1
- package/dist/.next/static/chunks/app/api/push-remote/confirm/route-b778c053bd515abd.js +0 -1
- package/dist/.next/static/chunks/app/api/push-remote/preview/route-ab090482f299f57f.js +0 -1
- package/dist/.next/static/chunks/app/api/query/route-4d21a8b1d34491f1.js +0 -1
- package/dist/.next/static/chunks/app/api/schema/route-cb17a387d6b557ad.js +0 -1
- package/dist/.next/static/chunks/app/api/tables/[name]/import/route-510472de7a5c29bd.js +0 -1
- package/dist/.next/static/chunks/app/api/tables/[name]/route-6a1fa95c303ce0de.js +0 -1
- package/dist/.next/static/chunks/app/api/tables/route-daa975df4ea8e8f8.js +0 -1
- package/dist/.next/static/chunks/app/api/time-travel/preview/route-5787d7e8f17bd539.js +0 -1
- package/dist/.next/static/chunks/app/api/time-travel/restore/route-84b64a27e831e21c.js +0 -1
- package/dist/.next/static/chunks/app/api/update/route-54ee900537982652.js +0 -1
- package/dist/.next/static/chunks/app/layout-f0ec4d636ee0f763.js +0 -1
- package/dist/.next/static/chunks/app/page-6bcbc40fdbc40128.js +0 -1
- package/dist/.next/static/chunks/framework-d29117d969504448.js +0 -1
- package/dist/.next/static/chunks/main-8d0ab17774ffa031.js +0 -1
- package/dist/.next/static/chunks/main-app-4506e88db72db4b7.js +0 -1
- package/dist/.next/static/chunks/pages/_app-d23763e3e6c904ff.js +0 -1
- package/dist/.next/static/chunks/pages/_error-9b7125ad1a1e68fa.js +0 -1
- package/dist/.next/static/chunks/webpack-024900a94af4f0a7.js +0 -1
- package/dist/.next/static/css/2c165a0ede9b2442.css +0 -3
- package/dist/.next/static/css/32df9a4d493f8b0f.css +0 -31
- /package/dist/.next/static/{TqY9pInUBjZNteD9IEnz3 → kGRfd0CDzKPsrYHw9rLTQ}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../node_modules/next/dist/server/app-render/
|
|
1
|
+
{"version":1,"files":["../../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../node_modules/next/dist/lib/constants.js","../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../node_modules/next/dist/lib/is-error.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../node_modules/next/dist/server/lib/cache-handlers/default.external.js","../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../../../../../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../../../../../node_modules/next/dist/shared/lib/segment.js","../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/873.js","../../../webpack-runtime.js","route_client-reference-manifest.js"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/pro/route"]={"moduleLoading":{"prefix":"/_next/","
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/pro/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"622":{"*":{"id":"82146","name":"*","chunks":[],"async":false}},"930":{"*":{"id":"32122","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"31603","name":"*","chunks":[],"async":false}},"3190":{"*":{"id":"60122","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"75170","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"12263","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"78922","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"54160","name":"*","chunks":[],"async":false}},"7747":{"*":{"id":"60673","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"68495","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"29234","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"77526","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":622,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":622,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5706,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-77b9a2d152da81dd.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":134,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-77b9a2d152da81dd.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":3673,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-77b9a2d152da81dd.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":7747,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-77b9a2d152da81dd.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":3190,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-77b9a2d152da81dd.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":930,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","69","static/chunks/69-00a70b2df83ed9ee.js","823","static/chunks/823-77b9a2d152da81dd.js","974","static/chunks/app/page-4170252891367dde.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/262ae258bbcfd289.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/pro/route":[]},"rscModuleMapping":{"622":{"*":{"id":"51384","name":"*","chunks":[],"async":false}},"930":{"*":{"id":"1905","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"23597","name":"*","chunks":[],"async":false}},"3190":{"*":{"id":"46254","name":"*","chunks":[],"async":false}},"3673":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"89748","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"73041","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"7184","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"81170","name":"*","chunks":[],"async":false}},"7747":{"*":{"id":"44158","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"36893","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"69576","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"6060","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var e={};e.id=377,e.ids=[377],e.modules={7550:e=>{e.exports=require("better-sqlite3")},846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{e.exports=require("buffer")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},4735:e=>{e.exports=require("events")},9021:e=>{e.exports=require("fs")},9748:e=>{e.exports=require("fs/promises")},1630:e=>{e.exports=require("http")},5591:e=>{e.exports=require("https")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},1204:e=>{e.exports=require("string_decoder")},8354:e=>{e.exports=require("util")},4075:e=>{e.exports=require("zlib")},3024:e=>{e.exports=require("node:fs")},6760:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},3136:e=>{e.exports=require("node:url")},2918:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>h,routeModule:()=>m,serverHooks:()=>A,workAsyncStorage:()=>b,workUnitAsyncStorage:()=>x});var s={};t.r(s),t.d(s,{OPTIONS:()=>g,POST:()=>f});var a=t(2706),o=t(8203),n=t(5994),u=t(9187),i=t(9421),l=t(4218),p=t(5949),d=t(1804);async function c(e,r,t,s){d.A.debug("Starting data pull process...");let a={...process.env,CLOUDFLARE_API_TOKEN:t,CLOUDFLARE_ACCOUNT_ID:r};d.A.debug("Fetching current schema for data pull...");let o=(await (0,l.ZX)(e,s,a,!1)).filter(e=>"table"===e.type&&e.name);d.A.debug("Local table schema for data pull:",o.map(e=>e.name));let n=function(e){let r={};e.forEach(e=>{let t;r[e.name]=new Set;let s=/FOREIGN KEY\s*\([^)]*\)\s+REFERENCES\s+(\w+)/gi;for(;null!==(t=s.exec(e.sql));){let s=t[1];r[e.name].add(s)}}),d.A.debug("Computed dependency graph:",r);let t=[],s={};return Object.keys(r).forEach(e=>{s[e]||function e(a){if("temp"===s[a])throw Error(`Cycle detected in dependencies at table ${a}`);s[a]||(s[a]="temp",r[a].forEach(t=>{r[t]&&e(t)}),s[a]="perm",t.push(a))}(e)}),d.A.debug("Computed insertion order (parent tables first):",t),t}(o);for(let r of(d.A.debug("Final computed insertion order:",n),n)){let t=o.find(e=>e.name===r);if(!t){d.A.debug(`Skipping table ${r} as it is not in the current schema list.`);continue}d.A.debug(`Processing table: ${r}`);let n=function(e){let r=e.columns?.find(e=>e.isPrimaryKey),t=r?r.name:"rowid";return d.A.debug(`Determined ordering column for table ${e.name||"unknown"}: ${t}`),t}(t);d.A.debug(`Fetching data for table: ${r} ordered by ${n}`);let u=await (0,i.h3)(e,s,r,a,75,n);if(d.A.debug(`Fetched ${u.length} records for table: ${r}`),u.length>0){let t=(0,i.xk)(r,u);d.A.debug(`Generated bulk insert SQL for ${r}: ${t}`);try{await (0,i.KK)(e,s,t,a,!1),d.A.debug(`Bulk inserted ${u.length} records into table: ${r}`)}catch(e){throw d.A.error(`Error inserting data into table ${r}:`,e),Error(`Data pull failed for table ${r}: ${e.message}`)}}else d.A.debug(`No data fetched for table: ${r}`)}return d.A.debug("Data pull process completed successfully."),{message:"All data pulled successfully."}}async function f(e){try{d.A.debug("Received request for data pull.");let{accountId:r,apiToken:t}=await e.json(),s=process.env.D1_PROJECT_DIR;if(!s)return u.NextResponse.json({success:!1,error:{type:"VALIDATION_ERROR",message:"Project directory not configured"}},{status:500});let a=await (0,p.S)(s);if(!a||!a.config)return u.NextResponse.json({success:!1,error:{type:"VALIDATION_ERROR",message:"Could not find Wrangler configuration"}},{status:400});let o=a.config;if(!o.d1_databases?.length)return u.NextResponse.json({success:!1,error:{type:"VALIDATION_ERROR",message:"No D1 databases configured"}},{status:400});let n=o.d1_databases[0].database_name;d.A.debug(`Initiating data pull for database: ${n}`);let i=await c(s,r,t,n);return d.A.debug("Data pull result:",i),u.NextResponse.json({success:!0,message:i.message,details:i})}catch(e){return d.A.error("Pull data confirm error:",e),u.NextResponse.json({success:!1,error:{type:e.type||"EXECUTION_ERROR",message:e.message||"Failed to apply data pull"}},{status:500})}}async function g(){return new u.NextResponse(null,{status:204})}let m=new a.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/pull-data/confirm/route",pathname:"/api/pull-data/confirm",filename:"route",bundlePath:"app/api/pull-data/confirm/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/pull-data/confirm/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:b,workUnitAsyncStorage:x,serverHooks:A}=m;function h(){return(0,n.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:x})}}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[994,452,391,226],()=>t(2918));module.exports=s})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=377,a.ids=[377],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1708:a=>{a.exports=require("node:process")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},55591:a=>{a.exports=require("https")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},73136:a=>{a.exports=require("node:url")},74075:a=>{a.exports=require("zlib")},76760:a=>{a.exports=require("node:path")},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},81630:a=>{a.exports=require("http")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},94735:a=>{a.exports=require("events")},98510:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>H,patchFetch:()=>G,routeModule:()=>C,serverHooks:()=>F,workAsyncStorage:()=>D,workUnitAsyncStorage:()=>E});var d={};c.r(d),c.d(d,{OPTIONS:()=>B,POST:()=>A});var e=c(95736),f=c(9117),g=c(4044),h=c(39326),i=c(32324),j=c(261),k=c(54290),l=c(85328),m=c(38928),n=c(46595),o=c(3421),p=c(17679),q=c(41681),r=c(63446),s=c(86439),t=c(51356),u=c(10641),v=c(89827),w=c(40032),x=c(63491),y=c(51082);async function z(a,b,c,d){y.A.debug("Starting data pull process...");let e={...process.env,CLOUDFLARE_API_TOKEN:c,CLOUDFLARE_ACCOUNT_ID:b};y.A.debug("Fetching current schema for data pull...");let f=(await (0,w.ZX)(a,d,e,!1)).filter(a=>"table"===a.type&&a.name);y.A.debug("Local table schema for data pull:",f.map(a=>a.name));let g=function(a){let b={};a.forEach(a=>{let c;b[a.name]=new Set;let d=/FOREIGN KEY\s*\([^)]*\)\s+REFERENCES\s+(\w+)/gi;for(;null!==(c=d.exec(a.sql));){let d=c[1];b[a.name].add(d)}}),y.A.debug("Computed dependency graph:",b);let c=[],d={};return Object.keys(b).forEach(a=>{d[a]||function a(e){if("temp"===d[e])throw Error(`Cycle detected in dependencies at table ${e}`);d[e]||(d[e]="temp",b[e].forEach(c=>{b[c]&&a(c)}),d[e]="perm",c.push(e))}(a)}),y.A.debug("Computed insertion order (parent tables first):",c),c}(f);for(let b of(y.A.debug("Final computed insertion order:",g),g)){let c=f.find(a=>a.name===b);if(!c){y.A.debug(`Skipping table ${b} as it is not in the current schema list.`);continue}y.A.debug(`Processing table: ${b}`);let g=function(a){let b=a.columns?.find(a=>a.isPrimaryKey),c=b?b.name:"rowid";return y.A.debug(`Determined ordering column for table ${a.name||"unknown"}: ${c}`),c}(c);y.A.debug(`Fetching data for table: ${b} ordered by ${g}`);let h=await (0,v.h3)(a,d,b,e,75,g);if(y.A.debug(`Fetched ${h.length} records for table: ${b}`),h.length>0){let c=(0,v.xk)(b,h);y.A.debug(`Generated bulk insert SQL for ${b}: ${c}`);try{await (0,v.KK)(a,d,c,e,!1),y.A.debug(`Bulk inserted ${h.length} records into table: ${b}`)}catch(a){throw y.A.error(`Error inserting data into table ${b}:`,a),Error(`Data pull failed for table ${b}: ${a.message}`)}}else y.A.debug(`No data fetched for table: ${b}`)}return y.A.debug("Data pull process completed successfully."),{message:"All data pulled successfully."}}async function A(a){try{y.A.debug("Received request for data pull.");let{accountId:b,apiToken:c}=await a.json(),d=process.env.D1_PROJECT_DIR;if(!d)return u.NextResponse.json({success:!1,error:{type:"VALIDATION_ERROR",message:"Project directory not configured"}},{status:500});let e=await (0,x.S)(d);if(!e||!e.config)return u.NextResponse.json({success:!1,error:{type:"VALIDATION_ERROR",message:"Could not find Wrangler configuration"}},{status:400});let f=e.config;if(!f.d1_databases?.length)return u.NextResponse.json({success:!1,error:{type:"VALIDATION_ERROR",message:"No D1 databases configured"}},{status:400});let g=f.d1_databases[0].database_name;y.A.debug(`Initiating data pull for database: ${g}`);let h=await z(d,b,c,g);return y.A.debug("Data pull result:",h),u.NextResponse.json({success:!0,message:h.message,details:h})}catch(a){return y.A.error("Pull data confirm error:",a),u.NextResponse.json({success:!1,error:{type:a.type||"EXECUTION_ERROR",message:a.message||"Failed to apply data pull"}},{status:500})}}async function B(){return new u.NextResponse(null,{status:204})}let C=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/pull-data/confirm/route",pathname:"/api/pull-data/confirm",filename:"route",bundlePath:"app/api/pull-data/confirm/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/pull-data/confirm/route.js",nextConfigOutput:"",userland:d}),{workAsyncStorage:D,workUnitAsyncStorage:E,serverHooks:F}=C;function G(){return(0,g.patchFetch)({workAsyncStorage:D,workUnitAsyncStorage:E})}async function H(a,b,c){var d;let e="/api/pull-data/confirm/route";"/index"===e&&(e="/");let g=await C.prepare(a,b,{srcPage:e,multiZoneDraftMode:!1});if(!g)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:u,params:v,nextConfig:w,isDraftMode:x,prerenderManifest:y,routerServerContext:z,isOnDemandRevalidate:A,revalidateOnlyGenerated:B,resolvedPathname:D}=g,E=(0,j.normalizeAppPath)(e),F=!!(y.dynamicRoutes[E]||y.routes[D]);if(F&&!x){let a=!!y.routes[D],b=y.dynamicRoutes[E];if(b&&!1===b.fallback&&!a)throw new s.NoFallbackError}let G=null;!F||C.isDev||x||(G="/index"===(G=D)?"/":G);let H=!0===C.isDev||!F,I=F&&!H,J=a.method||"GET",K=(0,i.getTracer)(),L=K.getActiveScopeSpan(),M={params:v,prerenderManifest:y,renderOpts:{experimental:{cacheComponents:!!w.experimental.cacheComponents,authInterrupts:!!w.experimental.authInterrupts},supportsDynamicResponse:H,incrementalCache:(0,h.getRequestMeta)(a,"incrementalCache"),cacheLifeProfiles:null==(d=w.experimental)?void 0:d.cacheLife,isRevalidate:I,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d)=>C.onRequestError(a,b,d,z)},sharedContext:{buildId:u}},N=new k.NodeNextRequest(a),O=new k.NodeNextResponse(b),P=l.NextRequestAdapter.fromNodeNextRequest(N,(0,l.signalFromNodeResponse)(b));try{let d=async c=>C.handle(P,M).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let d=K.getRootSpanAttributes();if(!d)return;if(d.get("next.span_type")!==m.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${d.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=d.get("next.route");if(e){let a=`${J} ${e}`;c.setAttributes({"next.route":e,"http.route":e,"next.span_name":a}),c.updateName(a)}else c.updateName(`${J} ${a.url}`)}),g=async g=>{var i,j;let k=async({previousCacheEntry:f})=>{try{if(!(0,h.getRequestMeta)(a,"minimalMode")&&A&&B&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let e=await d(g);a.fetchMetrics=M.renderOpts.fetchMetrics;let i=M.renderOpts.pendingWaitUntil;i&&c.waitUntil&&(c.waitUntil(i),i=void 0);let j=M.renderOpts.collectedTags;if(!F)return await (0,o.I)(N,O,e,M.renderOpts.pendingWaitUntil),null;{let a=await e.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(e.headers);j&&(b[r.NEXT_CACHE_TAGS_HEADER]=j),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==M.renderOpts.collectedRevalidate&&!(M.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&M.renderOpts.collectedRevalidate,d=void 0===M.renderOpts.collectedExpire||M.renderOpts.collectedExpire>=r.INFINITE_CACHE?void 0:M.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:e.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:d}}}}catch(b){throw(null==f?void 0:f.isStale)&&await C.onRequestError(a,b,{routerKind:"App Router",routePath:e,routeType:"route",revalidateReason:(0,n.c)({isRevalidate:I,isOnDemandRevalidate:A})},z),b}},l=await C.handleResponse({req:a,nextConfig:w,cacheKey:G,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:y,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:B,responseGenerator:k,waitUntil:c.waitUntil});if(!F)return null;if((null==l||null==(i=l.value)?void 0:i.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==l||null==(j=l.value)?void 0:j.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});(0,h.getRequestMeta)(a,"minimalMode")||b.setHeader("x-nextjs-cache",A?"REVALIDATED":l.isMiss?"MISS":l.isStale?"STALE":"HIT"),x&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let m=(0,p.fromNodeOutgoingHttpHeaders)(l.value.headers);return(0,h.getRequestMeta)(a,"minimalMode")&&F||m.delete(r.NEXT_CACHE_TAGS_HEADER),!l.cacheControl||b.getHeader("Cache-Control")||m.get("Cache-Control")||m.set("Cache-Control",(0,q.getCacheControlHeader)(l.cacheControl)),await (0,o.I)(N,O,new Response(l.value.body,{headers:m,status:l.value.status||200})),null};L?await g(L):await K.withPropagatedContext(a.headers,()=>K.trace(m.BaseServerSpan.handleRequest,{spanName:`${J} ${a.url}`,kind:i.SpanKind.SERVER,attributes:{"http.method":J,"http.target":a.url}},g))}catch(b){if(b instanceof s.NoFallbackError||await C.onRequestError(a,b,{routerKind:"App Router",routePath:E,routeType:"route",revalidateReason:(0,n.c)({isRevalidate:I,isOnDemandRevalidate:A})}),F)throw b;return await (0,o.I)(N,O,new Response(null,{status:500})),null}}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[873,692,347,626],()=>b(b.s=98510));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../../node_modules/better-sqlite3/build/Release/better_sqlite3.node","../../../../../../node_modules/better-sqlite3/lib/database.js","../../../../../../node_modules/better-sqlite3/lib/index.js","../../../../../../node_modules/better-sqlite3/lib/methods/aggregate.js","../../../../../../node_modules/better-sqlite3/lib/methods/backup.js","../../../../../../node_modules/better-sqlite3/lib/methods/function.js","../../../../../../node_modules/better-sqlite3/lib/methods/inspect.js","../../../../../../node_modules/better-sqlite3/lib/methods/pragma.js","../../../../../../node_modules/better-sqlite3/lib/methods/serialize.js","../../../../../../node_modules/better-sqlite3/lib/methods/table.js","../../../../../../node_modules/better-sqlite3/lib/methods/transaction.js","../../../../../../node_modules/better-sqlite3/lib/methods/wrappers.js","../../../../../../node_modules/better-sqlite3/lib/sqlite-error.js","../../../../../../node_modules/better-sqlite3/lib/util.js","../../../../../../node_modules/better-sqlite3/package.json","../../../../../../node_modules/bindings/bindings.js","../../../../../../node_modules/bindings/package.json","../../../../../../node_modules/file-uri-to-path/index.js","../../../../../../node_modules/file-uri-to-path/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/
|
|
1
|
+
{"version":1,"files":["../../../../../../node_modules/better-sqlite3/build/Release/better_sqlite3.node","../../../../../../node_modules/better-sqlite3/lib/database.js","../../../../../../node_modules/better-sqlite3/lib/index.js","../../../../../../node_modules/better-sqlite3/lib/methods/aggregate.js","../../../../../../node_modules/better-sqlite3/lib/methods/backup.js","../../../../../../node_modules/better-sqlite3/lib/methods/function.js","../../../../../../node_modules/better-sqlite3/lib/methods/inspect.js","../../../../../../node_modules/better-sqlite3/lib/methods/pragma.js","../../../../../../node_modules/better-sqlite3/lib/methods/serialize.js","../../../../../../node_modules/better-sqlite3/lib/methods/table.js","../../../../../../node_modules/better-sqlite3/lib/methods/transaction.js","../../../../../../node_modules/better-sqlite3/lib/methods/wrappers.js","../../../../../../node_modules/better-sqlite3/lib/sqlite-error.js","../../../../../../node_modules/better-sqlite3/lib/util.js","../../../../../../node_modules/better-sqlite3/package.json","../../../../../../node_modules/bindings/bindings.js","../../../../../../node_modules/bindings/package.json","../../../../../../node_modules/file-uri-to-path/index.js","../../../../../../node_modules/file-uri-to-path/package.json","../../../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../../node_modules/next/dist/lib/constants.js","../../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../../node_modules/next/dist/lib/is-error.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/lib/cache-handlers/default.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../../../../../../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../../../../../../node_modules/next/dist/shared/lib/segment.js","../../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/347.js","../../../../chunks/366.js","../../../../chunks/626.js","../../../../chunks/692.js","../../../../chunks/873.js","../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/pull-data/confirm/route"]={"moduleLoading":{"prefix":"/_next/","
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/pull-data/confirm/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"622":{"*":{"id":"82146","name":"*","chunks":[],"async":false}},"930":{"*":{"id":"32122","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"31603","name":"*","chunks":[],"async":false}},"3190":{"*":{"id":"60122","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"75170","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"12263","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"78922","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"54160","name":"*","chunks":[],"async":false}},"7747":{"*":{"id":"60673","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"68495","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"29234","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"77526","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":622,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":622,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5706,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-77b9a2d152da81dd.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":134,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-77b9a2d152da81dd.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":3673,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-77b9a2d152da81dd.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":7747,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-77b9a2d152da81dd.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":3190,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-77b9a2d152da81dd.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":930,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","69","static/chunks/69-00a70b2df83ed9ee.js","823","static/chunks/823-77b9a2d152da81dd.js","974","static/chunks/app/page-4170252891367dde.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/262ae258bbcfd289.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/pull-data/confirm/route":[]},"rscModuleMapping":{"622":{"*":{"id":"51384","name":"*","chunks":[],"async":false}},"930":{"*":{"id":"1905","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"23597","name":"*","chunks":[],"async":false}},"3190":{"*":{"id":"46254","name":"*","chunks":[],"async":false}},"3673":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"89748","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"73041","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"7184","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"81170","name":"*","chunks":[],"async":false}},"7747":{"*":{"id":"44158","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"36893","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"69576","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"6060","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var e={};e.id=223,e.ids=[223,487],e.modules={7550:e=>{e.exports=require("better-sqlite3")},846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9428:e=>{e.exports=require("buffer")},9646:e=>{e.exports=require("child_process")},5511:e=>{e.exports=require("crypto")},4735:e=>{e.exports=require("events")},9021:e=>{e.exports=require("fs")},9748:e=>{e.exports=require("fs/promises")},1630:e=>{e.exports=require("http")},5591:e=>{e.exports=require("https")},1820:e=>{e.exports=require("os")},3873:e=>{e.exports=require("path")},7910:e=>{e.exports=require("stream")},1204:e=>{e.exports=require("string_decoder")},8354:e=>{e.exports=require("util")},4075:e=>{e.exports=require("zlib")},3024:e=>{e.exports=require("node:fs")},6760:e=>{e.exports=require("node:path")},1708:e=>{e.exports=require("node:process")},3136:e=>{e.exports=require("node:url")},4358:(e,t,r)=>{r.r(t),r.d(t,{patchFetch:()=>S,routeModule:()=>I,serverHooks:()=>N,workAsyncStorage:()=>b,workUnitAsyncStorage:()=>x});var a={};r.r(a),r.d(a,{OPTIONS:()=>A,POST:()=>_});var i=r(2706),s=r(8203),n=r(5994),o=r(9187),l=r(9748),c=r(5511),d=r(3873),p=r(8354),u=r(9646),m=r(5949),g=r(565),f=r(9421),w=r(4218),h=r(961),E=r(3868),y=r(1804);let R=(0,p.promisify)(u.exec);async function T(e,t){let r=t.database_name,a=process.env;try{let i=t.migrations_dir?d.join(e,t.migrations_dir):d.join(e,"migrations"),s=d.join(e,"migrations-temp");await (0,l.mkdir)(i,{recursive:!0}),await (0,l.mkdir)(s,{recursive:!0});let n=await (0,l.readdir)(s).catch(()=>[]);await Promise.all(n.map(e=>(0,l.unlink)(d.join(s,e)))),y.A.debug("Fetching remote migration metadata...");let o=await (0,h.GS)(e,r,a);y.A.debug("Remote migration metadata:",o),y.A.debug("Reading migration files from local migrations folder...");let p=new Map;for(let e of o){let t=e.name,r=d.join(i,t);try{let e=await (0,l.readFile)(r,"utf8");p.set(t,e),await (0,l.writeFile)(d.join(s,t),e,"utf8"),y.A.debug(`Staged migration file: ${t}`)}catch(e){throw y.A.error(`Migration file not found locally: ${t}`,e.message),Error(`Migration file not found locally: ${t}`)}}y.A.debug("Fetching local schema...");let u=await (0,w.ZX)(e,r,a,!1),m=u.filter(e=>"table"===e.type&&e.name&&"if"!==e.name.toLowerCase()),g=m.length>0?(0,w.IC)(m.map(e=>({tableName:e.name,sql:e.sql,type:e.type}))):[],T=/^(_cf_|sqlite_)/i,_=u.filter(e=>"trigger"===e.type&&!T.test(e.name)),A=u.filter(e=>"index"===e.type&&!T.test(e.name)),I=[...g].filter(e=>!T.test(e)).reverse();y.A.debug("Beginning destructive update...");let b=(0,E.w1)(e,t);if(b)try{for(let e of(b.pragma("foreign_keys = OFF"),_))y.A.debug(`Dropping trigger: ${e.name}`),b.prepare(`DROP TRIGGER IF EXISTS "${e.name}"`).run();for(let e of A)y.A.debug(`Dropping index: ${e.name}`),b.prepare(`DROP INDEX IF EXISTS "${e.name}"`).run();for(let e of I)y.A.debug(`Dropping table: ${e}`),b.prepare(`DROP TABLE IF EXISTS "${e}"`).run()}finally{b.pragma("foreign_keys = ON")}else{y.A.debug("better-sqlite3 unavailable, falling back to wrangler CLI for destructive update");let i=[..._.map(e=>`DROP TRIGGER IF EXISTS "${e.name}"`),...A.map(e=>`DROP INDEX IF EXISTS "${e.name}"`),...I.map(e=>`DROP TABLE IF EXISTS "${e}"`)];i.length>0&&await (0,f.KK)(e,r,i.join(";\n")+";",a,!1,t)}y.A.debug("Resetting local migrations table...");try{await (0,h.k0)(e,r,"local",!0)}catch(e){throw Error(`Error resetting migrations table: ${e.message}`)}(0,E.n3)(e,r);let x="win32"===process.platform?"npx.cmd":"npx",N={preview:[]},S="";try{for(let[s,n]of p.entries()){S=s,y.A.debug(`Applying migration: ${s}`);let o=d.join(i,s);await (0,l.writeFile)(o,n,"utf8");let p=c.createHash("sha256").update(n).digest("hex");await (0,h.CM)(e,r,{name:s,checksum:p},a,!1);let u=!1;try{let r=(0,E.executeLocalSQL)(e,t,n);null!==r&&(u=!0)}catch(e){throw e}if(!u){y.A.debug(`Applying ${s} via wrangler --file`);let{stdout:t}=await R(`${x} wrangler d1 execute ${r} --local --file="${o}" --json`,{cwd:e,env:{...process.env,...a},maxBuffer:0xa00000}),i=t?.trim();if(i?.startsWith("{")){let e=JSON.parse(i);if(e?.error)throw Error(e.error.text||JSON.stringify(e.error))}}N.preview.push({migration:s,action:"applied"})}}catch(e){throw Error(`Error applying migration ${S}: ${e.message}`)}for(let e of(y.A.debug("Replacing migrations folder with staged files..."),await (0,l.readdir)(i).catch(()=>[])))await (0,l.unlink)(d.join(i,e));for(let[e,t]of p.entries())await (0,l.writeFile)(d.join(i,e),t,"utf8");return y.A.debug("Pull migration applied successfully."),{appliedMigrations:Array.from(p.keys()),details:N}}catch(e){throw y.A.error("Pull migration error:",e),e}}async function _(e){if("true"!==process.env.D1_IS_PRO)return o.NextResponse.json({success:!1,error:{type:"PRO_REQUIRED",message:"Pro license required. Run: d1s --license YOUR-KEY"}},{status:402});try{let t=process.env.D1_PROJECT_DIR;if(!t)return o.NextResponse.json({success:!1,error:{type:f.wU.VALIDATION_ERROR,message:"Project directory not configured"}},{status:500});let r=await (0,m.S)(t);if(!r?.config)return o.NextResponse.json({success:!1,error:{type:f.wU.VALIDATION_ERROR,message:"Could not find Wrangler configuration"}},{status:400});let a=r.config;if(!a.d1_databases?.length)return o.NextResponse.json({success:!1,error:{type:f.wU.VALIDATION_ERROR,message:"No D1 databases configured"}},{status:400});let i=await e.json().catch(()=>({})),s=i?.db,n=s?a.d1_databases.find(e=>e.database_name===s):a.d1_databases[0];if(!n)return o.NextResponse.json({success:!1,error:{type:f.wU.VALIDATION_ERROR,message:`Database not found: ${s}`}},{status:400});let l=await T(t,n);return(0,g.s)("remote_pull"),o.NextResponse.json({success:!0,message:"Pull migrations applied successfully",details:l})}catch(e){return y.A.error("Pull remote confirm error:",e),o.NextResponse.json({success:!1,error:{type:e.type||f.wU.EXECUTION_ERROR,message:e.message||"Failed to apply pull migrations",details:e.details||{}}},{status:500})}}async function A(){return new o.NextResponse(null,{status:204})}let I=new i.AppRouteRouteModule({definition:{kind:s.RouteKind.APP_ROUTE,page:"/api/pull-remote/confirm/route",pathname:"/api/pull-remote/confirm",filename:"route",bundlePath:"app/api/pull-remote/confirm/route"},resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/pull-remote/confirm/route.js",nextConfigOutput:"",userland:a}),{workAsyncStorage:b,workUnitAsyncStorage:x,serverHooks:N}=I;function S(){return(0,n.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:x})}},3868:(e,t,r)=>{r.d(t,{executeLocalSQL:()=>m,k5:()=>p,n3:()=>g,w1:()=>u});var a=r(5511),i=r(3873),s=r(9021),n=r(7550),o=r(1804);let l=i.join(".wrangler","state","v3","d1","miniflare-D1DatabaseObject"),c=new Map;function d(e,t){let r=i.join(e,l);if(!s.existsSync(r))return null;let{database_id:n,database_name:c,binding:d}=t,p=[n,c,d].filter(Boolean),u=["","miniflare-D1DatabaseObject:","D1DatabaseObject:","d1:"],m=p.flatMap(e=>u.map(t=>{var r;return r=`${t}${e}`,a.createHash("sha256").update(r).digest("hex")})).map(e=>i.join(r,`${e}.sqlite`)).find(e=>s.existsSync(e));if(m)return m;let g=s.readdirSync(r).filter(e=>e.endsWith(".sqlite")).map(e=>({name:e,fullPath:i.join(r,e),mtime:s.statSync(i.join(r,e)).mtimeMs})).sort((e,t)=>t.mtime-e.mtime);return 1===g.length?g[0].fullPath:(g.length>1&&o.A.debug(`[local-db] Multiple SQLite files, no hash matched — falling back to wrangler CLI. dir=${r}, tried ids=${JSON.stringify(p)}`),o.A.debug(`[local-db] No SQLite files found. dir=${r}, tried ids=${JSON.stringify(p)}`),null)}function p(e,t){return null!==d(e,t)}function u(e,t){let r=`${e}:${t.database_name}`,a=d(e,t);if(c.has(r)){let e=c.get(r);if(e.path!==a){try{e.db.close()}catch{}c.delete(r)}else try{return e.db.prepare("SELECT 1").get(),e.db}catch{c.delete(r)}}if(!a)return null;try{let e=new n(a,{fileMustExist:!1});return e.pragma("journal_mode = WAL"),e.pragma("foreign_keys = ON"),c.set(r,{db:e,path:a}),e}catch{return null}}function m(e,t,r){let a=u(e,t);if(!a)return null;let i=r.trim(),s=i.toUpperCase().replace(/\s+/g," "),n=i.split(";").map(e=>e.trim()).filter(Boolean);if(n.length>1){let e=[],t=0,r=0;return a.transaction(()=>{for(let i of n){let s=i.toUpperCase().replace(/\s+/g," ");if(s.startsWith("SELECT")||s.startsWith("PRAGMA")||s.startsWith("EXPLAIN")){let t=a.prepare(i).all();e=e.concat(t)}else{let e=a.prepare(i).run();t+=e.changes,r=e.lastInsertRowid}}})(),JSON.stringify([{results:e,success:!0,meta:{changes:t,last_row_id:r,rows_read:e.length,rows_written:t}}])}if(s.startsWith("SELECT")||s.startsWith("PRAGMA")||s.startsWith("EXPLAIN")){let e=a.prepare(i).all();return JSON.stringify([{results:e,success:!0,meta:{rows_read:e.length,rows_written:0,changed_db:!1}}])}let o=a.prepare(i).run();return JSON.stringify([{results:[],success:!0,meta:{changes:o.changes,last_row_id:o.lastInsertRowid,rows_read:0,rows_written:o.changes,changed_db:o.changes>0}}])}function g(e,t){let r=`${e}:${t}`,a=c.get(r);if(a){try{a.db.close()}catch{}c.delete(r)}}},961:(e,t,r)=>{r.d(t,{A8:()=>R,CM:()=>h,GS:()=>f,Gc:()=>T,JD:()=>g,Sl:()=>y,ai:()=>w,hI:()=>E,k0:()=>u});var a=r(9748),i=r(8354),s=r(9646),n=r(5511),o=r(3873),l=r(9421),c=r(4218),d=r(1804);let p=(0,i.promisify)(s.exec);async function u(e,t,r="local",a=!1){let i="remote"===r?"--remote":"--local",s="remote"===r?`
|
|
1
|
+
"use strict";(()=>{var a={};a.id=223,a.ids=[223,366],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1708:a=>{a.exports=require("node:process")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10366:(a,b,c)=>{c.d(b,{executeLocalSQL:()=>n,k5:()=>l,n3:()=>o,w1:()=>m});var d=c(55511),e=c(33873),f=c(29021),g=c(87550),h=c(51082);let i=e.join(".wrangler","state","v3","d1","miniflare-D1DatabaseObject"),j=new Map;function k(a,b){let c=e.join(a,i);if(!f.existsSync(c))return null;let{database_id:g,database_name:j,binding:k}=b,l=[g,j,k].filter(Boolean),m=["","miniflare-D1DatabaseObject:","D1DatabaseObject:","d1:"],n=l.flatMap(a=>m.map(b=>{var c;return c=`${b}${a}`,d.createHash("sha256").update(c).digest("hex")})).map(a=>e.join(c,`${a}.sqlite`)).find(a=>f.existsSync(a));if(n)return n;let o=f.readdirSync(c).filter(a=>a.endsWith(".sqlite")).map(a=>({name:a,fullPath:e.join(c,a),mtime:f.statSync(e.join(c,a)).mtimeMs})).sort((a,b)=>b.mtime-a.mtime);return 1===o.length?o[0].fullPath:(o.length>1&&h.A.debug(`[local-db] Multiple SQLite files, no hash matched — falling back to wrangler CLI. dir=${c}, tried ids=${JSON.stringify(l)}`),h.A.debug(`[local-db] No SQLite files found. dir=${c}, tried ids=${JSON.stringify(l)}`),null)}function l(a,b){return null!==k(a,b)}function m(a,b){let c=`${a}:${b.database_name}`,d=k(a,b);if(j.has(c)){let a=j.get(c);if(a.path!==d){try{a.db.close()}catch{}j.delete(c)}else try{return a.db.prepare("SELECT 1").get(),a.db}catch{j.delete(c)}}if(!d)return null;try{let a=new g(d,{fileMustExist:!1});return a.pragma("journal_mode = WAL"),a.pragma("foreign_keys = ON"),j.set(c,{db:a,path:d}),a}catch{return null}}function n(a,b,c){let d=m(a,b);if(!d)return null;let e=c.trim(),f=e.toUpperCase().replace(/\s+/g," "),g=e.split(";").map(a=>a.trim()).filter(Boolean);if(g.length>1){let a=[],b=0,c=0;return d.transaction(()=>{for(let e of g){let f=e.toUpperCase().replace(/\s+/g," ");if(f.startsWith("SELECT")||f.startsWith("PRAGMA")||f.startsWith("EXPLAIN")){let b=d.prepare(e).all();a=a.concat(b)}else{let a=d.prepare(e).run();b+=a.changes,c=a.lastInsertRowid}}})(),JSON.stringify([{results:a,success:!0,meta:{changes:b,last_row_id:c,rows_read:a.length,rows_written:b}}])}if(f.startsWith("SELECT")||f.startsWith("PRAGMA")||f.startsWith("EXPLAIN")){let a=d.prepare(e).all();return JSON.stringify([{results:a,success:!0,meta:{rows_read:a.length,rows_written:0,changed_db:!1}}])}let h=d.prepare(e).run();return JSON.stringify([{results:[],success:!0,meta:{changes:h.changes,last_row_id:h.lastInsertRowid,rows_read:0,rows_written:h.changes,changed_db:h.changes>0}}])}function o(a,b){let c=`${a}:${b}`,d=j.get(c);if(d){try{d.db.close()}catch{}j.delete(c)}}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},52861:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>Q,patchFetch:()=>P,routeModule:()=>L,serverHooks:()=>O,workAsyncStorage:()=>M,workUnitAsyncStorage:()=>N});var d={};c.r(d),c.d(d,{OPTIONS:()=>K,POST:()=>J});var e=c(95736),f=c(9117),g=c(4044),h=c(39326),i=c(32324),j=c(261),k=c(54290),l=c(85328),m=c(38928),n=c(46595),o=c(3421),p=c(17679),q=c(41681),r=c(63446),s=c(86439),t=c(51356),u=c(10641),v=c(79748),w=c(55511),x=c(33873),y=c(28354),z=c(79646),A=c(63491),B=c(60627),C=c(89827),D=c(40032),E=c(62435),F=c(10366),G=c(51082);let H=(0,y.promisify)(z.exec);async function I(a,b){let c=b.database_name,d=process.env;try{let e=b.migrations_dir?x.join(a,b.migrations_dir):x.join(a,"migrations"),f=x.join(a,"migrations-temp");await (0,v.mkdir)(e,{recursive:!0}),await (0,v.mkdir)(f,{recursive:!0});let g=await (0,v.readdir)(f).catch(()=>[]);await Promise.all(g.map(a=>(0,v.unlink)(x.join(f,a)))),G.A.debug("Fetching remote migration metadata...");let h=await (0,E.GS)(a,c,d);G.A.debug("Remote migration metadata:",h),G.A.debug("Reading migration files from local migrations folder...");let i=new Map;for(let a of h){let b=a.name,c=x.join(e,b);try{let a=await (0,v.readFile)(c,"utf8");i.set(b,a),await (0,v.writeFile)(x.join(f,b),a,"utf8"),G.A.debug(`Staged migration file: ${b}`)}catch(a){throw G.A.error(`Migration file not found locally: ${b}`,a.message),Error(`Migration file not found locally: ${b}`)}}G.A.debug("Fetching local schema...");let j=await (0,D.ZX)(a,c,d,!1),k=j.filter(a=>"table"===a.type&&a.name&&"if"!==a.name.toLowerCase()),l=k.length>0?(0,D.IC)(k.map(a=>({tableName:a.name,sql:a.sql,type:a.type}))):[],m=/^(_cf_|sqlite_)/i,n=j.filter(a=>"trigger"===a.type&&!m.test(a.name)),o=j.filter(a=>"index"===a.type&&!m.test(a.name)),p=[...l].filter(a=>!m.test(a)).reverse();G.A.debug("Beginning destructive update...");let q=(0,F.w1)(a,b);if(q)try{for(let a of(q.pragma("foreign_keys = OFF"),n))G.A.debug(`Dropping trigger: ${a.name}`),q.prepare(`DROP TRIGGER IF EXISTS "${a.name}"`).run();for(let a of o)G.A.debug(`Dropping index: ${a.name}`),q.prepare(`DROP INDEX IF EXISTS "${a.name}"`).run();for(let a of p)G.A.debug(`Dropping table: ${a}`),q.prepare(`DROP TABLE IF EXISTS "${a}"`).run()}finally{q.pragma("foreign_keys = ON")}else{G.A.debug("better-sqlite3 unavailable, falling back to wrangler CLI for destructive update");let e=[...n.map(a=>`DROP TRIGGER IF EXISTS "${a.name}"`),...o.map(a=>`DROP INDEX IF EXISTS "${a.name}"`),...p.map(a=>`DROP TABLE IF EXISTS "${a}"`)];e.length>0&&await (0,C.KK)(a,c,e.join(";\n")+";",d,!1,b)}G.A.debug("Resetting local migrations table...");try{await (0,E.k0)(a,c,"local",!0)}catch(a){throw Error(`Error resetting migrations table: ${a.message}`)}(0,F.n3)(a,c);let r="win32"===process.platform?"npx.cmd":"npx",s={preview:[]},t="";try{for(let[f,g]of i.entries()){t=f,G.A.debug(`Applying migration: ${f}`);let h=x.join(e,f);await (0,v.writeFile)(h,g,"utf8");let i=w.createHash("sha256").update(g).digest("hex");await (0,E.CM)(a,c,{name:f,checksum:i},d,!1);let j=!1;try{let c=(0,F.executeLocalSQL)(a,b,g);null!==c&&(j=!0)}catch(a){throw a}if(!j){G.A.debug(`Applying ${f} via wrangler --file`);let{stdout:b}=await H(`${r} wrangler d1 execute ${c} --local --file="${h}" --json`,{cwd:a,env:{...process.env,...d},maxBuffer:0xa00000}),e=b?.trim();if(e?.startsWith("{")){let a=JSON.parse(e);if(a?.error)throw Error(a.error.text||JSON.stringify(a.error))}}s.preview.push({migration:f,action:"applied"})}}catch(a){throw Error(`Error applying migration ${t}: ${a.message}`)}for(let a of(G.A.debug("Replacing migrations folder with staged files..."),await (0,v.readdir)(e).catch(()=>[])))await (0,v.unlink)(x.join(e,a));for(let[a,b]of i.entries())await (0,v.writeFile)(x.join(e,a),b,"utf8");return G.A.debug("Pull migration applied successfully."),{appliedMigrations:Array.from(i.keys()),details:s}}catch(a){throw G.A.error("Pull migration error:",a),a}}async function J(a){if("true"!==process.env.D1_IS_PRO)return u.NextResponse.json({success:!1,error:{type:"PRO_REQUIRED",message:"Pro license required. Run: d1s --license YOUR-KEY"}},{status:402});try{let b=process.env.D1_PROJECT_DIR;if(!b)return u.NextResponse.json({success:!1,error:{type:C.wU.VALIDATION_ERROR,message:"Project directory not configured"}},{status:500});let c=await (0,A.S)(b);if(!c?.config)return u.NextResponse.json({success:!1,error:{type:C.wU.VALIDATION_ERROR,message:"Could not find Wrangler configuration"}},{status:400});let d=c.config;if(!d.d1_databases?.length)return u.NextResponse.json({success:!1,error:{type:C.wU.VALIDATION_ERROR,message:"No D1 databases configured"}},{status:400});let e=await a.json().catch(()=>({})),f=e?.db,g=f?d.d1_databases.find(a=>a.database_name===f):d.d1_databases[0];if(!g)return u.NextResponse.json({success:!1,error:{type:C.wU.VALIDATION_ERROR,message:`Database not found: ${f}`}},{status:400});let h=await I(b,g);return(0,B.s)("remote_pull"),u.NextResponse.json({success:!0,message:"Pull migrations applied successfully",details:h})}catch(a){return G.A.error("Pull remote confirm error:",a),u.NextResponse.json({success:!1,error:{type:a.type||C.wU.EXECUTION_ERROR,message:a.message||"Failed to apply pull migrations",details:a.details||{}}},{status:500})}}async function K(){return new u.NextResponse(null,{status:204})}let L=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/pull-remote/confirm/route",pathname:"/api/pull-remote/confirm",filename:"route",bundlePath:"app/api/pull-remote/confirm/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/pull-remote/confirm/route.js",nextConfigOutput:"",userland:d}),{workAsyncStorage:M,workUnitAsyncStorage:N,serverHooks:O}=L;function P(){return(0,g.patchFetch)({workAsyncStorage:M,workUnitAsyncStorage:N})}async function Q(a,b,c){var d;let e="/api/pull-remote/confirm/route";"/index"===e&&(e="/");let g=await L.prepare(a,b,{srcPage:e,multiZoneDraftMode:!1});if(!g)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:u,params:v,nextConfig:w,isDraftMode:x,prerenderManifest:y,routerServerContext:z,isOnDemandRevalidate:A,revalidateOnlyGenerated:B,resolvedPathname:C}=g,D=(0,j.normalizeAppPath)(e),E=!!(y.dynamicRoutes[D]||y.routes[C]);if(E&&!x){let a=!!y.routes[C],b=y.dynamicRoutes[D];if(b&&!1===b.fallback&&!a)throw new s.NoFallbackError}let F=null;!E||L.isDev||x||(F="/index"===(F=C)?"/":F);let G=!0===L.isDev||!E,H=E&&!G,I=a.method||"GET",J=(0,i.getTracer)(),K=J.getActiveScopeSpan(),M={params:v,prerenderManifest:y,renderOpts:{experimental:{cacheComponents:!!w.experimental.cacheComponents,authInterrupts:!!w.experimental.authInterrupts},supportsDynamicResponse:G,incrementalCache:(0,h.getRequestMeta)(a,"incrementalCache"),cacheLifeProfiles:null==(d=w.experimental)?void 0:d.cacheLife,isRevalidate:H,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d)=>L.onRequestError(a,b,d,z)},sharedContext:{buildId:u}},N=new k.NodeNextRequest(a),O=new k.NodeNextResponse(b),P=l.NextRequestAdapter.fromNodeNextRequest(N,(0,l.signalFromNodeResponse)(b));try{let d=async c=>L.handle(P,M).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let d=J.getRootSpanAttributes();if(!d)return;if(d.get("next.span_type")!==m.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${d.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=d.get("next.route");if(e){let a=`${I} ${e}`;c.setAttributes({"next.route":e,"http.route":e,"next.span_name":a}),c.updateName(a)}else c.updateName(`${I} ${a.url}`)}),g=async g=>{var i,j;let k=async({previousCacheEntry:f})=>{try{if(!(0,h.getRequestMeta)(a,"minimalMode")&&A&&B&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let e=await d(g);a.fetchMetrics=M.renderOpts.fetchMetrics;let i=M.renderOpts.pendingWaitUntil;i&&c.waitUntil&&(c.waitUntil(i),i=void 0);let j=M.renderOpts.collectedTags;if(!E)return await (0,o.I)(N,O,e,M.renderOpts.pendingWaitUntil),null;{let a=await e.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(e.headers);j&&(b[r.NEXT_CACHE_TAGS_HEADER]=j),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==M.renderOpts.collectedRevalidate&&!(M.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&M.renderOpts.collectedRevalidate,d=void 0===M.renderOpts.collectedExpire||M.renderOpts.collectedExpire>=r.INFINITE_CACHE?void 0:M.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:e.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:d}}}}catch(b){throw(null==f?void 0:f.isStale)&&await L.onRequestError(a,b,{routerKind:"App Router",routePath:e,routeType:"route",revalidateReason:(0,n.c)({isRevalidate:H,isOnDemandRevalidate:A})},z),b}},l=await L.handleResponse({req:a,nextConfig:w,cacheKey:F,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:y,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:B,responseGenerator:k,waitUntil:c.waitUntil});if(!E)return null;if((null==l||null==(i=l.value)?void 0:i.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==l||null==(j=l.value)?void 0:j.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});(0,h.getRequestMeta)(a,"minimalMode")||b.setHeader("x-nextjs-cache",A?"REVALIDATED":l.isMiss?"MISS":l.isStale?"STALE":"HIT"),x&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let m=(0,p.fromNodeOutgoingHttpHeaders)(l.value.headers);return(0,h.getRequestMeta)(a,"minimalMode")&&E||m.delete(r.NEXT_CACHE_TAGS_HEADER),!l.cacheControl||b.getHeader("Cache-Control")||m.get("Cache-Control")||m.set("Cache-Control",(0,q.getCacheControlHeader)(l.cacheControl)),await (0,o.I)(N,O,new Response(l.value.body,{headers:m,status:l.value.status||200})),null};K?await g(K):await J.withPropagatedContext(a.headers,()=>J.trace(m.BaseServerSpan.handleRequest,{spanName:`${I} ${a.url}`,kind:i.SpanKind.SERVER,attributes:{"http.method":I,"http.target":a.url}},g))}catch(b){if(b instanceof s.NoFallbackError||await L.onRequestError(a,b,{routerKind:"App Router",routePath:D,routeType:"route",revalidateReason:(0,n.c)({isRevalidate:H,isOnDemandRevalidate:A})}),E)throw b;return await (0,o.I)(N,O,new Response(null,{status:500})),null}}},55511:a=>{a.exports=require("crypto")},55591:a=>{a.exports=require("https")},60627:(a,b,c)=>{c.d(b,{s:()=>j});var d=c(55511),e=c(29021),f=c(21820),g=c(33873);let h=(0,g.join)((0,f.homedir)(),".d1-studio"),i=(0,g.join)(h,"config.json");async function j(a,b){if(!process.env.D1_STUDIO_NO_TELEMETRY)try{await fetch("https://d1-studio.com/api/track",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({installId:function(){if((0,e.existsSync)(h)||(0,e.mkdirSync)(h,{recursive:!0}),(0,e.existsSync)(i))try{let a=JSON.parse((0,e.readFileSync)(i,"utf8"));if(a.installId)return a.installId}catch{}let a=(0,d.randomUUID)();return(0,e.writeFileSync)(i,JSON.stringify({installId:a})),a}(),event:a,version:b,node:process.version,platform:process.platform}),signal:AbortSignal.timeout(3e3)})}catch{}}},62435:(a,b,c)=>{c.d(b,{A8:()=>u,CM:()=>r,GS:()=>p,Gc:()=>v,JD:()=>o,Sl:()=>t,ai:()=>q,hI:()=>s,k0:()=>m});var d=c(79748),e=c(28354),f=c(79646),g=c(55511),h=c(33873),i=c(89827),j=c(40032),k=c(51082);let l=(0,e.promisify)(f.exec);async function m(a,b,c="local",d=!1){let e="remote"===c?"--remote":"--local",f="remote"===c?`
|
|
2
2
|
CREATE TABLE IF NOT EXISTS d1_migrations (
|
|
3
3
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
4
4
|
name TEXT NOT NULL UNIQUE,
|
|
@@ -11,16 +11,16 @@
|
|
|
11
11
|
checksum TEXT NULL,
|
|
12
12
|
applied_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
|
13
13
|
);
|
|
14
|
-
`;try{await
|
|
14
|
+
`;try{await l(`wrangler d1 execute ${b} ${e} --command="${f.replace(/"/g,'\\"')}"`,{cwd:a}),d&&await l(`wrangler d1 execute ${b} ${e} --command="${"DELETE FROM d1_migrations;".replace(/"/g,'\\"')}"`,{cwd:a})}catch(a){throw k.A.error(`Failed to initialize migrations table in ${c}:`,a),a}}function n(a){let b=new Date().toISOString().replace(/[^0-9]/g,"").slice(0,-3),c=a.type.toLowerCase().replace(/_/g,"-");if("CREATE_INDEX"===a.type){let c=a.description.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-_]/g,"");return`${b}_create-index_${c}.sql`}{let d=`${b}_${{"create-table":"create-table","alter-table":"alter-table","drop-table":"drop-table","drop-index":"drop-index","create-view":"create-view","drop-view":"drop-view","add-foreign-key":"add-foreign-key","drop-foreign-key":"drop-foreign-key","add-constraint":"add-constraint","drop-constraint":"drop-constraint"}[c]||c}_${a.tableName}`;return"ALTER_TABLE"===a.type&&a.description&&(d+=`_${a.description}`),(d=d.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-_]/g,""))+".sql"}}async function o(a){let b=await (0,d.readFile)(a,"utf8");try{let a=(0,i.By)(b);return(0,i.Gq)(a),{isValid:!0,statement:a}}catch(a){return{isValid:!1,errors:a}}}async function p(a,b,c){try{let d=await (0,i.KK)(a,b,"SELECT name, applied_at FROM d1_migrations ORDER BY applied_at;",c,!0);if("string"==typeof d){let a=d.indexOf("[");if(-1!==a){let b=d.substring(a),c=JSON.parse(b);return c[0]?.results||[]}}return[]}catch(b){let a=[b.message,b.details?.originalError,b.details?.stderr,b.details?.stdout].filter(Boolean).join(" ");if(a.includes("no such table")||a.includes("d1_migrations"))return[];throw{type:i.wU.EXECUTION_ERROR,message:"Failed to get remote migrations",details:{error:a||"Failed to execute SQL command",suggestions:["Check remote database permissions","Verify credentials and connection"]}}}}async function q(a,b,{name:c,checksum:d},e="local"){let f="remote"===e?"--remote":"--local";if("local"===e&&d)try{await l(`wrangler d1 execute ${b} ${f} --command="SELECT checksum FROM d1_migrations LIMIT 1;"`,{cwd:a}).catch(()=>!1)||await l(`wrangler d1 execute ${b} ${f} --command="ALTER TABLE d1_migrations ADD COLUMN checksum TEXT;"`,{cwd:a})}catch(a){}let g="remote"!==e&&d?`
|
|
15
15
|
INSERT OR REPLACE INTO d1_migrations (name, checksum, applied_at)
|
|
16
|
-
VALUES ('${
|
|
16
|
+
VALUES ('${c}', '${d}', CURRENT_TIMESTAMP);
|
|
17
17
|
`:`
|
|
18
18
|
INSERT OR REPLACE INTO d1_migrations (name, applied_at)
|
|
19
|
-
VALUES ('${
|
|
20
|
-
`;try{await
|
|
19
|
+
VALUES ('${c}', CURRENT_TIMESTAMP);
|
|
20
|
+
`;try{await l(`wrangler d1 execute ${b} ${f} --command="${g.replace(/"/g,'\\"')}"`,{cwd:a})}catch(a){throw k.A.error("Failed to track migration:",a),a}}async function r(a,b,{name:c,checksum:d},e={},f=!1){let g=f||!d?`
|
|
21
21
|
INSERT OR REPLACE INTO d1_migrations (name, applied_at)
|
|
22
|
-
VALUES ('${
|
|
22
|
+
VALUES ('${c}', CURRENT_TIMESTAMP);
|
|
23
23
|
`:`
|
|
24
24
|
INSERT OR REPLACE INTO d1_migrations (name, checksum, applied_at)
|
|
25
|
-
VALUES ('${
|
|
26
|
-
`;try{await (0,
|
|
25
|
+
VALUES ('${c}', '${d}', CURRENT_TIMESTAMP);
|
|
26
|
+
`;try{await (0,i.KK)(a,b,g,e,f)}catch(a){throw{type:i.wU.EXECUTION_ERROR,message:`Failed to record migration ${c}`,details:{file:c,error:a.message,suggestions:["Check if migration is already recorded"]}}}}async function s(a,b){try{let c=await p(a,b,{}),d=new Map(c.map(a=>[a.name,a]));return{applied:Array.from(d.keys()),count:d.size}}catch(a){throw k.A.error("Failed to compare migrations:",a),a}}function t(a){return(0,g.createHash)("sha256").update(a).digest("hex")}async function u(a,b){try{await l(`wrangler d1 execute ${b} --local --command="SELECT checksum FROM d1_migrations LIMIT 1;"`,{cwd:a})}catch{try{await l(`wrangler d1 execute ${b} --local --command="ALTER TABLE d1_migrations ADD COLUMN checksum TEXT;"`,{cwd:a})}catch{}}}async function v(a,b,c){try{let e=h.join(a,"migrations");await (0,d.mkdir)(e,{recursive:!0});let f=[],g=[],k=[];for(let a of c)a.type===i.Pg.DATA_MODIFICATION?k.push(a):g.push(a);let l=new Map,m="__no_table__";for(let a of g){let b=a.tableName?a.tableName.toLowerCase():m;l.has(b)||l.set(b,[]),l.get(b).push(a)}let o=[...l.keys()].filter(a=>a!==m),p=[];if(o.length>0){let a=o.map(a=>l.get(a)[0]);p=(0,j.IC)(a)}for(let c of p){for(let g of l.get(c)||[])try{if(g.type===i.Pg.DROP_TABLE&&!await (0,i.F9)(a,b,{},g.tableName,!1))throw Error(`no such table: ${g.tableName}`);let c=await (0,i.KK)(a,b,g.sql);if(c&&(c.toLowerCase().includes("syntax error")||c.toLowerCase().includes("sqlite_error")))throw Error(c);let j=n(g),k=h.join(e,j),l=(0,i.tn)(g.sql);await (0,d.writeFile)(k,l,"utf8");let m=t(g.sql);await q(a,b,{name:j,checksum:m},"local"),f.push({type:g.type,table:g.tableName,migration:j,checksum:m})}catch(a){throw a}l.delete(c)}if(l.has(m))for(let c of l.get(m))try{await (0,i.KK)(a,b,c.sql);let g=n(c),j=h.join(e,g),k=(0,i.tn)(c.sql);await (0,d.writeFile)(j,k,"utf8");let l=t(c.sql);await q(a,b,{name:g,checksum:l},"local"),f.push({type:c.type,table:c.tableName||null,migration:g,checksum:l})}catch(a){throw a}for(let c of k)try{await (0,i.KK)(a,b,c.sql),f.push({type:c.type,table:c.tableName||null,executed:!0})}catch(a){throw a}return f}catch(a){throw a}}},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},73136:a=>{a.exports=require("node:url")},74075:a=>{a.exports=require("zlib")},76760:a=>{a.exports=require("node:path")},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},81630:a=>{a.exports=require("http")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[873,692,347,626],()=>b(b.s=52861));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../../node_modules/better-sqlite3/build/Release/better_sqlite3.node","../../../../../../node_modules/better-sqlite3/lib/database.js","../../../../../../node_modules/better-sqlite3/lib/index.js","../../../../../../node_modules/better-sqlite3/lib/methods/aggregate.js","../../../../../../node_modules/better-sqlite3/lib/methods/backup.js","../../../../../../node_modules/better-sqlite3/lib/methods/function.js","../../../../../../node_modules/better-sqlite3/lib/methods/inspect.js","../../../../../../node_modules/better-sqlite3/lib/methods/pragma.js","../../../../../../node_modules/better-sqlite3/lib/methods/serialize.js","../../../../../../node_modules/better-sqlite3/lib/methods/table.js","../../../../../../node_modules/better-sqlite3/lib/methods/transaction.js","../../../../../../node_modules/better-sqlite3/lib/methods/wrappers.js","../../../../../../node_modules/better-sqlite3/lib/sqlite-error.js","../../../../../../node_modules/better-sqlite3/lib/util.js","../../../../../../node_modules/better-sqlite3/package.json","../../../../../../node_modules/bindings/bindings.js","../../../../../../node_modules/bindings/package.json","../../../../../../node_modules/file-uri-to-path/index.js","../../../../../../node_modules/file-uri-to-path/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/
|
|
1
|
+
{"version":1,"files":["../../../../../../node_modules/better-sqlite3/build/Release/better_sqlite3.node","../../../../../../node_modules/better-sqlite3/lib/database.js","../../../../../../node_modules/better-sqlite3/lib/index.js","../../../../../../node_modules/better-sqlite3/lib/methods/aggregate.js","../../../../../../node_modules/better-sqlite3/lib/methods/backup.js","../../../../../../node_modules/better-sqlite3/lib/methods/function.js","../../../../../../node_modules/better-sqlite3/lib/methods/inspect.js","../../../../../../node_modules/better-sqlite3/lib/methods/pragma.js","../../../../../../node_modules/better-sqlite3/lib/methods/serialize.js","../../../../../../node_modules/better-sqlite3/lib/methods/table.js","../../../../../../node_modules/better-sqlite3/lib/methods/transaction.js","../../../../../../node_modules/better-sqlite3/lib/methods/wrappers.js","../../../../../../node_modules/better-sqlite3/lib/sqlite-error.js","../../../../../../node_modules/better-sqlite3/lib/util.js","../../../../../../node_modules/better-sqlite3/package.json","../../../../../../node_modules/bindings/bindings.js","../../../../../../node_modules/bindings/package.json","../../../../../../node_modules/file-uri-to-path/index.js","../../../../../../node_modules/file-uri-to-path/package.json","../../../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../../node_modules/next/dist/lib/constants.js","../../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../../node_modules/next/dist/lib/is-error.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/lib/cache-handlers/default.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../../../../../../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../../../../../../node_modules/next/dist/shared/lib/segment.js","../../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/347.js","../../../../chunks/366.js","../../../../chunks/626.js","../../../../chunks/692.js","../../../../chunks/873.js","../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/pull-remote/confirm/route"]={"moduleLoading":{"prefix":"/_next/","
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/pull-remote/confirm/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"622":{"*":{"id":"82146","name":"*","chunks":[],"async":false}},"930":{"*":{"id":"32122","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"31603","name":"*","chunks":[],"async":false}},"3190":{"*":{"id":"60122","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"75170","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"12263","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"78922","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"54160","name":"*","chunks":[],"async":false}},"7747":{"*":{"id":"60673","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"68495","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"29234","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"77526","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":622,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":622,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5706,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-77b9a2d152da81dd.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":134,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-77b9a2d152da81dd.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":3673,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-77b9a2d152da81dd.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":7747,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-77b9a2d152da81dd.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":3190,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","654","static/chunks/654-f2f8931465d44ae7.js","823","static/chunks/823-77b9a2d152da81dd.js","177","static/chunks/app/layout-a5219438265f0b6c.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":930,"name":"*","chunks":["421","static/chunks/421-55f8ce492f5bd9c3.js","69","static/chunks/69-00a70b2df83ed9ee.js","823","static/chunks/823-77b9a2d152da81dd.js","974","static/chunks/app/page-4170252891367dde.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/262ae258bbcfd289.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/api/pull-remote/confirm/route":[]},"rscModuleMapping":{"622":{"*":{"id":"51384","name":"*","chunks":[],"async":false}},"930":{"*":{"id":"1905","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"23597","name":"*","chunks":[],"async":false}},"3190":{"*":{"id":"46254","name":"*","chunks":[],"async":false}},"3673":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"89748","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"73041","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"7184","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"81170","name":"*","chunks":[],"async":false}},"7747":{"*":{"id":"44158","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"36893","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"69576","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"6060","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
|