feat(core): Node version available in expression (#9350)

This commit is contained in:
Michael Kret
2024-05-10 09:51:26 +03:00
committed by GitHub
parent dc5994b185
commit a00467c9fa
6 changed files with 14 additions and 0 deletions

View File

@@ -133,6 +133,11 @@ export const ROOT_DOLLAR_COMPLETIONS: Completion[] = [
section: METHODS_SECTION,
info: i18n.rootVars.$min,
},
{
label: '$nodeVersion',
section: METADATA_SECTION,
info: i18n.rootVars.$nodeVersion,
},
];
export const STRING_RECOMMENDED_OPTIONS = [

View File

@@ -379,6 +379,7 @@ export class I18nClass {
$request: this.baseText('codeNodeEditor.completer.$request'),
$response: this.baseText('codeNodeEditor.completer.$response'),
$pageCount: this.baseText('codeNodeEditor.completer.$pageCount'),
$nodeVersion: this.baseText('codeNodeEditor.completer.$nodeVersion'),
} as const satisfies Record<string, string | undefined>;
proxyVars: Record<string, string | undefined> = {

View File

@@ -217,6 +217,7 @@
"codeNodeEditor.completer.$prevNode.runIndex": "The run of the node providing input data to the current one",
"codeNodeEditor.completer.$runIndex": "The index of the current run of this node",
"codeNodeEditor.completer.$today": "A timestamp representing the current day (at midnight, as a Luxon object)",
"codeNodeEditor.completer.$nodeVersion": "The type version of the current node",
"codeNodeEditor.completer.$vars": "The variables defined in your instance",
"codeNodeEditor.completer.$vars.varName": "Variable set on this n8n instance. All variables evaluate to strings.",
"codeNodeEditor.completer.$secrets": "The external secrets connected to your instance",