@ttoss/lambda-postgres-query 0.2.2 → 0.2.3

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.
Files changed (2) hide show
  1. package/README.md +7 -1
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -25,7 +25,11 @@ pnpm install @ttoss/lambda-postgres-query
25
25
  Create a `src/cloudformation.ts` file with the following content:
26
26
 
27
27
  ```typescript
28
- import { createLambdaQueryTemplate } from '@ttoss/lambda-postgres-query';
28
+ import { createLambdaQueryTemplate } from '@ttoss/lambda-postgres-query/cloudformation';
29
+
30
+ const template = createLambdaQueryTemplate();
31
+
32
+ export default template;
29
33
  ```
30
34
 
31
35
  Create a `src/handler.ts` file with the following content:
@@ -63,6 +67,8 @@ Add the `deploy` script to the `package.json` file:
63
67
  pnpm deploy
64
68
  ```
65
69
 
70
+ _**Note:** When deploying using carlin, you need to set `lambdaFormat: 'cjs'` because `pg` package doesn't support ESM format._
71
+
66
72
  It'll create the necessary resources to query the Postgres database and display the name of the Lambda function created.
67
73
 
68
74
  ### Querying the database
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/lambda-postgres-query",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Create a Lambda function that queries a PostgreSQL database.",
5
5
  "author": "ttoss",
6
6
  "contributors": [
@@ -19,8 +19,8 @@
19
19
  "types": "./dist/index.d.ts"
20
20
  },
21
21
  "./cloudformation": {
22
- "import": "./dist/esm/cloudformation.js",
23
- "require": "./dist/cloudformation.js",
22
+ "import": "./dist/esm/cloudformation/index.js",
23
+ "require": "./dist/cloudformation/index.js",
24
24
  "types": "./dist/cloudformation/index.d.ts"
25
25
  }
26
26
  },
@@ -38,8 +38,8 @@
38
38
  "@types/pg": "^8.11.6",
39
39
  "jest": "^29.7.0",
40
40
  "tsup": "^8.1.0",
41
- "@ttoss/config": "^1.32.6",
42
- "@ttoss/test-utils": "^2.1.10"
41
+ "@ttoss/test-utils": "^2.1.10",
42
+ "@ttoss/config": "^1.32.6"
43
43
  },
44
44
  "keywords": [
45
45
  "aws",