@balena/pinejs 18.3.0-build-joshbwlng-listener-7c870231e3e3d73b82275fd0acbdcc9248101313-1 → 19.0.0-build-pinejs-client-8-6487fd23ec0301a370dc6ff892063b88d5f8e114-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/CHANGELOG.md CHANGED
@@ -4,10 +4,338 @@ All notable changes to this project will be documented in this file
4
4
  automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
5
5
  This project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
- # v18.3.0
8
- ## (2024-09-02)
7
+ # v19.0.0
8
+ ## (2024-09-13)
9
9
 
10
- * Add on notification listener support [Josh Bowling]
10
+
11
+ <details>
12
+ <summary> Update pinejs-client-core to 8.x [Pagan Gazzard] </summary>
13
+
14
+ > ## pinejs-client-js-8.0.0
15
+ > ### (2024-09-13)
16
+ >
17
+ > * Remove error check if passing too many arguments to `request` [Pagan Gazzard]
18
+ > * Update error messages for invalid params [Pagan Gazzard]
19
+ > * Drop `url` from general `Params` and only have it in supported places [Pagan Gazzard]
20
+ > * Remove deprecated `prepare` signatures in favor of always passing expected aliases [Pagan Gazzard]
21
+ > * Remove `$filter: a: b: ...`, please use `$filter: a: $any: { $alias: "x", $expr: x: b: ... }` instead. [Pagan Gazzard]
22
+ > * Remove unused `PinejsClient` generic from the class signature [Pagan Gazzard]
23
+ > * Removed `$filter: { a: { $count: { $op: number } } }`, please use `$filter: { $eq: [ { a: { $count: {} } }, number ] }` instead. [Pagan Gazzard]
24
+ > * Update minimum supported version to es2018 [Pagan Gazzard]
25
+ > * Removed deprecated `transformGetResult` and renamed `_transformGetResult` to replace it [Pagan Gazzard]
26
+ > * Error on using OData options other than $filter in a `$expand: { a: { $count: {...} } }`. [Pagan Gazzard]
27
+ > * Removed `$orderby: 'a/$count'`, please use `$orderby: { a: { $count: {...} } }` instead. [Pagan Gazzard]
28
+ > * Removed `$expand: { 'a/$count': {...} }`, please use `$expand: { a: { $count: {...} } }` instead. [Pagan Gazzard]
29
+ > * Removed `resource: 'a/$count'`, please use `options: { $count: { ... } }` instead. [Pagan Gazzard]
30
+ > * Removed passing `url` to `compile`, please use a query object instead or use the url directly. [Pagan Gazzard]
31
+ > * Removed passing `url` to `delete`, please use a query object instead or use `request` directly. [Pagan Gazzard]
32
+ > * Removed passing `url` to `put`, please use a query object instead or use `request` directly. [Pagan Gazzard]
33
+ > * Removed passing `url` to `patch`, please use a query object instead or use `request` directly. [Pagan Gazzard]
34
+ > * Removed passing `url` to `post`, please use a query object instead or use `request` directly. [Pagan Gazzard]
35
+ > * Removed passing `url` to `get`, please use a query object instead or use `request` directly. [Pagan Gazzard]
36
+ > * Removed passing `url` to `upsert` as it is unsupported and may have adverse effects, please use a query object instead. [Pagan Gazzard]
37
+ > * Removed passing `url` to `getOrCreate` as it is unsupported and may have adverse effects, please use a query object instead. [Pagan Gazzard]
38
+ >
39
+
40
+ </details>
41
+
42
+ * Use updated pinejs-client `prepare` syntax [Pagan Gazzard]
43
+
44
+ <details>
45
+ <summary> Update dependencies [Pagan Gazzard] </summary>
46
+
47
+ > ## pinejs-client-js-7.2.0
48
+ > ### (2024-09-13)
49
+ >
50
+ > * Export `OptionsToResponse` type helper [Pagan Gazzard]
51
+ >
52
+ > ## pinejs-client-js-7.1.5
53
+ > ### (2024-09-13)
54
+ >
55
+ > * Switch tsconfig module resolution to Node16 [Pagan Gazzard]
56
+ >
57
+
58
+ </details>
59
+
60
+ * Avoid deprecated usage of pinejs-client [Pagan Gazzard]
61
+
62
+ # v18.2.7
63
+ ## (2024-09-13)
64
+
65
+
66
+ <details>
67
+ <summary> Update dependencies [Pagan Gazzard] </summary>
68
+
69
+ > ## abstract-sql-to-typescript-4.0.6
70
+ > ### (2024-09-12)
71
+ >
72
+ > * Fix built file paths now that package.json is imported rather than required [Pagan Gazzard]
73
+ >
74
+ > ## abstract-sql-to-typescript-4.0.5
75
+ > ### (2024-09-12)
76
+ >
77
+ > * Update @balena/lint to 9.x [Pagan Gazzard]
78
+ >
79
+ > ## abstract-sql-to-typescript-4.0.4
80
+ > ### (2024-09-12)
81
+ >
82
+ > * Correctly use `Record<string, never>` when there are no writable fields [Pagan Gazzard]
83
+ >
84
+
85
+ </details>
86
+
87
+ # v18.2.6
88
+ ## (2024-09-12)
89
+
90
+ * Fix linting issues with latest dependencies [Thodoris Greasidis]
91
+ * Update TypeScript to 5.6.2 [Thodoris Greasidis]
92
+
93
+ # v18.2.5
94
+ ## (2024-09-10)
95
+
96
+ * Update dependency commander to v12 [Self-hosted Renovate Bot]
97
+
98
+ # v18.2.4
99
+ ## (2024-09-09)
100
+
101
+ * Tests: update nodejs to 20.x matching the minimum supported version [Pagan Gazzard]
102
+
103
+ # v18.2.3
104
+ ## (2024-09-06)
105
+
106
+
107
+ <details>
108
+ <summary> Update dependencies [Pagan Gazzard] </summary>
109
+
110
+ > ## abstract-sql-to-typescript-4.0.2
111
+ > ### (2024-09-06)
112
+ >
113
+ > * Fix computed fields to correctly be omitted from `Write` typings [Pagan Gazzard]
114
+ > * Fix tables with definitions to correctly have no writable fields [Pagan Gazzard]
115
+ >
116
+ > ## abstract-sql-to-typescript-4.0.1
117
+ > ### (2024-09-06)
118
+ >
119
+ >
120
+ > <details>
121
+ > <summary> Update dependencies [Pagan Gazzard] </summary>
122
+ >
123
+ >> ### odata-to-abstract-sql-6.3.0
124
+ >> #### (2024-08-26)
125
+ >>
126
+ >> * Support PUT/PATCH/DELETE requests on resources with a translated ID field [Thodoris Greasidis]
127
+ >>
128
+ >> ### odata-to-abstract-sql-6.2.8
129
+ >> #### (2024-08-26)
130
+ >>
131
+ >>
132
+ >> <details>
133
+ >> <summary> Update dependencies [Pagan Gazzard] </summary>
134
+ >>
135
+ >>> #### abstract-sql-compiler-9.2.0
136
+ >>> ##### (2024-06-12)
137
+ >>>
138
+ >>> * Adds `EndsWithNode` and `ContainsNode` typings [Pagan Gazzard]
139
+ >>>
140
+ >>> #### lf-to-abstract-sql-5.0.2
141
+ >>> ##### (2024-03-05)
142
+ >>>
143
+ >>>
144
+ >>> <details>
145
+ >>> <summary> Update `@balena/sbvr-types` devDependency [Harald Fischer] </summary>
146
+ >>>
147
+ >>>> ##### sbvr-types-7.0.1
148
+ >>>> ###### (2024-03-04)
149
+ >>>>
150
+ >>>> * Update dependency @balena/abstract-sql-compiler to v9 [Self-hosted Renovate Bot]
151
+ >>>>
152
+ >>>> ##### sbvr-types-7.0.0
153
+ >>>> ###### (2024-03-04)
154
+ >>>>
155
+ >>>> * Return `ISODateString` instead of `date` [fisehara]
156
+ >>>>
157
+ >>>> ##### sbvr-types-6.1.1
158
+ >>>> ###### (2024-01-02)
159
+ >>>>
160
+ >>>> * Update dependency @types/chai-datetime to ^0.0.39 [Self-hosted Renovate Bot]
161
+ >>>>
162
+ >>>> ##### sbvr-types-6.1.0
163
+ >>>> ###### (2023-10-03)
164
+ >>>>
165
+ >>>> * Add checksum to WebResource [Otávio Jacobi]
166
+ >>>>
167
+ >>>> ##### sbvr-types-6.0.0
168
+ >>>> ###### (2023-08-09)
169
+ >>>>
170
+ >>>> * Change contents to snake_case [Otávio Jacobi]
171
+ >>>>
172
+ >>>> ##### sbvr-types-5.2.0
173
+ >>>> ###### (2023-08-08)
174
+ >>>>
175
+ >>>> * Expose WebResource as WebResourceType [Otávio Jacobi]
176
+ >>>>
177
+ >>>> ##### sbvr-types-5.1.0
178
+ >>>> ###### (2023-08-03)
179
+ >>>>
180
+ >>>> * Adds WebResource type [Otávio Jacobi]
181
+ >>>>
182
+ >>>
183
+ >>> </details>
184
+ >>>
185
+ >>>
186
+ >>> #### odata-parser-3.0.8
187
+ >>> ##### (2024-06-04)
188
+ >>>
189
+ >>> * Fix type checking of the declaration file [Pagan Gazzard]
190
+ >>>
191
+ >>> #### odata-parser-3.0.7
192
+ >>> ##### (2024-04-13)
193
+ >>>
194
+ >>> * Update dependency husky to v9 [Self-hosted Renovate Bot]
195
+ >>>
196
+ >>> #### odata-parser-3.0.6
197
+ >>> ##### (2024-04-12)
198
+ >>>
199
+ >>> * Update dependency peggy to v4 [Self-hosted Renovate Bot]
200
+ >>>
201
+ >>> #### odata-parser-3.0.5
202
+ >>> ##### (2024-04-12)
203
+ >>>
204
+ >>> * Update dependency lint-staged to v15 [Self-hosted Renovate Bot]
205
+ >>>
206
+ >>> #### odata-parser-3.0.4
207
+ >>> ##### (2024-04-12)
208
+ >>>
209
+ >>> * Update dependency @balena/lint to v8 [Self-hosted Renovate Bot]
210
+ >>>
211
+ >>> #### sbvr-parser-1.4.6
212
+ >>> ##### (Invalid date)
213
+ >>>
214
+ >>> * Update dependency @balena/sbvr-types to v8 [Self-hosted Renovate Bot]
215
+ >>>
216
+ >>> #### sbvr-parser-1.4.5
217
+ >>> ##### (2024-06-18)
218
+ >>>
219
+ >>> * Switch to an inflection library from npm which does not monkey patch [Pagan Gazzard]
220
+ >>>
221
+ >>> #### sbvr-parser-1.4.4
222
+ >>> ##### (2024-03-05)
223
+ >>>
224
+ >>> * Updated `@balena/sbvr-types` [Harald Fischer]
225
+ >>>
226
+ >>> #### sbvr-types-7.1.3
227
+ >>> ##### (2024-06-12)
228
+ >>>
229
+ >>> * Add typings for all abstract sql fragments, fixing where necessary [Pagan Gazzard]
230
+ >>>
231
+ >>> #### sbvr-types-7.1.2
232
+ >>> ##### (2024-06-12)
233
+ >>>
234
+ >>> * Explicitly type the `compare` function for `hashed` [Pagan Gazzard]
235
+ >>>
236
+ >>> #### sbvr-types-7.1.1
237
+ >>> ##### (2024-06-04)
238
+ >>>
239
+ >>> * Accept `Date` for the write types of `Date Time`/`Date`/`Time` [Pagan Gazzard]
240
+ >>>
241
+ >>> #### sbvr-types-7.1.0
242
+ >>> ##### (2024-04-25)
243
+ >>>
244
+ >>> * Export typescript read/write types for each sbvr type [Pagan Gazzard]
245
+ >>>
246
+ >>> #### sbvr-types-7.0.10
247
+ >>> ##### (2024-04-09)
248
+ >>>
249
+ >>> * Update Big Serial concept type to Big Integer [Josh Bowling]
250
+ >>>
251
+ >>> #### sbvr-types-7.0.9
252
+ >>> ##### (2024-04-09)
253
+ >>>
254
+ >>> * Add Big Serial to Type.sbvr [Josh Bowling]
255
+ >>>
256
+ >>> #### sbvr-types-7.0.8
257
+ >>> ##### (2024-04-09)
258
+ >>>
259
+ >>> * Update prepare script for husky v9 [Josh Bowling]
260
+ >>> * Update dependency husky to v9 [Self-hosted Renovate Bot]
261
+ >>>
262
+ >>> #### sbvr-types-7.0.7
263
+ >>> ##### (2024-04-09)
264
+ >>>
265
+ >>> * Update dependency @balena/lint to v8 [Self-hosted Renovate Bot]
266
+ >>>
267
+ >>> #### sbvr-types-7.0.6
268
+ >>> ##### (2024-03-21)
269
+ >>>
270
+ >>> * Improve JSON typings [Pagan Gazzard]
271
+ >>>
272
+ >>> #### sbvr-types-7.0.5
273
+ >>> ##### (2024-03-13)
274
+ >>>
275
+ >>> * Remove unnecessary catch bindings [Pagan Gazzard]
276
+ >>>
277
+ >>> #### sbvr-types-7.0.4
278
+ >>> ##### (2024-03-13)
279
+ >>>
280
+ >>> * Improve validate typings [Pagan Gazzard]
281
+ >>>
282
+ >>> #### sbvr-types-7.0.3
283
+ >>> ##### (2024-03-12)
284
+ >>>
285
+ >>> * Improve fetchProcessing typings [Pagan Gazzard]
286
+ >>>
287
+ >>> #### sbvr-types-7.0.2
288
+ >>> ##### (2024-03-12)
289
+ >>>
290
+ >>> * Tests: convert to typescript [Pagan Gazzard]
291
+ >>>
292
+ >>
293
+ >> </details>
294
+ >>
295
+ >>
296
+ >
297
+ > </details>
298
+ >
299
+ >
300
+ > ## pinejs-client-js-7.1.3
301
+ > ### (2024-09-05)
302
+ >
303
+ > * Improve `upsert` typings [Pagan Gazzard]
304
+ >
305
+ > ## pinejs-client-js-7.1.2
306
+ > ### (2024-09-05)
307
+ >
308
+ > * Improve `getOrCreate` typings [Pagan Gazzard]
309
+ >
310
+ > ## pinejs-client-js-7.1.1
311
+ > ### (2024-09-04)
312
+ >
313
+ > * Improve typings for `subscribe` function [Pagan Gazzard]
314
+ > * Fix typing for subscribe `on('data')` method [Pagan Gazzard]
315
+ >
316
+ > ## pinejs-client-js-7.1.0
317
+ > ### (2024-09-02)
318
+ >
319
+ > * Deprecate `prepare` without expected parameter aliases [Pagan Gazzard]
320
+ > * Add the option to list expected parameter aliases when preparing a query [Pagan Gazzard]
321
+ >
322
+ > ## pinejs-client-js-7.0.3
323
+ > ### (Invalid date)
324
+ >
325
+ > * Fix typings for `request` method when using `method: 'GET'` [Pagan Gazzard]
326
+ >
327
+ > ## pinejs-client-js-7.0.2
328
+ > ### (Invalid date)
329
+ >
330
+ > * Reduce overloads for `get` by improving `OptionsToResponse` type helper [Pagan Gazzard]
331
+ >
332
+
333
+ </details>
334
+
335
+ # v18.2.2
336
+ ## (2024-09-05)
337
+
338
+ * Remove unused dev dependencies [Pagan Gazzard]
11
339
 
