@travetto/model-s3 4.0.7 → 4.0.8
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/package.json +1 -1
- package/src/service.ts +13 -1
package/package.json
CHANGED
package/src/service.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Readable } from 'node:stream';
|
|
2
|
+
import { Agent } from 'node:https';
|
|
2
3
|
|
|
3
4
|
import { S3, CompletedPart, type CreateMultipartUploadRequest } from '@aws-sdk/client-s3';
|
|
4
5
|
import type { MetadataBearer } from '@aws-sdk/types';
|
|
6
|
+
import { NodeHttpHandler } from '@smithy/node-http-handler';
|
|
5
7
|
|
|
6
8
|
import {
|
|
7
9
|
ModelCrudSupport, ModelStreamSupport, ModelStorageSupport, StreamMeta,
|
|
@@ -163,7 +165,17 @@ export class S3ModelService implements ModelCrudSupport, ModelStreamSupport, Mod
|
|
|
163
165
|
}
|
|
164
166
|
|
|
165
167
|
async postConstruct(): Promise<void> {
|
|
166
|
-
this.client = new S3(
|
|
168
|
+
this.client = new S3({
|
|
169
|
+
...this.config.config,
|
|
170
|
+
...('requestHandler' in this.config.config ? {
|
|
171
|
+
requestHandler: new NodeHttpHandler({
|
|
172
|
+
...this.config.config.requestHandler,
|
|
173
|
+
...('httpsAgent' in this.config.config.requestHandler! ? {
|
|
174
|
+
httpsAgent: new Agent({ ...this.config.config.requestHandler?.httpsAgent ?? {} }),
|
|
175
|
+
} : {})
|
|
176
|
+
}),
|
|
177
|
+
} : {})
|
|
178
|
+
});
|
|
167
179
|
ModelStorageUtil.registerModelChangeListener(this);
|
|
168
180
|
}
|
|
169
181
|
|