n8n-editor-ui
Version:
Workflow Editor UI for n8n
2 lines • 1.74 kB
JavaScript
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`n8n@2.13.4`}}catch{}})();try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`d80d3266-b55a-41aa-a718-a01df685e0c0`,e._sentryDebugIdIdentifier=`sentry-dbid-d80d3266-b55a-41aa-a718-a01df685e0c0`)})()}catch{}import{Ft as e,S as t}from"./vue.runtime.esm-bundler-D9KLAxvJ.js";import{As as n,Cr as r,bc as i,vc as a,yc as o}from"./users.store-BHWXXawf.js";import{pl as s}from"./constants-CIP7tKq1.js";import{r as c}from"./_baseOrderBy-CaKruttV.js";function l(){let l=n(),u=c(),d=r(),f=e([]),p=e({}),m=e([]),h=e(!1),g=e(!1),_=t(()=>d.hasScope(`externalSecretsProvider:create`)),v=t(()=>d.hasScope(`externalSecretsProvider:update`));async function y(){h.value=!0;try{f.value=await i(u.restApiContext)}finally{h.value=!1}}async function b(){if(d.hasScope(`externalSecretsProvider:list`)){g.value=!0;try{m.value=await o(u.restApiContext)}catch{m.value=[]}finally{g.value=!1}}}async function x(e){let t=await a(u.restApiContext,e),n=m.value.findIndex(t=>t.name===e);n!==-1&&(m.value[n]=t)}let S=t(()=>h.value||g.value),C=t(()=>l.isEnterpriseFeatureEnabled[s.ExternalSecrets]),w=t(()=>[...m.value].sort((e,t)=>t.name.localeCompare(e.name)));return{providerTypes:t(()=>f.value),fetchProviderTypes:y,activeProviders:w,fetchActiveConnections:b,fetchConnection:x,canCreate:_,canUpdate:v,isLoading:S,isEnterpriseExternalSecretsEnabled:C,secrets:t(()=>p.value)}}export{l as t};
//# sourceMappingURL=useSecretsProvidersList.ee-CgNuCNqL.js.map