@pgpmjs/types 2.12.4 → 2.12.6
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/esm/pgpm.js +11 -6
- package/package.json +4 -4
- package/pgpm.d.ts +13 -2
- package/pgpm.js +11 -6
package/esm/pgpm.js
CHANGED
|
@@ -8,18 +8,23 @@ export const pgpmDefaults = {
|
|
|
8
8
|
prefix: 'db-',
|
|
9
9
|
extensions: [],
|
|
10
10
|
cwd: process.cwd(),
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
connections: {
|
|
12
|
+
app: {
|
|
13
|
+
user: 'app_user',
|
|
14
|
+
password: 'app_password'
|
|
15
|
+
},
|
|
16
|
+
admin: {
|
|
17
|
+
user: 'app_admin',
|
|
18
|
+
password: 'admin_password'
|
|
19
|
+
}
|
|
16
20
|
},
|
|
17
21
|
roles: {
|
|
18
22
|
anonymous: 'anonymous',
|
|
19
23
|
authenticated: 'authenticated',
|
|
20
24
|
administrator: 'administrator',
|
|
21
25
|
default: 'anonymous'
|
|
22
|
-
}
|
|
26
|
+
},
|
|
27
|
+
useLocksForRoles: false
|
|
23
28
|
},
|
|
24
29
|
pg: {
|
|
25
30
|
host: 'localhost',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pgpmjs/types",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.6",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "PGPM types",
|
|
6
6
|
"main": "index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"test:watch": "jest --watch"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"pg-env": "^1.2.
|
|
32
|
+
"pg-env": "^1.2.4"
|
|
33
33
|
},
|
|
34
34
|
"keywords": [
|
|
35
35
|
"types",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"migrations"
|
|
41
41
|
],
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"makage": "^0.1.
|
|
43
|
+
"makage": "^0.1.9"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "ac6c6b866ea6a578baf61208b22fcb12fdd46e5d"
|
|
46
46
|
}
|
package/pgpm.d.ts
CHANGED
|
@@ -25,12 +25,14 @@ export interface PgTestConnectionOptions {
|
|
|
25
25
|
extensions?: string[];
|
|
26
26
|
/** Current working directory for database operations */
|
|
27
27
|
cwd?: string;
|
|
28
|
-
/**
|
|
29
|
-
|
|
28
|
+
/** Test user credentials for app and admin users */
|
|
29
|
+
connections?: TestUserCredentials;
|
|
30
30
|
/** Role mapping configuration */
|
|
31
31
|
roles?: RoleMapping;
|
|
32
32
|
/** Default authentication options for db connections */
|
|
33
33
|
auth?: AuthOptions;
|
|
34
|
+
/** Use advisory locks for role/user creation (for concurrency safety) */
|
|
35
|
+
useLocksForRoles?: boolean;
|
|
34
36
|
}
|
|
35
37
|
/**
|
|
36
38
|
* PostgreSQL session context settings for test clients
|
|
@@ -70,6 +72,15 @@ export interface DatabaseConnectionOptions {
|
|
|
70
72
|
/** Database role to assume */
|
|
71
73
|
role?: string;
|
|
72
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Test user credentials for app and admin users
|
|
77
|
+
*/
|
|
78
|
+
export interface TestUserCredentials {
|
|
79
|
+
/** App user credentials (for RLS simulation) */
|
|
80
|
+
app?: DatabaseConnectionOptions;
|
|
81
|
+
/** Admin user credentials (for test admin operations) */
|
|
82
|
+
admin?: DatabaseConnectionOptions;
|
|
83
|
+
}
|
|
73
84
|
/**
|
|
74
85
|
* HTTP server configuration
|
|
75
86
|
*/
|
package/pgpm.js
CHANGED
|
@@ -12,18 +12,23 @@ exports.pgpmDefaults = {
|
|
|
12
12
|
prefix: 'db-',
|
|
13
13
|
extensions: [],
|
|
14
14
|
cwd: process.cwd(),
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
connections: {
|
|
16
|
+
app: {
|
|
17
|
+
user: 'app_user',
|
|
18
|
+
password: 'app_password'
|
|
19
|
+
},
|
|
20
|
+
admin: {
|
|
21
|
+
user: 'app_admin',
|
|
22
|
+
password: 'admin_password'
|
|
23
|
+
}
|
|
20
24
|
},
|
|
21
25
|
roles: {
|
|
22
26
|
anonymous: 'anonymous',
|
|
23
27
|
authenticated: 'authenticated',
|
|
24
28
|
administrator: 'administrator',
|
|
25
29
|
default: 'anonymous'
|
|
26
|
-
}
|
|
30
|
+
},
|
|
31
|
+
useLocksForRoles: false
|
|
27
32
|
},
|
|
28
33
|
pg: {
|
|
29
34
|
host: 'localhost',
|