@allthings/cloud-toolkit 4.0.0 → 4.2.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/dist/lib.cjs.js +4 -8
- package/dist/lib.esm.js +4 -8
- package/dist/src/aws/dynamodb.d.ts +3 -2
- package/dist/src/aws/index.d.ts +5 -5
- package/dist/src/aws/lambda.d.ts +3 -2
- package/dist/src/aws/parameterStore.d.ts +3 -2
- package/dist/src/aws/ses.d.ts +3 -2
- package/dist/src/aws/sqs.d.ts +3 -2
- package/dist/src/index.d.ts +1 -1
- package/package.json +18 -18
package/dist/lib.cjs.js
CHANGED
|
@@ -813,8 +813,7 @@ const scanTable = async (config, documentClient, table, options = {}) => {
|
|
|
813
813
|
ConsistentRead,
|
|
814
814
|
TableName: config.tableNamePrefix + table,
|
|
815
815
|
});
|
|
816
|
-
|
|
817
|
-
return result;
|
|
816
|
+
return await queue.schedule(() => documentClient.send(command));
|
|
818
817
|
}
|
|
819
818
|
catch (error) {
|
|
820
819
|
if (config.logger) {
|
|
@@ -831,8 +830,7 @@ const queryTable = async (config, documentClient, table, options = {}) => {
|
|
|
831
830
|
ConsistentRead,
|
|
832
831
|
TableName: config.tableNamePrefix + table,
|
|
833
832
|
});
|
|
834
|
-
|
|
835
|
-
return result;
|
|
833
|
+
return await queue.schedule(() => documentClient.send(command));
|
|
836
834
|
}
|
|
837
835
|
catch (error) {
|
|
838
836
|
if (config.logger) {
|
|
@@ -1025,8 +1023,7 @@ const deleteQueueItem = async (sqsClient, config, queueUrl, receiptHandle) => {
|
|
|
1025
1023
|
QueueUrl: queueUrl,
|
|
1026
1024
|
ReceiptHandle: receiptHandle,
|
|
1027
1025
|
});
|
|
1028
|
-
|
|
1029
|
-
return result;
|
|
1026
|
+
return await sqsClient.send(deleteMessageCommand);
|
|
1030
1027
|
}
|
|
1031
1028
|
catch (error) {
|
|
1032
1029
|
if (config.logger) {
|
|
@@ -1041,8 +1038,7 @@ const getQueueItems = async (sqsClient, config, queueUrl, maxNumberOfMessages =
|
|
|
1041
1038
|
MaxNumberOfMessages: maxNumberOfMessages,
|
|
1042
1039
|
QueueUrl: queueUrl,
|
|
1043
1040
|
});
|
|
1044
|
-
|
|
1045
|
-
return result;
|
|
1041
|
+
return await sqsClient.send(receiveMessageCommand);
|
|
1046
1042
|
}
|
|
1047
1043
|
catch (error) {
|
|
1048
1044
|
if (config.logger) {
|
package/dist/lib.esm.js
CHANGED
|
@@ -791,8 +791,7 @@ const scanTable = async (config, documentClient, table, options = {}) => {
|
|
|
791
791
|
ConsistentRead,
|
|
792
792
|
TableName: config.tableNamePrefix + table,
|
|
793
793
|
});
|
|
794
|
-
|
|
795
|
-
return result;
|
|
794
|
+
return await queue.schedule(() => documentClient.send(command));
|
|
796
795
|
}
|
|
797
796
|
catch (error) {
|
|
798
797
|
if (config.logger) {
|
|
@@ -809,8 +808,7 @@ const queryTable = async (config, documentClient, table, options = {}) => {
|
|
|
809
808
|
ConsistentRead,
|
|
810
809
|
TableName: config.tableNamePrefix + table,
|
|
811
810
|
});
|
|
812
|
-
|
|
813
|
-
return result;
|
|
811
|
+
return await queue.schedule(() => documentClient.send(command));
|
|
814
812
|
}
|
|
815
813
|
catch (error) {
|
|
816
814
|
if (config.logger) {
|
|
@@ -1003,8 +1001,7 @@ const deleteQueueItem = async (sqsClient, config, queueUrl, receiptHandle) => {
|
|
|
1003
1001
|
QueueUrl: queueUrl,
|
|
1004
1002
|
ReceiptHandle: receiptHandle,
|
|
1005
1003
|
});
|
|
1006
|
-
|
|
1007
|
-
return result;
|
|
1004
|
+
return await sqsClient.send(deleteMessageCommand);
|
|
1008
1005
|
}
|
|
1009
1006
|
catch (error) {
|
|
1010
1007
|
if (config.logger) {
|
|
@@ -1019,8 +1016,7 @@ const getQueueItems = async (sqsClient, config, queueUrl, maxNumberOfMessages =
|
|
|
1019
1016
|
MaxNumberOfMessages: maxNumberOfMessages,
|
|
1020
1017
|
QueueUrl: queueUrl,
|
|
1021
1018
|
});
|
|
1022
|
-
|
|
1023
|
-
return result;
|
|
1019
|
+
return await sqsClient.send(receiveMessageCommand);
|
|
1024
1020
|
}
|
|
1025
1021
|
catch (error) {
|
|
1026
1022
|
if (config.logger) {
|
|
@@ -26,7 +26,7 @@ export type TPutItem = (table: string, item: PutCommandInput['Item']) => Promise
|
|
|
26
26
|
export type TQueryTable = (table: string, options?: Partial<QueryCommandInput>) => Promise<QueryOutput | undefined>;
|
|
27
27
|
export type TScanTable = (table: string, options?: Partial<ScanCommandInput>) => Promise<ScanOutput | undefined>;
|
|
28
28
|
export type TUpdateItem = (table: string, key: string | object, options?: Partial<UpdateCommandInput>) => Promise<UpdateCommandOutput['Attributes'] | undefined>;
|
|
29
|
-
|
|
29
|
+
export interface IDynamoDBInstance {
|
|
30
30
|
batchWriteItems: TBatchWriteItems;
|
|
31
31
|
deleteItem: TDeleteItem;
|
|
32
32
|
getItem: TGetItem;
|
|
@@ -34,5 +34,6 @@ declare const dynamodb: (userConfig: IDynamoDBConfig) => {
|
|
|
34
34
|
queryTable: TQueryTable;
|
|
35
35
|
scanTable: TScanTable;
|
|
36
36
|
updateItem: TUpdateItem;
|
|
37
|
-
}
|
|
37
|
+
}
|
|
38
|
+
declare const dynamodb: (userConfig: IDynamoDBConfig) => IDynamoDBInstance;
|
|
38
39
|
export default dynamodb;
|
package/dist/src/aws/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default as dynamodb, IDynamoDBConfig, IUnprocessedItems, TBatchWriteItems, TDeleteItem, TGetItem, TPutItem, TQueryTable, TScanTable, TUpdateItem, } from './dynamodb';
|
|
2
|
-
export { ILambda, default as lambda, TInvokeLambda } from './lambda';
|
|
3
|
-
export { DEFAULT_CLIENT_CONFIG as DEFAULT_PARAMETER_STORE_CLIENT_CONFIG, IParameterStore, default as parameterStore, TGetSecret, TGetSecrets, } from './parameterStore';
|
|
4
|
-
export { DEFAULT_CLIENT_CONFIG as DEFAULT_SES_CLIENT_CONFIG, IEmailAttachment, IEmailOptions, ISES, default as ses, TSendMail, } from './ses';
|
|
5
|
-
export { ISQS, default as sqs, TDeleteQueueItem, TGetQueueItems, TGetQueueUrl, TSendMessage, } from './sqs';
|
|
1
|
+
export { default as dynamodb, IDynamoDBConfig, IDynamoDBInstance, IUnprocessedItems, TBatchWriteItems, TDeleteItem, TGetItem, TPutItem, TQueryTable, TScanTable, TUpdateItem, } from './dynamodb';
|
|
2
|
+
export { ILambda, ILambdaInstance, default as lambda, TInvokeLambda, } from './lambda';
|
|
3
|
+
export { DEFAULT_CLIENT_CONFIG as DEFAULT_PARAMETER_STORE_CLIENT_CONFIG, IParameterStore, IParameterStoreInstance, default as parameterStore, TGetSecret, TGetSecrets, } from './parameterStore';
|
|
4
|
+
export { DEFAULT_CLIENT_CONFIG as DEFAULT_SES_CLIENT_CONFIG, IEmailAttachment, IEmailOptions, ISES, ISESInstance, default as ses, TSendMail, } from './ses';
|
|
5
|
+
export { ISQS, ISQSInstance, default as sqs, TDeleteQueueItem, TGetQueueItems, TGetQueueUrl, TSendMessage, } from './sqs';
|
package/dist/src/aws/lambda.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ export interface ILambda {
|
|
|
6
6
|
logger?: Logger;
|
|
7
7
|
}
|
|
8
8
|
export type TInvokeLambda = (invocationType: InvocationType, payload: object) => Promise<boolean>;
|
|
9
|
-
|
|
9
|
+
export interface ILambdaInstance {
|
|
10
10
|
invokeLambda: TInvokeLambda;
|
|
11
|
-
}
|
|
11
|
+
}
|
|
12
|
+
declare const lambda: (userConfig: ILambda) => ILambdaInstance;
|
|
12
13
|
export default lambda;
|
|
@@ -14,8 +14,9 @@ interface IParameter {
|
|
|
14
14
|
export type TGetSecret = (parameter: string, defaultValue?: string) => Promise<string>;
|
|
15
15
|
export type TGetSecrets = (parameters: string[], defaultValues?: IParameter[]) => Promise<IParameter[]>;
|
|
16
16
|
export declare const DEFAULT_CLIENT_CONFIG: IParameterStore;
|
|
17
|
-
|
|
17
|
+
export interface IParameterStoreInstance {
|
|
18
18
|
getSecret: TGetSecret;
|
|
19
19
|
getSecrets: TGetSecrets;
|
|
20
|
-
}
|
|
20
|
+
}
|
|
21
|
+
declare const parameterStore: (userConfig: IParameterStore) => IParameterStoreInstance;
|
|
21
22
|
export default parameterStore;
|
package/dist/src/aws/ses.d.ts
CHANGED
|
@@ -29,7 +29,8 @@ export interface IEmailOptions {
|
|
|
29
29
|
readonly to: string | readonly string[];
|
|
30
30
|
}
|
|
31
31
|
export type TSendMail = (options: IEmailOptions, responseCallback?: (response: object) => Promise<void>) => Promise<boolean>;
|
|
32
|
-
|
|
32
|
+
export interface ISESInstance {
|
|
33
33
|
sendMail: TSendMail;
|
|
34
|
-
}
|
|
34
|
+
}
|
|
35
|
+
declare const ses: (userConfig: ISES) => ISESInstance;
|
|
35
36
|
export default ses;
|
package/dist/src/aws/sqs.d.ts
CHANGED
|
@@ -15,11 +15,12 @@ export type TSendBatchMessages = (queueUrl: string, queueEntries: SendMessageBat
|
|
|
15
15
|
failed: BatchResultErrorEntry[] | undefined;
|
|
16
16
|
successful: SendMessageBatchResultEntry[] | undefined;
|
|
17
17
|
}>;
|
|
18
|
-
|
|
18
|
+
export interface ISQSInstance {
|
|
19
19
|
deleteQueueItem: TDeleteQueueItem;
|
|
20
20
|
getQueueItems: TGetQueueItems;
|
|
21
21
|
getQueueUrl: TGetQueueUrl;
|
|
22
22
|
sendBatchMessages: TSendBatchMessages;
|
|
23
23
|
sendMessage: TSendMessage;
|
|
24
|
-
}
|
|
24
|
+
}
|
|
25
|
+
declare const sqs: (userConfig: ISQS) => ISQSInstance;
|
|
25
26
|
export default sqs;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Alagarr, default as alagarr, ClientError, HandlerFunction, IInterfaceAlagarrOptions, IInterfaceHeaders, IInterfaceQueryParameters, IInterfaceRequest, IInterfaceResponse, ServerError, } from './alagarr';
|
|
2
|
-
export { DEFAULT_PARAMETER_STORE_CLIENT_CONFIG, DEFAULT_SES_CLIENT_CONFIG, dynamodb, IDynamoDBConfig, IEmailAttachment, IEmailOptions, ILambda, IParameterStore, ISES, ISQS, IUnprocessedItems, lambda, parameterStore, ses, sqs, TBatchWriteItems, TDeleteItem, TDeleteQueueItem, TGetItem, TGetQueueItems, TGetQueueUrl, TGetSecret, TGetSecrets, TInvokeLambda, TPutItem, TQueryTable, TScanTable, TSendMail, TSendMessage, TUpdateItem, } from './aws';
|
|
2
|
+
export { DEFAULT_PARAMETER_STORE_CLIENT_CONFIG, DEFAULT_SES_CLIENT_CONFIG, dynamodb, IDynamoDBConfig, IDynamoDBInstance, IEmailAttachment, IEmailOptions, ILambda, ILambdaInstance, IParameterStore, IParameterStoreInstance, ISES, ISESInstance, ISQS, ISQSInstance, IUnprocessedItems, lambda, parameterStore, ses, sqs, TBatchWriteItems, TDeleteItem, TDeleteQueueItem, TGetItem, TGetQueueItems, TGetQueueUrl, TGetSecret, TGetSecrets, TInvokeLambda, TPutItem, TQueryTable, TScanTable, TSendMail, TSendMessage, TUpdateItem, } from './aws';
|
|
3
3
|
export { default as logger } from './logger/logger';
|
|
4
4
|
export { Logger } from 'winston';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allthings/cloud-toolkit",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Allthings GmbH",
|
|
6
6
|
"keywords": [
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"homepage": "https://github.com/allthings/cloud-toolkit",
|
|
16
16
|
"engines": {
|
|
17
|
-
"node": "^22",
|
|
17
|
+
"node": "^22 || >=24",
|
|
18
18
|
"npm": ">=10"
|
|
19
19
|
},
|
|
20
20
|
"packageManager": "yarn@1.22.22",
|
|
@@ -54,35 +54,35 @@
|
|
|
54
54
|
"serve": "npx serve -l 3333"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@aws-sdk/client-dynamodb": "^3.
|
|
58
|
-
"@aws-sdk/client-lambda": "^3.
|
|
59
|
-
"@aws-sdk/client-sesv2": "^3.
|
|
60
|
-
"@aws-sdk/client-sqs": "^3.
|
|
61
|
-
"@aws-sdk/client-ssm": "^3.
|
|
62
|
-
"@aws-sdk/lib-dynamodb": "^3.
|
|
57
|
+
"@aws-sdk/client-dynamodb": "^3.1042.0",
|
|
58
|
+
"@aws-sdk/client-lambda": "^3.1042.0",
|
|
59
|
+
"@aws-sdk/client-sesv2": "^3.1042.0",
|
|
60
|
+
"@aws-sdk/client-sqs": "^3.1042.0",
|
|
61
|
+
"@aws-sdk/client-ssm": "^3.1042.0",
|
|
62
|
+
"@aws-sdk/lib-dynamodb": "^3.1042.0",
|
|
63
63
|
"bottleneck": "^2.19.5",
|
|
64
|
-
"nodemailer": "^8.0.
|
|
65
|
-
"winston": "^3.
|
|
64
|
+
"nodemailer": "^8.0.7",
|
|
65
|
+
"winston": "^3.19.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@allthings/eslint-config": "3.
|
|
69
|
-
"@commitlint/cli": "20.5.
|
|
70
|
-
"@commitlint/config-conventional": "20.5.
|
|
68
|
+
"@allthings/eslint-config": "3.1.0",
|
|
69
|
+
"@commitlint/cli": "20.5.3",
|
|
70
|
+
"@commitlint/config-conventional": "20.5.3",
|
|
71
71
|
"@rollup/plugin-node-resolve": "16.0.3",
|
|
72
72
|
"@types/aws-lambda": "8.10.161",
|
|
73
73
|
"@types/jest": "30.0.0",
|
|
74
|
-
"@types/node": "24.12.
|
|
75
|
-
"@types/nodemailer": "
|
|
74
|
+
"@types/node": "24.12.2",
|
|
75
|
+
"@types/nodemailer": "8.0.0",
|
|
76
76
|
"aws-sdk-client-mock": "4.1.0",
|
|
77
77
|
"eslint": "9.39.4",
|
|
78
78
|
"husky": "9.1.7",
|
|
79
79
|
"jest": "30.3.0",
|
|
80
80
|
"lint-staged": "16.4.0",
|
|
81
|
-
"prettier": "3.8.
|
|
81
|
+
"prettier": "3.8.3",
|
|
82
82
|
"rimraf": "6.1.3",
|
|
83
|
-
"rollup": "4.
|
|
83
|
+
"rollup": "4.60.2",
|
|
84
84
|
"semantic-release": "25.0.3",
|
|
85
|
-
"ts-jest": "29.4.
|
|
85
|
+
"ts-jest": "29.4.9",
|
|
86
86
|
"typescript": "5.9.3"
|
|
87
87
|
},
|
|
88
88
|
"prettier": {
|