@samyx/preview-stacks-ui 0.2.3 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/assets/{ActionButton.vue_vue_type_script_setup_true_lang-Dx6dvDgY.js → ActionButton.vue_vue_type_script_setup_true_lang-zTFy3C1L.js} +2 -2
  2. package/dist/assets/{ActionButton.vue_vue_type_script_setup_true_lang-Dx6dvDgY.js.map → ActionButton.vue_vue_type_script_setup_true_lang-zTFy3C1L.js.map} +1 -1
  3. package/dist/assets/{AxesTab-Bq4L7G1s.js → AxesTab-ulz5gFHt.js} +2 -2
  4. package/dist/assets/{AxesTab-Bq4L7G1s.js.map → AxesTab-ulz5gFHt.js.map} +1 -1
  5. package/dist/assets/{ConfigTab-Ltx3Zrdd.js → ConfigTab-BQBwybc7.js} +2 -2
  6. package/dist/assets/{ConfigTab-Ltx3Zrdd.js.map → ConfigTab-BQBwybc7.js.map} +1 -1
  7. package/dist/assets/{DangerTab-UVytlrHh.js → DangerTab-DJw6jFIi.js} +2 -2
  8. package/dist/assets/DangerTab-DJw6jFIi.js.map +1 -0
  9. package/dist/assets/{DashboardView-CWqm9Ut_.js → DashboardView-z0IrTMvv.js} +2 -2
  10. package/dist/assets/{DashboardView-CWqm9Ut_.js.map → DashboardView-z0IrTMvv.js.map} +1 -1
  11. package/dist/assets/{DeploymentDetailView-BoPv5KCl.js → DeploymentDetailView-B6dRosS8.js} +2 -2
  12. package/dist/assets/{DeploymentDetailView-BoPv5KCl.js.map → DeploymentDetailView-B6dRosS8.js.map} +1 -1
  13. package/dist/assets/{DeploymentsView-welgmlBc.js → DeploymentsView-vzkuxfYA.js} +2 -2
  14. package/dist/assets/{DeploymentsView-welgmlBc.js.map → DeploymentsView-vzkuxfYA.js.map} +1 -1
  15. package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-BNRC57JZ.js → ErrorNote.vue_vue_type_script_setup_true_lang-pc4tgtPS.js} +2 -2
  16. package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-BNRC57JZ.js.map → ErrorNote.vue_vue_type_script_setup_true_lang-pc4tgtPS.js.map} +1 -1
  17. package/dist/assets/{JobDetailView-C4HDkGMQ.js → JobDetailView-CWmRMQCy.js} +2 -2
  18. package/dist/assets/{JobDetailView-C4HDkGMQ.js.map → JobDetailView-CWmRMQCy.js.map} +1 -1
  19. package/dist/assets/{JobsView-C0kqyEse.js → JobsView-B7w8_fns.js} +2 -2
  20. package/dist/assets/{JobsView-C0kqyEse.js.map → JobsView-B7w8_fns.js.map} +1 -1
  21. package/dist/assets/{LogsTab-DMm5SmAq.js → LogsTab-BR9QaUgo.js} +2 -2
  22. package/dist/assets/{LogsTab-DMm5SmAq.js.map → LogsTab-BR9QaUgo.js.map} +1 -1
  23. package/dist/assets/{NotFoundView-BXzLxfj8.js → NotFoundView-CodRC_TG.js} +2 -2
  24. package/dist/assets/{NotFoundView-BXzLxfj8.js.map → NotFoundView-CodRC_TG.js.map} +1 -1
  25. package/dist/assets/OverviewTab-Bcc1S9BV.js +2 -0
  26. package/dist/assets/OverviewTab-Bcc1S9BV.js.map +1 -0
  27. package/dist/assets/{RequiresTab-BBbppgfW.js → RequiresTab-BngG8IrC.js} +2 -2
  28. package/dist/assets/{RequiresTab-BBbppgfW.js.map → RequiresTab-BngG8IrC.js.map} +1 -1
  29. package/dist/assets/RoutingView-CTPhqDby.js +9 -0
  30. package/dist/assets/RoutingView-CTPhqDby.js.map +1 -0
  31. package/dist/assets/{SettingsView-6NfKAhvR.js → SettingsView-Xfi1eGZO.js} +2 -2
  32. package/dist/assets/{SettingsView-6NfKAhvR.js.map → SettingsView-Xfi1eGZO.js.map} +1 -1
  33. package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-CafU21a8.js → SkeletonList.vue_vue_type_script_setup_true_lang-nMOrcNBi.js} +2 -2
  34. package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-CafU21a8.js.map → SkeletonList.vue_vue_type_script_setup_true_lang-nMOrcNBi.js.map} +1 -1
  35. package/dist/assets/SpecDetailView-bw4Xzo2x.js +2 -0
  36. package/dist/assets/SpecDetailView-bw4Xzo2x.js.map +1 -0
  37. package/dist/assets/SpecsView-DZWFViN5.js +2 -0
  38. package/dist/assets/SpecsView-DZWFViN5.js.map +1 -0
  39. package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-CNfZduv9.js → StateBadge.vue_vue_type_script_setup_true_lang-FqyOZ8sk.js} +2 -2
  40. package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-CNfZduv9.js.map → StateBadge.vue_vue_type_script_setup_true_lang-FqyOZ8sk.js.map} +1 -1
  41. package/dist/assets/SubmitView-Cod9su4V.js +45 -0
  42. package/dist/assets/SubmitView-Cod9su4V.js.map +1 -0
  43. package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-LB0r2ViA.js → VarEditor.vue_vue_type_script_setup_true_lang-BNRC1yg9.js} +2 -2
  44. package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-LB0r2ViA.js.map → VarEditor.vue_vue_type_script_setup_true_lang-BNRC1yg9.js.map} +1 -1
  45. package/dist/assets/{index-DfBxQ-9i.css → index-Ca3L5StC.css} +1 -1
  46. package/dist/assets/index-CrxqzmXu.js +119 -0
  47. package/dist/assets/index-CrxqzmXu.js.map +1 -0
  48. package/dist/assets/{useDeployment-Dt6UHfpB.js → useDeployment-BB9Fq2IS.js} +2 -2
  49. package/dist/assets/{useDeployment-Dt6UHfpB.js.map → useDeployment-BB9Fq2IS.js.map} +1 -1
  50. package/dist/index.html +2 -2
  51. package/package.json +2 -1
  52. package/dist/assets/DangerTab-UVytlrHh.js.map +0 -1
  53. package/dist/assets/OverviewTab-GXUj8rfn.js +0 -2
  54. package/dist/assets/OverviewTab-GXUj8rfn.js.map +0 -1
  55. package/dist/assets/SubmitView-D_QtP8ym.js +0 -45
  56. package/dist/assets/SubmitView-D_QtP8ym.js.map +0 -1
  57. package/dist/assets/index-DmWBBqbv.js +0 -29
  58. package/dist/assets/index-DmWBBqbv.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{L as n,m as i,k as d,p as l,G as p,M as c}from"./index-DmWBBqbv.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-Dt6UHfpB.js.map
