@did-space/s3-driver 0.3.15 → 0.3.16

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.
@@ -29,6 +29,7 @@ const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
29
29
  const debug_1 = __importDefault(require("debug"));
30
30
  const p_all_1 = __importDefault(require("p-all"));
31
31
  const lodash_1 = require("lodash");
32
+ const aws_sdk_v3_proxy_1 = require("aws-sdk-v3-proxy");
32
33
  const common_1 = require("../utils/common");
33
34
  const { version: s3ClientVersion } = require('@aws-sdk/client-s3/package.json');
34
35
  const { version: libStorageVersion } = require('@aws-sdk/lib-storage/package.json');
@@ -36,7 +37,7 @@ const debug = (0, debug_1.default)('@did-space/s3-driver:S3SpaceOperator');
36
37
  class S3SpaceOperator {
37
38
  constructor(options) {
38
39
  this.options = options;
39
- this.s3Client = new client_s3_1.S3Client(this.options.s3ClientConfig);
40
+ this.s3Client = (0, aws_sdk_v3_proxy_1.addProxyToClient)(new client_s3_1.S3Client(this.options.s3ClientConfig), { throwOnNoProxy: false });
40
41
  debug('@aws-sdk/client-s3.version', s3ClientVersion);
41
42
  debug('@aws-sdk/lib-storage.version', libStorageVersion);
42
43
  }
package/dist/s3/s3.js CHANGED
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.S3Driver = void 0;
13
13
  const client_s3_1 = require("@aws-sdk/client-s3");
14
14
  const core_1 = require("@did-space/core");
15
+ const aws_sdk_v3_proxy_1 = require("aws-sdk-v3-proxy");
15
16
  const config_1 = require("../config");
16
17
  const operator_1 = require("../operator");
17
18
  class S3Driver extends core_1.BaseDriver {
@@ -29,7 +30,7 @@ class S3Driver extends core_1.BaseDriver {
29
30
  static existsBucket({ bucket, s3ClientConfig, }) {
30
31
  return __awaiter(this, void 0, void 0, function* () {
31
32
  try {
32
- const s3Client = new client_s3_1.S3Client(s3ClientConfig);
33
+ const s3Client = (0, aws_sdk_v3_proxy_1.addProxyToClient)(new client_s3_1.S3Client(s3ClientConfig), { throwOnNoProxy: false });
33
34
  const data = yield s3Client.send(new client_s3_1.HeadBucketCommand({
34
35
  Bucket: bucket,
35
36
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@did-space/s3-driver",
3
- "version": "0.3.15",
3
+ "version": "0.3.16",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -38,7 +38,8 @@
38
38
  "dependencies": {
39
39
  "@aws-sdk/client-s3": "3.370.0",
40
40
  "@aws-sdk/lib-storage": "3.370.0",
41
- "@did-space/core": "0.3.15",
41
+ "@did-space/core": "0.3.16",
42
+ "aws-sdk-v3-proxy": "^2.1.2",
42
43
  "debug": "^4.3.4",
43
44
  "js-yaml": "^4.1.0",
44
45
  "lodash": "^4.17.21",
@@ -61,5 +62,5 @@
61
62
  "ts-jest": "^28.0.6",
62
63
  "typescript": "^4.9.5"
63
64
  },
64
- "gitHead": "64d67e45a7d6454050f31334ad213f4364b7d428"
65
+ "gitHead": "69f3b6bfdc2c7c9095a0220e2724c9bc15c57115"
65
66
  }