mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
ci: Fix linting issues on master (no-changelog) (#6186)
This commit is contained in:
committed by
GitHub
parent
13c143eb6d
commit
394c9a2731
@@ -78,18 +78,20 @@ export class Code implements INodeType {
|
||||
};
|
||||
|
||||
async execute(this: IExecuteFunctions) {
|
||||
const nodeMode = this.getNodeParameter<CodeExecutionMode>('mode', 0);
|
||||
const nodeMode = this.getNodeParameter('mode', 0) as CodeExecutionMode;
|
||||
const workflowMode = this.getMode();
|
||||
|
||||
const language: CodeNodeEditorLanguage =
|
||||
this.getNode()?.typeVersion === 2 ? this.getNodeParameter('language', 0) : 'javaScript';
|
||||
this.getNode()?.typeVersion === 2
|
||||
? (this.getNodeParameter('language', 0) as CodeNodeEditorLanguage)
|
||||
: 'javaScript';
|
||||
const codeParameterName = language === 'python' ? 'pythonCode' : 'jsCode';
|
||||
|
||||
const getSandbox = (index = 0) => {
|
||||
const code = this.getNodeParameter<string>(codeParameterName, index);
|
||||
const code = this.getNodeParameter(codeParameterName, index) as string;
|
||||
const context = getSandboxContext.call(this, index);
|
||||
if (language === 'python') {
|
||||
const modules = this.getNodeParameter<string>('modules', index);
|
||||
const modules = this.getNodeParameter('modules', index) as string;
|
||||
const moduleImports: string[] = modules ? modules.split(',').map((m) => m.trim()) : [];
|
||||
context.printOverwrite = workflowMode === 'manual' ? this.sendMessageToUI : null;
|
||||
return new PythonSandbox(context, code, moduleImports, index, this.helpers);
|
||||
|
||||
Reference in New Issue
Block a user