@opengis/fastify-table 2.4.18 → 2.5.0
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/server/plugins/auth/index.d.ts.map +1 -1
- package/dist/server/plugins/auth/index.js +5 -0
- package/dist/server/plugins/file/uploadMultiPart.d.ts.map +1 -1
- package/dist/server/plugins/file/uploadMultiPart.js +3 -1
- package/dist/server/plugins/logger/createFileStream.d.ts +1 -1
- package/dist/server/plugins/logger/createFileStream.d.ts.map +1 -1
- package/dist/server/plugins/pg/funcs/getMeta.d.ts.map +1 -1
- package/dist/server/plugins/pg/funcs/getMeta.js +37 -20
- package/dist/server/plugins/pg/funcs/init.d.ts.map +1 -1
- package/dist/server/plugins/pg/funcs/init.js +2 -0
- package/dist/server/plugins/sqlite/funcs/getSqlite.d.ts.map +1 -1
- package/dist/server/plugins/sqlite/funcs/getSqlite.js +9 -6
- package/dist/server/plugins/sqlite/sqliteClients.d.ts.map +1 -1
- package/dist/server/plugins/sqlite/sqliteClients.js +10 -9
- package/dist/server/plugins/table/funcs/getTemplate.js +2 -2
- package/dist/server/plugins/table/funcs/getTemplateSync.js +2 -2
- package/dist/server/plugins/util/funcs/eventStream.d.ts +1 -4
- package/dist/server/plugins/util/funcs/eventStream.d.ts.map +1 -1
- package/dist/server/routes/auth/controllers/euSign/authByData.d.ts.map +1 -1
- package/dist/server/routes/auth/controllers/euSign/authByData.js +1 -1
- package/dist/server/types/core.d.ts.map +1 -1
- package/dist/server/types/core.js +0 -4
- package/package.json +98 -98
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/plugins/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAYxD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAOtD,wBAAsB,SAAS,CAAC,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/plugins/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAYxD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAOtD,wBAAsB,SAAS,CAAC,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,YAAY,iBAkIxE;AAED,iBAAS,MAAM,CAAC,OAAO,EAAE,eAAe,QAmCvC;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -38,6 +38,11 @@ export async function onRequest(req, reply) {
|
|
|
38
38
|
const isPublic = Array.isArray(policy)
|
|
39
39
|
? policy.includes("public")
|
|
40
40
|
: policy === "L0";
|
|
41
|
+
// local development only, example: upload file via postman
|
|
42
|
+
if (process.platform === "win32" && !req.cookies) {
|
|
43
|
+
req.cookies = {};
|
|
44
|
+
req.cookies["session_auth"] = "test";
|
|
45
|
+
}
|
|
41
46
|
if (req.cookies?.["session_auth"] &&
|
|
42
47
|
!req.session?.passport?.user?.uid &&
|
|
43
48
|
(config.auth?.disable || config.auth?.user)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploadMultiPart.d.ts","sourceRoot":"","sources":["../../../../server/plugins/file/uploadMultiPart.ts"],"names":[],"mappings":"AAwBA,MAAM,WAAW,KAAK;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,C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CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AA2CD,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAkBvE;AAED,wBAAsB,gBAAgB,CACpC,EACE,IAAI,EAAE,QAAQ,EACd,MAA2C,EAC3C,MAAM,GACP,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACpD,MAAM,MAAW,mBA+BlB;AAED,wBAAsB,eAAe,CACnC,GAAG,EAAE,GAAG,EACR,EACE,UAAU,EACV,GAAG,EACH,MAAM,EACN,gBAAwB,GACzB,GAAE;IACD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CACvB,GACL,OAAO,CAAC,KAAK,CAAC,CA2GhB;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -141,9 +141,11 @@ export async function uploadMultiPart(req, { extensions, raw, subdir, originalFi
|
|
|
141
141
|
// move file to s3
|
|
142
142
|
if (config.s3?.endpoint) {
|
|
143
143
|
const s3 = providers();
|
|
144
|
+
if (config.trace)
|
|
145
|
+
console.log("upload to s3 start", file.relativeFilepath, fileBuffer.length);
|
|
144
146
|
await s3.uploadFile(file.relativeFilepath, fileBuffer);
|
|
145
147
|
if (config.trace)
|
|
146
|
-
console.log("upload to s3", file.relativeFilepath);
|
|
148
|
+
console.log("upload to s3 success", file.relativeFilepath);
|
|
147
149
|
}
|
|
148
150
|
return file;
|
|
149
151
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import build from "pino-abstract-transport";
|
|
2
|
-
export default function transportTarget(): import("stream").Transform & build.OnUnknown;
|
|
2
|
+
export default function transportTarget(): import("node:stream").Transform & build.OnUnknown;
|
|
3
3
|
//# sourceMappingURL=createFileStream.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createFileStream.d.ts","sourceRoot":"","sources":["../../../../server/plugins/logger/createFileStream.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,yBAAyB,CAAC;AAmC5C,MAAM,CAAC,OAAO,UAAU,eAAe,
|
|
1
|
+
{"version":3,"file":"createFileStream.d.ts","sourceRoot":"","sources":["../../../../server/plugins/logger/createFileStream.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,yBAAyB,CAAC;AAmC5C,MAAM,CAAC,OAAO,UAAU,eAAe,sDAoDtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getMeta.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/pg/funcs/getMeta.ts"],"names":[],"mappings":"AAMA,wBAA8B,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"getMeta.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/pg/funcs/getMeta.ts"],"names":[],"mappings":"AAMA,wBAA8B,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,gBAmG5D"}
|
|
@@ -3,7 +3,7 @@ import getPG from "./getPG.js";
|
|
|
3
3
|
import { BadRequestError } from "../../../../errors.js";
|
|
4
4
|
const data = {};
|
|
5
5
|
export default async function getMeta(opt, nocache) {
|
|
6
|
-
const pg = opt?.pg || getPG(
|
|
6
|
+
const pg = opt?.pg || getPG();
|
|
7
7
|
if (!pg) {
|
|
8
8
|
throw BadRequestError("pg client not found");
|
|
9
9
|
}
|
|
@@ -11,24 +11,42 @@ export default async function getMeta(opt, nocache) {
|
|
|
11
11
|
if (!pg.pk || nocache) {
|
|
12
12
|
await init(pg);
|
|
13
13
|
}
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
const tableOriginal = opt?.table || opt;
|
|
15
|
+
const [schemaName, tableName] = tableOriginal?.replace?.(/"/g, "").split(".");
|
|
16
|
+
const tableSafe = `${schemaName}."${tableName}"`;
|
|
17
|
+
const tableUnsafe = `${schemaName}.${tableName}`;
|
|
18
|
+
if (pg?.options?.database &&
|
|
19
|
+
data[pg.options.database]?.[tableUnsafe] &&
|
|
20
|
+
!nocache) {
|
|
21
|
+
return data[pg.options.database][tableUnsafe];
|
|
21
22
|
}
|
|
22
|
-
const
|
|
23
|
+
const tableRows = await pg
|
|
24
|
+
.query(`SELECT
|
|
25
|
+
nspname || '.' || relname as name,
|
|
26
|
+
relkind
|
|
27
|
+
FROM pg_class a
|
|
28
|
+
JOIN pg_namespace b
|
|
29
|
+
ON b.oid = a.relnamespace
|
|
30
|
+
WHERE relkind IN ('r', 'v', 'm')`)
|
|
31
|
+
.then((r) => r.rows || []);
|
|
32
|
+
const tlist = tableRows.map((el) => el.name);
|
|
33
|
+
if (!tlist.includes(tableUnsafe)) {
|
|
34
|
+
throw BadRequestError(`table not found: ${tableOriginal}`);
|
|
35
|
+
}
|
|
36
|
+
const relkinds = tableRows.reduce((acc, curr) => Object.assign(acc, { [curr.name]: curr.relkind }), {});
|
|
37
|
+
const fields = await pg
|
|
38
|
+
.query(`select * from ${tableSafe} limit 0`)
|
|
39
|
+
.then((r) => r.fields || []);
|
|
40
|
+
// remove quotes from table names
|
|
23
41
|
const pks1 = await pg
|
|
24
|
-
.query(`SELECT json_object_agg(c.conrelid::regclass, a.attname)
|
|
42
|
+
.query(`SELECT json_object_agg(replace(c.conrelid::regclass::text,'"',''), a.attname)
|
|
25
43
|
FROM pg_constraint c
|
|
26
44
|
left join pg_attribute a on c.conrelid=a.attrelid and a.attnum = c.conkey[1]
|
|
27
|
-
WHERE c.contype='p'::"char"
|
|
28
|
-
.then((
|
|
29
|
-
const pk =
|
|
30
|
-
? pks1[
|
|
31
|
-
: pks1[
|
|
45
|
+
WHERE c.contype='p'::"char"`)
|
|
46
|
+
.then((r) => r.rows[0].json_object_agg || {});
|
|
47
|
+
const pk = tableUnsafe.startsWith("public.")
|
|
48
|
+
? pks1[tableUnsafe.replace("public.", "")]
|
|
49
|
+
: pks1[tableUnsafe];
|
|
32
50
|
const geomColumns = fields.filter((el) => pg.pgType?.[el.dataTypeID] === "geometry");
|
|
33
51
|
const geomAttr = geomColumns.find((el) => el.name === "geom_4326") || geomColumns[0];
|
|
34
52
|
const dbColumns = await pg
|
|
@@ -36,21 +54,20 @@ export default async function getMeta(opt, nocache) {
|
|
|
36
54
|
attname,
|
|
37
55
|
json_build_object(
|
|
38
56
|
'title', pg_catalog.col_description(attrelid,attnum)
|
|
39
|
-
/*,'type', atttypid::regtype */
|
|
40
57
|
)
|
|
41
|
-
) from pg_catalog.pg_attribute
|
|
42
|
-
where attrelid=$1::regclass and attnum>0`, [
|
|
58
|
+
) from pg_catalog.pg_attribute
|
|
59
|
+
where attrelid=$1::regclass and attnum>0 and NOT attisdropped`, [tableSafe])
|
|
43
60
|
.then((el) => el.rows?.[0]?.json_object_agg || {});
|
|
44
61
|
fields.forEach((el) => Object.assign(el, { ...(dbColumns[el.name] || {}) }));
|
|
45
62
|
const res = {
|
|
46
63
|
pk,
|
|
47
64
|
columns: fields,
|
|
48
65
|
geom: geomAttr?.name,
|
|
49
|
-
view: ["v", "m"].includes(
|
|
66
|
+
view: ["v", "m"].includes(relkinds?.[tableSafe]),
|
|
50
67
|
};
|
|
51
68
|
if (!data[pg.options.database]) {
|
|
52
69
|
data[pg.options.database] = {};
|
|
53
70
|
}
|
|
54
|
-
data[pg.options.database][
|
|
71
|
+
data[pg.options.database][tableUnsafe] = res;
|
|
55
72
|
return res;
|
|
56
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/pg/funcs/init.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAIpD,iBAAe,IAAI,CAAC,MAAM,CAAC,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/pg/funcs/init.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAIpD,iBAAe,IAAI,CAAC,MAAM,CAAC,EAAE,UAAU,iBA8NtC;AAGD,eAAe,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSqlite.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/sqlite/funcs/getSqlite.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getSqlite.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/sqlite/funcs/getSqlite.ts"],"names":[],"mappings":"AAgBA,iBAAS,cAAc,CAAC,EACtB,IAAI,EACJ,QAAgB,EAChB,aAAqB,EACrB,iBAAiB,EAAE,OAAe,GACnC,GAAE,GAAQ,OAuBV;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
const { name: execName } = path.parse(process.argv0);
|
|
3
|
-
// import Database from 'better-sqlite3'; // error with bun
|
|
4
|
-
const { default: Database } = execName === "bun"
|
|
5
|
-
? { default: (await import("bun:sqlite")).Database }
|
|
6
|
-
: await import("better-sqlite3");
|
|
7
3
|
import config from "../../../../config.js";
|
|
4
|
+
if (config.sqlite && execName !== "bun") {
|
|
5
|
+
throw NotImplementedError("sqlite without bun is not supported");
|
|
6
|
+
}
|
|
7
|
+
const { Database } = config.sqlite ? await import("bun:sqlite") : {};
|
|
8
8
|
import sqliteClients from "../sqliteClients.js";
|
|
9
9
|
import init from "./init.js";
|
|
10
|
+
import { NotImplementedError } from "../../../../errors.js";
|
|
10
11
|
function getSqliteAsync({ name, readonly = false, fileMustExist = false, statement_timeout: timeout = 10000, } = {}) {
|
|
11
|
-
if (!config.sqlite)
|
|
12
|
+
if (!config.sqlite || !Database)
|
|
12
13
|
return null;
|
|
13
14
|
if (sqliteClients.client?.tlist) {
|
|
14
15
|
return sqliteClients.client;
|
|
@@ -19,7 +20,9 @@ function getSqliteAsync({ name, readonly = false, fileMustExist = false, stateme
|
|
|
19
20
|
timeout,
|
|
20
21
|
verbose: config.trace ? console.log : undefined,
|
|
21
22
|
};
|
|
22
|
-
sqliteClients.client =
|
|
23
|
+
sqliteClients.client = Database
|
|
24
|
+
? new Database(name || ":memory:", execName === "bun" ? undefined : dbConfig)
|
|
25
|
+
: null;
|
|
23
26
|
init(sqliteClients.client);
|
|
24
27
|
return sqliteClients.client;
|
|
25
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqliteClients.d.ts","sourceRoot":"","sources":["../../../../server/plugins/sqlite/sqliteClients.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sqliteClients.d.ts","sourceRoot":"","sources":["../../../../server/plugins/sqlite/sqliteClients.ts"],"names":[],"mappings":"AAgBA,QAAA,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,CAAC;AAkB9C,eAAe,aAAa,CAAC"}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
const { name: execName } = path.parse(process.argv0);
|
|
3
|
-
// import Database from 'better-sqlite3';
|
|
4
|
-
const { default: Database } = execName === "bun"
|
|
5
|
-
? { default: (await import("bun:sqlite")).Database }
|
|
6
|
-
: await import("better-sqlite3");
|
|
7
3
|
import config from "../../../config.js";
|
|
4
|
+
if (config.sqlite && execName !== "bun") {
|
|
5
|
+
throw NotImplementedError("sqlite without bun is not supported");
|
|
6
|
+
}
|
|
7
|
+
const { Database } = config.sqlite ? await import("bun:sqlite") : {};
|
|
8
8
|
import init from "./funcs/init.js";
|
|
9
|
+
import { NotImplementedError } from "../../../errors.js";
|
|
9
10
|
const sqliteClients = {};
|
|
10
|
-
if (config.sqlite) {
|
|
11
|
+
if (config.sqlite && Database) {
|
|
11
12
|
const client = new Database(config.sqlite?.name || ":memory:", execName === "bun"
|
|
12
13
|
? undefined
|
|
13
14
|
: {
|
|
14
|
-
readonly: config.sqlite?.readonly
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
readonly: config.sqlite?.readonly ?? false,
|
|
16
|
+
create: config.sqlite?.create ?? false,
|
|
17
|
+
readwrite: config.sqlite?.readwrite ?? true,
|
|
18
|
+
safeIntegers: config.sqlite?.safeIntegers ?? true,
|
|
18
19
|
});
|
|
19
20
|
client.init = () => init(client);
|
|
20
21
|
client.init();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import
|
|
2
|
+
import { load } from "js-yaml";
|
|
3
3
|
import { readdir, readFile } from "node:fs/promises";
|
|
4
4
|
import getTemplatePath from "./getTemplatePath.js";
|
|
5
5
|
import loadTemplate from "./loadTemplate.js";
|
|
@@ -8,7 +8,7 @@ async function readFileData(file) {
|
|
|
8
8
|
const data = await readFile(file, "utf-8");
|
|
9
9
|
const ext = file.substring(file.lastIndexOf(".") + 1);
|
|
10
10
|
if (ext === "yml") {
|
|
11
|
-
return
|
|
11
|
+
return load(data);
|
|
12
12
|
}
|
|
13
13
|
if (ext === "json" && data) {
|
|
14
14
|
return JSON.parse(data);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { readdirSync, readFileSync } from "node:fs";
|
|
3
|
-
import
|
|
3
|
+
import { load } from "js-yaml";
|
|
4
4
|
import getTemplatePath from "./getTemplatePath.js";
|
|
5
5
|
import loadTemplate from "./loadTemplate.js";
|
|
6
6
|
import mdToHTML from "../../md/funcs/mdToHTML.js";
|
|
@@ -8,7 +8,7 @@ function readFileData(file) {
|
|
|
8
8
|
const data = readFileSync(file, "utf-8");
|
|
9
9
|
const ext = file.substring(file.lastIndexOf(".") + 1);
|
|
10
10
|
if (ext === "yml") {
|
|
11
|
-
return
|
|
11
|
+
return load(data);
|
|
12
12
|
}
|
|
13
13
|
if (ext === "json") {
|
|
14
14
|
return JSON.parse(data);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventStream.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/util/funcs/eventStream.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,GAAG,EAAE,GAAG
|
|
1
|
+
{"version":3,"file":"eventStream.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/util/funcs/eventStream.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,GAAG,EAAE,GAAG,4BA0B3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authByData.d.ts","sourceRoot":"","sources":["../../../../../../server/routes/auth/controllers/euSign/authByData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAcvC,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"authByData.d.ts","sourceRoot":"","sources":["../../../../../../server/routes/auth/controllers/euSign/authByData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAcvC,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AA+B5D,wBAA8B,UAAU,CACtC,GAAG,EAAE,eAAe,EACpB,KAAK,EAAE,YAAY,kBAgIpB"}
|
|
@@ -7,7 +7,7 @@ import checkReferer from "../../../../plugins/auth/funcs/checkReferer.js";
|
|
|
7
7
|
import getQuery from "../../../../plugins/auth/funcs/getQuery.js";
|
|
8
8
|
import logAuth from "../../../../plugins/auth/funcs/logAuth.js";
|
|
9
9
|
import authorizeUser from "../../../../plugins/auth/funcs/authorizeUser.js";
|
|
10
|
-
import { BadRequestError, ForbiddenError, NotImplementedError } from "../../../../../errors.js";
|
|
10
|
+
import { BadRequestError, ForbiddenError, NotImplementedError, } from "../../../../../errors.js";
|
|
11
11
|
function fetchWithoutSSL(url, options) {
|
|
12
12
|
const httpsAgent = new Agent({
|
|
13
13
|
connect: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../server/types/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAM1B,QAAA,IAAI,QAAQ,EAAE,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../server/types/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAM1B,QAAA,IAAI,QAAQ,EAAE,GAAG,CAAC;AAMlB,MAAM,WAAW,UAAW,SAAQ,IAAI;IACtC,oBAAoB,CAAC,EAAE,GAAG,CAAC;IAC3B,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,OAAO,EAAE,GAAG,CAAC;IACb,KAAK,EAAE,GAAG,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC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IACjB,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC5B,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,0BAA2B,SAAQ,oBAAoB;IACtE,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
package/package.json
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@opengis/fastify-table",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"description": "core-plugins",
|
|
6
|
-
"keywords": [
|
|
7
|
-
"fastify",
|
|
8
|
-
"table",
|
|
9
|
-
"crud",
|
|
10
|
-
"auth",
|
|
11
|
-
"pg",
|
|
12
|
-
"backend"
|
|
13
|
-
],
|
|
14
|
-
"main": "dist/index.js",
|
|
15
|
-
"exports": {
|
|
16
|
-
".": "./dist/index.js",
|
|
17
|
-
"./index.js": "./dist/index.js",
|
|
18
|
-
"./errors.js": "./dist/errors.js",
|
|
19
|
-
"./utils.js": "./dist/utils.js",
|
|
20
|
-
"./package.json": "./package.json"
|
|
21
|
-
},
|
|
22
|
-
"files": [
|
|
23
|
-
"dist/*"
|
|
24
|
-
],
|
|
25
|
-
"scripts": {
|
|
26
|
-
"dump": "bun ./script/dump.ts",
|
|
27
|
-
"migrate": "bun ./script/migrate.ts",
|
|
28
|
-
"dump1": "bun ./dist/script/dump.js",
|
|
29
|
-
"migrate1": "bun ./dist/script/migrate.js",
|
|
30
|
-
"prepublishOnly": "npm run build",
|
|
31
|
-
"clean": "tsc -b --clean",
|
|
32
|
-
"build": "tsc -b --clean && tsc && copyfiles server/plugins/grpc/utils/*.proto dist && copyfiles server/migrations/*.sql dist && copyfiles server/templates/**/*.html dist && copyfiles server/templates/**/*.hbs dist && copyfiles script/* dist && copyfiles -u 2 module/core/*/* dist/module/core",
|
|
33
|
-
"prod": "NODE_ENV=production bun dist/server",
|
|
34
|
-
"patch": "npm version patch && git push && npm publish",
|
|
35
|
-
"minor": "npm version minor && git push && npm publish",
|
|
36
|
-
"major": "npm version major && git push && npm publish",
|
|
37
|
-
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
|
38
|
-
"test": "npx vitest run",
|
|
39
|
-
"compress": "node compress.js",
|
|
40
|
-
"dev1": "bun --hot dist/server",
|
|
41
|
-
"dev": "NODE_ENV=development bun start",
|
|
42
|
-
"start": "LOG_LEVEL=trace bun server"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"@aws-sdk/
|
|
47
|
-
"@
|
|
48
|
-
"@fastify/
|
|
49
|
-
"@fastify/
|
|
50
|
-
"@fastify/
|
|
51
|
-
"@fastify/
|
|
52
|
-
"@fastify/
|
|
53
|
-
"@
|
|
54
|
-
"@grpc/
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"dotenv": "17.
|
|
58
|
-
"fastify": "5.
|
|
59
|
-
"fastify-plugin": "
|
|
60
|
-
"fastify-session-redis-store": "7.1.2",
|
|
61
|
-
"handlebars": "4.7.9",
|
|
62
|
-
"image-size": "2.0.2",
|
|
63
|
-
"ioredis": "5.
|
|
64
|
-
"js-yaml": "
|
|
65
|
-
"markdown-it": "14.
|
|
66
|
-
"minio": "^8.0.7",
|
|
67
|
-
"nodemailer": "
|
|
68
|
-
"otplib": "13.4.
|
|
69
|
-
"pg": "8.
|
|
70
|
-
"pino": "10.3.1",
|
|
71
|
-
"pino-abstract-transport": "3.0.0",
|
|
72
|
-
"promised-handlebars": "2.0.1",
|
|
73
|
-
"qrcode": "1.5.4",
|
|
74
|
-
"sharp": "0.
|
|
75
|
-
"uglify-js": "3.19.3",
|
|
76
|
-
"undici": "
|
|
77
|
-
},
|
|
78
|
-
"devDependencies": {
|
|
79
|
-
"@
|
|
80
|
-
"@types/bun": "^1.3.5",
|
|
81
|
-
"@types/js-yaml": "^4.0.9",
|
|
82
|
-
"@types/markdown-it": "^14.1.2",
|
|
83
|
-
"@types/node": "^
|
|
84
|
-
"@types/nodemailer": "^
|
|
85
|
-
"@types/passport": "^1.0.17",
|
|
86
|
-
"@types/passport-local": "^1.0.38",
|
|
87
|
-
"@types/pg": "^8.
|
|
88
|
-
"@types/qrcode": "^1.5.
|
|
89
|
-
"copyfiles": "^2.4.1",
|
|
90
|
-
"eslint": "^10.
|
|
91
|
-
"eslint-
|
|
92
|
-
"ts-migrate": "^0.1.35",
|
|
93
|
-
"typescript": "^6.0.2",
|
|
94
|
-
"vitest": "^4.1.2"
|
|
95
|
-
},
|
|
96
|
-
"author": "Softpro",
|
|
97
|
-
"license": "ISC"
|
|
98
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@opengis/fastify-table",
|
|
3
|
+
"version": "2.5.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "core-plugins",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"fastify",
|
|
8
|
+
"table",
|
|
9
|
+
"crud",
|
|
10
|
+
"auth",
|
|
11
|
+
"pg",
|
|
12
|
+
"backend"
|
|
13
|
+
],
|
|
14
|
+
"main": "dist/index.js",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": "./dist/index.js",
|
|
17
|
+
"./index.js": "./dist/index.js",
|
|
18
|
+
"./errors.js": "./dist/errors.js",
|
|
19
|
+
"./utils.js": "./dist/utils.js",
|
|
20
|
+
"./package.json": "./package.json"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist/*"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"dump": "bun ./script/dump.ts",
|
|
27
|
+
"migrate": "bun ./script/migrate.ts",
|
|
28
|
+
"dump1": "bun ./dist/script/dump.js",
|
|
29
|
+
"migrate1": "bun ./dist/script/migrate.js",
|
|
30
|
+
"prepublishOnly": "npm run build",
|
|
31
|
+
"clean": "tsc -b --clean",
|
|
32
|
+
"build": "tsc -b --clean && tsc && copyfiles server/plugins/grpc/utils/*.proto dist && copyfiles server/migrations/*.sql dist && copyfiles server/templates/**/*.html dist && copyfiles server/templates/**/*.hbs dist && copyfiles script/* dist && copyfiles -u 2 module/core/*/* dist/module/core",
|
|
33
|
+
"prod": "NODE_ENV=production bun dist/server",
|
|
34
|
+
"patch": "npm version patch && git push && npm publish",
|
|
35
|
+
"minor": "npm version minor && git push && npm publish",
|
|
36
|
+
"major": "npm version major && git push && npm publish",
|
|
37
|
+
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
|
38
|
+
"test": "npx vitest run",
|
|
39
|
+
"compress": "node compress.js",
|
|
40
|
+
"dev1": "bun --hot dist/server",
|
|
41
|
+
"dev": "NODE_ENV=development bun start",
|
|
42
|
+
"start": "LOG_LEVEL=trace bun server",
|
|
43
|
+
"start1": "npx tsx server"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@aws-sdk/client-s3": "3.1079.0",
|
|
47
|
+
"@aws-sdk/lib-storage": "3.1079.0",
|
|
48
|
+
"@fastify/cookie": "11.0.2",
|
|
49
|
+
"@fastify/http-proxy": "11.5.0",
|
|
50
|
+
"@fastify/multipart": "10.0.0",
|
|
51
|
+
"@fastify/passport": "3.0.2",
|
|
52
|
+
"@fastify/rate-limit": "11.1.0",
|
|
53
|
+
"@fastify/session": "11.1.1",
|
|
54
|
+
"@grpc/grpc-js": "1.14.4",
|
|
55
|
+
"@grpc/proto-loader": "0.8.1",
|
|
56
|
+
"apache-crypt": "1.2.6",
|
|
57
|
+
"dotenv": "17.4.2",
|
|
58
|
+
"fastify": "5.9.0",
|
|
59
|
+
"fastify-plugin": "6.0.0",
|
|
60
|
+
"fastify-session-redis-store": "7.1.2",
|
|
61
|
+
"handlebars": "4.7.9",
|
|
62
|
+
"image-size": "2.0.2",
|
|
63
|
+
"ioredis": "5.11.1",
|
|
64
|
+
"js-yaml": "5.2.1",
|
|
65
|
+
"markdown-it": "14.3.0",
|
|
66
|
+
"minio": "^8.0.7",
|
|
67
|
+
"nodemailer": "9.0.3",
|
|
68
|
+
"otplib": "13.4.1",
|
|
69
|
+
"pg": "8.22.0",
|
|
70
|
+
"pino": "10.3.1",
|
|
71
|
+
"pino-abstract-transport": "3.0.0",
|
|
72
|
+
"promised-handlebars": "2.0.1",
|
|
73
|
+
"qrcode": "1.5.4",
|
|
74
|
+
"sharp": "0.35.3",
|
|
75
|
+
"uglify-js": "3.19.3",
|
|
76
|
+
"undici": "8.6.0"
|
|
77
|
+
},
|
|
78
|
+
"devDependencies": {
|
|
79
|
+
"@stylistic/eslint-plugin": "^5.10.0",
|
|
80
|
+
"@types/bun": "^1.3.5",
|
|
81
|
+
"@types/js-yaml": "^4.0.9",
|
|
82
|
+
"@types/markdown-it": "^14.1.2",
|
|
83
|
+
"@types/node": "^26.1.0",
|
|
84
|
+
"@types/nodemailer": "^8.0.1",
|
|
85
|
+
"@types/passport": "^1.0.17",
|
|
86
|
+
"@types/passport-local": "^1.0.38",
|
|
87
|
+
"@types/pg": "^8.20.0",
|
|
88
|
+
"@types/qrcode": "^1.5.6",
|
|
89
|
+
"copyfiles": "^2.4.1",
|
|
90
|
+
"eslint": "^10.6.0",
|
|
91
|
+
"eslint-stylistic-airbnb": "^3.2.0",
|
|
92
|
+
"ts-migrate": "^0.1.35",
|
|
93
|
+
"typescript": "^6.0.2",
|
|
94
|
+
"vitest": "^4.1.2"
|
|
95
|
+
},
|
|
96
|
+
"author": "Softpro",
|
|
97
|
+
"license": "ISC"
|
|
98
|
+
}
|