mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(Code Node): Add Python support (#4295)
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
export const BINARY_ENCODING = 'base64';
|
||||
export const WAIT_TIME_UNLIMITED = '3000-01-01T00:00:00.000Z';
|
||||
|
||||
export const CODE_LANGUAGES = ['javaScript', 'json', 'python'] as const;
|
||||
export const CODE_EXECUTION_MODES = ['runOnceForAllItems', 'runOnceForEachItem'] as const;
|
||||
|
||||
/**
|
||||
* Nodes whose parameter values may refer to other nodes without expressions.
|
||||
* Their content may need to be updated when the referenced node is renamed.
|
||||
|
||||
@@ -7,7 +7,9 @@ import type { Readable } from 'stream';
|
||||
import type { URLSearchParams } from 'url';
|
||||
import type { OptionsWithUri, OptionsWithUrl } from 'request';
|
||||
import type { RequestPromiseOptions, RequestPromiseAPI } from 'request-promise-native';
|
||||
import type { PathLike } from 'fs';
|
||||
|
||||
import type { CODE_EXECUTION_MODES, CODE_LANGUAGES } from './Constants';
|
||||
import type { IDeferredPromise } from './DeferredPromise';
|
||||
import type { Workflow } from './Workflow';
|
||||
import type { WorkflowHooks } from './WorkflowHooks';
|
||||
@@ -15,7 +17,6 @@ import type { WorkflowActivationError } from './WorkflowActivationError';
|
||||
import type { WorkflowOperationError } from './WorkflowErrors';
|
||||
import type { NodeApiError, NodeOperationError } from './NodeErrors';
|
||||
import type { ExpressionError } from './ExpressionError';
|
||||
import type { PathLike } from 'fs';
|
||||
import type { ExecutionStatus } from './ExecutionStatus';
|
||||
import type { AuthenticationMethod } from './Authentication';
|
||||
|
||||
@@ -635,12 +636,12 @@ namespace ExecuteFunctions {
|
||||
fallbackValue?: number,
|
||||
options?: IGetNodeParameterOptions,
|
||||
): number;
|
||||
getNodeParameter(
|
||||
getNodeParameter<T = NodeParameterValueType | object>(
|
||||
parameterName: string,
|
||||
itemIndex: number,
|
||||
fallbackValue?: any,
|
||||
options?: IGetNodeParameterOptions,
|
||||
): NodeParameterValueType | object;
|
||||
): T;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1020,7 +1021,8 @@ export type NodePropertyTypes =
|
||||
export type CodeAutocompleteTypes = 'function' | 'functionItem';
|
||||
|
||||
export type EditorType = 'code' | 'codeNodeEditor' | 'htmlEditor' | 'sqlEditor' | 'json';
|
||||
export type CodeNodeEditorLanguage = 'javaScript' | 'json'; //| 'python' | 'sql';
|
||||
export type CodeNodeEditorLanguage = (typeof CODE_LANGUAGES)[number];
|
||||
export type CodeExecutionMode = (typeof CODE_EXECUTION_MODES)[number];
|
||||
export type SQLDialect = 'mssql' | 'mysql' | 'postgres';
|
||||
|
||||
export interface ILoadOptions {
|
||||
|
||||
Reference in New Issue
Block a user