feat: External Secrets storage for credentials (#6477)
Github issue / Community forum post (link here to close automatically): --------- Co-authored-by: Romain Minaud <romain.minaud@gmail.com> Co-authored-by: Valya Bullions <valya@n8n.io> Co-authored-by: Csaba Tuncsik <csaba@n8n.io> Co-authored-by: Giulio Andreini <g.andreini@gmail.com> Co-authored-by: Omar Ajoue <krynble@gmail.com>
This commit is contained in:
@@ -7,8 +7,10 @@ import {
|
||||
prefixMatch,
|
||||
stripExcessParens,
|
||||
hasActiveNode,
|
||||
isCredentialsModalOpen,
|
||||
} from './utils';
|
||||
import type { Completion, CompletionContext, CompletionResult } from '@codemirror/autocomplete';
|
||||
import { useExternalSecretsStore } from '@/stores';
|
||||
|
||||
/**
|
||||
* Completions offered at the dollar position: `$|`
|
||||
@@ -47,7 +49,24 @@ export function dollarOptions() {
|
||||
const SKIP = new Set();
|
||||
const DOLLAR_FUNCTIONS = ['$jmespath'];
|
||||
|
||||
if (!hasActiveNode()) return []; // e.g. credential modal
|
||||
if (isCredentialsModalOpen()) {
|
||||
return useExternalSecretsStore().isEnterpriseExternalSecretsEnabled
|
||||
? [
|
||||
{
|
||||
label: '$secrets',
|
||||
type: 'keyword',
|
||||
},
|
||||
{
|
||||
label: '$vars',
|
||||
type: 'keyword',
|
||||
},
|
||||
]
|
||||
: [];
|
||||
}
|
||||
|
||||
if (!hasActiveNode()) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (receivesNoBinaryData()) SKIP.add('$binary');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user