@jlongo78/agent-spaces 0.3.6 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +5 -0
- package/.next/standalone/.next/build-manifest.json +4 -4
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +30 -25
- package/.next/standalone/.next/routes-manifest.json +40 -0
- package/.next/standalone/.next/server/app/(desktop)/admin/analytics/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/admin/analytics/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/admin/analytics/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/admin/analytics/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/admin/users/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/admin/users/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/admin/users/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/admin/users/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/analytics/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/analytics/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/analytics/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/analytics/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/network/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/network/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/network/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/network/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/page.js +2 -2
- package/.next/standalone/.next/server/app/(desktop)/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/projects/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/projects/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/sessions/[id]/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/sessions/[id]/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/sessions/[id]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/sessions/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/sessions/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/sessions/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/sessions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/sessions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/settings/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/settings/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/terminal/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/pane/[id]/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/terminal/pane/[id]/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/pane/[id]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/pane/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/remote/[nodeId]/[workspaceId]/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/terminal/remote/[nodeId]/[workspaceId]/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/remote/[nodeId]/[workspaceId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/remote/[nodeId]/[workspaceId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/workspaces/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/workspaces/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/workspaces/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/workspaces/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/_global-error/page.js +1 -1
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +2 -2
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/_not-found/page.js +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/analytics.html +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.rsc +6 -6
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin/analytics/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin/analytics.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/analytics.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/admin/analytics.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/admin/analytics.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/users.html +1 -1
- package/.next/standalone/.next/server/app/admin/users.rsc +6 -6
- package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin/users/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin/users.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/users.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/admin/users.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/users.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/admin/users.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/analytics.html +1 -1
- package/.next/standalone/.next/server/app/analytics.rsc +6 -6
- package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap/analytics/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap/analytics.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/analytics.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/analytics.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/analytics.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/analytics.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/admin/analytics/route.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/analytics/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/admin/users/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/users/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/admin/users/route.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/users/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/analytics/overview/route.js +2 -2
- package/.next/standalone/.next/server/app/api/analytics/overview/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/login/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/logout/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/me/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/me/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/totp/setup/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/totp/setup/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/totp/status/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/totp/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/totp/verify/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/totp/verify/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/bulk/route.js +2 -2
- package/.next/standalone/.next/server/app/api/bulk/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/chat/route.js +1 -1
- package/.next/standalone/.next/server/app/api/chat/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/config/route.js +1 -1
- package/.next/standalone/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/events/route.js +2 -2
- package/.next/standalone/.next/server/app/api/events/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/folders/route.js +1 -1
- package/.next/standalone/.next/server/app/api/folders/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/discovered/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/discovered/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/handshake/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/handshake/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/health/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/health/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/identity/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/identity/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/keys/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/keys/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/keys/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/keys/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/nodes/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/nodes/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/nodes/check/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/nodes/check/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/nodes/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/nodes/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/projects/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/projects/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/proxy/[nodeId]/[...path]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/proxy/[nodeId]/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/search/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/sessions/[id]/messages/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/sessions/[id]/messages/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/sessions/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/sessions/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/sessions/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/terminal/token/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/terminal/token/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/workspaces/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/workspaces/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/workspaces/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/workspaces/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/panes/[id]/route.js +2 -2
- package/.next/standalone/.next/server/app/api/panes/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/panes/route.js +2 -2
- package/.next/standalone/.next/server/app/api/panes/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/projects/route.js +2 -2
- package/.next/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/search/route.js +2 -2
- package/.next/standalone/.next/server/app/api/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/chat/route.js +2 -2
- package/.next/standalone/.next/server/app/api/sessions/[id]/chat/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/messages/route.js +2 -2
- package/.next/standalone/.next/server/app/api/sessions/[id]/messages/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/route.js +2 -2
- package/.next/standalone/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/route.js +2 -2
- package/.next/standalone/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sync/route.js +3 -3
- package/.next/standalone/.next/server/app/api/sync/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tags/route.js +2 -2
- package/.next/standalone/.next/server/app/api/tags/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tier/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/tier/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/tier/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/tier/route.js +7 -0
- package/.next/standalone/.next/server/app/api/tier/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/tier/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/tier/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route.js +7 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/route.js +7 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/[msgId]/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/[msgId]/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/[msgId]/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/[msgId]/route.js +7 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/[msgId]/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/[msgId]/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/[msgId]/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/route.js +7 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/route.js +2 -2
- package/.next/standalone/.next/server/app/api/workspaces/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/workspaces/[id]/sessions/route.js +2 -2
- package/.next/standalone/.next/server/app/api/workspaces/[id]/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/workspaces/route.js +2 -2
- package/.next/standalone/.next/server/app/api/workspaces/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/login/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/login/page.js +1 -1
- package/.next/standalone/.next/server/app/login/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login.html +1 -1
- package/.next/standalone/.next/server/app/login.rsc +5 -5
- package/.next/standalone/.next/server/app/login.segments/_full.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/login.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/m/page.js +1 -1
- package/.next/standalone/.next/server/app/m/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/m/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/projects/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/m/projects/page.js +1 -1
- package/.next/standalone/.next/server/app/m/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/m/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/projects.html +1 -1
- package/.next/standalone/.next/server/app/m/projects.rsc +6 -6
- package/.next/standalone/.next/server/app/m/projects.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/m/projects.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/projects.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/m/projects.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/projects.segments/m/projects/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/projects.segments/m/projects.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/projects.segments/m.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/sessions/[id]/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/m/sessions/[id]/page.js +1 -1
- package/.next/standalone/.next/server/app/m/sessions/[id]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/m/sessions/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/sessions/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/m/sessions/page.js +1 -1
- package/.next/standalone/.next/server/app/m/sessions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/m/sessions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/sessions.html +1 -1
- package/.next/standalone/.next/server/app/m/sessions.rsc +6 -6
- package/.next/standalone/.next/server/app/m/sessions.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/m/sessions.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/sessions.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/m/sessions.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/sessions.segments/m/sessions/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/sessions.segments/m/sessions.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/sessions.segments/m.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/settings/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/m/settings/page.js +1 -1
- package/.next/standalone/.next/server/app/m/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/m/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/settings.html +1 -1
- package/.next/standalone/.next/server/app/m/settings.rsc +6 -6
- package/.next/standalone/.next/server/app/m/settings.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/m/settings.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/settings.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/m/settings.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/settings.segments/m/settings/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/settings.segments/m/settings.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/settings.segments/m.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/terminal/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/m/terminal/page.js +1 -1
- package/.next/standalone/.next/server/app/m/terminal/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/m/terminal/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/terminal.html +1 -1
- package/.next/standalone/.next/server/app/m/terminal.rsc +6 -6
- package/.next/standalone/.next/server/app/m/terminal.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/m/terminal.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/terminal.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/m/terminal.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/terminal.segments/m/terminal/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/terminal.segments/m/terminal.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/terminal.segments/m.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m.html +1 -1
- package/.next/standalone/.next/server/app/m.rsc +6 -6
- package/.next/standalone/.next/server/app/m.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/m.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/m.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m.segments/m/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m.segments/m.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/network.html +1 -1
- package/.next/standalone/.next/server/app/network.rsc +6 -6
- package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap/network/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap/network.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/network.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/network.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/network.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/network.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/projects.html +1 -1
- package/.next/standalone/.next/server/app/projects.rsc +6 -6
- package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap/projects/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap/projects.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/projects.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/projects.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/projects.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/sessions.html +1 -1
- package/.next/standalone/.next/server/app/sessions.rsc +6 -6
- package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap/sessions/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap/sessions.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/sessions.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/sessions.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/sessions.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/sessions.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.html +1 -1
- package/.next/standalone/.next/server/app/settings.rsc +6 -6
- package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/terminal.html +1 -1
- package/.next/standalone/.next/server/app/terminal.rsc +6 -6
- package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap/terminal/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap/terminal.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/terminal.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/terminal.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/terminal.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/terminal.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/workspaces.html +1 -1
- package/.next/standalone/.next/server/app/workspaces.rsc +6 -6
- package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap/workspaces/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap/workspaces.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/workspaces.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/workspaces.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspaces.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/workspaces.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app-paths-manifest.json +5 -0
- package/.next/standalone/.next/server/chunks/[externals]_chokidar_a0cd9157._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__025cd038._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__042ba2bc._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__07cc153d._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__08e411dd._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0add852f._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0c113ed0._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0cf032ab._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__11293532._.js +13 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1194f2c1._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__19c2d094._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__19c3ad21._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1ebc634e._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__24197539._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2891c969._.js +11 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2c6e6625._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2fe2b40e._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__318f12c6._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__32df12e4._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__34e7cb21._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__49c92d87._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__52bde30c._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__53090a81._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__57193cf5._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5c33078d._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5f8c694a._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__630b9a6a._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__727d05f1._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__b71497ab._.js → [root-of-the-server]__75a774f0._.js} +19 -18
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__89124c96._.js → [root-of-the-server]__7f0bc701._.js} +19 -18
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8915603e._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8afe4d5e._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__9d15de27._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a1fbc199._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a1fe6070._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a3f604d6._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a5504205._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__abf53d11._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b78eeead._.js +11 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c1b8f8f6._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c3c74ca4._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c79824d9._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c9db5d8a._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__cbd9cb15._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ccb4e920._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d15515e3._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d490583e._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d9c106a9._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__de2c3bf8._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__dfbf7bdd._.js +19 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e1e26f47._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ee9346bf._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__fea012d6._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ff1b0769._.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_tier_route_actions_6186023b.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_workspaces_[id]_context_route_actions_e9cb4bed.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_workspaces_[id]_messages_route_actions_0cf1d576.js +3 -0
- package/.next/standalone/.next/server/chunks/ce889_server_app_api_workspaces_[id]_context_[key]_route_actions_8e11e764.js +3 -0
- package/.next/standalone/.next/server/chunks/ce889_server_app_api_workspaces_[id]_messages_[msgId]_route_actions_008a0317.js +3 -0
- package/.next/standalone/.next/server/chunks/src_lib_events_sse_ts_1ad73980._.js +6 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__ea64930e._.js → [root-of-the-server]__2b4e2acc._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__36a11bc9._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__63c35e0f._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__650a172d._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__ba1024f6._.js → [root-of-the-server]__67234962._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__72acd514._.js → [root-of-the-server]__c73bef9a._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__e921fdfc._.js +5 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__eac7aeff._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_548abc09._.js → _0946fdc3._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1f12caba._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_2230ad2d._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_3b54193d._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_43e7e611._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_5ac43c5d._.js +1 -3
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__3611990a._.js → _cd0986af._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_cd50a174._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_7e741697._.js → _de57b857._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_ef42f47a._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_f67f58f1._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_dd004864._.js → _fbc5e000._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_861e98fe._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_(desktop)_terminal_page_tsx_de5e8d85._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_m_terminal_page_tsx_553a0130._.js +2 -2
- package/.next/standalone/.next/server/edge/chunks/{[root-of-the-server]__6154bdc0._.js → [root-of-the-server]__32a0045c._.js} +3 -5
- package/.next/standalone/.next/server/edge/chunks/{turbopack-node_modules_next_dist_esm_build_templates_edge-wrapper_03b33eff.js → turbopack-node_modules_next_dist_esm_build_templates_edge-wrapper_a5230bba.js} +2 -2
- package/.next/standalone/.next/server/middleware-build-manifest.js +2 -2
- package/.next/standalone/.next/server/middleware-manifest.json +7 -7
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +2 -2
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/{4bd6943fa4082aa9.js → 3165c61fb2e4045d.js} +1 -1
- package/.next/standalone/.next/static/chunks/{f58f62604604c529.js → 31f45c67350373f2.js} +2 -2
- package/.next/standalone/.next/static/chunks/3c4ee171d96760e8.js +5 -0
- package/.next/standalone/.next/static/chunks/4e792c3078e37704.js +5 -0
- package/.next/standalone/.next/static/chunks/65afda485a466977.js +1 -0
- package/.next/standalone/.next/static/chunks/780381483091d8fb.js +1 -0
- package/.next/standalone/.next/static/chunks/7c1e6d7f1d3b4173.js +5 -0
- package/.next/standalone/.next/static/chunks/806334ea0f6ca92a.css +3 -0
- package/.next/standalone/.next/static/chunks/{0b733ac17fcb2bef.js → 8cc07e8d950d6962.js} +1 -1
- package/.next/standalone/.next/static/chunks/d0c839c82cf232b8.js +1 -0
- package/.next/standalone/.next/static/chunks/e6134a48180c8a36.js +1 -0
- package/.next/standalone/.next/static/chunks/{7de9141b1af425c3.js → e7772d64463868eb.js} +1 -1
- package/.next/standalone/.next/static/chunks/{e94f6965199a47e7.js → eb780226f5bd3892.js} +1 -1
- package/.next/standalone/.next/static/chunks/f2b58d718b34646d.js +1 -0
- package/.next/standalone/.next/static/chunks/f789a1d0736e1154.js +1 -0
- package/.next/standalone/.next/static/chunks/{turbopack-947de56768b27172.js → turbopack-ea18b8255590c757.js} +1 -1
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/README.md +46 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/glib-2.0/include/glibconfig.h +221 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/index.js +1 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.8.17.3 +0 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/package.json +42 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/README.md +46 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h +221 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js +1 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.3 +0 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json +42 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +30 -0
- package/.next/standalone/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node +0 -0
- package/.next/standalone/node_modules/@img/{sharp-win32-x64 → sharp-linux-x64}/package.json +46 -39
- package/.next/standalone/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node +0 -0
- package/.next/standalone/node_modules/@img/sharp-linuxmusl-x64/package.json +46 -0
- package/.next/standalone/node_modules/chokidar/LICENSE +21 -0
- package/.next/standalone/node_modules/chokidar/README.md +305 -0
- package/.next/standalone/node_modules/chokidar/handler.js +632 -0
- package/.next/standalone/node_modules/chokidar/index.js +822 -0
- package/.next/standalone/node_modules/chokidar/package.json +63 -0
- package/.next/standalone/node_modules/readdirp/LICENSE +21 -0
- package/.next/standalone/node_modules/readdirp/README.md +120 -0
- package/.next/standalone/node_modules/readdirp/index.js +272 -0
- package/.next/standalone/node_modules/readdirp/package.json +66 -0
- package/.next/standalone/package.json +91 -90
- package/.next/standalone/server.js +1 -1
- package/.next/standalone/tsconfig.json +34 -34
- package/LICENSE +661 -21
- package/README.md +131 -121
- package/bin/fix-standalone-externals.js +79 -53
- package/bin/lib/auto-setup.js +101 -0
- package/bin/mdns-service.js +171 -171
- package/bin/postinstall.js +35 -0
- package/bin/setup-admin.js +189 -189
- package/bin/spaces-dev.js +173 -108
- package/bin/spaces-setup.js +242 -0
- package/bin/spaces.js +318 -155
- package/bin/terminal-server.js +1051 -990
- package/package.json +91 -90
- package/.next/standalone/.next/server/chunks/[externals]_node +0 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01c98454._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__18b8f7d9._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__193cb667._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__25b4d5ca._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__280398d8._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2a4c2db6._.js +0 -13
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__3fd6439e._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__40c21d75._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__4375a280._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__4950da9c._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__4a77d855._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__4d551a41._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5420fbcd._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__586418c6._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5c2f4a8e._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5eaa589f._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5f4dc1dd._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5ff6b7d9._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__65509457._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__65620687._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__76e7a7b9._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__7fae7bd7._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__821ffcfb._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__83676993._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__86e02dd1._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8a7fae80._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8af8821a._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__93e1af64._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__94f437bd._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__9e9f597a._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__aae49c2b._.js +0 -15
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ab25b881._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__aef285c3._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b52523c7._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b607a85c._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b950ac1e._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c6355fd6._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d1771755._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d55d3167._.js +0 -12
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d9533783._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d9540965._.js +0 -21
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ddbb7b16._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e4989332._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e7a6a584._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ed0f1148._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f1436778._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__fe65bfb1._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__17ba2e09._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__6bd17d85._.js +0 -5
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__7e604f3d._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__a923e475._.js +0 -5
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__d23f4926._.js +0 -5
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__e3bf6054._.js +0 -5
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__f08a4c64._.js +0 -3
- package/.next/standalone/.next/static/chunks/01580b24a27526a9.css +0 -3
- package/.next/standalone/.next/static/chunks/06e3af139a18e326.js +0 -5
- package/.next/standalone/.next/static/chunks/13c233fe06728b88.js +0 -1
- package/.next/standalone/.next/static/chunks/1f4937830aceaae2.js +0 -1
- package/.next/standalone/.next/static/chunks/6b8fb2027281ae5d.js +0 -3
- package/.next/standalone/.next/static/chunks/76698b8c3d5cae75.js +0 -1
- package/.next/standalone/.next/static/chunks/7fbc5bdede00e3c9.js +0 -1
- package/.next/standalone/.next/static/chunks/acbcf40fb5a2ca5e.js +0 -1
- package/.next/standalone/.next/static/chunks/db03df936139672b.js +0 -1
- package/.next/standalone/.next/static/chunks/e7ac38524a30e234.js +0 -5
- package/.next/standalone/.next/static/chunks/f8cf8e5a643bd23f.js +0 -5
- package/.next/standalone/node_modules/@img/sharp-win32-x64/lib/sharp-win32-x64.node +0 -0
- package/.next/standalone/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
- package/.next/standalone/node_modules/better-sqlite3/lib/database.js +0 -90
- package/.next/standalone/node_modules/better-sqlite3/lib/index.js +0 -3
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/aggregate.js +0 -43
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/backup.js +0 -67
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/function.js +0 -31
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/inspect.js +0 -7
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/pragma.js +0 -12
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/serialize.js +0 -16
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/table.js +0 -189
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/transaction.js +0 -78
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/wrappers.js +0 -54
- package/.next/standalone/node_modules/better-sqlite3/lib/sqlite-error.js +0 -20
- package/.next/standalone/node_modules/better-sqlite3/lib/util.js +0 -12
- package/.next/standalone/node_modules/better-sqlite3/package.json +0 -59
- package/.next/standalone/node_modules/bindings/bindings.js +0 -221
- package/.next/standalone/node_modules/bindings/package.json +0 -28
- package/.next/standalone/node_modules/detect-libc/lib/detect-libc.js +0 -313
- package/.next/standalone/node_modules/detect-libc/lib/elf.js +0 -39
- package/.next/standalone/node_modules/detect-libc/lib/filesystem.js +0 -51
- package/.next/standalone/node_modules/detect-libc/lib/process.js +0 -24
- package/.next/standalone/node_modules/detect-libc/package.json +0 -44
- package/.next/standalone/node_modules/file-uri-to-path/index.js +0 -66
- package/.next/standalone/node_modules/file-uri-to-path/package.json +0 -32
- /package/.next/standalone/.next/static/{PuVTvEgStc9tACVRts-l5 → k4gRsS979E-cbl1AWcHhx}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{PuVTvEgStc9tACVRts-l5 → k4gRsS979E-cbl1AWcHhx}/_clientMiddlewareManifest.json +0 -0
- /package/.next/standalone/.next/static/{PuVTvEgStc9tACVRts-l5 → k4gRsS979E-cbl1AWcHhx}/_ssgManifest.js +0 -0
- /package/.next/standalone/node_modules/@img/{sharp-win32-x64 → sharp-libvips-linux-x64}/versions.json +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,75254,e=>{"use strict";var t=e.i(71645);let s=(...e)=>e.filter((e,t,s)=>!!e&&""!==e.trim()&&s.indexOf(e)===t).join(" ").trim(),a=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,s)=>s?s.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let r=(0,t.forwardRef)(({color:e="currentColor",size:a=24,strokeWidth:r=2,absoluteStrokeWidth:c,className:n="",children:l,iconNode:o,...d},x)=>(0,t.createElement)("svg",{ref:x,...i,width:a,height:a,stroke:e,strokeWidth:c?24*Number(r)/Number(a):r,className:s("lucide",n),...!l&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(d)&&{"aria-hidden":"true"},...d},[...o.map(([e,s])=>(0,t.createElement)(e,s)),...Array.isArray(l)?l:[l]])),c=(e,i)=>{let c=(0,t.forwardRef)(({className:c,...n},l)=>(0,t.createElement)(r,{ref:l,iconNode:i,className:s(`lucide-${a(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,c),...n}));return c.displayName=a(e),c};e.s(["default",()=>c],75254)},31278,e=>{"use strict";let t=(0,e.i(75254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>t],31278)},18566,(e,t,s)=>{t.exports=e.r(76562)},98919,e=>{"use strict";let t=(0,e.i(75254).default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);e.s(["Shield",()=>t],98919)},86536,e=>{"use strict";let t=(0,e.i(75254).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",()=>t],86536)},94542,e=>{"use strict";var t=e.i(47167),s=e.i(18050),a=e.i(71645),i=e.i(18566),r=e.i(31278),c=e.i(98919),n=e.i(86536);let l=(0,e.i(75254).default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);var o=e.i(9165);let d=t.default.env.NEXT_PUBLIC_BASE_PATH||"",x=`${d}/spaces_icon.png`;function u(){return(0,s.jsx)(a.Suspense,{fallback:(0,s.jsx)("div",{className:"flex items-center justify-center min-h-[100dvh] bg-zinc-950 px-6",children:(0,s.jsx)(r.Loader2,{className:"w-6 h-6 animate-spin text-indigo-500"})}),children:(0,s.jsx)(m,{})})}function m(){let e=(0,i.useSearchParams)().get("redirectTo")||"/",[t,u]=(0,a.useState)("credentials"),[m,h]=(0,a.useState)(""),[p,f]=(0,a.useState)(""),[g,j]=(0,a.useState)(!1),[y,w]=(0,a.useState)(""),[b,N]=(0,a.useState)(!1),[v,z]=(0,a.useState)(""),[k,S]=(0,a.useState)(""),[C,T]=(0,a.useState)(""),[L,E]=(0,a.useState)(""),[A,M]=(0,a.useState)(!1),P=(0,a.useRef)(null),$=(0,a.useRef)(null);(0,a.useEffect)(()=>{P.current?.focus()},[]),(0,a.useEffect)(()=>{("totp-setup"===t||"totp-verify"===t)&&setTimeout(()=>$.current?.focus(),100)},[t]);let O=async t=>{if(t.preventDefault(),m&&p){N(!0),w("");try{let t=await fetch((0,o.api)("/api/auth/login"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:m,password:p})}),s=await t.json();if(!t.ok){w(s.error||"Login failed"),N(!1);return}"setup-totp"===s.status?(z(s.qrDataUrl),S(s.setupSecret),u("totp-setup")):"totp-required"===s.status?u("totp-verify"):"ok"===s.status&&(window.location.href=`${d}${e}`)}catch{w("Network error")}N(!1)}},R=async s=>{if(6===s.length){M(!0),E("");try{let a={username:m,password:p,totpCode:s};"totp-setup"===t&&(a.setupSecret=k);let i=await fetch((0,o.api)("/api/auth/login"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),r=await i.json();i.ok?"ok"===r.status&&(window.location.href=`${d}${e}`):(E(r.error||"Verification failed"),T(""),$.current?.focus())}catch{E("Network error"),T("")}M(!1)}},B=e=>{let t=e.replace(/\D/g,"").slice(0,6);T(t),E(""),6===t.length&&R(t)};return"credentials"===t?(0,s.jsx)("div",{className:"flex items-center justify-center min-h-[100dvh] bg-zinc-950 px-6",children:(0,s.jsxs)("div",{className:"w-full max-w-sm space-y-6",children:[(0,s.jsxs)("div",{className:"text-center space-y-2",children:[(0,s.jsx)("img",{src:x,alt:"Spaces",className:"w-14 h-14 mx-auto opacity-60"}),(0,s.jsx)("h1",{className:"text-xl font-semibold text-white",children:"Sign in to Spaces"})]}),(0,s.jsxs)("form",{onSubmit:O,className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-xs text-zinc-400 block mb-1.5",children:"Username"}),(0,s.jsx)("input",{ref:P,type:"text",autoComplete:"username",value:m,onChange:e=>h(e.target.value),className:"w-full px-3 py-2.5 text-sm bg-zinc-800 border border-zinc-700 rounded-lg focus:outline-none focus:border-indigo-500 text-white"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-xs text-zinc-400 block mb-1.5",children:"Password"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("input",{type:g?"text":"password",autoComplete:"current-password",value:p,onChange:e=>f(e.target.value),className:"w-full px-3 py-2.5 text-sm bg-zinc-800 border border-zinc-700 rounded-lg focus:outline-none focus:border-indigo-500 text-white pr-10"}),(0,s.jsx)("button",{type:"button",onClick:()=>j(!g),className:"absolute right-3 top-1/2 -translate-y-1/2 text-zinc-500 hover:text-zinc-300",children:g?(0,s.jsx)(l,{className:"w-4 h-4"}):(0,s.jsx)(n.Eye,{className:"w-4 h-4"})})]})]}),y&&(0,s.jsx)("p",{className:"text-sm text-red-400",children:y}),(0,s.jsxs)("button",{type:"submit",disabled:b||!m||!p,className:"w-full flex items-center justify-center gap-2 px-4 py-2.5 text-sm font-medium bg-indigo-600 text-white rounded-lg hover:bg-indigo-500 disabled:opacity-50 disabled:cursor-not-allowed",children:[b?(0,s.jsx)(r.Loader2,{className:"w-4 h-4 animate-spin"}):null,"Sign in"]})]})]})}):"totp-setup"===t?(0,s.jsx)("div",{className:"flex items-center justify-center min-h-[100dvh] bg-zinc-950 px-6",children:(0,s.jsxs)("div",{className:"w-full max-w-sm space-y-6",children:[(0,s.jsxs)("div",{className:"text-center space-y-2",children:[(0,s.jsx)(c.Shield,{className:"w-10 h-10 mx-auto text-indigo-400"}),(0,s.jsx)("h2",{className:"text-lg font-semibold text-white",children:"Set up two-factor authentication"}),(0,s.jsx)("p",{className:"text-sm text-zinc-400",children:"Scan this QR code with your authenticator app"})]}),v?(0,s.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,s.jsx)("div",{className:"bg-zinc-100 p-3 rounded-xl shadow-lg shadow-black/30",children:(0,s.jsx)("img",{src:v,alt:"TOTP QR Code",width:180,height:180,className:"rounded"})}),(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("p",{className:"text-[10px] text-zinc-500 mb-1",children:"Manual entry key:"}),(0,s.jsx)("code",{className:"text-xs bg-zinc-800 px-2 py-1 rounded font-mono select-all text-zinc-300",children:k})]})]}):(0,s.jsx)("div",{className:"flex justify-center py-8",children:(0,s.jsx)(r.Loader2,{className:"w-6 h-6 animate-spin text-zinc-400"})}),(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("label",{className:"text-xs text-zinc-400 block mb-2",children:"Enter the 6-digit code from your authenticator"}),(0,s.jsx)("input",{ref:$,type:"text",inputMode:"numeric",autoComplete:"one-time-code",placeholder:"000000",value:C,onChange:e=>B(e.target.value),disabled:A,className:"w-48 px-3 py-3 text-2xl font-mono tracking-[0.4em] text-center bg-zinc-800 border border-zinc-700 rounded-lg focus:outline-none focus:border-indigo-500 text-white disabled:opacity-50"}),A&&(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2 mt-3 text-xs text-zinc-400",children:[(0,s.jsx)(r.Loader2,{className:"w-3 h-3 animate-spin"}),"Verifying..."]}),L&&(0,s.jsx)("p",{className:"text-sm text-red-400 mt-3",children:L})]}),(0,s.jsx)("button",{onClick:()=>{u("credentials"),T(""),E("")},className:"w-full text-center text-xs text-zinc-500 hover:text-zinc-300",children:"Back to sign in"})]})}):(0,s.jsx)("div",{className:"flex items-center justify-center min-h-[100dvh] bg-zinc-950 px-6",children:(0,s.jsxs)("div",{className:"w-full max-w-sm space-y-6",children:[(0,s.jsxs)("div",{className:"text-center space-y-2",children:[(0,s.jsx)("img",{src:x,alt:"Spaces",className:"w-12 h-12 mx-auto"}),(0,s.jsx)("h2",{className:"text-lg font-semibold text-white",children:"Two-factor authentication"}),(0,s.jsx)("p",{className:"text-sm text-zinc-400",children:"Enter the 6-digit code from your authenticator app"})]}),(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("input",{ref:$,type:"text",inputMode:"numeric",autoComplete:"one-time-code",placeholder:"000000",value:C,onChange:e=>B(e.target.value),disabled:A,className:"w-48 px-3 py-3 text-2xl font-mono tracking-[0.4em] text-center bg-zinc-800 border border-zinc-700 rounded-lg focus:outline-none focus:border-indigo-500 text-white disabled:opacity-50",autoFocus:!0}),A&&(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2 mt-3 text-xs text-zinc-400",children:[(0,s.jsx)(r.Loader2,{className:"w-3 h-3 animate-spin"}),"Verifying..."]}),L&&(0,s.jsx)("p",{className:"text-sm text-red-400 mt-3",children:L})]}),(0,s.jsx)("button",{onClick:()=>{u("credentials"),T(""),E("")},className:"w-full text-center text-xs text-zinc-500 hover:text-zinc-300",children:"Back to sign in"})]})})}e.s(["default",()=>u],94542)}]);
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,43531,e=>{"use strict";let t=(0,e.i(75254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",()=>t],43531)},31278,e=>{"use strict";let t=(0,e.i(75254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>t],31278)},37727,e=>{"use strict";let t=(0,e.i(75254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",()=>t],37727)},88699,e=>{"use strict";let t=(0,e.i(75254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",()=>t],88699)},73359,e=>{"use strict";let t={shell:{id:"shell",name:"Shell",command:"",resumeFlag:"",supportsResume:!1,color:"#71717a",description:"Plain terminal shell"},claude:{id:"claude",name:"Claude Code",command:"claude",resumeFlag:"--resume",supportsResume:!0,color:"#d97706",description:"Anthropic Claude Code CLI"},codex:{id:"codex",name:"Codex CLI",command:"codex",resumeFlag:"resume",supportsResume:!0,color:"#10b981",description:"OpenAI Codex CLI"},gemini:{id:"gemini",name:"Gemini CLI",command:"gemini",resumeFlag:"--resume",supportsResume:!0,color:"#3b82f6",description:"Google Gemini CLI"},aider:{id:"aider",name:"Aider",command:"aider",resumeFlag:"",supportsResume:!1,color:"#8b5cf6",description:"AI pair programming in your terminal"},custom:{id:"custom",name:"Custom",command:"",resumeFlag:"",supportsResume:!1,color:"#ec4899",description:"Custom command"}},n=Object.values(t);e.s(["AGENT_LIST",0,n,"AGENT_TYPES",0,t])},34623,e=>{"use strict";var t=e.i(47167),n=e.i(18050),s=e.i(71645),i=e.i(31278),r=e.i(39616),a=e.i(18566),o=e.i(9165),c=e.i(83774);let l=`${t.default.env.NEXT_PUBLIC_BASE_PATH||""}/spaces_icon.png`,d="spaces-terminal-token";function u({children:e}){let t=(0,a.useRouter)(),[u,m]=(0,s.useState)("loading"),[p,h]=(0,s.useState)(""),[f,x]=(0,s.useState)(""),[w,g]=(0,s.useState)(""),[y,b]=(0,s.useState)(!1),j=(0,s.useRef)(null);(0,s.useEffect)(()=>{if(c.IS_DESKTOP){h("desktop-local"),m("authorized");return}function e(){let e=sessionStorage.getItem(d);if(e){h(e),m("authorized");return}fetch((0,o.api)("/api/auth/totp/status")).then(e=>e.json()).then(e=>{e.enabled?(m("prompt"),setTimeout(()=>j.current?.focus(),100)):m("not-setup")}).catch(()=>m("not-setup"))}fetch((0,o.api)("/api/auth/me")).then(t=>{if(t.ok){h("session-auth"),m("authorized");return}return e()}).catch(()=>e())},[]);let v=(0,s.useCallback)(async e=>{if(6!==e.length)return;b(!0),g("");let t=await fetch((0,o.api)("/api/auth/totp/verify"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,action:"verify"})}),n=await t.json();b(!1),n.success&&n.terminalToken?(sessionStorage.setItem(d,n.terminalToken),h(n.terminalToken),m("authorized")):(g(n.error||"Invalid code"),x(""),j.current?.focus())},[]);return"loading"===u?(0,n.jsx)("div",{className:"flex items-center justify-center h-screen bg-zinc-950",children:(0,n.jsx)(i.Loader2,{className:"w-6 h-6 animate-spin text-indigo-500"})}):"authorized"===u?(0,n.jsx)(n.Fragment,{children:e(p)}):"not-setup"===u?(0,n.jsx)("div",{className:"flex items-center justify-center h-screen bg-zinc-950",children:(0,n.jsxs)("div",{className:"text-center space-y-4 max-w-sm",children:[(0,n.jsx)("img",{src:l,alt:"Spaces",className:"w-12 h-12 mx-auto opacity-40"}),(0,n.jsx)("h2",{className:"text-lg font-semibold text-white",children:"2FA Required"}),(0,n.jsx)("p",{className:"text-sm text-zinc-400",children:"Two-factor authentication must be set up before you can use terminals."}),(0,n.jsxs)("button",{onClick:()=>t.push("/settings"),className:"inline-flex items-center gap-2 px-4 py-2 text-sm bg-indigo-600 text-white rounded-md hover:bg-indigo-500",children:[(0,n.jsx)(r.Settings,{className:"w-4 h-4"}),"Go to Settings"]})]})}):(0,n.jsx)("div",{className:"flex items-center justify-center h-screen bg-zinc-950",children:(0,n.jsxs)("div",{className:"text-center space-y-4 max-w-sm",children:[(0,n.jsx)("img",{src:l,alt:"Spaces",className:"w-12 h-12 mx-auto"}),(0,n.jsx)("h2",{className:"text-lg font-semibold text-white",children:"Terminal Verification"}),(0,n.jsx)("p",{className:"text-sm text-zinc-400",children:"Enter the 6-digit code from your authenticator app."}),(0,n.jsxs)("div",{children:[(0,n.jsx)("input",{ref:j,type:"text",inputMode:"numeric",autoComplete:"one-time-code",placeholder:"000000",value:f,onChange:e=>{let t;x(t=e.target.value.replace(/\D/g,"").slice(0,6)),g(""),6===t.length&&v(t)},disabled:y,className:"w-48 px-3 py-3 text-2xl font-mono tracking-[0.4em] text-center bg-zinc-800 border border-zinc-700 rounded-lg focus:outline-none focus:border-indigo-500 text-white disabled:opacity-50",autoFocus:!0}),y&&(0,n.jsxs)("div",{className:"flex items-center justify-center gap-2 mt-3 text-xs text-zinc-400",children:[(0,n.jsx)(i.Loader2,{className:"w-3 h-3 animate-spin"}),"Verifying..."]}),w&&(0,n.jsx)("p",{className:"text-sm text-red-400 mt-3",children:w})]}),(0,n.jsx)("p",{className:"text-[11px] text-zinc-600",children:"Token is valid for 8 hours after verification."})]})})}e.s(["TotpGate",()=>u])},24134,e=>{"use strict";var t=e.i(47167),n=e.i(18050),s=e.i(71645),i=e.i(74080),r=e.i(37727),a=e.i(88699),o=e.i(43531),c=e.i(75254);let l=(0,c.default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),d=(0,c.default)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]),u=(0,c.default)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]),m=(0,c.default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);var p=e.i(48256),h=e.i(75157),f=e.i(73359);let x=t.default.env.NEXT_PUBLIC_WS_PATH;function w({pane:t,onClose:c,onUpdate:w,isMaximized:g,onToggleMaximize:y,onPopout:b,isPopout:j,terminalToken:v}){let k=(0,s.useRef)(null),N=(0,s.useRef)(null),T=(0,s.useRef)(null),C=(0,s.useRef)(null),[S,z]=(0,s.useState)(!1),[P,E]=(0,s.useState)(!1),[R,I]=(0,s.useState)(t.title),[M,A]=(0,s.useState)(!1),[L,$]=(0,s.useState)({x:0,y:0}),O=(0,s.useRef)(null),B=(0,s.useRef)(null),[Y,X]=(0,s.useState)(!1),H=(0,s.useRef)(t);H.current=t;let F=(0,s.useRef)(w);F.current=w;let G=(0,s.useRef)(v);G.current=v;let W=(0,s.useRef)(!1),_=(0,s.useRef)(!1),J=(0,s.useRef)(null),U=(0,s.useRef)(0),q=(0,s.useCallback)(async()=>{if(!k.current)return;H.current,_.current=!1,U.current=0;let{Terminal:t}=await e.A(16049),{FitAddon:n}=await e.A(59439),{WebLinksAddon:s}=await e.A(16091);N.current&&N.current.dispose();let i=new t({cursorBlink:!0,fontSize:13,fontFamily:"'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, monospace",theme:{background:"#0a0a0a",foreground:"#e4e4e7",cursor:"#6366f1",selectionBackground:"#6366f133",black:"#18181b",red:"#ef4444",green:"#22c55e",yellow:"#eab308",blue:"#3b82f6",magenta:"#a855f7",cyan:"#06b6d4",white:"#e4e4e7",brightBlack:"#52525b",brightRed:"#f87171",brightGreen:"#4ade80",brightYellow:"#facc15",brightBlue:"#60a5fa",brightMagenta:"#c084fc",brightCyan:"#22d3ee",brightWhite:"#fafafa"},allowProposedApi:!0}),r=new n,a=new s;i.loadAddon(r),i.loadAddon(a),await new Promise(e=>requestAnimationFrame(()=>{if(k.current){i.open(k.current);try{r.fit()}catch{}}e()})),N.current=i,C.current=r;let o=()=>{let e,t,n,s;if(_.current)return;U.current>0&&(i.write("\x1b[2J\x1b[H"),i.clear());let r=new WebSocket((t=new URLSearchParams({paneId:(e=H.current).id,cwd:e.cwd,agentType:e.agentType||"shell",cols:String(i.cols),rows:String(i.rows)}),e.claudeSessionId&&t.set("agentSession",e.claudeSessionId),e.customCommand&&t.set("customCommand",e.customCommand),e.nodeId&&t.set("nodeId",e.nodeId),(n=G.current)&&t.set("terminalToken",n),s="https:"===location.protocol?"wss:":"ws:",`${s}//${location.host}${x||"/ws"}?${t}`));T.current=r,r.onopen=()=>{z(!0),X(!1),W.current=!1,U.current=0,setTimeout(()=>{if(C.current)try{C.current.fit()}catch{}},150)},r.onmessage=e=>{try{let t=JSON.parse(e.data);if("data"===t.type)i.write(t.data);else if("exit"===t.type){X(!0),W.current=!0;let e=t.reason?` — ${t.reason}`:"";i.write(`\r
|
|
2
|
-
\x1b[90m[Process exited with code ${t.exitCode}${e}]\x1b[0m\r
|
|
3
|
-
`)}else"error"===t.type?i.write(`\r
|
|
4
|
-
\x1b[31m${t.data}\x1b[0m\r
|
|
5
|
-
`):"session-detected"===t.type&&F.current(H.current.id,{claudeSessionId:t.sessionId})}catch{}},r.onclose=()=>{if(z(!1),!W.current&&!_.current){let e=U.current;if(e<20){let t=Math.min(1e3*Math.pow(1.5,e),3e4);U.current=e+1,J.current=setTimeout(o,t)}}},r.onerror=()=>{z(!1)}};i.onData(e=>{T.current?.readyState===WebSocket.OPEN&&T.current.send(JSON.stringify({type:"data",data:e}))}),i.onResize(({cols:e,rows:t})=>{T.current?.readyState===WebSocket.OPEN&&T.current.send(JSON.stringify({type:"resize",cols:e,rows:t}))}),o()},[]);(0,s.useEffect)(()=>(q(),()=>{_.current=!0,J.current&&clearTimeout(J.current),T.current?.close(),N.current?.dispose()}),[q]),(0,s.useEffect)(()=>{let e=new ResizeObserver(()=>{if(C.current)try{C.current.fit()}catch{}});return k.current&&e.observe(k.current),()=>e.disconnect()},[]),(0,s.useEffect)(()=>{setTimeout(()=>{if(C.current)try{C.current.fit()}catch{}},50)},[g]);let D=()=>{w(t.id,{title:R}),E(!1)};return(0,s.useEffect)(()=>{if(!M)return;let e=e=>{let t=e.target;O.current&&!O.current.contains(t)&&B.current&&!B.current.contains(t)&&A(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[M]),(0,n.jsxs)("div",{className:(0,h.cn)("flex flex-col border rounded-lg overflow-hidden",g?"fixed inset-2 z-50":"","border-zinc-700"),style:{borderColor:`${t.color}60`},children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 text-xs select-none flex-shrink-0",style:{backgroundColor:`${t.color}60`},children:[(0,n.jsxs)("div",{ref:O,className:"flex-shrink-0",children:[(0,n.jsx)("button",{onClick:e=>{let t=e.currentTarget.getBoundingClientRect();$({x:t.left,y:t.bottom+6}),A(!M)},className:"w-3 h-3 rounded-full hover:ring-2 hover:ring-zinc-500 ring-offset-1 ring-offset-zinc-900 transition-shadow cursor-pointer",style:{backgroundColor:t.color},title:"Change color"}),M&&(0,i.createPortal)((0,n.jsx)("div",{ref:B,className:"fixed z-[9999] bg-zinc-800 border border-zinc-600 rounded-xl p-3 shadow-2xl",style:{left:L.x,top:L.y},children:(0,n.jsx)("div",{className:"grid grid-cols-4 gap-2.5",style:{width:132},children:["#ef4444","#f97316","#f59e0b","#eab308","#84cc16","#22c55e","#14b8a6","#06b6d4","#3b82f6","#6366f1","#8b5cf6","#a855f7","#d946ef","#ec4899","#f43f5e","#78716c"].map(e=>(0,n.jsx)("button",{onClick:()=>{w(t.id,{color:e}),A(!1)},className:`w-7 h-7 rounded-full border-2 transition-all hover:scale-110 ${t.color===e?"border-white scale-110 shadow-lg":"border-transparent hover:border-zinc-500"}`,style:{backgroundColor:e}},e))})}),document.body)]}),P?(0,n.jsxs)("div",{className:"flex items-center gap-1 flex-1",children:[(0,n.jsx)("input",{autoFocus:!0,value:R,onChange:e=>I(e.target.value),onKeyDown:e=>{"Enter"===e.key&&D(),"Escape"===e.key&&(I(t.title),E(!1))},className:"flex-1 bg-transparent border border-zinc-600 rounded px-1.5 py-0.5 text-xs focus:outline-none focus:border-indigo-400"}),(0,n.jsx)("button",{onClick:D,className:"text-green-400 hover:text-green-300",children:(0,n.jsx)(o.Check,{className:"w-3 h-3"})})]}):(0,n.jsxs)("div",{className:"flex items-center gap-1 flex-1 min-w-0 group/title",children:[(0,n.jsx)("span",{onDoubleClick:()=>E(!0),className:"truncate text-zinc-300 font-medium cursor-default",children:t.title}),(0,n.jsx)("button",{onClick:()=>E(!0),className:"text-zinc-600 hover:text-zinc-300 opacity-0 group-hover/title:opacity-100 transition-opacity flex-shrink-0",title:"Rename",children:(0,n.jsx)(a.Pencil,{className:"w-2.5 h-2.5"})})]}),(0,n.jsx)("span",{className:"text-[10px] text-zinc-500 truncate max-w-[120px]",title:t.cwd,children:t.cwd.split(/[/\\]/).pop()}),t.agentType&&"shell"!==t.agentType&&(0,n.jsx)("span",{className:"text-[9px] px-1.5 py-0.5 rounded font-medium",style:{backgroundColor:`${f.AGENT_TYPES[t.agentType]?.color||"#6366f1"}20`,color:f.AGENT_TYPES[t.agentType]?.color||"#6366f1"},children:f.AGENT_TYPES[t.agentType]?.name||t.agentType}),t.nodeId&&(0,n.jsxs)("span",{className:"text-[9px] px-1.5 py-0.5 rounded font-medium bg-blue-500/10 text-blue-400 flex items-center gap-0.5",children:[(0,n.jsx)(p.Globe,{className:"w-2.5 h-2.5"}),"remote"]}),!S&&!Y&&(0,n.jsx)("span",{className:"text-[10px] text-yellow-500",children:"connecting..."}),Y&&(0,n.jsx)("button",{onClick:()=>{_.current=!0,J.current&&clearTimeout(J.current),T.current?.close(),N.current?.dispose(),X(!1),W.current=!1,setTimeout(q,100)},className:"text-zinc-400 hover:text-white",title:"Restart",children:(0,n.jsx)(l,{className:"w-3 h-3"})}),!j&&b&&(0,n.jsx)("button",{onClick:()=>{b&&(_.current=!0,J.current&&clearTimeout(J.current),T.current?.close(),N.current?.dispose(),b(t.id))},className:"text-zinc-400 hover:text-white",title:"Pop out to new window",children:(0,n.jsx)(m,{className:"w-3 h-3"})}),(0,n.jsx)("button",{onClick:()=>y(t.id),className:"text-zinc-400 hover:text-white",title:g?"Restore":"Maximize",children:g?(0,n.jsx)(u,{className:"w-3 h-3"}):(0,n.jsx)(d,{className:"w-3 h-3"})}),(0,n.jsx)("button",{onClick:()=>{confirm("Close this terminal?")&&c(t.id)},className:"text-zinc-400 hover:text-red-400",title:"Close",children:(0,n.jsx)(r.X,{className:"w-3 h-3"})})]}),(0,n.jsx)("div",{ref:k,className:"flex-1 bg-[#0a0a0a]",style:{minHeight:g?"calc(100vh - 100px)":"300px"}})]})}e.s(["TerminalPane",()=>w],24134)},80416,e=>{"use strict";var t=e.i(18050),n=e.i(71645),s=e.i(31278),i=e.i(24134),r=e.i(34623),a=e.i(9165);function o({params:e}){return(0,t.jsx)(r.TotpGate,{children:n=>(0,t.jsx)(c,{params:e,terminalToken:n})})}function c({params:e,terminalToken:r}){let[o,c]=(0,n.useState)(null),[l,d]=(0,n.useState)(!0),[u,m]=(0,n.useState)(null),p=(0,n.useRef)(null),h=(0,n.useRef)(!1);(0,n.useEffect)(()=>{e.then(e=>m(e.id))},[e]),(0,n.useEffect)(()=>{u&&fetch((0,a.api)(`/api/panes/${u}`)).then(e=>e.json()).then(e=>{c(e),d(!1)}).catch(()=>d(!1))},[u]),(0,n.useEffect)(()=>{if(!u)return;let e=new BroadcastChannel("spaces-panes");return p.current=e,e.postMessage({type:"popout-opened",paneId:u}),fetch((0,a.api)(`/api/panes/${u}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isPopout:!0,winX:window.screenX,winY:window.screenY,winWidth:window.innerWidth,winHeight:window.innerHeight})}),e.onmessage=e=>{"close-popouts"===e.data.type&&(h.current=!0,navigator.sendBeacon((0,a.api)(`/api/panes/${u}`),new Blob([JSON.stringify({isPopout:!0,winX:window.screenX,winY:window.screenY,winWidth:window.innerWidth,winHeight:window.innerHeight})],{type:"application/json"})),window.close())},()=>{e.close()}},[u]),(0,n.useEffect)(()=>{let e;if(!u)return;let t=()=>{clearTimeout(e),e=setTimeout(()=>{fetch((0,a.api)(`/api/panes/${u}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({winX:window.screenX,winY:window.screenY,winWidth:window.innerWidth,winHeight:window.innerHeight})})},2e3)};window.addEventListener("resize",t);let n=window.screenX,s=window.screenY,i=setInterval(()=>{(window.screenX!==n||window.screenY!==s)&&(n=window.screenX,s=window.screenY,t())},1e3);return()=>{window.removeEventListener("resize",t),clearInterval(i),clearTimeout(e)}},[u]),(0,n.useEffect)(()=>{if(!u)return;let e=()=>{h.current||navigator.sendBeacon((0,a.api)(`/api/panes/${u}`),new Blob([JSON.stringify({isPopout:!1,winX:window.screenX,winY:window.screenY,winWidth:window.innerWidth,winHeight:window.innerHeight})],{type:"application/json"})),p.current?.postMessage({type:"popout-closed",paneId:u})};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[u]),(0,n.useEffect)(()=>{o&&(document.title=`${o.title} - Spaces`)},[o?.title]);let f=(0,n.useCallback)(async e=>{await fetch((0,a.api)(`/api/panes/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isPopout:!1})}),p.current?.postMessage({type:"popout-closed",paneId:e}),h.current=!0,window.close()},[]),x=(0,n.useCallback)(async(e,t)=>{await fetch((0,a.api)(`/api/panes/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),c(e=>e?{...e,...t}:null),p.current?.postMessage({type:"pane-updated",paneId:e,data:t})},[]);return l||!o?(0,t.jsx)("div",{className:"flex items-center justify-center h-screen bg-zinc-950",children:(0,t.jsx)(s.Loader2,{className:"w-6 h-6 animate-spin text-indigo-500"})}):(0,t.jsx)("div",{className:"h-screen bg-zinc-950",children:(0,t.jsx)(i.TerminalPane,{pane:o,onClose:f,onUpdate:x,isMaximized:!0,onToggleMaximize:()=>{},terminalToken:r})})}e.s(["default",()=>o])},16049,e=>{e.v(t=>Promise.all(["static/chunks/e40d2bd3b4ce8192.js"].map(t=>e.l(t))).then(()=>t(44908)))},59439,e=>{e.v(t=>Promise.all(["static/chunks/af8bfb72187b7cbf.js"].map(t=>e.l(t))).then(()=>t(93309)))},16091,e=>{e.v(t=>Promise.all(["static/chunks/9768207ca0a51abd.js"].map(t=>e.l(t))).then(()=>t(52216)))}]);
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,71689,e=>{"use strict";let t=(0,e.i(75254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",()=>t],71689)},68054,e=>{"use strict";let t=(0,e.i(75254).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],68054)},43531,e=>{"use strict";let t=(0,e.i(75254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",()=>t],43531)},31278,e=>{"use strict";let t=(0,e.i(75254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>t],31278)},37727,e=>{"use strict";let t=(0,e.i(75254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",()=>t],37727)},88699,e=>{"use strict";let t=(0,e.i(75254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",()=>t],88699)},73359,e=>{"use strict";let t={shell:{id:"shell",name:"Shell",command:"",resumeFlag:"",supportsResume:!1,color:"#71717a",description:"Plain terminal shell"},claude:{id:"claude",name:"Claude Code",command:"claude",resumeFlag:"--resume",supportsResume:!0,color:"#d97706",description:"Anthropic Claude Code CLI"},codex:{id:"codex",name:"Codex CLI",command:"codex",resumeFlag:"resume",supportsResume:!0,color:"#10b981",description:"OpenAI Codex CLI"},gemini:{id:"gemini",name:"Gemini CLI",command:"gemini",resumeFlag:"--resume",supportsResume:!0,color:"#3b82f6",description:"Google Gemini CLI"},aider:{id:"aider",name:"Aider",command:"aider",resumeFlag:"",supportsResume:!1,color:"#8b5cf6",description:"AI pair programming in your terminal"},custom:{id:"custom",name:"Custom",command:"",resumeFlag:"",supportsResume:!1,color:"#ec4899",description:"Custom command"}},s=Object.values(t);e.s(["AGENT_LIST",0,s,"AGENT_TYPES",0,t])},34623,e=>{"use strict";var t=e.i(47167),s=e.i(18050),r=e.i(71645),a=e.i(31278),n=e.i(39616),i=e.i(18566),c=e.i(9165),l=e.i(83774);let o=`${t.default.env.NEXT_PUBLIC_BASE_PATH||""}/spaces_icon.png`,d="spaces-terminal-token";function u({children:e}){let t=(0,i.useRouter)(),[u,m]=(0,r.useState)("loading"),[x,h]=(0,r.useState)(""),[p,f]=(0,r.useState)(""),[g,b]=(0,r.useState)(""),[y,w]=(0,r.useState)(!1),j=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(l.IS_DESKTOP){h("desktop-local"),m("authorized");return}function e(){let e=sessionStorage.getItem(d);if(e){h(e),m("authorized");return}fetch((0,c.api)("/api/auth/totp/status")).then(e=>e.json()).then(e=>{e.enabled?(m("prompt"),setTimeout(()=>j.current?.focus(),100)):m("not-setup")}).catch(()=>m("not-setup"))}fetch((0,c.api)("/api/auth/me")).then(t=>{if(t.ok){h("session-auth"),m("authorized");return}return e()}).catch(()=>e())},[]);let k=(0,r.useCallback)(async e=>{if(6!==e.length)return;w(!0),b("");let t=await fetch((0,c.api)("/api/auth/totp/verify"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,action:"verify"})}),s=await t.json();w(!1),s.success&&s.terminalToken?(sessionStorage.setItem(d,s.terminalToken),h(s.terminalToken),m("authorized")):(b(s.error||"Invalid code"),f(""),j.current?.focus())},[]);return"loading"===u?(0,s.jsx)("div",{className:"flex items-center justify-center h-screen bg-zinc-950",children:(0,s.jsx)(a.Loader2,{className:"w-6 h-6 animate-spin text-indigo-500"})}):"authorized"===u?(0,s.jsx)(s.Fragment,{children:e(x)}):"not-setup"===u?(0,s.jsx)("div",{className:"flex items-center justify-center h-screen bg-zinc-950",children:(0,s.jsxs)("div",{className:"text-center space-y-4 max-w-sm",children:[(0,s.jsx)("img",{src:o,alt:"Spaces",className:"w-12 h-12 mx-auto opacity-40"}),(0,s.jsx)("h2",{className:"text-lg font-semibold text-white",children:"2FA Required"}),(0,s.jsx)("p",{className:"text-sm text-zinc-400",children:"Two-factor authentication must be set up before you can use terminals."}),(0,s.jsxs)("button",{onClick:()=>t.push("/settings"),className:"inline-flex items-center gap-2 px-4 py-2 text-sm bg-indigo-600 text-white rounded-md hover:bg-indigo-500",children:[(0,s.jsx)(n.Settings,{className:"w-4 h-4"}),"Go to Settings"]})]})}):(0,s.jsx)("div",{className:"flex items-center justify-center h-screen bg-zinc-950",children:(0,s.jsxs)("div",{className:"text-center space-y-4 max-w-sm",children:[(0,s.jsx)("img",{src:o,alt:"Spaces",className:"w-12 h-12 mx-auto"}),(0,s.jsx)("h2",{className:"text-lg font-semibold text-white",children:"Terminal Verification"}),(0,s.jsx)("p",{className:"text-sm text-zinc-400",children:"Enter the 6-digit code from your authenticator app."}),(0,s.jsxs)("div",{children:[(0,s.jsx)("input",{ref:j,type:"text",inputMode:"numeric",autoComplete:"one-time-code",placeholder:"000000",value:p,onChange:e=>{let t;f(t=e.target.value.replace(/\D/g,"").slice(0,6)),b(""),6===t.length&&k(t)},disabled:y,className:"w-48 px-3 py-3 text-2xl font-mono tracking-[0.4em] text-center bg-zinc-800 border border-zinc-700 rounded-lg focus:outline-none focus:border-indigo-500 text-white disabled:opacity-50",autoFocus:!0}),y&&(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2 mt-3 text-xs text-zinc-400",children:[(0,s.jsx)(a.Loader2,{className:"w-3 h-3 animate-spin"}),"Verifying..."]}),g&&(0,s.jsx)("p",{className:"text-sm text-red-400 mt-3",children:g})]}),(0,s.jsx)("p",{className:"text-[11px] text-zinc-600",children:"Token is valid for 8 hours after verification."})]})})}e.s(["TotpGate",()=>u])},24134,e=>{"use strict";var t=e.i(47167),s=e.i(18050),r=e.i(71645),a=e.i(74080),n=e.i(37727),i=e.i(88699),c=e.i(43531),l=e.i(75254);let o=(0,l.default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),d=(0,l.default)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]),u=(0,l.default)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]),m=(0,l.default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);var x=e.i(48256),h=e.i(75157),p=e.i(73359);let f=t.default.env.NEXT_PUBLIC_WS_PATH;function g({pane:t,onClose:l,onUpdate:g,isMaximized:b,onToggleMaximize:y,onPopout:w,isPopout:j,terminalToken:k}){let N=(0,r.useRef)(null),v=(0,r.useRef)(null),C=(0,r.useRef)(null),z=(0,r.useRef)(null),[S,T]=(0,r.useState)(!1),[R,P]=(0,r.useState)(!1),[E,A]=(0,r.useState)(t.title),[I,M]=(0,r.useState)(!1),[L,$]=(0,r.useState)({x:0,y:0}),F=(0,r.useRef)(null),G=(0,r.useRef)(null),[B,O]=(0,r.useState)(!1),_=(0,r.useRef)(t);_.current=t;let q=(0,r.useRef)(g);q.current=g;let H=(0,r.useRef)(k);H.current=k;let J=(0,r.useRef)(!1),U=(0,r.useRef)(!1),W=(0,r.useRef)(null),D=(0,r.useRef)(0),Y=(0,r.useCallback)(async()=>{if(!N.current)return;_.current,U.current=!1,D.current=0;let{Terminal:t}=await e.A(16049),{FitAddon:s}=await e.A(59439),{WebLinksAddon:r}=await e.A(16091);v.current&&v.current.dispose();let a=new t({cursorBlink:!0,fontSize:13,fontFamily:"'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, monospace",theme:{background:"#0a0a0a",foreground:"#e4e4e7",cursor:"#6366f1",selectionBackground:"#6366f133",black:"#18181b",red:"#ef4444",green:"#22c55e",yellow:"#eab308",blue:"#3b82f6",magenta:"#a855f7",cyan:"#06b6d4",white:"#e4e4e7",brightBlack:"#52525b",brightRed:"#f87171",brightGreen:"#4ade80",brightYellow:"#facc15",brightBlue:"#60a5fa",brightMagenta:"#c084fc",brightCyan:"#22d3ee",brightWhite:"#fafafa"},allowProposedApi:!0}),n=new s,i=new r;a.loadAddon(n),a.loadAddon(i),await new Promise(e=>requestAnimationFrame(()=>{if(N.current){a.open(N.current);try{n.fit()}catch{}}e()})),v.current=a,z.current=n;let c=()=>{let e,t,s,r;if(U.current)return;D.current>0&&(a.write("\x1b[2J\x1b[H"),a.clear());let n=new WebSocket((t=new URLSearchParams({paneId:(e=_.current).id,cwd:e.cwd,agentType:e.agentType||"shell",cols:String(a.cols),rows:String(a.rows)}),e.claudeSessionId&&t.set("agentSession",e.claudeSessionId),e.customCommand&&t.set("customCommand",e.customCommand),e.nodeId&&t.set("nodeId",e.nodeId),(s=H.current)&&t.set("terminalToken",s),r="https:"===location.protocol?"wss:":"ws:",`${r}//${location.host}${f||"/ws"}?${t}`));C.current=n,n.onopen=()=>{T(!0),O(!1),J.current=!1,D.current=0,setTimeout(()=>{if(z.current)try{z.current.fit()}catch{}},150)},n.onmessage=e=>{try{let t=JSON.parse(e.data);if("data"===t.type)a.write(t.data);else if("exit"===t.type){O(!0),J.current=!0;let e=t.reason?` — ${t.reason}`:"";a.write(`\r
|
|
2
|
-
\x1b[90m[Process exited with code ${t.exitCode}${e}]\x1b[0m\r
|
|
3
|
-
`)}else"error"===t.type?a.write(`\r
|
|
4
|
-
\x1b[31m${t.data}\x1b[0m\r
|
|
5
|
-
`):"session-detected"===t.type&&q.current(_.current.id,{claudeSessionId:t.sessionId})}catch{}},n.onclose=()=>{if(T(!1),!J.current&&!U.current){let e=D.current;if(e<20){let t=Math.min(1e3*Math.pow(1.5,e),3e4);D.current=e+1,W.current=setTimeout(c,t)}}},n.onerror=()=>{T(!1)}};a.onData(e=>{C.current?.readyState===WebSocket.OPEN&&C.current.send(JSON.stringify({type:"data",data:e}))}),a.onResize(({cols:e,rows:t})=>{C.current?.readyState===WebSocket.OPEN&&C.current.send(JSON.stringify({type:"resize",cols:e,rows:t}))}),c()},[]);(0,r.useEffect)(()=>(Y(),()=>{U.current=!0,W.current&&clearTimeout(W.current),C.current?.close(),v.current?.dispose()}),[Y]),(0,r.useEffect)(()=>{let e=new ResizeObserver(()=>{if(z.current)try{z.current.fit()}catch{}});return N.current&&e.observe(N.current),()=>e.disconnect()},[]),(0,r.useEffect)(()=>{setTimeout(()=>{if(z.current)try{z.current.fit()}catch{}},50)},[b]);let K=()=>{g(t.id,{title:E}),P(!1)};return(0,r.useEffect)(()=>{if(!I)return;let e=e=>{let t=e.target;F.current&&!F.current.contains(t)&&G.current&&!G.current.contains(t)&&M(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[I]),(0,s.jsxs)("div",{className:(0,h.cn)("flex flex-col border rounded-lg overflow-hidden",b?"fixed inset-2 z-50":"","border-zinc-700"),style:{borderColor:`${t.color}60`},children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 text-xs select-none flex-shrink-0",style:{backgroundColor:`${t.color}60`},children:[(0,s.jsxs)("div",{ref:F,className:"flex-shrink-0",children:[(0,s.jsx)("button",{onClick:e=>{let t=e.currentTarget.getBoundingClientRect();$({x:t.left,y:t.bottom+6}),M(!I)},className:"w-3 h-3 rounded-full hover:ring-2 hover:ring-zinc-500 ring-offset-1 ring-offset-zinc-900 transition-shadow cursor-pointer",style:{backgroundColor:t.color},title:"Change color"}),I&&(0,a.createPortal)((0,s.jsx)("div",{ref:G,className:"fixed z-[9999] bg-zinc-800 border border-zinc-600 rounded-xl p-3 shadow-2xl",style:{left:L.x,top:L.y},children:(0,s.jsx)("div",{className:"grid grid-cols-4 gap-2.5",style:{width:132},children:["#ef4444","#f97316","#f59e0b","#eab308","#84cc16","#22c55e","#14b8a6","#06b6d4","#3b82f6","#6366f1","#8b5cf6","#a855f7","#d946ef","#ec4899","#f43f5e","#78716c"].map(e=>(0,s.jsx)("button",{onClick:()=>{g(t.id,{color:e}),M(!1)},className:`w-7 h-7 rounded-full border-2 transition-all hover:scale-110 ${t.color===e?"border-white scale-110 shadow-lg":"border-transparent hover:border-zinc-500"}`,style:{backgroundColor:e}},e))})}),document.body)]}),R?(0,s.jsxs)("div",{className:"flex items-center gap-1 flex-1",children:[(0,s.jsx)("input",{autoFocus:!0,value:E,onChange:e=>A(e.target.value),onKeyDown:e=>{"Enter"===e.key&&K(),"Escape"===e.key&&(A(t.title),P(!1))},className:"flex-1 bg-transparent border border-zinc-600 rounded px-1.5 py-0.5 text-xs focus:outline-none focus:border-indigo-400"}),(0,s.jsx)("button",{onClick:K,className:"text-green-400 hover:text-green-300",children:(0,s.jsx)(c.Check,{className:"w-3 h-3"})})]}):(0,s.jsxs)("div",{className:"flex items-center gap-1 flex-1 min-w-0 group/title",children:[(0,s.jsx)("span",{onDoubleClick:()=>P(!0),className:"truncate text-zinc-300 font-medium cursor-default",children:t.title}),(0,s.jsx)("button",{onClick:()=>P(!0),className:"text-zinc-600 hover:text-zinc-300 opacity-0 group-hover/title:opacity-100 transition-opacity flex-shrink-0",title:"Rename",children:(0,s.jsx)(i.Pencil,{className:"w-2.5 h-2.5"})})]}),(0,s.jsx)("span",{className:"text-[10px] text-zinc-500 truncate max-w-[120px]",title:t.cwd,children:t.cwd.split(/[/\\]/).pop()}),t.agentType&&"shell"!==t.agentType&&(0,s.jsx)("span",{className:"text-[9px] px-1.5 py-0.5 rounded font-medium",style:{backgroundColor:`${p.AGENT_TYPES[t.agentType]?.color||"#6366f1"}20`,color:p.AGENT_TYPES[t.agentType]?.color||"#6366f1"},children:p.AGENT_TYPES[t.agentType]?.name||t.agentType}),t.nodeId&&(0,s.jsxs)("span",{className:"text-[9px] px-1.5 py-0.5 rounded font-medium bg-blue-500/10 text-blue-400 flex items-center gap-0.5",children:[(0,s.jsx)(x.Globe,{className:"w-2.5 h-2.5"}),"remote"]}),!S&&!B&&(0,s.jsx)("span",{className:"text-[10px] text-yellow-500",children:"connecting..."}),B&&(0,s.jsx)("button",{onClick:()=>{U.current=!0,W.current&&clearTimeout(W.current),C.current?.close(),v.current?.dispose(),O(!1),J.current=!1,setTimeout(Y,100)},className:"text-zinc-400 hover:text-white",title:"Restart",children:(0,s.jsx)(o,{className:"w-3 h-3"})}),!j&&w&&(0,s.jsx)("button",{onClick:()=>{w&&(U.current=!0,W.current&&clearTimeout(W.current),C.current?.close(),v.current?.dispose(),w(t.id))},className:"text-zinc-400 hover:text-white",title:"Pop out to new window",children:(0,s.jsx)(m,{className:"w-3 h-3"})}),(0,s.jsx)("button",{onClick:()=>y(t.id),className:"text-zinc-400 hover:text-white",title:b?"Restore":"Maximize",children:b?(0,s.jsx)(u,{className:"w-3 h-3"}):(0,s.jsx)(d,{className:"w-3 h-3"})}),(0,s.jsx)("button",{onClick:()=>{confirm("Close this terminal?")&&l(t.id)},className:"text-zinc-400 hover:text-red-400",title:"Close",children:(0,s.jsx)(n.X,{className:"w-3 h-3"})})]}),(0,s.jsx)("div",{ref:N,className:"flex-1 bg-[#0a0a0a]",style:{minHeight:b?"calc(100vh - 100px)":"300px"}})]})}e.s(["TerminalPane",()=>g],24134)},63209,e=>{"use strict";let t=(0,e.i(75254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",()=>t],63209)},10160,e=>{"use strict";var t=e.i(18050),s=e.i(71645),r=e.i(18566),a=e.i(31278),n=e.i(71689),i=e.i(48256),c=e.i(68054),l=e.i(63209),o=e.i(24134),d=e.i(34623),u=e.i(9165);function m({params:e}){return(0,t.jsx)(d.TotpGate,{children:s=>(0,t.jsx)(x,{params:e,terminalToken:s})})}function x({params:e,terminalToken:d}){let m=(0,r.useRouter)(),[x,h]=(0,s.useState)(null),[p,f]=(0,s.useState)(null),[g,b]=(0,s.useState)([]),[y,w]=(0,s.useState)(""),[j,k]=(0,s.useState)("#6366f1"),[N,v]=(0,s.useState)(""),[C,z]=(0,s.useState)(!0),[S,T]=(0,s.useState)(null),[R,P]=(0,s.useState)(null);(0,s.useEffect)(()=>{e.then(e=>{h(e.nodeId),f(e.workspaceId)})},[e]),(0,s.useEffect)(()=>{x&&p&&Promise.all([fetch((0,u.api)(`/api/network/proxy/${x}/workspaces/${p}`)).then(e=>{if(!e.ok)throw Error(`Failed to fetch workspace (${e.status})`);return e.json()}),fetch((0,u.api)(`/api/network/proxy/${x}/workspaces`)).then(e=>{if(!e.ok)throw Error(`Failed to fetch workspaces (${e.status})`);return e.json()})]).then(([e,t])=>{b((e.panes||[]).map(e=>({...e,nodeId:x,isPopout:!!e.isPopout})));let s=t.workspaces?.find(e=>String(e.id)===p);s&&(w(s.name),k(s.color),v(s.nodeName||"")),z(!1)}).catch(e=>{T(e.message),z(!1)})},[x,p]);let E=(0,s.useCallback)(()=>{},[]),A=(0,s.useCallback)(()=>{},[]),I=(0,s.useCallback)(e=>{P(t=>t===e?null:e)},[]);if(C)return(0,t.jsx)("div",{className:"flex items-center justify-center h-screen bg-zinc-950",children:(0,t.jsx)(a.Loader2,{className:"w-6 h-6 animate-spin text-indigo-500"})});if(S)return(0,t.jsxs)("div",{className:"h-screen flex flex-col items-center justify-center bg-zinc-950 text-zinc-100",children:[(0,t.jsx)(l.AlertCircle,{className:"w-8 h-8 text-red-500 mb-3"}),(0,t.jsx)("p",{className:"text-sm text-zinc-400 mb-4",children:S}),(0,t.jsxs)("button",{onClick:()=>m.push("/terminal"),className:"flex items-center gap-2 px-4 py-2 text-sm border border-zinc-700 text-zinc-400 rounded-lg hover:text-white hover:border-zinc-500 transition-colors",children:[(0,t.jsx)(n.ArrowLeft,{className:"w-4 h-4"}),"Back to Spaces"]})]});let M=g.filter(e=>!e.isPopout);return(0,t.jsxs)("div",{className:"h-screen flex flex-col bg-zinc-950 text-zinc-100",children:[(0,t.jsx)("div",{className:"flex items-center justify-between px-4 py-2 border-b border-zinc-800 flex-shrink-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("button",{onClick:()=>m.push("/terminal"),className:"p-1.5 -ml-1 text-zinc-500 hover:text-white hover:bg-zinc-800 rounded-md transition-colors",title:"Back to Spaces",children:(0,t.jsx)(n.ArrowLeft,{className:"w-4 h-4"})}),(0,t.jsx)("div",{className:"w-px h-4 bg-zinc-800"}),(0,t.jsx)(i.Globe,{className:"w-3.5 h-3.5 text-zinc-500"}),(0,t.jsx)("span",{className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{backgroundColor:j}}),(0,t.jsx)("span",{className:"text-sm font-semibold",children:y||"Remote Workspace"}),N&&(0,t.jsxs)("span",{className:"text-xs text-zinc-500",children:["on ",N]}),(0,t.jsxs)("span",{className:"text-[11px] text-zinc-500",children:[M.length," pane",1!==M.length?"s":""]})]})}),0===M.length?(0,t.jsx)("div",{className:"flex-1 flex items-center justify-center",children:(0,t.jsxs)("div",{className:"text-center space-y-2",children:[(0,t.jsx)(c.Terminal,{className:"w-10 h-10 text-zinc-700 mx-auto"}),(0,t.jsx)("p",{className:"text-zinc-500 text-sm",children:"This remote workspace has no panes."})]})}):(0,t.jsx)("div",{className:"flex-1 p-2 gap-2 overflow-auto",style:{display:"grid",gridTemplateColumns:1===M.length?"1fr":M.length<=2||M.length<=4?"repeat(2, 1fr)":"repeat(3, 1fr)",gridAutoRows:M.length<=2?"1fr":"minmax(300px, 1fr)"},children:M.map(e=>R&&R!==e.id?null:(0,t.jsx)(o.TerminalPane,{pane:e,onClose:E,onUpdate:A,isMaximized:R===e.id,onToggleMaximize:I,terminalToken:d},e.id))})]})}e.s(["default",()=>m])},16049,e=>{e.v(t=>Promise.all(["static/chunks/e40d2bd3b4ce8192.js"].map(t=>e.l(t))).then(()=>t(44908)))},59439,e=>{e.v(t=>Promise.all(["static/chunks/af8bfb72187b7cbf.js"].map(t=>e.l(t))).then(()=>t(93309)))},16091,e=>{e.v(t=>Promise.all(["static/chunks/9768207ca0a51abd.js"].map(t=>e.l(t))).then(()=>t(52216)))}]);
|
|
Binary file
|
|
Binary file
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
const path = require('path');
|
|
4
|
-
const util = require('./util');
|
|
5
|
-
const SqliteError = require('./sqlite-error');
|
|
6
|
-
|
|
7
|
-
let DEFAULT_ADDON;
|
|
8
|
-
|
|
9
|
-
function Database(filenameGiven, options) {
|
|
10
|
-
if (new.target == null) {
|
|
11
|
-
return new Database(filenameGiven, options);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// Apply defaults
|
|
15
|
-
let buffer;
|
|
16
|
-
if (Buffer.isBuffer(filenameGiven)) {
|
|
17
|
-
buffer = filenameGiven;
|
|
18
|
-
filenameGiven = ':memory:';
|
|
19
|
-
}
|
|
20
|
-
if (filenameGiven == null) filenameGiven = '';
|
|
21
|
-
if (options == null) options = {};
|
|
22
|
-
|
|
23
|
-
// Validate arguments
|
|
24
|
-
if (typeof filenameGiven !== 'string') throw new TypeError('Expected first argument to be a string');
|
|
25
|
-
if (typeof options !== 'object') throw new TypeError('Expected second argument to be an options object');
|
|
26
|
-
if ('readOnly' in options) throw new TypeError('Misspelled option "readOnly" should be "readonly"');
|
|
27
|
-
if ('memory' in options) throw new TypeError('Option "memory" was removed in v7.0.0 (use ":memory:" filename instead)');
|
|
28
|
-
|
|
29
|
-
// Interpret options
|
|
30
|
-
const filename = filenameGiven.trim();
|
|
31
|
-
const anonymous = filename === '' || filename === ':memory:';
|
|
32
|
-
const readonly = util.getBooleanOption(options, 'readonly');
|
|
33
|
-
const fileMustExist = util.getBooleanOption(options, 'fileMustExist');
|
|
34
|
-
const timeout = 'timeout' in options ? options.timeout : 5000;
|
|
35
|
-
const verbose = 'verbose' in options ? options.verbose : null;
|
|
36
|
-
const nativeBinding = 'nativeBinding' in options ? options.nativeBinding : null;
|
|
37
|
-
|
|
38
|
-
// Validate interpreted options
|
|
39
|
-
if (readonly && anonymous && !buffer) throw new TypeError('In-memory/temporary databases cannot be readonly');
|
|
40
|
-
if (!Number.isInteger(timeout) || timeout < 0) throw new TypeError('Expected the "timeout" option to be a positive integer');
|
|
41
|
-
if (timeout > 0x7fffffff) throw new RangeError('Option "timeout" cannot be greater than 2147483647');
|
|
42
|
-
if (verbose != null && typeof verbose !== 'function') throw new TypeError('Expected the "verbose" option to be a function');
|
|
43
|
-
if (nativeBinding != null && typeof nativeBinding !== 'string' && typeof nativeBinding !== 'object') throw new TypeError('Expected the "nativeBinding" option to be a string or addon object');
|
|
44
|
-
|
|
45
|
-
// Load the native addon
|
|
46
|
-
let addon;
|
|
47
|
-
if (nativeBinding == null) {
|
|
48
|
-
addon = DEFAULT_ADDON || (DEFAULT_ADDON = require('bindings')('better_sqlite3.node'));
|
|
49
|
-
} else if (typeof nativeBinding === 'string') {
|
|
50
|
-
// See <https://webpack.js.org/api/module-variables/#__non_webpack_require__-webpack-specific>
|
|
51
|
-
const requireFunc = typeof __non_webpack_require__ === 'function' ? __non_webpack_require__ : require;
|
|
52
|
-
addon = requireFunc(path.resolve(nativeBinding).replace(/(\.node)?$/, '.node'));
|
|
53
|
-
} else {
|
|
54
|
-
// See <https://github.com/WiseLibs/better-sqlite3/issues/972>
|
|
55
|
-
addon = nativeBinding;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
if (!addon.isInitialized) {
|
|
59
|
-
addon.setErrorConstructor(SqliteError);
|
|
60
|
-
addon.isInitialized = true;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Make sure the specified directory exists
|
|
64
|
-
if (!anonymous && !filename.startsWith('file:') && !fs.existsSync(path.dirname(filename))) {
|
|
65
|
-
throw new TypeError('Cannot open database because the directory does not exist');
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
Object.defineProperties(this, {
|
|
69
|
-
[util.cppdb]: { value: new addon.Database(filename, filenameGiven, anonymous, readonly, fileMustExist, timeout, verbose || null, buffer || null) },
|
|
70
|
-
...wrappers.getters,
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const wrappers = require('./methods/wrappers');
|
|
75
|
-
Database.prototype.prepare = wrappers.prepare;
|
|
76
|
-
Database.prototype.transaction = require('./methods/transaction');
|
|
77
|
-
Database.prototype.pragma = require('./methods/pragma');
|
|
78
|
-
Database.prototype.backup = require('./methods/backup');
|
|
79
|
-
Database.prototype.serialize = require('./methods/serialize');
|
|
80
|
-
Database.prototype.function = require('./methods/function');
|
|
81
|
-
Database.prototype.aggregate = require('./methods/aggregate');
|
|
82
|
-
Database.prototype.table = require('./methods/table');
|
|
83
|
-
Database.prototype.loadExtension = wrappers.loadExtension;
|
|
84
|
-
Database.prototype.exec = wrappers.exec;
|
|
85
|
-
Database.prototype.close = wrappers.close;
|
|
86
|
-
Database.prototype.defaultSafeIntegers = wrappers.defaultSafeIntegers;
|
|
87
|
-
Database.prototype.unsafeMode = wrappers.unsafeMode;
|
|
88
|
-
Database.prototype[util.inspect] = require('./methods/inspect');
|
|
89
|
-
|
|
90
|
-
module.exports = Database;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const { getBooleanOption, cppdb } = require('../util');
|
|
3
|
-
|
|
4
|
-
module.exports = function defineAggregate(name, options) {
|
|
5
|
-
// Validate arguments
|
|
6
|
-
if (typeof name !== 'string') throw new TypeError('Expected first argument to be a string');
|
|
7
|
-
if (typeof options !== 'object' || options === null) throw new TypeError('Expected second argument to be an options object');
|
|
8
|
-
if (!name) throw new TypeError('User-defined function name cannot be an empty string');
|
|
9
|
-
|
|
10
|
-
// Interpret options
|
|
11
|
-
const start = 'start' in options ? options.start : null;
|
|
12
|
-
const step = getFunctionOption(options, 'step', true);
|
|
13
|
-
const inverse = getFunctionOption(options, 'inverse', false);
|
|
14
|
-
const result = getFunctionOption(options, 'result', false);
|
|
15
|
-
const safeIntegers = 'safeIntegers' in options ? +getBooleanOption(options, 'safeIntegers') : 2;
|
|
16
|
-
const deterministic = getBooleanOption(options, 'deterministic');
|
|
17
|
-
const directOnly = getBooleanOption(options, 'directOnly');
|
|
18
|
-
const varargs = getBooleanOption(options, 'varargs');
|
|
19
|
-
let argCount = -1;
|
|
20
|
-
|
|
21
|
-
// Determine argument count
|
|
22
|
-
if (!varargs) {
|
|
23
|
-
argCount = Math.max(getLength(step), inverse ? getLength(inverse) : 0);
|
|
24
|
-
if (argCount > 0) argCount -= 1;
|
|
25
|
-
if (argCount > 100) throw new RangeError('User-defined functions cannot have more than 100 arguments');
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
this[cppdb].aggregate(start, step, inverse, result, name, argCount, safeIntegers, deterministic, directOnly);
|
|
29
|
-
return this;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const getFunctionOption = (options, key, required) => {
|
|
33
|
-
const value = key in options ? options[key] : null;
|
|
34
|
-
if (typeof value === 'function') return value;
|
|
35
|
-
if (value != null) throw new TypeError(`Expected the "${key}" option to be a function`);
|
|
36
|
-
if (required) throw new TypeError(`Missing required option "${key}"`);
|
|
37
|
-
return null;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const getLength = ({ length }) => {
|
|
41
|
-
if (Number.isInteger(length) && length >= 0) return length;
|
|
42
|
-
throw new TypeError('Expected function.length to be a positive integer');
|
|
43
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
const path = require('path');
|
|
4
|
-
const { promisify } = require('util');
|
|
5
|
-
const { cppdb } = require('../util');
|
|
6
|
-
const fsAccess = promisify(fs.access);
|
|
7
|
-
|
|
8
|
-
module.exports = async function backup(filename, options) {
|
|
9
|
-
if (options == null) options = {};
|
|
10
|
-
|
|
11
|
-
// Validate arguments
|
|
12
|
-
if (typeof filename !== 'string') throw new TypeError('Expected first argument to be a string');
|
|
13
|
-
if (typeof options !== 'object') throw new TypeError('Expected second argument to be an options object');
|
|
14
|
-
|
|
15
|
-
// Interpret options
|
|
16
|
-
filename = filename.trim();
|
|
17
|
-
const attachedName = 'attached' in options ? options.attached : 'main';
|
|
18
|
-
const handler = 'progress' in options ? options.progress : null;
|
|
19
|
-
|
|
20
|
-
// Validate interpreted options
|
|
21
|
-
if (!filename) throw new TypeError('Backup filename cannot be an empty string');
|
|
22
|
-
if (filename === ':memory:') throw new TypeError('Invalid backup filename ":memory:"');
|
|
23
|
-
if (typeof attachedName !== 'string') throw new TypeError('Expected the "attached" option to be a string');
|
|
24
|
-
if (!attachedName) throw new TypeError('The "attached" option cannot be an empty string');
|
|
25
|
-
if (handler != null && typeof handler !== 'function') throw new TypeError('Expected the "progress" option to be a function');
|
|
26
|
-
|
|
27
|
-
// Make sure the specified directory exists
|
|
28
|
-
await fsAccess(path.dirname(filename)).catch(() => {
|
|
29
|
-
throw new TypeError('Cannot save backup because the directory does not exist');
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
const isNewFile = await fsAccess(filename).then(() => false, () => true);
|
|
33
|
-
return runBackup(this[cppdb].backup(this, attachedName, filename, isNewFile), handler || null);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const runBackup = (backup, handler) => {
|
|
37
|
-
let rate = 0;
|
|
38
|
-
let useDefault = true;
|
|
39
|
-
|
|
40
|
-
return new Promise((resolve, reject) => {
|
|
41
|
-
setImmediate(function step() {
|
|
42
|
-
try {
|
|
43
|
-
const progress = backup.transfer(rate);
|
|
44
|
-
if (!progress.remainingPages) {
|
|
45
|
-
backup.close();
|
|
46
|
-
resolve(progress);
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
if (useDefault) {
|
|
50
|
-
useDefault = false;
|
|
51
|
-
rate = 100;
|
|
52
|
-
}
|
|
53
|
-
if (handler) {
|
|
54
|
-
const ret = handler(progress);
|
|
55
|
-
if (ret !== undefined) {
|
|
56
|
-
if (typeof ret === 'number' && ret === ret) rate = Math.max(0, Math.min(0x7fffffff, Math.round(ret)));
|
|
57
|
-
else throw new TypeError('Expected progress callback to return a number or undefined');
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
setImmediate(step);
|
|
61
|
-
} catch (err) {
|
|
62
|
-
backup.close();
|
|
63
|
-
reject(err);
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const { getBooleanOption, cppdb } = require('../util');
|
|
3
|
-
|
|
4
|
-
module.exports = function defineFunction(name, options, fn) {
|
|
5
|
-
// Apply defaults
|
|
6
|
-
if (options == null) options = {};
|
|
7
|
-
if (typeof options === 'function') { fn = options; options = {}; }
|
|
8
|
-
|
|
9
|
-
// Validate arguments
|
|
10
|
-
if (typeof name !== 'string') throw new TypeError('Expected first argument to be a string');
|
|
11
|
-
if (typeof fn !== 'function') throw new TypeError('Expected last argument to be a function');
|
|
12
|
-
if (typeof options !== 'object') throw new TypeError('Expected second argument to be an options object');
|
|
13
|
-
if (!name) throw new TypeError('User-defined function name cannot be an empty string');
|
|
14
|
-
|
|
15
|
-
// Interpret options
|
|
16
|
-
const safeIntegers = 'safeIntegers' in options ? +getBooleanOption(options, 'safeIntegers') : 2;
|
|
17
|
-
const deterministic = getBooleanOption(options, 'deterministic');
|
|
18
|
-
const directOnly = getBooleanOption(options, 'directOnly');
|
|
19
|
-
const varargs = getBooleanOption(options, 'varargs');
|
|
20
|
-
let argCount = -1;
|
|
21
|
-
|
|
22
|
-
// Determine argument count
|
|
23
|
-
if (!varargs) {
|
|
24
|
-
argCount = fn.length;
|
|
25
|
-
if (!Number.isInteger(argCount) || argCount < 0) throw new TypeError('Expected function.length to be a positive integer');
|
|
26
|
-
if (argCount > 100) throw new RangeError('User-defined functions cannot have more than 100 arguments');
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
this[cppdb].function(fn, name, argCount, safeIntegers, deterministic, directOnly);
|
|
30
|
-
return this;
|
|
31
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const { getBooleanOption, cppdb } = require('../util');
|
|
3
|
-
|
|
4
|
-
module.exports = function pragma(source, options) {
|
|
5
|
-
if (options == null) options = {};
|
|
6
|
-
if (typeof source !== 'string') throw new TypeError('Expected first argument to be a string');
|
|
7
|
-
if (typeof options !== 'object') throw new TypeError('Expected second argument to be an options object');
|
|
8
|
-
const simple = getBooleanOption(options, 'simple');
|
|
9
|
-
|
|
10
|
-
const stmt = this[cppdb].prepare(`PRAGMA ${source}`, this, true);
|
|
11
|
-
return simple ? stmt.pluck().get() : stmt.all();
|
|
12
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const { cppdb } = require('../util');
|
|
3
|
-
|
|
4
|
-
module.exports = function serialize(options) {
|
|
5
|
-
if (options == null) options = {};
|
|
6
|
-
|
|
7
|
-
// Validate arguments
|
|
8
|
-
if (typeof options !== 'object') throw new TypeError('Expected first argument to be an options object');
|
|
9
|
-
|
|
10
|
-
// Interpret and validate options
|
|
11
|
-
const attachedName = 'attached' in options ? options.attached : 'main';
|
|
12
|
-
if (typeof attachedName !== 'string') throw new TypeError('Expected the "attached" option to be a string');
|
|
13
|
-
if (!attachedName) throw new TypeError('The "attached" option cannot be an empty string');
|
|
14
|
-
|
|
15
|
-
return this[cppdb].serialize(attachedName);
|
|
16
|
-
};
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const { cppdb } = require('../util');
|
|
3
|
-
|
|
4
|
-
module.exports = function defineTable(name, factory) {
|
|
5
|
-
// Validate arguments
|
|
6
|
-
if (typeof name !== 'string') throw new TypeError('Expected first argument to be a string');
|
|
7
|
-
if (!name) throw new TypeError('Virtual table module name cannot be an empty string');
|
|
8
|
-
|
|
9
|
-
// Determine whether the module is eponymous-only or not
|
|
10
|
-
let eponymous = false;
|
|
11
|
-
if (typeof factory === 'object' && factory !== null) {
|
|
12
|
-
eponymous = true;
|
|
13
|
-
factory = defer(parseTableDefinition(factory, 'used', name));
|
|
14
|
-
} else {
|
|
15
|
-
if (typeof factory !== 'function') throw new TypeError('Expected second argument to be a function or a table definition object');
|
|
16
|
-
factory = wrapFactory(factory);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
this[cppdb].table(factory, name, eponymous);
|
|
20
|
-
return this;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
function wrapFactory(factory) {
|
|
24
|
-
return function virtualTableFactory(moduleName, databaseName, tableName, ...args) {
|
|
25
|
-
const thisObject = {
|
|
26
|
-
module: moduleName,
|
|
27
|
-
database: databaseName,
|
|
28
|
-
table: tableName,
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
// Generate a new table definition by invoking the factory
|
|
32
|
-
const def = apply.call(factory, thisObject, args);
|
|
33
|
-
if (typeof def !== 'object' || def === null) {
|
|
34
|
-
throw new TypeError(`Virtual table module "${moduleName}" did not return a table definition object`);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return parseTableDefinition(def, 'returned', moduleName);
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function parseTableDefinition(def, verb, moduleName) {
|
|
42
|
-
// Validate required properties
|
|
43
|
-
if (!hasOwnProperty.call(def, 'rows')) {
|
|
44
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition without a "rows" property`);
|
|
45
|
-
}
|
|
46
|
-
if (!hasOwnProperty.call(def, 'columns')) {
|
|
47
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition without a "columns" property`);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Validate "rows" property
|
|
51
|
-
const rows = def.rows;
|
|
52
|
-
if (typeof rows !== 'function' || Object.getPrototypeOf(rows) !== GeneratorFunctionPrototype) {
|
|
53
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "rows" property (should be a generator function)`);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Validate "columns" property
|
|
57
|
-
let columns = def.columns;
|
|
58
|
-
if (!Array.isArray(columns) || !(columns = [...columns]).every(x => typeof x === 'string')) {
|
|
59
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "columns" property (should be an array of strings)`);
|
|
60
|
-
}
|
|
61
|
-
if (columns.length !== new Set(columns).size) {
|
|
62
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with duplicate column names`);
|
|
63
|
-
}
|
|
64
|
-
if (!columns.length) {
|
|
65
|
-
throw new RangeError(`Virtual table module "${moduleName}" ${verb} a table definition with zero columns`);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// Validate "parameters" property
|
|
69
|
-
let parameters;
|
|
70
|
-
if (hasOwnProperty.call(def, 'parameters')) {
|
|
71
|
-
parameters = def.parameters;
|
|
72
|
-
if (!Array.isArray(parameters) || !(parameters = [...parameters]).every(x => typeof x === 'string')) {
|
|
73
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "parameters" property (should be an array of strings)`);
|
|
74
|
-
}
|
|
75
|
-
} else {
|
|
76
|
-
parameters = inferParameters(rows);
|
|
77
|
-
}
|
|
78
|
-
if (parameters.length !== new Set(parameters).size) {
|
|
79
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with duplicate parameter names`);
|
|
80
|
-
}
|
|
81
|
-
if (parameters.length > 32) {
|
|
82
|
-
throw new RangeError(`Virtual table module "${moduleName}" ${verb} a table definition with more than the maximum number of 32 parameters`);
|
|
83
|
-
}
|
|
84
|
-
for (const parameter of parameters) {
|
|
85
|
-
if (columns.includes(parameter)) {
|
|
86
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with column "${parameter}" which was ambiguously defined as both a column and parameter`);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// Validate "safeIntegers" option
|
|
91
|
-
let safeIntegers = 2;
|
|
92
|
-
if (hasOwnProperty.call(def, 'safeIntegers')) {
|
|
93
|
-
const bool = def.safeIntegers;
|
|
94
|
-
if (typeof bool !== 'boolean') {
|
|
95
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "safeIntegers" property (should be a boolean)`);
|
|
96
|
-
}
|
|
97
|
-
safeIntegers = +bool;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// Validate "directOnly" option
|
|
101
|
-
let directOnly = false;
|
|
102
|
-
if (hasOwnProperty.call(def, 'directOnly')) {
|
|
103
|
-
directOnly = def.directOnly;
|
|
104
|
-
if (typeof directOnly !== 'boolean') {
|
|
105
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "directOnly" property (should be a boolean)`);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// Generate SQL for the virtual table definition
|
|
110
|
-
const columnDefinitions = [
|
|
111
|
-
...parameters.map(identifier).map(str => `${str} HIDDEN`),
|
|
112
|
-
...columns.map(identifier),
|
|
113
|
-
];
|
|
114
|
-
return [
|
|
115
|
-
`CREATE TABLE x(${columnDefinitions.join(', ')});`,
|
|
116
|
-
wrapGenerator(rows, new Map(columns.map((x, i) => [x, parameters.length + i])), moduleName),
|
|
117
|
-
parameters,
|
|
118
|
-
safeIntegers,
|
|
119
|
-
directOnly,
|
|
120
|
-
];
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
function wrapGenerator(generator, columnMap, moduleName) {
|
|
124
|
-
return function* virtualTable(...args) {
|
|
125
|
-
/*
|
|
126
|
-
We must defensively clone any buffers in the arguments, because
|
|
127
|
-
otherwise the generator could mutate one of them, which would cause
|
|
128
|
-
us to return incorrect values for hidden columns, potentially
|
|
129
|
-
corrupting the database.
|
|
130
|
-
*/
|
|
131
|
-
const output = args.map(x => Buffer.isBuffer(x) ? Buffer.from(x) : x);
|
|
132
|
-
for (let i = 0; i < columnMap.size; ++i) {
|
|
133
|
-
output.push(null); // Fill with nulls to prevent gaps in array (v8 optimization)
|
|
134
|
-
}
|
|
135
|
-
for (const row of generator(...args)) {
|
|
136
|
-
if (Array.isArray(row)) {
|
|
137
|
-
extractRowArray(row, output, columnMap.size, moduleName);
|
|
138
|
-
yield output;
|
|
139
|
-
} else if (typeof row === 'object' && row !== null) {
|
|
140
|
-
extractRowObject(row, output, columnMap, moduleName);
|
|
141
|
-
yield output;
|
|
142
|
-
} else {
|
|
143
|
-
throw new TypeError(`Virtual table module "${moduleName}" yielded something that isn't a valid row object`);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
function extractRowArray(row, output, columnCount, moduleName) {
|
|
150
|
-
if (row.length !== columnCount) {
|
|
151
|
-
throw new TypeError(`Virtual table module "${moduleName}" yielded a row with an incorrect number of columns`);
|
|
152
|
-
}
|
|
153
|
-
const offset = output.length - columnCount;
|
|
154
|
-
for (let i = 0; i < columnCount; ++i) {
|
|
155
|
-
output[i + offset] = row[i];
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
function extractRowObject(row, output, columnMap, moduleName) {
|
|
160
|
-
let count = 0;
|
|
161
|
-
for (const key of Object.keys(row)) {
|
|
162
|
-
const index = columnMap.get(key);
|
|
163
|
-
if (index === undefined) {
|
|
164
|
-
throw new TypeError(`Virtual table module "${moduleName}" yielded a row with an undeclared column "${key}"`);
|
|
165
|
-
}
|
|
166
|
-
output[index] = row[key];
|
|
167
|
-
count += 1;
|
|
168
|
-
}
|
|
169
|
-
if (count !== columnMap.size) {
|
|
170
|
-
throw new TypeError(`Virtual table module "${moduleName}" yielded a row with missing columns`);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
function inferParameters({ length }) {
|
|
175
|
-
if (!Number.isInteger(length) || length < 0) {
|
|
176
|
-
throw new TypeError('Expected function.length to be a positive integer');
|
|
177
|
-
}
|
|
178
|
-
const params = [];
|
|
179
|
-
for (let i = 0; i < length; ++i) {
|
|
180
|
-
params.push(`$${i + 1}`);
|
|
181
|
-
}
|
|
182
|
-
return params;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
const { hasOwnProperty } = Object.prototype;
|
|
186
|
-
const { apply } = Function.prototype;
|
|
187
|
-
const GeneratorFunctionPrototype = Object.getPrototypeOf(function*(){});
|
|
188
|
-
const identifier = str => `"${str.replace(/"/g, '""')}"`;
|
|
189
|
-
const defer = x => () => x;
|