lesgo 2.1.2 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,5 +7,5 @@ export { default as elasticache } from './elasticache';
7
7
  export { default as jwt } from './jwt';
8
8
  export { default as rds } from './rds';
9
9
  export { default as s3 } from './s3';
10
- export { default as secretsmanager } from './secretsmanager';
10
+ export { default as secretsmanager } from './secretsmanager2';
11
11
  export { default as sqs } from './sqs';
@@ -7,5 +7,5 @@ export { default as elasticache } from './elasticache';
7
7
  export { default as jwt } from './jwt';
8
8
  export { default as rds } from './rds';
9
9
  export { default as s3 } from './s3';
10
- export { default as secretsmanager } from './secretsmanager';
10
+ export { default as secretsmanager } from './secretsmanager2';
11
11
  export { default as sqs } from './sqs';
@@ -5,6 +5,7 @@ declare const _default: {
5
5
  databaseName: string | undefined;
6
6
  proxy: {
7
7
  dbCredentialsSecretId: string | undefined;
8
+ host: string | undefined;
8
9
  };
9
10
  };
10
11
  };
@@ -7,6 +7,7 @@ export default {
7
7
  proxy: {
8
8
  dbCredentialsSecretId:
9
9
  process.env.LESGO_AWS_RDS_AURORA_MYSQL_PROXY_DB_CREDENTIALS_SECRET_ID,
10
+ host: process.env.LESGO_AWS_RDS_AURORA_MYSQL_PROXY_HOST,
10
11
  },
11
12
  },
12
13
  },
@@ -72,13 +72,22 @@ const getMySQLProxyClient = (connOptions, clientOpts) =>
72
72
  { key: 'username', type: 'string', required: true },
73
73
  { key: 'password', type: 'string', required: true },
74
74
  ]);
75
- const conn = yield createConnection(
76
- Object.assign(Object.assign({}, connOptions), {
77
- host: validatedDbCredentials.host,
78
- user: validatedDbCredentials.username,
79
- password: validatedDbCredentials.password,
75
+ const connOpts = Object.assign(
76
+ {
77
+ host: rdsConfig.aurora.mysql.proxy.host || validatedDbCredentials.host,
80
78
  database: databaseName,
81
- })
79
+ },
80
+ connOptions
81
+ );
82
+ logger.debug(`${FILE}::CONN_OPTS`, { connOpts });
83
+ const conn = yield createConnection(
84
+ Object.assign(
85
+ {
86
+ user: validatedDbCredentials.username,
87
+ password: validatedDbCredentials.password,
88
+ },
89
+ connOpts
90
+ )
82
91
  );
83
92
  singleton[singletonConn] = conn;
84
93
  logger.debug(`${FILE}::NEW_RDS_CONNECTION`);
@@ -0,0 +1,2 @@
1
+ declare const disconnectCache: () => Promise<void>;
2
+ export default disconnectCache;
@@ -0,0 +1,5 @@
1
+ import { disconnectElastiCacheRedisClient } from '../../../services/ElastiCacheRedisService';
2
+ const disconnectCache = () => {
3
+ return disconnectElastiCacheRedisClient();
4
+ };
5
+ export default disconnectCache;
@@ -1,3 +1,4 @@
1
+ export { default as disconnectCache } from './disconnectCache';
1
2
  export { default as deleteCache } from './deleteCache';
2
3
  export { default as getCache } from './getCache';
3
4
  export { default as getClient } from './getClient';
@@ -1,3 +1,4 @@
1
+ export { default as disconnectCache } from './disconnectCache';
1
2
  export { default as deleteCache } from './deleteCache';
2
3
  export { default as getCache } from './getCache';
3
4
  export { default as getClient } from './getClient';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lesgo",
3
- "version": "2.1.2",
3
+ "version": "2.1.4",
4
4
  "description": "Core framework for lesgo node.js serverless framework.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,2 +0,0 @@
1
- declare const disconnect: () => Promise<void>;
2
- export default disconnect;
@@ -1,5 +0,0 @@
1
- import { disconnectMySQLProxyClient } from '../../../../services/RDSAuroraMySQLProxyService';
2
- const disconnect = () => {
3
- return disconnectMySQLProxyClient();
4
- };
5
- export default disconnect;