@opengis/fastify-table 2.0.30 → 2.0.32
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/crud/funcs/utils/getInsertQuery.d.ts.map +1 -1
- package/dist/server/plugins/crud/funcs/utils/getInsertQuery.js +7 -1
- package/dist/server/plugins/file/utils/allowedExtensions.d.ts.map +1 -1
- package/dist/server/plugins/file/utils/allowedExtensions.js +13 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInsertQuery.d.ts","sourceRoot":"","sources":["../../../../../../server/plugins/crud/funcs/utils/getInsertQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAI5D,wBAA8B,cAAc,CAAC,EAC3C,EAAE,EACF,KAAK,EACL,IAAI,EACJ,EAAE,EACF,GAAG,GACJ,EAAE;IACD,EAAE,CAAC,EAAE,UAAU,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;;;
|
|
1
|
+
{"version":3,"file":"getInsertQuery.d.ts","sourceRoot":"","sources":["../../../../../../server/plugins/crud/funcs/utils/getInsertQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAI5D,wBAA8B,cAAc,CAAC,EAC3C,EAAE,EACF,KAAK,EACL,IAAI,EACJ,EAAE,EACF,GAAG,GACJ,EAAE;IACD,EAAE,CAAC,EAAE,UAAU,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;;;UA6EA"}
|
|
@@ -8,6 +8,10 @@ export default async function getInsertQuery({ pg, table, data, id, uid, }) {
|
|
|
8
8
|
return null;
|
|
9
9
|
}
|
|
10
10
|
const names = columns.map((col) => col.name);
|
|
11
|
+
const types = columns.reduce((acc, curr) => ({
|
|
12
|
+
...acc,
|
|
13
|
+
[curr.name]: pg.pgType?.[curr.dataTypeID],
|
|
14
|
+
}), {});
|
|
11
15
|
Object.assign(data, {
|
|
12
16
|
...(id && pg.pk?.[table] ? { [pg.pk?.[table]]: id } : {}),
|
|
13
17
|
...(table !== "admin.users" ? { uid } : {}),
|
|
@@ -46,7 +50,9 @@ export default async function getInsertQuery({ pg, table, data, id, uid, }) {
|
|
|
46
50
|
returning *`;
|
|
47
51
|
const args = [
|
|
48
52
|
...filterData.map((el) => typeof el[1] === "object" &&
|
|
49
|
-
(!Array.isArray(el[1]) ||
|
|
53
|
+
(!Array.isArray(el[1]) ||
|
|
54
|
+
typeof el[1]?.[0] === "object" ||
|
|
55
|
+
types[el[0]] === "json")
|
|
50
56
|
? JSON.stringify(el[1])
|
|
51
57
|
: el[1]),
|
|
52
58
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allowedExtensions.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/file/utils/allowedExtensions.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,GAAG,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"allowedExtensions.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/file/utils/allowedExtensions.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,GAAG,EAAE,MAAM,EAsChB,CAAC;AAEF,QAAA,MAAM,MAAM,EAAE,MAAM,EAUnB,CAAC;AAEF,QAAA,MAAM,MAAM,EAAE,MAAM,EAA0B,CAAC;AAE/C,QAAA,MAAM,SAAS,EAAE,MAAM,EAatB,CAAC;AAEF,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;;;;;;;AAE1C,wBAKE"}
|
|
@@ -34,8 +34,20 @@ const all = [
|
|
|
34
34
|
"ico",
|
|
35
35
|
"ppt",
|
|
36
36
|
"pptx",
|
|
37
|
+
"heic",
|
|
38
|
+
"webp",
|
|
39
|
+
];
|
|
40
|
+
const images = [
|
|
41
|
+
"jpg",
|
|
42
|
+
"jpeg",
|
|
43
|
+
"png",
|
|
44
|
+
"tiff",
|
|
45
|
+
"tif",
|
|
46
|
+
"ico",
|
|
47
|
+
"svg",
|
|
48
|
+
"heic",
|
|
49
|
+
"webp",
|
|
37
50
|
];
|
|
38
|
-
const images = ["jpg", "jpeg", "png", "tiff", "tif", "ico", "svg"];
|
|
39
51
|
const videos = ["mp4", "mov", "avi"];
|
|
40
52
|
const documents = [
|
|
41
53
|
"pdf",
|