@samyx/preview-stacks-ui 0.30.0 → 0.32.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.
Files changed (164) hide show
  1. package/dist/assets/ActionButton.vue_vue_type_script_setup_true_lang-D8Xlp6c9.js +2 -0
  2. package/dist/assets/{ActionButton.vue_vue_type_script_setup_true_lang-CxT4O7XN.js.map → ActionButton.vue_vue_type_script_setup_true_lang-D8Xlp6c9.js.map} +1 -1
  3. package/dist/assets/{AxesTab-BJZ9B5js.js → AxesTab-BWzsbFAx.js} +2 -2
  4. package/dist/assets/{AxesTab-BJZ9B5js.js.map → AxesTab-BWzsbFAx.js.map} +1 -1
  5. package/dist/assets/ConfigTab-ucr87rD6.js +2 -0
  6. package/dist/assets/{ConfigTab-CKjpaZmg.js.map → ConfigTab-ucr87rD6.js.map} +1 -1
  7. package/dist/assets/ConfigView-BbRYGyvZ.js +2 -0
  8. package/dist/assets/ConfigView-BbRYGyvZ.js.map +1 -0
  9. package/dist/assets/ConflictNote.vue_vue_type_script_setup_true_lang-DDt6qe65.js +2 -0
  10. package/dist/assets/ConflictNote.vue_vue_type_script_setup_true_lang-DDt6qe65.js.map +1 -0
  11. package/dist/assets/DangerTab-BimKNJab.js +2 -0
  12. package/dist/assets/DangerTab-BimKNJab.js.map +1 -0
  13. package/dist/assets/DashboardView-DK0qDo-f.js +2 -0
  14. package/dist/assets/{DashboardView-DqIE-Aof.js.map → DashboardView-DK0qDo-f.js.map} +1 -1
  15. package/dist/assets/DeploymentDetailView-BcImKApM.js +2 -0
  16. package/dist/assets/{DeploymentDetailView-nFBQCzq0.js.map → DeploymentDetailView-BcImKApM.js.map} +1 -1
  17. package/dist/assets/DeploymentsView-Cx9BqQ8Q.js +2 -0
  18. package/dist/assets/DeploymentsView-Cx9BqQ8Q.js.map +1 -0
  19. package/dist/assets/DialogTrigger-nWkfUj3N.js +2 -0
  20. package/dist/assets/DialogTrigger-nWkfUj3N.js.map +1 -0
  21. package/dist/assets/{EquivalentCommand-BjlPIrt9.js → EquivalentCommand-D92xDU0_.js} +3 -3
  22. package/dist/assets/{EquivalentCommand-BjlPIrt9.js.map → EquivalentCommand-D92xDU0_.js.map} +1 -1
  23. package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-B5-EJpIO.js → ErrorNote.vue_vue_type_script_setup_true_lang-DVbGiVTB.js} +2 -2
  24. package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-B5-EJpIO.js.map → ErrorNote.vue_vue_type_script_setup_true_lang-DVbGiVTB.js.map} +1 -1
  25. package/dist/assets/HelpModal.vue_vue_type_script_setup_true_lang-CSOdBT2E.js +2 -0
  26. package/dist/assets/HelpModal.vue_vue_type_script_setup_true_lang-CSOdBT2E.js.map +1 -0
  27. package/dist/assets/JobDetailView-B1sXXVJ5.js +2 -0
  28. package/dist/assets/JobDetailView-B1sXXVJ5.js.map +1 -0
  29. package/dist/assets/JobsView-CC7lre3Q.css +1 -0
  30. package/dist/assets/JobsView-DjP5lXHk.js +2 -0
  31. package/dist/assets/JobsView-DjP5lXHk.js.map +1 -0
  32. package/dist/assets/LogViewer.vue_vue_type_script_setup_true_lang-Bhy_5cyC.js +3 -0
  33. package/dist/assets/{LogViewer.vue_vue_type_script_setup_true_lang-BNqCyGeQ.js.map → LogViewer.vue_vue_type_script_setup_true_lang-Bhy_5cyC.js.map} +1 -1
  34. package/dist/assets/LoginView-C90w1dZ2.css +1 -0
  35. package/dist/assets/LoginView-CIkI9Qm_.js +2 -0
  36. package/dist/assets/LoginView-CIkI9Qm_.js.map +1 -0
  37. package/dist/assets/LogsTab-D8zhR7Eb.js +6 -0
  38. package/dist/assets/{LogsTab-CKNkR_07.js.map → LogsTab-D8zhR7Eb.js.map} +1 -1
  39. package/dist/assets/{NotFoundView-B3377DMC.js → NotFoundView-aUtqh2Qi.js} +2 -2
  40. package/dist/assets/{NotFoundView-B3377DMC.js.map → NotFoundView-aUtqh2Qi.js.map} +1 -1
  41. package/dist/assets/NotifiersView-aRHInxVx.js +2 -0
  42. package/dist/assets/{NotifiersView-BrPpuf5o.js.map → NotifiersView-aRHInxVx.js.map} +1 -1
  43. package/dist/assets/OverviewTab-ChCj5LAj.js +2 -0
  44. package/dist/assets/{OverviewTab-DY-d5Ia3.js.map → OverviewTab-ChCj5LAj.js.map} +1 -1
  45. package/dist/assets/PublicLogsView-DIWJH7qL.js +4 -0
  46. package/dist/assets/{PublicLogsView-HBPDlV47.js.map → PublicLogsView-DIWJH7qL.js.map} +1 -1
  47. package/dist/assets/{RefreshButton.vue_vue_type_script_setup_true_lang-C7qymrfD.js → RefreshButton.vue_vue_type_script_setup_true_lang-P7VwWcRa.js} +2 -2
  48. package/dist/assets/{RefreshButton.vue_vue_type_script_setup_true_lang-C7qymrfD.js.map → RefreshButton.vue_vue_type_script_setup_true_lang-P7VwWcRa.js.map} +1 -1
  49. package/dist/assets/RegistriesView-D2aCsYIu.js +2 -0
  50. package/dist/assets/{RegistriesView-B0XRfL2L.js.map → RegistriesView-D2aCsYIu.js.map} +1 -1
  51. package/dist/assets/RelativeTime.vue_vue_type_script_setup_true_lang-NGvUfuKC.js +2 -0
  52. package/dist/assets/RelativeTime.vue_vue_type_script_setup_true_lang-NGvUfuKC.js.map +1 -0
  53. package/dist/assets/{RequiresTab-CwaFcz5T.js → RequiresTab-3BhU5BHd.js} +2 -2
  54. package/dist/assets/{RequiresTab-CwaFcz5T.js.map → RequiresTab-3BhU5BHd.js.map} +1 -1
  55. package/dist/assets/RouteTarget.vue_vue_type_script_setup_true_lang-Caee0wEB.js +2 -0
  56. package/dist/assets/RouteTarget.vue_vue_type_script_setup_true_lang-Caee0wEB.js.map +1 -0
  57. package/dist/assets/RoutingView-T9afX8_M.js +9 -0
  58. package/dist/assets/RoutingView-T9afX8_M.js.map +1 -0
  59. package/dist/assets/RoutingView-tn0RQdqM.css +0 -0
  60. package/dist/assets/RuntimeTab-Bh2gGuhj.js +2 -0
  61. package/dist/assets/RuntimeTab-Bh2gGuhj.js.map +1 -0
  62. package/dist/assets/RuntimeTab-By55qdsQ.css +1 -0
  63. package/dist/assets/SelectMenu.vue_vue_type_script_setup_true_lang-BtHqT6G1.js +2 -0
  64. package/dist/assets/{SelectMenu.vue_vue_type_script_setup_true_lang-VAye0ofl.js.map → SelectMenu.vue_vue_type_script_setup_true_lang-BtHqT6G1.js.map} +1 -1
  65. package/dist/assets/{SettingsView-cuiExi3-.js → SettingsView-DIKjdBdy.js} +2 -2
  66. package/dist/assets/{SettingsView-cuiExi3-.js.map → SettingsView-DIKjdBdy.js.map} +1 -1
  67. package/dist/assets/SkeletonList.vue_vue_type_script_setup_true_lang-BmeRGmxf.js +2 -0
  68. package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-DMdwApyt.js.map → SkeletonList.vue_vue_type_script_setup_true_lang-BmeRGmxf.js.map} +1 -1
  69. package/dist/assets/SpecDetailView-Bd4Hx-bI.js +2 -0
  70. package/dist/assets/{SpecDetailView-Da_PDlft.js.map → SpecDetailView-Bd4Hx-bI.js.map} +1 -1
  71. package/dist/assets/SpecsView-B9qQPzkG.js +2 -0
  72. package/dist/assets/{SpecsView-CQHYfu01.js.map → SpecsView-B9qQPzkG.js.map} +1 -1
  73. package/dist/assets/SsoMark.vue_vue_type_script_setup_true_lang-BBiCq_4w.js +2 -0
  74. package/dist/assets/SsoMark.vue_vue_type_script_setup_true_lang-BBiCq_4w.js.map +1 -0
  75. package/dist/assets/SsoView-CltdTdwt.js +2 -0
  76. package/dist/assets/SsoView-CltdTdwt.js.map +1 -0
  77. package/dist/assets/SsoView-JmlPQGWM.css +1 -0
  78. package/dist/assets/StateBadge.vue_vue_type_script_setup_true_lang-nD6Zdx0q.js +2 -0
  79. package/dist/assets/StateBadge.vue_vue_type_script_setup_true_lang-nD6Zdx0q.js.map +1 -0
  80. package/dist/assets/{SubmitView-DsR4Rud8.js → SubmitView-D-jg5Wxy.js} +5 -5
  81. package/dist/assets/{SubmitView-DsR4Rud8.js.map → SubmitView-D-jg5Wxy.js.map} +1 -1
  82. package/dist/assets/SwarmView-CqFndUrV.js +2 -0
  83. package/dist/assets/{SwarmView-B-ESSXnj.js.map → SwarmView-CqFndUrV.js.map} +1 -1
  84. package/dist/assets/Teleport-I0XiM19H.js +4 -0
  85. package/dist/assets/{Teleport-DTF2H_ia.js.map → Teleport-I0XiM19H.js.map} +1 -1
  86. package/dist/assets/TerminalTab-Dleba0ru.js +3 -0
  87. package/dist/assets/{TerminalTab-BboWRxwq.js.map → TerminalTab-Dleba0ru.js.map} +1 -1
  88. package/dist/assets/UsersView-Bd8B9pLD.css +1 -0
  89. package/dist/assets/UsersView-BrZbuuOg.js +2 -0
  90. package/dist/assets/UsersView-BrZbuuOg.js.map +1 -0
  91. package/dist/assets/VarEditor.vue_vue_type_script_setup_true_lang-uPHU_Ugp.js +2 -0
  92. package/dist/assets/VarEditor.vue_vue_type_script_setup_true_lang-uPHU_Ugp.js.map +1 -0
  93. package/dist/assets/VarIO-BVE8A4Ur.css +1 -0
  94. package/dist/assets/VarIO-BldCQ6Xx.js +15 -0
  95. package/dist/assets/VarIO-BldCQ6Xx.js.map +1 -0
  96. package/dist/assets/VariablesView-CQp0T7Q6.js +3 -0
  97. package/dist/assets/VariablesView-CQp0T7Q6.js.map +1 -0
  98. package/dist/assets/VariablesView-Ck3IyRCN.css +1 -0
  99. package/dist/assets/index-B1ONXQzZ.css +1 -0
  100. package/dist/assets/index-Cqe_7QZw.js +154 -0
  101. package/dist/assets/index-Cqe_7QZw.js.map +1 -0
  102. package/dist/assets/useDeployment-BDbkdxpo.js +2 -0
  103. package/dist/assets/{useDeployment-BDHMCIYu.js.map → useDeployment-BDbkdxpo.js.map} +1 -1
  104. package/dist/assets/useJobQueue-D5JkRJNX.js +2 -0
  105. package/dist/assets/useJobQueue-D5JkRJNX.js.map +1 -0
  106. package/dist/index.html +2 -2
  107. package/package.json +2 -1
  108. package/dist/assets/ActionButton.vue_vue_type_script_setup_true_lang-CxT4O7XN.js +0 -2
  109. package/dist/assets/ConfigTab-CKjpaZmg.js +0 -2
  110. package/dist/assets/ConflictNote.vue_vue_type_script_setup_true_lang-cZYd7gRK.js +0 -2
  111. package/dist/assets/ConflictNote.vue_vue_type_script_setup_true_lang-cZYd7gRK.js.map +0 -1
  112. package/dist/assets/DangerTab-XshYLxAZ.js +0 -2
  113. package/dist/assets/DangerTab-XshYLxAZ.js.map +0 -1
  114. package/dist/assets/DashboardView-DqIE-Aof.js +0 -2
  115. package/dist/assets/DeploymentDetailView-nFBQCzq0.js +0 -2
  116. package/dist/assets/DeploymentsView-CalAGK0U.js +0 -2
  117. package/dist/assets/DeploymentsView-CalAGK0U.js.map +0 -1
  118. package/dist/assets/HelpModal.vue_vue_type_script_setup_true_lang-DWDQ-wIa.js +0 -2
  119. package/dist/assets/HelpModal.vue_vue_type_script_setup_true_lang-DWDQ-wIa.js.map +0 -1
  120. package/dist/assets/JobDetailView-BExTkW8o.js +0 -2
  121. package/dist/assets/JobDetailView-BExTkW8o.js.map +0 -1
  122. package/dist/assets/JobsView-h0PuFN8o.js +0 -2
  123. package/dist/assets/JobsView-h0PuFN8o.js.map +0 -1
  124. package/dist/assets/LogViewer.vue_vue_type_script_setup_true_lang-BNqCyGeQ.js +0 -3
  125. package/dist/assets/LoginView-CSY6YIsK.js +0 -2
  126. package/dist/assets/LoginView-CSY6YIsK.js.map +0 -1
  127. package/dist/assets/LoginView-Djedwklv.css +0 -1
  128. package/dist/assets/LogsTab-CKNkR_07.js +0 -6
  129. package/dist/assets/NotifiersView-BrPpuf5o.js +0 -2
  130. package/dist/assets/OverviewTab-DY-d5Ia3.js +0 -2
  131. package/dist/assets/PublicLogsView-HBPDlV47.js +0 -4
  132. package/dist/assets/RegistriesView-B0XRfL2L.js +0 -2
  133. package/dist/assets/RelativeTime.vue_vue_type_script_setup_true_lang-BoNYQAdk.js +0 -2
  134. package/dist/assets/RelativeTime.vue_vue_type_script_setup_true_lang-BoNYQAdk.js.map +0 -1
  135. package/dist/assets/RoutingView-D-qgRSDy.js +0 -9
  136. package/dist/assets/RoutingView-D-qgRSDy.js.map +0 -1
  137. package/dist/assets/RuntimeTab-7GuemvVX.js +0 -2
  138. package/dist/assets/RuntimeTab-7GuemvVX.js.map +0 -1
  139. package/dist/assets/RuntimeTab-RB6kjod2.css +0 -1
  140. package/dist/assets/SelectMenu.vue_vue_type_script_setup_true_lang-VAye0ofl.js +0 -2
  141. package/dist/assets/SkeletonList.vue_vue_type_script_setup_true_lang-DMdwApyt.js +0 -2
  142. package/dist/assets/SpecDetailView-Da_PDlft.js +0 -2
  143. package/dist/assets/SpecsView-CQHYfu01.js +0 -2
  144. package/dist/assets/SsoView-5Kk12W1K.js +0 -2
  145. package/dist/assets/SsoView-5Kk12W1K.js.map +0 -1
  146. package/dist/assets/StateBadge.vue_vue_type_script_setup_true_lang-m8_cteEx.js +0 -2
  147. package/dist/assets/StateBadge.vue_vue_type_script_setup_true_lang-m8_cteEx.js.map +0 -1
  148. package/dist/assets/SwarmView-B-ESSXnj.js +0 -2
  149. package/dist/assets/Teleport-DTF2H_ia.js +0 -4
  150. package/dist/assets/TerminalTab-BboWRxwq.js +0 -3
  151. package/dist/assets/UsersView-BBn3F_YM.js +0 -2
  152. package/dist/assets/UsersView-BBn3F_YM.js.map +0 -1
  153. package/dist/assets/UsersView-Be77zCYE.css +0 -1
  154. package/dist/assets/VarEditor.vue_vue_type_script_setup_true_lang-D7QFvEED.js +0 -2
  155. package/dist/assets/VarEditor.vue_vue_type_script_setup_true_lang-D7QFvEED.js.map +0 -1
  156. package/dist/assets/VariablesView-BAajBPNO.js +0 -2
  157. package/dist/assets/VariablesView-BAajBPNO.js.map +0 -1
  158. package/dist/assets/VariablesView-ByeOvDGJ.css +0 -1
  159. package/dist/assets/index-BXPaPWhH.js +0 -149
  160. package/dist/assets/index-BXPaPWhH.js.map +0 -1
  161. package/dist/assets/index-B_k9b7xG.css +0 -1
  162. package/dist/assets/useDeployment-BDHMCIYu.js +0 -2
  163. package/dist/assets/useFormat-DIlTY5Dl.js +0 -2
  164. package/dist/assets/useFormat-DIlTY5Dl.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ import{a0 as l,k as i,p as n,C as d,V as p,a1 as u}from"./index-Cqe_7QZw.js";import{w as c,r as y}from"./useVars-VN9gYdR6.js";const e=l({id:"",detail:null,error:"",loading:!1,vars:[]}),f=i(()=>p(e.vars)),k=i(()=>u(e.id)),h=i(()=>{var a;return((a=e.detail)==null?void 0:a.kind)==="shared"}),b=i(()=>{var a;return(((a=e.detail)==null?void 0:a.axes)??[]).filter(s=>!s.verifiable).map(s=>s.name)});async function t(){const a=e.id;e.loading=!0;const s=await n.get(`/api/deployments/${encodeURIComponent(a)}${f.value}`);if(e.id!==a)return;if(e.loading=!1,!s.ok){e.detail=null,e.error=d(s,`GET /api/deployments/${a}`);return}e.error="";const r=s.body;e.detail={id:r.id??a,kind:r.kind==="shared"?"shared":"isolated",createdAt:r.createdAt,updatedAt:r.updatedAt,stack:typeof r.stack=="string"?r.stack:"",busy:r.busy??null,orchestrator:r.orchestrator??null,sleep:r.sleep??null,asleep:r.asleep??null,compose:r.compose?{file:r.compose.file??"?",profiles:r.compose.profiles??[],overlays:r.compose.overlays??[]}:null,requires:Array.isArray(r.requires)?r.requires:[],axes:(Array.isArray(r.axes)?r.axes:[]).map(o=>({name:o.name,hooks:Array.isArray(o.hooks)?o.hooks:[],verifiable:o.verifiable??(Array.isArray(o.hooks)&&o.hooks.includes("assert_gone"))})),env:Array.isArray(r.env)?r.env:[]}}function g(a){e.id===a&&(e.detail||e.error)||(e.id=a,e.detail=null,e.error="",e.vars=y(a),t())}function m(){c(e.id,e.vars)}function x(){m(),t()}export{x as a,e as d,h as i,t as l,g as o,m as p,k as r,b as u,f as v};
