diff --git a/commands/db_truncate.ts b/commands/db_truncate.ts index 520aa331..d0dc5bf1 100644 --- a/commands/db_truncate.ts +++ b/commands/db_truncate.ts @@ -43,7 +43,7 @@ export default class DbTruncate extends BaseCommand { /** * Prompts to take consent when truncating the database in production */ - private async takeProductionConstent(): Promise { + private async takeProductionConsent(): Promise { const question = 'You are in production environment. Want to continue truncating the database?' try { return await this.prompt.confirm(question) @@ -78,7 +78,7 @@ export default class DbTruncate extends BaseCommand { */ let continueTruncate = !this.app.inProduction || this.force if (!continueTruncate) { - continueTruncate = await this.takeProductionConstent() + continueTruncate = await this.takeProductionConsent() } /** diff --git a/commands/db_wipe.ts b/commands/db_wipe.ts index aab3cc4a..3d86b4bd 100644 --- a/commands/db_wipe.ts +++ b/commands/db_wipe.ts @@ -61,7 +61,7 @@ export default class DbWipe extends BaseCommand { /** * Prompts to take consent when wiping the database in production */ - private async takeProductionConstent(): Promise { + private async takeProductionConsent(): Promise { const question = 'You are in production environment. Want to continue wiping the database?' try { return await this.prompt.confirm(question) @@ -141,7 +141,7 @@ export default class DbWipe extends BaseCommand { */ let continueWipe = !this.app.inProduction || this.force if (!continueWipe) { - continueWipe = await this.takeProductionConstent() + continueWipe = await this.takeProductionConsent() } /** diff --git a/commands/migration/_base.ts b/commands/migration/_base.ts index c139e521..202383d2 100644 --- a/commands/migration/_base.ts +++ b/commands/migration/_base.ts @@ -36,7 +36,7 @@ export default abstract class MigrationsBase extends BaseCommand { /** * Prompts to take consent for running migrations in production */ - protected async takeProductionConstent(): Promise { + protected async takeProductionConsent(): Promise { const question = 'You are in production environment. Want to continue running migrations?' try { return await this.prompt.confirm(question) diff --git a/commands/migration/rollback.ts b/commands/migration/rollback.ts index 5a4d1fa9..06ac2406 100644 --- a/commands/migration/rollback.ts +++ b/commands/migration/rollback.ts @@ -35,7 +35,7 @@ export default class Rollback extends MigrationsBase { /** * Force run migrations in production */ - @flags.boolean({ description: 'Explictly force to run migrations in production' }) + @flags.boolean({ description: 'Explicitly force to run migrations in production' }) declare force: boolean /** @@ -102,7 +102,7 @@ export default class Rollback extends MigrationsBase { */ let continueMigrations = !this.app.inProduction || this.force if (!continueMigrations) { - continueMigrations = await this.takeProductionConstent() + continueMigrations = await this.takeProductionConsent() } /** diff --git a/commands/migration/run.ts b/commands/migration/run.ts index e7b0a0cc..b2beb56e 100644 --- a/commands/migration/run.ts +++ b/commands/migration/run.ts @@ -83,7 +83,7 @@ export default class Migrate extends MigrationsBase { */ let continueMigrations = !this.app.inProduction || this.force if (!continueMigrations) { - continueMigrations = await this.takeProductionConstent() + continueMigrations = await this.takeProductionConsent() } /** diff --git a/src/bindings/vinejs.ts b/src/bindings/vinejs.ts index 1db97322..a048350e 100644 --- a/src/bindings/vinejs.ts +++ b/src/bindings/vinejs.ts @@ -21,8 +21,8 @@ export function defineValidationRules(db: Database) { return } - const isUnqiue = await checker(db, value as string, field) - if (!isUnqiue) { + const isUnique = await checker(db, value as string, field) + if (!isUnique) { field.report('The {{ field }} has already been taken', 'database.unique', field) } } diff --git a/src/connection/manager.ts b/src/connection/manager.ts index 1d501b2b..e6cfd020 100644 --- a/src/connection/manager.ts +++ b/src/connection/manager.ts @@ -159,7 +159,7 @@ export class ConnectionManager implements ConnectionManagerContract { /** * Move the current connection to the orphan connections. We need - * to keep a seperate track of old connections to make sure + * to keep a separate track of old connections to make sure * they cleanup after some time */ if (connection.connection) { diff --git a/src/database/query_builder/chainable.ts b/src/database/query_builder/chainable.ts index 0ff78051..7839ff3e 100644 --- a/src/database/query_builder/chainable.ts +++ b/src/database/query_builder/chainable.ts @@ -18,7 +18,7 @@ import { RawBuilder } from '../static_builder/raw.js' import { ReferenceBuilder } from '../static_builder/reference.js' /** - * The chainable query builder to consturct SQL queries for selecting, updating and + * The chainable query builder to construct SQL queries for selecting, updating and * deleting records. * * The API internally uses the knex query builder. However, many of methods may have diff --git a/src/orm/relations/belongs_to/query_builder.ts b/src/orm/relations/belongs_to/query_builder.ts index b3b1995e..6da081f4 100644 --- a/src/orm/relations/belongs_to/query_builder.ts +++ b/src/orm/relations/belongs_to/query_builder.ts @@ -62,7 +62,7 @@ export class BelongsToQueryBuilder extends BaseQueryBuilder { } /** - * The profiler data for belongsTo relatioship + * The profiler data for belongsTo relationship */ protected profilerData() { return { @@ -92,7 +92,7 @@ export class BelongsToQueryBuilder extends BaseQueryBuilder { const queryAction = this.queryAction() /** - * Eager query contraints + * Eager query constraints */ if (Array.isArray(this.parent)) { const foreignKeyValues = this.parent diff --git a/src/orm/relations/has_many/query_builder.ts b/src/orm/relations/has_many/query_builder.ts index 05afa8e1..9fd253af 100644 --- a/src/orm/relations/has_many/query_builder.ts +++ b/src/orm/relations/has_many/query_builder.ts @@ -95,7 +95,7 @@ export class HasManyQueryBuilder this.appliedConstraints = true /** - * Eager query contraints + * Eager query constraints */ if (Array.isArray(this.parent)) { this.wrapExisting().whereIn( diff --git a/src/orm/relations/has_many_through/query_builder.ts b/src/orm/relations/has_many_through/query_builder.ts index 9b16a422..aa32dc3e 100644 --- a/src/orm/relations/has_many_through/query_builder.ts +++ b/src/orm/relations/has_many_through/query_builder.ts @@ -75,7 +75,7 @@ export class HasManyThroughQueryBuilder const queryAction = this.queryAction() /** - * Eager query contraints + * Eager query constraints */ if (Array.isArray(this.parent)) { builder.whereIn( diff --git a/src/orm/relations/has_one/query_builder.ts b/src/orm/relations/has_one/query_builder.ts index 5a10bb57..7f17e7ad 100644 --- a/src/orm/relations/has_one/query_builder.ts +++ b/src/orm/relations/has_one/query_builder.ts @@ -90,7 +90,7 @@ export class HasOneQueryBuilder extends BaseQueryBuilder { const queryAction = this.queryAction() /** - * Eager query contraints + * Eager query constraints */ if (Array.isArray(this.parent)) { this.wrapExisting().whereIn( diff --git a/src/orm/relations/many_to_many/pivot_helpers.ts b/src/orm/relations/many_to_many/pivot_helpers.ts index 7885a230..c23d3ba6 100644 --- a/src/orm/relations/many_to_many/pivot_helpers.ts +++ b/src/orm/relations/many_to_many/pivot_helpers.ts @@ -45,10 +45,10 @@ export class PivotHelpers { /** * Adds a where pivot condition to the query */ - wherePivot(varition: 'or' | 'and' | 'not' | 'orNot', key: any, operator?: any, value?: any) { + wherePivot(variation: 'or' | 'and' | 'not' | 'orNot', key: any, operator?: any, value?: any) { let method: keyof (ManyToManyQueryBuilder | ManyToManySubQueryBuilder) = 'where' - switch (varition) { + switch (variation) { case 'or': method = 'orWhere' break @@ -71,10 +71,10 @@ export class PivotHelpers { /** * Adds a where pivot condition to the query */ - whereNullPivot(varition: 'or' | 'and' | 'not' | 'orNot', key: string) { + whereNullPivot(variation: 'or' | 'and' | 'not' | 'orNot', key: string) { let method: keyof (ManyToManyQueryBuilder | ManyToManySubQueryBuilder) = 'whereNull' - switch (varition) { + switch (variation) { case 'or': method = 'orWhereNull' break @@ -91,10 +91,10 @@ export class PivotHelpers { /** * Adds a where pivot condition to the query */ - whereInPivot(varition: 'or' | 'and' | 'not' | 'orNot', key: any, value: any) { + whereInPivot(variation: 'or' | 'and' | 'not' | 'orNot', key: any, value: any) { let method: keyof (ManyToManyQueryBuilder | ManyToManySubQueryBuilder) = 'whereIn' - switch (varition) { + switch (variation) { case 'or': method = 'orWhereIn' break diff --git a/src/orm/relations/many_to_many/query_builder.ts b/src/orm/relations/many_to_many/query_builder.ts index dc05d1dc..28fc107a 100644 --- a/src/orm/relations/many_to_many/query_builder.ts +++ b/src/orm/relations/many_to_many/query_builder.ts @@ -109,7 +109,7 @@ export class ManyToManyQueryBuilder const queryAction = this.queryAction() /** - * Eager query contraints + * Eager query constraints */ if (Array.isArray(this.parent)) { this.wrapExisting().whereInPivot( diff --git a/src/seeders/runner.ts b/src/seeders/runner.ts index d7c100a1..7be8b207 100644 --- a/src/seeders/runner.ts +++ b/src/seeders/runner.ts @@ -65,7 +65,7 @@ export class SeedsRunner { } /** - * Ignore when when the node environement is not the same as the seeder configuration. + * Ignore when the node environment is not the same as the seeder configuration. */ if (Source.environment && !Source.environment.includes(this.nodeEnvironment)) { seeder.status = 'ignored' diff --git a/src/types/database.ts b/src/types/database.ts index 47ae0f25..7faf184d 100644 --- a/src/types/database.ts +++ b/src/types/database.ts @@ -95,7 +95,7 @@ export interface TransactionFn { } /** - * Shape of the query client, that is used to retrive instances + * Shape of the query client, that is used to retrieve instances * of query builder */ export interface QueryClientContract { @@ -117,13 +117,13 @@ export interface QueryClientContract { readonly mode: 'dual' | 'write' | 'read' /** - * The name of the connnection from which the client + * The name of the connection from which the client * was originated */ readonly connectionName: string /** - * Is debug enabled on the connnection or not. Also opens up the API to + * Is debug enabled on the connection or not. Also opens up the API to * disable debug for a given client */ debug: boolean