@opengis/fastify-table 2.0.111 → 2.0.113
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/dist/helper.d.ts +8 -0
- package/dist/helper.d.ts.map +1 -0
- package/dist/helper.js +34 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -6
- package/dist/module/core/cls/constraint_action.json +10 -0
- package/dist/module/core/cls/constraint_matchtype.json +6 -0
- package/dist/module/core/cls/constraint_type.json +14 -0
- package/dist/module/core/cls/constraint_type_full.json +18 -0
- package/dist/module/core/cls/constraint_type_table.json +18 -0
- package/dist/module/core/cls/core.user_type.json +14 -0
- package/dist/module/core/pt/schemaItem.pt.hbs +18 -0
- package/dist/module/core/select/core.user_mentioned.sql +2 -0
- package/dist/script/dump.d.ts +2 -0
- package/dist/script/dump.d.ts.map +1 -0
- package/dist/script/dump.js +102 -129
- package/dist/script/dump.ts +205 -0
- package/dist/script/migrate.d.ts +2 -0
- package/dist/script/migrate.d.ts.map +1 -0
- package/dist/script/migrate.js +24 -25
- package/dist/script/migrate.ts +31 -0
- package/dist/server/plugins/sqlite/funcs/getSqlite.d.ts.map +1 -1
- package/dist/server/plugins/sqlite/funcs/getSqlite.js +1 -2
- package/dist/server/plugins/sqlite/sqliteClients.d.ts.map +1 -1
- package/dist/server/plugins/sqlite/sqliteClients.js +1 -2
- package/dist/server/plugins/table/funcs/getColumnCLS.d.ts.map +1 -1
- package/dist/server/plugins/table/funcs/getColumnCLS.js +18 -7
- package/dist/server/plugins/util/funcs/eventStream.d.ts +4 -1
- package/dist/server/plugins/util/funcs/eventStream.d.ts.map +1 -1
- package/dist/server/routes/file/controllers/export.d.ts.map +1 -1
- package/dist/server/routes/file/controllers/export.js +21 -14
- package/dist/server/routes/file/controllers/utils/pubsub.d.ts +2 -0
- package/dist/server/routes/file/controllers/utils/pubsub.d.ts.map +1 -0
- package/dist/server/routes/file/controllers/utils/pubsub.js +112 -0
- package/dist/server/routes/table/controllers/dataInfo.d.ts +8 -1
- package/dist/server/routes/table/controllers/dataInfo.d.ts.map +1 -1
- package/dist/server/routes/table/controllers/dataInfo.js +7 -5
- package/dist/server/types/core.d.ts.map +1 -1
- package/dist/server/types/core.js +0 -1
- package/dist/test.setup.js +0 -1
- package/dist/utils.d.ts +2 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +3 -0
- package/package.json +5 -4
- package/dist/log/migration/dist-geoname-cls.json +0 -1
- package/dist/log/migration/dist-geoname-cls.sql +0 -0
- package/dist/server/plugins/upload/finishUpload.d.ts +0 -9
- package/dist/server/plugins/upload/finishUpload.d.ts.map +0 -1
- package/dist/server/plugins/upload/finishUpload.js +0 -33
- package/dist/server/plugins/util/funcs/routeOptions.d.ts +0 -3
- package/dist/server/plugins/util/funcs/routeOptions.d.ts.map +0 -1
- package/dist/server/plugins/util/funcs/routeOptions.js +0 -2
- package/dist/server/routes/auth/controllers/2factor/generate.d.ts +0 -19
- package/dist/server/routes/auth/controllers/2factor/generate.d.ts.map +0 -1
- package/dist/server/routes/auth/controllers/2factor/generate.js +0 -38
- package/dist/server/routes/auth/controllers/2factor/toggle.d.ts +0 -18
- package/dist/server/routes/auth/controllers/2factor/toggle.d.ts.map +0 -1
- package/dist/server/routes/auth/controllers/2factor/toggle.js +0 -39
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { FastifyReply } from "fastify";
|
|
2
|
-
import { ExtendedRequest } from "../../../../types/core.js";
|
|
3
|
-
/**
|
|
4
|
-
* Генерація secret для двохфакторної авторизації користувача
|
|
5
|
-
*
|
|
6
|
-
* @method GET
|
|
7
|
-
* @summary Генерація user secret для двохфакторної авторизації
|
|
8
|
-
* @priority 3
|
|
9
|
-
* @alias generate
|
|
10
|
-
* @type api
|
|
11
|
-
* @tag auth
|
|
12
|
-
* @requires 2fa
|
|
13
|
-
* @errors 500
|
|
14
|
-
* @returns {Number} status Номер помилки
|
|
15
|
-
* @returns {String|Object} error Опис помилки
|
|
16
|
-
* @returns {String|Object} message Повідомлення про успішне виконання або об'єкт з параметрами
|
|
17
|
-
*/
|
|
18
|
-
export default function generateFunction({ pg, user }: ExtendedRequest, reply: FastifyReply): Promise<never>;
|
|
19
|
-
//# sourceMappingURL=generate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../../../../server/routes/auth/controllers/2factor/generate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAO5D;;;;;;;;;;;;;;GAcG;AAEH,wBAA8B,gBAAgB,CAC5C,EAAE,EAAqB,EAAE,IAAS,EAAE,EAAE,eAAe,EACrD,KAAK,EAAE,YAAY,kBAqBpB"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import config from "../../../../../config.js";
|
|
2
|
-
import pgClients from "../../../../plugins/pg/pgClients.js";
|
|
3
|
-
import { generate } from "./providers/totp.js";
|
|
4
|
-
/**
|
|
5
|
-
* Генерація secret для двохфакторної авторизації користувача
|
|
6
|
-
*
|
|
7
|
-
* @method GET
|
|
8
|
-
* @summary Генерація user secret для двохфакторної авторизації
|
|
9
|
-
* @priority 3
|
|
10
|
-
* @alias generate
|
|
11
|
-
* @type api
|
|
12
|
-
* @tag auth
|
|
13
|
-
* @requires 2fa
|
|
14
|
-
* @errors 500
|
|
15
|
-
* @returns {Number} status Номер помилки
|
|
16
|
-
* @returns {String|Object} error Опис помилки
|
|
17
|
-
* @returns {String|Object} message Повідомлення про успішне виконання або об'єкт з параметрами
|
|
18
|
-
*/
|
|
19
|
-
export default async function generateFunction({ pg = pgClients.client, user = {} }, reply) {
|
|
20
|
-
if (!user?.uid) {
|
|
21
|
-
return reply.status(401).send("unauthorized");
|
|
22
|
-
}
|
|
23
|
-
const { uid } = user;
|
|
24
|
-
if (!config?.auth?.["2factor"]) {
|
|
25
|
-
return reply.status(400).send("2fa not enabled");
|
|
26
|
-
}
|
|
27
|
-
if (!config.pg) {
|
|
28
|
-
return reply.status(400).send("empty pg");
|
|
29
|
-
}
|
|
30
|
-
if (!uid) {
|
|
31
|
-
return reply.status(401).send("access restricted: unauthorized");
|
|
32
|
-
}
|
|
33
|
-
const res = await generate({ pg, uid });
|
|
34
|
-
if (res?.enabled) {
|
|
35
|
-
return reply.status(400).send("already created 2fa");
|
|
36
|
-
}
|
|
37
|
-
return reply.status(200).send(res);
|
|
38
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { FastifyReply } from 'fastify';
|
|
2
|
-
/**
|
|
3
|
-
* Включення/виключення двохфакторної авторизації для користувача
|
|
4
|
-
*
|
|
5
|
-
* @method GET
|
|
6
|
-
* @summary Включення/виключення двохфакторної авторизації
|
|
7
|
-
* @priority 2
|
|
8
|
-
* @alias toggle
|
|
9
|
-
* @type api
|
|
10
|
-
* @tag auth
|
|
11
|
-
* @requires 2fa
|
|
12
|
-
* @errors 500
|
|
13
|
-
* @returns {Number} status Номер помилки
|
|
14
|
-
* @returns {String|Object} error Опис помилки
|
|
15
|
-
* @returns {String|Object} message Повідомлення про успішне виконання або об'єкт з параметрами
|
|
16
|
-
*/
|
|
17
|
-
export default function toggleFunction(req: any, reply: FastifyReply): Promise<never>;
|
|
18
|
-
//# sourceMappingURL=toggle.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../../../../server/routes/auth/controllers/2factor/toggle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAOvC;;;;;;;;;;;;;;GAcG;AAEH,wBAA8B,cAAc,CAAC,GAAG,EAAC,GAAG,EAAE,KAAK,EAAC,YAAY,kBAyBvE"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import config from '../../../../../config.js';
|
|
2
|
-
import pgClients from '../../../../plugins/pg/pgClients.js';
|
|
3
|
-
import { toggle } from './providers/totp.js';
|
|
4
|
-
/**
|
|
5
|
-
* Включення/виключення двохфакторної авторизації для користувача
|
|
6
|
-
*
|
|
7
|
-
* @method GET
|
|
8
|
-
* @summary Включення/виключення двохфакторної авторизації
|
|
9
|
-
* @priority 2
|
|
10
|
-
* @alias toggle
|
|
11
|
-
* @type api
|
|
12
|
-
* @tag auth
|
|
13
|
-
* @requires 2fa
|
|
14
|
-
* @errors 500
|
|
15
|
-
* @returns {Number} status Номер помилки
|
|
16
|
-
* @returns {String|Object} error Опис помилки
|
|
17
|
-
* @returns {String|Object} message Повідомлення про успішне виконання або об'єкт з параметрами
|
|
18
|
-
*/
|
|
19
|
-
export default async function toggleFunction(req, reply) {
|
|
20
|
-
const { pg = pgClients.client, session = {}, query = {}, } = req;
|
|
21
|
-
const { uid } = session?.passport?.user || {};
|
|
22
|
-
const { code, enable } = query;
|
|
23
|
-
if (!config.pg) {
|
|
24
|
-
return reply.status(400).send('empty pg');
|
|
25
|
-
}
|
|
26
|
-
if (!uid) {
|
|
27
|
-
return reply.status(401).send('access restricted: unauthorized');
|
|
28
|
-
}
|
|
29
|
-
if (!code) {
|
|
30
|
-
return reply.status(400).send('param "code" is required');
|
|
31
|
-
}
|
|
32
|
-
if (!Object.hasOwn(query, 'enable')) {
|
|
33
|
-
return reply.status(400).send('param "enable" is required');
|
|
34
|
-
}
|
|
35
|
-
const data = await toggle({
|
|
36
|
-
pg, code, enable: enable === 'true', uid,
|
|
37
|
-
});
|
|
38
|
-
return reply.status(200).send(data);
|
|
39
|
-
}
|