@dmptool/utils 1.0.38 → 1.0.39

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 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
@@ -132,7 +132,7 @@ const isJSON = (str) => {
132
132
  try {
133
133
  JSON.parse(str);
134
134
  }
135
- catch (e) {
135
+ catch (_a) {
136
136
  return false;
137
137
  }
138
138
  return true;
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.38",
3
+ "version": "1.0.39",
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",
@@ -31,6 +31,9 @@
31
31
  "trivy-high": "./scripts/trivy-high.sh",
32
32
  "trivy-med": "./scripts/trivy-med.sh"
33
33
  },
34
+ "overrides": {
35
+ "fast-xml-parser": "5.3.4"
36
+ },
34
37
  "dependencies": {
35
38
  "@dmptool/types": "2.3.2",
36
39
  "@elastic/ecs-pino-format": "^1.5.0",