@samyx/preview-stacks-ui 0.34.0 → 0.35.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 (102) hide show
  1. package/dist/assets/{ActionButton.vue_vue_type_script_setup_true_lang-DBfqkgMV.js → ActionButton.vue_vue_type_script_setup_true_lang-pLJQfFvY.js} +2 -2
  2. package/dist/assets/{ActionButton.vue_vue_type_script_setup_true_lang-DBfqkgMV.js.map → ActionButton.vue_vue_type_script_setup_true_lang-pLJQfFvY.js.map} +1 -1
  3. package/dist/assets/{AxesTab-Bzm6UBFL.js → AxesTab-Bb8UjmaR.js} +2 -2
  4. package/dist/assets/{AxesTab-Bzm6UBFL.js.map → AxesTab-Bb8UjmaR.js.map} +1 -1
  5. package/dist/assets/{ConfigTab-B5Mkn_Xr.js → ConfigTab-DLjvLYzj.js} +2 -2
  6. package/dist/assets/{ConfigTab-B5Mkn_Xr.js.map → ConfigTab-DLjvLYzj.js.map} +1 -1
  7. package/dist/assets/{ConfigView-BMINdC1p.js → ConfigView-BO_yZHja.js} +2 -2
  8. package/dist/assets/{ConfigView-BMINdC1p.js.map → ConfigView-BO_yZHja.js.map} +1 -1
  9. package/dist/assets/{ConflictNote.vue_vue_type_script_setup_true_lang-DcogOjwN.js → ConflictNote.vue_vue_type_script_setup_true_lang-Bjozh4Jr.js} +2 -2
  10. package/dist/assets/{ConflictNote.vue_vue_type_script_setup_true_lang-DcogOjwN.js.map → ConflictNote.vue_vue_type_script_setup_true_lang-Bjozh4Jr.js.map} +1 -1
  11. package/dist/assets/ControlView-D-akBm65.js +2 -0
  12. package/dist/assets/ControlView-D-akBm65.js.map +1 -0
  13. package/dist/assets/{DangerTab-CLAU7ElD.js → DangerTab-DFtbEcU-.js} +2 -2
  14. package/dist/assets/{DangerTab-CLAU7ElD.js.map → DangerTab-DFtbEcU-.js.map} +1 -1
  15. package/dist/assets/{DashboardView-C7Ofmm_R.js → DashboardView-BWa1V1EI.js} +2 -2
  16. package/dist/assets/{DashboardView-C7Ofmm_R.js.map → DashboardView-BWa1V1EI.js.map} +1 -1
  17. package/dist/assets/{DeploymentDetailView-BnEVV3jQ.js → DeploymentDetailView-Cs1sMvRs.js} +2 -2
  18. package/dist/assets/{DeploymentDetailView-BnEVV3jQ.js.map → DeploymentDetailView-Cs1sMvRs.js.map} +1 -1
  19. package/dist/assets/{DeploymentsView-BQUywd2O.js → DeploymentsView-CD84qmqw.js} +2 -2
  20. package/dist/assets/{DeploymentsView-BQUywd2O.js.map → DeploymentsView-CD84qmqw.js.map} +1 -1
  21. package/dist/assets/{DialogTrigger-K-5IAbpM.js → DialogTrigger-BKNFZDUU.js} +2 -2
  22. package/dist/assets/{DialogTrigger-K-5IAbpM.js.map → DialogTrigger-BKNFZDUU.js.map} +1 -1
  23. package/dist/assets/{EquivalentCommand-Bs9vCxV-.js → EquivalentCommand-DSNG3Ig1.js} +2 -2
  24. package/dist/assets/{EquivalentCommand-Bs9vCxV-.js.map → EquivalentCommand-DSNG3Ig1.js.map} +1 -1
  25. package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-DrinGQ_J.js → ErrorNote.vue_vue_type_script_setup_true_lang-BaTXNX-q.js} +2 -2
  26. package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-DrinGQ_J.js.map → ErrorNote.vue_vue_type_script_setup_true_lang-BaTXNX-q.js.map} +1 -1
  27. package/dist/assets/{HelpModal.vue_vue_type_script_setup_true_lang-Cj0ZWsrz.js → HelpModal.vue_vue_type_script_setup_true_lang-BhdwErsB.js} +2 -2
  28. package/dist/assets/{HelpModal.vue_vue_type_script_setup_true_lang-Cj0ZWsrz.js.map → HelpModal.vue_vue_type_script_setup_true_lang-BhdwErsB.js.map} +1 -1
  29. package/dist/assets/{JobDetailView-ClTF4h1t.js → JobDetailView-DeRVlajk.js} +2 -2
  30. package/dist/assets/{JobDetailView-ClTF4h1t.js.map → JobDetailView-DeRVlajk.js.map} +1 -1
  31. package/dist/assets/{JobsView-WFqrBzR6.js → JobsView-BMWq45ys.js} +2 -2
  32. package/dist/assets/{JobsView-WFqrBzR6.js.map → JobsView-BMWq45ys.js.map} +1 -1
  33. package/dist/assets/{LogViewer.vue_vue_type_script_setup_true_lang-Btl7zhUv.js → LogViewer.vue_vue_type_script_setup_true_lang-Bj66MDSl.js} +2 -2
  34. package/dist/assets/{LogViewer.vue_vue_type_script_setup_true_lang-Btl7zhUv.js.map → LogViewer.vue_vue_type_script_setup_true_lang-Bj66MDSl.js.map} +1 -1
  35. package/dist/assets/{LoginView-B3SRuKRK.js → LoginView-Docai9d6.js} +2 -2
  36. package/dist/assets/{LoginView-B3SRuKRK.js.map → LoginView-Docai9d6.js.map} +1 -1
  37. package/dist/assets/{LogsTab-DtcfNtY8.js → LogsTab-Cfauurch.js} +2 -2
  38. package/dist/assets/{LogsTab-DtcfNtY8.js.map → LogsTab-Cfauurch.js.map} +1 -1
  39. package/dist/assets/{NotFoundView-1RdXOkoy.js → NotFoundView-D7OvnAVF.js} +2 -2
  40. package/dist/assets/{NotFoundView-1RdXOkoy.js.map → NotFoundView-D7OvnAVF.js.map} +1 -1
  41. package/dist/assets/{NotifiersView-diZ_EMYq.js → NotifiersView-DPXRy0Ml.js} +2 -2
  42. package/dist/assets/{NotifiersView-diZ_EMYq.js.map → NotifiersView-DPXRy0Ml.js.map} +1 -1
  43. package/dist/assets/{OverviewTab--YuThIvA.js → OverviewTab-BKYsu11o.js} +2 -2
  44. package/dist/assets/{OverviewTab--YuThIvA.js.map → OverviewTab-BKYsu11o.js.map} +1 -1
  45. package/dist/assets/{PublicLogsView-gChlTDrp.js → PublicLogsView-DWtP1KLG.js} +2 -2
  46. package/dist/assets/{PublicLogsView-gChlTDrp.js.map → PublicLogsView-DWtP1KLG.js.map} +1 -1
  47. package/dist/assets/{RefreshButton.vue_vue_type_script_setup_true_lang-D8LrAn-h.js → RefreshButton.vue_vue_type_script_setup_true_lang-zOMuwEGt.js} +2 -2
  48. package/dist/assets/{RefreshButton.vue_vue_type_script_setup_true_lang-D8LrAn-h.js.map → RefreshButton.vue_vue_type_script_setup_true_lang-zOMuwEGt.js.map} +1 -1
  49. package/dist/assets/{RegistriesView-Cich0dgu.js → RegistriesView-CXFrbpKU.js} +2 -2
  50. package/dist/assets/{RegistriesView-Cich0dgu.js.map → RegistriesView-CXFrbpKU.js.map} +1 -1
  51. package/dist/assets/{RelativeTime.vue_vue_type_script_setup_true_lang-surhYF0H.js → RelativeTime.vue_vue_type_script_setup_true_lang-DmifGQCq.js} +2 -2
  52. package/dist/assets/{RelativeTime.vue_vue_type_script_setup_true_lang-surhYF0H.js.map → RelativeTime.vue_vue_type_script_setup_true_lang-DmifGQCq.js.map} +1 -1
  53. package/dist/assets/{RequiresTab-CxGBOMkm.js → RequiresTab-DzIjJaLx.js} +2 -2
  54. package/dist/assets/{RequiresTab-CxGBOMkm.js.map → RequiresTab-DzIjJaLx.js.map} +1 -1
  55. package/dist/assets/{RouteTarget.vue_vue_type_script_setup_true_lang-C3qkKTNl.js → RouteTarget.vue_vue_type_script_setup_true_lang-mCKpGvoV.js} +2 -2
  56. package/dist/assets/{RouteTarget.vue_vue_type_script_setup_true_lang-C3qkKTNl.js.map → RouteTarget.vue_vue_type_script_setup_true_lang-mCKpGvoV.js.map} +1 -1
  57. package/dist/assets/{RoutingView-BXOGdZU4.js → RoutingView-BOH2ypa8.js} +2 -2
  58. package/dist/assets/{RoutingView-BXOGdZU4.js.map → RoutingView-BOH2ypa8.js.map} +1 -1
  59. package/dist/assets/RuntimeTab-DZ3MZE_K.js +3 -0
  60. package/dist/assets/RuntimeTab-DZ3MZE_K.js.map +1 -0
  61. package/dist/assets/{RuntimeTab-CXX0BGYC.css → RuntimeTab-Y2qBJykM.css} +1 -1
  62. package/dist/assets/{SelectMenu.vue_vue_type_script_setup_true_lang-C7bhFOYU.js → SelectMenu.vue_vue_type_script_setup_true_lang-CEOgxUqO.js} +2 -2
  63. package/dist/assets/{SelectMenu.vue_vue_type_script_setup_true_lang-C7bhFOYU.js.map → SelectMenu.vue_vue_type_script_setup_true_lang-CEOgxUqO.js.map} +1 -1
  64. package/dist/assets/{SettingsView-BvscpTdq.js → SettingsView-B0DeldbW.js} +2 -2
  65. package/dist/assets/{SettingsView-BvscpTdq.js.map → SettingsView-B0DeldbW.js.map} +1 -1
  66. package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-CUZB1sxf.js → SkeletonList.vue_vue_type_script_setup_true_lang-Veni2uNM.js} +2 -2
  67. package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-CUZB1sxf.js.map → SkeletonList.vue_vue_type_script_setup_true_lang-Veni2uNM.js.map} +1 -1
  68. package/dist/assets/{SpecDetailView-CAPlEmSg.js → SpecDetailView-CYTsg3dA.js} +2 -2
  69. package/dist/assets/{SpecDetailView-CAPlEmSg.js.map → SpecDetailView-CYTsg3dA.js.map} +1 -1
  70. package/dist/assets/{SpecsView-BO0QMGrI.js → SpecsView-DioO-zqq.js} +2 -2
  71. package/dist/assets/{SpecsView-BO0QMGrI.js.map → SpecsView-DioO-zqq.js.map} +1 -1
  72. package/dist/assets/{SsoMark.vue_vue_type_script_setup_true_lang-EdIcAiak.js → SsoMark.vue_vue_type_script_setup_true_lang-DYn0Yyze.js} +2 -2
  73. package/dist/assets/{SsoMark.vue_vue_type_script_setup_true_lang-EdIcAiak.js.map → SsoMark.vue_vue_type_script_setup_true_lang-DYn0Yyze.js.map} +1 -1
  74. package/dist/assets/{SsoView-2q_nGP-Q.js → SsoView-B_gXfZwB.js} +2 -2
  75. package/dist/assets/{SsoView-2q_nGP-Q.js.map → SsoView-B_gXfZwB.js.map} +1 -1
  76. package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-CwCTE4yP.js → StateBadge.vue_vue_type_script_setup_true_lang-DABjKwrU.js} +2 -2
  77. package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-CwCTE4yP.js.map → StateBadge.vue_vue_type_script_setup_true_lang-DABjKwrU.js.map} +1 -1
  78. package/dist/assets/{SubmitView-Dxre5OJU.js → SubmitView-D3dRZ8OV.js} +2 -2
  79. package/dist/assets/{SubmitView-Dxre5OJU.js.map → SubmitView-D3dRZ8OV.js.map} +1 -1
  80. package/dist/assets/{SwarmView-DtwrF08A.js → SwarmView-_n42sP13.js} +2 -2
  81. package/dist/assets/{SwarmView-DtwrF08A.js.map → SwarmView-_n42sP13.js.map} +1 -1
  82. package/dist/assets/{Teleport-bdITH--T.js → Teleport-Cy-A7RhK.js} +2 -2
  83. package/dist/assets/{Teleport-bdITH--T.js.map → Teleport-Cy-A7RhK.js.map} +1 -1
  84. package/dist/assets/{TerminalTab-CfcGPa8t.js → TerminalTab-DdbwvvIy.js} +2 -2
  85. package/dist/assets/{TerminalTab-CfcGPa8t.js.map → TerminalTab-DdbwvvIy.js.map} +1 -1
  86. package/dist/assets/{UsersView-nIlVItsK.js → UsersView-Dn9cLJCI.js} +2 -2
  87. package/dist/assets/{UsersView-nIlVItsK.js.map → UsersView-Dn9cLJCI.js.map} +1 -1
  88. package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-Be64GoXx.js → VarEditor.vue_vue_type_script_setup_true_lang-Dyb8Lmxc.js} +2 -2
  89. package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-Be64GoXx.js.map → VarEditor.vue_vue_type_script_setup_true_lang-Dyb8Lmxc.js.map} +1 -1
  90. package/dist/assets/{VarIO-BcNlaWXO.js → VarIO-D7bwBO4U.js} +2 -2
  91. package/dist/assets/{VarIO-BcNlaWXO.js.map → VarIO-D7bwBO4U.js.map} +1 -1
  92. package/dist/assets/{VariablesView-CzeCc-0m.js → VariablesView-CH3Ktrp1.js} +2 -2
  93. package/dist/assets/{VariablesView-CzeCc-0m.js.map → VariablesView-CH3Ktrp1.js.map} +1 -1
  94. package/dist/assets/{index-IvJmpI3b.js → index-ChQCta5r.js} +34 -29
  95. package/dist/assets/index-ChQCta5r.js.map +1 -0
  96. package/dist/assets/{useDeployment-rA-pgUHZ.js → useDeployment-DiChk3VG.js} +2 -2
  97. package/dist/assets/{useDeployment-rA-pgUHZ.js.map → useDeployment-DiChk3VG.js.map} +1 -1
  98. package/dist/index.html +1 -1
  99. package/package.json +1 -1
  100. package/dist/assets/RuntimeTab-_QvQc5F2.js +0 -3
  101. package/dist/assets/RuntimeTab-_QvQc5F2.js.map +0 -1
  102. package/dist/assets/index-IvJmpI3b.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{d as se,K as oe,a6 as M,M as ae,c as d,a as s,i as V,v as F,u as n,$ as l,f as a,e as m,w as c,_ as A,ac as ne,t as i,g as p,z as H,F as I,A as v,D as le,j as b,k as f,ae as ie,U as K,p as q,C as z,a7 as re,o as r}from"./index-IvJmpI3b.js";import{c as ue}from"./useJobQueue-JaWoydCt.js";import{_ as $}from"./ActionButton.vue_vue_type_script_setup_true_lang-DBfqkgMV.js";import{_ as de}from"./ErrorNote.vue_vue_type_script_setup_true_lang-DrinGQ_J.js";import{_ as D}from"./SelectMenu.vue_vue_type_script_setup_true_lang-C7bhFOYU.js";import"./Teleport-bdITH--T.js";const ve={class:"panel settings-form"},he={class:"field"},me={class:"mute hint"},pe={class:"field"},fe=["type"],be={class:"row",style:{"margin-top":"var(--s2)"}},ye={key:2,class:"mute",style:{"font-size":"var(--t-xs)"}},ce={class:"mute hint"},ge={class:"row",style:{gap:"8px","margin-top":"4px"}},ke=["disabled"],we={key:0,class:"mute"},Se={key:1,class:"bad"},xe={class:"panel settings-form"},_e={class:"mute hint"},Ce={class:"field"},Re={class:"row"},Ae=["disabled","title"],Te={class:"mute",style:{"font-size":"var(--t-xs)"}},Ve={key:0,class:"mute hint"},$e={class:"field"},De={class:"row"},je={key:0,class:"mute hint"},Ee={key:2,class:"mute hint"},Le={class:"panel"},Be={class:"field"},Je={class:"field"},Ie=se({__name:"SettingsView",setup(Ue){const C=b(!1),R=b(!1),W=f(()=>{const t=l.token;return t.startsWith("pstack_pat_")?"Looks like a personal token.":/^[0-9a-f]{40,}$/i.test(t)?"Looks like a machine token.":`${t.length} characters — this does not look like a pstack token.`}),X=f(()=>{var t;return((t=v.health)==null?void 0:t.authEnforced)??null});async function G(){C.value=!0;try{await ie(),K(v.healthError?"error":"ok",v.healthError||"Control plane reachable")}finally{C.value=!1}}const y=b(null),g=b(""),j=b(!1),k=b(""),x=b("viewer"),w=b(null),E=t=>{var e;return((e=y.value)==null?void 0:e.settings.find(o=>o.key===t))??null},u=f(()=>E("max_jobs")),h=f(()=>E("default_role"));function L(){var t,e;k.value=String(((t=u.value)==null?void 0:t.value)??""),x.value=String(((e=h.value)==null?void 0:e.value)??"viewer")}async function Q(){const t=await q.get("/api/settings");if(j.value=!0,!t.ok){g.value=z(t,"read the host settings");return}g.value="",y.value=t.body,L()}Q(),oe();async function B(t,e){w.value=t;const o=await q.put(`/api/settings/${t}`,{value:e});if(w.value=null,!o.ok){g.value=z(o,`save ${t}`);return}g.value="",y.value&&(y.value.settings=y.value.settings.map(T=>T.key===t?{key:T.key,value:o.body.value,source:o.body.source,minRole:o.body.minRole}:T)),L(),K("ok",o.body.note??"Saved.")}function S(t){return t?re(M.includes(t.minRole)?t.minRole:"admin"):!1}function _(t){return!t||S(t)?"":`Changing this needs the ${t.minRole} role — your account can read it, not set it.`}function J(t){var e;if(t.source==="db")return"Set here and stored on the host — it survives a restart.";if(t.source==="env"){const o=(e=y.value)==null?void 0:e.env.PSTACK_MAX_JOBS;return`From PSTACK_MAX_JOBS${o==null?"":` (${o})`} in the server's environment, which supplies the default and no longer the last word.`}return"The value the binary ships with — nobody has set it, and nothing in the environment supplies one."}const U={db:"Set here",env:"From the environment",default:"The shipped default"},Y=f(()=>v.jobs.filter(t=>t.state==="running").length),Z=f(()=>v.jobs.filter(t=>t.state==="queued").length),O=f(()=>ue(k.value)),N=f(()=>{var t;return Number(k.value)!==Number((t=u.value)==null?void 0:t.value)}),P=f(()=>{var t;return x.value!==String(((t=h.value)==null?void 0:t.value)??"")}),ee={viewer:"reads everything",developer:"deploys and tears down",maintainer:"host configuration",admin:"accounts and sign-on"},te=M.map(t=>({value:t,label:ae(t),hint:ee[t]}));return(t,e)=>(r(),d("div",null,[e[35]||(e[35]=s("div",{class:"page-head"},[s("div",null,[s("h1",null,"Settings"),s("div",{class:"sub"},"Some of this is yours alone; some of it is the whole host's. Each panel says which.")])],-1)),s("section",ve,[e[18]||(e[18]=s("h2",{class:"phead-title"},"Connection",-1)),e[19]||(e[19]=s("p",{class:"mute hint"}," Stored in this browser, by this browser. Nothing on this panel is sent anywhere, nobody else sees it, and there is nothing to save — every box writes through as you type. ",-1)),s("div",he,[e[12]||(e[12]=s("label",{for:"apiBase"},"API base URL",-1)),V(s("input",{id:"apiBase","onUpdate:modelValue":e[0]||(e[0]=o=>n(l).apiBase=o),type:"url",spellcheck:"false",placeholder:"(same origin)"},null,512),[[F,n(l).apiBase,void 0,{trim:!0}]]),s("div",me,[e[11]||(e[11]=a(" Leave it empty unless you are pointing this page at another host. ",-1)),m(A,{label:"about the API base URL"},{default:c(()=>[...e[10]||(e[10]=[a(" Empty means same-origin, which is how the control stack serves this page — the browser never makes a cross-origin request, so there is no CORS to configure. Set an absolute URL only for a development session against a remote host. ",-1)])]),_:1})])]),s("div",pe,[e[15]||(e[15]=s("label",{for:"token"},"Access token",-1)),V(s("input",{id:"token","onUpdate:modelValue":e[1]||(e[1]=o=>n(l).token=o),type:R.value||!n(l).token?"text":"password",name:"pstack-access-token",autocomplete:"off","data-1p-ignore":"","data-lpignore":"true","data-bwignore":"","data-form-type":"other",spellcheck:"false",placeholder:"paste the token from pstack init"},null,8,fe),[[ne,n(l).token,void 0,{trim:!0}]]),s("div",be,[n(l).token?(r(),d("button",{key:0,class:"ghost sm",onClick:e[2]||(e[2]=o=>R.value=!R.value)},i(R.value?"Hide":"Show"),1)):p("",!0),n(l).token?(r(),H($,{key:1,variant:"ghost",class:"sm",confirm:"Clear it?",onRun:e[3]||(e[3]=o=>n(l).token="")},{default:c(()=>[...e[13]||(e[13]=[a(" Clear ",-1)])]),_:1})):p("",!0),n(l).token?(r(),d("span",ye,i(W.value),1)):p("",!0)]),s("div",ce,[e[14]||(e[14]=a(" Authenticates every request — signing in with an account does the same job, so set this only for token-based access (the machine token, or a personal token from your account). ",-1)),X.value===!1?(r(),d(I,{key:0},[a(" This server is not asking for one — it only accepts connections from this machine, so a token here is harmless but unnecessary. ")],64)):p("",!0)])]),s("div",ge,[s("button",{class:"btn",disabled:C.value,onClick:G},i(C.value?"Checking…":"Test connection"),9,ke),n(v).health?(r(),d("span",we,[a(" Connected to pstack "+i(n(v).health.version)+" ",1),m(A,{label:"where data is stored"},{default:c(()=>[e[16]||(e[16]=a(" Deployment records and stored specs live in ",-1)),s("code",null,i(n(v).health.dataDir),1),e[17]||(e[17]=a(" on the host. ",-1))]),_:1})])):n(v).healthError?(r(),d("span",Se,i(n(v).healthError),1)):p("",!0)])]),s("section",xe,[e[29]||(e[29]=s("h2",{class:"phead-title"},"This host",-1)),s("p",_e,[e[21]||(e[21]=a(" Stored on the server, in force for everybody, and saved on purpose — a box that wrote through on every keystroke would set the limit to 1 on the way to typing 12. ",-1)),m(A,{label:"which value wins"},{default:c(()=>[...e[20]||(e[20]=[a(" Database, then environment, then the value the binary ships with. Something saved here outranks ",-1),s("code",null,"PSTACK_MAX_JOBS",-1),a(" and is not undone by the next restart — and a host where nobody ever saves anything keeps behaving exactly as it did before this panel existed. ",-1)])]),_:1})]),g.value?(r(),H(de,{key:0,text:g.value,title:"Host settings."},null,8,["text"])):p("",!0),y.value?(r(),d(I,{key:1},[s("div",Ce,[e[24]||(e[24]=s("label",{for:"maxJobs"},"Concurrency limit",-1)),s("div",Re,[V(s("input",{id:"maxJobs","onUpdate:modelValue":e[4]||(e[4]=o=>k.value=o),type:"number",min:"1",step:"1",inputmode:"numeric",disabled:!S(u.value),title:_(u.value)||void 0,style:le(`width: 8rem${S(u.value)?"":"; opacity: 0.45; cursor: not-allowed"}`)},null,12,Ae),[[F,k.value]]),m($,{variant:"primary",pending:w.value==="max_jobs",disabled:!S(u.value)||!N.value||!!O.value||w.value!==null,title:_(u.value)||O.value||(N.value?void 0:"this is already the stored value"),onClick:e[5]||(e[5]=o=>B("max_jobs",Number(k.value)))},{default:c(()=>[...e[22]||(e[22]=[a(" Save ",-1)])]),_:1},8,["pending","disabled","title"]),s("span",Te,[a(i(Y.value)+" running · "+i(Z.value)+" waiting ",1),m(A,{label:"what waiting means"},{default:c(()=>[...e[23]||(e[23]=[a(" A waiting job is not necessarily waiting for a slot: a stack runs one job at a time, so a job can be queued behind another on its own stack while the host is nowhere near this limit. The Jobs page says which, per job. ",-1)])]),_:1})])]),e[25]||(e[25]=s("div",{class:"mute hint"},[a(" The most jobs this host runs at once, across every stack. It applies from the moment you save it — no restart. "),s("b",null,"Lowering it cancels nothing:"),a(" jobs already running run to completion, and the new limit applies to the next job that starts. Raising it starts whatever has been waiting for a slot. ")],-1)),u.value?(r(),d("div",Ve,[s("b",null,i(U[u.value.source])+".",1),a(" "+i(J(u.value))+" "+i(_(u.value)),1)])):p("",!0)]),s("div",$e,[e[27]||(e[27]=s("label",{for:"defaultRole"},"Default role for new accounts",-1)),s("div",De,[m(D,{id:"defaultRole",modelValue:x.value,"onUpdate:modelValue":e[6]||(e[6]=o=>x.value=o),label:"Default role for new accounts",options:n(te),disabled:!S(h.value)},null,8,["modelValue","options","disabled"]),m($,{variant:"primary",pending:w.value==="default_role",disabled:!S(h.value)||!P.value||w.value!==null,title:_(h.value)||(P.value?void 0:"this is already the stored value"),onClick:e[7]||(e[7]=o=>B("default_role",x.value))},{default:c(()=>[...e[26]||(e[26]=[a(" Save ",-1)])]),_:1},8,["pending","disabled","title"])]),e[28]||(e[28]=s("div",{class:"mute hint"},[a(" What an account gets when it is created without a role being named — the API's "),s("code",null,"POST /api/users"),a(", and any sign-on provider left to inherit the host default. It never widens what anyone may do: creating accounts is admin's either way. Accounts that already exist keep the role they have. ")],-1)),h.value?(r(),d("div",je,[s("b",null,i(U[h.value.source])+".",1),a(" "+i(J(h.value))+" "+i(_(h.value)),1)])):p("",!0)])],64)):j.value?p("",!0):(r(),d("p",Ee,"Reading the host's settings…"))]),s("section",Le,[e[33]||(e[33]=s("h2",{class:"phead-title"},"Appearance",-1)),e[34]||(e[34]=s("p",{class:"mute hint"},"This browser's too — and applied the moment you pick it.",-1)),s("div",Be,[e[30]||(e[30]=s("label",{for:"theme"},"Theme",-1)),m(D,{modelValue:n(l).theme,"onUpdate:modelValue":e[8]||(e[8]=o=>n(l).theme=o),id:"theme",label:"Theme",options:[{value:"system",label:"Follow the system"},{value:"dark",label:"Dark"},{value:"light",label:"Light"}]},null,8,["modelValue"])]),s("div",Je,[e[31]||(e[31]=s("label",{for:"motion"},"Motion",-1)),m(D,{modelValue:n(l).motion,"onUpdate:modelValue":e[9]||(e[9]=o=>n(l).motion=o),id:"motion",label:"Motion",options:[{value:"system",label:"Follow the system"},{value:"full",label:"Always animate"},{value:"none",label:"No animation"}]},null,8,["modelValue"]),e[32]||(e[32]=s("div",{class:"mute hint"}," “Follow the system” uses your device's reduce-motion setting. The other two override it, in either direction. ",-1))])])]))}});export{Ie as default};
