@dmptool/utils 1.0.37 → 1.0.38

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/dist/dynamo.js CHANGED
@@ -10,8 +10,13 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  }
11
11
  return t;
12
12
  };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
13
16
  Object.defineProperty(exports, "__esModule", { value: true });
14
17
  exports.deleteDMP = exports.tombstoneDMP = exports.updateDMP = exports.createDMP = exports.getDMPs = exports.getDMPVersions = exports.getAllUniqueDMPIds = exports.DMPExists = exports.DMP_TOMBSTONE_VERSION = exports.DMP_LATEST_VERSION = void 0;
18
+ const http_1 = __importDefault(require("http"));
19
+ const node_http_handler_1 = require("@aws-sdk/node-http-handler");
15
20
  const util_dynamodb_1 = require("@aws-sdk/util-dynamodb");
16
21
  const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
17
22
  const general_1 = require("./general");
@@ -50,7 +55,14 @@ const getDynamoDBClient = (dynamoConfigParams) => {
50
55
  // If an endpoint was specified, we are running in a local environment
51
56
  return endpoint === undefined
52
57
  ? new client_dynamodb_1.DynamoDBClient({ region, maxAttempts })
53
- : new client_dynamodb_1.DynamoDBClient({ region, maxAttempts, endpoint });
58
+ : new client_dynamodb_1.DynamoDBClient({
59
+ region,
60
+ maxAttempts,
61
+ endpoint,
62
+ requestHandler: new node_http_handler_1.NodeHttpHandler({
63
+ httpAgent: new http_1.default.Agent({ keepAlive: true }),
64
+ }),
65
+ });
54
66
  };
55
67
  /**
56
68
  * Lightweight query just to check if the DMP exists.
package/dist/maDMP.js CHANGED
@@ -236,7 +236,7 @@ const loadMemberInfo = async (rdsConnectionParams, planId) => {
236
236
  LEFT JOIN projectMembers pctr ON pc.projectMemberId = pctr.id
237
237
  LEFT JOIN affiliations a ON pctr.affiliationId = a.uri
238
238
  WHERE pc.planId = ?
239
- GROUP BY a.uri, a.name, pctr.email, pctr.givenName, pctr.surName,
239
+ GROUP BY pc.id, a.uri, a.name, pctr.email, pctr.givenName, pctr.surName,
240
240
  pctr.orcid, pc.isPrimaryContact;
241
241
  `;
242
242
  rdsConnectionParams.logger.debug({ planId, sql }, 'Fetching plan member information');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dmptool/utils",
3
- "version": "1.0.37",
3
+ "version": "1.0.38",
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",
@@ -43,10 +43,11 @@
43
43
  "peerDependencies": {
44
44
  "@aws-sdk/client-cloudformation": "^3.980.0",
45
45
  "@aws-sdk/client-dynamodb": "^3.980.0",
46
- "@aws-sdk/client-sqs": "^3.980.0",
47
46
  "@aws-sdk/client-s3": "^3.980.0",
48
47
  "@aws-sdk/client-sns": "^3.980.0",
48
+ "@aws-sdk/client-sqs": "^3.980.0",
49
49
  "@aws-sdk/client-ssm": "^3.980.0",
50
+ "@aws-sdk/node-http-handler": "^3.370.0",
50
51
  "@aws-sdk/s3-request-presigner": "^3.980.0",
51
52
  "@aws-sdk/util-dynamodb": "^3.980.0"
52
53
  },