@ttoss/postgresdb 0.2.25 → 0.2.27

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
@@ -98,11 +98,11 @@ export const db = initialize({
98
98
  **Option 2 - Environment variables (`.env`):**
99
99
 
100
100
  ```env
101
- DB_NAME=postgres
102
- DB_USERNAME=postgres
103
- DB_PASSWORD=mysecretpassword
104
- DB_HOST=localhost
105
- DB_PORT=5432
101
+ DATABASE_NAME=postgres
102
+ DATABASE_USER=postgres
103
+ DATABASE_PASSWORD=mysecretpassword
104
+ DATABASE_HOST=localhost
105
+ DATABASE_PORT=5432
106
106
  ```
107
107
 
108
108
  Environment variables are automatically used if defined.
package/dist/esm/index.js CHANGED
@@ -14,11 +14,11 @@ var initialize = /* @__PURE__ */__name(async ({
14
14
  models,
15
15
  ...restOptions
16
16
  }) => {
17
- const username = process.env.DB_USERNAME,
18
- password = process.env.DB_PASSWORD,
19
- database = process.env.DB_NAME,
20
- host = process.env.DB_HOST,
21
- port = Number(process.env.DB_PORT) || 5432;
17
+ const username = process.env.DATABASE_USER,
18
+ password = process.env.DATABASE_PASSWORD,
19
+ database = process.env.DATABASE_NAME,
20
+ host = process.env.DATABASE_HOST,
21
+ port = Number(process.env.DATABASE_PORT) || 5432;
22
22
  if (!sequelize) {
23
23
  sequelize = new Sequelize({
24
24
  logging: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/postgresdb",
3
- "version": "0.2.25",
3
+ "version": "0.2.27",
4
4
  "description": "A library to handle PostgreSQL database connections and queries",
5
5
  "license": "MIT",
6
6
  "author": "ttoss",
@@ -9,7 +9,7 @@
9
9
  ],
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/ttoss/ttoss.git",
12
+ "url": "git+https://github.com/ttoss/ttoss.git",
13
13
  "directory": "packages/postgresdb"
14
14
  },
15
15
  "type": "module",