@samyx/preview-stacks-ui 0.17.0 → 0.19.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 (88) hide show
  1. package/dist/assets/{ActionButton.vue_vue_type_script_setup_true_lang-CgvjRc04.js → ActionButton.vue_vue_type_script_setup_true_lang-C0iLjBml.js} +2 -2
  2. package/dist/assets/{ActionButton.vue_vue_type_script_setup_true_lang-CgvjRc04.js.map → ActionButton.vue_vue_type_script_setup_true_lang-C0iLjBml.js.map} +1 -1
  3. package/dist/assets/{AxesTab-WenhB_vu.js → AxesTab-COaSNzrG.js} +2 -2
  4. package/dist/assets/{AxesTab-WenhB_vu.js.map → AxesTab-COaSNzrG.js.map} +1 -1
  5. package/dist/assets/{ConfigTab-CglWduAQ.js → ConfigTab-XGvUbd66.js} +2 -2
  6. package/dist/assets/{ConfigTab-CglWduAQ.js.map → ConfigTab-XGvUbd66.js.map} +1 -1
  7. package/dist/assets/{ConflictNote.vue_vue_type_script_setup_true_lang-lQT53Lug.js → ConflictNote.vue_vue_type_script_setup_true_lang-DrzDcr4X.js} +2 -2
  8. package/dist/assets/{ConflictNote.vue_vue_type_script_setup_true_lang-lQT53Lug.js.map → ConflictNote.vue_vue_type_script_setup_true_lang-DrzDcr4X.js.map} +1 -1
  9. package/dist/assets/{DangerTab-BpHYOqUf.js → DangerTab-DsSJqxzj.js} +2 -2
  10. package/dist/assets/{DangerTab-BpHYOqUf.js.map → DangerTab-DsSJqxzj.js.map} +1 -1
  11. package/dist/assets/{DashboardView-BjWlGE5y.js → DashboardView-0BLBDth-.js} +2 -2
  12. package/dist/assets/{DashboardView-BjWlGE5y.js.map → DashboardView-0BLBDth-.js.map} +1 -1
  13. package/dist/assets/{DeploymentDetailView-DUNBCl-U.js → DeploymentDetailView-dJjqob1P.js} +2 -2
  14. package/dist/assets/{DeploymentDetailView-DUNBCl-U.js.map → DeploymentDetailView-dJjqob1P.js.map} +1 -1
  15. package/dist/assets/{DeploymentsView-BSxvMk7b.js → DeploymentsView-BM9LVpU-.js} +2 -2
  16. package/dist/assets/{DeploymentsView-BSxvMk7b.js.map → DeploymentsView-BM9LVpU-.js.map} +1 -1
  17. package/dist/assets/{EquivalentCommand-CutqDImz.js → EquivalentCommand-DyCAI1Cy.js} +2 -2
  18. package/dist/assets/{EquivalentCommand-CutqDImz.js.map → EquivalentCommand-DyCAI1Cy.js.map} +1 -1
  19. package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-Dc9KYyvl.js → ErrorNote.vue_vue_type_script_setup_true_lang-DjEWoD0O.js} +2 -2
  20. package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-Dc9KYyvl.js.map → ErrorNote.vue_vue_type_script_setup_true_lang-DjEWoD0O.js.map} +1 -1
  21. package/dist/assets/{HelpModal.vue_vue_type_script_setup_true_lang-k07tJ3j4.js → HelpModal.vue_vue_type_script_setup_true_lang-CACw-lfW.js} +2 -2
  22. package/dist/assets/{HelpModal.vue_vue_type_script_setup_true_lang-k07tJ3j4.js.map → HelpModal.vue_vue_type_script_setup_true_lang-CACw-lfW.js.map} +1 -1
  23. package/dist/assets/JobDetailView-DsYfLQUd.js +2 -0
  24. package/dist/assets/JobDetailView-DsYfLQUd.js.map +1 -0
  25. package/dist/assets/{JobsView-CsQt3bA6.js → JobsView-UUwzBG2c.js} +2 -2
  26. package/dist/assets/{JobsView-CsQt3bA6.js.map → JobsView-UUwzBG2c.js.map} +1 -1
  27. package/dist/assets/LogViewer.vue_vue_type_script_setup_true_lang-DYfYw8_a.js +3 -0
  28. package/dist/assets/LogViewer.vue_vue_type_script_setup_true_lang-DYfYw8_a.js.map +1 -0
  29. package/dist/assets/{LoginView-P5dPUZTJ.js → LoginView-cKuF7PhJ.js} +2 -2
  30. package/dist/assets/{LoginView-P5dPUZTJ.js.map → LoginView-cKuF7PhJ.js.map} +1 -1
  31. package/dist/assets/LogsTab-QEuDGrG2.js +5 -0
  32. package/dist/assets/LogsTab-QEuDGrG2.js.map +1 -0
  33. package/dist/assets/{NotFoundView-D24ZsYHH.js → NotFoundView-Bpcd3Ptj.js} +2 -2
  34. package/dist/assets/{NotFoundView-D24ZsYHH.js.map → NotFoundView-Bpcd3Ptj.js.map} +1 -1
  35. package/dist/assets/{NotifiersView-C7MuDZxA.js → NotifiersView-B1xAKTwU.js} +2 -2
  36. package/dist/assets/{NotifiersView-C7MuDZxA.js.map → NotifiersView-B1xAKTwU.js.map} +1 -1
  37. package/dist/assets/{OverviewTab-TSZ_zuK2.js → OverviewTab-B2aCu4e0.js} +2 -2
  38. package/dist/assets/{OverviewTab-TSZ_zuK2.js.map → OverviewTab-B2aCu4e0.js.map} +1 -1
  39. package/dist/assets/{RegistriesView-DnZS4ahO.js → RegistriesView-CfblUxVo.js} +2 -2
  40. package/dist/assets/{RegistriesView-DnZS4ahO.js.map → RegistriesView-CfblUxVo.js.map} +1 -1
  41. package/dist/assets/{RelativeTime.vue_vue_type_script_setup_true_lang-CggmQ7kH.js → RelativeTime.vue_vue_type_script_setup_true_lang-Dx90hw4F.js} +2 -2
  42. package/dist/assets/{RelativeTime.vue_vue_type_script_setup_true_lang-CggmQ7kH.js.map → RelativeTime.vue_vue_type_script_setup_true_lang-Dx90hw4F.js.map} +1 -1
  43. package/dist/assets/{RequiresTab-wrhDeq3R.js → RequiresTab-DKFeob92.js} +2 -2
  44. package/dist/assets/{RequiresTab-wrhDeq3R.js.map → RequiresTab-DKFeob92.js.map} +1 -1
  45. package/dist/assets/{RoutingView-k7P_0Fiy.js → RoutingView-7SWVlOx8.js} +2 -2
  46. package/dist/assets/{RoutingView-k7P_0Fiy.js.map → RoutingView-7SWVlOx8.js.map} +1 -1
  47. package/dist/assets/{RuntimeTab-DyqlQuW3.js → RuntimeTab-CiSAV3D0.js} +2 -2
  48. package/dist/assets/{RuntimeTab-DyqlQuW3.js.map → RuntimeTab-CiSAV3D0.js.map} +1 -1
  49. package/dist/assets/{SelectMenu.vue_vue_type_script_setup_true_lang-iF5ZAUNJ.js → SelectMenu.vue_vue_type_script_setup_true_lang-B-DTK242.js} +2 -2
  50. package/dist/assets/{SelectMenu.vue_vue_type_script_setup_true_lang-iF5ZAUNJ.js.map → SelectMenu.vue_vue_type_script_setup_true_lang-B-DTK242.js.map} +1 -1
  51. package/dist/assets/{SettingsView-DGOOHUmS.js → SettingsView-BEha1Bt3.js} +2 -2
  52. package/dist/assets/{SettingsView-DGOOHUmS.js.map → SettingsView-BEha1Bt3.js.map} +1 -1
  53. package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-4-wv5VUT.js → SkeletonList.vue_vue_type_script_setup_true_lang-DiCGtn2a.js} +2 -2
  54. package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-4-wv5VUT.js.map → SkeletonList.vue_vue_type_script_setup_true_lang-DiCGtn2a.js.map} +1 -1
  55. package/dist/assets/{SpecDetailView-UlkXrNPX.js → SpecDetailView-l86eWf2v.js} +2 -2
  56. package/dist/assets/{SpecDetailView-UlkXrNPX.js.map → SpecDetailView-l86eWf2v.js.map} +1 -1
  57. package/dist/assets/{SpecsView-ClJTm56i.js → SpecsView-BfWq69K5.js} +2 -2
  58. package/dist/assets/{SpecsView-ClJTm56i.js.map → SpecsView-BfWq69K5.js.map} +1 -1
  59. package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-41WL5KQB.js → StateBadge.vue_vue_type_script_setup_true_lang-DMzCGltO.js} +2 -2
  60. package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-41WL5KQB.js.map → StateBadge.vue_vue_type_script_setup_true_lang-DMzCGltO.js.map} +1 -1
  61. package/dist/assets/SubmitView-6cqvVYlz.js +50 -0
  62. package/dist/assets/SubmitView-6cqvVYlz.js.map +1 -0
  63. package/dist/assets/{Teleport-BrqLogTs.js → Teleport-SesEhfqH.js} +3 -3
  64. package/dist/assets/{Teleport-BrqLogTs.js.map → Teleport-SesEhfqH.js.map} +1 -1
  65. package/dist/assets/{TerminalTab-Danh15pL.js → TerminalTab-gDAKYgTX.js} +2 -2
  66. package/dist/assets/{TerminalTab-Danh15pL.js.map → TerminalTab-gDAKYgTX.js.map} +1 -1
  67. package/dist/assets/{UsersView-CAmIqdDQ.js → UsersView-Bvs30U8o.js} +2 -2
  68. package/dist/assets/{UsersView-CAmIqdDQ.js.map → UsersView-Bvs30U8o.js.map} +1 -1
  69. package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-Cv1cEZ4H.js → VarEditor.vue_vue_type_script_setup_true_lang-UEG5poOe.js} +2 -2
  70. package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-Cv1cEZ4H.js.map → VarEditor.vue_vue_type_script_setup_true_lang-UEG5poOe.js.map} +1 -1
  71. package/dist/assets/VariablesView-Xn79UX3b.js +2 -0
  72. package/dist/assets/VariablesView-Xn79UX3b.js.map +1 -0
  73. package/dist/assets/VariablesView-m1RjJR-x.css +1 -0
  74. package/dist/assets/{index-CixluYeb.css → index-WMJXAtiA.css} +1 -1
  75. package/dist/assets/index-jLPJ82ve.js +139 -0
  76. package/dist/assets/index-jLPJ82ve.js.map +1 -0
  77. package/dist/assets/{useDeployment-B9V5NDTm.js → useDeployment-Bgo0U4-I.js} +2 -2
  78. package/dist/assets/{useDeployment-B9V5NDTm.js.map → useDeployment-Bgo0U4-I.js.map} +1 -1
  79. package/dist/index.html +2 -2
  80. package/package.json +1 -1
  81. package/dist/assets/JobDetailView-IZyvsmEF.js +0 -2
  82. package/dist/assets/JobDetailView-IZyvsmEF.js.map +0 -1
  83. package/dist/assets/LogsTab-BLUVS00E.js +0 -4
  84. package/dist/assets/LogsTab-BLUVS00E.js.map +0 -1
  85. package/dist/assets/SubmitView-DEuu72dN.js +0 -45
  86. package/dist/assets/SubmitView-DEuu72dN.js.map +0 -1
  87. package/dist/assets/index-Cuxev-ia.js +0 -134
  88. package/dist/assets/index-Cuxev-ia.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{S as n,C as i,A as d,B as l,J as p,U as c}from"./index-Cuxev-ia.js";import{w as u,r as y}from"./useVars-VN9gYdR6.js";const e=n({id:"",detail:null,error:"",loading:!1,vars:[]}),f=i(()=>p(e.vars)),k=i(()=>c(e.id)),b=i(()=>{var a;return((a=e.detail)==null?void 0:a.kind)==="shared"}),h=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 d.get(`/api/deployments/${encodeURIComponent(a)}${f.value}`);if(e.id!==a)return;if(e.loading=!1,!s.ok){e.detail=null,e.error=l(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,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(){u(e.id,e.vars)}function x(){m(),t()}export{x as a,e as d,b as i,g as o,m as p,k as r,h as u,f as v};
2
- //# sourceMappingURL=useDeployment-B9V5NDTm.js.map
1
+ import{S as n,C as i,A as d,B as l,J as p,U as c}from"./index-jLPJ82ve.js";import{w as u,r as y}from"./useVars-VN9gYdR6.js";const e=n({id:"",detail:null,error:"",loading:!1,vars:[]}),f=i(()=>p(e.vars)),k=i(()=>c(e.id)),b=i(()=>{var a;return((a=e.detail)==null?void 0:a.kind)==="shared"}),h=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 d.get(`/api/deployments/${encodeURIComponent(a)}${f.value}`);if(e.id!==a)return;if(e.loading=!1,!s.ok){e.detail=null,e.error=l(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,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(){u(e.id,e.vars)}function x(){m(),t()}export{x as a,e as d,b as i,g as o,m as p,k as r,h as u,f as v};
2
+ //# sourceMappingURL=useDeployment-Bgo0U4-I.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDeployment-B9V5NDTm.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 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":"4HAkBO,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,EAAI,GACfA,EAAI,QAAU,GACd,MAAMa,EAAI,MAAMC,EAAI,IAAgB,oBAAoB,mBAAmBF,CAAE,CAAC,GAAGV,EAAU,KAAK,EAAE,EAGlG,GAAIF,EAAI,KAAOY,EAAI,OAGnB,GAFAZ,EAAI,QAAU,GAEV,CAACa,EAAE,GAAI,CACTb,EAAI,OAAS,KACbA,EAAI,MAAQe,EAAQF,EAAG,wBAAwBD,CAAE,EAAE,EACnD,MACF,CACAZ,EAAI,MAAQ,GACZ,MAAMgB,EAAIH,EAAE,KACZb,EAAI,OAAS,CACX,GAAIgB,EAAE,IAAMJ,EACZ,KAAMI,EAAE,OAAS,SAAW,SAAW,WACvC,UAAWA,EAAE,UACb,UAAWA,EAAE,UACb,MAAO,OAAOA,EAAE,OAAU,SAAWA,EAAE,MAAQ,GAC/C,KAAMA,EAAE,MAAQ,KAChB,QAASA,EAAE,QACP,CACE,KAAMA,EAAE,QAAQ,MAAQ,IACxB,SAAUA,EAAE,QAAQ,UAAY,CAAA,EAChC,SAAUA,EAAE,QAAQ,UAAY,CAAA,CAAC,EAEnC,KACJ,SAAU,MAAM,QAAQA,EAAE,QAAQ,EAAIA,EAAE,SAAW,CAAA,EACnD,MAAO,MAAM,QAAQA,EAAE,IAAI,EAAIA,EAAE,KAAO,CAAA,GAAI,IAAKN,IAAO,CACtD,KAAMA,EAAE,KACR,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"}
1
+ {"version":3,"file":"useDeployment-Bgo0U4-I.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 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":"4HAkBO,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,EAAI,GACfA,EAAI,QAAU,GACd,MAAMa,EAAI,MAAMC,EAAI,IAAgB,oBAAoB,mBAAmBF,CAAE,CAAC,GAAGV,EAAU,KAAK,EAAE,EAGlG,GAAIF,EAAI,KAAOY,EAAI,OAGnB,GAFAZ,EAAI,QAAU,GAEV,CAACa,EAAE,GAAI,CACTb,EAAI,OAAS,KACbA,EAAI,MAAQe,EAAQF,EAAG,wBAAwBD,CAAE,EAAE,EACnD,MACF,CACAZ,EAAI,MAAQ,GACZ,MAAMgB,EAAIH,EAAE,KACZb,EAAI,OAAS,CACX,GAAIgB,EAAE,IAAMJ,EACZ,KAAMI,EAAE,OAAS,SAAW,SAAW,WACvC,UAAWA,EAAE,UACb,UAAWA,EAAE,UACb,MAAO,OAAOA,EAAE,OAAU,SAAWA,EAAE,MAAQ,GAC/C,KAAMA,EAAE,MAAQ,KAChB,QAASA,EAAE,QACP,CACE,KAAMA,EAAE,QAAQ,MAAQ,IACxB,SAAUA,EAAE,QAAQ,UAAY,CAAA,EAChC,SAAUA,EAAE,QAAQ,UAAY,CAAA,CAAC,EAEnC,KACJ,SAAU,MAAM,QAAQA,EAAE,QAAQ,EAAIA,EAAE,SAAW,CAAA,EACnD,MAAO,MAAM,QAAQA,EAAE,IAAI,EAAIA,EAAE,KAAO,CAAA,GAAI,IAAKN,IAAO,CACtD,KAAMA,EAAE,KACR,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"}
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-Cuxev-ia.js"></script>
31
- <link rel="stylesheet" crossorigin href="/assets/index-CixluYeb.css">
30
+ <script type="module" crossorigin src="/assets/index-jLPJ82ve.js"></script>
31
+ <link rel="stylesheet" crossorigin href="/assets/index-WMJXAtiA.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.17.0",
3
+ "version": "0.19.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",
@@ -1,2 +0,0 @@
1
- import{d as D,c as r,a as e,F as g,s as z,a1 as J,o as n,D as M,E as _,u as p,t as u,H as q,K as H,e as V,w as G,f as d,g as c,x as B,i as K,G as O,r as f,C as E,A as R,j as W,B as P}from"./index-Cuxev-ia.js";import{a as Q,s as U,t as X}from"./useFormat-CKJxQp_i.js";import{_ as Y}from"./StateBadge.vue_vue_type_script_setup_true_lang-41WL5KQB.js";import{_ as Z}from"./ErrorNote.vue_vue_type_script_setup_true_lang-Dc9KYyvl.js";function k(o){var i;return(i=o.message)!=null&&i.startsWith("unverifiable")?"unverifiable":o.ok?"ok":o.phase==="assert_gone"?"leaked":"failed"}function ee(o){return{ok:"✓",unverifiable:"?",leaked:"!",failed:"✗"}[k(o)]}function se(o){return o.message?o.message:o.skipped?"skipped":k(o)==="ok"?"ok":`exit ${o.code}`}function te(o){return o.filter(i=>i.phase==="assert_gone"&&!i.ok).map(i=>i.axis)}function ae(o){return o.filter(i=>k(i)==="unverifiable").length}const oe={class:"steps stagger"},ne={class:"who"},le={class:"dim",style:{"font-size":"var(--t-sm)"}},re=D({__name:"StepList",props:{steps:{}},setup(o){return(i,t)=>(n(),r("div",null,[e("ul",oe,[(n(!0),r(g,null,z(o.steps,(l,v)=>(n(),r("li",{key:`${l.phase}-${l.axis}-${v}`,class:"step",style:M({"--i":v})},[e("span",{class:_(["mark",`s-${p(k)(l)}`]),"aria-hidden":"true"},u(p(ee)(l)),3),e("span",null,[e("span",ne,u(l.axis),1),e("span",le," · "+u(l.phase),1),e("span",{class:_(["badge",p(k)(l)]),style:{"margin-left":"var(--s2)"}},u(p(k)(l)),3),e("div",{class:_(["msg",`s-${p(k)(l)}`])},u(p(se)(l)),3)])],4))),128))]),t[0]||(t[0]=J('<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))]))}}),ue={class:"page-head"},ie={class:"sub"},de={key:1,class:"panel leaked-banner"},ce={key:2,class:"panel"},pe={class:"pre"},ve={class:"panel"},me={class:"phead"},fe={class:"row",style:{gap:"8px"}},ke={key:0,class:"mute pulse"},be={class:"row",style:{gap:"6px"}},ge={key:0,class:"mute"},he={key:1,class:"mute"},ye={class:"mute"},_e={key:3,class:"panel"},we={class:"phead"},xe={key:0,class:"mute"},Le=D({__name:"JobDetailView",props:{jobId:{}},setup(o){const i=o,t=f(null),l=f([]),v=f(""),w=f(!0),h=f(!1),x=f(!0),$=f(null);let m=null;const C=E(()=>{var a;return(a=t.value)!=null&&a.outcome?te(t.value.outcome.steps):[]}),S=E(()=>{var a;return(a=t.value)!=null&&a.outcome?ae(t.value.outcome.steps):0});async function j(){var s;const a=await R.get(`/api/jobs/${encodeURIComponent(i.jobId)}`);return w.value=!1,a.ok?(v.value="",t.value=a.body.job,(s=a.body.job.log)!=null&&s.length&&l.value.length===0&&(l.value=[...a.body.job.log]),a.body.job):(v.value=P(a,"load job"),null)}function y(){m==null||m.close(),m=null,h.value=!1}function L(){y(),m=new EventSource(R.url(`/api/jobs/${encodeURIComponent(i.jobId)}/stream`)),h.value=!0,m.onmessage=a=>{let s;try{s=JSON.parse(a.data)}catch{return}if(s.done){y(),j();return}l.value.push(s),x.value&&queueMicrotask(F)},m.onerror=()=>{y(),j()}}function F(){const a=$.value;a&&(a.scrollTop=a.scrollHeight)}return q(()=>i.jobId,async()=>{l.value=[],t.value=null,w.value=!0;const a=await j();a&&a.state==="running"&&L()},{immediate:!0}),H(y),(a,s)=>{var I,N,T;const A=W("RouterLink");return n(),r("div",null,[e("div",ue,[e("div",null,[e("h1",null,[V(A,{to:"/jobs",class:"mute"},{default:G(()=>[...s[1]||(s[1]=[d("Jobs",-1)])]),_:1}),s[2]||(s[2]=e("span",{class:"mute"}," / ",-1)),d(u(t.value?p(Q)(t.value.action):"…"),1)]),e("div",ie,[t.value?(n(),r(g,{key:0},[e("code",null,u(t.value.stack),1),d(" · started "+u(p(U)(t.value.startedAt))+" ",1),t.value.endedAt?(n(),r(g,{key:0},[d(" · took "+u(p(X)(t.value.startedAt,t.value.endedAt)),1)],64)):c("",!0)],64)):(n(),r(g,{key:1},[d(u(o.jobId),1)],64))])]),t.value?(n(),B(Y,{key:0,state:t.value.state},null,8,["state"])):c("",!0)]),v.value?(n(),B(Z,{key:0,text:v.value},null,8,["text"])):c("",!0),C.value.length?(n(),r("section",de,[s[3]||(s[3]=e("strong",null,"Leaked:",-1)),d(" "+u(C.value.join(", "))+" ",1),s[4]||(s[4]=e("div",{class:"mute"},[d(" These axes' "),e("code",null,"assert_gone"),d(" failed, so the resources are still present. They will not be retried — tear them down by hand, then re-run "),e("code",null,"verify"),d(". ")],-1))])):c("",!0),(I=t.value)!=null&&I.error?(n(),r("section",ce,[s[5]||(s[5]=e("strong",{class:"bad"},"The job crashed",-1)),e("pre",pe,u(t.value.error),1)])):c("",!0),e("section",ve,[e("div",me,[s[7]||(s[7]=e("h2",{class:"phead-title"},"Log",-1)),e("div",fe,[h.value?(n(),r("span",ke,"streaming…")):c("",!0),e("label",be,[K(e("input",{"onUpdate:modelValue":s[0]||(s[0]=b=>x.value=b),type:"checkbox"},null,512),[[O,x.value]]),s[6]||(s[6]=e("span",{class:"mute"},"Follow",-1))]),!h.value&&((N=t.value)==null?void 0:N.state)==="running"?(n(),r("button",{key:1,class:"btn",onClick:L}," Reconnect ")):c("",!0)])]),e("div",{ref_key:"logEl",ref:$,class:"logbox",role:"log","aria-live":"polite"},[w.value?(n(),r("div",ge,"Loading…")):l.value.length?c("",!0):(n(),r("div",he,"No output.")),(n(!0),r(g,null,z(l.value,b=>(n(),r("div",{key:b.seq,class:_(["logline",b.level])},[e("span",ye,u(p(U)(b.at)),1),d(" "+u(b.message),1)],2))),128))],512)]),(T=t.value)!=null&&T.outcome?(n(),r("section",_e,[e("div",we,[s[10]||(s[10]=e("h2",{class:"phead-title"},"Steps",-1)),S.value?(n(),r("span",xe,[d(u(S.value)+" unverifiable — no ",1),s[8]||(s[8]=e("code",null,"assert_gone",-1)),s[9]||(s[9]=d(", so nothing was checked ",-1))])):c("",!0)]),V(re,{steps:t.value.outcome.steps},null,8,["steps"])])):c("",!0)])}}});export{Le as default};
2
- //# sourceMappingURL=JobDetailView-IZyvsmEF.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"JobDetailView-IZyvsmEF.js","sources":["../../src/composables/useSteps.ts","../../src/components/StepList.vue","../../src/views/JobDetailView.vue"],"sourcesContent":["/**\n * Step classification — the single most important logic in this app.\n *\n * A job's outcome has four states that MUST NOT blur into one another. The whole product is the\n * distinction between the middle two:\n *\n * ok passed. A `down` step is ALWAYS ok and may still carry a \"non-fatal:\" note —\n * teardown is best-effort by design, so the step really did pass.\n * unverifiable the axis defines no `assert_gone`, so `verify` had nothing to check. NOT a pass.\n * A green here would be exactly the false confidence this tool exists to remove.\n * leaked `assert_gone` FAILED — the resource survived teardown. Nothing else will clean\n * it up. This is the signal the whole tool exists for, and the CLI's exit code 2.\n * failed any other non-zero step.\n *\n * Order matters: `unverifiable` is matched on the message FIRST, exactly as the CLI's own report\n * does. `skipped` alone is not enough — a dry run also skips.\n */\n\nimport type { StepResult } from '../api/types';\n\nexport type StepState = 'ok' | 'unverifiable' | 'leaked' | 'failed';\n\nexport function stepState(s: StepResult): StepState {\n if (s.message?.startsWith('unverifiable')) return 'unverifiable';\n if (!s.ok) return s.phase === 'assert_gone' ? 'leaked' : 'failed';\n return 'ok';\n}\n\nexport function stepMark(s: StepResult): string {\n return { ok: '✓', unverifiable: '?', leaked: '!', failed: '✗' }[stepState(s)];\n}\n\nexport function stepText(s: StepResult): string {\n if (s.message) return s.message;\n if (s.skipped) return 'skipped';\n return stepState(s) === 'ok' ? 'ok' : `exit ${s.code}`;\n}\n\n/** Only a failed `assert_gone` is a leak. Every other non-zero step is a plain failure. */\nexport function leakedAxes(steps: StepResult[]): string[] {\n return steps.filter((s) => s.phase === 'assert_gone' && !s.ok).map((s) => s.axis);\n}\n\nexport function countUnverifiable(steps: StepResult[]): number {\n return steps.filter((s) => stepState(s) === 'unverifiable').length;\n}\n","<script setup lang=\"ts\">\n/**\n * A job's step results.\n *\n * The legend is part of the component because the four states only mean anything together:\n * `unverifiable` is not a pass, and `leaked` is not the same problem as `failed`.\n */\nimport type { StepResult } from '../api/types';\nimport { stepMark, stepState, stepText } from '../composables/useSteps';\n\ndefineProps<{ steps: StepResult[] }>();\n</script>\n\n<template>\n <div>\n <ul class=\"steps stagger\">\n <li\n v-for=\"(s, i) in steps\"\n :key=\"`${s.phase}-${s.axis}-${i}`\"\n class=\"step\"\n :style=\"{ '--i': i }\"\n >\n <span class=\"mark\" :class=\"`s-${stepState(s)}`\" aria-hidden=\"true\">{{ stepMark(s) }}</span>\n <span>\n <span class=\"who\">{{ s.axis }}</span>\n <span class=\"dim\" style=\"font-size: var(--t-sm)\"> · {{ s.phase }}</span>\n <span class=\"badge\" :class=\"stepState(s)\" style=\"margin-left: var(--s2)\">\n {{ stepState(s) }}\n </span>\n <div class=\"msg\" :class=\"`s-${stepState(s)}`\">{{ stepText(s) }}</div>\n </span>\n </li>\n </ul>\n\n <p class=\"hint\">\n <span class=\"s-ok\">✓ ok</span> ·\n <span class=\"s-failed\">✗ failed</span> ·\n <span class=\"s-leaked\">! leaked — survived teardown</span> ·\n <span class=\"s-unverifiable\">? unverifiable — nothing to check, not a pass</span>.\n A <code>down</code> step marked ok may still carry a <code>non-fatal:</code> note: teardown is\n best-effort by design, so aborting halfway would leave more behind than continuing.\n </p>\n </div>\n</template>\n","<script setup lang=\"ts\">\n/**\n * One job: its live log while it runs, then the step table that says what actually happened.\n *\n * The log streams over `EventSource`. The server replays the whole buffered history first and then\n * sends live events, so attaching late still shows the beginning — no polling, no gap to reconcile.\n * A final `{done:true,state}` ends the stream; we close the source then and fetch the job once more\n * to pick up `outcome`, which only exists after the job finishes.\n */\nimport { computed, onBeforeUnmount, ref, watch } from 'vue';\nimport { api, problem } from '../api/client';\nimport type { Job, LogEvent } from '../api/types';\nimport { leakedAxes, countUnverifiable } from '../composables/useSteps';\nimport { actionLabel, stamp, took } from '../composables/useFormat';\nimport StepList from '../components/StepList.vue';\nimport StateBadge from '../components/StateBadge.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\n\nconst props = defineProps<{ jobId: string }>();\n\nconst job = ref<Job | null>(null);\nconst lines = ref<LogEvent[]>([]);\nconst error = ref('');\nconst loading = ref(true);\nconst streaming = ref(false);\nconst follow = ref(true);\nconst logEl = ref<HTMLElement | null>(null);\n\nlet source: EventSource | null = null;\n\nconst leaks = computed(() => (job.value?.outcome ? leakedAxes(job.value.outcome.steps) : []));\nconst unverifiable = computed(() =>\n job.value?.outcome ? countUnverifiable(job.value.outcome.steps) : 0,\n);\n\n/** Returns the job it loaded, so callers need not re-read the ref — see the note at the watcher. */\nasync function load(): Promise<Job | null> {\n const r = await api.get<{ job: Job }>(`/api/jobs/${encodeURIComponent(props.jobId)}`);\n loading.value = false;\n if (!r.ok) {\n error.value = problem(r, 'load job');\n return null;\n }\n error.value = '';\n job.value = r.body.job;\n // The job carries its buffered log too. Seed from it so a finished job renders instantly without\n // opening a stream that would only replay and close.\n if (r.body.job.log?.length && lines.value.length === 0) lines.value = [...r.body.job.log];\n return r.body.job;\n}\n\nfunction closeStream(): void {\n source?.close();\n source = null;\n streaming.value = false;\n}\n\nfunction stream(): void {\n closeStream();\n // No auth header: EventSource cannot send one. Reads are unauthenticated by design, which is\n // exactly why the log is a GET.\n source = new EventSource(api.url(`/api/jobs/${encodeURIComponent(props.jobId)}/stream`));\n streaming.value = true;\n\n source.onmessage = (ev) => {\n let payload: unknown;\n try {\n payload = JSON.parse(ev.data as string);\n } catch {\n return; // a frame we cannot parse is not worth tearing the stream down for\n }\n const done = payload as { done?: boolean };\n if (done.done) {\n closeStream();\n void load(); // `outcome` only exists once the job has ended\n return;\n }\n lines.value.push(payload as LogEvent);\n if (follow.value) queueMicrotask(scrollToEnd);\n };\n\n // An error here is usually the job having ended between the fetch and the connect, or the API\n // becoming unreachable. Either way stop rather than let the browser reconnect forever.\n source.onerror = () => {\n closeStream();\n void load();\n };\n}\n\nfunction scrollToEnd(): void {\n const el = logEl.value;\n if (el) el.scrollTop = el.scrollHeight;\n}\n\nwatch(\n () => props.jobId,\n async () => {\n lines.value = [];\n job.value = null;\n loading.value = true;\n // Use what `load` returned rather than re-reading the ref: control-flow analysis still has\n // `job.value` narrowed to the `null` assigned above, because it cannot see that an awaited\n // call reassigned it.\n const loaded = await load();\n if (loaded && loaded.state === 'running') stream();\n },\n { immediate: true },\n);\n\nonBeforeUnmount(closeStream);\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>\n <RouterLink to=\"/jobs\" class=\"mute\">Jobs</RouterLink>\n <span class=\"mute\"> / </span>{{ job ? actionLabel(job.action) : '…' }}\n </h1>\n <div class=\"sub\">\n <template v-if=\"job\">\n <code>{{ job.stack }}</code> · started {{ stamp(job.startedAt) }}\n <template v-if=\"job.endedAt\"> · took {{ took(job.startedAt, job.endedAt) }}</template>\n </template>\n <template v-else>{{ jobId }}</template>\n </div>\n </div>\n <StateBadge v-if=\"job\" :state=\"job.state\" />\n </div>\n\n <ErrorNote v-if=\"error\" :text=\"error\" />\n\n <!--\n Leaked is called out above everything else. It means a resource survived teardown and nothing\n else is going to clean it up — the one outcome that needs a human.\n -->\n <section v-if=\"leaks.length\" class=\"panel leaked-banner\">\n <strong>Leaked:</strong> {{ leaks.join(', ') }}\n <div class=\"mute\">\n These axes' <code>assert_gone</code> failed, so the resources are still present. They will\n not be retried — tear them down by hand, then re-run <code>verify</code>.\n </div>\n </section>\n\n <section v-if=\"job?.error\" class=\"panel\">\n <strong class=\"bad\">The job crashed</strong>\n <pre class=\"pre\">{{ job.error }}</pre>\n </section>\n\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"phead-title\">Log</h2>\n <div class=\"row\" style=\"gap: 8px\">\n <span v-if=\"streaming\" class=\"mute pulse\">streaming…</span>\n <label class=\"row\" style=\"gap: 6px\">\n <input v-model=\"follow\" type=\"checkbox\" />\n <span class=\"mute\">Follow</span>\n </label>\n <button\n v-if=\"!streaming && job?.state === 'running'\"\n class=\"btn\"\n @click=\"stream\"\n >\n Reconnect\n </button>\n </div>\n </div>\n\n <div ref=\"logEl\" class=\"logbox\" role=\"log\" aria-live=\"polite\">\n <div v-if=\"loading\" class=\"mute\">Loading…</div>\n <div v-else-if=\"!lines.length\" class=\"mute\">No output.</div>\n <div v-for=\"l in lines\" :key=\"l.seq\" class=\"logline\" :class=\"l.level\">\n <span class=\"mute\">{{ stamp(l.at) }}</span> {{ l.message }}\n </div>\n </div>\n </section>\n\n <section v-if=\"job?.outcome\" class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"phead-title\">Steps</h2>\n <span v-if=\"unverifiable\" class=\"mute\">\n {{ unverifiable }} unverifiable — no <code>assert_gone</code>, so nothing was checked\n </span>\n </div>\n <StepList :steps=\"job.outcome.steps\" />\n </section>\n </div>\n</template>\n"],"names":["stepState","s","_a","stepMark","stepText","leakedAxes","steps","countUnverifiable","_createElementBlock","_createElementVNode","_hoisted_1","_openBlock","_Fragment","_renderList","__props","i","_normalizeClass","_unref","_toDisplayString","_hoisted_2","_hoisted_3","props","job","ref","lines","error","loading","streaming","follow","logEl","source","leaks","computed","unverifiable","load","r","api","problem","closeStream","stream","ev","payload","scrollToEnd","el","watch","loaded","onBeforeUnmount","_createVNode","_component_RouterLink","_cache","_createTextVNode","actionLabel","stamp","_createBlock","StateBadge","ErrorNote","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","$event","_b","_hoisted_11","_hoisted_12","l","_hoisted_13","_c","_hoisted_14","_hoisted_15","_hoisted_16","StepList"],"mappings":"4aAsBO,SAASA,EAAUC,EAA0B,OAClD,OAAIC,EAAAD,EAAE,UAAF,MAAAC,EAAW,WAAW,gBAAwB,eAC7CD,EAAE,GACA,KADWA,EAAE,QAAU,cAAgB,SAAW,QAE3D,CAEO,SAASE,GAASF,EAAuB,CAC9C,MAAO,CAAE,GAAI,IAAK,aAAc,IAAK,OAAQ,IAAK,OAAQ,GAAA,EAAMD,EAAUC,CAAC,CAAC,CAC9E,CAEO,SAASG,GAASH,EAAuB,CAC9C,OAAIA,EAAE,QAAgBA,EAAE,QACpBA,EAAE,QAAgB,UACfD,EAAUC,CAAC,IAAM,KAAO,KAAO,QAAQA,EAAE,IAAI,EACtD,CAGO,SAASI,GAAWC,EAA+B,CACxD,OAAOA,EAAM,OAAQL,GAAMA,EAAE,QAAU,eAAiB,CAACA,EAAE,EAAE,EAAE,IAAKA,GAAMA,EAAE,IAAI,CAClF,CAEO,SAASM,GAAkBD,EAA6B,CAC7D,OAAOA,EAAM,OAAQL,GAAMD,EAAUC,CAAC,IAAM,cAAc,EAAE,MAC9D,0KC/BEO,EA4BM,MAAA,KAAA,CA3BJC,EAiBK,KAjBLC,GAiBK,EAhBHC,EAAA,EAAA,EAAAH,EAeKI,EAAA,KAAAC,EAdcC,EAAA,MAAK,CAAdb,EAAGc,SADbP,EAeK,KAAA,CAbF,IAAG,GAAKP,EAAE,KAAK,IAAIA,EAAE,IAAI,IAAIc,CAAC,GAC/B,MAAM,OACL,eAAgBA,EAAC,CAAA,GAElBN,EAA2F,OAAA,CAArF,MAAKO,EAAA,CAAC,OAAM,KAAcC,EAAAjB,C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nD,EAAA,CAAC,UAAkBmD,EAAE,KAAK,CAAA,CAAA,GAClE1D,EAA2C,OAA3C2D,GAA2ClD,EAArBD,KAAMkD,EAAE,EAAE,CAAA,EAAA,CAAA,IAAW,IAACjD,EAAGiD,EAAE,OAAO,EAAA,CAAA,CAAA,sBAK/CE,EAAA/C,EAAA,QAAA,MAAA+C,EAAK,SAApB1D,IAAAH,EAQU,UARV8D,GAQU,CAPR7D,EAKM,MALN8D,GAKM,CAJJtB,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAxC,EAAkC,KAAA,CAA9B,MAAM,aAAA,EAAc,QAAK,EAAA,GACjBwB,EAAA,OAAZtB,EAAA,EAAAH,EAEO,OAFPgE,GAEO,CADFtB,EAAAhC,EAAAe,EAAA,KAAY,EAAG,sBAAmB,CAAA,EAAAgB,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAxC,EAAwB,YAAlB,cAAW,EAAA,iBAAO,4BAC/D,EAAA,EAAA,eAEFsC,EAAuC0B,GAAA,CAA5B,MAAOnD,EAAA,MAAI,QAAQ,KAAA"}
@@ -1,4 +0,0 @@
1
- import{d as F,H as L,c as a,a as l,e as g,g as d,u as w,f as u,t as m,F as T,i as z,v as A,w as B,_ as R,r as v,C as k,A as x,J as _,B as I,o}from"./index-Cuxev-ia.js";import{d as r}from"./useDeployment-B9V5NDTm.js";import{_ as C}from"./SelectMenu.vue_vue_type_script_setup_true_lang-iF5ZAUNJ.js";import"./useVars-VN9gYdR6.js";import"./Teleport-BrqLogTs.js";const M={class:"panel"},j={class:"phead"},D={key:0,class:"field"},E={class:"field"},H=["disabled"],O={key:0,class:"progress","aria-hidden":"true"},q={key:0,class:"mute"},J={key:1,class:"mute"},P={key:0,class:"banner failed"},G={key:1,class:"banner warn"},K={key:2,class:"field",style:{"margin-top":"var(--s3)"}},Q={key:3,class:"hint",style:{"margin-top":"var(--s3)"}},W={key:4,class:"log"},X={key:5,class:"mute",style:{"margin-top":"var(--s3)"}},Y={key:6,class:"hint"},oe=F({__name:"LogsTab",setup(Z){const y=v(200),p=v(""),f=v([]);async function V(){const s=await x.get(`/api/deployments/${encodeURIComponent(r.id)}/runtime${_(r.vars)}`);s.ok&&(f.value=[...new Set(s.body.containers.map(e=>e.service).filter(e=>!!e))].sort())}const $=k(()=>[{value:"",label:"All services"},...f.value.map(s=>({value:s,label:s}))]),h=v(""),n=v(null),b=v(""),c=v(!1);L(()=>{var s;return[r.id,!!((s=r.detail)!=null&&s.compose)]},([s,e],t)=>{(!t||t[0]!==s)&&(f.value=[],p.value="",n.value=null),e&&f.value.length===0&&V()},{immediate:!0});async function N(){var i;if(!((i=r.detail)!=null&&i.compose))return;const s=r.id;c.value=!0,b.value="";const e=p.value,t=await x.get(`/api/deployments/${encodeURIComponent(s)}/logs${_(r.vars,{tail:y.value,...e?{service:e}:{}})}`);if(c.value=!1,r.id===s&&!(t.ok&&(t.body.service??"")!==e)){if(!t.ok){n.value=null,b.value=I(t,"load the logs");return}n.value={...t.body,ok:t.body.ok!==!1,text:t.body.text??""}}}const S=k(()=>{var i;const s=((i=n.value)==null?void 0:i.text)??"",e=h.value.trim().toLowerCase();if(!e)return s;const t=s.split(`
2
- `).filter(U=>U.toLowerCase().includes(e));return t.length?t.join(`
3
- `):`(no line matches "${h.value}")`});return(s,e)=>{var t;return o(),a("section",M,[l("div",j,[e[5]||(e[5]=l("h2",{class:"section"},"Compose logs",-1)),e[6]||(e[6]=l("span",{class:"grow"},null,-1)),f.value.length>1?(o(),a("div",D,[e[3]||(e[3]=l("label",{for:"svc",class:"mute",style:{"font-size":"var(--t-xs)"}},"service",-1)),g(C,{modelValue:p.value,"onUpdate:modelValue":e[0]||(e[0]=i=>p.value=i),id:"svc",label:"Service",options:$.value},null,8,["modelValue","options"])])):d("",!0),l("div",E,[e[4]||(e[4]=l("label",{for:"tail",class:"mute",style:{"font-size":"var(--t-xs)"}},"tail",-1)),g(C,{"model-value":String(y.value),label:"How many lines",options:[{value:"50",label:"50"},{value:"200",label:"200"},{value:"500",label:"500"},{value:"1000",label:"1000"},{value:"2000",label:"2000"}],"onUpdate:modelValue":e[1]||(e[1]=i=>y.value=Number(i))},null,8,["model-value"])]),l("button",{class:"primary",style:{"align-self":"end"},disabled:c.value||!((t=w(r).detail)!=null&&t.compose),onClick:N},[u(m(c.value?"reading…":"Fetch")+" ",1),c.value?(o(),a("span",O)):d("",!0)],8,H)]),w(r).detail?w(r).detail.compose?(o(),a(T,{key:2},[e[16]||(e[16]=l("p",{class:"hint",style:{margin:"0 0 var(--s3)"}}," Fetched on demand, never polled: an auto-refresh against a chatty stack would hammer the host. The server caps how many lines it will return. ",-1)),b.value?(o(),a("div",P,m(b.value),1)):n.value&&!n.value.ok?(o(),a("div",G,[...e[8]||(e[8]=[l("b",null,"compose exited non-zero.",-1),l("p",null," Most often the project does not exist yet (nothing has been brought up), or a profile is missing. Any output it did produce is below. ",-1)])])):d("",!0),n.value?(o(),a("div",K,[e[9]||(e[9]=l("label",{for:"lf",class:"mute",style:{"font-size":"var(--t-xs)"}},"Search in these lines",-1)),z(l("input",{id:"lf","onUpdate:modelValue":e[2]||(e[2]=i=>h.value=i),"data-search":"",type:"search",placeholder:"substring",spellcheck:"false"},null,512),[[A,h.value]])])):d("",!0),n.value&&n.value.service?(o(),a("div",Q,[e[11]||(e[11]=u(" Showing ",-1)),l("b",null,m(n.value.service),1),e[12]||(e[12]=u(" only. ",-1)),g(R,{label:"why narrowing helps"},{default:B(()=>[...e[10]||(e[10]=[u(" On a stack with a chatty sidecar the interleaved output is unreadable, and the lines you want are often already past the tail. Narrowing spends the whole tail on one service. ",-1)])]),_:1})])):d("",!0),n.value?(o(),a("pre",W,m(S.value||"(no output)"),1)):c.value?d("",!0):(o(),a("p",X,[e[13]||(e[13]=u(" Press ",-1)),e[14]||(e[14]=l("b",null,"Fetch",-1)),u(" to read the last "+m(y.value)+" lines"+m(p.value?` of ${p.value}`:"")+". ",1)])),n.value?(o(),a("p",Y,[...e[15]||(e[15]=[u(" Redacted on the host before sending: credentials inside URLs, ",-1),l("code",null,"NAME=value",-1),u(" pairs whose name reads as a secret, and this server's own token. ",-1)])])):d("",!0)],64)):(o(),a("p",J,[...e[7]||(e[7]=[u(" This spec has no ",-1),l("code",null,"compose:",-1),u(" section, so there are no compose logs to read. Its axes may still have created resources — check those at their own source. ",-1)])])):(o(),a("p",q,"Unavailable until the spec resolves."))])}}});export{oe as default};
4
- //# sourceMappingURL=LogsTab-BLUVS00E.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LogsTab-BLUVS00E.js","sources":["../../src/views/tabs/LogsTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Compose logs, fetched ON DEMAND.\n *\n * Never polled: an auto-refresh against a chatty stack would hammer the host through\n * `docker compose logs` — the same host that is running everyone else's previews. The tail is\n * clamped to 1–2000 by the server for the same reason.\n */\nimport { computed, ref, watch } from 'vue';\nimport { api, problem, query } from '../../api/client';\nimport type { LogsResponse, RuntimeResponse } from '../../api/types';\nimport { dep } from '../../composables/useDeployment';\nimport InfoHint from '../../components/InfoHint.vue';\nimport SelectMenu from '../../components/SelectMenu.vue';\n\nconst tail = ref(200);\n/** '' means the whole stack. */\nconst service = ref('');\n/**\n * The services to choose from, taken from what is actually RUNNING rather than from the compose file.\n * A service the spec declares but never started has no logs, and offering it would produce an\n * empty pane that reads like a bug.\n */\nconst services = ref<string[]>([]);\n\nasync function loadServices(): Promise<void> {\n const r = await api.get<RuntimeResponse>(\n `/api/deployments/${encodeURIComponent(dep.id)}/runtime${query(dep.vars)}`,\n );\n if (!r.ok) return; // the picker is a convenience; without it the whole-stack read still works\n services.value = [\n ...new Set(r.body.containers.map((c) => c.service).filter((s): s is string => !!s)),\n ].sort();\n}\n\n/** Empty value = the whole stack, which is a real choice here rather than a placeholder. */\nconst serviceOptions = computed(() => [\n { value: '', label: 'All services' },\n ...services.value.map((s) => ({ value: s, label: s })),\n]);\n\nconst filter = ref('');\nconst logs = ref<LogsResponse | null>(null);\nconst error = ref('');\nconst loading = ref(false);\n\nwatch(\n () => [dep.id, !!dep.detail?.compose] as const,\n ([id, hasCompose], prev) => {\n if (!prev || prev[0] !== id) {\n services.value = [];\n service.value = '';\n logs.value = null;\n }\n // Gated on the RESOLVED spec, not just the id: this component mounts before the parent has\n // resolved the deployment, so an id-only watcher saw `dep.detail === undefined` and the service\n // picker never appeared.\n if (hasCompose && services.value.length === 0) void loadServices();\n },\n { immediate: true },\n);\n\nasync function fetchLogs(): Promise<void> {\n if (!dep.detail?.compose) return;\n const id = dep.id;\n loading.value = true;\n error.value = '';\n const chosen = service.value;\n const r = await api.get<LogsResponse>(\n `/api/deployments/${encodeURIComponent(id)}/logs${query(dep.vars, {\n tail: tail.value,\n ...(chosen ? { service: chosen } : {}),\n })}`,\n );\n loading.value = false;\n if (dep.id !== id) return; // navigated away mid-flight\n // A slow response for the previously-selected service must not land in a pane now labelled with a\n // different one.\n if (r.ok && (r.body.service ?? '') !== chosen) return;\n if (!r.ok) {\n logs.value = null;\n error.value = problem(r, 'load the logs');\n return;\n }\n logs.value = { ...r.body, ok: r.body.ok !== false, text: r.body.text ?? '' };\n}\n\n/** Search-in-logs: filter to matching lines rather than highlighting inside a wall of text. */\nconst shown = computed(() => {\n const text = logs.value?.text ?? '';\n const needle = filter.value.trim().toLowerCase();\n if (!needle) return text;\n const lines = text.split('\\n').filter((l) => l.toLowerCase().includes(needle));\n return lines.length ? lines.join('\\n') : `(no line matches \"${filter.value}\")`;\n});\n</script>\n\n<template>\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Compose logs</h2>\n <span class=\"grow\" />\n <div v-if=\"services.length > 1\" class=\"field\">\n <label for=\"svc\" class=\"mute\" style=\"font-size: var(--t-xs)\">service</label>\n <SelectMenu v-model=\"service\" id=\"svc\" label=\"Service\" :options=\"serviceOptions\" />\n </div>\n <div class=\"field\">\n <label for=\"tail\" class=\"mute\" style=\"font-size: var(--t-xs)\">tail</label>\n <SelectMenu :model-value=\"String(tail)\" label=\"How many lines\" :options=\"[{ value: '50', label: '50' }, { value: '200', label: '200' }, { value: '500', label: '500' }, { value: '1000', label: '1000' }, { value: '2000', label: '2000' }]\" @update:model-value=\"(v) => (tail = Number(v))\" />\n </div>\n <button\n class=\"primary\"\n style=\"align-self: end\"\n :disabled=\"loading || !dep.detail?.compose\"\n @click=\"fetchLogs\"\n >\n {{ loading ? 'reading…' : 'Fetch' }}\n <span v-if=\"loading\" class=\"progress\" aria-hidden=\"true\" />\n </button>\n </div>\n\n <p v-if=\"!dep.detail\" class=\"mute\">Unavailable until the spec resolves.</p>\n <!-- Guard on the field rather than calling and interpreting the failure after the fact. -->\n <p v-else-if=\"!dep.detail.compose\" class=\"mute\">\n This spec has no <code>compose:</code> section, so there are no compose logs to read. Its axes\n may still have created resources — check those at their own source.\n </p>\n\n <template v-else>\n <p class=\"hint\" style=\"margin: 0 0 var(--s3)\">\n Fetched on demand, never polled: an auto-refresh against a chatty stack would hammer the\n host. The server caps how many lines it will return.\n </p>\n\n <div v-if=\"error\" class=\"banner failed\">{{ error }}</div>\n\n <!--\n `ok: false` means compose exited non-zero. Usually \"no such project\" because the stack was\n never brought up — not a server fault, so it is a note rather than an error.\n -->\n <div v-else-if=\"logs && !logs.ok\" class=\"banner warn\">\n <b>compose exited non-zero.</b>\n <p>\n Most often the project does not exist yet (nothing has been brought up), or a profile is\n missing. Any output it did produce is below.\n </p>\n </div>\n\n <div v-if=\"logs\" class=\"field\" style=\"margin-top: var(--s3)\">\n <label for=\"lf\" class=\"mute\" style=\"font-size: var(--t-xs)\">Search in these lines</label>\n <input id=\"lf\" v-model=\"filter\" data-search type=\"search\" placeholder=\"substring\" spellcheck=\"false\" />\n </div>\n\n <div v-if=\"logs && logs.service\" class=\"hint\" style=\"margin-top: var(--s3)\">\n Showing <b>{{ logs.service }}</b> only.\n <InfoHint label=\"why narrowing helps\">\n On a stack with a chatty sidecar the interleaved output is unreadable, and the lines you want\n are often already past the tail. Narrowing spends the whole tail on one service.\n </InfoHint>\n </div>\n\n <pre v-if=\"logs\" class=\"log\">{{ shown || '(no output)' }}</pre>\n <p v-else-if=\"!loading\" class=\"mute\" style=\"margin-top: var(--s3)\">\n Press <b>Fetch</b> to read the last {{ tail }} lines{{ service ? ` of ${service}` : '' }}.\n </p>\n\n <p v-if=\"logs\" class=\"hint\">\n Redacted on the host before sending: credentials inside URLs, <code>NAME=value</code> pairs\n whose name reads as a secret, and this server's own token.\n </p>\n </template>\n </section>\n</template>\n"],"names":["tail","ref","service","services","loadServices","r","api","dep","query","c","s","serviceOptions","computed","filter","logs","error","loading","watch","_a","id","hasCompose","prev","fetchLogs","chosen","problem","shown","text","needle","lines","l","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_hoisted_2","_cache","_hoisted_3","_createVNode","SelectMenu","$event","_hoisted_4","v","_unref","_createTextVNode","_toDisplayString","_hoisted_6","_Fragment","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","InfoHint","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_8","_hoisted_7"],"mappings":"21BAeA,MAAMA,EAAOC,EAAI,GAAG,EAEdC,EAAUD,EAAI,EAAE,EAMhBE,EAAWF,EAAc,EAAE,EAEjC,eAAeG,GAA8B,CAC3C,MAAMC,EAAI,MAAMC,EAAI,IAClB,oBAAoB,mBAAmBC,EAAI,EAAE,CAAC,WAAWC,EAAMD,EAAI,IAAI,CAAC,EAAA,EAErEF,EAAE,KACPF,EAAS,MAAQ,CACf,GAAG,IAAI,IAAIE,EAAE,KAAK,WAAW,IAAKI,GAAMA,EAAE,OAAO,EAAE,OAAQC,GAAmB,CAAC,CAACA,CAAC,CAAC,CAAA,EAClF,KAAA,EACJ,CAGA,MAAMC,EAAiBC,EAAS,IAAM,CACpC,CAAE,MAAO,GAAI,MAAO,cAAA,EACpB,GAAGT,EAAS,MAAM,IAAK,IAAO,CAAE,MAAO,EAAG,MAAO,GAAI,CAAA,CACtD,EAEKU,EAASZ,EAAI,EAAE,EACfa,EAAOb,EA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A,GAHsC,mLAGtC,EAAA,CAAA,uBAGSrB,EAAA,WAAXiB,EAA+D,MAA/DqB,EAA+DR,EAA/BnB,EAAA,OAAK,aAAA,EAAA,CAAA,GACtBT,EAAA,gBAAfc,IAAAC,EAEI,IAFJsB,EAEI,iBAF+D,UAC3D,EAAA,GAAAlB,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAAY,SAAT,QAAK,EAAA,KAAI,qBAAkBW,EAAG5C,OAAI,EAAG,WAASE,EAAA,MAAO,OAAUA,EAAA,KAAO,GAAA,EAAA,EAAU,KAC3F,CAAA,CAAA,IAESY,EAAA,OAATgB,IAAAC,EAGI,IAHJuB,EAGI,CAAA,GAAAnB,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAHwB,kEACoC,EAAA,EAAAF,EAAuB,YAAjB,aAAU,EAAA,IAAO,qEAEvF,EAAA,CAAA,sBA9CFH,IAAAC,EAGI,IAHJwB,EAGI,CAAA,GAAApB,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAH4C,qBAC7B,EAAA,EAAAF,EAAqB,YAAf,WAAQ,EAAA,IAAO,gIAExC,EAAA,CAAA,WALAF,EAA2E,IAA3EyB,EAAmC,sCAAoC"}
@@ -1,45 +0,0 @@
1
- import{d as X,r as f,A as I,H as j,c as n,a as t,t as m,f as s,F as V,e as p,w as y,g as v,E as G,i as R,v as N,_ as A,a0 as O,s as J,x as Q,C as T,j as Y,o as a,l as Z,O as _,N as ee,B as te,U as D}from"./index-Cuxev-ia.js";import{a as se,w as oe,p as F,r as le}from"./useVars-VN9gYdR6.js";import{_ as ae}from"./ActionButton.vue_vue_type_script_setup_true_lang-CgvjRc04.js";import{_ as ne}from"./ErrorNote.vue_vue_type_script_setup_true_lang-Dc9KYyvl.js";import{_ as ie}from"./VarEditor.vue_vue_type_script_setup_true_lang-Cv1cEZ4H.js";import{_ as re}from"./SelectMenu.vue_vue_type_script_setup_true_lang-iF5ZAUNJ.js";import"./Teleport-BrqLogTs.js";const de={class:"page-head"},ue={class:"sub"},pe={class:"panel"},ve={key:0,class:"banner warn"},me={key:0},ye={key:1},ce={key:2},fe={key:3},he={key:2,class:"banner warn"},ke={class:"row",style:{"margin-bottom":"var(--s4)"}},be={class:"field",style:{"max-width":"280px"}},ge={class:"mute",style:{"align-self":"end","padding-bottom":"10px"}},we={key:3,class:"row",style:{"margin-bottom":"var(--s4)"}},Se={class:"check"},xe={class:"check"},Ce={class:"field",style:{"max-width":"340px"}},$e={key:0,class:"hint"},Ve={key:0},Re={key:1},Ae={key:2},Te={class:"field"},Le={class:"field",style:{"margin-top":"var(--s3)"}},Ue={class:"hint"},Ee={class:"hint"},Ie={class:"row",style:{"margin-top":"var(--s5)"}},Ne={key:0,class:"mute",style:{"font-size":"var(--t-sm)"}},Pe={key:1,class:"s-ok"},We={key:6,class:"banner warn"},je={key:0},Oe=`version: 1
2
- kind: isolated
3
-
4
- # The stack identity: the compose project name, and $STACK inside every hook.
5
- # \${PR} is interpolated ONCE, at resolve time, from the variables sent with the request.
6
- stack: pr-\${PR}
7
-
8
- env:
9
- PREVIEW_DOMAIN: preview.example.com
10
-
11
- compose:
12
- file: compose.yml
13
- # Every service sits behind a profile so a bare \`up\` starts nothing.
14
- # \`down\` always enables ALL of them — otherwise the unselected profiles' network leaks.
15
- profiles: [app]
16
-
17
- requires:
18
- - name: traefik-network
19
- assert: docker network inspect traefik >/dev/null 2>&1
20
- hint: run \`pstack init\` on the host first
21
-
22
- axes:
23
- # Hooks run from the deployment directory, which holds only spec.yml and compose.yml —
24
- # so use inline shell or absolute paths, never ./hooks/foo.sh.
25
- - name: scratch
26
- up: mkdir -p /tmp/$STACK
27
- assert_live: test -d /tmp/$STACK
28
- down: rm -rf /tmp/$STACK
29
- # assert_gone MUST FAIL CLOSED. A bare \`! <probe>\` reports "gone" whenever the probe fails
30
- # for any reason — a missing CLI, an expired token — turning "I could not tell" into
31
- # "it is gone", a false negative on the one thing this tool exists to catch.
32
- assert_gone: |
33
- test -d /tmp || exit 1
34
- ! test -d /tmp/$STACK
35
- `,De=`services:
36
- app:
37
- image: nginx:alpine
38
- profiles: [app]
39
- labels:
40
- - traefik.enable=true
41
- `,Xe=X({__name:"SubmitView",props:{id:{}},setup(P){const L=P,l=f({id:L.id??"",spec:"",compose:""}),h=f([{k:"",v:""}]),k=f("inline"),w=f(""),S=f(!1),g=f(""),d=f(null),x=f([]),M=T(()=>[{value:"",label:"— choose —"},...x.value.map(o=>({value:o.name,label:o.name,hint:o.kind}))]);I.get("/api/specs").then(o=>{o.ok&&Array.isArray(o.body.specs)&&(x.value=o.body.specs)});const C=T(()=>x.value.find(o=>o.name===w.value)),U=T(()=>!!L.id),q=Z(),$=T(()=>{const o=q.query.from;return typeof o=="string"&&o?o:null}),c=f("idle"),b=f(null);async function W(o){c.value="loading",b.value=null;const e=await I.getAuthed(`/api/deployments/${encodeURIComponent(o)}/source`);if(e.status===404||!e.ok){c.value="failed";return}if(e.body.sourceWithheld){c.value="withheld",e.body.specName&&(b.value=e.body.specName);return}l.value.spec||(l.value.spec=e.body.spec??""),l.value.compose||(l.value.compose=e.body.compose??""),e.body.specName&&(b.value=e.body.specName),c.value="loaded"}j($,async o=>{var r;if(!o||L.id)return;g.value="",d.value=null,l.value.spec="",l.value.compose="";const e=(r=D(o))==null?void 0:r.vars;e&&(h.value=F(e)),await W(o),l.value.id=""},{immediate:!0}),j(()=>L.id,o=>{var u;if(g.value="",d.value=null,c.value="idle",b.value=null,!o)return;o!==l.value.id&&(l.value.spec="",l.value.compose=""),l.value.id=o;const e=(u=D(o))==null?void 0:u.vars,r=e?F(e):le(o);r.some(E=>E.k)&&(h.value=r),W(o)},{immediate:!0});const B=T(()=>!!l.value.id&&(k.value==="stored"?!!w.value:!!l.value.spec.trim())&&!S.value);async function K(){S.value=!0,g.value="",d.value=null;const o=l.value.id,e=se(h.value),r={vars:e,env:e};k.value==="stored"?r.specName=w.value:(r.spec=l.value.spec,l.value.compose.trim()&&(r.compose=l.value.compose));const u=await I.put(`/api/deployments/${encodeURIComponent(o)}`,r);if(S.value=!1,u.status===200||u.status===201){d.value={id:u.body.id??o,stack:u.body.stack??"?",created:u.status===201,stackSharedWith:u.body.stackSharedWith},oe(o,h.value),_(),ee("ok",`${u.status===201?"Created":"Replaced"} ${o} → ${d.value.stack}`,{to:`/deployments/${encodeURIComponent(o)}`,toLabel:"Open"});return}g.value=te(u,"save this deployment")}function z(){k.value="inline",l.value.spec=Oe,l.value.compose.trim()||(l.value.compose=De),l.value.id||(l.value.id="pr-123"),h.value.some(o=>o.k)||(h.value=[{k:"PR",v:"123"}])}return(o,e)=>{var u,E;const r=Y("RouterLink");return a(),n("div",null,[t("div",de,[t("div",null,[t("h1",null,m(U.value?"Edit a deployment":$.value?"Duplicate a deployment":"Submit a deployment"),1),t("div",ue,m(U.value?"Loaded from what is stored; saving replaces the record":$.value?`Copied from ${$.value} — give it a new id, then edit`:"Stores a spec so it can be deployed"),1)]),e[7]||(e[7]=t("span",{class:"grow"},null,-1)),t("button",{class:"ghost",onClick:z},"Load example spec")]),t("section",pe,[$.value&&!U.value?(a(),n("div",ve,[e[20]||(e[20]=t("b",null,"Change the stack, not just the id.",-1)),t("p",null,[e[11]||(e[11]=s(" Two deployments that resolve to the same ",-1)),e[12]||(e[12]=t("code",null,"stack",-1)),e[13]||(e[13]=s(" drive the same compose project — ",-1)),e[14]||(e[14]=t("code",null,"down",-1)),e[15]||(e[15]=s(" on either stops the other's containers. If the stack interpolates a variable (",-1)),e[16]||(e[16]=t("code",null,"pr-${PR}",-1)),e[17]||(e[17]=s(") give it a different value below; if it is a literal, edit the ",-1)),e[18]||(e[18]=t("code",null,"stack:",-1)),e[19]||(e[19]=s(" line. ",-1)),c.value==="withheld"?(a(),n(V,{key:0},[e[9]||(e[9]=s(" The spec could not be copied without an access token — ",-1)),p(r,{to:"/settings"},{default:y(()=>[...e[8]||(e[8]=[s("add yours",-1)])]),_:1}),e[10]||(e[10]=s(". ",-1))],64)):v("",!0)])])):v("",!0),U.value?(a(),n("div",{key:1,class:G(["banner",c.value==="loaded"?"info":"warn"])},[t("b",null,"Replacing "+m(P.id)+".",1),c.value==="loading"?(a(),n("p",me,"Loading what is stored…")):c.value==="loaded"?(a(),n("p",ye," Loaded from the stored record — edit it and save. Saving replaces the record outright, so anything you delete here stops being tracked while whatever it created keeps running. ")):c.value==="withheld"?(a(),n("p",ce,[e[22]||(e[22]=s(" The stored spec was not loaded: reading it needs an access token, because hooks routinely carry a credential inline. ",-1)),p(r,{to:"/settings"},{default:y(()=>[...e[21]||(e[21]=[s("Add your token",-1)])]),_:1}),e[23]||(e[23]=s(" to edit in place — otherwise paste the ",-1)),e[24]||(e[24]=t("b",null,"complete",-1)),e[25]||(e[25]=s(" spec, since anything you leave out stops being tracked. ",-1))])):(a(),n("p",fe,[...e[26]||(e[26]=[s(" The stored spec could not be loaded, so this form is empty. Paste the ",-1),t("b",null,"complete",-1),s(" spec you want stored — anything you leave out stops being tracked while whatever it created keeps running. ",-1)])]))],2)):v("",!0),b.value?(a(),n("div",he,[t("b",null,"This deployment tracks the stored spec “"+m(b.value)+"”.",1),t("p",null,[e[28]||(e[28]=s(" Saving here writes a private copy and stops it following that spec. To change every deployment using it, edit ",-1)),p(r,{to:`/specs/${encodeURIComponent(b.value)}`},{default:y(()=>[...e[27]||(e[27]=[s("the spec",-1)])]),_:1},8,["to"]),e[29]||(e[29]=s(" instead. ",-1))])])):v("",!0),t("div",ke,[t("div",be,[e[30]||(e[30]=t("label",{for:"did"},"Deployment id",-1)),R(t("input",{id:"did","onUpdate:modelValue":e[0]||(e[0]=i=>l.value.id=i),type:"text",placeholder:"pr-123",spellcheck:"false",autocomplete:"off"},null,512),[[N,l.value.id,void 0,{trim:!0}]])]),t("span",ge,[e[32]||(e[32]=s(" Lower case ",-1)),p(A,{label:"allowed characters in a deployment id"},{default:y(()=>[...e[31]||(e[31]=[s(" Starts with a letter or digit, then letters, digits, dot, dash or underscore. Up to 64 characters — ",-1),t("code",null,"[a-z0-9][a-z0-9._-]{0,63}",-1),s(". ",-1)])]),_:1})])]),x.value.length?(a(),n("div",we,[t("label",Se,[R(t("input",{"onUpdate:modelValue":e[1]||(e[1]=i=>k.value=i),type:"radio",value:"inline"},null,512),[[O,k.value]]),e[33]||(e[33]=s(" inline spec ",-1))]),t("label",xe,[R(t("input",{"onUpdate:modelValue":e[2]||(e[2]=i=>k.value=i),type:"radio",value:"stored"},null,512),[[O,k.value]]),e[34]||(e[34]=s(" reference a stored spec ",-1))])])):v("",!0),k.value==="stored"&&x.value.length?(a(),n(V,{key:4},[t("div",Ce,[e[35]||(e[35]=t("label",{for:"sn"},"Stored spec",-1)),p(re,{modelValue:w.value,"onUpdate:modelValue":e[3]||(e[3]=i=>w.value=i),id:"sn",label:"Stored spec",options:M.value},null,8,["modelValue","options"])]),C.value?(a(),n("p",$e,[C.value.description?(a(),n("span",Ve,m(C.value.description)+" — ",1)):v("",!0),e[37]||(e[37]=s(" needs ",-1)),C.value.requiredVars.length?(a(),n("b",Re,m(C.value.requiredVars.join(", ")),1)):(a(),n("span",Ae,"no variables")),e[38]||(e[38]=s(". ",-1)),p(A,{label:"why variables are required"},{default:y(()=>[...e[36]||(e[36]=[s(" A missing variable is refused by name. It is never filled in with a blank, which would silently give every deployment the same stack name. ",-1)])]),_:1})])):v("",!0)],64)):(a(),n(V,{key:5},[t("div",Te,[e[39]||(e[39]=t("label",{for:"spec"},"spec.yml",-1)),R(t("textarea",{id:"spec","onUpdate:modelValue":e[4]||(e[4]=i=>l.value.spec=i),rows:"12",spellcheck:"false",placeholder:`version: 1
42
- kind: isolated
43
- stack: pr-\${PR}
44
- axes: []`},null,512),[[N,l.value.spec]])]),t("div",Le,[e[40]||(e[40]=t("label",{for:"compose"},[s("compose.yml "),t("span",{class:"mute"},"(optional)")],-1)),R(t("textarea",{id:"compose","onUpdate:modelValue":e[5]||(e[5]=i=>l.value.compose=i),rows:"6",spellcheck:"false",placeholder:"Written next to spec.yml, so a compose file named compose.yml resolves"},null,512),[[N,l.value.compose]])]),t("p",Ue,[e[42]||(e[42]=s(" Hooks must be inline shell or an absolute path. ",-1)),p(A,{label:"why a relative script path does not work"},{default:y(()=>[...e[41]||(e[41]=[s(" A deployment directory only ever holds ",-1),t("code",null,"spec.yml",-1),s(" and ",-1),t("code",null,"compose.yml",-1),s(", and hooks run from there — so ",-1),t("code",null,"up: ./hooks/db.sh",-1),s(" has nothing to find. ",-1)])]),_:1})])],64)),e[55]||(e[55]=t("h2",{class:"section",style:{margin:"var(--s5) 0 var(--s3)"}},"Variables",-1)),p(ie,{modelValue:h.value,"onUpdate:modelValue":e[6]||(e[6]=i=>h.value=i)},null,8,["modelValue"]),t("p",Ee,[e[44]||(e[44]=s(" Saved with the deployment, so tearing it down later targets the same stack. ",-1)),p(A,{label:"how variables are remembered"},{default:y(()=>[...e[43]||(e[43]=[s(" They are stored on the server where it supports that, and in this browser either way — so the actions on the deployment page send exactly these values. ",-1)])]),_:1})]),t("div",Ie,[p(ae,{variant:"primary",pending:S.value,disabled:!B.value,onClick:K},{default:y(()=>[s(m(S.value?"Submitting…":"Submit"),1)]),_:1},8,["pending","disabled"]),d.value?v("",!0):(a(),n("span",Ne,[e[46]||(e[46]=s(" Nothing is saved until the spec is valid ",-1)),p(A,{label:"what happens on a rejected submission"},{default:y(()=>[...e[45]||(e[45]=[s(" The spec is checked before anything is written, so a rejected submission leaves nothing behind — and a replace never destroys a good record over a typo. Whether the deployment is shared or isolated comes from the spec, not from this form. ",-1)])]),_:1})])),d.value?(a(),n("span",Pe,[s(m(d.value.created?"Created":"Replaced")+" — stack ",1),t("b",null,m(d.value.stack),1),p(r,{to:`/deployments/${encodeURIComponent(d.value.id)}`,style:{"margin-left":"8px"}},{default:y(()=>[...e[47]||(e[47]=[s(" open → ",-1)])]),_:1},8,["to"])])):v("",!0)]),(E=(u=d.value)==null?void 0:u.stackSharedWith)!=null&&E.length?(a(),n("div",We,[t("b",null,"Another deployment already resolves to stack “"+m(d.value.stack)+"”.",1),t("p",null,[(a(!0),n(V,null,J(d.value.stackSharedWith,(i,H)=>(a(),n(V,{key:i},[p(r,{to:`/deployments/${encodeURIComponent(i)}`},{default:y(()=>[s(m(i),1)]),_:2},1032,["to"]),H<d.value.stackSharedWith.length-1?(a(),n("span",je,", ")):v("",!0)],64))),128)),e[48]||(e[48]=s("— both records now drive the same compose project, so ",-1)),e[49]||(e[49]=t("code",null,"down",-1)),e[50]||(e[50]=s(" on either stops the other's containers and ",-1)),e[51]||(e[51]=t("code",null,"verify",-1)),e[52]||(e[52]=s(" on either reports the other's leaks. If that was not intended, change this one's ",-1)),e[53]||(e[53]=t("code",null,"stack",-1)),e[54]||(e[54]=s(" and save again. ",-1))])])):v("",!0),g.value?(a(),Q(ne,{key:7,text:g.value,title:"The server rejected this submission."},null,8,["text"])):v("",!0)])])}}});export{Xe as default};
45
- //# sourceMappingURL=SubmitView-DEuu72dN.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SubmitView-DEuu72dN.js","sources":["../../src/views/SubmitView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Submit or replace a deployment.\n *\n * The server's 400 is the whole point of this screen. It carries the SpecError verbatim — the key\n * or variable that is wrong, often the corrected form, and the assert-lint warnings about an\n * `assert_gone` that fails open. That text is the tool's main teaching surface, so it is rendered\n * whole, with newlines intact, and never summarised.\n *\n * The spec is parsed BEFORE anything touches disk, so a rejected submission leaves nothing behind\n * and, on a replace, a good record is never destroyed over a typo.\n */\nimport { computed, ref, watch } from 'vue';\nimport { useRoute } from 'vue-router';\nimport { api, problem } from '../api/client';\nimport InfoHint from '../components/InfoHint.vue';\nimport type {\n DeploymentSourceResponse,\n SpecMeta,\n SpecsResponse,\n SubmitResponse,\n VarPair,\n} from '../api/types';\nimport { loadDeployments, rowFor } from '../composables/useControlPlane';\nimport { pairsFromRecord, readVars, recordFromPairs, writeVars } from '../composables/useVars';\nimport { toast } from '../composables/useToasts';\nimport ActionButton from '../components/ActionButton.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\nimport VarEditor from '../components/VarEditor.vue';\nimport SelectMenu from '../components/SelectMenu.vue';\n\nconst props = defineProps<{ id?: string }>();\n\nconst form = ref({ id: props.id ?? '', spec: '', compose: '' });\nconst vars = ref<VarPair[]>([{ k: '', v: '' }]);\nconst source = ref<'inline' | 'stored'>('inline');\nconst specName = ref('');\n\nconst submitting = ref(false);\nconst error = ref('');\nconst result = ref<{\n id: string;\n stack: string;\n created: boolean;\n /** Other deployments resolving to the same stack — reported by the server on a new deployment. */\n stackSharedWith?: string[];\n} | null>(null);\n\n/**\n * Stored specs, when this server has them. A build without `/api/specs` answers 404, which is not\n * an error here — the picker simply is not offered and inline stays the only shape.\n */\nconst specs = ref<SpecMeta[]>([]);\n\n/** `— choose —` stays first: an empty value is a real state here, not a placeholder. */\nconst specOptions = computed(() => [\n { value: '', label: '— choose —' },\n ...specs.value.map((s) => ({ value: s.name, label: s.name, hint: s.kind })),\n]);\nvoid api.get<SpecsResponse>('/api/specs').then((r) => {\n if (r.ok && Array.isArray(r.body.specs)) specs.value = r.body.specs;\n});\n\nconst chosenSpec = computed(() => specs.value.find((s) => s.name === specName.value));\n\nconst replacing = computed(() => !!props.id);\n\n/**\n * Duplicate mode: `/submit?from=<id>` copies an existing deployment's spec, compose and variables into\n * a NEW submission. Distinct from replacing — the id starts empty so you name the new one, and nothing\n * is written over.\n *\n * The `stack:` line is the thing to watch, which is why the banner says so: copy a spec whose stack is a\n * literal and both deployments drive the same compose project, so `down` on either stops the other's\n * containers. A spec whose stack interpolates a variable (`pr-${PR}`) just needs a different value. The\n * server independently reports a collision at submit time — see `stackSharedWith`.\n */\nconst route = useRoute();\nconst copyFrom = computed(() => {\n const v = route.query.from;\n return typeof v === 'string' && v ? v : null;\n});\n\n/**\n * Replacing now PRE-FILLS from what is stored.\n *\n * It used to start empty, because nothing could hand the source back. Replacing is whole-record, so\n * an operator retyping a spec from memory silently dropped whatever they forgot — and a dropped axis\n * stops being tracked while the resources it created keep running. Being unable to read your own\n * submission is what made that a likely mistake rather than a careless one.\n *\n * The body is still cleared FIRST, on every id change. A leftover body from another deployment is the\n * dangerous case: it is perfectly valid YAML, so the PUT would succeed and overwrite the wrong\n * deployment with nothing able to catch it. Clearing first means a failed or withheld fetch leaves the\n * form empty rather than holding someone else's spec.\n */\nconst sourceState = ref<'idle' | 'loading' | 'loaded' | 'withheld' | 'failed'>('idle');\n/** Set when this deployment tracks a stored spec — editing this copy forks it from the original. */\nconst forkWarning = ref<string | null>(null);\n\nasync function loadSource(id: string): Promise<void> {\n sourceState.value = 'loading';\n forkWarning.value = null;\n const r = await api.getAuthed<DeploymentSourceResponse>(\n `/api/deployments/${encodeURIComponent(id)}/source`,\n );\n // A build of the API without the route answers 404; that is a capability difference, not an error,\n // and it must land on the old empty-form behaviour rather than an alarming banner.\n if (r.status === 404 || !r.ok) {\n sourceState.value = 'failed';\n return;\n }\n if (r.body.sourceWithheld) {\n sourceState.value = 'withheld';\n if (r.body.specName) forkWarning.value = r.body.specName;\n return;\n }\n // Only fill if the user has not started typing — a slow fetch must never overwrite their edit.\n if (!form.value.spec) form.value.spec = r.body.spec ?? '';\n if (!form.value.compose) form.value.compose = r.body.compose ?? '';\n if (r.body.specName) forkWarning.value = r.body.specName;\n sourceState.value = 'loaded';\n}\n\n// Duplicate: same fetch, but the id stays empty and the variables come across too, since a copied\n// spec interpolates the same names.\nwatch(\n copyFrom,\n async (from) => {\n if (!from || props.id) return;\n error.value = '';\n result.value = null;\n form.value.spec = '';\n form.value.compose = '';\n const saved = rowFor(from)?.vars;\n if (saved) vars.value = pairsFromRecord(saved);\n await loadSource(from);\n // A copied record's own id is not a name for the new one; the operator picks that.\n form.value.id = '';\n },\n { immediate: true },\n);\n\nwatch(\n () => props.id,\n (id) => {\n error.value = '';\n result.value = null;\n sourceState.value = 'idle';\n forkWarning.value = null;\n if (!id) return;\n if (id !== form.value.id) {\n form.value.spec = '';\n form.value.compose = '';\n }\n form.value.id = id;\n // Seed the variables from what this deployment already uses: replacing a spec usually needs\n // the same ones that resolved it.\n const stored = rowFor(id)?.vars;\n const saved = stored ? pairsFromRecord(stored) : readVars(id);\n if (saved.some((e) => e.k)) vars.value = saved;\n void loadSource(id);\n },\n { immediate: true },\n);\n\nconst canSubmit = computed(\n () =>\n !!form.value.id &&\n (source.value === 'stored' ? !!specName.value : !!form.value.spec.trim()) &&\n !submitting.value,\n);\n\nasync function submit(): Promise<void> {\n submitting.value = true;\n error.value = '';\n result.value = null;\n\n const id = form.value.id;\n const record = recordFromPairs(vars.value);\n /**\n * `vars` are STORED with the deployment on servers that support it, which makes a later `down`\n * resolve the same stack `up` created with no query parameters at all. `env` validates this\n * submission on every server, new or old. Sending both is what keeps this form working against\n * either build — an older server ignores the key it does not know.\n */\n const body: Record<string, unknown> = { vars: record, env: record };\n if (source.value === 'stored') body.specName = specName.value;\n else {\n body.spec = form.value.spec;\n if (form.value.compose.trim()) body.compose = form.value.compose;\n }\n\n const r = await api.put<SubmitResponse>(`/api/deployments/${encodeURIComponent(id)}`, body);\n submitting.value = false;\n\n if (r.status === 200 || r.status === 201) {\n result.value = {\n id: r.body.id ?? id,\n stack: r.body.stack ?? '?',\n created: r.status === 201,\n stackSharedWith: r.body.stackSharedWith,\n };\n // Persist the variables that just validated this spec. On an older server this is the single\n // thing keeping a later `down` pointed at the stack the `up` created.\n writeVars(id, vars.value);\n void loadDeployments();\n toast('ok', `${r.status === 201 ? 'Created' : 'Replaced'} ${id} → ${result.value.stack}`, {\n to: `/deployments/${encodeURIComponent(id)}`,\n toLabel: 'Open',\n });\n return;\n }\n // 400 (SpecError), 409 (a job in flight over this stack), 401, 404 — all rendered verbatim.\n error.value = problem(r, 'save this deployment');\n}\n\nconst EXAMPLE_SPEC = `version: 1\nkind: isolated\n\n# The stack identity: the compose project name, and $STACK inside every hook.\n# \\${PR} is interpolated ONCE, at resolve time, from the variables sent with the request.\nstack: pr-\\${PR}\n\nenv:\n PREVIEW_DOMAIN: preview.example.com\n\ncompose:\n file: compose.yml\n # Every service sits behind a profile so a bare \\`up\\` starts nothing.\n # \\`down\\` always enables ALL of them — otherwise the unselected profiles' network leaks.\n profiles: [app]\n\nrequires:\n - name: traefik-network\n assert: docker network inspect traefik >/dev/null 2>&1\n hint: run \\`pstack init\\` on the host first\n\naxes:\n # Hooks run from the deployment directory, which holds only spec.yml and compose.yml —\n # so use inline shell or absolute paths, never ./hooks/foo.sh.\n - name: scratch\n up: mkdir -p /tmp/$STACK\n assert_live: test -d /tmp/$STACK\n down: rm -rf /tmp/$STACK\n # assert_gone MUST FAIL CLOSED. A bare \\`! <probe>\\` reports \"gone\" whenever the probe fails\n # for any reason — a missing CLI, an expired token — turning \"I could not tell\" into\n # \"it is gone\", a false negative on the one thing this tool exists to catch.\n assert_gone: |\n test -d /tmp || exit 1\n ! test -d /tmp/$STACK\n`;\n\nconst EXAMPLE_COMPOSE = `services:\n app:\n image: nginx:alpine\n profiles: [app]\n labels:\n - traefik.enable=true\n`;\n\nfunction loadExample(): void {\n source.value = 'inline';\n form.value.spec = EXAMPLE_SPEC;\n if (!form.value.compose.trim()) form.value.compose = EXAMPLE_COMPOSE;\n if (!form.value.id) form.value.id = 'pr-123';\n if (!vars.value.some((e) => e.k)) vars.value = [{ k: 'PR', v: '123' }];\n}\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>\n {{ replacing ? 'Edit a deployment' : copyFrom ? 'Duplicate a deployment' : 'Submit a deployment' }}\n </h1>\n <div class=\"sub\">\n {{\n replacing\n ? 'Loaded from what is stored; saving replaces the record'\n : copyFrom\n ? `Copied from ${copyFrom} — give it a new id, then edit`\n : 'Stores a spec so it can be deployed'\n }}\n </div>\n </div>\n <span class=\"grow\" />\n <button class=\"ghost\" @click=\"loadExample\">Load example spec</button>\n </div>\n\n <section class=\"panel\">\n <!-- The \"nothing saved until valid\" reassurance lives beside the Submit button below — the\n moment of commitment is where a guarantee about committing belongs, not floating above\n an unrelated id field. -->\n\n <!--\n A `PUT` REPLACES the whole record, and this form cannot pre-fill it: the API has no route\n that returns a stored spec. Say that out loud, because a half-remembered spec pasted here\n is still valid YAML — the server will accept it, and the axes the original declared simply\n stop existing as far as the control plane knows, while whatever they created keeps running.\n -->\n <!--\n The one thing that makes duplicating dangerous, said before the form rather than after the\n submission: two records resolving to one stack drive the same compose project.\n -->\n <div v-if=\"copyFrom && !replacing\" class=\"banner warn\">\n <b>Change the stack, not just the id.</b>\n <p>\n Two deployments that resolve to the same <code>stack</code> drive the same compose project —\n <code>down</code> on either stops the other's containers. If the stack interpolates a variable\n (<code>pr-${PR}</code>) give it a different value below; if it is a literal, edit the\n <code>stack:</code> line.\n <template v-if=\"sourceState === 'withheld'\">\n The spec could not be copied without an access token —\n <RouterLink to=\"/settings\">add yours</RouterLink>.\n </template>\n </p>\n </div>\n\n <div v-if=\"replacing\" class=\"banner\" :class=\"sourceState === 'loaded' ? 'info' : 'warn'\">\n <b>Replacing {{ id }}.</b>\n <p v-if=\"sourceState === 'loading'\">Loading what is stored…</p>\n <p v-else-if=\"sourceState === 'loaded'\">\n Loaded from the stored record — edit it and save. Saving replaces the record outright, so\n anything you delete here stops being tracked while whatever it created keeps running.\n </p>\n <p v-else-if=\"sourceState === 'withheld'\">\n The stored spec was not loaded: reading it needs an access token, because hooks routinely\n carry a credential inline. <RouterLink to=\"/settings\">Add your token</RouterLink> to edit\n in place — otherwise paste the <b>complete</b> spec, since anything you leave out stops\n being tracked.\n </p>\n <p v-else>\n The stored spec could not be loaded, so this form is empty. Paste the <b>complete</b> spec\n you want stored — anything you leave out stops being tracked while whatever it created keeps\n running.\n </p>\n </div>\n\n <!--\n A deployment that references a stored spec keeps its own copy of the source. Editing that copy\n forks it: the stored spec every other deployment shares is untouched, and this one stops\n following it. Silent forks are the kind of thing discovered months later.\n -->\n <div v-if=\"forkWarning\" class=\"banner warn\">\n <b>This deployment tracks the stored spec “{{ forkWarning }}”.</b>\n <p>\n Saving here writes a private copy and stops it following that spec. To change every\n deployment using it, edit\n <RouterLink :to=\"`/specs/${encodeURIComponent(forkWarning)}`\">the spec</RouterLink> instead.\n </p>\n </div>\n\n <div class=\"row\" style=\"margin-bottom: var(--s4)\">\n <div class=\"field\" style=\"max-width: 280px\">\n <label for=\"did\">Deployment id</label>\n <input\n id=\"did\"\n v-model.trim=\"form.id\"\n type=\"text\"\n placeholder=\"pr-123\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n />\n </div>\n <span class=\"mute\" style=\"align-self: end; padding-bottom: 10px\">\n Lower case\n <InfoHint label=\"allowed characters in a deployment id\">\n Starts with a letter or digit, then letters, digits, dot, dash or underscore. Up to 64\n characters — <code>[a-z0-9][a-z0-9._-]{0,63}</code>.\n </InfoHint>\n </span>\n </div>\n\n <!-- Offered only when this server actually has stored specs. -->\n <div v-if=\"specs.length\" class=\"row\" style=\"margin-bottom: var(--s4)\">\n <label class=\"check\">\n <input v-model=\"source\" type=\"radio\" value=\"inline\" /> inline spec\n </label>\n <label class=\"check\">\n <input v-model=\"source\" type=\"radio\" value=\"stored\" /> reference a stored spec\n </label>\n </div>\n\n <template v-if=\"source === 'stored' && specs.length\">\n <div class=\"field\" style=\"max-width: 340px\">\n <label for=\"sn\">Stored spec</label>\n <SelectMenu v-model=\"specName\" id=\"sn\" label=\"Stored spec\" :options=\"specOptions\" />\n </div>\n <p v-if=\"chosenSpec\" class=\"hint\">\n <span v-if=\"chosenSpec.description\">{{ chosenSpec.description }} — </span>\n needs\n <b v-if=\"chosenSpec.requiredVars.length\">{{ chosenSpec.requiredVars.join(', ') }}</b>\n <span v-else>no variables</span>.\n <InfoHint label=\"why variables are required\">\n A missing variable is refused by name. It is never filled in with a blank, which would\n silently give every deployment the same stack name.\n </InfoHint>\n </p>\n </template>\n\n <template v-else>\n <div class=\"field\">\n <label for=\"spec\">spec.yml</label>\n <textarea\n id=\"spec\"\n v-model=\"form.spec\"\n rows=\"12\"\n spellcheck=\"false\"\n placeholder=\"version: 1&#10;kind: isolated&#10;stack: pr-${PR}&#10;axes: []\"\n />\n </div>\n\n <div class=\"field\" style=\"margin-top: var(--s3)\">\n <label for=\"compose\">compose.yml <span class=\"mute\">(optional)</span></label>\n <textarea\n id=\"compose\"\n v-model=\"form.compose\"\n rows=\"6\"\n spellcheck=\"false\"\n placeholder=\"Written next to spec.yml, so a compose file named compose.yml resolves\"\n />\n </div>\n <p class=\"hint\">\n Hooks must be inline shell or an absolute path.\n <InfoHint label=\"why a relative script path does not work\">\n A deployment directory only ever holds <code>spec.yml</code> and\n <code>compose.yml</code>, and hooks run from there — so\n <code>up: ./hooks/db.sh</code> has nothing to find.\n </InfoHint>\n </p>\n </template>\n\n <h2 class=\"section\" style=\"margin: var(--s5) 0 var(--s3)\">Variables</h2>\n <VarEditor v-model=\"vars\" />\n <p class=\"hint\">\n Saved with the deployment, so tearing it down later targets the same stack.\n <InfoHint label=\"how variables are remembered\">\n They are stored on the server where it supports that, and in this browser either way — so\n the actions on the deployment page send exactly these values.\n </InfoHint>\n </p>\n\n <div class=\"row\" style=\"margin-top: var(--s5)\">\n <ActionButton variant=\"primary\" :pending=\"submitting\" :disabled=\"!canSubmit\" @click=\"submit\">\n {{ submitting ? 'Submitting…' : 'Submit' }}\n </ActionButton>\n <span v-if=\"!result\" class=\"mute\" style=\"font-size: var(--t-sm)\">\n Nothing is saved until the spec is valid\n <InfoHint label=\"what happens on a rejected submission\">\n The spec is checked before anything is written, so a rejected submission leaves nothing\n behind — and a replace never destroys a good record over a typo. Whether the deployment\n is shared or isolated comes from the spec, not from this form.\n </InfoHint>\n </span>\n <span v-if=\"result\" class=\"s-ok\">\n {{ result.created ? 'Created' : 'Replaced' }} — stack\n <b>{{ result.stack }}</b>\n <RouterLink :to=\"`/deployments/${encodeURIComponent(result.id)}`\" style=\"margin-left: 8px\">\n open →\n </RouterLink>\n </span>\n </div>\n\n <!--\n The server's rejection text IS the documentation: it names the key, the variable or the\n assert that is wrong, and often prints the corrected form. Rendered whole, newlines and\n indentation intact. Never truncate it, never collapse it, never say \"invalid spec\".\n -->\n <!--\n Reported by the server, which resolved every other deployment to check. Shown after the fact\n because it can only be known once the spec has resolved — and it is a warning, not a rejection:\n it can be deliberate, and refusing over a guess would be worse than saying so.\n -->\n <div v-if=\"result?.stackSharedWith?.length\" class=\"banner warn\">\n <b>Another deployment already resolves to stack “{{ result.stack }}”.</b>\n <p>\n <template v-for=\"(o, i) in result.stackSharedWith\" :key=\"o\">\n <RouterLink :to=\"`/deployments/${encodeURIComponent(o)}`\">{{ o }}</RouterLink\n ><span v-if=\"i < result.stackSharedWith.length - 1\">, </span> </template\n >— both records now drive the same compose project, so <code>down</code> on either stops the\n other's containers and <code>verify</code> on either reports the other's leaks. If that was not\n intended, change this one's <code>stack</code> and save again.\n </p>\n </div>\n\n <ErrorNote v-if=\"error\" :text=\"error\" title=\"The server rejected this submission.\" />\n </section>\n </div>\n</template>\n"],"names":["EXAMPLE_SPEC","EXAMPLE_COMPOSE","props","__props","form","ref","vars","source","specName","submitting","error","result","specs","specOptions","computed","s","api","r","chosenSpec","replacing","route","useRoute","copyFrom","v","sourceState","forkWarning","loadSource","id","watch","from","saved","_a","rowFor","pairsFromRecord","stored","readVars","e","canSubmit","submit","record","recordFromPairs","body","writeVars","loadDeployments","toast","problem","loadExample","_createElementBlock","_createElementVNode","_hoisted_1","_toDisplayString","_hoisted_2","_hoisted_3","_openBlock","_hoisted_4","_cache","_Fragment","_createVNode","_component_RouterLink","_normalizeClass","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","$event","_hoisted_12","InfoHint","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","SelectMenu","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_21","_vModelText","_hoisted_22","_hoisted_23","VarEditor","_hoisted_24","_hoisted_25","ActionButton","_hoisted_26","_hoisted_27","_b","_hoisted_28","o","i","_createBlock","ErrorNote"],"mappings":"g8CAyNMA,GAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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