@opengis/fastify-table 2.0.103 → 2.0.104

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":"getPG.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/pg/funcs/getPG.ts"],"names":[],"mappings":"AAQA,iBAAS,KAAK,CAAC,KAAK,GAAE,GAAQ,OAsD7B;AAMD,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"getPG.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/pg/funcs/getPG.ts"],"names":[],"mappings":"AAQA,iBAAS,KAAK,CAAC,KAAK,GAAE,GAAQ,OAuD7B;AAMD,eAAe,KAAK,CAAC"}
@@ -33,6 +33,7 @@ function getPG(param = {}) {
33
33
  return null;
34
34
  }
35
35
  pgClients[name] = pool(dbConfig);
36
+ pgClients[name].init = () => init(pgClients[name]); // for compatibility
36
37
  // force init
37
38
  init(pgClients[name]).catch((err) => console.warn("pg client init error", host, port, dbConfig.database));
38
39
  return pgClients[name];
@@ -1 +1 @@
1
- {"version":3,"file":"pool.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/pg/funcs/pool.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,CAAC;yBAqB7B,QAAO,GAAQ;AAA/B,wBAuEE"}
1
+ {"version":3,"file":"pool.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/pg/funcs/pool.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,CAAC;yBAqB7B,QAAO,GAAQ;AAA/B,wBAsEE"}
@@ -25,7 +25,7 @@ process.on("uncaughtException", (err) => {
25
25
  export default (param = {}) => {
26
26
  if (!config.pg)
27
27
  return null;
28
- const { name = "client" } = param;
28
+ const { name = param.database || "client" } = param;
29
29
  // return inited client
30
30
  if (pgClients[name]?.tlist)
31
31
  return pgClients[name];
@@ -58,7 +58,6 @@ export default (param = {}) => {
58
58
  });
59
59
  inited[param.database] = 1;
60
60
  }
61
- // client.options = param;
62
61
  if (config.trace) {
63
62
  console.log("PG client connected", param.database);
64
63
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/fastify-table",
3
- "version": "2.0.103",
3
+ "version": "2.0.104",
4
4
  "type": "module",
5
5
  "description": "core-plugins",
6
6
  "keywords": [