@opengis/fastify-table 1.1.8 → 1.1.9

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 (110) hide show
  1. package/.eslintrc.cjs +42 -42
  2. package/Changelog.md +305 -301
  3. package/README.md +26 -26
  4. package/config.js +10 -10
  5. package/cron/controllers/cronApi.js +22 -22
  6. package/cron/controllers/utils/cronList.js +1 -1
  7. package/cron/funcs/addCron.js +131 -131
  8. package/cron/index.js +10 -10
  9. package/crud/controllers/deleteCrud.js +22 -22
  10. package/crud/controllers/insert.js +61 -61
  11. package/crud/controllers/update.js +62 -62
  12. package/crud/controllers/utils/checkXSS.js +45 -45
  13. package/crud/controllers/utils/xssInjection.js +72 -72
  14. package/crud/funcs/dataDelete.js +19 -19
  15. package/crud/funcs/dataInsert.js +30 -30
  16. package/crud/funcs/dataUpdate.js +36 -30
  17. package/crud/funcs/getAccess.js +53 -53
  18. package/crud/funcs/getOpt.js +10 -10
  19. package/crud/funcs/getToken.js +27 -27
  20. package/crud/funcs/isFileExists.js +13 -13
  21. package/crud/funcs/setOpt.js +16 -16
  22. package/crud/funcs/setToken.js +53 -53
  23. package/crud/funcs/utils/logChanges.js +76 -74
  24. package/crud/index.js +36 -36
  25. package/helper.js +28 -28
  26. package/index.js +97 -97
  27. package/migration/exec.migrations.js +79 -79
  28. package/notification/controllers/testEmail.js +49 -49
  29. package/notification/controllers/userNotifications.js +19 -19
  30. package/notification/funcs/addNotification.js +8 -8
  31. package/notification/funcs/sendNotification.js +111 -111
  32. package/notification/funcs/utils/sendEmail.js +39 -39
  33. package/notification/index.js +38 -38
  34. package/package.json +26 -26
  35. package/pg/funcs/getMeta.js +27 -27
  36. package/pg/funcs/getPG.js +30 -30
  37. package/pg/pgClients.js +20 -20
  38. package/policy/funcs/checkPolicy.js +83 -83
  39. package/policy/funcs/sqlInjection.js +33 -33
  40. package/policy/index.js +14 -14
  41. package/redis/client.js +8 -8
  42. package/redis/funcs/getRedis.js +23 -23
  43. package/redis/funcs/redisClients.js +2 -2
  44. package/redis/index.js +19 -19
  45. package/server/migrations/0.sql +78 -78
  46. package/server/migrations/crm.sql +150 -150
  47. package/server/migrations/log.sql +80 -80
  48. package/server/migrations/properties.sql +30 -30
  49. package/server/migrations/roles.sql +164 -164
  50. package/server/migrations/users.sql +89 -89
  51. package/server.js +14 -14
  52. package/table/controllers/card.js +44 -44
  53. package/table/controllers/data.js +103 -103
  54. package/table/controllers/filter.js +37 -37
  55. package/table/controllers/form.js +28 -28
  56. package/table/controllers/search.js +80 -80
  57. package/table/controllers/suggest.js +79 -79
  58. package/table/controllers/table.js +52 -52
  59. package/table/controllers/utils/addTemplateDir.js +8 -8
  60. package/table/controllers/utils/getSelect.js +19 -19
  61. package/table/controllers/utils/getSelectMeta.js +66 -66
  62. package/table/controllers/utils/getTemplate_old.js +28 -28
  63. package/table/controllers/utils/getTemplates.js +18 -18
  64. package/table/controllers/utils/gisIRColumn.js +68 -68
  65. package/table/controllers/utils/loadTemplate.js +1 -1
  66. package/table/controllers/utils/loadTemplatePath.js +1 -1
  67. package/table/controllers/utils/userTemplateDir.js +1 -1
  68. package/table/funcs/getFilterSQL/index.js +79 -79
  69. package/table/funcs/getFilterSQL/util/formatValue.js +142 -142
  70. package/table/funcs/getFilterSQL/util/getCustomQuery.js +13 -13
  71. package/table/funcs/getFilterSQL/util/getFilterQuery.js +73 -73
  72. package/table/funcs/getFilterSQL/util/getOptimizedQuery.js +12 -12
  73. package/table/funcs/getFilterSQL/util/getTableSql.js +34 -34
  74. package/table/funcs/metaFormat/getSelectVal.js +20 -20
  75. package/table/funcs/metaFormat/index.js +28 -28
  76. package/table/index.js +84 -84
  77. package/test/api/crud.test.js +89 -89
  78. package/test/api/crud.xss.test.js +72 -72
  79. package/test/api/notification.test.js +37 -37
  80. package/test/api/suggest.test.js +66 -66
  81. package/test/api/table.test.js +89 -89
  82. package/test/api/widget.test.js +117 -117
  83. package/test/config.example +18 -18
  84. package/test/funcs/pg.test.js +34 -34
  85. package/test/funcs/redis.test.js +19 -19
  86. package/test/templates/cls/test.json +9 -9
  87. package/test/templates/form/cp_building.form.json +32 -32
  88. package/test/templates/select/account_id.json +3 -3
  89. package/test/templates/select/storage.data.json +2 -2
  90. package/test/templates/select/test.storage.data.json +3 -3
  91. package/test/templates/select/test.suggest.ato_new.json +3 -3
  92. package/test/templates/select/test.suggest.ato_new.sql +25 -25
  93. package/test/templates/select/test.suggest.data.json +4 -4
  94. package/test/templates/select/test.suggest.parent.sql +1 -1
  95. package/test/templates/table/gis.dataset.table.json +20 -20
  96. package/util/controllers/logger.file.js +90 -90
  97. package/util/controllers/next.id.js +4 -4
  98. package/util/controllers/properties.add.js +57 -57
  99. package/util/controllers/properties.get.js +19 -19
  100. package/util/controllers/status.monitor.js +8 -8
  101. package/util/controllers/utils/checkUserAccess.js +19 -19
  102. package/util/controllers/utils/getRootDir.js +20 -20
  103. package/util/index.js +23 -23
  104. package/utils.js +48 -48
  105. package/widget/controllers/utils/historyFormat.js +76 -76
  106. package/widget/controllers/utils/obj2db.js +13 -13
  107. package/widget/controllers/widget.del.js +44 -44
  108. package/widget/controllers/widget.get.js +98 -98
  109. package/widget/controllers/widget.set.js +76 -76
  110. package/widget/index.js +40 -40
