@allthings/cloud-toolkit 1.5.2 → 1.5.4

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.
@@ -1,5 +1,5 @@
1
1
  import { DynamoDBClientConfig, PutRequest, QueryOutput, ScanOutput } from '@aws-sdk/client-dynamodb';
2
- import { DeleteCommandInput, DeleteCommandOutput, DynamoDBDocumentClient, GetCommandInput, GetCommandOutput, PutCommandInput, QueryCommandInput, ScanCommandInput, UpdateCommandInput, UpdateCommandOutput } from '@aws-sdk/lib-dynamodb';
2
+ import { DeleteCommandInput, DeleteCommandOutput, GetCommandInput, GetCommandOutput, PutCommandInput, QueryCommandInput, ScanCommandInput, UpdateCommandInput, UpdateCommandOutput } from '@aws-sdk/lib-dynamodb';
3
3
  import { TAWSLogger } from './types';
4
4
  export interface IDynamoDBConfig {
5
5
  batchWriteMaxRetries?: number;
@@ -28,13 +28,6 @@ export type TPutItem = (table: string, item: PutCommandInput['Item']) => Promise
28
28
  export type TQueryTable = (table: string, options?: Partial<QueryCommandInput>) => Promise<QueryOutput | undefined>;
29
29
  export type TScanTable = (table: string, options?: Partial<ScanCommandInput>) => Promise<ScanOutput | undefined>;
30
30
  export type TUpdateItem = (table: string, key: string | object, options?: Partial<UpdateCommandInput>) => Promise<UpdateCommandOutput['Attributes'] | undefined>;
31
- declare const deleteItem: (config: IDynamoDBConfig, documentClient: DynamoDBDocumentClient, table: string, key: string | object, options?: Partial<DeleteCommandInput>) => Promise<DeleteCommandOutput['Attributes'] | undefined>;
32
- declare const getItem: (config: IDynamoDBConfig, documentClient: DynamoDBDocumentClient, table: string, key: string | object, options?: Partial<GetCommandInput>) => Promise<GetCommandOutput['Item'] | undefined>;
33
- declare const putItem: (config: IDynamoDBConfig, documentClient: DynamoDBDocumentClient, table: string, Item: PutCommandInput['Item']) => Promise<PutCommandInput['Item'] | undefined>;
34
- declare const updateItem: (config: IDynamoDBConfig, documentClient: DynamoDBDocumentClient, table: string, key: string | object, options?: Partial<UpdateCommandInput>) => Promise<UpdateCommandOutput['Attributes'] | undefined>;
35
- declare const batchWriteItems: (config: IDynamoDBConfig, documentClient: DynamoDBDocumentClient, table: string, items: PutRequest['Item'][]) => Promise<readonly PutRequest['Item'][] | undefined>;
36
- declare const scanTable: (config: IDynamoDBConfig, documentClient: DynamoDBDocumentClient, table: string, options?: Partial<ScanCommandInput>) => Promise<ScanOutput | undefined>;
37
- declare const queryTable: (config: IDynamoDBConfig, documentClient: DynamoDBDocumentClient, table: string, options?: Partial<QueryCommandInput>) => Promise<QueryOutput | undefined>;
38
31
  declare const dynamodb: (userConfig: IDynamoDBConfig) => {
39
32
  batchWriteItems: TBatchWriteItems;
40
33
  deleteItem: TDeleteItem;
@@ -1,4 +1,4 @@
1
- import { InvocationType, LambdaClient, LambdaClientConfig } from '@aws-sdk/client-lambda';
1
+ import { InvocationType, LambdaClientConfig } from '@aws-sdk/client-lambda';
2
2
  import { TAWSLogger } from './types';
3
3
  export interface ILambda {
4
4
  clientConfig?: LambdaClientConfig;
@@ -6,7 +6,6 @@ export interface ILambda {
6
6
  logger?: TAWSLogger;
7
7
  }
8
8
  export type TInvokeLambda = (invocationType: InvocationType, payload: object) => Promise<boolean>;
9
- declare const invokeLambda: (lambdaClient: LambdaClient, config: ILambda, invocationType: InvocationType, payload: object) => Promise<boolean>;
10
9
  declare const lambda: (userConfig: ILambda) => {
11
10
  invokeLambda: TInvokeLambda;
12
11
  };
@@ -1,4 +1,4 @@
1
- import { SSMClient, SSMClientConfig } from '@aws-sdk/client-ssm';
1
+ import { SSMClientConfig } from '@aws-sdk/client-ssm';
2
2
  import { TAWSLogger } from './types';
3
3
  export interface IParameterStore {
4
4
  clientConfig?: SSMClientConfig;
@@ -14,8 +14,6 @@ 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
- declare const getSecrets: (ssm: SSMClient, config: IParameterStore, parameters_: string[], defaultValues: IParameter[]) => Promise<IParameter[]>;
18
- declare const getSecret: (ssm: SSMClient, config: IParameterStore, parameter_: string, defaultValue: string) => Promise<string>;
19
17
  declare const parameterStore: (userConfig: IParameterStore) => {
20
18
  getSecret: TGetSecret;
21
19
  getSecrets: TGetSecrets;
@@ -1,8 +1,4 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- /// <reference types="node" />
4
1
  import * as aws from '@aws-sdk/client-ses';
5
- import { Transporter } from 'nodemailer';
6
2
  import { TAWSLogger } from './types';
7
3
  export interface ISES {
8
4
  clientConfig?: aws.SESClientConfig;
@@ -27,7 +23,6 @@ export interface IEmailOptions {
27
23
  readonly to: string | readonly string[];
28
24
  }
29
25
  export type TSendMail = (options: IEmailOptions) => Promise<boolean>;
30
- declare const sendMail: (config: ISES, transport: Transporter, options: IEmailOptions, from: string) => Promise<boolean>;
31
26
  declare const ses: (fromEmailAddress: string, userConfig: ISES) => {
32
27
  sendMail: TSendMail;
33
28
  };
@@ -1,4 +1,4 @@
1
- import { DeleteMessageCommandInput, DeleteMessageCommandOutput, MessageAttributeValue, ReceiveMessageCommandOutput, SQSClient, SQSClientConfig } from '@aws-sdk/client-sqs';
1
+ import { DeleteMessageCommandInput, MessageAttributeValue, ReceiveMessageCommandOutput, SQSClientConfig } from '@aws-sdk/client-sqs';
2
2
  import { TAWSLogger } from './types';
3
3
  export interface ISQS {
4
4
  clientConfig?: SQSClientConfig;
@@ -11,10 +11,6 @@ export type TSendMessage = (queueUrl: string, message: string, fifoSettings?: {
11
11
  }, messageAttributes?: Record<string, MessageAttributeValue>, messageDelay?: number) => Promise<string | undefined>;
12
12
  export type TGetQueueItems = (queueUrl: string, maxNumberOfMessages?: number) => Promise<ReceiveMessageCommandOutput | undefined>;
13
13
  export type TDeleteQueueItem = (queueUrl: string, receiptHandle: DeleteMessageCommandInput['ReceiptHandle']) => Promise<ReceiveMessageCommandOutput | undefined>;
14
- declare const deleteQueueItem: (sqsClient: SQSClient, config: ISQS, queueUrl: string, receiptHandle: DeleteMessageCommandInput['ReceiptHandle']) => Promise<DeleteMessageCommandOutput | undefined>;
15
- declare const getQueueItems: (sqsClient: SQSClient, config: ISQS, queueUrl: string, maxNumberOfMessages?: number) => Promise<ReceiveMessageCommandOutput | undefined>;
16
- declare const getQueueUrl: (sqsClient: SQSClient, config: ISQS, queueName: string) => Promise<string | undefined>;
17
- declare const sendMessage: (sqsClient: SQSClient, config: ISQS, queueUrl: string, message: string, fifoSettings?: {}, messageAttributes?: Record<string, MessageAttributeValue>, messageDelay?: number) => Promise<string | undefined>;
18
14
  declare const sqs: (userConfig: ISQS) => {
19
15
  deleteQueueItem: TDeleteQueueItem;
20
16
  getQueueItems: TGetQueueItems;
@@ -1,2 +1,2 @@
1
1
  export declare const splitEvery: <T>(every: number, list: readonly T[]) => T[][];
2
- export declare const until: <A, B>(predicate: (value: B, iteration: number) => boolean | Promise<boolean>, transformer: (value: A | B | undefined, iteration: number) => B | Promise<B>, initialValue?: A | B | undefined, iterationCount?: number) => Promise<B>;
2
+ export declare const until: <A, B>(predicate: (value: B, iteration: number) => boolean | Promise<boolean>, transformer: (value: A | B | undefined, iteration: number) => B | Promise<B>, initialValue?: A | B, iterationCount?: number) => Promise<B>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allthings/cloud-toolkit",
3
- "version": "1.5.2",
3
+ "version": "1.5.4",
4
4
  "description": "",
5
5
  "author": "Allthings GmbH",
6
6
  "keywords": [
@@ -50,42 +50,42 @@
50
50
  "serve": "npx serve -l 3333"
51
51
  },
52
52
  "dependencies": {
53
- "@aws-sdk/client-dynamodb": "3.696.0",
54
- "@aws-sdk/client-lambda": "3.693.0",
55
- "@aws-sdk/client-ses": "3.693.0",
56
- "@aws-sdk/client-sqs": "3.699.0",
57
- "@aws-sdk/client-ssm": "3.693.0",
58
- "@aws-sdk/lib-dynamodb": "3.696.0",
53
+ "@aws-sdk/client-dynamodb": "3.733.0",
54
+ "@aws-sdk/client-lambda": "3.731.1",
55
+ "@aws-sdk/client-ses": "3.731.1",
56
+ "@aws-sdk/client-sqs": "3.731.1",
57
+ "@aws-sdk/client-ssm": "3.731.1",
58
+ "@aws-sdk/lib-dynamodb": "3.733.0",
59
59
  "bottleneck": "2.19.5",
60
- "cross-fetch": "4.0.0",
60
+ "cross-fetch": "4.1.0",
61
61
  "nodemailer": "6.9.16",
62
62
  "query-string": "9.1.1",
63
63
  "winston": "3.17.0"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@allthings/eslint-config": "2.1.1",
67
- "@commitlint/cli": "19.5.0",
68
- "@commitlint/config-conventional": "19.5.0",
69
- "@rollup/plugin-commonjs": "28.0.1",
67
+ "@commitlint/cli": "19.6.1",
68
+ "@commitlint/config-conventional": "19.6.0",
69
+ "@rollup/plugin-commonjs": "28.0.2",
70
70
  "@rollup/plugin-json": "6.1.0",
71
- "@rollup/plugin-node-resolve": "15.3.0",
72
- "@rollup/plugin-replace": "6.0.1",
71
+ "@rollup/plugin-node-resolve": "16.0.0",
72
+ "@rollup/plugin-replace": "6.0.2",
73
73
  "@rollup/plugin-terser": "0.4.4",
74
- "@types/jest": "26.0.24",
75
- "@types/node": "22.9.0",
76
- "@types/nodemailer": "6.4.16",
74
+ "@types/jest": "29.5.14",
75
+ "@types/node": "22.10.5",
76
+ "@types/nodemailer": "6.4.17",
77
77
  "@types/query-string": "6.3.0",
78
78
  "aws-sdk-client-mock": "4.1.0",
79
79
  "eslint": "8.57.1",
80
- "husky": "9.1.6",
81
- "jest": "26.6.3",
82
- "lint-staged": "15.2.10",
83
- "prettier": "3.3.3",
80
+ "husky": "9.1.7",
81
+ "jest": "29.7.0",
82
+ "lint-staged": "15.4.1",
83
+ "prettier": "3.4.2",
84
84
  "rimraf": "5.0.10",
85
- "rollup": "4.24.4",
85
+ "rollup": "4.29.2",
86
86
  "semantic-release": "19.0.5",
87
- "ts-jest": "26.5.6",
88
- "typescript": "4.9.5"
87
+ "ts-jest": "29.2.5",
88
+ "typescript": "5.7.3"
89
89
  },
90
90
  "prettier": {
91
91
  "printWidth": 80,
@@ -137,10 +137,10 @@
137
137
  ],
138
138
  "coverageThreshold": {
139
139
  "global": {
140
- "branches": 99,
141
- "functions": 100,
142
- "lines": 100,
143
- "statements": 100
140
+ "branches": 75,
141
+ "functions": 89,
142
+ "lines": 90,
143
+ "statements": 90
144
144
  }
145
145
  },
146
146
  "coveragePathIgnorePatterns": [