Add deprecation warning for "executeSingle"

This commit is contained in:
Jan Oberhauser 2021-05-21 22:51:38 -05:00
parent c67a120fed
commit 40614672e6

View file

@ -6,9 +6,16 @@ import {
ICredentialType,
INodeType,
INodeTypeData,
Logger,
LoggerProxy,
} from 'n8n-workflow';
import * as config from '../config';
import {
getLogger,
} from '../src/Logger';
import {
access as fsAccess,
readdir as fsReaddir,
@ -31,7 +38,12 @@ class LoadNodesAndCredentialsClass {
nodeModulesPath = '';
logger: Logger;
async init() {
this.logger = getLogger();
LoggerProxy.init(this.logger);
// Get the path to the node-modules folder to be later able
// to load the credentials and nodes
const checkPaths = [
@ -171,6 +183,10 @@ class LoadNodesAndCredentialsClass {
tempNode.description.icon = 'file:' + path.join(path.dirname(filePath), tempNode.description.icon.substr(5));
}
if (tempNode.executeSingle) {
this.logger.warn(`"executeSingle" will get deprecated soon. Please update the code of node "${packageName}.${nodeName}" to use "execute" instead!`, { filePath });
}
if (this.includeNodes !== undefined && !this.includeNodes.includes(fullNodeName)) {
return;
}