@elsikora/nestjs-typeorm-aws-connector 1.3.0 → 1.3.1
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.
- package/README.md +239 -164
- package/dist/cjs/modules/typeorm-aws-connector/typeorm-aws-connector.service.js +4 -10
- package/dist/cjs/modules/typeorm-aws-connector/typeorm-aws-connector.service.js.map +1 -1
- package/dist/cjs/package.json +1 -0
- package/dist/esm/modules/typeorm-aws-connector/typeorm-aws-connector.service.js +1 -7
- package/dist/esm/modules/typeorm-aws-connector/typeorm-aws-connector.service.js.map +1 -1
- package/dist/esm/package.json +1 -0
- package/package.json +1 -1
- package/dist/cjs/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/external/tslib/tslib.es6.js +0 -43
- package/dist/cjs/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/external/tslib/tslib.es6.js.map +0 -1
- package/dist/cjs/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/modules/aws/parameter-store/parameter-store.service.js +0 -49
- package/dist/cjs/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/modules/aws/parameter-store/parameter-store.service.js.map +0 -1
- package/dist/cjs/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/modules/config/config.module.js +0 -89
- package/dist/cjs/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/modules/config/config.module.js.map +0 -1
- package/dist/cjs/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/modules/config/config.service.js +0 -62
- package/dist/cjs/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/modules/config/config.service.js.map +0 -1
- package/dist/cjs/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/constant/config/constant.js +0 -22
- package/dist/cjs/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/constant/config/constant.js.map +0 -1
- package/dist/cjs/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/enum/environment.enum.js +0 -20
- package/dist/cjs/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/enum/environment.enum.js.map +0 -1
- package/dist/cjs/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/enum/instance-name.enum.js +0 -11
- package/dist/cjs/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/enum/instance-name.enum.js.map +0 -1
- package/dist/cjs/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/enum/service.enum.js +0 -224
- package/dist/cjs/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/enum/service.enum.js.map +0 -1
- package/dist/cjs/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/provider/config/config-parameters.provider.js +0 -33
- package/dist/cjs/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/provider/config/config-parameters.provider.js.map +0 -1
- package/dist/cjs/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/provider/config/properties.provider.js +0 -18
- package/dist/cjs/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/provider/config/properties.provider.js.map +0 -1
- package/dist/cjs/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/provider/config/ssm-client.provider.js +0 -19
- package/dist/cjs/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/provider/config/ssm-client.provider.js.map +0 -1
- package/dist/esm/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/external/tslib/tslib.es6.js +0 -39
- package/dist/esm/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/external/tslib/tslib.es6.js.map +0 -1
- package/dist/esm/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/modules/aws/parameter-store/parameter-store.service.js +0 -49
- package/dist/esm/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/modules/aws/parameter-store/parameter-store.service.js.map +0 -1
- package/dist/esm/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/modules/config/config.module.js +0 -89
- package/dist/esm/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/modules/config/config.module.js.map +0 -1
- package/dist/esm/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/modules/config/config.service.js +0 -62
- package/dist/esm/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/modules/config/config.service.js.map +0 -1
- package/dist/esm/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/constant/config/constant.js +0 -18
- package/dist/esm/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/constant/config/constant.js.map +0 -1
- package/dist/esm/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/enum/environment.enum.js +0 -20
- package/dist/esm/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/enum/environment.enum.js.map +0 -1
- package/dist/esm/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/enum/instance-name.enum.js +0 -11
- package/dist/esm/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/enum/instance-name.enum.js.map +0 -1
- package/dist/esm/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/enum/service.enum.js +0 -224
- package/dist/esm/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/enum/service.enum.js.map +0 -1
- package/dist/esm/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/provider/config/config-parameters.provider.js +0 -31
- package/dist/esm/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/provider/config/config-parameters.provider.js.map +0 -1
- package/dist/esm/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/provider/config/properties.provider.js +0 -16
- package/dist/esm/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/provider/config/properties.provider.js.map +0 -1
- package/dist/esm/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/provider/config/ssm-client.provider.js +0 -17
- package/dist/esm/external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/provider/config/ssm-client.provider.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,32 +1,61 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://
|
|
3
|
-
</p>
|
|
4
|
-
<p align="center">
|
|
5
|
-
<h1 align="center">NestJS TypeORM AWS Connector</h1>
|
|
6
|
-
</p>
|
|
7
|
-
|
|
8
|
-
<p align="center">
|
|
9
|
-
<img src="https://img.shields.io/github/license/ElsiKora/NestJS-TypeORM-AWS-Connector?style=for-the-badge&logo=opensourceinitiative&logoColor=white&color=0080ff" alt="license">
|
|
10
|
-
<img src="https://img.shields.io/github/last-commit/ElsiKora/NestJS-TypeORM-AWS-Connector?style=for-the-badge&logo=git&logoColor=white&color=0080ff" alt="last-commit">
|
|
11
|
-
<img src="https://img.shields.io/github/languages/top/ElsiKora/NestJS-TypeORM-AWS-Connector?style=for-the-badge&color=0080ff" alt="repo-top-language">
|
|
12
|
-
<img src="https://img.shields.io/github/languages/count/ElsiKora/NestJS-TypeORM-AWS-Connector?style=for-the-badge&color=0080ff" alt="repo-language-count">
|
|
2
|
+
<img src="https://6jft62zmy9nx2oea.public.blob.vercel-storage.com/nestjs-typeorm-aws-connector-moPeh5TktoUIqqecoEMyixlLWpCIfL.png" width="500" alt="project-logo">
|
|
13
3
|
</p>
|
|
14
4
|
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
</p>
|
|
5
|
+
<h1 align="center">NestJS-TypeORM-AWS-Connector 🔌</h1>
|
|
6
|
+
<p align="center"><em>Seamlessly connect your NestJS applications with AWS Parameter Store and TypeORM</em></p>
|
|
18
7
|
|
|
19
8
|
<p align="center">
|
|
20
9
|
<a aria-label="ElsiKora logo" href="https://elsikora.com">
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<img src="https://img.shields.io/badge/Prettier-F7B93E.svg?style=for-the-badge&logo=Prettier&logoColor=black" alt="Prettier">
|
|
24
|
-
<img src="https://img.shields.io/badge/ESLint-4B32C3.svg?style=for-the-badge&logo=ESLint&logoColor=white" alt="ESLint">
|
|
25
|
-
<img src="https://img.shields.io/badge/TypeScript-3178C6.svg?style=for-the-badge&logo=TypeScript&logoColor=white" alt="TypeScript">
|
|
26
|
-
<img src="https://img.shields.io/badge/NestJS-E0234E.svg?style=for-the-badge&logo=NestJS&logoColor=white" alt="NestJS">
|
|
27
|
-
<img src="https://img.shields.io/badge/TypeORM-FE0902.svg?style=for-the-badge&logo=TypeORM&logoColor=white" alt="TypeORM">
|
|
10
|
+
<img src="https://img.shields.io/badge/MADE%20BY%20ElsiKora-333333.svg?style=for-the-badge" alt="ElsiKora">
|
|
11
|
+
</a> <img src="https://img.shields.io/badge/npm-blue.svg?style=for-the-badge&logo=npm&logoColor=white" alt="npm"> <img src="https://img.shields.io/badge/nestjs-E0234E.svg?style=for-the-badge&logo=nestjs&logoColor=white" alt="nestjs"> <img src="https://img.shields.io/badge/typescript-3178C6.svg?style=for-the-badge&logo=typescript&logoColor=white" alt="typescript"> <img src="https://img.shields.io/badge/aws-232F3E.svg?style=for-the-badge&logo=amazonaws&logoColor=white" alt="aws"> <img src="https://img.shields.io/badge/typeorm-orange.svg?style=for-the-badge&logo=typeorm&logoColor=white" alt="typeorm"> <img src="https://img.shields.io/badge/license-MIT-yellow.svg?style=for-the-badge&logo=license&logoColor=white" alt="license-MIT">
|
|
28
12
|
</p>
|
|
29
13
|
|
|
14
|
+
|
|
15
|
+
## 📚 Table of Contents
|
|
16
|
+
- [Description](#-description)
|
|
17
|
+
- [Features](#-features)
|
|
18
|
+
- [Installation](#-installation)
|
|
19
|
+
- [Usage](#-usage)
|
|
20
|
+
- [Roadmap](#-roadmap)
|
|
21
|
+
- [FAQ](#-faq)
|
|
22
|
+
- [License](#-license)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## 📖 Description
|
|
26
|
+
NestJS-TypeORM-AWS-Connector provides a robust solution for NestJS applications requiring secure database connections with credentials stored in AWS. This connector bridges the gap between your TypeORM-powered NestJS application and AWS services like Secrets Manager and Parameter Store, enabling secure credential management and automated rotation. Perfect for cloud-native applications, microservices, and enterprise systems where security and reliability are paramount. The connector supports multiple database types, connection pooling optimization, and eliminates hardcoded credentials in your codebase, significantly enhancing your application's security posture.
|
|
27
|
+
|
|
28
|
+
## 🚀 Features
|
|
29
|
+
- ✨ **Secure credential management with AWS Secrets Manager integration**
|
|
30
|
+
- ✨ **Automatic database connection rotation to mitigate credential leaks**
|
|
31
|
+
- ✨ **Configurable connection pooling for optimal database performance**
|
|
32
|
+
- ✨ **Support for multiple database types (MySQL, PostgreSQL)**
|
|
33
|
+
- ✨ **Customizable relation load strategies for performance optimization**
|
|
34
|
+
- ✨ **Failure recovery mechanism for maintaining database connectivity**
|
|
35
|
+
- ✨ **Easy integration with NestJS application configurations**
|
|
36
|
+
- ✨ **Support for both synchronous and asynchronous module registration**
|
|
37
|
+
- ✨ **Extensive logging for debugging and monitoring**
|
|
38
|
+
- ✨ **Zero configuration option with sensible defaults**
|
|
39
|
+
|
|
40
|
+
## 🛠 Installation
|
|
41
|
+
```bash
|
|
42
|
+
# Using npm
|
|
43
|
+
npm install @elsikora/nestjs-typeorm-aws-connector
|
|
44
|
+
|
|
45
|
+
# Using yarn
|
|
46
|
+
yarn add @elsikora/nestjs-typeorm-aws-connector
|
|
47
|
+
|
|
48
|
+
# Using pnpm
|
|
49
|
+
pnpm add @elsikora/nestjs-typeorm-aws-connector
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### Prerequisites
|
|
53
|
+
|
|
54
|
+
- NestJS application
|
|
55
|
+
- AWS credentials configured
|
|
56
|
+
- TypeORM integrated with your NestJS app
|
|
57
|
+
```
|
|
58
|
+
|
|
30
59
|
## ⚠️ Important Prerequisites
|
|
31
60
|
|
|
32
61
|
This module requires `@elsikora/nestjs-aws-parameter-store-config` to function properly. Before using this module, please:
|
|
@@ -72,191 +101,237 @@ export class AppModule {}
|
|
|
72
101
|
|
|
73
102
|
For more information about the Parameter Store configuration, please refer to the [@elsikora/nestjs-aws-parameter-store-config documentation](https://github.com/ElsiKora/NestJS-AWS-Parameter-Store-Config).
|
|
74
103
|
|
|
75
|
-
##
|
|
76
|
-
|
|
77
|
-
NestJS-TypeORM-AWS-Connector is a powerful integration module that provides seamless database connectivity for NestJS applications using TypeORM with AWS infrastructure. It supports automatic connection management, connection pooling, and rotation features specifically designed for AWS environments. The module simplifies database configuration and management while providing robust options for customization and optimization.
|
|
78
|
-
|
|
79
|
-
## Features
|
|
80
|
-
|
|
81
|
-
| | Feature | Description |
|
|
82
|
-
| --- | ----------------------- | -------------------------------------------------------------------------------------------------- |
|
|
83
|
-
| 🔄 | **Connection Rotation** | Automatic connection rotation to prevent stale connections and ensure optimal database performance |
|
|
84
|
-
| 🏊 | **Connection Pooling** | Configurable connection pool with customizable size and timeout settings |
|
|
85
|
-
| ⚡️ | **Performance** | Optimized database connections with configurable timeouts and idle connection management |
|
|
86
|
-
| 🔧 | **Easy Configuration** | Flexible configuration options through both static and async module registration |
|
|
87
|
-
| 🎯 | **Type Safety** | Full TypeScript support with strong typing for all configuration options |
|
|
88
|
-
| 📊 | **Multiple Databases** | Support for different database types (PostgreSQL, MySQL, etc.) through EDatabaseType enum |
|
|
89
|
-
| 🔍 | **Verbose Logging** | Optional verbose mode for detailed logging of database operations |
|
|
90
|
-
| 🔄 | **Auto-Sync Schema** | Optional automatic schema synchronization with database |
|
|
91
|
-
|
|
92
|
-
## Installation
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
npm install @elsikora/nestjs-typeorm-aws-connector
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
## Usage
|
|
104
|
+
## 💡 Usage
|
|
105
|
+
## Basic Usage
|
|
99
106
|
|
|
100
|
-
|
|
107
|
+
First, import the module in your NestJS application's main module:
|
|
101
108
|
|
|
102
109
|
```typescript
|
|
103
|
-
import {
|
|
110
|
+
import { Module } from '@nestjs/common';
|
|
111
|
+
import { TypeOrmAwsConnectorModule } from '@elsikora/nestjs-typeorm-aws-connector';
|
|
112
|
+
import { EDatabaseType } from '@elsikora/nestjs-typeorm-aws-connector';
|
|
113
|
+
import { UserEntity } from './entities/user.entity';
|
|
104
114
|
|
|
105
115
|
@Module({
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
intervalMs: 5000,
|
|
120
|
-
isEnabled: true,
|
|
121
|
-
},
|
|
122
|
-
shouldSynchronize: true,
|
|
123
|
-
type: EDatabaseType.POSTGRES,
|
|
124
|
-
}),
|
|
125
|
-
}),
|
|
126
|
-
],
|
|
116
|
+
imports: [
|
|
117
|
+
TypeOrmAwsConnectorModule.register({
|
|
118
|
+
type: EDatabaseType.POSTGRES,
|
|
119
|
+
databaseName: 'my_database',
|
|
120
|
+
port: 5432,
|
|
121
|
+
entities: [UserEntity],
|
|
122
|
+
// Optionally enable credential rotation
|
|
123
|
+
rotation: {
|
|
124
|
+
isEnabled: true,
|
|
125
|
+
intervalMs: 3600000, // 1 hour
|
|
126
|
+
}
|
|
127
|
+
}),
|
|
128
|
+
],
|
|
127
129
|
})
|
|
128
130
|
export class AppModule {}
|
|
129
131
|
```
|
|
130
132
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
```typescript
|
|
134
|
-
import { TypeOrmAwsConnectorModule, EDatabaseType } from "@elsikora/nestjs-typeorm-aws-connector";
|
|
135
|
-
|
|
136
|
-
@Module({
|
|
137
|
-
imports: [
|
|
138
|
-
TypeOrmAwsConnectorModule.register({
|
|
139
|
-
connectionTimeoutMs: 30_000,
|
|
140
|
-
databaseName: "app",
|
|
141
|
-
entities: [Bank],
|
|
142
|
-
idleTimeoutMs: 30_000,
|
|
143
|
-
isVerbose: true,
|
|
144
|
-
poolSize: 10,
|
|
145
|
-
port: 5432,
|
|
146
|
-
rotation: {
|
|
147
|
-
intervalMs: 5000,
|
|
148
|
-
isEnabled: true,
|
|
149
|
-
},
|
|
150
|
-
shouldSynchronize: true,
|
|
151
|
-
type: EDatabaseType.POSTGRES,
|
|
152
|
-
}),
|
|
153
|
-
],
|
|
154
|
-
})
|
|
155
|
-
export class AppModule {}
|
|
156
|
-
```
|
|
133
|
+
## Asynchronous Configuration
|
|
157
134
|
|
|
158
|
-
|
|
135
|
+
If you need to load configuration asynchronously, use the `registerAsync` method:
|
|
159
136
|
|
|
160
137
|
```typescript
|
|
161
|
-
import {
|
|
162
|
-
import {
|
|
138
|
+
import { Module } from '@nestjs/common';
|
|
139
|
+
import { ConfigModule, ConfigService } from '@nestjs/config';
|
|
140
|
+
import { TypeOrmAwsConnectorModule } from '@elsikora/nestjs-typeorm-aws-connector';
|
|
141
|
+
import { EDatabaseType } from '@elsikora/nestjs-typeorm-aws-connector';
|
|
163
142
|
|
|
164
143
|
@Module({
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
144
|
+
imports: [
|
|
145
|
+
ConfigModule.forRoot(),
|
|
146
|
+
TypeOrmAwsConnectorModule.registerAsync({
|
|
147
|
+
imports: [ConfigModule],
|
|
148
|
+
inject: [ConfigService],
|
|
149
|
+
useFactory: (configService: ConfigService) => ({
|
|
150
|
+
type: EDatabaseType.MYSQL,
|
|
151
|
+
databaseName: configService.get('DB_NAME'),
|
|
152
|
+
port: configService.get('DB_PORT'),
|
|
153
|
+
entities: [__dirname + '/**/*.entity{.ts,.js}'],
|
|
154
|
+
rotation: {
|
|
155
|
+
isEnabled: configService.get('DB_ROTATION_ENABLED') === 'true',
|
|
156
|
+
},
|
|
157
|
+
}),
|
|
158
|
+
}),
|
|
159
|
+
],
|
|
176
160
|
})
|
|
177
161
|
export class AppModule {}
|
|
178
162
|
```
|
|
179
163
|
|
|
180
|
-
##
|
|
181
|
-
|
|
182
|
-
| Option | Type | Required | Default | Description |
|
|
183
|
-
| -------------------- | --------------------- | -------- | --------------------------- | -------------------------------------------- |
|
|
184
|
-
| type | EDatabaseType | Yes | - | Database type (POSTGRES, MYSQL, etc.) |
|
|
185
|
-
| databaseName | string | Yes | - | Name of the database to connect to |
|
|
186
|
-
| port | number | Yes | - | Database port number |
|
|
187
|
-
| entities | Entity[] | Yes | - | Array of entity classes to be loaded |
|
|
188
|
-
| poolSize | number | false | 10 | Maximum number of connections in the pool |
|
|
189
|
-
| connectionTimeoutMs | number | false | 30000 | Connection timeout in milliseconds |
|
|
190
|
-
| idleTimeoutMs | number | false | 30000 | Idle connection timeout in milliseconds |
|
|
191
|
-
| isVerbose | boolean | false | false | Enable verbose logging |
|
|
192
|
-
| shouldSynchronize | boolean | false | false | Automatically synchronize database schema |
|
|
193
|
-
| relationLoadStrategy | ERelationLoadStrategy | Yes | ERelationLoadStrategy.QUERY | Relation load strategy (QUERY, JOIN) |
|
|
194
|
-
| rotation.isEnabled | boolean | No | false | Enable connection rotation |
|
|
195
|
-
| rotation.intervalMs | number | No | 3600000 | Connection rotation interval in milliseconds |
|
|
164
|
+
## Using TypeOrmAwsConnectorService
|
|
196
165
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
The module supports multiple database types through the `EDatabaseType` enum:
|
|
166
|
+
Inject the service to manually retrieve database connection options:
|
|
200
167
|
|
|
201
168
|
```typescript
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
169
|
+
import { Injectable } from '@nestjs/common';
|
|
170
|
+
import { TypeOrmAwsConnectorService } from '@elsikora/nestjs-typeorm-aws-connector';
|
|
171
|
+
import { DataSource, DataSourceOptions } from 'typeorm';
|
|
172
|
+
|
|
173
|
+
@Injectable()
|
|
174
|
+
export class DatabaseService {
|
|
175
|
+
private dataSource: DataSource;
|
|
176
|
+
|
|
177
|
+
constructor(private readonly connectorService: TypeOrmAwsConnectorService) {}
|
|
178
|
+
|
|
179
|
+
async initializeConnection() {
|
|
180
|
+
const options: DataSourceOptions = await this.connectorService.getTypeOrmOptions();
|
|
181
|
+
this.dataSource = new DataSource(options);
|
|
182
|
+
await this.dataSource.initialize();
|
|
183
|
+
return this.dataSource;
|
|
184
|
+
}
|
|
205
185
|
}
|
|
206
186
|
```
|
|
207
187
|
|
|
208
|
-
##
|
|
188
|
+
## AWS Parameter Store and Secrets Manager Configuration
|
|
209
189
|
|
|
210
|
-
|
|
190
|
+
The connector expects your AWS environment to be properly configured:
|
|
211
191
|
|
|
212
|
-
|
|
192
|
+
```typescript
|
|
193
|
+
// Simplified example of AWS setup requirements
|
|
194
|
+
// In your AWS Parameter Store:
|
|
195
|
+
// /myapp/database-credentials-secret-id -> 'db-credentials-secret-id'
|
|
196
|
+
// /myapp/host -> 'your-database-hostname'
|
|
197
|
+
|
|
198
|
+
// In AWS Secrets Manager (with ID 'db-credentials-secret-id'):
|
|
199
|
+
// {
|
|
200
|
+
// "username": "dbuser",
|
|
201
|
+
// "password": "dbpassword"
|
|
202
|
+
// }
|
|
203
|
+
|
|
204
|
+
// Your NestJS module configuration
|
|
205
|
+
TypeOrmAwsConnectorModule.register({
|
|
206
|
+
type: EDatabaseType.POSTGRES,
|
|
207
|
+
databaseName: 'myapp_db',
|
|
208
|
+
port: 5432,
|
|
209
|
+
entities: [__dirname + '/**/*.entity{.ts,.js}'],
|
|
210
|
+
secretID: {
|
|
211
|
+
path: ['myapp', 'database-credentials-secret-id'],
|
|
212
|
+
service: EService.AWS_SECRETS_MANAGER
|
|
213
|
+
},
|
|
214
|
+
host: {
|
|
215
|
+
path: ['myapp', 'host'],
|
|
216
|
+
service: EService.AWS_RDS
|
|
217
|
+
}
|
|
218
|
+
})
|
|
219
|
+
```
|
|
213
220
|
|
|
214
|
-
|
|
215
|
-
- Other utility methods for connection management
|
|
221
|
+
## Connection Rotation
|
|
216
222
|
|
|
217
|
-
|
|
223
|
+
Enable automatic credential rotation for enhanced security:
|
|
218
224
|
|
|
219
|
-
|
|
225
|
+
```typescript
|
|
226
|
+
TypeOrmAwsConnectorModule.register({
|
|
227
|
+
// Basic config...
|
|
228
|
+
type: EDatabaseType.POSTGRES,
|
|
229
|
+
databaseName: 'myapp_db',
|
|
230
|
+
port: 5432,
|
|
231
|
+
entities: [UserEntity],
|
|
232
|
+
|
|
233
|
+
// Rotation config
|
|
234
|
+
rotation: {
|
|
235
|
+
isEnabled: true,
|
|
236
|
+
intervalMs: 1800000 // Rotate every 30 minutes
|
|
237
|
+
},
|
|
238
|
+
|
|
239
|
+
// Advanced connection pool settings
|
|
240
|
+
poolSize: 20,
|
|
241
|
+
connectionTimeoutMs: 60000,
|
|
242
|
+
idleTimeoutMs: 30000
|
|
243
|
+
})
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
## Advanced Configuration Options
|
|
220
247
|
|
|
221
|
-
-
|
|
222
|
-
- Pool overflow management
|
|
223
|
-
- Rotation failures
|
|
224
|
-
- Authentication errors
|
|
248
|
+
You can fine-tune the connector with various options:
|
|
225
249
|
|
|
226
|
-
|
|
250
|
+
```typescript
|
|
251
|
+
import { ERelationLoadStrategy } from '@elsikora/nestjs-typeorm-aws-connector';
|
|
252
|
+
|
|
253
|
+
TypeOrmAwsConnectorModule.register({
|
|
254
|
+
// Basic config...
|
|
255
|
+
type: EDatabaseType.POSTGRES,
|
|
256
|
+
databaseName: 'myapp_db',
|
|
257
|
+
port: 5432,
|
|
258
|
+
entities: [UserEntity],
|
|
259
|
+
|
|
260
|
+
// Performance settings
|
|
261
|
+
poolSize: 15,
|
|
262
|
+
connectionTimeoutMs: 30000,
|
|
263
|
+
idleTimeoutMs: 60000,
|
|
264
|
+
|
|
265
|
+
// Database behavior
|
|
266
|
+
shouldSynchronize: false,
|
|
267
|
+
isVerbose: true,
|
|
268
|
+
relationLoadStrategy: ERelationLoadStrategy.QUERY,
|
|
269
|
+
|
|
270
|
+
// AWS configuration
|
|
271
|
+
secretID: {
|
|
272
|
+
path: ['my-app', 'db-secret-id'],
|
|
273
|
+
service: EService.AWS_SECRETS_MANAGER
|
|
274
|
+
},
|
|
275
|
+
host: {
|
|
276
|
+
path: ['my-app', 'db-host'],
|
|
277
|
+
service: EService.AWS_RDS
|
|
278
|
+
}
|
|
279
|
+
})
|
|
280
|
+
```
|
|
227
281
|
|
|
228
|
-
|
|
282
|
+
## 🛣 Roadmap
|
|
283
|
+
| Task / Feature | Status |
|
|
284
|
+
|---------------|--------|
|
|
285
|
+
| Core module implementation | ✅ Done |
|
|
286
|
+
| AWS Secrets Manager integration | ✅ Done |
|
|
287
|
+
| TypeORM configuration provider | ✅ Done |
|
|
288
|
+
| Connection rotation service | ✅ Done |
|
|
289
|
+
| Credential rotation automation | ✅ Done |
|
|
290
|
+
| PostgreSQL database support | ✅ Done |
|
|
291
|
+
| MySQL database support | ✅ Done |
|
|
292
|
+
| Failover recovery mechanism | ✅ Done |
|
|
293
|
+
| Customizable rotation intervals | ✅ Done |
|
|
294
|
+
| Connection pooling optimization | ✅ Done |
|
|
295
|
+
| Multiple AWS regions support | 🚧 In Progress |
|
|
296
|
+
| Automatic Schema Migration | 🚧 In Progress |
|
|
297
|
+
| Connection encryption options | 🚧 In Progress |
|
|
298
|
+
| MongoDB support | 🚧 In Progress |
|
|
299
|
+
| Connection health metrics | 🚧 In Progress |
|
|
300
|
+
| Multi-database connection management | 🚧 In Progress |
|
|
301
|
+
| Docker integration examples | 🚧 In Progress |
|
|
302
|
+
| AWS Lambda optimized configuration | 🚧 In Progress |
|
|
229
303
|
|
|
230
|
-
|
|
231
|
-
|
|
304
|
+
## ❓ FAQ
|
|
305
|
+
### Frequently Asked Questions
|
|
232
306
|
|
|
233
|
-
|
|
307
|
+
#### Q: Does this library work with AWS Fargate and ECS?
|
|
308
|
+
A: Yes, this library is designed to work seamlessly with AWS container services like Fargate and ECS. Ensure your task roles have proper permissions to access Parameter Store and Secrets Manager.
|
|
234
309
|
|
|
235
|
-
|
|
236
|
-
|
|
310
|
+
#### Q: How does credential rotation work?
|
|
311
|
+
A: When rotation is enabled, the connector periodically fetches fresh credentials from AWS Secrets Manager without disrupting existing connections. It creates a new connection pool with updated credentials, verifies it works correctly, and then seamlessly replaces the old connection.
|
|
237
312
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
- Consider your application's specific requirements
|
|
313
|
+
#### Q: What happens if AWS services are temporarily unavailable?
|
|
314
|
+
A: The connector includes a failover mechanism that retries connection attempts and maintains the current connection until AWS services become available again. After multiple failures, it will attempt an emergency recovery process.
|
|
241
315
|
|
|
242
|
-
|
|
316
|
+
#### Q: Can I use this with non-AWS hosted databases?
|
|
317
|
+
A: Yes, you can use this connector with any database as long as the connection credentials are stored in AWS Secrets Manager and Parameter Store. The actual database can be hosted anywhere.
|
|
243
318
|
|
|
244
|
-
|
|
319
|
+
#### Q: Does this support custom TypeORM entities and migrations?
|
|
320
|
+
A: Absolutely. The connector seamlessly integrates with your existing TypeORM entities and migration configurations.
|
|
245
321
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
|
|
249
|
-
4. Push to the Branch (`git push origin feature/AmazingFeature`)
|
|
250
|
-
5. Open a Pull Request
|
|
322
|
+
#### Q: What permissions do I need in AWS?
|
|
323
|
+
A: Your AWS role needs read permissions for Parameter Store and Secrets Manager. Specifically, you need `ssm:GetParameter` and `secretsmanager:GetSecretValue` permissions.
|
|
251
324
|
|
|
252
|
-
|
|
325
|
+
#### Q: Can I customize the logger?
|
|
326
|
+
A: The connector uses NestJS's built-in logger by default, which you can customize through your NestJS application configuration.
|
|
253
327
|
|
|
254
|
-
|
|
328
|
+
## 🔒 License
|
|
329
|
+
This project is licensed under **MIT License
|
|
255
330
|
|
|
256
|
-
|
|
331
|
+
Copyright (c) 2025 ElsiKora
|
|
257
332
|
|
|
258
|
-
|
|
333
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
259
334
|
|
|
260
|
-
|
|
335
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
261
336
|
|
|
262
|
-
|
|
337
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.**.
|
|
@@ -2,13 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var tslib_es6 = require('../../external/tslib/tslib.es6.js');
|
|
4
4
|
var clientSecretsManager = require('@aws-sdk/client-secrets-manager');
|
|
5
|
-
require('
|
|
6
|
-
require('../../external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/modules/config/config.module.js');
|
|
7
|
-
var config_service = require('../../external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/modules/config/config.service.js');
|
|
8
|
-
require('../../external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/enum/environment.enum.js');
|
|
9
|
-
require('../../external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/enum/instance-name.enum.js');
|
|
10
|
-
var service_enum = require('../../external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/enum/service.enum.js');
|
|
11
|
-
require('@aws-sdk/client-ssm');
|
|
5
|
+
var nestjsAwsParameterStoreConfig = require('@elsikora/nestjs-aws-parameter-store-config');
|
|
12
6
|
var common = require('@nestjs/common');
|
|
13
7
|
var config = require('@nestjs/config');
|
|
14
8
|
var constant = require('../../shared/constant/typeorm-aws-connector/constant.js');
|
|
@@ -29,7 +23,7 @@ exports.TypeOrmAwsConnectorService = TypeOrmAwsConnectorService_1 = class TypeOr
|
|
|
29
23
|
this.LOGGER.debug("Asking credentials from AWS Secrets Manager...");
|
|
30
24
|
const region = this.configService.get("AWS_REGION");
|
|
31
25
|
const client = new clientSecretsManager.SecretsManagerClient({ region });
|
|
32
|
-
const secretID = this.parameterStoreConfigService.get({ path: this.databaseConfig.secretID?.path ?? ["database-credentials-secret-id"], service: this.databaseConfig.secretID?.service ??
|
|
26
|
+
const secretID = this.parameterStoreConfigService.get({ path: this.databaseConfig.secretID?.path ?? ["database-credentials-secret-id"], service: this.databaseConfig.secretID?.service ?? nestjsAwsParameterStoreConfig.EService.AWS_SECRETS_MANAGER });
|
|
33
27
|
if (!secretID) {
|
|
34
28
|
throw new Error("Secret ID was not found in the AWS Parameter Store");
|
|
35
29
|
}
|
|
@@ -42,7 +36,7 @@ exports.TypeOrmAwsConnectorService = TypeOrmAwsConnectorService_1 = class TypeOr
|
|
|
42
36
|
}
|
|
43
37
|
async getTypeOrmOptions() {
|
|
44
38
|
const credentials = await this.getCredentials();
|
|
45
|
-
const host = this.parameterStoreConfigService.get({ path: this.databaseConfig.host?.path ?? ["host"], service: this.databaseConfig.host?.service ??
|
|
39
|
+
const host = this.parameterStoreConfigService.get({ path: this.databaseConfig.host?.path ?? ["host"], service: this.databaseConfig.host?.service ?? nestjsAwsParameterStoreConfig.EService.AWS_RDS });
|
|
46
40
|
if (!host) {
|
|
47
41
|
throw new Error("Host was not found in the AWS Parameter Store");
|
|
48
42
|
}
|
|
@@ -74,6 +68,6 @@ exports.TypeOrmAwsConnectorService = TypeOrmAwsConnectorService_1 = tslib_es6.__
|
|
|
74
68
|
common.Injectable(),
|
|
75
69
|
tslib_es6.__param(2, common.Inject(database_provider.DATABASE_CONFIG_PROVIDER)),
|
|
76
70
|
tslib_es6.__metadata("design:paramtypes", [config.ConfigService,
|
|
77
|
-
|
|
71
|
+
nestjsAwsParameterStoreConfig.ParameterStoreConfigService, Object])
|
|
78
72
|
], exports.TypeOrmAwsConnectorService);
|
|
79
73
|
//# sourceMappingURL=typeorm-aws-connector.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeorm-aws-connector.service.js","sources":["../../../../../src/modules/typeorm-aws-connector/typeorm-aws-connector.service.ts"],"sourcesContent":[null],"names":["TypeOrmAwsConnectorService","Logger","SecretsManagerClient","EService","GetSecretValueCommand","TYPEORM_AWS_CONNECTOR_CONSTANT","__decorate","Injectable","__param","Inject","DATABASE_CONFIG_PROVIDER","ConfigService","ParameterStoreConfigService"],"mappings":"
|
|
1
|
+
{"version":3,"file":"typeorm-aws-connector.service.js","sources":["../../../../../src/modules/typeorm-aws-connector/typeorm-aws-connector.service.ts"],"sourcesContent":[null],"names":["TypeOrmAwsConnectorService","Logger","SecretsManagerClient","EService","GetSecretValueCommand","TYPEORM_AWS_CONNECTOR_CONSTANT","__decorate","Injectable","__param","Inject","DATABASE_CONFIG_PROVIDER","ConfigService","ParameterStoreConfigService"],"mappings":";;;;;;;;;;;AAYaA,kCAA0B,GAAhC,4BAAA,GAAA,MAAM,0BAA0B,CAAA;AAIpB,IAAA,aAAA;AACA,IAAA,2BAAA;AAEA,IAAA,cAAA;IAND,MAAM,GAAW,IAAIC,aAAM,CAAC,4BAA0B,CAAC,IAAI,CAAC;AAE7E,IAAA,WAAA,CACkB,aAA4B,EAC5B,2BAAwD,EAExD,cAA0C,EAAA;QAH1C,IAAa,CAAA,aAAA,GAAb,aAAa;QACb,IAA2B,CAAA,2BAAA,GAA3B,2BAA2B;QAE3B,IAAc,CAAA,cAAA,GAAd,cAAc;;AAGhC,IAAA,MAAM,cAAc,GAAA;AACnB,QAAA,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,gDAAgD,CAAC;QAEnE,MAAM,MAAM,GAAuB,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,YAAY,CAAC;QAC/E,MAAM,MAAM,GAAyB,IAAIC,yCAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;AAEzE,QAAA,MAAM,QAAQ,GAAkB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,EAAE,IAAI,CAAC,cAAc,CAAC,mBAAmB,IAAIE,gBAA8B,CAAC,2BAA2B;gBAC9H,iBAAiB,EAAE,IAAI,CAAC,cAAc,CAAC,aAAa,IAAIA,gBAA8B,CAAC,qBAAqB;gBAC5G,GAAG,EAAE,IAAI,CAAC,cAAc,CAAC,QAAQ,IAAIA,gBAA8B,CAAC,kBAAkB;AACtF,aAAA;YACD,IAAI;;YAEJ,OAAO,EAAE,IAAI,CAAC,cAAc,CAAC,SAAS,IAAIA,gBAA8B,CAAC,2BAA2B;YACpG,QAAQ,EAAE,WAAW,CAAC,QAAQ;AAC9B,YAAA,IAAI,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI;YAC9B,oBAAoB,EAAE,IAAI,CAAC,cAAc,CAAC,oBAAoB,IAAIA,gBAA8B,CAAC,+BAA+B;;YAEhI,WAAW,EAAE,IAAI,CAAC,cAAc,CAAC,iBAAiB,IAAIA,gBAA8B,CAAC,mCAAmC;;AAExH,YAAA,IAAI,EAAE,IAAI,CAAC,cAAc,CAAC,IAAW;YACrC,QAAQ,EAAE,WAAW,CAAC,QAAQ;SAC9B;AAED,QAAA,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA,yCAAA,CAA2C,CAAC;AAE9D,QAAA,OAAO,OAAO;;;AAlEHL,kCAA0B,GAAA,4BAAA,GAAAM,oBAAA,CAAA;AADtC,IAAAC,iBAAU,EAAE;AAOV,IAAAC,iBAAA,CAAA,CAAA,EAAAC,aAAM,CAACC,0CAAwB,CAAC,CAAA;+CAFDC,oBAAa;QACCC,yDAA2B,EAAA,MAAA,CAAA;AAL9D,CAAA,EAAAZ,kCAA0B,CAoEtC;;"}
|
package/dist/cjs/package.json
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { __decorate, __param, __metadata } from '../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { SecretsManagerClient, GetSecretValueCommand } from '@aws-sdk/client-secrets-manager';
|
|
3
|
-
import '
|
|
4
|
-
import '../../external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/modules/config/config.module.js';
|
|
5
|
-
import { ParameterStoreConfigService } from '../../external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/modules/config/config.service.js';
|
|
6
|
-
import '../../external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/enum/environment.enum.js';
|
|
7
|
-
import '../../external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/enum/instance-name.enum.js';
|
|
8
|
-
import { EService } from '../../external/@elsikora/nestjs-aws-parameter-store-config/dist/esm/shared/enum/service.enum.js';
|
|
9
|
-
import '@aws-sdk/client-ssm';
|
|
3
|
+
import { EService, ParameterStoreConfigService } from '@elsikora/nestjs-aws-parameter-store-config';
|
|
10
4
|
import { Injectable, Inject, Logger } from '@nestjs/common';
|
|
11
5
|
import { ConfigService } from '@nestjs/config';
|
|
12
6
|
import TYPEORM_AWS_CONNECTOR_CONSTANT from '../../shared/constant/typeorm-aws-connector/constant.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeorm-aws-connector.service.js","sources":["../../../../../src/modules/typeorm-aws-connector/typeorm-aws-connector.service.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"typeorm-aws-connector.service.js","sources":["../../../../../src/modules/typeorm-aws-connector/typeorm-aws-connector.service.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;AAYa,IAAA,0BAA0B,GAAhC,4BAAA,GAAA,MAAM,0BAA0B,CAAA;AAIpB,IAAA,aAAA;AACA,IAAA,2BAAA;AAEA,IAAA,cAAA;IAND,MAAM,GAAW,IAAI,MAAM,CAAC,4BAA0B,CAAC,IAAI,CAAC;AAE7E,IAAA,WAAA,CACkB,aAA4B,EAC5B,2BAAwD,EAExD,cAA0C,EAAA;QAH1C,IAAa,CAAA,aAAA,GAAb,aAAa;QACb,IAA2B,CAAA,2BAAA,GAA3B,2BAA2B;QAE3B,IAAc,CAAA,cAAA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,2BAA2B,EAAA,MAAA,CAAA;AAL9D,CAAA,EAAA,0BAA0B,CAoEtC;;;;"}
|
package/dist/esm/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elsikora/nestjs-typeorm-aws-connector",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "NestJS application configuration with AWS Parameter Store and TypeORM",
|
|
5
5
|
"homepage": "https://github.com/ElsiKora/NestJS-AWS-TypeORM-Connector#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/******************************************************************************
|
|
4
|
-
Copyright (c) Microsoft Corporation.
|
|
5
|
-
|
|
6
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
7
|
-
purpose with or without fee is hereby granted.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
10
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
11
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
12
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
13
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
14
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
16
|
-
***************************************************************************** */
|
|
17
|
-
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
function __decorate(decorators, target, key, desc) {
|
|
21
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
22
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
23
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
24
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function __param(paramIndex, decorator) {
|
|
28
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function __metadata(metadataKey, metadataValue) {
|
|
32
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
36
|
-
var e = new Error(message);
|
|
37
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
exports.__decorate = __decorate;
|
|
41
|
-
exports.__metadata = __metadata;
|
|
42
|
-
exports.__param = __param;
|
|
43
|
-
//# sourceMappingURL=tslib.es6.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tslib.es6.js","sources":["../../../../../../../../../node_modules/@elsikora/nestjs-aws-parameter-store-config/dist/esm/external/tslib/tslib.es6.js"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\n\r\nfunction __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nfunction __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nfunction __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\nexport { __decorate, __metadata, __param };\n//# sourceMappingURL=tslib.es6.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;AACnD,IAAI,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC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