@opengis/fastify-table 1.0.71 → 1.0.73

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 (44) hide show
  1. package/.eslintrc.cjs +42 -42
  2. package/Changelog.md +229 -229
  3. package/README.md +26 -26
  4. package/cron/controllers/cronApi.js +22 -22
  5. package/cron/controllers/utils/cronList.js +1 -1
  6. package/cron/funcs/addCron.js +131 -131
  7. package/cron/index.js +10 -10
  8. package/crud/controllers/utils/checkXSS.js +45 -45
  9. package/crud/controllers/utils/xssInjection.js +72 -72
  10. package/crud/funcs/isFileExists.js +13 -13
  11. package/crud/funcs/setToken.js +53 -53
  12. package/index.js +97 -89
  13. package/migration/exec.migrations.js +75 -75
  14. package/notification/controllers/testEmail.js +49 -49
  15. package/notification/funcs/utils/sendEmail.js +39 -39
  16. package/notification/index.js +31 -31
  17. package/package.json +27 -25
  18. package/pg/funcs/getPG.js +30 -29
  19. package/redis/funcs/getRedis.js +23 -23
  20. package/server/migrations/crm.sql +150 -150
  21. package/server/migrations/log.sql +43 -43
  22. package/server.js +14 -14
  23. package/table/controllers/filter.js +37 -37
  24. package/table/controllers/search.js +72 -72
  25. package/table/controllers/suggest.js +2 -1
  26. package/table/controllers/utils/getSelectMeta.js +3 -3
  27. package/table/controllers/utils/getTemplate.js +28 -28
  28. package/table/controllers/utils/getTemplates.js +18 -18
  29. package/table/funcs/getFilterSQL/util/getTableSql.js +34 -34
  30. package/test/api/notification.test.js +37 -37
  31. package/test/api/table.test.js +57 -57
  32. package/test/api/widget.test.js +114 -114
  33. package/test/config.example +18 -18
  34. package/test/funcs/crud.test.js +76 -76
  35. package/test/funcs/notification.test.js +31 -31
  36. package/test/funcs/pg.test.js +34 -34
  37. package/test/funcs/redis.test.js +19 -19
  38. package/test/templates/cls/test.json +9 -9
  39. package/test/templates/form/cp_building.form.json +32 -32
  40. package/test/templates/select/account_id.json +3 -3
  41. package/test/templates/select/storage.data.json +2 -2
  42. package/test/templates/table/gis.dataset.table.json +20 -20
  43. package/util/controllers/next.id.js +4 -4
  44. package/util/index.js +13 -13
@@ -1,33 +1,33 @@
1
- {
2
- "schema": {
3
-
4
- "cp_umuni_id": {
5
- "type": "Text",
6
- "ua": "ID UMUNI"
7
- },
8
- "cp_year": {
9
- "type": "Text",
10
- "ua": "Рік будівництва"
11
- },
12
- "cp_date_en_audit": {
13
- "type": "DatePicker",
14
- "ua": "Дата проведення останнього енергоаудиту"
15
- },
16
- "cp_certificate": {
17
- "type": "Text",
18
- "ua": "Сертифікат енергоефективності будівлі",
19
- "help": "Вкажіть посилання"
20
- },
21
- "cp_pkd": {
22
- "type": "Autocomplete",
23
- "data": "customer_name",
24
- "add": {
25
- "model": "crm_acc.crm_account",
26
- "ua": "Додати",
27
- "form": "account_light.form"
28
- },
29
- "ua": "Замовник ПКД"
30
- }
31
- },
32
- "label_style": "vertical"
1
+ {
2
+ "schema": {
3
+
4
+ "cp_umuni_id": {
5
+ "type": "Text",
6
+ "ua": "ID UMUNI"
7
+ },
8
+ "cp_year": {
9
+ "type": "Text",
10
+ "ua": "Рік будівництва"
11
+ },
12
+ "cp_date_en_audit": {
13
+ "type": "DatePicker",
14
+ "ua": "Дата проведення останнього енергоаудиту"
15
+ },
16
+ "cp_certificate": {
17
+ "type": "Text",
18
+ "ua": "Сертифікат енергоефективності будівлі",
19
+ "help": "Вкажіть посилання"
20
+ },
21
+ "cp_pkd": {
22
+ "type": "Autocomplete",
23
+ "data": "customer_name",
24
+ "add": {
25
+ "model": "crm_acc.crm_account",
26
+ "ua": "Додати",
27
+ "form": "account_light.form"
28
+ },
29
+ "ua": "Замовник ПКД"
30
+ }
31
+ },
32
+ "label_style": "vertical"
33
33
  }
@@ -1,4 +1,4 @@
1
- {
2
- "db": "mbk_lviv_dma",
3
- "searchColumn": "alternative_name"
1
+ {
2
+ "db": "mbk_lviv_dma",
3
+ "searchColumn": "alternative_name"
4
4
  }
@@ -1,3 +1,3 @@
1
- {
2
- "key": "dataset_id"
1
+ {
2
+ "key": "dataset_id"
3
3
  }
@@ -1,21 +1,21 @@
1
- {
2
- "columns": [
3
- {
4
- "name": "dataset_id",
5
- "title": "22"
6
- },
7
- {
8
- "name": "dataset_name",
9
- "title": "dataset_name"
10
- }
11
- ],
12
- "table": "gis.dataset",
13
- "order": "dataset_name",
14
- "filters": [
15
- {
16
- "ua": "Назва набору",
17
- "name": "dataset_name",
18
- "type": "text"
19
- }
20
- ]
1
+ {
2
+ "columns": [
3
+ {
4
+ "name": "dataset_id",
5
+ "title": "22"
6
+ },
7
+ {
8
+ "name": "dataset_name",
9
+ "title": "dataset_name"
10
+ }
11
+ ],
12
+ "table": "gis.dataset",
13
+ "order": "dataset_name",
14
+ "filters": [
15
+ {
16
+ "ua": "Назва набору",
17
+ "name": "dataset_name",
18
+ "type": "text"
19
+ }
20
+ ]
21
21
  }
@@ -1,4 +1,4 @@
1
- export default async function nextId({ pg }) {
2
- const { id } = await pg.one('select next_id() as id');
3
- return { id: id.toString() };
4
- };
1
+ export default async function nextId({ pg }) {
2
+ const { id } = await pg.one('select next_id() as id');
3
+ return { id: id.toString() };
4
+ };
package/util/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import getExtraProperties from './controllers/properties.get.js';
2
- import addExtraProperties from './controllers/properties.add.js';
3
- import nextId from './controllers/next.id.js';
4
-
5
- async function plugin(fastify, config = {}) {
6
- const prefix = config.prefix || '/api';
7
-
8
- fastify.get(`${prefix}/next-id`, {}, nextId);
9
- fastify.get(`${prefix}/properties/:id`, {}, getExtraProperties);
10
- fastify.post(`${prefix}/properties/:id`, {}, addExtraProperties);
11
- }
12
-
13
- export default plugin;
1
+ import getExtraProperties from './controllers/properties.get.js';
2
+ import addExtraProperties from './controllers/properties.add.js';
3
+ import nextId from './controllers/next.id.js';
4
+
5
+ async function plugin(fastify, config = {}) {
6
+ const prefix = config.prefix || '/api';
7
+
8
+ fastify.get(`${prefix}/next-id`, {}, nextId);
9
+ fastify.get(`${prefix}/properties/:id`, {}, getExtraProperties);
10
+ fastify.post(`${prefix}/properties/:id`, {}, addExtraProperties);
11
+ }
12
+
13
+ export default plugin;