mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 21:07:28 -08:00
ci: Fix linting issues on master (no-changelog) (#6186)
This commit is contained in:
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);
|
||||
|
|
|
@ -636,12 +636,12 @@ namespace ExecuteFunctions {
|
|||
fallbackValue?: number,
|
||||
options?: IGetNodeParameterOptions,
|
||||
): number;
|
||||
getNodeParameter<T = NodeParameterValueType | object>(
|
||||
getNodeParameter(
|
||||
parameterName: string,
|
||||
itemIndex: number,
|
||||
fallbackValue?: any,
|
||||
options?: IGetNodeParameterOptions,
|
||||
): T;
|
||||
): NodeParameterValueType | object;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue