@opengis/fastify-table 1.0.36 → 1.0.37

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.
Files changed (46) hide show
  1. package/Changelog.md +4 -0
  2. package/crud/controllers/insert.js +29 -29
  3. package/crud/controllers/update.js +31 -31
  4. package/crud/funcs/getOpt.js +10 -10
  5. package/crud/funcs/setOpt.js +16 -16
  6. package/crud/index.js +29 -29
  7. package/helper.js +28 -28
  8. package/notification/controllers/userNotifications.js +19 -19
  9. package/notification/funcs/addNotification.js +8 -8
  10. package/notification/index.js +19 -19
  11. package/package.json +1 -1
  12. package/pg/pgClients.js +20 -20
  13. package/policy/funcs/checkPolicy.js +74 -74
  14. package/policy/funcs/sqlInjection.js +33 -33
  15. package/policy/index.js +14 -14
  16. package/redis/client.js +8 -8
  17. package/redis/funcs/redisClients.js +2 -2
  18. package/redis/index.js +19 -19
  19. package/server/templates/form/test.dataset.form.json +411 -411
  20. package/server/templates/select/test.storage.data.json +2 -2
  21. package/server/templates/table/test.dataset.table.json +24 -24
  22. package/table/controllers/data.js +57 -57
  23. package/table/controllers/form.js +10 -10
  24. package/table/controllers/suggest.js +60 -60
  25. package/table/controllers/utils/getSelect.js +20 -20
  26. package/table/controllers/utils/getSelectMeta.js +66 -66
  27. package/table/controllers/utils/getTemplate.js +28 -28
  28. package/table/funcs/getFilterSQL/index.js +75 -75
  29. package/table/funcs/getFilterSQL/util/formatValue.js +142 -142
  30. package/table/funcs/getFilterSQL/util/getCustomQuery.js +13 -13
  31. package/table/funcs/getFilterSQL/util/getFilterQuery.js +73 -73
  32. package/table/funcs/getFilterSQL/util/getOptimizedQuery.js +12 -12
  33. package/table/funcs/metaFormat/getSelectVal.js +20 -20
  34. package/table/funcs/metaFormat/index.js +26 -26
  35. package/table/index.js +42 -42
  36. package/test/api/crud.test.js +56 -56
  37. package/test/api/crud.xss.test.js +71 -71
  38. package/test/api/notification.test.js +37 -37
  39. package/test/api/table.test.js +57 -57
  40. package/test/funcs/notification.test.js +31 -31
  41. package/widget/controllers/utils/historyFormat.js +76 -76
  42. package/widget/controllers/utils/obj2db.js +13 -13
  43. package/widget/controllers/widget.del.js +44 -41
  44. package/widget/controllers/widget.get.js +86 -77
  45. package/widget/controllers/widget.set.js +70 -64
  46. package/widget/index.js +29 -29
package/widget/index.js CHANGED
@@ -1,29 +1,29 @@
1
- import widgetDel from './controllers/widget.del.js';
2
- import widgetSet from './controllers/widget.set.js';
3
- import widgetGet from './controllers/widget.get.js';
4
-
5
- async function route(fastify, opt) {
6
- const prefix = opt.prefix || '/api';
7
- fastify.route({
8
- method: 'DELETE',
9
- url: `${prefix}/widget/:type/:objectid/:id`,
10
- schema: {},
11
- handler: widgetDel,
12
- });
13
- fastify.route({
14
- method: 'POST',
15
- path: `${prefix}/widget/:type/:objectid/:id?`,
16
- schema: {},
17
- handler: widgetSet,
18
- });
19
- fastify.route({
20
- method: 'GET',
21
- path: `${prefix}/widget/:type/:objectid`,
22
- config: {
23
- policy: ['public'],
24
- },
25
- schema: {},
26
- handler: widgetGet,
27
- });
28
- }
29
- export default route;
1
+ import widgetDel from './controllers/widget.del.js';
2
+ import widgetSet from './controllers/widget.set.js';
3
+ import widgetGet from './controllers/widget.get.js';
4
+
5
+ async function route(fastify, opt) {
6
+ const prefix = opt.prefix || '/api';
7
+ fastify.route({
8
+ method: 'DELETE',
9
+ url: `${prefix}/widget/:type/:objectid/:id`,
10
+ schema: {},
11
+ handler: widgetDel,
12
+ });
13
+ fastify.route({
14
+ method: 'POST',
15
+ path: `${prefix}/widget/:type/:objectid/:id?`,
16
+ schema: {},
17
+ handler: widgetSet,
18
+ });
19
+ fastify.route({
20
+ method: 'GET',
21
+ path: `${prefix}/widget/:type/:objectid`,
22
+ config: {
23
+ policy: ['public'],
24
+ },
25
+ schema: {},
26
+ handler: widgetGet,
27
+ });
28
+ }
29
+ export default route;