@opengis/fastify-table 1.0.82 → 1.0.84
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/.eslintrc.cjs +42 -42
- package/Changelog.md +253 -245
- package/README.md +26 -26
- package/config.js +10 -10
- package/cron/controllers/cronApi.js +22 -22
- package/cron/controllers/utils/cronList.js +1 -1
- package/cron/funcs/addCron.js +131 -131
- package/cron/index.js +10 -10
- package/crud/controllers/utils/checkXSS.js +45 -45
- package/crud/controllers/utils/xssInjection.js +72 -72
- package/crud/funcs/dataDelete.js +15 -15
- package/crud/funcs/dataUpdate.js +24 -24
- package/crud/funcs/getToken.js +27 -27
- package/crud/funcs/isFileExists.js +13 -13
- package/crud/funcs/setToken.js +53 -53
- package/crud/index.js +36 -36
- package/index.js +1 -1
- package/migration/exec.migrations.js +75 -75
- package/notification/controllers/testEmail.js +49 -49
- package/notification/funcs/sendNotification.js +111 -111
- package/notification/funcs/utils/sendEmail.js +39 -39
- package/notification/index.js +38 -38
- package/package.json +26 -26
- package/pg/funcs/getPG.js +30 -30
- package/redis/funcs/getRedis.js +23 -23
- package/server/migrations/0.sql +14 -0
- package/server/migrations/crm.sql +150 -150
- package/server/migrations/log.sql +43 -43
- package/server/templates/select/test.storage.data.json +3 -3
- package/server/templates/select/test.suggest.ato_new.json +2 -2
- package/server/templates/select/test.suggest.ato_new.sql +25 -25
- package/server/templates/select/test.suggest.data.json +4 -4
- package/server/templates/select/test.suggest.parent.sql +2 -2
- package/server.js +14 -14
- package/table/controllers/card.js +44 -44
- package/table/controllers/data.js +97 -97
- package/table/controllers/filter.js +37 -37
- package/table/controllers/form.js +28 -28
- package/table/controllers/search.js +72 -72
- package/table/controllers/suggest.js +18 -1
- package/table/controllers/utils/getSelect.js +20 -20
- package/table/controllers/utils/getSelectMeta.js +66 -66
- package/table/controllers/utils/getTemplate.js +28 -28
- package/table/controllers/utils/getTemplates.js +18 -18
- package/table/funcs/metaFormat/index.js +27 -27
- package/table/index.js +80 -78
- package/test/api/crud.xss.test.js +72 -72
- package/test/api/notification.test.js +37 -37
- package/test/api/suggest.test.js +65 -65
- package/test/api/table.test.js +57 -57
- package/test/api/widget.test.js +114 -114
- package/test/config.example +18 -18
- package/test/funcs/crud.test.js +76 -76
- package/test/funcs/notification.test.js +31 -31
- package/test/funcs/pg.test.js +34 -34
- package/test/funcs/redis.test.js +19 -19
- package/test/templates/cls/test.json +9 -9
- package/test/templates/form/cp_building.form.json +32 -32
- package/test/templates/select/account_id.json +3 -3
- package/test/templates/select/storage.data.json +2 -2
- package/test/templates/table/gis.dataset.table.json +20 -20
- package/util/controllers/next.id.js +4 -4
- package/util/controllers/properties.add.js +50 -50
- package/util/controllers/properties.get.js +19 -19
- package/widget/index.js +40 -40
package/widget/index.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
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
|
-
const tableSchema = {
|
|
6
|
-
params: {
|
|
7
|
-
// type: { type: 'string', pattern: '^([\\d\\w]+)$' },
|
|
8
|
-
objectid: { type: 'string', pattern: '^([\\d\\w]+)$' },
|
|
9
|
-
id: { type: 'string', pattern: '^([\\d\\w]+)$' },
|
|
10
|
-
},
|
|
11
|
-
querystring: {
|
|
12
|
-
debug: { type: 'string', pattern: '^(\\d+)$' },
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
async function route(fastify, opt) {
|
|
17
|
-
const prefix = opt.prefix || '/api';
|
|
18
|
-
fastify.route({
|
|
19
|
-
method: 'DELETE',
|
|
20
|
-
url: `${prefix}/widget/:type/:objectid/:id`,
|
|
21
|
-
schema: tableSchema,
|
|
22
|
-
handler: widgetDel,
|
|
23
|
-
});
|
|
24
|
-
fastify.route({
|
|
25
|
-
method: 'POST',
|
|
26
|
-
path: `${prefix}/widget/:type/:objectid/:id?`,
|
|
27
|
-
schema: tableSchema,
|
|
28
|
-
handler: widgetSet,
|
|
29
|
-
});
|
|
30
|
-
fastify.route({
|
|
31
|
-
method: 'GET',
|
|
32
|
-
path: `${prefix}/widget/:type/:objectid`,
|
|
33
|
-
config: {
|
|
34
|
-
policy: ['public'],
|
|
35
|
-
},
|
|
36
|
-
schema: tableSchema,
|
|
37
|
-
handler: widgetGet,
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
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
|
+
const tableSchema = {
|
|
6
|
+
params: {
|
|
7
|
+
// type: { type: 'string', pattern: '^([\\d\\w]+)$' },
|
|
8
|
+
objectid: { type: 'string', pattern: '^([\\d\\w]+)$' },
|
|
9
|
+
id: { type: 'string', pattern: '^([\\d\\w]+)$' },
|
|
10
|
+
},
|
|
11
|
+
querystring: {
|
|
12
|
+
debug: { type: 'string', pattern: '^(\\d+)$' },
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
async function route(fastify, opt) {
|
|
17
|
+
const prefix = opt.prefix || '/api';
|
|
18
|
+
fastify.route({
|
|
19
|
+
method: 'DELETE',
|
|
20
|
+
url: `${prefix}/widget/:type/:objectid/:id`,
|
|
21
|
+
schema: tableSchema,
|
|
22
|
+
handler: widgetDel,
|
|
23
|
+
});
|
|
24
|
+
fastify.route({
|
|
25
|
+
method: 'POST',
|
|
26
|
+
path: `${prefix}/widget/:type/:objectid/:id?`,
|
|
27
|
+
schema: tableSchema,
|
|
28
|
+
handler: widgetSet,
|
|
29
|
+
});
|
|
30
|
+
fastify.route({
|
|
31
|
+
method: 'GET',
|
|
32
|
+
path: `${prefix}/widget/:type/:objectid`,
|
|
33
|
+
config: {
|
|
34
|
+
policy: ['public'],
|
|
35
|
+
},
|
|
36
|
+
schema: tableSchema,
|
|
37
|
+
handler: widgetGet,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
export default route;
|