@opengis/fastify-table 2.0.10 → 2.0.11

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/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import fp from 'fastify-plugin';
1
+ import fp from "fastify-plugin";
2
2
  import path from "node:path";
3
3
  import { existsSync, readdirSync, readFileSync } from "node:fs";
4
4
  import { fileURLToPath } from "node:url";
@@ -35,11 +35,13 @@ import menuRoutes from "./server/routes/menu/index.js";
35
35
  import templatesRoutes from "./server/routes/templates/index.js";
36
36
  import widgetRoutes from "./server/routes/widget/index.js";
37
37
  import authRoutes from "./server/routes/auth/index.js";
38
+ import fileRoutes from "./server/routes/file/index.js";
39
+ import grpcRoutes from "./server/routes/grpc/index.js";
38
40
  // core templates && cls
39
41
  const filename = fileURLToPath(import.meta.url);
40
42
  const cwd = path.dirname(filename);
41
43
  function plugin(fastify) {
42
- const opt = { prefix: '/api' };
44
+ const opt = { prefix: "/api" };
43
45
  // fastify.register(import('@fastify/sensible'), {
44
46
  // errorHandler: false,
45
47
  // });
@@ -97,15 +99,15 @@ function plugin(fastify) {
97
99
  });
98
100
  }
99
101
  if (config.dblist) {
100
- dblistRoutes(fastify);
102
+ fastify.register(dblistRoutes, opt);
101
103
  }
102
104
  // routes / api
103
- cronRoutes(fastify);
105
+ fastify.register(cronRoutes, opt);
104
106
  fastify.register(crudRoutes, opt);
105
- loggerRoutes(fastify);
107
+ fastify.register(loggerRoutes);
106
108
  fastify.register(propertiesRoutes, opt);
107
109
  fastify.register(tableRoutes, opt);
108
- utilRoutes(fastify);
110
+ fastify.register(utilRoutes, opt);
109
111
  fastify.register(accessRoutes, opt);
110
112
  fastify.register(widgetRoutes, opt);
111
113
  fastify.register(menuRoutes, opt);
@@ -117,8 +119,8 @@ function plugin(fastify) {
117
119
  fileSize: maxFileSize * 1024 * 1024,
118
120
  },
119
121
  }); // content parser, await before adding upload routes
120
- fastify.register(import("./server/routes/file/index.js"), opt);
121
- fastify.register(import("./server/routes/grpc/index.js"), opt);
122
+ fastify.register(fileRoutes);
123
+ fastify.register(grpcRoutes, opt);
122
124
  config.proxy?.forEach?.((el) => {
123
125
  if (execName === "bun") {
124
126
  fastify.all(`${el.source}/*`, async (req, reply) => {
@@ -13,7 +13,7 @@ const propertiesSchema = {
13
13
  },
14
14
  };
15
15
  async function plugin(app, opt = {}) {
16
- app.get("/settings-app/:entity?", { config: { role: "admin" }, schema: propertiesSchema }, getAppSettings);
16
+ app.get("/settings-app/:entity?", { config: { policy: "L0" }, schema: propertiesSchema }, getAppSettings);
17
17
  app.post("/settings-app/:entity?", { config: { role: "admin" } }, postAppSettings);
18
18
  }
19
19
  export default plugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/fastify-table",
3
- "version": "2.0.10",
3
+ "version": "2.0.11",
4
4
  "type": "module",
5
5
  "description": "core-plugins",
6
6
  "keywords": [