@domain.js/main 1.1.0 → 1.1.1

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.
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Main = Main;
7
7
  const formbody_1 = __importDefault(require("@fastify/formbody"));
8
8
  const multipart_1 = __importDefault(require("@fastify/multipart"));
9
+ const crypto_1 = require("crypto");
9
10
  const fastify_1 = __importDefault(require("fastify"));
10
11
  const fastify_socket_io_1 = __importDefault(require("fastify-socket.io"));
11
12
  const router_1 = require("./router");
@@ -14,7 +15,9 @@ const utils_1 = require("./utils");
14
15
  function Main(cnf, deps) {
15
16
  const utils = (0, utils_1.Utils)(cnf);
16
17
  const { routers, domain, httpCodes, makeProfileHook, socketLogger } = deps;
17
- const server = (0, fastify_1.default)();
18
+ const server = (0, fastify_1.default)({
19
+ genReqId: () => (0, crypto_1.randomUUID)(),
20
+ });
18
21
  server.setErrorHandler((error, request, reply) => {
19
22
  const { code, message, data } = error;
20
23
  const statusCode = httpCodes[code] || 500;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domain.js/main",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "DDD framework",
5
5
  "main": "dist/index.js",
6
6
  "bin": {