beavuck-time 3.2.7 → 3.2.9

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.
@@ -8,9 +8,10 @@ const beavuckTimeServerError_1 = require("../errors/beavuckTimeServerError");
8
8
  const http_status_codes_1 = require("http-status-codes");
9
9
  const tsoa_1 = require("tsoa");
10
10
  const errorResponse_1 = require("../errors/errorResponse");
11
+ const stringUtil_1 = require("../utils/stringUtil");
11
12
  const errorHandler = (err, req, res, next) => {
12
13
  if (err instanceof tsoa_1.ValidateError) {
13
- const logMsg = `Validation error on ${req.path}: ${err.fields}`;
14
+ const logMsg = `Validation error on ${req.path}: ${JSON.stringify(err.fields)}`;
14
15
  const resStatus = http_status_codes_1.StatusCodes.UNPROCESSABLE_ENTITY;
15
16
  const resMsgObj = { message: 'Validation Error', details: err.fields };
16
17
  handleOtherError(res, logMsg, resStatus, resMsgObj);
@@ -45,7 +46,7 @@ function handleOtherError(res, logMsg = `Unknown error`, resStatus = http_status
45
46
  handleBeavuckServerError(res, new beavuckTimeServerError_1.BeavuckTimeServerError(logMsg));
46
47
  }
47
48
  else {
48
- logger_1.logger.error(`${logMsg}: ${JSON.stringify(resMsg)}`);
49
+ logger_1.logger.error(`${(0, stringUtil_1.sanitizeForLog)(logMsg)}: ${JSON.stringify(resMsg)}`);
49
50
  res.status(resStatus).json(resMsg);
50
51
  }
51
52
  }
@@ -6,15 +6,10 @@ const runtime_1 = require("@tsoa/runtime");
6
6
  const nowController_1 = require("./../controllers/nowController");
7
7
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
8
8
  const models = {
9
- "IsoTimestamp": {
10
- "dataType": "refAlias",
11
- "type": { "dataType": "string", "validators": {} },
12
- },
13
- // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
14
9
  "Now": {
15
10
  "dataType": "refObject",
16
11
  "properties": {
17
- "now": { "ref": "IsoTimestamp", "required": true },
12
+ "now": { "dataType": "string", "required": true },
18
13
  },
19
14
  "additionalProperties": false,
20
15
  },
@@ -1,4 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RFC_3339_FORMAT = void 0;
4
+ /**
5
+ * Stringified date-time in RFC 3339 format (often referred to as ISO 8601 format)
6
+ * See [RFC 3339 section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6)
7
+ * @example 2019-08-24T14:15:22Z
8
+ * @format date-time
9
+ */
4
10
  exports.RFC_3339_FORMAT = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/;
@@ -7,15 +7,10 @@
7
7
  "requestBodies": {},
8
8
  "responses": {},
9
9
  "schemas": {
10
- "IsoTimestamp": {
11
- "type": "string",
12
- "format": "date-time",
13
- "description": "Stringified date-time in RFC 3339 format (often referred to as ISO 8601 format)\nSee [RFC 3339 section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6)"
14
- },
15
10
  "Now": {
16
11
  "properties": {
17
12
  "now": {
18
- "$ref": "#/components/schemas/IsoTimestamp"
13
+ "type": "string"
19
14
  }
20
15
  },
21
16
  "required": [
@@ -32,7 +27,7 @@
32
27
  },
33
28
  "info": {
34
29
  "title": "beavuck-time",
35
- "version": "3.2.7",
30
+ "version": "3.2.9",
36
31
  "description": "Get time in ISO format, in UTC timezone, from a simple, lightweight node server",
37
32
  "license": {
38
33
  "name": "Unlicense"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beavuck-time",
3
- "version": "3.2.7",
3
+ "version": "3.2.9",
4
4
  "description": "Get time in ISO format, in UTC timezone, from a simple, lightweight node server",
5
5
  "keywords": [
6
6
  "time",
@@ -57,7 +57,7 @@
57
57
  "express": "^5.2.1",
58
58
  "express-rate-limit": "^8.5.2",
59
59
  "http-status-codes": "^2.3.0",
60
- "joi": "^18.2.2",
60
+ "joi": "^18.2.3",
61
61
  "tsoa": "^7.0.0-alpha.0",
62
62
  "winston": "^3.19.0",
63
63
  "winston-daily-rotate-file": "^5.0.0"
@@ -67,18 +67,18 @@
67
67
  "@types/cors": "^2.8.19",
68
68
  "@types/express": "^5.0.6",
69
69
  "@types/jest": "^30.0.0",
70
- "@types/node": "^25.9.3",
70
+ "@types/node": "^26.0.0",
71
71
  "@types/supertest": "^7.2.0",
72
72
  "eslint": "^10.5.0",
73
- "globals": "^17.6.0",
73
+ "globals": "^17.7.0",
74
74
  "jest": "^30.4.2",
75
75
  "jest-util": "^30.4.1",
76
- "npm-check-updates": "^22.2.3",
76
+ "npm-check-updates": "^22.2.7",
77
77
  "prettier": "3.8.4",
78
78
  "supertest": "^7.2.2",
79
79
  "ts-jest": "^29.4.11",
80
80
  "typescript": "^6.0.3",
81
- "typescript-eslint": "^8.61.1"
81
+ "typescript-eslint": "^8.62.0"
82
82
  },
83
83
  "engines": {
84
84
  "node": ">=20.12.0"