@kipicore/dbcore 1.1.358 → 1.1.360

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.
@@ -33,6 +33,7 @@ async function refreshClients() {
33
33
  const assumed = await sts.send(new client_sts_1.AssumeRoleCommand({
34
34
  RoleArn: env_1.ENV_VARIABLE.AWS_ROLE_ARN,
35
35
  RoleSessionName: 'backend-session',
36
+ DurationSeconds: 43200,
36
37
  }));
37
38
  if (!assumed.Credentials) {
38
39
  throw new Error('Failed to assume role');
@@ -45,7 +45,7 @@ const getPresignedUrl = async (bucket, fileStorage, expiresIn = 60 * 60 * 24) =>
45
45
  Bucket: bucket,
46
46
  Key: s3Key,
47
47
  });
48
- const signedUrl = await (0, s3_request_presigner_1.getSignedUrl)(s3, command, { expiresIn }); // in seconds
48
+ const signedUrl = await (0, s3_request_presigner_1.getSignedUrl)(s3, command, { expiresIn: new Date(expiresIn).getSeconds() }); // in seconds
49
49
  return signedUrl;
50
50
  };
51
51
  exports.getPresignedUrl = getPresignedUrl;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.358",
3
+ "version": "1.1.360",
4
4
  "description": "Reusable DB core package with Postgres, MongoDB, models, services, interfaces, and types",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",