@nauth-toolkit/database-typeorm-postgres 0.7.4 → 0.7.5
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-migrations.d.ts","sourceRoot":"","sources":["../../src/utils/run-migrations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"run-migrations.d.ts","sourceRoot":"","sources":["../../src/utils/run-migrations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAqGpE;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,IAAI,CAAC,CA2Ef"}
|
|
@@ -38,6 +38,13 @@ function getMigrationsTableName(config) {
|
|
|
38
38
|
* This function only reads connection options and never modifies the consumer's DataSource.
|
|
39
39
|
* It supports both connection URL and individual connection parameters.
|
|
40
40
|
*
|
|
41
|
+
* `ssl` and `schema` are copied along with the credentials. The migration DataSource opens
|
|
42
|
+
* its own pg pool, so anything omitted here is simply absent from that connection: without
|
|
43
|
+
* `ssl` the migration run would connect unencrypted even though the consumer's own pool is
|
|
44
|
+
* encrypted (servers configured to require TLS reject it), and without `schema` the nauth
|
|
45
|
+
* tables would be created in the default schema while the consumer's DataSource reads them
|
|
46
|
+
* from its own.
|
|
47
|
+
*
|
|
41
48
|
* @param dataSource - Consumer's DataSource instance
|
|
42
49
|
* @returns Connection configuration object
|
|
43
50
|
*/
|
|
@@ -49,6 +56,8 @@ function extractConnectionConfig(dataSource) {
|
|
|
49
56
|
return {
|
|
50
57
|
type: 'postgres',
|
|
51
58
|
url: opts.url,
|
|
59
|
+
schema: opts.schema,
|
|
60
|
+
ssl: opts.ssl,
|
|
52
61
|
extra: opts.extra,
|
|
53
62
|
};
|
|
54
63
|
}
|
|
@@ -60,6 +69,8 @@ function extractConnectionConfig(dataSource) {
|
|
|
60
69
|
username: opts.username,
|
|
61
70
|
password: opts.password,
|
|
62
71
|
database: opts.database,
|
|
72
|
+
schema: opts.schema,
|
|
73
|
+
ssl: opts.ssl,
|
|
63
74
|
extra: opts.extra,
|
|
64
75
|
};
|
|
65
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-migrations.js","sourceRoot":"","sources":["../../src/utils/run-migrations.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"run-migrations.js","sourceRoot":"","sources":["../../src/utils/run-migrations.ts"],"names":[],"mappings":";;AAyHA,gDA+EC;AAvMD,qCAAqC;AAErC,8CAA2C;AAC3C,0CAAiF;AACjF,qDAAmF;AAInF;;;;;;;;;;;GAWG;AACH,KAAK,UAAU,oBAAoB,CAAC,UAAsB,EAAE,MAAmB;IAC7E,IAAI,CAAC;QACH,OAAO,MAAM,UAAU,CAAC,cAAc,EAAE,CAAC;IAC3C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjE,MAAM,CAAC,IAAI,CAAC,2DAA2D,OAAO,EAAE,CAAC,CAAC;QAClF,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,sBAAsB,CAAC,MAAmB;IACjD,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,IAAI,QAAQ,CAAC;IACnD,OAAO,GAAG,WAAW,YAAY,CAAC;AACpC,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,SAAS,uBAAuB,CAAC,UAAsB;IAYrD,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;IACnC,MAAM,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C9C,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QACvB,CAAC;IACH,CAAC;YAAS,CAAC;QACT,iEAAiE;QACjE,IAAI,eAAe,CAAC,aAAa,EAAE,CAAC;YAClC,MAAM,eAAe,CAAC,OAAO,EAAE,CAAC;QAClC,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nauth-toolkit/database-typeorm-postgres",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.5",
|
|
4
4
|
"description": "PostgreSQL storage adapter for nauth-toolkit via TypeORM",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
"format:check": "prettier --check \"src/**/*.ts\""
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@nauth-toolkit/core": "^0.7.
|
|
18
|
-
"
|
|
19
|
-
"
|
|
17
|
+
"@nauth-toolkit/core": "^0.7.5",
|
|
18
|
+
"pg": "^8.0.0",
|
|
19
|
+
"typeorm": "^0.3.20"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/jest": "^29.5.0",
|
|
23
|
-
"@types/node": "^22.
|
|
23
|
+
"@types/node": "^22.20.2",
|
|
24
24
|
"jest": "^29.7.0",
|
|
25
25
|
"ts-jest": "^29.2.0",
|
|
26
26
|
"typescript": "^5.5.0"
|