refactor: Lint for no unneeded backticks (#5057) (no-changelog)

*  Create rule `no-unneeded-backticks`

* 👕 Enable rule

*  Run rule on `cli`

*  Run rule on `core`

*  Run rule on `workflow`

*  Rule rule on `design-system`

*  Run rule on `node-dev`

*  Run rule on `editor-ui`

*  Run rule on `nodes-base`
This commit is contained in:
Iván Ovejero 2022-12-29 12:20:43 +01:00 committed by GitHub
parent a7868ae77d
commit d9b98fc8be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
239 changed files with 772 additions and 714 deletions

View file

@ -339,6 +339,8 @@ const config = (module.exports = {
'n8n-local-rules/no-json-parse-json-stringify': 'error',
'n8n-local-rules/no-unneeded-backticks': 'error',
// ******************************************************************
// overrides to base ruleset
// ******************************************************************

View file

@ -106,6 +106,39 @@ module.exports = {
};
},
},
'no-unneeded-backticks': {
meta: {
type: 'problem',
docs: {
description:
'Template literal backticks may only be used for string interpolation or multiline strings.',
recommended: 'error',
},
messages: {
noUneededBackticks: 'Use single or double quotes, not backticks',
},
fixable: 'code',
},
create(context) {
return {
TemplateLiteral(node) {
if (node.expressions.length > 0) return;
if (node.quasis.every((q) => q.loc.start.line !== q.loc.end.line)) return;
node.quasis.forEach((q) => {
const escaped = q.value.raw.replace(/(?<!\\)'/g, "\\'");
context.report({
messageId: 'noUneededBackticks',
node,
fix: (fixer) => fixer.replaceText(q, `'${escaped}'`),
});
});
},
};
},
},
};
const isJsonParseCall = (node) =>

View file

@ -62,7 +62,8 @@ import { WorkflowRunner } from '@/WorkflowRunner';
import { ExternalHooks } from '@/ExternalHooks';
import { whereClause } from './UserManagement/UserManagementHelper';
const WEBHOOK_PROD_UNREGISTERED_HINT = `The workflow must be active for a production URL to run successfully. You can activate the workflow using the toggle in the top-right of the editor. Note that unlike test URL calls, production URL calls aren't shown on the canvas (only in the executions list)`;
const WEBHOOK_PROD_UNREGISTERED_HINT =
"The workflow must be active for a production URL to run successfully. You can activate the workflow using the toggle in the top-right of the editor. Note that unlike test URL calls, production URL calls aren't shown on the canvas (only in the executions list)";
export class ActiveWorkflowRunner {
private activeWorkflows: ActiveWorkflows | null = null;
@ -118,11 +119,11 @@ export class ActiveWorkflowRunner {
workflowName: workflowData.name,
workflowId: workflowData.id,
});
console.log(` => Started`);
console.log(' => Started');
} catch (error) {
ErrorReporter.error(error);
console.log(
` => ERROR: Workflow could not be activated on first try, keep on trying`,
' => ERROR: Workflow could not be activated on first try, keep on trying',
);
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
console.log(` ${error.message}`);
@ -773,7 +774,7 @@ export class ActiveWorkflowRunner {
workflowData?: IWorkflowDb,
): Promise<void> {
if (this.activeWorkflows === null) {
throw new Error(`The "activeWorkflows" instance did not get initialized yet.`);
throw new Error('The "activeWorkflows" instance did not get initialized yet.');
}
let workflowInstance: Workflow;
@ -806,7 +807,7 @@ export class ActiveWorkflowRunner {
if (!canBeActivated) {
Logger.error(`Unable to activate workflow "${workflowData.name}"`);
throw new Error(
`The workflow can not be activated because it does not contain any nodes which could start the workflow. Only workflows which have trigger or webhook nodes can be activated.`,
'The workflow can not be activated because it does not contain any nodes which could start the workflow. Only workflows which have trigger or webhook nodes can be activated.',
);
}
@ -1001,7 +1002,7 @@ export class ActiveWorkflowRunner {
return;
}
throw new Error(`The "activeWorkflows" instance did not get initialized yet.`);
throw new Error('The "activeWorkflows" instance did not get initialized yet.');
}
}

View file

@ -13,7 +13,7 @@ export class Push {
this.channel.on('disconnect', (channel: string, res: Response) => {
if (res.req !== undefined) {
const { sessionId } = res.req.query;
Logger.debug(`Remove editor-UI session`, { sessionId });
Logger.debug('Remove editor-UI session', { sessionId });
delete this.connections[sessionId as string];
}
});
@ -27,7 +27,7 @@ export class Push {
* @param {Response} res The response
*/
add(sessionId: string, req: Request, res: Response) {
Logger.debug(`Add editor-UI session`, { sessionId });
Logger.debug('Add editor-UI session', { sessionId });
if (this.connections[sessionId] !== undefined) {
// Make sure to remove existing connection with the same session

View file

@ -1031,7 +1031,7 @@ class App {
const parameters = toHttpNodeParameters(curlCommand);
return ResponseHelper.flattenObject(parameters, 'parameters');
} catch (e) {
throw new ResponseHelper.BadRequestError(`Invalid cURL command`);
throw new ResponseHelper.BadRequestError('Invalid cURL command');
}
},
),

View file

@ -18,7 +18,8 @@ import * as Push from '@/Push';
import * as ResponseHelper from '@/ResponseHelper';
import * as WebhookHelpers from '@/WebhookHelpers';
const WEBHOOK_TEST_UNREGISTERED_HINT = `Click the 'Execute workflow' button on the canvas, then try again. (In test mode, the webhook only works for one call after you click this button)`;
const WEBHOOK_TEST_UNREGISTERED_HINT =
"Click the 'Execute workflow' button on the canvas, then try again. (In test mode, the webhook only works for one call after you click this button)";
export class TestWebhooks {
private testWebhookData: {

View file

@ -127,7 +127,7 @@ export function usersNamespace(this: N8nApp): void {
const usersToSetUp = Object.keys(createUsers).filter((email) => createUsers[email] === null);
const total = usersToSetUp.length;
Logger.debug(total > 1 ? `Creating ${total} user shells...` : `Creating 1 user shell...`);
Logger.debug(total > 1 ? `Creating ${total} user shells...` : 'Creating 1 user shell...');
try {
await Db.transaction(async (transactionManager) => {
@ -156,7 +156,7 @@ export function usersNamespace(this: N8nApp): void {
}
Logger.info('Created user shell(s) successfully', { userId: req.user.id });
Logger.verbose(total > 1 ? `${total} user shells created` : `1 user shell created`, {
Logger.verbose(total > 1 ? `${total} user shells created` : '1 user shell created', {
userShells: createUsers,
});
@ -200,7 +200,7 @@ export function usersNamespace(this: N8nApp): void {
domain: baseUrl,
email,
});
resp.error = `Email could not be sent`;
resp.error = 'Email could not be sent';
}
return resp;
}),
@ -211,7 +211,7 @@ export function usersNamespace(this: N8nApp): void {
Logger.debug(
usersPendingSetup.length > 1
? `Sent ${usersPendingSetup.length} invite emails successfully`
: `Sent 1 invite email successfully`,
: 'Sent 1 invite email successfully',
{ userShells: createUsers },
);

View file

@ -137,7 +137,7 @@ export function executeErrorWorkflow(
workflowData.settings.errorWorkflow.toString() === workflowData.id.toString()
)
) {
Logger.verbose(`Start external error workflow`, {
Logger.verbose('Start external error workflow', {
executionId,
errorWorkflowId: workflowData.settings.errorWorkflow.toString(),
workflowId: workflowData.id,
@ -177,7 +177,7 @@ export function executeErrorWorkflow(
workflowData.id !== undefined &&
workflowData.nodes.some((node) => node.type === ERROR_TRIGGER_TYPE)
) {
Logger.verbose(`Start internal error workflow`, { executionId, workflowId: workflowData.id });
Logger.verbose('Start internal error workflow', { executionId, workflowId: workflowData.id });
void getWorkflowOwner(workflowData.id).then((user) => {
void WorkflowHelpers.executeErrorWorkflow(
workflowData.id!.toString(),
@ -293,7 +293,7 @@ function hookFunctionsPush(): IWorkflowExecuteHooks {
],
workflowExecuteBefore: [
async function (this: WorkflowHooks): Promise<void> {
Logger.debug(`Executing hook (hookFunctionsPush)`, {
Logger.debug('Executing hook (hookFunctionsPush)', {
executionId: this.executionId,
sessionId: this.sessionId,
workflowId: this.workflowData.id,
@ -324,7 +324,7 @@ function hookFunctionsPush(): IWorkflowExecuteHooks {
fullRunData: IRun,
newStaticData: IDataObject,
): Promise<void> {
Logger.debug(`Executing hook (hookFunctionsPush)`, {
Logger.debug('Executing hook (hookFunctionsPush)', {
executionId: this.executionId,
sessionId: this.sessionId,
workflowId: this.workflowData.id,
@ -490,7 +490,7 @@ function hookFunctionsSave(parentProcessMode?: string): IWorkflowExecuteHooks {
fullRunData: IRun,
newStaticData: IDataObject,
): Promise<void> {
Logger.debug(`Executing hook (hookFunctionsSave)`, {
Logger.debug('Executing hook (hookFunctionsSave)', {
executionId: this.executionId,
workflowId: this.workflowData.id,
});
@ -830,7 +830,7 @@ export async function getWorkflowData(
): Promise<IWorkflowBase> {
if (workflowInfo.id === undefined && workflowInfo.code === undefined) {
throw new Error(
`No information about the workflow to execute found. Please provide either the "id" or "code"!`,
'No information about the workflow to execute found. Please provide either the "id" or "code"!',
);
}

View file

@ -67,7 +67,7 @@ const setupUserManagement = async () => {
`INSERT INTO user (id, globalRoleId) values ("${uuid()}", ${instanceOwnerRole[0].insertId})`,
);
await connection.query(
`INSERT INTO "settings" (key, value, loadOnStartup) values ('userManagement.isInstanceOwnerSetUp', 'false', true), ('userManagement.skipInstanceOwnerSetup', 'false', true)`,
"INSERT INTO \"settings\" (key, value, loadOnStartup) values ('userManagement.isInstanceOwnerSetUp', 'false', true), ('userManagement.skipInstanceOwnerSetup', 'false', true)",
);
};

View file

@ -31,7 +31,7 @@ export class DbRevertMigrationCommand extends Command {
connection = Db.collections.Credentials.manager.connection;
if (!connection) {
throw new Error(`No database connection available.`);
throw new Error('No database connection available.');
}
const connectionOptions: ConnectionOptions = Object.assign(connection.options, {

View file

@ -26,7 +26,7 @@ import { findCliWorkflowStart } from '@/utils';
export class Execute extends Command {
static description = '\nExecutes a given workflow';
static examples = [`$ n8n execute --id=5`, `$ n8n execute --file=workflow.json`];
static examples = ['$ n8n execute --id=5', '$ n8n execute --file=workflow.json'];
static flags = {
help: flags.help({ char: 'h' }),
@ -59,12 +59,12 @@ export class Execute extends Command {
const loadNodesAndCredentialsPromise = loadNodesAndCredentials.init();
if (!flags.id && !flags.file) {
console.info(`Either option "--id" or "--file" have to be set!`);
console.info('Either option "--id" or "--file" have to be set!');
return;
}
if (flags.id && flags.file) {
console.info(`Either "id" or "file" can be set never both!`);
console.info('Either "id" or "file" can be set never both!');
return;
}

View file

@ -58,12 +58,12 @@ export class ExecuteBatch extends Command {
static instanceOwner: User;
static examples = [
`$ n8n executeBatch`,
`$ n8n executeBatch --concurrency=10 --skipList=/data/skipList.txt`,
`$ n8n executeBatch --debug --output=/data/output.json`,
`$ n8n executeBatch --ids=10,13,15 --shortOutput`,
`$ n8n executeBatch --snapshot=/data/snapshots --shallow`,
`$ n8n executeBatch --compare=/data/previousExecutionData --retries=2`,
'$ n8n executeBatch',
'$ n8n executeBatch --concurrency=10 --skipList=/data/skipList.txt',
'$ n8n executeBatch --debug --output=/data/output.json',
'$ n8n executeBatch --ids=10,13,15 --shortOutput',
'$ n8n executeBatch --snapshot=/data/snapshots --shallow',
'$ n8n executeBatch --compare=/data/previousExecutionData --retries=2',
];
static flags = {
@ -205,11 +205,11 @@ export class ExecuteBatch extends Command {
if (flags.snapshot !== undefined) {
if (fs.existsSync(flags.snapshot)) {
if (!fs.lstatSync(flags.snapshot).isDirectory()) {
console.log(`The parameter --snapshot must be an existing directory`);
console.log('The parameter --snapshot must be an existing directory');
return;
}
} else {
console.log(`The parameter --snapshot must be an existing directory`);
console.log('The parameter --snapshot must be an existing directory');
return;
}
@ -218,11 +218,11 @@ export class ExecuteBatch extends Command {
if (flags.compare !== undefined) {
if (fs.existsSync(flags.compare)) {
if (!fs.lstatSync(flags.compare).isDirectory()) {
console.log(`The parameter --compare must be an existing directory`);
console.log('The parameter --compare must be an existing directory');
return;
}
} else {
console.log(`The parameter --compare must be an existing directory`);
console.log('The parameter --compare must be an existing directory');
return;
}
@ -232,7 +232,7 @@ export class ExecuteBatch extends Command {
if (flags.output !== undefined) {
if (fs.existsSync(flags.output)) {
if (fs.lstatSync(flags.output).isDirectory()) {
console.log(`The parameter --output must be a writable file`);
console.log('The parameter --output must be a writable file');
return;
}
}
@ -251,7 +251,7 @@ export class ExecuteBatch extends Command {
if (matchedIds.length === 0) {
console.log(
`The parameter --ids must be a list of numeric IDs separated by a comma or a file with this content.`,
'The parameter --ids must be a list of numeric IDs separated by a comma or a file with this content.',
);
return;
}
@ -294,11 +294,11 @@ export class ExecuteBatch extends Command {
const query = Db.collections.Workflow.createQueryBuilder('workflows');
if (ids.length > 0) {
query.andWhere(`workflows.id in (:...ids)`, { ids });
query.andWhere('workflows.id in (:...ids)', { ids });
}
if (skipIds.length > 0) {
query.andWhere(`workflows.id not in (:...skipIds)`, { skipIds });
query.andWhere('workflows.id not in (:...skipIds)', { skipIds });
}
// eslint-disable-next-line prefer-const

View file

@ -18,11 +18,11 @@ export class ExportCredentialsCommand extends Command {
static description = 'Export credentials';
static examples = [
`$ n8n export:credentials --all`,
`$ n8n export:credentials --id=5 --output=file.json`,
`$ n8n export:credentials --all --output=backups/latest.json`,
`$ n8n export:credentials --backup --output=backups/latest/`,
`$ n8n export:credentials --all --decrypted --output=backups/decrypted.json`,
'$ n8n export:credentials --all',
'$ n8n export:credentials --id=5 --output=file.json',
'$ n8n export:credentials --all --output=backups/latest.json',
'$ n8n export:credentials --backup --output=backups/latest/',
'$ n8n export:credentials --all --decrypted --output=backups/decrypted.json',
];
static flags = {
@ -69,25 +69,25 @@ export class ExportCredentialsCommand extends Command {
}
if (!flags.all && !flags.id) {
console.info(`Either option "--all" or "--id" have to be set!`);
console.info('Either option "--all" or "--id" have to be set!');
return;
}
if (flags.all && flags.id) {
console.info(`You should either use "--all" or "--id" but never both!`);
console.info('You should either use "--all" or "--id" but never both!');
return;
}
if (flags.separate) {
try {
if (!flags.output) {
console.info(`You must inform an output directory via --output when using --separate`);
console.info('You must inform an output directory via --output when using --separate');
return;
}
if (fs.existsSync(flags.output)) {
if (!fs.lstatSync(flags.output).isDirectory()) {
console.info(`The parameter --output must be a directory`);
console.info('The parameter --output must be a directory');
return;
}
} else {
@ -106,7 +106,7 @@ export class ExportCredentialsCommand extends Command {
} else if (flags.output) {
if (fs.existsSync(flags.output)) {
if (fs.lstatSync(flags.output).isDirectory()) {
console.info(`The parameter --output must be a writeable file`);
console.info('The parameter --output must be a writeable file');
return;
}
}

View file

@ -14,10 +14,10 @@ export class ExportWorkflowsCommand extends Command {
static description = 'Export workflows';
static examples = [
`$ n8n export:workflow --all`,
`$ n8n export:workflow --id=5 --output=file.json`,
`$ n8n export:workflow --all --output=backups/latest/`,
`$ n8n export:workflow --backup --output=backups/latest/`,
'$ n8n export:workflow --all',
'$ n8n export:workflow --id=5 --output=file.json',
'$ n8n export:workflow --all --output=backups/latest/',
'$ n8n export:workflow --backup --output=backups/latest/',
];
static flags = {
@ -60,25 +60,25 @@ export class ExportWorkflowsCommand extends Command {
}
if (!flags.all && !flags.id) {
console.info(`Either option "--all" or "--id" have to be set!`);
console.info('Either option "--all" or "--id" have to be set!');
return;
}
if (flags.all && flags.id) {
console.info(`You should either use "--all" or "--id" but never both!`);
console.info('You should either use "--all" or "--id" but never both!');
return;
}
if (flags.separate) {
try {
if (!flags.output) {
console.info(`You must inform an output directory via --output when using --separate`);
console.info('You must inform an output directory via --output when using --separate');
return;
}
if (fs.existsSync(flags.output)) {
if (!fs.lstatSync(flags.output).isDirectory()) {
console.info(`The parameter --output must be a directory`);
console.info('The parameter --output must be a directory');
return;
}
} else {
@ -97,7 +97,7 @@ export class ExportWorkflowsCommand extends Command {
} else if (flags.output) {
if (fs.existsSync(flags.output)) {
if (fs.lstatSync(flags.output).isDirectory()) {
console.info(`The parameter --output must be a writeable file`);
console.info('The parameter --output must be a writeable file');
return;
}
}

View file

@ -10,7 +10,7 @@ import { SETTINGS_LICENSE_CERT_KEY } from '@/constants';
export class ClearLicenseCommand extends Command {
static description = 'Clear license';
static examples = [`$ n8n clear:license`];
static examples = ['$ n8n clear:license'];
async run() {
const logger = getLogger();

View file

@ -55,10 +55,10 @@ export class Start extends Command {
static description = 'Starts n8n. Makes Web-UI available and starts active workflows';
static examples = [
`$ n8n start`,
`$ n8n start --tunnel`,
`$ n8n start -o`,
`$ n8n start --tunnel -o`,
'$ n8n start',
'$ n8n start --tunnel',
'$ n8n start -o',
'$ n8n start --tunnel -o',
];
static flags = {
@ -117,7 +117,7 @@ export class Start extends Command {
setTimeout(() => {
// In case that something goes wrong with shutdown we
// kill after max. 30 seconds no matter what
console.log(`process exited after 30s`);
console.log('process exited after 30s');
exit();
}, 30000);
@ -499,7 +499,7 @@ export class Start extends Command {
if (flags.open) {
Start.openBrowser();
}
this.log(`\nPress "o" to open in Browser.`);
this.log('\nPress "o" to open in Browser.');
process.stdin.on('data', (key: string) => {
if (key === 'o') {
Start.openBrowser();

View file

@ -13,8 +13,8 @@ export class UpdateWorkflowCommand extends Command {
static description = 'Update workflows';
static examples = [
`$ n8n update:workflow --all --active=false`,
`$ n8n update:workflow --id=5 --active=true`,
'$ n8n update:workflow --all --active=false',
'$ n8n update:workflow --id=5 --active=true',
];
static flags = {
@ -39,24 +39,24 @@ export class UpdateWorkflowCommand extends Command {
const { flags } = this.parse(UpdateWorkflowCommand);
if (!flags.all && !flags.id) {
console.info(`Either option "--all" or "--id" have to be set!`);
console.info('Either option "--all" or "--id" have to be set!');
return;
}
if (flags.all && flags.id) {
console.info(
`Either something else on top should be "--all" or "--id" can be set never both!`,
'Either something else on top should be "--all" or "--id" can be set never both!',
);
return;
}
const updateQuery: IDataObject = {};
if (flags.active === undefined) {
console.info(`No update flag like "--active=true" has been set!`);
console.info('No update flag like "--active=true" has been set!');
return;
}
if (!['false', 'true'].includes(flags.active)) {
console.info(`Valid values for flag "--active" are only "false" or "true"!`);
console.info('Valid values for flag "--active" are only "false" or "true"!');
return;
}
updateQuery.active = flags.active === 'true';

View file

@ -31,7 +31,7 @@ let processExitCode = 0;
export class Webhook extends Command {
static description = 'Starts n8n webhook process. Intercepts only production URLs.';
static examples = [`$ n8n webhook`];
static examples = ['$ n8n webhook'];
static flags = {
help: flags.help({ char: 'h' }),
@ -44,7 +44,7 @@ export class Webhook extends Command {
*/
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
static async stopProcess() {
LoggerProxy.info(`\nStopping n8n...`);
LoggerProxy.info('\nStopping n8n...');
const exit = () => {
CrashJournal.cleanup().finally(() => {

View file

@ -47,7 +47,7 @@ import { generateFailedExecutionFromError } from '@/WorkflowHelpers';
export class Worker extends Command {
static description = '\nStarts a n8n worker';
static examples = [`$ n8n worker --concurrency=5`];
static examples = ['$ n8n worker --concurrency=5'];
static flags = {
help: flags.help({ char: 'h' }),
@ -72,7 +72,7 @@ export class Worker extends Command {
* get removed.
*/
static async stopProcess() {
LoggerProxy.info(`Stopping n8n...`);
LoggerProxy.info('Stopping n8n...');
// Stop accepting new jobs
// eslint-disable-next-line @typescript-eslint/no-floating-promises

View file

@ -833,7 +833,7 @@ export const schema = {
env: 'N8N_VERSION_NOTIFICATIONS_ENDPOINT',
},
infoUrl: {
doc: `Url in New Versions Panel with more information on updating one's instance.`,
doc: "Url in New Versions Panel with more information on updating one's instance.",
format: String,
default: 'https://docs.n8n.io/getting-started/installation/updating.html',
env: 'N8N_VERSION_NOTIFICATIONS_INFO_URL',

View file

@ -60,7 +60,7 @@ EECredentialsController.get(
const includeDecryptedData = req.query.includeData === 'true';
if (Number.isNaN(Number(credentialId))) {
throw new ResponseHelper.BadRequestError(`Credential ID must be a number.`);
throw new ResponseHelper.BadRequestError('Credential ID must be a number.');
}
let credential = (await EECredentials.get(
@ -77,7 +77,7 @@ EECredentialsController.get(
const userSharing = credential.shared?.find((shared) => shared.user.id === req.user.id);
if (!userSharing && req.user.globalRole.name !== 'owner') {
throw new ResponseHelper.UnauthorizedError(`Forbidden.`);
throw new ResponseHelper.UnauthorizedError('Forbidden.');
}
credential = EECredentials.addOwnerAndSharings(credential);
@ -124,7 +124,7 @@ EECredentialsController.post(
const sharing = await EECredentials.getSharing(req.user, credentials.id);
if (!ownsCredential) {
if (!sharing) {
throw new ResponseHelper.UnauthorizedError(`Forbidden`);
throw new ResponseHelper.UnauthorizedError('Forbidden');
}
const decryptedData = await EECredentials.decrypt(encryptionKey, sharing.credentials);

View file

@ -75,7 +75,7 @@ credentialsController.get(
const includeDecryptedData = req.query.includeData === 'true';
if (Number.isNaN(Number(credentialId))) {
throw new ResponseHelper.BadRequestError(`Credential ID must be a number.`);
throw new ResponseHelper.BadRequestError('Credential ID must be a number.');
}
const sharing = await CredentialsService.getSharing(req.user, credentialId, ['credentials']);

View file

@ -5,7 +5,7 @@ import config from '@/config';
const dbType = config.getEnv('database.type');
const timestampSyntax = {
sqlite: `STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')`,
sqlite: "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')",
postgresdb: 'CURRENT_TIMESTAMP(3)',
mysqldb: 'CURRENT_TIMESTAMP(3)',
mariadb: 'CURRENT_TIMESTAMP(3)',

View file

@ -155,7 +155,7 @@ export class ExecutionsService {
filter: req.query.filter,
});
throw new ResponseHelper.InternalServerError(
`Parameter "filter" contained invalid JSON string.`,
'Parameter "filter" contained invalid JSON string.',
);
}
}
@ -211,7 +211,7 @@ export class ExecutionsService {
}
if (executingWorkflowIds.length > 0) {
rangeQuery.push(`id NOT IN (:...executingWorkflowIds)`);
rangeQuery.push('id NOT IN (:...executingWorkflowIds)');
rangeQueryParams.executingWorkflowIds = executingWorkflowIds;
}
@ -440,7 +440,7 @@ export class ExecutionsService {
}
} catch (error) {
throw new ResponseHelper.InternalServerError(
`Parameter "filter" contained invalid JSON string.`,
'Parameter "filter" contained invalid JSON string.',
);
}
}

View file

@ -125,7 +125,7 @@ workflowsController.get(
* GET /workflows/new
*/
workflowsController.get(
`/new`,
'/new',
ResponseHelper.send(async (req: WorkflowRequest.NewName) => {
const requestedName =
req.query.name && req.query.name !== ''
@ -148,14 +148,14 @@ workflowsController.get(
* GET /workflows/from-url
*/
workflowsController.get(
`/from-url`,
'/from-url',
ResponseHelper.send(async (req: express.Request): Promise<IWorkflowResponse> => {
if (req.query.url === undefined) {
throw new ResponseHelper.BadRequestError(`The parameter "url" is missing!`);
throw new ResponseHelper.BadRequestError('The parameter "url" is missing!');
}
if (!/^http[s]?:\/\/.*\.json$/i.exec(req.query.url as string)) {
throw new ResponseHelper.BadRequestError(
`The parameter "url" is not valid! It does not seem to be a URL pointing to a n8n workflow JSON file.`,
'The parameter "url" is not valid! It does not seem to be a URL pointing to a n8n workflow JSON file.',
);
}
let workflowData: IWorkflowResponse | undefined;
@ -163,7 +163,7 @@ workflowsController.get(
const { data } = await axios.get<IWorkflowResponse>(req.query.url as string);
workflowData = data;
} catch (error) {
throw new ResponseHelper.BadRequestError(`The URL does not point to valid JSON file!`);
throw new ResponseHelper.BadRequestError('The URL does not point to valid JSON file!');
}
// Do a very basic check if it is really a n8n-workflow-json
@ -176,7 +176,7 @@ workflowsController.get(
Array.isArray(workflowData.connections)
) {
throw new ResponseHelper.BadRequestError(
`The data in the file does not seem to be a n8n workflow JSON file!`,
'The data in the file does not seem to be a n8n workflow JSON file!',
);
}
@ -227,7 +227,7 @@ workflowsController.get(
* PATCH /workflows/:id
*/
workflowsController.patch(
`/:id`,
'/:id',
ResponseHelper.send(async (req: WorkflowRequest.Update) => {
const { id: workflowId } = req.params;
@ -253,7 +253,7 @@ workflowsController.patch(
* DELETE /workflows/:id
*/
workflowsController.delete(
`/:id`,
'/:id',
ResponseHelper.send(async (req: WorkflowRequest.Delete) => {
const { id: workflowId } = req.params;

View file

@ -151,7 +151,7 @@ export class WorkflowsService {
filter,
});
throw new ResponseHelper.InternalServerError(
`Parameter "filter" contained invalid JSON string.`,
'Parameter "filter" contained invalid JSON string.',
);
}
}

View file

@ -78,7 +78,7 @@ export class Credentials extends ICredentials {
const fullData = this.getData(encryptionKey, nodeType);
if (fullData === null) {
throw new Error(`No data was set.`);
throw new Error('No data was set.');
}
// eslint-disable-next-line no-prototype-builtins
@ -94,7 +94,7 @@ export class Credentials extends ICredentials {
*/
getDataToSave(): ICredentialsEncrypted {
if (this.data === undefined) {
throw new Error(`No credentials were set to save.`);
throw new Error('No credentials were set to save.');
}
return {

View file

@ -512,7 +512,7 @@ function digestAuthAxiosConfig(
.split(',')
.map((v: string) => v.split('='));
if (authDetails) {
const nonceCount = `000000001`;
const nonceCount = '000000001';
const cnonce = crypto.randomBytes(24).toString('hex');
const realm: string = authDetails
.find((el: any) => el[0].toLowerCase().indexOf('realm') > -1)[1]

View file

@ -1265,7 +1265,7 @@ export class WorkflowExecute {
const fullRunData = this.getFullRunData(startedAt);
if (executionError !== undefined) {
Logger.verbose(`Workflow execution finished with error`, {
Logger.verbose('Workflow execution finished with error', {
error: executionError,
workflowId: workflow.id,
});
@ -1281,7 +1281,7 @@ export class WorkflowExecute {
});
fullRunData.waitTill = this.runExecutionData.waitTill;
} else {
Logger.verbose(`Workflow execution finished successfully`, { workflowId: workflow.id });
Logger.verbose('Workflow execution finished successfully', { workflowId: workflow.id });
fullRunData.finished = true;
}

View file

@ -30,7 +30,7 @@ const template: StoryFn = (args, { argTypes }) => ({
components: {
N8nActionDropdown,
},
template: `<n8n-action-dropdown v-bind="$props" />`,
template: '<n8n-action-dropdown v-bind="$props" />',
});
export const defaultActionDropdown = template.bind({});

View file

@ -14,7 +14,7 @@ export const Default: StoryFn = (args, { argTypes }) => ({
components: {
N8nCard,
},
template: `<n8n-card v-bind="$props">This is a card.</n8n-card>`,
template: '<n8n-card v-bind="$props">This is a card.</n8n-card>',
});
export const Hoverable: StoryFn = (args, { argTypes }) => ({

View file

@ -40,7 +40,8 @@ const Template: StoryFn = (args, { argTypes }) => ({
export const Markdown = Template.bind({});
Markdown.args = {
content: `I wanted a system to monitor website content changes and notify me. So I made it using n8n.\n\nEspecially my competitor blogs. I wanted to know how often they are posting new articles. (I used their sitemap.xml file) (The below workflow may vary)\n\nIn the Below example, I used HackerNews for example.\n\nExplanation:\n\n- First HTTP Request node crawls the webpage and grabs the website source code\n- Then wait for x minutes\n- Again, HTTP Node crawls the webpage\n- If Node compares both results are equal if anything is changed. Itll go to the false branch and notify me in telegram.\n\n**Workflow:**\n\n![](fileId:1)\n\n**Sample Response:**\n\n![](https://community.n8n.io/uploads/default/original/2X/d/d21ba41d7ac9ff5cd8148fedb07d0f1ff53b2529.png)\n`,
content:
'I wanted a system to monitor website content changes and notify me. So I made it using n8n.\n\nEspecially my competitor blogs. I wanted to know how often they are posting new articles. (I used their sitemap.xml file) (The below workflow may vary)\n\nIn the Below example, I used HackerNews for example.\n\nExplanation:\n\n- First HTTP Request node crawls the webpage and grabs the website source code\n- Then wait for x minutes\n- Again, HTTP Node crawls the webpage\n- If Node compares both results are equal if anything is changed. Itll go to the false branch and notify me in telegram.\n\n**Workflow:**\n\n![](fileId:1)\n\n**Sample Response:**\n\n![](https://community.n8n.io/uploads/default/original/2X/d/d21ba41d7ac9ff5cd8148fedb07d0f1ff53b2529.png)\n',
loading: false,
images: [
{

View file

@ -144,7 +144,7 @@ export default Vue.extend({
// Return nothing, means keep the default handling measure
},
onTag(tag, code) {
if (tag === 'img' && code.includes(`alt="workflow-screenshot"`)) {
if (tag === 'img' && code.includes('alt="workflow-screenshot"')) {
return '';
}
// return nothing, keep tag

View file

@ -17,7 +17,8 @@ const SlotTemplate: StoryFn = (args, { argTypes }) => ({
components: {
N8nNotice,
},
template: `<n8n-notice v-bind="$props">This is a notice! Thread carefully from this point forward.</n8n-notice>`,
template:
'<n8n-notice v-bind="$props">This is a notice! Thread carefully from this point forward.</n8n-notice>',
});
const PropTemplate: StoryFn = (args, { argTypes }) => ({
@ -25,7 +26,7 @@ const PropTemplate: StoryFn = (args, { argTypes }) => ({
components: {
N8nNotice,
},
template: `<n8n-notice v-bind="$props"/>`,
template: '<n8n-notice v-bind="$props"/>',
});
export const Warning = SlotTemplate.bind({});

View file

@ -60,8 +60,10 @@ export const Sticky = Template.bind({});
Sticky.args = {
height: 160,
width: 150,
content: `## I'm a note \n**Double click** to edit me. [Guide](https://docs.n8n.io/workflows/sticky-notes/)`,
defaultText: `## I'm a note \n**Double click** to edit me. [Guide](https://docs.n8n.io/workflows/sticky-notes/)`,
content:
"## I'm a note \n**Double click** to edit me. [Guide](https://docs.n8n.io/workflows/sticky-notes/)",
defaultText:
"## I'm a note \n**Double click** to edit me. [Guide](https://docs.n8n.io/workflows/sticky-notes/)",
minHeight: 80,
minWidth: 150,
readOnly: false,

View file

@ -10,7 +10,7 @@ const Template: StoryFn = (args, { argTypes }) => ({
components: {
SpacingPreview,
},
template: `<spacing-preview v-bind="$props" />`,
template: '<spacing-preview v-bind="$props" />',
});
export const Padding = Template.bind({});

View file

@ -29,7 +29,7 @@ export async function createNewCredential(
context: IRestApiContext,
data: ICredentialsDecrypted,
): Promise<ICredentialsResponse> {
return makeRestApiRequest(context, 'POST', `/credentials`, data as unknown as IDataObject);
return makeRestApiRequest(context, 'POST', '/credentials', data as unknown as IDataObject);
}
export async function deleteCredential(context: IRestApiContext, id: string): Promise<boolean> {
@ -61,7 +61,7 @@ export async function oAuth1CredentialAuthorize(
return makeRestApiRequest(
context,
'GET',
`/oauth1-credential/auth`,
'/oauth1-credential/auth',
data as unknown as IDataObject,
);
}
@ -74,7 +74,7 @@ export async function oAuth2CredentialAuthorize(
return makeRestApiRequest(
context,
'GET',
`/oauth2-credential/auth`,
'/oauth2-credential/auth',
data as unknown as IDataObject,
);
}

View file

@ -88,14 +88,14 @@ export function updateCurrentUser(
context: IRestApiContext,
params: { id: string; firstName: string; lastName: string; email: string },
): Promise<IUserResponse> {
return makeRestApiRequest(context, 'PATCH', `/me`, params as unknown as IDataObject);
return makeRestApiRequest(context, 'PATCH', '/me', params as unknown as IDataObject);
}
export function updateCurrentUserPassword(
context: IRestApiContext,
params: { newPassword: string; currentPassword: string },
): Promise<void> {
return makeRestApiRequest(context, 'PATCH', `/me/password`, params);
return makeRestApiRequest(context, 'PATCH', '/me/password', params);
}
export async function deleteUser(

View file

@ -3,7 +3,7 @@ import { IDataObject } from 'n8n-workflow';
import { makeRestApiRequest } from '@/utils';
export async function getNewWorkflow(context: IRestApiContext, name?: string) {
const response = await makeRestApiRequest(context, 'GET', `/workflows/new`, name ? { name } : {});
const response = await makeRestApiRequest(context, 'GET', '/workflows/new', name ? { name } : {});
return {
name: response.name,
onboardingFlowEnabled: response.onboardingFlowEnabled === true,
@ -13,11 +13,11 @@ export async function getNewWorkflow(context: IRestApiContext, name?: string) {
export async function getWorkflows(context: IRestApiContext, filter?: object) {
const sendData = filter ? { filter } : undefined;
return await makeRestApiRequest(context, 'GET', `/workflows`, sendData);
return await makeRestApiRequest(context, 'GET', '/workflows', sendData);
}
export async function getActiveWorkflows(context: IRestApiContext) {
return await makeRestApiRequest(context, 'GET', `/active`);
return await makeRestApiRequest(context, 'GET', '/active');
}
export async function getCurrentExecutions(context: IRestApiContext, filter: IDataObject) {

View file

@ -122,11 +122,11 @@ export default mixins(genericHelpers, workflowHelpers).extend({
const proxy = dataProxy.getDataProxy();
const autoCompleteItems = [
`function $evaluateExpression(expression: string, itemIndex?: number): any {};`,
`function getNodeParameter(parameterName: string, itemIndex: number, fallbackValue?: any): any {};`,
`function getWorkflowStaticData(type: string): {};`,
`function $item(itemIndex: number, runIndex?: number): {};`,
`function $items(nodeName?: string, outputIndex?: number, runIndex?: number): {};`,
'function $evaluateExpression(expression: string, itemIndex?: number): any {};',
'function getNodeParameter(parameterName: string, itemIndex: number, fallbackValue?: any): any {};',
'function getWorkflowStaticData(type: string): {};',
'function $item(itemIndex: number, runIndex?: number): {};',
'function $items(nodeName?: string, outputIndex?: number, runIndex?: number): {};',
];
const baseKeys = [
@ -194,7 +194,7 @@ export default mixins(genericHelpers, workflowHelpers).extend({
} catch (error) {}
}
autoCompleteItems.push(`const $node = ${JSON.stringify(nodes)}`);
autoCompleteItems.push(`function $jmespath(jsonDoc: object, query: string): {};`);
autoCompleteItems.push('function $jmespath(jsonDoc: object, query: string): {};');
if (this.codeAutocomplete === 'function') {
if (connectionInputData) {
@ -204,13 +204,13 @@ export default mixins(genericHelpers, workflowHelpers).extend({
)}`,
);
} else {
autoCompleteItems.push(`const items: {json: {[key: string]: any}}[] = []`);
autoCompleteItems.push('const items: {json: {[key: string]: any}}[] = []');
}
} else if (this.codeAutocomplete === 'functionItem') {
if (connectionInputData) {
autoCompleteItems.push(`const item = $json`);
autoCompleteItems.push('const item = $json');
} else {
autoCompleteItems.push(`const item: {[key: string]: any} = {}`);
autoCompleteItems.push('const item: {[key: string]: any} = {}');
}
}

View file

@ -919,7 +919,8 @@ export default mixins(showMessage, nodeHelpers).extend({
return;
}
const params = `scrollbars=no,resizable=yes,status=no,titlebar=noe,location=no,toolbar=no,menubar=no,width=500,height=700`;
const params =
'scrollbars=no,resizable=yes,status=no,titlebar=noe,location=no,toolbar=no,menubar=no,width=500,height=700';
const oauthPopup = window.open(url, 'OAuth2 Authorization', params);
Vue.set(this.credentialData, 'oauthTokenData', null);

View file

@ -339,7 +339,7 @@ export default mixins(
nodeTitle(): string {
if (this.data.name === 'Start') {
return this.$locale.headerText({
key: `headers.start.displayName`,
key: 'headers.start.displayName',
fallback: 'Start',
});
}

View file

@ -132,7 +132,7 @@ export default mixins(genericHelpers, nodeHelpers, pinData, copyPaste).extend({
let startPath = `$node["${this.node!.name}"].json`;
if (this.distanceFromActive === 1) {
startPath = `$json`;
startPath = '$json';
}
return { path, startPath };

View file

@ -68,9 +68,11 @@ import { mapStores } from 'pinia';
import { useSettingsStore } from '@/stores/settings';
import { useRootStore } from '@/stores/n8nRootStore';
const DEFAULT_TITLE = `How likely are you to recommend n8n to a friend or colleague?`;
const GREAT_FEEDBACK_TITLE = `Great to hear! Can we reach out to see how we can make n8n even better for you?`;
const DEFAULT_FEEDBACK_TITLE = `Thanks for your feedback! We'd love to understand how we can improve. Can we reach out?`;
const DEFAULT_TITLE = 'How likely are you to recommend n8n to a friend or colleague?';
const GREAT_FEEDBACK_TITLE =
'Great to hear! Can we reach out to see how we can make n8n even better for you?';
const DEFAULT_FEEDBACK_TITLE =
"Thanks for your feedback! We'd love to understand how we can improve. Can we reach out?";
export default mixins(workflowHelpers).extend({
name: 'ValueSurvey',
@ -164,7 +166,8 @@ export default mixins(workflowHelpers).extend({
});
this.$showMessage({
title: 'Thanks for your feedback',
message: `If youd like to help even more, leave us a <a target="_blank" href="https://www.g2.com/products/n8n/reviews/start">review on G2</a>.`,
message:
'If youd like to help even more, leave us a <a target="_blank" href="https://www.g2.com/products/n8n/reviews/start">review on G2</a>.',
type: 'success',
duration: 15000,
});

View file

@ -450,7 +450,7 @@ export default mixins(externalHooks, genericHelpers, restApi, showMessage).exten
if (!this.workflowId || this.workflowId === PLACEHOLDER_EMPTY_WORKFLOW_ID) {
this.$showMessage({
title: 'No workflow active',
message: `No workflow active to display settings of.`,
message: 'No workflow active to display settings of.',
type: 'error',
duration: 0,
});

View file

@ -370,7 +370,7 @@ export default mixins(showMessage).extend({
if (!isNewSharee && isLastUserWithAccessToCredentials) {
confirm = await this.confirmMessage(
this.$locale.baseText(
`workflows.shareModal.list.delete.confirm.lastUserWithAccessToCredentials.message`,
'workflows.shareModal.list.delete.confirm.lastUserWithAccessToCredentials.message',
{
interpolate: { name: user.fullName as string, workflow: this.workflow.name },
},

View file

@ -56,15 +56,16 @@ export const BREAKPOINT_MD = 992;
export const BREAKPOINT_LG = 1200;
export const BREAKPOINT_XL = 1920;
export const N8N_IO_BASE_URL = `https://api.n8n.io/api/`;
export const N8N_IO_BASE_URL = 'https://api.n8n.io/api/';
export const DOCS_DOMAIN = 'docs.n8n.io';
export const BUILTIN_NODES_DOCS_URL = `https://${DOCS_DOMAIN}/integrations/builtin/`;
export const BUILTIN_CREDENTIALS_DOCS_URL = `https://${DOCS_DOMAIN}/integrations/builtin/credentials/`;
export const DATA_PINNING_DOCS_URL = `https://${DOCS_DOMAIN}/data/data-pinning/`;
export const DATA_EDITING_DOCS_URL = `https://${DOCS_DOMAIN}/data/data-editing/`;
export const NPM_COMMUNITY_NODE_SEARCH_API_URL = `https://api.npms.io/v2/`;
export const NPM_PACKAGE_DOCS_BASE_URL = `https://www.npmjs.com/package/`;
export const NPM_KEYWORD_SEARCH_URL = `https://www.npmjs.com/search?q=keywords%3An8n-community-node-package`;
export const NPM_COMMUNITY_NODE_SEARCH_API_URL = 'https://api.npms.io/v2/';
export const NPM_PACKAGE_DOCS_BASE_URL = 'https://www.npmjs.com/package/';
export const NPM_KEYWORD_SEARCH_URL =
'https://www.npmjs.com/search?q=keywords%3An8n-community-node-package';
export const N8N_QUEUE_MODE_DOCS_URL = `https://${DOCS_DOMAIN}/hosting/scaling/queue-mode/`;
export const COMMUNITY_NODES_INSTALLATION_DOCS_URL = `https://${DOCS_DOMAIN}/integrations/community-nodes/installation/`;
export const COMMUNITY_NODES_NPM_INSTALLATION_URL =

View file

@ -113,7 +113,7 @@ export const historyHelper = mixins(debounceHelper, deviceSupportHelpers).extend
if (this.isNDVOpen && !event.shiftKey) {
const activeNode = this.ndvStore.activeNode;
if (activeNode) {
this.$telemetry.track(`User hit undo in NDV`, { node_type: activeNode.type });
this.$telemetry.track('User hit undo in NDV', { node_type: activeNode.type });
}
}
},

View file

@ -22,7 +22,7 @@ export const newVersions = mixins(showMessage).extend({
const nextVersions = this.versionsStore.nextVersions;
if (currentVersion && currentVersion.hasSecurityIssue && nextVersions.length) {
const fixVersion = currentVersion.securityIssueFixVersion;
let message = `Please update to latest version.`;
let message = 'Please update to latest version.';
if (fixVersion) {
message = `Please update to version ${fixVersion} or higher.`;
}

View file

@ -70,7 +70,7 @@ export const restApi = Vue.extend({
return makeRestApiRequest(self.rootStore.getRestApiContext, method, endpoint, data);
},
getActiveWorkflows: (): Promise<string[]> => {
return self.restApi().makeRestApiRequest('GET', `/active`);
return self.restApi().makeRestApiRequest('GET', '/active');
},
getActivationError: (id: string): Promise<IActivationError | undefined> => {
return self.restApi().makeRestApiRequest('GET', `/active/error/${id}`);
@ -82,7 +82,7 @@ export const restApi = Vue.extend({
filter,
};
}
return self.restApi().makeRestApiRequest('GET', `/executions-current`, sendData);
return self.restApi().makeRestApiRequest('GET', '/executions-current', sendData);
},
stopCurrentExecution: (executionId: string): Promise<IExecutionsStopData> => {
return self
@ -103,12 +103,12 @@ export const restApi = Vue.extend({
// Execute a workflow
runWorkflow: async (startRunData: IStartRunData): Promise<IExecutionPushResponse> => {
return self.restApi().makeRestApiRequest('POST', `/workflows/run`, startRunData);
return self.restApi().makeRestApiRequest('POST', '/workflows/run', startRunData);
},
// Creates a new workflow
createNewWorkflow: (sendData: IWorkflowDataUpdate): Promise<IWorkflowDb> => {
return self.restApi().makeRestApiRequest('POST', `/workflows`, sendData);
return self.restApi().makeRestApiRequest('POST', '/workflows', sendData);
},
// Updates an existing workflow
@ -144,12 +144,12 @@ export const restApi = Vue.extend({
filter,
};
}
return self.restApi().makeRestApiRequest('GET', `/workflows`, sendData);
return self.restApi().makeRestApiRequest('GET', '/workflows', sendData);
},
// Returns a workflow from a given URL
getWorkflowFromUrl: (url: string): Promise<IWorkflowDb> => {
return self.restApi().makeRestApiRequest('GET', `/workflows/from-url`, { url });
return self.restApi().makeRestApiRequest('GET', '/workflows/from-url', { url });
},
// Returns the execution with the given name
@ -160,7 +160,7 @@ export const restApi = Vue.extend({
// Deletes executions
deleteExecutions: (sendData: IExecutionDeleteFilter): Promise<void> => {
return self.restApi().makeRestApiRequest('POST', `/executions/delete`, sendData);
return self.restApi().makeRestApiRequest('POST', '/executions/delete', sendData);
},
// Returns the execution with the given name
@ -192,12 +192,12 @@ export const restApi = Vue.extend({
};
}
return self.restApi().makeRestApiRequest('GET', `/executions`, sendData);
return self.restApi().makeRestApiRequest('GET', '/executions', sendData);
},
// Returns all the available timezones
getTimezones: (): Promise<IDataObject> => {
return self.restApi().makeRestApiRequest('GET', `/options/timezones`);
return self.restApi().makeRestApiRequest('GET', '/options/timezones');
},
// Binary data

View file

@ -22,7 +22,7 @@ export const titleChange = Vue.extend({
},
$titleReset() {
document.title = `n8n - Workflow Automation`;
document.title = 'n8n - Workflow Automation';
},
},
});

View file

@ -22,7 +22,7 @@ describe('Utils', () => {
[1, false],
[false, true],
[true, false],
])(`for value %s should return %s`, (value, expected) => {
])('for value %s should return %s', (value, expected) => {
expect(isEmpty(value)).toBe(expected);
});
});
@ -212,7 +212,7 @@ describe('Utils', () => {
{ overwriteArrays: true },
{ a: 3, b: [{ z: 'c' }], c: '2', d: '3' },
],
])(`case %#. input %j, options %j should return %j`, (sources, options, expected) => {
])('case %#. input %j, options %j should return %j', (sources, options, expected) => {
expect(mergeDeep([...sources], options)).toEqual(expected);
});
});

View file

@ -381,11 +381,11 @@ export const showOrHideItemsLabel = (connection: Connection) => {
export const getIcon = (name: string): string => {
if (name === 'trash') {
return `<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="trash" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="svg-inline--fa fa-trash fa-w-14 Icon__medium_ctPPJ"><path data-v-66d5c7e2="" fill="currentColor" d="M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z" class=""></path></svg>`;
return '<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="trash" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="svg-inline--fa fa-trash fa-w-14 Icon__medium_ctPPJ"><path data-v-66d5c7e2="" fill="currentColor" d="M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z" class=""></path></svg>';
}
if (name === 'plus') {
return `<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="plus" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="svg-inline--fa fa-plus fa-w-14 Icon__medium_ctPPJ"><path data-v-301ed208="" fill="currentColor" d="M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z" class=""></path></svg>`;
return '<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="plus" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="svg-inline--fa fa-plus fa-w-14 Icon__medium_ctPPJ"><path data-v-301ed208="" fill="currentColor" d="M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z" class=""></path></svg>';
}
return '';

View file

@ -238,7 +238,7 @@ export const getSchema = (input: Optional<Primitives | object>, path = ''): Sche
}
break;
case 'function':
schema = { type: 'function', value: ``, path };
schema = { type: 'function', value: '', path };
break;
default:
schema = { type: typeof input, value: String(input), path };

View file

@ -139,7 +139,7 @@ export default mixins(workflowHelpers).extend({
if (collection) {
setPageTitle(`n8n - Template collection: ${collection.name}`);
} else {
setPageTitle(`n8n - Templates`);
setPageTitle('n8n - Templates');
}
},
},

View file

@ -127,7 +127,7 @@ export default mixins(workflowHelpers).extend({
if (template) {
setPageTitle(`n8n - Template template: ${template.name}`);
} else {
setPageTitle(`n8n - Templates`);
setPageTitle('n8n - Templates');
}
},
},

View file

@ -7,9 +7,9 @@ export class Build extends Command {
static description = 'Builds credentials and nodes and copies it to n8n custom extension folder';
static examples = [
`$ n8n-node-dev build`,
`$ n8n-node-dev build --destination ~/n8n-nodes`,
`$ n8n-node-dev build --watch`,
'$ n8n-node-dev build',
'$ n8n-node-dev build --destination ~/n8n-nodes',
'$ n8n-node-dev build --watch',
];
static flags = {

View file

@ -18,7 +18,7 @@ const fsAccess = promisify(fs.access);
export class New extends Command {
static description = 'Create new credentials/node';
static examples = [`$ n8n-node-dev new`];
static examples = ['$ n8n-node-dev new'];
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
async run() {

View file

@ -39,7 +39,7 @@ export class BeeminderApi implements ICredentialType {
test: ICredentialTestRequest = {
request: {
baseURL: 'https://www.beeminder.com/api/v1',
url: `=/users/{{$credentials.user}}.json`,
url: '=/users/{{$credentials.user}}.json',
},
};
}

View file

@ -40,7 +40,7 @@ export class GhostAdminApi implements ICredentialType {
keyid: id,
algorithm: 'HS256',
expiresIn: '5m',
audience: `/v2/admin/`,
audience: '/v2/admin/',
});
requestOptions.headers = {

View file

@ -48,7 +48,7 @@ export class MailjetEmailApi implements ICredentialType {
test: ICredentialTestRequest = {
request: {
baseURL: `https://api.mailjet.com`,
baseURL: 'https://api.mailjet.com',
url: '/v3/REST/template',
method: 'GET',
},

View file

@ -32,7 +32,7 @@ export class MailjetSmsApi implements ICredentialType {
test: ICredentialTestRequest = {
request: {
baseURL: `https://api.mailjet.com`,
baseURL: 'https://api.mailjet.com',
url: '/v4/sms',
method: 'GET',
},

View file

@ -66,7 +66,7 @@ export class TheHiveApi implements ICredentialType {
test: ICredentialTestRequest = {
request: {
baseURL: `={{$credentials?.url}}`,
baseURL: '={{$credentials?.url}}',
url: '/api/case',
},
};

View file

@ -402,7 +402,7 @@ export class ActiveCampaign implements INodeType {
dataKey = 'contacts';
}
endpoint = `/api/3/contacts`;
endpoint = '/api/3/contacts';
} else if (operation === 'update') {
// ----------------------------------
// contact:update
@ -479,7 +479,7 @@ export class ActiveCampaign implements INodeType {
dataKey = 'accounts';
}
endpoint = `/api/3/accounts`;
endpoint = '/api/3/accounts';
const filters = this.getNodeParameter('filters', i);
Object.assign(qs, filters);
@ -648,7 +648,7 @@ export class ActiveCampaign implements INodeType {
dataKey = 'lists';
}
endpoint = `/api/3/lists`;
endpoint = '/api/3/lists';
}
} else if (resource === 'tag') {
if (operation === 'create') {
@ -704,7 +704,7 @@ export class ActiveCampaign implements INodeType {
dataKey = 'tags';
}
endpoint = `/api/3/tags`;
endpoint = '/api/3/tags';
} else if (operation === 'update') {
// ----------------------------------
// tags:update
@ -811,7 +811,7 @@ export class ActiveCampaign implements INodeType {
dataKey = 'deals';
}
endpoint = `/api/3/deals`;
endpoint = '/api/3/deals';
} else if (operation === 'createNote') {
// ----------------------------------
// deal:createNote
@ -910,7 +910,7 @@ export class ActiveCampaign implements INodeType {
dataKey = 'connections';
}
endpoint = `/api/3/connections`;
endpoint = '/api/3/connections';
} else {
throw new NodeOperationError(
this.getNode(),
@ -1010,7 +1010,7 @@ export class ActiveCampaign implements INodeType {
dataKey = 'ecomOrders';
}
endpoint = `/api/3/ecomOrders`;
endpoint = '/api/3/ecomOrders';
} else {
throw new NodeOperationError(
this.getNode(),
@ -1099,7 +1099,7 @@ export class ActiveCampaign implements INodeType {
dataKey = 'ecomCustomers';
}
endpoint = `/api/3/ecomCustomers`;
endpoint = '/api/3/ecomCustomers';
} else {
throw new NodeOperationError(
this.getNode(),
@ -1145,7 +1145,7 @@ export class ActiveCampaign implements INodeType {
dataKey = 'ecomOrderProducts';
}
endpoint = `/api/3/ecomOrderProducts`;
endpoint = '/api/3/ecomOrderProducts';
} else {
throw new NodeOperationError(
this.getNode(),

View file

@ -132,7 +132,7 @@ export class Affinity implements INodeType {
// select them easily
async getLists(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const lists = await affinityApiRequest.call(this, 'GET', `/lists`);
const lists = await affinityApiRequest.call(this, 'GET', '/lists');
for (const list of lists) {
returnData.push({
name: list.name,
@ -163,7 +163,7 @@ export class Affinity implements INodeType {
//https://api-docs.affinity.co/#get-all-lists
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i);
responseData = await affinityApiRequest.call(this, 'GET', `/lists`, {}, qs);
responseData = await affinityApiRequest.call(this, 'GET', '/lists', {}, qs);
if (!returnAll) {
const limit = this.getNodeParameter('limit', i);
responseData = responseData.splice(0, limit);

View file

@ -172,7 +172,7 @@ export class AgileCrm implements INodeType {
responseData = await agileCrmApiRequestAllItems.call(
this,
'POST',
`api/filters/filter/dynamic-filter`,
'api/filters/filter/dynamic-filter',
body,
undefined,
undefined,
@ -183,7 +183,7 @@ export class AgileCrm implements INodeType {
responseData = await agileCrmApiRequest.call(
this,
'POST',
`api/filters/filter/dynamic-filter`,
'api/filters/filter/dynamic-filter',
body,
undefined,
undefined,

View file

@ -188,7 +188,8 @@ export class ApiTemplateIo implements INodeType {
jsonParameters: [true],
},
},
placeholder: `[ {"name": "text_1", "text": "hello world", "textBackgroundColor": "rgba(246, 243, 243, 0)" } ]`,
placeholder:
'[ {"name": "text_1", "text": "hello world", "textBackgroundColor": "rgba(246, 243, 243, 0)" } ]',
},
{
displayName: 'Properties (JSON)',
@ -202,7 +203,7 @@ export class ApiTemplateIo implements INodeType {
jsonParameters: [true],
},
},
placeholder: `{ "name": "text_1" }`,
placeholder: '{ "name": "text_1" }',
},
{
displayName: 'Overrides',

View file

@ -1860,7 +1860,7 @@ export class Asana implements INodeType {
// Get all users to display them to user so that they can be selected easily
// See: https://developers.asana.com/docs/get-multiple-users
async getUsers(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const endpoint = `/users`;
const endpoint = '/users';
const responseData = await asanaApiRequest.call(this, 'GET', endpoint, {});
if (responseData.data === undefined) {
@ -2026,7 +2026,7 @@ export class Asana implements INodeType {
const returnAll = this.getNodeParameter('returnAll', i);
requestMethod = 'GET';
endpoint = `/tasks`;
endpoint = '/tasks';
Object.assign(qs, filters);
@ -2335,7 +2335,7 @@ export class Asana implements INodeType {
const returnAll = this.getNodeParameter('returnAll', i);
requestMethod = 'GET';
endpoint = `/projects`;
endpoint = '/projects';
if (additionalFields.team) {
qs.team = additionalFields.team;

View file

@ -152,7 +152,7 @@ export class AsanaTrigger implements INodeType {
const resource = this.getNodeParameter('resource') as string;
const endpoint = `/webhooks`;
const endpoint = '/webhooks';
const body = {
resource,

View file

@ -74,7 +74,7 @@ export class Automizy implements INodeType {
this,
'smartLists',
'GET',
`/smart-lists`,
'/smart-lists',
);
for (const list of lists) {
returnData.push({
@ -272,7 +272,7 @@ export class Automizy implements INodeType {
name,
};
responseData = await automizyApiRequest.call(this, 'POST', `/smart-lists`, body);
responseData = await automizyApiRequest.call(this, 'POST', '/smart-lists', body);
responseData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray(responseData),
{ itemData: { item: i } },
@ -319,14 +319,14 @@ export class Automizy implements INodeType {
this,
'smartLists',
'GET',
`/smart-lists`,
'/smart-lists',
{},
qs,
);
} else {
qs.limit = this.getNodeParameter('limit', i);
responseData = await automizyApiRequest.call(this, 'GET', `/smart-lists`, {}, qs);
responseData = await automizyApiRequest.call(this, 'GET', '/smart-lists', {}, qs);
responseData = responseData.smartLists;
}

View file

@ -169,7 +169,7 @@ export class Autopilot implements INodeType {
delete body.newEmail;
}
responseData = await autopilotApiRequest.call(this, 'POST', `/contact`, {
responseData = await autopilotApiRequest.call(this, 'POST', '/contact', {
contact: body,
});
}
@ -198,7 +198,7 @@ export class Autopilot implements INodeType {
this,
'contacts',
'GET',
`/contacts`,
'/contacts',
{},
qs,
);
@ -280,7 +280,7 @@ export class Autopilot implements INodeType {
name,
};
responseData = await autopilotApiRequest.call(this, 'POST', `/list`, body);
responseData = await autopilotApiRequest.call(this, 'POST', '/list', body);
}
if (operation === 'getAll') {

View file

@ -18,7 +18,7 @@ import { get } from 'lodash';
export class AwsSnsTrigger implements INodeType {
description: INodeTypeDescription = {
displayName: 'AWS SNS Trigger',
subtitle: `={{$parameter["topic"].split(':')[5]}}`,
subtitle: '={{$parameter["topic"].split(\':\')[5]}}',
name: 'awsSnsTrigger',
icon: 'file:sns.svg',
group: ['trigger'],

View file

@ -66,7 +66,7 @@ export class AwsCertificateManager implements INodeType {
responseData = await awsApiRequestREST.call(
this,
`acm`,
'acm',
'POST',
'',
JSON.stringify(body),
@ -90,7 +90,7 @@ export class AwsCertificateManager implements INodeType {
responseData = await awsApiRequestREST.call(
this,
`acm`,
'acm',
'POST',
'',
JSON.stringify(body),
@ -148,7 +148,7 @@ export class AwsCertificateManager implements INodeType {
body.MaxItems = this.getNodeParameter('limit', 0);
responseData = await awsApiRequestREST.call(
this,
`acm`,
'acm',
'POST',
'',
JSON.stringify(body),
@ -172,7 +172,7 @@ export class AwsCertificateManager implements INodeType {
responseData = await awsApiRequestREST.call(
this,
`acm`,
'acm',
'POST',
'',
JSON.stringify(body),
@ -196,7 +196,7 @@ export class AwsCertificateManager implements INodeType {
responseData = await awsApiRequestREST.call(
this,
`acm`,
'acm',
'POST',
'',
JSON.stringify(body),

View file

@ -845,7 +845,7 @@ export class AwsSes implements INodeType {
const templateSubject = this.getNodeParameter('templateSubject', i) as string;
const params = [
`Action=CreateCustomVerificationEmailTemplate`,
'Action=CreateCustomVerificationEmailTemplate',
`FailureRedirectionURL=${failureRedirectionURL}`,
`FromEmailAddress=${email}`,
`SuccessRedirectionURL=${successRedirectionURL}`,
@ -869,7 +869,7 @@ export class AwsSes implements INodeType {
const templateName = this.getNodeParameter('templateName', i) as string;
const params = [
`Action=DeleteCustomVerificationEmailTemplate`,
'Action=DeleteCustomVerificationEmailTemplate',
`TemplateName=${templateName}`,
];
@ -935,7 +935,7 @@ export class AwsSes implements INodeType {
const additionalFields = this.getNodeParameter('additionalFields', i);
const params = [
`Action=SendCustomVerificationEmail`,
'Action=SendCustomVerificationEmail',
`TemplateName=${templateName}`,
`EmailAddress=${email}`,
];
@ -961,7 +961,7 @@ export class AwsSes implements INodeType {
const updateFields = this.getNodeParameter('updateFields', i);
const params = [
`Action=UpdateCustomVerificationEmailTemplate`,
'Action=UpdateCustomVerificationEmailTemplate',
`TemplateName=${templateName}`,
];
@ -1018,7 +1018,7 @@ export class AwsSes implements INodeType {
if (isBodyHtml) {
params.push(`Message.Body.Html.Data=${encodeURIComponent(message)}`);
params.push(`Message.Body.Html.Charset=UTF-8`);
params.push('Message.Body.Html.Charset=UTF-8');
} else {
params.push(`Message.Body.Text.Data=${encodeURIComponent(message)}`);
}

View file

@ -25,7 +25,7 @@ export class AwsSqs implements INodeType {
icon: 'file:sqs.svg',
group: ['output'],
version: 1,
subtitle: `={{$parameter["operation"]}}`,
subtitle: '={{$parameter["operation"]}}',
description: 'Sends messages to AWS SQS',
defaults: {
name: 'AWS SQS',
@ -249,7 +249,7 @@ export class AwsSqs implements INodeType {
loadOptions: {
// Get all the available queues to display them to user so that it can be selected easily
async getQueues(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const params = ['Version=2012-11-05', `Action=ListQueues`];
const params = ['Version=2012-11-05', 'Action=ListQueues'];
let data;
try {

View file

@ -147,7 +147,7 @@ export async function validateCredentials(
// Concatenate path and instantiate URL object so it parses correctly query strings
const endpoint = new URL(
getEndpointForService(service, credentials) + `?Action=GetCallerIdentity&Version=2011-06-15`,
getEndpointForService(service, credentials) + '?Action=GetCallerIdentity&Version=2011-06-15',
);
// Sign AWS API request with the user credentials

View file

@ -56,7 +56,7 @@ export async function upload(this: IExecuteFunctions, index: number) {
}
//endpoint
const endpoint = `files`;
const endpoint = 'files';
const { headers } = await apiRequest.call(this, requestMethod, endpoint, {}, {}, body);
return this.helpers.returnJsonArray({ fileId: headers.location.split('/').pop() });
}

View file

@ -235,7 +235,7 @@ export class BitbucketTrigger implements INodeType {
this,
'values',
'GET',
`/workspaces`,
'/workspaces',
);
for (const workspace of workspaces) {
returnData.push({

View file

@ -210,13 +210,13 @@ export class Box implements INodeType {
this,
'entries',
'GET',
`/search`,
'/search',
{},
qs,
);
} else {
qs.limit = this.getNodeParameter('limit', i);
responseData = await boxApiRequest.call(this, 'GET', `/search`, {}, qs);
responseData = await boxApiRequest.call(this, 'GET', '/search', {}, qs);
responseData = responseData.entries;
}
}
@ -262,7 +262,7 @@ export class Box implements INodeType {
body.accessible_by.id = this.getNodeParameter('groupId', i) as string;
}
responseData = await boxApiRequest.call(this, 'POST', `/collaborations`, body, qs);
responseData = await boxApiRequest.call(this, 'POST', '/collaborations', body, qs);
}
// https://developer.box.com/reference/post-files-content
if (operation === 'upload') {
@ -444,13 +444,13 @@ export class Box implements INodeType {
this,
'entries',
'GET',
`/search`,
'/search',
{},
qs,
);
} else {
qs.limit = this.getNodeParameter('limit', i);
responseData = await boxApiRequest.call(this, 'GET', `/search`, {}, qs);
responseData = await boxApiRequest.call(this, 'GET', '/search', {}, qs);
responseData = responseData.entries;
}
}
@ -496,7 +496,7 @@ export class Box implements INodeType {
body.accessible_by.id = this.getNodeParameter('groupId', i) as string;
}
responseData = await boxApiRequest.call(this, 'POST', `/collaborations`, body, qs);
responseData = await boxApiRequest.call(this, 'POST', '/collaborations', body, qs);
}
//https://developer.box.com/guides/folders/single/move/
if (operation === 'update') {

View file

@ -157,7 +157,7 @@ export class Brandfetch implements INodeType {
domain,
};
const response = await brandfetchApiRequest.call(this, 'POST', `/logo`, body);
const response = await brandfetchApiRequest.call(this, 'POST', '/logo', body);
if (download) {
const imageTypes = this.getNodeParameter('imageTypes', i) as string[];
@ -219,7 +219,7 @@ export class Brandfetch implements INodeType {
domain,
};
const response = await brandfetchApiRequest.call(this, 'POST', `/color`, body);
const response = await brandfetchApiRequest.call(this, 'POST', '/color', body);
const executionData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray(response),
{ itemData: { item: i } },
@ -233,7 +233,7 @@ export class Brandfetch implements INodeType {
domain,
};
const response = await brandfetchApiRequest.call(this, 'POST', `/font`, body);
const response = await brandfetchApiRequest.call(this, 'POST', '/font', body);
const executionData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray(response),
{ itemData: { item: i } },
@ -247,7 +247,7 @@ export class Brandfetch implements INodeType {
domain,
};
const response = await brandfetchApiRequest.call(this, 'POST', `/company`, body);
const response = await brandfetchApiRequest.call(this, 'POST', '/company', body);
const executionData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray(response),
{ itemData: { item: i } },
@ -261,7 +261,7 @@ export class Brandfetch implements INodeType {
domain,
};
const response = await brandfetchApiRequest.call(this, 'POST', `/industry`, body);
const response = await brandfetchApiRequest.call(this, 'POST', '/industry', body);
const executionData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray(response),

View file

@ -422,7 +422,8 @@ export const objectFields: INodeProperties[] = [
'/jsonParameters': [true],
},
},
placeholder: `[ { "key": "name", "constraint_type": "text contains", "value": "cafe" } , { "key": "address", "constraint_type": "geographic_search", "value": { "range":10, "origin_address":"New York" } } ]`,
placeholder:
'[ { "key": "name", "constraint_type": "text contains", "value": "cafe" } , { "key": "address", "constraint_type": "geographic_search", "value": { "range":10, "origin_address":"New York" } } ]',
description:
'Refine the list that is returned by the Data API with search constraints, exactly as you define a search in Bubble. See <a href="https://manual.bubble.io/core-resources/api/data-api#search-constraints">link</a>.',
},

View file

@ -493,7 +493,7 @@ export class Chargebee implements INodeType {
}
}
endpoint = `customers`;
endpoint = 'customers';
} else {
throw new NodeOperationError(
this.getNode(),

View file

@ -72,7 +72,7 @@ export class CitrixAdc implements INodeType {
const fileLocation = this.getNodeParameter('fileLocation', i) as string;
const binaryProperty = this.getNodeParameter('binaryProperty', i);
const options = this.getNodeParameter('options', i);
const endpoint = `/config/systemfile`;
const endpoint = '/config/systemfile';
const item = items[i];
@ -197,7 +197,7 @@ export class CitrixAdc implements INodeType {
};
}
const endpoint = `/config/sslcert?action=create`;
const endpoint = '/config/sslcert?action=create';
await citrixADCApiRequest.call(this, 'POST', endpoint, { sslcert: body });
@ -237,7 +237,7 @@ export class CitrixAdc implements INodeType {
});
}
const endpoint = `/config/sslcertkey`;
const endpoint = '/config/sslcertkey';
await citrixADCApiRequest.call(this, 'POST', endpoint, { sslcertkey: body });

View file

@ -82,5 +82,5 @@ export async function getAllCollectionEntries(
export async function getAllCollectionNames(
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
): Promise<string[]> {
return cockpitApiRequest.call(this, 'GET', `/collections/listCollections`, {});
return cockpitApiRequest.call(this, 'GET', '/collections/listCollections', {});
}

View file

@ -11,5 +11,5 @@ export async function getSingleton(
export async function getAllSingletonNames(
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
): Promise<string[]> {
return cockpitApiRequest.call(this, 'GET', `/singletons/listSingletons`, {});
return cockpitApiRequest.call(this, 'GET', '/singletons/listSingletons', {});
}

View file

@ -83,7 +83,7 @@ export class Coda implements INodeType {
async getDocs(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const qs = {};
const docs = await codaApiRequestAllItems.call(this, 'items', 'GET', `/docs`, {}, qs);
const docs = await codaApiRequestAllItems.call(this, 'items', 'GET', '/docs', {}, qs);
for (const doc of docs) {
const docName = doc.name;
const docId = doc.id;

View file

@ -222,7 +222,7 @@ export class CoinGecko implements INodeType {
this,
'',
'GET',
`/coins/markets`,
'/coins/markets',
{},
qs,
);
@ -231,7 +231,7 @@ export class CoinGecko implements INodeType {
qs.per_page = limit;
responseData = await coinGeckoApiRequest.call(this, 'GET', `/coins/markets`, {}, qs);
responseData = await coinGeckoApiRequest.call(this, 'GET', '/coins/markets', {}, qs);
}
}

View file

@ -189,7 +189,7 @@ export class ConvertKit implements INodeType {
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i);
responseData = await convertKitApiRequest.call(this, 'GET', `/custom_fields`);
responseData = await convertKitApiRequest.call(this, 'GET', '/custom_fields');
responseData = responseData.custom_fields;
@ -256,7 +256,7 @@ export class ConvertKit implements INodeType {
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i);
responseData = await convertKitApiRequest.call(this, 'GET', `/forms`);
responseData = await convertKitApiRequest.call(this, 'GET', '/forms');
responseData = responseData.forms;
@ -339,7 +339,7 @@ export class ConvertKit implements INodeType {
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i);
responseData = await convertKitApiRequest.call(this, 'GET', `/sequences`);
responseData = await convertKitApiRequest.call(this, 'GET', '/sequences');
responseData = responseData.courses;
@ -394,7 +394,7 @@ export class ConvertKit implements INodeType {
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i);
responseData = await convertKitApiRequest.call(this, 'GET', `/tags`);
responseData = await convertKitApiRequest.call(this, 'GET', '/tags');
responseData = responseData.tags;

View file

@ -88,7 +88,7 @@ export class Cortex implements INodeType {
const requestResult = await cortexApiRequest.call(
this,
'POST',
`/analyzer/_search?range=all`,
'/analyzer/_search?range=all',
);
const returnData: INodePropertyOptions[] = [];
@ -106,7 +106,7 @@ export class Cortex implements INodeType {
async loadActiveResponders(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
// request the enabled responders from instance
const requestResult = await cortexApiRequest.call(this, 'GET', `/responder`);
const requestResult = await cortexApiRequest.call(this, 'GET', '/responder');
const returnData: INodePropertyOptions[] = [];
for (const responder of requestResult) {

View file

@ -93,7 +93,7 @@ export class CustomerIo implements INodeType {
}
if (operation === 'getAll') {
const endpoint = `/campaigns`;
const endpoint = '/campaigns';
responseData = await customerIoApiRequest.call(this, 'GET', endpoint, body, 'beta');
responseData = responseData.campaigns;
@ -298,7 +298,7 @@ export class CustomerIo implements INodeType {
body.data = data;
}
const endpoint = `/events`;
const endpoint = '/events';
await customerIoApiRequest.call(this, 'POST', endpoint, body, 'tracking');
responseData = {

View file

@ -68,7 +68,7 @@ export class Demio implements INodeType {
// select them easily
async getEvents(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const events = await demioApiRequest.call(this, 'GET', `/events`, {}, { type: 'upcoming' });
const events = await demioApiRequest.call(this, 'GET', '/events', {}, { type: 'upcoming' });
for (const event of events) {
returnData.push({
name: event.name,
@ -136,7 +136,7 @@ export class Demio implements INodeType {
Object.assign(qs, filters);
responseData = await demioApiRequest.call(this, 'GET', `/events`, {}, qs);
responseData = await demioApiRequest.call(this, 'GET', '/events', {}, qs);
if (!returnAll) {
const limit = this.getNodeParameter('limit', i);
@ -169,7 +169,7 @@ export class Demio implements INodeType {
delete additionalFields.customFields;
}
responseData = await demioApiRequest.call(this, 'PUT', `/event/register`, body);
responseData = await demioApiRequest.call(this, 'PUT', '/event/register', body);
}
}
if (resource === 'report') {

View file

@ -82,7 +82,7 @@ export class Dhl implements INodeType {
default: {},
options: [
{
displayName: `Recipient's Postal Code`,
displayName: "Recipient's Postal Code",
name: 'recipientPostalCode',
type: 'string',
default: '',
@ -140,7 +140,7 @@ export class Dhl implements INodeType {
Object.assign(qs, options);
responseData = await dhlApiRequest.call(this, 'GET', `/track/shipments`, {}, qs);
responseData = await dhlApiRequest.call(this, 'GET', '/track/shipments', {}, qs);
returnData.push(...responseData.shipments);
}

View file

@ -66,7 +66,7 @@ export async function validateCredentials(
trackingNumber: 123,
},
method: 'GET',
uri: `https://api-eu.dhl.com/track/shipments`,
uri: 'https://api-eu.dhl.com/track/shipments',
json: true,
};

View file

@ -96,7 +96,7 @@ export class Discourse implements INodeType {
// select them easily
async getCategories(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const { category_list } = await discourseApiRequest.call(this, 'GET', `/categories.json`);
const { category_list } = await discourseApiRequest.call(this, 'GET', '/categories.json');
for (const category of category_list.categories) {
returnData.push({
name: category.name,
@ -131,7 +131,7 @@ export class Discourse implements INodeType {
text_color: textColor,
};
responseData = await discourseApiRequest.call(this, 'POST', `/categories.json`, body);
responseData = await discourseApiRequest.call(this, 'POST', '/categories.json', body);
responseData = responseData.category;
}
@ -139,7 +139,7 @@ export class Discourse implements INodeType {
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i);
responseData = await discourseApiRequest.call(this, 'GET', `/categories.json`, {}, qs);
responseData = await discourseApiRequest.call(this, 'GET', '/categories.json', {}, qs);
responseData = responseData.category_list.categories;
@ -181,7 +181,7 @@ export class Discourse implements INodeType {
name,
};
responseData = await discourseApiRequest.call(this, 'POST', `/admin/groups.json`, {
responseData = await discourseApiRequest.call(this, 'POST', '/admin/groups.json', {
group: body,
});
@ -199,7 +199,7 @@ export class Discourse implements INodeType {
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i);
responseData = await discourseApiRequest.call(this, 'GET', `/groups.json`, {}, qs);
responseData = await discourseApiRequest.call(this, 'GET', '/groups.json', {}, qs);
responseData = responseData.groups;
@ -237,7 +237,7 @@ export class Discourse implements INodeType {
Object.assign(body, additionalFields);
responseData = await discourseApiRequest.call(this, 'POST', `/posts.json`, body);
responseData = await discourseApiRequest.call(this, 'POST', '/posts.json', body);
}
//https://docs.discourse.org/#tag/Posts/paths/~1posts~1{id}.json/get
if (operation === 'get') {
@ -250,7 +250,7 @@ export class Discourse implements INodeType {
const returnAll = this.getNodeParameter('returnAll', i);
const limit = this.getNodeParameter('limit', i, 0);
responseData = await discourseApiRequest.call(this, 'GET', `/posts.json`, {}, qs);
responseData = await discourseApiRequest.call(this, 'GET', '/posts.json', {}, qs);
responseData = responseData.latest_posts;
//Getting all posts relying on https://github.com/discourse/discourse_api/blob/main/spec/discourse_api/api/posts_spec.rb
@ -352,7 +352,7 @@ export class Discourse implements INodeType {
Object.assign(body, additionalFields);
responseData = await discourseApiRequest.call(this, 'POST', `/users.json`, body);
responseData = await discourseApiRequest.call(this, 'POST', '/users.json', body);
}
//https://docs.discourse.org/#tag/Users/paths/~1users~1{username}.json/get
if (operation === 'get') {

View file

@ -68,7 +68,7 @@ export async function elasticsearchApiRequestAllItems(
track_total_hits: false, //Disable the tracking of total hits to speed up pagination
};
responseData = await elasticsearchApiRequest.call(this, 'GET', `/_search`, requestBody, qs);
responseData = await elasticsearchApiRequest.call(this, 'GET', '/_search', requestBody, qs);
if (responseData?.hits?.hits) {
returnData = returnData.concat(responseData.hits.hits);
const lastHitIndex = responseData.hits.hits.length - 1;
@ -84,7 +84,7 @@ export async function elasticsearchApiRequestAllItems(
requestBody.search_after = searchAfter;
requestBody.pit = { id: pit, keep_alive: '1m' };
responseData = await elasticsearchApiRequest.call(this, 'GET', `/_search`, requestBody, qs);
responseData = await elasticsearchApiRequest.call(this, 'GET', '/_search', requestBody, qs);
if (responseData?.hits?.hits?.length) {
returnData = returnData.concat(responseData.hits.hits);
@ -96,7 +96,7 @@ export async function elasticsearchApiRequestAllItems(
}
}
await elasticsearchApiRequest.call(this, 'DELETE', `/_pit`, { id: pit });
await elasticsearchApiRequest.call(this, 'DELETE', '/_pit', { id: pit });
return returnData;
} catch (error) {

View file

@ -479,7 +479,7 @@ export class EmailReadImapV1 implements INodeType {
try {
searchCriteria = JSON.parse(options.customEmailConfig as string);
} catch (error) {
throw new NodeOperationError(this.getNode(), `Custom email config is not valid JSON.`);
throw new NodeOperationError(this.getNode(), 'Custom email config is not valid JSON.');
}
}

View file

@ -239,7 +239,7 @@ export class EmailReadImapV2 implements INodeType {
const credentialsObject = await this.getCredentials('imap');
const credentials = isCredentialsDataImap(credentialsObject) ? credentialsObject : undefined;
if (!credentials) {
throw new NodeOperationError(this.getNode(), `Credentials are not valid for imap node.`);
throw new NodeOperationError(this.getNode(), 'Credentials are not valid for imap node.');
}
const mailbox = this.getNodeParameter('mailbox') as string;
const postProcessAction = this.getNodeParameter('postProcessAction') as string;
@ -487,7 +487,7 @@ export class EmailReadImapV2 implements INodeType {
try {
searchCriteria = JSON.parse(options.customEmailConfig as string);
} catch (error) {
throw new NodeOperationError(this.getNode(), `Custom email config is not valid JSON.`);
throw new NodeOperationError(this.getNode(), 'Custom email config is not valid JSON.');
}
}
@ -560,11 +560,11 @@ export class EmailReadImapV2 implements INodeType {
return imapConnect(config).then(async (conn) => {
conn.on('close', async (_hadError: boolean) => {
if (isCurrentlyReconnecting) {
Logger.debug(`Email Read Imap: Connected closed for forced reconnecting`);
Logger.debug('Email Read Imap: Connected closed for forced reconnecting');
} else if (closeFunctionWasCalled) {
Logger.debug(`Email Read Imap: Shutting down workflow - connected closed`);
Logger.debug('Email Read Imap: Shutting down workflow - connected closed');
} else {
Logger.error(`Email Read Imap: Connected closed unexpectedly`);
Logger.error('Email Read Imap: Connected closed unexpectedly');
this.emitError(new Error('Imap connection closed unexpectedly'));
}
});
@ -586,7 +586,7 @@ export class EmailReadImapV2 implements INodeType {
if (options.forceReconnect !== undefined) {
reconnectionInterval = setInterval(async () => {
Logger.verbose(`Forcing reconnect to IMAP server`);
Logger.verbose('Forcing reconnect to IMAP server');
try {
isCurrentlyReconnecting = true;
if (connection.closeBox) await connection.closeBox(false);

View file

@ -124,7 +124,7 @@ export async function emeliaApiTest(
},
method: 'POST',
body,
uri: `https://graphql.emelia.io/graphql`,
uri: 'https://graphql.emelia.io/graphql',
json: true,
};

View file

@ -69,166 +69,169 @@ export function getFields(object: string) {
page: [
{
value: 'affiliation',
description: `Describes changes to a page's Affliation profile field`,
description: "Describes changes to a page's Affliation profile field",
},
{
value: 'attire',
description: `Describes changes to a page's Attire profile field`,
description: "Describes changes to a page's Attire profile field",
},
{
value: 'awards',
description: `Describes changes to a page's Awards profile field`,
description: "Describes changes to a page's Awards profile field",
},
{
value: 'bio',
description: `Describes changes to a page's Biography profile field`,
description: "Describes changes to a page's Biography profile field",
},
{
value: 'birthday',
description: `Describes changes to a page's Birthday profile field`,
description: "Describes changes to a page's Birthday profile field",
},
{
value: 'category',
description: `Describes changes to a page's Birthday profile field`,
description: "Describes changes to a page's Birthday profile field",
},
{
value: 'company_overview',
description: `Describes changes to a page's Company Overview profile field`,
description: "Describes changes to a page's Company Overview profile field",
},
{
value: 'culinary_team',
description: `Describes changes to a page's Culinary Team profile field`,
description: "Describes changes to a page's Culinary Team profile field",
},
{
value: 'current_location',
description: `Describes changes to a page's Current Location profile field`,
description: "Describes changes to a page's Current Location profile field",
},
{
value: 'description',
description: `Describes changes to a page's Story Description profile field`,
description: "Describes changes to a page's Story Description profile field",
},
{
value: 'email',
description: `Describes changes to a page's Email profile field`,
description: "Describes changes to a page's Email profile field",
},
{
value: 'feed',
description: `Describes nearly all changes to a Page's feed, such as Posts, shares, likes, etc`,
description:
"Describes nearly all changes to a Page's feed, such as Posts, shares, likes, etc",
},
{
value: 'founded',
description: `Describes changes to a page's Founded profile field. This is different from the Start Date field`,
description:
"Describes changes to a page's Founded profile field. This is different from the Start Date field",
},
{
value: 'general_info',
description: `Describes changes to a page's General Information profile field`,
description: "Describes changes to a page's General Information profile field",
},
{
value: 'general_manager',
description: `Describes changes to a page's General Information profile field`,
description: "Describes changes to a page's General Information profile field",
},
{
value: 'hometown',
description: `Describes changes to a page's Homewtown profile field`,
description: "Describes changes to a page's Homewtown profile field",
},
{
value: 'hours',
description: `Describes changes to a page's Hours profile field`,
description: "Describes changes to a page's Hours profile field",
},
{
value: 'leadgen',
description: `Describes changes to a page's leadgen settings`,
description: "Describes changes to a page's leadgen settings",
},
{
value: 'live_videos',
description: `Describes changes to a page's live video status`,
description: "Describes changes to a page's live video status",
},
{
value: 'location',
description: `Describes changes to a page's Location profile field`,
description: "Describes changes to a page's Location profile field",
},
{
value: 'members',
description: `Describes changes to a page's Members profile field`,
description: "Describes changes to a page's Members profile field",
},
{
value: 'mention',
description: `Describes new mentions of a page, including mentions in comments, posts, etc`,
description: 'Describes new mentions of a page, including mentions in comments, posts, etc',
},
{
value: 'merchant_review',
description: `Describes changes to a page's merchant review settings`,
description: "Describes changes to a page's merchant review settings",
},
{
value: 'mission',
description: `Describes changes to a page's Mission profile field`,
description: "Describes changes to a page's Mission profile field",
},
{
value: 'name',
description: `Describes changes to a page's Name profile field.`,
description: "Describes changes to a page's Name profile field.",
},
{
value: 'page_about_story',
},
{
value: 'page_change_proposal',
description: `Data for page change proposal.`,
description: 'Data for page change proposal.',
},
{
value: 'page_upcoming_change',
description: `Webhooks data for page upcoming changes`,
description: 'Webhooks data for page upcoming changes',
},
{
value: 'parking',
description: `Describes changes to a page's Parking profile field`,
description: "Describes changes to a page's Parking profile field",
},
{
value: 'payment_options',
description: `Describes change to a page's Payment profile field`,
description: "Describes change to a page's Payment profile field",
},
{
value: 'personal_info',
description: `Describes changes to a page's Personal Information profile field.`,
description: "Describes changes to a page's Personal Information profile field.",
},
{
value: 'personal_interests',
description: `Describes changes to a page's Personal Interests profile field.`,
description: "Describes changes to a page's Personal Interests profile field.",
},
{
value: 'phone',
description: `Describes changes to a page's Phone profile field`,
description: "Describes changes to a page's Phone profile field",
},
{
value: 'picture',
description: `Describes changes to a page's profile picture`,
description: "Describes changes to a page's profile picture",
},
{
value: 'price_range',
description: `Describes changes to a page's Price Range profile field`,
description: "Describes changes to a page's Price Range profile field",
},
{
value: 'product_review',
description: `Describes changes to a page's product review settings`,
description: "Describes changes to a page's product review settings",
},
{
value: 'products',
description: `Describes changes to a page's Products profile field`,
description: "Describes changes to a page's Products profile field",
},
{
value: 'public_transit',
description: `Describes changes to a page's Public Transit profile field`,
description: "Describes changes to a page's Public Transit profile field",
},
{
value: 'ratings',
description: `Describes changes to a page's ratings, including new ratings or a user's comments or reactions on a rating`,
description:
"Describes changes to a page's ratings, including new ratings or a user's comments or reactions on a rating",
},
{
value: 'videos',
description: `Describes changes to the encoding status of a video on a page`,
description: 'Describes changes to the encoding status of a video on a page',
},
{
value: 'website',
description: `Describes changes to a page's Website profile field`,
description: "Describes changes to a page's Website profile field",
},
],
application: [

View file

@ -102,7 +102,7 @@ export class FlowTrigger implements INodeType {
return false;
}
qs.organization_id = credentials.organizationId as number;
const endpoint = `/integration_webhooks`;
const endpoint = '/integration_webhooks';
try {
webhooks = await flowApiRequest.call(this, 'GET', endpoint, {}, qs);
webhooks = webhooks.integration_webhooks;
@ -126,7 +126,7 @@ export class FlowTrigger implements INodeType {
const webhookUrl = this.getNodeWebhookUrl('default');
const webhookData = this.getWorkflowStaticData('node');
const resource = this.getNodeParameter('resource') as string;
const endpoint = `/integration_webhooks`;
const endpoint = '/integration_webhooks';
if (resource === 'list') {
resourceIds = (this.getNodeParameter('listIds') as string).split(',');
}

Some files were not shown because too many files have changed in this diff Show more