@webiny/aws-sdk 0.0.0-unstable.a9593f74dd → 0.0.0-unstable.e53eceafb5
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/client-apigatewaymanagementapi/index.d.ts +1 -0
- package/client-apigatewaymanagementapi/index.js +122 -0
- package/client-apigatewaymanagementapi/index.js.map +1 -0
- package/client-cloudfront/index.js +1 -1
- package/client-cloudfront/index.js.map +1 -1
- package/client-cloudwatch/index.js +8 -8
- package/client-cloudwatch/index.js.map +1 -1
- package/client-cognito-identity-provider/index.d.ts +5 -1
- package/client-cognito-identity-provider/index.js +54 -10
- package/client-cognito-identity-provider/index.js.map +1 -1
- package/client-dynamodb/getDocumentClient.d.ts +6 -1
- package/client-dynamodb/getDocumentClient.js +48 -24
- package/client-dynamodb/getDocumentClient.js.map +1 -1
- package/client-dynamodb/index.d.ts +2 -1
- package/client-dynamodb/index.js +25 -19
- package/client-dynamodb/index.js.map +1 -1
- package/client-eventbridge/index.d.ts +5 -2
- package/client-eventbridge/index.js +9 -33
- package/client-eventbridge/index.js.map +1 -1
- package/client-iam/index.js +1 -1
- package/client-iam/index.js.map +1 -1
- package/client-iot/index.d.ts +1 -0
- package/client-iot/index.js +20 -0
- package/client-iot/index.js.map +1 -0
- package/client-lambda/index.d.ts +5 -1
- package/client-lambda/index.js +40 -2
- package/client-lambda/index.js.map +1 -1
- package/client-s3/index.d.ts +9 -3
- package/client-s3/index.js +89 -67
- package/client-s3/index.js.map +1 -1
- package/client-scheduler/index.d.ts +8 -0
- package/client-scheduler/index.js +60 -0
- package/client-scheduler/index.js.map +1 -0
- package/client-sfn/index.d.ts +12 -7
- package/client-sfn/index.js +64 -17
- package/client-sfn/index.js.map +1 -1
- package/client-sqs/index.js +3 -3
- package/client-sqs/index.js.map +1 -1
- package/client-sts/index.js +1 -1
- package/client-sts/index.js.map +1 -1
- package/credential-providers/index.js +1 -1
- package/credential-providers/index.js.map +1 -1
- package/lib-storage/index.d.ts +1 -1
- package/lib-storage/index.js +31 -1
- package/lib-storage/index.js.map +1 -1
- package/package.json +41 -30
- package/types/index.d.ts +1 -0
- package/types/index.js +18 -0
- package/types/index.js.map +1 -0
- package/client-eventbridge/types.d.ts +0 -29
- package/client-eventbridge/types.js +0 -7
- package/client-eventbridge/types.js.map +0 -1
package/client-iam/index.js
CHANGED
package/client-iam/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clientIam","require"],"sources":["index.ts"],"sourcesContent":["export { IAM } from \"@aws-sdk/client-iam\";\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA"}
|
|
1
|
+
{"version":3,"names":["_clientIam","require"],"sources":["index.ts"],"sourcesContent":["export { IAM } from \"@aws-sdk/client-iam\";\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IoTClient, DescribeEndpointCommand } from "@aws-sdk/client-iot";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "DescribeEndpointCommand", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _clientIot.DescribeEndpointCommand;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "IoTClient", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _clientIot.IoTClient;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
var _clientIot = require("@aws-sdk/client-iot");
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_clientIot","require"],"sources":["index.ts"],"sourcesContent":["export { IoTClient, DescribeEndpointCommand } from \"@aws-sdk/client-iot\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA","ignoreList":[]}
|
package/client-lambda/index.d.ts
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import type { LambdaClientConfig } from "@aws-sdk/client-lambda";
|
|
2
|
+
import { LambdaClient } from "@aws-sdk/client-lambda";
|
|
3
|
+
export { LambdaClient, InvokeCommand, GetFunctionConfigurationCommand, UpdateFunctionConfigurationCommand, UpdateFunctionCodeCommand } from "@aws-sdk/client-lambda";
|
|
4
|
+
export type { InvocationType, InvokeCommandInput, LambdaClientConfig, InvokeCommandOutput, UpdateFunctionConfigurationCommandInput, UpdateFunctionConfigurationCommandOutput, UpdateFunctionCodeCommandInput, UpdateFunctionCodeCommandOutput } from "@aws-sdk/client-lambda";
|
|
5
|
+
export declare const createLambdaClient: (input?: Partial<LambdaClientConfig>) => LambdaClient;
|
package/client-lambda/index.js
CHANGED
|
@@ -3,18 +3,56 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "GetFunctionConfigurationCommand", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _clientLambda.GetFunctionConfigurationCommand;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "InvokeCommand", {
|
|
7
13
|
enumerable: true,
|
|
8
|
-
get: function
|
|
14
|
+
get: function () {
|
|
9
15
|
return _clientLambda.InvokeCommand;
|
|
10
16
|
}
|
|
11
17
|
});
|
|
12
18
|
Object.defineProperty(exports, "LambdaClient", {
|
|
13
19
|
enumerable: true,
|
|
14
|
-
get: function
|
|
20
|
+
get: function () {
|
|
15
21
|
return _clientLambda.LambdaClient;
|
|
16
22
|
}
|
|
17
23
|
});
|
|
24
|
+
Object.defineProperty(exports, "UpdateFunctionCodeCommand", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _clientLambda.UpdateFunctionCodeCommand;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "UpdateFunctionConfigurationCommand", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _clientLambda.UpdateFunctionConfigurationCommand;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
exports.createLambdaClient = void 0;
|
|
37
|
+
var _utils = require("@webiny/utils");
|
|
18
38
|
var _clientLambda = require("@aws-sdk/client-lambda");
|
|
39
|
+
const DEFAULT_CONFIG = {
|
|
40
|
+
region: process.env.AWS_REGION
|
|
41
|
+
};
|
|
42
|
+
const lambdaClients = {};
|
|
43
|
+
const createLambdaClient = input => {
|
|
44
|
+
const config = {
|
|
45
|
+
...DEFAULT_CONFIG,
|
|
46
|
+
...input
|
|
47
|
+
};
|
|
48
|
+
const key = (0, _utils.createCacheKey)(config);
|
|
49
|
+
if (lambdaClients[key]) {
|
|
50
|
+
return lambdaClients[key];
|
|
51
|
+
}
|
|
52
|
+
const client = new _clientLambda.LambdaClient(config);
|
|
53
|
+
lambdaClients[key] = client;
|
|
54
|
+
return client;
|
|
55
|
+
};
|
|
56
|
+
exports.createLambdaClient = createLambdaClient;
|
|
19
57
|
|
|
20
58
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_utils","require","_clientLambda","DEFAULT_CONFIG","region","process","env","AWS_REGION","lambdaClients","createLambdaClient","input","config","key","createCacheKey","client","LambdaClient","exports"],"sources":["index.ts"],"sourcesContent":["import { createCacheKey } from \"@webiny/utils\";\nimport type { LambdaClientConfig } from \"@aws-sdk/client-lambda\";\nimport { LambdaClient } from \"@aws-sdk/client-lambda\";\n\nexport {\n LambdaClient,\n InvokeCommand,\n GetFunctionConfigurationCommand,\n UpdateFunctionConfigurationCommand,\n UpdateFunctionCodeCommand\n} from \"@aws-sdk/client-lambda\";\n\nexport type {\n InvocationType,\n InvokeCommandInput,\n LambdaClientConfig,\n InvokeCommandOutput,\n UpdateFunctionConfigurationCommandInput,\n UpdateFunctionConfigurationCommandOutput,\n UpdateFunctionCodeCommandInput,\n UpdateFunctionCodeCommandOutput\n} from \"@aws-sdk/client-lambda\";\n\nconst DEFAULT_CONFIG: LambdaClientConfig = {\n region: process.env.AWS_REGION\n};\n\nconst lambdaClients: Record<string, LambdaClient> = {};\n\nexport const createLambdaClient = (input?: Partial<LambdaClientConfig>): LambdaClient => {\n const config: LambdaClientConfig = {\n ...DEFAULT_CONFIG,\n ...input\n };\n const key = createCacheKey(config);\n\n if (lambdaClients[key]) {\n return lambdaClients[key];\n }\n\n const client = new LambdaClient(config);\n\n lambdaClients[key] = client;\n\n return client;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AAqBA,MAAME,cAAkC,GAAG;EACvCC,MAAM,EAAEC,OAAO,CAACC,GAAG,CAACC;AACxB,CAAC;AAED,MAAMC,aAA2C,GAAG,CAAC,CAAC;AAE/C,MAAMC,kBAAkB,GAAIC,KAAmC,IAAmB;EACrF,MAAMC,MAA0B,GAAG;IAC/B,GAAGR,cAAc;IACjB,GAAGO;EACP,CAAC;EACD,MAAME,GAAG,GAAG,IAAAC,qBAAc,EAACF,MAAM,CAAC;EAElC,IAAIH,aAAa,CAACI,GAAG,CAAC,EAAE;IACpB,OAAOJ,aAAa,CAACI,GAAG,CAAC;EAC7B;EAEA,MAAME,MAAM,GAAG,IAAIC,0BAAY,CAACJ,MAAM,CAAC;EAEvCH,aAAa,CAACI,GAAG,CAAC,GAAGE,MAAM;EAE3B,OAAOA,MAAM;AACjB,CAAC;AAACE,OAAA,CAAAP,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
package/client-s3/index.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import type { S3ClientConfig as BaseS3ClientConfig } from "@aws-sdk/client-s3";
|
|
2
|
+
import { S3, S3Client } from "@aws-sdk/client-s3";
|
|
3
|
+
export { CopyObjectCommand, GetObjectCommand, HeadObjectCommand, ListObjectsCommand, UploadPartCopyCommand, ListObjectsV2Command, ListPartsCommand, ObjectCannedACL, Part, DeleteObjectCommand, PutObjectCommand, PutObjectCommandInput, PutObjectRequest, UploadPartCommand, AbortMultipartUploadCommand, CompleteMultipartUploadCommand, CreateMultipartUploadCommand, S3, S3Client } from "@aws-sdk/client-s3";
|
|
4
|
+
export type { CopyObjectCommandInput, CopyObjectCommandOutput, DeleteObjectCommandInput, DeleteObjectsCommandInput, DeleteObjectsCommandOutput, AbortMultipartUploadCommandInput, CompleteMultipartUploadCommandInput, UploadPartCopyCommandInput, CreateMultipartUploadCommandInput, CompleteMultipartUploadCommandOutput, AbortMultipartUploadCommandOutput, CompleteMultipartUploadOutput, DeleteObjectOutput, GetObjectOutput, CompletedPart, GetObjectCommandOutput, HeadObjectOutput, HeadObjectCommandInput, HeadObjectCommandOutput, DeleteObjectCommandOutput, ListObjectsOutput, ListPartsCommandOutput, ListPartsOutput, PutObjectCommandOutput, UploadPartCommandOutput } from "@aws-sdk/client-s3";
|
|
3
5
|
export { createPresignedPost } from "@aws-sdk/s3-presigned-post";
|
|
4
6
|
export { PresignedPost, PresignedPostOptions } from "@aws-sdk/s3-presigned-post";
|
|
5
7
|
export { getSignedUrl } from "@aws-sdk/s3-request-presigner";
|
|
6
|
-
export
|
|
8
|
+
export interface S3ClientConfig extends BaseS3ClientConfig {
|
|
9
|
+
cache?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const createS3Client: (initial?: S3ClientConfig) => S3Client;
|
|
12
|
+
export declare const createS3: (initial?: S3ClientConfig) => S3;
|
package/client-s3/index.js
CHANGED
|
@@ -1,172 +1,194 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
Object.defineProperty(exports, "
|
|
6
|
+
Object.defineProperty(exports, "AbortMultipartUploadCommand", {
|
|
8
7
|
enumerable: true,
|
|
9
|
-
get: function
|
|
10
|
-
return _clientS.
|
|
8
|
+
get: function () {
|
|
9
|
+
return _clientS.AbortMultipartUploadCommand;
|
|
11
10
|
}
|
|
12
11
|
});
|
|
13
|
-
Object.defineProperty(exports, "
|
|
12
|
+
Object.defineProperty(exports, "CompleteMultipartUploadCommand", {
|
|
14
13
|
enumerable: true,
|
|
15
|
-
get: function
|
|
16
|
-
return _clientS.
|
|
14
|
+
get: function () {
|
|
15
|
+
return _clientS.CompleteMultipartUploadCommand;
|
|
17
16
|
}
|
|
18
17
|
});
|
|
19
|
-
Object.defineProperty(exports, "
|
|
18
|
+
Object.defineProperty(exports, "CopyObjectCommand", {
|
|
20
19
|
enumerable: true,
|
|
21
|
-
get: function
|
|
22
|
-
return _clientS.
|
|
20
|
+
get: function () {
|
|
21
|
+
return _clientS.CopyObjectCommand;
|
|
23
22
|
}
|
|
24
23
|
});
|
|
25
|
-
Object.defineProperty(exports, "
|
|
24
|
+
Object.defineProperty(exports, "CreateMultipartUploadCommand", {
|
|
26
25
|
enumerable: true,
|
|
27
|
-
get: function
|
|
28
|
-
return _clientS.
|
|
26
|
+
get: function () {
|
|
27
|
+
return _clientS.CreateMultipartUploadCommand;
|
|
29
28
|
}
|
|
30
29
|
});
|
|
31
|
-
Object.defineProperty(exports, "
|
|
30
|
+
Object.defineProperty(exports, "DeleteObjectCommand", {
|
|
32
31
|
enumerable: true,
|
|
33
|
-
get: function
|
|
34
|
-
return _clientS.
|
|
32
|
+
get: function () {
|
|
33
|
+
return _clientS.DeleteObjectCommand;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "GetObjectCommand", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _clientS.GetObjectCommand;
|
|
35
40
|
}
|
|
36
41
|
});
|
|
37
42
|
Object.defineProperty(exports, "HeadObjectCommand", {
|
|
38
43
|
enumerable: true,
|
|
39
|
-
get: function
|
|
44
|
+
get: function () {
|
|
40
45
|
return _clientS.HeadObjectCommand;
|
|
41
46
|
}
|
|
42
47
|
});
|
|
43
|
-
Object.defineProperty(exports, "
|
|
48
|
+
Object.defineProperty(exports, "ListObjectsCommand", {
|
|
44
49
|
enumerable: true,
|
|
45
|
-
get: function
|
|
46
|
-
return _clientS.
|
|
50
|
+
get: function () {
|
|
51
|
+
return _clientS.ListObjectsCommand;
|
|
47
52
|
}
|
|
48
53
|
});
|
|
49
|
-
Object.defineProperty(exports, "
|
|
54
|
+
Object.defineProperty(exports, "ListObjectsV2Command", {
|
|
50
55
|
enumerable: true,
|
|
51
|
-
get: function
|
|
52
|
-
return _clientS.
|
|
56
|
+
get: function () {
|
|
57
|
+
return _clientS.ListObjectsV2Command;
|
|
53
58
|
}
|
|
54
59
|
});
|
|
55
60
|
Object.defineProperty(exports, "ListPartsCommand", {
|
|
56
61
|
enumerable: true,
|
|
57
|
-
get: function
|
|
62
|
+
get: function () {
|
|
58
63
|
return _clientS.ListPartsCommand;
|
|
59
64
|
}
|
|
60
65
|
});
|
|
61
|
-
Object.defineProperty(exports, "ListPartsCommandOutput", {
|
|
62
|
-
enumerable: true,
|
|
63
|
-
get: function get() {
|
|
64
|
-
return _clientS.ListPartsCommandOutput;
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
Object.defineProperty(exports, "ListPartsOutput", {
|
|
68
|
-
enumerable: true,
|
|
69
|
-
get: function get() {
|
|
70
|
-
return _clientS.ListPartsOutput;
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
66
|
Object.defineProperty(exports, "ObjectCannedACL", {
|
|
74
67
|
enumerable: true,
|
|
75
|
-
get: function
|
|
68
|
+
get: function () {
|
|
76
69
|
return _clientS.ObjectCannedACL;
|
|
77
70
|
}
|
|
78
71
|
});
|
|
79
72
|
Object.defineProperty(exports, "Part", {
|
|
80
73
|
enumerable: true,
|
|
81
|
-
get: function
|
|
74
|
+
get: function () {
|
|
82
75
|
return _clientS.Part;
|
|
83
76
|
}
|
|
84
77
|
});
|
|
85
78
|
Object.defineProperty(exports, "PresignedPost", {
|
|
86
79
|
enumerable: true,
|
|
87
|
-
get: function
|
|
80
|
+
get: function () {
|
|
88
81
|
return _s3PresignedPost.PresignedPost;
|
|
89
82
|
}
|
|
90
83
|
});
|
|
91
84
|
Object.defineProperty(exports, "PresignedPostOptions", {
|
|
92
85
|
enumerable: true,
|
|
93
|
-
get: function
|
|
86
|
+
get: function () {
|
|
94
87
|
return _s3PresignedPost.PresignedPostOptions;
|
|
95
88
|
}
|
|
96
89
|
});
|
|
97
90
|
Object.defineProperty(exports, "PutObjectCommand", {
|
|
98
91
|
enumerable: true,
|
|
99
|
-
get: function
|
|
92
|
+
get: function () {
|
|
100
93
|
return _clientS.PutObjectCommand;
|
|
101
94
|
}
|
|
102
95
|
});
|
|
103
96
|
Object.defineProperty(exports, "PutObjectCommandInput", {
|
|
104
97
|
enumerable: true,
|
|
105
|
-
get: function
|
|
98
|
+
get: function () {
|
|
106
99
|
return _clientS.PutObjectCommandInput;
|
|
107
100
|
}
|
|
108
101
|
});
|
|
109
|
-
Object.defineProperty(exports, "PutObjectCommandOutput", {
|
|
110
|
-
enumerable: true,
|
|
111
|
-
get: function get() {
|
|
112
|
-
return _clientS.PutObjectCommandOutput;
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
102
|
Object.defineProperty(exports, "PutObjectRequest", {
|
|
116
103
|
enumerable: true,
|
|
117
|
-
get: function
|
|
104
|
+
get: function () {
|
|
118
105
|
return _clientS.PutObjectRequest;
|
|
119
106
|
}
|
|
120
107
|
});
|
|
121
108
|
Object.defineProperty(exports, "S3", {
|
|
122
109
|
enumerable: true,
|
|
123
|
-
get: function
|
|
110
|
+
get: function () {
|
|
124
111
|
return _clientS.S3;
|
|
125
112
|
}
|
|
126
113
|
});
|
|
127
114
|
Object.defineProperty(exports, "S3Client", {
|
|
128
115
|
enumerable: true,
|
|
129
|
-
get: function
|
|
116
|
+
get: function () {
|
|
130
117
|
return _clientS.S3Client;
|
|
131
118
|
}
|
|
132
119
|
});
|
|
133
120
|
Object.defineProperty(exports, "UploadPartCommand", {
|
|
134
121
|
enumerable: true,
|
|
135
|
-
get: function
|
|
122
|
+
get: function () {
|
|
136
123
|
return _clientS.UploadPartCommand;
|
|
137
124
|
}
|
|
138
125
|
});
|
|
126
|
+
Object.defineProperty(exports, "UploadPartCopyCommand", {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
get: function () {
|
|
129
|
+
return _clientS.UploadPartCopyCommand;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
139
132
|
Object.defineProperty(exports, "createPresignedPost", {
|
|
140
133
|
enumerable: true,
|
|
141
|
-
get: function
|
|
134
|
+
get: function () {
|
|
142
135
|
return _s3PresignedPost.createPresignedPost;
|
|
143
136
|
}
|
|
144
137
|
});
|
|
145
|
-
exports.createS3Client = void 0;
|
|
138
|
+
exports.createS3Client = exports.createS3 = void 0;
|
|
146
139
|
Object.defineProperty(exports, "getSignedUrl", {
|
|
147
140
|
enumerable: true,
|
|
148
|
-
get: function
|
|
141
|
+
get: function () {
|
|
149
142
|
return _s3RequestPresigner.getSignedUrl;
|
|
150
143
|
}
|
|
151
144
|
});
|
|
152
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
153
145
|
var _clientS = require("@aws-sdk/client-s3");
|
|
154
146
|
var _utils = require("@webiny/utils");
|
|
155
147
|
var _s3PresignedPost = require("@aws-sdk/s3-presigned-post");
|
|
156
148
|
var _s3RequestPresigner = require("@aws-sdk/s3-request-presigner");
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
region: process.env.AWS_REGION
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
149
|
+
const s3ClientsCache = new Map();
|
|
150
|
+
const createS3Client = initial => {
|
|
151
|
+
const options = {
|
|
152
|
+
region: process.env.AWS_REGION,
|
|
153
|
+
...initial
|
|
154
|
+
};
|
|
155
|
+
const skipCache = options.cache === false;
|
|
156
|
+
delete options.cache;
|
|
157
|
+
if (skipCache) {
|
|
158
|
+
return new _clientS.S3Client({
|
|
159
|
+
...options
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
const key = (0, _utils.createCacheKey)(options);
|
|
163
|
+
if (s3ClientsCache.has(key)) {
|
|
164
|
+
return s3ClientsCache.get(key);
|
|
165
|
+
}
|
|
166
|
+
const instance = new _clientS.S3Client({
|
|
167
|
+
...options
|
|
168
|
+
});
|
|
169
|
+
s3ClientsCache.set(key, instance);
|
|
168
170
|
return instance;
|
|
169
171
|
};
|
|
170
172
|
exports.createS3Client = createS3Client;
|
|
173
|
+
const s3Cache = new Map();
|
|
174
|
+
const createS3 = initial => {
|
|
175
|
+
const options = {
|
|
176
|
+
region: process.env.AWS_REGION,
|
|
177
|
+
...initial
|
|
178
|
+
};
|
|
179
|
+
const skipCache = options.cache === false;
|
|
180
|
+
delete options.cache;
|
|
181
|
+
if (skipCache) {
|
|
182
|
+
return new _clientS.S3(options);
|
|
183
|
+
}
|
|
184
|
+
const key = (0, _utils.createCacheKey)(options);
|
|
185
|
+
if (s3Cache.has(key)) {
|
|
186
|
+
return s3Cache.get(key);
|
|
187
|
+
}
|
|
188
|
+
const instance = new _clientS.S3(options);
|
|
189
|
+
s3Cache.set(key, instance);
|
|
190
|
+
return instance;
|
|
191
|
+
};
|
|
192
|
+
exports.createS3 = createS3;
|
|
171
193
|
|
|
172
194
|
//# sourceMappingURL=index.js.map
|
package/client-s3/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clientS","require","_utils","_s3PresignedPost","_s3RequestPresigner","
|
|
1
|
+
{"version":3,"names":["_clientS","require","_utils","_s3PresignedPost","_s3RequestPresigner","s3ClientsCache","Map","createS3Client","initial","options","region","process","env","AWS_REGION","skipCache","cache","S3Client","key","createCacheKey","has","get","instance","set","exports","s3Cache","createS3","S3"],"sources":["index.ts"],"sourcesContent":["import type { S3ClientConfig as BaseS3ClientConfig } from \"@aws-sdk/client-s3\";\nimport { S3, S3Client } from \"@aws-sdk/client-s3\";\nimport { createCacheKey } from \"@webiny/utils\";\n\nexport {\n CopyObjectCommand,\n GetObjectCommand,\n HeadObjectCommand,\n ListObjectsCommand,\n UploadPartCopyCommand,\n ListObjectsV2Command,\n ListPartsCommand,\n ObjectCannedACL,\n Part,\n DeleteObjectCommand,\n PutObjectCommand,\n PutObjectCommandInput,\n PutObjectRequest,\n UploadPartCommand,\n AbortMultipartUploadCommand,\n CompleteMultipartUploadCommand,\n CreateMultipartUploadCommand,\n S3,\n S3Client\n} from \"@aws-sdk/client-s3\";\n\nexport type {\n CopyObjectCommandInput,\n CopyObjectCommandOutput,\n DeleteObjectCommandInput,\n DeleteObjectsCommandInput,\n DeleteObjectsCommandOutput,\n AbortMultipartUploadCommandInput,\n CompleteMultipartUploadCommandInput,\n UploadPartCopyCommandInput,\n CreateMultipartUploadCommandInput,\n CompleteMultipartUploadCommandOutput,\n AbortMultipartUploadCommandOutput,\n CompleteMultipartUploadOutput,\n DeleteObjectOutput,\n GetObjectOutput,\n CompletedPart,\n GetObjectCommandOutput,\n HeadObjectOutput,\n HeadObjectCommandInput,\n HeadObjectCommandOutput,\n DeleteObjectCommandOutput,\n ListObjectsOutput,\n ListPartsCommandOutput,\n ListPartsOutput,\n PutObjectCommandOutput,\n UploadPartCommandOutput\n} from \"@aws-sdk/client-s3\";\n\nexport { createPresignedPost } from \"@aws-sdk/s3-presigned-post\";\nexport { PresignedPost, PresignedPostOptions } from \"@aws-sdk/s3-presigned-post\";\n\nexport { getSignedUrl } from \"@aws-sdk/s3-request-presigner\";\n\nconst s3ClientsCache = new Map<string, S3Client>();\n\nexport interface S3ClientConfig extends BaseS3ClientConfig {\n cache?: boolean;\n}\n\nexport const createS3Client = (initial?: S3ClientConfig): S3Client => {\n const options: S3ClientConfig = {\n region: process.env.AWS_REGION,\n ...initial\n };\n const skipCache = options.cache === false;\n delete options.cache;\n if (skipCache) {\n return new S3Client({\n ...options\n });\n }\n\n const key = createCacheKey(options);\n if (s3ClientsCache.has(key)) {\n return s3ClientsCache.get(key) as S3Client;\n }\n\n const instance = new S3Client({\n ...options\n });\n s3ClientsCache.set(key, instance);\n\n return instance;\n};\n\nconst s3Cache = new Map<string, S3>();\n\nexport const createS3 = (initial?: S3ClientConfig): S3 => {\n const options: S3ClientConfig = {\n region: process.env.AWS_REGION,\n ...initial\n };\n const skipCache = options.cache === false;\n delete options.cache;\n if (skipCache) {\n return new S3(options);\n }\n const key = createCacheKey(options);\n if (s3Cache.has(key)) {\n return s3Cache.get(key) as S3;\n }\n\n const instance = new S3(options);\n\n s3Cache.set(key, instance);\n return instance;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAoDA,IAAAE,gBAAA,GAAAF,OAAA;AAGA,IAAAG,mBAAA,GAAAH,OAAA;AAEA,MAAMI,cAAc,GAAG,IAAIC,GAAG,CAAmB,CAAC;AAM3C,MAAMC,cAAc,GAAIC,OAAwB,IAAe;EAClE,MAAMC,OAAuB,GAAG;IAC5BC,MAAM,EAAEC,OAAO,CAACC,GAAG,CAACC,UAAU;IAC9B,GAAGL;EACP,CAAC;EACD,MAAMM,SAAS,GAAGL,OAAO,CAACM,KAAK,KAAK,KAAK;EACzC,OAAON,OAAO,CAACM,KAAK;EACpB,IAAID,SAAS,EAAE;IACX,OAAO,IAAIE,iBAAQ,CAAC;MAChB,GAAGP;IACP,CAAC,CAAC;EACN;EAEA,MAAMQ,GAAG,GAAG,IAAAC,qBAAc,EAACT,OAAO,CAAC;EACnC,IAAIJ,cAAc,CAACc,GAAG,CAACF,GAAG,CAAC,EAAE;IACzB,OAAOZ,cAAc,CAACe,GAAG,CAACH,GAAG,CAAC;EAClC;EAEA,MAAMI,QAAQ,GAAG,IAAIL,iBAAQ,CAAC;IAC1B,GAAGP;EACP,CAAC,CAAC;EACFJ,cAAc,CAACiB,GAAG,CAACL,GAAG,EAAEI,QAAQ,CAAC;EAEjC,OAAOA,QAAQ;AACnB,CAAC;AAACE,OAAA,CAAAhB,cAAA,GAAAA,cAAA;AAEF,MAAMiB,OAAO,GAAG,IAAIlB,GAAG,CAAa,CAAC;AAE9B,MAAMmB,QAAQ,GAAIjB,OAAwB,IAAS;EACtD,MAAMC,OAAuB,GAAG;IAC5BC,MAAM,EAAEC,OAAO,CAACC,GAAG,CAACC,UAAU;IAC9B,GAAGL;EACP,CAAC;EACD,MAAMM,SAAS,GAAGL,OAAO,CAACM,KAAK,KAAK,KAAK;EACzC,OAAON,OAAO,CAACM,KAAK;EACpB,IAAID,SAAS,EAAE;IACX,OAAO,IAAIY,WAAE,CAACjB,OAAO,CAAC;EAC1B;EACA,MAAMQ,GAAG,GAAG,IAAAC,qBAAc,EAACT,OAAO,CAAC;EACnC,IAAIe,OAAO,CAACL,GAAG,CAACF,GAAG,CAAC,EAAE;IAClB,OAAOO,OAAO,CAACJ,GAAG,CAACH,GAAG,CAAC;EAC3B;EAEA,MAAMI,QAAQ,GAAG,IAAIK,WAAE,CAACjB,OAAO,CAAC;EAEhCe,OAAO,CAACF,GAAG,CAACL,GAAG,EAAEI,QAAQ,CAAC;EAC1B,OAAOA,QAAQ;AACnB,CAAC;AAACE,OAAA,CAAAE,QAAA,GAAAA,QAAA","ignoreList":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SchedulerClientConfig as BaseSchedulerClientConfig } from "@aws-sdk/client-scheduler";
|
|
2
|
+
import { SchedulerClient } from "@aws-sdk/client-scheduler";
|
|
3
|
+
export { SchedulerClient, GetScheduleCommand, CreateScheduleCommand, UpdateScheduleCommand, DeleteScheduleCommand } from "@aws-sdk/client-scheduler";
|
|
4
|
+
export type { GetScheduleCommandInput, GetScheduleCommandOutput, CreateScheduleCommandInput, CreateScheduleCommandOutput, UpdateScheduleCommandInput, UpdateScheduleCommandOutput, DeleteScheduleCommandInput, DeleteScheduleCommandOutput } from "@aws-sdk/client-scheduler";
|
|
5
|
+
export interface SchedulerClientConfig extends BaseSchedulerClientConfig {
|
|
6
|
+
cache?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const createSchedulerClient: (input?: Partial<SchedulerClientConfig>) => SchedulerClient;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "CreateScheduleCommand", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _clientScheduler.CreateScheduleCommand;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "DeleteScheduleCommand", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _clientScheduler.DeleteScheduleCommand;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "GetScheduleCommand", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _clientScheduler.GetScheduleCommand;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "SchedulerClient", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _clientScheduler.SchedulerClient;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "UpdateScheduleCommand", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _clientScheduler.UpdateScheduleCommand;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
exports.createSchedulerClient = void 0;
|
|
37
|
+
var _utils = require("@webiny/utils");
|
|
38
|
+
var _clientScheduler = require("@aws-sdk/client-scheduler");
|
|
39
|
+
const clients = {};
|
|
40
|
+
const createSchedulerClient = (input = {}) => {
|
|
41
|
+
const options = {
|
|
42
|
+
region: process.env.AWS_REGION,
|
|
43
|
+
...input
|
|
44
|
+
};
|
|
45
|
+
const skipCache = options.cache === false;
|
|
46
|
+
delete options.cache;
|
|
47
|
+
if (skipCache) {
|
|
48
|
+
return new _clientScheduler.SchedulerClient(options);
|
|
49
|
+
}
|
|
50
|
+
const key = (0, _utils.createCacheKey)(options);
|
|
51
|
+
if (clients[key]) {
|
|
52
|
+
return clients[key];
|
|
53
|
+
}
|
|
54
|
+
const client = new _clientScheduler.SchedulerClient(options);
|
|
55
|
+
clients[key] = client;
|
|
56
|
+
return client;
|
|
57
|
+
};
|
|
58
|
+
exports.createSchedulerClient = createSchedulerClient;
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_utils","require","_clientScheduler","clients","createSchedulerClient","input","options","region","process","env","AWS_REGION","skipCache","cache","SchedulerClient","key","createCacheKey","client","exports"],"sources":["index.ts"],"sourcesContent":["import { createCacheKey } from \"@webiny/utils\";\nimport type { SchedulerClientConfig as BaseSchedulerClientConfig } from \"@aws-sdk/client-scheduler\";\nimport { SchedulerClient } from \"@aws-sdk/client-scheduler\";\n\nexport {\n SchedulerClient,\n GetScheduleCommand,\n CreateScheduleCommand,\n UpdateScheduleCommand,\n DeleteScheduleCommand\n} from \"@aws-sdk/client-scheduler\";\n\nexport type {\n GetScheduleCommandInput,\n GetScheduleCommandOutput,\n CreateScheduleCommandInput,\n CreateScheduleCommandOutput,\n UpdateScheduleCommandInput,\n UpdateScheduleCommandOutput,\n DeleteScheduleCommandInput,\n DeleteScheduleCommandOutput\n} from \"@aws-sdk/client-scheduler\";\n\nconst clients: Record<string, SchedulerClient> = {};\n\nexport interface SchedulerClientConfig extends BaseSchedulerClientConfig {\n cache?: boolean;\n}\n\nexport const createSchedulerClient = (\n input: Partial<SchedulerClientConfig> = {}\n): SchedulerClient => {\n const options: SchedulerClientConfig = {\n region: process.env.AWS_REGION,\n ...input\n };\n\n const skipCache = options.cache === false;\n delete options.cache;\n if (skipCache) {\n return new SchedulerClient(options);\n }\n\n const key = createCacheKey(options);\n\n if (clients[key]) {\n return clients[key];\n }\n\n const client = new SchedulerClient(options);\n\n clients[key] = client;\n\n return client;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,gBAAA,GAAAD,OAAA;AAqBA,MAAME,OAAwC,GAAG,CAAC,CAAC;AAM5C,MAAMC,qBAAqB,GAAGA,CACjCC,KAAqC,GAAG,CAAC,CAAC,KACxB;EAClB,MAAMC,OAA8B,GAAG;IACnCC,MAAM,EAAEC,OAAO,CAACC,GAAG,CAACC,UAAU;IAC9B,GAAGL;EACP,CAAC;EAED,MAAMM,SAAS,GAAGL,OAAO,CAACM,KAAK,KAAK,KAAK;EACzC,OAAON,OAAO,CAACM,KAAK;EACpB,IAAID,SAAS,EAAE;IACX,OAAO,IAAIE,gCAAe,CAACP,OAAO,CAAC;EACvC;EAEA,MAAMQ,GAAG,GAAG,IAAAC,qBAAc,EAACT,OAAO,CAAC;EAEnC,IAAIH,OAAO,CAACW,GAAG,CAAC,EAAE;IACd,OAAOX,OAAO,CAACW,GAAG,CAAC;EACvB;EAEA,MAAME,MAAM,GAAG,IAAIH,gCAAe,CAACP,OAAO,CAAC;EAE3CH,OAAO,CAACW,GAAG,CAAC,GAAGE,MAAM;EAErB,OAAOA,MAAM;AACjB,CAAC;AAACC,OAAA,CAAAb,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
package/client-sfn/index.d.ts
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
1
|
+
import type { DescribeExecutionCommandInput, DescribeExecutionCommandOutput, ListExecutionsCommandInput, ListExecutionsCommandOutput, SFNClientConfig as BaseSFNClientConfig, StartExecutionCommandInput, StartExecutionCommandOutput } from "@aws-sdk/client-sfn";
|
|
2
|
+
import { DescribeExecutionCommand, ListExecutionsCommand, SFNClient, SFNServiceException, StartExecutionCommand } from "@aws-sdk/client-sfn";
|
|
3
|
+
import { type GenericRecord } from "@webiny/utils";
|
|
4
|
+
export { SFNClient, DescribeExecutionCommand, SFNServiceException, StartExecutionCommand, ListExecutionsCommand };
|
|
5
|
+
export type { DescribeExecutionCommandInput, DescribeExecutionCommandOutput, StartExecutionCommandInput, StartExecutionCommandOutput, ListExecutionsCommandInput, ListExecutionsCommandOutput };
|
|
6
|
+
export interface SFNClientConfig extends BaseSFNClientConfig {
|
|
7
|
+
cache?: boolean;
|
|
6
8
|
}
|
|
7
|
-
export interface TriggerStepFunctionParams<T extends
|
|
9
|
+
export interface TriggerStepFunctionParams<T extends GenericRecord = GenericRecord> extends Partial<Omit<StartExecutionCommandInput, "input">> {
|
|
8
10
|
input: T;
|
|
9
11
|
}
|
|
10
|
-
export declare const
|
|
12
|
+
export declare const createStepFunctionClient: (initial?: SFNClientConfig) => SFNClient;
|
|
13
|
+
export declare const triggerStepFunctionFactory: (input?: SFNClient | SFNClientConfig) => <T extends GenericRecord = GenericRecord>(params: TriggerStepFunctionParams<T>) => Promise<StartExecutionCommandOutput>;
|
|
14
|
+
export declare const listExecutionsFactory: (input?: SFNClient | SFNClientConfig) => (params: ListExecutionsCommandInput) => Promise<ListExecutionsCommandOutput>;
|
|
15
|
+
export declare const describeExecutionFactory: (input?: SFNClient | SFNClientConfig) => (params: DescribeExecutionCommandInput) => Promise<DescribeExecutionCommandOutput>;
|
package/client-sfn/index.js
CHANGED
|
@@ -1,49 +1,96 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "DescribeExecutionCommand", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _clientSfn.DescribeExecutionCommand;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "ListExecutionsCommand", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _clientSfn.ListExecutionsCommand;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
7
18
|
Object.defineProperty(exports, "SFNClient", {
|
|
8
19
|
enumerable: true,
|
|
9
|
-
get: function
|
|
20
|
+
get: function () {
|
|
10
21
|
return _clientSfn.SFNClient;
|
|
11
22
|
}
|
|
12
23
|
});
|
|
13
24
|
Object.defineProperty(exports, "SFNServiceException", {
|
|
14
25
|
enumerable: true,
|
|
15
|
-
get: function
|
|
26
|
+
get: function () {
|
|
16
27
|
return _clientSfn.SFNServiceException;
|
|
17
28
|
}
|
|
18
29
|
});
|
|
19
30
|
Object.defineProperty(exports, "StartExecutionCommand", {
|
|
20
31
|
enumerable: true,
|
|
21
|
-
get: function
|
|
32
|
+
get: function () {
|
|
22
33
|
return _clientSfn.StartExecutionCommand;
|
|
23
34
|
}
|
|
24
35
|
});
|
|
25
|
-
exports.triggerStepFunctionFactory = void 0;
|
|
26
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
36
|
+
exports.triggerStepFunctionFactory = exports.listExecutionsFactory = exports.describeExecutionFactory = exports.createStepFunctionClient = void 0;
|
|
27
37
|
var _clientSfn = require("@aws-sdk/client-sfn");
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
38
|
+
var _utils = require("@webiny/utils");
|
|
39
|
+
const stepFunctionClientsCache = new Map();
|
|
40
|
+
const createStepFunctionClient = initial => {
|
|
41
|
+
const config = {
|
|
42
|
+
region: process.env.AWS_REGION,
|
|
43
|
+
...initial
|
|
44
|
+
};
|
|
45
|
+
const skipCache = config.cache === false;
|
|
46
|
+
delete config.cache;
|
|
47
|
+
if (skipCache) {
|
|
48
|
+
return new _clientSfn.SFNClient({
|
|
49
|
+
...config
|
|
50
|
+
});
|
|
31
51
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
52
|
+
const key = (0, _utils.createCacheKey)(config);
|
|
53
|
+
if (stepFunctionClientsCache.has(key)) {
|
|
54
|
+
return stepFunctionClientsCache.get(key);
|
|
55
|
+
}
|
|
56
|
+
return new _clientSfn.SFNClient({
|
|
57
|
+
...config
|
|
58
|
+
});
|
|
35
59
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
60
|
+
exports.createStepFunctionClient = createStepFunctionClient;
|
|
61
|
+
const triggerStepFunctionFactory = input => {
|
|
62
|
+
const client = input instanceof _clientSfn.SFNClient ? input : createStepFunctionClient(input);
|
|
63
|
+
return async params => {
|
|
64
|
+
const cmd = new _clientSfn.StartExecutionCommand({
|
|
65
|
+
...params,
|
|
40
66
|
stateMachineArn: params.stateMachineArn || process.env.BG_TASK_SFN_ARN,
|
|
41
67
|
name: params.name,
|
|
42
68
|
input: JSON.stringify(params.input)
|
|
43
|
-
})
|
|
69
|
+
});
|
|
44
70
|
return await client.send(cmd);
|
|
45
71
|
};
|
|
46
72
|
};
|
|
47
73
|
exports.triggerStepFunctionFactory = triggerStepFunctionFactory;
|
|
74
|
+
const listExecutionsFactory = input => {
|
|
75
|
+
const client = input instanceof _clientSfn.SFNClient ? input : createStepFunctionClient(input);
|
|
76
|
+
return async params => {
|
|
77
|
+
const cmd = new _clientSfn.ListExecutionsCommand({
|
|
78
|
+
...params,
|
|
79
|
+
stateMachineArn: params.stateMachineArn || process.env.BG_TASK_SFN_ARN
|
|
80
|
+
});
|
|
81
|
+
return await client.send(cmd);
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
exports.listExecutionsFactory = listExecutionsFactory;
|
|
85
|
+
const describeExecutionFactory = input => {
|
|
86
|
+
const client = input instanceof _clientSfn.SFNClient ? input : createStepFunctionClient(input);
|
|
87
|
+
return async params => {
|
|
88
|
+
const cmd = new _clientSfn.DescribeExecutionCommand({
|
|
89
|
+
...params
|
|
90
|
+
});
|
|
91
|
+
return await client.send(cmd);
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
exports.describeExecutionFactory = describeExecutionFactory;
|
|
48
95
|
|
|
49
96
|
//# sourceMappingURL=index.js.map
|