2
- //# sourceMappingURL=SettingsView-BvscpTdq.js.map
1
+ import{d as se,K as oe,a7 as M,M as ae,c as d,a as s,i as V,v as F,u as n,$ as l,f as a,e as m,w as c,_ as A,ac as ne,t as i,g as p,z as H,F as I,A as v,D as le,j as b,k as f,ae as ie,U as K,p as q,C as z,a2 as re,o as r}from"./index-ChQCta5r.js";import{c as ue}from"./useJobQueue-JaWoydCt.js";import{_ as $}from"./ActionButton.vue_vue_type_script_setup_true_lang-pLJQfFvY.js";import{_ as de}from"./ErrorNote.vue_vue_type_script_setup_true_lang-BaTXNX-q.js";import{_ as D}from"./SelectMenu.vue_vue_type_script_setup_true_lang-CEOgxUqO.js";import"./Teleport-Cy-A7RhK.js";const ve={class:"panel settings-form"},he={class:"field"},me={class:"mute hint"},pe={class:"field"},fe=["type"],be={class:"row",style:{"margin-top":"var(--s2)"}},ye={key:2,class:"mute",style:{"font-size":"var(--t-xs)"}},ce={class:"mute hint"},ge={class:"row",style:{gap:"8px","margin-top":"4px"}},ke=["disabled"],we={key:0,class:"mute"},Se={key:1,class:"bad"},xe={class:"panel settings-form"},_e={class:"mute hint"},Ce={class:"field"},Re={class:"row"},Ae=["disabled","title"],Te={class:"mute",style:{"font-size":"var(--t-xs)"}},Ve={key:0,class:"mute hint"},$e={class:"field"},De={class:"row"},je={key:0,class:"mute hint"},Ee={key:2,class:"mute hint"},Le={class:"panel"},Be={class:"field"},Je={class:"field"},Ie=se({__name:"SettingsView",setup(Ue){const C=b(!1),R=b(!1),W=f(()=>{const t=l.token;return t.startsWith("pstack_pat_")?"Looks like a personal token.":/^[0-9a-f]{40,}$/i.test(t)?"Looks like a machine token.":`${t.length} characters — this does not look like a pstack token.`}),X=f(()=>{var t;return((t=v.health)==null?void 0:t.authEnforced)??null});async function G(){C.value=!0;try{await ie(),K(v.healthError?"error":"ok",v.healthError||"Control plane reachable")}finally{C.value=!1}}const y=b(null),g=b(""),j=b(!1),k=b(""),x=b("viewer"),w=b(null),E=t=>{var e;return((e=y.value)==null?void 0:e.settings.find(o=>o.key===t))??null},u=f(()=>E("max_jobs")),h=f(()=>E("default_role"));function L(){var t,e;k.value=String(((t=u.value)==null?void 0:t.value)??""),x.value=String(((e=h.value)==null?void 0:e.value)??"viewer")}async function Q(){const t=await q.get("/api/settings");if(j.value=!0,!t.ok){g.value=z(t,"read the host settings");return}g.value="",y.value=t.body,L()}Q(),oe();async function B(t,e){w.value=t;const o=await q.put(`/api/settings/${t}`,{value:e});if(w.value=null,!o.ok){g.value=z(o,`save ${t}`);return}g.value="",y.value&&(y.value.settings=y.value.settings.map(T=>T.key===t?{key:T.key,value:o.body.value,source:o.body.source,minRole:o.body.minRole}:T)),L(),K("ok",o.body.note??"Saved.")}function S(t){return t?re(M.includes(t.minRole)?t.minRole:"admin"):!1}function _(t){return!t||S(t)?"":`Changing this needs the ${t.minRole} role — your account can read it, not set it.`}function J(t){var e;if(t.source==="db")return"Set here and stored on the host — it survives a restart.";if(t.source==="env"){const o=(e=y.value)==null?void 0:e.env.PSTACK_MAX_JOBS;return`From PSTACK_MAX_JOBS${o==null?"":` (${o})`} in the server's environment, which supplies the default and no longer the last word.`}return"The value the binary ships with — nobody has set it, and nothing in the environment supplies one."}const U={db:"Set here",env:"From the environment",default:"The shipped default"},Y=f(()=>v.jobs.filter(t=>t.state==="running").length),Z=f(()=>v.jobs.filter(t=>t.state==="queued").length),O=f(()=>ue(k.value)),N=f(()=>{var t;return Number(k.value)!==Number((t=u.value)==null?void 0:t.value)}),P=f(()=>{var t;return x.value!==String(((t=h.value)==null?void 0:t.value)??"")}),ee={viewer:"reads everything",developer:"deploys and tears down",maintainer:"host configuration",admin:"accounts and sign-on"},te=M.map(t=>({value:t,label:ae(t),hint:ee[t]}));return(t,e)=>(r(),d("div",null,[e[35]||(e[35]=s("div",{class:"page-head"},[s("div",null,[s("h1",null,"Settings"),s("div",{class:"sub"},"Some of this is yours alone; some of it is the whole host's. Each panel says which.")])],-1)),s("section",ve,[e[18]||(e[18]=s("h2",{class:"phead-title"},"Connection",-1)),e[19]||(e[19]=s("p",{class:"mute hint"}," Stored in this browser, by this browser. Nothing on this panel is sent anywhere, nobody else sees it, and there is nothing to save — every box writes through as you type. ",-1)),s("div",he,[e[12]||(e[12]=s("label",{for:"apiBase"},"API base URL",-1)),V(s("input",{id:"apiBase","onUpdate:modelValue":e[0]||(e[0]=o=>n(l).apiBase=o),type:"url",spellcheck:"false",placeholder:"(same origin)"},null,512),[[F,n(l).apiBase,void 0,{trim:!0}]]),s("div",me,[e[11]||(e[11]=a(" Leave it empty unless you are pointing this page at another host. ",-1)),m(A,{label:"about the API base URL"},{default:c(()=>[...e[10]||(e[10]=[a(" Empty means same-origin, which is how the control stack serves this page — the browser never makes a cross-origin request, so there is no CORS to configure. Set an absolute URL only for a development session against a remote host. ",-1)])]),_:1})])]),s("div",pe,[e[15]||(e[15]=s("label",{for:"token"},"Access token",-1)),V(s("input",{id:"token","onUpdate:modelValue":e[1]||(e[1]=o=>n(l).token=o),type:R.value||!n(l).token?"text":"password",name:"pstack-access-token",autocomplete:"off","data-1p-ignore":"","data-lpignore":"true","data-bwignore":"","data-form-type":"other",spellcheck:"false",placeholder:"paste the token from pstack init"},null,8,fe),[[ne,n(l).token,void 0,{trim:!0}]]),s("div",be,[n(l).token?(r(),d("button",{key:0,class:"ghost sm",onClick:e[2]||(e[2]=o=>R.value=!R.value)},i(R.value?"Hide":"Show"),1)):p("",!0),n(l).token?(r(),H($,{key:1,variant:"ghost",class:"sm",confirm:"Clear it?",onRun:e[3]||(e[3]=o=>n(l).token="")},{default:c(()=>[...e[13]||(e[13]=[a(" Clear ",-1)])]),_:1})):p("",!0),n(l).token?(r(),d("span",ye,i(W.value),1)):p("",!0)]),s("div",ce,[e[14]||(e[14]=a(" Authenticates every request — signing in with an account does the same job, so set this only for token-based access (the machine token, or a personal token from your account). ",-1)),X.value===!1?(r(),d(I,{key:0},[a(" This server is not asking for one — it only accepts connections from this machine, so a token here is harmless but unnecessary. ")],64)):p("",!0)])]),s("div",ge,[s("button",{class:"btn",disabled:C.value,onClick:G},i(C.value?"Checking…":"Test connection"),9,ke),n(v).health?(r(),d("span",we,[a(" Connected to pstack "+i(n(v).health.version)+" ",1),m(A,{label:"where data is stored"},{default:c(()=>[e[16]||(e[16]=a(" Deployment records and stored specs live in ",-1)),s("code",null,i(n(v).health.dataDir),1),e[17]||(e[17]=a(" on the host. ",-1))]),_:1})])):n(v).healthError?(r(),d("span",Se,i(n(v).healthError),1)):p("",!0)])]),s("section",xe,[e[29]||(e[29]=s("h2",{class:"phead-title"},"This host",-1)),s("p",_e,[e[21]||(e[21]=a(" Stored on the server, in force for everybody, and saved on purpose — a box that wrote through on every keystroke would set the limit to 1 on the way to typing 12. ",-1)),m(A,{label:"which value wins"},{default:c(()=>[...e[20]||(e[20]=[a(" Database, then environment, then the value the binary ships with. Something saved here outranks ",-1),s("code",null,"PSTACK_MAX_JOBS",-1),a(" and is not undone by the next restart — and a host where nobody ever saves anything keeps behaving exactly as it did before this panel existed. ",-1)])]),_:1})]),g.value?(r(),H(de,{key:0,text:g.value,title:"Host settings."},null,8,["text"])):p("",!0),y.value?(r(),d(I,{key:1},[s("div",Ce,[e[24]||(e[24]=s("label",{for:"maxJobs"},"Concurrency limit",-1)),s("div",Re,[V(s("input",{id:"maxJobs","onUpdate:modelValue":e[4]||(e[4]=o=>k.value=o),type:"number",min:"1",step:"1",inputmode:"numeric",disabled:!S(u.value),title:_(u.value)||void 0,style:le(`width: 8rem${S(u.value)?"":"; opacity: 0.45; cursor: not-allowed"}`)},null,12,Ae),[[F,k.value]]),m($,{variant:"primary",pending:w.value==="max_jobs",disabled:!S(u.value)||!N.value||!!O.value||w.value!==null,title:_(u.value)||O.value||(N.value?void 0:"this is already the stored value"),onClick:e[5]||(e[5]=o=>B("max_jobs",Number(k.value)))},{default:c(()=>[...e[22]||(e[22]=[a(" Save ",-1)])]),_:1},8,["pending","disabled","title"]),s("span",Te,[a(i(Y.value)+" running · "+i(Z.value)+" waiting ",1),m(A,{label:"what waiting means"},{default:c(()=>[...e[23]||(e[23]=[a(" A waiting job is not necessarily waiting for a slot: a stack runs one job at a time, so a job can be queued behind another on its own stack while the host is nowhere near this limit. The Jobs page says which, per job. ",-1)])]),_:1})])]),e[25]||(e[25]=s("div",{class:"mute hint"},[a(" The most jobs this host runs at once, across every stack. It applies from the moment you save it — no restart. "),s("b",null,"Lowering it cancels nothing:"),a(" jobs already running run to completion, and the new limit applies to the next job that starts. Raising it starts whatever has been waiting for a slot. ")],-1)),u.value?(r(),d("div",Ve,[s("b",null,i(U[u.value.source])+".",1),a(" "+i(J(u.value))+" "+i(_(u.value)),1)])):p("",!0)]),s("div",$e,[e[27]||(e[27]=s("label",{for:"defaultRole"},"Default role for new accounts",-1)),s("div",De,[m(D,{id:"defaultRole",modelValue:x.value,"onUpdate:modelValue":e[6]||(e[6]=o=>x.value=o),label:"Default role for new accounts",options:n(te),disabled:!S(h.value)},null,8,["modelValue","options","disabled"]),m($,{variant:"primary",pending:w.value==="default_role",disabled:!S(h.value)||!P.value||w.value!==null,title:_(h.value)||(P.value?void 0:"this is already the stored value"),onClick:e[7]||(e[7]=o=>B("default_role",x.value))},{default:c(()=>[...e[26]||(e[26]=[a(" Save ",-1)])]),_:1},8,["pending","disabled","title"])]),e[28]||(e[28]=s("div",{class:"mute hint"},[a(" What an account gets when it is created without a role being named — the API's "),s("code",null,"POST /api/users"),a(", and any sign-on provider left to inherit the host default. It never widens what anyone may do: creating accounts is admin's either way. Accounts that already exist keep the role they have. ")],-1)),h.value?(r(),d("div",je,[s("b",null,i(U[h.value.source])+".",1),a(" "+i(J(h.value))+" "+i(_(h.value)),1)])):p("",!0)])],64)):j.value?p("",!0):(r(),d("p",Ee,"Reading the host's settings…"))]),s("section",Le,[e[33]||(e[33]=s("h2",{class:"phead-title"},"Appearance",-1)),e[34]||(e[34]=s("p",{class:"mute hint"},"This browser's too — and applied the moment you pick it.",-1)),s("div",Be,[e[30]||(e[30]=s("label",{for:"theme"},"Theme",-1)),m(D,{modelValue:n(l).theme,"onUpdate:modelValue":e[8]||(e[8]=o=>n(l).theme=o),id:"theme",label:"Theme",options:[{value:"system",label:"Follow the system"},{value:"dark",label:"Dark"},{value:"light",label:"Light"}]},null,8,["modelValue"])]),s("div",Je,[e[31]||(e[31]=s("label",{for:"motion"},"Motion",-1)),m(D,{modelValue:n(l).motion,"onUpdate:modelValue":e[9]||(e[9]=o=>n(l).motion=o),id:"motion",label:"Motion",options:[{value:"system",label:"Follow the system"},{value:"full",label:"Always animate"},{value:"none",label:"No animation"}]},null,8,["modelValue"]),e[32]||(e[32]=s("div",{class:"mute hint"}," “Follow the system” uses your device's reduce-motion setting. The other two override it, in either direction. ",-1))])])]))}});export{Ie as default};
2
+ //# sourceMappingURL=SettingsView-B0DeldbW.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SettingsView-BvscpTdq.js","sources":["../../src/views/SettingsView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Settings: where the API is, how to authenticate to it, how the app looks — and the two settings\n * that live on the HOST.\n *\n * ── TWO KINDS OF CONTROL ON ONE PAGE ─────────────────────────────────────────────────────────────\n *\n * Nobody should have to guess which is which, so each panel says so in its own subtitle rather than\n * the page making one claim at the top: \"nothing here is sent to the server\" was true of this page\n * for eight versions, and a sentence like that outlives its truth in people's memory.\n *\n * - THIS BROWSER — Connection and Appearance. `useSettings` writes them straight to localStorage;\n * nothing is sent anywhere, nobody else sees them, and there is nothing to save because the\n * bindings write through immediately. That is why those panels have no Save button.\n * - THIS HOST — the concurrency limit and the default role for new accounts. Stored in the\n * server's database, in force for everybody, and saved EXPLICITLY: a number box that wrote\n * through on every keystroke would set the cap to 1 on the way to typing 12.\n *\n * ── WHERE THE VALUE CAME FROM, ALWAYS ────────────────────────────────────────────────────────────\n *\n * Both host settings render their `source`, because \"I changed it and it did not stick\" is\n * otherwise unanswerable: a box saying 4 cannot tell a refused write from a stale page from an\n * environment variable overriding it. Precedence is database > environment > built-in default — so\n * `PSTACK_MAX_JOBS` is now the DEFAULT rather than the authority, and a value set here is not\n * silently reverted by the next restart. A save flips the row's source to \"db\", so the write's own\n * response is what the page re-renders from; keeping the old row and patching just the number would\n * leave the line still crediting the environment.\n *\n * ── LOWERING THE CAP CANCELS NOTHING ─────────────────────────────────────────────────────────────\n *\n * Said beside the field, not only in the toast afterwards. Jobs already running run to completion;\n * the cap applies to the next dispatch. Someone typing 1 while four jobs run must not read the\n * confirmation as \"three were just killed\" — which is also why the running and waiting counts sit\n * next to the input rather than a page away in Jobs.\n *\n * ── A VIEWER READS BOTH AND WRITES NEITHER ───────────────────────────────────────────────────────\n *\n * Disabled, not hidden, with the reason in text under the control: a page that hides what your tier\n * cannot reach looks broken rather than restricted, and the reason cannot live only in a `title`\n * because a disabled `SelectMenu` has no element of its own to hang one on. The threshold comes\n * from the server's own permission table (`minRole`, per key — maintainer for the cap, admin for\n * the role) and is never re-derived here. An unrecognised name is read as ADMIN: `rank()` scores a\n * role it has never heard of as 0, so passing one through unguarded would enable the control for\n * everyone. Hiding is courtesy either way — the server's 403 is the enforcement, and it lands in\n * `hostError`.\n */\nimport { computed, ref } from 'vue';\nimport { api, problem } from '../api/client';\nimport { ROLES, type HostSettings, type Role, type SettingKey, type SettingRow, type SettingWritten } from '../api/types';\nimport { can } from '../composables/useAuth';\nimport { capProblem } from '../composables/useJobQueue';\nimport { settings } from '../composables/useSettings';\nimport { state, loadHealth, loadJobs } from '../composables/useControlPlane';\nimport { sentence } from '../composables/useFormat';\nimport { toast } from '../composables/useToasts';\nimport ActionButton from '../components/ActionButton.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\nimport InfoHint from '../components/InfoHint.vue';\nimport SelectMenu from '../components/SelectMenu.vue';\n\nconst checking = ref(false);\nconst reveal = ref(false);\n\n/**\n * What is in the token box, described without printing it.\n *\n * The point is to make a WRONG value visible at a glance. A password autofilled into this field is\n * short and matches neither shape, and \"12 characters, not a pstack token\" is the sentence that\n * ends the mystery — before this, the only symptom was every page 401ing.\n */\nconst tokenShape = computed(() => {\n const t = settings.token;\n if (t.startsWith('pstack_pat_')) return 'Looks like a personal token.';\n if (/^[0-9a-f]{40,}$/i.test(t)) return 'Looks like a machine token.';\n return `${t.length} characters — this does not look like a pstack token.`;\n});\n\n/**\n * The server tells us whether it enforces auth. When it does not, it is bound to loopback and a\n * token would be pointless — worth saying, so nobody hunts for one that was never issued.\n */\nconst authEnforced = computed(() => state.health?.authEnforced ?? null);\n\nasync function recheck(): Promise<void> {\n checking.value = true;\n try {\n await loadHealth();\n toast(state.healthError ? 'error' : 'ok', state.healthError || 'Control plane reachable');\n } finally {\n checking.value = false;\n }\n}\n\n// ── the host's settings ──────────────────────────────────────────────────────────────────────────\n\nconst host = ref<HostSettings | null>(null);\nconst hostError = ref('');\nconst hostLoaded = ref(false);\n/**\n * What the boxes hold, kept apart from the server's copy so \"changed\" is a comparison, not a flag.\n *\n * `string | number` is not laziness about the type: `v-model` on `<input type=\"number\">` REPLACES\n * the string with a number as soon as the value parses, so this ref genuinely holds both — a string\n * when it is empty or freshly reset from the server, a number after a keystroke.\n */\nconst maxJobsDraft = ref<string | number>('');\nconst roleDraft = ref('viewer');\n/** Which key is in flight — one at a time, so a save cannot be racing its own re-read. */\nconst savingKey = ref<SettingKey | null>(null);\n\nconst row = (key: SettingKey): SettingRow | null => host.value?.settings.find((s) => s.key === key) ?? null;\nconst maxJobs = computed(() => row('max_jobs'));\nconst defaultRole = computed(() => row('default_role'));\n\n/** Both drafts back to what the server just said. Called after every read and every write. */\nfunction resetDrafts(): void {\n maxJobsDraft.value = String(maxJobs.value?.value ?? '');\n roleDraft.value = String(defaultRole.value?.value ?? 'viewer');\n}\n\nasync function loadHost(): Promise<void> {\n const r = await api.get<HostSettings>('/api/settings');\n hostLoaded.value = true;\n if (!r.ok) {\n // Includes the honest 404: a server older than these settings has no such route, and `problem`\n // says exactly that rather than inventing a reason.\n hostError.value = problem(r, 'read the host settings');\n return;\n }\n hostError.value = '';\n host.value = r.body;\n resetDrafts();\n}\nvoid loadHost();\n// The shell polls the job list every seven seconds once signed in; this is only so the counts\n// beside the cap are right on arrival rather than up to a poll later.\nvoid loadJobs();\n\nasync function save(key: SettingKey, value: number | string): Promise<void> {\n savingKey.value = key;\n const r = await api.put<SettingWritten>(`/api/settings/${key}`, { value });\n savingKey.value = null;\n if (!r.ok) {\n hostError.value = problem(r, `save ${key}`);\n return;\n }\n hostError.value = '';\n // The WHOLE row from the response, not just the number: a stored value's source is now \"db\", and\n // a line still saying \"from the environment\" is the precise lie this display exists to prevent.\n if (host.value) {\n host.value.settings = host.value.settings.map((s) =>\n s.key === key ? { key: s.key, value: r.body.value, source: r.body.source, minRole: r.body.minRole } : s,\n );\n }\n resetDrafts();\n // The server's own words for what a cap change did and did not do — paraphrasing it here is how\n // the two drift.\n toast('ok', r.body.note ?? 'Saved.');\n}\n\n/**\n * May this account write this key — for rendering only.\n *\n * FAILS CLOSED on a `minRole` this build does not know: `rank()` scores an unfamiliar role 0, so\n * handing one to `can()` unchecked would answer true for every signed-in account, and the least\n * privileged person on the host would be shown a control the server refuses.\n */\nfunction mayWrite(r: SettingRow | null): boolean {\n if (!r) return false;\n return can((ROLES as readonly string[]).includes(r.minRole) ? (r.minRole as Role) : 'admin');\n}\n\n/** Empty when they may write it; otherwise the sentence rendered under the disabled control. */\nfunction whyReadOnly(r: SettingRow | null): string {\n if (!r || mayWrite(r)) return '';\n return `Changing this needs the ${r.minRole} role — your account can read it, not set it.`;\n}\n\n/**\n * Where the value came from. Stated as a FACT about the host, never as an instruction: a viewer\n * reads this line too, and \"save a value here to override it\" is advice for someone else.\n */\nfunction sourceLine(r: SettingRow): string {\n if (r.source === 'db') return 'Set here and stored on the host — it survives a restart.';\n if (r.source === 'env') {\n const n = host.value?.env.PSTACK_MAX_JOBS;\n return `From PSTACK_MAX_JOBS${n === null || n === undefined ? '' : ` (${n})`} in the server's environment, which supplies the default and no longer the last word.`;\n }\n return 'The value the binary ships with — nobody has set it, and nothing in the environment supplies one.';\n}\n// Not \"your choice\": a viewer reads this line too, and whoever set it may not be the person looking.\nconst SOURCE_LABEL: Record<SettingRow['source'], string> = {\n db: 'Set here',\n env: 'From the environment',\n default: 'The shipped default',\n};\n\nconst running = computed(() => state.jobs.filter((j) => j.state === 'running').length);\nconst waiting = computed(() => state.jobs.filter((j) => j.state === 'queued').length);\n\n/**\n * Why the cap cannot be saved as typed — shown as the button's title, per the disabled rule.\n *\n * The rule itself lives in `useJobQueue` because this app has no component harness: logic that\n * would sit inline in a `.vue` is untestable there, and this one shipped broken.\n */\nconst maxJobsProblem = computed(() => capProblem(maxJobsDraft.value));\n/** `Number` on both sides: the input hands back a string, so `'4' !== 4` would leave Save lit forever. */\nconst maxJobsDirty = computed(() => Number(maxJobsDraft.value) !== Number(maxJobs.value?.value));\nconst roleDirty = computed(() => roleDraft.value !== String(defaultRole.value?.value ?? ''));\n\n/** One line each, in the picker itself — a role name alone does not say what it costs to grant. */\nconst ROLE_WHAT: Record<Role, string> = {\n viewer: 'reads everything',\n developer: 'deploys and tears down',\n maintainer: 'host configuration',\n admin: 'accounts and sign-on',\n};\nconst roleOptions = ROLES.map((r) => ({ value: r, label: sentence(r), hint: ROLE_WHAT[r] }));\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>Settings</h1>\n <!-- Panel by panel, because two of the three are this browser's and one is the host's, and\n a page-level \"nothing here is sent to the server\" would now be a lie about the third. -->\n <div class=\"sub\">Some of this is yours alone; some of it is the whole host's. Each panel says which.</div>\n </div>\n </div>\n\n <!-- `settings-form` caps the field widths: a URL input stretched to the panel's full 1500px\n reads as a text editor, not a form — see the rule in app.css. -->\n <section class=\"panel settings-form\">\n <h2 class=\"phead-title\">Connection</h2>\n <p class=\"mute hint\">\n Stored in this browser, by this browser. Nothing on this panel is sent anywhere, nobody else\n sees it, and there is nothing to save — every box writes through as you type.\n </p>\n\n <div class=\"field\">\n <label for=\"apiBase\">API base URL</label>\n <input\n id=\"apiBase\"\n v-model.trim=\"settings.apiBase\"\n type=\"url\"\n spellcheck=\"false\"\n placeholder=\"(same origin)\"\n />\n <div class=\"mute hint\">\n Leave it empty unless you are pointing this page at another host.\n <InfoHint label=\"about the API base URL\">\n Empty means same-origin, which is how the control stack serves this page — the browser\n never makes a cross-origin request, so there is no CORS to configure. Set an absolute\n URL only for a development session against a remote host.\n </InfoHint>\n </div>\n </div>\n\n <div class=\"field\">\n <label for=\"token\">Access token</label>\n <!--\n NOT `type=\"password\"`, and none of these attributes are decorative.\n\n This field is why \"opening Settings signs me out\" was a real bug. A password input is an\n autofill magnet: Chrome and every password manager fill one on sight and ignore\n `autocomplete=\"off\"` while doing it. The filled value went straight through `v-model` into\n localStorage and onto every request as `Authorization: Bearer <someone's password>` — and\n the server used to treat a bad bearer as a hard refusal rather than falling back to the\n session cookie, so a perfectly good login 401'd on every route until site data was cleared.\n\n The server now falls through (that is the real fix), and this field stops inviting the\n fill: a text input that masks itself only while it holds a value, named nothing like a\n password, with the ignore hints the managers respect.\n -->\n <input\n id=\"token\"\n v-model.trim=\"settings.token\"\n :type=\"reveal || !settings.token ? 'text' : 'password'\"\n name=\"pstack-access-token\"\n autocomplete=\"off\"\n data-1p-ignore\n data-lpignore=\"true\"\n data-bwignore\n data-form-type=\"other\"\n spellcheck=\"false\"\n placeholder=\"paste the token from pstack init\"\n />\n <div class=\"row\" style=\"margin-top: var(--s2)\">\n <button v-if=\"settings.token\" class=\"ghost sm\" @click=\"reveal = !reveal\">\n {{ reveal ? 'Hide' : 'Show' }}\n </button>\n <ActionButton\n v-if=\"settings.token\"\n variant=\"ghost\"\n class=\"sm\"\n confirm=\"Clear it?\"\n @run=\"settings.token = ''\"\n >\n Clear\n </ActionButton>\n <span v-if=\"settings.token\" class=\"mute\" style=\"font-size: var(--t-xs)\">\n {{ tokenShape }}\n </span>\n </div>\n <div class=\"mute hint\">\n Authenticates every request — signing in with an account does the same job, so set this\n only for token-based access (the machine token, or a personal token from your account).\n <template v-if=\"authEnforced === false\">\n This server is not asking for one — it only accepts connections from this machine, so a\n token here is harmless but unnecessary.\n </template>\n </div>\n </div>\n\n <div class=\"row\" style=\"gap: 8px; margin-top: 4px\">\n <button class=\"btn\" :disabled=\"checking\" @click=\"recheck\">\n {{ checking ? 'Checking…' : 'Test connection' }}\n </button>\n <span v-if=\"state.health\" class=\"mute\">\n Connected to pstack {{ state.health.version }}\n <InfoHint label=\"where data is stored\">\n Deployment records and stored specs live in\n <code>{{ state.health.dataDir }}</code> on the host.\n </InfoHint>\n </span>\n <span v-else-if=\"state.healthError\" class=\"bad\">{{ state.healthError }}</span>\n </div>\n </section>\n\n <!-- ===================== the host's own settings — everyone sees these ===================== -->\n <section class=\"panel settings-form\">\n <h2 class=\"phead-title\">This host</h2>\n <p class=\"mute hint\">\n Stored on the server, in force for everybody, and saved on purpose — a box that wrote\n through on every keystroke would set the limit to 1 on the way to typing 12.\n <InfoHint label=\"which value wins\">\n Database, then environment, then the value the binary ships with. Something saved here\n outranks <code>PSTACK_MAX_JOBS</code> and is not undone by the next restart — and a host\n where nobody ever saves anything keeps behaving exactly as it did before this panel\n existed.\n </InfoHint>\n </p>\n\n <ErrorNote v-if=\"hostError\" :text=\"hostError\" title=\"Host settings.\" />\n\n <template v-if=\"host\">\n <div class=\"field\">\n <!-- The dimming is inline because app.css has no `input:disabled` rule — `button:disabled`\n exists (which is what fades the role picker, a real <button> under the hood) and\n checkboxes have one, but this is the app's first disabled TEXT-shaped input, and\n without it a viewer gets a box that looks live, takes no focus and explains nothing.\n It matches the button rule's 0.45; the honest home for it is app.css, which is not\n this agent's to edit. -->\n <label for=\"maxJobs\">Concurrency limit</label>\n <div class=\"row\">\n <input\n id=\"maxJobs\"\n v-model=\"maxJobsDraft\"\n type=\"number\"\n min=\"1\"\n step=\"1\"\n inputmode=\"numeric\"\n :disabled=\"!mayWrite(maxJobs)\"\n :title=\"whyReadOnly(maxJobs) || undefined\"\n :style=\"`width: 8rem${mayWrite(maxJobs) ? '' : '; opacity: 0.45; cursor: not-allowed'}`\"\n />\n <ActionButton\n variant=\"primary\"\n :pending=\"savingKey === 'max_jobs'\"\n :disabled=\"!mayWrite(maxJobs) || !maxJobsDirty || !!maxJobsProblem || savingKey !== null\"\n :title=\"whyReadOnly(maxJobs) || maxJobsProblem || (maxJobsDirty ? undefined : 'this is already the stored value')\"\n @click=\"save('max_jobs', Number(maxJobsDraft))\"\n >\n Save\n </ActionButton>\n <span class=\"mute\" style=\"font-size: var(--t-xs)\">\n {{ running }} running · {{ waiting }} waiting\n <InfoHint label=\"what waiting means\">\n A waiting job is not necessarily waiting for a slot: a stack runs one job at a time,\n so a job can be queued behind another on its own stack while the host is nowhere near\n this limit. The Jobs page says which, per job.\n </InfoHint>\n </span>\n </div>\n <div class=\"mute hint\">\n The most jobs this host runs at once, across every stack. It applies from the moment you\n save it — no restart. <b>Lowering it cancels nothing:</b> jobs already running run to\n completion, and the new limit applies to the next job that starts. Raising it starts\n whatever has been waiting for a slot.\n </div>\n <div v-if=\"maxJobs\" class=\"mute hint\">\n <b>{{ SOURCE_LABEL[maxJobs.source] }}.</b> {{ sourceLine(maxJobs) }}\n {{ whyReadOnly(maxJobs) }}\n </div>\n </div>\n\n <div class=\"field\">\n <label for=\"defaultRole\">Default role for new accounts</label>\n <div class=\"row\">\n <SelectMenu\n id=\"defaultRole\"\n v-model=\"roleDraft\"\n label=\"Default role for new accounts\"\n :options=\"roleOptions\"\n :disabled=\"!mayWrite(defaultRole)\"\n />\n <ActionButton\n variant=\"primary\"\n :pending=\"savingKey === 'default_role'\"\n :disabled=\"!mayWrite(defaultRole) || !roleDirty || savingKey !== null\"\n :title=\"whyReadOnly(defaultRole) || (roleDirty ? undefined : 'this is already the stored value')\"\n @click=\"save('default_role', roleDraft)\"\n >\n Save\n </ActionButton>\n </div>\n <div class=\"mute hint\">\n What an account gets when it is created without a role being named — the API's\n <code>POST /api/users</code>, and any sign-on provider left to inherit the host default.\n It never widens what anyone may do: creating accounts is admin's either way. Accounts\n that already exist keep the role they have.\n </div>\n <div v-if=\"defaultRole\" class=\"mute hint\">\n <b>{{ SOURCE_LABEL[defaultRole.source] }}.</b> {{ sourceLine(defaultRole) }}\n {{ whyReadOnly(defaultRole) }}\n </div>\n </div>\n </template>\n <p v-else-if=\"!hostLoaded\" class=\"mute hint\">Reading the host's settings…</p>\n </section>\n\n <section class=\"panel\">\n <h2 class=\"phead-title\">Appearance</h2>\n <p class=\"mute hint\">This browser's too — and applied the moment you pick it.</p>\n\n <div class=\"field\">\n <label for=\"theme\">Theme</label>\n <SelectMenu\n v-model=\"settings.theme\" id=\"theme\"\n label=\"Theme\"\n :options=\"[\n { value: 'system', label: 'Follow the system' },\n { value: 'dark', label: 'Dark' },\n { value: 'light', label: 'Light' },\n ]\"\n />\n </div>\n\n <div class=\"field\">\n <label for=\"motion\">Motion</label>\n <SelectMenu\n v-model=\"settings.motion\" id=\"motion\"\n label=\"Motion\"\n :options=\"[\n { value: 'system', label: 'Follow the system' },\n { value: 'full', label: 'Always animate' },\n { value: 'none', label: 'No animation' },\n ]\"\n />\n <div class=\"mute hint\">\n “Follow the system” uses your device's reduce-motion setting. The other two override it,\n in either direction.\n </div>\n </div>\n </section>\n </div>\n</template>\n"],"names":["checking","ref","reveal","tokenShape","computed","settings","authEnforced","_a","state","recheck","loadHealth","toast","host","hostError","hostLoaded","maxJobsDraft","roleDraft","savingKey","row","key","s","maxJobs","defaultRole","resetDrafts","_b","loadHost","r","api","problem","loadJobs","save","value","mayWrite","can","ROLES","whyReadOnly","sourceLine","n","SOURCE_LABEL","running","j","waiting","maxJobsProblem","capProblem","maxJobsDirty","roleDirty","ROLE_WHAT","roleOptions","sentence","_createElementBlock","_createElementVNode","_hoisted_1","_cache","_hoisted_2","$event","_unref","_hoisted_3","_createVNode","InfoHint","_hoisted_4","_hoisted_6","_createBlock","ActionButton","_hoisted_7","_toDisplayString","_hoisted_8","_Fragment","_hoisted_9","_hoisted_10","_openBlock","_hoisted_11","_createTextVNode","_hoisted_12","_hoisted_13","_hoisted_14","ErrorNote","_hoisted_15","_hoisted_16","_normalizeStyle","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","SelectMenu","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26"],"mappings":"qyCA4DA,MAAMA,EAAWC,EAAI,EAAK,EACpBC,EAASD,EAAI,EAAK,EASlBE,EAAaC,EAAS,IAAM,CAChC,MAAM,EAAIC,EAAS,MACnB,OAAI,EAAE,WAAW,aAAa,EAAU,+BACpC,mBAAmB,KAAK,CAAC,EAAU,8BAChC,GAAG,EAAE,MAAM,uDACpB,CAAC,EAMKC,EAAeF,EAAS,IAAA,OAAM,QAAAG,EAAAC,EAAM,SAAN,YAAAD,EAAc,eAAgB,KAAI,EAEtE,eAAeE,GAAyB,CACtCT,EAAS,MAAQ,GACjB,GAAI,CACF,MAAMU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A,EAWM,MAXNqC,GAWM,CAVJnC,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAAgC,QAAA,CAAzB,IAAI,OAAA,EAAQ,QAAK,EAAA,GACxBO,EAQI0B,EAAA,CAPS,WAAA5B,EAAAlD,CAAA,EAAS,MAAT,sBAAA+C,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAE,GAAAC,EAAAlD,CAAA,EAAS,MAAKiD,GAAE,GAAG,QAC5B,MAAM,QACL,QAAS,sGAIT,2BAIPJ,EAeM,MAfNsC,GAeM,CAdJpC,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAAkC,QAAA,CAA3B,IAAI,QAAA,EAAS,SAAM,EAAA,GAC1BO,EAQI0B,EAAA,CAPS,WAAA5B,EAAAlD,CAAA,EAAS,OAAT,sBAAA+C,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAE,GAAAC,EAAAlD,CAAA,EAAS,OAAMiD,GAAE,GAAG,SAC7B,MAAM,SACL,QAAS,sHAIT,yBAELF,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAGM,MAAA,CAHD,MAAM,aAAY,kHAGvB,EAAA,EAAA"}
1
+ {"version":3,"file":"SettingsView-B0DeldbW.js","sources":["../../src/views/SettingsView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Settings: where the API is, how to authenticate to it, how the app looks — and the two settings\n * that live on the HOST.\n *\n * ── TWO KINDS OF CONTROL ON ONE PAGE ─────────────────────────────────────────────────────────────\n *\n * Nobody should have to guess which is which, so each panel says so in its own subtitle rather than\n * the page making one claim at the top: \"nothing here is sent to the server\" was true of this page\n * for eight versions, and a sentence like that outlives its truth in people's memory.\n *\n * - THIS BROWSER — Connection and Appearance. `useSettings` writes them straight to localStorage;\n * nothing is sent anywhere, nobody else sees them, and there is nothing to save because the\n * bindings write through immediately. That is why those panels have no Save button.\n * - THIS HOST — the concurrency limit and the default role for new accounts. Stored in the\n * server's database, in force for everybody, and saved EXPLICITLY: a number box that wrote\n * through on every keystroke would set the cap to 1 on the way to typing 12.\n *\n * ── WHERE THE VALUE CAME FROM, ALWAYS ────────────────────────────────────────────────────────────\n *\n * Both host settings render their `source`, because \"I changed it and it did not stick\" is\n * otherwise unanswerable: a box saying 4 cannot tell a refused write from a stale page from an\n * environment variable overriding it. Precedence is database > environment > built-in default — so\n * `PSTACK_MAX_JOBS` is now the DEFAULT rather than the authority, and a value set here is not\n * silently reverted by the next restart. A save flips the row's source to \"db\", so the write's own\n * response is what the page re-renders from; keeping the old row and patching just the number would\n * leave the line still crediting the environment.\n *\n * ── LOWERING THE CAP CANCELS NOTHING ─────────────────────────────────────────────────────────────\n *\n * Said beside the field, not only in the toast afterwards. Jobs already running run to completion;\n * the cap applies to the next dispatch. Someone typing 1 while four jobs run must not read the\n * confirmation as \"three were just killed\" — which is also why the running and waiting counts sit\n * next to the input rather than a page away in Jobs.\n *\n * ── A VIEWER READS BOTH AND WRITES NEITHER ───────────────────────────────────────────────────────\n *\n * Disabled, not hidden, with the reason in text under the control: a page that hides what your tier\n * cannot reach looks broken rather than restricted, and the reason cannot live only in a `title`\n * because a disabled `SelectMenu` has no element of its own to hang one on. The threshold comes\n * from the server's own permission table (`minRole`, per key — maintainer for the cap, admin for\n * the role) and is never re-derived here. An unrecognised name is read as ADMIN: `rank()` scores a\n * role it has never heard of as 0, so passing one through unguarded would enable the control for\n * everyone. Hiding is courtesy either way — the server's 403 is the enforcement, and it lands in\n * `hostError`.\n */\nimport { computed, ref } from 'vue';\nimport { api, problem } from '../api/client';\nimport { ROLES, type HostSettings, type Role, type SettingKey, type SettingRow, type SettingWritten } from '../api/types';\nimport { can } from '../composables/useAuth';\nimport { capProblem } from '../composables/useJobQueue';\nimport { settings } from '../composables/useSettings';\nimport { state, loadHealth, loadJobs } from '../composables/useControlPlane';\nimport { sentence } from '../composables/useFormat';\nimport { toast } from '../composables/useToasts';\nimport ActionButton from '../components/ActionButton.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\nimport InfoHint from '../components/InfoHint.vue';\nimport SelectMenu from '../components/SelectMenu.vue';\n\nconst checking = ref(false);\nconst reveal = ref(false);\n\n/**\n * What is in the token box, described without printing it.\n *\n * The point is to make a WRONG value visible at a glance. A password autofilled into this field is\n * short and matches neither shape, and \"12 characters, not a pstack token\" is the sentence that\n * ends the mystery — before this, the only symptom was every page 401ing.\n */\nconst tokenShape = computed(() => {\n const t = settings.token;\n if (t.startsWith('pstack_pat_')) return 'Looks like a personal token.';\n if (/^[0-9a-f]{40,}$/i.test(t)) return 'Looks like a machine token.';\n return `${t.length} characters — this does not look like a pstack token.`;\n});\n\n/**\n * The server tells us whether it enforces auth. When it does not, it is bound to loopback and a\n * token would be pointless — worth saying, so nobody hunts for one that was never issued.\n */\nconst authEnforced = computed(() => state.health?.authEnforced ?? null);\n\nasync function recheck(): Promise<void> {\n checking.value = true;\n try {\n await loadHealth();\n toast(state.healthError ? 'error' : 'ok', state.healthError || 'Control plane reachable');\n } finally {\n checking.value = false;\n }\n}\n\n// ── the host's settings ──────────────────────────────────────────────────────────────────────────\n\nconst host = ref<HostSettings | null>(null);\nconst hostError = ref('');\nconst hostLoaded = ref(false);\n/**\n * What the boxes hold, kept apart from the server's copy so \"changed\" is a comparison, not a flag.\n *\n * `string | number` is not laziness about the type: `v-model` on `<input type=\"number\">` REPLACES\n * the string with a number as soon as the value parses, so this ref genuinely holds both — a string\n * when it is empty or freshly reset from the server, a number after a keystroke.\n */\nconst maxJobsDraft = ref<string | number>('');\nconst roleDraft = ref('viewer');\n/** Which key is in flight — one at a time, so a save cannot be racing its own re-read. */\nconst savingKey = ref<SettingKey | null>(null);\n\nconst row = (key: SettingKey): SettingRow | null => host.value?.settings.find((s) => s.key === key) ?? null;\nconst maxJobs = computed(() => row('max_jobs'));\nconst defaultRole = computed(() => row('default_role'));\n\n/** Both drafts back to what the server just said. Called after every read and every write. */\nfunction resetDrafts(): void {\n maxJobsDraft.value = String(maxJobs.value?.value ?? '');\n roleDraft.value = String(defaultRole.value?.value ?? 'viewer');\n}\n\nasync function loadHost(): Promise<void> {\n const r = await api.get<HostSettings>('/api/settings');\n hostLoaded.value = true;\n if (!r.ok) {\n // Includes the honest 404: a server older than these settings has no such route, and `problem`\n // says exactly that rather than inventing a reason.\n hostError.value = problem(r, 'read the host settings');\n return;\n }\n hostError.value = '';\n host.value = r.body;\n resetDrafts();\n}\nvoid loadHost();\n// The shell polls the job list every seven seconds once signed in; this is only so the counts\n// beside the cap are right on arrival rather than up to a poll later.\nvoid loadJobs();\n\nasync function save(key: SettingKey, value: number | string): Promise<void> {\n savingKey.value = key;\n const r = await api.put<SettingWritten>(`/api/settings/${key}`, { value });\n savingKey.value = null;\n if (!r.ok) {\n hostError.value = problem(r, `save ${key}`);\n return;\n }\n hostError.value = '';\n // The WHOLE row from the response, not just the number: a stored value's source is now \"db\", and\n // a line still saying \"from the environment\" is the precise lie this display exists to prevent.\n if (host.value) {\n host.value.settings = host.value.settings.map((s) =>\n s.key === key ? { key: s.key, value: r.body.value, source: r.body.source, minRole: r.body.minRole } : s,\n );\n }\n resetDrafts();\n // The server's own words for what a cap change did and did not do — paraphrasing it here is how\n // the two drift.\n toast('ok', r.body.note ?? 'Saved.');\n}\n\n/**\n * May this account write this key — for rendering only.\n *\n * FAILS CLOSED on a `minRole` this build does not know: `rank()` scores an unfamiliar role 0, so\n * handing one to `can()` unchecked would answer true for every signed-in account, and the least\n * privileged person on the host would be shown a control the server refuses.\n */\nfunction mayWrite(r: SettingRow | null): boolean {\n if (!r) return false;\n return can((ROLES as readonly string[]).includes(r.minRole) ? (r.minRole as Role) : 'admin');\n}\n\n/** Empty when they may write it; otherwise the sentence rendered under the disabled control. */\nfunction whyReadOnly(r: SettingRow | null): string {\n if (!r || mayWrite(r)) return '';\n return `Changing this needs the ${r.minRole} role — your account can read it, not set it.`;\n}\n\n/**\n * Where the value came from. Stated as a FACT about the host, never as an instruction: a viewer\n * reads this line too, and \"save a value here to override it\" is advice for someone else.\n */\nfunction sourceLine(r: SettingRow): string {\n if (r.source === 'db') return 'Set here and stored on the host — it survives a restart.';\n if (r.source === 'env') {\n const n = host.value?.env.PSTACK_MAX_JOBS;\n return `From PSTACK_MAX_JOBS${n === null || n === undefined ? '' : ` (${n})`} in the server's environment, which supplies the default and no longer the last word.`;\n }\n return 'The value the binary ships with — nobody has set it, and nothing in the environment supplies one.';\n}\n// Not \"your choice\": a viewer reads this line too, and whoever set it may not be the person looking.\nconst SOURCE_LABEL: Record<SettingRow['source'], string> = {\n db: 'Set here',\n env: 'From the environment',\n default: 'The shipped default',\n};\n\nconst running = computed(() => state.jobs.filter((j) => j.state === 'running').length);\nconst waiting = computed(() => state.jobs.filter((j) => j.state === 'queued').length);\n\n/**\n * Why the cap cannot be saved as typed — shown as the button's title, per the disabled rule.\n *\n * The rule itself lives in `useJobQueue` because this app has no component harness: logic that\n * would sit inline in a `.vue` is untestable there, and this one shipped broken.\n */\nconst maxJobsProblem = computed(() => capProblem(maxJobsDraft.value));\n/** `Number` on both sides: the input hands back a string, so `'4' !== 4` would leave Save lit forever. */\nconst maxJobsDirty = computed(() => Number(maxJobsDraft.value) !== Number(maxJobs.value?.value));\nconst roleDirty = computed(() => roleDraft.value !== String(defaultRole.value?.value ?? ''));\n\n/** One line each, in the picker itself — a role name alone does not say what it costs to grant. */\nconst ROLE_WHAT: Record<Role, string> = {\n viewer: 'reads everything',\n developer: 'deploys and tears down',\n maintainer: 'host configuration',\n admin: 'accounts and sign-on',\n};\nconst roleOptions = ROLES.map((r) => ({ value: r, label: sentence(r), hint: ROLE_WHAT[r] }));\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>Settings</h1>\n <!-- Panel by panel, because two of the three are this browser's and one is the host's, and\n a page-level \"nothing here is sent to the server\" would now be a lie about the third. -->\n <div class=\"sub\">Some of this is yours alone; some of it is the whole host's. Each panel says which.</div>\n </div>\n </div>\n\n <!-- `settings-form` caps the field widths: a URL input stretched to the panel's full 1500px\n reads as a text editor, not a form — see the rule in app.css. -->\n <section class=\"panel settings-form\">\n <h2 class=\"phead-title\">Connection</h2>\n <p class=\"mute hint\">\n Stored in this browser, by this browser. Nothing on this panel is sent anywhere, nobody else\n sees it, and there is nothing to save — every box writes through as you type.\n </p>\n\n <div class=\"field\">\n <label for=\"apiBase\">API base URL</label>\n <input\n id=\"apiBase\"\n v-model.trim=\"settings.apiBase\"\n type=\"url\"\n spellcheck=\"false\"\n placeholder=\"(same origin)\"\n />\n <div class=\"mute hint\">\n Leave it empty unless you are pointing this page at another host.\n <InfoHint label=\"about the API base URL\">\n Empty means same-origin, which is how the control stack serves this page — the browser\n never makes a cross-origin request, so there is no CORS to configure. Set an absolute\n URL only for a development session against a remote host.\n </InfoHint>\n </div>\n </div>\n\n <div class=\"field\">\n <label for=\"token\">Access token</label>\n <!--\n NOT `type=\"password\"`, and none of these attributes are decorative.\n\n This field is why \"opening Settings signs me out\" was a real bug. A password input is an\n autofill magnet: Chrome and every password manager fill one on sight and ignore\n `autocomplete=\"off\"` while doing it. The filled value went straight through `v-model` into\n localStorage and onto every request as `Authorization: Bearer <someone's password>` — and\n the server used to treat a bad bearer as a hard refusal rather than falling back to the\n session cookie, so a perfectly good login 401'd on every route until site data was cleared.\n\n The server now falls through (that is the real fix), and this field stops inviting the\n fill: a text input that masks itself only while it holds a value, named nothing like a\n password, with the ignore hints the managers respect.\n -->\n <input\n id=\"token\"\n v-model.trim=\"settings.token\"\n :type=\"reveal || !settings.token ? 'text' : 'password'\"\n name=\"pstack-access-token\"\n autocomplete=\"off\"\n data-1p-ignore\n data-lpignore=\"true\"\n data-bwignore\n data-form-type=\"other\"\n spellcheck=\"false\"\n placeholder=\"paste the token from pstack init\"\n />\n <div class=\"row\" style=\"margin-top: var(--s2)\">\n <button v-if=\"settings.token\" class=\"ghost sm\" @click=\"reveal = !reveal\">\n {{ reveal ? 'Hide' : 'Show' }}\n </button>\n <ActionButton\n v-if=\"settings.token\"\n variant=\"ghost\"\n class=\"sm\"\n confirm=\"Clear it?\"\n @run=\"settings.token = ''\"\n >\n Clear\n </ActionButton>\n <span v-if=\"settings.token\" class=\"mute\" style=\"font-size: var(--t-xs)\">\n {{ tokenShape }}\n </span>\n </div>\n <div class=\"mute hint\">\n Authenticates every request — signing in with an account does the same job, so set this\n only for token-based access (the machine token, or a personal token from your account).\n <template v-if=\"authEnforced === false\">\n This server is not asking for one — it only accepts connections from this machine, so a\n token here is harmless but unnecessary.\n </template>\n </div>\n </div>\n\n <div class=\"row\" style=\"gap: 8px; margin-top: 4px\">\n <button class=\"btn\" :disabled=\"checking\" @click=\"recheck\">\n {{ checking ? 'Checking…' : 'Test connection' }}\n </button>\n <span v-if=\"state.health\" class=\"mute\">\n Connected to pstack {{ state.health.version }}\n <InfoHint label=\"where data is stored\">\n Deployment records and stored specs live in\n <code>{{ state.health.dataDir }}</code> on the host.\n </InfoHint>\n </span>\n <span v-else-if=\"state.healthError\" class=\"bad\">{{ state.healthError }}</span>\n </div>\n </section>\n\n <!-- ===================== the host's own settings — everyone sees these ===================== -->\n <section class=\"panel settings-form\">\n <h2 class=\"phead-title\">This host</h2>\n <p class=\"mute hint\">\n Stored on the server, in force for everybody, and saved on purpose — a box that wrote\n through on every keystroke would set the limit to 1 on the way to typing 12.\n <InfoHint label=\"which value wins\">\n Database, then environment, then the value the binary ships with. Something saved here\n outranks <code>PSTACK_MAX_JOBS</code> and is not undone by the next restart — and a host\n where nobody ever saves anything keeps behaving exactly as it did before this panel\n existed.\n </InfoHint>\n </p>\n\n <ErrorNote v-if=\"hostError\" :text=\"hostError\" title=\"Host settings.\" />\n\n <template v-if=\"host\">\n <div class=\"field\">\n <!-- The dimming is inline because app.css has no `input:disabled` rule — `button:disabled`\n exists (which is what fades the role picker, a real <button> under the hood) and\n checkboxes have one, but this is the app's first disabled TEXT-shaped input, and\n without it a viewer gets a box that looks live, takes no focus and explains nothing.\n It matches the button rule's 0.45; the honest home for it is app.css, which is not\n this agent's to edit. -->\n <label for=\"maxJobs\">Concurrency limit</label>\n <div class=\"row\">\n <input\n id=\"maxJobs\"\n v-model=\"maxJobsDraft\"\n type=\"number\"\n min=\"1\"\n step=\"1\"\n inputmode=\"numeric\"\n :disabled=\"!mayWrite(maxJobs)\"\n :title=\"whyReadOnly(maxJobs) || undefined\"\n :style=\"`width: 8rem${mayWrite(maxJobs) ? '' : '; opacity: 0.45; cursor: not-allowed'}`\"\n />\n <ActionButton\n variant=\"primary\"\n :pending=\"savingKey === 'max_jobs'\"\n :disabled=\"!mayWrite(maxJobs) || !maxJobsDirty || !!maxJobsProblem || savingKey !== null\"\n :title=\"whyReadOnly(maxJobs) || maxJobsProblem || (maxJobsDirty ? undefined : 'this is already the stored value')\"\n @click=\"save('max_jobs', Number(maxJobsDraft))\"\n >\n Save\n </ActionButton>\n <span class=\"mute\" style=\"font-size: var(--t-xs)\">\n {{ running }} running · {{ waiting }} waiting\n <InfoHint label=\"what waiting means\">\n A waiting job is not necessarily waiting for a slot: a stack runs one job at a time,\n so a job can be queued behind another on its own stack while the host is nowhere near\n this limit. The Jobs page says which, per job.\n </InfoHint>\n </span>\n </div>\n <div class=\"mute hint\">\n The most jobs this host runs at once, across every stack. It applies from the moment you\n save it — no restart. <b>Lowering it cancels nothing:</b> jobs already running run to\n completion, and the new limit applies to the next job that starts. Raising it starts\n whatever has been waiting for a slot.\n </div>\n <div v-if=\"maxJobs\" class=\"mute hint\">\n <b>{{ SOURCE_LABEL[maxJobs.source] }}.</b> {{ sourceLine(maxJobs) }}\n {{ whyReadOnly(maxJobs) }}\n </div>\n </div>\n\n <div class=\"field\">\n <label for=\"defaultRole\">Default role for new accounts</label>\n <div class=\"row\">\n <SelectMenu\n id=\"defaultRole\"\n v-model=\"roleDraft\"\n label=\"Default role for new accounts\"\n :options=\"roleOptions\"\n :disabled=\"!mayWrite(defaultRole)\"\n />\n <ActionButton\n variant=\"primary\"\n :pending=\"savingKey === 'default_role'\"\n :disabled=\"!mayWrite(defaultRole) || !roleDirty || savingKey !== null\"\n :title=\"whyReadOnly(defaultRole) || (roleDirty ? undefined : 'this is already the stored value')\"\n @click=\"save('default_role', roleDraft)\"\n >\n Save\n </ActionButton>\n </div>\n <div class=\"mute hint\">\n What an account gets when it is created without a role being named — the API's\n <code>POST /api/users</code>, and any sign-on provider left to inherit the host default.\n It never widens what anyone may do: creating accounts is admin's either way. Accounts\n that already exist keep the role they have.\n </div>\n <div v-if=\"defaultRole\" class=\"mute hint\">\n <b>{{ SOURCE_LABEL[defaultRole.source] }}.</b> {{ sourceLine(defaultRole) }}\n {{ whyReadOnly(defaultRole) }}\n </div>\n </div>\n </template>\n <p v-else-if=\"!hostLoaded\" class=\"mute hint\">Reading the host's settings…</p>\n </section>\n\n <section class=\"panel\">\n <h2 class=\"phead-title\">Appearance</h2>\n <p class=\"mute hint\">This browser's too — and applied the moment you pick it.</p>\n\n <div class=\"field\">\n <label for=\"theme\">Theme</label>\n <SelectMenu\n v-model=\"settings.theme\" id=\"theme\"\n label=\"Theme\"\n :options=\"[\n { value: 'system', label: 'Follow the system' },\n { value: 'dark', label: 'Dark' },\n { value: 'light', label: 'Light' },\n ]\"\n />\n </div>\n\n <div class=\"field\">\n <label for=\"motion\">Motion</label>\n <SelectMenu\n v-model=\"settings.motion\" id=\"motion\"\n label=\"Motion\"\n :options=\"[\n { value: 'system', label: 'Follow the system' },\n { value: 'full', label: 'Always animate' },\n { value: 'none', label: 'No animation' },\n ]\"\n />\n <div class=\"mute hint\">\n “Follow the system” uses your device's reduce-motion setting. The other two override it,\n in either direction.\n </div>\n </div>\n </section>\n </div>\n</template>\n"],"names":["checking","ref","reveal","tokenShape","computed","settings","authEnforced","_a","state","recheck","loadHealth","toast","host","hostError","hostLoaded","maxJobsDraft","roleDraft","savingKey","row","key","s","maxJobs","defaultRole","resetDrafts","_b","loadHost","r","api","problem","loadJobs","save","value","mayWrite","can","ROLES","whyReadOnly","sourceLine","n","SOURCE_LABEL","running","j","waiting","maxJobsProblem","capProblem","maxJobsDirty","roleDirty","ROLE_WHAT","roleOptions","sentence","_createElementBlock","_createElementVNode","_hoisted_1","_cache","_hoisted_2","$event","_unref","_hoisted_3","_createVNode","InfoHint","_hoisted_4","_hoisted_6","_createBlock","ActionButton","_hoisted_7","_toDisplayString","_hoisted_8","_Fragment","_hoisted_9","_hoisted_10","_openBlock","_hoisted_11","_createTextVNode","_hoisted_12","_hoisted_13","_hoisted_14","ErrorNote","_hoisted_15","_hoisted_16","_normalizeStyle","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","SelectMenu","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26"],"mappings":"qyCA4DA,MAAMA,EAAWC,EAAI,EAAK,EACpBC,EAASD,EAAI,EAAK,EASlBE,EAAaC,EAAS,IAAM,CAChC,MAAM,EAAIC,EAAS,MACnB,OAAI,EAAE,WAAW,aAAa,EAAU,+BACpC,mBAAmB,KAAK,CAAC,EAAU,8BAChC,GAAG,EAAE,MAAM,uDACpB,CAAC,EAMKC,EAAeF,EAAS,IAAA,OAAM,QAAAG,EAAAC,EAAM,SAAN,YAAAD,EAAc,eAAgB,KAAI,EAEtE,eAAeE,GAAyB,CACtCT,EAAS,MAAQ,GACjB,GAAI,CACF,MAAMU,GAAA,EACNC,EAAMH,EAAM,YAAc,QAAU,KAAMA,EAAM,aAAe,yBAAyB,CAC1F,QAAA,CACER,EAAS,MAAQ,EACnB,CACF,CAIA,MAAMY,EAAOX,EAAyB,IAAI,EACpCY,EAAYZ,EAAI,EAAE,EAClBa,EAAab,EAAI,EAAK,EAQtBc,EAAed,EAAqB,EAAE,EACtCe,EAAYf,EAAI,QAAQ,EAExBgB,EAAYhB,EAAuB,IAAI,EAEvCiB,EAAOC,UAAuC,QAAAZ,EAAAK,EAAK,QAAL,YAAAL,EAAY,SAAS,KAAMa,GAAMA,EAAE,MAAQD,KAAQ,MACjGE,EAAUjB,EAAS,IAAMc,EAAI,UAAU,CAAC,EACxCI,EAAclB,EAAS,IAAMc,EAAI,cAAc,CAAC,EAG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D,CAAA,EAAS,OAAT,sBAAA+C,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAE,GAAAC,EAAAlD,CAAA,EAAS,OAAMiD,GAAE,GAAG,SAC7B,MAAM,SACL,QAAS,sHAIT,yBAELF,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAGM,MAAA,CAHD,MAAM,aAAY,kHAGvB,EAAA,EAAA"}
@@ -1,2 +1,2 @@
1
- import{d as s,o as e,c as a,F as o,r,D as n,E as i}from"./index-IvJmpI3b.js";const c={role:"status","aria-live":"polite","aria-label":"loading"},p=s({__name:"SkeletonList",props:{rows:{default:3},tall:{type:Boolean,default:!1}},setup(l){return(d,u)=>(e(),a("div",c,[(e(!0),a(o,null,r(l.rows,t=>(e(),a("div",{key:t,class:i(["skel",{tall:l.tall}]),style:n({width:`${100-t*7}%`})},null,6))),128))]))}});export{p as _};
2
- //# sourceMappingURL=SkeletonList.vue_vue_type_script_setup_true_lang-CUZB1sxf.js.map
1
+ import{d as s,o as e,c as a,F as o,r,D as n,E as i}from"./index-ChQCta5r.js";const c={role:"status","aria-live":"polite","aria-label":"loading"},p=s({__name:"SkeletonList",props:{rows:{default:3},tall:{type:Boolean,default:!1}},setup(l){return(d,u)=>(e(),a("div",c,[(e(!0),a(o,null,r(l.rows,t=>(e(),a("div",{key:t,class:i(["skel",{tall:l.tall}]),style:n({width:`${100-t*7}%`})},null,6))),128))]))}});export{p as _};
2
+ //# sourceMappingURL=SkeletonList.vue_vue_type_script_setup_true_lang-Veni2uNM.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SkeletonList.vue_vue_type_script_setup_true_lang-CUZB1sxf.js","sources":["../../src/components/SkeletonList.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A loading placeholder shaped like the thing that is coming.\n *\n * Deliberately not a spinner on an empty page: a spinner says \"wait\" and nothing else, while a\n * skeleton says what will be there and stops the layout jumping when it arrives. It also makes an\n * empty result visibly different from a slow one, which on this page is the difference between\n * \"nothing is deployed\" and \"the API is not answering\".\n */\nwithDefaults(defineProps<{ rows?: number; tall?: boolean }>(), { rows: 3, tall: false });\n</script>\n\n<template>\n <div role=\"status\" aria-live=\"polite\" aria-label=\"loading\">\n <div v-for=\"n in rows\" :key=\"n\" class=\"skel\" :class=\"{ tall }\" :style=\"{ width: `${100 - n * 7}%` }\" />\n </div>\n</template>\n"],"names":["_openBlock","_createElementBlock","_hoisted_1","_Fragment","_renderList","__props","n","_normalizeClass"],"mappings":"2PAaEA,EAAA,EAAAC,EAEM,MAFNC,EAEM,QADJD,EAAuGE,EAAA,KAAAC,EAAtFC,EAAA,KAALC,QAAZL,EAAuG,MAAA,CAA/E,IAAKK,EAAG,MAAKC,EAAA,CAAC,OAAM,CAAA,KAAWF,EAAA,IAAA,CAAI,CAAA,EAAK,sBAAyBC,EAAC,CAAA,GAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"SkeletonList.vue_vue_type_script_setup_true_lang-Veni2uNM.js","sources":["../../src/components/SkeletonList.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A loading placeholder shaped like the thing that is coming.\n *\n * Deliberately not a spinner on an empty page: a spinner says \"wait\" and nothing else, while a\n * skeleton says what will be there and stops the layout jumping when it arrives. It also makes an\n * empty result visibly different from a slow one, which on this page is the difference between\n * \"nothing is deployed\" and \"the API is not answering\".\n */\nwithDefaults(defineProps<{ rows?: number; tall?: boolean }>(), { rows: 3, tall: false });\n</script>\n\n<template>\n <div role=\"status\" aria-live=\"polite\" aria-label=\"loading\">\n <div v-for=\"n in rows\" :key=\"n\" class=\"skel\" :class=\"{ tall }\" :style=\"{ width: `${100 - n * 7}%` }\" />\n </div>\n</template>\n"],"names":["_openBlock","_createElementBlock","_hoisted_1","_Fragment","_renderList","__props","n","_normalizeClass"],"mappings":"2PAaEA,EAAA,EAAAC,EAEM,MAFNC,EAEM,QADJD,EAAuGE,EAAA,KAAAC,EAAtFC,EAAA,KAALC,QAAZL,EAAuG,MAAA,CAA/E,IAAKK,EAAG,MAAKC,EAAA,CAAC,OAAM,CAAA,KAAWF,EAAA,IAAA,CAAI,CAAA,EAAK,sBAAyBC,EAAC,CAAA,GAAA,CAAA,CAAA"}
@@ -1,2 +1,2 @@
1
- import{d as R,N,A as V,J as z,c as n,a as s,e as c,w as d,t as o,E as B,u as h,M as D,g as m,z as b,F as g,f as l,_ as A,r as I,R as $,j as v,k as L,l as U,o as t,$ as E,p as S,C as j}from"./index-IvJmpI3b.js";import{_ as q}from"./SkeletonList.vue_vue_type_script_setup_true_lang-CUZB1sxf.js";import{_ as F}from"./ErrorNote.vue_vue_type_script_setup_true_lang-DrinGQ_J.js";const T={class:"page-head"},H={class:"mute",style:{"font-size":"var(--t-sm)"}},J={style:{"font-size":"var(--t-xl)"}},M={class:"sub"},P={key:0},W={key:1},G={key:2},K={key:3,class:"mute"},O={key:1,class:"panel"},Q={class:"banner failed"},X={class:"panel"},Y={key:1,class:"kvlist"},Z={class:"k"},ee={class:"v"},se={key:0},te={key:1,class:"mute"},ne={class:"v"},ae={key:1,class:"mute"},oe={class:"v"},le={class:"v"},ie={key:0,class:"panel"},de={key:0,class:"banner plain"},re={key:1,class:"code"},ue={key:2,class:"mute"},ve=R({__name:"SpecDetailView",props:{name:{}},setup(y){const k=y,a=v(null),r=v(!0),u=v(""),p=v(!1);async function w(){r.value=!0,p.value=!1;const i=await S.getAuthed(`/api/specs/${encodeURIComponent(k.name)}`);if(r.value=!1,i.status===404){p.value=!0;return}if(!i.ok){u.value=j(i,"load this spec");return}u.value="",a.value=i.body}N(()=>k.name,w,{immediate:!0}),N(()=>E.token,w),V.deploymentsLoaded||z();const C=L(()=>V.deployments.filter(i=>i.specName===k.name));return(i,e)=>{var x;const f=U("RouterLink");return t(),n("div",null,[s("div",T,[s("div",null,[s("div",H,[c(f,{to:"/specs"},{default:d(()=>[...e[0]||(e[0]=[l("← specs",-1)])]),_:1})]),s("h1",J,o(y.name),1),s("div",M,[(x=a.value)!=null&&x.description?(t(),n("span",P,o(a.value.description),1)):p.value?(t(),n("span",W,"not found")):r.value?(t(),n("span",G,"loading…")):(t(),n("span",K,"no description"))])]),e[1]||(e[1]=s("span",{class:"grow"},null,-1)),a.value?(t(),n("span",{key:0,class:B(["badge",a.value.kind])},o(h(D)(a.value.kind)),3)):m("",!0)]),u.value?(t(),b(F,{key:0,text:u.value,title:"Could not load this spec."},null,8,["text"])):m("",!0),p.value?(t(),n("section",O,[s("div",Q,[s("b",null,"No spec named “"+o(y.name)+"”.",1),e[2]||(e[2]=s("p",null,"It may have been deleted, or this is an older link.",-1))])])):(t(),n(g,{key:2},[s("section",X,[r.value?(t(),b(q,{key:0,rows:4})):a.value?(t(),n("ul",Y,[s("li",null,[s("span",Z,[e[4]||(e[4]=l(" Needs ",-1)),c(A,{label:"what needs means"},{default:d(()=>[...e[3]||(e[3]=[l(" Variables the spec uses but does not set. Every deployment referencing it supplies these, which is how one spec serves many stacks — and a missing one is refused by name rather than filled in blank. ",-1)])]),_:1})]),s("span",ee,[a.value.requiredVars.length?(t(),n("b",se,o(a.value.requiredVars.join(", ")),1)):(t(),n("span",te,"nothing — every value is fixed by the spec"))])]),s("li",null,[e[6]||(e[6]=s("span",{class:"k"},"Used by",-1)),s("span",ne,[C.value.length?(t(),n(g,{key:0},[(t(!0),n(g,null,I(C.value,_=>(t(),b(f,{key:_.id,to:`/deployments/${encodeURIComponent(_.id)}`,style:{"margin-right":"10px"}},{default:d(()=>[l(o(_.id),1)]),_:2},1032,["to"]))),128)),c(A,{label:"why this matters"},{default:d(()=>[...e[5]||(e[5]=[l(" Deleting a spec while a deployment still references it is refused: that deployment could no longer be resolved, and one that cannot be resolved can never be torn down. ",-1)])]),_:1})],64)):(t(),n("span",ae,"no deployments reference it"))])]),s("li",null,[e[7]||(e[7]=s("span",{class:"k"},"Created",-1)),s("span",oe,o(h($)(a.value.createdAt)),1)]),s("li",null,[e[8]||(e[8]=s("span",{class:"k"},"Updated",-1)),s("span",le,o(h($)(a.value.updatedAt)),1)])])):m("",!0)]),a.value?(t(),n("section",ie,[e[13]||(e[13]=s("div",{class:"phead"},[s("h2",{class:"section"},"Source")],-1)),a.value.sourceWithheld?(t(),n("div",de,[e[12]||(e[12]=s("b",null,"Hidden without an access token.",-1)),s("p",null,[e[10]||(e[10]=l(" A spec's hooks are shell commands, and they often carry a password or an API token inline — so the server does not send the file to an unauthenticated reader. ",-1)),c(f,{to:"/settings"},{default:d(()=>[...e[9]||(e[9]=[l("Add your token",-1)])]),_:1}),e[11]||(e[11]=l(" to see it. ",-1))])])):a.value.source?(t(),n("pre",re,o(a.value.source),1)):(t(),n("p",ue,"The server returned no source for this spec."))])):m("",!0)],64))])}}});export{ve as default};
2
- //# sourceMappingURL=SpecDetailView-CAPlEmSg.js.map
1
+ import{d as R,N,A as V,J as z,c as n,a as s,e as c,w as d,t as o,E as B,u as h,M as D,g as m,z as b,F as g,f as l,_ as A,r as I,R as $,j as v,k as L,l as U,o as t,$ as E,p as S,C as j}from"./index-ChQCta5r.js";import{_ as q}from"./SkeletonList.vue_vue_type_script_setup_true_lang-Veni2uNM.js";import{_ as F}from"./ErrorNote.vue_vue_type_script_setup_true_lang-BaTXNX-q.js";const T={class:"page-head"},H={class:"mute",style:{"font-size":"var(--t-sm)"}},J={style:{"font-size":"var(--t-xl)"}},M={class:"sub"},P={key:0},W={key:1},G={key:2},K={key:3,class:"mute"},O={key:1,class:"panel"},Q={class:"banner failed"},X={class:"panel"},Y={key:1,class:"kvlist"},Z={class:"k"},ee={class:"v"},se={key:0},te={key:1,class:"mute"},ne={class:"v"},ae={key:1,class:"mute"},oe={class:"v"},le={class:"v"},ie={key:0,class:"panel"},de={key:0,class:"banner plain"},re={key:1,class:"code"},ue={key:2,class:"mute"},ve=R({__name:"SpecDetailView",props:{name:{}},setup(y){const k=y,a=v(null),r=v(!0),u=v(""),p=v(!1);async function w(){r.value=!0,p.value=!1;const i=await S.getAuthed(`/api/specs/${encodeURIComponent(k.name)}`);if(r.value=!1,i.status===404){p.value=!0;return}if(!i.ok){u.value=j(i,"load this spec");return}u.value="",a.value=i.body}N(()=>k.name,w,{immediate:!0}),N(()=>E.token,w),V.deploymentsLoaded||z();const C=L(()=>V.deployments.filter(i=>i.specName===k.name));return(i,e)=>{var x;const f=U("RouterLink");return t(),n("div",null,[s("div",T,[s("div",null,[s("div",H,[c(f,{to:"/specs"},{default:d(()=>[...e[0]||(e[0]=[l("← specs",-1)])]),_:1})]),s("h1",J,o(y.name),1),s("div",M,[(x=a.value)!=null&&x.description?(t(),n("span",P,o(a.value.description),1)):p.value?(t(),n("span",W,"not found")):r.value?(t(),n("span",G,"loading…")):(t(),n("span",K,"no description"))])]),e[1]||(e[1]=s("span",{class:"grow"},null,-1)),a.value?(t(),n("span",{key:0,class:B(["badge",a.value.kind])},o(h(D)(a.value.kind)),3)):m("",!0)]),u.value?(t(),b(F,{key:0,text:u.value,title:"Could not load this spec."},null,8,["text"])):m("",!0),p.value?(t(),n("section",O,[s("div",Q,[s("b",null,"No spec named “"+o(y.name)+"”.",1),e[2]||(e[2]=s("p",null,"It may have been deleted, or this is an older link.",-1))])])):(t(),n(g,{key:2},[s("section",X,[r.value?(t(),b(q,{key:0,rows:4})):a.value?(t(),n("ul",Y,[s("li",null,[s("span",Z,[e[4]||(e[4]=l(" Needs ",-1)),c(A,{label:"what needs means"},{default:d(()=>[...e[3]||(e[3]=[l(" Variables the spec uses but does not set. Every deployment referencing it supplies these, which is how one spec serves many stacks — and a missing one is refused by name rather than filled in blank. ",-1)])]),_:1})]),s("span",ee,[a.value.requiredVars.length?(t(),n("b",se,o(a.value.requiredVars.join(", ")),1)):(t(),n("span",te,"nothing — every value is fixed by the spec"))])]),s("li",null,[e[6]||(e[6]=s("span",{class:"k"},"Used by",-1)),s("span",ne,[C.value.length?(t(),n(g,{key:0},[(t(!0),n(g,null,I(C.value,_=>(t(),b(f,{key:_.id,to:`/deployments/${encodeURIComponent(_.id)}`,style:{"margin-right":"10px"}},{default:d(()=>[l(o(_.id),1)]),_:2},1032,["to"]))),128)),c(A,{label:"why this matters"},{default:d(()=>[...e[5]||(e[5]=[l(" Deleting a spec while a deployment still references it is refused: that deployment could no longer be resolved, and one that cannot be resolved can never be torn down. ",-1)])]),_:1})],64)):(t(),n("span",ae,"no deployments reference it"))])]),s("li",null,[e[7]||(e[7]=s("span",{class:"k"},"Created",-1)),s("span",oe,o(h($)(a.value.createdAt)),1)]),s("li",null,[e[8]||(e[8]=s("span",{class:"k"},"Updated",-1)),s("span",le,o(h($)(a.value.updatedAt)),1)])])):m("",!0)]),a.value?(t(),n("section",ie,[e[13]||(e[13]=s("div",{class:"phead"},[s("h2",{class:"section"},"Source")],-1)),a.value.sourceWithheld?(t(),n("div",de,[e[12]||(e[12]=s("b",null,"Hidden without an access token.",-1)),s("p",null,[e[10]||(e[10]=l(" A spec's hooks are shell commands, and they often carry a password or an API token inline — so the server does not send the file to an unauthenticated reader. ",-1)),c(f,{to:"/settings"},{default:d(()=>[...e[9]||(e[9]=[l("Add your token",-1)])]),_:1}),e[11]||(e[11]=l(" to see it. ",-1))])])):a.value.source?(t(),n("pre",re,o(a.value.source),1)):(t(),n("p",ue,"The server returned no source for this spec."))])):m("",!0)],64))])}}});export{ve as default};
2
+ //# sourceMappingURL=SpecDetailView-CYTsg3dA.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SpecDetailView-CAPlEmSg.js","sources":["../../src/views/SpecDetailView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * One stored spec: what it needs, who uses it, and its source.\n *\n * THE SOURCE IS A RESTRICTED READ. Everything else on this API can be read without a token, but a\n * spec's hook bodies are shell strings that routinely carry a credential inline, so the server sends\n * `source` only to an authenticated request and sets `sourceWithheld` otherwise. That is why this\n * one view uses `getAuthed`, and why \"no token\" renders an explanation rather than an empty editor —\n * a blank box would read as an empty spec, which is a different and much more alarming fact.\n */\nimport { computed, ref, watch } from 'vue';\nimport { api, problem } from '../api/client';\nimport type { SpecDetail } from '../api/types';\nimport { state, loadDeployments } from '../composables/useControlPlane';\nimport { settings } from '../composables/useSettings';\nimport { sentence, stamp } from '../composables/useFormat';\nimport SkeletonList from '../components/SkeletonList.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\nimport InfoHint from '../components/InfoHint.vue';\n\nconst props = defineProps<{ name: string }>();\n\nconst spec = ref<SpecDetail | null>(null);\nconst loading = ref(true);\nconst error = ref('');\nconst missing = ref(false);\n\nasync function load(): Promise<void> {\n loading.value = true;\n missing.value = false;\n const r = await api.getAuthed<SpecDetail>(`/api/specs/${encodeURIComponent(props.name)}`);\n loading.value = false;\n if (r.status === 404) {\n missing.value = true;\n return;\n }\n if (!r.ok) {\n error.value = problem(r, 'load this spec');\n return;\n }\n error.value = '';\n spec.value = r.body;\n}\n\nwatch(() => props.name, load, { immediate: true });\n// Re-fetch when a token is pasted: the same URL returns strictly more with one.\nwatch(() => settings.token, load);\n\nif (!state.deploymentsLoaded) void loadDeployments();\n\n/** Deployments that would become unresolvable if this spec were deleted. */\nconst users = computed(() => state.deployments.filter((d) => d.specName === props.name));\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <div class=\"mute\" style=\"font-size: var(--t-sm)\">\n <RouterLink to=\"/specs\">← specs</RouterLink>\n </div>\n <h1 style=\"font-size: var(--t-xl)\">{{ name }}</h1>\n <div class=\"sub\">\n <span v-if=\"spec?.description\">{{ spec.description }}</span>\n <span v-else-if=\"missing\">not found</span>\n <span v-else-if=\"loading\">loading…</span>\n <span v-else class=\"mute\">no description</span>\n </div>\n </div>\n <span class=\"grow\" />\n <span v-if=\"spec\" class=\"badge\" :class=\"spec.kind\">{{ sentence(spec.kind) }}</span>\n </div>\n\n <ErrorNote v-if=\"error\" :text=\"error\" title=\"Could not load this spec.\" />\n\n <section v-if=\"missing\" class=\"panel\">\n <div class=\"banner failed\">\n <b>No spec named “{{ name }}”.</b>\n <p>It may have been deleted, or this is an older link.</p>\n </div>\n </section>\n\n <template v-else>\n <section class=\"panel\">\n <SkeletonList v-if=\"loading\" :rows=\"4\" />\n <ul v-else-if=\"spec\" class=\"kvlist\">\n <li>\n <span class=\"k\">\n Needs\n <InfoHint label=\"what needs means\">\n Variables the spec uses but does not set. Every deployment referencing it supplies\n these, which is how one spec serves many stacks — and a missing one is refused by\n name rather than filled in blank.\n </InfoHint>\n </span>\n <span class=\"v\">\n <b v-if=\"spec.requiredVars.length\">{{ spec.requiredVars.join(', ') }}</b>\n <span v-else class=\"mute\">nothing — every value is fixed by the spec</span>\n </span>\n </li>\n <li>\n <span class=\"k\">Used by</span>\n <span class=\"v\">\n <template v-if=\"users.length\">\n <RouterLink\n v-for=\"d in users\"\n :key=\"d.id\"\n :to=\"`/deployments/${encodeURIComponent(d.id)}`\"\n style=\"margin-right: 10px\"\n >{{ d.id }}</RouterLink\n >\n <InfoHint label=\"why this matters\">\n Deleting a spec while a deployment still references it is refused: that deployment\n could no longer be resolved, and one that cannot be resolved can never be torn\n down.\n </InfoHint>\n </template>\n <span v-else class=\"mute\">no deployments reference it</span>\n </span>\n </li>\n <li><span class=\"k\">Created</span><span class=\"v\">{{ stamp(spec.createdAt) }}</span></li>\n <li><span class=\"k\">Updated</span><span class=\"v\">{{ stamp(spec.updatedAt) }}</span></li>\n </ul>\n </section>\n\n <section v-if=\"spec\" class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Source</h2>\n </div>\n\n <!--\n Withheld, not empty. The server never sent the source, so there is nothing here to reveal —\n the same reasoning as the masked variables: an affordance that promises plaintext the page\n does not have would be a lie.\n -->\n <div v-if=\"spec.sourceWithheld\" class=\"banner plain\">\n <b>Hidden without an access token.</b>\n <p>\n A spec's hooks are shell commands, and they often carry a password or an API token\n inline — so the server does not send the file to an unauthenticated reader.\n <RouterLink to=\"/settings\">Add your token</RouterLink> to see it.\n </p>\n </div>\n <pre v-else-if=\"spec.source\" class=\"code\">{{ spec.source }}</pre>\n <p v-else class=\"mute\">The server returned no source for this spec.</p>\n </section>\n </template>\n </div>\n</template>\n"],"names":["props","__props","spec","ref","loading","error","missing","load","r","api","problem","watch","settings","state","loadDeployments","users","computed","d","_createElementBlock","_createElementVNode","_hoisted_1","_hoisted_2","_createVNode","_component_RouterLink","_cache","_hoisted_3","_toDisplayString","_hoisted_4","_a","_hoisted_5","_openBlock","_hoisted_8","_normalizeClass","_unref","sentence","_createBlock","ErrorNote","_hoisted_9","_hoisted_10","_Fragment","_hoisted_11","SkeletonList","_hoisted_12","_hoisted_13","InfoHint","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_renderList","_createTextVNode","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24"],"mappings":"i7BAoBA,MAAMA,EAAQC,EAERC,EAAOC,EAAuB,IAAI,EAClCC,EAAUD,EAAI,EAAI,EAClBE,EAAQF,EAAI,EAAE,EACdG,EAAUH,EAAI,EAAK,EAEzB,eAAeI,GAAsB,CACnCH,EAAQ,MAAQ,GAChBE,EAAQ,MAAQ,GAChB,MAAME,EAAI,MAAMC,EAAI,UAAsB,cAAc,mBAAmBT,EAAM,IAAI,CAAC,EAAE,EAExF,GADAI,EAAQ,MAAQ,GACZI,EAAE,SAAW,IAAK,CACpBF,EAAQ,MAAQ,GAChB,MACF,CACA,GAAI,CAACE,EAAE,GAAI,CACTH,EAAM,MAAQK,EAAQF,EAAG,gBAAgB,EACzC,MACF,CACAH,EAAM,MAAQ,GACdH,EAAK,MAAQM,EAAE,IACjB,CAEAG,EAAM,IAAMX,EAAM,KAAMO,EAAM,CAAE,UAAW,GAAM,EAEjDI,EAAM,IAAMC,EAAS,MAAOL,CAAI,EAE3BM,EAAM,mBAAwBC,EAAA,EAGnC,MAAMC,EAAQC,EAAS,IAAMH,EAAM,YAAY,OAAQI,GAAMA,EAAE,WAAajB,EAAM,IAAI,CAAC,yDAIrFkB,EA4FM,MAAA,KAAA,CA3FJC,EAeM,MAfNC,EAeM,CAdJD,EAWM,MAAA,KAAA,CAVJA,EAEM,MAFNE,EAEM,CADJC,E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,EAAA,CAAA,CAAA,GACzEiB,EAAyF,KAAA,KAAA,CAArFK,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAL,EAA8B,OAAA,CAAxB,MAAM,GAAA,EAAI,UAAO,EAAA,GAAOA,EAAkD,OAAlDkC,GAAkD3B,EAA/BO,KAAM/B,EAAA,MAAK,SAAS,CAAA,EAAA,CAAA,CAAA,iBAI9DA,EAAA,OAAf4B,EAAA,EAAAZ,EAoBU,UApBVoC,GAoBU,eAnBRnC,EAEM,MAAA,CAFD,MAAM,SAAO,CAChBA,EAA+B,KAAA,CAA3B,MAAM,SAAA,EAAU,QAAM,CAAA,OAQjBjB,EAAA,MAAK,gBAAhB4B,IAAAZ,EAOM,MAPNqC,GAOM,CANJ/B,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAL,EAAsC,SAAnC,kCAA+B,EAAA,GAClCA,EAII,IAAA,KAAA,iBAJD,mKAGD,EAAA,GAAAG,EAAsDC,EAAA,CAA1C,GAAG,aAAW,WAAC,IAAc,CAAA,GAAAC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAAd,iBAAc,EAAA,CAAA,2BAAa,eACxD,EAAA,EAAA,MAEctB,EAAA,MAAK,QAArB4B,EAAA,EAAAZ,EAAiE,MAAjEsC,GAAiE9B,EAApBxB,EAAA,MAAK,MAAM,EAAA,CAAA,QACxDgB,EAAuE,IAAvEuC,GAAuB,8CAA4C,EAAA"}
1
+ {"version":3,"file":"SpecDetailView-CYTsg3dA.js","sources":["../../src/views/SpecDetailView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * One stored spec: what it needs, who uses it, and its source.\n *\n * THE SOURCE IS A RESTRICTED READ. Everything else on this API can be read without a token, but a\n * spec's hook bodies are shell strings that routinely carry a credential inline, so the server sends\n * `source` only to an authenticated request and sets `sourceWithheld` otherwise. That is why this\n * one view uses `getAuthed`, and why \"no token\" renders an explanation rather than an empty editor —\n * a blank box would read as an empty spec, which is a different and much more alarming fact.\n */\nimport { computed, ref, watch } from 'vue';\nimport { api, problem } from '../api/client';\nimport type { SpecDetail } from '../api/types';\nimport { state, loadDeployments } from '../composables/useControlPlane';\nimport { settings } from '../composables/useSettings';\nimport { sentence, stamp } from '../composables/useFormat';\nimport SkeletonList from '../components/SkeletonList.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\nimport InfoHint from '../components/InfoHint.vue';\n\nconst props = defineProps<{ name: string }>();\n\nconst spec = ref<SpecDetail | null>(null);\nconst loading = ref(true);\nconst error = ref('');\nconst missing = ref(false);\n\nasync function load(): Promise<void> {\n loading.value = true;\n missing.value = false;\n const r = await api.getAuthed<SpecDetail>(`/api/specs/${encodeURIComponent(props.name)}`);\n loading.value = false;\n if (r.status === 404) {\n missing.value = true;\n return;\n }\n if (!r.ok) {\n error.value = problem(r, 'load this spec');\n return;\n }\n error.value = '';\n spec.value = r.body;\n}\n\nwatch(() => props.name, load, { immediate: true });\n// Re-fetch when a token is pasted: the same URL returns strictly more with one.\nwatch(() => settings.token, load);\n\nif (!state.deploymentsLoaded) void loadDeployments();\n\n/** Deployments that would become unresolvable if this spec were deleted. */\nconst users = computed(() => state.deployments.filter((d) => d.specName === props.name));\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <div class=\"mute\" style=\"font-size: var(--t-sm)\">\n <RouterLink to=\"/specs\">← specs</RouterLink>\n </div>\n <h1 style=\"font-size: var(--t-xl)\">{{ name }}</h1>\n <div class=\"sub\">\n <span v-if=\"spec?.description\">{{ spec.description }}</span>\n <span v-else-if=\"missing\">not found</span>\n <span v-else-if=\"loading\">loading…</span>\n <span v-else class=\"mute\">no description</span>\n </div>\n </div>\n <span class=\"grow\" />\n <span v-if=\"spec\" class=\"badge\" :class=\"spec.kind\">{{ sentence(spec.kind) }}</span>\n </div>\n\n <ErrorNote v-if=\"error\" :text=\"error\" title=\"Could not load this spec.\" />\n\n <section v-if=\"missing\" class=\"panel\">\n <div class=\"banner failed\">\n <b>No spec named “{{ name }}”.</b>\n <p>It may have been deleted, or this is an older link.</p>\n </div>\n </section>\n\n <template v-else>\n <section class=\"panel\">\n <SkeletonList v-if=\"loading\" :rows=\"4\" />\n <ul v-else-if=\"spec\" class=\"kvlist\">\n <li>\n <span class=\"k\">\n Needs\n <InfoHint label=\"what needs means\">\n Variables the spec uses but does not set. Every deployment referencing it supplies\n these, which is how one spec serves many stacks — and a missing one is refused by\n name rather than filled in blank.\n </InfoHint>\n </span>\n <span class=\"v\">\n <b v-if=\"spec.requiredVars.length\">{{ spec.requiredVars.join(', ') }}</b>\n <span v-else class=\"mute\">nothing — every value is fixed by the spec</span>\n </span>\n </li>\n <li>\n <span class=\"k\">Used by</span>\n <span class=\"v\">\n <template v-if=\"users.length\">\n <RouterLink\n v-for=\"d in users\"\n :key=\"d.id\"\n :to=\"`/deployments/${encodeURIComponent(d.id)}`\"\n style=\"margin-right: 10px\"\n >{{ d.id }}</RouterLink\n >\n <InfoHint label=\"why this matters\">\n Deleting a spec while a deployment still references it is refused: that deployment\n could no longer be resolved, and one that cannot be resolved can never be torn\n down.\n </InfoHint>\n </template>\n <span v-else class=\"mute\">no deployments reference it</span>\n </span>\n </li>\n <li><span class=\"k\">Created</span><span class=\"v\">{{ stamp(spec.createdAt) }}</span></li>\n <li><span class=\"k\">Updated</span><span class=\"v\">{{ stamp(spec.updatedAt) }}</span></li>\n </ul>\n </section>\n\n <section v-if=\"spec\" class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Source</h2>\n </div>\n\n <!--\n Withheld, not empty. The server never sent the source, so there is nothing here to reveal —\n the same reasoning as the masked variables: an affordance that promises plaintext the page\n does not have would be a lie.\n -->\n <div v-if=\"spec.sourceWithheld\" class=\"banner plain\">\n <b>Hidden without an access token.</b>\n <p>\n A spec's hooks are shell commands, and they often carry a password or an API token\n inline — so the server does not send the file to an unauthenticated reader.\n <RouterLink to=\"/settings\">Add your token</RouterLink> to see it.\n </p>\n </div>\n <pre v-else-if=\"spec.source\" class=\"code\">{{ spec.source }}</pre>\n <p v-else class=\"mute\">The server returned no source for this spec.</p>\n </section>\n </template>\n </div>\n</template>\n"],"names":["props","__props","spec","ref","loading","error","missing","load","r","api","problem","watch","settings","state","loadDeployments","users","computed","d","_createElementBlock","_createElementVNode","_hoisted_1","_hoisted_2","_createVNode","_component_RouterLink","_cache","_hoisted_3","_toDisplayString","_hoisted_4","_a","_hoisted_5","_openBlock","_hoisted_8","_normalizeClass","_unref","sentence","_createBlock","ErrorNote","_hoisted_9","_hoisted_10","_Fragment","_hoisted_11","SkeletonList","_hoisted_12","_hoisted_13","InfoHint","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_renderList","_createTextVNode","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24"],"mappings":"i7BAoBA,MAAMA,EAAQC,EAERC,EAAOC,EAAuB,IAAI,EAClCC,EAAUD,EAAI,EAAI,EAClBE,EAAQF,EAAI,EAAE,EACdG,EAAUH,EAAI,EAAK,EAEzB,eAAeI,GAAsB,CACnCH,EAAQ,MAAQ,GAChBE,EAAQ,MAAQ,GAChB,MAAME,EAAI,MAAMC,EAAI,UAAsB,cAAc,mBAAmBT,EAAM,IAAI,CAAC,EAAE,EAExF,GADAI,EAAQ,MAAQ,GACZI,EAAE,SAAW,IAAK,CACpBF,EAAQ,MAAQ,GAChB,MACF,CACA,GAAI,CAACE,EAAE,GAAI,CACTH,EAAM,MAAQK,EAAQF,EAAG,gBAAgB,EACzC,MACF,CACAH,EAAM,MAAQ,GACdH,EAAK,MAAQM,EAAE,IACjB,CAEAG,EAAM,IAAMX,EAAM,KAAMO,EAAM,CAAE,UAAW,GAAM,EAEjDI,EAAM,IAAMC,EAAS,MAAOL,CAAI,EAE3BM,EAAM,mBAAwBC,EAAA,EAGnC,MAAMC,EAAQC,EAAS,IAAMH,EAAM,YAAY,OAAQI,GAAMA,EAAE,WAAajB,EAAM,IAAI,CAAC,yDAIrFkB,EA4FM,MAAA,KAAA,C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UAAO,EAAA,GAAOA,EAAkD,OAAlDiC,GAAkD1B,EAA/BO,KAAM/B,EAAA,MAAK,SAAS,CAAA,EAAA,CAAA,CAAA,GACzEiB,EAAyF,KAAA,KAAA,CAArFK,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAL,EAA8B,OAAA,CAAxB,MAAM,GAAA,EAAI,UAAO,EAAA,GAAOA,EAAkD,OAAlDkC,GAAkD3B,EAA/BO,KAAM/B,EAAA,MAAK,SAAS,CAAA,EAAA,CAAA,CAAA,iBAI9DA,EAAA,OAAf4B,EAAA,EAAAZ,EAoBU,UApBVoC,GAoBU,eAnBRnC,EAEM,MAAA,CAFD,MAAM,SAAO,CAChBA,EAA+B,KAAA,CAA3B,MAAM,SAAA,EAAU,QAAM,CAAA,OAQjBjB,EAAA,MAAK,gBAAhB4B,IAAAZ,EAOM,MAPNqC,GAOM,CANJ/B,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAL,EAAsC,SAAnC,kCAA+B,EAAA,GAClCA,EAII,IAAA,KAAA,iBAJD,mKAGD,EAAA,GAAAG,EAAsDC,EAAA,CAA1C,GAAG,aAAW,WAAC,IAAc,CAAA,GAAAC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAAd,iBAAc,EAAA,CAAA,2BAAa,eACxD,EAAA,EAAA,MAEctB,EAAA,MAAK,QAArB4B,EAAA,EAAAZ,EAAiE,MAAjEsC,GAAiE9B,EAApBxB,EAAA,MAAK,MAAM,EAAA,CAAA,QACxDgB,EAAuE,IAAvEuC,GAAuB,8CAA4C,EAAA"}
@@ -1,2 +1,2 @@
1
- import{d as q,A as k,J as L,c as a,a as t,f as l,e as i,w as y,_ as C,z as x,g as f,F as N,i as U,v as T,r as $,t as r,j as p,p as E,C as z,k as V,l as B,o as s,D,E as A,u as M,M as R}from"./index-IvJmpI3b.js";import{_ as j}from"./SkeletonList.vue_vue_type_script_setup_true_lang-CUZB1sxf.js";import{_ as F}from"./ErrorNote.vue_vue_type_script_setup_true_lang-DrinGQ_J.js";import{_ as I}from"./RelativeTime.vue_vue_type_script_setup_true_lang-surhYF0H.js";import{E as P}from"./EquivalentCommand-Bs9vCxV-.js";import{_ as J}from"./RefreshButton.vue_vue_type_script_setup_true_lang-D8LrAn-h.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const K={class:"page-head"},W={class:"sub"},G={key:1,class:"panel"},H={key:2,class:"panel"},O={class:"field",style:{"max-width":"320px","margin-bottom":"var(--s4)"}},Q={class:"cards","data-testid":"specs.list"},X={class:"stagger"},Y={class:"name","data-label":"name"},Z={key:0,class:"mute",style:{"font-size":"var(--t-sm)"}},ee={"data-label":"kind"},te={"data-label":"needs"},se={key:0},ne={key:1,class:"mute"},oe={"data-label":"used by"},ae={key:0},le={key:1,class:"mute"},ie={class:"dim nowrap","data-label":"updated"},re={key:0},de={colspan:"5",class:"mute"},pe={key:2,class:"banner plain"},_e=q({__name:"SpecsView",setup(ue){const u=p([]),v=p(!1),m=p(""),h=p(!1),c=p("");async function b(){const o=await E.get("/api/specs");if(v.value=!0,o.status===404){h.value=!0;return}if(!o.ok){m.value=z(o,"load specs");return}m.value="",u.value=o.body.specs??[]}b(),k.deploymentsLoaded||L();const _=V(()=>{const o=new Map;for(const e of k.deployments){if(!e.specName)continue;const d=o.get(e.specName)??[];d.push(e.id),o.set(e.specName,d)}return o}),w=V(()=>{const o=c.value.trim().toLowerCase();return o?u.value.filter(e=>e.name.toLowerCase().includes(o)||(e.description??"").toLowerCase().includes(o)):u.value});return(o,e)=>{const d=B("RouterLink");return s(),a("div",null,[t("div",K,[t("div",null,[e[3]||(e[3]=t("h1",null,"Specs",-1)),t("div",W,[e[2]||(e[2]=l(" Stored once, used by any number of deployments ",-1)),i(C,{label:"why store a spec"},{default:y(()=>[...e[1]||(e[1]=[l(" Without this, every deployment carries its own copy — 50 open pull requests meant 50 identical files, and fixing a teardown step meant re-submitting it 50 times. ",-1)])]),_:1})])]),e[4]||(e[4]=t("span",{class:"grow"},null,-1)),i(J,{run:b})]),m.value?(s(),x(F,{key:0,text:m.value,title:"Could not load the specs."},null,8,["text"])):f("",!0),h.value?(s(),a("section",G,[...e[5]||(e[5]=[t("div",{class:"banner plain"},[t("b",null,"This server has no stored specs."),t("p",null," It is an older build of pstack — every deployment carries its own copy of its spec, which still works. Upgrade the host to store specs and reference them by name. ")],-1)])])):(s(),a("section",H,[v.value?u.value.length?(s(),a(N,{key:1},[t("div",O,[e[6]||(e[6]=t("label",{for:"q"},"Search",-1)),U(t("input",{id:"q","onUpdate:modelValue":e[0]||(e[0]=n=>c.value=n),type:"search",placeholder:"name or description"},null,512),[[T,c.value]])]),t("table",Q,[t("thead",null,[t("tr",null,[e[9]||(e[9]=t("th",null,"Name",-1)),e[10]||(e[10]=t("th",null,"Kind",-1)),t("th",null,[e[8]||(e[8]=l(" needs ",-1)),i(C,{label:"what needs means"},{default:y(()=>[...e[7]||(e[7]=[l(" Variables the spec uses but does not set. Every deployment referencing it must supply these, which is how one spec serves many stacks. ",-1)])]),_:1})]),e[11]||(e[11]=t("th",null,"Used by",-1)),e[12]||(e[12]=t("th",null,"Updated",-1))])]),t("tbody",X,[(s(!0),a(N,null,$(w.value,(n,S)=>{var g;return s(),a("tr",{key:n.name,style:D({"--i":S})},[t("td",Y,[i(d,{to:`/specs/${encodeURIComponent(n.name)}`},{default:y(()=>[l(r(n.name),1)]),_:2},1032,["to"]),n.description?(s(),a("div",Z,r(n.description),1)):f("",!0)]),t("td",ee,[t("span",{class:A(["badge",n.kind])},r(M(R)(n.kind)),3)]),t("td",te,[n.requiredVars.length?(s(),a("span",se,r(n.requiredVars.join(", ")),1)):(s(),a("span",ne,"nothing"))]),t("td",oe,[(g=_.value.get(n.name))!=null&&g.length?(s(),a("span",ae,r(_.value.get(n.name).length)+" deployment(s) ",1)):(s(),a("span",le,"nothing yet"))]),t("td",ie,[i(I,{at:n.updatedAt},null,8,["at"])])],4)}),128)),w.value.length?f("",!0):(s(),a("tr",re,[t("td",de,"No spec matches “"+r(c.value)+"”.",1)]))])])],64)):(s(),a("div",pe,[e[16]||(e[16]=t("b",null,"No specs stored yet.",-1)),t("p",null,[e[14]||(e[14]=l(" A deployment can carry its own spec inline — see ",-1)),i(d,{to:"/submit"},{default:y(()=>[...e[13]||(e[13]=[l("Submit",-1)])]),_:1}),e[15]||(e[15]=l(" — and that is all you need for a one-off. Storing one here pays off when several deployments share it. ",-1))]),e[17]||(e[17]=t("p",{class:"mute"},"This page cannot store one yet — the command below does.",-1)),i(P,{what:"storing a spec",method:"PUT",path:"/api/specs/my-spec",body:{spec:"…the contents of your preview.yml…"},cli:"pstack validate -f preview.yml # then PUT it with the curl above"})])):(s(),x(j,{key:0,rows:3}))]))])}}});export{_e as default};
2
- //# sourceMappingURL=SpecsView-BO0QMGrI.js.map
1
+ import{d as q,A as k,J as L,c as a,a as t,f as l,e as i,w as y,_ as C,z as x,g as f,F as N,i as U,v as T,r as $,t as r,j as p,p as E,C as z,k as V,l as B,o as s,D,E as A,u as M,M as R}from"./index-ChQCta5r.js";import{_ as j}from"./SkeletonList.vue_vue_type_script_setup_true_lang-Veni2uNM.js";import{_ as F}from"./ErrorNote.vue_vue_type_script_setup_true_lang-BaTXNX-q.js";import{_ as I}from"./RelativeTime.vue_vue_type_script_setup_true_lang-DmifGQCq.js";import{E as P}from"./EquivalentCommand-DSNG3Ig1.js";import{_ as J}from"./RefreshButton.vue_vue_type_script_setup_true_lang-zOMuwEGt.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const K={class:"page-head"},W={class:"sub"},G={key:1,class:"panel"},H={key:2,class:"panel"},O={class:"field",style:{"max-width":"320px","margin-bottom":"var(--s4)"}},Q={class:"cards","data-testid":"specs.list"},X={class:"stagger"},Y={class:"name","data-label":"name"},Z={key:0,class:"mute",style:{"font-size":"var(--t-sm)"}},ee={"data-label":"kind"},te={"data-label":"needs"},se={key:0},ne={key:1,class:"mute"},oe={"data-label":"used by"},ae={key:0},le={key:1,class:"mute"},ie={class:"dim nowrap","data-label":"updated"},re={key:0},de={colspan:"5",class:"mute"},pe={key:2,class:"banner plain"},_e=q({__name:"SpecsView",setup(ue){const u=p([]),v=p(!1),m=p(""),h=p(!1),c=p("");async function b(){const o=await E.get("/api/specs");if(v.value=!0,o.status===404){h.value=!0;return}if(!o.ok){m.value=z(o,"load specs");return}m.value="",u.value=o.body.specs??[]}b(),k.deploymentsLoaded||L();const _=V(()=>{const o=new Map;for(const e of k.deployments){if(!e.specName)continue;const d=o.get(e.specName)??[];d.push(e.id),o.set(e.specName,d)}return o}),w=V(()=>{const o=c.value.trim().toLowerCase();return o?u.value.filter(e=>e.name.toLowerCase().includes(o)||(e.description??"").toLowerCase().includes(o)):u.value});return(o,e)=>{const d=B("RouterLink");return s(),a("div",null,[t("div",K,[t("div",null,[e[3]||(e[3]=t("h1",null,"Specs",-1)),t("div",W,[e[2]||(e[2]=l(" Stored once, used by any number of deployments ",-1)),i(C,{label:"why store a spec"},{default:y(()=>[...e[1]||(e[1]=[l(" Without this, every deployment carries its own copy — 50 open pull requests meant 50 identical files, and fixing a teardown step meant re-submitting it 50 times. ",-1)])]),_:1})])]),e[4]||(e[4]=t("span",{class:"grow"},null,-1)),i(J,{run:b})]),m.value?(s(),x(F,{key:0,text:m.value,title:"Could not load the specs."},null,8,["text"])):f("",!0),h.value?(s(),a("section",G,[...e[5]||(e[5]=[t("div",{class:"banner plain"},[t("b",null,"This server has no stored specs."),t("p",null," It is an older build of pstack — every deployment carries its own copy of its spec, which still works. Upgrade the host to store specs and reference them by name. ")],-1)])])):(s(),a("section",H,[v.value?u.value.length?(s(),a(N,{key:1},[t("div",O,[e[6]||(e[6]=t("label",{for:"q"},"Search",-1)),U(t("input",{id:"q","onUpdate:modelValue":e[0]||(e[0]=n=>c.value=n),type:"search",placeholder:"name or description"},null,512),[[T,c.value]])]),t("table",Q,[t("thead",null,[t("tr",null,[e[9]||(e[9]=t("th",null,"Name",-1)),e[10]||(e[10]=t("th",null,"Kind",-1)),t("th",null,[e[8]||(e[8]=l(" needs ",-1)),i(C,{label:"what needs means"},{default:y(()=>[...e[7]||(e[7]=[l(" Variables the spec uses but does not set. Every deployment referencing it must supply these, which is how one spec serves many stacks. ",-1)])]),_:1})]),e[11]||(e[11]=t("th",null,"Used by",-1)),e[12]||(e[12]=t("th",null,"Updated",-1))])]),t("tbody",X,[(s(!0),a(N,null,$(w.value,(n,S)=>{var g;return s(),a("tr",{key:n.name,style:D({"--i":S})},[t("td",Y,[i(d,{to:`/specs/${encodeURIComponent(n.name)}`},{default:y(()=>[l(r(n.name),1)]),_:2},1032,["to"]),n.description?(s(),a("div",Z,r(n.description),1)):f("",!0)]),t("td",ee,[t("span",{class:A(["badge",n.kind])},r(M(R)(n.kind)),3)]),t("td",te,[n.requiredVars.length?(s(),a("span",se,r(n.requiredVars.join(", ")),1)):(s(),a("span",ne,"nothing"))]),t("td",oe,[(g=_.value.get(n.name))!=null&&g.length?(s(),a("span",ae,r(_.value.get(n.name).length)+" deployment(s) ",1)):(s(),a("span",le,"nothing yet"))]),t("td",ie,[i(I,{at:n.updatedAt},null,8,["at"])])],4)}),128)),w.value.length?f("",!0):(s(),a("tr",re,[t("td",de,"No spec matches “"+r(c.value)+"”.",1)]))])])],64)):(s(),a("div",pe,[e[16]||(e[16]=t("b",null,"No specs stored yet.",-1)),t("p",null,[e[14]||(e[14]=l(" A deployment can carry its own spec inline — see ",-1)),i(d,{to:"/submit"},{default:y(()=>[...e[13]||(e[13]=[l("Submit",-1)])]),_:1}),e[15]||(e[15]=l(" — and that is all you need for a one-off. Storing one here pays off when several deployments share it. ",-1))]),e[17]||(e[17]=t("p",{class:"mute"},"This page cannot store one yet — the command below does.",-1)),i(P,{what:"storing a spec",method:"PUT",path:"/api/specs/my-spec",body:{spec:"…the contents of your preview.yml…"},cli:"pstack validate -f preview.yml # then PUT it with the curl above"})])):(s(),x(j,{key:0,rows:3}))]))])}}});export{_e as default};
2
+ //# sourceMappingURL=SpecsView-DioO-zqq.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SpecsView-BO0QMGrI.js","sources":["../../src/views/SpecsView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Stored specs: what is on this host, and who is using each one.\n *\n * The \"used by\" count is computed from the deployments already in shared state rather than asked\n * for: every row carries `specName`, so the join is free. It matters because deleting a spec that\n * deployments still reference is refused — a deployment that cannot resolve its spec can never be\n * torn down — so knowing the count before you try is the difference between a plan and a 409.\n *\n * A server built before named specs answers 404 here. That is a capability difference, not an\n * error, so it gets its own explanation instead of a red banner.\n */\nimport { computed, ref } from 'vue';\nimport { sentence } from '../composables/useFormat';\nimport { api, problem } from '../api/client';\nimport type { SpecMeta, SpecsResponse } from '../api/types';\nimport { state, loadDeployments } from '../composables/useControlPlane';\n\nimport SkeletonList from '../components/SkeletonList.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\nimport InfoHint from '../components/InfoHint.vue';\nimport RelativeTime from '../components/RelativeTime.vue';\nimport EquivalentCommand from '../components/EquivalentCommand.vue';\nimport RefreshButton from '../components/RefreshButton.vue';\n\nconst specs = ref<SpecMeta[]>([]);\nconst loaded = ref(false);\nconst error = ref('');\nconst unsupported = ref(false);\nconst needle = ref('');\n\nasync function load(): Promise<void> {\n const r = await api.get<SpecsResponse>('/api/specs');\n loaded.value = true;\n if (r.status === 404) {\n unsupported.value = true;\n return;\n }\n if (!r.ok) {\n error.value = problem(r, 'load specs');\n return;\n }\n error.value = '';\n specs.value = r.body.specs ?? [];\n}\n\nvoid load();\n// The deployment list is what the \"used by\" column joins against; a deep link straight here may\n// arrive before the shell's poll has filled it.\nif (!state.deploymentsLoaded) void loadDeployments();\n\n/** Deployment ids referencing each spec, by spec name. */\nconst users = computed(() => {\n const m = new Map<string, string[]>();\n for (const d of state.deployments) {\n if (!d.specName) continue;\n const list = m.get(d.specName) ?? [];\n list.push(d.id);\n m.set(d.specName, list);\n }\n return m;\n});\n\nconst shown = computed(() => {\n const q = needle.value.trim().toLowerCase();\n if (!q) return specs.value;\n return specs.value.filter(\n (s) => s.name.toLowerCase().includes(q) || (s.description ?? '').toLowerCase().includes(q),\n );\n});\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>Specs</h1>\n <div class=\"sub\">\n Stored once, used by any number of deployments\n <InfoHint label=\"why store a spec\">\n Without this, every deployment carries its own copy — 50 open pull requests meant 50\n identical files, and fixing a teardown step meant re-submitting it 50 times.\n </InfoHint>\n </div>\n </div>\n <span class=\"grow\" />\n <RefreshButton :run=\"load\" />\n </div>\n\n <ErrorNote v-if=\"error\" :text=\"error\" title=\"Could not load the specs.\" />\n\n <section v-if=\"unsupported\" class=\"panel\">\n <div class=\"banner plain\">\n <b>This server has no stored specs.</b>\n <p>\n It is an older build of pstack — every deployment carries its own copy of its spec, which\n still works. Upgrade the host to store specs and reference them by name.\n </p>\n </div>\n </section>\n\n <section v-else class=\"panel\">\n <SkeletonList v-if=\"!loaded\" :rows=\"3\" />\n\n <template v-else-if=\"specs.length\">\n <div class=\"field\" style=\"max-width: 320px; margin-bottom: var(--s4)\">\n <label for=\"q\">Search</label>\n <input id=\"q\" v-model=\"needle\" type=\"search\" placeholder=\"name or description\" />\n </div>\n\n <table class=\"cards\" data-testid=\"specs.list\">\n <thead>\n <tr>\n <th>Name</th>\n <th>Kind</th>\n <th>\n needs\n <InfoHint label=\"what needs means\">\n Variables the spec uses but does not set. Every deployment referencing it must\n supply these, which is how one spec serves many stacks.\n </InfoHint>\n </th>\n <th>Used by</th>\n <th>Updated</th>\n </tr>\n </thead>\n <tbody class=\"stagger\">\n <tr v-for=\"(s, i) in shown\" :key=\"s.name\" :style=\"{ '--i': i }\">\n <td class=\"name\" data-label=\"name\">\n <RouterLink :to=\"`/specs/${encodeURIComponent(s.name)}`\">{{ s.name }}</RouterLink>\n <div v-if=\"s.description\" class=\"mute\" style=\"font-size: var(--t-sm)\">\n {{ s.description }}\n </div>\n </td>\n <td data-label=\"kind\">\n <span class=\"badge\" :class=\"s.kind\">{{ sentence(s.kind) }}</span>\n </td>\n <td data-label=\"needs\">\n <span v-if=\"s.requiredVars.length\">{{ s.requiredVars.join(', ') }}</span>\n <span v-else class=\"mute\">nothing</span>\n </td>\n <td data-label=\"used by\">\n <span v-if=\"users.get(s.name)?.length\">\n {{ users.get(s.name)!.length }} deployment(s)\n </span>\n <span v-else class=\"mute\">nothing yet</span>\n </td>\n <td class=\"dim nowrap\" data-label=\"updated\"><RelativeTime :at=\"s.updatedAt\" /></td>\n </tr>\n <tr v-if=\"!shown.length\">\n <td colspan=\"5\" class=\"mute\">No spec matches “{{ needle }}”.</td>\n </tr>\n </tbody>\n </table>\n </template>\n\n <!--\n Honest empty state. This page cannot create a spec yet, so pointing at \"New spec\" would be a\n dead end — it names the way that does work instead.\n -->\n <div v-else class=\"banner plain\">\n <b>No specs stored yet.</b>\n <p>\n A deployment can carry its own spec inline — see\n <RouterLink to=\"/submit\">Submit</RouterLink> — and that is all you need for a one-off.\n Storing one here pays off when several deployments share it.\n </p>\n <p class=\"mute\">This page cannot store one yet — the command below does.</p>\n <EquivalentCommand\n what=\"storing a spec\"\n method=\"PUT\"\n path=\"/api/specs/my-spec\"\n :body=\"{ spec: '…the contents of your preview.yml…' }\"\n cli=\"pstack validate -f preview.yml # then PUT it with the curl above\"\n />\n </div>\n </section>\n </div>\n</template>\n"],"names":["specs","ref","loaded","error","unsupported","needle","load","r","api","problem","state","loadDeployments","users","computed","m","d","list","shown","q","s","_createElementBlock","_createElementVNode","_hoisted_1","_cache","_hoisted_2","_createVNode","InfoHint","RefreshButton","_createBlock","ErrorNote","_openBlock","_hoisted_3","_hoisted_4","_Fragment","_hoisted_5","$event","_hoisted_6","_hoisted_7","_renderList","i","_hoisted_8","_component_RouterLink","_createTextVNode","_toDisplayString","_hoisted_9","_hoisted_10","_normalizeClass","_unref","sentence","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_a","_hoisted_15","_hoisted_16","_hoisted_17","RelativeTime","_hoisted_18","_hoisted_19","_hoisted_20","EquivalentCommand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,EAAmF,KAAnFmC,GAAmF,CAAvC/B,EAAkCgC,EAAA,CAAnB,GAAItC,EAAE,SAAA,+BAExDF,EAAA,MAAM,qBAAjBG,EAEK,KAAAsC,GAAA,CADHrC,EAAiE,KAAjEsC,GAA6B,oBAAiBhB,EAAGtC,EAAA,KAAM,EAAG,KAAE,CAAA,CAAA,eAUpEyB,IAAAV,EAeM,MAfNwC,GAeM,CAdJrC,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAA2B,SAAxB,uBAAoB,EAAA,GACvBA,EAII,IAAA,KAAA,iBAJD,qDAED,EAAA,GAAAI,EAA4CgB,EAAA,CAAhC,GAAG,WAAS,WAAC,IAAM,CAAA,GAAAlB,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAAN,SAAM,EAAA,CAAA,2BAAa,2GAE9C,EAAA,EAAA,GACAA,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAA4E,IAAA,CAAzE,MAAM,MAAA,EAAO,2DAAwD,EAAA,GACxEI,EAMEoC,EAAA,CALA,KAAK,iBACL,OAAO,MACP,KAAK,qBACJ,KAAM,CAAA,KAAA,oCAAA,EACP,IAAI,oEAAA,WAvERjC,EAAyCkC,EAAA,OAAX,KAAM,CAAA"}
1
+ {"version":3,"file":"SpecsView-DioO-zqq.js","sources":["../../src/views/SpecsView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Stored specs: what is on this host, and who is using each one.\n *\n * The \"used by\" count is computed from the deployments already in shared state rather than asked\n * for: every row carries `specName`, so the join is free. It matters because deleting a spec that\n * deployments still reference is refused — a deployment that cannot resolve its spec can never be\n * torn down — so knowing the count before you try is the difference between a plan and a 409.\n *\n * A server built before named specs answers 404 here. That is a capability difference, not an\n * error, so it gets its own explanation instead of a red banner.\n */\nimport { computed, ref } from 'vue';\nimport { sentence } from '../composables/useFormat';\nimport { api, problem } from '../api/client';\nimport type { SpecMeta, SpecsResponse } from '../api/types';\nimport { state, loadDeployments } from '../composables/useControlPlane';\n\nimport SkeletonList from '../components/SkeletonList.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\nimport InfoHint from '../components/InfoHint.vue';\nimport RelativeTime from '../components/RelativeTime.vue';\nimport EquivalentCommand from '../components/EquivalentCommand.vue';\nimport RefreshButton from '../components/RefreshButton.vue';\n\nconst specs = ref<SpecMeta[]>([]);\nconst loaded = ref(false);\nconst error = ref('');\nconst unsupported = ref(false);\nconst needle = ref('');\n\nasync function load(): Promise<void> {\n const r = await api.get<SpecsResponse>('/api/specs');\n loaded.value = true;\n if (r.status === 404) {\n unsupported.value = true;\n return;\n }\n if (!r.ok) {\n error.value = problem(r, 'load specs');\n return;\n }\n error.value = '';\n specs.value = r.body.specs ?? [];\n}\n\nvoid load();\n// The deployment list is what the \"used by\" column joins against; a deep link straight here may\n// arrive before the shell's poll has filled it.\nif (!state.deploymentsLoaded) void loadDeployments();\n\n/** Deployment ids referencing each spec, by spec name. */\nconst users = computed(() => {\n const m = new Map<string, string[]>();\n for (const d of state.deployments) {\n if (!d.specName) continue;\n const list = m.get(d.specName) ?? [];\n list.push(d.id);\n m.set(d.specName, list);\n }\n return m;\n});\n\nconst shown = computed(() => {\n const q = needle.value.trim().toLowerCase();\n if (!q) return specs.value;\n return specs.value.filter(\n (s) => s.name.toLowerCase().includes(q) || (s.description ?? '').toLowerCase().includes(q),\n );\n});\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>Specs</h1>\n <div class=\"sub\">\n Stored once, used by any number of deployments\n <InfoHint label=\"why store a spec\">\n Without this, every deployment carries its own copy — 50 open pull requests meant 50\n identical files, and fixing a teardown step meant re-submitting it 50 times.\n </InfoHint>\n </div>\n </div>\n <span class=\"grow\" />\n <RefreshButton :run=\"load\" />\n </div>\n\n <ErrorNote v-if=\"error\" :text=\"error\" title=\"Could not load the specs.\" />\n\n <section v-if=\"unsupported\" class=\"panel\">\n <div class=\"banner plain\">\n <b>This server has no stored specs.</b>\n <p>\n It is an older build of pstack — every deployment carries its own copy of its spec, which\n still works. Upgrade the host to store specs and reference them by name.\n </p>\n </div>\n </section>\n\n <section v-else class=\"panel\">\n <SkeletonList v-if=\"!loaded\" :rows=\"3\" />\n\n <template v-else-if=\"specs.length\">\n <div class=\"field\" style=\"max-width: 320px; margin-bottom: var(--s4)\">\n <label for=\"q\">Search</label>\n <input id=\"q\" v-model=\"needle\" type=\"search\" placeholder=\"name or description\" />\n </div>\n\n <table class=\"cards\" data-testid=\"specs.list\">\n <thead>\n <tr>\n <th>Name</th>\n <th>Kind</th>\n <th>\n needs\n <InfoHint label=\"what needs means\">\n Variables the spec uses but does not set. Every deployment referencing it must\n supply these, which is how one spec serves many stacks.\n </InfoHint>\n </th>\n <th>Used by</th>\n <th>Updated</th>\n </tr>\n </thead>\n <tbody class=\"stagger\">\n <tr v-for=\"(s, i) in shown\" :key=\"s.name\" :style=\"{ '--i': i }\">\n <td class=\"name\" data-label=\"name\">\n <RouterLink :to=\"`/specs/${encodeURIComponent(s.name)}`\">{{ s.name }}</RouterLink>\n <div v-if=\"s.description\" class=\"mute\" style=\"font-size: var(--t-sm)\">\n {{ s.description }}\n </div>\n </td>\n <td data-label=\"kind\">\n <span class=\"badge\" :class=\"s.kind\">{{ sentence(s.kind) }}</span>\n </td>\n <td data-label=\"needs\">\n <span v-if=\"s.requiredVars.length\">{{ s.requiredVars.join(', ') }}</span>\n <span v-else class=\"mute\">nothing</span>\n </td>\n <td data-label=\"used by\">\n <span v-if=\"users.get(s.name)?.length\">\n {{ users.get(s.name)!.length }} deployment(s)\n </span>\n <span v-else class=\"mute\">nothing yet</span>\n </td>\n <td class=\"dim nowrap\" data-label=\"updated\"><RelativeTime :at=\"s.updatedAt\" /></td>\n </tr>\n <tr v-if=\"!shown.length\">\n <td colspan=\"5\" class=\"mute\">No spec matches “{{ needle }}”.</td>\n </tr>\n </tbody>\n </table>\n </template>\n\n <!--\n Honest empty state. This page cannot create a spec yet, so pointing at \"New spec\" would be a\n dead end — it names the way that does work instead.\n -->\n <div v-else class=\"banner plain\">\n <b>No specs stored yet.</b>\n <p>\n A deployment can carry its own spec inline — see\n <RouterLink to=\"/submit\">Submit</RouterLink> — and that is all you need for a one-off.\n Storing one here pays off when several deployments share it.\n </p>\n <p class=\"mute\">This page cannot store one yet — the command below does.</p>\n <EquivalentCommand\n what=\"storing a spec\"\n method=\"PUT\"\n path=\"/api/specs/my-spec\"\n :body=\"{ spec: '…the contents of your preview.yml…' }\"\n cli=\"pstack validate -f preview.yml # then PUT it with the curl above\"\n />\n </div>\n </section>\n </div>\n</template>\n"],"names":["specs","ref","loaded","error","unsupported","needle","load","r","api","problem","state","loadDeployments","users","computed","m","d","list","shown","q","s","_createElementBlock","_createElementVNode","_hoisted_1","_cache","_hoisted_2","_createVNode","InfoHint","RefreshButton","_createBlock","ErrorNote","_openBlock","_hoisted_3","_hoisted_4","_Fragment","_hoisted_5","$event","_hoisted_6","_hoisted_7","_renderList","i","_hoisted_8","_component_RouterLink","_createTextVNode","_toDisplayString","_hoisted_9","_hoisted_10","_normalizeClass","_unref","sentence","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_a","_hoisted_15","_hoisted_16","_hoisted_17","RelativeTime","_hoisted_18","_hoisted_19","_hoisted_20","EquivalentCommand","SkeletonList"],"mappings":"qvCAyBA,MAAMA,EAAQC,EAAgB,EAAE,EAC1BC,EAASD,EAAI,EAAK,EAClBE,EAAQF,EAAI,EAAE,EACdG,EAAcH,EAAI,EAAK,EACvBI,EAASJ,EAAI,EAAE,EAErB,eAAeK,GAAsB,CACnC,MAAMC,EAAI,MAAMC,EAAI,IAAmB,YAAY,EAEnD,GADAN,EAAO,MAAQ,GACXK,EAAE,SAAW,IAAK,CACpBH,EAAY,MAAQ,GACpB,MACF,CACA,GAAI,CAACG,EAAE,GAAI,CACTJ,EAAM,MAAQM,EAAQF,EAAG,YAAY,EACrC,MACF,CACAJ,EAAM,MAAQ,GACdH,EAAM,MAAQO,EAAE,KAAK,OAAS,CAAA,CA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AAA,EAAA,EAAA,EAAA,GAAN,SAAM,EAAA,CAAA,2BAAa,2GAE9C,EAAA,EAAA,GACAA,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAA4E,IAAA,CAAzE,MAAM,MAAA,EAAO,2DAAwD,EAAA,GACxEI,EAMEoC,EAAA,CALA,KAAK,iBACL,OAAO,MACP,KAAK,qBACJ,KAAM,CAAA,KAAA,oCAAA,EACP,IAAI,oEAAA,WAvERjC,EAAyCkC,EAAA,OAAX,KAAM,CAAA"}
@@ -1,2 +1,2 @@
1
- import{d,c as l,a as t,o as h}from"./index-IvJmpI3b.js";const n=["width","height"],s=["width","height"],a=["width","height"],o=["width","height"],u=["width","height"],r=["width","height"],g=["width","height"],w=["width","height"],z=["width","height"],f=d({__name:"SsoMark",props:{preset:{},size:{default:18}},setup(e){return(k,i)=>e.preset==="github"?(h(),l("svg",{key:0,width:e.size,height:e.size,viewBox:"0 0 16 16","aria-hidden":"true"},[...i[0]||(i[0]=[t("path",{fill:"currentColor",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z"},null,-1)])],8,n)):e.preset==="google"?(h(),l("svg",{key:1,width:e.size,height:e.size,viewBox:"0 0 18 18","aria-hidden":"true"},[...i[1]||(i[1]=[t("path",{fill:"#4285F4",d:"M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.48h4.84c-.21 1.13-.84 2.08-1.8 2.72v2.26h2.92c1.7-1.57 2.68-3.88 2.68-6.62z"},null,-1),t("path",{fill:"#34A853",d:"M9 18c2.43 0 4.47-.8 5.96-2.18l-2.92-2.26c-.8.54-1.84.86-3.04.86-2.34 0-4.32-1.58-5.03-3.71H.96v2.33A8.997 8.997 0 0 0 9 18z"},null,-1),t("path",{fill:"#FBBC05",d:"M3.97 10.71A5.41 5.41 0 0 1 3.68 9c0-.59.1-1.17.28-1.71V4.96H.96A8.996 8.996 0 0 0 0 9c0 1.45.35 2.82.96 4.04l3.01-2.33z"},null,-1),t("path",{fill:"#EA4335",d:"M9 3.58c1.32 0 2.5.45 3.44 1.35l2.58-2.58C13.46.89 11.43 0 9 0A8.997 8.997 0 0 0 .96 4.96l3.01 2.33C4.68 5.16 6.66 3.58 9 3.58z"},null,-1)])],8,s)):e.preset==="gitlab"?(h(),l("svg",{key:2,width:e.size,height:e.size,viewBox:"0 0 24 24","aria-hidden":"true"},[...i[2]||(i[2]=[t("path",{fill:"#FC6D26",d:"m23.6 9.593-.033-.086L20.3.98a.851.851 0 0 0-.336-.405.875.875 0 0 0-1 .054.875.875 0 0 0-.29.44l-2.207 6.748H7.537L5.33 1.07a.858.858 0 0 0-.29-.441.875.875 0 0 0-1-.054.86.86 0 0 0-.336.405L.437 9.502l-.032.086a6.066 6.066 0 0 0 2.012 7.01l.01.009.03.021 4.977 3.727 2.462 1.863 1.5 1.132a1.009 1.009 0 0 0 1.22 0l1.499-1.132 2.461-1.863 5.006-3.75.013-.01a6.068 6.068 0 0 0 2.005-7.002Z"},null,-1)])],8,a)):e.preset==="bitbucket"?(h(),l("svg",{key:3,width:e.size,height:e.size,viewBox:"0 0 24 24","aria-hidden":"true"},[...i[3]||(i[3]=[t("path",{fill:"#2684FF",d:"M.778 1.213a.768.768 0 0 0-.768.892l3.263 19.81c.084.5.515.868 1.022.873H19.95a.772.772 0 0 0 .77-.646l3.27-20.03a.768.768 0 0 0-.768-.891zM14.52 15.53H9.522L8.17 8.466h7.561z"},null,-1)])],8,o)):e.preset==="microsoft"?(h(),l("svg",{key:4,width:e.size,height:e.size,viewBox:"0 0 21 21","aria-hidden":"true"},[...i[4]||(i[4]=[t("rect",{x:"1",y:"1",width:"9",height:"9",fill:"#F25022"},null,-1),t("rect",{x:"11",y:"1",width:"9",height:"9",fill:"#7FBA00"},null,-1),t("rect",{x:"1",y:"11",width:"9",height:"9",fill:"#00A4EF"},null,-1),t("rect",{x:"11",y:"11",width:"9",height:"9",fill:"#FFB900"},null,-1)])],8,u)):e.preset==="okta"?(h(),l("svg",{key:5,width:e.size,height:e.size,viewBox:"0 0 24 24","aria-hidden":"true"},[...i[5]||(i[5]=[t("path",{fill:"#007DC1",d:"M12 0C5.389 0 0 5.35 0 12s5.35 12 12 12 12-5.35 12-12S18.611 0 12 0zm0 18c-3.325 0-6-2.675-6-6s2.675-6 6-6 6 2.675 6 6-2.675 6-6 6z"},null,-1)])],8,r)):e.preset==="auth0"?(h(),l("svg",{key:6,width:e.size,height:e.size,viewBox:"0 0 24 24","aria-hidden":"true"},[...i[6]||(i[6]=[t("path",{fill:"#EB5424",d:"M21.98 7.448 19.62 0H4.347L2.02 7.448c-1.352 4.312.03 9.206 3.815 12.015L12.007 24l6.157-4.552c3.755-2.81 5.182-7.688 3.815-12.015l-6.16 4.58 2.343 7.45-6.157-4.597-6.158 4.58 2.358-7.433-6.188-4.55 7.63-.045L12.008 0l2.356 7.404 7.615.044z"},null,-1)])],8,g)):e.preset==="keycloak"?(h(),l("svg",{key:7,width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"none",stroke:"#00B8E3","stroke-width":"1.8","stroke-linejoin":"round","aria-hidden":"true"},[...i[7]||(i[7]=[t("path",{d:"M7 3.2h10l5 8.8-5 8.8H7L2 12z"},null,-1),t("path",{d:"M10.6 8 8.2 12l2.4 4M15 8l-2.4 4L15 16","stroke-linecap":"square"},null,-1)])],8,w)):(h(),l("svg",{key:8,width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[...i[8]||(i[8]=[t("path",{d:"m21 2-9.6 9.6"},null,-1),t("circle",{cx:"7.5",cy:"15.5",r:"5.5"},null,-1),t("path",{d:"m15.5 7.5 3 3L22 7l-3-3"},null,-1)])],8,z))}});export{f as _};
2
- //# sourceMappingURL=SsoMark.vue_vue_type_script_setup_true_lang-EdIcAiak.js.map
1
+ import{d,c as l,a as t,o as h}from"./index-ChQCta5r.js";const n=["width","height"],s=["width","height"],a=["width","height"],o=["width","height"],u=["width","height"],r=["width","height"],g=["width","height"],w=["width","height"],z=["width","height"],f=d({__name:"SsoMark",props:{preset:{},size:{default:18}},setup(e){return(k,i)=>e.preset==="github"?(h(),l("svg",{key:0,width:e.size,height:e.size,viewBox:"0 0 16 16","aria-hidden":"true"},[...i[0]||(i[0]=[t("path",{fill:"currentColor",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z"},null,-1)])],8,n)):e.preset==="google"?(h(),l("svg",{key:1,width:e.size,height:e.size,viewBox:"0 0 18 18","aria-hidden":"true"},[...i[1]||(i[1]=[t("path",{fill:"#4285F4",d:"M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.48h4.84c-.21 1.13-.84 2.08-1.8 2.72v2.26h2.92c1.7-1.57 2.68-3.88 2.68-6.62z"},null,-1),t("path",{fill:"#34A853",d:"M9 18c2.43 0 4.47-.8 5.96-2.18l-2.92-2.26c-.8.54-1.84.86-3.04.86-2.34 0-4.32-1.58-5.03-3.71H.96v2.33A8.997 8.997 0 0 0 9 18z"},null,-1),t("path",{fill:"#FBBC05",d:"M3.97 10.71A5.41 5.41 0 0 1 3.68 9c0-.59.1-1.17.28-1.71V4.96H.96A8.996 8.996 0 0 0 0 9c0 1.45.35 2.82.96 4.04l3.01-2.33z"},null,-1),t("path",{fill:"#EA4335",d:"M9 3.58c1.32 0 2.5.45 3.44 1.35l2.58-2.58C13.46.89 11.43 0 9 0A8.997 8.997 0 0 0 .96 4.96l3.01 2.33C4.68 5.16 6.66 3.58 9 3.58z"},null,-1)])],8,s)):e.preset==="gitlab"?(h(),l("svg",{key:2,width:e.size,height:e.size,viewBox:"0 0 24 24","aria-hidden":"true"},[...i[2]||(i[2]=[t("path",{fill:"#FC6D26",d:"m23.6 9.593-.033-.086L20.3.98a.851.851 0 0 0-.336-.405.875.875 0 0 0-1 .054.875.875 0 0 0-.29.44l-2.207 6.748H7.537L5.33 1.07a.858.858 0 0 0-.29-.441.875.875 0 0 0-1-.054.86.86 0 0 0-.336.405L.437 9.502l-.032.086a6.066 6.066 0 0 0 2.012 7.01l.01.009.03.021 4.977 3.727 2.462 1.863 1.5 1.132a1.009 1.009 0 0 0 1.22 0l1.499-1.132 2.461-1.863 5.006-3.75.013-.01a6.068 6.068 0 0 0 2.005-7.002Z"},null,-1)])],8,a)):e.preset==="bitbucket"?(h(),l("svg",{key:3,width:e.size,height:e.size,viewBox:"0 0 24 24","aria-hidden":"true"},[...i[3]||(i[3]=[t("path",{fill:"#2684FF",d:"M.778 1.213a.768.768 0 0 0-.768.892l3.263 19.81c.084.5.515.868 1.022.873H19.95a.772.772 0 0 0 .77-.646l3.27-20.03a.768.768 0 0 0-.768-.891zM14.52 15.53H9.522L8.17 8.466h7.561z"},null,-1)])],8,o)):e.preset==="microsoft"?(h(),l("svg",{key:4,width:e.size,height:e.size,viewBox:"0 0 21 21","aria-hidden":"true"},[...i[4]||(i[4]=[t("rect",{x:"1",y:"1",width:"9",height:"9",fill:"#F25022"},null,-1),t("rect",{x:"11",y:"1",width:"9",height:"9",fill:"#7FBA00"},null,-1),t("rect",{x:"1",y:"11",width:"9",height:"9",fill:"#00A4EF"},null,-1),t("rect",{x:"11",y:"11",width:"9",height:"9",fill:"#FFB900"},null,-1)])],8,u)):e.preset==="okta"?(h(),l("svg",{key:5,width:e.size,height:e.size,viewBox:"0 0 24 24","aria-hidden":"true"},[...i[5]||(i[5]=[t("path",{fill:"#007DC1",d:"M12 0C5.389 0 0 5.35 0 12s5.35 12 12 12 12-5.35 12-12S18.611 0 12 0zm0 18c-3.325 0-6-2.675-6-6s2.675-6 6-6 6 2.675 6 6-2.675 6-6 6z"},null,-1)])],8,r)):e.preset==="auth0"?(h(),l("svg",{key:6,width:e.size,height:e.size,viewBox:"0 0 24 24","aria-hidden":"true"},[...i[6]||(i[6]=[t("path",{fill:"#EB5424",d:"M21.98 7.448 19.62 0H4.347L2.02 7.448c-1.352 4.312.03 9.206 3.815 12.015L12.007 24l6.157-4.552c3.755-2.81 5.182-7.688 3.815-12.015l-6.16 4.58 2.343 7.45-6.157-4.597-6.158 4.58 2.358-7.433-6.188-4.55 7.63-.045L12.008 0l2.356 7.404 7.615.044z"},null,-1)])],8,g)):e.preset==="keycloak"?(h(),l("svg",{key:7,width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"none",stroke:"#00B8E3","stroke-width":"1.8","stroke-linejoin":"round","aria-hidden":"true"},[...i[7]||(i[7]=[t("path",{d:"M7 3.2h10l5 8.8-5 8.8H7L2 12z"},null,-1),t("path",{d:"M10.6 8 8.2 12l2.4 4M15 8l-2.4 4L15 16","stroke-linecap":"square"},null,-1)])],8,w)):(h(),l("svg",{key:8,width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[...i[8]||(i[8]=[t("path",{d:"m21 2-9.6 9.6"},null,-1),t("circle",{cx:"7.5",cy:"15.5",r:"5.5"},null,-1),t("path",{d:"m15.5 7.5 3 3L22 7l-3-3"},null,-1)])],8,z))}});export{f as _};
2
+ //# sourceMappingURL=SsoMark.vue_vue_type_script_setup_true_lang-DYn0Yyze.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SsoMark.vue_vue_type_script_setup_true_lang-EdIcAiak.js","sources":["../../src/components/SsoMark.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The identity-provider brand marks, drawn inline.\n *\n * Inline and bundled ON PURPOSE: the login page is the first thing a browser loads on a fresh\n * host, and fetching marks from a brand CDN would make signing in depend on a third party (and\n * tell that third party about every visit). So each mark is an SVG in this file, in its brand\n * colour — except GitHub and the generic key, whose marks are drawn in black-or-white and\n * therefore use `currentColor` to follow the theme.\n *\n * `preset` is the preset key the API reports (`config.provider`, or `preset` in the health\n * summary). Anything unrecognised — `custom`, a bare OIDC issuer's `''` — gets the generic key,\n * so a provider nobody drew a mark for still renders as *a* provider rather than as a gap.\n *\n * The Keycloak mark is a simplification (their hexagon-and-chevrons icon rebuilt from basic\n * shapes), not traced brand art; the rest follow the providers' published marks.\n */\nwithDefaults(defineProps<{ preset: string; size?: number }>(), { size: 18 });\n</script>\n\n<template>\n <!-- GitHub: the octocat mark ships in black or white only, so it follows the text colour. -->\n <svg v-if=\"preset === 'github'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <path\n fill=\"currentColor\"\n d=\"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z\"\n />\n </svg>\n\n <!-- Google: the 'G', four colours, per the sign-in branding assets. -->\n <svg v-else-if=\"preset === 'google'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 18 18\" aria-hidden=\"true\">\n <path fill=\"#4285F4\" d=\"M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.48h4.84c-.21 1.13-.84 2.08-1.8 2.72v2.26h2.92c1.7-1.57 2.68-3.88 2.68-6.62z\" />\n <path fill=\"#34A853\" d=\"M9 18c2.43 0 4.47-.8 5.96-2.18l-2.92-2.26c-.8.54-1.84.86-3.04.86-2.34 0-4.32-1.58-5.03-3.71H.96v2.33A8.997 8.997 0 0 0 9 18z\" />\n <path fill=\"#FBBC05\" d=\"M3.97 10.71A5.41 5.41 0 0 1 3.68 9c0-.59.1-1.17.28-1.71V4.96H.96A8.996 8.996 0 0 0 0 9c0 1.45.35 2.82.96 4.04l3.01-2.33z\" />\n <path fill=\"#EA4335\" d=\"M9 3.58c1.32 0 2.5.45 3.44 1.35l2.58-2.58C13.46.89 11.43 0 9 0A8.997 8.997 0 0 0 .96 4.96l3.01 2.33C4.68 5.16 6.66 3.58 9 3.58z\" />\n </svg>\n\n <!-- GitLab: the single-colour tanuki. -->\n <svg v-else-if=\"preset === 'gitlab'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n fill=\"#FC6D26\"\n d=\"m23.6 9.593-.033-.086L20.3.98a.851.851 0 0 0-.336-.405.875.875 0 0 0-1 .054.875.875 0 0 0-.29.44l-2.207 6.748H7.537L5.33 1.07a.858.858 0 0 0-.29-.441.875.875 0 0 0-1-.054.86.86 0 0 0-.336.405L.437 9.502l-.032.086a6.066 6.066 0 0 0 2.012 7.01l.01.009.03.021 4.977 3.727 2.462 1.863 1.5 1.132a1.009 1.009 0 0 0 1.22 0l1.499-1.132 2.461-1.863 5.006-3.75.013-.01a6.068 6.068 0 0 0 2.005-7.002Z\"\n />\n </svg>\n\n <!-- Bitbucket. -->\n <svg v-else-if=\"preset === 'bitbucket'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n fill=\"#2684FF\"\n d=\"M.778 1.213a.768.768 0 0 0-.768.892l3.263 19.81c.084.5.515.868 1.022.873H19.95a.772.772 0 0 0 .77-.646l3.27-20.03a.768.768 0 0 0-.768-.891zM14.52 15.53H9.522L8.17 8.466h7.561z\"\n />\n </svg>\n\n <!-- Microsoft: the four squares. -->\n <svg v-else-if=\"preset === 'microsoft'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 21 21\" aria-hidden=\"true\">\n <rect x=\"1\" y=\"1\" width=\"9\" height=\"9\" fill=\"#F25022\" />\n <rect x=\"11\" y=\"1\" width=\"9\" height=\"9\" fill=\"#7FBA00\" />\n <rect x=\"1\" y=\"11\" width=\"9\" height=\"9\" fill=\"#00A4EF\" />\n <rect x=\"11\" y=\"11\" width=\"9\" height=\"9\" fill=\"#FFB900\" />\n </svg>\n\n <!-- Okta: the circle mark. -->\n <svg v-else-if=\"preset === 'okta'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n fill=\"#007DC1\"\n d=\"M12 0C5.389 0 0 5.35 0 12s5.35 12 12 12 12-5.35 12-12S18.611 0 12 0zm0 18c-3.325 0-6-2.675-6-6s2.675-6 6-6 6 2.675 6 6-2.675 6-6 6z\"\n />\n </svg>\n\n <!-- Auth0: the shield. -->\n <svg v-else-if=\"preset === 'auth0'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n fill=\"#EB5424\"\n d=\"M21.98 7.448 19.62 0H4.347L2.02 7.448c-1.352 4.312.03 9.206 3.815 12.015L12.007 24l6.157-4.552c3.755-2.81 5.182-7.688 3.815-12.015l-6.16 4.58 2.343 7.45-6.157-4.597-6.158 4.58 2.358-7.433-6.188-4.55 7.63-.045L12.008 0l2.356 7.404 7.615.044z\"\n />\n </svg>\n\n <!-- Keycloak: hexagon and double chevron, simplified — see the header. -->\n <svg\n v-else-if=\"preset === 'keycloak'\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"#00B8E3\"\n stroke-width=\"1.8\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M7 3.2h10l5 8.8-5 8.8H7L2 12z\" />\n <path d=\"M10.6 8 8.2 12l2.4 4M15 8l-2.4 4L15 16\" stroke-linecap=\"square\" />\n </svg>\n\n <!-- Everything else — custom OAuth2, a bare OIDC issuer, a preset this build has no mark for. -->\n <svg\n v-else\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m21 2-9.6 9.6\" />\n <circle cx=\"7.5\" cy=\"15.5\" r=\"5.5\" />\n <path d=\"m15.5 7.5 3 3L22 7l-3-3\" />\n </svg>\n</template>\n"],"names":["__props","_createElementBlock","_createElementVNode"],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AE,KAAK,EAAE,KAAK,MAAM,IAAI,OAAO,IAAI,KAAK,SAAA,oBAIhCF,EAAA,SAAM,YAAtBC,EAKM,MAAA,OAL8B,MAAOD,EAAA,KAAO,OAAQA,EAAA,KAAM,QAAQ,YAAY,cAAY,MAAA,mBAC9FE,EAGE,OAAA,CAFA,KAAK,UACL,EAAE,qIAAA,oBAKUF,EAAA,SAAM,aAAtBC,EAKM,MAAA,OAL+B,MAAOD,EAAA,KAAO,OAAQA,EAAA,KAAM,QAAQ,YAAY,cAAY,MAAA,mBAC/FE,EAGE,OAAA,CAFA,KAAK,UACL,EAAE,kPAAA,oBAMOF,EAAA,SAAM,gBADnBC,EAaM,MAAA,OAXH,MAAOD,EAAA,KACP,OAAQA,EAAA,KACT,QAAQ,YACR,KAAK,OACL,OAAO,UACP,eAAa,MACb,kBAAgB,QAChB,cAAY,MAAA,mBAEZE,EAA0C,OAAA,CAApC,EAAE,+BAAA,EAA+B,KAAA,EAAA,EACvCA,EAA2E,OAAA,CAArE,EAAE,yCAAyC,iBAAe,QAAA,yBAIlED,EAeM,MAAA,OAbH,MAAOD,EAAA,KACP,OAAQA,EAAA,KACT,QAAQ,YACR,KAAK,OACL,OAAO,eACP,eAAa,IACb,iBAAe,QACf,kBAAgB,QAChB,cAAY,MAAA,mBAEZE,EAA0B,OAAA,CAApB,EAAE,eAAA,EAAe,KAAA,EAAA,EACvBA,EAAqC,SAAA,CAA7B,GAAG,MAAM,GAAG,OAAO,EAAE,KAAA,WAC7BA,EAAoC,OAAA,CAA9B,EAAE,yBAAA,EAAyB,KAAA,EAAA,CAAA"}
1
+ {"version":3,"file":"SsoMark.vue_vue_type_script_setup_true_lang-DYn0Yyze.js","sources":["../../src/components/SsoMark.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The identity-provider brand marks, drawn inline.\n *\n * Inline and bundled ON PURPOSE: the login page is the first thing a browser loads on a fresh\n * host, and fetching marks from a brand CDN would make signing in depend on a third party (and\n * tell that third party about every visit). So each mark is an SVG in this file, in its brand\n * colour — except GitHub and the generic key, whose marks are drawn in black-or-white and\n * therefore use `currentColor` to follow the theme.\n *\n * `preset` is the preset key the API reports (`config.provider`, or `preset` in the health\n * summary). Anything unrecognised — `custom`, a bare OIDC issuer's `''` — gets the generic key,\n * so a provider nobody drew a mark for still renders as *a* provider rather than as a gap.\n *\n * The Keycloak mark is a simplification (their hexagon-and-chevrons icon rebuilt from basic\n * shapes), not traced brand art; the rest follow the providers' published marks.\n */\nwithDefaults(defineProps<{ preset: string; size?: number }>(), { size: 18 });\n</script>\n\n<template>\n <!-- GitHub: the octocat mark ships in black or white only, so it follows the text colour. -->\n <svg v-if=\"preset === 'github'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <path\n fill=\"currentColor\"\n d=\"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z\"\n />\n </svg>\n\n <!-- Google: the 'G', four colours, per the sign-in branding assets. -->\n <svg v-else-if=\"preset === 'google'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 18 18\" aria-hidden=\"true\">\n <path fill=\"#4285F4\" d=\"M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.48h4.84c-.21 1.13-.84 2.08-1.8 2.72v2.26h2.92c1.7-1.57 2.68-3.88 2.68-6.62z\" />\n <path fill=\"#34A853\" d=\"M9 18c2.43 0 4.47-.8 5.96-2.18l-2.92-2.26c-.8.54-1.84.86-3.04.86-2.34 0-4.32-1.58-5.03-3.71H.96v2.33A8.997 8.997 0 0 0 9 18z\" />\n <path fill=\"#FBBC05\" d=\"M3.97 10.71A5.41 5.41 0 0 1 3.68 9c0-.59.1-1.17.28-1.71V4.96H.96A8.996 8.996 0 0 0 0 9c0 1.45.35 2.82.96 4.04l3.01-2.33z\" />\n <path fill=\"#EA4335\" d=\"M9 3.58c1.32 0 2.5.45 3.44 1.35l2.58-2.58C13.46.89 11.43 0 9 0A8.997 8.997 0 0 0 .96 4.96l3.01 2.33C4.68 5.16 6.66 3.58 9 3.58z\" />\n </svg>\n\n <!-- GitLab: the single-colour tanuki. -->\n <svg v-else-if=\"preset === 'gitlab'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n fill=\"#FC6D26\"\n d=\"m23.6 9.593-.033-.086L20.3.98a.851.851 0 0 0-.336-.405.875.875 0 0 0-1 .054.875.875 0 0 0-.29.44l-2.207 6.748H7.537L5.33 1.07a.858.858 0 0 0-.29-.441.875.875 0 0 0-1-.054.86.86 0 0 0-.336.405L.437 9.502l-.032.086a6.066 6.066 0 0 0 2.012 7.01l.01.009.03.021 4.977 3.727 2.462 1.863 1.5 1.132a1.009 1.009 0 0 0 1.22 0l1.499-1.132 2.461-1.863 5.006-3.75.013-.01a6.068 6.068 0 0 0 2.005-7.002Z\"\n />\n </svg>\n\n <!-- Bitbucket. -->\n <svg v-else-if=\"preset === 'bitbucket'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n fill=\"#2684FF\"\n d=\"M.778 1.213a.768.768 0 0 0-.768.892l3.263 19.81c.084.5.515.868 1.022.873H19.95a.772.772 0 0 0 .77-.646l3.27-20.03a.768.768 0 0 0-.768-.891zM14.52 15.53H9.522L8.17 8.466h7.561z\"\n />\n </svg>\n\n <!-- Microsoft: the four squares. -->\n <svg v-else-if=\"preset === 'microsoft'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 21 21\" aria-hidden=\"true\">\n <rect x=\"1\" y=\"1\" width=\"9\" height=\"9\" fill=\"#F25022\" />\n <rect x=\"11\" y=\"1\" width=\"9\" height=\"9\" fill=\"#7FBA00\" />\n <rect x=\"1\" y=\"11\" width=\"9\" height=\"9\" fill=\"#00A4EF\" />\n <rect x=\"11\" y=\"11\" width=\"9\" height=\"9\" fill=\"#FFB900\" />\n </svg>\n\n <!-- Okta: the circle mark. -->\n <svg v-else-if=\"preset === 'okta'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n fill=\"#007DC1\"\n d=\"M12 0C5.389 0 0 5.35 0 12s5.35 12 12 12 12-5.35 12-12S18.611 0 12 0zm0 18c-3.325 0-6-2.675-6-6s2.675-6 6-6 6 2.675 6 6-2.675 6-6 6z\"\n />\n </svg>\n\n <!-- Auth0: the shield. -->\n <svg v-else-if=\"preset === 'auth0'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n fill=\"#EB5424\"\n d=\"M21.98 7.448 19.62 0H4.347L2.02 7.448c-1.352 4.312.03 9.206 3.815 12.015L12.007 24l6.157-4.552c3.755-2.81 5.182-7.688 3.815-12.015l-6.16 4.58 2.343 7.45-6.157-4.597-6.158 4.58 2.358-7.433-6.188-4.55 7.63-.045L12.008 0l2.356 7.404 7.615.044z\"\n />\n </svg>\n\n <!-- Keycloak: hexagon and double chevron, simplified — see the header. -->\n <svg\n v-else-if=\"preset === 'keycloak'\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"#00B8E3\"\n stroke-width=\"1.8\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M7 3.2h10l5 8.8-5 8.8H7L2 12z\" />\n <path d=\"M10.6 8 8.2 12l2.4 4M15 8l-2.4 4L15 16\" stroke-linecap=\"square\" />\n </svg>\n\n <!-- Everything else — custom OAuth2, a bare OIDC issuer, a preset this build has no mark for. -->\n <svg\n v-else\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m21 2-9.6 9.6\" />\n <circle cx=\"7.5\" cy=\"15.5\" r=\"5.5\" />\n <path d=\"m15.5 7.5 3 3L22 7l-3-3\" />\n </svg>\n</template>\n"],"names":["__props","_createElementBlock","_createElementVNode"],"mappings":"2UAsBaA,EAAA,SAAM,cAAjBC,EAKM,MAAA,OAL2B,MAAOD,EAAA,KAAO,OAAQA,EAAA,KAAM,QAAQ,YAAY,cAAY,MAAA,mBAC3FE,EAGE,OAAA,CAFA,KAAK,eACL,EAAE,0jBAAA,oBAKUF,EAAA,SAAM,cAAtBC,EAKM,MAAA,OALgC,MAAOD,EAAA,KAAO,OAAQA,EAAA,KAAM,QAAQ,YAAY,cAAY,MAAA,mBAChGE,EAA8I,OAAA,CAAxI,KAAK,UAAU,EAAE,oHAAA,WACvBA,EAAwJ,OAAA,CAAlJ,KAAK,UAAU,EAAE,8HAAA,WACvBA,EAAoJ,OAAA,CAA9I,KAAK,UAAU,EAAE,0HAAA,WACvBA,EAA2J,OAAA,CAArJ,KAAK,UAAU,EAAE,iIAAA,oBAITF,EAAA,SAAM,cAAtBC,EAKM,MAAA,OALgC,MAAOD,EAAA,KAAO,OAAQA,EAAA,KAAM,QAAQ,YAAY,cAAY,MAAA,mBAChGE,EAGE,OAAA,CAFA,KAAK,UACL,EAAE,uYAAA,oBAKUF,EAAA,SAAM,iBAAtBC,EAKM,MAAA,OALmC,MAAOD,EAAA,KAAO,OAA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