@opengis/fastify-table 2.5.25 → 2.5.27

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.
@@ -68,7 +68,7 @@ function checkField(key, val, options, idx, body) {
68
68
  }
69
69
  }
70
70
  }
71
- else if (isrequired && !val) {
71
+ else if (isrequired && !val && typeof val !== "boolean") {
72
72
  return {
73
73
  error: "empty required",
74
74
  key,
@@ -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;AA+B5D,wBAA8B,UAAU,CACtC,GAAG,EAAE,eAAe,EACpB,KAAK,EAAE,YAAY,kBAgIpB"}
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;AAiC5D,wBAA8B,UAAU,CACtC,GAAG,EAAE,eAAe,EACpB,KAAK,EAAE,YAAY,kBA8HpB"}
@@ -8,6 +8,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
10
  import { BadRequestError, ForbiddenError, NotImplementedError, } from "../../../../../errors.js";
11
+ const { security } = config;
11
12
  function fetchWithoutSSL(url, options) {
12
13
  const httpsAgent = new Agent({
13
14
  connect: {
@@ -33,11 +34,9 @@ export default async function authByData(req, reply) {
33
34
  const timeList = [d1];
34
35
  const ip = getIp(req);
35
36
  const { data: code, type } = query; // token
36
- const { security } = config;
37
37
  const authType = type ||
38
38
  (referer?.includes("softpro.ua") ? "google" : null) ||
39
- (referer?.includes("nsdi.gov.ua") ? "govid" : null) ||
40
- (referer?.includes("admin.nsdi.gki.com.ua") ? "govid" : null); // fix admin auth
39
+ (referer?.includes("nsdi.gov.ua") ? "govid" : null); // fix admin auth
41
40
  const hostOauth = {
42
41
  google: security?.social_auth_host_local || "https://id.softpro.ua",
43
42
  govid: security?.id_gov_ua_host_local || "https://nsdi.gov.ua",
@@ -1 +1 @@
1
- {"version":3,"file":"loginEuSign.d.ts","sourceRoot":"","sources":["../../../../../../server/routes/auth/controllers/page/loginEuSign.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAoBvD,wBAA8B,aAAa,CACzC,GAAG,EAAE,cAAc,EACnB,KAAK,EAAE,YAAY,kBAoBpB"}
1
+ {"version":3,"file":"loginEuSign.d.ts","sourceRoot":"","sources":["../../../../../../server/routes/auth/controllers/page/loginEuSign.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAmBvD,wBAA8B,aAAa,CACzC,GAAG,EAAE,cAAc,EACnB,KAAK,EAAE,YAAY,kBAapB"}
@@ -1,5 +1,4 @@
1
1
  import path from "node:path";
2
- import { readFile } from "node:fs/promises";
3
2
  import { fileURLToPath } from "url";
4
3
  import config from "../../../../../config.js";
5
4
  import { handlebars } from "../../../../helpers/index.js";
@@ -13,11 +12,8 @@ const headers = {
13
12
  "Accept-CH": "Viewport-Width, Width",
14
13
  };
15
14
  export default async function loginTemplate(req, reply) {
16
- const body1 = await getTemplate("page", "loginEuSign");
17
- const body = !body1
18
- ? await readFile(path.join(dirname, "../../../../templates/page/loginEuSign.html"), "utf8")
19
- : body1;
20
- const html = await handlebars.compile(body)({
15
+ const body = await getTemplate("page", "loginEuSign");
16
+ const html = await handlebars.compile(body?.html || body)({
21
17
  req,
22
18
  protocol: req.protocol,
23
19
  hostname: req.hostname,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/fastify-table",
3
- "version": "2.5.25",
3
+ "version": "2.5.27",
4
4
  "type": "module",
5
5
  "description": "core-plugins",
6
6
  "keywords": [