12
340
  # v18.2.1
13
341
  ## (2024-08-30)
package/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM node:16-alpine as runner
1
+ FROM node:20-alpine as runner
2
2
 
3
3
  WORKDIR /usr/src/pine
4
4
 
@@ -10,5 +10,3 @@ FROM runner as sut
10
10
  CMD npm run mocha
11
11
 
12
12
  FROM runner
13
-
14
-
package/VERSION CHANGED
@@ -1 +1 @@
1
- 18.3.0
1
+ 19.0.0
package/build/browser.ts CHANGED
@@ -1,26 +1,39 @@
1
1
  import * as webpack from 'webpack';
2
+ import type { Configuration } from 'webpack';
2
3
  import sharedConfig from './config';
3
- const config = { ...sharedConfig };
4
4
 
5
- const root = config.entry;
6
- config.entry = `${root}/src/server-glue/server`;
7
-
8
- // Disable node express and load express-emulator instead
9
- config.externals['express'] = false;
10
- config.resolve.alias ??= {};
11
- const resolveAlias = config.resolve.alias;
12
- if (Array.isArray(resolveAlias)) {
5
+ if (typeof sharedConfig.externals !== 'object') {
6
+ throw new Error('Expected externals to be an object');
7
+ }
8
+ if (Array.isArray(sharedConfig.resolve.alias)) {
13
9
  throw new Error('Expected resolve.alias to be an object');
14
10
  }
15
- resolveAlias.express = `${root}/src/express-emulator/express`;
16
11
 
17
- config.plugins = config.plugins.concat(
18
- new webpack.DefinePlugin({
19
- 'process.browser': true,
20
- 'process.env.CONFIG_LOADER_DISABLED': true,
21
- 'process.env.PINEJS_DEBUG': true,
22
- 'process.env.SBVR_SERVER_ENABLED': true,
23
- }),
24
- );
12
+ const root = sharedConfig.entry;
13
+ const config: Configuration = {
14
+ ...sharedConfig,
15
+ entry: `${root}/src/server-glue/server`,
16
+ externals: {
17
+ ...sharedConfig.externals,
18
+ // Disable node express and load express-emulator instead
19
+ express: false,
20
+ },
21
+ resolve: {
22
+ ...sharedConfig.resolve,
23
+ alias: {
24
+ ...sharedConfig.resolve.alias,
25
+ express: `${root}/src/express-emulator/express`,
26
+ },
27
+ },
28
+ plugins: [
29
+ ...sharedConfig.plugins,
30
+ new webpack.DefinePlugin({
31
+ 'process.browser': true,
32
+ 'process.env.CONFIG_LOADER_DISABLED': true,
33
+ 'process.env.PINEJS_DEBUG': true,
34
+ 'process.env.SBVR_SERVER_ENABLED': true,
35
+ }),
36
+ ],
37
+ };
25
38
 
26
39
  export default config;
package/build/config.ts CHANGED
@@ -2,9 +2,17 @@ import type { RequiredField } from '../src/sbvr-api/common-types';
2
2
 
3
3
  import * as path from 'path';
4
4
  import * as webpack from 'webpack';
5
+ import type { Configuration } from 'webpack';
5
6
  const root = path.dirname(__dirname);
6
7
 
7
- export default {
8
+ const config: RequiredField<
9
+ Configuration,
10
+ 'plugins' | 'resolve' | 'externals'
11
+ > & {
12
+ externals: {
13
+ [index: string]: string | boolean | string[] | { [index: string]: any };
14
+ };
15
+ } = {
8
16
  mode: 'production',
9
17
  devtool: 'source-map',
10
18
  entry: root,
@@ -58,11 +66,6 @@ export default {
58
66
  },
59
67
  ],
60
68
  },
61
- } as RequiredField<
62
- webpack.Configuration,
63
- 'plugins' | 'resolve' | 'externals'
64
- > & {
65
- externals: {
66
- [index: string]: string | boolean | string[] | { [index: string]: any };
67
- };
68
69
  };
