@baochunli/flakes 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/auth.d.ts.map +1 -1
- package/dist/commands/auth.js +133 -13
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/host.d.ts.map +1 -1
- package/dist/commands/host.js +77 -2
- package/dist/commands/host.js.map +1 -1
- package/dist/commands/projects.d.ts +4 -0
- package/dist/commands/projects.d.ts.map +1 -0
- package/dist/commands/projects.js +133 -0
- package/dist/commands/projects.js.map +1 -0
- package/dist/commands/runs.d.ts.map +1 -1
- package/dist/commands/runs.js +5 -1
- package/dist/commands/runs.js.map +1 -1
- package/dist/commands/runtime.d.ts +0 -1
- package/dist/commands/runtime.d.ts.map +1 -1
- package/dist/commands/runtime.js +2 -280
- package/dist/commands/runtime.js.map +1 -1
- package/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +0 -6
- package/dist/commands/server.js.map +1 -1
- package/dist/commands/tasks.js +3 -0
- package/dist/commands/tasks.js.map +1 -1
- package/dist/config-example.js +1 -1
- package/dist/config-example.js.map +1 -1
- package/dist/host-config.d.ts +1 -6
- package/dist/host-config.d.ts.map +1 -1
- package/dist/host-config.js +10 -28
- package/dist/host-config.js.map +1 -1
- package/dist/host-runner.d.ts +3 -0
- package/dist/host-runner.d.ts.map +1 -1
- package/dist/host-runner.js +18 -6
- package/dist/host-runner.js.map +1 -1
- package/dist/host-runtime.d.ts.map +1 -1
- package/dist/host-runtime.js +92 -2
- package/dist/host-runtime.js.map +1 -1
- package/dist/host-transport.js +2 -5
- package/dist/host-transport.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +46 -42
- package/dist/index.js.map +1 -1
- package/dist/node_modules/@flakes/auth/dist/better-auth-shape.d.ts +10 -0
- package/dist/node_modules/@flakes/auth/dist/better-auth-shape.d.ts.map +1 -0
- package/dist/node_modules/@flakes/auth/dist/better-auth-shape.js +16 -0
- package/dist/node_modules/@flakes/auth/dist/better-auth-shape.js.map +1 -0
- package/dist/node_modules/@flakes/auth/package.json +1 -1
- package/dist/node_modules/@flakes/console/.output/nitro.json +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/DocumentationPage-CNPk8RVl.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/ProjectsPage-CKPR1nnu.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/RunPage-BdugbnA3.js +3 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/RunsPage-CJbycrqM.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/SandboxesLens-BoLM52PY.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/SandboxesPage-6KHjMeaR.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/TranscriptPage-CHSq0_qN.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/_-CD1Voz9h.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/_runId-_0VPmGYe.js +2 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/_taskId-CPAKAp4X.js +2 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/account-BoRurhrq.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/account-forms-D4eVqOhW.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/arrow-right-QzVbRzF_.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/auth-layout-DBnq_eif.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/bits-BOMPEHvv.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/card-37qs8AAd.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/circle-alert-CM0SVfzc.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/circle-check-CzwcEElH.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/circle-x-C_sOQVNQ.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/device-FqII-S41.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/dist-BEfdrJTS.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/documentation-2C3ncAuV.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/{external-link-BW8lpiMR.js → external-link-BWhbbPgy.js} +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/{file-text-DMdy8OfN.js → file-text-DLxLJ7P1.js} +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/forgot-password-BSQ4TWpA.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/inbox-BVu38EN6.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/{lib-DtfURcG3.js → lib-COfgMmRR.js} +3 -3
- package/dist/node_modules/@flakes/console/.output/public/assets/link-ll3nLBSM.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/{lock-D4OhqEPW.js → lock-Ck2SfQA2.js} +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/main-LpSDdT-S.js +1215 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/matchContext-puEkI9BI.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/otp-verification-CussJQT1.js +20 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/projects-CLgKBrCe.js +2 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/react-B8IZ02wI.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/react-dom-ki7NpxV4.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/redirect-Cu9zBy04.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/reset-password-DwWhVkEh.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/runs-CFYk2iRh.js +2 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/sandboxes-mGsOcVFL.js +2 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/{save-1uf5fQff.js → save-Bte_1tnN.js} +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/security-MjM55vIw.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/signin-KbA1cD6o.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/signin-form-CBF-d8iK.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/signup-CbHsThKr.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/styles-DtA2wbW8.css +2 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/table-WMIs2m3R.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/tiny-invariant-CO5X59di.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/user-Bt9z7sSI.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/utils-CBxvVKOM.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/x-Bdsfqbi3.js +1 -0
- package/dist/node_modules/@flakes/console/.output/server/{_-CjpSIsvB.mjs → _-BULJ6utw.mjs} +3 -3
- package/dist/node_modules/@flakes/console/.output/server/{_-8ZDVkA1O.mjs → _-_ST9QYWn.mjs} +3 -3
- package/dist/node_modules/@flakes/console/.output/server/_chunks/ProjectsPage.mjs +589 -0
- package/dist/node_modules/@flakes/console/.output/server/_chunks/RunPage.mjs +13 -6
- package/dist/node_modules/@flakes/console/.output/server/_chunks/RunsPage.mjs +43 -12
- package/dist/node_modules/@flakes/console/.output/server/_chunks/SandboxesPage.mjs +2 -2
- package/dist/node_modules/@flakes/console/.output/server/_chunks/TranscriptPage.mjs +2 -2
- package/dist/node_modules/@flakes/console/.output/server/_chunks/project-navigation.mjs +79 -0
- package/dist/node_modules/@flakes/console/.output/server/_chunks/router.mjs +195 -112
- package/dist/node_modules/@flakes/console/.output/server/_chunks/utils.mjs +111 -3
- package/dist/node_modules/@flakes/console/.output/server/_libs/lucide-react.mjs +178 -1
- package/dist/node_modules/@flakes/console/.output/server/{_runId-CJ5_8uS8.mjs → _runId-CmYWNL8A.mjs} +3 -3
- package/dist/node_modules/@flakes/console/.output/server/{_runId-Cag5UaYU.mjs → _runId-WZmbo654.mjs} +2 -2
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{App-CwFtUgAz.mjs → App-CUx8Ftit.mjs} +118 -64
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{DocumentationPage-D85Budiq.mjs → DocumentationPage-0I9oWWJT.mjs} +5 -5
- package/dist/node_modules/@flakes/console/.output/server/_ssr/ProjectsPage-CGj9V2Of.mjs +590 -0
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{RunPage-CatpnkFy.mjs → RunPage-B2vhVaj6.mjs} +14 -7
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{RunsPage-BmLTih8Z.mjs → RunsPage-BifKogQE.mjs} +44 -13
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{SandboxesPage-Dlq0Ga24.mjs → SandboxesPage-DGji_OdB.mjs} +3 -3
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{TranscriptPage-DaSIDCKk.mjs → TranscriptPage-deSxVZaQ.mjs} +3 -3
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{account-DzluYS58.mjs → account-D5y9vkAc.mjs} +2 -2
- package/dist/node_modules/@flakes/console/.output/server/_ssr/account-forms-CsothyLo.mjs +1 -1
- package/dist/node_modules/@flakes/console/.output/server/_ssr/device-CRZl7dGv.mjs +1 -1
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{documentation-4BCES--X.mjs → documentation-C69e9_eF.mjs} +3 -3
- package/dist/node_modules/@flakes/console/.output/server/_ssr/documentation-C91gfyy0.mjs +210 -0
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{hooks-COIYuQzf.mjs → hooks-DrgN35zn.mjs} +110 -4
- package/dist/node_modules/@flakes/console/.output/server/_ssr/project-navigation-DI77TL9a.mjs +79 -0
- package/dist/node_modules/@flakes/console/.output/server/_ssr/projects-lJ2tIIPj.mjs +5 -0
- package/dist/node_modules/@flakes/console/.output/server/_ssr/reset-password-SmmTixcr.mjs +1 -1
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{router-B3vKkNtv.mjs → router-DHxFQ03L.mjs} +49 -41
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{runs-CBkO-RO8.mjs → runs-BWxEGKO_.mjs} +17 -5
- package/dist/node_modules/@flakes/console/.output/server/_ssr/runs-dnPfp9dt.mjs +19 -0
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{sandboxes-BIAgn8pu2.mjs → sandboxes-hxFINxDS.mjs} +3 -3
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{sandboxes-qSX_pfUJ.mjs → sandboxes-v28LJQM3.mjs} +2 -2
- package/dist/node_modules/@flakes/console/.output/server/_ssr/signin-form-CQDi-0A5.mjs +1 -1
- package/dist/node_modules/@flakes/console/.output/server/_ssr/ssr.mjs +2 -2
- package/dist/node_modules/@flakes/console/.output/server/{_tanstack-start-manifest_v-llXRWxjT.mjs → _tanstack-start-manifest_v-DfwuEzTr.mjs} +54 -46
- package/dist/node_modules/@flakes/console/.output/server/{_taskId-BaezvY0w.mjs → _taskId-CBo95z-s.mjs} +2 -2
- package/dist/node_modules/@flakes/console/.output/server/{_taskId-Da7kHKj9.mjs → _taskId-Sil3-PKh.mjs} +3 -3
- package/dist/node_modules/@flakes/console/package.json +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/client-access.d.ts +17 -0
- package/dist/node_modules/@flakes/control-plane/dist/client-access.d.ts.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/client-access.js +12 -0
- package/dist/node_modules/@flakes/control-plane/dist/client-access.js.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/host-credentials.d.ts +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/host-credentials.d.ts.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/host-pool-matching.d.ts +24 -1
- package/dist/node_modules/@flakes/control-plane/dist/host-pool-matching.d.ts.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/host-pool-matching.js +87 -3
- package/dist/node_modules/@flakes/control-plane/dist/host-pool-matching.js.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/host-stream.d.ts.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/host-stream.js +150 -40
- package/dist/node_modules/@flakes/control-plane/dist/host-stream.js.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/managed-sandbox-provisioner.d.ts +71 -0
- package/dist/node_modules/@flakes/control-plane/dist/managed-sandbox-provisioner.d.ts.map +1 -0
- package/dist/node_modules/@flakes/control-plane/dist/managed-sandbox-provisioner.js +243 -0
- package/dist/node_modules/@flakes/control-plane/dist/managed-sandbox-provisioner.js.map +1 -0
- package/dist/node_modules/@flakes/control-plane/dist/routes/hosts.d.ts.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/routes/hosts.js +219 -0
- package/dist/node_modules/@flakes/control-plane/dist/routes/hosts.js.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/routes/projects.d.ts +3 -0
- package/dist/node_modules/@flakes/control-plane/dist/routes/projects.d.ts.map +1 -0
- package/dist/node_modules/@flakes/control-plane/dist/routes/projects.js +226 -0
- package/dist/node_modules/@flakes/control-plane/dist/routes/projects.js.map +1 -0
- package/dist/node_modules/@flakes/control-plane/dist/routes/runs.d.ts.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/routes/runs.js +93 -6
- package/dist/node_modules/@flakes/control-plane/dist/routes/runs.js.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/routes/sandboxes-admin.d.ts +3 -0
- package/dist/node_modules/@flakes/control-plane/dist/routes/sandboxes-admin.d.ts.map +1 -0
- package/dist/node_modules/@flakes/control-plane/dist/routes/sandboxes-admin.js +153 -0
- package/dist/node_modules/@flakes/control-plane/dist/routes/sandboxes-admin.js.map +1 -0
- package/dist/node_modules/@flakes/control-plane/dist/routes/tasks.js +2 -2
- package/dist/node_modules/@flakes/control-plane/dist/routes/tasks.js.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/sandbox-drain.d.ts +19 -0
- package/dist/node_modules/@flakes/control-plane/dist/sandbox-drain.d.ts.map +1 -0
- package/dist/node_modules/@flakes/control-plane/dist/sandbox-drain.js +46 -0
- package/dist/node_modules/@flakes/control-plane/dist/sandbox-drain.js.map +1 -0
- package/dist/node_modules/@flakes/control-plane/dist/scheduler.d.ts +2 -0
- package/dist/node_modules/@flakes/control-plane/dist/scheduler.d.ts.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/scheduler.js +53 -21
- package/dist/node_modules/@flakes/control-plane/dist/scheduler.js.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/server.d.ts.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/server.js +2 -0
- package/dist/node_modules/@flakes/control-plane/dist/server.js.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/types.d.ts +2 -0
- package/dist/node_modules/@flakes/control-plane/dist/types.d.ts.map +1 -1
- package/dist/node_modules/@flakes/control-plane/package.json +1 -1
- package/dist/node_modules/@flakes/core/dist/config.d.ts.map +1 -1
- package/dist/node_modules/@flakes/core/dist/config.js +6 -2
- package/dist/node_modules/@flakes/core/dist/config.js.map +1 -1
- package/dist/node_modules/@flakes/core/dist/ids.d.ts +4 -0
- package/dist/node_modules/@flakes/core/dist/ids.d.ts.map +1 -1
- package/dist/node_modules/@flakes/core/dist/ids.js +2 -0
- package/dist/node_modules/@flakes/core/dist/ids.js.map +1 -1
- package/dist/node_modules/@flakes/core/dist/runtime.d.ts +1 -1
- package/dist/node_modules/@flakes/core/dist/schemas.d.ts +11 -0
- package/dist/node_modules/@flakes/core/dist/schemas.d.ts.map +1 -1
- package/dist/node_modules/@flakes/core/dist/schemas.js +10 -0
- package/dist/node_modules/@flakes/core/dist/schemas.js.map +1 -1
- package/dist/node_modules/@flakes/core/package.json +1 -1
- package/dist/node_modules/@flakes/harness-agent/package.json +1 -1
- package/dist/node_modules/@flakes/harness-sdk/package.json +1 -1
- package/dist/node_modules/@flakes/pi-agent/package.json +1 -1
- package/dist/node_modules/@flakes/protocol/dist/index.d.ts +1 -1
- package/dist/node_modules/@flakes/protocol/dist/index.d.ts.map +1 -1
- package/dist/node_modules/@flakes/protocol/dist/index.js +1 -1
- package/dist/node_modules/@flakes/protocol/dist/index.js.map +1 -1
- package/dist/node_modules/@flakes/protocol/dist/v1.d.ts +317 -0
- package/dist/node_modules/@flakes/protocol/dist/v1.d.ts.map +1 -1
- package/dist/node_modules/@flakes/protocol/dist/v1.js +50 -1
- package/dist/node_modules/@flakes/protocol/dist/v1.js.map +1 -1
- package/dist/node_modules/@flakes/protocol/package.json +1 -1
- package/dist/node_modules/@flakes/sandbox-runtime/dist/transport.js +3 -6
- package/dist/node_modules/@flakes/sandbox-runtime/dist/transport.js.map +1 -1
- package/dist/node_modules/@flakes/sandbox-runtime/package.json +1 -1
- package/dist/node_modules/@flakes/store/dist/artifacts-events-store.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/dist/artifacts-events-store.js +10 -0
- package/dist/node_modules/@flakes/store/dist/artifacts-events-store.js.map +1 -1
- package/dist/node_modules/@flakes/store/dist/host-provisioning-limits.d.ts +2 -1
- package/dist/node_modules/@flakes/store/dist/host-provisioning-limits.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/dist/host-provisioning-limits.js +1 -0
- package/dist/node_modules/@flakes/store/dist/host-provisioning-limits.js.map +1 -1
- package/dist/node_modules/@flakes/store/dist/kysely-store.d.ts +2 -2
- package/dist/node_modules/@flakes/store/dist/kysely-store.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/dist/kysely-store.js +2 -2
- package/dist/node_modules/@flakes/store/dist/kysely-store.js.map +1 -1
- package/dist/node_modules/@flakes/store/dist/managed-sandbox-instances-store.d.ts +6 -2
- package/dist/node_modules/@flakes/store/dist/managed-sandbox-instances-store.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/dist/managed-sandbox-instances-store.js +160 -3
- package/dist/node_modules/@flakes/store/dist/managed-sandbox-instances-store.js.map +1 -1
- package/dist/node_modules/@flakes/store/dist/mappers.d.ts +10 -2
- package/dist/node_modules/@flakes/store/dist/mappers.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/dist/mappers.js +45 -0
- package/dist/node_modules/@flakes/store/dist/mappers.js.map +1 -1
- package/dist/node_modules/@flakes/store/dist/projects-store.d.ts +42 -0
- package/dist/node_modules/@flakes/store/dist/projects-store.d.ts.map +1 -0
- package/dist/node_modules/@flakes/store/dist/projects-store.js +376 -0
- package/dist/node_modules/@flakes/store/dist/projects-store.js.map +1 -0
- package/dist/node_modules/@flakes/store/dist/runs-store.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/dist/runs-store.js +7 -2
- package/dist/node_modules/@flakes/store/dist/runs-store.js.map +1 -1
- package/dist/node_modules/@flakes/store/dist/schema.js +72 -0
- package/dist/node_modules/@flakes/store/dist/schema.js.map +1 -1
- package/dist/node_modules/@flakes/store/dist/sqlite.d.ts +4 -0
- package/dist/node_modules/@flakes/store/dist/sqlite.d.ts.map +1 -0
- package/dist/node_modules/@flakes/store/dist/sqlite.js +34 -0
- package/dist/node_modules/@flakes/store/dist/sqlite.js.map +1 -0
- package/dist/node_modules/@flakes/store/dist/store-base.d.ts +14 -12
- package/dist/node_modules/@flakes/store/dist/store-base.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/dist/tables.d.ts +41 -1
- package/dist/node_modules/@flakes/store/dist/tables.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/dist/tasks-store.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/dist/tasks-store.js +9 -2
- package/dist/node_modules/@flakes/store/dist/tasks-store.js.map +1 -1
- package/dist/node_modules/@flakes/store/dist/types.d.ts +159 -1
- package/dist/node_modules/@flakes/store/dist/types.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/package.json +1 -1
- package/package.json +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/DocumentationPage-DrqDulyL.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/RunPage-BC3sGoPN.js +0 -3
- package/dist/node_modules/@flakes/console/.output/public/assets/RunsPage-LkYGVvbL.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/SandboxesLens-BUQQWmH6.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/SandboxesPage-CwWMogj6.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/TranscriptPage-CTMgJgHp.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/_-DRcA_CG9.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/_runId-CO1ozt9P.js +0 -2
- package/dist/node_modules/@flakes/console/.output/public/assets/_taskId-CcIypX6M.js +0 -2
- package/dist/node_modules/@flakes/console/.output/public/assets/account-DKgjbb-C.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/account-forms-DrHA3zEd.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/arrow-right-BMW8fJP5.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/auth-layout-INHonQMf.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/bits-Cv0Te4iz.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/card-DSG3_teC.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/circle-check-B0gtb8OH.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/device-DOGZUNMB.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/dist-BtPw3IIV.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/documentation-Dr9Bdqxh.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/forgot-password-C7qvwcpm.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/link-BsixJinJ.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/main-RzjfJZwD.js +0 -1121
- package/dist/node_modules/@flakes/console/.output/public/assets/matchContext-tJ0VTv5m.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/otp-verification-Cqa6lopR.js +0 -20
- package/dist/node_modules/@flakes/console/.output/public/assets/react-DtOYBmep.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/react-dom-DrIU40PY.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/redirect-BEm0VK76.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/reset-password-tImCgEn0.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/runs-Cuk0VOVi.js +0 -2
- package/dist/node_modules/@flakes/console/.output/public/assets/sandboxes-BBIIbVN8.js +0 -2
- package/dist/node_modules/@flakes/console/.output/public/assets/security-D3N68cBT.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/signin-DylILjyG.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/signin-form-DWaa_uwj.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/signup-KmFQL_1g.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/styles-8wEqfToJ.css +0 -2
- package/dist/node_modules/@flakes/console/.output/public/assets/table-DptQuuuq.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/user-DK27uFod.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/utils-CEE0-YEp.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/x-fKvnmCoQ.js +0 -1
- package/dist/node_modules/@flakes/console/.output/server/_ssr/documentation-Do_Mr_e4.mjs +0 -210
- package/dist/node_modules/@flakes/console/.output/server/_ssr/runs-BzfGldVd.mjs +0 -12
|
@@ -0,0 +1,589 @@
|
|
|
1
|
+
import { o as __toESM } from "../_runtime.mjs";
|
|
2
|
+
import { c as require_jsx_runtime } from "../_libs/@radix-ui/react-arrow+[...].mjs";
|
|
3
|
+
import { d as Link } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
4
|
+
import { u as require_react } from "../_libs/@floating-ui/react-dom+[...].mjs";
|
|
5
|
+
import { A as Inbox, B as Clock3, D as LoaderCircle, H as CircleDashed, M as Folder, P as FolderCog, Q as Archive, U as CircleCheck, V as CircleX, W as CircleAlert, d as Server, j as HardDrive } from "../_libs/lucide-react.mjs";
|
|
6
|
+
import { C as bindingValidationView, T as poolChoicesForBinding, a as useHosts, b as useUpsertHostProjectBinding, f as useRuns, h as useSetHostProjectWorkspaceRoot, i as useHostProjectBindings, o as useProjects, r as useHostPools, t as cn, w as hostProjectWorkspacePath } from "./utils.mjs";
|
|
7
|
+
import { t as Button } from "./button.mjs";
|
|
8
|
+
import { i as splitProjectsByStatus, r as projectMatchesRun } from "./project-navigation.mjs";
|
|
9
|
+
import { a as CardTitle, i as CardHeader, n as CardContent, t as Card } from "./card.mjs";
|
|
10
|
+
import { c as timeAgo, d as Skeleton, f as Badge, l as useClockTick } from "./bits.mjs";
|
|
11
|
+
//#region src/views/ProjectsPage.tsx
|
|
12
|
+
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
13
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
14
|
+
function ProjectsPage() {
|
|
15
|
+
const projects = useProjects();
|
|
16
|
+
const runs = useRuns();
|
|
17
|
+
const projectList = projects.data?.projects ?? [];
|
|
18
|
+
const loadedRuns = (runs.data?.pages ?? []).flatMap((page) => page.runs);
|
|
19
|
+
const { active, archived } = splitProjectsByStatus(projectList);
|
|
20
|
+
useClockTick(3e4);
|
|
21
|
+
if (projects.isPending && projects.data === void 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
|
|
22
|
+
className: "grid gap-5",
|
|
23
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeader, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProjectSkeleton, {})]
|
|
24
|
+
});
|
|
25
|
+
if (projects.isError && projects.data === void 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
|
|
26
|
+
className: "grid gap-5",
|
|
27
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeader, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
|
|
28
|
+
className: "py-10 text-center",
|
|
29
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardContent, {
|
|
30
|
+
className: "grid justify-items-center gap-2",
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CircleAlert, { className: "size-8 text-status-failed" }),
|
|
33
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
34
|
+
className: "font-medium",
|
|
35
|
+
children: "Cannot list projects"
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
38
|
+
className: "max-w-md text-sm text-muted-foreground",
|
|
39
|
+
children: String(projects.error)
|
|
40
|
+
})
|
|
41
|
+
]
|
|
42
|
+
})
|
|
43
|
+
})]
|
|
44
|
+
});
|
|
45
|
+
if (projectList.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
|
|
46
|
+
className: "grid gap-5",
|
|
47
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeader, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
|
|
48
|
+
className: "py-12 text-center",
|
|
49
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardContent, {
|
|
50
|
+
className: "grid justify-items-center gap-2",
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Inbox, { className: "size-8 text-muted-foreground" }),
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
54
|
+
className: "font-medium",
|
|
55
|
+
children: "No projects yet"
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
58
|
+
className: "text-sm text-muted-foreground",
|
|
59
|
+
children: "Create a project from the CLI or API and it will appear here."
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
})
|
|
63
|
+
})]
|
|
64
|
+
});
|
|
65
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
|
|
66
|
+
className: "grid gap-5",
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeader, {}),
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProjectSection, {
|
|
70
|
+
title: "Active projects",
|
|
71
|
+
projects: active,
|
|
72
|
+
runs: loadedRuns
|
|
73
|
+
}),
|
|
74
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProjectPlacementManager, { projects: active }),
|
|
75
|
+
archived.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProjectSection, {
|
|
76
|
+
title: "Archived projects",
|
|
77
|
+
projects: archived,
|
|
78
|
+
runs: loadedRuns,
|
|
79
|
+
archived: true
|
|
80
|
+
}) : null
|
|
81
|
+
]
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function ProjectPlacementManager(props) {
|
|
85
|
+
const hosts = useHosts();
|
|
86
|
+
const hostList = hosts.data?.hosts ?? [];
|
|
87
|
+
const [selectedHostId, setSelectedHostId] = (0, import_react.useState)(null);
|
|
88
|
+
const [selectedProjectKey, setSelectedProjectKey] = (0, import_react.useState)(null);
|
|
89
|
+
(0, import_react.useEffect)(() => {
|
|
90
|
+
const next = hostList.some((host) => host.hostId === selectedHostId) ? selectedHostId : hostList[0]?.hostId ?? null;
|
|
91
|
+
if (next !== selectedHostId) setSelectedHostId(next);
|
|
92
|
+
}, [hostList, selectedHostId]);
|
|
93
|
+
(0, import_react.useEffect)(() => {
|
|
94
|
+
const next = props.projects.some((project) => project.projectKey === selectedProjectKey) ? selectedProjectKey : props.projects[0]?.projectKey ?? null;
|
|
95
|
+
if (next !== selectedProjectKey) setSelectedProjectKey(next);
|
|
96
|
+
}, [props.projects, selectedProjectKey]);
|
|
97
|
+
if (props.projects.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
|
|
98
|
+
className: "border-dashed",
|
|
99
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardContent, {
|
|
100
|
+
className: "flex items-center gap-3 p-4 text-sm text-muted-foreground",
|
|
101
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FolderCog, { className: "size-4" }), "No active projects to place on hosts."]
|
|
102
|
+
})
|
|
103
|
+
});
|
|
104
|
+
if (hosts.isPending && hosts.data === void 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProjectPlacementSkeleton, {});
|
|
105
|
+
if (hosts.isError && hosts.data === void 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
|
|
106
|
+
className: "py-8 text-center",
|
|
107
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardContent, {
|
|
108
|
+
className: "grid justify-items-center gap-2",
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CircleAlert, { className: "size-8 text-status-failed" }),
|
|
111
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
112
|
+
className: "font-medium",
|
|
113
|
+
children: "Cannot list hosts"
|
|
114
|
+
}),
|
|
115
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
116
|
+
className: "max-w-md text-sm text-muted-foreground",
|
|
117
|
+
children: String(hosts.error)
|
|
118
|
+
})
|
|
119
|
+
]
|
|
120
|
+
})
|
|
121
|
+
});
|
|
122
|
+
if (hostList.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
|
|
123
|
+
className: "border-dashed py-8 text-center",
|
|
124
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardContent, {
|
|
125
|
+
className: "grid justify-items-center gap-2",
|
|
126
|
+
children: [
|
|
127
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Server, { className: "size-8 text-muted-foreground" }),
|
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
129
|
+
className: "font-medium",
|
|
130
|
+
children: "No hosts available"
|
|
131
|
+
}),
|
|
132
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
133
|
+
className: "max-w-md text-sm text-muted-foreground",
|
|
134
|
+
children: "Add a host before assigning project workspace roots or pool bindings."
|
|
135
|
+
})
|
|
136
|
+
]
|
|
137
|
+
})
|
|
138
|
+
});
|
|
139
|
+
const selectedHost = hostList.find((host) => host.hostId === selectedHostId) ?? hostList[0];
|
|
140
|
+
const selectedProject = props.projects.find((project) => project.projectKey === selectedProjectKey) ?? props.projects[0];
|
|
141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardHeader, {
|
|
142
|
+
className: "gap-4",
|
|
143
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
144
|
+
className: "flex min-w-0 items-start gap-3",
|
|
145
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
146
|
+
className: "mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-md border bg-background",
|
|
147
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FolderCog, { className: "size-4 text-muted-foreground" })
|
|
148
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
149
|
+
className: "min-w-0 flex-1",
|
|
150
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardTitle, {
|
|
151
|
+
className: "text-base",
|
|
152
|
+
children: "Host placement"
|
|
153
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
154
|
+
className: "mt-1 text-sm text-muted-foreground",
|
|
155
|
+
children: "Manage project workspace roots and host pool bindings."
|
|
156
|
+
})]
|
|
157
|
+
})]
|
|
158
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
159
|
+
className: "grid gap-3 md:grid-cols-2",
|
|
160
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
|
|
161
|
+
className: "grid gap-1.5 text-sm",
|
|
162
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
163
|
+
className: "console-callout",
|
|
164
|
+
children: "Host"
|
|
165
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("select", {
|
|
166
|
+
value: selectedHost?.hostId ?? "",
|
|
167
|
+
onChange: (event) => setSelectedHostId(event.target.value),
|
|
168
|
+
className: "h-9 min-w-0 rounded-md border bg-background px-2 text-sm",
|
|
169
|
+
children: hostList.map((host) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("option", {
|
|
170
|
+
value: host.hostId,
|
|
171
|
+
children: [
|
|
172
|
+
host.name,
|
|
173
|
+
" (",
|
|
174
|
+
host.hostId,
|
|
175
|
+
")"
|
|
176
|
+
]
|
|
177
|
+
}, host.hostId))
|
|
178
|
+
})]
|
|
179
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
|
|
180
|
+
className: "grid gap-1.5 text-sm",
|
|
181
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
182
|
+
className: "console-callout",
|
|
183
|
+
children: "Project"
|
|
184
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("select", {
|
|
185
|
+
value: selectedProject?.projectKey ?? "",
|
|
186
|
+
onChange: (event) => setSelectedProjectKey(event.target.value),
|
|
187
|
+
className: "h-9 min-w-0 rounded-md border bg-background px-2 text-sm",
|
|
188
|
+
children: props.projects.map((project) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("option", {
|
|
189
|
+
value: project.projectKey,
|
|
190
|
+
children: [
|
|
191
|
+
project.name,
|
|
192
|
+
" (",
|
|
193
|
+
project.projectKey,
|
|
194
|
+
")"
|
|
195
|
+
]
|
|
196
|
+
}, project.projectId))
|
|
197
|
+
})]
|
|
198
|
+
})]
|
|
199
|
+
})]
|
|
200
|
+
}), selectedHost && selectedProject ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HostProjectPlacementEditor, {
|
|
201
|
+
host: selectedHost,
|
|
202
|
+
project: selectedProject
|
|
203
|
+
}, `${selectedHost.hostId}:${selectedProject.projectKey}`) : null] });
|
|
204
|
+
}
|
|
205
|
+
function HostProjectPlacementEditor(props) {
|
|
206
|
+
const rootMutation = useSetHostProjectWorkspaceRoot();
|
|
207
|
+
const bindingMutation = useUpsertHostProjectBinding();
|
|
208
|
+
const pools = useHostPools(props.host.hostId);
|
|
209
|
+
const projectWorkspaceRoot = props.host.projectWorkspaceRoot;
|
|
210
|
+
const rootConfigured = typeof projectWorkspaceRoot === "string" && projectWorkspaceRoot.trim().length > 0;
|
|
211
|
+
const bindings = useHostProjectBindings(props.host.hostId, rootConfigured);
|
|
212
|
+
const bindingLoading = rootConfigured && bindings.isPending && bindings.data === void 0;
|
|
213
|
+
const binding = bindings.data?.bindings.find((entry) => entry.projectKey === props.project.projectKey);
|
|
214
|
+
const savedPoolKeySignature = (binding?.poolKeys ?? []).join("\0");
|
|
215
|
+
const [rootDraft, setRootDraft] = (0, import_react.useState)(projectWorkspaceRoot ?? "");
|
|
216
|
+
const [selectedPoolKeys, setSelectedPoolKeys] = (0, import_react.useState)([]);
|
|
217
|
+
(0, import_react.useEffect)(() => {
|
|
218
|
+
setRootDraft(projectWorkspaceRoot ?? "");
|
|
219
|
+
}, [projectWorkspaceRoot]);
|
|
220
|
+
(0, import_react.useEffect)(() => {
|
|
221
|
+
setSelectedPoolKeys(savedPoolKeySignature === "" ? [] : savedPoolKeySignature.split("\0"));
|
|
222
|
+
}, [savedPoolKeySignature]);
|
|
223
|
+
const poolList = pools.data?.hostPools ?? [];
|
|
224
|
+
const currentPoolKeys = new Set(poolList.map((pool) => pool.poolKey));
|
|
225
|
+
const selectedCurrentPoolKeys = selectedPoolKeys.filter((poolKey) => currentPoolKeys.has(poolKey));
|
|
226
|
+
const rootChanged = rootDraft !== (projectWorkspaceRoot ?? "");
|
|
227
|
+
const workspacePath = binding?.workspacePath ?? (rootConfigured ? hostProjectWorkspacePath(projectWorkspaceRoot, props.project.projectKey) : void 0);
|
|
228
|
+
function togglePool(poolKey) {
|
|
229
|
+
setSelectedPoolKeys((current) => current.includes(poolKey) ? current.filter((entry) => entry !== poolKey) : [...current, poolKey]);
|
|
230
|
+
}
|
|
231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardContent, {
|
|
232
|
+
className: "grid gap-4",
|
|
233
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("form", {
|
|
234
|
+
className: "grid gap-3 rounded-md border p-3",
|
|
235
|
+
onSubmit: (event) => {
|
|
236
|
+
event.preventDefault();
|
|
237
|
+
rootMutation.mutate({
|
|
238
|
+
hostId: props.host.hostId,
|
|
239
|
+
path: rootDraft
|
|
240
|
+
});
|
|
241
|
+
},
|
|
242
|
+
children: [
|
|
243
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
244
|
+
className: "flex min-w-0 flex-wrap items-center gap-3",
|
|
245
|
+
children: [
|
|
246
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(HardDrive, { className: "size-4 text-muted-foreground" }),
|
|
247
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
248
|
+
className: "min-w-0 flex-1",
|
|
249
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
|
|
250
|
+
className: "text-sm font-medium",
|
|
251
|
+
children: "Project workspace root"
|
|
252
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
253
|
+
className: "truncate font-mono text-xs text-muted-foreground",
|
|
254
|
+
children: props.host.hostId
|
|
255
|
+
})]
|
|
256
|
+
}),
|
|
257
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(HostStatusBadge, { host: props.host })
|
|
258
|
+
]
|
|
259
|
+
}),
|
|
260
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
261
|
+
className: "grid gap-2 md:grid-cols-[minmax(0,1fr)_auto]",
|
|
262
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
|
|
263
|
+
value: rootDraft,
|
|
264
|
+
onChange: (event) => setRootDraft(event.target.value),
|
|
265
|
+
placeholder: "/srv/flakes/projects",
|
|
266
|
+
className: "h-9 min-w-0 rounded-md border bg-background px-3 font-mono text-sm"
|
|
267
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button, {
|
|
268
|
+
type: "submit",
|
|
269
|
+
size: "sm",
|
|
270
|
+
disabled: rootMutation.isPending || rootDraft.trim().length === 0 || !rootChanged,
|
|
271
|
+
children: [rootMutation.isPending ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoaderCircle, { className: "size-4 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CircleCheck, { className: "size-4" }), "Save root"]
|
|
272
|
+
})]
|
|
273
|
+
}),
|
|
274
|
+
rootMutation.isError ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
|
|
275
|
+
className: "text-sm text-destructive",
|
|
276
|
+
children: ["Cannot save root: ", String(rootMutation.error)]
|
|
277
|
+
}) : null
|
|
278
|
+
]
|
|
279
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
280
|
+
className: "grid gap-3 rounded-md border p-3",
|
|
281
|
+
children: [
|
|
282
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
283
|
+
className: "flex min-w-0 flex-wrap items-center gap-3",
|
|
284
|
+
children: [
|
|
285
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FolderCog, { className: "size-4 text-muted-foreground" }),
|
|
286
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
287
|
+
className: "min-w-0 flex-1",
|
|
288
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
|
|
289
|
+
className: "text-sm font-medium",
|
|
290
|
+
children: "Project host binding"
|
|
291
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
292
|
+
className: "truncate font-mono text-xs text-muted-foreground",
|
|
293
|
+
children: props.project.projectKey
|
|
294
|
+
})]
|
|
295
|
+
}),
|
|
296
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BindingValidationBadge, {
|
|
297
|
+
binding,
|
|
298
|
+
loading: bindingLoading
|
|
299
|
+
})
|
|
300
|
+
]
|
|
301
|
+
}),
|
|
302
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ReadOnlyField, {
|
|
303
|
+
label: "Workspace path",
|
|
304
|
+
value: workspacePath ?? "Root required",
|
|
305
|
+
muted: workspacePath === void 0
|
|
306
|
+
}),
|
|
307
|
+
!rootConfigured ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InlineState, {
|
|
308
|
+
icon: HardDrive,
|
|
309
|
+
title: "Workspace root required",
|
|
310
|
+
detail: "Set a host project workspace root before creating bindings."
|
|
311
|
+
}) : pools.isPending && pools.data === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PoolSkeleton, {}) : pools.isError && pools.data === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InlineState, {
|
|
312
|
+
icon: CircleAlert,
|
|
313
|
+
title: "Cannot list pools",
|
|
314
|
+
detail: String(pools.error),
|
|
315
|
+
tone: "error"
|
|
316
|
+
}) : poolList.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InlineState, {
|
|
317
|
+
icon: Server,
|
|
318
|
+
title: "No host pools",
|
|
319
|
+
detail: "This host has not reported any pool keys."
|
|
320
|
+
}) : bindingLoading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BindingLoadingState, {}) : bindings.isError && bindings.data === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InlineState, {
|
|
321
|
+
icon: CircleAlert,
|
|
322
|
+
title: "Cannot list bindings",
|
|
323
|
+
detail: String(bindings.error),
|
|
324
|
+
tone: "error"
|
|
325
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("form", {
|
|
326
|
+
className: "grid gap-3",
|
|
327
|
+
onSubmit: (event) => {
|
|
328
|
+
event.preventDefault();
|
|
329
|
+
bindingMutation.mutate({
|
|
330
|
+
hostId: props.host.hostId,
|
|
331
|
+
projectKey: props.project.projectKey,
|
|
332
|
+
poolKeys: selectedCurrentPoolKeys
|
|
333
|
+
});
|
|
334
|
+
},
|
|
335
|
+
children: [
|
|
336
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PoolChoiceList, {
|
|
337
|
+
pools: poolList,
|
|
338
|
+
binding: { poolKeys: selectedPoolKeys },
|
|
339
|
+
onToggle: togglePool
|
|
340
|
+
}),
|
|
341
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
342
|
+
className: "flex min-w-0 flex-wrap items-center gap-3",
|
|
343
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button, {
|
|
344
|
+
type: "submit",
|
|
345
|
+
size: "sm",
|
|
346
|
+
disabled: bindingMutation.isPending || selectedCurrentPoolKeys.length === 0,
|
|
347
|
+
children: [bindingMutation.isPending ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoaderCircle, { className: "size-4 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CircleCheck, { className: "size-4" }), "Save binding"]
|
|
348
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
|
|
349
|
+
className: "min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",
|
|
350
|
+
children: [
|
|
351
|
+
selectedCurrentPoolKeys.length,
|
|
352
|
+
" selected pool",
|
|
353
|
+
selectedCurrentPoolKeys.length === 1 ? "" : "s"
|
|
354
|
+
]
|
|
355
|
+
})]
|
|
356
|
+
}),
|
|
357
|
+
bindingMutation.isError ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
|
|
358
|
+
className: "text-sm text-destructive",
|
|
359
|
+
children: ["Cannot save binding: ", String(bindingMutation.error)]
|
|
360
|
+
}) : null
|
|
361
|
+
]
|
|
362
|
+
})
|
|
363
|
+
]
|
|
364
|
+
})]
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
function HostStatusBadge(props) {
|
|
368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Badge, {
|
|
369
|
+
variant: "outline",
|
|
370
|
+
className: "gap-1.5 font-mono text-[11px]",
|
|
371
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: cn("size-1.5 rounded-full", props.host.status === "online" ? "bg-status-succeeded" : props.host.status === "disabled" ? "bg-status-failed" : "bg-status-idle") }), props.host.status.toUpperCase()]
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
function BindingValidationBadge(props) {
|
|
375
|
+
if (props.loading === true) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Badge, {
|
|
376
|
+
variant: "outline",
|
|
377
|
+
className: "gap-1.5 font-mono text-[11px] uppercase tracking-[0.08em] text-status-warn",
|
|
378
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoaderCircle, { className: "size-3.5 animate-spin" }), "Loading binding"]
|
|
379
|
+
});
|
|
380
|
+
const view = bindingValidationView(props.binding);
|
|
381
|
+
const Icon = validationIcon(view.tone);
|
|
382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Badge, {
|
|
383
|
+
variant: "outline",
|
|
384
|
+
className: cn("gap-1.5 font-mono text-[11px] uppercase tracking-[0.08em]", validationToneClass(view.tone)),
|
|
385
|
+
title: view.detail,
|
|
386
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: "size-3.5" }), view.label]
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
function BindingLoadingState() {
|
|
390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
391
|
+
className: "flex min-w-0 items-start gap-3 rounded-md border border-dashed p-3",
|
|
392
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoaderCircle, { className: "mt-0.5 size-4 shrink-0 animate-spin text-status-warn" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
393
|
+
className: "min-w-0",
|
|
394
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
395
|
+
className: "text-sm font-medium",
|
|
396
|
+
children: "Loading bindings"
|
|
397
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
398
|
+
className: "mt-1 text-sm text-muted-foreground",
|
|
399
|
+
children: "Loading current host project bindings before edits are enabled."
|
|
400
|
+
})]
|
|
401
|
+
})]
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
function PoolChoiceList(props) {
|
|
405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
406
|
+
className: "grid gap-2 sm:grid-cols-2",
|
|
407
|
+
children: poolChoicesForBinding(props.pools, props.binding).map((choice) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
|
|
408
|
+
className: cn("flex min-w-0 items-center gap-3 rounded-md border p-3 text-sm transition-colors", choice.selected ? "bg-secondary/70" : "hover:bg-secondary/40"),
|
|
409
|
+
children: [
|
|
410
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
|
|
411
|
+
type: "checkbox",
|
|
412
|
+
checked: choice.selected,
|
|
413
|
+
onChange: () => props.onToggle(choice.poolKey),
|
|
414
|
+
className: "size-4 shrink-0 accent-primary"
|
|
415
|
+
}),
|
|
416
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
417
|
+
className: "min-w-0 flex-1 truncate font-mono text-xs",
|
|
418
|
+
children: choice.poolKey
|
|
419
|
+
}),
|
|
420
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Badge, {
|
|
421
|
+
variant: "outline",
|
|
422
|
+
className: "font-mono text-[10px]",
|
|
423
|
+
children: choice.statusLabel
|
|
424
|
+
})
|
|
425
|
+
]
|
|
426
|
+
}, choice.poolKey))
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
function ReadOnlyField(props) {
|
|
430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
|
|
431
|
+
className: "grid gap-1.5 text-sm",
|
|
432
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
433
|
+
className: "console-callout",
|
|
434
|
+
children: props.label
|
|
435
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
|
|
436
|
+
readOnly: true,
|
|
437
|
+
value: props.value,
|
|
438
|
+
className: cn("h-9 min-w-0 rounded-md border bg-muted px-3 font-mono text-sm", props.muted && "text-muted-foreground")
|
|
439
|
+
})]
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
function InlineState(props) {
|
|
443
|
+
const Icon = props.icon;
|
|
444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
445
|
+
className: "flex min-w-0 items-start gap-3 rounded-md border border-dashed p-3",
|
|
446
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: cn("mt-0.5 size-4 shrink-0", props.tone === "error" ? "text-status-failed" : "text-muted-foreground") }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
447
|
+
className: "min-w-0",
|
|
448
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
449
|
+
className: "text-sm font-medium",
|
|
450
|
+
children: props.title
|
|
451
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
452
|
+
className: "mt-1 text-sm text-muted-foreground",
|
|
453
|
+
children: props.detail
|
|
454
|
+
})]
|
|
455
|
+
})]
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
function ProjectPlacementSkeleton() {
|
|
459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardHeader, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-5 w-40" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-4 w-80 max-w-full" })] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardContent, {
|
|
460
|
+
className: "grid gap-3",
|
|
461
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-24 w-full" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-36 w-full" })]
|
|
462
|
+
})] });
|
|
463
|
+
}
|
|
464
|
+
function PoolSkeleton() {
|
|
465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
466
|
+
className: "grid gap-2 sm:grid-cols-2",
|
|
467
|
+
children: [0, 1].map((index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-12 w-full" }, index))
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
function validationIcon(tone) {
|
|
471
|
+
switch (tone) {
|
|
472
|
+
case "available": return CircleCheck;
|
|
473
|
+
case "unavailable": return CircleX;
|
|
474
|
+
case "pending": return Clock3;
|
|
475
|
+
case "idle": return CircleDashed;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
function validationToneClass(tone) {
|
|
479
|
+
switch (tone) {
|
|
480
|
+
case "available": return "text-status-succeeded";
|
|
481
|
+
case "unavailable": return "text-status-failed";
|
|
482
|
+
case "pending": return "text-status-warn";
|
|
483
|
+
case "idle": return "text-muted-foreground";
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
function PageHeader() {
|
|
487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
|
|
488
|
+
className: "text-lg font-semibold tracking-tight",
|
|
489
|
+
children: "Projects"
|
|
490
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
491
|
+
className: "text-sm text-muted-foreground",
|
|
492
|
+
children: "Project-scoped run history for this account."
|
|
493
|
+
})] });
|
|
494
|
+
}
|
|
495
|
+
function ProjectSection(props) {
|
|
496
|
+
if (props.projects.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
|
|
497
|
+
className: "py-8 text-center",
|
|
498
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardContent, {
|
|
499
|
+
className: "text-sm text-muted-foreground",
|
|
500
|
+
children: "No active projects."
|
|
501
|
+
})
|
|
502
|
+
});
|
|
503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
504
|
+
className: "grid gap-2",
|
|
505
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
|
|
506
|
+
className: "console-callout",
|
|
507
|
+
children: props.title
|
|
508
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
509
|
+
className: "grid gap-3 md:grid-cols-2",
|
|
510
|
+
children: props.projects.map((project) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProjectCard, {
|
|
511
|
+
project,
|
|
512
|
+
runCount: countProjectRuns(project, props.runs),
|
|
513
|
+
archived: props.archived === true
|
|
514
|
+
}, project.projectId))
|
|
515
|
+
})]
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
function ProjectCard(props) {
|
|
519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, {
|
|
520
|
+
className: props.archived ? "border-dashed opacity-80" : void 0,
|
|
521
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardHeader, {
|
|
522
|
+
className: "gap-3",
|
|
523
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
524
|
+
className: "flex min-w-0 items-start gap-3",
|
|
525
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
526
|
+
className: "mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-md border bg-background",
|
|
527
|
+
children: props.archived ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Archive, { className: "size-4 text-muted-foreground" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Folder, { className: "size-4 text-muted-foreground" })
|
|
528
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
529
|
+
className: "min-w-0 flex-1",
|
|
530
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
531
|
+
className: "flex min-w-0 flex-wrap items-center gap-2",
|
|
532
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardTitle, {
|
|
533
|
+
className: "truncate text-base",
|
|
534
|
+
children: props.project.name
|
|
535
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Badge, {
|
|
536
|
+
variant: props.archived ? "outline" : "secondary",
|
|
537
|
+
children: props.project.status
|
|
538
|
+
})]
|
|
539
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
540
|
+
className: "mt-1 font-mono text-xs text-muted-foreground",
|
|
541
|
+
children: props.project.projectKey
|
|
542
|
+
})]
|
|
543
|
+
})]
|
|
544
|
+
})
|
|
545
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardContent, {
|
|
546
|
+
className: "flex flex-wrap items-center gap-3",
|
|
547
|
+
children: [
|
|
548
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
549
|
+
className: "font-mono text-xs text-muted-foreground",
|
|
550
|
+
"data-num": true,
|
|
551
|
+
children: [props.runCount, " loaded runs"]
|
|
552
|
+
}),
|
|
553
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
554
|
+
className: "font-mono text-xs text-muted-foreground",
|
|
555
|
+
title: props.project.updatedAt,
|
|
556
|
+
"data-num": true,
|
|
557
|
+
children: ["Updated ", timeAgo(props.project.updatedAt)]
|
|
558
|
+
}),
|
|
559
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
560
|
+
asChild: true,
|
|
561
|
+
size: "sm",
|
|
562
|
+
variant: "outline",
|
|
563
|
+
className: "ml-auto",
|
|
564
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
|
|
565
|
+
to: "/runs",
|
|
566
|
+
search: { project: props.project.projectKey },
|
|
567
|
+
children: "Runs"
|
|
568
|
+
})
|
|
569
|
+
})
|
|
570
|
+
]
|
|
571
|
+
})]
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
function ProjectSkeleton() {
|
|
575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
576
|
+
className: "grid gap-3 md:grid-cols-2",
|
|
577
|
+
children: [
|
|
578
|
+
0,
|
|
579
|
+
1,
|
|
580
|
+
2,
|
|
581
|
+
3
|
|
582
|
+
].map((index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardHeader, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-5 w-40" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-4 w-24" })] }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-8 w-full" }) })] }, index))
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
function countProjectRuns(project, runs) {
|
|
586
|
+
return runs.filter((run) => projectMatchesRun(project, run)).length;
|
|
587
|
+
}
|
|
588
|
+
//#endregion
|
|
589
|
+
export { ProjectsPage };
|
|
@@ -4,9 +4,10 @@ import { f as useNavigate } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
|
4
4
|
import { l as require_react_dom, u as require_react } from "../_libs/@floating-ui/react-dom+[...].mjs";
|
|
5
5
|
import { t as cva } from "../_libs/class-variance-authority+clsx.mjs";
|
|
6
6
|
import { i as Trigger, n as List, r as Root2, t as Content } from "../_libs/radix-ui__react-tabs.mjs";
|
|
7
|
-
import { D as LoaderCircle, E as Lock, F as
|
|
8
|
-
import {
|
|
7
|
+
import { D as LoaderCircle, E as Lock, F as FileText, L as Expand, R as Download, S as Maximize2, n as ZoomIn, r as X, s as Trash2, t as ZoomOut, z as Clock } from "../_libs/lucide-react.mjs";
|
|
8
|
+
import { S as downloadFile, c as useRunArtifacts, d as useRunTasks, l as useRunFileReservations, n as useDeleteRun, o as useProjects, s as useRun, t as cn, u as useRunMetrics } from "./utils.mjs";
|
|
9
9
|
import { t as Button } from "./button.mjs";
|
|
10
|
+
import { n as projectLabelForRun } from "./project-navigation.mjs";
|
|
10
11
|
import { n as CardContent, t as Card } from "./card.mjs";
|
|
11
12
|
import { a as taskDisplayName, c as timeAgo, d as Skeleton, f as Badge, i as hashDelay, l as useClockTick, n as StatusBar, o as taskOrdinals, r as fmtTime, t as StateBadge, u as useFlash } from "./bits.mjs";
|
|
12
13
|
import { a as TableHeader, i as TableHead, n as TableBody, o as TableRow, r as TableCell, t as Table } from "./table.mjs";
|
|
@@ -1165,6 +1166,7 @@ function runElapsed(run) {
|
|
|
1165
1166
|
}
|
|
1166
1167
|
function RunPage(props) {
|
|
1167
1168
|
const run = useRun(props.runId);
|
|
1169
|
+
const projects = useProjects();
|
|
1168
1170
|
const tasks = useRunTasks(props.runId);
|
|
1169
1171
|
const artifacts = useRunArtifacts(props.runId);
|
|
1170
1172
|
const metrics = useRunMetrics(props.runId);
|
|
@@ -1192,6 +1194,7 @@ function RunPage(props) {
|
|
|
1192
1194
|
const terminalTasks = terminalTaskStatuses.reduce((sum, status) => sum + (counts[status] ?? 0), 0);
|
|
1193
1195
|
const terminalFlash = useFlash(terminalTasks);
|
|
1194
1196
|
const elapsed = runElapsed(run.data);
|
|
1197
|
+
const projectLabel = run.data === void 0 ? void 0 : projectLabelForRun(projects.data?.projects ?? [], run.data);
|
|
1195
1198
|
const canvasShown = canvasChoice ?? taskList.length <= MAP_AUTO_COLLAPSE_TASKS;
|
|
1196
1199
|
const canDeleteRun = run.data !== void 0 && terminalRunStates.has(run.data.state);
|
|
1197
1200
|
async function deleteThisRun() {
|
|
@@ -1265,10 +1268,14 @@ function RunPage(props) {
|
|
|
1265
1268
|
}),
|
|
1266
1269
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
|
|
1267
1270
|
className: "font-mono text-xs text-muted-foreground",
|
|
1268
|
-
children: [
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1271
|
+
children: [
|
|
1272
|
+
props.runId,
|
|
1273
|
+
projectLabel !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [" · ", projectLabel] }) : null,
|
|
1274
|
+
run.data ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [" · created ", /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
1275
|
+
title: run.data.createdAt,
|
|
1276
|
+
children: timeAgo(run.data.createdAt)
|
|
1277
|
+
})] }) : null
|
|
1278
|
+
]
|
|
1272
1279
|
}),
|
|
1273
1280
|
deleteError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
1274
1281
|
className: "text-xs text-destructive",
|