@opengis/fastify-table 1.1.56 → 1.1.57
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/index.js +27 -14
- package/package.json +9 -4
- package/{cron → server/plugins/cron}/funcs/addCron.js +12 -12
- package/server/plugins/cron/index.js +6 -0
- package/{crud → server/plugins/crud}/funcs/dataDelete.js +3 -1
- package/{crud → server/plugins/crud}/funcs/dataInsert.js +3 -0
- package/{crud → server/plugins/crud}/funcs/dataUpdate.js +3 -1
- package/{crud → server/plugins/crud}/funcs/getAccess.js +5 -3
- package/{crud → server/plugins/crud}/funcs/getOpt.js +2 -0
- package/{crud → server/plugins/crud}/funcs/getToken.js +4 -1
- package/{crud → server/plugins/crud}/funcs/setOpt.js +3 -0
- package/{crud → server/plugins/crud}/funcs/setToken.js +4 -1
- package/{crud → server/plugins/crud}/funcs/utils/getFolder.js +2 -1
- package/{crud → server/plugins/crud}/funcs/utils/logChanges.js +2 -2
- package/server/plugins/crud/index.js +23 -0
- package/{hook → server/plugins/hook}/funcs/addHook.js +1 -1
- package/{hook → server/plugins/hook}/funcs/applyHook.js +2 -2
- package/server/plugins/hook/index.js +8 -0
- package/{logger → server/plugins/logger}/createFileStream.js +1 -1
- package/{logger → server/plugins/logger}/getLogger.js +1 -1
- package/{migration → server/plugins/migration/funcs}/exec.migrations.js +1 -1
- package/server/plugins/migration/index.js +7 -0
- package/{pg → server/plugins/pg}/funcs/getPG.js +3 -3
- package/{pg → server/plugins/pg}/funcs/getPGAsync.js +3 -3
- package/{pg → server/plugins/pg}/funcs/init.js +2 -4
- package/{pg → server/plugins/pg}/index.js +5 -14
- package/{pg → server/plugins/pg}/pgClients.js +2 -1
- package/{policy → server/plugins/policy}/funcs/checkPolicy.js +1 -1
- package/{crud/controllers/utils → server/plugins/policy/funcs}/checkXSS.js +1 -4
- package/{policy → server/plugins/policy}/index.js +0 -2
- package/{policy/funcs → server/plugins/policy}/sqlInjection.js +1 -1
- package/{redis → server/plugins/redis}/funcs/getRedis.js +2 -1
- package/{redis → server/plugins/redis}/funcs/redisClients.js +1 -0
- package/{redis → server/plugins/redis}/index.js +2 -6
- package/{table → server/plugins/table}/funcs/getFilterSQL/index.js +3 -1
- package/{table/controllers/utils → server/plugins/table/funcs}/getSelectMeta.js +1 -10
- package/{table/controllers/utils → server/plugins/table/funcs}/getTemplate.js +2 -1
- package/{table/controllers/utils → server/plugins/table/funcs}/getTemplatePath.js +3 -3
- package/{table/controllers/utils → server/plugins/table/funcs}/getTemplates.js +2 -1
- package/{table/controllers/utils → server/plugins/table/funcs}/gisIRColumn.js +4 -7
- package/{table → server/plugins/table}/funcs/metaFormat/getSelectVal.js +4 -2
- package/{table → server/plugins/table}/funcs/metaFormat/index.js +3 -1
- package/server/plugins/table/index.js +13 -0
- package/{util → server/plugins/util/funcs}/eventStream.js +1 -0
- package/server/plugins/util/index.js +7 -0
- package/{cron → server/routes/cron}/controllers/cronApi.js +1 -1
- package/{cron → server/routes/cron}/index.js +5 -3
- package/{crud → server/routes/crud}/controllers/deleteCrud.js +2 -2
- package/{crud → server/routes/crud}/controllers/insert.js +5 -3
- package/{crud → server/routes/crud}/controllers/update.js +3 -3
- package/server/routes/crud/index.js +19 -0
- package/{util → server/routes/logger}/controllers/logger.file.js +5 -5
- package/{util → server/routes/logger}/controllers/utils/checkUserAccess.js +1 -1
- package/{util → server/routes/logger}/controllers/utils/getRootDir.js +4 -3
- package/server/routes/logger/index.js +15 -0
- package/{util → server/routes/properties}/controllers/properties.add.js +19 -20
- package/server/routes/properties/controllers/properties.get.js +17 -0
- package/{util → server/routes/properties}/index.js +5 -8
- package/{table → server/routes/table}/controllers/card.js +3 -5
- package/{table → server/routes/table}/controllers/data.js +4 -10
- package/{table → server/routes/table}/controllers/filter.js +3 -4
- package/{table → server/routes/table}/controllers/form.js +1 -1
- package/{table → server/routes/table}/controllers/search.js +15 -17
- package/{table → server/routes/table}/controllers/suggest.js +8 -7
- package/{table → server/routes/table}/controllers/table.js +5 -7
- package/{table → server/routes/table}/index.js +1 -10
- package/{table → server/routes/table}/schema.js +1 -1
- package/{util → server/routes/util}/controllers/next.id.js +1 -1
- package/server/routes/util/index.js +11 -0
- package/utils.js +58 -50
- package/.eslintrc.cjs +0 -44
- package/.gitlab-ci.yml +0 -18
- package/Changelog.md +0 -352
- package/cron/schema.js +0 -8
- package/crud/index.js +0 -31
- package/crud/schema.js +0 -11
- package/docs/.vitepress/abbr.mjs +0 -26
- package/docs/.vitepress/config.mjs +0 -127
- package/docs/.vitepress/navigation.mjs +0 -82
- package/docs/.vitepress/theme/Layout.vue +0 -17
- package/docs/.vitepress/theme/components/NavigationLinks.vue +0 -102
- package/docs/.vitepress/theme/components/Panzoom.vue +0 -169
- package/docs/.vitepress/theme/index.mjs +0 -15
- package/docs/.vitepress/theme/style.scss +0 -163
- package/docs/abbr.json +0 -4
- package/docs/api/cron/cronApi.md +0 -56
- package/docs/api/crud/deleteCrud.md +0 -58
- package/docs/api/crud/insert.md +0 -82
- package/docs/api/crud/update.md +0 -85
- package/docs/api/index.md +0 -47
- package/docs/api/notification/testEmail.md +0 -91
- package/docs/api/table/card.md +0 -73
- package/docs/api/table/data.md +0 -134
- package/docs/api/table/export.md +0 -60
- package/docs/api/table/filter.md +0 -104
- package/docs/api/table/form.md +0 -126
- package/docs/api/table/search.md +0 -123
- package/docs/api/table/suggest.md +0 -156
- package/docs/api/table/table.md +0 -107
- package/docs/api/user/user.cls.id.md +0 -77
- package/docs/api/user/user.cls.md +0 -49
- package/docs/api/user/user.cls.post.md +0 -62
- package/docs/api/user/user.info.md +0 -37
- package/docs/api/utils/logger.file.md +0 -61
- package/docs/api/utils/next.id.md +0 -34
- package/docs/api/utils/properties.add.md +0 -127
- package/docs/api/utils/properties.get.md +0 -73
- package/docs/api/utils/status.monitor.md +0 -36
- package/docs/api/widget/widget.del.md +0 -76
- package/docs/api/widget/widget.get.md +0 -233
- package/docs/api/widget/widget.set.md +0 -88
- package/docs/db/admin.md +0 -947
- package/docs/db/crm.md +0 -564
- package/docs/db/index.md +0 -9
- package/docs/db/log.md +0 -204
- package/docs/hook/card/afterCard.md +0 -20
- package/docs/hook/card/preCard.md +0 -25
- package/docs/hook/data/afterData.md +0 -26
- package/docs/hook/data/preData.md +0 -26
- package/docs/hook/deleteCrud/afterDelete.md +0 -21
- package/docs/hook/deleteCrud/preDelete.md +0 -26
- package/docs/hook/form/afterForm.md +0 -19
- package/docs/hook/form/preForm.md +0 -26
- package/docs/hook/getTemplate/afterTemplate.md +0 -24
- package/docs/hook/getTemplate/preTemplate.md +0 -29
- package/docs/hook/index.md +0 -45
- package/docs/hook/insert/afterInsert.md +0 -41
- package/docs/hook/insert/preInsert.md +0 -25
- package/docs/hook/table/afterTable.md +0 -20
- package/docs/hook/table/preTable.md +0 -25
- package/docs/hook/update/afterUpdate.md +0 -41
- package/docs/hook/update/preUpdate.md +0 -25
- package/docs/index.md +0 -42
- package/docs/public/fastify-dark.svg +0 -4
- package/docs/public/fastify.svg +0 -1
- package/docs/public/logo-short-dark.svg +0 -12
- package/docs/public/logo-short.svg +0 -11
- package/docs/public/logo.svg +0 -19
- package/docs/readme/index.md +0 -121
- package/docs/templates/card.md +0 -83
- package/docs/templates/cls.md +0 -29
- package/docs/templates/filters.md +0 -91
- package/docs/templates/forms.md +0 -139
- package/docs/templates/image.png +0 -0
- package/docs/templates/index.md +0 -28
- package/docs/templates/select.md +0 -90
- package/docs/templates/table.md +0 -162
- package/docs/utils/cron/addCron.md +0 -29
- package/docs/utils/crud/dataInsert.md +0 -52
- package/docs/utils/crud/dataUpdate.md +0 -53
- package/docs/utils/crud/getOpt.md +0 -34
- package/docs/utils/crud/isFileExists.md +0 -38
- package/docs/utils/crud/setOpt.md +0 -38
- package/docs/utils/hook/addHook.md +0 -74
- package/docs/utils/hook/applyHook.md +0 -64
- package/docs/utils/index.md +0 -48
- package/docs/utils/notification/addNotification.md +0 -28
- package/docs/utils/notification/notification.md +0 -41
- package/docs/utils/pg/autoIndex.md +0 -22
- package/docs/utils/pg/getMeta.md +0 -59
- package/docs/utils/pg/getPG.md +0 -34
- package/docs/utils/pg/init.md +0 -30
- package/docs/utils/pg/pg.md +0 -70
- package/docs/utils/redis/getRedis.md +0 -36
- package/docs/utils/redis/rclient.md +0 -74
- package/docs/utils/table/getForm.md +0 -69
- package/docs/utils/table/getMeta.md +0 -56
- package/docs/utils/table/getSelect.md +0 -39
- package/docs/utils/table/getSelectMeta.md +0 -47
- package/docs/utils/table/getTable.md +0 -78
- package/helper.js +0 -30
- package/module/core/select/core.user_mentioned.sql +0 -2
- package/module/test/cls/itree.composition.json +0 -26
- package/module/test/table/test.rest_zone.table.json +0 -266
- package/notification/controllers/readNotifications.js +0 -27
- package/notification/controllers/testEmail.js +0 -46
- package/notification/controllers/userNotifications.js +0 -61
- package/notification/controllers/utils/pin-m-ty-media-record-outline+303070.png +0 -0
- package/notification/funcs/addNotification.js +0 -21
- package/notification/funcs/sendNotification.js +0 -111
- package/notification/funcs/utils/sendEmail.js +0 -39
- package/notification/index.js +0 -18
- package/notification/schema.js +0 -10
- package/server.js +0 -26
- package/table/controllers/utils/getTemplate_old.js +0 -28
- package/test/api/applyHook.test.js +0 -95
- package/test/api/crud.test.js +0 -89
- package/test/api/crud.xss.test.js +0 -80
- package/test/api/notification.test.js +0 -48
- package/test/api/suggest.test.js +0 -66
- package/test/api/table.test.js +0 -134
- package/test/api/user.test.js +0 -85
- package/test/api/widget.test.js +0 -117
- package/test/config.example +0 -18
- package/test/funcs/pg.test.js +0 -34
- package/test/funcs/redis.test.js +0 -19
- package/test/helper/formatDate.test.js +0 -62
- package/test/templates/cls/itree.quality_condition.json +0 -20
- package/test/templates/cls/itree.recommend copy.json +0 -26
- package/test/templates/cls/itree.recommend.json +0 -26
- package/test/templates/cls/itree.type_plant.json +0 -65
- package/test/templates/cls/test.json +0 -10
- package/test/templates/form/cp_building.form.json +0 -33
- package/test/templates/select/account_id.json +0 -4
- package/test/templates/select/account_id.sql +0 -1
- package/test/templates/select/atu.nsdi.ato_level.json +0 -4
- package/test/templates/select/atu.nsdi.ato_level.sql +0 -11
- package/test/templates/select/contact_id.sql +0 -1
- package/test/templates/select/storage.data.json +0 -3
- package/test/templates/select/storage.data.sql +0 -1
- package/test/templates/select/test.storage.data.json +0 -4
- package/test/templates/select/test.storage.data.sql +0 -1
- package/test/templates/select/test.suggest.ato_new.json +0 -4
- package/test/templates/select/test.suggest.ato_new.sql +0 -26
- package/test/templates/select/test.suggest.data.json +0 -5
- package/test/templates/select/test.suggest.data.sql +0 -1
- package/test/templates/select/test.suggest.parent.sql +0 -2
- package/test/templates/table/gis.dataset.table.json +0 -21
- package/test/templates/table/green_space.table.json +0 -383
- package/test/templates/table/service.json +0 -18
- package/user/controllers/user.cls.id.js +0 -14
- package/user/controllers/user.cls.js +0 -71
- package/user/controllers/user.cls.post.js +0 -52
- package/user/controllers/user.info.js +0 -17
- package/user/index.js +0 -17
- package/user/schema.js +0 -17
- package/util/controllers/properties.get.js +0 -17
- package/util/schema.js +0 -19
- package/widget/controllers/utils/historyFormat.js +0 -76
- package/widget/controllers/utils/obj2db.js +0 -13
- package/widget/controllers/widget.del.js +0 -41
- package/widget/controllers/widget.get.js +0 -96
- package/widget/controllers/widget.set.js +0 -74
- package/widget/index.js +0 -40
- /package/{cron/controllers/utils → server/plugins/cron}/cronList.js +0 -0
- /package/{crud → server/plugins/crud}/funcs/isFileExists.js +0 -0
- /package/{hook/funcs → server/plugins/hook}/hookList.js +0 -0
- /package/{logger → server/plugins/logger}/getHooks.js +0 -0
- /package/{logger → server/plugins/logger}/labels.js +0 -0
- /package/{logger → server/plugins/logger}/logger.test.api.js +0 -0
- /package/{logger → server/plugins/logger}/serializers.js +0 -0
- /package/{pg → server/plugins/pg}/funcs/autoIndex.js +0 -0
- /package/{pg → server/plugins/pg}/funcs/getMeta.js +0 -0
- /package/{pg → server/plugins/pg}/funcs/pgClients.js +0 -0
- /package/{crud/controllers/utils → server/plugins/policy}/xssInjection.js +0 -0
- /package/{redis → server/plugins/redis}/client.js +0 -0
- /package/{table/controllers/utils → server/plugins/table/funcs}/addTemplateDir.js +0 -0
- /package/{table → server/plugins/table}/funcs/getFilterSQL/util/formatValue.js +0 -0
- /package/{table → server/plugins/table}/funcs/getFilterSQL/util/getCustomQuery.js +0 -0
- /package/{table → server/plugins/table}/funcs/getFilterSQL/util/getFilterQuery.js +0 -0
- /package/{table → server/plugins/table}/funcs/getFilterSQL/util/getOptimizedQuery.js +0 -0
- /package/{table → server/plugins/table}/funcs/getFilterSQL/util/getTableSql.js +0 -0
- /package/{table/controllers/utils → server/plugins/table/funcs}/getSelect.js +0 -0
- /package/{table/controllers/utils → server/plugins/table/funcs}/loadTemplate.js +0 -0
- /package/{table/controllers/utils → server/plugins/table/funcs}/loadTemplatePath.js +0 -0
- /package/{table/controllers/utils → server/plugins/table/funcs}/userTemplateDir.js +0 -0
- /package/{util → server/routes/util}/controllers/status.monitor.js +0 -0
package/utils.js
CHANGED
|
@@ -1,53 +1,65 @@
|
|
|
1
1
|
// This file contains code that we reuse
|
|
2
2
|
// between our tests.
|
|
3
3
|
|
|
4
|
+
// hb for html format (notifications etc.)
|
|
4
5
|
import { handlebars } from '@opengis/fastify-hb/utils.js';
|
|
5
|
-
import getTemplate from './table/controllers/utils/getTemplate.js';
|
|
6
|
-
import getTemplatePath from './table/controllers/utils/getTemplatePath.js';
|
|
7
|
-
import addTemplateDir from './table/controllers/utils/addTemplateDir.js';
|
|
8
|
-
import userTemplateDir from './table/controllers/utils/userTemplateDir.js';
|
|
9
|
-
import metaFormat from './table/funcs/metaFormat/index.js';
|
|
10
|
-
import autoIndex from './pg/funcs/autoIndex.js';
|
|
11
|
-
|
|
12
|
-
import getPG from './pg/funcs/getPG.js';
|
|
13
|
-
import getPGAsync from './pg/funcs/getPGAsync.js';
|
|
14
|
-
import initPG from './pg/funcs/init.js';
|
|
15
|
-
import pgClients from './pg/pgClients.js';
|
|
16
|
-
import getRedis from './redis/funcs/getRedis.js';
|
|
17
|
-
import redisClients from './redis/funcs/redisClients.js';
|
|
18
|
-
|
|
19
|
-
import dataInsert from './crud/funcs/dataInsert.js';
|
|
20
|
-
import dataUpdate from './crud/funcs/dataUpdate.js';
|
|
21
|
-
import dataDelete from './crud/funcs/dataDelete.js';
|
|
22
|
-
|
|
23
|
-
import getToken from './crud/funcs/getToken.js';
|
|
24
|
-
import setToken from './crud/funcs/setToken.js';
|
|
25
|
-
import checkXSS from './crud/controllers/utils/checkXSS.js';
|
|
26
|
-
import getTableColumn from './table/controllers/utils/gisIRColumn.js';
|
|
27
|
-
import gisIRColumn from './table/controllers/utils/gisIRColumn.js';
|
|
28
|
-
|
|
29
|
-
import getMeta from './pg/funcs/getMeta.js';
|
|
30
|
-
import getAccess from './crud/funcs/getAccess.js';
|
|
31
|
-
import getSelectVal from './table/funcs/metaFormat/getSelectVal.js';
|
|
32
|
-
import getSelect from './table/controllers/utils/getSelect.js';
|
|
33
|
-
import getSelectMeta from './table/controllers/utils/getSelectMeta.js';
|
|
34
|
-
import applyHook from './hook/funcs/applyHook.js';
|
|
35
|
-
import addHook from './hook/funcs/addHook.js';
|
|
36
|
-
import execMigrations from './migration/exec.migrations.js';
|
|
37
|
-
import addNotification from './notification/funcs/addNotification.js';
|
|
38
|
-
import sendNotification from './notification/funcs/sendNotification.js';
|
|
39
|
-
import getFilterSQL from './table/funcs/getFilterSQL/index.js';
|
|
40
|
-
|
|
41
|
-
import addCron from './cron/funcs/addCron.js';
|
|
42
|
-
import config from './config.js';
|
|
43
|
-
import getOpt from './crud/funcs/getOpt.js';
|
|
44
|
-
import setOpt from './crud/funcs/setOpt.js';
|
|
45
|
-
|
|
46
|
-
import isFileExists from './crud/funcs/isFileExists.js';
|
|
47
|
-
import getFolder from './crud/funcs/utils/getFolder.js';
|
|
48
6
|
|
|
49
|
-
|
|
50
|
-
import
|
|
7
|
+
// pg
|
|
8
|
+
import getPG from './server/plugins/pg/funcs/getPG.js';
|
|
9
|
+
import getPGAsync from './server/plugins/pg/funcs/getPGAsync.js';
|
|
10
|
+
import initPG from './server/plugins/pg/funcs/init.js';
|
|
11
|
+
import pgClients from './server/plugins/pg/pgClients.js';
|
|
12
|
+
import getMeta from './server/plugins/pg/funcs/getMeta.js';
|
|
13
|
+
import getAccess from './server/plugins/crud/funcs/getAccess.js';
|
|
14
|
+
|
|
15
|
+
// redis
|
|
16
|
+
import getRedis from './server/plugins/redis/funcs/getRedis.js';
|
|
17
|
+
import redisClients from './server/plugins/redis/funcs/redisClients.js';
|
|
18
|
+
|
|
19
|
+
// template
|
|
20
|
+
import getTemplate from './server/plugins/table/funcs/getTemplate.js';
|
|
21
|
+
import getTemplates from './server/plugins/table/funcs/getTemplates.js';
|
|
22
|
+
import getTemplatePath from './server/plugins/table/funcs/getTemplatePath.js';
|
|
23
|
+
import addTemplateDir from './server/plugins/table/funcs/addTemplateDir.js';
|
|
24
|
+
import userTemplateDir from './server/plugins/table/funcs/userTemplateDir.js';
|
|
25
|
+
|
|
26
|
+
// table
|
|
27
|
+
import metaFormat from './server/plugins/table/funcs/metaFormat/index.js';
|
|
28
|
+
import autoIndex from './server/plugins/pg/funcs/autoIndex.js';
|
|
29
|
+
import getSelectVal from './server/plugins/table/funcs/metaFormat/getSelectVal.js';
|
|
30
|
+
import getFilterSQL from './server/plugins/table/funcs/getFilterSQL/index.js';
|
|
31
|
+
import getSelect from './server/plugins/table/funcs/getSelect.js';
|
|
32
|
+
import getSelectMeta from './server/plugins/table/funcs/getSelectMeta.js';
|
|
33
|
+
import gisIRColumn from './server/plugins/table/funcs/gisIRColumn.js';
|
|
34
|
+
|
|
35
|
+
// crud
|
|
36
|
+
import dataInsert from './server/plugins/crud/funcs/dataInsert.js';
|
|
37
|
+
import dataUpdate from './server/plugins/crud/funcs/dataUpdate.js';
|
|
38
|
+
import dataDelete from './server/plugins/crud/funcs/dataDelete.js';
|
|
39
|
+
import getToken from './server/plugins/crud/funcs/getToken.js';
|
|
40
|
+
import setToken from './server/plugins/crud/funcs/setToken.js';
|
|
41
|
+
import getOpt from './server/plugins/crud/funcs/getOpt.js';
|
|
42
|
+
import setOpt from './server/plugins/crud/funcs/setOpt.js';
|
|
43
|
+
|
|
44
|
+
// policy
|
|
45
|
+
import checkXSS from './server/plugins/policy/funcs/checkXSS.js';
|
|
46
|
+
|
|
47
|
+
// hook
|
|
48
|
+
import applyHook from './server/plugins/hook/funcs/applyHook.js';
|
|
49
|
+
import addHook from './server/plugins/hook/funcs/addHook.js';
|
|
50
|
+
import execMigrations from './server/plugins/migration/funcs/exec.migrations.js';
|
|
51
|
+
|
|
52
|
+
// cron
|
|
53
|
+
import addCron from './server/plugins/cron/funcs/addCron.js';
|
|
54
|
+
|
|
55
|
+
// logger
|
|
56
|
+
import logger from './server/plugins/logger/getLogger.js';
|
|
57
|
+
|
|
58
|
+
// utils
|
|
59
|
+
import config from './config.js';
|
|
60
|
+
import eventStream from './server/plugins/util/funcs/eventStream.js';
|
|
61
|
+
import isFileExists from './server/plugins/crud/funcs/isFileExists.js';
|
|
62
|
+
import getFolder from './server/plugins/crud/funcs/utils/getFolder.js';
|
|
51
63
|
|
|
52
64
|
export default null;
|
|
53
65
|
export {
|
|
@@ -69,14 +81,11 @@ export {
|
|
|
69
81
|
|
|
70
82
|
// template
|
|
71
83
|
getTemplate,
|
|
84
|
+
getTemplates,
|
|
72
85
|
getTemplatePath,
|
|
73
86
|
addTemplateDir,
|
|
74
87
|
userTemplateDir,
|
|
75
88
|
|
|
76
|
-
// notification
|
|
77
|
-
addNotification,
|
|
78
|
-
sendNotification,
|
|
79
|
-
|
|
80
89
|
// security
|
|
81
90
|
checkXSS,
|
|
82
91
|
getAccess,
|
|
@@ -94,7 +103,6 @@ export {
|
|
|
94
103
|
autoIndex,
|
|
95
104
|
metaFormat,
|
|
96
105
|
getMeta,
|
|
97
|
-
getTableColumn,
|
|
98
106
|
gisIRColumn,
|
|
99
107
|
|
|
100
108
|
// pg
|
package/.eslintrc.cjs
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
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
|
-
|
|
27
|
-
'import/no-duplicates': 0,
|
|
28
|
-
'import/named': 2,
|
|
29
|
-
'import/namespace': 2,
|
|
30
|
-
'import/default': 2,
|
|
31
|
-
'import/export': 2,
|
|
32
|
-
'import/extensions': 0,
|
|
33
|
-
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
|
34
|
-
'import/no-unresolved': 0,
|
|
35
|
-
'import/no-extraneous-dependencies': 0,
|
|
36
|
-
'linebreak-style': 0,
|
|
37
|
-
// allow debugger during development
|
|
38
|
-
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
parserOptions: {
|
|
42
|
-
ecmaVersion: 'latest',
|
|
43
|
-
},
|
|
44
|
-
};
|
package/.gitlab-ci.yml
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
stages:
|
|
2
|
-
- pull
|
|
3
|
-
|
|
4
|
-
latest-253:
|
|
5
|
-
stage: pull
|
|
6
|
-
tags:
|
|
7
|
-
- cdn
|
|
8
|
-
variables:
|
|
9
|
-
GIT_STRATEGY: none
|
|
10
|
-
script:
|
|
11
|
-
- cd /data/softpro/docs/fastify-table && git reset --hard && git pull origin main
|
|
12
|
-
- npm install
|
|
13
|
-
- npm run docs:build
|
|
14
|
-
- rm -rf /data/softpro/apidocs/fastify-table || true
|
|
15
|
-
- mkdir -p /data/softpro/apidocs/fastify-table || true
|
|
16
|
-
- cp -R ./docs/.vitepress/dist/* /data/softpro/apidocs/fastify-table
|
|
17
|
-
only:
|
|
18
|
-
- main
|
package/Changelog.md
DELETED
|
@@ -1,352 +0,0 @@
|
|
|
1
|
-
# fastify-table
|
|
2
|
-
|
|
3
|
-
## 1.1.56 - 29.10.2024
|
|
4
|
-
|
|
5
|
-
- addHook params refactor
|
|
6
|
-
- add getFolder, handlebars to utils
|
|
7
|
-
- refactor getAccess for CRUD
|
|
8
|
-
- add migrations
|
|
9
|
-
|
|
10
|
-
## 1.1.40 - 18.10.2024
|
|
11
|
-
|
|
12
|
-
- fix migrations
|
|
13
|
-
|
|
14
|
-
## 1.1.31 - 11.10.2024
|
|
15
|
-
|
|
16
|
-
- move notification api to admin
|
|
17
|
-
|
|
18
|
-
## 1.1.29 - 09.10.2024
|
|
19
|
-
|
|
20
|
-
- add after crud hook
|
|
21
|
-
|
|
22
|
-
## 1.1.27 - 08.10.2024
|
|
23
|
-
|
|
24
|
-
- add migrations
|
|
25
|
-
|
|
26
|
-
## 1.1.23 - 03.10.2024
|
|
27
|
-
|
|
28
|
-
- add user API and unit tests
|
|
29
|
-
|
|
30
|
-
## 1.1.21 - 03.10.2024
|
|
31
|
-
|
|
32
|
-
- add mention in comment notification hook
|
|
33
|
-
|
|
34
|
-
## 1.1.20 - 02.10.2024
|
|
35
|
-
|
|
36
|
-
- code optimization
|
|
37
|
-
|
|
38
|
-
## 1.1.19 - 01.10.2024
|
|
39
|
-
|
|
40
|
-
- custom hook support - addHook, applyHook
|
|
41
|
-
|
|
42
|
-
## 1.1.17 - 30.09.2024
|
|
43
|
-
|
|
44
|
-
- add relkinds to pg
|
|
45
|
-
|
|
46
|
-
## 1.1.16 - 27.09.2024
|
|
47
|
-
|
|
48
|
-
- add migrations
|
|
49
|
-
|
|
50
|
-
## 1.1.15 - 26.09.2024
|
|
51
|
-
|
|
52
|
-
- fix update crud editor id/date + geom
|
|
53
|
-
|
|
54
|
-
## 1.1.6 - 19.09.2024
|
|
55
|
-
|
|
56
|
-
- add more funcs to utils export
|
|
57
|
-
|
|
58
|
-
## 1.0.97 - 13.09.2024
|
|
59
|
-
|
|
60
|
-
- add migrations
|
|
61
|
-
|
|
62
|
-
## 1.0.96 - 12.09.2024
|
|
63
|
-
|
|
64
|
-
- minor refactor of email notifications
|
|
65
|
-
|
|
66
|
-
## 1.0.95 - 12.09.2024
|
|
67
|
-
|
|
68
|
-
- add dbname to getFolder func
|
|
69
|
-
|
|
70
|
-
## 1.0.94 - 11.09.2024
|
|
71
|
-
|
|
72
|
-
- fix getMeta (public schema)
|
|
73
|
-
|
|
74
|
-
## 1.0.93 - 05.09.2024
|
|
75
|
-
|
|
76
|
-
- fix data API with sql columns filter
|
|
77
|
-
|
|
78
|
-
## 1.0.92 - 03.09.2024
|
|
79
|
-
|
|
80
|
-
- fix getTemplate
|
|
81
|
-
|
|
82
|
-
## 1.0.91 - 30.08.2024
|
|
83
|
-
|
|
84
|
-
- add CRUD and Auth logs
|
|
85
|
-
|
|
86
|
-
## 1.0.90 - 27.08.2024
|
|
87
|
-
|
|
88
|
-
- logger file API to core
|
|
89
|
-
|
|
90
|
-
## 1.0.89 - 26.08.2024
|
|
91
|
-
|
|
92
|
-
- data API meta bbox polyline support
|
|
93
|
-
|
|
94
|
-
## 1.0.87 - 26.08.2024
|
|
95
|
-
|
|
96
|
-
- change of null handling method of update crud API
|
|
97
|
-
|
|
98
|
-
## 1.0.86 - 23.08.2024
|
|
99
|
-
|
|
100
|
-
- data API meta cls support
|
|
101
|
-
|
|
102
|
-
## 1.0.84 - 22.08.2024
|
|
103
|
-
|
|
104
|
-
- suggest table:column support
|
|
105
|
-
|
|
106
|
-
## 1.0.83 - 20.08.2024
|
|
107
|
-
|
|
108
|
-
- code optimization
|
|
109
|
-
|
|
110
|
-
## 1.0.81 - 15.08.2024
|
|
111
|
-
|
|
112
|
-
- refactor /table API
|
|
113
|
-
|
|
114
|
-
## 1.0.78 - 14.08.2024
|
|
115
|
-
|
|
116
|
-
- add sqlColumns to /api/data/:table/?:id
|
|
117
|
-
|
|
118
|
-
## 1.0.77 - 13.08.2024
|
|
119
|
-
|
|
120
|
-
- add statusMonitor API
|
|
121
|
-
|
|
122
|
-
## 1.0.75 - 12.08.2024
|
|
123
|
-
|
|
124
|
-
- something do
|
|
125
|
-
|
|
126
|
-
## 1.0.71 - 01.08.2024
|
|
127
|
-
|
|
128
|
-
- add compile settings to form
|
|
129
|
-
|
|
130
|
-
## 1.0.70 - 29.07.2024
|
|
131
|
-
|
|
132
|
-
- add cron funcs and API
|
|
133
|
-
|
|
134
|
-
## 1.0.69 - 26.07.2024
|
|
135
|
-
|
|
136
|
-
- add column classifier mode for data API
|
|
137
|
-
|
|
138
|
-
## 1.0.68 - 26.07.2024
|
|
139
|
-
|
|
140
|
-
- code optimization
|
|
141
|
-
|
|
142
|
-
## 1.0.66 - 25.07.2024
|
|
143
|
-
|
|
144
|
-
- add notification compile template from data params support
|
|
145
|
-
|
|
146
|
-
## 1.0.65 - 23.07.2024
|
|
147
|
-
|
|
148
|
-
- add rest API token support
|
|
149
|
-
|
|
150
|
-
## 1.0.62 - 22.07.2024
|
|
151
|
-
|
|
152
|
-
- add email notification func and test api
|
|
153
|
-
|
|
154
|
-
## 1.0.61 - 18.07.2024
|
|
155
|
-
|
|
156
|
-
- add custom actions for table
|
|
157
|
-
|
|
158
|
-
## 1.0.60 - 12.07.2024
|
|
159
|
-
|
|
160
|
-
- code optimization
|
|
161
|
-
|
|
162
|
-
## 1.0.59 - 12.07.2024
|
|
163
|
-
|
|
164
|
-
- code optimization
|
|
165
|
-
|
|
166
|
-
## 1.0.58 - 08.07.2024
|
|
167
|
-
|
|
168
|
-
- code optimization
|
|
169
|
-
|
|
170
|
-
## 1.0.57 - 04.07.2024
|
|
171
|
-
|
|
172
|
-
- fix crud update boolean column
|
|
173
|
-
|
|
174
|
-
## 1.0.56 - 04.07.2024
|
|
175
|
-
|
|
176
|
-
- code optimization
|
|
177
|
-
|
|
178
|
-
## 1.0.55 - 02.07.2024
|
|
179
|
-
|
|
180
|
-
- callback support
|
|
181
|
-
|
|
182
|
-
## 1.0.54 - 01.07.2024
|
|
183
|
-
|
|
184
|
-
- code optimization
|
|
185
|
-
|
|
186
|
-
## 1.0.53 - 28.06.2024
|
|
187
|
-
|
|
188
|
-
- add migrations support
|
|
189
|
-
|
|
190
|
-
## 1.0.52 - 28.06.2024
|
|
191
|
-
|
|
192
|
-
- add table get api
|
|
193
|
-
|
|
194
|
-
## 1.0.51 - 27.06.2024
|
|
195
|
-
|
|
196
|
-
- add next-id api
|
|
197
|
-
|
|
198
|
-
## 1.0.50 - 27.06.2024
|
|
199
|
-
|
|
200
|
-
- refactor search api
|
|
201
|
-
|
|
202
|
-
## 1.0.49 - 26.06.2024
|
|
203
|
-
|
|
204
|
-
- refactor - npm settings
|
|
205
|
-
|
|
206
|
-
## 1.0.48 - 26.06.2024
|
|
207
|
-
|
|
208
|
-
- search api no specified table mode support
|
|
209
|
-
|
|
210
|
-
## 1.0.47 - 25.06.2024
|
|
211
|
-
|
|
212
|
-
- add extra properties support
|
|
213
|
-
|
|
214
|
-
## 1.0.46 - 24.06.2024
|
|
215
|
-
|
|
216
|
-
- fix data api edit geometry
|
|
217
|
-
|
|
218
|
-
## 1.0.45 - 19.06.2024
|
|
219
|
-
|
|
220
|
-
- fix data api table template order
|
|
221
|
-
|
|
222
|
-
## 1.0.44 - 18.06.2024
|
|
223
|
-
|
|
224
|
-
- add extra data support (form DataTable)
|
|
225
|
-
|
|
226
|
-
## 1.0.43 - 14.06.2024
|
|
227
|
-
|
|
228
|
-
- add settings api, funcs, migration
|
|
229
|
-
|
|
230
|
-
## 1.0.42 - 12.06.2024
|
|
231
|
-
|
|
232
|
-
- table cardSql support
|
|
233
|
-
|
|
234
|
-
## 1.0.41 - 12.06.2024
|
|
235
|
-
|
|
236
|
-
- cls to db (crm.cls)
|
|
237
|
-
|
|
238
|
-
## 1.0.40 - 12.06.2024
|
|
239
|
-
|
|
240
|
-
- fix widget GET API
|
|
241
|
-
|
|
242
|
-
## 1.0.39 - 29.05.2024
|
|
243
|
-
|
|
244
|
-
- add getFolder func
|
|
245
|
-
|
|
246
|
-
## 1.0.37 - 23.05.2024
|
|
247
|
-
|
|
248
|
-
- add gallery widget
|
|
249
|
-
|
|
250
|
-
## 1.0.36 - 22.05.2024
|
|
251
|
-
|
|
252
|
-
- fix filter api array processing
|
|
253
|
-
|
|
254
|
-
## 1.0.31 - 20.05.2024
|
|
255
|
-
|
|
256
|
-
- widget db structure refactor
|
|
257
|
-
|
|
258
|
-
## 1.0.30 - 17.05.2024
|
|
259
|
-
|
|
260
|
-
- code optimization
|
|
261
|
-
|
|
262
|
-
## 1.0.29 - 17.05.2024
|
|
263
|
-
|
|
264
|
-
- widget api post (file)
|
|
265
|
-
|
|
266
|
-
## 1.0.28 - 14.05.2024
|
|
267
|
-
|
|
268
|
-
- dblist api set
|
|
269
|
-
|
|
270
|
-
## 1.0.27 - 12.05.2024
|
|
271
|
-
|
|
272
|
-
- code optimization
|
|
273
|
-
|
|
274
|
-
## 1.0.26 - 09.05.2024
|
|
275
|
-
|
|
276
|
-
- fix getTableSql
|
|
277
|
-
|
|
278
|
-
## 1.0.25 - 08.05.2024
|
|
279
|
-
|
|
280
|
-
- decorator to hook
|
|
281
|
-
|
|
282
|
-
## 1.0.24 - 07.05.2024
|
|
283
|
-
|
|
284
|
-
- getTemplate page
|
|
285
|
-
|
|
286
|
-
## 1.0.23 - 07.05.2024
|
|
287
|
-
|
|
288
|
-
- getTemplate funcs
|
|
289
|
-
- dblist api
|
|
290
|
-
|
|
291
|
-
## 1.0.22 - 03.05.2024
|
|
292
|
-
|
|
293
|
-
- getFilterSQL funcs
|
|
294
|
-
|
|
295
|
-
## 1.0.21 - 03.05.2024
|
|
296
|
-
|
|
297
|
-
- fix widget db structure
|
|
298
|
-
|
|
299
|
-
## 1.0.20 - 03.05.2024
|
|
300
|
-
|
|
301
|
-
- fix filter separator
|
|
302
|
-
|
|
303
|
-
## 1.0.19 - 02.05.2024
|
|
304
|
-
|
|
305
|
-
- widget plugin
|
|
306
|
-
- notification plugin
|
|
307
|
-
|
|
308
|
-
## 1.0.9 - 29.04.2024
|
|
309
|
-
|
|
310
|
-
- crud token support
|
|
311
|
-
- security - xss restriction
|
|
312
|
-
|
|
313
|
-
## 1.0.8 - 29.04.2024
|
|
314
|
-
|
|
315
|
-
- filter fix
|
|
316
|
-
|
|
317
|
-
## 1.0.7 - 26.04.2024
|
|
318
|
-
|
|
319
|
-
- code optimization
|
|
320
|
-
|
|
321
|
-
## 1.0.6 - 25.04.2024
|
|
322
|
-
|
|
323
|
-
- code optimization
|
|
324
|
-
|
|
325
|
-
## 1.0.5 - 24.04.2024
|
|
326
|
-
|
|
327
|
-
- code optimization
|
|
328
|
-
|
|
329
|
-
## 1.0.4 - 20.04.2024
|
|
330
|
-
|
|
331
|
-
- data api - order
|
|
332
|
-
- suggest api - db support
|
|
333
|
-
- del api fix
|
|
334
|
-
|
|
335
|
-
## 1.0.3 - 17.04.2024
|
|
336
|
-
|
|
337
|
-
- fix unit test
|
|
338
|
-
|
|
339
|
-
## 1.0.2 - 14.04.2024
|
|
340
|
-
|
|
341
|
-
- fix redis
|
|
342
|
-
|
|
343
|
-
## 1.0.1 - 14.04.2024
|
|
344
|
-
|
|
345
|
-
- fix redis
|
|
346
|
-
|
|
347
|
-
## 1.0.0 - 14.04.2024
|
|
348
|
-
|
|
349
|
-
- crud
|
|
350
|
-
- pg
|
|
351
|
-
- redis
|
|
352
|
-
- table
|
package/cron/schema.js
DELETED
package/crud/index.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import getOpt from './funcs/getOpt.js';
|
|
2
|
-
import setOpt from './funcs/setOpt.js';
|
|
3
|
-
import isFileExists from './funcs/isFileExists.js';
|
|
4
|
-
import dataUpdate from './funcs/dataUpdate.js';
|
|
5
|
-
import dataInsert from './funcs/dataInsert.js';
|
|
6
|
-
|
|
7
|
-
import update from './controllers/update.js';
|
|
8
|
-
import insert from './controllers/insert.js';
|
|
9
|
-
import deleteCrud from './controllers/deleteCrud.js';
|
|
10
|
-
import getAccessFunc from './funcs/getAccess.js';
|
|
11
|
-
|
|
12
|
-
import { tableSchema } from './schema.js';
|
|
13
|
-
|
|
14
|
-
async function plugin(fastify, config = {}) {
|
|
15
|
-
const prefix = config.prefix || '/api';
|
|
16
|
-
// funcs
|
|
17
|
-
fastify.decorate('setOpt', setOpt);
|
|
18
|
-
fastify.decorate('getOpt', getOpt);
|
|
19
|
-
fastify.decorate('dataUpdate', dataUpdate);
|
|
20
|
-
fastify.decorate('dataInsert', dataInsert);
|
|
21
|
-
fastify.decorate('getAccess', getAccessFunc);
|
|
22
|
-
|
|
23
|
-
fastify.decorate('isFileExists', isFileExists);
|
|
24
|
-
|
|
25
|
-
// api
|
|
26
|
-
fastify.put(`${prefix}/table/:table/:id?`, { schema: tableSchema }, update);
|
|
27
|
-
fastify.delete(`${prefix}/table/:table/:id?`, { schema: tableSchema }, deleteCrud);
|
|
28
|
-
fastify.post(`${prefix}/table/:table?`, { schema: tableSchema }, insert);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export default plugin;
|
package/crud/schema.js
DELETED
package/docs/.vitepress/abbr.mjs
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import abbr from '../abbr.json';
|
|
2
|
-
|
|
3
|
-
function handleAbbr(md) {
|
|
4
|
-
if (!abbr || typeof abbr !== 'object') {
|
|
5
|
-
return false;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const defaultRender = md.renderer.render.bind(md.renderer);
|
|
9
|
-
|
|
10
|
-
md.renderer.render = function(tokens, options, env) {
|
|
11
|
-
let result = defaultRender(tokens, options, env);
|
|
12
|
-
|
|
13
|
-
for (const key in abbr) {
|
|
14
|
-
const pattern = new RegExp(`${key}(?!\s*<\/abbr>)`, 'gm');
|
|
15
|
-
const replacement = `<abbr title="${abbr[key]}">${key}</abbr>`;
|
|
16
|
-
|
|
17
|
-
result = result.replace(pattern, replacement);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return result;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export default handleAbbr;
|