70
+
71
+ export default config;
package/build/module.ts CHANGED
@@ -1,20 +1,24 @@
1
1
  import * as webpack from 'webpack';
2
+ import type { Configuration } from 'webpack';
2
3
  import sharedConfig from './config';
3
- const config = { ...sharedConfig };
4
4
 
5
- config.entry = `${config.entry}/src/server-glue/module`;
6
- config.plugins = config.plugins.concat(
7
- new webpack.DefinePlugin({
8
- 'process.browser': false,
5
+ const config: Configuration = {
6
+ ...sharedConfig,
7
+ entry: `${sharedConfig.entry}/src/server-glue/module`,
8
+ plugins: [
9
+ ...sharedConfig.plugins,
10
+ new webpack.DefinePlugin({
11
+ 'process.browser': false,
9
12
 
10
- 'process.env.CONFIG_LOADER_DISABLED': false,
11
- 'process.env.SBVR_SERVER_ENABLED': false,
12
- }),
13
- // When we're compiling the module build we want to always ignore the server build file
14
- new webpack.IgnorePlugin({
15
- resourceRegExp: /server/,
16
- contextRegExp: /server-glue/,
17
- }),
18
- );
13
+ 'process.env.CONFIG_LOADER_DISABLED': false,
14
+ 'process.env.SBVR_SERVER_ENABLED': false,
15
+ }),
16
+ // When we're compiling the module build we want to always ignore the server build file
17
+ new webpack.IgnorePlugin({
18
+ resourceRegExp: /server/,
19
+ contextRegExp: /server-glue/,
20
+ }),
21
+ ],
22
+ };
19
23
 
