refactor(editor): Reintroduce item and items to CodeNodeEditor (#4553)

*  Alias legacy refs to new syntax

* 📘 Adjust types

* 👕 Switch `item` lint error to warning

*  Add completions for legacy vars

* ✏️ Add descriptions to completions

*  Add lintings

* 📘 Skip `any` for now

*  Expand regex
This commit is contained in:
Iván Ovejero
2022-11-10 16:29:41 +01:00
committed by GitHub
parent 953457ad86
commit 9582a0f1c0
6 changed files with 98 additions and 32 deletions

View File

@@ -79,6 +79,7 @@ export class Code implements INodeType {
const jsCodeAllItems = this.getNodeParameter('jsCode', 0) as string;
const context = getSandboxContext.call(this);
context.items = context.$input.all();
const sandbox = new Sandbox(context, workflowMode, nodeMode);
if (workflowMode === 'manual') {
@@ -111,6 +112,7 @@ export class Code implements INodeType {
const jsCodeEachItem = this.getNodeParameter('jsCode', index) as string;
const context = getSandboxContext.call(this, index);
context.item = context.$input.item;
const sandbox = new Sandbox(context, workflowMode, nodeMode);
if (workflowMode === 'manual') {