2
+ //# sourceMappingURL=useDeployment-BDbkdxpo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDeployment-BDHMCIYu.js","sources":["../../src/composables/useDeployment.ts"],"sourcesContent":["/**\n * The deployment currently open in the detail view.\n *\n * A module singleton rather than provide/inject, because the six tabs are CHILD ROUTES: they are\n * siblings of each other and are mounted and unmounted independently, so passing the loaded\n * deployment down as a prop would mean re-fetching it on every tab change. Switching tabs must not\n * re-fetch or blank the panel — only opening a DIFFERENT deployment does.\n *\n * `vars` here are REQUEST-TIME variables, sent as `?query` on every route that resolves this\n * deployment. See `useVars.ts` for why they matter and what they can get wrong.\n */\n\nimport { computed, reactive } from 'vue';\nimport { api, problem, query } from '../api/client';\nimport type { Deployment, VarPair } from '../api/types';\nimport { readVars, writeVars } from './useVars';\nimport { rowFor } from './useControlPlane';\n\nexport const dep = reactive({\n id: '',\n detail: null as Deployment | null,\n /** The resolve failure, verbatim. It is a 400 that NAMES the missing variable. */\n error: '',\n loading: false,\n vars: [] as VarPair[],\n});\n\nexport const varsQuery = computed(() => query(dep.vars));\n\n/** The list row, which is the only place the server exposes stored `vars` and `specName` today. */\nexport const row = computed(() => rowFor(dep.id));\n\nexport const isShared = computed(() => dep.detail?.kind === 'shared');\n\nexport const unverifiableAxes = computed(() =>\n (dep.detail?.axes ?? []).filter((a) => !a.verifiable).map((a) => a.name),\n);\n\nexport async function loadDetail(): Promise<void> {\n const id = dep.id;\n dep.loading = true;\n const r = await api.get<Deployment>(`/api/deployments/${encodeURIComponent(id)}${varsQuery.value}`);\n // Navigated to another deployment while this was in flight: drop the answer rather than render\n // one deployment's spec under another's id.\n if (dep.id !== id) return;\n dep.loading = false;\n\n if (!r.ok) {\n dep.detail = null;\n dep.error = problem(r, `GET /api/deployments/${id}`);\n return;\n }\n dep.error = '';\n const b = r.body;\n dep.detail = {\n id: b.id ?? id,\n kind: b.kind === 'shared' ? 'shared' : 'isolated',\n createdAt: b.createdAt,\n updatedAt: b.updatedAt,\n stack: typeof b.stack === 'string' ? b.stack : '',\n busy: b.busy ?? null,\n orchestrator: b.orchestrator ?? null,\n sleep: b.sleep ?? null,\n asleep: b.asleep ?? null,\n compose: b.compose\n ? {\n file: b.compose.file ?? '?',\n profiles: b.compose.profiles ?? [],\n overlays: b.compose.overlays ?? [],\n }\n : null,\n requires: Array.isArray(b.requires) ? b.requires : [],\n axes: (Array.isArray(b.axes) ? b.axes : []).map((a) => ({\n name: a.name,\n hooks: Array.isArray(a.hooks) ? a.hooks : [],\n // Derive it if an older build omits the field. Defaulting to `false` would claim an axis is\n // unverifiable when it may define a perfectly good `assert_gone`.\n verifiable: a.verifiable ?? (Array.isArray(a.hooks) && a.hooks.includes('assert_gone')),\n })),\n env: Array.isArray(b.env) ? b.env : [],\n };\n}\n\n/** Point the singleton at a deployment. Resets everything a stale id could leak into the new one. */\nexport function openDeployment(id: string): void {\n if (dep.id === id && (dep.detail || dep.error)) return; // a tab change, not a navigation\n dep.id = id;\n dep.detail = null;\n dep.error = '';\n dep.vars = readVars(id);\n void loadDetail();\n}\n\nexport function persistVars(): void {\n writeVars(dep.id, dep.vars);\n}\n\nexport function applyVars(): void {\n persistVars();\n void loadDetail();\n}\n"],"names":["dep","reactive","varsQuery","computed","query","row","rowFor","isShared","_a","unverifiableAxes","a","loadDetail","id","r","api","problem","b","openDeployment","readVars","persistVars","writeVars","applyVars"],"mappings":"uHAkBO,MAAMA,EAAMC,EAAS,CAC1B,GAAI,GACJ,OAAQ,KAER,MAAO,GACP,QAAS,GACT,KAAM,CAAA,CACR,CAAC,EAEYC,EAAYC,EAAS,IAAMC,EAAMJ,EAAI,IAAI,CAAC,EAG1CK,EAAMF,EAAS,IAAMG,EAAON,EAAI,EAAE,CAAC,EAEnCO,EAAWJ,EAAS,IAAA,OAAM,QAAAK,EAAAR,EAAI,SAAJ,YAAAQ,EAAY,QAAS,SAAQ,EAEvDC,EAAmBN,EAAS,IAAA,OACtC,SAAAK,EAAAR,EAAI,SAAJ,YAAAQ,EAAY,OAAQ,CAAA,GAAI,OAAQE,GAAM,CAACA,EAAE,UAAU,EAAE,IAAKA,GAAMA,EAAE,IAAI,EACzE,EAEA,eAAsBC,GAA4B,CAChD,MAAMC,EAAKZ,EA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A,EAAI,GAAKY,EACTZ,EAAI,OAAS,KACbA,EAAI,MAAQ,GACZA,EAAI,KAAOkB,EAASN,CAAE,EACjBD,EAAA,EACP,CAEO,SAASQ,GAAoB,CAClCC,EAAUpB,EAAI,GAAIA,EAAI,IAAI,CAC5B,CAEO,SAASqB,GAAkB,CAChCF,EAAA,EACKR,EAAA,CACP"}
1
+ {"version":3,"file":"useDeployment-BDbkdxpo.js","sources":["../../src/composables/useDeployment.ts"],"sourcesContent":["/**\n * The deployment currently open in the detail view.\n *\n * A module singleton rather than provide/inject, because the six tabs are CHILD ROUTES: they are\n * siblings of each other and are mounted and unmounted independently, so passing the loaded\n * deployment down as a prop would mean re-fetching it on every tab change. Switching tabs must not\n * re-fetch or blank the panel — only opening a DIFFERENT deployment does.\n *\n * `vars` here are REQUEST-TIME variables, sent as `?query` on every route that resolves this\n * deployment. See `useVars.ts` for why they matter and what they can get wrong.\n */\n\nimport { computed, reactive } from 'vue';\nimport { api, problem, query } from '../api/client';\nimport type { Deployment, VarPair } from '../api/types';\nimport { readVars, writeVars } from './useVars';\nimport { rowFor } from './useControlPlane';\n\nexport const dep = reactive({\n id: '',\n detail: null as Deployment | null,\n /** The resolve failure, verbatim. It is a 400 that NAMES the missing variable. */\n error: '',\n loading: false,\n vars: [] as VarPair[],\n});\n\nexport const varsQuery = computed(() => query(dep.vars));\n\n/** The list row, which is the only place the server exposes stored `vars` and `specName` today. */\nexport const row = computed(() => rowFor(dep.id));\n\nexport const isShared = computed(() => dep.detail?.kind === 'shared');\n\nexport const unverifiableAxes = computed(() =>\n (dep.detail?.axes ?? []).filter((a) => !a.verifiable).map((a) => a.name),\n);\n\nexport async function loadDetail(): Promise<void> {\n const id = dep.id;\n dep.loading = true;\n const r = await api.get<Deployment>(`/api/deployments/${encodeURIComponent(id)}${varsQuery.value}`);\n // Navigated to another deployment while this was in flight: drop the answer rather than render\n // one deployment's spec under another's id.\n if (dep.id !== id) return;\n dep.loading = false;\n\n if (!r.ok) {\n dep.detail = null;\n dep.error = problem(r, `GET /api/deployments/${id}`);\n return;\n }\n dep.error = '';\n const b = r.body;\n dep.detail = {\n id: b.id ?? id,\n kind: b.kind === 'shared' ? 'shared' : 'isolated',\n createdAt: b.createdAt,\n updatedAt: b.updatedAt,\n stack: typeof b.stack === 'string' ? b.stack : '',\n busy: b.busy ?? null,\n orchestrator: b.orchestrator ?? null,\n sleep: b.sleep ?? null,\n asleep: b.asleep ?? null,\n compose: b.compose\n ? {\n file: b.compose.file ?? '?',\n profiles: b.compose.profiles ?? [],\n overlays: b.compose.overlays ?? [],\n }\n : null,\n requires: Array.isArray(b.requires) ? b.requires : [],\n axes: (Array.isArray(b.axes) ? b.axes : []).map((a) => ({\n name: a.name,\n hooks: Array.isArray(a.hooks) ? a.hooks : [],\n // Derive it if an older build omits the field. Defaulting to `false` would claim an axis is\n // unverifiable when it may define a perfectly good `assert_gone`.\n verifiable: a.verifiable ?? (Array.isArray(a.hooks) && a.hooks.includes('assert_gone')),\n })),\n env: Array.isArray(b.env) ? b.env : [],\n };\n}\n\n/** Point the singleton at a deployment. Resets everything a stale id could leak into the new one. */\nexport function openDeployment(id: string): void {\n if (dep.id === id && (dep.detail || dep.error)) return; // a tab change, not a navigation\n dep.id = id;\n dep.detail = null;\n dep.error = '';\n dep.vars = readVars(id);\n void loadDetail();\n}\n\nexport function persistVars(): void {\n writeVars(dep.id, dep.vars);\n}\n\nexport function applyVars(): void {\n persistVars();\n void loadDetail();\n}\n"],"names":["dep","reactive","varsQuery","computed","query","row","rowFor","isShared","_a","unverifiableAxes","a","loadDetail","id","r","api","problem","b","openDeployment","readVars","persistVars","writeVars","applyVars"],"mappings":"8HAkBO,MAAMA,EAAMC,EAAS,CAC1B,GAAI,GACJ,OAAQ,KAER,MAAO,GACP,QAAS,GACT,KAAM,CAAA,CACR,CAAC,EAEYC,EAAYC,EAAS,IAAMC,EAAMJ,EAAI,IAAI,CAAC,EAG1CK,EAAMF,EAAS,IAAMG,EAAON,EAAI,EAAE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MAAO,MAAM,QAAQA,EAAE,KAAK,EAAIA,EAAE,MAAQ,CAAA,EAG1C,WAAYA,EAAE,aAAe,MAAM,QAAQA,EAAE,KAAK,GAAKA,EAAE,MAAM,SAAS,aAAa,EAAA,EACrF,EACF,IAAK,MAAM,QAAQM,EAAE,GAAG,EAAIA,EAAE,IAAM,CAAA,CAAC,CAEzC,CAGO,SAASC,EAAeL,EAAkB,CAC3CZ,EAAI,KAAOY,IAAOZ,EAAI,QAAUA,EAAI,SACxCA,EAAI,GAAKY,EACTZ,EAAI,OAAS,KACbA,EAAI,MAAQ,GACZA,EAAI,KAAOkB,EAASN,CAAE,EACjBD,EAAA,EACP,CAEO,SAASQ,GAAoB,CAClCC,EAAUpB,EAAI,GAAIA,EAAI,IAAI,CAC5B,CAEO,SAASqB,GAAkB,CAChCF,EAAA,EACKR,EAAA,CACP"}
@@ -0,0 +1,2 @@
1
+ function u(n){return n!=="queued"&&n!=="running"}function c(n,r){const t=r.filter(i=>i.id!==n.id),s=t.find(i=>i.state==="running"&&i.stack===n.stack);if(s)return{kind:"stack",blocker:s};const e=t.filter(i=>i.state==="running").length;return e>0?{kind:"slot",running:e}:{kind:"unknown"}}function d(n,r){const t=r.findIndex(e=>e.id===n.id);return t<0?null:r.slice(0,t).reverse().find(e=>e.stack===n.stack)??null}export{u as i,d as s,c as w};
2
+ //# sourceMappingURL=useJobQueue-D5JkRJNX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useJobQueue-D5JkRJNX.js","sources":["../../src/composables/useJobQueue.ts"],"sourcesContent":["/**\n * The queue facts the wire does not carry: why a job is still waiting, and what replaced it.\n *\n * A job record has a state and nothing about the queue it sits in — there is no `waitingOn` and no\n * `supersededBy`. Both are DERIVED here, from the job list the shell already polls every seven\n * seconds, rather than asked for as server fields that would exist only to spare this app an array\n * scan. Pure functions, same shape as `useSteps`, so a view can call them in a computed.\n *\n * WHY THE TWO WAITS ARE WORTH TELLING APART. \"Behind its own stack\" is the product working exactly\n * as designed — one job per stack is the guarantee — and the fix is to wait or stop the job ahead.\n * \"The host is at its job cap\" is a capacity fact about the whole machine, and the fix is\n * `PSTACK_MAX_JOBS` or fewer concurrent deploys. An operator debugging a slow deploy is asking\n * which of those two it is, and a single word \"queued\" answers neither.\n *\n * WHEN THE LIST IS EMPTY THEY SAY SO. A deep link to `/jobs/:id` before the first poll lands, or a\n * share-link page that never polls, has nothing to reason over. `unknown` renders as an unqualified\n * \"waiting its turn\" — true — rather than asserting a cap nobody measured.\n */\nimport type { Job, JobState } from '../api/types';\n\n/** Terminal is forever: the server's `State.Terminal()`, restated. NOT `state !== 'running'`. */\nexport function isTerminal(state: JobState): boolean {\n return state !== 'queued' && state !== 'running';\n}\n\n/** Why a queued job has not started. `running` is how many jobs hold a slot host-wide. */\nexport type Wait =\n | { kind: 'stack'; blocker: Job }\n | { kind: 'slot'; running: number }\n | { kind: 'unknown' };\n\nexport function waitReason(job: Job, jobs: Job[]): Wait {\n // Everything EXCEPT itself. Today's callers only ask about a queued job, which is never running,\n // but without this a running job asked why it waits answers \"behind itself\" — a banner linking to\n // the page you are already on, and a slot count that includes the slot it holds. A predicate only\n // correct for the two call sites that exist today is a trap for the third.\n const others = jobs.filter((j) => j.id !== job.id);\n const blocker = others.find((j) => j.state === 'running' && j.stack === job.stack);\n if (blocker) return { kind: 'stack', blocker };\n const running = others.filter((j) => j.state === 'running').length;\n // ponytail: the cap itself is not on the wire, so \"the host is full\" is inferred from other\n // stacks holding slots. A poll landing in the second between a slot freeing and the dispatch\n // shows this once and corrects itself on the next tick; serving `maxRunning` on /api/health is\n // the upgrade if that ever misleads anyone.\n return running > 0 ? { kind: 'slot', running } : { kind: 'unknown' };\n}\n\n/**\n * The job that replaced a superseded one, or null.\n *\n * The list is newest-first and the queue is ONE deep, so the nearest newer job for the same stack\n * is necessarily the one that took its place — there cannot have been another in between. Null\n * when the successor has aged out of the 50 kept transcripts, or when the list has not loaded;\n * a missing link is better than a wrong one.\n */\nexport function supersededBy(job: Job, jobs: Job[]): Job | null {\n const i = jobs.findIndex((j) => j.id === job.id);\n if (i < 0) return null;\n // Newest-first, so everything before it is newer; the nearest of those on the same stack wins.\n const newer = jobs.slice(0, i).reverse();\n return newer.find((j) => j.stack === job.stack) ?? null;\n}\n"],"names":["isTerminal","state","waitReason","job","jobs","others","j","blocker","running","supersededBy","i"],"mappings":"AAqBO,SAASA,EAAWC,EAA0B,CACnD,OAAOA,IAAU,UAAYA,IAAU,SACzC,CAQO,SAASC,EAAWC,EAAUC,EAAmB,CAKtD,MAAMC,EAASD,EAAK,OAAQE,GAAMA,EAAE,KAAOH,EAAI,EAAE,EAC3CI,EAAUF,EAAO,KAAMC,GAAMA,EAAE,QAAU,WAAaA,EAAE,QAAUH,EAAI,KAAK,EACjF,GAAII,EAAS,MAAO,CAAE,KAAM,QAAS,QAAAA,CAAA,EACrC,MAAMC,EAAUH,EAAO,OAAQC,GAAMA,EAAE,QAAU,SAAS,EAAE,OAK5D,OAAOE,EAAU,EAAI,CAAE,KAAM,OAAQ,QAAAA,CAAA,EAAY,CAAE,KAAM,SAAA,CAC3D,CAUO,SAASC,EAAaN,EAAUC,EAAyB,CAC9D,MAAMM,EAAIN,EAAK,UAAWE,GAAMA,EAAE,KAAOH,EAAI,EAAE,EAC/C,OAAIO,EAAI,EAAU,KAEJN,EAAK,MAAM,EAAGM,CAAC,EAAE,QAAA,EAClB,KAAMJ,GAAMA,EAAE,QAAUH,EAAI,KAAK,GAAK,IACrD"}
package/dist/index.html CHANGED
@@ -27,8 +27,8 @@
27
27
  /* private mode: fall through to the OS preference */
28
28
  }
29
29
  </script>
30
- <script type="module" crossorigin src="/assets/index-BXPaPWhH.js"></script>
31
- <link rel="stylesheet" crossorigin href="/assets/index-B_k9b7xG.css">
30
+ <script type="module" crossorigin src="/assets/index-Cqe_7QZw.js"></script>
31
+ <link rel="stylesheet" crossorigin href="/assets/index-B1ONXQzZ.css">
32
32
  </head>
33
33
  <body>
34
34
  <div id="app"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@samyx/preview-stacks-ui",
3
- "version": "0.30.0",
3
+ "version": "0.32.0",
4
4
  "private": false,
5
5
  "description": "The advanced web UI for preview-stacks — an opt-in SPA that talks to the pstack HTTP API.",
6
6
  "type": "module",
@@ -14,6 +14,7 @@
14
14
  "dev": "vite",
15
15
  "build": "vue-tsc --build && vite build",
16
16
  "typecheck": "vue-tsc --build",
17
+ "test": "bun test",
17
18
  "preview": "vite preview",
18
19
  "prepublishOnly": "bun run build"
19
20
  },