20
24
  export default config;
package/build/server.ts CHANGED
@@ -1,15 +1,19 @@
1
1
  import * as webpack from 'webpack';
2
+ import type { Configuration } from 'webpack';
2
3
  import sharedConfig from './config';
3
- const config = { ...sharedConfig };
4
4
 
5
- config.entry = `${config.entry}/src/server-glue/server`;
6
- config.plugins = config.plugins.concat(
7
- new webpack.DefinePlugin({
8
- 'process.browser': false,
5
+ const config: Configuration = {
6
+ ...sharedConfig,
7
+ entry: `${sharedConfig.entry}/src/server-glue/server`,
8
+ plugins: [
9
+ ...sharedConfig.plugins,
10
+ new webpack.DefinePlugin({
11
+ 'process.browser': false,
9
12
 
10
- 'process.env.CONFIG_LOADER_DISABLED': false,
11
- 'process.env.SBVR_SERVER_ENABLED': false,
12
- }),
13
- );
13
+ 'process.env.CONFIG_LOADER_DISABLED': false,
14
+ 'process.env.SBVR_SERVER_ENABLED': false,
15
+ }),
16
+ ],
17
+ };
14
18
 
15
19
  export default config;
@@ -58,9 +58,6 @@ export interface Database extends BaseDatabase {
58
58
  executeSql: (this: Database, sql: Sql, bindings?: Bindings) => Promise<Result>;
59
59
  transaction: TransactionFn;
60
60
  readTransaction: TransactionFn;
61
- on?: (name: 'notification', fn: (...args: any[]) => Promise<void>, options?: {
62
- channel?: string;
63
- }) => void;
64
61
  }
