lambda-toolkit 0.0.3-beta → 0.0.4-beta
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/README.md +20 -1
- package/dist/{index.cjs → index.js} +36 -53
- package/package.json +16 -17
- package/dist/index.mjs +0 -2541
package/README.md
CHANGED
|
@@ -2,9 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
A set of tools to simplify Node Js code development specific for AWS Lambdas, including common functions and AWS SDK v3 abstractions.
|
|
4
4
|
|
|
5
|
+
## Origin
|
|
6
|
+
|
|
7
|
+
This project was created based on my personal experience after I have been working with lambdas for almost 10 years. The need to abstract the AWS SDK integration for common day-to-day tasks led me to create this library, first as a private re-usable piece of code, now as a public package. I also added together some common functions I needed the most over the years. The goal of this library is to make the developer's life easier.
|
|
8
|
+
|
|
5
9
|
## Dependencies
|
|
6
10
|
|
|
7
|
-
This project has no dependency other than
|
|
11
|
+
This project has no dependency other than the AWS SDKs. My goal is to always have the minimal number of dependencies, so commons functions in this code base, like `camelize`, `mean` or `splitBatches` were implemented instead of relying on external providers.
|
|
12
|
+
|
|
13
|
+
As for the AWS SDK dependencies, this code is intended to run on AWS Lambda environments and __I strong suggest__ that you don't include these packages when bundling your code for deploy, as they are all available at the AWS runtime. For example, at your `webpack.config.js`, include:
|
|
14
|
+
```js
|
|
15
|
+
{
|
|
16
|
+
...,
|
|
17
|
+
externals: [
|
|
18
|
+
/@aws-sdk\/*/
|
|
19
|
+
],
|
|
20
|
+
...
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## ES6
|
|
25
|
+
|
|
26
|
+
This codebase was written in ES5 flavor. I plan to re-write it in ES6 and then provide both ES5 and ES6 builds when publishing to npm.
|
|
8
27
|
|
|
9
28
|
## Documentation
|
|
10
29
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
/******/
|
|
1
|
+
import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "node:module";
|
|
2
|
+
/******/ var __webpack_modules__ = ({
|
|
3
3
|
|
|
4
4
|
/***/ 8278:
|
|
5
5
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
@@ -2392,7 +2392,6 @@ module.exports = raw =>
|
|
|
2392
2392
|
/***/ 3744:
|
|
2393
2393
|
/***/ ((module) => {
|
|
2394
2394
|
|
|
2395
|
-
"use strict";
|
|
2396
2395
|
module.exports = require("@aws-sdk/client-athena");
|
|
2397
2396
|
|
|
2398
2397
|
/***/ }),
|
|
@@ -2400,7 +2399,6 @@ module.exports = require("@aws-sdk/client-athena");
|
|
|
2400
2399
|
/***/ 4671:
|
|
2401
2400
|
/***/ ((module) => {
|
|
2402
2401
|
|
|
2403
|
-
"use strict";
|
|
2404
2402
|
module.exports = require("@aws-sdk/client-dynamodb");
|
|
2405
2403
|
|
|
2406
2404
|
/***/ }),
|
|
@@ -2408,7 +2406,6 @@ module.exports = require("@aws-sdk/client-dynamodb");
|
|
|
2408
2406
|
/***/ 5892:
|
|
2409
2407
|
/***/ ((module) => {
|
|
2410
2408
|
|
|
2411
|
-
"use strict";
|
|
2412
2409
|
module.exports = require("@aws-sdk/client-lambda");
|
|
2413
2410
|
|
|
2414
2411
|
/***/ }),
|
|
@@ -2416,7 +2413,6 @@ module.exports = require("@aws-sdk/client-lambda");
|
|
|
2416
2413
|
/***/ 5725:
|
|
2417
2414
|
/***/ ((module) => {
|
|
2418
2415
|
|
|
2419
|
-
"use strict";
|
|
2420
2416
|
module.exports = require("@aws-sdk/client-s3");
|
|
2421
2417
|
|
|
2422
2418
|
/***/ }),
|
|
@@ -2424,7 +2420,6 @@ module.exports = require("@aws-sdk/client-s3");
|
|
|
2424
2420
|
/***/ 9556:
|
|
2425
2421
|
/***/ ((module) => {
|
|
2426
2422
|
|
|
2427
|
-
"use strict";
|
|
2428
2423
|
module.exports = require("@aws-sdk/client-sesv2");
|
|
2429
2424
|
|
|
2430
2425
|
/***/ }),
|
|
@@ -2432,7 +2427,6 @@ module.exports = require("@aws-sdk/client-sesv2");
|
|
|
2432
2427
|
/***/ 7651:
|
|
2433
2428
|
/***/ ((module) => {
|
|
2434
2429
|
|
|
2435
|
-
"use strict";
|
|
2436
2430
|
module.exports = require("@aws-sdk/client-sns");
|
|
2437
2431
|
|
|
2438
2432
|
/***/ }),
|
|
@@ -2440,7 +2434,6 @@ module.exports = require("@aws-sdk/client-sns");
|
|
|
2440
2434
|
/***/ 1976:
|
|
2441
2435
|
/***/ ((module) => {
|
|
2442
2436
|
|
|
2443
|
-
"use strict";
|
|
2444
2437
|
module.exports = require("@aws-sdk/client-sqs");
|
|
2445
2438
|
|
|
2446
2439
|
/***/ }),
|
|
@@ -2448,7 +2441,6 @@ module.exports = require("@aws-sdk/client-sqs");
|
|
|
2448
2441
|
/***/ 4348:
|
|
2449
2442
|
/***/ ((module) => {
|
|
2450
2443
|
|
|
2451
|
-
"use strict";
|
|
2452
2444
|
module.exports = require("@aws-sdk/client-ssm");
|
|
2453
2445
|
|
|
2454
2446
|
/***/ }),
|
|
@@ -2456,7 +2448,6 @@ module.exports = require("@aws-sdk/client-ssm");
|
|
|
2456
2448
|
/***/ 1671:
|
|
2457
2449
|
/***/ ((module) => {
|
|
2458
2450
|
|
|
2459
|
-
"use strict";
|
|
2460
2451
|
module.exports = require("@aws-sdk/client-timestream-query");
|
|
2461
2452
|
|
|
2462
2453
|
/***/ }),
|
|
@@ -2464,7 +2455,6 @@ module.exports = require("@aws-sdk/client-timestream-query");
|
|
|
2464
2455
|
/***/ 8248:
|
|
2465
2456
|
/***/ ((module) => {
|
|
2466
2457
|
|
|
2467
|
-
"use strict";
|
|
2468
2458
|
module.exports = require("@aws-sdk/client-timestream-write");
|
|
2469
2459
|
|
|
2470
2460
|
/***/ }),
|
|
@@ -2472,7 +2462,6 @@ module.exports = require("@aws-sdk/client-timestream-write");
|
|
|
2472
2462
|
/***/ 3489:
|
|
2473
2463
|
/***/ ((module) => {
|
|
2474
2464
|
|
|
2475
|
-
"use strict";
|
|
2476
2465
|
module.exports = require("@aws-sdk/lib-dynamodb");
|
|
2477
2466
|
|
|
2478
2467
|
/***/ }),
|
|
@@ -2480,7 +2469,6 @@ module.exports = require("@aws-sdk/lib-dynamodb");
|
|
|
2480
2469
|
/***/ 4991:
|
|
2481
2470
|
/***/ ((module) => {
|
|
2482
2471
|
|
|
2483
|
-
"use strict";
|
|
2484
2472
|
module.exports = require("@aws-sdk/s3-request-presigner");
|
|
2485
2473
|
|
|
2486
2474
|
/***/ }),
|
|
@@ -2488,60 +2476,55 @@ module.exports = require("@aws-sdk/s3-request-presigner");
|
|
|
2488
2476
|
/***/ 6982:
|
|
2489
2477
|
/***/ ((module) => {
|
|
2490
2478
|
|
|
2491
|
-
|
|
2492
|
-
module.exports = require("crypto");
|
|
2479
|
+
module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("crypto");
|
|
2493
2480
|
|
|
2494
2481
|
/***/ }),
|
|
2495
2482
|
|
|
2496
2483
|
/***/ 5692:
|
|
2497
2484
|
/***/ ((module) => {
|
|
2498
2485
|
|
|
2499
|
-
|
|
2500
|
-
module.exports = require("https");
|
|
2486
|
+
module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("https");
|
|
2501
2487
|
|
|
2502
2488
|
/***/ }),
|
|
2503
2489
|
|
|
2504
2490
|
/***/ 3106:
|
|
2505
2491
|
/***/ ((module) => {
|
|
2506
2492
|
|
|
2507
|
-
|
|
2508
|
-
module.exports = require("zlib");
|
|
2493
|
+
module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("zlib");
|
|
2509
2494
|
|
|
2510
2495
|
/***/ })
|
|
2511
2496
|
|
|
2512
|
-
/******/
|
|
2497
|
+
/******/ });
|
|
2513
2498
|
/************************************************************************/
|
|
2514
|
-
/******/
|
|
2515
|
-
/******/
|
|
2516
|
-
/******/
|
|
2517
|
-
/******/
|
|
2518
|
-
/******/
|
|
2519
|
-
/******/
|
|
2520
|
-
/******/
|
|
2521
|
-
/******/
|
|
2522
|
-
/******/
|
|
2523
|
-
/******/ }
|
|
2524
|
-
/******/ // Create a new module (and put it into the cache)
|
|
2525
|
-
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
2526
|
-
/******/ // no module.id needed
|
|
2527
|
-
/******/ // no module.loaded needed
|
|
2528
|
-
/******/ exports: {}
|
|
2529
|
-
/******/ };
|
|
2530
|
-
/******/
|
|
2531
|
-
/******/ // Execute the module function
|
|
2532
|
-
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
2533
|
-
/******/
|
|
2534
|
-
/******/ // Return the exports of the module
|
|
2535
|
-
/******/ return module.exports;
|
|
2499
|
+
/******/ // The module cache
|
|
2500
|
+
/******/ var __webpack_module_cache__ = {};
|
|
2501
|
+
/******/
|
|
2502
|
+
/******/ // The require function
|
|
2503
|
+
/******/ function __webpack_require__(moduleId) {
|
|
2504
|
+
/******/ // Check if module is in cache
|
|
2505
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
2506
|
+
/******/ if (cachedModule !== undefined) {
|
|
2507
|
+
/******/ return cachedModule.exports;
|
|
2536
2508
|
/******/ }
|
|
2537
|
-
/******/
|
|
2509
|
+
/******/ // Create a new module (and put it into the cache)
|
|
2510
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
2511
|
+
/******/ // no module.id needed
|
|
2512
|
+
/******/ // no module.loaded needed
|
|
2513
|
+
/******/ exports: {}
|
|
2514
|
+
/******/ };
|
|
2515
|
+
/******/
|
|
2516
|
+
/******/ // Execute the module function
|
|
2517
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
2518
|
+
/******/
|
|
2519
|
+
/******/ // Return the exports of the module
|
|
2520
|
+
/******/ return module.exports;
|
|
2521
|
+
/******/ }
|
|
2522
|
+
/******/
|
|
2538
2523
|
/************************************************************************/
|
|
2539
|
-
/******/
|
|
2540
|
-
/******/
|
|
2541
|
-
/******/
|
|
2542
|
-
/******/
|
|
2543
|
-
/******/
|
|
2544
|
-
/******/
|
|
2545
|
-
/******/
|
|
2546
|
-
/******/ })()
|
|
2547
|
-
;
|
|
2524
|
+
/******/
|
|
2525
|
+
/******/ // startup
|
|
2526
|
+
/******/ // Load entry module and return exports
|
|
2527
|
+
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
2528
|
+
/******/ var __webpack_exports__ = __webpack_require__(44);
|
|
2529
|
+
/******/ module.exports = __webpack_exports__;
|
|
2530
|
+
/******/
|
package/package.json
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lambda-toolkit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4-beta",
|
|
4
4
|
"description": "A set of tools to help and simplify Node Js code development for AWS Lambdas",
|
|
5
5
|
"files": [
|
|
6
6
|
"./license",
|
|
7
7
|
"./dist"
|
|
8
8
|
],
|
|
9
|
-
"
|
|
10
|
-
"require": "./dist/index.cjs",
|
|
11
|
-
"import": "./dist/index.mjs"
|
|
12
|
-
},
|
|
9
|
+
"main": "./dist/index.js",
|
|
13
10
|
"author": "Stéfano Zanata",
|
|
14
11
|
"scripts": {
|
|
15
12
|
"build": "webpack --stats errors-only",
|
|
@@ -26,19 +23,21 @@
|
|
|
26
23
|
"url": "https://github.com/szanata/lambda-toolkit/issues"
|
|
27
24
|
},
|
|
28
25
|
"homepage": "https://github.com/szanata/lambda-toolkit",
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@aws-sdk/client-athena": "^3.734.0",
|
|
28
|
+
"@aws-sdk/client-dynamodb": "^3.734.0",
|
|
29
|
+
"@aws-sdk/client-lambda": "^3.734.0",
|
|
30
|
+
"@aws-sdk/client-s3": "^3.735.0",
|
|
31
|
+
"@aws-sdk/client-sesv2": "^3.734.0",
|
|
32
|
+
"@aws-sdk/client-sns": "^3.734.0",
|
|
33
|
+
"@aws-sdk/client-sqs": "^3.734.0",
|
|
34
|
+
"@aws-sdk/client-ssm": "^3.735.0",
|
|
35
|
+
"@aws-sdk/client-timestream-query": "^3.734.0",
|
|
36
|
+
"@aws-sdk/client-timestream-write": "^3.734.0",
|
|
37
|
+
"@aws-sdk/lib-dynamodb": "^3.734.0",
|
|
38
|
+
"@aws-sdk/s3-request-presigner": "^3.735.0"
|
|
39
|
+
},
|
|
29
40
|
"devDependencies": {
|
|
30
|
-
"@aws-sdk/client-athena": "3.709.0",
|
|
31
|
-
"@aws-sdk/client-dynamodb": "3.709.0",
|
|
32
|
-
"@aws-sdk/client-lambda": "3.709.0",
|
|
33
|
-
"@aws-sdk/client-s3": "3.709.0",
|
|
34
|
-
"@aws-sdk/client-sesv2": "3.710.0",
|
|
35
|
-
"@aws-sdk/client-sns": "3.709.0",
|
|
36
|
-
"@aws-sdk/client-sqs": "3.709.0",
|
|
37
|
-
"@aws-sdk/client-ssm": "3.709.0",
|
|
38
|
-
"@aws-sdk/client-timestream-query": "3.709.0",
|
|
39
|
-
"@aws-sdk/client-timestream-write": "3.709.0",
|
|
40
|
-
"@aws-sdk/lib-dynamodb": "3.709.0",
|
|
41
|
-
"@aws-sdk/s3-request-presigner": "3.709.0",
|
|
42
41
|
"eslint": "9.17.0",
|
|
43
42
|
"eslint-plugin-import": "2.31.0",
|
|
44
43
|
"jest": "29.7.0",
|