From ac6ee8f25762c1038dc32af23026af372e8629c8 Mon Sep 17 00:00:00 2001 From: nick-w-nick <43578531+nick-w-nick@users.noreply.github.com> Date: Wed, 8 Nov 2023 10:45:09 -0500 Subject: [PATCH 1/5] fixed connection typos --- src/connection.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/connection.ts b/src/connection.ts index f69b64387..a59a411cb 100644 --- a/src/connection.ts +++ b/src/connection.ts @@ -203,7 +203,7 @@ interface AzureActiveDirectoryMsiAppServiceAuthentication { options: { /** * If you user want to connect to an Azure app service using a specific client account - * they need to provide `clientId` asscoiate to their created idnetity. + * they need to provide `clientId` associate to their created identity. * * This is optional for retrieve token from azure web app service */ @@ -242,7 +242,7 @@ interface AzureActiveDirectoryAccessTokenAuthentication { type: 'azure-active-directory-access-token'; options: { /** - * A user need to provide `token` which they retrived else where + * A user need to provide `token` which they retrieved else where * to forming the connection. */ token: string; @@ -253,12 +253,12 @@ interface AzureActiveDirectoryPasswordAuthentication { type: 'azure-active-directory-password'; options: { /** - * A user need to provide `userName` asscoiate to their account. + * A user need to provide `userName` associate to their account. */ userName: string; /** - * A user need to provide `password` asscoiate to their account. + * A user need to provide `password` associate to their account. */ password: string; @@ -436,7 +436,7 @@ export interface ConnectionConfiguration { */ options?: ConnectionOptions; /** - * Authentication realted options for connection. + * Authentication related options for connection. */ authentication?: AuthenticationOptions; } @@ -1234,7 +1234,7 @@ class Connection extends EventEmitter { appName: undefined, camelCaseColumns: false, cancelTimeout: DEFAULT_CANCEL_TIMEOUT, - columnEncryptionKeyCacheTTL: 2 * 60 * 60 * 1000, // Units: miliseconds + columnEncryptionKeyCacheTTL: 2 * 60 * 60 * 1000, // Units: milliseconds columnEncryptionSetting: false, columnNameReplacer: undefined, connectionRetryInterval: DEFAULT_CONNECT_RETRY_INTERVAL, @@ -2165,7 +2165,7 @@ class Connection extends EventEmitter { // If we have routing data stored, this connection has been redirected const server = this.routingData ? this.routingData.server : this.config.server; const port = this.routingData ? `:${this.routingData.port}` : hostPostfix; - // Grab the target host from the connection configration, and from a redirect message + // Grab the target host from the connection configuration, and from a redirect message // otherwise, leave the message empty. const routingMessage = this.routingData ? ` (redirected from ${this.config.server}${hostPostfix})` : ''; const message = `Failed to connect to ${server}${port}${routingMessage} in ${this.config.options.connectTimeout}ms`; @@ -2301,7 +2301,7 @@ class Connection extends EventEmitter { // If we have routing data stored, this connection has been redirected const server = this.routingData ? this.routingData.server : this.config.server; const port = this.routingData ? `:${this.routingData.port}` : hostPostfix; - // Grab the target host from the connection configration, and from a redirect message + // Grab the target host from the connection configuration, and from a redirect message // otherwise, leave the message empty. const routingMessage = this.routingData ? ` (redirected from ${this.config.server}${hostPostfix})` : ''; const message = `Failed to connect to ${server}${port}${routingMessage} - ${error.message}`; From a2884525a2d8754e69124351700b7fcc35797c0a Mon Sep 17 00:00:00 2001 From: nick-w-nick <43578531+nick-w-nick@users.noreply.github.com> Date: Wed, 8 Nov 2023 10:50:35 -0500 Subject: [PATCH 2/5] fixed message-io typos --- src/message-io.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/message-io.ts b/src/message-io.ts index 8ad7ce736..30a733ab6 100644 --- a/src/message-io.ts +++ b/src/message-io.ts @@ -126,7 +126,7 @@ class MessageIO extends EventEmitter { }; const onReadable = () => { - // When there is handshake data on the encryped stream of the secure pair, + // When there is handshake data on the encrypted stream of the secure pair, // we wrap it into a `PRELOGIN` message and send it to the server. // // For each `PRELOGIN` message we sent we get back exactly one response message From cc718a23bfb35305ed6739ddc5e60a206fb12ba1 Mon Sep 17 00:00:00 2001 From: nick-w-nick <43578531+nick-w-nick@users.noreply.github.com> Date: Wed, 8 Nov 2023 10:50:42 -0500 Subject: [PATCH 3/5] fixed request typos --- src/request.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/request.ts b/src/request.ts index 7649cb777..6b6b4f30c 100644 --- a/src/request.ts +++ b/src/request.ts @@ -20,7 +20,7 @@ import { Collation } from './collation'; type CompletionCallback = /** * @param error - * If an error occured, an error object. + * If an error occurred, an error object. * * @param rowCount * The number of rows emitted as result of executing the SQL statement. @@ -123,7 +123,7 @@ class Request extends EventEmitter { /** * This event, describing result set columns, will be emitted before row - * events are emitted. This event may be emited multiple times when more + * events are emitted. This event may be emitted multiple times when more * than one recordset is produced by the statement. * * An array like object, where the columns can be accessed either by index @@ -173,7 +173,7 @@ class Request extends EventEmitter { * * This token is used to indicate the completion of a SQL statement. * As multiple SQL statements can be sent to the server in a single SQL batch, multiple `done` can be generated. - * An `done` event is emited for each SQL statement in the SQL batch except variable declarations. + * An `done` event is emitted for each SQL statement in the SQL batch except variable declarations. * For execution of SQL statements within stored procedures, `doneProc` and `doneInProc` events are used in place of `done`. * * If you are using [[Connection.execSql]] then SQL server may treat the multiple calls with the same query as a stored procedure. @@ -191,7 +191,7 @@ class Request extends EventEmitter { * * @param rst * Rows as a result of executing the SQL statement. - * Will only be avaiable if Connection's [[ConnectionOptions.rowCollectionOnDone]] is `true`. + * Will only be available if Connection's [[ConnectionOptions.rowCollectionOnDone]] is `true`. */ (rowCount: number | undefined, more: boolean, rst?: any[]) => void ): this @@ -216,7 +216,7 @@ class Request extends EventEmitter { * * @param rst * Rows as a result of executing the SQL statement. - * Will only be avaiable if Connection's [[ConnectionOptions.rowCollectionOnDone]] is `true`. + * Will only be available if Connection's [[ConnectionOptions.rowCollectionOnDone]] is `true`. */ (rowCount: number | undefined, more: boolean, rst?: any[]) => void ): this @@ -238,7 +238,7 @@ class Request extends EventEmitter { * * @param rst * Rows as a result of executing the SQL statement. - * Will only be avaiable if Connection's [[ConnectionOptions.rowCollectionOnDone]] is `true`. + * Will only be available if Connection's [[ConnectionOptions.rowCollectionOnDone]] is `true`. */ (rowCount: number | undefined, more: boolean, procReturnStatusValue: number, rst?: any[]) => void ): this From f24b069f06befdbceaaa51559585402d8719c673 Mon Sep 17 00:00:00 2001 From: nick-w-nick <43578531+nick-w-nick@users.noreply.github.com> Date: Wed, 8 Nov 2023 11:37:44 -0500 Subject: [PATCH 4/5] fixed value-parser typos --- src/value-parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/value-parser.ts b/src/value-parser.ts index a4e0db37f..05f0e4d9a 100644 --- a/src/value-parser.ts +++ b/src/value-parser.ts @@ -549,7 +549,7 @@ function readVariant(buf: Buffer, offset: number, options: ParserOptions, dataLe // maxLength (unused?) ({ offset } = readUInt16LE(buf, offset)); - // collation (unsued?) + // collation (unused?) ({ offset } = readCollation(buf, offset)); return readNChars(buf, offset, dataLength); From 43f798c1539ee8d739381344041407ca894e147d Mon Sep 17 00:00:00 2001 From: nick-w-nick <43578531+nick-w-nick@users.noreply.github.com> Date: Wed, 8 Nov 2023 11:44:25 -0500 Subject: [PATCH 5/5] fixed date typos --- src/data-types/date.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data-types/date.ts b/src/data-types/date.ts index d5c73ab95..8e8e1b760 100644 --- a/src/data-types/date.ts +++ b/src/data-types/date.ts @@ -48,7 +48,7 @@ const Date: DataType = { yield buffer; }, - // TODO: value is techincally of type 'unknown'. + // TODO: value is technically of type 'unknown'. validate: function(value): null | Date { if (value == null) { return null;