@opengis/fastify-table 2.5.58 → 2.5.60
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/validateData.d.ts.map +1 -1
- package/dist/server/plugins/crud/funcs/validateData.js +4 -1
- package/dist/server/plugins/policy/funcs/checkPolicy.d.ts.map +1 -1
- package/dist/server/plugins/policy/funcs/checkPolicy.js +3 -1
- package/dist/server/plugins/table/funcs/metaFormat/index.d.ts.map +1 -1
- package/dist/server/plugins/table/funcs/metaFormat/index.js +9 -0
- package/dist/server/routes/crud/controllers/insert.d.ts.map +1 -1
- package/dist/server/routes/table/schema.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateData.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/crud/funcs/validateData.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validateData.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/crud/funcs/validateData.ts"],"names":[],"mappings":"AAqJA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,IAAS,EACT,MAAW,EACX,MAAc,GACf,EAAE;IACD,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,OASA"}
|
|
@@ -99,7 +99,10 @@ function checkBody({ body = {}, arr = [], idx }) {
|
|
|
99
99
|
const result = body[key]?.reduce?.((acc, item, i) => {
|
|
100
100
|
const check = checkBody({
|
|
101
101
|
body: item,
|
|
102
|
-
arr: input.colModel
|
|
102
|
+
arr: input.colModel.map((el) => ({
|
|
103
|
+
...el,
|
|
104
|
+
key: el.key || el.name,
|
|
105
|
+
})),
|
|
103
106
|
idx: i,
|
|
104
107
|
});
|
|
105
108
|
acc.push(check);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkPolicy.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/policy/funcs/checkPolicy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,eAAe,EAEhB,MAAM,wBAAwB,CAAC;AAKhC,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,CAAC,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"checkPolicy.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/policy/funcs/checkPolicy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,eAAe,EAEhB,MAAM,wBAAwB,CAAC;AAKhC,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,CAAC,EAAE,GAAG,QAoIlE"}
|
|
@@ -12,7 +12,9 @@ export default function checkPolicy(req, jwt) {
|
|
|
12
12
|
hostname.startsWith("admin");
|
|
13
13
|
const { role, referer, policy = [], } = (routeOptions?.config || {});
|
|
14
14
|
// role=admin|regular
|
|
15
|
-
const isRole = (role &&
|
|
15
|
+
const isRole = (role &&
|
|
16
|
+
(!user?.user_type ||
|
|
17
|
+
!role.split("|").find((r) => user?.user_type?.includes?.(r)))) ||
|
|
16
18
|
(policy.includes("admin") && !user?.user_type?.includes?.("admin"));
|
|
17
19
|
const allowExtPublic = [".png", ".jpg", ".svg"];
|
|
18
20
|
const ext = path.toLowerCase().substr(-4);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../server/plugins/table/funcs/metaFormat/index.ts"],"names":[],"mappings":"AAOA,wBAA8B,UAAU,CACtC,EACE,IAAI,EAAE,QAAQ,EACd,KAAK,EACL,GAAQ,EACR,KAAU,EACV,KAAY,EACZ,QAAe,GAChB,EAAE;IACD,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,EACD,EAAE,MAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../server/plugins/table/funcs/metaFormat/index.ts"],"names":[],"mappings":"AAOA,wBAA8B,UAAU,CACtC,EACE,IAAI,EAAE,QAAQ,EACd,KAAK,EACL,GAAQ,EACR,KAAU,EACV,KAAY,EACZ,QAAe,GAChB,EAAE;IACD,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,EACD,EAAE,MAAmB,gBAiHtB"}
|
|
@@ -68,6 +68,15 @@ export default async function metaFormat({ rows: original, table, cls = {}, html
|
|
|
68
68
|
if (!sufix) {
|
|
69
69
|
Object.assign(el, { [attr.name]: val.text || val });
|
|
70
70
|
}
|
|
71
|
+
else if (Array.isArray(val)) {
|
|
72
|
+
Object.assign(el, {
|
|
73
|
+
[val?.[0]?.color ? `${attr.name}_data` : `${attr.name}_text`]: val?.[0]?.color
|
|
74
|
+
? val
|
|
75
|
+
: val?.[0]?.text
|
|
76
|
+
? val.map((e) => e.text)
|
|
77
|
+
: val,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
71
80
|
else {
|
|
72
81
|
Object.assign(el, {
|
|
73
82
|
[val?.color ? `${attr.name}_data` : `${attr.name}_text`]: val.color ? val : val.text || val,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insert.d.ts","sourceRoot":"","sources":["../../../../../server/routes/crud/controllers/insert.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"insert.d.ts","sourceRoot":"","sources":["../../../../../server/routes/crud/controllers/insert.ts"],"names":[],"mappings":"AAmBA,wBAA8B,MAAM,CAAC,GAAG,EAAE,GAAG,gBAgM5C"}
|