@opengis/fastify-table 1.1.9 → 1.1.10

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 (73) hide show
  1. package/.eslintrc.cjs +42 -42
  2. package/Changelog.md +305 -305
  3. package/crud/controllers/deleteCrud.js +22 -22
  4. package/crud/controllers/insert.js +61 -61
  5. package/crud/controllers/update.js +62 -62
  6. package/crud/funcs/dataDelete.js +19 -19
  7. package/crud/funcs/dataInsert.js +30 -30
  8. package/crud/funcs/dataUpdate.js +48 -36
  9. package/crud/funcs/getAccess.js +53 -53
  10. package/crud/funcs/getOpt.js +10 -10
  11. package/crud/funcs/setOpt.js +16 -16
  12. package/crud/funcs/utils/logChanges.js +76 -76
  13. package/crud/index.js +36 -36
  14. package/helper.js +28 -28
  15. package/index.js +97 -97
  16. package/migration/exec.migrations.js +79 -79
  17. package/notification/controllers/userNotifications.js +19 -19
  18. package/notification/funcs/addNotification.js +8 -8
  19. package/notification/funcs/sendNotification.js +111 -111
  20. package/package.json +26 -26
  21. package/pg/funcs/getMeta.js +27 -27
  22. package/pg/pgClients.js +20 -20
  23. package/policy/funcs/checkPolicy.js +83 -83
  24. package/policy/funcs/sqlInjection.js +33 -33
  25. package/policy/index.js +14 -14
  26. package/redis/client.js +8 -8
  27. package/redis/funcs/redisClients.js +2 -2
  28. package/redis/index.js +19 -19
  29. package/server/migrations/0.sql +78 -78
  30. package/server/migrations/properties.sql +30 -30
  31. package/server/migrations/roles.sql +164 -164
  32. package/server/migrations/users.sql +89 -89
  33. package/table/controllers/data.js +103 -103
  34. package/table/controllers/filter.js +37 -37
  35. package/table/controllers/search.js +80 -80
  36. package/table/controllers/suggest.js +79 -79
  37. package/table/controllers/table.js +52 -52
  38. package/table/controllers/utils/addTemplateDir.js +8 -8
  39. package/table/controllers/utils/getSelect.js +19 -19
  40. package/table/controllers/utils/getSelectMeta.js +66 -66
  41. package/table/controllers/utils/getTemplate_old.js +28 -28
  42. package/table/controllers/utils/getTemplates.js +18 -18
  43. package/table/controllers/utils/gisIRColumn.js +68 -68
  44. package/table/controllers/utils/loadTemplate.js +1 -1
  45. package/table/controllers/utils/loadTemplatePath.js +1 -1
  46. package/table/controllers/utils/userTemplateDir.js +1 -1
  47. package/table/funcs/getFilterSQL/index.js +79 -79
  48. package/table/funcs/getFilterSQL/util/formatValue.js +142 -142
  49. package/table/funcs/getFilterSQL/util/getCustomQuery.js +13 -13
  50. package/table/funcs/getFilterSQL/util/getFilterQuery.js +73 -73
  51. package/table/funcs/getFilterSQL/util/getOptimizedQuery.js +12 -12
  52. package/table/funcs/getFilterSQL/util/getTableSql.js +34 -34
  53. package/table/funcs/metaFormat/getSelectVal.js +20 -20
  54. package/table/funcs/metaFormat/index.js +28 -28
  55. package/table/index.js +84 -84
  56. package/test/api/crud.test.js +89 -89
  57. package/test/api/suggest.test.js +66 -66
  58. package/test/api/table.test.js +89 -89
  59. package/test/api/widget.test.js +117 -117
  60. package/test/templates/select/test.storage.data.json +3 -3
  61. package/test/templates/select/test.suggest.ato_new.json +3 -3
  62. package/test/templates/select/test.suggest.ato_new.sql +25 -25
  63. package/test/templates/select/test.suggest.data.json +4 -4
  64. package/test/templates/select/test.suggest.parent.sql +1 -1
  65. package/util/controllers/properties.add.js +57 -57
  66. package/util/controllers/status.monitor.js +8 -8
  67. package/utils.js +48 -48
  68. package/widget/controllers/utils/historyFormat.js +76 -76
  69. package/widget/controllers/utils/obj2db.js +13 -13
  70. package/widget/controllers/widget.del.js +44 -44
  71. package/widget/controllers/widget.get.js +98 -98
  72. package/widget/controllers/widget.set.js +76 -76
  73. 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,305 +1,305 @@
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
1
+ # fastify-table
2
+
3
+ ## 1.1.10 - 24.09.2024
4
+
5
+ - fix update crud editor id/date + geom
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