65
62
  interface EngineParams {
66
63
  [engine: string]: (options: unknown) => Database;
@@ -519,50 +519,9 @@ if (maybePg != null) {
519
519
  `);
520
520
  }
521
521
  }
522
- async function listen(channel, fn) {
523
- let listenerClient = null;
524
- const reconnect = () => {
525
- try {
526
- listenerClient?.release();
527
- }
528
- catch (err) {
529
- }
530
- setTimeout(() => {
531
- void listen(channel, fn);
532
- }, 1000);
533
- };
534
- try {
535
- listenerClient = await pool.connect();
536
- listenerClient.on('end', reconnect);
537
- listenerClient.on('notification', (msg) => {
538
- if (msg.channel === channel) {
539
- void fn(msg).catch((err) => {
540
- console.error(`Error handling message for '${channel}':`, err);
541
- });
542
- }
543
- });
544
- await listenerClient.query(`LISTEN "${channel}"`);
545
- }
546
- catch (err) {
547
- console.error(`Error setting up listener client for '${channel}':`, err);
548
- reconnect();
549
- }
550
- }
551
522
  return {
552
523
  engine: "postgres",
553
524
  executeSql: atomicExecuteSql,
554
- on: async (name, fn, options) => {
555
- if (name !== 'notification') {
556
- throw new Error(`Unsupported listener type: ${name}`);
557
- }
558
- else if (options?.channel == null) {
559
- throw new Error('Missing channel option for notification listener');
560
- }
561
- else if (options.channel.includes('"')) {
562
- throw new Error(`Invalid channel name for task LISTEN: ${options.channel}`);
563
- }
564
- await listen(options.channel, fn);
565
- },
566
525
  transaction: createTransaction(async (stackTraceErr, timeoutMS) => {
567
526
  const client = await pool.connect();
568
527
  const tx = new PostgresTx(client, false, stackTraceErr, timeoutMS);