1
+ import{L as n,m as i,k as d,p as l,G as p,M as c}from"./index-CrxqzmXu.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-BB9Fq2IS.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDeployment-Dt6UHfpB.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-BB9Fq2IS.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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all through to the OS preference */
25
25
  }
26
26
  </script>
27
- <script type="module" crossorigin src="/assets/index-DmWBBqbv.js"></script>
28
- <link rel="stylesheet" crossorigin href="/assets/index-DfBxQ-9i.css">
27
+ <script type="module" crossorigin src="/assets/index-CrxqzmXu.js"></script>
28
+ <link rel="stylesheet" crossorigin href="/assets/index-Ca3L5StC.css">
29
29
  </head>
30
30
  <body>
31
31
  <div id="app"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@samyx/preview-stacks-ui",
3
- "version": "0.2.3",
3
+ "version": "0.4.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",
@@ -18,6 +18,7 @@
18
18
  "prepublishOnly": "bun run build"
19
19
  },
20
20
  "dependencies": {
21
+ "lucide-vue-next": "^0.577.0",
21
22
  "vue": "^3.5.13",
22
23
  "vue-router": "^4.5.0"
23
24
  },
@@ -1 +0,0 @@
1
- {"version":3,"file":"DangerTab-UVytlrHh.js","sources":["../../src/components/ConflictNote.vue","../../src/views/tabs/DangerTab.vue"],"sourcesContent":["<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","<script setup lang=\"ts\">\n/**\n * Lifecycle actions, and forgetting the record. Everything on this page destroys something.\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, classifyConflict, problem, type Conflict } from '../../api/client';\nimport type { ActionResponse, ConflictBody, JobsResponse } from '../../api/types';\nimport { dep, isShared, varsQuery } from '../../composables/useDeployment';\nimport { loadDeployments, state } from '../../composables/useControlPlane';\nimport { settings } from '../../composables/useSettings';\nimport { toast } from '../../composables/useToasts';\nimport { actionLabel } from '../../composables/useFormat';\nimport ActionButton from '../../components/ActionButton.vue';\nimport ConflictNote from '../../components/ConflictNote.vue';\nimport InfoHint from '../../components/InfoHint.vue';\nimport ErrorNote from '../../components/ErrorNote.vue';\n\nconst router = useRouter();\n\nconst pending = ref<'' | 'up' | 'verify' | 'down' | 'forget'>('');\nconst actionError = ref('');\nconst conflict = ref<Conflict | null>(null);\nconst conflictJobId = ref('');\nconst downVerify = ref(true);\nconst forceTyped = ref('');\nconst forgetArmed = ref(false);\n\n/**\n * The variables these actions 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 */\nconst 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/** 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\nconst tokenMissing = computed(() => state.health?.authEnforced === true && !settings.token);\nconst busy = computed(() => dep.detail?.busy === true);\n\n/** A disabled control must say why. This is the text that answers it. */\nfunction whyDisabled(action: 'up' | 'verify' | 'down'): 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.value) {\n return `Type the stack name \"${dep.detail.stack}\" below to confirm a shared teardown.`;\n }\n return undefined;\n}\n\nasync function act(action: 'up' | 'verify' | 'down'): 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: downVerify.value, force: isShared.value && forceArmed.value }\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\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\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 */\nasync function onConflict(body: ConflictBody): Promise<void> {\n const c = classifyConflict(body);\n conflict.value = c;\n conflictJobId.value = '';\n if (c.kind === 'shared') forceTyped.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</script>\n\n<template>\n <div>\n <section class=\"panel\">\n <h2 class=\"section\" style=\"margin-bottom: var(--s3)\">Lifecycle</h2>\n\n <p v-if=\"!dep.detail\" class=\"mute\">\n Actions are unavailable until this deployment's variables are filled in — without them its\n stack has no 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 <div class=\"row\">\n <ActionButton\n variant=\"primary\"\n :pending=\"pending === 'up'\"\n :disabled=\"!!pending || busy\"\n :title=\"whyDisabled('up')\"\n @click=\"act('up')\"\n >\n {{ actionLabel('up') }}\n </ActionButton>\n <ActionButton\n :pending=\"pending === 'verify'\"\n :disabled=\"!!pending || busy\"\n :title=\"whyDisabled('verify')\"\n @click=\"act('verify')\"\n >\n {{ actionLabel('verify') }}\n </ActionButton>\n <ActionButton\n variant=\"danger\"\n :pending=\"pending === 'down'\"\n :disabled=\"!!pending || busy || (isShared && !forceArmed)\"\n :title=\"whyDisabled('down')\"\n @click=\"act('down')\"\n >\n {{ isShared ? 'Tear down (force)' : 'Tear down' }}\n </ActionButton>\n <span class=\"grow\" />\n <RouterLink :to=\"`/submit/${encodeURIComponent(dep.id)}`\">Replace spec →</RouterLink>\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 class=\"hint\">\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 <label class=\"check\">\n <input v-model=\"downVerify\" type=\"checkbox\" />\n Check for leftovers afterwards\n </label>\n </div>\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>docker compose down -v</code> — the <code>-v</code> is what removes the volumes.\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":["_createElementBlock","_normalizeClass","__props","_cache","_createElementVNode","_hoisted_1","_toDisplayString","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_createVNode","_component_RouterLink","_openBlock","router","useRouter","pending","ref","actionError","conflict","conflictJobId","downVerify","forceTyped","forgetArmed","varsSummary","computed","names","dep","v","forceArmed","_a","tokenMissing","state","settings","busy","whyDisabled","action","isShared","act","body","r","api","varsQuery","job","toast","actionLabel","loadDeployments","onConflict","problem","forget","c","classifyConflict","stack","live","j","_unref","_Fragment","ActionButton","InfoHint","_hoisted_6","_createTextVNode","_hoisted_7","_hoisted_8","$event","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_14","_createBlock","ErrorNote","ConflictNote","_hoisted_15","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_16"],"mappings":"mwBAmBEA,EAoBM,MAAA,CApBD,MAAKC,EAAA,CAAC,SAAiBC,EAAA,SAAS,OAAI,SAAA,SAAA,MAAA,CAAA,EAAmC,KAAK,OAAA,GAC/EC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAC,EAAqC,SAAlC,iCAA8B,EAAA,GACjCA,EAA0F,MAA1FC,GAA0FC,EAAtBJ,EAAA,SAAS,IAAI,EAAA,CAAA,EAExEA,EAAA,SAAS,OAAI,cAAtBF,EAEI,IAAAO,GAAA,CAAA,GAAAJ,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAFiC,kEAC2B,EAAA,EAAAC,EAAiB,YAAX,OAAI,EAAA,IAAO,WACjF,EAAA,CAAA,MACcF,EAAA,SAAS,OAAI,kBAA3BF,EAII,IAAAQ,GAAA,CAAA,GAAAL,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAJ0C,QACxC,EAAA,EAAAC,EAA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,yBAAsB,EAAA,GAEjEmD,EAAA5B,CAAA,EAAI,YAId3B,EAyBWwD,EAAA,CAAA,IAAA,GAAA,CAxBTpD,EAQI,IARJoE,GAQI,iBARW,qBACI,EAAA,GAAArE,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAC,EAAoB,UAAhB,cAAW,EAAA,mBAAK,MAAG,EAAA,GAAAD,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAC,EAAmC,SAAhC,+BAA4B,EAAA,mBAAI,mFAE3E,EAAA,GAAAO,EAIW+C,EAAA,CAJD,MAAM,8BAA4B,WAAC,IAI7C,CAAA,GAAAvD,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAJ6C,4OAI7C,EAAA,CAAA,aAEFC,EAcM,MAdNqE,GAcM,CAbJrE,EAGQ,QAHRsE,GAGQ,GAFNtE,EAA+C,QAAA,sCAA/BmB,EAAW,MAAAwC,GAAE,KAAK,UAAA,gBAAlBxC,EAAA,KAAW,CAAA,mBAAoB,sDAEjD,EAAA,EAAA,GACAZ,EAQe8C,EAAA,CAPb,QAAQ,SACP,QAASzC,EAAA,QAAO,SAChB,SAAQ,CAAGO,EAAA,OAAW,CAAA,CAAMP,EAAA,MAC5B,MAAOO,EAAA,MAAc,OAAS,yCAC9B,QAAO0B,CAAA,aACT,IAED,CAAA,GAAA9C,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAFC,WAED,EAAA,CAAA,yDA3BJH,EAGI,IAHJ2E,GAAmC,mJAGnC"}
@@ -1,2 +0,0 @@
1
- import{d as o,r as m,i as h}from"./useDeployment-Dt6UHfpB.js";import{s as c}from"./useFormat-CKJxQp_i.js";import{_ as g}from"./SkeletonList.vue_vue_type_script_setup_true_lang-CafU21a8.js";import{d as b,c as n,a as s,b as t,h as u,e as i,f as w,w as k,_ as x,t as l,v as C,g as d,F as v,r as _,m as N,n as B,o as a}from"./index-DmWBBqbv.js";import"./useVars-VN9gYdR6.js";const T={class:"panel"},R={key:1,class:"mute"},V={key:2,class:"kvlist"},$={class:"k"},z={class:"v mono"},A={class:"v"},L={class:"mute",style:{"margin-left":"8px","font-size":"var(--t-sm)"}},S={key:0},q={class:"v"},F={class:"v mono"},U={key:1},j={class:"v"},D={key:0,class:"mute"},E={key:2},I={class:"v"},K={key:0,class:"mute"},O={class:"v"},G={class:"v"},H={class:"v"},J={class:"v"},ss=b({__name:"OverviewTab",setup(M){const y=N(()=>h.value?"a host singleton previews borrow — no axes, and down is guarded":"one tenant, created and destroyed constantly, expected to leave nothing behind");return(P,e)=>{var p;const f=B("RouterLink");return a(),n("section",T,[e[13]||(e[13]=s("h2",{class:"section",style:{"margin-bottom":"var(--s3)"}},"Resolved spec",-1)),!t(o).detail&&!t(o).error?(a(),u(g,{key:0,rows:5})):t(o).detail?(a(),n("ul",V,[s("li",null,[s("span",$,[e[1]||(e[1]=i(" stack ",-1)),w(x,{label:"the difference between id and stack"},{default:k(()=>[...e[0]||(e[0]=[i(" The ",-1),s("b",null,"id",-1),i(" is what you named this deployment. The ",-1),s("b",null,"stack",-1),i(" is what its spec resolved to once the variables were filled in — the compose project name, the hostname label, and ",-1),s("code",null,"$STACK",-1),i(" inside every hook. ",-1)])]),_:1})]),s("span",z,l(t(o).detail.stack||"—"),1)]),s("li",null,[e[2]||(e[2]=s("span",{class:"k"},"kind",-1)),s("span",A,[s("span",{class:C(["badge",t(o).detail.kind])},l(t(o).detail.kind),3),s("span",L,l(y.value),1)])]),(p=t(m))!=null&&p.specName?(a(),n("li",S,[e[4]||(e[4]=s("span",{class:"k"},"spec",-1)),s("span",q,[s("b",null,l(t(m).specName),1),e[3]||(e[3]=s("span",{class:"mute",style:{"font-size":"var(--t-sm)"}}," — stored, and shared with any other deployment using it ",-1))])])):d("",!0),s("li",null,[e[5]||(e[5]=s("span",{class:"k"},"compose file",-1)),s("span",F,l(t(o).detail.compose?t(o).detail.compose.file:"— (no compose section)"),1)]),t(o).detail.compose?(a(),n("li",U,[e[6]||(e[6]=s("span",{class:"k"},"profiles",-1)),s("span",j,[(a(!0),n(v,null,_(t(o).detail.compose.profiles,r=>(a(),n("span",{key:r,class:"badge",style:{"margin-right":"4px"}},l(r),1))),128)),t(o).detail.compose.profiles.length?d("",!0):(a(),n("span",D," none — a bare up starts every service "))])])):d("",!0),t(o).detail.compose?(a(),n("li",E,[e[7]||(e[7]=s("span",{class:"k"},"overlays",-1)),s("span",I,[(a(!0),n(v,null,_(t(o).detail.compose.overlays,r=>(a(),n("span",{key:r,class:"mono",style:{"margin-right":"8px"}},l(r),1))),128)),t(o).detail.compose.overlays.length?d("",!0):(a(),n("span",K,"none"))])])):d("",!0),s("li",null,[e[9]||(e[9]=s("span",{class:"k"},"axes",-1)),s("span",O,[i(l(t(o).detail.axes.length)+" ",1),t(o).detail.axes.length?(a(),u(f,{key:0,to:`/deployments/${encodeURIComponent(t(o).id)}/axes`},{default:k(()=>[...e[8]||(e[8]=[i(" view → ",-1)])]),_:1},8,["to"])):d("",!0)])]),s("li",null,[e[10]||(e[10]=s("span",{class:"k"},"requires",-1)),s("span",G,l(t(o).detail.requires.length),1)]),s("li",null,[e[11]||(e[11]=s("span",{class:"k"},"created",-1)),s("span",H,l(t(c)(t(o).detail.createdAt)),1)]),s("li",null,[e[12]||(e[12]=s("span",{class:"k"},"updated",-1)),s("span",J,l(t(c)(t(o).detail.updatedAt)),1)])])):(a(),n("p",R,"Unavailable until the spec resolves."))])}}});export{ss as default};
2
- //# sourceMappingURL=OverviewTab-GXUj8rfn.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OverviewTab-GXUj8rfn.js","sources":["../../src/views/tabs/OverviewTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/** The resolved spec, summarised. Read-only — everything that acts lives on Danger. */\nimport { computed } from 'vue';\nimport { dep, isShared, row } from '../../composables/useDeployment';\nimport { stamp } from '../../composables/useFormat';\nimport SkeletonList from '../../components/SkeletonList.vue';\nimport InfoHint from '../../components/InfoHint.vue';\n\nconst kindBlurb = computed(() =>\n isShared.value\n ? 'a host singleton previews borrow — no axes, and down is guarded'\n : 'one tenant, created and destroyed constantly, expected to leave nothing behind',\n);\n</script>\n\n<template>\n <section class=\"panel\">\n <h2 class=\"section\" style=\"margin-bottom: var(--s3)\">Resolved spec</h2>\n\n <SkeletonList v-if=\"!dep.detail && !dep.error\" :rows=\"5\" />\n <p v-else-if=\"!dep.detail\" class=\"mute\">Unavailable until the spec resolves.</p>\n\n <template v-else>\n <ul class=\"kvlist\">\n <li>\n <span class=\"k\">\n stack\n <InfoHint label=\"the difference between id and stack\">\n The <b>id</b> is what you named this deployment. The <b>stack</b> is what its spec\n resolved to once the variables were filled in — the compose project name, the hostname\n label, and <code>$STACK</code> inside every hook.\n </InfoHint>\n </span>\n <span class=\"v mono\">{{ dep.detail.stack || '—' }}</span>\n </li>\n <li>\n <span class=\"k\">kind</span>\n <span class=\"v\">\n <span class=\"badge\" :class=\"dep.detail.kind\">{{ dep.detail.kind }}</span>\n <span class=\"mute\" style=\"margin-left: 8px; font-size: var(--t-sm)\">{{ kindBlurb }}</span>\n </span>\n </li>\n <li v-if=\"row?.specName\">\n <span class=\"k\">spec</span>\n <span class=\"v\">\n <b>{{ row.specName }}</b>\n <span class=\"mute\" style=\"font-size: var(--t-sm)\">\n — stored, and shared with any other deployment using it\n </span>\n </span>\n </li>\n <li>\n <span class=\"k\">compose file</span>\n <span class=\"v mono\">\n {{ dep.detail.compose ? dep.detail.compose.file : '— (no compose section)' }}\n </span>\n </li>\n <li v-if=\"dep.detail.compose\">\n <span class=\"k\">profiles</span>\n <span class=\"v\">\n <span v-for=\"p in dep.detail.compose.profiles\" :key=\"p\" class=\"badge\" style=\"margin-right: 4px\">\n {{ p }}\n </span>\n <span v-if=\"!dep.detail.compose.profiles.length\" class=\"mute\">\n none — a bare up starts every service\n </span>\n </span>\n </li>\n <li v-if=\"dep.detail.compose\">\n <span class=\"k\">overlays</span>\n <span class=\"v\">\n <span v-for=\"o in dep.detail.compose.overlays\" :key=\"o\" class=\"mono\" style=\"margin-right: 8px\">{{ o }}</span>\n <span v-if=\"!dep.detail.compose.overlays.length\" class=\"mute\">none</span>\n </span>\n </li>\n <li>\n <span class=\"k\">axes</span>\n <span class=\"v\">\n {{ dep.detail.axes.length }}\n <RouterLink v-if=\"dep.detail.axes.length\" :to=\"`/deployments/${encodeURIComponent(dep.id)}/axes`\">\n view →\n </RouterLink>\n </span>\n </li>\n <li>\n <span class=\"k\">requires</span>\n <span class=\"v\">{{ dep.detail.requires.length }}</span>\n </li>\n <li><span class=\"k\">created</span><span class=\"v\">{{ stamp(dep.detail.createdAt) }}</span></li>\n <li><span class=\"k\">updated</span><span class=\"v\">{{ stamp(dep.detail.updatedAt) }}</span></li>\n </ul>\n </template>\n </section>\n</template>\n"],"names":["kindBlurb","computed","isShared","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_unref","dep","_createBlock","SkeletonList","_hoisted_3","_hoisted_4","_createVNode","InfoHint","_cache","_hoisted_5","_toDisplayString","_hoisted_6","_hoisted_7","row","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_Fragment","_renderList","p","_hoisted_13","_hoisted_14","_hoisted_15","o","_hoisted_16","_hoisted_17","_createTextVNode","_component_RouterLink","_hoisted_18","_hoisted_19","stamp","_hoisted_20","_hoisted_2"],"mappings":"sxBAQA,MAAMA,EAAYC,EAAS,IACzBC,EAAS,MACL,kEACA,gFAAA,8CAKJ,OAAAC,EAAA,EAAAC,EA4EU,UA5EVC,EA4EU,eA3ERC,EAAuE,KAAA,CAAnE,MAAM,UAAU,MAAA,CAAA,gBAAA,WAAA,CAAA,EAAiC,gBAAa,EAAA,GAE7C,CAAAC,EAAAC,CAAA,EAAI,QAAM,CAAKD,EAAAC,CAAA,EAAI,WAAxCC,EAA2DC,EAAA,OAAX,KAAM,CAAA,IACvCH,EAAAC,CAAA,EAAI,QAGjBL,IAAAC,EAmEK,KAnELO,EAmEK,CAlEHL,EAUK,KAAA,KAAA,CATHA,EAOO,O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EAAG,IAC5B,CAAA,EAAkBD,EAAAC,CAAA,EAAI,OAAO,KAAK,YAAlCC,EAEa2B,EAAA,OAF8B,GAAE,gBAAkB,mBAAmB7B,EAAAC,CAAA,EAAI,EAAE,CAAA,OAAA,aAAU,IAElG,CAAA,GAAAO,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAFkG,WAElG,EAAA,CAAA,kCAGJT,EAGK,KAAA,KAAA,CAFHS,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAT,EAA+B,OAAA,CAAzB,MAAM,GAAA,EAAI,WAAQ,EAAA,GACxBA,EAAuD,OAAvD+B,EAAuDpB,EAApCV,EAAAC,CAAA,EAAI,OAAO,SAAS,MAAM,EAAA,CAAA,CAAA,GAE/CF,EAA+F,KAAA,KAAA,CAA3FS,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAT,EAA8B,OAAA,CAAxB,MAAM,GAAA,EAAI,UAAO,EAAA,GAAOA,EAAwD,OAAxDgC,EAAwDrB,EAArCV,EAAAgC,CAAA,EAAMhC,EAAAC,CAAA,EAAI,OAAO,SAAS,CAAA,EAAA,CAAA,CAAA,GAC/EF,EAA+F,KAAA,KAAA,CAA3FS,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAT,EAA8B,OAAA,CAAxB,MAAM,GAAA,EAAI,UAAO,EAAA,GAAOA,EAAwD,OAAxDkC,EAAwDvB,EAArCV,EAAAgC,CAAA,EAAMhC,EAAAC,CAAA,EAAI,OAAO,SAAS,CAAA,EAAA,CAAA,CAAA,WArEnFJ,EAAgF,IAAhFqC,EAAwC,sCAAoC"}
@@ -1,45 +0,0 @@
1
- import{d as N,j as m,k as E,B as M,c as i,a as s,t as r,e as o,f as v,w as y,_ as C,g as h,x as f,y as _,N as L,F as $,z as j,r as D,h as F,m as R,n as O,o as n,I as q,H as B,p as K,M as z}from"./index-DmWBBqbv.js";import{a as H,w as W,p as X,r as G}from"./useVars-VN9gYdR6.js";import{_ as J}from"./ActionButton.vue_vue_type_script_setup_true_lang-Dx6dvDgY.js";import{_ as Q}from"./ErrorNote.vue_vue_type_script_setup_true_lang-BNRC57JZ.js";import{_ as Y}from"./VarEditor.vue_vue_type_script_setup_true_lang-LB0r2ViA.js";const Z={class:"page-head"},ee={class:"sub"},se={class:"panel"},te={class:"dim"},oe={key:0,class:"banner warn"},ae={class:"row",style:{"margin-bottom":"var(--s4)"}},le={class:"field",style:{"max-width":"280px"}},ne={class:"mute",style:{"align-self":"end","padding-bottom":"10px"}},ie={key:1,class:"row",style:{"margin-bottom":"var(--s4)"}},re={class:"check"},de={class:"check"},pe={class:"field",style:{"max-width":"340px"}},ue=["value"],me={key:0,class:"hint"},ve={key:0},ce={key:1},ye={key:2},he={class:"field"},fe={class:"field",style:{"margin-top":"var(--s3)"}},be={class:"hint"},ke={class:"hint"},ge={class:"row",style:{"margin-top":"var(--s5)"}},we={key:0,class:"s-ok"},xe=`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
- `,Ce=`services:
36
- app:
37
- image: nginx:alpine
38
- profiles: [app]
39
- labels:
40
- - traefik.enable=true
41
- `,Ae=N({__name:"SubmitView",props:{id:{}},setup(A){const S=A,a=m({id:S.id??"",spec:"",compose:""}),c=m([{k:"",v:""}]),p=m("inline"),b=m(""),k=m(!1),g=m(""),u=m(null),w=m([]);E.get("/api/specs").then(l=>{l.ok&&Array.isArray(l.body.specs)&&(w.value=l.body.specs)});const x=R(()=>w.value.find(l=>l.name===b.value)),V=R(()=>!!S.id);M(()=>S.id,l=>{var t;if(g.value="",u.value=null,!l)return;l!==a.value.id&&(a.value.spec="",a.value.compose=""),a.value.id=l;const e=(t=z(l))==null?void 0:t.vars,d=e?X(e):G(l);d.some(I=>I.k)&&(c.value=d)},{immediate:!0});const T=R(()=>!!a.value.id&&(p.value==="stored"?!!b.value:!!a.value.spec.trim())&&!k.value);async function U(){k.value=!0,g.value="",u.value=null;const l=a.value.id,e=H(c.value),d={vars:e,env:e};p.value==="stored"?d.specName=b.value:(d.spec=a.value.spec,a.value.compose.trim()&&(d.compose=a.value.compose));const t=await E.put(`/api/deployments/${encodeURIComponent(l)}`,d);if(k.value=!1,t.status===200||t.status===201){u.value={id:t.body.id??l,stack:t.body.stack??"?",created:t.status===201},W(l,c.value),q(),B("ok",`${t.status===201?"Created":"Replaced"} ${l} → ${u.value.stack}`,{to:`/deployments/${encodeURIComponent(l)}`,toLabel:"Open"});return}g.value=K(t,"save this deployment")}function P(){p.value="inline",a.value.spec=xe,a.value.compose.trim()||(a.value.compose=Ce),a.value.id||(a.value.id="pr-123"),c.value.some(l=>l.k)||(c.value=[{k:"PR",v:"123"}])}return(l,e)=>{const d=O("RouterLink");return n(),i("div",null,[s("div",Z,[s("div",null,[s("h1",null,r(V.value?"Replace a deployment":"Submit a deployment"),1),s("div",ee,r(V.value?"Stores a new spec over the existing record":"Stores a spec so it can be deployed"),1)]),e[7]||(e[7]=s("span",{class:"grow"},null,-1)),s("button",{class:"ghost",onClick:P},"Load example spec")]),s("section",se,[s("p",te,[e[9]||(e[9]=o(" Nothing is saved until the spec is valid. ",-1)),v(C,{label:"what happens on a rejected submission"},{default:y(()=>[...e[8]||(e[8]=[o(" 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})]),V.value?(n(),i("div",oe,[s("b",null,"Replacing "+r(A.id)+".",1),e[10]||(e[10]=s("p",null,[o(" Paste the "),s("b",null,"complete"),o(" spec you want stored. This form starts empty and nothing was loaded from the existing record, so anything you leave out stops being tracked — while whatever it created keeps running. ")],-1))])):h("",!0),s("div",ae,[s("div",le,[e[11]||(e[11]=s("label",{for:"did"},"Deployment id",-1)),f(s("input",{id:"did","onUpdate:modelValue":e[0]||(e[0]=t=>a.value.id=t),type:"text",placeholder:"pr-123",spellcheck:"false",autocomplete:"off"},null,512),[[_,a.value.id,void 0,{trim:!0}]])]),s("span",ne,[e[13]||(e[13]=o(" Lower case ",-1)),v(C,{label:"allowed characters in a deployment id"},{default:y(()=>[...e[12]||(e[12]=[o(" Starts with a letter or digit, then letters, digits, dot, dash or underscore. Up to 64 characters — ",-1),s("code",null,"[a-z0-9][a-z0-9._-]{0,63}",-1),o(". ",-1)])]),_:1})])]),w.value.length?(n(),i("div",ie,[s("label",re,[f(s("input",{"onUpdate:modelValue":e[1]||(e[1]=t=>p.value=t),type:"radio",value:"inline"},null,512),[[L,p.value]]),e[14]||(e[14]=o(" inline spec ",-1))]),s("label",de,[f(s("input",{"onUpdate:modelValue":e[2]||(e[2]=t=>p.value=t),type:"radio",value:"stored"},null,512),[[L,p.value]]),e[15]||(e[15]=o(" reference a stored spec ",-1))])])):h("",!0),p.value==="stored"&&w.value.length?(n(),i($,{key:2},[s("div",pe,[e[17]||(e[17]=s("label",{for:"sn"},"Stored spec",-1)),f(s("select",{id:"sn","onUpdate:modelValue":e[3]||(e[3]=t=>b.value=t)},[e[16]||(e[16]=s("option",{value:""},"— choose —",-1)),(n(!0),i($,null,D(w.value,t=>(n(),i("option",{key:t.name,value:t.name},r(t.name)+" ("+r(t.kind)+") ",9,ue))),128))],512),[[j,b.value]])]),x.value?(n(),i("p",me,[x.value.description?(n(),i("span",ve,r(x.value.description)+" — ",1)):h("",!0),e[19]||(e[19]=o(" needs ",-1)),x.value.requiredVars.length?(n(),i("b",ce,r(x.value.requiredVars.join(", ")),1)):(n(),i("span",ye,"no variables")),e[20]||(e[20]=o(". ",-1)),v(C,{label:"why variables are required"},{default:y(()=>[...e[18]||(e[18]=[o(" 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})])):h("",!0)],64)):(n(),i($,{key:3},[s("div",he,[e[21]||(e[21]=s("label",{for:"spec"},"spec.yml",-1)),f(s("textarea",{id:"spec","onUpdate:modelValue":e[4]||(e[4]=t=>a.value.spec=t),rows:"18",spellcheck:"false",placeholder:`version: 1
42
- kind: isolated
43
- stack: pr-\${PR}
44
- axes: []`},null,512),[[_,a.value.spec]])]),s("div",fe,[e[22]||(e[22]=s("label",{for:"compose"},[o("compose.yml "),s("span",{class:"mute"},"(optional)")],-1)),f(s("textarea",{id:"compose","onUpdate:modelValue":e[5]||(e[5]=t=>a.value.compose=t),rows:"8",spellcheck:"false",placeholder:"Written next to spec.yml, so a compose file named compose.yml resolves"},null,512),[[_,a.value.compose]])]),s("p",be,[e[24]||(e[24]=o(" Hooks must be inline shell or an absolute path. ",-1)),v(C,{label:"why a relative script path does not work"},{default:y(()=>[...e[23]||(e[23]=[o(" A deployment directory only ever holds ",-1),s("code",null,"spec.yml",-1),o(" and ",-1),s("code",null,"compose.yml",-1),o(", and hooks run from there — so ",-1),s("code",null,"up: ./hooks/db.sh",-1),o(" has nothing to find. ",-1)])]),_:1})])],64)),e[28]||(e[28]=s("h2",{class:"section",style:{margin:"var(--s5) 0 var(--s3)"}},"Variables",-1)),v(Y,{modelValue:c.value,"onUpdate:modelValue":e[6]||(e[6]=t=>c.value=t)},null,8,["modelValue"]),s("p",ke,[e[26]||(e[26]=o(" Saved with the deployment, so tearing it down later targets the same stack. ",-1)),v(C,{label:"how variables are remembered"},{default:y(()=>[...e[25]||(e[25]=[o(" 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})]),s("div",ge,[v(J,{variant:"primary",pending:k.value,disabled:!T.value,onClick:U},{default:y(()=>[o(r(k.value?"submitting…":"Submit"),1)]),_:1},8,["pending","disabled"]),u.value?(n(),i("span",we,[o(r(u.value.created?"Created":"Replaced")+" — stack ",1),s("b",null,r(u.value.stack),1),v(d,{to:`/deployments/${encodeURIComponent(u.value.id)}`,style:{"margin-left":"8px"}},{default:y(()=>[...e[27]||(e[27]=[o(" open → ",-1)])]),_:1},8,["to"])])):h("",!0)]),g.value?(n(),F(Q,{key:4,text:g.value,title:"The server rejected this submission."},null,8,["text"])):h("",!0)])])}}});export{Ae as default};
45
- //# sourceMappingURL=SubmitView-D_QtP8ym.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SubmitView-D_QtP8ym.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 { api, problem } from '../api/client';\nimport InfoHint from '../components/InfoHint.vue';\nimport type { SpecMeta, SpecsResponse, SubmitResponse, VarPair } 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';\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<{ id: string; stack: string; created: boolean } | 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[]>([]);\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 * Arriving to replace a DIFFERENT deployment must not carry the previous one's body across. There\n * is no route that returns a stored spec, so this form can never pre-fill the body — and a\n * leftover body is the dangerous case: it is perfectly valid YAML, so the PUT would succeed and\n * replace the wrong deployment's spec with nothing on the server able to catch it.\n */\nwatch(\n () => props.id,\n (id) => {\n error.value = '';\n result.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 },\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 = { id: r.body.id ?? id, stack: r.body.stack ?? '?', created: r.status === 201 };\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>{{ replacing ? 'Replace a deployment' : 'Submit a deployment' }}</h1>\n <div class=\"sub\">\n {{ replacing ? 'Stores a new spec over the existing record' : 'Stores a spec so it can be deployed' }}\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 <p class=\"dim\">\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 is\n shared or isolated comes from the spec, not from this form.\n </InfoHint>\n </p>\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 <div v-if=\"replacing\" class=\"banner warn\">\n <b>Replacing {{ id }}.</b>\n <p>\n Paste the <b>complete</b> spec you want stored. This form starts empty and nothing was\n loaded from the existing record, so anything you leave out stops being tracked — while\n whatever it created keeps running.\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 <select id=\"sn\" v-model=\"specName\">\n <option value=\"\">— choose —</option>\n <option v-for=\"s in specs\" :key=\"s.name\" :value=\"s.name\">\n {{ s.name }} ({{ s.kind }})\n </option>\n </select>\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=\"18\"\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=\"8\"\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=\"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 <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","api","r","chosenSpec","computed","s","replacing","watch","id","stored","_a","rowFor","saved","pairsFromRecord","readVars","e","canSubmit","submit","record","recordFromPairs","body","writeVars","loadDeployments","toast","problem","loadExample","_createElementBlock","_createElementVNode","_hoisted_1","_hoisted_2","_toDisplayString","_hoisted_3","_hoisted_4","_createVNode","InfoHint","_cache","_openBlock","_hoisted_5","_hoisted_6","_hoisted_7","$event","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_Fragment","_hoisted_12","_renderList","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_18","_vModelText","_hoisted_19","_hoisted_20","VarEditor","_hoisted_21","_hoisted_22","ActionButton","_hoisted_23","_component_RouterLink","_createBlock","ErrorNote"],"mappings":"6qCAuHMA,GAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAoCfC,GAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mDApIxB,MAAMC,EAAQC,EAERC,EAAOC,EAAI,CAAE,GAAIH,EAAM,IAAM,GAAI,KAAM,GAAI,QAAS,EAAA,CAAI,EACxDI,EAAOD,EAAe,CAAC,CAAE,EAAG,GAAI,EAAG,EAAA,CAAI,CAAC,EACxCE,EAASF,EAAyB,QAAQ,EAC1CG,EAAWH,EAAI,EAAE,EAEjBI,EAAaJ,EAAI,EAAK,EACtBK,EAAQL,EAAI,EAAE,EACdM,EAASN,EAA4D,IAAI,EAMzEO,EAAQP,EAAgB,EAAE,EAC3BQ,EAAI,IAAmB,YAAY,EAAE,KAAMC,GAAM,CAChDA,EAAE,IAAM,MAAM,QAAQA,EAAE,KAAK,KAAK,IAAGF,EAAM,MAAQE,EAAE,KAAK,MAChE,CAAC,EAED,MAAMC,EAAaC,EAAS,IAAMJ,EAAM,MAAM,KAAMK,GAAMA,EAAE,OAAST,EAAS,KAAK,CAAC,EAE9EU,EAAYF,EAAS,IAAM,CAAC,CAACd,EAAM,EAAE,EAQ3CiB,EACE,IAAMjB,EAAM,GACXkB,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