Skip to content

Commit

Permalink
chore: change tough default import to named import (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
crystall-bitquill authored Oct 24, 2024
1 parent 7a1b060 commit 9f3adab
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { WrapperProperties } from "../../wrapper_property";
import { SamlCredentialsProviderFactory } from "./saml_credentials_provider_factory";
import axios from "axios";
import { stringify } from "querystring";
import tough from "tough-cookie";
import { CookieJar } from "tough-cookie";
import { wrapper } from "axios-cookiejar-support";
import { HttpsCookieAgent } from "http-cookie-agent/http";
import { SamlUtils } from "../../utils/saml_utils";
Expand Down Expand Up @@ -109,7 +109,7 @@ export class AdfsCredentialsProviderFactory extends SamlCredentialsProviderFacto
logger.debug(Messages.get("AdfsCredentialsProviderFactory.signOnPagePostActionUrl", uri));
SamlUtils.validateUrl(uri);
wrapper(axios);
const jar = new tough.CookieJar();
const jar = new CookieJar();
const httpsAgentOptions = { ...WrapperProperties.HTTPS_AGENT_OPTIONS.get(props), ...{ cookies: { jar } } };
const httpsAgent = new HttpsCookieAgent(httpsAgentOptions);

Expand Down
2 changes: 1 addition & 1 deletion mysql/lib/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export class AwsMySQLClient extends AwsClient {

async end() {
if (!this.isConnected || !this.targetClient?.client) {
// No connections has been initialized.
// No connections have been initialized.
// This might happen if end is called in a finally block when an error occurred while initializing the first connection.
return;
}
Expand Down
2 changes: 1 addition & 1 deletion pg/lib/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export class AwsPGClient extends AwsClient {

async end() {
if (!this.isConnected || !this.targetClient?.client) {
// No connections has been initialized.
// No connections have been initialized.
// This might happen if end is called in a finally block when an error occurred while initializing the first connection.
return;
}
Expand Down
3 changes: 1 addition & 2 deletions pg/lib/dialect/pg_database_dialect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ import { TransactionIsolationLevel } from "../../../common/lib/utils/transaction
import { ClientWrapper } from "../../../common/lib/client_wrapper";
import { FailoverRestriction } from "../../../common/lib/plugins/failover/failover_restriction";
import { AwsPoolClient } from "../../../common/lib/aws_pool_client";
import { AwsMysqlPoolClient } from "../../../mysql/lib/mysql_pool_client";
import { AwsPgPoolClient } from "../pg_pool_client";
import { AwsPoolConfig } from "../../../common/lib/aws_pool_config";
import { PoolClient, PoolConfig } from "pg";
import { PoolConfig } from "pg";
import { WrapperProperties } from "../../../common/lib/wrapper_property";

export class PgDatabaseDialect implements DatabaseDialect {
Expand Down

0 comments on commit 9f3adab

Please sign in to comment.