@dmptool/utils 1.0.26 → 1.0.27

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.
Files changed (2) hide show
  1. package/dist/dynamo.js +4 -2
  2. package/package.json +1 -1
package/dist/dynamo.js CHANGED
@@ -100,7 +100,9 @@ const getAllUniqueDMPIds = async (dynamoConnectionParams) => {
100
100
  ProjectionExpression: "PK, #mod", // `modified` is a reserved word in DynamoDB
101
101
  FilterExpression: `SK = :sk`,
102
102
  ExpressionAttributeNames: { "#mod": "modified" },
103
- ExpressionAttributeValues: { ":sk": `${DMP_VERSION_PREFIX}#${exports.DMP_LATEST_VERSION}` }
103
+ ExpressionAttributeValues: {
104
+ ":sk": { S: `${DMP_VERSION_PREFIX}#${exports.DMP_LATEST_VERSION}` }
105
+ }
104
106
  };
105
107
  try {
106
108
  dynamoConnectionParams.logger.debug(Object.assign({}, params), 'Scanning for latest DMP versions in DynamoDB');
@@ -109,7 +111,7 @@ const getAllUniqueDMPIds = async (dynamoConnectionParams) => {
109
111
  const versions = new Map();
110
112
  for (const item of response) {
111
113
  const unmarshalled = (0, util_dynamodb_1.unmarshall)(item);
112
- if (unmarshalled.PK && unmarshalled.SK && unmarshalled.modified) {
114
+ if (unmarshalled.PK && unmarshalled.modified) {
113
115
  const dmpId = unmarshalled.PK.replace(`${DMP_PK_PREFIX}#`, 'https://');
114
116
  versions.set(dmpId, unmarshalled.modified);
115
117
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dmptool/utils",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
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",