prime-sdk 3.0.4 → 3.0.6
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/.vscode/settings.json +2 -1
- package/.yarnrc.yml +1 -0
- package/dist/external/aws/s3/s3.provider.d.ts +1 -0
- package/dist/external/aws/s3/s3.provider.js +5 -0
- package/dist/external/aws/s3/s3.provider.js.map +1 -1
- package/dist/external/aws/sns/sns.provider.d.ts +1 -0
- package/dist/external/aws/sns/sns.provider.js +5 -0
- package/dist/external/aws/sns/sns.provider.js.map +1 -1
- package/dist/external/aws/sqs/sqs.provider.d.ts +1 -0
- package/dist/external/aws/sqs/sqs.provider.js +5 -0
- package/dist/external/aws/sqs/sqs.provider.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -1
- package/src/external/aws/s3/s3.provider.ts +6 -0
- package/src/external/aws/sns/sns.provider.ts +6 -0
- package/src/external/aws/sqs/sqs.provider.ts +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prime-sdk",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.6",
|
|
4
4
|
"description": "swiss army knife",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"@nestjs/config": "^4.0.3",
|
|
36
36
|
"@nestjs/core": "^11.1.17",
|
|
37
37
|
"@nestjs/platform-express": "^11.1.17",
|
|
38
|
+
"@smithy/node-http-handler": "^3.3.1",
|
|
38
39
|
"ioredis": "^5.4.1",
|
|
39
40
|
"reflect-metadata": "^0.2.0",
|
|
40
41
|
"rxjs": "^7.8.1"
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { S3Client } from '@aws-sdk/client-s3';
|
|
2
|
+
import { NodeHttpHandler } from '@smithy/node-http-handler';
|
|
2
3
|
import { DynamicModule } from '@nestjs/common';
|
|
4
|
+
import { Agent as HttpsAgent } from 'https';
|
|
3
5
|
import {
|
|
4
6
|
AwsCredentialIdentity,
|
|
5
7
|
AwsCredentialIdentityProvider,
|
|
@@ -9,6 +11,7 @@ export type S3Setup = {
|
|
|
9
11
|
region: string;
|
|
10
12
|
endpoint?: string;
|
|
11
13
|
credentials: AwsCredentialIdentityProvider | AwsCredentialIdentity;
|
|
14
|
+
keepAlive?: boolean;
|
|
12
15
|
};
|
|
13
16
|
|
|
14
17
|
const S3Provider = (params: S3Setup) => {
|
|
@@ -19,6 +22,9 @@ const S3Provider = (params: S3Setup) => {
|
|
|
19
22
|
credentials: params.credentials,
|
|
20
23
|
...(params.endpoint && { endpoint: params.endpoint }),
|
|
21
24
|
region: params.region,
|
|
25
|
+
requestHandler: new NodeHttpHandler({
|
|
26
|
+
httpsAgent: new HttpsAgent({ keepAlive: params.keepAlive ?? true }),
|
|
27
|
+
}),
|
|
22
28
|
});
|
|
23
29
|
},
|
|
24
30
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { SNSClient } from '@aws-sdk/client-sns';
|
|
2
|
+
import { NodeHttpHandler } from '@smithy/node-http-handler';
|
|
2
3
|
import { DynamicModule } from '@nestjs/common';
|
|
4
|
+
import { Agent as HttpsAgent } from 'https';
|
|
3
5
|
import {
|
|
4
6
|
AwsCredentialIdentity,
|
|
5
7
|
AwsCredentialIdentityProvider,
|
|
@@ -9,6 +11,7 @@ export type SNSSetup = {
|
|
|
9
11
|
region: string;
|
|
10
12
|
endpoint?: string;
|
|
11
13
|
credentials: AwsCredentialIdentityProvider | AwsCredentialIdentity;
|
|
14
|
+
keepAlive?: boolean;
|
|
12
15
|
};
|
|
13
16
|
|
|
14
17
|
const SNSProvider = (params: SNSSetup) => {
|
|
@@ -19,6 +22,9 @@ const SNSProvider = (params: SNSSetup) => {
|
|
|
19
22
|
credentials: params.credentials,
|
|
20
23
|
...(params.endpoint && { endpoint: params.endpoint }),
|
|
21
24
|
region: params.region,
|
|
25
|
+
requestHandler: new NodeHttpHandler({
|
|
26
|
+
httpsAgent: new HttpsAgent({ keepAlive: params.keepAlive ?? true }),
|
|
27
|
+
}),
|
|
22
28
|
});
|
|
23
29
|
},
|
|
24
30
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { SQSClient } from '@aws-sdk/client-sqs';
|
|
2
|
+
import { NodeHttpHandler } from '@smithy/node-http-handler';
|
|
2
3
|
import { DynamicModule } from '@nestjs/common';
|
|
4
|
+
import { Agent as HttpsAgent } from 'https';
|
|
3
5
|
import {
|
|
4
6
|
AwsCredentialIdentity,
|
|
5
7
|
AwsCredentialIdentityProvider,
|
|
@@ -9,6 +11,7 @@ export type SqsSetup = {
|
|
|
9
11
|
region: string;
|
|
10
12
|
endpoint?: string;
|
|
11
13
|
credentials: AwsCredentialIdentityProvider | AwsCredentialIdentity;
|
|
14
|
+
keepAlive?: boolean;
|
|
12
15
|
};
|
|
13
16
|
|
|
14
17
|
const SqsProvider = (params: SqsSetup) => {
|
|
@@ -19,6 +22,9 @@ const SqsProvider = (params: SqsSetup) => {
|
|
|
19
22
|
credentials: params.credentials,
|
|
20
23
|
region: params.region,
|
|
21
24
|
...(params.endpoint && { endpoint: params.endpoint }),
|
|
25
|
+
requestHandler: new NodeHttpHandler({
|
|
26
|
+
httpsAgent: new HttpsAgent({ keepAlive: params.keepAlive ?? true }),
|
|
27
|
+
}),
|
|
22
28
|
});
|
|
23
29
|
},
|
|
24
30
|
};
|