@squiz/db-lib 1.71.2 → 1.72.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +19 -0
- package/lib/AbstractRepository.d.ts +2 -0
- package/lib/AbstractRepository.d.ts.map +1 -0
- package/lib/AbstractRepository.integration.spec.d.ts +1 -0
- package/lib/AbstractRepository.integration.spec.d.ts.map +1 -0
- package/lib/AbstractRepository.integration.spec.js +118 -0
- package/lib/AbstractRepository.integration.spec.js.map +1 -0
- package/lib/AbstractRepository.js +187 -0
- package/lib/AbstractRepository.js.map +1 -0
- package/lib/ConnectionManager.d.ts +1 -0
- package/lib/ConnectionManager.d.ts.map +1 -0
- package/lib/ConnectionManager.js +58 -0
- package/lib/ConnectionManager.js.map +1 -0
- package/lib/Migrator.d.ts +1 -0
- package/lib/Migrator.d.ts.map +1 -0
- package/lib/Migrator.js +160 -0
- package/lib/Migrator.js.map +1 -0
- package/lib/PostgresErrorCodes.d.ts +1 -0
- package/lib/PostgresErrorCodes.d.ts.map +1 -0
- package/lib/PostgresErrorCodes.js +274 -0
- package/lib/PostgresErrorCodes.js.map +1 -0
- package/lib/Repositories.d.ts +1 -0
- package/lib/Repositories.d.ts.map +1 -0
- package/lib/Repositories.js +3 -0
- package/lib/Repositories.js.map +1 -0
- package/lib/dynamodb/AbstractDynamoDbRepository.d.ts +50 -9
- package/lib/dynamodb/AbstractDynamoDbRepository.d.ts.map +1 -0
- package/lib/dynamodb/AbstractDynamoDbRepository.js +456 -0
- package/lib/dynamodb/AbstractDynamoDbRepository.js.map +1 -0
- package/lib/dynamodb/AbstractDynamoDbRepository.spec.d.ts +1 -0
- package/lib/dynamodb/AbstractDynamoDbRepository.spec.d.ts.map +1 -0
- package/lib/dynamodb/AbstractDynamoDbRepository.spec.js +924 -0
- package/lib/dynamodb/AbstractDynamoDbRepository.spec.js.map +1 -0
- package/lib/dynamodb/DynamoDbManager.d.ts +1 -0
- package/lib/dynamodb/DynamoDbManager.d.ts.map +1 -0
- package/lib/dynamodb/DynamoDbManager.js +66 -0
- package/lib/dynamodb/DynamoDbManager.js.map +1 -0
- package/lib/dynamodb/getDynamoDbOptions.d.ts +1 -0
- package/lib/dynamodb/getDynamoDbOptions.d.ts.map +1 -0
- package/lib/dynamodb/getDynamoDbOptions.js +15 -0
- package/lib/dynamodb/getDynamoDbOptions.js.map +1 -0
- package/lib/error/DuplicateItemError.d.ts +1 -0
- package/lib/error/DuplicateItemError.d.ts.map +1 -0
- package/lib/error/DuplicateItemError.js +12 -0
- package/lib/error/DuplicateItemError.js.map +1 -0
- package/lib/error/InvalidDataFormatError.d.ts +1 -0
- package/lib/error/InvalidDataFormatError.d.ts.map +1 -0
- package/lib/error/InvalidDataFormatError.js +12 -0
- package/lib/error/InvalidDataFormatError.js.map +1 -0
- package/lib/error/InvalidDbSchemaError.d.ts +1 -0
- package/lib/error/InvalidDbSchemaError.d.ts.map +1 -0
- package/lib/error/InvalidDbSchemaError.js +12 -0
- package/lib/error/InvalidDbSchemaError.js.map +1 -0
- package/lib/error/MissingKeyValuesError.d.ts +1 -0
- package/lib/error/MissingKeyValuesError.d.ts.map +1 -0
- package/lib/error/MissingKeyValuesError.js +12 -0
- package/lib/error/MissingKeyValuesError.js.map +1 -0
- package/lib/error/TransactionError.d.ts +1 -0
- package/lib/error/TransactionError.d.ts.map +1 -0
- package/lib/error/TransactionError.js +12 -0
- package/lib/error/TransactionError.js.map +1 -0
- package/lib/getConnectionInfo.d.ts +1 -0
- package/lib/getConnectionInfo.d.ts.map +1 -0
- package/lib/getConnectionInfo.js +30 -0
- package/lib/getConnectionInfo.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +33 -70416
- package/lib/index.js.map +1 -7
- package/package.json +5 -5
- package/src/AbstractRepository.ts +26 -20
- package/src/dynamodb/AbstractDynamoDbRepository.spec.ts +289 -37
- package/src/dynamodb/AbstractDynamoDbRepository.ts +140 -31
- package/src/dynamodb/getDynamoDbOptions.ts +1 -1
- package/tsconfig.json +5 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/build.js +0 -31
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"AbstractDynamoDbRepository.spec.js","sourceRoot":"","sources":["../../src/dynamodb/AbstractDynamoDbRepository.spec.ts"],"names":[],"mappings":";;;;;AAAA,6EAAwF;AACxF,wDAiB+B;AAC/B,8DAA2E;AAC3E,uDAAiE;AACjE,0BAAiE;AAEjE,6DAAiD;AACjD,oCAAkC;AAClC,8DAAoD;AACpD,oDAA4B;AAC5B,4EAAyE;AAEzE,MAAM,aAAa,GAAG,IAAA,gCAAU,EAAC,qCAAsB,CAAC,CAAC;AACzD,MAAM,MAAM,GAAG,+BAAgB,CAAC,IAAI,CAAC,IAAI,0BAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;AAUvD,MAAM,QAAQ;IAOZ,YAAY,OAA2B,EAAE;;QACvC,IAAI,CAAC,IAAI,GAAG,MAAA,IAAI,CAAC,IAAI,mCAAI,cAAc,CAAC;QACxC,IAAI,CAAC,GAAG,GAAG,MAAA,IAAI,CAAC,GAAG,mCAAI,CAAC,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,MAAA,IAAI,CAAC,OAAO,mCAAI,iBAAiB,CAAC;QACjD,IAAI,CAAC,IAAI,GAAG,MAAA,IAAI,CAAC,IAAI,mCAAI,EAAE,CAAC;QAC5B,IAAI,CAAC,KAAK,GAAG,MAAA,IAAI,CAAC,KAAK,mCAAI,EAAE,CAAC;QAE9B,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;YACjC,MAAM,KAAK,CAAC,gBAAgB,CAAC,CAAC;SAC/B;QACD,IAAI,OAAO,IAAI,CAAC,GAAG,KAAK,QAAQ,EAAE;YAChC,MAAM,KAAK,CAAC,eAAe,CAAC,CAAC;SAC9B;QACD,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,EAAE;YACpC,MAAM,KAAK,CAAC,mBAAmB,CAAC,CAAC;SAClC;QACD,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|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.DynamoDbManager = void 0;
|
4
|
+
const crypto_1 = require("crypto");
|
5
|
+
const TransactionError_1 = require("../error/TransactionError");
|
6
|
+
const api_1 = require("@opentelemetry/api");
|
7
|
+
const tracer = api_1.trace.getTracer('db-lib:DynamoDbManager');
|
8
|
+
class DynamoDbManager {
|
9
|
+
constructor(client, repositoryCreator) {
|
10
|
+
this.client = client;
|
11
|
+
this.transactionItems = {};
|
12
|
+
this.repositories = repositoryCreator(this);
|
13
|
+
}
|
14
|
+
async executeInTransaction(func) {
|
15
|
+
const transactionId = (0, crypto_1.randomUUID)();
|
16
|
+
try {
|
17
|
+
this.startTransaction(transactionId);
|
18
|
+
const value = await func({ id: transactionId });
|
19
|
+
await this.executeTransaction(transactionId);
|
20
|
+
return value;
|
21
|
+
}
|
22
|
+
finally {
|
23
|
+
this.closeTransaction(transactionId);
|
24
|
+
}
|
25
|
+
}
|
26
|
+
addWriteTransactionItem(transactionId, item) {
|
27
|
+
if (this.transactionItems[transactionId] === undefined) {
|
28
|
+
throw new TransactionError_1.TransactionError(`No items in transaction '${transactionId}' to add transaction item to`);
|
29
|
+
}
|
30
|
+
this.transactionItems[transactionId].push(item);
|
31
|
+
}
|
32
|
+
async executeTransaction(transactionId) {
|
33
|
+
if (this.transactionItems[transactionId] === undefined) {
|
34
|
+
throw new TransactionError_1.TransactionError(`No items in transaction '${transactionId}' to execute`);
|
35
|
+
}
|
36
|
+
if (!this.transactionItems[transactionId].length) {
|
37
|
+
return;
|
38
|
+
}
|
39
|
+
return tracer.startActiveSpan('executeTransaction', {
|
40
|
+
attributes: {
|
41
|
+
'transactionItems.length': this.transactionItems[transactionId].length,
|
42
|
+
},
|
43
|
+
}, async (span) => {
|
44
|
+
try {
|
45
|
+
return await this.client.transactWrite({
|
46
|
+
ClientRequestToken: transactionId,
|
47
|
+
TransactItems: this.transactionItems[transactionId],
|
48
|
+
});
|
49
|
+
}
|
50
|
+
finally {
|
51
|
+
span.end();
|
52
|
+
}
|
53
|
+
});
|
54
|
+
}
|
55
|
+
startTransaction(transactionId) {
|
56
|
+
if (this.transactionItems[transactionId] !== undefined) {
|
57
|
+
throw new TransactionError_1.TransactionError(`Transaction '${transactionId}' already started`);
|
58
|
+
}
|
59
|
+
this.transactionItems[transactionId] = [];
|
60
|
+
}
|
61
|
+
closeTransaction(transactionId) {
|
62
|
+
delete this.transactionItems[transactionId];
|
63
|
+
}
|
64
|
+
}
|
65
|
+
exports.DynamoDbManager = DynamoDbManager;
|
66
|
+
//# sourceMappingURL=DynamoDbManager.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DynamoDbManager.js","sourceRoot":"","sources":["../../src/dynamodb/DynamoDbManager.ts"],"names":[],"mappings":";;;AACA,mCAAoC;AACpC,gEAA6D;AAC7D,4CAA2C;AAE3C,MAAM,MAAM,GAAG,WAAK,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC;AASzD,MAAa,eAAe;IAI1B,YACS,MAAwB,EAC/B,iBAA+E;QADxE,WAAM,GAAN,MAAM,CAAkB;QAG/B,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC;QAC3B,IAAI,CAAC,YAAY,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAI,IAA8C;QACjF,MAAM,aAAa,GAAG,IAAA,mBAAU,GAAE,CAAC;QAEnC,IAAI;YACF,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;YACrC,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,EAAE,EAAE,EAAE,aAAa,EAAE,CAAC,CAAC;YAChD,MAAM,IAAI,CAAC,kBAAkB,CAAC,aAAa,CAAC,CAAC;YAC7C,OAAO,KAAK,CAAC;SACd;gBAAS;YACR,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;SACtC;IACH,CAAC;IAE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EO,gBAAgB,CAAC,aAAqB;QAC5C,OAAO,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;IAC9C,CAAC;CACF;AAvED,0CAuEC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getDynamoDbOptions.d.ts","sourceRoot":"","sources":["../../src/dynamodb/getDynamoDbOptions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,cAAe,MAAM,WAAW,YAAY,GAAG,aAAa;;;;;;;;;;;CAQ1F,CAAC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getDynamoDbOptions = void 0;
|
4
|
+
const getDynamoDbOptions = (awsRegion, nodeEnv) => {
|
5
|
+
var _a;
|
6
|
+
if (nodeEnv === 'production') {
|
7
|
+
return { region: awsRegion };
|
8
|
+
}
|
9
|
+
return {
|
10
|
+
credentials: { accessKeyId: 'key', secretAccessKey: 'key' },
|
11
|
+
endpoint: process.env.CI ? 'http://dynamodb-local:8000' : (_a = process.env.DYNAMO_DB_HOST) !== null && _a !== void 0 ? _a : 'http://localhost:8000',
|
12
|
+
};
|
13
|
+
};
|
14
|
+
exports.getDynamoDbOptions = getDynamoDbOptions;
|
15
|
+
//# sourceMappingURL=getDynamoDbOptions.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getDynamoDbOptions.js","sourceRoot":"","sources":["../../src/dynamodb/getDynamoDbOptions.ts"],"names":[],"mappings":";;;AAAO,MAAM,kBAAkB,GAAG,CAAC,SAAiB,EAAE,OAAqC,EAAE,EAAE;;IAC7F,IAAI,OAAO,KAAK,YAAY,EAAE;QAC5B,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;KAC9B;IACD,OAAO;QACL,WAAW,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE;QAC3D,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,MAAA,OAAO,CAAC,GAAG,CAAC,cAAc,mCAAI,uBAAuB;KAChH,CAAC;AACJ,CAAC,CAAC;AARW,QAAA,kBAAkB,sBAQ7B"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DuplicateItemError.d.ts","sourceRoot":"","sources":["../../src/error/DuplicateItemError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,qBAAa,kBAAmB,SAAQ,mBAAmB;IACzD,IAAI,SAAwB;gBAChB,OAAO,EAAE,MAAM;CAG5B"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.DuplicateItemError = void 0;
|
4
|
+
const dx_common_lib_1 = require("@squiz/dx-common-lib");
|
5
|
+
class DuplicateItemError extends dx_common_lib_1.InternalServerError {
|
6
|
+
constructor(message) {
|
7
|
+
super(message);
|
8
|
+
this.name = 'DuplicateItemError';
|
9
|
+
}
|
10
|
+
}
|
11
|
+
exports.DuplicateItemError = DuplicateItemError;
|
12
|
+
//# sourceMappingURL=DuplicateItemError.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DuplicateItemError.js","sourceRoot":"","sources":["../../src/error/DuplicateItemError.ts"],"names":[],"mappings":";;;AAAA,wDAA2D;AAE3D,MAAa,kBAAmB,SAAQ,mCAAmB;IAEzD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QAFjB,SAAI,GAAG,oBAAoB,CAAC;IAG5B,CAAC;CACF;AALD,gDAKC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"InvalidDataFormatError.d.ts","sourceRoot":"","sources":["../../src/error/InvalidDataFormatError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,qBAAa,sBAAuB,SAAQ,mBAAmB;IAC7D,IAAI,SAA4B;gBACpB,OAAO,EAAE,MAAM;CAG5B"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.InvalidDataFormatError = void 0;
|
4
|
+
const dx_common_lib_1 = require("@squiz/dx-common-lib");
|
5
|
+
class InvalidDataFormatError extends dx_common_lib_1.InternalServerError {
|
6
|
+
constructor(message) {
|
7
|
+
super(message);
|
8
|
+
this.name = 'InvalidDataFormatError';
|
9
|
+
}
|
10
|
+
}
|
11
|
+
exports.InvalidDataFormatError = InvalidDataFormatError;
|
12
|
+
//# sourceMappingURL=InvalidDataFormatError.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"InvalidDataFormatError.js","sourceRoot":"","sources":["../../src/error/InvalidDataFormatError.ts"],"names":[],"mappings":";;;AAAA,wDAA2D;AAE3D,MAAa,sBAAuB,SAAQ,mCAAmB;IAE7D,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QAFjB,SAAI,GAAG,wBAAwB,CAAC;IAGhC,CAAC;CACF;AALD,wDAKC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"InvalidDbSchemaError.d.ts","sourceRoot":"","sources":["../../src/error/InvalidDbSchemaError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,qBAAa,oBAAqB,SAAQ,eAAe;IACvD,IAAI,SAA0B;gBAClB,OAAO,EAAE,MAAM;CAG5B"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.InvalidDbSchemaError = void 0;
|
4
|
+
const dx_common_lib_1 = require("@squiz/dx-common-lib");
|
5
|
+
class InvalidDbSchemaError extends dx_common_lib_1.BadRequestError {
|
6
|
+
constructor(message) {
|
7
|
+
super(message);
|
8
|
+
this.name = 'InvalidDbSchemaError';
|
9
|
+
}
|
10
|
+
}
|
11
|
+
exports.InvalidDbSchemaError = InvalidDbSchemaError;
|
12
|
+
//# sourceMappingURL=InvalidDbSchemaError.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"InvalidDbSchemaError.js","sourceRoot":"","sources":["../../src/error/InvalidDbSchemaError.ts"],"names":[],"mappings":";;;AAAA,wDAAuD;AAEvD,MAAa,oBAAqB,SAAQ,+BAAe;IAEvD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QAFjB,SAAI,GAAG,sBAAsB,CAAC;IAG9B,CAAC;CACF;AALD,oDAKC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"MissingKeyValuesError.d.ts","sourceRoot":"","sources":["../../src/error/MissingKeyValuesError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,qBAAa,qBAAsB,SAAQ,mBAAmB;IAC5D,IAAI,SAA2B;gBACnB,OAAO,EAAE,MAAM;CAG5B"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.MissingKeyValuesError = void 0;
|
4
|
+
const dx_common_lib_1 = require("@squiz/dx-common-lib");
|
5
|
+
class MissingKeyValuesError extends dx_common_lib_1.InternalServerError {
|
6
|
+
constructor(message) {
|
7
|
+
super(message);
|
8
|
+
this.name = 'MissingKeyValuesError';
|
9
|
+
}
|
10
|
+
}
|
11
|
+
exports.MissingKeyValuesError = MissingKeyValuesError;
|
12
|
+
//# sourceMappingURL=MissingKeyValuesError.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"MissingKeyValuesError.js","sourceRoot":"","sources":["../../src/error/MissingKeyValuesError.ts"],"names":[],"mappings":";;;AAAA,wDAA2D;AAE3D,MAAa,qBAAsB,SAAQ,mCAAmB;IAE5D,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QAFjB,SAAI,GAAG,uBAAuB,CAAC;IAG/B,CAAC;CACF;AALD,sDAKC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TransactionError.d.ts","sourceRoot":"","sources":["../../src/error/TransactionError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,qBAAa,gBAAiB,SAAQ,mBAAmB;IACvD,IAAI,SAAsB;gBACd,OAAO,EAAE,MAAM;CAG5B"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.TransactionError = void 0;
|
4
|
+
const dx_common_lib_1 = require("@squiz/dx-common-lib");
|
5
|
+
class TransactionError extends dx_common_lib_1.InternalServerError {
|
6
|
+
constructor(message) {
|
7
|
+
super(message);
|
8
|
+
this.name = 'TransactionError';
|
9
|
+
}
|
10
|
+
}
|
11
|
+
exports.TransactionError = TransactionError;
|
12
|
+
//# sourceMappingURL=TransactionError.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TransactionError.js","sourceRoot":"","sources":["../../src/error/TransactionError.ts"],"names":[],"mappings":";;;AAAA,wDAA2D;AAE3D,MAAa,gBAAiB,SAAQ,mCAAmB;IAEvD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QAFjB,SAAI,GAAG,kBAAkB,CAAC;IAG1B,CAAC;CACF;AALD,4CAKC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getConnectionInfo.d.ts","sourceRoot":"","sources":["../src/getConnectionInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,wBAAsB,iBAAiB,CAAC,MAAM,EAAE;IAC9C,wBAAwB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC1C,wBAAwB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CAC3C,GAAG,OAAO,CAAC,YAAY,GAAG,MAAM,CAAC,CAUjC"}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getConnectionInfo = void 0;
|
4
|
+
const client_secrets_manager_1 = require("@aws-sdk/client-secrets-manager");
|
5
|
+
async function getConnectionInfo(config) {
|
6
|
+
if (config.databaseConnectionSecret) {
|
7
|
+
return await getSecret(config.databaseConnectionSecret);
|
8
|
+
}
|
9
|
+
if (config.databaseConnectionString) {
|
10
|
+
return config.databaseConnectionString;
|
11
|
+
}
|
12
|
+
throw new Error(`No db connection info available`);
|
13
|
+
}
|
14
|
+
exports.getConnectionInfo = getConnectionInfo;
|
15
|
+
async function getSecret(id) {
|
16
|
+
const client = new client_secrets_manager_1.SecretsManagerClient({});
|
17
|
+
const result = await client.send(new client_secrets_manager_1.GetSecretValueCommand({ SecretId: id }));
|
18
|
+
if (result.SecretString === undefined) {
|
19
|
+
throw new Error('secret could not be found');
|
20
|
+
}
|
21
|
+
const info = JSON.parse(result.SecretString);
|
22
|
+
return {
|
23
|
+
user: info.username,
|
24
|
+
password: info.password,
|
25
|
+
host: info.host,
|
26
|
+
port: info.port,
|
27
|
+
database: info.dbname,
|
28
|
+
};
|
29
|
+
}
|
30
|
+
//# sourceMappingURL=getConnectionInfo.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getConnectionInfo.js","sourceRoot":"","sources":["../src/getConnectionInfo.ts"],"names":[],"mappings":";;;AACA,4EAA8F;AAEvF,KAAK,UAAU,iBAAiB,CAAC,MAGvC;IACC,IAAI,MAAM,CAAC,wBAAwB,EAAE;QACnC,OAAO,MAAM,SAAS,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC;KACzD;IAED,IAAI,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