mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor: Remove unnecessary console.log in nodes (no-changelog) (#11915)
This commit is contained in:
committed by
GitHub
parent
683ee42d3b
commit
ddda0bde0b
@@ -94,7 +94,7 @@ export class DocumentGithubLoader implements INodeType {
|
||||
};
|
||||
|
||||
async supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData> {
|
||||
console.log('Supplying data for Github Document Loader');
|
||||
this.logger.debug('Supplying data for Github Document Loader');
|
||||
|
||||
const repository = this.getNodeParameter('repository', itemIndex) as string;
|
||||
const branch = this.getNodeParameter('branch', itemIndex) as string;
|
||||
|
||||
@@ -330,7 +330,7 @@ export class Aws implements ICredentialType {
|
||||
endpoint.searchParams.set('Version', '2011-06-15');
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
const parsed = parseAwsUrl(endpoint);
|
||||
@@ -372,7 +372,7 @@ export class Aws implements ICredentialType {
|
||||
customUrl.searchParams.set('Action', 'GetCallerIdentity');
|
||||
customUrl.searchParams.set('Version', '2011-06-15');
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
endpoint = customUrl;
|
||||
@@ -411,7 +411,7 @@ export class Aws implements ICredentialType {
|
||||
try {
|
||||
sign(signOpts, securityHeaders);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
console.error(err);
|
||||
}
|
||||
const options: IHttpRequestOptions = {
|
||||
...requestOptions,
|
||||
|
||||
@@ -7,7 +7,7 @@ export const runGarbageCollector = () => {
|
||||
const gc = runInNewContext('gc'); // nocommit
|
||||
gc();
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
console.error(error);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -23,8 +23,5 @@ export const generateGarbageMemory = (sizeInMB: number, onHeap = true) => {
|
||||
const array = new Uint8Array(size);
|
||||
array.fill(0);
|
||||
}
|
||||
// const used = process.memoryUsage().heapUsed / 1024 / 1024;
|
||||
// const external = process.memoryUsage().external / 1024 / 1024;
|
||||
// console.log(`heap: ${used} MB / external: ${external} MB`);
|
||||
return { ...process.memoryUsage() };
|
||||
};
|
||||
|
||||
@@ -99,7 +99,7 @@ export async function haloPSAApiRequest(
|
||||
if (method === 'DELETE' || method === 'GET' || (method === 'POST' && message)) {
|
||||
let newErrorMessage;
|
||||
if (message.includes('400')) {
|
||||
console.log(message);
|
||||
this.logger.debug(message);
|
||||
newErrorMessage = JSON.parse(message.split(' - ')[1]);
|
||||
(error as JsonObject).message = `For field ID, ${
|
||||
newErrorMessage.id || newErrorMessage['[0].id']
|
||||
@@ -136,14 +136,14 @@ export async function haloPSAApiRequest(
|
||||
// )) as IDataObject;
|
||||
|
||||
// const { tickets } = response;
|
||||
// console.log((tickets as IDataObject[]).map(t => t.id));
|
||||
// this.logger.debug((tickets as IDataObject[]).map(t => t.id));
|
||||
// const body: IDataObject = {
|
||||
// id: clientId,
|
||||
// client_id: reasigmentCliendId,
|
||||
// };
|
||||
|
||||
// for (const ticket of (tickets as IDataObject[])) {
|
||||
// console.log(ticket.id);
|
||||
// this.logger.debug(ticket.id);
|
||||
// await haloPSAApiRequest.call(this, 'DELETE', `/tickets/${ticket.id}`, accessToken);
|
||||
// }
|
||||
// }
|
||||
|
||||
@@ -129,7 +129,7 @@ export class Ldap implements INodeType {
|
||||
await client.bind(credentials.bindDN as string, credentials.bindPassword as string);
|
||||
} catch (error) {
|
||||
await client.unbind();
|
||||
console.log(error);
|
||||
this.logger.error(error);
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ export class Ldap implements INodeType {
|
||||
try {
|
||||
results = await client.search(baseDN, { sizeLimit: 200, paged: false }); // should this size limit be set in credentials?
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
this.logger.error(error);
|
||||
return [];
|
||||
} finally {
|
||||
await client.unbind();
|
||||
@@ -158,7 +158,7 @@ export class Ldap implements INodeType {
|
||||
await client.bind(credentials.bindDN as string, credentials.bindPassword as string);
|
||||
} catch (error) {
|
||||
await client.unbind();
|
||||
console.log(error);
|
||||
this.logger.error(error);
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ export class Ldap implements INodeType {
|
||||
try {
|
||||
results = await client.search(baseDN, { sizeLimit: 10, paged: false }); // should this size limit be set in credentials?
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
this.logger.error(error);
|
||||
return [];
|
||||
} finally {
|
||||
await client.unbind();
|
||||
@@ -202,7 +202,7 @@ export class Ldap implements INodeType {
|
||||
await client.bind(credentials.bindDN as string, credentials.bindPassword as string);
|
||||
} catch (error) {
|
||||
await client.unbind();
|
||||
console.log(error);
|
||||
this.logger.error(error);
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ export class Ldap implements INodeType {
|
||||
try {
|
||||
results = await client.search(baseDN, { sizeLimit: 1, paged: false });
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
this.logger.error(error);
|
||||
return [];
|
||||
} finally {
|
||||
await client.unbind();
|
||||
|
||||
@@ -1039,7 +1039,7 @@ export class Salesforce implements INodeType {
|
||||
// async getFolders(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
// const returnData: INodePropertyOptions[] = [];
|
||||
// const fields = await salesforceApiRequestAllItems.call(this, 'records', 'GET', '/sobjects/folder/describe');
|
||||
// console.log(JSON.stringify(fields, undefined, 2))
|
||||
// this.logger.debug(JSON.stringify(fields, undefined, 2))
|
||||
// const qs = {
|
||||
// //ContentFolderItem ContentWorkspace ContentFolder
|
||||
// q: `SELECT Id, Title FROM ContentVersion`,
|
||||
|
||||
@@ -31,7 +31,6 @@ export async function webflowApiRequest(
|
||||
|
||||
// Keep support for v1 node
|
||||
if (this.getNode().typeVersion === 1) {
|
||||
console.log('v1');
|
||||
const authenticationMethod = this.getNodeParameter('authentication', 0, 'accessToken');
|
||||
if (authenticationMethod === 'accessToken') {
|
||||
credentialsType = 'webflowApi';
|
||||
@@ -81,8 +80,6 @@ export async function getSites(this: ILoadOptionsFunctions): Promise<INodeProper
|
||||
const returnData: INodePropertyOptions[] = [];
|
||||
const response = await webflowApiRequest.call(this, 'GET', '/sites');
|
||||
|
||||
console.log(response);
|
||||
|
||||
const sites = response.body?.sites || response;
|
||||
|
||||
for (const site of sites) {
|
||||
|
||||
Reference in New Issue
Block a user