garm/webapp/assets/_app/immutable/chunks/Ok63PiOl.js
Gabriel Adrian Samfira 5fdb69ac18 Add the ability to set tools download source (Gitea)
This change adds 2 new options to gitea forge endpoints:

* Tools metadata URL
* Use internal tools URLs

By default, GARM looks in the releases page of the gitea arc_runner
to determine where it can download the runner binary from for a particular
OS/arch. The tools metadata URL option can be set on an endpoint and can point
to a mirror of the upstream repo. The requirement is that the asset names
exactly mirror upstream naming conventions.

The second option disables GARM calling out to the tools metadata URL entirely.
GARM has some hardcoded values for nightly binaries. If this option is checked,
GARM will use those values, without making any kind of outgoing API call to
determine availability. This is useful in air-gapped environments.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-09-26 18:59:15 +03:00

1 line
3.1 KiB
JavaScript

import"./DsnmJJEf.js";import{i as V}from"./TJn6xDN9.js";import{p as B,E as D,l as t,q as s,g as e,m as a,h as P,f as T,t as q,i as S,b as F,c as G,u as I,d as w,k as o,r as z}from"./DniTuB_0.js";import{e as J,h as K,s as N,f as O}from"./BZ2rxtTc.js";import{l as C,p as l}from"./DbNhg6mG.js";var Q=T('<button><svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><!></svg></button>');function Z(j,i){const M=C(i,["children","$$slots","$$events","$$legacy"]),L=C(M,["action","disabled","title","ariaLabel","size"]);B(i,!1);const u=a(),h=a(),p=a(),v=a(),g=a(),f=a(),n=a(),m=a(),b=a(),A=D();let r=l(i,"action",8,"edit"),x=l(i,"disabled",8,!1),y=l(i,"title",8,""),_=l(i,"ariaLabel",8,""),c=l(i,"size",8,"md");function H(){x()||A("click")}t(()=>{},()=>{o(u,"transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 dark:focus:ring-offset-gray-900 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50")}),t(()=>s(c()),()=>{o(h,{sm:"p-1",md:"p-2"}[c()])}),t(()=>s(r()),()=>{o(p,{edit:"text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300 focus:ring-indigo-500",delete:"text-red-600 dark:text-red-400 hover:text-red-900 dark:hover:text-red-300 focus:ring-red-500",view:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-300 focus:ring-gray-500",add:"text-green-600 dark:text-green-400 hover:text-green-900 dark:hover:text-green-300 focus:ring-green-500",copy:"text-blue-600 dark:text-blue-400 hover:text-blue-900 dark:hover:text-blue-300 focus:ring-blue-500"}[r()])}),t(()=>s(c()),()=>{o(v,c()==="sm"?"h-4 w-4":"h-5 w-5")}),t(()=>(e(u),e(h),e(p)),()=>{o(g,[e(u),e(h),e(p)].join(" "))}),t(()=>{},()=>{o(f,{edit:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" />',delete:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />',view:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" />',add:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6" />',copy:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" />'})}),t(()=>{},()=>{o(n,{edit:"Edit",delete:"Delete",view:"View",add:"Add",copy:"Clone"})}),t(()=>(s(y()),e(n),s(r())),()=>{o(m,y()||e(n)[r()])}),t(()=>(s(_()),e(n),s(r())),()=>{o(b,_()||`${e(n)[r()]} item`)}),P(),V();var d=Q();J(d,()=>({type:"button",class:e(g),disabled:x(),title:e(m),"aria-label":e(b),...L}));var k=w(d),E=w(k);K(E,()=>(e(f),s(r()),I(()=>e(f)[r()])),!0),z(k),z(d),q(()=>N(k,0,O(e(v)))),S("click",d,H),F(j,d),G()}export{Z as A};