@pgpmjs/core 6.28.2 → 6.28.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.
@@ -113,14 +113,14 @@ export function generateCreateClientRoleSQL(roles, statementTimeout = '15s') {
113
113
  throw new Error('generateCreateClientRoleSQL: roles parameter is undefined. ' +
114
114
  'Ensure getConnEnvOptions().roles is defined.');
115
115
  }
116
- if (!roles.authenticated || !roles.authenticatedClient) {
116
+ if (!roles.authenticated) {
117
117
  throw new Error('generateCreateClientRoleSQL: roles is missing required properties. ' +
118
- `Got: authenticated=${roles.authenticated}, authenticatedClient=${roles.authenticatedClient}. ` +
118
+ `Got: authenticated=${roles.authenticated}. ` +
119
119
  'Ensure all role names are defined in your configuration.');
120
120
  }
121
121
  const r = {
122
122
  authenticated: roles.authenticated,
123
- authenticatedClient: roles.authenticatedClient
123
+ authenticatedClient: roles.authenticatedClient ?? 'authenticated_client'
124
124
  };
125
125
  return `
126
126
  BEGIN;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pgpmjs/core",
3
- "version": "6.28.2",
3
+ "version": "6.28.3",
4
4
  "author": "Constructive <developers@constructive.io>",
5
5
  "description": "PGPM Package and Migration Tools",
6
6
  "main": "index.js",
@@ -48,21 +48,21 @@
48
48
  "makage": "^0.3.0"
49
49
  },
50
50
  "dependencies": {
51
- "@pgpmjs/env": "^2.26.4",
51
+ "@pgpmjs/env": "^2.26.5",
52
52
  "@pgpmjs/logger": "^2.13.1",
53
- "@pgpmjs/server-utils": "^3.14.4",
54
- "@pgpmjs/types": "^2.33.1",
53
+ "@pgpmjs/server-utils": "^3.14.5",
54
+ "@pgpmjs/types": "^2.33.2",
55
55
  "csv-to-pg": "^3.20.2",
56
56
  "genomic": "^5.6.2",
57
57
  "glob": "^13.0.6",
58
58
  "minimatch": "^10.2.5",
59
59
  "parse-package-name": "^1.0.0",
60
60
  "pg": "^8.21.0",
61
- "pg-cache": "^3.14.3",
61
+ "pg-cache": "^3.14.4",
62
62
  "pg-env": "^1.17.1",
63
63
  "pgsql-deparser": "^17.18.3",
64
64
  "pgsql-parser": "^17.9.15",
65
65
  "yanse": "^0.2.1"
66
66
  },
67
- "gitHead": "113036fa4fb581e4d8418a9309524495a423b624"
67
+ "gitHead": "cf6f9ec222d3dbdca2def95d7eeb27163b919720"
68
68
  }
package/roles/index.js CHANGED
@@ -122,14 +122,14 @@ function generateCreateClientRoleSQL(roles, statementTimeout = '15s') {
122
122
  throw new Error('generateCreateClientRoleSQL: roles parameter is undefined. ' +
123
123
  'Ensure getConnEnvOptions().roles is defined.');
124
124
  }
125
- if (!roles.authenticated || !roles.authenticatedClient) {
125
+ if (!roles.authenticated) {
126
126
  throw new Error('generateCreateClientRoleSQL: roles is missing required properties. ' +
127
- `Got: authenticated=${roles.authenticated}, authenticatedClient=${roles.authenticatedClient}. ` +
127
+ `Got: authenticated=${roles.authenticated}. ` +
128
128
  'Ensure all role names are defined in your configuration.');
129
129
  }
130
130
  const r = {
131
131
  authenticated: roles.authenticated,
132
- authenticatedClient: roles.authenticatedClient
132
+ authenticatedClient: roles.authenticatedClient ?? 'authenticated_client'
133
133
  };
134
134
  return `
135
135
  BEGIN;