@aws/aurora-dsql-postgresjs-connector 0.1.0 → 0.1.1

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 CHANGED
@@ -1,5 +1,10 @@
1
1
  # Aurora DSQL Connector for Postgres.js
2
2
 
3
+ [![GitHub](https://img.shields.io/badge/github-awslabs/aurora--dsql--postgres--js--connector-blue?logo=github)](https://github.com/awslabs/aurora-dsql-nodejs-connector/tree/main/packages/postgres-js)
4
+ [![License](https://img.shields.io/badge/license-Apache--2.0-brightgreen)](https://github.com/awslabs/aurora-dsql-nodejs-connector/blob/main/LICENSE)
5
+ [![NPM Version](https://img.shields.io/npm/v/@aws/aurora-dsql-postgresjs-connector)](https://www.npmjs.com/package/@aws/aurora-dsql-postgresjs-connector)
6
+ [![Discord chat](https://img.shields.io/discord/1435027294837276802.svg?logo=discord)](https://discord.com/invite/nEF6ksFWru)
7
+
3
8
  The Aurora DSQL Connector for Postgres.js is a Node.js connector built on [Postgres.js](https://github.com/porsager/postgres)
4
9
  that integrates IAM Authentication for connecting JavaScript applications to Amazon Aurora DSQL clusters.
5
10
 
@@ -7,7 +12,7 @@ The Aurora DSQL Connector for Postgres.js is designed as an authentication plugi
7
12
  Postgres.js client to enable applications to authenticate with Amazon Aurora DSQL using IAM credentials. The connector
8
13
  does not connect directly to the database, but provides seamless IAM authentication on top of the underlying Postgres.js driver.
9
14
 
10
- ## Benefits of the Connector
15
+ ## About the Connector
11
16
 
12
17
  Amazon Aurora DSQL is a distributed SQL database service that provides high availability and scalability for
13
18
  PostgreSQL-compatible applications. Aurora DSQL requires IAM-based authentication with time-limited tokens that
@@ -19,21 +24,33 @@ client that handles IAM token generation, allowing users to connect to Aurora DS
19
24
  The Aurora DSQL Connector for Postgres.js works with most versions of Postgres.js. Users provide their own version by installing
20
25
  Postgres.js directly.
21
26
 
27
+ ### What is Aurora DSQL Authentication?
28
+
29
+ In Aurora DSQL, authentication involves:
30
+
31
+ - **IAM Authentication:** All connections use IAM-based authentication with time-limited tokens
32
+ - **Token Generation:** Authentication tokens are generated using AWS credentials and have configurable lifetimes
33
+
34
+ The Aurora DSQL Connector for Postgres.js is designed to understand these requirements and automatically generate IAM authentication tokens when establishing connections.
35
+
22
36
  ### Features
23
37
 
24
38
  - **Automatic IAM Authentication** - Handles DSQL token generation and refresh
25
39
  - **Built on Postgres.js** - Leverages the fast PostgreSQL client for Node.js
40
+ - **Seamless Integration** - Works with existing Postgres.js connection patterns
26
41
  - **Region Auto-Discovery** - Extracts AWS region from DSQL cluster hostname
27
42
  - **Full TypeScript Support** - Provides full type safety
28
- - **Custom Credentials** - Support for custom AWS credential providers
43
+ - **AWS Credentials Support** - Supports various AWS credential providers (default, profile-based, custom)
44
+ - **Connection Pooling Compatibility** - Works seamlessly with Postgres.js' built-in connection pooling
29
45
 
30
46
  ## Quick start guide
31
47
 
32
48
  ### Requirements
33
49
 
34
50
  - Node.js 20+
51
+ - [Access to an Aurora DSQL cluster](https://docs.aws.amazon.com/aurora-dsql/latest/userguide/getting-started.html)
52
+ - Set up appropriate IAM permissions to allow your application to connect to Aurora DSQL.
35
53
  - AWS credentials configured (via AWS CLI, environment variables, or IAM roles)
36
- - Access to an Aurora DSQL cluster
37
54
 
38
55
  ### Installation
39
56
 
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { auroraDSQLPostgres } from './client';
2
- export type { AuroraDSQLConfig } from './client';
1
+ export { auroraDSQLPostgres } from './client.js';
2
+ export type { AuroraDSQLConfig } from './client.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,kBAAkB,EAAC,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAC,gBAAgB,EAAC,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAC/C,YAAY,EAAC,gBAAgB,EAAC,MAAM,aAAa,CAAC"}
package/dist/index.js CHANGED
@@ -2,5 +2,5 @@
2
2
  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
- export { auroraDSQLPostgres } from './client';
5
+ export { auroraDSQLPostgres } from './client.js';
6
6
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAC,kBAAkB,EAAC,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws/aurora-dsql-postgresjs-connector",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "An AWS Aurora DSQL connector with IAM authentication for Postgres.js",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -32,7 +32,7 @@
32
32
  ],
33
33
  "dependencies": {
34
34
  "@aws-sdk/credential-providers": "^3.901.0",
35
- "@aws-sdk/dsql-signer": "^3.920.0"
35
+ "@aws-sdk/dsql-signer": "^3.940.0"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "postgres": "^3.4.7"
@@ -40,10 +40,10 @@
40
40
  "devDependencies": {
41
41
  "@eslint/js": "^9.37.0",
42
42
  "@types/jest": "^29.5.14",
43
- "@types/node": "^20.19.24",
44
- "@typescript-eslint/eslint-plugin": "^8.46.2",
45
- "@typescript-eslint/parser": "^8.46.2",
46
- "eslint": "^9.38.0",
43
+ "@types/node": "^20.19.25",
44
+ "@typescript-eslint/eslint-plugin": "^8.48.0",
45
+ "@typescript-eslint/parser": "^8.48.0",
46
+ "eslint": "^9.39.1",
47
47
  "eslint-plugin-header": "^3.1.1",
48
48
  "jest": "^29.7.0",
49
49
  "postgres": "^3.4.7",