@dmptool/utils 1.0.38 → 1.0.40
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 +5 -2
- package/dist/general.js +1 -1
- package/dist/maDMP.js +0 -4
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -797,13 +797,16 @@ The code will use that value to construct the appropriate prefix for the key. Fo
|
|
|
797
797
|
```typescript
|
|
798
798
|
import {EnvironmentEnum, initializeLogger, getSSMParameter, LogLevelEnum } from '@dmptool/utils';
|
|
799
799
|
|
|
800
|
-
process.env.AWS_REGION = 'us-west-2';
|
|
801
|
-
|
|
802
800
|
// Initialize a logger
|
|
803
801
|
const logger: Logger = initializeLogger('exampleSSM', LogLevelEnum.DEBUG);
|
|
804
802
|
|
|
805
803
|
const paramName = 'RdsDatabase';
|
|
806
804
|
|
|
805
|
+
const configParams = {
|
|
806
|
+
logger,
|
|
807
|
+
region: process.env.AWS_REGION,
|
|
808
|
+
}
|
|
809
|
+
|
|
807
810
|
const response = await getSSMParameter(logger, paramName, EnvironmentEnum.DEV);
|
|
808
811
|
|
|
809
812
|
if (response) {
|
package/dist/general.js
CHANGED
package/dist/maDMP.js
CHANGED
|
@@ -383,7 +383,6 @@ const loadNarrativeTemplateInfo = async (rdsConnectionParams, planId) => {
|
|
|
383
383
|
section: [],
|
|
384
384
|
};
|
|
385
385
|
results.forEach((row) => {
|
|
386
|
-
var _a;
|
|
387
386
|
if (row.sectionId !== null && row.sectionId !== undefined) {
|
|
388
387
|
// Sections may have several rows in the results, so we need to check if we
|
|
389
388
|
// already have the section defined.
|
|
@@ -401,8 +400,6 @@ const loadNarrativeTemplateInfo = async (rdsConnectionParams, planId) => {
|
|
|
401
400
|
narrative.section.push(curSection);
|
|
402
401
|
}
|
|
403
402
|
if (row.questionId !== null && row.questionId !== undefined) {
|
|
404
|
-
const questionType = ((_a = row.questionJSON) === null || _a === void 0 ? void 0 : _a.type) || 'textArea';
|
|
405
|
-
const defaultAnswer = types_1.AnswerDefaultMap[questionType] || types_1.DefaultTextAreaAnswer;
|
|
406
403
|
// Every row in the results represents a single question/answer pair
|
|
407
404
|
curSection.question.push({
|
|
408
405
|
id: row.questionId,
|
|
@@ -886,7 +883,6 @@ const validateDMPToolExtensions = (logger, dmpId, dmp) => {
|
|
|
886
883
|
const msg = `Invalid DMP Tool extensions: ${validationErrors.join('; ')}`;
|
|
887
884
|
logger.warn({ dmpId }, msg);
|
|
888
885
|
logger.warn({ dmp }, 'Full DMP Tool extensions');
|
|
889
|
-
console.log(validationErrors);
|
|
890
886
|
throw new DMPValidationError(msg);
|
|
891
887
|
}
|
|
892
888
|
return dmp;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dmptool/utils",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.40",
|
|
4
4
|
"description": "Helper/Utility functions for use in the DMP Tool services. Particularly AWS tooling and maDMP serialization",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@aws-sdk/client-cloudformation": "^3.980.0",
|
|
45
|
-
"@aws-sdk/client-dynamodb": "^3.
|
|
46
|
-
"@aws-sdk/client-s3": "^3.
|
|
47
|
-
"@aws-sdk/client-sns": "^3.
|
|
48
|
-
"@aws-sdk/client-sqs": "^3.
|
|
49
|
-
"@aws-sdk/client-ssm": "^3.
|
|
50
|
-
"@aws-sdk/node-http-handler": "^3.
|
|
51
|
-
"@aws-sdk/s3-request-presigner": "^3.
|
|
52
|
-
"@aws-sdk/util-dynamodb": "^3.
|
|
45
|
+
"@aws-sdk/client-dynamodb": "^3.983.0",
|
|
46
|
+
"@aws-sdk/client-s3": "^3.983.0",
|
|
47
|
+
"@aws-sdk/client-sns": "^3.983.0",
|
|
48
|
+
"@aws-sdk/client-sqs": "^3.983.0",
|
|
49
|
+
"@aws-sdk/client-ssm": "^3.983.0",
|
|
50
|
+
"@aws-sdk/node-http-handler": "^3.374.0",
|
|
51
|
+
"@aws-sdk/s3-request-presigner": "^3.983.0",
|
|
52
|
+
"@aws-sdk/util-dynamodb": "^3.983.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@aws-sdk/util-stream-node": "^3.370.0",
|