mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
⚡ Add deprecation warning for "executeSingle"
This commit is contained in:
parent
c67a120fed
commit
40614672e6
|
@ -6,9 +6,16 @@ import {
|
||||||
ICredentialType,
|
ICredentialType,
|
||||||
INodeType,
|
INodeType,
|
||||||
INodeTypeData,
|
INodeTypeData,
|
||||||
|
Logger,
|
||||||
|
LoggerProxy,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
import * as config from '../config';
|
import * as config from '../config';
|
||||||
|
|
||||||
|
import {
|
||||||
|
getLogger,
|
||||||
|
} from '../src/Logger';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
access as fsAccess,
|
access as fsAccess,
|
||||||
readdir as fsReaddir,
|
readdir as fsReaddir,
|
||||||
|
@ -31,7 +38,12 @@ class LoadNodesAndCredentialsClass {
|
||||||
|
|
||||||
nodeModulesPath = '';
|
nodeModulesPath = '';
|
||||||
|
|
||||||
|
logger: Logger;
|
||||||
|
|
||||||
async init() {
|
async init() {
|
||||||
|
this.logger = getLogger();
|
||||||
|
LoggerProxy.init(this.logger);
|
||||||
|
|
||||||
// Get the path to the node-modules folder to be later able
|
// Get the path to the node-modules folder to be later able
|
||||||
// to load the credentials and nodes
|
// to load the credentials and nodes
|
||||||
const checkPaths = [
|
const checkPaths = [
|
||||||
|
@ -171,6 +183,10 @@ class LoadNodesAndCredentialsClass {
|
||||||
tempNode.description.icon = 'file:' + path.join(path.dirname(filePath), tempNode.description.icon.substr(5));
|
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)) {
|
if (this.includeNodes !== undefined && !this.includeNodes.includes(fullNodeName)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue