n8n-editor-ui
Version:
Workflow Editor UI for n8n
2 lines • 1.78 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.16.1`}}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]=`73ebd67c-6583-402a-ab77-767b81016b67`,e._sentryDebugIdIdentifier=`sentry-dbid-73ebd67c-6583-402a-ab77-767b81016b67`)})()}catch{}import{Ft as e,S as t}from"./vue.runtime.esm-bundler-C3C09Zii.js";import{mi as n}from"./users.store-xP93bV7X.js";import{Qc as r}from"./constants-DuQbSl-q.js";import{t as i}from"./useRootStore-XEREVjMN.js";import{At as a,jt as o,kt as s,t as c}from"./settings.store-CAFiYCMH.js";function l(){let l=c(),u=i(),d=n(),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 o(u.restApiContext)}finally{h.value=!1}}async function b(){if(d.hasScope(`externalSecretsProvider:list`)){g.value=!0;try{m.value=await a(u.restApiContext)}catch{m.value=[]}finally{g.value=!1}}}async function x(e){let t=await s(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[r.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-BI7Qpnip.js.map