package/.eslintrc.cjs CHANGED
@@ -1,42 +1,42 @@
1
- /* eslint-env node */
2
-
3
- module.exports = {
4
- env: {
5
- node: true,
6
- },
7
- root: true,
8
- extends: [
9
- 'eslint:recommended',
10
- 'airbnb-base',
11
-
12
- ],
13
- rules: {
14
- 'brace-style': [2, 'stroustrup', { allowSingleLine: true }],
15
- 'vue/max-attributes-per-line': 0,
16
- 'vue/valid-v-for': 0,
17
-
18
- // allow async-await
19
- 'generator-star-spacing': 'off',
20
-
21
- // allow paren-less arrow functions
22
- 'arrow-parens': 0,
23
- 'one-var': 0,
24
- 'max-len': 0,
25
- 'import/first': 0,
26
- 'import/named': 2,
27
- 'import/namespace': 2,
28
- 'import/default': 2,
29
- 'import/export': 2,
30
- 'import/extensions': 0,
31
- 'no-console': ['warn', { allow: ['warn', 'error'] }],
32
- 'import/no-unresolved': 0,
33
- 'import/no-extraneous-dependencies': 0,
34
- 'linebreak-style': 0,
35
- // allow debugger during development
36
- 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
37
- },
38
-
39
- parserOptions: {
40
- ecmaVersion: 'latest',
41
- },
42
- };
1
+ /* eslint-env node */
2
+
3
+ module.exports = {
4
+ env: {
5
+ node: true,
6
+ },
7
+ root: true,
8
+ extends: [
9
+ 'eslint:recommended',
10
+ 'airbnb-base',
11
+
12
+ ],
13
+ rules: {
14
+ 'brace-style': [2, 'stroustrup', { allowSingleLine: true }],
15
+ 'vue/max-attributes-per-line': 0,
16
+ 'vue/valid-v-for': 0,
17
+
18
+ // allow async-await
19
+ 'generator-star-spacing': 'off',
20
+
21
+ // allow paren-less arrow functions
22
+ 'arrow-parens': 0,
23
+ 'one-var': 0,
24
+ 'max-len': 0,
25
+ 'import/first': 0,
26
+ 'import/named': 2,
27
+ 'import/namespace': 2,
28
+ 'import/default': 2,
29
+ 'import/export': 2,
30
+ 'import/extensions': 0,
31
+ 'no-console': ['warn', { allow: ['warn', 'error'] }],
32
+ 'import/no-unresolved': 0,
33
+ 'import/no-extraneous-dependencies': 0,
34
+ 'linebreak-style': 0,
35
+ // allow debugger during development
36
+ 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
37
+ },
38
+
39
+ parserOptions: {
40
+ ecmaVersion: 'latest',
41
+ },
42
+ };
package/Changelog.md CHANGED
@@ -1,301 +1,305 @@
1
- # fastify-table
2
-
3
- ## 1.1.6 - 19.09.2024
4
-
5
- - add more funcs to utils export
6
-
7
- ## 1.0.97 - 13.09.2024
8
-
9
- - add migrations
10
-
11
- ## 1.0.96 - 12.09.2024
12
-
13
- - minor refactor of email notifications
14
-
15
- ## 1.0.95 - 12.09.2024
16
-
17
- - add dbname to getFolder func
18
-
19
- ## 1.0.94 - 11.09.2024
20
-
21
- - fix getMeta (public schema)
22
-
23
- ## 1.0.93 - 05.09.2024
24
-
25
- - fix data API with sql columns filter
26
-
27
- ## 1.0.92 - 03.09.2024
28
-
29
- - fix getTemplate
30
-
31
- ## 1.0.91 - 30.08.2024
32
-
33
- - add CRUD and Auth logs
34
-
35
- ## 1.0.90 - 27.08.2024
36
-
37
- - logger file API to core
38
-
39
- ## 1.0.89 - 26.08.2024
40
-
41
- - data API meta bbox polyline support
42
-
43
- ## 1.0.87 - 26.08.2024
44
-
45
- - change of null handling method of update crud API
46
-
47
- ## 1.0.86 - 23.08.2024
48
-
49
- - data API meta cls support
50
-
51
- ## 1.0.84 - 22.08.2024
52
-
53
- - suggest table:column support
54
-
55
- ## 1.0.83 - 20.08.2024
56
-
57
- - code optimization
58
-
59
- ## 1.0.81 - 15.08.2024
60
-
61
- - refactor /table API
62
-
63
- ## 1.0.78 - 14.08.2024
64
-
65
- - add sqlColumns to /api/data/:table/?:id
66
-
67
- ## 1.0.77 - 13.08.2024
68
-
69
- - add statusMonitor API
70
-
71
- ## 1.0.75 - 12.08.2024
72
-
73
- - something do
74
-
75
- ## 1.0.71 - 01.08.2024
76
-
77
- - add compile settings to form
78
-
79
- ## 1.0.70 - 29.07.2024
80
-
81
- - add cron funcs and API
82
-
83
- ## 1.0.69 - 26.07.2024
84
-
85
- - add column classifier mode for data API
86
-
87
- ## 1.0.68 - 26.07.2024
88
-
89
- - code optimization
90
-
91
- ## 1.0.66 - 25.07.2024
92
-
93
- - add notification compile template from data params support
94
-
95
- ## 1.0.65 - 23.07.2024
96
-
97
- - add rest API token support
98
-
99
- ## 1.0.62 - 22.07.2024
100
-
101
- - add email notification func and test api
102
-
103
- ## 1.0.61 - 18.07.2024
104
-
105
- - add custom actions for table
106
-
107
- ## 1.0.60 - 12.07.2024
108
-
109
- - code optimization
110
-
111
- ## 1.0.59 - 12.07.2024
112
-
113
- - code optimization
114
-
115
- ## 1.0.58 - 08.07.2024
116
-
117
- - code optimization
118
-
119
- ## 1.0.57 - 04.07.2024
120
-
121
- - fix crud update boolean column
122
-
123
- ## 1.0.56 - 04.07.2024
124
-
125
- - code optimization
126
-
127
- ## 1.0.55 - 02.07.2024
128
-
129
- - callback support
130
-
131
- ## 1.0.54 - 01.07.2024
132
-
133
- - code optimization
134
-
135
- ## 1.0.53 - 28.06.2024
136
-
137
- - add migrations support
138
-
139
- ## 1.0.52 - 28.06.2024
140
-
141
- - add table get api
142
-
143
- ## 1.0.51 - 27.06.2024
144
-
145
- - add next-id api
146
-
147
- ## 1.0.50 - 27.06.2024
148
-
149
- - refactor search api
150
-
151
- ## 1.0.49 - 26.06.2024
152
-
153
- - refactor - npm settings
154
-
155
- ## 1.0.48 - 26.06.2024
156
-
157
- - search api no specified table mode support
158
-
159
- ## 1.0.47 - 25.06.2024
160
-
161
- - add extra properties support
162
-
163
- ## 1.0.46 - 24.06.2024
164
-
165
- - fix data api edit geometry
166
-
167
- ## 1.0.45 - 19.06.2024
168
-
169
- - fix data api table template order
170
-
171
- ## 1.0.44 - 18.06.2024
172
-
173
- - add extra data support (form DataTable)
174
-
175
- ## 1.0.43 - 14.06.2024
176
-
177
- - add settings api, funcs, migration
178
-
179
- ## 1.0.42 - 12.06.2024
180
-
181
- - table cardSql support
182
-
183
- ## 1.0.41 - 12.06.2024
184
-
185
- - cls to db (crm.cls)
186
-
187
- ## 1.0.40 - 12.06.2024
188
-
189
- - fix widget GET API
190
-
191
- ## 1.0.39 - 29.05.2024
192
-
193
- - add getFolder func
194
-
195
- ## 1.0.37 - 23.05.2024
196
-
197
- - add gallery widget
198
-
199
- ## 1.0.36 - 22.05.2024
200
-
201
- - fix filter api array processing
202
-
203
- ## 1.0.31 - 20.05.2024
204
-
205
- - widget db structure refactor
206
-
207
- ## 1.0.30 - 17.05.2024
208
-
209
- - code optimization
210
-
211
- ## 1.0.29 - 17.05.2024
212
-
213
- - widget api post (file)
214
-
215
- ## 1.0.28 - 14.05.2024
216
-
217
- - dblist api set
218
-
219
- ## 1.0.27 - 12.05.2024
220
-
221
- - code optimization
222
-
223
- ## 1.0.26 - 09.05.2024
224
-
225
- - fix getTableSql
226
-
227
- ## 1.0.25 - 08.05.2024
228
-
229
- - decorator to hook
230
-
231
- ## 1.0.24 - 07.05.2024
232
-
233
- - getTemplate page
234
-
235
- ## 1.0.23 - 07.05.2024
236
-
237
- - getTemplate funcs
238
- - dblist api
239
-
240
- ## 1.0.22 - 03.05.2024
241
-
242
- - getFilterSQL funcs
243
-
244
- ## 1.0.21 - 03.05.2024
245
-
246
- - fix widget db structure
247
-
248
- ## 1.0.20 - 03.05.2024
249
-
250
- - fix filter separator
251
-
252
- ## 1.0.19 - 02.05.2024
253
-
254
- - widget plugin
255
- - notification plugin
256
-
257
- ## 1.0.9 - 29.04.2024
258
-
259
- - crud token support
260
- - security - xss restriction
261
-
262
- ## 1.0.8 - 29.04.2024
263
-
264
- - filter fix
265
-
266
- ## 1.0.7 - 26.04.2024
267
-
268
- - code optimization
269
-
270
- ## 1.0.6 - 25.04.2024
271
-
272
- - code optimization
273
-
274
- ## 1.0.5 - 24.04.2024
275
-
276
- - code optimization
277
-
278
- ## 1.0.4 - 20.04.2024
279
-
280
- - data api - order
281
- - suggest api - db support
282
- - del api fix
283
-
284
- ## 1.0.3 - 17.04.2024
285
-
286
- - fix unit test
287
-
288
- ## 1.0.2 - 14.04.2024
289
-
290
- - fix redis
291
-
292
- ## 1.0.1 - 14.04.2024
293
-
294
- - fix redis
295
-
296
- ## 1.0.0 - 14.04.2024
297
-
298
- - crud
299
- - pg
300
- - redis
301
- - table
1
+ # fastify-table
2
+
3
+ ## 1.1.9 - 23.09.2024
4
+
5
+ - add update crud editor id/date
6
+
7
+ ## 1.1.6 - 19.09.2024
8
+
9
+ - add more funcs to utils export
10
+
11
+ ## 1.0.97 - 13.09.2024
12
+
13
+ - add migrations
14
+
15
+ ## 1.0.96 - 12.09.2024
16
+
17
+ - minor refactor of email notifications
18
+
19
+ ## 1.0.95 - 12.09.2024
20
+
21
+ - add dbname to getFolder func
22
+
23
+ ## 1.0.94 - 11.09.2024
24
+
25
+ - fix getMeta (public schema)
26
+
27
+ ## 1.0.93 - 05.09.2024
28
+
29
+ - fix data API with sql columns filter
30
+
31
+ ## 1.0.92 - 03.09.2024
32
+
33
+ - fix getTemplate
34
+
35
+ ## 1.0.91 - 30.08.2024
36
+
37
+ - add CRUD and Auth logs
38
+
39
+ ## 1.0.90 - 27.08.2024
40
+
41
+ - logger file API to core
42
+
43
+ ## 1.0.89 - 26.08.2024
44
+
45
+ - data API meta bbox polyline support
46
+
47
+ ## 1.0.87 - 26.08.2024
48
+
49
+ - change of null handling method of update crud API
50
+
51
+ ## 1.0.86 - 23.08.2024
52
+
53
+ - data API meta cls support
54
+
55
+ ## 1.0.84 - 22.08.2024
56
+
57
+ - suggest table:column support
58
+
59
+ ## 1.0.83 - 20.08.2024
60
+
61
+ - code optimization
62
+
63
+ ## 1.0.81 - 15.08.2024
64
+
65
+ - refactor /table API
66
+
67
+ ## 1.0.78 - 14.08.2024
68
+
69
+ - add sqlColumns to /api/data/:table/?:id
70
+
71
+ ## 1.0.77 - 13.08.2024
72
+
73
+ - add statusMonitor API
74
+
75
+ ## 1.0.75 - 12.08.2024
76
+
77
+ - something do
78
+
79
+ ## 1.0.71 - 01.08.2024
80
+
81
+ - add compile settings to form
82
+
83
+ ## 1.0.70 - 29.07.2024
84
+
85
+ - add cron funcs and API
86
+
87
+ ## 1.0.69 - 26.07.2024
88
+
89
+ - add column classifier mode for data API
90
+
91
+ ## 1.0.68 - 26.07.2024
92
+
93
+ - code optimization
94
+
95
+ ## 1.0.66 - 25.07.2024
96
+
97
+ - add notification compile template from data params support
98
+
99
+ ## 1.0.65 - 23.07.2024
100
+
101
+ - add rest API token support
102
+
103
+ ## 1.0.62 - 22.07.2024
104
+
105
+ - add email notification func and test api
106
+
107
+ ## 1.0.61 - 18.07.2024
108
+
109
+ - add custom actions for table
110
+
111
+ ## 1.0.60 - 12.07.2024
112
+
113
+ - code optimization
114
+
115
+ ## 1.0.59 - 12.07.2024
116
+
117
+ - code optimization
118
+
119
+ ## 1.0.58 - 08.07.2024
120
+
121
+ - code optimization
122
+
123
+ ## 1.0.57 - 04.07.2024
124
+
125
+ - fix crud update boolean column
126
+
127
+ ## 1.0.56 - 04.07.2024
128
+
129
+ - code optimization
130
+
131
+ ## 1.0.55 - 02.07.2024
132
+
133
+ - callback support
134
+
135
+ ## 1.0.54 - 01.07.2024
136
+
137
+ - code optimization
138
+
139
+ ## 1.0.53 - 28.06.2024
140
+
141
+ - add migrations support
142
+
143
+ ## 1.0.52 - 28.06.2024
144
+
145
+ - add table get api
146
+
147
+ ## 1.0.51 - 27.06.2024
148
+
149
+ - add next-id api
150
+
151
+ ## 1.0.50 - 27.06.2024
152
+
153
+ - refactor search api
154
+
155
+ ## 1.0.49 - 26.06.2024
156
+
157
+ - refactor - npm settings
158
+
159
+ ## 1.0.48 - 26.06.2024
160
+
161
+ - search api no specified table mode support
162
+
163
+ ## 1.0.47 - 25.06.2024
164
+
165
+ - add extra properties support
166
+
167
+ ## 1.0.46 - 24.06.2024
168
+
169
+ - fix data api edit geometry
170
+
171
+ ## 1.0.45 - 19.06.2024
172
+
173
+ - fix data api table template order
174
+
175
+ ## 1.0.44 - 18.06.2024
176
+
177
+ - add extra data support (form DataTable)
178
+
179
+ ## 1.0.43 - 14.06.2024
180
+
181
+ - add settings api, funcs, migration
182
+
183
+ ## 1.0.42 - 12.06.2024
184
+
185
+ - table cardSql support
186
+
187
+ ## 1.0.41 - 12.06.2024
188
+
189
+ - cls to db (crm.cls)
190
+
191
+ ## 1.0.40 - 12.06.2024
192
+
193
+ - fix widget GET API
194
+
195
+ ## 1.0.39 - 29.05.2024
196
+
197
+ - add getFolder func
198
+
199
+ ## 1.0.37 - 23.05.2024
200
+
201
+ - add gallery widget
202
+
203
+ ## 1.0.36 - 22.05.2024
204
+
205
+ - fix filter api array processing
206
+
207
+ ## 1.0.31 - 20.05.2024
208
+
209
+ - widget db structure refactor
210
+
211
+ ## 1.0.30 - 17.05.2024
212
+
213
+ - code optimization
214
+
215
+ ## 1.0.29 - 17.05.2024
216
+
217
+ - widget api post (file)
218
+
219
+ ## 1.0.28 - 14.05.2024
220
+
221
+ - dblist api set
222
+
223
+ ## 1.0.27 - 12.05.2024
224
+
225
+ - code optimization
226
+
227
+ ## 1.0.26 - 09.05.2024
228
+
229
+ - fix getTableSql
230
+
231
+ ## 1.0.25 - 08.05.2024
232
+
233
+ - decorator to hook
234
+
235
+ ## 1.0.24 - 07.05.2024
236
+
237
+ - getTemplate page
238
+
239
+ ## 1.0.23 - 07.05.2024
240
+
241
+ - getTemplate funcs
242
+ - dblist api
243
+
244
+ ## 1.0.22 - 03.05.2024
245
+
246
+ - getFilterSQL funcs
247
+
248
+ ## 1.0.21 - 03.05.2024
249
+
250
+ - fix widget db structure
251
+
252
+ ## 1.0.20 - 03.05.2024
253
+
254
+ - fix filter separator
255
+
256
+ ## 1.0.19 - 02.05.2024
257
+
258
+ - widget plugin
259
+ - notification plugin
260
+
261
+ ## 1.0.9 - 29.04.2024
262
+
263
+ - crud token support
264
+ - security - xss restriction
265
+
266
+ ## 1.0.8 - 29.04.2024
267
+
268
+ - filter fix
269
+
270
+ ## 1.0.7 - 26.04.2024
271
+
272
+ - code optimization
273
+
274
+ ## 1.0.6 - 25.04.2024
275
+
276
+ - code optimization
277
+
278
+ ## 1.0.5 - 24.04.2024
279
+
280
+ - code optimization
281
+
282
+ ## 1.0.4 - 20.04.2024
283
+
284
+ - data api - order
285
+ - suggest api - db support
286
+ - del api fix
287
+
288
+ ## 1.0.3 - 17.04.2024
289
+
290
+ - fix unit test
291
+
292
+ ## 1.0.2 - 14.04.2024
293
+
294
+ - fix redis
295
+
296
+ ## 1.0.1 - 14.04.2024
297
+
298
+ - fix redis
299
+
300
+ ## 1.0.0 - 14.04.2024
301
+
302
+ - crud
303
+ - pg
304
+ - redis
305
+ - table