@webiny/aws-sdk 5.43.2 → 6.0.0-alpha.0
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.js +19 -19
- package/client-cloudfront/index.js +1 -1
- package/client-cloudwatch/index.js +8 -8
- package/client-cognito-identity-provider/index.js +4 -4
- package/client-dynamodb/getDocumentClient.js +12 -11
- package/client-dynamodb/getDocumentClient.js.map +1 -1
- package/client-dynamodb/index.js +14 -14
- package/client-eventbridge/index.js +5 -5
- package/client-iam/index.js +1 -1
- package/client-iot/index.js +2 -2
- package/client-lambda/index.js +5 -5
- package/client-s3/index.js +46 -40
- package/client-s3/index.js.map +1 -1
- package/client-sfn/index.js +41 -30
- package/client-sfn/index.js.map +1 -1
- package/client-sqs/index.js +3 -3
- package/client-sts/index.js +1 -1
- package/credential-providers/index.js +1 -1
- package/lib-storage/index.js +6 -6
- package/package.json +4 -4
- package/types/index.js +1 -1
- package/types/index.js.map +1 -1
|
@@ -5,115 +5,115 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "ApiGatewayManagementApiClient", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _clientApigatewaymanagementapi.ApiGatewayManagementApiClient;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "DeleteConnectionCommand", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _clientApigatewaymanagementapi.DeleteConnectionCommand;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "DeleteConnectionCommandInput", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function
|
|
20
|
+
get: function () {
|
|
21
21
|
return _clientApigatewaymanagementapi.DeleteConnectionCommandInput;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "DeleteConnectionCommandOutput", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function
|
|
26
|
+
get: function () {
|
|
27
27
|
return _clientApigatewaymanagementapi.DeleteConnectionCommandOutput;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "DeleteConnectionRequest", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function
|
|
32
|
+
get: function () {
|
|
33
33
|
return _clientApigatewaymanagementapi.DeleteConnectionRequest;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "ForbiddenException", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function
|
|
38
|
+
get: function () {
|
|
39
39
|
return _clientApigatewaymanagementapi.ForbiddenException;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "GetConnectionCommand", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function
|
|
44
|
+
get: function () {
|
|
45
45
|
return _clientApigatewaymanagementapi.GetConnectionCommand;
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "GetConnectionCommandInput", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function
|
|
50
|
+
get: function () {
|
|
51
51
|
return _clientApigatewaymanagementapi.GetConnectionCommandInput;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "GetConnectionCommandOutput", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function
|
|
56
|
+
get: function () {
|
|
57
57
|
return _clientApigatewaymanagementapi.GetConnectionCommandOutput;
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "GetConnectionRequest", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function
|
|
62
|
+
get: function () {
|
|
63
63
|
return _clientApigatewaymanagementapi.GetConnectionRequest;
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "GetConnectionResponse", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function
|
|
68
|
+
get: function () {
|
|
69
69
|
return _clientApigatewaymanagementapi.GetConnectionResponse;
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "GoneException", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function
|
|
74
|
+
get: function () {
|
|
75
75
|
return _clientApigatewaymanagementapi.GoneException;
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
Object.defineProperty(exports, "LimitExceededException", {
|
|
79
79
|
enumerable: true,
|
|
80
|
-
get: function
|
|
80
|
+
get: function () {
|
|
81
81
|
return _clientApigatewaymanagementapi.LimitExceededException;
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "PayloadTooLargeException", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function
|
|
86
|
+
get: function () {
|
|
87
87
|
return _clientApigatewaymanagementapi.PayloadTooLargeException;
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
90
|
Object.defineProperty(exports, "PostToConnectionCommand", {
|
|
91
91
|
enumerable: true,
|
|
92
|
-
get: function
|
|
92
|
+
get: function () {
|
|
93
93
|
return _clientApigatewaymanagementapi.PostToConnectionCommand;
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "PostToConnectionCommandInput", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function
|
|
98
|
+
get: function () {
|
|
99
99
|
return _clientApigatewaymanagementapi.PostToConnectionCommandInput;
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
102
|
Object.defineProperty(exports, "PostToConnectionCommandInputType", {
|
|
103
103
|
enumerable: true,
|
|
104
|
-
get: function
|
|
104
|
+
get: function () {
|
|
105
105
|
return _clientApigatewaymanagementapi.PostToConnectionCommandInputType;
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
108
|
Object.defineProperty(exports, "PostToConnectionCommandOutput", {
|
|
109
109
|
enumerable: true,
|
|
110
|
-
get: function
|
|
110
|
+
get: function () {
|
|
111
111
|
return _clientApigatewaymanagementapi.PostToConnectionCommandOutput;
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
114
|
Object.defineProperty(exports, "PostToConnectionRequest", {
|
|
115
115
|
enumerable: true,
|
|
116
|
-
get: function
|
|
116
|
+
get: function () {
|
|
117
117
|
return _clientApigatewaymanagementapi.PostToConnectionRequest;
|
|
118
118
|
}
|
|
119
119
|
});
|
|
@@ -5,49 +5,49 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "CloudWatchEventsClient", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _clientCloudwatchEvents.CloudWatchEventsClient;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "CloudWatchLogs", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _clientCloudwatchLogs.CloudWatchLogs;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "DeleteRuleCommand", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function
|
|
20
|
+
get: function () {
|
|
21
21
|
return _clientCloudwatchEvents.DeleteRuleCommand;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "GetLogEventsRequest", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function
|
|
26
|
+
get: function () {
|
|
27
27
|
return _clientCloudwatchLogs.GetLogEventsRequest;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "PutRuleCommand", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function
|
|
32
|
+
get: function () {
|
|
33
33
|
return _clientCloudwatchEvents.PutRuleCommand;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "PutRuleCommandInput", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function
|
|
38
|
+
get: function () {
|
|
39
39
|
return _clientCloudwatchEvents.PutRuleCommandInput;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "PutTargetsCommand", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function
|
|
44
|
+
get: function () {
|
|
45
45
|
return _clientCloudwatchEvents.PutTargetsCommand;
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "RemoveTargetsCommand", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function
|
|
50
|
+
get: function () {
|
|
51
51
|
return _clientCloudwatchEvents.RemoveTargetsCommand;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
@@ -5,25 +5,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "AdminCreateUserRequest", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _clientCognitoIdentityProvider.AdminCreateUserRequest;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "CognitoIdentityProvider", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _clientCognitoIdentityProvider.CognitoIdentityProvider;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "ListUsersResponse", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function
|
|
20
|
+
get: function () {
|
|
21
21
|
return _clientCognitoIdentityProvider.ListUsersResponse;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "UserType", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function
|
|
26
|
+
get: function () {
|
|
27
27
|
return _clientCognitoIdentityProvider.UserType;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
@@ -8,36 +8,37 @@ exports.getDocumentClient = void 0;
|
|
|
8
8
|
var _clientDynamodb = require("@aws-sdk/client-dynamodb");
|
|
9
9
|
var _libDynamodb = require("@aws-sdk/lib-dynamodb");
|
|
10
10
|
var _crypto = _interopRequireDefault(require("crypto"));
|
|
11
|
-
|
|
11
|
+
const DEFAULT_CONFIG = {
|
|
12
12
|
region: process.env.AWS_REGION
|
|
13
13
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
const createKey = config => {
|
|
15
|
+
const key = JSON.stringify(config);
|
|
16
|
+
const hash = _crypto.default.createHash("sha1");
|
|
17
17
|
hash.update(key);
|
|
18
18
|
return hash.digest("hex");
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
const documentClients = {};
|
|
21
21
|
/**
|
|
22
22
|
* We do not want users to be able to change these options, so we are not exposing them.
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
const documentClientConfig = {
|
|
25
25
|
marshallOptions: {
|
|
26
26
|
convertEmptyValues: true,
|
|
27
27
|
removeUndefinedValues: true,
|
|
28
28
|
convertClassInstanceToMap: true
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
const getDocumentClient = input => {
|
|
32
|
+
const config = input || DEFAULT_CONFIG;
|
|
33
|
+
const key = createKey(config);
|
|
34
34
|
if (documentClients[key]) {
|
|
35
35
|
return documentClients[key];
|
|
36
36
|
}
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
const client = new _clientDynamodb.DynamoDBClient(config);
|
|
38
|
+
const documentClient = _libDynamodb.DynamoDBDocument.from(client, documentClientConfig);
|
|
39
39
|
documentClients[key] = documentClient;
|
|
40
40
|
return documentClient;
|
|
41
41
|
};
|
|
42
|
+
exports.getDocumentClient = getDocumentClient;
|
|
42
43
|
|
|
43
44
|
//# sourceMappingURL=getDocumentClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clientDynamodb","require","_libDynamodb","_crypto","_interopRequireDefault","DEFAULT_CONFIG","region","process","env","AWS_REGION","createKey","config","key","JSON","stringify","hash","crypto","createHash","update","digest","documentClients","documentClientConfig","marshallOptions","convertEmptyValues","removeUndefinedValues","convertClassInstanceToMap","getDocumentClient","
|
|
1
|
+
{"version":3,"names":["_clientDynamodb","require","_libDynamodb","_crypto","_interopRequireDefault","DEFAULT_CONFIG","region","process","env","AWS_REGION","createKey","config","key","JSON","stringify","hash","crypto","createHash","update","digest","documentClients","documentClientConfig","marshallOptions","convertEmptyValues","removeUndefinedValues","convertClassInstanceToMap","getDocumentClient","input","client","DynamoDBClient","documentClient","DynamoDBDocument","from","exports"],"sources":["getDocumentClient.ts"],"sourcesContent":["import { DynamoDBClient, DynamoDBClientConfig } from \"@aws-sdk/client-dynamodb\";\nimport { DynamoDBDocument, TranslateConfig } from \"@aws-sdk/lib-dynamodb\";\nimport crypto from \"crypto\";\n\nconst DEFAULT_CONFIG = {\n region: process.env.AWS_REGION\n};\n\nconst createKey = (config: DynamoDBClientConfig): string => {\n const key = JSON.stringify(config);\n const hash = crypto.createHash(\"sha1\");\n hash.update(key);\n return hash.digest(\"hex\");\n};\n\nconst documentClients: Record<string, DynamoDBDocument> = {};\n/**\n * We do not want users to be able to change these options, so we are not exposing them.\n */\nconst documentClientConfig: TranslateConfig = {\n marshallOptions: {\n convertEmptyValues: true,\n removeUndefinedValues: true,\n convertClassInstanceToMap: true\n }\n};\n\nexport const getDocumentClient = (input?: DynamoDBClientConfig): DynamoDBDocument => {\n const config = input || DEFAULT_CONFIG;\n const key = createKey(config);\n if (documentClients[key]) {\n return documentClients[key];\n }\n const client = new DynamoDBClient(config);\n\n const documentClient = DynamoDBDocument.from(client, documentClientConfig);\n\n documentClients[key] = documentClient;\n return documentClient;\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,MAAMI,cAAc,GAAG;EACnBC,MAAM,EAAEC,OAAO,CAACC,GAAG,CAACC;AACxB,CAAC;AAED,MAAMC,SAAS,GAAIC,MAA4B,IAAa;EACxD,MAAMC,GAAG,GAAGC,IAAI,CAACC,SAAS,CAACH,MAAM,CAAC;EAClC,MAAMI,IAAI,GAAGC,eAAM,CAACC,UAAU,CAAC,MAAM,CAAC;EACtCF,IAAI,CAACG,MAAM,CAACN,GAAG,CAAC;EAChB,OAAOG,IAAI,CAACI,MAAM,CAAC,KAAK,CAAC;AAC7B,CAAC;AAED,MAAMC,eAAiD,GAAG,CAAC,CAAC;AAC5D;AACA;AACA;AACA,MAAMC,oBAAqC,GAAG;EAC1CC,eAAe,EAAE;IACbC,kBAAkB,EAAE,IAAI;IACxBC,qBAAqB,EAAE,IAAI;IAC3BC,yBAAyB,EAAE;EAC/B;AACJ,CAAC;AAEM,MAAMC,iBAAiB,GAAIC,KAA4B,IAAuB;EACjF,MAAMhB,MAAM,GAAGgB,KAAK,IAAItB,cAAc;EACtC,MAAMO,GAAG,GAAGF,SAAS,CAACC,MAAM,CAAC;EAC7B,IAAIS,eAAe,CAACR,GAAG,CAAC,EAAE;IACtB,OAAOQ,eAAe,CAACR,GAAG,CAAC;EAC/B;EACA,MAAMgB,MAAM,GAAG,IAAIC,8BAAc,CAAClB,MAAM,CAAC;EAEzC,MAAMmB,cAAc,GAAGC,6BAAgB,CAACC,IAAI,CAACJ,MAAM,EAAEP,oBAAoB,CAAC;EAE1ED,eAAe,CAACR,GAAG,CAAC,GAAGkB,cAAc;EACrC,OAAOA,cAAc;AACzB,CAAC;AAACG,OAAA,CAAAP,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
package/client-dynamodb/index.js
CHANGED
|
@@ -5,85 +5,85 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "BatchWriteCommand", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _libDynamodb.BatchWriteCommand;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "DeleteCommand", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _libDynamodb.DeleteCommand;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "DynamoDBDocument", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function
|
|
20
|
+
get: function () {
|
|
21
21
|
return _libDynamodb.DynamoDBDocument;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "GetCommand", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function
|
|
26
|
+
get: function () {
|
|
27
27
|
return _libDynamodb.GetCommand;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "GetCommandOutput", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function
|
|
32
|
+
get: function () {
|
|
33
33
|
return _libDynamodb.GetCommandOutput;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "PutCommand", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function
|
|
38
|
+
get: function () {
|
|
39
39
|
return _libDynamodb.PutCommand;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "QueryCommand", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function
|
|
44
|
+
get: function () {
|
|
45
45
|
return _clientDynamodb.QueryCommand;
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "ScanInput", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function
|
|
50
|
+
get: function () {
|
|
51
51
|
return _clientDynamodb.ScanInput;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "ScanOutput", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function
|
|
56
|
+
get: function () {
|
|
57
57
|
return _clientDynamodb.ScanOutput;
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "UpdateCommand", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function
|
|
62
|
+
get: function () {
|
|
63
63
|
return _libDynamodb.UpdateCommand;
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "WriteRequest", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function
|
|
68
|
+
get: function () {
|
|
69
69
|
return _clientDynamodb.WriteRequest;
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "getDocumentClient", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function
|
|
74
|
+
get: function () {
|
|
75
75
|
return _getDocumentClient.getDocumentClient;
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
Object.defineProperty(exports, "marshall", {
|
|
79
79
|
enumerable: true,
|
|
80
|
-
get: function
|
|
80
|
+
get: function () {
|
|
81
81
|
return _utilDynamodb.marshall;
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "unmarshall", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function
|
|
86
|
+
get: function () {
|
|
87
87
|
return _utilDynamodb.unmarshall;
|
|
88
88
|
}
|
|
89
89
|
});
|
|
@@ -5,31 +5,31 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "EventBridgeClient", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _clientEventbridge.EventBridgeClient;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "PutEventsCommand", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _clientEventbridge.PutEventsCommand;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "PutEventsCommandInput", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function
|
|
20
|
+
get: function () {
|
|
21
21
|
return _clientEventbridge.PutEventsCommandInput;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "PutEventsCommandOutput", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function
|
|
26
|
+
get: function () {
|
|
27
27
|
return _clientEventbridge.PutEventsCommandOutput;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "PutEventsRequestEntry", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function
|
|
32
|
+
get: function () {
|
|
33
33
|
return _clientEventbridge.PutEventsRequestEntry;
|
|
34
34
|
}
|
|
35
35
|
});
|
package/client-iam/index.js
CHANGED
package/client-iot/index.js
CHANGED
|
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "DescribeEndpointCommand", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _clientIot.DescribeEndpointCommand;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "IoTClient", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _clientIot.IoTClient;
|
|
16
16
|
}
|
|
17
17
|
});
|
package/client-lambda/index.js
CHANGED
|
@@ -5,31 +5,31 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "GetFunctionConfigurationCommand", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _clientLambda.GetFunctionConfigurationCommand;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "InvokeCommand", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _clientLambda.InvokeCommand;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "LambdaClient", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function
|
|
20
|
+
get: function () {
|
|
21
21
|
return _clientLambda.LambdaClient;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "UpdateFunctionCodeCommand", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function
|
|
26
|
+
get: function () {
|
|
27
27
|
return _clientLambda.UpdateFunctionCodeCommand;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "UpdateFunctionConfigurationCommand", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function
|
|
32
|
+
get: function () {
|
|
33
33
|
return _clientLambda.UpdateFunctionConfigurationCommand;
|
|
34
34
|
}
|
|
35
35
|
});
|
package/client-s3/index.js
CHANGED
|
@@ -1,176 +1,182 @@
|
|
|
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
6
|
Object.defineProperty(exports, "AbortMultipartUploadCommand", {
|
|
8
7
|
enumerable: true,
|
|
9
|
-
get: function
|
|
8
|
+
get: function () {
|
|
10
9
|
return _clientS.AbortMultipartUploadCommand;
|
|
11
10
|
}
|
|
12
11
|
});
|
|
13
12
|
Object.defineProperty(exports, "CompleteMultipartUploadCommand", {
|
|
14
13
|
enumerable: true,
|
|
15
|
-
get: function
|
|
14
|
+
get: function () {
|
|
16
15
|
return _clientS.CompleteMultipartUploadCommand;
|
|
17
16
|
}
|
|
18
17
|
});
|
|
19
18
|
Object.defineProperty(exports, "CreateMultipartUploadCommand", {
|
|
20
19
|
enumerable: true,
|
|
21
|
-
get: function
|
|
20
|
+
get: function () {
|
|
22
21
|
return _clientS.CreateMultipartUploadCommand;
|
|
23
22
|
}
|
|
24
23
|
});
|
|
25
24
|
Object.defineProperty(exports, "DeleteObjectCommand", {
|
|
26
25
|
enumerable: true,
|
|
27
|
-
get: function
|
|
26
|
+
get: function () {
|
|
28
27
|
return _clientS.DeleteObjectCommand;
|
|
29
28
|
}
|
|
30
29
|
});
|
|
31
30
|
Object.defineProperty(exports, "GetObjectCommand", {
|
|
32
31
|
enumerable: true,
|
|
33
|
-
get: function
|
|
32
|
+
get: function () {
|
|
34
33
|
return _clientS.GetObjectCommand;
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
36
|
Object.defineProperty(exports, "HeadObjectCommand", {
|
|
38
37
|
enumerable: true,
|
|
39
|
-
get: function
|
|
38
|
+
get: function () {
|
|
40
39
|
return _clientS.HeadObjectCommand;
|
|
41
40
|
}
|
|
42
41
|
});
|
|
43
42
|
Object.defineProperty(exports, "ListObjectsCommand", {
|
|
44
43
|
enumerable: true,
|
|
45
|
-
get: function
|
|
44
|
+
get: function () {
|
|
46
45
|
return _clientS.ListObjectsCommand;
|
|
47
46
|
}
|
|
48
47
|
});
|
|
49
48
|
Object.defineProperty(exports, "ListObjectsV2Command", {
|
|
50
49
|
enumerable: true,
|
|
51
|
-
get: function
|
|
50
|
+
get: function () {
|
|
52
51
|
return _clientS.ListObjectsV2Command;
|
|
53
52
|
}
|
|
54
53
|
});
|
|
55
54
|
Object.defineProperty(exports, "ListPartsCommand", {
|
|
56
55
|
enumerable: true,
|
|
57
|
-
get: function
|
|
56
|
+
get: function () {
|
|
58
57
|
return _clientS.ListPartsCommand;
|
|
59
58
|
}
|
|
60
59
|
});
|
|
61
60
|
Object.defineProperty(exports, "ObjectCannedACL", {
|
|
62
61
|
enumerable: true,
|
|
63
|
-
get: function
|
|
62
|
+
get: function () {
|
|
64
63
|
return _clientS.ObjectCannedACL;
|
|
65
64
|
}
|
|
66
65
|
});
|
|
67
66
|
Object.defineProperty(exports, "Part", {
|
|
68
67
|
enumerable: true,
|
|
69
|
-
get: function
|
|
68
|
+
get: function () {
|
|
70
69
|
return _clientS.Part;
|
|
71
70
|
}
|
|
72
71
|
});
|
|
73
72
|
Object.defineProperty(exports, "PresignedPost", {
|
|
74
73
|
enumerable: true,
|
|
75
|
-
get: function
|
|
74
|
+
get: function () {
|
|
76
75
|
return _s3PresignedPost.PresignedPost;
|
|
77
76
|
}
|
|
78
77
|
});
|
|
79
78
|
Object.defineProperty(exports, "PresignedPostOptions", {
|
|
80
79
|
enumerable: true,
|
|
81
|
-
get: function
|
|
80
|
+
get: function () {
|
|
82
81
|
return _s3PresignedPost.PresignedPostOptions;
|
|
83
82
|
}
|
|
84
83
|
});
|
|
85
84
|
Object.defineProperty(exports, "PutObjectCommand", {
|
|
86
85
|
enumerable: true,
|
|
87
|
-
get: function
|
|
86
|
+
get: function () {
|
|
88
87
|
return _clientS.PutObjectCommand;
|
|
89
88
|
}
|
|
90
89
|
});
|
|
91
90
|
Object.defineProperty(exports, "PutObjectCommandInput", {
|
|
92
91
|
enumerable: true,
|
|
93
|
-
get: function
|
|
92
|
+
get: function () {
|
|
94
93
|
return _clientS.PutObjectCommandInput;
|
|
95
94
|
}
|
|
96
95
|
});
|
|
97
96
|
Object.defineProperty(exports, "PutObjectRequest", {
|
|
98
97
|
enumerable: true,
|
|
99
|
-
get: function
|
|
98
|
+
get: function () {
|
|
100
99
|
return _clientS.PutObjectRequest;
|
|
101
100
|
}
|
|
102
101
|
});
|
|
103
102
|
Object.defineProperty(exports, "S3", {
|
|
104
103
|
enumerable: true,
|
|
105
|
-
get: function
|
|
104
|
+
get: function () {
|
|
106
105
|
return _clientS.S3;
|
|
107
106
|
}
|
|
108
107
|
});
|
|
109
108
|
Object.defineProperty(exports, "S3Client", {
|
|
110
109
|
enumerable: true,
|
|
111
|
-
get: function
|
|
110
|
+
get: function () {
|
|
112
111
|
return _clientS.S3Client;
|
|
113
112
|
}
|
|
114
113
|
});
|
|
115
114
|
Object.defineProperty(exports, "UploadPartCommand", {
|
|
116
115
|
enumerable: true,
|
|
117
|
-
get: function
|
|
116
|
+
get: function () {
|
|
118
117
|
return _clientS.UploadPartCommand;
|
|
119
118
|
}
|
|
120
119
|
});
|
|
121
120
|
Object.defineProperty(exports, "createPresignedPost", {
|
|
122
121
|
enumerable: true,
|
|
123
|
-
get: function
|
|
122
|
+
get: function () {
|
|
124
123
|
return _s3PresignedPost.createPresignedPost;
|
|
125
124
|
}
|
|
126
125
|
});
|
|
127
126
|
exports.createS3Client = exports.createS3 = void 0;
|
|
128
127
|
Object.defineProperty(exports, "getSignedUrl", {
|
|
129
128
|
enumerable: true,
|
|
130
|
-
get: function
|
|
129
|
+
get: function () {
|
|
131
130
|
return _s3RequestPresigner.getSignedUrl;
|
|
132
131
|
}
|
|
133
132
|
});
|
|
134
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
135
133
|
var _clientS = require("@aws-sdk/client-s3");
|
|
136
134
|
var _utils = require("@webiny/utils");
|
|
137
135
|
var _s3PresignedPost = require("@aws-sdk/s3-presigned-post");
|
|
138
136
|
var _s3RequestPresigner = require("@aws-sdk/s3-request-presigner");
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
region: process.env.AWS_REGION
|
|
143
|
-
|
|
144
|
-
|
|
137
|
+
const s3ClientsCache = new Map();
|
|
138
|
+
const createS3Client = initial => {
|
|
139
|
+
const options = {
|
|
140
|
+
region: process.env.AWS_REGION,
|
|
141
|
+
...initial
|
|
142
|
+
};
|
|
143
|
+
const skipCache = options.cache === false;
|
|
145
144
|
delete options.cache;
|
|
146
145
|
if (skipCache) {
|
|
147
|
-
return new _clientS.S3Client(
|
|
146
|
+
return new _clientS.S3Client({
|
|
147
|
+
...options
|
|
148
|
+
});
|
|
148
149
|
}
|
|
149
|
-
|
|
150
|
+
const key = (0, _utils.createCacheKey)(options);
|
|
150
151
|
if (s3ClientsCache.has(key)) {
|
|
151
152
|
return s3ClientsCache.get(key);
|
|
152
153
|
}
|
|
153
|
-
|
|
154
|
+
const instance = new _clientS.S3Client({
|
|
155
|
+
...options
|
|
156
|
+
});
|
|
154
157
|
s3ClientsCache.set(key, instance);
|
|
155
158
|
return instance;
|
|
156
159
|
};
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
exports.createS3Client = createS3Client;
|
|
161
|
+
const s3Cache = new Map();
|
|
162
|
+
const createS3 = initial => {
|
|
163
|
+
const options = {
|
|
164
|
+
region: process.env.AWS_REGION,
|
|
165
|
+
...initial
|
|
166
|
+
};
|
|
167
|
+
const skipCache = options.cache === false;
|
|
163
168
|
delete options.cache;
|
|
164
169
|
if (skipCache) {
|
|
165
170
|
return new _clientS.S3(options);
|
|
166
171
|
}
|
|
167
|
-
|
|
172
|
+
const key = (0, _utils.createCacheKey)(options);
|
|
168
173
|
if (s3Cache.has(key)) {
|
|
169
174
|
return s3Cache.get(key);
|
|
170
175
|
}
|
|
171
|
-
|
|
176
|
+
const instance = new _clientS.S3(options);
|
|
172
177
|
s3Cache.set(key, instance);
|
|
173
178
|
return instance;
|
|
174
179
|
};
|
|
180
|
+
exports.createS3 = createS3;
|
|
175
181
|
|
|
176
182
|
//# sourceMappingURL=index.js.map
|
package/client-s3/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clientS","require","_utils","_s3PresignedPost","_s3RequestPresigner","s3ClientsCache","Map","createS3Client","
|
|
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 { S3, S3Client, S3ClientConfig as BaseS3ClientConfig } from \"@aws-sdk/client-s3\";\nimport { createCacheKey } from \"@webiny/utils\";\n\nexport {\n GetObjectCommand,\n HeadObjectCommand,\n ListObjectsCommand,\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 CompleteMultipartUploadCommandOutput,\n AbortMultipartUploadCommandOutput,\n CompleteMultipartUploadOutput,\n DeleteObjectOutput,\n GetObjectOutput,\n GetObjectCommandOutput,\n HeadObjectOutput,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAuCA,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":[]}
|
package/client-sfn/index.js
CHANGED
|
@@ -1,85 +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
|
});
|
|
7
6
|
Object.defineProperty(exports, "DescribeExecutionCommand", {
|
|
8
7
|
enumerable: true,
|
|
9
|
-
get: function
|
|
8
|
+
get: function () {
|
|
10
9
|
return _clientSfn.DescribeExecutionCommand;
|
|
11
10
|
}
|
|
12
11
|
});
|
|
13
12
|
Object.defineProperty(exports, "ListExecutionsCommand", {
|
|
14
13
|
enumerable: true,
|
|
15
|
-
get: function
|
|
14
|
+
get: function () {
|
|
16
15
|
return _clientSfn.ListExecutionsCommand;
|
|
17
16
|
}
|
|
18
17
|
});
|
|
19
18
|
Object.defineProperty(exports, "SFNClient", {
|
|
20
19
|
enumerable: true,
|
|
21
|
-
get: function
|
|
20
|
+
get: function () {
|
|
22
21
|
return _clientSfn.SFNClient;
|
|
23
22
|
}
|
|
24
23
|
});
|
|
25
24
|
Object.defineProperty(exports, "SFNServiceException", {
|
|
26
25
|
enumerable: true,
|
|
27
|
-
get: function
|
|
26
|
+
get: function () {
|
|
28
27
|
return _clientSfn.SFNServiceException;
|
|
29
28
|
}
|
|
30
29
|
});
|
|
31
30
|
Object.defineProperty(exports, "StartExecutionCommand", {
|
|
32
31
|
enumerable: true,
|
|
33
|
-
get: function
|
|
32
|
+
get: function () {
|
|
34
33
|
return _clientSfn.StartExecutionCommand;
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
36
|
exports.triggerStepFunctionFactory = exports.listExecutionsFactory = exports.describeExecutionFactory = exports.createStepFunctionClient = void 0;
|
|
38
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
39
37
|
var _clientSfn = require("@aws-sdk/client-sfn");
|
|
40
38
|
var _utils = require("@webiny/utils");
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
region: process.env.AWS_REGION
|
|
45
|
-
|
|
46
|
-
|
|
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;
|
|
47
46
|
delete config.cache;
|
|
48
47
|
if (skipCache) {
|
|
49
|
-
return new _clientSfn.SFNClient(
|
|
48
|
+
return new _clientSfn.SFNClient({
|
|
49
|
+
...config
|
|
50
|
+
});
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
+
const key = (0, _utils.createCacheKey)(config);
|
|
52
53
|
if (stepFunctionClientsCache.has(key)) {
|
|
53
54
|
return stepFunctionClientsCache.get(key);
|
|
54
55
|
}
|
|
55
|
-
return new _clientSfn.SFNClient(
|
|
56
|
+
return new _clientSfn.SFNClient({
|
|
57
|
+
...config
|
|
58
|
+
});
|
|
56
59
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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,
|
|
61
66
|
stateMachineArn: params.stateMachineArn || process.env.BG_TASK_SFN_ARN,
|
|
62
67
|
name: params.name,
|
|
63
68
|
input: JSON.stringify(params.input)
|
|
64
|
-
})
|
|
69
|
+
});
|
|
65
70
|
return await client.send(cmd);
|
|
66
71
|
};
|
|
67
72
|
};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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,
|
|
72
79
|
stateMachineArn: params.stateMachineArn || process.env.BG_TASK_SFN_ARN
|
|
73
|
-
})
|
|
80
|
+
});
|
|
74
81
|
return await client.send(cmd);
|
|
75
82
|
};
|
|
76
83
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
+
});
|
|
81
91
|
return await client.send(cmd);
|
|
82
92
|
};
|
|
83
93
|
};
|
|
94
|
+
exports.describeExecutionFactory = describeExecutionFactory;
|
|
84
95
|
|
|
85
96
|
//# sourceMappingURL=index.js.map
|
package/client-sfn/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clientSfn","require","_utils","stepFunctionClientsCache","Map","createStepFunctionClient","
|
|
1
|
+
{"version":3,"names":["_clientSfn","require","_utils","stepFunctionClientsCache","Map","createStepFunctionClient","initial","config","region","process","env","AWS_REGION","skipCache","cache","SFNClient","key","createCacheKey","has","get","exports","triggerStepFunctionFactory","input","client","params","cmd","StartExecutionCommand","stateMachineArn","BG_TASK_SFN_ARN","name","JSON","stringify","send","listExecutionsFactory","ListExecutionsCommand","describeExecutionFactory","DescribeExecutionCommand"],"sources":["index.ts"],"sourcesContent":["import type {\n DescribeExecutionCommandInput,\n DescribeExecutionCommandOutput,\n ListExecutionsCommandInput,\n ListExecutionsCommandOutput,\n SFNClientConfig as BaseSFNClientConfig,\n StartExecutionCommandInput,\n StartExecutionCommandOutput\n} from \"@aws-sdk/client-sfn\";\nimport {\n DescribeExecutionCommand,\n ListExecutionsCommand,\n SFNClient,\n SFNServiceException,\n StartExecutionCommand\n} from \"@aws-sdk/client-sfn\";\nimport { createCacheKey, type GenericRecord } from \"@webiny/utils\";\n\nexport {\n SFNClient,\n DescribeExecutionCommand,\n SFNServiceException,\n StartExecutionCommand,\n ListExecutionsCommand\n};\n\nexport type {\n DescribeExecutionCommandInput,\n DescribeExecutionCommandOutput,\n StartExecutionCommandInput,\n StartExecutionCommandOutput,\n ListExecutionsCommandInput,\n ListExecutionsCommandOutput\n};\n\nexport interface SFNClientConfig extends BaseSFNClientConfig {\n cache?: boolean;\n}\n\nexport interface TriggerStepFunctionParams<T extends GenericRecord = GenericRecord>\n extends Partial<Omit<StartExecutionCommandInput, \"input\">> {\n input: T;\n}\n\nconst stepFunctionClientsCache = new Map<string, SFNClient>();\n\nexport const createStepFunctionClient = (initial?: SFNClientConfig): SFNClient => {\n const config: SFNClientConfig = {\n region: process.env.AWS_REGION,\n ...initial\n };\n const skipCache = config.cache === false;\n delete config.cache;\n if (skipCache) {\n return new SFNClient({\n ...config\n });\n }\n\n const key = createCacheKey(config);\n if (stepFunctionClientsCache.has(key)) {\n return stepFunctionClientsCache.get(key) as SFNClient;\n }\n\n return new SFNClient({\n ...config\n });\n};\n\nexport const triggerStepFunctionFactory = (input?: SFNClient | SFNClientConfig) => {\n const client = input instanceof SFNClient ? input : createStepFunctionClient(input);\n return async <T extends GenericRecord = GenericRecord>(\n params: TriggerStepFunctionParams<T>\n ): Promise<StartExecutionCommandOutput> => {\n const cmd = new StartExecutionCommand({\n ...params,\n stateMachineArn: params.stateMachineArn || process.env.BG_TASK_SFN_ARN,\n name: params.name,\n input: JSON.stringify(params.input)\n });\n return await client.send(cmd);\n };\n};\n\nexport const listExecutionsFactory = (input?: SFNClient | SFNClientConfig) => {\n const client = input instanceof SFNClient ? input : createStepFunctionClient(input);\n return async (params: ListExecutionsCommandInput): Promise<ListExecutionsCommandOutput> => {\n const cmd = new ListExecutionsCommand({\n ...params,\n stateMachineArn: params.stateMachineArn || process.env.BG_TASK_SFN_ARN\n });\n return await client.send(cmd);\n };\n};\n\nexport const describeExecutionFactory = (input?: SFNClient | SFNClientConfig) => {\n const client = input instanceof SFNClient ? input : createStepFunctionClient(input);\n return async (\n params: DescribeExecutionCommandInput\n ): Promise<DescribeExecutionCommandOutput> => {\n const cmd = new DescribeExecutionCommand({\n ...params\n });\n return await client.send(cmd);\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAAA,UAAA,GAAAC,OAAA;AAOA,IAAAC,MAAA,GAAAD,OAAA;AA4BA,MAAME,wBAAwB,GAAG,IAAIC,GAAG,CAAoB,CAAC;AAEtD,MAAMC,wBAAwB,GAAIC,OAAyB,IAAgB;EAC9E,MAAMC,MAAuB,GAAG;IAC5BC,MAAM,EAAEC,OAAO,CAACC,GAAG,CAACC,UAAU;IAC9B,GAAGL;EACP,CAAC;EACD,MAAMM,SAAS,GAAGL,MAAM,CAACM,KAAK,KAAK,KAAK;EACxC,OAAON,MAAM,CAACM,KAAK;EACnB,IAAID,SAAS,EAAE;IACX,OAAO,IAAIE,oBAAS,CAAC;MACjB,GAAGP;IACP,CAAC,CAAC;EACN;EAEA,MAAMQ,GAAG,GAAG,IAAAC,qBAAc,EAACT,MAAM,CAAC;EAClC,IAAIJ,wBAAwB,CAACc,GAAG,CAACF,GAAG,CAAC,EAAE;IACnC,OAAOZ,wBAAwB,CAACe,GAAG,CAACH,GAAG,CAAC;EAC5C;EAEA,OAAO,IAAID,oBAAS,CAAC;IACjB,GAAGP;EACP,CAAC,CAAC;AACN,CAAC;AAACY,OAAA,CAAAd,wBAAA,GAAAA,wBAAA;AAEK,MAAMe,0BAA0B,GAAIC,KAAmC,IAAK;EAC/E,MAAMC,MAAM,GAAGD,KAAK,YAAYP,oBAAS,GAAGO,KAAK,GAAGhB,wBAAwB,CAACgB,KAAK,CAAC;EACnF,OAAO,MACHE,MAAoC,IACG;IACvC,MAAMC,GAAG,GAAG,IAAIC,gCAAqB,CAAC;MAClC,GAAGF,MAAM;MACTG,eAAe,EAAEH,MAAM,CAACG,eAAe,IAAIjB,OAAO,CAACC,GAAG,CAACiB,eAAe;MACtEC,IAAI,EAAEL,MAAM,CAACK,IAAI;MACjBP,KAAK,EAAEQ,IAAI,CAACC,SAAS,CAACP,MAAM,CAACF,KAAK;IACtC,CAAC,CAAC;IACF,OAAO,MAAMC,MAAM,CAACS,IAAI,CAACP,GAAG,CAAC;EACjC,CAAC;AACL,CAAC;AAACL,OAAA,CAAAC,0BAAA,GAAAA,0BAAA;AAEK,MAAMY,qBAAqB,GAAIX,KAAmC,IAAK;EAC1E,MAAMC,MAAM,GAAGD,KAAK,YAAYP,oBAAS,GAAGO,KAAK,GAAGhB,wBAAwB,CAACgB,KAAK,CAAC;EACnF,OAAO,MAAOE,MAAkC,IAA2C;IACvF,MAAMC,GAAG,GAAG,IAAIS,gCAAqB,CAAC;MAClC,GAAGV,MAAM;MACTG,eAAe,EAAEH,MAAM,CAACG,eAAe,IAAIjB,OAAO,CAACC,GAAG,CAACiB;IAC3D,CAAC,CAAC;IACF,OAAO,MAAML,MAAM,CAACS,IAAI,CAACP,GAAG,CAAC;EACjC,CAAC;AACL,CAAC;AAACL,OAAA,CAAAa,qBAAA,GAAAA,qBAAA;AAEK,MAAME,wBAAwB,GAAIb,KAAmC,IAAK;EAC7E,MAAMC,MAAM,GAAGD,KAAK,YAAYP,oBAAS,GAAGO,KAAK,GAAGhB,wBAAwB,CAACgB,KAAK,CAAC;EACnF,OAAO,MACHE,MAAqC,IACK;IAC1C,MAAMC,GAAG,GAAG,IAAIW,mCAAwB,CAAC;MACrC,GAAGZ;IACP,CAAC,CAAC;IACF,OAAO,MAAMD,MAAM,CAACS,IAAI,CAACP,GAAG,CAAC;EACjC,CAAC;AACL,CAAC;AAACL,OAAA,CAAAe,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
package/client-sqs/index.js
CHANGED
|
@@ -5,19 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "SQSClient", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _clientSqs.SQSClient;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "SendMessageBatchCommand", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _clientSqs.SendMessageBatchCommand;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "SendMessageBatchRequestEntry", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function
|
|
20
|
+
get: function () {
|
|
21
21
|
return _clientSqs.SendMessageBatchRequestEntry;
|
|
22
22
|
}
|
|
23
23
|
});
|
package/client-sts/index.js
CHANGED
package/lib-storage/index.js
CHANGED
|
@@ -5,37 +5,37 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "BodyDataTypes", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _libStorage.BodyDataTypes;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "Configuration", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _libStorage.Configuration;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "Options", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function
|
|
20
|
+
get: function () {
|
|
21
21
|
return _libStorage.Options;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "Progress", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function
|
|
26
|
+
get: function () {
|
|
27
27
|
return _libStorage.Progress;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "RawDataPart", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function
|
|
32
|
+
get: function () {
|
|
33
33
|
return _libStorage.RawDataPart;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "Upload", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function
|
|
38
|
+
get: function () {
|
|
39
39
|
return _libStorage.Upload;
|
|
40
40
|
}
|
|
41
41
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/aws-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-alpha.0",
|
|
4
4
|
"description": "Wrapper for AWS SDK",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"@aws-sdk/s3-request-presigner": "3.735.0",
|
|
29
29
|
"@aws-sdk/util-dynamodb": "3.734.0",
|
|
30
30
|
"@types/aws-lambda": "8.10.145",
|
|
31
|
-
"@webiny/utils": "
|
|
31
|
+
"@webiny/utils": "6.0.0-alpha.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@webiny/project-utils": "
|
|
34
|
+
"@webiny/project-utils": "6.0.0-alpha.0",
|
|
35
35
|
"rimraf": "6.0.1",
|
|
36
36
|
"typescript": "5.3.3"
|
|
37
37
|
},
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
]
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "a5b28fed7a242d8f56712197a8ea83aa6d2ed101"
|
|
57
57
|
}
|
package/types/index.js
CHANGED
package/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_awsLambda","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["index.ts"],"sourcesContent":["export * from \"aws-lambda\";\n"],"mappings":";;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,UAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,UAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,
|
|
1
|
+
{"version":3,"names":["_awsLambda","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["index.ts"],"sourcesContent":["export * from \"aws-lambda\";\n"],"mappings":";;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,UAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,UAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,UAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|