@did-space/s3-driver 0.2.145 → 0.2.146

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.
@@ -27,6 +27,7 @@ const lib_storage_1 = require("@aws-sdk/lib-storage");
27
27
  const mime_types_1 = __importDefault(require("mime-types"));
28
28
  const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
29
29
  const debug_1 = __importDefault(require("debug"));
30
+ const utils_1 = require("../utils");
30
31
  const { version: s3ClientVersion } = require('@aws-sdk/client-s3/package.json');
31
32
  const { version: libStorageVersion } = require('@aws-sdk/lib-storage/package.json');
32
33
  const debug = (0, debug_1.default)('@did-space/s3-driver:S3SpaceOperator');
@@ -208,7 +209,7 @@ class S3SpaceOperator {
208
209
  const output = yield this.s3Client.send(new client_s3_1.HeadObjectCommand({
209
210
  Bucket: this.options.bucket,
210
211
  Key: key,
211
- }));
212
+ }), { requestTimeout: utils_1.DEFAULT_TIME_OUT });
212
213
  debug('getHash.after', `Bucket=${this.options.bucket} Key=${key}`);
213
214
  return output.Metadata['x-hash'];
214
215
  });
@@ -1 +1,2 @@
1
1
  export * from './stream-to-string';
2
+ export * from './timeout';
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./stream-to-string"), exports);
18
+ __exportStar(require("./timeout"), exports);
@@ -0,0 +1 @@
1
+ export declare const DEFAULT_TIME_OUT: number;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEFAULT_TIME_OUT = void 0;
4
+ exports.DEFAULT_TIME_OUT = 10 * 1000;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@did-space/s3-driver",
3
- "version": "0.2.145",
3
+ "version": "0.2.146",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -34,7 +34,7 @@
34
34
  "dependencies": {
35
35
  "@aws-sdk/client-s3": "^3.370.0",
36
36
  "@aws-sdk/lib-storage": "^3.370.0",
37
- "@did-space/core": "0.2.145",
37
+ "@did-space/core": "0.2.146",
38
38
  "debug": "^4.3.4",
39
39
  "js-yaml": "^4.1.0",
40
40
  "lodash": "^4.17.21",
@@ -56,5 +56,5 @@
56
56
  "ts-jest": "^28.0.6",
57
57
  "typescript": "^4.9.5"
58
58
  },
59
- "gitHead": "2c7b1cc3beb65985810e9fb491c4a307da8dcb54"
59
+ "gitHead": "cdb84c66288ba119ca51ef7e4d4c5ee9cefdc283"
60
60
  }