From 49c85a1df8417918797c3fe6db46f35f9fe86bdf Mon Sep 17 00:00:00 2001 From: Aaron Delasy Date: Fri, 2 Sep 2022 17:13:17 +0300 Subject: [PATCH] fix: correct all the spelling typos (#3960) * Improve code health Fix TS typos in local variables Fix CSS typos in local styles Fix typos in comments Fix typos in strings * Fix order of n8n setup sections in CONTRIBUTING.md --- .vscode/DEBUGGER.md | 2 +- CONTRIBUTING.md | 14 ++++++------- docker/compose/subfolderWithSSL/README.md | 2 +- packages/cli/commands/Interfaces.d.ts | 2 +- packages/cli/commands/executeBatch.ts | 6 +++--- packages/cli/commands/export/credentials.ts | 4 ++-- packages/cli/commands/export/workflow.ts | 4 ++-- packages/cli/commands/start.ts | 2 +- packages/cli/commands/webhook.ts | 2 +- packages/cli/commands/worker.ts | 2 +- packages/cli/config/schema.ts | 10 +++++----- packages/cli/src/ActiveWorkflowRunner.ts | 8 ++++---- packages/cli/src/CredentialsHelper.ts | 8 ++++---- packages/cli/src/GenericHelpers.ts | 2 +- packages/cli/src/Interfaces.ts | 2 +- packages/cli/src/InternalHooks.ts | 2 +- packages/cli/src/LoadNodesAndCredentials.ts | 4 ++-- packages/cli/src/PublicApi/index.ts | 2 +- .../credentials/credentials.service.ts | 8 ++++---- .../handlers/workflows/workflows.handler.ts | 4 ++-- packages/cli/src/Push.ts | 2 +- packages/cli/src/Server.ts | 6 +++--- packages/cli/src/TestWebhooks.ts | 2 +- .../UserManagement/UserManagementHelper.ts | 4 ++-- packages/cli/src/WaitTracker.ts | 8 ++++---- packages/cli/src/WaitingWebhooks.ts | 2 +- packages/cli/src/WebhookHelpers.ts | 12 +++++------ packages/cli/src/WebhookServer.ts | 6 +++--- .../cli/src/WorkflowExecuteAdditionalData.ts | 4 ++-- packages/cli/src/WorkflowHelpers.ts | 2 +- packages/cli/src/WorkflowRunner.ts | 4 ++-- packages/cli/src/WorkflowRunnerProcess.ts | 10 +++++----- packages/cli/src/api/executions.api.ts | 4 ++-- .../integration/publicApi/executions.test.ts | 2 +- .../integration/publicApi/workflows.test.ts | 4 ++-- packages/core/src/ActiveWebhooks.ts | 2 +- packages/core/src/Constants.ts | 2 +- packages/core/src/LoadNodeParameterOptions.ts | 2 +- packages/core/src/NodeExecuteFunctions.ts | 10 +++++----- packages/core/src/UserSettings.ts | 2 +- packages/core/src/WorkflowExecute.ts | 4 ++-- packages/core/test/Helpers.ts | 4 ++-- .../editor-ui/src/components/MainSidebar.vue | 10 +++++----- .../editor-ui/src/components/NodeWebhooks.vue | 4 ++-- .../src/components/ParameterInput.vue | 8 ++++---- .../src/components/mixins/copyPaste.ts | 2 +- .../src/components/mixins/mouseSelect.ts | 2 +- .../src/components/mixins/moveNodeWorkflow.ts | 2 +- .../src/components/mixins/nodeBase.ts | 6 +++--- .../src/components/mixins/workflowHelpers.ts | 16 +++++++-------- packages/editor-ui/src/modules/ui.ts | 4 ++-- packages/editor-ui/src/modules/userHelpers.ts | 2 +- packages/editor-ui/src/views/NodeView.vue | 2 +- packages/node-dev/commands/new.ts | 4 ++-- packages/node-dev/src/Build.ts | 2 +- packages/node-dev/templates/execute/simple.ts | 2 +- .../GithubOAuth2Api.credentials.ts | 2 +- .../nodes/Github/GithubTrigger.node.ts | 2 +- .../nodes/HttpRequest/HttpRequest.node.ts | 8 ++++---- packages/workflow/src/Expression.ts | 2 +- packages/workflow/src/Interfaces.ts | 12 +++++------ packages/workflow/src/NodeHelpers.ts | 20 +++++++++---------- packages/workflow/src/ObservableObject.ts | 2 +- packages/workflow/src/Workflow.ts | 8 ++++---- packages/workflow/src/WorkflowDataProxy.ts | 6 +++--- packages/workflow/test/Helpers.ts | 4 ++-- packages/workflow/test/NodeHelpers.test.ts | 6 +++--- packages/workflow/test/RoutingNode.test.ts | 6 +++--- packages/workflow/test/Workflow.test.ts | 2 +- 69 files changed, 167 insertions(+), 167 deletions(-) diff --git a/.vscode/DEBUGGER.md b/.vscode/DEBUGGER.md index 3fa9d56292..fa95b84082 100644 --- a/.vscode/DEBUGGER.md +++ b/.vscode/DEBUGGER.md @@ -18,7 +18,7 @@ Breakpoints are noted with a red dot in front of the line, meaning that whenever ## What if I change the code? -You might need to restart the debugger if you make changes to your code, since the running process will be executing an oudated version of the code. +You might need to restart the debugger if you make changes to your code, since the running process will be executing an outdated version of the code. In order to make this process easier you can simply run `npm run watch` in another terminal window, so you don't have to fully build the project. Please note that restarting n8n is still required, but this is much faster. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e798aa61a4..a0f13f1c3c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -97,18 +97,18 @@ checked out and set up: git clone https://github.com//n8n.git ``` -3. Add the original n8n repository as `upstream` to your forked repository - - ``` - git remote add upstream https://github.com/n8n-io/n8n.git - ``` - -4. Go into repository folder +3. Go into repository folder ``` cd n8n ``` +4. Add the original n8n repository as `upstream` to your forked repository + + ``` + git remote add upstream https://github.com/n8n-io/n8n.git + ``` + 5. Install all dependencies of all modules and link them together: ``` diff --git a/docker/compose/subfolderWithSSL/README.md b/docker/compose/subfolderWithSSL/README.md index 1e12407c08..3970938719 100644 --- a/docker/compose/subfolderWithSSL/README.md +++ b/docker/compose/subfolderWithSSL/README.md @@ -1,6 +1,6 @@ # n8n on Subfolder with SSL -Starts n8n and deployes it on a subfolder +Starts n8n and deploys it on a subfolder ## Start diff --git a/packages/cli/commands/Interfaces.d.ts b/packages/cli/commands/Interfaces.d.ts index 41721bcc86..95c0946dd2 100644 --- a/packages/cli/commands/Interfaces.d.ts +++ b/packages/cli/commands/Interfaces.d.ts @@ -15,7 +15,7 @@ interface IResult { interface IExecutionResult { workflowId: string | number; workflowName: string; - executionTime: number; // Given in seconds with decimals for milisseconds + executionTime: number; // Given in seconds with decimals for milliseconds finished: boolean; executionStatus: ExecutionStatus; error?: string; diff --git a/packages/cli/commands/executeBatch.ts b/packages/cli/commands/executeBatch.ts index 8a0f1a9baf..d2887eb470 100644 --- a/packages/cli/commands/executeBatch.ts +++ b/packages/cli/commands/executeBatch.ts @@ -98,7 +98,7 @@ export class ExecuteBatch extends Command { }), shallow: flags.boolean({ description: - 'Compares only if attributes output from node are the same, with no regards to neste JSON objects.', + 'Compares only if attributes output from node are the same, with no regards to nested JSON objects.', }), skipList: flags.string({ description: 'File containing a comma separated list of workflow IDs to skip.', @@ -152,7 +152,7 @@ export class ExecuteBatch extends Command { executingWorkflows = activeExecutionsInstance.getActiveExecutions(); } // We may receive true but when called from `process.on` - // we get the signal (SIGNIT, etc.) + // we get the signal (SIGINT, etc.) if (skipExit !== true) { process.exit(0); } @@ -864,7 +864,7 @@ export class ExecuteBatch extends Command { } } // Save snapshots only after comparing - this is to make sure we're updating - // After comparing to existing verion. + // After comparing to existing version. if (ExecuteBatch.snapshot !== undefined) { const fileName = `${ ExecuteBatch.snapshot.endsWith(sep) diff --git a/packages/cli/commands/export/credentials.ts b/packages/cli/commands/export/credentials.ts index 00ffa6fb90..fa627dbdec 100644 --- a/packages/cli/commands/export/credentials.ts +++ b/packages/cli/commands/export/credentials.ts @@ -86,7 +86,7 @@ export class ExportCredentialsCommand extends Command { if (fs.existsSync(flags.output)) { if (!fs.lstatSync(flags.output).isDirectory()) { - console.info(`The paramenter --output must be a directory`); + console.info(`The parameter --output must be a directory`); return; } } else { @@ -105,7 +105,7 @@ export class ExportCredentialsCommand extends Command { } else if (flags.output) { if (fs.existsSync(flags.output)) { if (fs.lstatSync(flags.output).isDirectory()) { - console.info(`The paramenter --output must be a writeble file`); + console.info(`The parameter --output must be a writeable file`); return; } } diff --git a/packages/cli/commands/export/workflow.ts b/packages/cli/commands/export/workflow.ts index 658e9756fb..1d79a630aa 100644 --- a/packages/cli/commands/export/workflow.ts +++ b/packages/cli/commands/export/workflow.ts @@ -78,7 +78,7 @@ export class ExportWorkflowsCommand extends Command { if (fs.existsSync(flags.output)) { if (!fs.lstatSync(flags.output).isDirectory()) { - console.info(`The paramenter --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 paramenter --output must be a writeble file`); + console.info(`The parameter --output must be a writeable file`); return; } } diff --git a/packages/cli/commands/start.ts b/packages/cli/commands/start.ts index a3f924094d..611e401009 100644 --- a/packages/cli/commands/start.ts +++ b/packages/cli/commands/start.ts @@ -256,7 +256,7 @@ export class Start extends Command { missingPackages.delete(missingPackage); } LoggerProxy.info( - 'Packages reinstalled successfully. Resuming regular intiailization.', + 'Packages reinstalled successfully. Resuming regular initialization.', ); } catch (error) { LoggerProxy.error('n8n was unable to install the missing packages.'); diff --git a/packages/cli/commands/webhook.ts b/packages/cli/commands/webhook.ts index bdef4b9f18..d269cf3b35 100644 --- a/packages/cli/commands/webhook.ts +++ b/packages/cli/commands/webhook.ts @@ -106,7 +106,7 @@ export class Webhook extends Command { * as it is unable to determine if it is still running or crashed * - You cannot stop currently executing jobs from webhook processes * when running without queues as the main process cannot talk to - * the wehbook processes to communicate workflow execution interruption. + * the webhook processes to communicate workflow execution interruption. */ this.error('Webhook processes can only run with execution mode as queue.'); diff --git a/packages/cli/commands/worker.ts b/packages/cli/commands/worker.ts index 93c93918e7..30aaf00826 100644 --- a/packages/cli/commands/worker.ts +++ b/packages/cli/commands/worker.ts @@ -391,7 +391,7 @@ export class Worker extends Command { } // Just to be complete, generally will the worker stop automatically - // if it loses the conection to redis + // if it loses the connection to redis try { // Redis ping await Worker.jobQueue.client.ping(); diff --git a/packages/cli/config/schema.ts b/packages/cli/config/schema.ts index 209fb99331..04c519c7d4 100644 --- a/packages/cli/config/schema.ts +++ b/packages/cli/config/schema.ts @@ -151,7 +151,7 @@ export const schema = { // Allows to set default values for credentials which // get automatically prefilled and the user does not get // displayed and can not change. - // Format: { CREDENTIAL_NAME: { PARAMTER: VALUE }} + // Format: { CREDENTIAL_NAME: { PARAMETER: VALUE }} doc: 'Overwrites for credentials', format: '*', default: '{}', @@ -248,7 +248,7 @@ export const schema = { env: 'EXECUTIONS_DATA_SAVE_ON_SUCCESS', }, saveExecutionProgress: { - doc: 'Wether or not to save progress for each node executed', + doc: 'Whether or not to save progress for each node executed', format: 'Boolean', default: false, env: 'EXECUTIONS_DATA_SAVE_ON_PROGRESS', @@ -363,7 +363,7 @@ export const schema = { generic: { // The timezone to use. Is important for nodes like "Cron" which start the // workflow automatically at a specified time. This setting can also be - // overwritten on a per worfklow basis in the workflow settings in the + // overwritten on a per workflow basis in the workflow settings in the // editor. timezone: { doc: 'The timezone to use', @@ -607,7 +607,7 @@ export const schema = { format: Boolean, default: false, env: 'N8N_WORKFLOW_TAGS_DISABLED', - doc: 'Disable worfklow tags.', + doc: 'Disable workflow tags.', }, userManagement: { @@ -945,7 +945,7 @@ export const schema = { onboardingCallPrompt: { enabled: { - doc: 'Whether onboarding call propmpt feature is available', + doc: 'Whether onboarding call prompt feature is available', format: Boolean, default: true, env: 'N8N_ONBOARDING_CALL_PROMPTS_ENABLED', diff --git a/packages/cli/src/ActiveWorkflowRunner.ts b/packages/cli/src/ActiveWorkflowRunner.ts index d5d4cfd7dc..60388a73a3 100644 --- a/packages/cli/src/ActiveWorkflowRunner.ts +++ b/packages/cli/src/ActiveWorkflowRunner.ts @@ -75,7 +75,7 @@ export class ActiveWorkflowRunner { // NOTE // Here I guess we can have a flag on the workflow table like hasTrigger - // so intead of pulling all the active wehhooks just pull the actives that have a trigger + // so instead of pulling all the active webhooks just pull the actives that have a trigger const workflowsData: IWorkflowDb[] = (await Db.collections.Workflow.find({ where: { active: true }, relations: ['shared', 'shared.user', 'shared.user.globalRole'], @@ -183,7 +183,7 @@ export class ActiveWorkflowRunner { req: express.Request, res: express.Response, ): Promise { - Logger.debug(`Received webhoook "${httpMethod}" for path "${path}"`); + Logger.debug(`Received webhook "${httpMethod}" for path "${path}"`); if (this.activeWorkflows === null) { throw new ResponseHelper.ResponseError( 'The "activeWorkflows" instance did not get initialized yet.', @@ -480,7 +480,7 @@ export class ActiveWorkflowRunner { config.getEnv('endpoints.skipWebhoooksDeregistrationOnShutdown') && error.name === 'QueryFailedError' ) { - // When skipWebhoooksDeregistrationOnShutdown is enabled, + // When skipWebhooksDeregistrationOnShutdown is enabled, // n8n does not remove the registered webhooks on exit. // This means that further initializations will always fail // when inserting to database. This is why we ignore this error @@ -504,7 +504,7 @@ export class ActiveWorkflowRunner { if (error.name === 'QueryFailedError') { error.message = `The URL path that the "${webhook.node}" node uses is already taken. Please change it to something else.`; } else if (error.detail) { - // it's a error runnig the webhook methods (checkExists, create) + // it's a error running the webhook methods (checkExists, create) error.message = error.detail; } diff --git a/packages/cli/src/CredentialsHelper.ts b/packages/cli/src/CredentialsHelper.ts index 2bcf2566b0..7fc14a8fd0 100644 --- a/packages/cli/src/CredentialsHelper.ts +++ b/packages/cli/src/CredentialsHelper.ts @@ -307,7 +307,7 @@ export class CredentialsHelper extends ICredentialsHelper { NodeHelpers.mergeNodeProperties(combineProperties, mergeCredentialProperties); } - // The properties defined on the parent credentials take presidence + // The properties defined on the parent credentials take precedence NodeHelpers.mergeNodeProperties(combineProperties, credentialTypeData.properties); return combineProperties; @@ -526,11 +526,11 @@ export class CredentialsHelper extends ICredentialsHelper { } } } - // Test is defined as string which links to a functoin + // Test is defined as string which links to a function return (node as unknown as INodeType).methods?.credentialTest![credential.testedBy]; } - // Test is defined as JSON with a defintion for the request to make + // Test is defined as JSON with a definition for the request to make return { nodeType, testRequest: credential.testedBy, @@ -574,7 +574,7 @@ export class CredentialsHelper extends ICredentialsHelper { // Credentials get tested via request instructions - // TODO: Temp worfklows get created at multiple locations (for example also LoadNodeParameterOptions), + // TODO: Temp workflows get created at multiple locations (for example also LoadNodeParameterOptions), // check if some of them are identical enough that it can be combined let nodeType: INodeType; diff --git a/packages/cli/src/GenericHelpers.ts b/packages/cli/src/GenericHelpers.ts index 6c76c5568b..d9188af839 100644 --- a/packages/cli/src/GenericHelpers.ts +++ b/packages/cli/src/GenericHelpers.ts @@ -121,7 +121,7 @@ export async function getConfigValue( return config.getEnv(configKey); } - // Check if special file enviroment variable exists + // Check if special file environment variable exists const fileEnvironmentVariable = process.env[`${currentSchema.env}_FILE`]; if (fileEnvironmentVariable === undefined) { // Does not exist, so return value from config diff --git a/packages/cli/src/Interfaces.ts b/packages/cli/src/Interfaces.ts index f25cea743f..0ebd0f491f 100644 --- a/packages/cli/src/Interfaces.ts +++ b/packages/cli/src/Interfaces.ts @@ -216,7 +216,7 @@ export interface IExecutionResponse extends IExecutionBase { workflowData: IWorkflowBase; } -// Flatted data to save memory when saving in database or transfering +// Flatted data to save memory when saving in database or transferring // via REST API export interface IExecutionFlatted extends IExecutionBase { data: string; diff --git a/packages/cli/src/InternalHooks.ts b/packages/cli/src/InternalHooks.ts index e250063051..abac63d489 100644 --- a/packages/cli/src/InternalHooks.ts +++ b/packages/cli/src/InternalHooks.ts @@ -343,7 +343,7 @@ export class InternalHooksClass implements IInternalHooksClass { public_api: boolean; }): Promise { return this.telemetry.track( - 'Instance sent transacptional email to user', + 'Instance sent transactional email to user', userTransactionalEmailData, ); } diff --git a/packages/cli/src/LoadNodesAndCredentials.ts b/packages/cli/src/LoadNodesAndCredentials.ts index 3bbb94ac08..8f5c62da9b 100644 --- a/packages/cli/src/LoadNodesAndCredentials.ts +++ b/packages/cli/src/LoadNodesAndCredentials.ts @@ -201,7 +201,7 @@ class LoadNodesAndCredentialsClass { // Add serializer method "toJSON" to the class so that authenticate method (if defined) // gets mapped to the authenticate attribute before it is sent to the client. // The authenticate property is used by the client to decide whether or not to - // include the credential type in the predifined credentials (HTTP node) + // include the credential type in the predefined credentials (HTTP node) // eslint-disable-next-line func-names tempModule[credentialName].prototype.toJSON = function () { // eslint-disable-next-line @typescript-eslint/no-unsafe-return @@ -426,7 +426,7 @@ class LoadNodesAndCredentialsClass { return; } - // Check if the node should be skiped + // Check if the node should be skipped if (this.excludeNodes !== undefined && this.excludeNodes.includes(fullNodeName)) { return; } diff --git a/packages/cli/src/PublicApi/index.ts b/packages/cli/src/PublicApi/index.ts index b416b86510..8c8e61f134 100644 --- a/packages/cli/src/PublicApi/index.ts +++ b/packages/cli/src/PublicApi/index.ts @@ -24,7 +24,7 @@ function createApiRouter( ): Router { const n8nPath = config.getEnv('path'); const swaggerDocument = YAML.load(openApiSpecPath) as swaggerUi.JsonObject; - // add the server depeding on the config so the user can interact with the API + // add the server depending on the config so the user can interact with the API // from the Swagger UI swaggerDocument.server = [ { diff --git a/packages/cli/src/PublicApi/v1/handlers/credentials/credentials.service.ts b/packages/cli/src/PublicApi/v1/handlers/credentials/credentials.service.ts index 304e147460..8f6c846436 100644 --- a/packages/cli/src/PublicApi/v1/handlers/credentials/credentials.service.ts +++ b/packages/cli/src/PublicApi/v1/handlers/credentials/credentials.service.ts @@ -137,9 +137,9 @@ export function sanitizeCredentials( /** * toJsonSchema - * Take an array of crendentials parameter and map it + * Take an array of credentials parameter and map it * to a JSON Schema (see https://json-schema.org/). With - * the JSON Schema defintion we can validate the credential's shape + * the JSON Schema definition we can validate the credential's shape * @param properties - Credentials properties * @returns The credentials schema definition. */ @@ -155,7 +155,7 @@ export function toJsonSchema(properties: INodeProperties[]): IDataObject { const optionsValues: { [key: string]: string[] } = {}; const resolveProperties: string[] = []; - // get all posible values of properties type "options" + // get all possible values of properties type "options" // so we can later resolve the displayOptions dependencies properties .filter((property) => property.type === 'options') @@ -177,7 +177,7 @@ export function toJsonSchema(properties: INodeProperties[]): IDataObject { requiredFields.push(property.name); if (property.type === 'options') { // if the property is type options, - // include all possible values in the anum property. + // include all possible values in the enum property. Object.assign(jsonSchema.properties, { [property.name]: { type: 'string', diff --git a/packages/cli/src/PublicApi/v1/handlers/workflows/workflows.handler.ts b/packages/cli/src/PublicApi/v1/handlers/workflows/workflows.handler.ts index dd1509c57e..0a41e1d478 100644 --- a/packages/cli/src/PublicApi/v1/handlers/workflows/workflows.handler.ts +++ b/packages/cli/src/PublicApi/v1/handlers/workflows/workflows.handler.ts @@ -251,7 +251,7 @@ export = { return res.json(sharedWorkflow.workflow); } - // nothing to do as the wokflow is already active + // nothing to do as the workflow is already active return res.json(sharedWorkflow.workflow); }, ], @@ -280,7 +280,7 @@ export = { return res.json(sharedWorkflow.workflow); } - // nothing to do as the wokflow is already inactive + // nothing to do as the workflow is already inactive return res.json(sharedWorkflow.workflow); }, ], diff --git a/packages/cli/src/Push.ts b/packages/cli/src/Push.ts index c982ce6a54..d5cc3babda 100644 --- a/packages/cli/src/Push.ts +++ b/packages/cli/src/Push.ts @@ -68,7 +68,7 @@ export class Push { // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any send(type: IPushDataType, data: any, sessionId?: string) { if (sessionId !== undefined && this.connections[sessionId] === undefined) { - Logger.error(`The session "${sessionId}" is not registred.`, { sessionId }); + Logger.error(`The session "${sessionId}" is not registered.`, { sessionId }); return; } diff --git a/packages/cli/src/Server.ts b/packages/cli/src/Server.ts index 790e0600ea..b0cd3c6f3e 100644 --- a/packages/cli/src/Server.ts +++ b/packages/cli/src/Server.ts @@ -1748,7 +1748,7 @@ class App { this.app.all( `/${this.endpointWebhookTest}/*`, async (req: express.Request, res: express.Response) => { - // Cut away the "/webhook-test/" to get the registred part of the url + // Cut away the "/webhook-test/" to get the registered part of the url const requestUrl = (req as ICustomRequest).parsedUrl!.pathname!.slice( this.endpointWebhookTest.length + 2, ); @@ -1936,7 +1936,7 @@ export async function start(): Promise { await app.externalHooks.run('n8n.ready', [app, config]); const cpus = os.cpus(); - const binarDataConfig = config.getEnv('binaryDataManager'); + const binaryDataConfig = config.getEnv('binaryDataManager'); const diagnosticInfo: IDiagnosticInfo = { basicAuthActive: config.getEnv('security.basicAuth.active'), databaseType: (await GenericHelpers.getConfigValue('database.type')) as DatabaseType, @@ -1973,7 +1973,7 @@ export async function start(): Promise { executions_data_prune_timeout: config.getEnv('executions.pruneDataTimeout'), }, deploymentType: config.getEnv('deployment.type'), - binaryDataMode: binarDataConfig.mode, + binaryDataMode: binaryDataConfig.mode, n8n_multi_user_allowed: isUserManagementEnabled(), smtp_set_up: config.getEnv('userManagement.emails.mode') === 'smtp', }; diff --git a/packages/cli/src/TestWebhooks.ts b/packages/cli/src/TestWebhooks.ts index 7d3faa6e58..7908ed7a3f 100644 --- a/packages/cli/src/TestWebhooks.ts +++ b/packages/cli/src/TestWebhooks.ts @@ -290,7 +290,7 @@ export class TestWebhooks { this.testWebhookData[webhookKey].sessionId, ); } catch (error) { - // Could not inform editor, probably is not connected anymore. So sipmly go on. + // Could not inform editor, probably is not connected anymore. So simply go on. } } diff --git a/packages/cli/src/UserManagement/UserManagementHelper.ts b/packages/cli/src/UserManagement/UserManagementHelper.ts index 978f8117d7..d54bfa278f 100644 --- a/packages/cli/src/UserManagement/UserManagementHelper.ts +++ b/packages/cli/src/UserManagement/UserManagementHelper.ts @@ -161,7 +161,7 @@ export async function checkPermissionsForExecution( credentialNames.forEach((credentialName) => { const credentialDetail = node.credentials![credentialName]; // If it does not contain an id, it means it is a very old - // workflow. Nowaways it should not happen anymore. + // workflow. Nowadays it should not happen anymore. // Migrations should handle the case where a credential does // not have an id. if (credentialDetail.id === null) { @@ -189,7 +189,7 @@ export async function checkPermissionsForExecution( return true; } // If this check happens on top, we may get - // unitialized db errors. + // uninitialized db errors. // Db is certainly initialized if workflow uses credentials. const user = await getUserById(userId); if (user.globalRole.name === 'owner') { diff --git a/packages/cli/src/WaitTracker.ts b/packages/cli/src/WaitTracker.ts index 327af008f2..51804aae6a 100644 --- a/packages/cli/src/WaitTracker.ts +++ b/packages/cli/src/WaitTracker.ts @@ -43,14 +43,14 @@ export class WaitTrackerClass { // Poll every 60 seconds a list of upcoming executions this.mainTimer = setInterval(() => { - this.getwaitingExecutions(); + this.getWaitingExecutions(); }, 60000); - this.getwaitingExecutions(); + this.getWaitingExecutions(); } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types - async getwaitingExecutions() { + async getWaitingExecutions() { Logger.debug('Wait tracker querying database for waiting executions'); // Find all the executions which should be triggered in the next 70 seconds const findQuery: FindManyOptions = { @@ -100,7 +100,7 @@ export class WaitTrackerClass { async stopExecution(executionId: string): Promise { if (this.waitingExecutions[executionId] !== undefined) { - // The waiting execution was already sheduled to execute. + // The waiting execution was already scheduled to execute. // So stop timer and remove. clearTimeout(this.waitingExecutions[executionId].timer); delete this.waitingExecutions[executionId]; diff --git a/packages/cli/src/WaitingWebhooks.ts b/packages/cli/src/WaitingWebhooks.ts index 0f603b08a0..f63623e234 100644 --- a/packages/cli/src/WaitingWebhooks.ts +++ b/packages/cli/src/WaitingWebhooks.ts @@ -35,7 +35,7 @@ export class WaitingWebhooks { req: express.Request, res: express.Response, ): Promise { - Logger.debug(`Received waiting-webhoook "${httpMethod}" for path "${fullPath}"`); + Logger.debug(`Received waiting-webhook "${httpMethod}" for path "${fullPath}"`); // Reset request parameters req.params = {}; diff --git a/packages/cli/src/WebhookHelpers.ts b/packages/cli/src/WebhookHelpers.ts index 180eef0353..2bc3922d09 100644 --- a/packages/cli/src/WebhookHelpers.ts +++ b/packages/cli/src/WebhookHelpers.ts @@ -75,7 +75,7 @@ export function getWorkflowWebhooks( workflow: Workflow, additionalData: IWorkflowExecuteAdditionalData, destinationNode?: string, - ignoreRestartWehbooks = false, + ignoreRestartWebhooks = false, ): IWebhookData[] { // Check all the nodes in the workflow if they have webhooks @@ -97,7 +97,7 @@ export function getWorkflowWebhooks( } returnData.push.apply( returnData, - NodeHelpers.getNodeWebhooks(workflow, node, additionalData, ignoreRestartWehbooks), + NodeHelpers.getNodeWebhooks(workflow, node, additionalData, ignoreRestartWebhooks), ); } @@ -346,7 +346,7 @@ export async function executeWebhook( } // Now that we know that the workflow should run we can return the default response - // directly if responseMode it set to "onReceived" and a respone should be sent + // directly if responseMode it set to "onReceived" and a response should be sent if (responseMode === 'onReceived' && !didSendResponse) { // Return response directly and do not wait for the workflow to finish if (responseData === 'noData') { @@ -478,7 +478,7 @@ export async function executeWebhook( if (!didSendResponse) { responseCallback(null, { data: { - message: 'Workflow executed sucessfully but no data was returned', + message: 'Workflow executed successfully but no data was returned', }, responseCode, }); @@ -510,7 +510,7 @@ export async function executeWebhook( // Return an error if no Webhook-Response node did send any data responseCallback(null, { data: { - message: 'Workflow executed sucessfully', + message: 'Workflow executed successfully', }, responseCode, }); @@ -523,7 +523,7 @@ export async function executeWebhook( if (!didSendResponse) { responseCallback(null, { data: { - message: 'Workflow executed sucessfully but the last node did not return any data', + message: 'Workflow executed successfully but the last node did not return any data', }, responseCode, }); diff --git a/packages/cli/src/WebhookServer.ts b/packages/cli/src/WebhookServer.ts index bd99c541a5..465db8c94a 100644 --- a/packages/cli/src/WebhookServer.ts +++ b/packages/cli/src/WebhookServer.ts @@ -47,7 +47,7 @@ export function registerProductionWebhooks() { this.app.all( `/${this.endpointWebhook}/*`, async (req: express.Request, res: express.Response) => { - // Cut away the "/webhook/" to get the registred part of the url + // Cut away the "/webhook/" to get the registered part of the url const requestUrl = (req as ICustomRequest).parsedUrl!.pathname!.slice( this.endpointWebhook.length + 2, ); @@ -112,14 +112,14 @@ export function registerProductionWebhooks() { this.app.all( `/${this.endpointWebhookWaiting}/*`, async (req: express.Request, res: express.Response) => { - // Cut away the "/webhook-waiting/" to get the registred part of the url + // Cut away the "/webhook-waiting/" to get the registered part of the url const requestUrl = (req as ICustomRequest).parsedUrl!.pathname!.slice( this.endpointWebhookWaiting.length + 2, ); const method = req.method.toUpperCase() as WebhookHttpMethod; - // TOOD: Add support for OPTIONS in the future + // TODO: Add support for OPTIONS in the future // if (method === 'OPTIONS') { // } diff --git a/packages/cli/src/WorkflowExecuteAdditionalData.ts b/packages/cli/src/WorkflowExecuteAdditionalData.ts index 98e1b408e5..474217ed00 100644 --- a/packages/cli/src/WorkflowExecuteAdditionalData.ts +++ b/packages/cli/src/WorkflowExecuteAdditionalData.ts @@ -930,7 +930,7 @@ export async function executeWorkflow( await checkPermissionsForExecution(workflow, additionalData.userId); // Create new additionalData to have different workflow loaded and to call - // different webooks + // different webhooks const additionalDataIntegrated = await getBase(additionalData.userId); additionalDataIntegrated.hooks = getWorkflowHooksIntegrated( runData.executionMode, @@ -1059,7 +1059,7 @@ export function sendMessageToUI(source: string, messages: any[]) { this.sessionId, ); } catch (error) { - Logger.warn(`There was a problem sending messsage to UI: ${error.message}`); + Logger.warn(`There was a problem sending message to UI: ${error.message}`); } } diff --git a/packages/cli/src/WorkflowHelpers.ts b/packages/cli/src/WorkflowHelpers.ts index 8e0996cd5d..ffe955ec56 100644 --- a/packages/cli/src/WorkflowHelpers.ts +++ b/packages/cli/src/WorkflowHelpers.ts @@ -251,7 +251,7 @@ export async function executeErrorWorkflow( export function getAllNodeTypeData(): ITransferNodeTypes { const nodeTypes = NodeTypes(); - // Get the data of all thenode types that they + // Get the data of all the node types that they // can be loaded again in the process const returnData: ITransferNodeTypes = {}; for (const nodeTypeName of Object.keys(nodeTypes.nodeTypes)) { diff --git a/packages/cli/src/WorkflowRunner.ts b/packages/cli/src/WorkflowRunner.ts index 897da83457..a9ddd9f353 100644 --- a/packages/cli/src/WorkflowRunner.ts +++ b/packages/cli/src/WorkflowRunner.ts @@ -82,7 +82,7 @@ export class WorkflowRunner { } /** - * The process did send a hook message so execute the appropiate hook + * The process did send a hook message so execute the appropriate hook * * @param {WorkflowHooks} workflowHooks * @param {IProcessMessageDataHook} hookData @@ -469,7 +469,7 @@ export class WorkflowRunner { * when Redis crashes and recovers shortly * * but during this time, some execution(s) * * finished. The end result is that the main * - * process will wait indefinitively and never * + * process will wait indefinitely and never * * get a response. This adds an active polling to* * the queue that allows us to identify that the * * execution finished and get information from * diff --git a/packages/cli/src/WorkflowRunnerProcess.ts b/packages/cli/src/WorkflowRunnerProcess.ts index ccedf6f467..477caf98b2 100644 --- a/packages/cli/src/WorkflowRunnerProcess.ts +++ b/packages/cli/src/WorkflowRunnerProcess.ts @@ -178,23 +178,23 @@ export class WorkflowRunnerProcess { // Credentials should now be loaded from database. // We check if any node uses credentials. If it does, then // init database. - let shouldInitializaDb = false; + let shouldInitializeDb = false; // eslint-disable-next-line array-callback-return inputData.workflowData.nodes.map((node) => { if (Object.keys(node.credentials === undefined ? {} : node.credentials).length > 0) { - shouldInitializaDb = true; + shouldInitializeDb = true; } if (node.type === 'n8n-nodes-base.executeWorkflow') { // With UM, child workflows from arbitrary JSON // Should be persisted by the child process, // so DB needs to be initialized - shouldInitializaDb = true; + shouldInitializeDb = true; } }); // This code has been split into 4 ifs just to make it easier to understand // Can be made smaller but in the end it will make it impossible to read. - if (shouldInitializaDb) { + if (shouldInitializeDb) { // initialize db as we need to load credentials await Db.init(); } else if ( @@ -490,7 +490,7 @@ async function sendToParentProcess(type: string, data: any): Promise { const workflowRunner = new WorkflowRunnerProcess(); // Listen to messages from parent process which send the data of -// the worflow to process +// the workflow to process process.on('message', async (message: IProcessMessage) => { try { if (message.type === 'startWorkflow') { diff --git a/packages/cli/src/api/executions.api.ts b/packages/cli/src/api/executions.api.ts index 9c51a5c99f..9fa6687fd2 100644 --- a/packages/cli/src/api/executions.api.ts +++ b/packages/cli/src/api/executions.api.ts @@ -415,7 +415,7 @@ executionsController.post( const sharedWorkflowIds = await getSharedWorkflowIds(req.user); const binaryDataManager = BinaryDataManager.getInstance(); - // delete executions by date, if user may access the underyling workflows + // delete executions by date, if user may access the underlying workflows if (deleteBefore) { const filters: IDataObject = { @@ -446,7 +446,7 @@ executionsController.post( return; } - // delete executions by IDs, if user may access the underyling workflows + // delete executions by IDs, if user may access the underlying workflows if (ids) { const executions = await Db.collections.Execution.find({ diff --git a/packages/cli/test/integration/publicApi/executions.test.ts b/packages/cli/test/integration/publicApi/executions.test.ts index bd86f0f61f..d1c5ff8874 100644 --- a/packages/cli/test/integration/publicApi/executions.test.ts +++ b/packages/cli/test/integration/publicApi/executions.test.ts @@ -232,7 +232,7 @@ test('GET /executions should fail due to invalid API Key', async () => { expect(response.statusCode).toBe(401); }); -test('GET /executions should retrieve all successfull executions', async () => { +test('GET /executions should retrieve all successful executions', async () => { const owner = await testDb.createUser({ globalRole: globalOwnerRole, apiKey: randomApiKey() }); const authOwnerAgent = utils.createAgent(app, { diff --git a/packages/cli/test/integration/publicApi/workflows.test.ts b/packages/cli/test/integration/publicApi/workflows.test.ts index 7f24459444..46090532d2 100644 --- a/packages/cli/test/integration/publicApi/workflows.test.ts +++ b/packages/cli/test/integration/publicApi/workflows.test.ts @@ -793,7 +793,7 @@ test('POST /workflows/:id/deactivate should fail due to non-existing workflow', expect(response.statusCode).toBe(404); }); -test('POST /workflows/:id/deactivate should deactive workflow', async () => { +test('POST /workflows/:id/deactivate should deactivate workflow', async () => { const member = await testDb.createUser({ globalRole: globalMemberRole, apiKey: randomApiKey() }); const authAgent = utils.createAgent(app, { @@ -837,7 +837,7 @@ test('POST /workflows/:id/deactivate should deactive workflow', async () => { expect(await workflowRunner.isActive(workflow.id.toString())).toBe(false); }); -test('POST /workflows/:id/deactivate should deactive non-owned workflow when owner', async () => { +test('POST /workflows/:id/deactivate should deactivate non-owned workflow when owner', async () => { const owner = await testDb.createUser({ globalRole: globalOwnerRole, apiKey: randomApiKey() }); const member = await testDb.createUser({ globalRole: globalMemberRole }); diff --git a/packages/core/src/ActiveWebhooks.ts b/packages/core/src/ActiveWebhooks.ts index 518ba1d64e..1485541c95 100644 --- a/packages/core/src/ActiveWebhooks.ts +++ b/packages/core/src/ActiveWebhooks.ts @@ -48,7 +48,7 @@ export class ActiveWebhooks { webhookData.webhookId, ); - // check that there is not a webhook already registed with that path/method + // check that there is not a webhook already registered with that path/method if (this.webhookUrls[webhookKey] && !webhookData.webhookId) { throw new Error( `The URL path that the "${webhookData.node}" node uses is already taken. Please change it to something else.`, diff --git a/packages/core/src/Constants.ts b/packages/core/src/Constants.ts index 7a34185781..6332229926 100644 --- a/packages/core/src/Constants.ts +++ b/packages/core/src/Constants.ts @@ -7,7 +7,7 @@ export const EXTENSIONS_SUBDIRECTORY = 'custom'; export const USER_FOLDER_ENV_OVERWRITE = 'N8N_USER_FOLDER'; export const USER_SETTINGS_FILE_NAME = 'config'; export const USER_SETTINGS_SUBFOLDER = '.n8n'; -export const PLACEHOLDER_EMPTY_EXECUTION_ID = '__UNKOWN__'; +export const PLACEHOLDER_EMPTY_EXECUTION_ID = '__UNKNOWN__'; export const PLACEHOLDER_EMPTY_WORKFLOW_ID = '__EMPTY__'; export const TUNNEL_SUBDOMAIN_ENV = 'N8N_TUNNEL_SUBDOMAIN'; export const WAIT_TIME_UNLIMITED = '3000-01-01T00:00:00.000Z'; diff --git a/packages/core/src/LoadNodeParameterOptions.ts b/packages/core/src/LoadNodeParameterOptions.ts index bdf6e09c04..521361477b 100644 --- a/packages/core/src/LoadNodeParameterOptions.ts +++ b/packages/core/src/LoadNodeParameterOptions.ts @@ -137,7 +137,7 @@ export class LoadNodeParameterOptions { } /** - * Returns the available options via a load request informatoin + * Returns the available options via a load request information * * @param {ILoadOptions} loadOptions The load options which also contain the request information * @param {IWorkflowExecuteAdditionalData} additionalData diff --git a/packages/core/src/NodeExecuteFunctions.ts b/packages/core/src/NodeExecuteFunctions.ts index a4b0fe1a6d..9955bb1f49 100644 --- a/packages/core/src/NodeExecuteFunctions.ts +++ b/packages/core/src/NodeExecuteFunctions.ts @@ -1053,7 +1053,7 @@ export async function requestOAuth2( client_secret: credentials.clientSecret, }; tokenRefreshOptions.body = body; - // Override authorization property so the credentails are not included in it + // Override authorization property so the credentials are not included in it tokenRefreshOptions.headers = { Authorization: '', }; @@ -1122,7 +1122,7 @@ export async function requestOAuth2( * @export * @param {IAllExecuteFunctions} this * @param {string} credentialsType - * @param {(OptionsWithUrl | requestPromise.RequestPromiseOptions)} requestOptionså + * @param {(OptionsWithUrl | requestPromise.RequestPromiseOptions)} requestOptions * @returns */ export async function requestOAuth1( @@ -1253,7 +1253,7 @@ export async function httpRequestWithAuthentication( return await httpRequest(requestOptions); } catch (error) { // if there is a pre authorization method defined and - // the method failed due to unathorized request + // the method failed due to unauthorized request if ( error.response?.status === 401 && additionalData.credentialsHelper.preAuthentication !== undefined @@ -1702,7 +1702,7 @@ export function getNodeParameter( ): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object { const nodeType = workflow.nodeTypes.getByNameAndVersion(node.type, node.typeVersion); if (nodeType === undefined) { - throw new Error(`Node type "${node.type}" is not known so can not return paramter value!`); + throw new Error(`Node type "${node.type}" is not known so can not return parameter value!`); } const value = get(node.parameters, parameterName, fallbackValue); @@ -2352,7 +2352,7 @@ export function getExecuteFunctions( } } catch (error) { // eslint-disable-next-line @typescript-eslint/restrict-template-expressions - Logger.warn(`There was a problem sending messsage to UI: ${error.message}`); + Logger.warn(`There was a problem sending message to UI: ${error.message}`); } }, async sendResponse(response: IExecuteResponsePromiseData): Promise { diff --git a/packages/core/src/UserSettings.ts b/packages/core/src/UserSettings.ts index d049788cf7..22691d6871 100644 --- a/packages/core/src/UserSettings.ts +++ b/packages/core/src/UserSettings.ts @@ -239,7 +239,7 @@ export function getUserSettingsPath(): string { } /** - * Retruns the path to the n8n folder in which all n8n + * Returns the path to the n8n folder in which all n8n * related data gets saved * * @export diff --git a/packages/core/src/WorkflowExecute.ts b/packages/core/src/WorkflowExecute.ts index 5600bad445..1d4aa28fea 100644 --- a/packages/core/src/WorkflowExecute.ts +++ b/packages/core/src/WorkflowExecute.ts @@ -993,13 +993,13 @@ export class WorkflowExecute { executionData.data.main[0]?.length === nodeSuccessData[0].length ) { // The node has one input and one output. The number of items on both is - // identical so we can make the resonable asumption that each of the input + // identical so we can make the reasonable assumption that each of the input // items is the origin of the corresponding output items item.pairedItem = { item: index, }; } else { - // In all other cases is autofixing not possible + // In all other cases autofixing is not possible break checkOutputData; } } diff --git a/packages/core/test/Helpers.ts b/packages/core/test/Helpers.ts index 5acbcc6eda..9d57154989 100644 --- a/packages/core/test/Helpers.ts +++ b/packages/core/test/Helpers.ts @@ -356,7 +356,7 @@ class NodeTypesClass implements INodeTypes { // The different dataTypes to check the values in const dataTypes = ['boolean', 'number', 'string']; - // Itterate over all items to check which ones should be output as via output "true" and + // Iterate over all items to check which ones should be output as via output "true" and // which ones via output "false" let dataType: string; let compareOperationResult: boolean; @@ -441,7 +441,7 @@ class NodeTypesClass implements INodeTypes { name: 'Pass-through', value: 'passThrough', description: - 'Passes through data of one input. The output will conain only items of the defined input.', + 'Passes through data of one input. The output will contain only items of the defined input.', }, { name: 'Wait', diff --git a/packages/editor-ui/src/components/MainSidebar.vue b/packages/editor-ui/src/components/MainSidebar.vue index 7738811207..1c7f527f56 100644 --- a/packages/editor-ui/src/components/MainSidebar.vue +++ b/packages/editor-ui/src/components/MainSidebar.vue @@ -313,14 +313,14 @@ export default mixins( }, executionFinished (): boolean { if (!this.isExecutionPage) { - // We are not on an exeuction page so return false + // We are not on an execution page so return false return false; } const fullExecution = this.$store.getters.getWorkflowExecution; if (fullExecution === null) { - // No exeuction loaded so return also false + // No execution loaded so return also false return false; } @@ -437,9 +437,9 @@ export default mixins( reader.onload = (event: ProgressEvent) => { const data = (event.target as FileReader).result; - let worflowData: IWorkflowDataUpdate; + let workflowData: IWorkflowDataUpdate; try { - worflowData = JSON.parse(data as string); + workflowData = JSON.parse(data as string); } catch (error) { this.$showMessage({ title: this.$locale.baseText('mainSidebar.showMessage.handleFileImport.title'), @@ -449,7 +449,7 @@ export default mixins( return; } - this.$root.$emit('importWorkflowData', { data: worflowData }); + this.$root.$emit('importWorkflowData', { data: workflowData }); }; const input = this.$refs.importFile as HTMLInputElement; diff --git a/packages/editor-ui/src/components/NodeWebhooks.vue b/packages/editor-ui/src/components/NodeWebhooks.vue index f92210155e..2811311916 100644 --- a/packages/editor-ui/src/components/NodeWebhooks.vue +++ b/packages/editor-ui/src/components/NodeWebhooks.vue @@ -1,5 +1,5 @@