@opengis/fastify-table 1.0.94 → 1.0.95

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
@@ -1,5 +1,9 @@
1
1
  # fastify-table
2
2
 
3
+ ## 1.0.95 - 12.09.2024
4
+
5
+ - add dbname to getFolder func
6
+
3
7
  ## 1.0.94 - 11.09.2024
4
8
 
5
9
  - fix getMeta (public schema)
package/index.js CHANGED
@@ -43,7 +43,7 @@ async function plugin(fastify, opt) {
43
43
  fastify.decorate('getFolder', (req, type = 'server') => {
44
44
  if (!['server', 'local'].includes(type)) throw new Error('params type is invalid');
45
45
  const types = { local: req.root || config.root, server: req.mapServerRoot || config.mapServerRoot };
46
- const filepath = path.posix.join(types[type] || '/data/local', req.folder || config.folder || '');
46
+ const filepath = path.posix.join(types[type] || `/data/local/${req.pg?.options?.database || ''}`, req.folder || config.folder || '');
47
47
  return filepath;
48
48
  });
49
49
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/fastify-table",
3
- "version": "1.0.94",
3
+ "version": "1.0.95",
4
4
  "type": "module",
5
5
  "description": "core-plugins",
6
6
  "main": "index.js",