@@ -1,2 +0,0 @@
1
- import{d as c,M as m,c as i,ay as f,E as v,t as y,$ as b,g,r as B,o}from"./index-BXPaPWhH.js";const h=["disabled","title","aria-busy"],k={key:0},p={key:2,class:"progress","aria-hidden":"true"},E=c({__name:"ActionButton",props:{pending:{type:Boolean},disabled:{type:Boolean},variant:{},title:{},confirm:{}},emits:["run"],setup(e,{emit:s}){const r=e,l=s,t=B(!1);let a=null;function n(){t.value=!1,a&&clearTimeout(a),a=null}function d(){if(r.confirm){if(t.value){n(),l("run");return}t.value=!0,a=setTimeout(n,5e3)}}return m(n),(u,C)=>(o(),i("button",{class:v([e.variant,t.value&&"armed"]),disabled:e.pending||e.disabled,title:e.title,"aria-busy":e.pending?"true":void 0,onClick:d,onBlur:n,onKeydown:f(n,["esc"])},[t.value?(o(),i("span",k,y(e.confirm),1)):b(u.$slots,"default",{},void 0,void 0,1),e.pending?(o(),i("span",p)):g("",!0)],42,h))}});export{E as _};
2
- //# sourceMappingURL=ActionButton.vue_vue_type_script_setup_true_lang-CxT4O7XN.js.map
@@ -1,2 +0,0 @@
1
- import{s as C}from"./useFormat-DIlTY5Dl.js";import{p as V,d as r,a as c,r as x}from"./useDeployment-BDHMCIYu.js";import{d as T,c as n,a as e,f as t,e as p,w as f,u as o,t as i,_ as A,F as v,y as w,g as d,j as u,o as l,E as k}from"./index-BXPaPWhH.js";import{c as j}from"./useVars-VN9gYdR6.js";import{_ as N}from"./VarEditor.vue_vue_type_script_setup_true_lang-D7QFvEED.js";import{_ as $}from"./HelpModal.vue_vue_type_script_setup_true_lang-DWDQ-wIa.js";import"./Teleport-DTF2H_ia.js";const B={class:"panel"},I={class:"hint"},L={class:"row",style:{"margin-top":"var(--s3)"}},z={class:"mute",style:{"font-size":"var(--t-xs)"}},D={class:"hint"},R={key:0,class:"panel"},q={class:"kvlist",style:{"margin-top":"var(--s3)"}},E={class:"k"},F={class:"v mono"},K={key:0,class:"banner warn"},O={class:"panel"},S={key:0,class:"mute"},U={class:"cards"},W={class:"name","data-label":"key"},Y={"data-label":"visibility"},G={class:"dim","data-label":"length"},H={key:0,class:"badge warn",style:{"margin-left":"6px"}},J={key:0},ae=T({__name:"ConfigTab",setup(M){const h=u(()=>Object.keys(r.vars??{}).length),y=u(()=>{var m;return(m=x.value)==null?void 0:m.vars}),b=u(()=>Object.entries(y.value??{})),g=u(()=>j(r.vars,y.value));return(m,s)=>(l(),n("div",null,[e("section",B,[s[6]||(s[6]=e("h2",{class:"section",style:{"margin-bottom":"var(--s3)"}},"Request variables",-1)),e("p",I,[s[3]||(s[3]=t(" Remembered in this browser. Another browser, a CI job or the command line supplies its own. ",-1)),p($,{title:"Why the same variables have to be used for both"},{default:f(()=>[...s[2]||(s[2]=[e("p",null,[t(" These variables are part of how this deployment's name is worked out. Deploy with one value and tear down with another and the two commands are pointing at "),e("b",null,"different things"),t(" — the teardown finishes successfully having removed nothing, and the original is still running. ")],-1),e("p",null,[t(" They are kept per deployment in this browser only, which is what keeps them matched "),e("em",null,"here"),t(". Nothing carries them to anywhere else. ")],-1)])]),_:1})]),p(N,{modelValue:o(r).vars,"onUpdate:modelValue":s[0]||(s[0]=a=>o(r).vars=a),onChange:o(V)},null,8,["modelValue","onChange"]),e("div",L,[e("button",{class:"primary",onClick:s[1]||(s[1]=(...a)=>o(c)&&o(c)(...a))},"Apply & reload"),e("span",z,i(h.value?`${h.value} variable${h.value===1?"":"s"}`:"no variables"),1)]),e("p",D,[s[5]||(s[5]=t(" Add any variable you need — the list below is what the spec declares, not everything it uses. ",-1)),p(A,{label:"why the two differ"},{default:f(()=>[...s[4]||(s[4]=[t(" A spec can consume a variable without declaring it, for instance by building its stack name out of one. If a variable is missing, the error you get when the spec fails to resolve names it exactly — that message is the authoritative list. ",-1)])]),_:1})])]),b.value.length?(l(),n("section",R,[s[10]||(s[10]=e("h2",{class:"section",style:{"margin-bottom":"var(--s3)"}},"Stored on the server",-1)),s[11]||(s[11]=e("p",{class:"dim",style:{"font-size":"var(--t-sm)"}}," Kept with the deployment on the server, so deploying and tearing down agree without anyone passing anything. Anything set above overrides these. ",-1)),e("ul",q,[(l(!0),n(v,null,w(b.value,([a,_])=>(l(),n("li",{key:a},[e("span",E,[e("b",null,i(a),1)]),e("span",F,i(_),1)]))),128))]),g.value.length?(l(),n("div",K,[s[7]||(s[7]=e("b",null,"Your request variables disagree with the stored ones:",-1)),e("b",null,i(g.value.join(", ")),1),s[8]||(s[8]=t(". ",-1)),s[9]||(s[9]=e("p",null,[t(" Both resolve, so nothing will error — they simply resolve to "),e("em",null,"different stacks"),t(". That is the dangerous shape: an action sent from this page would target one stack while the CLI, CI, or another browser targets the other. Clear the override above unless you mean it. ")],-1))])):d("",!0)])):d("",!0),e("section",O,[s[15]||(s[15]=e("h2",{class:"section",style:{"margin-bottom":"var(--s3)"}},[t(" Declared env "),e("span",{class:"mute"},"(after interpolation)")],-1)),o(r).detail?(l(),n(v,{key:1},[e("table",U,[s[13]||(s[13]=e("thead",null,[e("tr",null,[e("th",null,"Key"),e("th",null,"Value"),e("th",null,"Visibility"),e("th",null,"Length")])],-1)),e("tbody",null,[(l(!0),n(v,null,w(o(r).detail.env,a=>(l(),n("tr",{key:a.key},[e("td",W,i(a.key),1),e("td",{class:k(["name",{masked:a.visibility==="masked"}]),"data-label":"value"},i(a.value),3),e("td",Y,[e("span",{class:k(["badge",a.visibility==="masked"?"warn":""])},i(o(C)(a.visibility)),3)]),e("td",G,[t(i(a.length)+" chars ",1),a.length===0?(l(),n("span",H,"never set")):d("",!0)])]))),128)),o(r).detail.env.length?d("",!0):(l(),n("tr",J,[...s[12]||(s[12]=[e("td",{colspan:"4",class:"mute"},[t("This spec declares no "),e("code",null,"env:"),t(" block.")],-1)])]))])]),s[14]||(s[14]=e("p",{class:"hint"},[t(" A "),e("b",null,"masked"),t(" value was redacted on the host because its name reads as a secret. The real value was never sent to this page, so there is "),e("b",null,"nothing to reveal"),t(" — only its length is shown. Read it on the host if you need it. ")],-1))],64)):(l(),n("p",S,"Unavailable until the spec resolves."))])]))}});export{ae as default};
2
- //# sourceMappingURL=ConfigTab-CKjpaZmg.js.map
@@ -1,2 +0,0 @@
1
- import{n as j,O as k,G as C,S as $,C as x,r as u,j as m,U as I,A as R,V as T,b as S,d as U,c as r,E as A,a as d,t as b,f as i,e as L,w as N,k as D,o as l}from"./index-BXPaPWhH.js";import{d as n,v as E,i as g}from"./useDeployment-BDHMCIYu.js";import{a as f}from"./useFormat-DIlTY5Dl.js";const h=u(""),c=u(""),v=u(null),p=u(""),V=m(()=>{var e;return((e=n.detail)==null?void 0:e.busy)===!0}),H=m(()=>{var e;return((e=R.health)==null?void 0:e.authEnforced)===!0&&!T.token&&!S.authed}),K=m(()=>{const e=n.vars.filter(o=>o.k).map(o=>o.k);return e.length?`Sending ${e.join(", ")} with every action.`:"Using the variables saved with this deployment."});function P(e,o=!1){if(!n.detail)return"The spec has not resolved — the server cannot compute the stack name.";if(V.value)return`A job is already in flight for ${n.detail.stack}.`;if(e==="down"&&g.value&&!o)return`Type the stack name "${n.detail.stack}" below to confirm a shared teardown.`;if(e==="sleep"&&g.value)return"A shared deployment cannot sleep — every preview that depends on it would go with it.";if(e==="sleep"&&!n.detail.compose)return"This spec has no compose section — there is nothing to put to sleep.";if(e==="sleep"&&n.detail.asleep)return"Already asleep."}async function X(e,o={}){if(!n.detail)return;h.value=e,c.value="",v.value=null;const t=e==="down"?{verify:o.verify??!0,force:o.force??!1}:{},a=await j.post(`/api/deployments/${encodeURIComponent(n.id)}/${e}${E.value}`,t);if(h.value="",a.status===202){const s=a.body.job;if(s!=null&&s.id){k("info",`${f(e)} started on ${s.stack}`,{to:`/jobs/${encodeURIComponent(s.id)}`,toLabel:"Follow"}),C(),$.push(`/jobs/${encodeURIComponent(s.id)}`);return}c.value="The action was accepted, but the response carried nothing to follow.";return}if(a.status===409)return B(a.body);c.value=x(a,f(e).toLowerCase()),k("error",`${f(e)} was refused.`)}async function B(e){var w;const o=I(e);v.value=o,p.value="";const t=o.stack||((w=n.detail)==null?void 0:w.stack);if(o.kind!=="other"||!t)return;const s=((await j.get("/api/jobs")).body.jobs??[]).find(y=>y.state==="running"&&y.stack===t);s&&(p.value=s.id)}function Y(){h.value="",c.value="",v.value=null,p.value=""}const F={class:"raw",style:{color:"var(--fg-dim)","max-height":"200px"}},z={key:0},G={key:1},J={key:2},M={key:3},O={key:4},Z=U({__name:"ConflictNote",props:{conflict:{},jobId:{}},setup(e){return(o,t)=>{const a=D("RouterLink");return l(),r("div",{class:A(["banner",e.conflict.kind==="shared"?"leaked":"info"]),role:"alert"},[t[5]||(t[5]=d("b",null,"Refused — nothing was started.",-1)),d("pre",F,b(e.conflict.text),1),e.conflict.kind==="shared"?(l(),r("p",z,[...t[0]||(t[0]=[i(" Type the stack name in the confirmation field above and press ",-1),d("code",null,"down",-1),i(" again. ",-1)])])):e.conflict.kind==="containers"?(l(),r("p",G,[...t[1]||(t[1]=[i(" Run ",-1),d("code",null,"down",-1),i(" first. Forgetting the record now would orphan those containers beyond the control plane's view: nothing left would know their stack name, their axes, or how to tear them down. ",-1)])])):e.conflict.kind==="referenced"?(l(),r("p",J,[t[2]||(t[2]=i(" These deployments still use this spec: ",-1)),d("strong",null,b(e.conflict.deployments.join(", ")),1),t[3]||(t[3]=i(". Deleting it would leave them with no way to be torn down. ",-1))])):e.jobId?(l(),r("p",M,[L(a,{to:`/jobs/${encodeURIComponent(e.jobId)}`},{default:N(()=>[...t[4]||(t[4]=[i("Follow the running job →",-1)])]),_:1},8,["to"])])):(l(),r("p",O,"Nothing was retried. Wait for the current work to finish, then try again."))],2)}}});export{Z as _,X as a,V as b,c,v as d,p as e,B as o,h as p,Y as r,H as t,K as v,P as w};
2
- //# sourceMappingURL=ConflictNote.vue_vue_type_script_setup_true_lang-cZYd7gRK.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConflictNote.vue_vue_type_script_setup_true_lang-cZYd7gRK.js","sources":["../../src/composables/useDeploymentActions.ts","../../src/components/ConflictNote.vue"],"sourcesContent":["/**\n * Lifecycle actions for the open deployment — shared by the detail HEADER (Deploy, Verify) and the\n * Danger tab (Tear down, Forget).\n *\n * WHY THIS MOVED OUT OF THE DANGER TAB. Deploy is the primary action of the entire product, and it\n * lived behind a tab named \"Danger\" — three clicks deep, labelled as something to be afraid of.\n * Deploying and verifying a preview are routine and reversible; they belong in the header, visible\n * from every tab. What stays in Danger is what the name promises: teardown and forgetting.\n *\n * Module-level state, same pattern as `useDeployment`: exactly one deployment detail is open at a\n * time, and the header and the tab must see the SAME pending/conflict state — two components each\n * holding their own copy is how a button stays enabled while the other copy knows a job is running.\n */\nimport { computed, ref } from 'vue';\nimport { api, classifyConflict, problem, type Conflict } from '../api/client';\nimport type { ActionResponse, ConflictBody, JobsResponse } from '../api/types';\nimport { dep, isShared, varsQuery } from './useDeployment';\nimport { loadDeployments, state } from './useControlPlane';\nimport { settings } from './useSettings';\nimport { authState } from './useAuth';\nimport { toast } from './useToasts';\nimport { actionLabel } from './useFormat';\nimport { router } from '../router';\n\nexport type LifecycleAction = 'up' | 'verify' | 'down' | 'sleep' | 'wake';\n\nexport const pending = ref<'' | LifecycleAction | 'forget'>('');\nexport const actionError = ref('');\nexport const conflict = ref<Conflict | null>(null);\nexport const conflictJobId = ref('');\n\nexport const busy = computed(() => dep.detail?.busy === true);\n/**\n * True only when NOTHING can authenticate the caller. This predates accounts and used to check the\n * token alone — so a signed-in operator with no token pasted was told \"every action below will be\n * refused\" while their actions were succeeding. A session is a credential; the warning must know so.\n */\nexport const tokenMissing = computed(\n () => state.health?.authEnforced === true && !settings.token && !authState.authed,\n);\n\n/**\n * The variables an action will send, as prose. Which variables are set decides which stack is\n * touched, so the NAMES are worth stating — the URL-encoded query string they become is not.\n */\nexport const varsSummary = computed(() => {\n const names = dep.vars.filter((v) => v.k).map((v) => v.k);\n // NOT \"no variables\": with none set here the server resolves the ones stored with the deployment,\n // and claiming otherwise would have an operator hunting for variables that are already in place.\n return names.length\n ? `Sending ${names.join(', ')} with every action.`\n : 'Using the variables saved with this deployment.';\n});\n\n/** A disabled control must say why. This is the text that answers it. */\nexport function whyDisabled(action: LifecycleAction, forceArmed = false): string | undefined {\n if (!dep.detail) return 'The spec has not resolved — the server cannot compute the stack name.';\n if (busy.value) return `A job is already in flight for ${dep.detail.stack}.`;\n if (action === 'down' && isShared.value && !forceArmed) {\n return `Type the stack name \"${dep.detail.stack}\" below to confirm a shared teardown.`;\n }\n if (action === 'sleep' && isShared.value) {\n return 'A shared deployment cannot sleep — every preview that depends on it would go with it.';\n }\n if (action === 'sleep' && !dep.detail.compose) return 'This spec has no compose section — there is nothing to put to sleep.';\n if (action === 'sleep' && dep.detail.asleep) return 'Already asleep.';\n return undefined;\n}\n\nexport async function act(\n action: LifecycleAction,\n opts: { verify?: boolean; force?: boolean } = {},\n): Promise<void> {\n if (!dep.detail) return;\n pending.value = action;\n actionError.value = '';\n conflict.value = null;\n\n const body =\n action === 'down'\n ? // `force` is only ever true for a shared deployment whose stack name was typed out in full.\n { verify: opts.verify ?? true, force: opts.force ?? false }\n : {};\n\n const r = await api.post<ActionResponse & ConflictBody>(\n `/api/deployments/${encodeURIComponent(dep.id)}/${action}${varsQuery.value}`,\n body,\n );\n pending.value = '';\n\n if (r.status === 202) {\n const job = r.body.job;\n if (job?.id) {\n toast('info', `${actionLabel(action)} started on ${job.stack}`, {\n to: `/jobs/${encodeURIComponent(job.id)}`,\n toLabel: 'Follow',\n });\n void loadDeployments();\n void router.push(`/jobs/${encodeURIComponent(job.id)}`);\n return;\n }\n actionError.value = 'The action was accepted, but the response carried nothing to follow.';\n return;\n }\n if (r.status === 409) return onConflict(r.body);\n\n actionError.value = problem(r, actionLabel(action).toLowerCase());\n toast('error', `${actionLabel(action)} was refused.`);\n}\n\n/**\n * Classify on payload SHAPE (in `client.ts`), never on message text — then look for a running job\n * ONLY to offer a link. \"A job is in flight\" and \"docker did not answer\" are shape-identical, so\n * neither is claimed; the server's message is printed verbatim either way. Never retry.\n */\nexport async function onConflict(body: ConflictBody): Promise<void> {\n const c = classifyConflict(body);\n conflict.value = c;\n conflictJobId.value = '';\n\n const stack = c.stack || dep.detail?.stack;\n if (c.kind !== 'other' || !stack) return;\n const jl = await api.get<JobsResponse>('/api/jobs');\n const live = (jl.body.jobs ?? []).find((j) => j.state === 'running' && j.stack === stack);\n if (live) conflictJobId.value = live.id;\n}\n\n/** Leaving the deployment must not carry a stale error onto the next one. */\nexport function resetActions(): void {\n pending.value = '';\n actionError.value = '';\n conflict.value = null;\n conflictJobId.value = '';\n}\n","<script setup lang=\"ts\">\n/**\n * A 409, explained.\n *\n * \"409\" on this API always means the same thing about consequences — **refused, and nothing was\n * started** — but four different things about the cause, and guessing wrong sends the operator\n * down the wrong path. The classification is done on payload SHAPE in `client.ts`, never on the\n * message text, and the server's own message is always printed verbatim underneath.\n *\n * Note what is deliberately NOT distinguished: \"a job is in flight\" and \"docker did not answer\"\n * are shape-identical, so this renders neither claim — it prints the message and offers a link to\n * a running job only when one demonstrably exists.\n */\nimport type { Conflict } from '../api/client';\n\ndefineProps<{ conflict: Conflict; jobId?: string }>();\n</script>\n\n<template>\n <div class=\"banner\" :class=\"conflict.kind === 'shared' ? 'leaked' : 'info'\" role=\"alert\">\n <b>Refused — nothing was started.</b>\n <pre class=\"raw\" style=\"color: var(--fg-dim); max-height: 200px\">{{ conflict.text }}</pre>\n\n <p v-if=\"conflict.kind === 'shared'\">\n Type the stack name in the confirmation field above and press <code>down</code> again.\n </p>\n <p v-else-if=\"conflict.kind === 'containers'\">\n Run <code>down</code> first. Forgetting the record now would orphan those containers beyond\n the control plane's view: nothing left would know their stack name, their axes, or how to\n tear them down.\n </p>\n <p v-else-if=\"conflict.kind === 'referenced'\">\n These deployments still use this spec: <strong>{{ conflict.deployments.join(', ') }}</strong>.\n Deleting it would leave them with no way to be torn down.\n </p>\n <p v-else-if=\"jobId\">\n <RouterLink :to=\"`/jobs/${encodeURIComponent(jobId)}`\">Follow the running job →</RouterLink>\n </p>\n <p v-else>Nothing was retried. Wait for the current work to finish, then try again.</p>\n </div>\n</template>\n"],"names":["pending","ref","actionError","conflict","conflictJobId","busy","computed","_a","dep","tokenMissing","state","settings","authState","varsSummary","names","v","whyDisabled","action","forceArmed","isShared","act","opts","body","r","api","varsQuery","job","toast","actionLabel","loadDeployments","router","onConflict","problem","c","classifyConflict","stack","live","j","resetActions","_createElementBlock","_normalizeClass","__props","_cache","_createElementVNode","_hoisted_1","_toDisplayString","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_createVNode","_component_RouterLink","_openBlock"],"mappings":"8RA0BO,MAAMA,EAAUC,EAAqC,EAAE,EACjDC,EAAcD,EAAI,EAAE,EACpBE,EAAWF,EAAqB,IAAI,EACpCG,EAAgBH,EAAI,EAAE,EAEtBI,EAAOC,EAAS,IAAA,OAAM,QAAAC,EAAAC,EAAI,SAAJ,YAAAD,EAAY,QAAS,GAAI,EAM/CE,EAAeH,EAC1B,WAAM,QAAAC,EAAAG,EAAM,SAAN,YAAAH,EAAc,gBAAiB,IAAQ,CAACI,EAAS,OAAS,CAACC,EAAU,OAC7E,EAMaC,EAAcP,EAAS,IAAM,CACxC,MAAMQ,EAAQN,EAAI,KAAK,OAAQO,GAAMA,EAAE,CAAC,EAAE,IAAKA,GAAMA,EAAE,CAAC,EAGxD,OAAOD,EAAM,OACT,WAAWA,EAAM,KAAK,IAAI,CAAC,sBAC3B,iDACN,CAAC,EAGM,SAASE,EAAYC,EAAyBC,EAA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AAA,eAH0C,2CACL,EAAA,GAAAL,EAAsD,SAAA,KAAAE,EAA3CJ,EAAA,SAAS,YAAY,KAAI,IAAA,CAAA,EAAA,CAAA,gBAAkB,+DAE/F,EAAA,EAAA,IACcA,EAAA,WAAdF,EAEI,IAAAU,EAAA,CADFC,EAA4FC,EAAA,CAA/E,GAAE,SAAW,mBAAmBV,EAAA,KAAK,CAAA,EAAA,aAAK,IAAwB,CAAA,GAAAC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAAxB,2BAAwB,EAAA,CAAA,wBAEjFU,EAAA,EAAAb,EAAuF,MAA7E,2EAAyE,EAAA"}
@@ -1,2 +0,0 @@
1
- import{d as J,c as i,u as s,a as t,f as o,t as d,e as r,w as p,_ as w,g as v,i as b,I as V,z as L,F as q,v as Q,r as f,j as F,O as N,k as Y,o as l,l as X,n as B,C as P,G as Z}from"./index-BXPaPWhH.js";import{d as n,i as h,v as _}from"./useDeployment-BDHMCIYu.js";import{a as M,w as E,p as y,b as j,t as ee,v as te,c as I,d as O,e as se,_ as oe,o as ne}from"./ConflictNote.vue_vue_type_script_setup_true_lang-cZYd7gRK.js";import{_ as U}from"./ActionButton.vue_vue_type_script_setup_true_lang-CxT4O7XN.js";import{_ as K}from"./ErrorNote.vue_vue_type_script_setup_true_lang-B5-EJpIO.js";import{E as le}from"./EquivalentCommand-BjlPIrt9.js";import{_ as ae}from"./SelectMenu.vue_vue_type_script_setup_true_lang-VAye0ofl.js";import"./useVars-VN9gYdR6.js";import"./useFormat-DIlTY5Dl.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Teleport-DTF2H_ia.js";const ie={key:0,class:"panel"},re={class:"dim"},de={class:"row",style:{"margin-top":"var(--s3)"}},ue={key:0,class:"mute"},pe={key:1,class:"panel"},ve={class:"phead"},me={class:"dim"},fe={class:"row",style:{"margin-top":"var(--s3)","flex-wrap":"wrap",gap:"var(--s3)"}},ye={class:"check"},ke={class:"check"},we={class:"field inline"},be={key:0,class:"banner ok",style:{"margin-top":"var(--s3)"}},he={class:"code",style:{"white-space":"pre-wrap","word-break":"break-all"}},ge={class:"row"},ce=["href"],xe={class:"panel"},Ce={key:0,class:"mute"},Te={key:0,class:"banner warn"},Se={class:"dim"},$e={class:"row",style:{"margin-top":"var(--s3)"}},Ve={class:"check"},Ie={key:1,class:"hint"},Ue={key:2,class:"hint"},Ae={key:3,class:"banner leaked"},Re={class:"field",style:{"margin-top":"var(--s3)","max-width":"380px"}},De=["for"],Le=["id","placeholder"],Ne={key:0,class:"s-failed"},Ee={class:"panel"},je={key:0,class:"mute"},Oe={class:"dim"},qe={class:"row",style:{"margin-top":"var(--s3)"}},Fe={class:"check"},Ze=J({__name:"DangerTab",setup(Be){const W=X(),A=f(!0),R=f(!0),g=f("7d"),m=f(null),c=f(""),x=f(!1),C=F(()=>[...A.value?["details"]:[],...R.value?["logs"]:[]]);async function z(){x.value=!0,c.value="",m.value=null;const u=await B.post(`/api/deployments/${encodeURIComponent(n.id)}/share`,{views:C.value,ttl:g.value});if(x.value=!1,u.status===201){m.value=u.body;return}c.value=P(u,"mint a share link")}async function G(){if(m.value)try{await navigator.clipboard.writeText(m.value.url),N("ok","Link copied.")}catch{N("error","Could not reach the clipboard — select the link and copy it.")}}const T=f(!0),S=f(""),k=f(!1),$=F(()=>{var u;return!!((u=n.detail)!=null&&u.stack)&&S.value===n.detail.stack});async function H(){if(!k.value)return;y.value="forget",I.value="",O.value=null;const u=await B.del(`/api/deployments/${encodeURIComponent(n.id)}${_.value}`);if(y.value="",u.ok){N("ok",`Forgot ${n.id}. Nothing was torn down.`),Z(),W.push("/deployments");return}if(u.status===409)return ne(u.body);I.value=P(u,"forget this deployment")}return(u,e)=>{const D=Y("RouterLink");return l(),i("div",null,[s(n).detail&&!s(h)?(l(),i("section",ie,[e[19]||(e[19]=t("h2",{class:"section",style:{"margin-bottom":"var(--s3)"}},"Sleep",-1)),t("p",re,[o(" Takes the "+d(s(n).detail.orchestrator==="swarm"?"swarm stack":"compose project")+" down and ",1),e[14]||(e[14]=t("b",null,"keeps its volumes and every axis",-1)),e[15]||(e[15]=o(". The next request to any of its hostnames brings it back — the visitor sees “spinning up…” for the length of a deploy — and so does ",-1)),e[16]||(e[16]=t("b",null,"Wake",-1)),e[17]||(e[17]=o(" in the header. ",-1)),r(w,{label:"what sleep runs"},{default:p(()=>[t("code",null,d(s(n).detail.orchestrator==="swarm"?"docker stack rm":"docker compose down"),1),e[9]||(e[9]=o(" — without ",-1)),e[10]||(e[10]=t("code",null,"-v",-1)),e[11]||(e[11]=o(", which is the whole difference from tearing down. A spec can schedule this itself with a ",-1)),e[12]||(e[12]=t("code",null,"sleep:",-1)),e[13]||(e[13]=o(" block (idle / after). ",-1))]),_:1})]),t("div",de,[r(U,{pending:s(y)==="sleep",disabled:!!s(y)||s(j)||!!s(E)("sleep"),title:s(E)("sleep"),onClick:e[0]||(e[0]=a=>s(M)("sleep"))},{default:p(()=>[...e[18]||(e[18]=[o(" Sleep now ",-1)])]),_:1},8,["pending","disabled","title"]),s(n).detail.asleep?(l(),i("span",ue," Asleep since "+d(new Date(s(n).detail.asleep.since).toLocaleString())+" ("+d(s(n).detail.asleep.reason)+"). ",1)):v("",!0)])])):v("",!0),s(n).detail?(l(),i("section",pe,[t("div",ve,[e[20]||(e[20]=t("h2",{class:"section"},"Share a read-only link",-1)),e[21]||(e[21]=t("span",{class:"grow"},null,-1)),r(le,{what:"this link",method:"POST",path:`/api/deployments/${encodeURIComponent(s(n).id)}/share`,body:{views:C.value,ttl:g.value}},null,8,["path","body"])]),t("p",me,[e[23]||(e[23]=o(" A URL that opens ",-1)),e[24]||(e[24]=t("b",null,"this deployment only",-1)),e[25]||(e[25]=o(", for someone without an account. It carries a signed token that reaches exactly the views below until it expires. ",-1)),r(w,{label:"what a link can and cannot do"},{default:p(()=>[...e[22]||(e[22]=[o(" Read-only, and scoped: details and logs of this deployment, nothing else — no actions, no terminal, no other deployment. There is no per-link revocation; rotating the host's PSTACK_TOKEN invalidates every link at once, so keep the expiry short. ",-1)])]),_:1})]),t("div",fe,[t("label",ye,[b(t("input",{"onUpdate:modelValue":e[1]||(e[1]=a=>A.value=a),type:"checkbox"},null,512),[[V,A.value]]),e[26]||(e[26]=o(" Details & containers",-1))]),t("label",ke,[b(t("input",{"onUpdate:modelValue":e[2]||(e[2]=a=>R.value=a),type:"checkbox"},null,512),[[V,R.value]]),e[27]||(e[27]=o(" Logs",-1))]),t("div",we,[e[28]||(e[28]=t("label",{for:"share-ttl"},"Expires",-1)),r(ae,{id:"share-ttl",modelValue:g.value,"onUpdate:modelValue":e[3]||(e[3]=a=>g.value=a),label:"How long the link works",options:[{value:"1h",label:"In 1 hour"},{value:"24h",label:"In 24 hours"},{value:"7d",label:"In 7 days"},{value:"30d",label:"In 30 days"}]},null,8,["modelValue"])]),r(U,{variant:"primary",pending:x.value,disabled:x.value||C.value.length===0,title:C.value.length===0?"Pick at least one view.":void 0,onClick:z},{default:p(()=>[...e[29]||(e[29]=[o(" Create link ",-1)])]),_:1},8,["pending","disabled","title"])]),m.value?(l(),i("div",be,[e[30]||(e[30]=t("b",null,"Your link — copy it now.",-1)),t("p",null,[o(" Opens "+d(m.value.views.join(" and "))+" of ",1),t("b",null,d(s(n).id),1),o(" until "+d(new Date(m.value.expiresAt).toLocaleString())+". It is shown once and stored nowhere. ",1)]),t("pre",he,d(m.value.url),1),t("div",ge,[t("button",{onClick:G},"Copy"),t("a",{href:m.value.url,target:"_blank",rel:"noopener"},"Open ↗",8,ce),t("button",{onClick:e[4]||(e[4]=a=>m.value=null)},"Done")])])):v("",!0),c.value?(l(),L(K,{key:1,text:c.value,title:"No link was created."},null,8,["text"])):v("",!0)])):v("",!0),t("section",xe,[e[53]||(e[53]=t("h2",{class:"section",style:{"margin-bottom":"var(--s3)"}},"Tear down",-1)),s(n).detail?(l(),i(q,{key:1},[s(ee)?(l(),i("div",Te,[e[37]||(e[37]=t("b",null,"No access token set.",-1)),t("p",null,[e[35]||(e[35]=o(" Every action below will be refused. Add your token under ",-1)),r(D,{to:"/settings"},{default:p(()=>[...e[34]||(e[34]=[o("Settings",-1)])]),_:1}),e[36]||(e[36]=o(". ",-1))])])):v("",!0),t("p",Se,[o(" Stops and removes this deployment's containers, networks and volumes. "+d(s(te))+" ",1),r(D,{to:`/deployments/${encodeURIComponent(s(n).id)}/config`},{default:p(()=>[...e[38]||(e[38]=[o("change",-1)])]),_:1},8,["to"])]),t("div",$e,[r(U,{variant:"danger",pending:s(y)==="down",disabled:!!s(y)||s(j)||s(h)&&!$.value,title:s(E)("down",$.value),onClick:e[5]||(e[5]=a=>s(M)("down",{verify:T.value,force:s(h)&&$.value}))},{default:p(()=>[o(d(s(h)?"Tear down (force)":"Tear down"),1)]),_:1},8,["pending","disabled","title"]),t("label",Ve,[b(t("input",{"onUpdate:modelValue":e[6]||(e[6]=a=>T.value=a),type:"checkbox"},null,512),[[V,T.value]]),e[39]||(e[39]=o(" Check for leftovers afterwards ",-1))])]),s(j)?(l(),i("p",Ie,[e[41]||(e[41]=o(" Something is already running on ",-1)),t("b",null,d(s(n).detail.stack),1),e[42]||(e[42]=o(". ",-1)),r(w,{label:"why actions wait"},{default:p(()=>[...e[40]||(e[40]=[o(" One action at a time per stack, and they are not queued. A teardown racing a deploy over the same database would corrupt it, so the second request is refused rather than delayed. ",-1)])]),_:1})])):v("",!0),T.value?v("",!0):(l(),i("p",Ue,[...e[43]||(e[43]=[o(" Nothing will check that teardown actually finished. A teardown that silently half-worked is the exact failure this tool exists to catch — run ",-1),t("b",null,"Verify",-1),o(" yourself afterwards. ",-1)])])),s(h)?(l(),i("div",Ae,[e[52]||(e[52]=t("b",null,"Shared — read this before tearing down.",-1)),t("p",null,[e[45]||(e[45]=o(" Tearing this down ",-1)),e[46]||(e[46]=t("b",null,"deletes its stored data",-1)),e[47]||(e[47]=o(": the TLS certificates, the shared database or queue, admin credentials. Nothing here recreates them, so ",-1)),e[48]||(e[48]=t("b",null,"every preview on this host breaks",-1)),e[49]||(e[49]=o(" until someone rebuilds it by hand. The button is the same one that is routine on a single preview. ",-1)),r(w,{label:"what tearing down runs"},{default:p(()=>[t("code",null,d(s(n).detail.orchestrator==="swarm"?"docker stack rm, then docker volume rm on its volumes":"docker compose down -v"),1),e[44]||(e[44]=o(" — removing the volumes is what makes this different from sleeping. ",-1))]),_:1})]),t("div",Re,[t("label",{for:`confirm-${s(n).id}`},[e[50]||(e[50]=o(" Type the stack name ",-1)),t("b",null,d(s(n).detail.stack),1),e[51]||(e[51]=o(" to confirm ",-1))],8,De),b(t("input",{id:`confirm-${s(n).id}`,"onUpdate:modelValue":e[7]||(e[7]=a=>S.value=a),type:"text",placeholder:s(n).detail.stack,spellcheck:"false",autocomplete:"off"},null,8,Le),[[Q,S.value,void 0,{trim:!0}]])]),S.value&&!$.value?(l(),i("p",Ne," That does not match, so tearing down stays disabled. ")):v("",!0)])):v("",!0),s(I)?(l(),L(K,{key:4,text:s(I),title:"The action was refused."},null,8,["text"])):v("",!0),s(O)?(l(),L(oe,{key:5,conflict:s(O),"job-id":s(se)},null,8,["conflict","job-id"])):v("",!0)],64)):(l(),i("p",Ce,[e[32]||(e[32]=o(" Unavailable until this deployment's variables are filled in — without them its stack has no name to act on. Set them under ",-1)),r(D,{to:`/deployments/${encodeURIComponent(s(n).id)}/config`},{default:p(()=>[...e[31]||(e[31]=[o(" Config & variables ",-1)])]),_:1},8,["to"]),e[33]||(e[33]=o("first. ",-1))]))]),t("section",Ee,[e[62]||(e[62]=t("h2",{class:"section",style:{"margin-bottom":"var(--s3)"}},"Forget this deployment",-1)),s(n).detail?(l(),i(q,{key:1},[t("p",Oe,[e[55]||(e[55]=o(" This removes the ",-1)),e[56]||(e[56]=t("em",null,"record only",-1)),e[57]||(e[57]=o(" — ",-1)),e[58]||(e[58]=t("b",null,"it never tears anything down",-1)),e[59]||(e[59]=o(". Afterwards nothing here knows how to remove whatever this deployment created. ",-1)),r(w,{label:"when forgetting is refused"},{default:p(()=>[...e[54]||(e[54]=[o(" Refused while any container for this stack still exists — and refused just as firmly when docker cannot be reached, because “cannot confirm” is not evidence of absence. What is deleted is the stored spec, compose file and metadata. ",-1)])]),_:1})]),t("div",qe,[t("label",Fe,[b(t("input",{"onUpdate:modelValue":e[8]||(e[8]=a=>k.value=a),type:"checkbox"},null,512),[[V,k.value]]),e[60]||(e[60]=o(" I have torn this down and want the record removed ",-1))]),r(U,{variant:"danger",pending:s(y)==="forget",disabled:!k.value||!!s(y),title:k.value?void 0:"Confirm you have torn this down first.",onClick:H},{default:p(()=>[...e[61]||(e[61]=[o(" Forget ",-1)])]),_:1},8,["pending","disabled","title"])])],64)):(l(),i("p",je," Unavailable until the variables are filled in: this stack's containers are counted before the record can be forgotten, and that needs its name. "))])])}}});export{Ze as default};
2
- //# sourceMappingURL=DangerTab-XshYLxAZ.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DangerTab-XshYLxAZ.js","sources":["../../src/views/tabs/DangerTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Teardown and forgetting — everything on this page destroys something, and NOTHING else is here.\n *\n * Deploy and Verify used to live on this tab too, which meant the product's primary action was\n * filed under \"Danger\". They moved to the detail header (`useDeploymentActions`); this tab now\n * carries exactly what its name promises.\n *\n * The two guards that matter:\n *\n * 1. TYPED CONFIRMATION FOR A SHARED `down`. A checkbox is one stray click; typing a name is a\n * decision. The typed string is the resolved STACK NAME — not the deployment id — because the\n * stack is the actual blast target, it is what the server's own 409 refusal names, and it is\n * what `compose down -v` will be pointed at. The server holds the authoritative guard\n * (`down()` refuses without `force`, and the API answers 409 before starting a job), so this\n * is defence in depth, not the only barrier.\n *\n * 2. FORGETTING IS NOT TEARING DOWN. `DELETE` removes the record and never touches a container.\n * The server refuses with 409 while any container exists — and refuses just as firmly when\n * docker did not answer, because \"cannot confirm\" is not evidence of absence.\n */\nimport { computed, ref } from 'vue';\nimport { useRouter } from 'vue-router';\nimport { api, problem } from '../../api/client';\nimport type { ConflictBody, ShareLink, ShareView } from '../../api/types';\nimport { dep, isShared, varsQuery } from '../../composables/useDeployment';\nimport {\n act,\n actionError,\n busy,\n conflict,\n conflictJobId,\n onConflict,\n pending,\n tokenMissing,\n varsSummary,\n whyDisabled,\n} from '../../composables/useDeploymentActions';\nimport { loadDeployments } from '../../composables/useControlPlane';\nimport { toast } from '../../composables/useToasts';\nimport ActionButton from '../../components/ActionButton.vue';\nimport ConflictNote from '../../components/ConflictNote.vue';\nimport InfoHint from '../../components/InfoHint.vue';\nimport ErrorNote from '../../components/ErrorNote.vue';\nimport EquivalentCommand from '../../components/EquivalentCommand.vue';\nimport SelectMenu from '../../components/SelectMenu.vue';\n\nconst router = useRouter();\n\n// ── share link ──────────────────────────────────────────────────────────────────────────────────\n// Here rather than on Overview because it MINTS A CREDENTIAL: a URL that reads this deployment's\n// logs until it expires, with no per-link revocation. The result is shown once and held in\n// component state only — never in Settings, never in storage, never in a toast.\nconst shareDetails = ref(true);\nconst shareLogs = ref(true);\nconst shareTtl = ref('7d');\nconst shareLink = ref<ShareLink | null>(null);\nconst shareError = ref('');\nconst sharePending = ref(false);\nconst shareViews = computed<ShareView[]>(() => [\n ...(shareDetails.value ? (['details'] as const) : []),\n ...(shareLogs.value ? (['logs'] as const) : []),\n]);\n\nasync function share(): Promise<void> {\n sharePending.value = true;\n shareError.value = '';\n shareLink.value = null;\n const r = await api.post<ShareLink>(`/api/deployments/${encodeURIComponent(dep.id)}/share`, {\n views: shareViews.value,\n ttl: shareTtl.value,\n });\n sharePending.value = false;\n if (r.status === 201) {\n shareLink.value = r.body;\n return;\n }\n shareError.value = problem(r, 'mint a share link');\n}\n\nasync function copyShare(): Promise<void> {\n if (!shareLink.value) return;\n try {\n await navigator.clipboard.writeText(shareLink.value.url);\n toast('ok', 'Link copied.');\n } catch {\n toast('error', 'Could not reach the clipboard — select the link and copy it.');\n }\n}\n\nconst downVerify = ref(true);\nconst forceTyped = ref('');\nconst forgetArmed = ref(false);\n\n/** Exact match against the resolved stack name. Nothing looser — no trim-insensitive, no prefix. */\nconst forceArmed = computed(\n () => !!dep.detail?.stack && forceTyped.value === dep.detail.stack,\n);\n\nasync function forget(): Promise<void> {\n if (!forgetArmed.value) return;\n pending.value = 'forget';\n actionError.value = '';\n conflict.value = null;\n\n const r = await api.del<ConflictBody>(\n `/api/deployments/${encodeURIComponent(dep.id)}${varsQuery.value}`,\n );\n pending.value = '';\n\n if (r.ok) {\n toast('ok', `Forgot ${dep.id}. Nothing was torn down.`);\n void loadDeployments();\n void router.push('/deployments');\n return;\n }\n if (r.status === 409) return onConflict(r.body);\n actionError.value = problem(r, 'forget this deployment');\n}\n</script>\n\n<template>\n <div>\n <!-- ============================ sleep ============================ -->\n <section v-if=\"dep.detail && !isShared\" class=\"panel\">\n <h2 class=\"section\" style=\"margin-bottom: var(--s3)\">Sleep</h2>\n <p class=\"dim\">\n Takes the {{ dep.detail.orchestrator === 'swarm' ? 'swarm stack' : 'compose project' }} down and\n <b>keeps its volumes and every axis</b>. The next request to any of its hostnames brings it\n back — the visitor sees “spinning up…” for the length of a deploy — and so does <b>Wake</b> in\n the header.\n <InfoHint label=\"what sleep runs\">\n <code>{{ dep.detail.orchestrator === 'swarm' ? 'docker stack rm' : 'docker compose down' }}</code>\n — without <code>-v</code>, which is the whole difference from tearing down. A spec can\n schedule this itself with a <code>sleep:</code> block (idle / after).\n </InfoHint>\n </p>\n <div class=\"row\" style=\"margin-top: var(--s3)\">\n <ActionButton\n :pending=\"pending === 'sleep'\"\n :disabled=\"!!pending || busy || !!whyDisabled('sleep')\"\n :title=\"whyDisabled('sleep')\"\n @click=\"act('sleep')\"\n >\n Sleep now\n </ActionButton>\n <span v-if=\"dep.detail.asleep\" class=\"mute\">\n Asleep since {{ new Date(dep.detail.asleep.since).toLocaleString() }} ({{ dep.detail.asleep.reason }}).\n </span>\n </div>\n </section>\n\n <!-- ============================ share ============================ -->\n <section v-if=\"dep.detail\" class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Share a read-only link</h2>\n <span class=\"grow\" />\n <EquivalentCommand\n what=\"this link\"\n method=\"POST\"\n :path=\"`/api/deployments/${encodeURIComponent(dep.id)}/share`\"\n :body=\"{ views: shareViews, ttl: shareTtl }\"\n />\n </div>\n <p class=\"dim\">\n A URL that opens <b>this deployment only</b>, for someone without an account. It carries a\n signed token that reaches exactly the views below until it expires.\n <InfoHint label=\"what a link can and cannot do\">\n Read-only, and scoped: details and logs of this deployment, nothing else — no actions, no\n terminal, no other deployment. There is no per-link revocation; rotating the host's\n PSTACK_TOKEN invalidates every link at once, so keep the expiry short.\n </InfoHint>\n </p>\n <div class=\"row\" style=\"margin-top: var(--s3); flex-wrap: wrap; gap: var(--s3)\">\n <label class=\"check\"><input v-model=\"shareDetails\" type=\"checkbox\" /> Details &amp; containers</label>\n <label class=\"check\"><input v-model=\"shareLogs\" type=\"checkbox\" /> Logs</label>\n <div class=\"field inline\">\n <label for=\"share-ttl\">Expires</label>\n <SelectMenu\n id=\"share-ttl\"\n v-model=\"shareTtl\"\n label=\"How long the link works\"\n :options=\"[\n { value: '1h', label: 'In 1 hour' },\n { value: '24h', label: 'In 24 hours' },\n { value: '7d', label: 'In 7 days' },\n { value: '30d', label: 'In 30 days' },\n ]\"\n />\n </div>\n <ActionButton\n variant=\"primary\"\n :pending=\"sharePending\"\n :disabled=\"sharePending || shareViews.length === 0\"\n :title=\"shareViews.length === 0 ? 'Pick at least one view.' : undefined\"\n @click=\"share\"\n >\n Create link\n </ActionButton>\n </div>\n <div v-if=\"shareLink\" class=\"banner ok\" style=\"margin-top: var(--s3)\">\n <b>Your link — copy it now.</b>\n <p>\n Opens {{ shareLink.views.join(' and ') }} of <b>{{ dep.id }}</b> until\n {{ new Date(shareLink.expiresAt).toLocaleString() }}. It is shown once and stored nowhere.\n </p>\n <pre class=\"code\" style=\"white-space: pre-wrap; word-break: break-all\">{{ shareLink.url }}</pre>\n <div class=\"row\">\n <button @click=\"copyShare\">Copy</button>\n <a :href=\"shareLink.url\" target=\"_blank\" rel=\"noopener\">Open ↗</a>\n <button @click=\"shareLink = null\">Done</button>\n </div>\n </div>\n <ErrorNote v-if=\"shareError\" :text=\"shareError\" title=\"No link was created.\" />\n </section>\n\n <section class=\"panel\">\n <h2 class=\"section\" style=\"margin-bottom: var(--s3)\">Tear down</h2>\n\n <p v-if=\"!dep.detail\" class=\"mute\">\n Unavailable until this deployment's variables are filled in — without them its stack has no\n name to act on. Set them under\n <RouterLink :to=\"`/deployments/${encodeURIComponent(dep.id)}/config`\">\n Config &amp; variables </RouterLink\n >first.\n </p>\n\n <template v-else>\n <div v-if=\"tokenMissing\" class=\"banner warn\">\n <b>No access token set.</b>\n <p>\n Every action below will be refused. Add your token under\n <RouterLink to=\"/settings\">Settings</RouterLink>.\n </p>\n </div>\n\n <p class=\"dim\">\n Stops and removes this deployment's containers, networks and volumes.\n {{ varsSummary }}\n <RouterLink :to=\"`/deployments/${encodeURIComponent(dep.id)}/config`\">change</RouterLink>\n </p>\n\n <div class=\"row\" style=\"margin-top: var(--s3)\">\n <ActionButton\n variant=\"danger\"\n :pending=\"pending === 'down'\"\n :disabled=\"!!pending || busy || (isShared && !forceArmed)\"\n :title=\"whyDisabled('down', forceArmed)\"\n @click=\"act('down', { verify: downVerify, force: isShared && forceArmed })\"\n >\n {{ isShared ? 'Tear down (force)' : 'Tear down' }}\n </ActionButton>\n <label class=\"check\">\n <input v-model=\"downVerify\" type=\"checkbox\" />\n Check for leftovers afterwards\n </label>\n </div>\n\n <p v-if=\"busy\" class=\"hint\">\n Something is already running on <b>{{ dep.detail.stack }}</b>.\n <InfoHint label=\"why actions wait\">\n One action at a time per stack, and they are not queued. A teardown racing a deploy over\n the same database would corrupt it, so the second request is refused rather than delayed.\n </InfoHint>\n </p>\n <p v-if=\"!downVerify\" class=\"hint\">\n Nothing will check that teardown actually finished. A teardown that silently half-worked is\n the exact failure this tool exists to catch — run <b>Verify</b> yourself afterwards.\n </p>\n\n <!--\n Gate 1 of 2. The typed name is the point: a checkbox is one stray click, typing the stack\n name is a decision.\n -->\n <div v-if=\"isShared\" class=\"banner leaked\">\n <b>Shared — read this before tearing down.</b>\n <p>\n Tearing this down <b>deletes its stored data</b>: the TLS certificates, the shared\n database or queue, admin credentials. Nothing here recreates them, so\n <b>every preview on this host breaks</b> until someone rebuilds it by hand. The button is\n the same one that is routine on a single preview.\n <InfoHint label=\"what tearing down runs\">\n <code>{{ dep.detail.orchestrator === 'swarm' ? 'docker stack rm, then docker volume rm on its volumes' : 'docker compose down -v' }}</code>\n — removing the volumes is what makes this different from sleeping.\n </InfoHint>\n </p>\n <div class=\"field\" style=\"margin-top: var(--s3); max-width: 380px\">\n <label :for=\"`confirm-${dep.id}`\">\n Type the stack name <b>{{ dep.detail.stack }}</b> to confirm\n </label>\n <input\n :id=\"`confirm-${dep.id}`\"\n v-model.trim=\"forceTyped\"\n type=\"text\"\n :placeholder=\"dep.detail.stack\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n />\n </div>\n <p v-if=\"forceTyped && !forceArmed\" class=\"s-failed\">\n That does not match, so tearing down stays disabled.\n </p>\n </div>\n\n <ErrorNote v-if=\"actionError\" :text=\"actionError\" title=\"The action was refused.\" />\n <ConflictNote v-if=\"conflict\" :conflict=\"conflict\" :job-id=\"conflictJobId\" />\n </template>\n </section>\n\n <!-- ============================ forget ============================ -->\n <section class=\"panel\">\n <h2 class=\"section\" style=\"margin-bottom: var(--s3)\">Forget this deployment</h2>\n\n <p v-if=\"!dep.detail\" class=\"mute\">\n Unavailable until the variables are filled in: this stack's containers are counted before the\n record can be forgotten, and that needs its name.\n </p>\n <template v-else>\n <p class=\"dim\">\n This removes the <em>record only</em> — <b>it never tears anything down</b>. Afterwards\n nothing here knows how to remove whatever this deployment created.\n <InfoHint label=\"when forgetting is refused\">\n Refused while any container for this stack still exists — and refused just as firmly when\n docker cannot be reached, because “cannot confirm” is not evidence of absence. What is\n deleted is the stored spec, compose file and metadata.\n </InfoHint>\n </p>\n <div class=\"row\" style=\"margin-top: var(--s3)\">\n <label class=\"check\">\n <input v-model=\"forgetArmed\" type=\"checkbox\" />\n I have torn this down and want the record removed\n </label>\n <ActionButton\n variant=\"danger\"\n :pending=\"pending === 'forget'\"\n :disabled=\"!forgetArmed || !!pending\"\n :title=\"forgetArmed ? undefined : 'Confirm you have torn this down first.'\"\n @click=\"forget\"\n >\n Forget\n </ActionButton>\n </div>\n </template>\n </section>\n </div>\n</template>\n"],"names":["router","useRouter","shareDetails","ref","shareLogs","shareTtl","shareLink","shareError","sharePending","shareViews","computed","share","r","api","dep","problem","copyShare","toast","downVerify","forceTyped","forgetArmed","forceArmed","_a","forget","pending","actionError","conflict","varsQuery","loadDeployments","onConflict","_createElementBlock","_unref","isShared","_openBlock","_hoisted_1","_createElementVNode","_hoisted_2","_createTextVNode","_cache","_createVNode","InfoHint","_toDisplayString","_hoisted_3","ActionButton","busy","whyDisabled","act","_hoisted_4","_hoisted_5","_hoisted_6","EquivalentCommand","_hoisted_7","_hoisted_8","_hoisted_9","$event","_hoisted_10","_hoisted_11","SelectMenu","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_createBlock","ErrorNote","_hoisted_16","_Fragment","tokenMissing","_hoisted_18","_component_RouterLink","_hoisted_19","varsSummary","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_28","ConflictNote","conflictJobId","_hoisted_17","_hoisted_29","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_30"],"mappings":"22DA+CA,MAAMA,EAASC,EAAA,EAMTC,EAAeC,EAAI,EAAI,EACvBC,EAAYD,EAAI,EAAI,EACpBE,EAAWF,EAAI,IAAI,EACnBG,EAAYH,EAAsB,IAAI,EACtCI,EAAaJ,EAAI,EAAE,EACnBK,EAAeL,EAAI,EAAK,EACxBM,EAAaC,EAAsB,IAAM,CAC7C,GAAIR,EAAa,MAAS,CAAC,SAAS,EAAc,CAAA,EAClD,GAAIE,EAAU,MAAS,CAAC,MAAM,EAAc,CAAA,CAAC,CAC9C,EAED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AA,EAAAH,EAAoB,UAAhB,cAAW,EAAA,mBAAK,MAAG,EAAA,GAAAG,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAH,EAAmC,SAAhC,+BAA4B,EAAA,mBAAI,mFAE3E,EAAA,GAAAI,EAIWC,EAAA,CAJD,MAAM,8BAA4B,WAAC,IAI7C,CAAA,GAAAF,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAJ6C,4OAI7C,EAAA,CAAA,aAEFH,EAcM,MAdNgD,GAcM,CAbJhD,EAGQ,QAHRiD,GAGQ,GAFNjD,EAA+C,QAAA,sCAA/Bf,EAAW,MAAAkC,GAAE,KAAK,UAAA,gBAAlBlC,EAAA,KAAW,CAAA,mBAAoB,sDAEjD,EAAA,EAAA,GACAmB,EAQeI,EAAA,CAPb,QAAQ,SACP,QAASZ,EAAAP,CAAA,IAAO,SAChB,SAAQ,CAAGJ,EAAA,OAAW,CAAA,CAAMW,EAAAP,CAAA,EAC5B,MAAOJ,EAAA,MAAc,OAAS,yCAC9B,QAAOG,CAAA,aACT,IAED,CAAA,GAAAe,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAFC,WAED,EAAA,CAAA,yDA3BJR,EAGI,IAHJuD,GAAmC,mJAGnC"}
@@ -1,2 +0,0 @@
1
- import{d as N,s as R,c as a,a as e,e as u,u as t,x as w,t as l,f as r,w as c,_ as k,F as m,y as z,g as h,z as g,A as v,B as i,r as C,n as S,C as $,j as V,k as I,o,D as j,E as x,G as H,H as J}from"./index-BXPaPWhH.js";import{a as U,b as F,t as P}from"./useFormat-DIlTY5Dl.js";import{_ as T}from"./StateBadge.vue_vue_type_script_setup_true_lang-m8_cteEx.js";import{_ as D}from"./SkeletonList.vue_vue_type_script_setup_true_lang-DMdwApyt.js";import{_ as q}from"./RefreshButton.vue_vue_type_script_setup_true_lang-C7qymrfD.js";const G={class:"page-head"},M={key:0,class:"banner leaked land"},O={class:"grid-2"},Y={class:"panel"},K={class:"phead"},Q={key:0,class:"badge"},W={key:0,class:"s-failed"},X={key:0,class:"banner warn"},Z={key:1,class:"banner warn"},ss={key:2,class:"banner failed"},es={key:3,class:"cards"},ts={class:"stagger"},os={class:"name","data-label":"service"},ns={class:"name dim","data-label":"image"},as={class:"panel"},ls={class:"phead"},rs={key:0,class:"s-failed"},is={class:"stats"},ds=["data-zero"],us={class:"v"},cs=["data-zero"],hs={class:"v"},vs=["data-zero"],ms={class:"v"},ps=["data-zero"],ks={class:"v"},ys=["data-zero"],bs={class:"v"},gs={key:0,class:"stat unknown"},fs={class:"v"},_s={key:0,class:"hint"},ws={key:1,class:"hint"},zs={class:"panel"},Cs={class:"phead"},Ds={key:0,class:"s-failed"},Es={key:2,class:"kvlist stagger"},As={class:"k"},Bs={class:"v"},js={class:"mute",style:{"font-size":"var(--t-xs)"}},xs={key:0,class:"mute"},Is=N({__name:"DashboardView",setup(Ls){const d=C(null),y=C(""),E=C(!1);async function L(){await Promise.all([f(),H(),J()])}async function f(){const b=await S.get("/api/control");if(E.value=!0,!b.ok){y.value=$(b,"load the control stack");return}y.value="";const s=b.body;d.value={project:s.project??"",reachable:s.reachable!==!1,parseError:!!s.parseError,services:Array.isArray(s.services)?s.services:[],managedBy:s.managedBy??"",actionable:s.actionable===!0,note:s.note??""}}R(()=>void f(),1e4);const A=V(()=>v.jobs.slice(0,8));return(b,s)=>{var B;const p=I("RouterLink");return o(),a("div",null,[e("div",G,[s[0]||(s[0]=e("div",null,[e("h1",null,"Dashboard"),e("div",{class:"sub"},"Everything running on this host.")],-1)),s[1]||(s[1]=e("span",{class:"grow"},null,-1)),u(q,{run:L})]),t(w).length?(o(),a("div",M,[e("b",null,l(t(w).length)+" teardown(s) left something behind.",1),e("p",null,[s[3]||(s[3]=r(" Something survived being torn down, and nothing else is going to remove it. ",-1)),u(k,{label:"what was already cleaned up"},{default:c(()=>[...s[2]||(s[2]=[e("code",null,"compose down -v",-1),r(" removed the containers, volumes and networks — whatever is left is outside compose's reach. ",-1)])]),_:1}),(o(!0),a(m,null,z(t(w).slice(0,3),n=>(o(),g(p,{key:n.id,to:`/jobs/${encodeURIComponent(n.id)}`,style:{"margin-left":"8px"}},{default:c(()=>[r(l(n.stack)+" →",1)]),_:2},1032,["to"]))),128))])])):h("",!0),e("div",O,[e("section",Y,[e("div",K,[s[5]||(s[5]=e("h2",{class:"section"},"Control stack",-1)),u(k,{label:"why there are no actions here"},{default:c(()=>{var n;return[s[4]||(s[4]=r(" pstack itself runs in this stack, so starting or stopping it here would kill the process handling the request — and a failed self-upgrade would leave the host with no control plane and no way back in. It is managed from the host instead. ",-1)),(n=d.value)!=null&&n.managedBy?(o(),a(m,{key:0},[r("Managed by "+l(d.value.managedBy)+".",1)],64)):h("",!0)]}),_:1}),(B=d.value)!=null&&B.project?(o(),a("span",Q,l(d.value.project),1)):h("",!0),s[6]||(s[6]=e("span",{class:"grow"},null,-1)),e("button",{class:"sm ghost",onClick:f},"Refresh")]),y.value?(o(),a("p",W,l(y.value),1)):E.value?d.value?(o(),a(m,{key:2},[d.value.reachable?d.value.parseError?(o(),a("div",Z,[...s[10]||(s[10]=[e("b",null,"Docker's answer could not be read.",-1),e("p",null,"Service state is unknown for this refresh; the stack itself may be fine.",-1)])])):d.value.services.length?h("",!0):(o(),a("div",ss,[...s[11]||(s[11]=[e("b",null,"Nothing is running in this project.",-1),e("p",null," Docker answered clearly, so the control stack really is down — yet you are reading a page it serves. You are most likely reaching it by some other route. ",-1)])])):(o(),a("div",X,[s[9]||(s[9]=e("b",null,"Docker did not answer.",-1)),e("p",null,[s[8]||(s[8]=r(" Check Docker is running, then refresh. ",-1)),u(k,{label:"why this is not the same as nothing running"},{default:c(()=>[...s[7]||(s[7]=[r(" This is ",-1),e("em",null,"not",-1),r(" the same as “nothing is running”: the control stack may be perfectly healthy while this process cannot reach the Docker socket. ",-1)])]),_:1})])])),d.value.services.length?(o(),a("table",es,[s[12]||(s[12]=e("thead",null,[e("tr",null,[e("th",null,"Service"),e("th",null,"State"),e("th",null,"Health"),e("th",null,"Image")])],-1)),e("tbody",ts,[(o(!0),a(m,null,z(d.value.services,(n,_)=>(o(),a("tr",{key:n.name,style:j({"--i":_})},[e("td",os,l(n.name),1),e("td",{"data-label":"state",class:x(n.state==="running"?"s-ok":"s-failed")},l(n.state||"—"),3),e("td",{"data-label":"health",class:x(n.health==="healthy"?"s-ok":n.health?"s-failed":"")},l(n.health||"—"),3),e("td",ns,l(n.image||"—"),1)],4))),128))])])):h("",!0)],64)):h("",!0):(o(),g(D,{key:1,rows:3}))]),e("div",null,[e("section",as,[e("div",ls,[s[14]||(s[14]=e("h2",{class:"section"},"Deployments",-1)),s[15]||(s[15]=e("span",{class:"grow"},null,-1)),u(p,{to:"/deployments"},{default:c(()=>[...s[13]||(s[13]=[r("all →",-1)])]),_:1})]),t(v).deploymentsError?(o(),a("p",rs,l(t(v).deploymentsError),1)):t(v).deploymentsLoaded?(o(),a(m,{key:2},[e("div",is,[e("div",{class:"stat","data-zero":t(i).total===0},[e("div",us,l(t(i).total),1),s[16]||(s[16]=e("div",{class:"k"},"total",-1))],8,ds),e("div",{class:"stat","data-zero":t(i).isolated===0},[e("div",hs,l(t(i).isolated),1),s[17]||(s[17]=e("div",{class:"k"},"isolated",-1))],8,cs),e("div",{class:"stat","data-zero":t(i).shared===0},[e("div",ms,l(t(i).shared),1),s[18]||(s[18]=e("div",{class:"k"},"shared",-1))],8,vs),e("div",{class:"stat","data-zero":t(i).running===0},[e("div",ks,l(t(i).running),1),s[19]||(s[19]=e("div",{class:"k"},"running",-1))],8,ps),e("div",{class:"stat busy","data-zero":t(i).busy===0},[e("div",bs,l(t(i).busy),1),s[20]||(s[20]=e("div",{class:"k"},"busy",-1))],8,ys),t(i).unknown?(o(),a("div",gs,[e("div",fs,l(t(i).unknown),1),s[21]||(s[21]=e("div",{class:"k"},"unknown",-1))])):h("",!0)]),t(i).unresolved?(o(),a("p",_s,[r(l(t(i).unresolved)+" deployment(s) are missing variables. ",1),u(p,{to:"/deployments"},{default:c(()=>[...s[22]||(s[22]=[r("Open one and set them.",-1)])]),_:1})])):t(i).unknown?(o(),a("p",ws,[s[24]||(s[24]=r(" “Unknown” means it could not be determined ",-1)),u(k,{label:"what unknown means"},{default:c(()=>[...s[23]||(s[23]=[r(" — ",-1),e("em",null,"not",-1),r(" that the deployment is idle. An unknown is never counted as a zero, which is how a live stack gets reported as torn down. ",-1)])]),_:1})])):h("",!0)],64)):(o(),g(D,{key:1,rows:2,tall:""}))]),e("section",zs,[e("div",Cs,[s[26]||(s[26]=e("h2",{class:"section"},"Recent jobs",-1)),s[27]||(s[27]=e("span",{class:"grow"},null,-1)),u(p,{to:"/jobs"},{default:c(()=>[...s[25]||(s[25]=[r("all →",-1)])]),_:1})]),t(v).jobsError?(o(),a("p",Ds,l(t(v).jobsError),1)):t(v).jobsLoaded?(o(),a("ul",Es,[(o(!0),a(m,null,z(A.value,(n,_)=>(o(),a("li",{key:n.id,style:j({"--i":_})},[e("span",As,[u(T,{state:n.state},null,8,["state"])]),e("span",Bs,[u(p,{to:`/jobs/${encodeURIComponent(n.id)}`},{default:c(()=>[r(l(t(U)(n.action))+" "+l(n.stack),1)]),_:2},1032,["to"]),e("span",js," · "+l(t(F)(n.startedAt))+" · "+l(t(P)(n.startedAt,n.endedAt)),1)])],4))),128)),A.value.length?h("",!0):(o(),a("li",xs,[s[29]||(s[29]=r(" No jobs yet. ",-1)),u(k,{label:"how long job history is kept"},{default:c(()=>[...s[28]||(s[28]=[r(" History is held in memory, so restarting the server clears it. A job record is the transcript of an attempt, not the truth about what exists now. ",-1)])]),_:1})]))])):(o(),g(D,{key:1,rows:4}))])])])])}}});export{Is as default};
2
- //# sourceMappingURL=DashboardView-DqIE-Aof.js.map
@@ -1,2 +0,0 @@
1
- import{d as N,J as R,c as n,a as l,e as p,w as i,t as b,u as e,f as o,E as S,g as r,z as u,F as z,y as q,_ as V,k as T,o as s,T as E,l as U,N as j}from"./index-BXPaPWhH.js";import{s as F}from"./useFormat-DIlTY5Dl.js";import{d as a,l as J,i as O,o as W}from"./useDeployment-BDHMCIYu.js";import{a as v,w as g,p as m,b as k,c as h,d as A,e as G,_ as H,r as K}from"./ConflictNote.vue_vue_type_script_setup_true_lang-cZYd7gRK.js";import{_ as w}from"./ActionButton.vue_vue_type_script_setup_true_lang-CxT4O7XN.js";import{_ as B}from"./ErrorNote.vue_vue_type_script_setup_true_lang-B5-EJpIO.js";import{_ as M}from"./RefreshButton.vue_vue_type_script_setup_true_lang-C7qymrfD.js";import"./useVars-VN9gYdR6.js";const P={class:"page-head"},Q={class:"mute",style:{"font-size":"var(--t-sm)"}},X={style:{"font-size":"var(--t-xl)"}},Y={class:"sub"},Z={key:0},ee={key:1},te={key:2},se={key:1,class:"badge busy"},ae=["title"],oe={key:3,class:"badge",title:"deployed as a swarm stack"},ne={key:4,class:"row",style:{"flex-wrap":"nowrap"}},le={class:"tabs","aria-label":"Deployment sections"},ie={key:3,class:"hint"},re={key:4,class:"hint",style:{"margin-bottom":"var(--s4)"}},ge=N({__name:"DeploymentDetailView",props:{id:{}},setup(f){const _=f,c=U(),I=[{to:"overview",label:"Overview"},{to:"runtime",label:"Containers & routes"},{to:"config",label:"Config & variables"},{to:"axes",label:"Axes"},{to:"requires",label:"Requires"},{to:"logs",label:"Logs"},{to:"terminal",label:"Terminal"},{to:"danger",label:"Danger"}];return R(()=>_.id,y=>{W(y),K()},{immediate:!0}),R(()=>a.error,y=>{y&&c.currentRoute.value.name==="d.overview"&&c.replace(`/deployments/${encodeURIComponent(_.id)}/config`)}),(y,t)=>{var x,$,D;const C=T("RouterLink"),L=T("RouterView");return s(),n("div",null,[l("div",P,[l("div",null,[l("div",Q,[p(C,{to:"/deployments"},{default:i(()=>[...t[3]||(t[3]=[o("← Deployments",-1)])]),_:1})]),l("h1",X,b(f.id),1),l("div",Y,[e(a).detail?(s(),n("span",Z,[t[4]||(t[4]=o(" stack ",-1)),l("b",null,b(e(a).detail.stack),1)])):e(a).error?(s(),n("span",ee,"unresolved")):(s(),n("span",te,"loading…"))])]),t[10]||(t[10]=l("span",{class:"grow"},null,-1)),e(a).detail?(s(),n("span",{key:0,class:S(["badge",e(a).detail.kind])},b(e(F)(e(a).detail.kind)),3)):r("",!0),((x=e(a).detail)==null?void 0:x.busy)===!0?(s(),n("span",se,[...t[5]||(t[5]=[l("span",{class:"dot pulse"},null,-1),o("busy",-1)])])):($=e(a).detail)!=null&&$.asleep?(s(),n("span",{key:2,class:"badge asleep",title:`asleep since ${new Date(e(a).detail.asleep.since).toLocaleString()} (${e(a).detail.asleep.reason})`},[...t[6]||(t[6]=[l("span",{class:"dot"},null,-1),o("asleep",-1)])],8,ae)):r("",!0),((D=e(a).detail)==null?void 0:D.orchestrator)==="swarm"?(s(),n("span",oe,"swarm")):r("",!0),e(a).detail?(s(),n("div",ne,[p(M,{run:e(J),label:"Re-resolve",title:"Read this deployment again and re-run its variable substitution"},null,8,["run"]),e(a).detail.asleep?(s(),u(w,{key:0,variant:"primary",pending:e(m)==="wake",disabled:!!e(m)||e(k),title:e(g)("wake"),onClick:t[0]||(t[0]=d=>e(v)("wake"))},{default:i(()=>[...t[7]||(t[7]=[o(" Wake ",-1)])]),_:1},8,["pending","disabled","title"])):(s(),u(w,{key:1,variant:"primary",pending:e(m)==="up",disabled:!!e(m)||e(k),title:e(g)("up"),onClick:t[1]||(t[1]=d=>e(v)("up"))},{default:i(()=>[...t[8]||(t[8]=[o(" Deploy ",-1)])]),_:1},8,["pending","disabled","title"])),p(w,{pending:e(m)==="verify",disabled:!!e(m)||e(k),title:e(g)("verify"),onClick:t[2]||(t[2]=d=>e(v)("verify"))},{default:i(()=>[...t[9]||(t[9]=[o(" Verify ",-1)])]),_:1},8,["pending","disabled","title"])])):r("",!0)]),e(h)?(s(),u(B,{key:0,text:e(h),title:"The action was refused."},null,8,["text"])):r("",!0),e(A)?(s(),u(H,{key:1,conflict:e(A),"job-id":e(G),style:{"margin-bottom":"var(--s4)"}},null,8,["conflict","job-id"])):r("",!0),l("nav",le,[(s(),n(z,null,q(I,d=>p(C,{key:d.to,to:`/deployments/${encodeURIComponent(f.id)}/${d.to}`},{default:i(()=>[o(b(d.label),1)]),_:2},1032,["to"])),64))]),e(a).error?(s(),u(B,{key:2,text:e(a).error,title:"Could not resolve this deployment."},null,8,["text"])):r("",!0),e(a).error?(s(),n("p",ie,[t[12]||(t[12]=o(" If that message names a variable, add it under ",-1)),t[13]||(t[13]=l("b",null,"Config & variables",-1)),t[14]||(t[14]=o(" and press ",-1)),t[15]||(t[15]=l("b",null,"Apply & reload",-1)),t[16]||(t[16]=o(". ",-1)),p(V,{label:"why the rest of the page is unavailable"},{default:i(()=>[...t[11]||(t[11]=[o(" Until the spec resolves there is no stack name, and every action on this deployment needs one. ",-1)])]),_:1})])):r("",!0),e(O)?(s(),n("p",re,[t[18]||(t[18]=o(" Shared with every preview on this host. ",-1)),p(V,{label:"what a shared deployment is"},{default:i(()=>[...t[17]||(t[17]=[o(" A host singleton that previews borrow — a database, a queue, a registry mirror. It declares no axes, and tearing it down needs an explicit confirmation, because doing so destroys state every other deployment depends on. ",-1)])]),_:1})])):r("",!0),p(L,null,{default:i(({Component:d})=>[p(E,{name:"view",mode:"out-in"},{default:i(()=>[(s(),u(j(d)))]),_:2},1024)]),_:1})])}}});export{ge as default};
2
- //# sourceMappingURL=DeploymentDetailView-nFBQCzq0.js.map
@@ -1,2 +0,0 @@
1
- import{d as x,o as l,c as n,a as s,f as a,t as i,u as r,B as g,e as d,G as B,w as v,i as _,v as L,g as f,I as N,A as m,z as R,F as b,y as $,r as h,j as C,k as D,D as U,E as I}from"./index-BXPaPWhH.js";import{s as A}from"./useFormat-DIlTY5Dl.js";import{_ as q}from"./SkeletonList.vue_vue_type_script_setup_true_lang-DMdwApyt.js";import{_ as z}from"./RelativeTime.vue_vue_type_script_setup_true_lang-BoNYQAdk.js";import{_ as E}from"./SelectMenu.vue_vue_type_script_setup_true_lang-VAye0ofl.js";import{_ as F}from"./RefreshButton.vue_vue_type_script_setup_true_lang-C7qymrfD.js";import"./Teleport-DTF2H_ia.js";const M={key:0,class:"badge busy"},T=["title"],j={key:2,class:"badge ok"},G={key:3,class:"badge unknown",title:"the server could not determine this — it is not the same as idle"},K={key:4,class:"badge"},H=x({__name:"RunStateBadge",props:{busy:{type:[Boolean,null]},running:{type:[Boolean,null]},asleep:{}},setup(u){return(y,o)=>u.busy===!0?(l(),n("span",M,[...o[0]||(o[0]=[s("span",{class:"dot pulse"},null,-1),a("Busy",-1)])])):u.asleep?(l(),n("span",{key:1,class:"badge asleep",title:`asleep since ${new Date(u.asleep.since).toLocaleString()} (${u.asleep.reason}) — a request to its hostname wakes it`},[...o[1]||(o[1]=[s("span",{class:"dot"},null,-1),a("Asleep",-1)])],8,T)):u.running===!0?(l(),n("span",j,[...o[2]||(o[2]=[s("span",{class:"dot"},null,-1),a("Running",-1)])])):u.busy===null||u.running===null?(l(),n("span",G,"Unknown")):(l(),n("span",K,"Idle"))}}),J={class:"page-head"},O={class:"sub"},P={class:"panel"},Q={class:"phead"},W={class:"searchbox"},X={key:0},Y={class:"check"},Z={key:0,class:"s-failed"},ee={class:"cards"},se={class:"stagger"},te={"data-label":"id"},le={key:0,class:"mute",style:{"font-size":"var(--t-xs)"}},ne={"data-label":"kind"},ae={class:"name dim","data-label":"stack"},oe={key:0},ie={key:1,class:"badge warn",title:"the spec could not be resolved without variables"},re={"data-label":"state"},ue={class:"dim nowrap","data-label":"updated"},de={key:0},pe={colspan:"5",class:"mute"},me={class:"mono"},he=x({__name:"DeploymentsView",setup(u){const y=h(""),o=h("all"),c=h(!1),w=C(()=>{const p=y.value.trim().toLowerCase();return m.deployments.filter(e=>o.value!=="all"&&e.kind!==o.value||c.value&&!(e.running===!0||e.busy===!0||e.asleep)?!1:p?e.id.toLowerCase().includes(p)||(e.stack??"").toLowerCase().includes(p)||(e.specName??"").toLowerCase().includes(p):!0)}),S=C(()=>m.deployments.filter(p=>p.unresolved));return(p,e)=>{const k=D("RouterLink");return l(),n("div",null,[s("div",J,[s("div",null,[e[3]||(e[3]=s("h1",null,"Deployments",-1)),s("div",O,i(r(g).total)+" submitted · "+i(r(g).running)+" running · "+i(r(g).busy)+" busy ",1)]),e[5]||(e[5]=s("span",{class:"grow"},null,-1)),d(F,{run:r(B)},null,8,["run"]),d(k,{to:"/submit",class:"btn"},{default:v(()=>[...e[4]||(e[4]=[a("+ Submit",-1)])]),_:1})]),s("section",P,[s("div",Q,[s("div",W,[e[6]||(e[6]=s("svg",{viewBox:"0 0 24 24",width:"15",height:"15","aria-hidden":"true"},[s("circle",{cx:"11",cy:"11",r:"7",fill:"none",stroke:"currentColor","stroke-width":"2"}),s("path",{d:"M16.5 16.5 21 21",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)),_(s("input",{id:"q","onUpdate:modelValue":e[0]||(e[0]=t=>y.value=t),"data-search":"",type:"search","aria-label":"Search deployments",placeholder:"Search by id, stack or spec",spellcheck:"false"},null,512),[[L,y.value]]),y.value?f("",!0):(l(),n("kbd",X,"/"))]),d(E,{modelValue:o.value,"onUpdate:modelValue":e[1]||(e[1]=t=>o.value=t),label:"Filter by kind",options:[{value:"all",label:"All kinds"},{value:"isolated",label:"Isolated"},{value:"shared",label:"Shared"}]},null,8,["modelValue"]),s("label",Y,[_(s("input",{"onUpdate:modelValue":e[2]||(e[2]=t=>c.value=t),type:"checkbox"},null,512),[[N,c.value]]),e[7]||(e[7]=a(" Running or busy only ",-1))])]),r(m).deploymentsError?(l(),n("p",Z,i(r(m).deploymentsError),1)):r(m).deploymentsLoaded?(l(),n(b,{key:2},[s("table",ee,[e[11]||(e[11]=s("thead",null,[s("tr",null,[s("th",null,"ID"),s("th",null,"Kind"),s("th",null,"Stack"),s("th",null,"State"),s("th",null,"Updated")])],-1)),s("tbody",se,[(l(!0),n(b,null,$(w.value,(t,V)=>(l(),n("tr",{key:t.id,style:U({"--i":V})},[s("td",te,[d(k,{to:`/deployments/${encodeURIComponent(t.id)}`},{default:v(()=>[a(i(t.id),1)]),_:2},1032,["to"]),t.specName?(l(),n("div",le," spec: "+i(t.specName),1)):f("",!0)]),s("td",ne,[s("span",{class:I(["badge",t.kind])},i(r(A)(t.kind)),3)]),s("td",ae,[t.stack?(l(),n("span",oe,i(t.stack),1)):(l(),n("span",ie," needs variables "))]),s("td",re,[d(H,{busy:t.busy,running:t.running,asleep:t.asleep},null,8,["busy","running","asleep"])]),s("td",ue,[d(z,{at:t.updatedAt},null,8,["at"])])],4))),128)),w.value.length?f("",!0):(l(),n("tr",de,[s("td",pe,[r(m).deployments.length?(l(),n(b,{key:0},[a(" Nothing matches this filter. ")],64)):(l(),n(b,{key:1},[e[9]||(e[9]=a(" Nothing submitted yet — ",-1)),d(k,{to:"/submit"},{default:v(()=>[...e[8]||(e[8]=[a("submit a spec",-1)])]),_:1}),e[10]||(e[10]=a(" to put a deployment in the registry. ",-1))],64))])]))])]),(l(!0),n(b,null,$(S.value,t=>(l(),n("div",{key:`u-${t.id}`,class:"banner warn"},[s("b",null,i(t.id),1),e[19]||(e[19]=a(" could not be resolved: ",-1)),s("span",me,i(t.unresolved),1),s("p",null,[e[13]||(e[13]=a(" This listing resolves every spec with the ",-1)),e[14]||(e[14]=s("em",null,"same",-1)),e[15]||(e[15]=a(" (empty) request variables, so a spec with a ",-1)),e[16]||(e[16]=s("code",null,"${VAR}",-1)),e[17]||(e[17]=a(" the server does not already hold will always appear here. ",-1)),d(k,{to:`/deployments/${encodeURIComponent(t.id)}/config`},{default:v(()=>[...e[12]||(e[12]=[a(" Set its variables ",-1)])]),_:1},8,["to"]),e[18]||(e[18]=a(" and the detail view will resolve. ",-1))])]))),128))],64)):(l(),R(q,{key:1,rows:4,tall:""}))])])}}});export{he as default};
2
- //# sourceMappingURL=DeploymentsView-CalAGK0U.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeploymentsView-CalAGK0U.js","sources":["../../src/components/RunStateBadge.vue","../../src/views/DeploymentsView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A deployment's live state, from the two TRI-STATE fields the server sends.\n *\n * `busy` and `running` are `boolean | null`, and `null` means \"the server could not determine\n * this\": an unresolved spec has no stack name to look up, and a docker that did not answer is not\n * the same fact as \"nothing is running\". Rendering either as \"idle\" would be a guess presented as\n * a fact — that is how a live stack gets reported as torn down and someone forgets it.\n *\n * So unknown says unknown, and it gets its own colour.\n */\nimport type { SleepRecord } from '../api/types';\ndefineProps<{ busy: boolean | null; running: boolean | null; asleep?: SleepRecord | null }>();\n</script>\n\n<template>\n <span v-if=\"busy === true\" class=\"badge busy\"><span class=\"dot pulse\" />Busy</span>\n <!-- Asleep is its own state, before the running/idle question: the compose project is down on\n purpose, the data and axes are still there, and a request to its hostname brings it back. -->\n <span\n v-else-if=\"asleep\"\n class=\"badge asleep\"\n :title=\"`asleep since ${new Date(asleep.since).toLocaleString()} (${asleep.reason}) — a request to its hostname wakes it`\"\n ><span class=\"dot\" />Asleep</span\n >\n <span v-else-if=\"running === true\" class=\"badge ok\"><span class=\"dot\" />Running</span>\n <span\n v-else-if=\"busy === null || running === null\"\n class=\"badge unknown\"\n title=\"the server could not determine this — it is not the same as idle\"\n >Unknown</span\n >\n <span v-else class=\"badge\">Idle</span>\n</template>\n","<script setup lang=\"ts\">\n/**\n * The deployment list: searchable, filterable, and honest about what could not be resolved.\n *\n * Filtering is client-side because the API has no query parameters for it and the list is one\n * host's worth of previews — a few dozen rows, already in memory from the shell's poll.\n */\nimport { computed, ref } from 'vue';\nimport { sentence } from '../composables/useFormat';\nimport { loadDeployments, state, summary } from '../composables/useControlPlane';\n\nimport RunStateBadge from '../components/RunStateBadge.vue';\nimport SkeletonList from '../components/SkeletonList.vue';\nimport RelativeTime from '../components/RelativeTime.vue';\nimport SelectMenu from '../components/SelectMenu.vue';\nimport RefreshButton from '../components/RefreshButton.vue';\n\nconst q = ref('');\nconst kind = ref<'all' | 'isolated' | 'shared'>('all');\nconst onlyLive = ref(false);\n\nconst rows = computed(() => {\n const needle = q.value.trim().toLowerCase();\n return state.deployments.filter((d) => {\n if (kind.value !== 'all' && d.kind !== kind.value) return false;\n // \"Live\" means DEMONSTRABLY live. An unknown is not evidence of either state, so it is not\n // silently included here — the filter says what it filters.\n // Asleep counts as live: it is deliberately down and comes back on a request — not torn down.\n if (onlyLive.value && !(d.running === true || d.busy === true || d.asleep)) return false;\n if (!needle) return true;\n return (\n d.id.toLowerCase().includes(needle) ||\n (d.stack ?? '').toLowerCase().includes(needle) ||\n (d.specName ?? '').toLowerCase().includes(needle)\n );\n });\n});\n\nconst unresolvedRows = computed(() => state.deployments.filter((d) => d.unresolved));\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>Deployments</h1>\n <div class=\"sub\">\n {{ summary.total }} submitted · {{ summary.running }} running · {{ summary.busy }} busy\n </div>\n </div>\n <span class=\"grow\" />\n <RefreshButton :run=\"loadDeployments\" />\n <RouterLink to=\"/submit\" class=\"btn\">+ Submit</RouterLink>\n </div>\n\n <section class=\"panel\">\n <div class=\"phead\">\n <!--\n One row of equal-height controls. Each used to sit under its own stacked label, which cost\n a line of vertical space per control, put \"Search — press /\" on screen as a permanent\n instruction, and left the two fields 8px out of vertical alignment because a `select` and\n an `input` do not have the same intrinsic height. A placeholder says the same thing in the\n place you are already looking, and the select's own options say what it filters.\n -->\n <div class=\"searchbox\">\n <svg viewBox=\"0 0 24 24\" width=\"15\" height=\"15\" aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n <path d=\"M16.5 16.5 21 21\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\n </svg>\n <input\n id=\"q\"\n v-model=\"q\"\n data-search\n type=\"search\"\n aria-label=\"Search deployments\"\n placeholder=\"Search by id, stack or spec\"\n spellcheck=\"false\"\n />\n <kbd v-if=\"!q\">/</kbd>\n </div>\n <SelectMenu\n v-model=\"kind\"\n label=\"Filter by kind\"\n :options=\"[\n { value: 'all', label: 'All kinds' },\n { value: 'isolated', label: 'Isolated' },\n { value: 'shared', label: 'Shared' },\n ]\"\n />\n <label class=\"check\">\n <input v-model=\"onlyLive\" type=\"checkbox\" />\n Running or busy only\n </label>\n </div>\n\n <p v-if=\"state.deploymentsError\" class=\"s-failed\">{{ state.deploymentsError }}</p>\n <SkeletonList v-else-if=\"!state.deploymentsLoaded\" :rows=\"4\" tall />\n\n <template v-else>\n <table class=\"cards\">\n <thead>\n <tr>\n <th>ID</th>\n <th>Kind</th>\n <th>Stack</th>\n <th>State</th>\n <th>Updated</th>\n </tr>\n </thead>\n <tbody class=\"stagger\">\n <tr v-for=\"(d, i) in rows\" :key=\"d.id\" :style=\"{ '--i': i }\">\n <td data-label=\"id\">\n <RouterLink :to=\"`/deployments/${encodeURIComponent(d.id)}`\">\n {{ d.id }}\n </RouterLink>\n <div v-if=\"d.specName\" class=\"mute\" style=\"font-size: var(--t-xs)\">\n spec: {{ d.specName }}\n </div>\n </td>\n <td data-label=\"kind\"><span class=\"badge\" :class=\"d.kind\">{{ sentence(d.kind) }}</span></td>\n <td class=\"name dim\" data-label=\"stack\">\n <span v-if=\"d.stack\">{{ d.stack }}</span>\n <!--\n No stack name means the spec could not be resolved with the variables this\n listing had. It is not an error state for the deployment — it is a missing input.\n -->\n <span v-else class=\"badge warn\" title=\"the spec could not be resolved without variables\">\n needs variables\n </span>\n </td>\n <td data-label=\"state\"><RunStateBadge :busy=\"d.busy\" :running=\"d.running\" :asleep=\"d.asleep\" /></td>\n <td class=\"dim nowrap\" data-label=\"updated\"><RelativeTime :at=\"d.updatedAt\" /></td>\n </tr>\n <tr v-if=\"!rows.length\">\n <td colspan=\"5\" class=\"mute\">\n <template v-if=\"state.deployments.length\">\n Nothing matches this filter.\n </template>\n <template v-else>\n Nothing submitted yet — <RouterLink to=\"/submit\">submit a spec</RouterLink> to\n put a deployment in the registry.\n </template>\n </td>\n </tr>\n </tbody>\n </table>\n\n <!-- One message per unresolved row, verbatim: it names the missing variable. -->\n <div v-for=\"d in unresolvedRows\" :key=\"`u-${d.id}`\" class=\"banner warn\">\n <b>{{ d.id }}</b> could not be resolved:\n <span class=\"mono\">{{ d.unresolved }}</span>\n <p>\n This listing resolves every spec with the <em>same</em> (empty) request variables, so a\n spec with a <code>${VAR}</code> the server does not already hold will always appear\n here.\n <RouterLink :to=\"`/deployments/${encodeURIComponent(d.id)}/config`\">\n Set its variables\n </RouterLink>\n and the detail view will resolve.\n </p>\n </div>\n </template>\n </section>\n </div>\n</template>\n"],"names":["__props","_openBlock","_createElementBlock","_hoisted_1","_cache","_createElementVNode","_hoisted_3","_hoisted_4","_hoisted_5","q","ref","kind","onlyLive","rows","computed","needle","state","d","unresolvedRows","_hoisted_2","_toDisplayString","_unref","_createVNode","RefreshButton","loadDeployments","_component_RouterLink","$event","SelectMenu","_hoisted_7","_hoisted_8","_Fragment","_hoisted_9","_hoisted_10","_renderList","i","_hoisted_11","_createTextVNode","_hoisted_12","_hoisted_13","_normalizeClass","sentence","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","RunStateBadge","_hoisted_18","RelativeTime","_hoisted_19","_hoisted_20","_hoisted_21","_createBlock","SkeletonList"],"mappings":"u6BAgBcA,EAAA,OAAI,IAAhBC,EAAA,EAAAC,EAAmF,OAAnFC,EAAmF,CAAA,GAAAC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,CAArCC,EAA0B,OAAA,CAApB,MAAM,WAAA,EAAW,KAAA,EAAA,IAAG,OAAI,EAAA,CAAA,MAI/DL,EAAA,YADbE,EAKC,OAAA,OAHC,MAAM,eACL,MAAK,gBAAA,IAAsB,KAAKF,EAAA,OAAO,KAAK,EAAE,eAAA,CAAc,KAAOA,EAAA,OAAO,MAAM,wCAAA,mBAChFK,EAAoB,OAAA,CAAd,MAAM,KAAA,EAAK,KAAA,EAAA,IAAG,SAAM,EAAA,CAAA,UAEZL,EAAA,UAAO,IAAxBC,EAAA,EAAAC,EAAsF,OAAtFI,EAAsF,CAAA,GAAAF,EAAA,CA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IAAA,CAAA,EAAA,GAF+B,gCAE1C,CAAA,YACA5B,EAGW4B,EAAA,CAAA,IAAA,GAAA,eAHM,4BACS,EAAA,GAAAR,EAAmDG,EAAA,CAAvC,GAAG,WAAS,WAAC,IAAa,CAAA,GAAArB,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAAb,gBAAa,EAAA,CAAA,2BAAa,yCAE7E,EAAA,EAAA,uBAORF,EAYM4B,EAAA,KAAAG,EAZWf,EAAA,MAALD,QAAZf,EAYM,MAAA,CAZ4B,IAAG,KAAOe,EAAE,EAAE,GAAI,MAAM,aAAA,GACxDZ,EAAiB,IAAA,KAAAe,EAAXH,EAAE,EAAE,EAAA,CAAA,kBAAO,2BACjB,EAAA,GAAAZ,EAA4C,OAA5C6C,GAA4C9B,EAAtBH,EAAE,UAAU,EAAA,CAAA,EAClCZ,EAQI,IAAA,KAAA,iBARD,8CACyC,EAAA,GAAAD,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAC,EAAa,UAAT,OAAI,EAAA,mBAAK,gDAC3C,EAAA,GAAAD,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAC,EAAmB,YAAb,SAAM,EAAA,mBAAO,8DAE/B,EAAA,GAAAiB,EAEaG,EAAA,CAFA,GAAE,gBAAkB,mBAAmBR,EAAE,EAAE,CAAA,SAAA,aAAY,IAEpE,CAAA,GAAAb,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAFoE,sBAEpE,EAAA,CAAA,oCAAa,sCAEf,EAAA,EAAA,wBA/DJ+C,EAAoEC,EAAA,OAAhB,KAAM,EAAG,KAAA,EAAA"}
@@ -1,2 +0,0 @@
1
- import{u as k,c as R,a as D,P as B,b as w,g as F,D as T,d as K,F as N,e as E,f as V,h as M,i as S,T as L}from"./Teleport-DTF2H_ia.js";import{d as g,a1 as z,$ as v,u as e,r as b,o as c,z as _,w as u,a2 as m,K as A,e as O,h as H,g as j,a3 as U,a4 as G,a as q,f as I,t as J}from"./index-BXPaPWhH.js";const[C,Q]=R("DialogRoot");var W=g({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(r,{emit:l}){const t=r,o=k(t,"open",l,{defaultValue:t.defaultOpen,passive:t.open===void 0}),d=b(),f=b(),{modal:i}=z(t);return Q({open:o,modal:i,openModal:()=>{o.value=!0},onOpenChange:n=>{o.value=n},onOpenToggle:()=>{o.value=!o.value},contentId:"",titleId:"",descriptionId:"",triggerElement:d,contentElement:f}),(n,s)=>v(n.$slots,"default",{open:e(o),close:()=>o.value=!1})}}),X=W,Y=g({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const l=r;D();const t=C();return(a,o)=>(c(),_(e(B),m(l,{type:a.as==="button"?"button":void 0,onClick:o[0]||(o[0]=d=>e(t).onOpenChange(!1))}),{default:u(()=>[v(a.$slots,"default")]),_:3},16,["type"]))}}),Z=Y,x=g({__name:"DialogContentImpl",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(r,{emit:l}){const t=r,a=l,o=C(),{forwardRef:d,currentElement:f}=D();return o.titleId||(o.titleId=w(void 0,"reka-dialog-title")),o.descriptionId||(o.descriptionId=w(void 0,"reka-dialog-description")),A(()=>{o.contentElement=f,F()!==document.body&&(o.triggerElement.value=F())}),(i,n)=>(c(),_(e(N),{"as-child":"",loop:"",trapped:t.trapFocus,onMountAutoFocus:n[5]||(n[5]=s=>a("openAutoFocus",s)),onUnmountAutoFocus:n[6]||(n[6]=s=>a("closeAutoFocus",s))},{default:u(()=>[O(e(T),m({id:e(o).contentId,ref:e(d),as:i.as,"as-child":i.asChild,"disable-outside-pointer-events":i.disableOutsidePointerEvents,role:"dialog","aria-describedby":e(o).descriptionId,"aria-labelledby":e(o).titleId,"data-state":e(K)(e(o).open.value)},i.$attrs,{onDismiss:n[0]||(n[0]=s=>e(o).onOpenChange(!1)),onEscapeKeyDown:n[1]||(n[1]=s=>a("escapeKeyDown",s)),onFocusOutside:n[2]||(n[2]=s=>a("focusOutside",s)),onInteractOutside:n[3]||(n[3]=s=>a("interactOutside",s)),onPointerDownOutside:n[4]||(n[4]=s=>a("pointerDownOutside",s))}),{default:u(()=>[v(i.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),$=x,ee=g({__name:"DialogContentModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(r,{emit:l}){const t=r,a=l,o=C(),d=E(a),{forwardRef:f,currentElement:i}=D();return V(i),(n,s)=>(c(),_($,m({...t,...e(d)},{ref:e(f),"trap-focus":e(o).open.value,"disable-outside-pointer-events":t.disableOutsidePointerEvents,onCloseAutoFocus:s[0]||(s[0]=p=>{var y;p.defaultPrevented||(p.preventDefault(),(y=e(o).triggerElement.value)==null||y.focus())}),onPointerDownOutside:s[1]||(s[1]=p=>{const y=p.detail.originalEvent,P=y.button===0&&y.ctrlKey===!0;(y.button===2||P)&&p.preventDefault()}),onFocusOutside:s[2]||(s[2]=p=>{p.preventDefault()})}),{default:u(()=>[v(n.$slots,"default")]),_:3},16,["trap-focus","disable-outside-pointer-events"]))}}),te=ee,oe=g({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(r,{emit:l}){const t=r,o=E(l);D();const d=C(),f=b(!1),i=b(!1);return(n,s)=>(c(),_($,m({...t,...e(o)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:s[0]||(s[0]=p=>{var y;p.defaultPrevented||(f.value||(y=e(d).triggerElement.value)==null||y.focus(),p.preventDefault()),f.value=!1,i.value=!1}),onInteractOutside:s[1]||(s[1]=p=>{var h;p.defaultPrevented||(f.value=!0,p.detail.originalEvent.type==="pointerdown"&&(i.value=!0));const y=p.target;((h=e(d).triggerElement.value)==null?void 0:h.contains(y))&&p.preventDefault(),p.detail.originalEvent.type==="focusin"&&i.value&&p.preventDefault()})}),{default:u(()=>[v(n.$slots,"default")]),_:3},16))}}),ae=oe,se=g({__name:"DialogContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(r,{emit:l}){const t=r,a=l,o=C(),d=E(a),{forwardRef:f}=D();return(i,n)=>(c(),_(e(M),{present:i.forceMount||e(o).open.value},{default:u(()=>[e(o).modal.value?(c(),_(te,m({key:0,ref:e(f)},{...t,...e(d),...i.$attrs}),{default:u(()=>[v(i.$slots,"default")]),_:3},16)):(c(),_(ae,m({key:1,ref:e(f)},{...t,...e(d),...i.$attrs}),{default:u(()=>[v(i.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),le=se,re=g({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const l=C();return S(!0),D(),(t,a)=>(c(),_(e(B),{as:t.as,"as-child":t.asChild,"data-state":e(l).open.value?"open":"closed",style:{"pointer-events":"auto"},onPointerdown:a[0]||(a[0]=H(()=>{},["left","self","prevent"]))},{default:u(()=>[v(t.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),ne=re,ue=g({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const l=C(),{forwardRef:t}=D();return(a,o)=>{var d;return(d=e(l))!=null&&d.modal.value?(c(),_(e(M),{key:0,present:a.forceMount||e(l).open.value},{default:u(()=>[O(ne,m(a.$attrs,{ref:e(t),as:a.as,"as-child":a.asChild}),{default:u(()=>[v(a.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):j("v-if",!0)}}}),ie=ue,de=g({__name:"DialogPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(r){const l=r;return(t,a)=>(c(),_(e(L),U(G(l)),{default:u(()=>[v(t.$slots,"default")]),_:3},16))}}),pe=de,fe=g({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(r){const l=r,t=C();return D(),(a,o)=>(c(),_(e(B),m(l,{id:e(t).titleId}),{default:u(()=>[v(a.$slots,"default")]),_:3},16,["id"]))}}),ce=fe,_e=g({__name:"DialogTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const l=r,t=C(),{forwardRef:a,currentElement:o}=D();return t.contentId||(t.contentId=w(void 0,"reka-dialog-content")),A(()=>{t.triggerElement.value=o.value}),(d,f)=>(c(),_(e(B),m(l,{ref:e(a),type:d.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":e(t).open.value||!1,"aria-controls":e(t).open.value?e(t).contentId:void 0,"data-state":e(t).open.value?"open":"closed",onClick:e(t).onOpenToggle}),{default:u(()=>[v(d.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),ve=_e;const ge={class:"help-head"},ye={class:"help-body"},Ce=g({__name:"HelpModal",props:{title:{},label:{}},setup(r){return(l,t)=>(c(),_(e(X),null,{default:u(()=>[O(e(ve),{class:"helpq","aria-label":r.label??r.title},{default:u(()=>[...t[0]||(t[0]=[q("svg",{viewBox:"0 0 24 24",width:"13",height:"13","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round"},[q("path",{d:"M9.2 9a2.9 2.9 0 1 1 3.8 2.8c-.7.3-1 .9-1 1.6v.4"}),q("circle",{cx:"12",cy:"17.6",r:"0.9",fill:"currentColor",stroke:"none"})],-1)])]),_:1},8,["aria-label"]),O(e(pe),null,{default:u(()=>[O(e(ie),{class:"scrim help-scrim"}),O(e(le),{class:"help-modal"},{default:u(()=>[q("div",ge,[O(e(ce),{class:"help-title"},{default:u(()=>[I(J(r.title),1)]),_:1}),O(e(Z),{class:"ghost sm","aria-label":"Close"},{default:u(()=>[...t[1]||(t[1]=[I("Close",-1)])]),_:1})]),q("div",ye,[v(l.$slots,"default")])]),_:3})]),_:3})]),_:3}))}});export{Ce as _};
2
- //# sourceMappingURL=HelpModal.vue_vue_type_script_setup_true_lang-DWDQ-wIa.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HelpModal.vue_vue_type_script_setup_true_lang-DWDQ-wIa.js","sources":["../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogRoot.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogClose.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogContentImpl.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogContentModal.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogContentNonModal.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogContent.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogOverlayImpl.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogOverlay.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogPortal.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogTitle.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogTrigger.js","../../src/components/HelpModal.vue"],"sourcesContent":["import { createContext } from \"../shared/createContext.js\";\nimport { defineComponent, ref, renderSlot, toRefs, unref } from \"vue\";\nimport { useVModel } from \"@vueuse/core\";\n\n//#region src/Dialog/DialogRoot.vue?vue&type=script&setup=true&lang.ts\nconst [injectDialogRootContext, provideDialogRootContext] = /*#__PURE__*/ createContext(\"DialogRoot\");\nvar DialogRoot_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\tinheritAttrs: false,\n\t__name: \"DialogRoot\",\n\tprops: {\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false,\n\t\t\tdefault: void 0\n\t\t},\n\t\tdefaultOpen: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false,\n\t\t\tdefault: false\n\t\t},\n\t\tmodal: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false,\n\t\t\tdefault: true\n\t\t}\n\t},\n\temits: [\"update:open\"],\n\tsetup(__props, { emit: __emit }) {\n\t\tconst props = __props;\n\t\tconst emit = __emit;\n\t\tconst open = useVModel(props, \"open\", emit, {\n\t\t\tdefaultValue: props.defaultOpen,\n\t\t\tpassive: props.open === void 0\n\t\t});\n\t\tconst triggerElement = ref();\n\t\tconst contentElement = ref();\n\t\tconst { modal } = toRefs(props);\n\t\tprovideDialogRootContext({\n\t\t\topen,\n\t\t\tmodal,\n\t\t\topenModal: () => {\n\t\t\t\topen.value = true;\n\t\t\t},\n\t\t\tonOpenChange: (value) => {\n\t\t\t\topen.value = value;\n\t\t\t},\n\t\t\tonOpenToggle: () => {\n\t\t\t\topen.value = !open.value;\n\t\t\t},\n\t\t\tcontentId: \"\",\n\t\t\ttitleId: \"\",\n\t\t\tdescriptionId: \"\",\n\t\t\ttriggerElement,\n\t\t\tcontentElement\n\t\t});\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn renderSlot(_ctx.$slots, \"default\", {\n\t\t\t\topen: unref(open),\n\t\t\t\tclose: () => open.value = false\n\t\t\t});\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogRoot.vue\nvar DialogRoot_default = DialogRoot_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogRoot_default, injectDialogRootContext };\n//# sourceMappingURL=DialogRoot.js.map","import { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { Primitive } from \"../Primitive/Primitive.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { createBlock, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogClose.vue?vue&type=script&setup=true&lang.ts\nvar DialogClose_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogClose\",\n\tprops: {\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false,\n\t\t\tdefault: \"button\"\n\t\t}\n\t},\n\tsetup(__props) {\n\t\tconst props = __props;\n\t\tuseForwardExpose();\n\t\tconst rootContext = injectDialogRootContext();\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(unref(Primitive), mergeProps(props, {\n\t\t\t\ttype: _ctx.as === \"button\" ? \"button\" : void 0,\n\t\t\t\tonClick: _cache[0] || (_cache[0] = ($event) => unref(rootContext).onOpenChange(false))\n\t\t\t}), {\n\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t_: 3\n\t\t\t}, 16, [\"type\"]);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogClose.vue\nvar DialogClose_default = DialogClose_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogClose_default };\n//# sourceMappingURL=DialogClose.js.map","import { getActiveElement } from \"../shared/getActiveElement.js\";\nimport { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { useId } from \"../shared/useId.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { DismissableLayer_default } from \"../DismissableLayer/DismissableLayer.js\";\nimport { FocusScope_default } from \"../FocusScope/FocusScope.js\";\nimport { getOpenState } from \"../Menu/utils.js\";\nimport { useWarning } from \"./utils.js\";\nimport { createBlock, createVNode, defineComponent, mergeProps, onMounted, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogContentImpl.vue?vue&type=script&setup=true&lang.ts\nvar DialogContentImpl_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogContentImpl\",\n\tprops: {\n\t\tforceMount: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\ttrapFocus: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tdisableOutsidePointerEvents: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false\n\t\t}\n\t},\n\temits: [\n\t\t\"escapeKeyDown\",\n\t\t\"pointerDownOutside\",\n\t\t\"focusOutside\",\n\t\t\"interactOutside\",\n\t\t\"openAutoFocus\",\n\t\t\"closeAutoFocus\"\n\t],\n\tsetup(__props, { emit: __emit }) {\n\t\tconst props = __props;\n\t\tconst emits = __emit;\n\t\tconst rootContext = injectDialogRootContext();\n\t\tconst { forwardRef, currentElement: contentElement } = useForwardExpose();\n\t\trootContext.titleId ||= useId(void 0, \"reka-dialog-title\");\n\t\trootContext.descriptionId ||= useId(void 0, \"reka-dialog-description\");\n\t\tonMounted(() => {\n\t\t\trootContext.contentElement = contentElement;\n\t\t\tif (getActiveElement() !== document.body) rootContext.triggerElement.value = getActiveElement();\n\t\t});\n\t\tif (process.env.NODE_ENV !== \"production\") useWarning({\n\t\t\ttitleName: \"DialogTitle\",\n\t\t\tcontentName: \"DialogContent\",\n\t\t\tcomponentLink: \"dialog.html#title\",\n\t\t\ttitleId: rootContext.titleId,\n\t\t\tdescriptionId: rootContext.descriptionId,\n\t\t\tcontentElement\n\t\t});\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(unref(FocusScope_default), {\n\t\t\t\t\"as-child\": \"\",\n\t\t\t\tloop: \"\",\n\t\t\t\ttrapped: props.trapFocus,\n\t\t\t\tonMountAutoFocus: _cache[5] || (_cache[5] = ($event) => emits(\"openAutoFocus\", $event)),\n\t\t\t\tonUnmountAutoFocus: _cache[6] || (_cache[6] = ($event) => emits(\"closeAutoFocus\", $event))\n\t\t\t}, {\n\t\t\t\tdefault: withCtx(() => [createVNode(unref(DismissableLayer_default), mergeProps({\n\t\t\t\t\tid: unref(rootContext).contentId,\n\t\t\t\t\tref: unref(forwardRef),\n\t\t\t\t\tas: _ctx.as,\n\t\t\t\t\t\"as-child\": _ctx.asChild,\n\t\t\t\t\t\"disable-outside-pointer-events\": _ctx.disableOutsidePointerEvents,\n\t\t\t\t\trole: \"dialog\",\n\t\t\t\t\t\"aria-describedby\": unref(rootContext).descriptionId,\n\t\t\t\t\t\"aria-labelledby\": unref(rootContext).titleId,\n\t\t\t\t\t\"data-state\": unref(getOpenState)(unref(rootContext).open.value)\n\t\t\t\t}, _ctx.$attrs, {\n\t\t\t\t\tonDismiss: _cache[0] || (_cache[0] = ($event) => unref(rootContext).onOpenChange(false)),\n\t\t\t\t\tonEscapeKeyDown: _cache[1] || (_cache[1] = ($event) => emits(\"escapeKeyDown\", $event)),\n\t\t\t\t\tonFocusOutside: _cache[2] || (_cache[2] = ($event) => emits(\"focusOutside\", $event)),\n\t\t\t\t\tonInteractOutside: _cache[3] || (_cache[3] = ($event) => emits(\"interactOutside\", $event)),\n\t\t\t\t\tonPointerDownOutside: _cache[4] || (_cache[4] = ($event) => emits(\"pointerDownOutside\", $event))\n\t\t\t\t}), {\n\t\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t\t_: 3\n\t\t\t\t}, 16, [\n\t\t\t\t\t\"id\",\n\t\t\t\t\t\"as\",\n\t\t\t\t\t\"as-child\",\n\t\t\t\t\t\"disable-outside-pointer-events\",\n\t\t\t\t\t\"aria-describedby\",\n\t\t\t\t\t\"aria-labelledby\",\n\t\t\t\t\t\"data-state\"\n\t\t\t\t])]),\n\t\t\t\t_: 3\n\t\t\t}, 8, [\"trapped\"]);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogContentImpl.vue\nvar DialogContentImpl_default = DialogContentImpl_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogContentImpl_default };\n//# sourceMappingURL=DialogContentImpl.js.map","import { useEmitAsProps } from \"../shared/useEmitAsProps.js\";\nimport { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { useHideOthers } from \"../shared/useHideOthers.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { DialogContentImpl_default } from \"./DialogContentImpl.js\";\nimport { createBlock, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogContentModal.vue?vue&type=script&setup=true&lang.ts\nvar DialogContentModal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogContentModal\",\n\tprops: {\n\t\tforceMount: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\ttrapFocus: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tdisableOutsidePointerEvents: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false,\n\t\t\tdefault: true\n\t\t},\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false\n\t\t}\n\t},\n\temits: [\n\t\t\"escapeKeyDown\",\n\t\t\"pointerDownOutside\",\n\t\t\"focusOutside\",\n\t\t\"interactOutside\",\n\t\t\"openAutoFocus\",\n\t\t\"closeAutoFocus\"\n\t],\n\tsetup(__props, { emit: __emit }) {\n\t\tconst props = __props;\n\t\tconst emits = __emit;\n\t\tconst rootContext = injectDialogRootContext();\n\t\tconst emitsAsProps = useEmitAsProps(emits);\n\t\tconst { forwardRef, currentElement } = useForwardExpose();\n\t\tuseHideOthers(currentElement);\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(DialogContentImpl_default, mergeProps({\n\t\t\t\t...props,\n\t\t\t\t...unref(emitsAsProps)\n\t\t\t}, {\n\t\t\t\tref: unref(forwardRef),\n\t\t\t\t\"trap-focus\": unref(rootContext).open.value,\n\t\t\t\t\"disable-outside-pointer-events\": props.disableOutsidePointerEvents,\n\t\t\t\tonCloseAutoFocus: _cache[0] || (_cache[0] = (event) => {\n\t\t\t\t\tif (!event.defaultPrevented) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tunref(rootContext).triggerElement.value?.focus();\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tonPointerDownOutside: _cache[1] || (_cache[1] = (event) => {\n\t\t\t\t\tconst originalEvent = event.detail.originalEvent;\n\t\t\t\t\tconst ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n\t\t\t\t\tconst isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\t\t\t\t\tif (isRightClick) event.preventDefault();\n\t\t\t\t}),\n\t\t\t\tonFocusOutside: _cache[2] || (_cache[2] = (event) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t})\n\t\t\t}), {\n\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t_: 3\n\t\t\t}, 16, [\"trap-focus\", \"disable-outside-pointer-events\"]);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogContentModal.vue\nvar DialogContentModal_default = DialogContentModal_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogContentModal_default };\n//# sourceMappingURL=DialogContentModal.js.map","import { useEmitAsProps } from \"../shared/useEmitAsProps.js\";\nimport { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { DialogContentImpl_default } from \"./DialogContentImpl.js\";\nimport { createBlock, defineComponent, mergeProps, openBlock, ref, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogContentNonModal.vue?vue&type=script&setup=true&lang.ts\nvar DialogContentNonModal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogContentNonModal\",\n\tprops: {\n\t\tforceMount: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\ttrapFocus: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tdisableOutsidePointerEvents: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false\n\t\t}\n\t},\n\temits: [\n\t\t\"escapeKeyDown\",\n\t\t\"pointerDownOutside\",\n\t\t\"focusOutside\",\n\t\t\"interactOutside\",\n\t\t\"openAutoFocus\",\n\t\t\"closeAutoFocus\"\n\t],\n\tsetup(__props, { emit: __emit }) {\n\t\tconst props = __props;\n\t\tconst emits = __emit;\n\t\tconst emitsAsProps = useEmitAsProps(emits);\n\t\tuseForwardExpose();\n\t\tconst rootContext = injectDialogRootContext();\n\t\tconst hasInteractedOutsideRef = ref(false);\n\t\tconst hasPointerDownOutsideRef = ref(false);\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(DialogContentImpl_default, mergeProps({\n\t\t\t\t...props,\n\t\t\t\t...unref(emitsAsProps)\n\t\t\t}, {\n\t\t\t\t\"trap-focus\": false,\n\t\t\t\t\"disable-outside-pointer-events\": false,\n\t\t\t\tonCloseAutoFocus: _cache[0] || (_cache[0] = (event) => {\n\t\t\t\t\tif (!event.defaultPrevented) {\n\t\t\t\t\t\tif (!hasInteractedOutsideRef.value) unref(rootContext).triggerElement.value?.focus();\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\thasInteractedOutsideRef.value = false;\n\t\t\t\t\thasPointerDownOutsideRef.value = false;\n\t\t\t\t}),\n\t\t\t\tonInteractOutside: _cache[1] || (_cache[1] = (event) => {\n\t\t\t\t\tif (!event.defaultPrevented) {\n\t\t\t\t\t\thasInteractedOutsideRef.value = true;\n\t\t\t\t\t\tif (event.detail.originalEvent.type === \"pointerdown\") hasPointerDownOutsideRef.value = true;\n\t\t\t\t\t}\n\t\t\t\t\tconst target = event.target;\n\t\t\t\t\tconst targetIsTrigger = unref(rootContext).triggerElement.value?.contains(target);\n\t\t\t\t\tif (targetIsTrigger) event.preventDefault();\n\t\t\t\t\tif (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.value) event.preventDefault();\n\t\t\t\t})\n\t\t\t}), {\n\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t_: 3\n\t\t\t}, 16);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogContentNonModal.vue\nvar DialogContentNonModal_default = DialogContentNonModal_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogContentNonModal_default };\n//# sourceMappingURL=DialogContentNonModal.js.map","import { useEmitAsProps } from \"../shared/useEmitAsProps.js\";\nimport { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { Presence_default } from \"../Presence/Presence.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { DialogContentModal_default } from \"./DialogContentModal.js\";\nimport { DialogContentNonModal_default } from \"./DialogContentNonModal.js\";\nimport { createBlock, createCommentVNode, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogContent.vue?vue&type=script&setup=true&lang.ts\nvar DialogContent_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogContent\",\n\tprops: {\n\t\tforceMount: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tdisableOutsidePointerEvents: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false,\n\t\t\tdefault: void 0\n\t\t},\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false\n\t\t}\n\t},\n\temits: [\n\t\t\"escapeKeyDown\",\n\t\t\"pointerDownOutside\",\n\t\t\"focusOutside\",\n\t\t\"interactOutside\",\n\t\t\"openAutoFocus\",\n\t\t\"closeAutoFocus\"\n\t],\n\tsetup(__props, { emit: __emit }) {\n\t\tconst props = __props;\n\t\tconst emits = __emit;\n\t\tconst rootContext = injectDialogRootContext();\n\t\tconst emitsAsProps = useEmitAsProps(emits);\n\t\tconst { forwardRef } = useForwardExpose();\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(unref(Presence_default), { present: _ctx.forceMount || unref(rootContext).open.value }, {\n\t\t\t\tdefault: withCtx(() => [unref(rootContext).modal.value ? (openBlock(), createBlock(DialogContentModal_default, mergeProps({\n\t\t\t\t\tkey: 0,\n\t\t\t\t\tref: unref(forwardRef)\n\t\t\t\t}, {\n\t\t\t\t\t...props,\n\t\t\t\t\t...unref(emitsAsProps),\n\t\t\t\t\t..._ctx.$attrs\n\t\t\t\t}), {\n\t\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t\t_: 3\n\t\t\t\t}, 16)) : (openBlock(), createBlock(DialogContentNonModal_default, mergeProps({\n\t\t\t\t\tkey: 1,\n\t\t\t\t\tref: unref(forwardRef)\n\t\t\t\t}, {\n\t\t\t\t\t...props,\n\t\t\t\t\t...unref(emitsAsProps),\n\t\t\t\t\t..._ctx.$attrs\n\t\t\t\t}), {\n\t\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t\t_: 3\n\t\t\t\t}, 16))]),\n\t\t\t\t_: 3\n\t\t\t}, 8, [\"present\"]);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogContent.vue\nvar DialogContent_default = DialogContent_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogContent_default };\n//# sourceMappingURL=DialogContent.js.map","import { useBodyScrollLock } from \"../shared/useBodyScrollLock.js\";\nimport { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { Primitive } from \"../Primitive/Primitive.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { createBlock, defineComponent, openBlock, renderSlot, unref, withCtx, withModifiers } from \"vue\";\n\n//#region src/Dialog/DialogOverlayImpl.vue?vue&type=script&setup=true&lang.ts\nvar DialogOverlayImpl_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogOverlayImpl\",\n\tprops: {\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false\n\t\t}\n\t},\n\tsetup(__props) {\n\t\tconst rootContext = injectDialogRootContext();\n\t\tuseBodyScrollLock(true);\n\t\tuseForwardExpose();\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(unref(Primitive), {\n\t\t\t\tas: _ctx.as,\n\t\t\t\t\"as-child\": _ctx.asChild,\n\t\t\t\t\"data-state\": unref(rootContext).open.value ? \"open\" : \"closed\",\n\t\t\t\tstyle: { \"pointer-events\": \"auto\" },\n\t\t\t\tonPointerdown: _cache[0] || (_cache[0] = withModifiers(() => {}, [\n\t\t\t\t\t\"left\",\n\t\t\t\t\t\"self\",\n\t\t\t\t\t\"prevent\"\n\t\t\t\t]))\n\t\t\t}, {\n\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t_: 3\n\t\t\t}, 8, [\n\t\t\t\t\"as\",\n\t\t\t\t\"as-child\",\n\t\t\t\t\"data-state\"\n\t\t\t]);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogOverlayImpl.vue\nvar DialogOverlayImpl_default = DialogOverlayImpl_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogOverlayImpl_default };\n//# sourceMappingURL=DialogOverlayImpl.js.map","import { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { Presence_default } from \"../Presence/Presence.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { DialogOverlayImpl_default } from \"./DialogOverlayImpl.js\";\nimport { createBlock, createCommentVNode, createVNode, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogOverlay.vue?vue&type=script&setup=true&lang.ts\nvar DialogOverlay_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogOverlay\",\n\tprops: {\n\t\tforceMount: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false\n\t\t}\n\t},\n\tsetup(__props) {\n\t\tconst rootContext = injectDialogRootContext();\n\t\tconst { forwardRef } = useForwardExpose();\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn unref(rootContext)?.modal.value ? (openBlock(), createBlock(unref(Presence_default), {\n\t\t\t\tkey: 0,\n\t\t\t\tpresent: _ctx.forceMount || unref(rootContext).open.value\n\t\t\t}, {\n\t\t\t\tdefault: withCtx(() => [createVNode(DialogOverlayImpl_default, mergeProps(_ctx.$attrs, {\n\t\t\t\t\tref: unref(forwardRef),\n\t\t\t\t\tas: _ctx.as,\n\t\t\t\t\t\"as-child\": _ctx.asChild\n\t\t\t\t}), {\n\t\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t\t_: 3\n\t\t\t\t}, 16, [\"as\", \"as-child\"])]),\n\t\t\t\t_: 3\n\t\t\t}, 8, [\"present\"])) : createCommentVNode(\"v-if\", true);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogOverlay.vue\nvar DialogOverlay_default = DialogOverlay_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogOverlay_default };\n//# sourceMappingURL=DialogOverlay.js.map","import { Teleport_default } from \"../Teleport/Teleport.js\";\nimport { createBlock, defineComponent, guardReactiveProps, normalizeProps, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogPortal.vue?vue&type=script&setup=true&lang.ts\nvar DialogPortal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogPortal\",\n\tprops: {\n\t\tto: {\n\t\t\ttype: null,\n\t\t\trequired: false\n\t\t},\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tdefer: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tforceMount: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t}\n\t},\n\tsetup(__props) {\n\t\tconst props = __props;\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(unref(Teleport_default), normalizeProps(guardReactiveProps(props)), {\n\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t_: 3\n\t\t\t}, 16);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogPortal.vue\nvar DialogPortal_default = DialogPortal_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogPortal_default };\n//# sourceMappingURL=DialogPortal.js.map","import { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { Primitive } from \"../Primitive/Primitive.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { createBlock, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogTitle.vue?vue&type=script&setup=true&lang.ts\nvar DialogTitle_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogTitle\",\n\tprops: {\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false,\n\t\t\tdefault: \"h2\"\n\t\t}\n\t},\n\tsetup(__props) {\n\t\tconst props = __props;\n\t\tconst rootContext = injectDialogRootContext();\n\t\tuseForwardExpose();\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(unref(Primitive), mergeProps(props, { id: unref(rootContext).titleId }), {\n\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t_: 3\n\t\t\t}, 16, [\"id\"]);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogTitle.vue\nvar DialogTitle_default = DialogTitle_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogTitle_default };\n//# sourceMappingURL=DialogTitle.js.map","import { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { useId } from \"../shared/useId.js\";\nimport { Primitive } from \"../Primitive/Primitive.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { createBlock, defineComponent, mergeProps, onMounted, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogTrigger.vue?vue&type=script&setup=true&lang.ts\nvar DialogTrigger_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogTrigger\",\n\tprops: {\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false,\n\t\t\tdefault: \"button\"\n\t\t}\n\t},\n\tsetup(__props) {\n\t\tconst props = __props;\n\t\tconst rootContext = injectDialogRootContext();\n\t\tconst { forwardRef, currentElement } = useForwardExpose();\n\t\trootContext.contentId ||= useId(void 0, \"reka-dialog-content\");\n\t\tonMounted(() => {\n\t\t\trootContext.triggerElement.value = currentElement.value;\n\t\t});\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(unref(Primitive), mergeProps(props, {\n\t\t\t\tref: unref(forwardRef),\n\t\t\t\ttype: _ctx.as === \"button\" ? \"button\" : void 0,\n\t\t\t\t\"aria-haspopup\": \"dialog\",\n\t\t\t\t\"aria-expanded\": unref(rootContext).open.value || false,\n\t\t\t\t\"aria-controls\": unref(rootContext).open.value ? unref(rootContext).contentId : void 0,\n\t\t\t\t\"data-state\": unref(rootContext).open.value ? \"open\" : \"closed\",\n\t\t\t\tonClick: unref(rootContext).onOpenToggle\n\t\t\t}), {\n\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t_: 3\n\t\t\t}, 16, [\n\t\t\t\t\"type\",\n\t\t\t\t\"aria-expanded\",\n\t\t\t\t\"aria-controls\",\n\t\t\t\t\"data-state\",\n\t\t\t\t\"onClick\"\n\t\t\t]);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogTrigger.vue\nvar DialogTrigger_default = DialogTrigger_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogTrigger_default };\n//# sourceMappingURL=DialogTrigger.js.map","<script setup lang=\"ts\">\n/**\n * A `?` that opens a modal.\n *\n * WHY THIS AND NOT `InfoHint`. `InfoHint` is a small `[i]` popover for a sentence or two — the right\n * shape for \"what does this field mean\". It is the wrong shape for the several paragraphs some of\n * these surfaces genuinely need: a 300-character bubble anchored to an icon either overflows its\n * container or wraps into a column two words wide.\n *\n * Those paragraphs used to sit permanently on the page as banners. That is the actual problem: an\n * explanation everyone reads once and nobody reads again, charged to every visit forever. A `?`\n * costs one glyph in the header and gives the reader the whole thing when they want it.\n *\n * WHAT STAYS ON THE PAGE. State, not explanation. \"Docker did not answer\" is a banner because it is\n * true right now and changes what you can do; \"here is how Traefik resolves a container IP\" is help,\n * and belongs behind the `?`.\n *\n * Built on Reka's Dialog: focus trap, focus restore, scroll lock, Escape, and `aria-modal` wiring\n * are all behaviour with edge cases, and none of them are this product's problem.\n */\nimport { DialogClose, DialogContent, DialogOverlay, DialogPortal, DialogRoot, DialogTitle, DialogTrigger } from 'reka-ui';\n\ndefineProps<{\n /** The question the modal answers, e.g. \"How routing works\". Becomes the dialog's title. */\n title: string;\n /** Accessible name for the trigger — screen readers hear this instead of \"question mark\". */\n label?: string;\n}>();\n</script>\n\n<template>\n <DialogRoot>\n <DialogTrigger class=\"helpq\" :aria-label=\"label ?? title\">\n <svg viewBox=\"0 0 24 24\" width=\"13\" height=\"13\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.2\" stroke-linecap=\"round\">\n <path d=\"M9.2 9a2.9 2.9 0 1 1 3.8 2.8c-.7.3-1 .9-1 1.6v.4\" />\n <circle cx=\"12\" cy=\"17.6\" r=\"0.9\" fill=\"currentColor\" stroke=\"none\" />\n </svg>\n </DialogTrigger>\n\n <DialogPortal>\n <DialogOverlay class=\"scrim help-scrim\" />\n <DialogContent class=\"help-modal\">\n <div class=\"help-head\">\n <DialogTitle class=\"help-title\">{{ title }}</DialogTitle>\n <DialogClose class=\"ghost sm\" aria-label=\"Close\">Close</DialogClose>\n </div>\n <div class=\"help-body\">\n <slot />\n </div>\n </DialogContent>\n </DialogPortal>\n </DialogRoot>\n</template>\n"],"names":["injectDialogRootContext","provideDialogRootContext","createContext","DialogRoot_vue_vue_type_script_setup_true_lang_default","defineComponent","__props","__emit","props","open","useVModel","triggerElement","ref","contentElement","modal","toRefs","value","_ctx","_cache","renderSlot","unref","DialogRoot_default","DialogClose_vue_vue_type_script_setup_true_lang_default","useForwardExpose","rootContext","openBlock","createBlock","Primitive","mergeProps","$event","withCtx","DialogClose_default","DialogContentImpl_vue_vue_type_script_setup_true_lang_default","emits","forwardRef","useId","onMounted","getActiveElement","FocusScope_default","createVNode","DismissableLayer_default","getOpenState","DialogContentImpl_default","DialogContentModal_vue_vue_type_script_setup_true_lang_default","emitsAsProps","useEmitAsProps","currentElement","useHideOthers","event","_a","originalEvent","ctrlLeftClick","DialogContentModal_default","DialogContentNonModal_vue_vue_type_script_setup_true_lang_default","hasInteractedOutsideRef","hasPointerDownOutsideRef","target","DialogContentNonModal_default","DialogContent_vue_vue_type_script_setup_true_lang_default","Presence_default","DialogContent_default","DialogOverlayImpl_vue_vue_type_script_setup_true_lang_default","useBodyScrollLock","withModifiers","DialogOverlayImpl_default","DialogOverlay_vue_vue_type_script_setup_true_lang_default","createCommentVNode","DialogOverlay_default","DialogPortal_vue_vue_type_script_setup_true_lang_default","Teleport_default","normalizeProps","guardReactiveProps","DialogPortal_default","DialogTitle_vue_vue_type_script_setup_true_lang_default","DialogTitle_default","DialogTrigger_vue_vue_type_script_setup_true_lang_default","DialogTrigger_default","_createBlock","_unref","DialogRoot","_createVNode","DialogTrigger","_createElementVNode","DialogPortal","DialogOverlay","DialogContent","_hoisted_1","DialogTitle","DialogClose","_hoisted_2","_renderSlot"],"mappings":"ySAKA,KAAM,CAACA,EAAyBC,CAAwB,EAAkBC,EAAc,YAAY,EACpG,IAAIC,EAA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EAAAG,EAAA,EAAA,CALD,MAAM,QAAS,aAAY3E,EAAA,OAASA,EAAA,KAAA,aACjD,IAGM,CAAA,GAAAY,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,CAHNgE,EAGM,MAAA,CAHD,QAAQ,YAAY,MAAM,KAAK,OAAO,KAAK,cAAY,OAAO,KAAK,OAAO,OAAO,eAAe,eAAa,MAAM,iBAAe,OAAA,GACrIA,EAA6D,OAAA,CAAvD,EAAE,mDAAkD,EAC1DA,EAAsE,SAAA,CAA9D,GAAG,KAAK,GAAG,OAAO,EAAE,MAAM,KAAK,eAAe,OAAO,MAAA,mCAIjEF,EAWeF,EAAAK,EAAA,EAAA,KAAA,WAVb,IAA0C,CAA1CH,EAA0CF,EAAAM,EAAA,EAAA,CAA3B,MAAM,mBAAkB,EACvCJ,EAQgBF,EAAAO,EAAA,EAAA,CARD,MAAM,cAAY,WAC/B,IAGM,CAHNH,EAGM,MAHNI,GAGM,CAFJN,EAAyDF,EAAAS,EAAA,EAAA,CAA5C,MAAM,cAAY,WAAC,IAAW,KAARjF,EAAA,KAAK,EAAA,CAAA,CAAA,SACxC0E,EAAoEF,EAAAU,CAAA,EAAA,CAAvD,MAAM,WAAW,aAAW,OAAA,aAAQ,IAAK,CAAA,GAAAtE,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAAL,QAAK,EAAA,CAAA,aAExDgE,EAEM,MAFNO,GAEM,CADJC,EAAQzE,EAAA,OAAA,SAAA,CAAA","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10]}
@@ -1,2 +0,0 @@
1
- import{d as q,c as d,a as t,F as j,y as O,Z as W,o as l,D as K,E as S,u as v,t as u,J as Z,M as G,e as C,w as I,f as i,g as c,z as L,r as b,j as R,k as H,n as N,C as z,O as J}from"./index-BXPaPWhH.js";import{a as P,c as E,t as Q}from"./useFormat-DIlTY5Dl.js";import{_ as X}from"./LogViewer.vue_vue_type_script_setup_true_lang-BNqCyGeQ.js";import{_ as Y}from"./StateBadge.vue_vue_type_script_setup_true_lang-m8_cteEx.js";import{_ as ee}from"./ActionButton.vue_vue_type_script_setup_true_lang-CxT4O7XN.js";import{_ as te}from"./ErrorNote.vue_vue_type_script_setup_true_lang-B5-EJpIO.js";function g(n){var r;return(r=n.message)!=null&&r.startsWith("unverifiable")?"unverifiable":n.ok?"ok":n.phase==="assert_gone"?"leaked":"failed"}function se(n){return{ok:"✓",unverifiable:"?",leaked:"!",failed:"✗"}[g(n)]}function ae(n){return n.message?n.message:n.skipped?"skipped":g(n)==="ok"?"ok":`exit ${n.code}`}function ne(n){return n.filter(r=>r.phase==="assert_gone"&&!r.ok).map(r=>r.axis)}function oe(n){return n.filter(r=>g(r)==="unverifiable").length}const le={class:"steps stagger"},re={class:"who"},ie={class:"dim",style:{"font-size":"var(--t-sm)"}},ue=q({__name:"StepList",props:{steps:{}},setup(n){return(r,s)=>(l(),d("div",null,[t("ul",le,[(l(!0),d(j,null,O(n.steps,(o,m)=>(l(),d("li",{key:`${o.phase}-${o.axis}-${m}`,class:"step",style:K({"--i":m})},[t("span",{class:S(["mark",`s-${v(g)(o)}`]),"aria-hidden":"true"},u(v(se)(o)),3),t("span",null,[t("span",re,u(o.axis),1),t("span",ie," · "+u(o.phase),1),t("span",{class:S(["badge",v(g)(o)]),style:{"margin-left":"var(--s2)"}},u(v(g)(o)),3),t("div",{class:S(["msg",`s-${v(g)(o)}`])},u(v(ae)(o)),3)])],4))),128))]),s[0]||(s[0]=W('<p class="hint"><span class="s-ok">✓ ok</span> · <span class="s-failed">✗ failed</span> · <span class="s-leaked">! leaked — survived teardown</span> · <span class="s-unverifiable">? unverifiable — nothing to check, not a pass</span>. A <code>down</code> step marked ok may still carry a <code>non-fatal:</code> note: teardown is best-effort by design, so aborting halfway would leave more behind than continuing. </p>',1))]))}}),de={class:"page-head"},ce={class:"sub"},pe={key:0,class:"panel banner-panel warn"},ve={key:2,class:"panel leaked-banner"},me={key:3,class:"panel"},fe={class:"pre"},ye={class:"panel"},ge={key:4,class:"panel"},be={class:"phead"},ke={key:0,class:"mute"},Se=q({__name:"JobDetailView",props:{jobId:{}},setup(n){const r=n,s=b(null),o=b([]),m=b(""),x=b(!0),_=b(!1),F=R(()=>{const a=[];let e="";for(const p of o.value){const h=new Date(p.at),y=h.toLocaleDateString("sv");y!==e&&(a.push({key:`day-${y}-${p.seq}`,separator:!0,text:y}),e=y),a.push({key:p.seq,gutter:h.toTimeString().slice(0,8),gutterTitle:E(p.at),text:p.message,tone:p.level})}return a});let f=null;const A=R(()=>{var a;return(a=s.value)!=null&&a.outcome?ne(s.value.outcome.steps):[]}),T=R(()=>{var a;return(a=s.value)!=null&&a.outcome?oe(s.value.outcome.steps):0});async function k(){var e;const a=await N.get(`/api/jobs/${encodeURIComponent(r.jobId)}`);return x.value=!1,a.ok?(m.value="",s.value=a.body.job,(e=a.body.job.log)!=null&&e.length&&o.value.length===0&&(o.value=[...a.body.job.log]),a.body.job):(m.value=z(a,"load job"),null)}function w(){f==null||f.close(),f=null,_.value=!1}function V(){w(),o.value=[],f=new EventSource(N.url(`/api/jobs/${encodeURIComponent(r.jobId)}/stream`)),_.value=!0,f.onmessage=a=>{let e;try{e=JSON.parse(a.data)}catch{return}if(e.done){w(),k();return}o.value.push(e)},f.onerror=()=>{w(),k()}}Z(()=>r.jobId,async()=>{o.value=[],s.value=null,x.value=!0;const a=await k();a&&a.state==="running"&&V()},{immediate:!0});const $=b(!1);async function M(){$.value=!0;const a=await N.post(`/api/jobs/${encodeURIComponent(r.jobId)}/cancel`);if($.value=!1,!a.ok){J(a.status===409?"info":"error",z(a,"stop this job")),k();return}J("ok",a.body.warning??"Stopped."),k()}return G(w),(a,e)=>{var h,y,B,D;const p=H("RouterLink");return l(),d("div",null,[t("div",de,[t("div",null,[t("h1",null,[C(p,{to:"/jobs",class:"mute"},{default:I(()=>[...e[0]||(e[0]=[i("Jobs",-1)])]),_:1}),e[1]||(e[1]=t("span",{class:"mute"}," / ",-1)),i(u(s.value?v(P)(s.value.action):"…"),1)]),t("div",ce,[s.value?(l(),d(j,{key:0},[t("code",null,u(s.value.stack),1),i(" · started "+u(v(E)(s.value.startedAt))+" ",1),s.value.endedAt?(l(),d(j,{key:0},[i(" · took "+u(v(Q)(s.value.startedAt,s.value.endedAt)),1)],64)):c("",!0)],64)):(l(),d(j,{key:1},[i(u(n.jobId),1)],64))])]),e[3]||(e[3]=t("span",{class:"grow"},null,-1)),s.value?(l(),L(Y,{key:0,state:s.value.state},null,8,["state"])):c("",!0),((h=s.value)==null?void 0:h.state)==="running"?(l(),L(ee,{key:1,variant:"danger",pending:$.value,confirm:"Stop it? Nothing is undone.",title:"Kills the command in flight. Anything already created or destroyed stays that way.",onRun:M},{default:I(()=>[...e[2]||(e[2]=[i(" Stop ",-1)])]),_:1},8,["pending"])):c("",!0)]),((y=s.value)==null?void 0:y.state)==="cancelled"?(l(),d("section",pe,[t("b",null,"Stopped by "+u(s.value.cancelledBy??"an operator")+" — nothing was undone.",1),e[4]||(e[4]=t("p",null,[i(" Whatever this job had already created or destroyed is still that way. Run "),t("b",null,"Verify"),i(" on the deployment to see what actually exists. ")],-1))])):c("",!0),m.value?(l(),L(te,{key:1,text:m.value},null,8,["text"])):c("",!0),A.value.length?(l(),d("section",ve,[e[5]||(e[5]=t("strong",null,"Leaked:",-1)),i(" "+u(A.value.join(", "))+" ",1),e[6]||(e[6]=t("div",{class:"mute"},[i(" These axes' "),t("code",null,"assert_gone"),i(" failed, so the resources are still present. They will not be retried — tear them down by hand, then re-run "),t("code",null,"verify"),i(". ")],-1))])):c("",!0),(B=s.value)!=null&&B.error?(l(),d("section",me,[e[7]||(e[7]=t("strong",{class:"bad"},"The job crashed",-1)),t("pre",fe,u(s.value.error),1)])):c("",!0),t("section",ye,[e[8]||(e[8]=t("div",{class:"phead"},[t("h2",{class:"phead-title"},"Log")],-1)),C(X,{rows:F.value,live:_.value,"empty-text":x.value?"Loading…":"No output."},{actions:I(()=>{var U;return[!_.value&&((U=s.value)==null?void 0:U.state)==="running"?(l(),d("button",{key:0,class:"ghost sm",onClick:V}," Reconnect ")):c("",!0)]}),_:1},8,["rows","live","empty-text"])]),(D=s.value)!=null&&D.outcome?(l(),d("section",ge,[t("div",be,[e[11]||(e[11]=t("h2",{class:"phead-title"},"Steps",-1)),T.value?(l(),d("span",ke,[i(u(T.value)+" unverifiable — no ",1),e[9]||(e[9]=t("code",null,"assert_gone",-1)),e[10]||(e[10]=i(", so nothing was checked ",-1))])):c("",!0)]),C(ue,{steps:s.value.outcome.steps},null,8,["steps"])])):c("",!0)])}}});export{Se as default};
2
- //# sourceMappingURL=JobDetailView-BExTkW8o.js.map