@opengis/fastify-table 1.3.1 → 1.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/fastify-table",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "type": "module",
5
5
  "description": "core-plugins",
6
6
  "keywords": [
@@ -31,7 +31,7 @@
31
31
  "@fastify/http-proxy": "9.5.0",
32
32
  "@fastify/sensible": "^5.0.0",
33
33
  "@fastify/url-data": "5.4.0",
34
- "@opengis/fastify-hb": "^1.7.1",
34
+ "@opengis/fastify-hb": "^1.7.2",
35
35
  "fastify": "^4.26.1",
36
36
  "fastify-plugin": "^4.0.0",
37
37
  "ioredis": "5.3.2",
@@ -3,11 +3,11 @@ import getPG from './getPG.js';
3
3
  const data = {};
4
4
 
5
5
  // decorator
6
- export default async function getMeta(opt) {
6
+ export default async function getMeta(opt, nocache) {
7
7
  const pg = opt?.pg || getPG({ name: 'client' });
8
8
  const table = opt?.table || opt;
9
9
 
10
- if (data[pg.options.database]?.[table]) return data[pg.options.database][table];
10
+ if (data[pg.options.database]?.[table] && !nocache) return data[pg.options.database][table];
11
11
 
12
12
  if (!pg.tlist?.includes(table?.replace?.(/"/g, ''))) {
13
13
  return { error: `${table} - not found`, status: 400 };