From 523851835f46acd60b4ef4cd48892fa862b0b17a Mon Sep 17 00:00:00 2001 From: AnthonyLzq Date: Sun, 11 Aug 2024 21:54:11 -0500 Subject: [PATCH] feat: udpated packages and minor improvements --- .vscode/settings.json | 1 + example/express-graphql/package.json | 4 +- example/express-graphql/pnpm-lock.yaml | 297 +++++++++--------- example/express-graphql/prisma/schema.prisma | 1 + .../src/@types/custom/params.d.ts | 3 - .../src/@types/graphQL/context.d.ts | 3 - .../src/database/postgres/queries/user.ts | 14 +- .../express-graphql/src/services/BaseHttp.ts | 10 +- example/express-graphql/src/utils/docs.json | 2 +- example/express-mongo-graphql/package.json | 4 +- example/express-mongo-graphql/pnpm-lock.yaml | 297 +++++++++--------- .../prisma/schema.prisma | 1 + .../src/@types/custom/params.d.ts | 3 - .../src/database/mongo/queries/user.ts | 14 +- .../src/services/BaseHttp.ts | 10 +- example/express-mongo/package.json | 4 +- example/express-mongo/pnpm-lock.yaml | 293 ++++++++--------- example/express-mongo/prisma/schema.prisma | 1 + .../src/@types/custom/params.d.ts | 3 - .../src/database/mongo/queries/user.ts | 14 +- .../express-mongo/src/network/routes/user.ts | 8 +- .../express-mongo/src/services/BaseHttp.ts | 10 +- example/express/package.json | 4 +- example/express/pnpm-lock.yaml | 293 ++++++++--------- example/express/prisma/schema.prisma | 1 + example/express/src/@types/custom/params.d.ts | 3 - .../src/database/postgres/queries/user.ts | 14 +- example/express/src/network/routes/user.ts | 8 +- example/express/src/services/BaseHttp.ts | 10 +- example/fastify-graphql/package.json | 4 +- example/fastify-graphql/pnpm-lock.yaml | 297 +++++++++--------- example/fastify-graphql/prisma/schema.prisma | 1 + .../src/database/postgres/queries/user.ts | 14 +- .../fastify-graphql/src/services/BaseHttp.ts | 10 +- example/fastify-mongo-graphql/package.json | 4 +- example/fastify-mongo-graphql/pnpm-lock.yaml | 297 +++++++++--------- .../prisma/schema.prisma | 1 + .../src/database/mongo/queries/user.ts | 14 +- .../src/services/BaseHttp.ts | 10 +- example/fastify-mongo/package.json | 4 +- example/fastify-mongo/pnpm-lock.yaml | 297 +++++++++--------- example/fastify-mongo/prisma/schema.prisma | 1 + .../src/database/mongo/queries/user.ts | 14 +- .../fastify-mongo/src/services/BaseHttp.ts | 10 +- example/fastify/package.json | 4 +- example/fastify/pnpm-lock.yaml | 297 +++++++++--------- example/fastify/prisma/schema.prisma | 1 + .../src/database/postgres/queries/user.ts | 14 +- example/fastify/src/services/BaseHttp.ts | 10 +- lib/src/functions/api/database.js | 24 +- lib/src/functions/api/express.js | 45 +-- lib/src/functions/api/services.js | 10 +- lib/src/functions/api/utils.js | 5 +- lib/src/index.js | 4 +- package.json | 45 +-- scripts/db/mongo/create.mjs | 5 +- 56 files changed, 1377 insertions(+), 1395 deletions(-) delete mode 100644 example/express-graphql/src/@types/custom/params.d.ts delete mode 100644 example/express-graphql/src/@types/graphQL/context.d.ts delete mode 100644 example/express-mongo-graphql/src/@types/custom/params.d.ts delete mode 100644 example/express-mongo/src/@types/custom/params.d.ts delete mode 100644 example/express/src/@types/custom/params.d.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index 80ccb38..6dd44bd 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -14,6 +14,7 @@ "nodemon", "Securitec", "sequelizerc", + "sqlserver", "unlicensed", "wearerequired" ] diff --git a/example/express-graphql/package.json b/example/express-graphql/package.json index 0eabbdf..d874f11 100644 --- a/example/express-graphql/package.json +++ b/example/express-graphql/package.json @@ -53,8 +53,8 @@ "@typescript-eslint/parser": "^8.0.1", "axios": "^1.7.3", "dotenv": "^16.4.5", - "eslint": "^9.9.0", - "eslint-config-prettier": "^9.1.0", + "eslint": "^8", + "eslint-config-prettier": "^8", "eslint-config-standard": "^17.1.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-jest": "^28.8.0", diff --git a/example/express-graphql/pnpm-lock.yaml b/example/express-graphql/pnpm-lock.yaml index 7b29c3b..18f563d 100644 --- a/example/express-graphql/pnpm-lock.yaml +++ b/example/express-graphql/pnpm-lock.yaml @@ -77,10 +77,10 @@ importers: version: 4.1.6 '@typescript-eslint/eslint-plugin': specifier: ^8.0.1 - version: 8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4) + version: 8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/parser': specifier: ^8.0.1 - version: 8.0.1(eslint@9.9.0)(typescript@5.5.4) + version: 8.0.1(eslint@8.57.0)(typescript@5.5.4) axios: specifier: ^1.7.3 version: 1.7.3(debug@4.3.6) @@ -88,29 +88,29 @@ importers: specifier: ^16.4.5 version: 16.4.5 eslint: - specifier: ^9.9.0 - version: 9.9.0 + specifier: ^8 + version: 8.57.0 eslint-config-prettier: - specifier: ^9.1.0 - version: 9.1.0(eslint@9.9.0) + specifier: ^8 + version: 8.10.0(eslint@8.57.0) eslint-config-standard: specifier: ^17.1.0 - version: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0))(eslint-plugin-n@16.6.2(eslint@9.9.0))(eslint-plugin-promise@7.1.0(eslint@9.9.0))(eslint@9.9.0) + version: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@7.1.0(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-import: specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0) + version: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0) eslint-plugin-jest: specifier: ^28.8.0 - version: 28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4) + version: 28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4) eslint-plugin-node: specifier: ^11.1.0 - version: 11.1.0(eslint@9.9.0) + version: 11.1.0(eslint@8.57.0) eslint-plugin-prettier: specifier: ^5.2.1 - version: 5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@9.1.0(eslint@9.9.0))(eslint@9.9.0)(prettier@3.3.3) + version: 5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3) eslint-plugin-promise: specifier: ^7.1.0 - version: 7.1.0(eslint@9.9.0) + version: 7.1.0(eslint@8.57.0) jest: specifier: ^29.7.0 version: 29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)) @@ -399,21 +399,13 @@ packages: resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.17.1': - resolution: {integrity: sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/eslintrc@3.1.0': - resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/js@9.9.0': - resolution: {integrity: sha512-hhetes6ZHP3BlXLxmd8K2SNgkhNSi+UcecbnwWKwpP7kyi/uC75DJ1lOOBO3xrC4jyojtGE3YxKZPHfk4yrgug==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/eslintrc@2.1.4': + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/object-schema@2.1.4': - resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@8.57.0': + resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} '@graphql-tools/merge@8.4.2': resolution: {integrity: sha512-XbrHAaj8yDuINph+sAfuq3QCZ/tKblrTLOpirK0+CAgNlZUCHs0Fa+xtMUURgwCVThLle1AF7svJCxFizygLsw==} @@ -435,13 +427,18 @@ packages: peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + '@humanwhocodes/config-array@0.11.14': + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead + '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/retry@0.3.0': - resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} - engines: {node: '>=18.18'} + '@humanwhocodes/object-schema@2.0.3': + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead '@hutson/parse-repository-url@3.0.2': resolution: {integrity: sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==} @@ -813,6 +810,9 @@ packages: resolution: {integrity: sha512-W5E+o0UfUcK5EgchLZsyVWqARmsM7v54/qEq6PY3YI5arkgmCzHiuk0zKSJJbm71V0xdRna4BGomkCTXz2/LkQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + '@webassemblyjs/ast@1.12.1': resolution: {integrity: sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==} @@ -1376,6 +1376,10 @@ packages: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dot-prop@5.3.0: resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} engines: {node: '>=8'} @@ -1472,8 +1476,8 @@ packages: peerDependencies: eslint: '>=6.0.0' - eslint-config-prettier@9.1.0: - resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} + eslint-config-prettier@8.10.0: + resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==} hasBin: true peerDependencies: eslint: '>=7.0.0' @@ -1582,9 +1586,9 @@ packages: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} - eslint-scope@8.0.2: - resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} eslint-utils@2.1.0: resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} @@ -1598,23 +1602,14 @@ packages: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-visitor-keys@4.0.0: - resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - eslint@9.9.0: - resolution: {integrity: sha512-JfiKJrbx0506OEerjK2Y1QlldtBxkAlLxT5OEcRF8uaQ86noDe2k31Vw9rnSWv+MXZHj7OOUV/dA0AhdLFcyvA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint@8.57.0: + resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true - peerDependencies: - jiti: '*' - peerDependenciesMeta: - jiti: - optional: true - espree@10.1.0: - resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} @@ -1691,9 +1686,9 @@ packages: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} - file-entry-cache@8.0.0: - resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} - engines: {node: '>=16.0.0'} + file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} filelist@1.0.4: resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} @@ -1722,9 +1717,9 @@ packages: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} - flat-cache@4.0.1: - resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} - engines: {node: '>=16'} + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} @@ -1848,10 +1843,6 @@ packages: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} - globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} - engines: {node: '>=18'} - globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} @@ -2920,6 +2911,11 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -3816,27 +3812,19 @@ snapshots: dependencies: '@jridgewell/trace-mapping': 0.3.9 - '@eslint-community/eslint-utils@4.4.0(eslint@9.9.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.11.0': {} - '@eslint/config-array@0.17.1': - dependencies: - '@eslint/object-schema': 2.1.4 - debug: 4.3.6(supports-color@5.5.0) - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - - '@eslint/eslintrc@3.1.0': + '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 debug: 4.3.6(supports-color@5.5.0) - espree: 10.1.0 - globals: 14.0.0 + espree: 9.6.1 + globals: 13.24.0 ignore: 5.3.1 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -3845,9 +3833,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.9.0': {} - - '@eslint/object-schema@2.1.4': {} + '@eslint/js@8.57.0': {} '@graphql-tools/merge@8.4.2(graphql@16.9.0)': dependencies: @@ -3873,9 +3859,17 @@ snapshots: dependencies: graphql: 16.9.0 + '@humanwhocodes/config-array@0.11.14': + dependencies: + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.3.6(supports-color@5.5.0) + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/retry@0.3.0': {} + '@humanwhocodes/object-schema@2.0.3': {} '@hutson/parse-repository-url@3.0.2': {} @@ -4305,15 +4299,15 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/scope-manager': 8.0.1 - '@typescript-eslint/type-utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/type-utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/visitor-keys': 8.0.1 - eslint: 9.9.0 + eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 @@ -4323,14 +4317,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/scope-manager': 8.0.1 '@typescript-eslint/types': 8.0.1 '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) '@typescript-eslint/visitor-keys': 8.0.1 debug: 4.3.6(supports-color@5.5.0) - eslint: 9.9.0 + eslint: 8.57.0 optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: @@ -4341,10 +4335,10 @@ snapshots: '@typescript-eslint/types': 8.0.1 '@typescript-eslint/visitor-keys': 8.0.1 - '@typescript-eslint/type-utils@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/type-utils@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) debug: 4.3.6(supports-color@5.5.0) ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: @@ -4370,13 +4364,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/utils@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@typescript-eslint/scope-manager': 8.0.1 '@typescript-eslint/types': 8.0.1 '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) - eslint: 9.9.0 + eslint: 8.57.0 transitivePeerDependencies: - supports-color - typescript @@ -4386,6 +4380,8 @@ snapshots: '@typescript-eslint/types': 8.0.1 eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} + '@webassemblyjs/ast@1.12.1': dependencies: '@webassemblyjs/helper-numbers': 1.11.6 @@ -5063,6 +5059,10 @@ snapshots: dependencies: esutils: 2.0.3 + doctrine@3.0.0: + dependencies: + esutils: 2.0.3 + dot-prop@5.3.0: dependencies: is-obj: 2.0.0 @@ -5184,21 +5184,21 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-compat-utils@0.5.1(eslint@9.9.0): + eslint-compat-utils@0.5.1(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 semver: 7.6.3 - eslint-config-prettier@9.1.0(eslint@9.9.0): + eslint-config-prettier@8.10.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 - eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0))(eslint-plugin-n@16.6.2(eslint@9.9.0))(eslint-plugin-promise@7.1.0(eslint@9.9.0))(eslint@9.9.0): + eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@7.1.0(eslint@8.57.0))(eslint@8.57.0): dependencies: - eslint: 9.9.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0) - eslint-plugin-n: 16.6.2(eslint@9.9.0) - eslint-plugin-promise: 7.1.0(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0) + eslint-plugin-n: 16.6.2(eslint@8.57.0) + eslint-plugin-promise: 7.1.0(eslint@8.57.0) eslint-import-resolver-node@0.3.9: dependencies: @@ -5208,30 +5208,30 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@9.9.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - eslint: 9.9.0 + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color - eslint-plugin-es-x@7.8.0(eslint@9.9.0): + eslint-plugin-es-x@7.8.0(eslint@8.57.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/regexpp': 4.11.0 - eslint: 9.9.0 - eslint-compat-utils: 0.5.1(eslint@9.9.0) + eslint: 8.57.0 + eslint-compat-utils: 0.5.1(eslint@8.57.0) - eslint-plugin-es@3.0.1(eslint@9.9.0): + eslint-plugin-es@3.0.1(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-utils: 2.1.0 regexpp: 3.2.0 - eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -5239,9 +5239,9 @@ snapshots: array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.9.0 + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@9.9.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.15.0 is-glob: 4.0.3 @@ -5252,29 +5252,29 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4): + eslint-plugin-jest@28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4): dependencies: - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - eslint: 9.9.0 + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + eslint: 8.57.0 optionalDependencies: - '@typescript-eslint/eslint-plugin': 8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/eslint-plugin': 8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) jest: 29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)) transitivePeerDependencies: - supports-color - typescript - eslint-plugin-n@16.6.2(eslint@9.9.0): + eslint-plugin-n@16.6.2(eslint@8.57.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) builtins: 5.1.0 - eslint: 9.9.0 - eslint-plugin-es-x: 7.8.0(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-es-x: 7.8.0(eslint@8.57.0) get-tsconfig: 4.7.6 globals: 13.24.0 ignore: 5.3.1 @@ -5284,36 +5284,36 @@ snapshots: resolve: 1.22.8 semver: 7.6.3 - eslint-plugin-node@11.1.0(eslint@9.9.0): + eslint-plugin-node@11.1.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 - eslint-plugin-es: 3.0.1(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-es: 3.0.1(eslint@8.57.0) eslint-utils: 2.1.0 ignore: 5.3.1 minimatch: 3.1.2 resolve: 1.22.8 semver: 6.3.1 - eslint-plugin-prettier@5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@9.1.0(eslint@9.9.0))(eslint@9.9.0)(prettier@3.3.3): + eslint-plugin-prettier@5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 prettier: 3.3.3 prettier-linter-helpers: 1.0.0 synckit: 0.9.1 optionalDependencies: '@types/eslint': 9.6.0 - eslint-config-prettier: 9.1.0(eslint@9.9.0) + eslint-config-prettier: 8.10.0(eslint@8.57.0) - eslint-plugin-promise@7.1.0(eslint@9.9.0): + eslint-plugin-promise@7.1.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-scope@5.1.1: dependencies: esrecurse: 4.3.0 estraverse: 4.3.0 - eslint-scope@8.0.2: + eslint-scope@7.2.2: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 @@ -5326,36 +5326,38 @@ snapshots: eslint-visitor-keys@3.4.3: {} - eslint-visitor-keys@4.0.0: {} - - eslint@9.9.0: + eslint@8.57.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/regexpp': 4.11.0 - '@eslint/config-array': 0.17.1 - '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.9.0 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.0 + '@humanwhocodes/config-array': 0.11.14 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.6(supports-color@5.5.0) + doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 8.0.2 - eslint-visitor-keys: 4.0.0 - espree: 10.1.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 8.0.0 + file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 ignore: 5.3.1 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 + js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 @@ -5367,11 +5369,11 @@ snapshots: transitivePeerDependencies: - supports-color - espree@10.1.0: + espree@9.6.1: dependencies: acorn: 8.12.1 acorn-jsx: 5.3.2(acorn@8.12.1) - eslint-visitor-keys: 4.0.0 + eslint-visitor-keys: 3.4.3 esprima@4.0.1: {} @@ -5479,9 +5481,9 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 - file-entry-cache@8.0.0: + file-entry-cache@6.0.1: dependencies: - flat-cache: 4.0.1 + flat-cache: 3.2.0 filelist@1.0.4: dependencies: @@ -5521,10 +5523,11 @@ snapshots: locate-path: 6.0.0 path-exists: 4.0.0 - flat-cache@4.0.1: + flat-cache@3.2.0: dependencies: flatted: 3.3.1 keyv: 4.5.4 + rimraf: 3.0.2 flatted@3.3.1: {} @@ -5650,8 +5653,6 @@ snapshots: dependencies: type-fest: 0.20.2 - globals@14.0.0: {} - globalthis@1.0.4: dependencies: define-properties: 1.2.1 @@ -6822,6 +6823,10 @@ snapshots: reusify@1.0.4: {} + rimraf@3.0.2: + dependencies: + glob: 7.2.3 + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 diff --git a/example/express-graphql/prisma/schema.prisma b/example/express-graphql/prisma/schema.prisma index e736f32..090b5d3 100644 --- a/example/express-graphql/prisma/schema.prisma +++ b/example/express-graphql/prisma/schema.prisma @@ -9,6 +9,7 @@ datasource db { model User { id Int @id @default(autoincrement()) + lastName String name String diff --git a/example/express-graphql/src/@types/custom/params.d.ts b/example/express-graphql/src/@types/custom/params.d.ts deleted file mode 100644 index 46a36f6..0000000 --- a/example/express-graphql/src/@types/custom/params.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -type Params = { - [key: string]: string -} diff --git a/example/express-graphql/src/@types/graphQL/context.d.ts b/example/express-graphql/src/@types/graphQL/context.d.ts deleted file mode 100644 index f415a22..0000000 --- a/example/express-graphql/src/@types/graphQL/context.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -type Context = { - log: import('express-pino-logger').HttpLogger['logger'] -} diff --git a/example/express-graphql/src/database/postgres/queries/user.ts b/example/express-graphql/src/database/postgres/queries/user.ts index fd4f839..3a22025 100644 --- a/example/express-graphql/src/database/postgres/queries/user.ts +++ b/example/express-graphql/src/database/postgres/queries/user.ts @@ -5,14 +5,14 @@ import { dbConnection } from '../connection' import { Id, User as UserSchema, UserDTO } from 'schemas' import { Logger } from 'utils' -const LOGGER = new Logger(debug('App:Database:Queries:User')) +const logger = new Logger(debug('App:Database:Queries:User')) -const userDBOtoDTO = (userDBO: User): UserDTO => +const userDBOtoDTO = (userDBO: User) => ({ ...userDBO, createdAt: userDBO.createdAt.toISOString(), updatedAt: userDBO.updatedAt.toISOString() - }) as UserDTO + }) satisfies UserDTO const store = async (userData: UserSchema) => { try { @@ -23,7 +23,7 @@ const store = async (userData: UserSchema) => { return userDBOtoDTO(user) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: store.name, value: 'error', @@ -43,7 +43,7 @@ const removeById = async (id: Id) => { return true } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: removeById.name, value: 'error', @@ -65,7 +65,7 @@ const getById = async (id: Id) => { return userDBOtoDTO(user) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: getById.name, value: 'error', @@ -88,7 +88,7 @@ const update = async (id: Id, user: UserSchema) => { return userDBOtoDTO(userUpdated) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: update.name, value: 'error', diff --git a/example/express-graphql/src/services/BaseHttp.ts b/example/express-graphql/src/services/BaseHttp.ts index 1c4adca..7ab94f0 100644 --- a/example/express-graphql/src/services/BaseHttp.ts +++ b/example/express-graphql/src/services/BaseHttp.ts @@ -62,15 +62,11 @@ class BaseHttpService implements Log { value: 'error', content: error }) + const errorMessage = message ?? (error as { message: string }).message - if (code) - throw new httpErrors[code]( - message ?? (error as { message: string }).message - ) + if (code) throw new httpErrors[code](errorMessage) - throw new httpErrors.InternalServerError( - message ?? (error as { message: string }).message - ) + throw new httpErrors.InternalServerError(errorMessage) } } diff --git a/example/express-graphql/src/utils/docs.json b/example/express-graphql/src/utils/docs.json index 9316007..65b314f 100644 --- a/example/express-graphql/src/utils/docs.json +++ b/example/express-graphql/src/utils/docs.json @@ -24,4 +24,4 @@ "description": "Operations related to the user" } ] - } \ No newline at end of file +} \ No newline at end of file diff --git a/example/express-mongo-graphql/package.json b/example/express-mongo-graphql/package.json index 469219f..f41bd63 100644 --- a/example/express-mongo-graphql/package.json +++ b/example/express-mongo-graphql/package.json @@ -52,8 +52,8 @@ "@typescript-eslint/parser": "^8.0.1", "axios": "^1.7.3", "dotenv": "^16.4.5", - "eslint": "^9.9.0", - "eslint-config-prettier": "^9.1.0", + "eslint": "^8", + "eslint-config-prettier": "^8", "eslint-config-standard": "^17.1.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-jest": "^28.8.0", diff --git a/example/express-mongo-graphql/pnpm-lock.yaml b/example/express-mongo-graphql/pnpm-lock.yaml index a02b6cc..6dba2fb 100644 --- a/example/express-mongo-graphql/pnpm-lock.yaml +++ b/example/express-mongo-graphql/pnpm-lock.yaml @@ -74,10 +74,10 @@ importers: version: 4.1.6 '@typescript-eslint/eslint-plugin': specifier: ^8.0.1 - version: 8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4) + version: 8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/parser': specifier: ^8.0.1 - version: 8.0.1(eslint@9.9.0)(typescript@5.5.4) + version: 8.0.1(eslint@8.57.0)(typescript@5.5.4) axios: specifier: ^1.7.3 version: 1.7.3(debug@4.3.6) @@ -85,29 +85,29 @@ importers: specifier: ^16.4.5 version: 16.4.5 eslint: - specifier: ^9.9.0 - version: 9.9.0 + specifier: ^8 + version: 8.57.0 eslint-config-prettier: - specifier: ^9.1.0 - version: 9.1.0(eslint@9.9.0) + specifier: ^8 + version: 8.10.0(eslint@8.57.0) eslint-config-standard: specifier: ^17.1.0 - version: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0))(eslint-plugin-n@16.6.2(eslint@9.9.0))(eslint-plugin-promise@7.1.0(eslint@9.9.0))(eslint@9.9.0) + version: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@7.1.0(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-import: specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0) + version: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0) eslint-plugin-jest: specifier: ^28.8.0 - version: 28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4) + version: 28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4) eslint-plugin-node: specifier: ^11.1.0 - version: 11.1.0(eslint@9.9.0) + version: 11.1.0(eslint@8.57.0) eslint-plugin-prettier: specifier: ^5.2.1 - version: 5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@9.1.0(eslint@9.9.0))(eslint@9.9.0)(prettier@3.3.3) + version: 5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3) eslint-plugin-promise: specifier: ^7.1.0 - version: 7.1.0(eslint@9.9.0) + version: 7.1.0(eslint@8.57.0) jest: specifier: ^29.7.0 version: 29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)) @@ -396,21 +396,13 @@ packages: resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.17.1': - resolution: {integrity: sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/eslintrc@3.1.0': - resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/js@9.9.0': - resolution: {integrity: sha512-hhetes6ZHP3BlXLxmd8K2SNgkhNSi+UcecbnwWKwpP7kyi/uC75DJ1lOOBO3xrC4jyojtGE3YxKZPHfk4yrgug==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/eslintrc@2.1.4': + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/object-schema@2.1.4': - resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@8.57.0': + resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} '@graphql-tools/merge@8.4.2': resolution: {integrity: sha512-XbrHAaj8yDuINph+sAfuq3QCZ/tKblrTLOpirK0+CAgNlZUCHs0Fa+xtMUURgwCVThLle1AF7svJCxFizygLsw==} @@ -432,13 +424,18 @@ packages: peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + '@humanwhocodes/config-array@0.11.14': + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead + '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/retry@0.3.0': - resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} - engines: {node: '>=18.18'} + '@humanwhocodes/object-schema@2.0.3': + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead '@hutson/parse-repository-url@3.0.2': resolution: {integrity: sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==} @@ -819,6 +816,9 @@ packages: resolution: {integrity: sha512-W5E+o0UfUcK5EgchLZsyVWqARmsM7v54/qEq6PY3YI5arkgmCzHiuk0zKSJJbm71V0xdRna4BGomkCTXz2/LkQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + '@webassemblyjs/ast@1.12.1': resolution: {integrity: sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==} @@ -1386,6 +1386,10 @@ packages: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dot-prop@5.3.0: resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} engines: {node: '>=8'} @@ -1482,8 +1486,8 @@ packages: peerDependencies: eslint: '>=6.0.0' - eslint-config-prettier@9.1.0: - resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} + eslint-config-prettier@8.10.0: + resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==} hasBin: true peerDependencies: eslint: '>=7.0.0' @@ -1592,9 +1596,9 @@ packages: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} - eslint-scope@8.0.2: - resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} eslint-utils@2.1.0: resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} @@ -1608,23 +1612,14 @@ packages: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-visitor-keys@4.0.0: - resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - eslint@9.9.0: - resolution: {integrity: sha512-JfiKJrbx0506OEerjK2Y1QlldtBxkAlLxT5OEcRF8uaQ86noDe2k31Vw9rnSWv+MXZHj7OOUV/dA0AhdLFcyvA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint@8.57.0: + resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true - peerDependencies: - jiti: '*' - peerDependenciesMeta: - jiti: - optional: true - espree@10.1.0: - resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} @@ -1701,9 +1696,9 @@ packages: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} - file-entry-cache@8.0.0: - resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} - engines: {node: '>=16.0.0'} + file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} filelist@1.0.4: resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} @@ -1732,9 +1727,9 @@ packages: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} - flat-cache@4.0.1: - resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} - engines: {node: '>=16'} + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} @@ -1858,10 +1853,6 @@ packages: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} - globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} - engines: {node: '>=18'} - globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} @@ -2909,6 +2900,11 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -3813,27 +3809,19 @@ snapshots: dependencies: '@jridgewell/trace-mapping': 0.3.9 - '@eslint-community/eslint-utils@4.4.0(eslint@9.9.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.11.0': {} - '@eslint/config-array@0.17.1': - dependencies: - '@eslint/object-schema': 2.1.4 - debug: 4.3.6(supports-color@5.5.0) - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - - '@eslint/eslintrc@3.1.0': + '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 debug: 4.3.6(supports-color@5.5.0) - espree: 10.1.0 - globals: 14.0.0 + espree: 9.6.1 + globals: 13.24.0 ignore: 5.3.1 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -3842,9 +3830,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.9.0': {} - - '@eslint/object-schema@2.1.4': {} + '@eslint/js@8.57.0': {} '@graphql-tools/merge@8.4.2(graphql@16.9.0)': dependencies: @@ -3870,9 +3856,17 @@ snapshots: dependencies: graphql: 16.9.0 + '@humanwhocodes/config-array@0.11.14': + dependencies: + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.3.6(supports-color@5.5.0) + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/retry@0.3.0': {} + '@humanwhocodes/object-schema@2.0.3': {} '@hutson/parse-repository-url@3.0.2': {} @@ -4312,15 +4306,15 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/scope-manager': 8.0.1 - '@typescript-eslint/type-utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/type-utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/visitor-keys': 8.0.1 - eslint: 9.9.0 + eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 @@ -4330,14 +4324,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/scope-manager': 8.0.1 '@typescript-eslint/types': 8.0.1 '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) '@typescript-eslint/visitor-keys': 8.0.1 debug: 4.3.6(supports-color@5.5.0) - eslint: 9.9.0 + eslint: 8.57.0 optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: @@ -4348,10 +4342,10 @@ snapshots: '@typescript-eslint/types': 8.0.1 '@typescript-eslint/visitor-keys': 8.0.1 - '@typescript-eslint/type-utils@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/type-utils@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) debug: 4.3.6(supports-color@5.5.0) ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: @@ -4377,13 +4371,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/utils@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@typescript-eslint/scope-manager': 8.0.1 '@typescript-eslint/types': 8.0.1 '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) - eslint: 9.9.0 + eslint: 8.57.0 transitivePeerDependencies: - supports-color - typescript @@ -4393,6 +4387,8 @@ snapshots: '@typescript-eslint/types': 8.0.1 eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} + '@webassemblyjs/ast@1.12.1': dependencies: '@webassemblyjs/helper-numbers': 1.11.6 @@ -5072,6 +5068,10 @@ snapshots: dependencies: esutils: 2.0.3 + doctrine@3.0.0: + dependencies: + esutils: 2.0.3 + dot-prop@5.3.0: dependencies: is-obj: 2.0.0 @@ -5193,21 +5193,21 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-compat-utils@0.5.1(eslint@9.9.0): + eslint-compat-utils@0.5.1(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 semver: 7.6.3 - eslint-config-prettier@9.1.0(eslint@9.9.0): + eslint-config-prettier@8.10.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 - eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0))(eslint-plugin-n@16.6.2(eslint@9.9.0))(eslint-plugin-promise@7.1.0(eslint@9.9.0))(eslint@9.9.0): + eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@7.1.0(eslint@8.57.0))(eslint@8.57.0): dependencies: - eslint: 9.9.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0) - eslint-plugin-n: 16.6.2(eslint@9.9.0) - eslint-plugin-promise: 7.1.0(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0) + eslint-plugin-n: 16.6.2(eslint@8.57.0) + eslint-plugin-promise: 7.1.0(eslint@8.57.0) eslint-import-resolver-node@0.3.9: dependencies: @@ -5217,30 +5217,30 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@9.9.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - eslint: 9.9.0 + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color - eslint-plugin-es-x@7.8.0(eslint@9.9.0): + eslint-plugin-es-x@7.8.0(eslint@8.57.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/regexpp': 4.11.0 - eslint: 9.9.0 - eslint-compat-utils: 0.5.1(eslint@9.9.0) + eslint: 8.57.0 + eslint-compat-utils: 0.5.1(eslint@8.57.0) - eslint-plugin-es@3.0.1(eslint@9.9.0): + eslint-plugin-es@3.0.1(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-utils: 2.1.0 regexpp: 3.2.0 - eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -5248,9 +5248,9 @@ snapshots: array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.9.0 + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@9.9.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.15.0 is-glob: 4.0.3 @@ -5261,29 +5261,29 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4): + eslint-plugin-jest@28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4): dependencies: - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - eslint: 9.9.0 + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + eslint: 8.57.0 optionalDependencies: - '@typescript-eslint/eslint-plugin': 8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/eslint-plugin': 8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) jest: 29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)) transitivePeerDependencies: - supports-color - typescript - eslint-plugin-n@16.6.2(eslint@9.9.0): + eslint-plugin-n@16.6.2(eslint@8.57.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) builtins: 5.1.0 - eslint: 9.9.0 - eslint-plugin-es-x: 7.8.0(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-es-x: 7.8.0(eslint@8.57.0) get-tsconfig: 4.7.6 globals: 13.24.0 ignore: 5.3.1 @@ -5293,36 +5293,36 @@ snapshots: resolve: 1.22.8 semver: 7.6.3 - eslint-plugin-node@11.1.0(eslint@9.9.0): + eslint-plugin-node@11.1.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 - eslint-plugin-es: 3.0.1(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-es: 3.0.1(eslint@8.57.0) eslint-utils: 2.1.0 ignore: 5.3.1 minimatch: 3.1.2 resolve: 1.22.8 semver: 6.3.1 - eslint-plugin-prettier@5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@9.1.0(eslint@9.9.0))(eslint@9.9.0)(prettier@3.3.3): + eslint-plugin-prettier@5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 prettier: 3.3.3 prettier-linter-helpers: 1.0.0 synckit: 0.9.1 optionalDependencies: '@types/eslint': 9.6.0 - eslint-config-prettier: 9.1.0(eslint@9.9.0) + eslint-config-prettier: 8.10.0(eslint@8.57.0) - eslint-plugin-promise@7.1.0(eslint@9.9.0): + eslint-plugin-promise@7.1.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-scope@5.1.1: dependencies: esrecurse: 4.3.0 estraverse: 4.3.0 - eslint-scope@8.0.2: + eslint-scope@7.2.2: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 @@ -5335,36 +5335,38 @@ snapshots: eslint-visitor-keys@3.4.3: {} - eslint-visitor-keys@4.0.0: {} - - eslint@9.9.0: + eslint@8.57.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/regexpp': 4.11.0 - '@eslint/config-array': 0.17.1 - '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.9.0 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.0 + '@humanwhocodes/config-array': 0.11.14 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.6(supports-color@5.5.0) + doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 8.0.2 - eslint-visitor-keys: 4.0.0 - espree: 10.1.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 8.0.0 + file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 ignore: 5.3.1 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 + js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 @@ -5376,11 +5378,11 @@ snapshots: transitivePeerDependencies: - supports-color - espree@10.1.0: + espree@9.6.1: dependencies: acorn: 8.12.1 acorn-jsx: 5.3.2(acorn@8.12.1) - eslint-visitor-keys: 4.0.0 + eslint-visitor-keys: 3.4.3 esprima@4.0.1: {} @@ -5488,9 +5490,9 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 - file-entry-cache@8.0.0: + file-entry-cache@6.0.1: dependencies: - flat-cache: 4.0.1 + flat-cache: 3.2.0 filelist@1.0.4: dependencies: @@ -5530,10 +5532,11 @@ snapshots: locate-path: 6.0.0 path-exists: 4.0.0 - flat-cache@4.0.1: + flat-cache@3.2.0: dependencies: flatted: 3.3.1 keyv: 4.5.4 + rimraf: 3.0.2 flatted@3.3.1: {} @@ -5659,8 +5662,6 @@ snapshots: dependencies: type-fest: 0.20.2 - globals@14.0.0: {} - globalthis@1.0.4: dependencies: define-properties: 1.2.1 @@ -6795,6 +6796,10 @@ snapshots: reusify@1.0.4: {} + rimraf@3.0.2: + dependencies: + glob: 7.2.3 + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 diff --git a/example/express-mongo-graphql/prisma/schema.prisma b/example/express-mongo-graphql/prisma/schema.prisma index 9d2fb8e..c352ad2 100644 --- a/example/express-mongo-graphql/prisma/schema.prisma +++ b/example/express-mongo-graphql/prisma/schema.prisma @@ -9,6 +9,7 @@ datasource db { model User { id String @id @default(auto()) @map("_id") @db.ObjectId + lastName String name String diff --git a/example/express-mongo-graphql/src/@types/custom/params.d.ts b/example/express-mongo-graphql/src/@types/custom/params.d.ts deleted file mode 100644 index 46a36f6..0000000 --- a/example/express-mongo-graphql/src/@types/custom/params.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -type Params = { - [key: string]: string -} diff --git a/example/express-mongo-graphql/src/database/mongo/queries/user.ts b/example/express-mongo-graphql/src/database/mongo/queries/user.ts index fd4f839..3a22025 100644 --- a/example/express-mongo-graphql/src/database/mongo/queries/user.ts +++ b/example/express-mongo-graphql/src/database/mongo/queries/user.ts @@ -5,14 +5,14 @@ import { dbConnection } from '../connection' import { Id, User as UserSchema, UserDTO } from 'schemas' import { Logger } from 'utils' -const LOGGER = new Logger(debug('App:Database:Queries:User')) +const logger = new Logger(debug('App:Database:Queries:User')) -const userDBOtoDTO = (userDBO: User): UserDTO => +const userDBOtoDTO = (userDBO: User) => ({ ...userDBO, createdAt: userDBO.createdAt.toISOString(), updatedAt: userDBO.updatedAt.toISOString() - }) as UserDTO + }) satisfies UserDTO const store = async (userData: UserSchema) => { try { @@ -23,7 +23,7 @@ const store = async (userData: UserSchema) => { return userDBOtoDTO(user) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: store.name, value: 'error', @@ -43,7 +43,7 @@ const removeById = async (id: Id) => { return true } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: removeById.name, value: 'error', @@ -65,7 +65,7 @@ const getById = async (id: Id) => { return userDBOtoDTO(user) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: getById.name, value: 'error', @@ -88,7 +88,7 @@ const update = async (id: Id, user: UserSchema) => { return userDBOtoDTO(userUpdated) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: update.name, value: 'error', diff --git a/example/express-mongo-graphql/src/services/BaseHttp.ts b/example/express-mongo-graphql/src/services/BaseHttp.ts index 1c4adca..7ab94f0 100644 --- a/example/express-mongo-graphql/src/services/BaseHttp.ts +++ b/example/express-mongo-graphql/src/services/BaseHttp.ts @@ -62,15 +62,11 @@ class BaseHttpService implements Log { value: 'error', content: error }) + const errorMessage = message ?? (error as { message: string }).message - if (code) - throw new httpErrors[code]( - message ?? (error as { message: string }).message - ) + if (code) throw new httpErrors[code](errorMessage) - throw new httpErrors.InternalServerError( - message ?? (error as { message: string }).message - ) + throw new httpErrors.InternalServerError(errorMessage) } } diff --git a/example/express-mongo/package.json b/example/express-mongo/package.json index 34b81a9..62eef81 100644 --- a/example/express-mongo/package.json +++ b/example/express-mongo/package.json @@ -47,8 +47,8 @@ "@typescript-eslint/parser": "^8.0.1", "axios": "^1.7.3", "dotenv": "^16.4.5", - "eslint": "^9.9.0", - "eslint-config-prettier": "^9.1.0", + "eslint": "^8", + "eslint-config-prettier": "^8", "eslint-config-standard": "^17.1.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-jest": "^28.8.0", diff --git a/example/express-mongo/pnpm-lock.yaml b/example/express-mongo/pnpm-lock.yaml index 4dc6063..5201e26 100644 --- a/example/express-mongo/pnpm-lock.yaml +++ b/example/express-mongo/pnpm-lock.yaml @@ -59,10 +59,10 @@ importers: version: 4.1.6 '@typescript-eslint/eslint-plugin': specifier: ^8.0.1 - version: 8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4) + version: 8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/parser': specifier: ^8.0.1 - version: 8.0.1(eslint@9.9.0)(typescript@5.5.4) + version: 8.0.1(eslint@8.57.0)(typescript@5.5.4) axios: specifier: ^1.7.3 version: 1.7.3(debug@4.3.6) @@ -70,29 +70,29 @@ importers: specifier: ^16.4.5 version: 16.4.5 eslint: - specifier: ^9.9.0 - version: 9.9.0 + specifier: ^8 + version: 8.57.0 eslint-config-prettier: - specifier: ^9.1.0 - version: 9.1.0(eslint@9.9.0) + specifier: ^8 + version: 8.10.0(eslint@8.57.0) eslint-config-standard: specifier: ^17.1.0 - version: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0))(eslint-plugin-n@16.6.2(eslint@9.9.0))(eslint-plugin-promise@7.1.0(eslint@9.9.0))(eslint@9.9.0) + version: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@7.1.0(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-import: specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0) + version: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0) eslint-plugin-jest: specifier: ^28.8.0 - version: 28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4) + version: 28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4) eslint-plugin-node: specifier: ^11.1.0 - version: 11.1.0(eslint@9.9.0) + version: 11.1.0(eslint@8.57.0) eslint-plugin-prettier: specifier: ^5.2.1 - version: 5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@9.1.0(eslint@9.9.0))(eslint@9.9.0)(prettier@3.3.3) + version: 5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3) eslint-plugin-promise: specifier: ^7.1.0 - version: 7.1.0(eslint@9.9.0) + version: 7.1.0(eslint@8.57.0) jest: specifier: ^29.7.0 version: 29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)) @@ -298,29 +298,26 @@ packages: resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.17.1': - resolution: {integrity: sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/eslintrc@3.1.0': - resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/eslintrc@2.1.4': + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@9.9.0': - resolution: {integrity: sha512-hhetes6ZHP3BlXLxmd8K2SNgkhNSi+UcecbnwWKwpP7kyi/uC75DJ1lOOBO3xrC4jyojtGE3YxKZPHfk4yrgug==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@8.57.0': + resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/object-schema@2.1.4': - resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@humanwhocodes/config-array@0.11.14': + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/retry@0.3.0': - resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} - engines: {node: '>=18.18'} + '@humanwhocodes/object-schema@2.0.3': + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead '@hutson/parse-repository-url@3.0.2': resolution: {integrity: sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==} @@ -653,6 +650,9 @@ packages: resolution: {integrity: sha512-W5E+o0UfUcK5EgchLZsyVWqARmsM7v54/qEq6PY3YI5arkgmCzHiuk0zKSJJbm71V0xdRna4BGomkCTXz2/LkQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + '@webassemblyjs/ast@1.12.1': resolution: {integrity: sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==} @@ -1214,6 +1214,10 @@ packages: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dot-prop@5.3.0: resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} engines: {node: '>=8'} @@ -1310,8 +1314,8 @@ packages: peerDependencies: eslint: '>=6.0.0' - eslint-config-prettier@9.1.0: - resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} + eslint-config-prettier@8.10.0: + resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==} hasBin: true peerDependencies: eslint: '>=7.0.0' @@ -1420,9 +1424,9 @@ packages: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} - eslint-scope@8.0.2: - resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} eslint-utils@2.1.0: resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} @@ -1436,23 +1440,14 @@ packages: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-visitor-keys@4.0.0: - resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - eslint@9.9.0: - resolution: {integrity: sha512-JfiKJrbx0506OEerjK2Y1QlldtBxkAlLxT5OEcRF8uaQ86noDe2k31Vw9rnSWv+MXZHj7OOUV/dA0AhdLFcyvA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint@8.57.0: + resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true - peerDependencies: - jiti: '*' - peerDependenciesMeta: - jiti: - optional: true - espree@10.1.0: - resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} @@ -1529,9 +1524,9 @@ packages: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} - file-entry-cache@8.0.0: - resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} - engines: {node: '>=16.0.0'} + file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} filelist@1.0.4: resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} @@ -1560,9 +1555,9 @@ packages: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} - flat-cache@4.0.1: - resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} - engines: {node: '>=16'} + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} @@ -1681,10 +1676,6 @@ packages: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} - globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} - engines: {node: '>=18'} - globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} @@ -2679,6 +2670,11 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -3436,27 +3432,19 @@ snapshots: dependencies: '@jridgewell/trace-mapping': 0.3.9 - '@eslint-community/eslint-utils@4.4.0(eslint@9.9.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.11.0': {} - '@eslint/config-array@0.17.1': - dependencies: - '@eslint/object-schema': 2.1.4 - debug: 4.3.6(supports-color@5.5.0) - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - - '@eslint/eslintrc@3.1.0': + '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 debug: 4.3.6(supports-color@5.5.0) - espree: 10.1.0 - globals: 14.0.0 + espree: 9.6.1 + globals: 13.24.0 ignore: 5.3.1 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -3465,13 +3453,19 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.9.0': {} + '@eslint/js@8.57.0': {} - '@eslint/object-schema@2.1.4': {} + '@humanwhocodes/config-array@0.11.14': + dependencies: + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.3.6(supports-color@5.5.0) + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/retry@0.3.0': {} + '@humanwhocodes/object-schema@2.0.3': {} '@hutson/parse-repository-url@3.0.2': {} @@ -3870,15 +3864,15 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/scope-manager': 8.0.1 - '@typescript-eslint/type-utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/type-utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/visitor-keys': 8.0.1 - eslint: 9.9.0 + eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 @@ -3888,14 +3882,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/scope-manager': 8.0.1 '@typescript-eslint/types': 8.0.1 '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) '@typescript-eslint/visitor-keys': 8.0.1 debug: 4.3.6(supports-color@5.5.0) - eslint: 9.9.0 + eslint: 8.57.0 optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: @@ -3906,10 +3900,10 @@ snapshots: '@typescript-eslint/types': 8.0.1 '@typescript-eslint/visitor-keys': 8.0.1 - '@typescript-eslint/type-utils@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/type-utils@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) debug: 4.3.6(supports-color@5.5.0) ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: @@ -3935,13 +3929,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/utils@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@typescript-eslint/scope-manager': 8.0.1 '@typescript-eslint/types': 8.0.1 '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) - eslint: 9.9.0 + eslint: 8.57.0 transitivePeerDependencies: - supports-color - typescript @@ -3951,6 +3945,8 @@ snapshots: '@typescript-eslint/types': 8.0.1 eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} + '@webassemblyjs/ast@1.12.1': dependencies: '@webassemblyjs/helper-numbers': 1.11.6 @@ -4620,6 +4616,10 @@ snapshots: dependencies: esutils: 2.0.3 + doctrine@3.0.0: + dependencies: + esutils: 2.0.3 + dot-prop@5.3.0: dependencies: is-obj: 2.0.0 @@ -4741,21 +4741,21 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-compat-utils@0.5.1(eslint@9.9.0): + eslint-compat-utils@0.5.1(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 semver: 7.6.3 - eslint-config-prettier@9.1.0(eslint@9.9.0): + eslint-config-prettier@8.10.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 - eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0))(eslint-plugin-n@16.6.2(eslint@9.9.0))(eslint-plugin-promise@7.1.0(eslint@9.9.0))(eslint@9.9.0): + eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@7.1.0(eslint@8.57.0))(eslint@8.57.0): dependencies: - eslint: 9.9.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0) - eslint-plugin-n: 16.6.2(eslint@9.9.0) - eslint-plugin-promise: 7.1.0(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0) + eslint-plugin-n: 16.6.2(eslint@8.57.0) + eslint-plugin-promise: 7.1.0(eslint@8.57.0) eslint-import-resolver-node@0.3.9: dependencies: @@ -4765,30 +4765,30 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@9.9.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - eslint: 9.9.0 + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color - eslint-plugin-es-x@7.8.0(eslint@9.9.0): + eslint-plugin-es-x@7.8.0(eslint@8.57.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/regexpp': 4.11.0 - eslint: 9.9.0 - eslint-compat-utils: 0.5.1(eslint@9.9.0) + eslint: 8.57.0 + eslint-compat-utils: 0.5.1(eslint@8.57.0) - eslint-plugin-es@3.0.1(eslint@9.9.0): + eslint-plugin-es@3.0.1(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-utils: 2.1.0 regexpp: 3.2.0 - eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -4796,9 +4796,9 @@ snapshots: array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.9.0 + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@9.9.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.15.0 is-glob: 4.0.3 @@ -4809,29 +4809,29 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4): + eslint-plugin-jest@28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4): dependencies: - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - eslint: 9.9.0 + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + eslint: 8.57.0 optionalDependencies: - '@typescript-eslint/eslint-plugin': 8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/eslint-plugin': 8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) jest: 29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)) transitivePeerDependencies: - supports-color - typescript - eslint-plugin-n@16.6.2(eslint@9.9.0): + eslint-plugin-n@16.6.2(eslint@8.57.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) builtins: 5.1.0 - eslint: 9.9.0 - eslint-plugin-es-x: 7.8.0(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-es-x: 7.8.0(eslint@8.57.0) get-tsconfig: 4.7.6 globals: 13.24.0 ignore: 5.3.1 @@ -4841,36 +4841,36 @@ snapshots: resolve: 1.22.8 semver: 7.6.3 - eslint-plugin-node@11.1.0(eslint@9.9.0): + eslint-plugin-node@11.1.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 - eslint-plugin-es: 3.0.1(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-es: 3.0.1(eslint@8.57.0) eslint-utils: 2.1.0 ignore: 5.3.1 minimatch: 3.1.2 resolve: 1.22.8 semver: 6.3.1 - eslint-plugin-prettier@5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@9.1.0(eslint@9.9.0))(eslint@9.9.0)(prettier@3.3.3): + eslint-plugin-prettier@5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 prettier: 3.3.3 prettier-linter-helpers: 1.0.0 synckit: 0.9.1 optionalDependencies: '@types/eslint': 9.6.0 - eslint-config-prettier: 9.1.0(eslint@9.9.0) + eslint-config-prettier: 8.10.0(eslint@8.57.0) - eslint-plugin-promise@7.1.0(eslint@9.9.0): + eslint-plugin-promise@7.1.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-scope@5.1.1: dependencies: esrecurse: 4.3.0 estraverse: 4.3.0 - eslint-scope@8.0.2: + eslint-scope@7.2.2: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 @@ -4883,36 +4883,38 @@ snapshots: eslint-visitor-keys@3.4.3: {} - eslint-visitor-keys@4.0.0: {} - - eslint@9.9.0: + eslint@8.57.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/regexpp': 4.11.0 - '@eslint/config-array': 0.17.1 - '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.9.0 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.0 + '@humanwhocodes/config-array': 0.11.14 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.6(supports-color@5.5.0) + doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 8.0.2 - eslint-visitor-keys: 4.0.0 - espree: 10.1.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 8.0.0 + file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 ignore: 5.3.1 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 + js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 @@ -4924,11 +4926,11 @@ snapshots: transitivePeerDependencies: - supports-color - espree@10.1.0: + espree@9.6.1: dependencies: acorn: 8.12.1 acorn-jsx: 5.3.2(acorn@8.12.1) - eslint-visitor-keys: 4.0.0 + eslint-visitor-keys: 3.4.3 esprima@4.0.1: {} @@ -5036,9 +5038,9 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 - file-entry-cache@8.0.0: + file-entry-cache@6.0.1: dependencies: - flat-cache: 4.0.1 + flat-cache: 3.2.0 filelist@1.0.4: dependencies: @@ -5078,10 +5080,11 @@ snapshots: locate-path: 6.0.0 path-exists: 4.0.0 - flat-cache@4.0.1: + flat-cache@3.2.0: dependencies: flatted: 3.3.1 keyv: 4.5.4 + rimraf: 3.0.2 flatted@3.3.1: {} @@ -5199,8 +5202,6 @@ snapshots: dependencies: type-fest: 0.20.2 - globals@14.0.0: {} - globalthis@1.0.4: dependencies: define-properties: 1.2.1 @@ -6301,6 +6302,10 @@ snapshots: reusify@1.0.4: {} + rimraf@3.0.2: + dependencies: + glob: 7.2.3 + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 diff --git a/example/express-mongo/prisma/schema.prisma b/example/express-mongo/prisma/schema.prisma index 9d2fb8e..c352ad2 100644 --- a/example/express-mongo/prisma/schema.prisma +++ b/example/express-mongo/prisma/schema.prisma @@ -9,6 +9,7 @@ datasource db { model User { id String @id @default(auto()) @map("_id") @db.ObjectId + lastName String name String diff --git a/example/express-mongo/src/@types/custom/params.d.ts b/example/express-mongo/src/@types/custom/params.d.ts deleted file mode 100644 index 46a36f6..0000000 --- a/example/express-mongo/src/@types/custom/params.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -type Params = { - [key: string]: string -} diff --git a/example/express-mongo/src/database/mongo/queries/user.ts b/example/express-mongo/src/database/mongo/queries/user.ts index fd4f839..3a22025 100644 --- a/example/express-mongo/src/database/mongo/queries/user.ts +++ b/example/express-mongo/src/database/mongo/queries/user.ts @@ -5,14 +5,14 @@ import { dbConnection } from '../connection' import { Id, User as UserSchema, UserDTO } from 'schemas' import { Logger } from 'utils' -const LOGGER = new Logger(debug('App:Database:Queries:User')) +const logger = new Logger(debug('App:Database:Queries:User')) -const userDBOtoDTO = (userDBO: User): UserDTO => +const userDBOtoDTO = (userDBO: User) => ({ ...userDBO, createdAt: userDBO.createdAt.toISOString(), updatedAt: userDBO.updatedAt.toISOString() - }) as UserDTO + }) satisfies UserDTO const store = async (userData: UserSchema) => { try { @@ -23,7 +23,7 @@ const store = async (userData: UserSchema) => { return userDBOtoDTO(user) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: store.name, value: 'error', @@ -43,7 +43,7 @@ const removeById = async (id: Id) => { return true } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: removeById.name, value: 'error', @@ -65,7 +65,7 @@ const getById = async (id: Id) => { return userDBOtoDTO(user) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: getById.name, value: 'error', @@ -88,7 +88,7 @@ const update = async (id: Id, user: UserSchema) => { return userDBOtoDTO(userUpdated) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: update.name, value: 'error', diff --git a/example/express-mongo/src/network/routes/user.ts b/example/express-mongo/src/network/routes/user.ts index 17fe11a..346230f 100644 --- a/example/express-mongo/src/network/routes/user.ts +++ b/example/express-mongo/src/network/routes/user.ts @@ -10,7 +10,13 @@ const User = Router() User.route('/users').post( validatorCompiler(storeUserDto, 'body'), async ( - req: Request, { args: UserDTO }>, + req: Request< + { + [key: string]: string + }, + Record, + { args: UserDTO } + >, res: Response, next: NextFunction ): Promise => { diff --git a/example/express-mongo/src/services/BaseHttp.ts b/example/express-mongo/src/services/BaseHttp.ts index 1c4adca..7ab94f0 100644 --- a/example/express-mongo/src/services/BaseHttp.ts +++ b/example/express-mongo/src/services/BaseHttp.ts @@ -62,15 +62,11 @@ class BaseHttpService implements Log { value: 'error', content: error }) + const errorMessage = message ?? (error as { message: string }).message - if (code) - throw new httpErrors[code]( - message ?? (error as { message: string }).message - ) + if (code) throw new httpErrors[code](errorMessage) - throw new httpErrors.InternalServerError( - message ?? (error as { message: string }).message - ) + throw new httpErrors.InternalServerError(errorMessage) } } diff --git a/example/express/package.json b/example/express/package.json index 46fc8f7..2b1359a 100644 --- a/example/express/package.json +++ b/example/express/package.json @@ -48,8 +48,8 @@ "@typescript-eslint/parser": "^8.0.1", "axios": "^1.7.3", "dotenv": "^16.4.5", - "eslint": "^9.9.0", - "eslint-config-prettier": "^9.1.0", + "eslint": "^8", + "eslint-config-prettier": "^8", "eslint-config-standard": "^17.1.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-jest": "^28.8.0", diff --git a/example/express/pnpm-lock.yaml b/example/express/pnpm-lock.yaml index 7efe4e3..0bb67a5 100644 --- a/example/express/pnpm-lock.yaml +++ b/example/express/pnpm-lock.yaml @@ -62,10 +62,10 @@ importers: version: 4.1.6 '@typescript-eslint/eslint-plugin': specifier: ^8.0.1 - version: 8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4) + version: 8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/parser': specifier: ^8.0.1 - version: 8.0.1(eslint@9.9.0)(typescript@5.5.4) + version: 8.0.1(eslint@8.57.0)(typescript@5.5.4) axios: specifier: ^1.7.3 version: 1.7.3(debug@4.3.6) @@ -73,29 +73,29 @@ importers: specifier: ^16.4.5 version: 16.4.5 eslint: - specifier: ^9.9.0 - version: 9.9.0 + specifier: ^8 + version: 8.57.0 eslint-config-prettier: - specifier: ^9.1.0 - version: 9.1.0(eslint@9.9.0) + specifier: ^8 + version: 8.10.0(eslint@8.57.0) eslint-config-standard: specifier: ^17.1.0 - version: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0))(eslint-plugin-n@16.6.2(eslint@9.9.0))(eslint-plugin-promise@7.1.0(eslint@9.9.0))(eslint@9.9.0) + version: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@7.1.0(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-import: specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0) + version: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0) eslint-plugin-jest: specifier: ^28.8.0 - version: 28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4) + version: 28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4) eslint-plugin-node: specifier: ^11.1.0 - version: 11.1.0(eslint@9.9.0) + version: 11.1.0(eslint@8.57.0) eslint-plugin-prettier: specifier: ^5.2.1 - version: 5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@9.1.0(eslint@9.9.0))(eslint@9.9.0)(prettier@3.3.3) + version: 5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3) eslint-plugin-promise: specifier: ^7.1.0 - version: 7.1.0(eslint@9.9.0) + version: 7.1.0(eslint@8.57.0) jest: specifier: ^29.7.0 version: 29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)) @@ -301,29 +301,26 @@ packages: resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.17.1': - resolution: {integrity: sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/eslintrc@3.1.0': - resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/eslintrc@2.1.4': + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@9.9.0': - resolution: {integrity: sha512-hhetes6ZHP3BlXLxmd8K2SNgkhNSi+UcecbnwWKwpP7kyi/uC75DJ1lOOBO3xrC4jyojtGE3YxKZPHfk4yrgug==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@8.57.0': + resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/object-schema@2.1.4': - resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@humanwhocodes/config-array@0.11.14': + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/retry@0.3.0': - resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} - engines: {node: '>=18.18'} + '@humanwhocodes/object-schema@2.0.3': + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead '@hutson/parse-repository-url@3.0.2': resolution: {integrity: sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==} @@ -647,6 +644,9 @@ packages: resolution: {integrity: sha512-W5E+o0UfUcK5EgchLZsyVWqARmsM7v54/qEq6PY3YI5arkgmCzHiuk0zKSJJbm71V0xdRna4BGomkCTXz2/LkQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + '@webassemblyjs/ast@1.12.1': resolution: {integrity: sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==} @@ -1204,6 +1204,10 @@ packages: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dot-prop@5.3.0: resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} engines: {node: '>=8'} @@ -1300,8 +1304,8 @@ packages: peerDependencies: eslint: '>=6.0.0' - eslint-config-prettier@9.1.0: - resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} + eslint-config-prettier@8.10.0: + resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==} hasBin: true peerDependencies: eslint: '>=7.0.0' @@ -1410,9 +1414,9 @@ packages: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} - eslint-scope@8.0.2: - resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} eslint-utils@2.1.0: resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} @@ -1426,23 +1430,14 @@ packages: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-visitor-keys@4.0.0: - resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - eslint@9.9.0: - resolution: {integrity: sha512-JfiKJrbx0506OEerjK2Y1QlldtBxkAlLxT5OEcRF8uaQ86noDe2k31Vw9rnSWv+MXZHj7OOUV/dA0AhdLFcyvA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint@8.57.0: + resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true - peerDependencies: - jiti: '*' - peerDependenciesMeta: - jiti: - optional: true - espree@10.1.0: - resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} @@ -1519,9 +1514,9 @@ packages: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} - file-entry-cache@8.0.0: - resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} - engines: {node: '>=16.0.0'} + file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} filelist@1.0.4: resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} @@ -1550,9 +1545,9 @@ packages: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} - flat-cache@4.0.1: - resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} - engines: {node: '>=16'} + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} @@ -1671,10 +1666,6 @@ packages: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} - globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} - engines: {node: '>=18'} - globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} @@ -2690,6 +2681,11 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -3439,27 +3435,19 @@ snapshots: dependencies: '@jridgewell/trace-mapping': 0.3.9 - '@eslint-community/eslint-utils@4.4.0(eslint@9.9.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.11.0': {} - '@eslint/config-array@0.17.1': - dependencies: - '@eslint/object-schema': 2.1.4 - debug: 4.3.6(supports-color@5.5.0) - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - - '@eslint/eslintrc@3.1.0': + '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 debug: 4.3.6(supports-color@5.5.0) - espree: 10.1.0 - globals: 14.0.0 + espree: 9.6.1 + globals: 13.24.0 ignore: 5.3.1 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -3468,13 +3456,19 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.9.0': {} + '@eslint/js@8.57.0': {} - '@eslint/object-schema@2.1.4': {} + '@humanwhocodes/config-array@0.11.14': + dependencies: + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.3.6(supports-color@5.5.0) + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/retry@0.3.0': {} + '@humanwhocodes/object-schema@2.0.3': {} '@hutson/parse-repository-url@3.0.2': {} @@ -3863,15 +3857,15 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/scope-manager': 8.0.1 - '@typescript-eslint/type-utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/type-utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/visitor-keys': 8.0.1 - eslint: 9.9.0 + eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 @@ -3881,14 +3875,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/scope-manager': 8.0.1 '@typescript-eslint/types': 8.0.1 '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) '@typescript-eslint/visitor-keys': 8.0.1 debug: 4.3.6(supports-color@5.5.0) - eslint: 9.9.0 + eslint: 8.57.0 optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: @@ -3899,10 +3893,10 @@ snapshots: '@typescript-eslint/types': 8.0.1 '@typescript-eslint/visitor-keys': 8.0.1 - '@typescript-eslint/type-utils@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/type-utils@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) debug: 4.3.6(supports-color@5.5.0) ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: @@ -3928,13 +3922,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/utils@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@typescript-eslint/scope-manager': 8.0.1 '@typescript-eslint/types': 8.0.1 '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) - eslint: 9.9.0 + eslint: 8.57.0 transitivePeerDependencies: - supports-color - typescript @@ -3944,6 +3938,8 @@ snapshots: '@typescript-eslint/types': 8.0.1 eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} + '@webassemblyjs/ast@1.12.1': dependencies: '@webassemblyjs/helper-numbers': 1.11.6 @@ -4611,6 +4607,10 @@ snapshots: dependencies: esutils: 2.0.3 + doctrine@3.0.0: + dependencies: + esutils: 2.0.3 + dot-prop@5.3.0: dependencies: is-obj: 2.0.0 @@ -4732,21 +4732,21 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-compat-utils@0.5.1(eslint@9.9.0): + eslint-compat-utils@0.5.1(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 semver: 7.6.3 - eslint-config-prettier@9.1.0(eslint@9.9.0): + eslint-config-prettier@8.10.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 - eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0))(eslint-plugin-n@16.6.2(eslint@9.9.0))(eslint-plugin-promise@7.1.0(eslint@9.9.0))(eslint@9.9.0): + eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@7.1.0(eslint@8.57.0))(eslint@8.57.0): dependencies: - eslint: 9.9.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0) - eslint-plugin-n: 16.6.2(eslint@9.9.0) - eslint-plugin-promise: 7.1.0(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0) + eslint-plugin-n: 16.6.2(eslint@8.57.0) + eslint-plugin-promise: 7.1.0(eslint@8.57.0) eslint-import-resolver-node@0.3.9: dependencies: @@ -4756,30 +4756,30 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@9.9.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - eslint: 9.9.0 + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color - eslint-plugin-es-x@7.8.0(eslint@9.9.0): + eslint-plugin-es-x@7.8.0(eslint@8.57.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/regexpp': 4.11.0 - eslint: 9.9.0 - eslint-compat-utils: 0.5.1(eslint@9.9.0) + eslint: 8.57.0 + eslint-compat-utils: 0.5.1(eslint@8.57.0) - eslint-plugin-es@3.0.1(eslint@9.9.0): + eslint-plugin-es@3.0.1(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-utils: 2.1.0 regexpp: 3.2.0 - eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -4787,9 +4787,9 @@ snapshots: array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.9.0 + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@9.9.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.15.0 is-glob: 4.0.3 @@ -4800,29 +4800,29 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4): + eslint-plugin-jest@28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4): dependencies: - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - eslint: 9.9.0 + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + eslint: 8.57.0 optionalDependencies: - '@typescript-eslint/eslint-plugin': 8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/eslint-plugin': 8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) jest: 29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)) transitivePeerDependencies: - supports-color - typescript - eslint-plugin-n@16.6.2(eslint@9.9.0): + eslint-plugin-n@16.6.2(eslint@8.57.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) builtins: 5.1.0 - eslint: 9.9.0 - eslint-plugin-es-x: 7.8.0(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-es-x: 7.8.0(eslint@8.57.0) get-tsconfig: 4.7.6 globals: 13.24.0 ignore: 5.3.1 @@ -4832,36 +4832,36 @@ snapshots: resolve: 1.22.8 semver: 7.6.3 - eslint-plugin-node@11.1.0(eslint@9.9.0): + eslint-plugin-node@11.1.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 - eslint-plugin-es: 3.0.1(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-es: 3.0.1(eslint@8.57.0) eslint-utils: 2.1.0 ignore: 5.3.1 minimatch: 3.1.2 resolve: 1.22.8 semver: 6.3.1 - eslint-plugin-prettier@5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@9.1.0(eslint@9.9.0))(eslint@9.9.0)(prettier@3.3.3): + eslint-plugin-prettier@5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 prettier: 3.3.3 prettier-linter-helpers: 1.0.0 synckit: 0.9.1 optionalDependencies: '@types/eslint': 9.6.0 - eslint-config-prettier: 9.1.0(eslint@9.9.0) + eslint-config-prettier: 8.10.0(eslint@8.57.0) - eslint-plugin-promise@7.1.0(eslint@9.9.0): + eslint-plugin-promise@7.1.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-scope@5.1.1: dependencies: esrecurse: 4.3.0 estraverse: 4.3.0 - eslint-scope@8.0.2: + eslint-scope@7.2.2: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 @@ -4874,36 +4874,38 @@ snapshots: eslint-visitor-keys@3.4.3: {} - eslint-visitor-keys@4.0.0: {} - - eslint@9.9.0: + eslint@8.57.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/regexpp': 4.11.0 - '@eslint/config-array': 0.17.1 - '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.9.0 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.0 + '@humanwhocodes/config-array': 0.11.14 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.6(supports-color@5.5.0) + doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 8.0.2 - eslint-visitor-keys: 4.0.0 - espree: 10.1.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 8.0.0 + file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 ignore: 5.3.1 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 + js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 @@ -4915,11 +4917,11 @@ snapshots: transitivePeerDependencies: - supports-color - espree@10.1.0: + espree@9.6.1: dependencies: acorn: 8.12.1 acorn-jsx: 5.3.2(acorn@8.12.1) - eslint-visitor-keys: 4.0.0 + eslint-visitor-keys: 3.4.3 esprima@4.0.1: {} @@ -5027,9 +5029,9 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 - file-entry-cache@8.0.0: + file-entry-cache@6.0.1: dependencies: - flat-cache: 4.0.1 + flat-cache: 3.2.0 filelist@1.0.4: dependencies: @@ -5069,10 +5071,11 @@ snapshots: locate-path: 6.0.0 path-exists: 4.0.0 - flat-cache@4.0.1: + flat-cache@3.2.0: dependencies: flatted: 3.3.1 keyv: 4.5.4 + rimraf: 3.0.2 flatted@3.3.1: {} @@ -5190,8 +5193,6 @@ snapshots: dependencies: type-fest: 0.20.2 - globals@14.0.0: {} - globalthis@1.0.4: dependencies: define-properties: 1.2.1 @@ -6328,6 +6329,10 @@ snapshots: reusify@1.0.4: {} + rimraf@3.0.2: + dependencies: + glob: 7.2.3 + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 diff --git a/example/express/prisma/schema.prisma b/example/express/prisma/schema.prisma index e736f32..090b5d3 100644 --- a/example/express/prisma/schema.prisma +++ b/example/express/prisma/schema.prisma @@ -9,6 +9,7 @@ datasource db { model User { id Int @id @default(autoincrement()) + lastName String name String diff --git a/example/express/src/@types/custom/params.d.ts b/example/express/src/@types/custom/params.d.ts deleted file mode 100644 index 46a36f6..0000000 --- a/example/express/src/@types/custom/params.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -type Params = { - [key: string]: string -} diff --git a/example/express/src/database/postgres/queries/user.ts b/example/express/src/database/postgres/queries/user.ts index fd4f839..3a22025 100644 --- a/example/express/src/database/postgres/queries/user.ts +++ b/example/express/src/database/postgres/queries/user.ts @@ -5,14 +5,14 @@ import { dbConnection } from '../connection' import { Id, User as UserSchema, UserDTO } from 'schemas' import { Logger } from 'utils' -const LOGGER = new Logger(debug('App:Database:Queries:User')) +const logger = new Logger(debug('App:Database:Queries:User')) -const userDBOtoDTO = (userDBO: User): UserDTO => +const userDBOtoDTO = (userDBO: User) => ({ ...userDBO, createdAt: userDBO.createdAt.toISOString(), updatedAt: userDBO.updatedAt.toISOString() - }) as UserDTO + }) satisfies UserDTO const store = async (userData: UserSchema) => { try { @@ -23,7 +23,7 @@ const store = async (userData: UserSchema) => { return userDBOtoDTO(user) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: store.name, value: 'error', @@ -43,7 +43,7 @@ const removeById = async (id: Id) => { return true } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: removeById.name, value: 'error', @@ -65,7 +65,7 @@ const getById = async (id: Id) => { return userDBOtoDTO(user) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: getById.name, value: 'error', @@ -88,7 +88,7 @@ const update = async (id: Id, user: UserSchema) => { return userDBOtoDTO(userUpdated) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: update.name, value: 'error', diff --git a/example/express/src/network/routes/user.ts b/example/express/src/network/routes/user.ts index 4ab4b24..7adce4f 100644 --- a/example/express/src/network/routes/user.ts +++ b/example/express/src/network/routes/user.ts @@ -10,7 +10,13 @@ const User = Router() User.route('/users').post( validatorCompiler(storeUserDto, 'body'), async ( - req: Request, { args: UserDTO }>, + req: Request< + { + [key: string]: string + }, + Record, + { args: UserDTO } + >, res: Response, next: NextFunction ): Promise => { diff --git a/example/express/src/services/BaseHttp.ts b/example/express/src/services/BaseHttp.ts index 1c4adca..7ab94f0 100644 --- a/example/express/src/services/BaseHttp.ts +++ b/example/express/src/services/BaseHttp.ts @@ -62,15 +62,11 @@ class BaseHttpService implements Log { value: 'error', content: error }) + const errorMessage = message ?? (error as { message: string }).message - if (code) - throw new httpErrors[code]( - message ?? (error as { message: string }).message - ) + if (code) throw new httpErrors[code](errorMessage) - throw new httpErrors.InternalServerError( - message ?? (error as { message: string }).message - ) + throw new httpErrors.InternalServerError(errorMessage) } } diff --git a/example/fastify-graphql/package.json b/example/fastify-graphql/package.json index 00f24fb..d002786 100644 --- a/example/fastify-graphql/package.json +++ b/example/fastify-graphql/package.json @@ -53,8 +53,8 @@ "@typescript-eslint/parser": "^8.0.1", "axios": "^1.7.3", "dotenv": "^16.4.5", - "eslint": "^9.9.0", - "eslint-config-prettier": "^9.1.0", + "eslint": "^8", + "eslint-config-prettier": "^8", "eslint-config-standard": "^17.1.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-jest": "^28.8.0", diff --git a/example/fastify-graphql/pnpm-lock.yaml b/example/fastify-graphql/pnpm-lock.yaml index 76008c5..cee414e 100644 --- a/example/fastify-graphql/pnpm-lock.yaml +++ b/example/fastify-graphql/pnpm-lock.yaml @@ -77,10 +77,10 @@ importers: version: 22.2.0 '@typescript-eslint/eslint-plugin': specifier: ^8.0.1 - version: 8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4) + version: 8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/parser': specifier: ^8.0.1 - version: 8.0.1(eslint@9.9.0)(typescript@5.5.4) + version: 8.0.1(eslint@8.57.0)(typescript@5.5.4) axios: specifier: ^1.7.3 version: 1.7.3(debug@4.3.6) @@ -88,29 +88,29 @@ importers: specifier: ^16.4.5 version: 16.4.5 eslint: - specifier: ^9.9.0 - version: 9.9.0 + specifier: ^8 + version: 8.57.0 eslint-config-prettier: - specifier: ^9.1.0 - version: 9.1.0(eslint@9.9.0) + specifier: ^8 + version: 8.10.0(eslint@8.57.0) eslint-config-standard: specifier: ^17.1.0 - version: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0))(eslint-plugin-n@16.6.2(eslint@9.9.0))(eslint-plugin-promise@7.1.0(eslint@9.9.0))(eslint@9.9.0) + version: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@7.1.0(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-import: specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0) + version: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0) eslint-plugin-jest: specifier: ^28.8.0 - version: 28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4) + version: 28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4) eslint-plugin-node: specifier: ^11.1.0 - version: 11.1.0(eslint@9.9.0) + version: 11.1.0(eslint@8.57.0) eslint-plugin-prettier: specifier: ^5.2.1 - version: 5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@9.1.0(eslint@9.9.0))(eslint@9.9.0)(prettier@3.3.3) + version: 5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3) eslint-plugin-promise: specifier: ^7.1.0 - version: 7.1.0(eslint@9.9.0) + version: 7.1.0(eslint@8.57.0) jest: specifier: ^29.7.0 version: 29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)) @@ -406,21 +406,13 @@ packages: resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.17.1': - resolution: {integrity: sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/eslintrc@3.1.0': - resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/js@9.9.0': - resolution: {integrity: sha512-hhetes6ZHP3BlXLxmd8K2SNgkhNSi+UcecbnwWKwpP7kyi/uC75DJ1lOOBO3xrC4jyojtGE3YxKZPHfk4yrgug==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/eslintrc@2.1.4': + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/object-schema@2.1.4': - resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@8.57.0': + resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} '@fastify/accept-negotiator@1.1.0': resolution: {integrity: sha512-OIHZrb2ImZ7XG85HXOONLcJWGosv7sIvM2ifAPQVhg9Lv7qdmMBNVaai4QTdyuaqbKM5eO6sLSQOYI7wEQeCJQ==} @@ -473,13 +465,18 @@ packages: peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + '@humanwhocodes/config-array@0.11.14': + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead + '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/retry@0.3.0': - resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} - engines: {node: '>=18.18'} + '@humanwhocodes/object-schema@2.0.3': + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead '@hutson/parse-repository-url@3.0.2': resolution: {integrity: sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==} @@ -857,6 +854,9 @@ packages: resolution: {integrity: sha512-W5E+o0UfUcK5EgchLZsyVWqARmsM7v54/qEq6PY3YI5arkgmCzHiuk0zKSJJbm71V0xdRna4BGomkCTXz2/LkQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + '@webassemblyjs/ast@1.12.1': resolution: {integrity: sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==} @@ -1467,6 +1467,10 @@ packages: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dot-prop@5.3.0: resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} engines: {node: '>=8'} @@ -1569,8 +1573,8 @@ packages: peerDependencies: eslint: '>=6.0.0' - eslint-config-prettier@9.1.0: - resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} + eslint-config-prettier@8.10.0: + resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==} hasBin: true peerDependencies: eslint: '>=7.0.0' @@ -1679,9 +1683,9 @@ packages: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} - eslint-scope@8.0.2: - resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} eslint-utils@2.1.0: resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} @@ -1695,23 +1699,14 @@ packages: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-visitor-keys@4.0.0: - resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - eslint@9.9.0: - resolution: {integrity: sha512-JfiKJrbx0506OEerjK2Y1QlldtBxkAlLxT5OEcRF8uaQ86noDe2k31Vw9rnSWv+MXZHj7OOUV/dA0AhdLFcyvA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint@8.57.0: + resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true - peerDependencies: - jiti: '*' - peerDependenciesMeta: - jiti: - optional: true - espree@10.1.0: - resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} @@ -1826,9 +1821,9 @@ packages: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} - file-entry-cache@8.0.0: - resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} - engines: {node: '>=16.0.0'} + file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} filelist@1.0.4: resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} @@ -1861,9 +1856,9 @@ packages: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} - flat-cache@4.0.1: - resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} - engines: {node: '>=16'} + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} @@ -1995,10 +1990,6 @@ packages: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} - globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} - engines: {node: '>=18'} - globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} @@ -3160,6 +3151,11 @@ packages: rfdc@1.4.1: resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} + rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -4102,27 +4098,19 @@ snapshots: dependencies: '@jridgewell/trace-mapping': 0.3.9 - '@eslint-community/eslint-utils@4.4.0(eslint@9.9.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.11.0': {} - '@eslint/config-array@0.17.1': - dependencies: - '@eslint/object-schema': 2.1.4 - debug: 4.3.6(supports-color@5.5.0) - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - - '@eslint/eslintrc@3.1.0': + '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 debug: 4.3.6(supports-color@5.5.0) - espree: 10.1.0 - globals: 14.0.0 + espree: 9.6.1 + globals: 13.24.0 ignore: 5.3.1 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -4131,9 +4119,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.9.0': {} - - '@eslint/object-schema@2.1.4': {} + '@eslint/js@8.57.0': {} '@fastify/accept-negotiator@1.1.0': {} @@ -4217,9 +4203,17 @@ snapshots: dependencies: graphql: 16.9.0 + '@humanwhocodes/config-array@0.11.14': + dependencies: + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.3.6(supports-color@5.5.0) + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/retry@0.3.0': {} + '@humanwhocodes/object-schema@2.0.3': {} '@hutson/parse-repository-url@3.0.2': {} @@ -4654,15 +4648,15 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/scope-manager': 8.0.1 - '@typescript-eslint/type-utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/type-utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/visitor-keys': 8.0.1 - eslint: 9.9.0 + eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 @@ -4672,14 +4666,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/scope-manager': 8.0.1 '@typescript-eslint/types': 8.0.1 '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) '@typescript-eslint/visitor-keys': 8.0.1 debug: 4.3.6(supports-color@5.5.0) - eslint: 9.9.0 + eslint: 8.57.0 optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: @@ -4690,10 +4684,10 @@ snapshots: '@typescript-eslint/types': 8.0.1 '@typescript-eslint/visitor-keys': 8.0.1 - '@typescript-eslint/type-utils@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/type-utils@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) debug: 4.3.6(supports-color@5.5.0) ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: @@ -4719,13 +4713,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/utils@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@typescript-eslint/scope-manager': 8.0.1 '@typescript-eslint/types': 8.0.1 '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) - eslint: 9.9.0 + eslint: 8.57.0 transitivePeerDependencies: - supports-color - typescript @@ -4735,6 +4729,8 @@ snapshots: '@typescript-eslint/types': 8.0.1 eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} + '@webassemblyjs/ast@1.12.1': dependencies: '@webassemblyjs/helper-numbers': 1.11.6 @@ -5451,6 +5447,10 @@ snapshots: dependencies: esutils: 2.0.3 + doctrine@3.0.0: + dependencies: + esutils: 2.0.3 + dot-prop@5.3.0: dependencies: is-obj: 2.0.0 @@ -5576,21 +5576,21 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-compat-utils@0.5.1(eslint@9.9.0): + eslint-compat-utils@0.5.1(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 semver: 7.6.3 - eslint-config-prettier@9.1.0(eslint@9.9.0): + eslint-config-prettier@8.10.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 - eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0))(eslint-plugin-n@16.6.2(eslint@9.9.0))(eslint-plugin-promise@7.1.0(eslint@9.9.0))(eslint@9.9.0): + eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@7.1.0(eslint@8.57.0))(eslint@8.57.0): dependencies: - eslint: 9.9.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0) - eslint-plugin-n: 16.6.2(eslint@9.9.0) - eslint-plugin-promise: 7.1.0(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0) + eslint-plugin-n: 16.6.2(eslint@8.57.0) + eslint-plugin-promise: 7.1.0(eslint@8.57.0) eslint-import-resolver-node@0.3.9: dependencies: @@ -5600,30 +5600,30 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@9.9.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - eslint: 9.9.0 + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color - eslint-plugin-es-x@7.8.0(eslint@9.9.0): + eslint-plugin-es-x@7.8.0(eslint@8.57.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/regexpp': 4.11.0 - eslint: 9.9.0 - eslint-compat-utils: 0.5.1(eslint@9.9.0) + eslint: 8.57.0 + eslint-compat-utils: 0.5.1(eslint@8.57.0) - eslint-plugin-es@3.0.1(eslint@9.9.0): + eslint-plugin-es@3.0.1(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-utils: 2.1.0 regexpp: 3.2.0 - eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -5631,9 +5631,9 @@ snapshots: array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.9.0 + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@9.9.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.15.0 is-glob: 4.0.3 @@ -5644,29 +5644,29 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4): + eslint-plugin-jest@28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4): dependencies: - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - eslint: 9.9.0 + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + eslint: 8.57.0 optionalDependencies: - '@typescript-eslint/eslint-plugin': 8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/eslint-plugin': 8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) jest: 29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)) transitivePeerDependencies: - supports-color - typescript - eslint-plugin-n@16.6.2(eslint@9.9.0): + eslint-plugin-n@16.6.2(eslint@8.57.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) builtins: 5.1.0 - eslint: 9.9.0 - eslint-plugin-es-x: 7.8.0(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-es-x: 7.8.0(eslint@8.57.0) get-tsconfig: 4.7.6 globals: 13.24.0 ignore: 5.3.1 @@ -5676,36 +5676,36 @@ snapshots: resolve: 1.22.8 semver: 7.6.3 - eslint-plugin-node@11.1.0(eslint@9.9.0): + eslint-plugin-node@11.1.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 - eslint-plugin-es: 3.0.1(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-es: 3.0.1(eslint@8.57.0) eslint-utils: 2.1.0 ignore: 5.3.1 minimatch: 3.1.2 resolve: 1.22.8 semver: 6.3.1 - eslint-plugin-prettier@5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@9.1.0(eslint@9.9.0))(eslint@9.9.0)(prettier@3.3.3): + eslint-plugin-prettier@5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 prettier: 3.3.3 prettier-linter-helpers: 1.0.0 synckit: 0.9.1 optionalDependencies: '@types/eslint': 9.6.0 - eslint-config-prettier: 9.1.0(eslint@9.9.0) + eslint-config-prettier: 8.10.0(eslint@8.57.0) - eslint-plugin-promise@7.1.0(eslint@9.9.0): + eslint-plugin-promise@7.1.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-scope@5.1.1: dependencies: esrecurse: 4.3.0 estraverse: 4.3.0 - eslint-scope@8.0.2: + eslint-scope@7.2.2: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 @@ -5718,36 +5718,38 @@ snapshots: eslint-visitor-keys@3.4.3: {} - eslint-visitor-keys@4.0.0: {} - - eslint@9.9.0: + eslint@8.57.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/regexpp': 4.11.0 - '@eslint/config-array': 0.17.1 - '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.9.0 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.0 + '@humanwhocodes/config-array': 0.11.14 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.6(supports-color@5.5.0) + doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 8.0.2 - eslint-visitor-keys: 4.0.0 - espree: 10.1.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 8.0.0 + file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 ignore: 5.3.1 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 + js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 @@ -5759,11 +5761,11 @@ snapshots: transitivePeerDependencies: - supports-color - espree@10.1.0: + espree@9.6.1: dependencies: acorn: 8.12.1 acorn-jsx: 5.3.2(acorn@8.12.1) - eslint-visitor-keys: 4.0.0 + eslint-visitor-keys: 3.4.3 esprima@4.0.1: {} @@ -5924,9 +5926,9 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 - file-entry-cache@8.0.0: + file-entry-cache@6.0.1: dependencies: - flat-cache: 4.0.1 + flat-cache: 3.2.0 filelist@1.0.4: dependencies: @@ -5972,10 +5974,11 @@ snapshots: locate-path: 6.0.0 path-exists: 4.0.0 - flat-cache@4.0.1: + flat-cache@3.2.0: dependencies: flatted: 3.3.1 keyv: 4.5.4 + rimraf: 3.0.2 flatted@3.3.1: {} @@ -6115,8 +6118,6 @@ snapshots: dependencies: type-fest: 0.20.2 - globals@14.0.0: {} - globalthis@1.0.4: dependencies: define-properties: 1.2.1 @@ -7383,6 +7384,10 @@ snapshots: rfdc@1.4.1: {} + rimraf@3.0.2: + dependencies: + glob: 7.2.3 + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 diff --git a/example/fastify-graphql/prisma/schema.prisma b/example/fastify-graphql/prisma/schema.prisma index e736f32..090b5d3 100644 --- a/example/fastify-graphql/prisma/schema.prisma +++ b/example/fastify-graphql/prisma/schema.prisma @@ -9,6 +9,7 @@ datasource db { model User { id Int @id @default(autoincrement()) + lastName String name String diff --git a/example/fastify-graphql/src/database/postgres/queries/user.ts b/example/fastify-graphql/src/database/postgres/queries/user.ts index fd4f839..3a22025 100644 --- a/example/fastify-graphql/src/database/postgres/queries/user.ts +++ b/example/fastify-graphql/src/database/postgres/queries/user.ts @@ -5,14 +5,14 @@ import { dbConnection } from '../connection' import { Id, User as UserSchema, UserDTO } from 'schemas' import { Logger } from 'utils' -const LOGGER = new Logger(debug('App:Database:Queries:User')) +const logger = new Logger(debug('App:Database:Queries:User')) -const userDBOtoDTO = (userDBO: User): UserDTO => +const userDBOtoDTO = (userDBO: User) => ({ ...userDBO, createdAt: userDBO.createdAt.toISOString(), updatedAt: userDBO.updatedAt.toISOString() - }) as UserDTO + }) satisfies UserDTO const store = async (userData: UserSchema) => { try { @@ -23,7 +23,7 @@ const store = async (userData: UserSchema) => { return userDBOtoDTO(user) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: store.name, value: 'error', @@ -43,7 +43,7 @@ const removeById = async (id: Id) => { return true } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: removeById.name, value: 'error', @@ -65,7 +65,7 @@ const getById = async (id: Id) => { return userDBOtoDTO(user) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: getById.name, value: 'error', @@ -88,7 +88,7 @@ const update = async (id: Id, user: UserSchema) => { return userDBOtoDTO(userUpdated) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: update.name, value: 'error', diff --git a/example/fastify-graphql/src/services/BaseHttp.ts b/example/fastify-graphql/src/services/BaseHttp.ts index 1c4adca..7ab94f0 100644 --- a/example/fastify-graphql/src/services/BaseHttp.ts +++ b/example/fastify-graphql/src/services/BaseHttp.ts @@ -62,15 +62,11 @@ class BaseHttpService implements Log { value: 'error', content: error }) + const errorMessage = message ?? (error as { message: string }).message - if (code) - throw new httpErrors[code]( - message ?? (error as { message: string }).message - ) + if (code) throw new httpErrors[code](errorMessage) - throw new httpErrors.InternalServerError( - message ?? (error as { message: string }).message - ) + throw new httpErrors.InternalServerError(errorMessage) } } diff --git a/example/fastify-mongo-graphql/package.json b/example/fastify-mongo-graphql/package.json index 17ce423..0af89f3 100644 --- a/example/fastify-mongo-graphql/package.json +++ b/example/fastify-mongo-graphql/package.json @@ -52,8 +52,8 @@ "@typescript-eslint/parser": "^8.0.1", "axios": "^1.7.3", "dotenv": "^16.4.5", - "eslint": "^9.9.0", - "eslint-config-prettier": "^9.1.0", + "eslint": "^8", + "eslint-config-prettier": "^8", "eslint-config-standard": "^17.1.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-jest": "^28.8.0", diff --git a/example/fastify-mongo-graphql/pnpm-lock.yaml b/example/fastify-mongo-graphql/pnpm-lock.yaml index 3bb42d4..665ae6b 100644 --- a/example/fastify-mongo-graphql/pnpm-lock.yaml +++ b/example/fastify-mongo-graphql/pnpm-lock.yaml @@ -74,10 +74,10 @@ importers: version: 22.2.0 '@typescript-eslint/eslint-plugin': specifier: ^8.0.1 - version: 8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4) + version: 8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/parser': specifier: ^8.0.1 - version: 8.0.1(eslint@9.9.0)(typescript@5.5.4) + version: 8.0.1(eslint@8.57.0)(typescript@5.5.4) axios: specifier: ^1.7.3 version: 1.7.3(debug@4.3.6) @@ -85,29 +85,29 @@ importers: specifier: ^16.4.5 version: 16.4.5 eslint: - specifier: ^9.9.0 - version: 9.9.0 + specifier: ^8 + version: 8.57.0 eslint-config-prettier: - specifier: ^9.1.0 - version: 9.1.0(eslint@9.9.0) + specifier: ^8 + version: 8.10.0(eslint@8.57.0) eslint-config-standard: specifier: ^17.1.0 - version: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0))(eslint-plugin-n@16.6.2(eslint@9.9.0))(eslint-plugin-promise@7.1.0(eslint@9.9.0))(eslint@9.9.0) + version: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@7.1.0(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-import: specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0) + version: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0) eslint-plugin-jest: specifier: ^28.8.0 - version: 28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4) + version: 28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4) eslint-plugin-node: specifier: ^11.1.0 - version: 11.1.0(eslint@9.9.0) + version: 11.1.0(eslint@8.57.0) eslint-plugin-prettier: specifier: ^5.2.1 - version: 5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@9.1.0(eslint@9.9.0))(eslint@9.9.0)(prettier@3.3.3) + version: 5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3) eslint-plugin-promise: specifier: ^7.1.0 - version: 7.1.0(eslint@9.9.0) + version: 7.1.0(eslint@8.57.0) jest: specifier: ^29.7.0 version: 29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)) @@ -403,21 +403,13 @@ packages: resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.17.1': - resolution: {integrity: sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/eslintrc@3.1.0': - resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/js@9.9.0': - resolution: {integrity: sha512-hhetes6ZHP3BlXLxmd8K2SNgkhNSi+UcecbnwWKwpP7kyi/uC75DJ1lOOBO3xrC4jyojtGE3YxKZPHfk4yrgug==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/eslintrc@2.1.4': + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/object-schema@2.1.4': - resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@8.57.0': + resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} '@fastify/accept-negotiator@1.1.0': resolution: {integrity: sha512-OIHZrb2ImZ7XG85HXOONLcJWGosv7sIvM2ifAPQVhg9Lv7qdmMBNVaai4QTdyuaqbKM5eO6sLSQOYI7wEQeCJQ==} @@ -470,13 +462,18 @@ packages: peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + '@humanwhocodes/config-array@0.11.14': + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead + '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/retry@0.3.0': - resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} - engines: {node: '>=18.18'} + '@humanwhocodes/object-schema@2.0.3': + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead '@hutson/parse-repository-url@3.0.2': resolution: {integrity: sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==} @@ -863,6 +860,9 @@ packages: resolution: {integrity: sha512-W5E+o0UfUcK5EgchLZsyVWqARmsM7v54/qEq6PY3YI5arkgmCzHiuk0zKSJJbm71V0xdRna4BGomkCTXz2/LkQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + '@webassemblyjs/ast@1.12.1': resolution: {integrity: sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==} @@ -1477,6 +1477,10 @@ packages: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dot-prop@5.3.0: resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} engines: {node: '>=8'} @@ -1579,8 +1583,8 @@ packages: peerDependencies: eslint: '>=6.0.0' - eslint-config-prettier@9.1.0: - resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} + eslint-config-prettier@8.10.0: + resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==} hasBin: true peerDependencies: eslint: '>=7.0.0' @@ -1689,9 +1693,9 @@ packages: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} - eslint-scope@8.0.2: - resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} eslint-utils@2.1.0: resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} @@ -1705,23 +1709,14 @@ packages: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-visitor-keys@4.0.0: - resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - eslint@9.9.0: - resolution: {integrity: sha512-JfiKJrbx0506OEerjK2Y1QlldtBxkAlLxT5OEcRF8uaQ86noDe2k31Vw9rnSWv+MXZHj7OOUV/dA0AhdLFcyvA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint@8.57.0: + resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true - peerDependencies: - jiti: '*' - peerDependenciesMeta: - jiti: - optional: true - espree@10.1.0: - resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} @@ -1836,9 +1831,9 @@ packages: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} - file-entry-cache@8.0.0: - resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} - engines: {node: '>=16.0.0'} + file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} filelist@1.0.4: resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} @@ -1871,9 +1866,9 @@ packages: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} - flat-cache@4.0.1: - resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} - engines: {node: '>=16'} + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} @@ -2005,10 +2000,6 @@ packages: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} - globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} - engines: {node: '>=18'} - globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} @@ -3149,6 +3140,11 @@ packages: rfdc@1.4.1: resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} + rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -4103,27 +4099,19 @@ snapshots: dependencies: '@jridgewell/trace-mapping': 0.3.9 - '@eslint-community/eslint-utils@4.4.0(eslint@9.9.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.11.0': {} - '@eslint/config-array@0.17.1': - dependencies: - '@eslint/object-schema': 2.1.4 - debug: 4.3.6(supports-color@5.5.0) - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - - '@eslint/eslintrc@3.1.0': + '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 debug: 4.3.6(supports-color@5.5.0) - espree: 10.1.0 - globals: 14.0.0 + espree: 9.6.1 + globals: 13.24.0 ignore: 5.3.1 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -4132,9 +4120,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.9.0': {} - - '@eslint/object-schema@2.1.4': {} + '@eslint/js@8.57.0': {} '@fastify/accept-negotiator@1.1.0': {} @@ -4218,9 +4204,17 @@ snapshots: dependencies: graphql: 16.9.0 + '@humanwhocodes/config-array@0.11.14': + dependencies: + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.3.6(supports-color@5.5.0) + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/retry@0.3.0': {} + '@humanwhocodes/object-schema@2.0.3': {} '@hutson/parse-repository-url@3.0.2': {} @@ -4665,15 +4659,15 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/scope-manager': 8.0.1 - '@typescript-eslint/type-utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/type-utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/visitor-keys': 8.0.1 - eslint: 9.9.0 + eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 @@ -4683,14 +4677,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/scope-manager': 8.0.1 '@typescript-eslint/types': 8.0.1 '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) '@typescript-eslint/visitor-keys': 8.0.1 debug: 4.3.6(supports-color@5.5.0) - eslint: 9.9.0 + eslint: 8.57.0 optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: @@ -4701,10 +4695,10 @@ snapshots: '@typescript-eslint/types': 8.0.1 '@typescript-eslint/visitor-keys': 8.0.1 - '@typescript-eslint/type-utils@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/type-utils@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) debug: 4.3.6(supports-color@5.5.0) ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: @@ -4730,13 +4724,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/utils@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@typescript-eslint/scope-manager': 8.0.1 '@typescript-eslint/types': 8.0.1 '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) - eslint: 9.9.0 + eslint: 8.57.0 transitivePeerDependencies: - supports-color - typescript @@ -4746,6 +4740,8 @@ snapshots: '@typescript-eslint/types': 8.0.1 eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} + '@webassemblyjs/ast@1.12.1': dependencies: '@webassemblyjs/helper-numbers': 1.11.6 @@ -5464,6 +5460,10 @@ snapshots: dependencies: esutils: 2.0.3 + doctrine@3.0.0: + dependencies: + esutils: 2.0.3 + dot-prop@5.3.0: dependencies: is-obj: 2.0.0 @@ -5589,21 +5589,21 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-compat-utils@0.5.1(eslint@9.9.0): + eslint-compat-utils@0.5.1(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 semver: 7.6.3 - eslint-config-prettier@9.1.0(eslint@9.9.0): + eslint-config-prettier@8.10.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 - eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0))(eslint-plugin-n@16.6.2(eslint@9.9.0))(eslint-plugin-promise@7.1.0(eslint@9.9.0))(eslint@9.9.0): + eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@7.1.0(eslint@8.57.0))(eslint@8.57.0): dependencies: - eslint: 9.9.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0) - eslint-plugin-n: 16.6.2(eslint@9.9.0) - eslint-plugin-promise: 7.1.0(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0) + eslint-plugin-n: 16.6.2(eslint@8.57.0) + eslint-plugin-promise: 7.1.0(eslint@8.57.0) eslint-import-resolver-node@0.3.9: dependencies: @@ -5613,30 +5613,30 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@9.9.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - eslint: 9.9.0 + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color - eslint-plugin-es-x@7.8.0(eslint@9.9.0): + eslint-plugin-es-x@7.8.0(eslint@8.57.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/regexpp': 4.11.0 - eslint: 9.9.0 - eslint-compat-utils: 0.5.1(eslint@9.9.0) + eslint: 8.57.0 + eslint-compat-utils: 0.5.1(eslint@8.57.0) - eslint-plugin-es@3.0.1(eslint@9.9.0): + eslint-plugin-es@3.0.1(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-utils: 2.1.0 regexpp: 3.2.0 - eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -5644,9 +5644,9 @@ snapshots: array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.9.0 + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@9.9.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.15.0 is-glob: 4.0.3 @@ -5657,29 +5657,29 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4): + eslint-plugin-jest@28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4): dependencies: - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - eslint: 9.9.0 + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + eslint: 8.57.0 optionalDependencies: - '@typescript-eslint/eslint-plugin': 8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/eslint-plugin': 8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) jest: 29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)) transitivePeerDependencies: - supports-color - typescript - eslint-plugin-n@16.6.2(eslint@9.9.0): + eslint-plugin-n@16.6.2(eslint@8.57.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) builtins: 5.1.0 - eslint: 9.9.0 - eslint-plugin-es-x: 7.8.0(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-es-x: 7.8.0(eslint@8.57.0) get-tsconfig: 4.7.6 globals: 13.24.0 ignore: 5.3.1 @@ -5689,36 +5689,36 @@ snapshots: resolve: 1.22.8 semver: 7.6.3 - eslint-plugin-node@11.1.0(eslint@9.9.0): + eslint-plugin-node@11.1.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 - eslint-plugin-es: 3.0.1(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-es: 3.0.1(eslint@8.57.0) eslint-utils: 2.1.0 ignore: 5.3.1 minimatch: 3.1.2 resolve: 1.22.8 semver: 6.3.1 - eslint-plugin-prettier@5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@9.1.0(eslint@9.9.0))(eslint@9.9.0)(prettier@3.3.3): + eslint-plugin-prettier@5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 prettier: 3.3.3 prettier-linter-helpers: 1.0.0 synckit: 0.9.1 optionalDependencies: '@types/eslint': 9.6.0 - eslint-config-prettier: 9.1.0(eslint@9.9.0) + eslint-config-prettier: 8.10.0(eslint@8.57.0) - eslint-plugin-promise@7.1.0(eslint@9.9.0): + eslint-plugin-promise@7.1.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-scope@5.1.1: dependencies: esrecurse: 4.3.0 estraverse: 4.3.0 - eslint-scope@8.0.2: + eslint-scope@7.2.2: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 @@ -5731,36 +5731,38 @@ snapshots: eslint-visitor-keys@3.4.3: {} - eslint-visitor-keys@4.0.0: {} - - eslint@9.9.0: + eslint@8.57.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/regexpp': 4.11.0 - '@eslint/config-array': 0.17.1 - '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.9.0 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.0 + '@humanwhocodes/config-array': 0.11.14 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.6(supports-color@5.5.0) + doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 8.0.2 - eslint-visitor-keys: 4.0.0 - espree: 10.1.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 8.0.0 + file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 ignore: 5.3.1 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 + js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 @@ -5772,11 +5774,11 @@ snapshots: transitivePeerDependencies: - supports-color - espree@10.1.0: + espree@9.6.1: dependencies: acorn: 8.12.1 acorn-jsx: 5.3.2(acorn@8.12.1) - eslint-visitor-keys: 4.0.0 + eslint-visitor-keys: 3.4.3 esprima@4.0.1: {} @@ -5937,9 +5939,9 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 - file-entry-cache@8.0.0: + file-entry-cache@6.0.1: dependencies: - flat-cache: 4.0.1 + flat-cache: 3.2.0 filelist@1.0.4: dependencies: @@ -5985,10 +5987,11 @@ snapshots: locate-path: 6.0.0 path-exists: 4.0.0 - flat-cache@4.0.1: + flat-cache@3.2.0: dependencies: flatted: 3.3.1 keyv: 4.5.4 + rimraf: 3.0.2 flatted@3.3.1: {} @@ -6128,8 +6131,6 @@ snapshots: dependencies: type-fest: 0.20.2 - globals@14.0.0: {} - globalthis@1.0.4: dependencies: define-properties: 1.2.1 @@ -7360,6 +7361,10 @@ snapshots: rfdc@1.4.1: {} + rimraf@3.0.2: + dependencies: + glob: 7.2.3 + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 diff --git a/example/fastify-mongo-graphql/prisma/schema.prisma b/example/fastify-mongo-graphql/prisma/schema.prisma index 9d2fb8e..c352ad2 100644 --- a/example/fastify-mongo-graphql/prisma/schema.prisma +++ b/example/fastify-mongo-graphql/prisma/schema.prisma @@ -9,6 +9,7 @@ datasource db { model User { id String @id @default(auto()) @map("_id") @db.ObjectId + lastName String name String diff --git a/example/fastify-mongo-graphql/src/database/mongo/queries/user.ts b/example/fastify-mongo-graphql/src/database/mongo/queries/user.ts index fd4f839..3a22025 100644 --- a/example/fastify-mongo-graphql/src/database/mongo/queries/user.ts +++ b/example/fastify-mongo-graphql/src/database/mongo/queries/user.ts @@ -5,14 +5,14 @@ import { dbConnection } from '../connection' import { Id, User as UserSchema, UserDTO } from 'schemas' import { Logger } from 'utils' -const LOGGER = new Logger(debug('App:Database:Queries:User')) +const logger = new Logger(debug('App:Database:Queries:User')) -const userDBOtoDTO = (userDBO: User): UserDTO => +const userDBOtoDTO = (userDBO: User) => ({ ...userDBO, createdAt: userDBO.createdAt.toISOString(), updatedAt: userDBO.updatedAt.toISOString() - }) as UserDTO + }) satisfies UserDTO const store = async (userData: UserSchema) => { try { @@ -23,7 +23,7 @@ const store = async (userData: UserSchema) => { return userDBOtoDTO(user) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: store.name, value: 'error', @@ -43,7 +43,7 @@ const removeById = async (id: Id) => { return true } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: removeById.name, value: 'error', @@ -65,7 +65,7 @@ const getById = async (id: Id) => { return userDBOtoDTO(user) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: getById.name, value: 'error', @@ -88,7 +88,7 @@ const update = async (id: Id, user: UserSchema) => { return userDBOtoDTO(userUpdated) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: update.name, value: 'error', diff --git a/example/fastify-mongo-graphql/src/services/BaseHttp.ts b/example/fastify-mongo-graphql/src/services/BaseHttp.ts index 1c4adca..7ab94f0 100644 --- a/example/fastify-mongo-graphql/src/services/BaseHttp.ts +++ b/example/fastify-mongo-graphql/src/services/BaseHttp.ts @@ -62,15 +62,11 @@ class BaseHttpService implements Log { value: 'error', content: error }) + const errorMessage = message ?? (error as { message: string }).message - if (code) - throw new httpErrors[code]( - message ?? (error as { message: string }).message - ) + if (code) throw new httpErrors[code](errorMessage) - throw new httpErrors.InternalServerError( - message ?? (error as { message: string }).message - ) + throw new httpErrors.InternalServerError(errorMessage) } } diff --git a/example/fastify-mongo/package.json b/example/fastify-mongo/package.json index c3e4d9e..133c372 100644 --- a/example/fastify-mongo/package.json +++ b/example/fastify-mongo/package.json @@ -46,8 +46,8 @@ "@typescript-eslint/parser": "^8.0.1", "axios": "^1.7.3", "dotenv": "^16.4.5", - "eslint": "^9.9.0", - "eslint-config-prettier": "^9.1.0", + "eslint": "^8", + "eslint-config-prettier": "^8", "eslint-config-standard": "^17.1.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-jest": "^28.8.0", diff --git a/example/fastify-mongo/pnpm-lock.yaml b/example/fastify-mongo/pnpm-lock.yaml index 51962bd..f74baee 100644 --- a/example/fastify-mongo/pnpm-lock.yaml +++ b/example/fastify-mongo/pnpm-lock.yaml @@ -56,10 +56,10 @@ importers: version: 22.2.0 '@typescript-eslint/eslint-plugin': specifier: ^8.0.1 - version: 8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4) + version: 8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/parser': specifier: ^8.0.1 - version: 8.0.1(eslint@9.9.0)(typescript@5.5.4) + version: 8.0.1(eslint@8.57.0)(typescript@5.5.4) axios: specifier: ^1.7.3 version: 1.7.3(debug@4.3.6) @@ -67,29 +67,29 @@ importers: specifier: ^16.4.5 version: 16.4.5 eslint: - specifier: ^9.9.0 - version: 9.9.0 + specifier: ^8 + version: 8.57.0 eslint-config-prettier: - specifier: ^9.1.0 - version: 9.1.0(eslint@9.9.0) + specifier: ^8 + version: 8.10.0(eslint@8.57.0) eslint-config-standard: specifier: ^17.1.0 - version: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0))(eslint-plugin-n@16.6.2(eslint@9.9.0))(eslint-plugin-promise@7.1.0(eslint@9.9.0))(eslint@9.9.0) + version: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@7.1.0(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-import: specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0) + version: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0) eslint-plugin-jest: specifier: ^28.8.0 - version: 28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4) + version: 28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4) eslint-plugin-node: specifier: ^11.1.0 - version: 11.1.0(eslint@9.9.0) + version: 11.1.0(eslint@8.57.0) eslint-plugin-prettier: specifier: ^5.2.1 - version: 5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@9.1.0(eslint@9.9.0))(eslint@9.9.0)(prettier@3.3.3) + version: 5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3) eslint-plugin-promise: specifier: ^7.1.0 - version: 7.1.0(eslint@9.9.0) + version: 7.1.0(eslint@8.57.0) jest: specifier: ^29.7.0 version: 29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)) @@ -295,21 +295,13 @@ packages: resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.17.1': - resolution: {integrity: sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/eslintrc@3.1.0': - resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/js@9.9.0': - resolution: {integrity: sha512-hhetes6ZHP3BlXLxmd8K2SNgkhNSi+UcecbnwWKwpP7kyi/uC75DJ1lOOBO3xrC4jyojtGE3YxKZPHfk4yrgug==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/eslintrc@2.1.4': + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/object-schema@2.1.4': - resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@8.57.0': + resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} '@fastify/accept-negotiator@1.1.0': resolution: {integrity: sha512-OIHZrb2ImZ7XG85HXOONLcJWGosv7sIvM2ifAPQVhg9Lv7qdmMBNVaai4QTdyuaqbKM5eO6sLSQOYI7wEQeCJQ==} @@ -342,13 +334,18 @@ packages: '@fastify/swagger@8.15.0': resolution: {integrity: sha512-zy+HEEKFqPMS2sFUsQU5X0MHplhKJvWeohBwTCkBAJA/GDYGLGUWQaETEhptiqxK7Hs0fQB9B4MDb3pbwIiCwA==} + '@humanwhocodes/config-array@0.11.14': + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead + '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/retry@0.3.0': - resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} - engines: {node: '>=18.18'} + '@humanwhocodes/object-schema@2.0.3': + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead '@hutson/parse-repository-url@3.0.2': resolution: {integrity: sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==} @@ -660,6 +657,9 @@ packages: resolution: {integrity: sha512-W5E+o0UfUcK5EgchLZsyVWqARmsM7v54/qEq6PY3YI5arkgmCzHiuk0zKSJJbm71V0xdRna4BGomkCTXz2/LkQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + '@webassemblyjs/ast@1.12.1': resolution: {integrity: sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==} @@ -1230,6 +1230,10 @@ packages: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dot-prop@5.3.0: resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} engines: {node: '>=8'} @@ -1325,8 +1329,8 @@ packages: peerDependencies: eslint: '>=6.0.0' - eslint-config-prettier@9.1.0: - resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} + eslint-config-prettier@8.10.0: + resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==} hasBin: true peerDependencies: eslint: '>=7.0.0' @@ -1435,9 +1439,9 @@ packages: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} - eslint-scope@8.0.2: - resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} eslint-utils@2.1.0: resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} @@ -1451,23 +1455,14 @@ packages: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-visitor-keys@4.0.0: - resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - eslint@9.9.0: - resolution: {integrity: sha512-JfiKJrbx0506OEerjK2Y1QlldtBxkAlLxT5OEcRF8uaQ86noDe2k31Vw9rnSWv+MXZHj7OOUV/dA0AhdLFcyvA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint@8.57.0: + resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true - peerDependencies: - jiti: '*' - peerDependenciesMeta: - jiti: - optional: true - espree@10.1.0: - resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} @@ -1574,9 +1569,9 @@ packages: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} - file-entry-cache@8.0.0: - resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} - engines: {node: '>=16.0.0'} + file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} filelist@1.0.4: resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} @@ -1605,9 +1600,9 @@ packages: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} - flat-cache@4.0.1: - resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} - engines: {node: '>=16'} + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} @@ -1730,10 +1725,6 @@ packages: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} - globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} - engines: {node: '>=18'} - globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} @@ -2764,6 +2755,11 @@ packages: rfdc@1.4.1: resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} + rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -3538,27 +3534,19 @@ snapshots: dependencies: '@jridgewell/trace-mapping': 0.3.9 - '@eslint-community/eslint-utils@4.4.0(eslint@9.9.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.11.0': {} - '@eslint/config-array@0.17.1': - dependencies: - '@eslint/object-schema': 2.1.4 - debug: 4.3.6(supports-color@5.5.0) - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - - '@eslint/eslintrc@3.1.0': + '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 debug: 4.3.6(supports-color@5.5.0) - espree: 10.1.0 - globals: 14.0.0 + espree: 9.6.1 + globals: 13.24.0 ignore: 5.3.1 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -3567,9 +3555,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.9.0': {} - - '@eslint/object-schema@2.1.4': {} + '@eslint/js@8.57.0': {} '@fastify/accept-negotiator@1.1.0': {} @@ -3629,9 +3615,17 @@ snapshots: transitivePeerDependencies: - supports-color + '@humanwhocodes/config-array@0.11.14': + dependencies: + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.3.6(supports-color@5.5.0) + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/retry@0.3.0': {} + '@humanwhocodes/object-schema@2.0.3': {} '@hutson/parse-repository-url@3.0.2': {} @@ -3995,15 +3989,15 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/scope-manager': 8.0.1 - '@typescript-eslint/type-utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/type-utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/visitor-keys': 8.0.1 - eslint: 9.9.0 + eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 @@ -4013,14 +4007,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/scope-manager': 8.0.1 '@typescript-eslint/types': 8.0.1 '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) '@typescript-eslint/visitor-keys': 8.0.1 debug: 4.3.6(supports-color@5.5.0) - eslint: 9.9.0 + eslint: 8.57.0 optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: @@ -4031,10 +4025,10 @@ snapshots: '@typescript-eslint/types': 8.0.1 '@typescript-eslint/visitor-keys': 8.0.1 - '@typescript-eslint/type-utils@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/type-utils@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) debug: 4.3.6(supports-color@5.5.0) ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: @@ -4060,13 +4054,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/utils@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@typescript-eslint/scope-manager': 8.0.1 '@typescript-eslint/types': 8.0.1 '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) - eslint: 9.9.0 + eslint: 8.57.0 transitivePeerDependencies: - supports-color - typescript @@ -4076,6 +4070,8 @@ snapshots: '@typescript-eslint/types': 8.0.1 eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} + '@webassemblyjs/ast@1.12.1': dependencies: '@webassemblyjs/helper-numbers': 1.11.6 @@ -4743,6 +4739,10 @@ snapshots: dependencies: esutils: 2.0.3 + doctrine@3.0.0: + dependencies: + esutils: 2.0.3 + dot-prop@5.3.0: dependencies: is-obj: 2.0.0 @@ -4864,21 +4864,21 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-compat-utils@0.5.1(eslint@9.9.0): + eslint-compat-utils@0.5.1(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 semver: 7.6.3 - eslint-config-prettier@9.1.0(eslint@9.9.0): + eslint-config-prettier@8.10.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 - eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0))(eslint-plugin-n@16.6.2(eslint@9.9.0))(eslint-plugin-promise@7.1.0(eslint@9.9.0))(eslint@9.9.0): + eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@7.1.0(eslint@8.57.0))(eslint@8.57.0): dependencies: - eslint: 9.9.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0) - eslint-plugin-n: 16.6.2(eslint@9.9.0) - eslint-plugin-promise: 7.1.0(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0) + eslint-plugin-n: 16.6.2(eslint@8.57.0) + eslint-plugin-promise: 7.1.0(eslint@8.57.0) eslint-import-resolver-node@0.3.9: dependencies: @@ -4888,30 +4888,30 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@9.9.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - eslint: 9.9.0 + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color - eslint-plugin-es-x@7.8.0(eslint@9.9.0): + eslint-plugin-es-x@7.8.0(eslint@8.57.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/regexpp': 4.11.0 - eslint: 9.9.0 - eslint-compat-utils: 0.5.1(eslint@9.9.0) + eslint: 8.57.0 + eslint-compat-utils: 0.5.1(eslint@8.57.0) - eslint-plugin-es@3.0.1(eslint@9.9.0): + eslint-plugin-es@3.0.1(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-utils: 2.1.0 regexpp: 3.2.0 - eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -4919,9 +4919,9 @@ snapshots: array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.9.0 + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@9.9.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.15.0 is-glob: 4.0.3 @@ -4932,29 +4932,29 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4): + eslint-plugin-jest@28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4): dependencies: - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - eslint: 9.9.0 + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + eslint: 8.57.0 optionalDependencies: - '@typescript-eslint/eslint-plugin': 8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/eslint-plugin': 8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) jest: 29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)) transitivePeerDependencies: - supports-color - typescript - eslint-plugin-n@16.6.2(eslint@9.9.0): + eslint-plugin-n@16.6.2(eslint@8.57.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) builtins: 5.1.0 - eslint: 9.9.0 - eslint-plugin-es-x: 7.8.0(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-es-x: 7.8.0(eslint@8.57.0) get-tsconfig: 4.7.6 globals: 13.24.0 ignore: 5.3.1 @@ -4964,36 +4964,36 @@ snapshots: resolve: 1.22.8 semver: 7.6.3 - eslint-plugin-node@11.1.0(eslint@9.9.0): + eslint-plugin-node@11.1.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 - eslint-plugin-es: 3.0.1(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-es: 3.0.1(eslint@8.57.0) eslint-utils: 2.1.0 ignore: 5.3.1 minimatch: 3.1.2 resolve: 1.22.8 semver: 6.3.1 - eslint-plugin-prettier@5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@9.1.0(eslint@9.9.0))(eslint@9.9.0)(prettier@3.3.3): + eslint-plugin-prettier@5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 prettier: 3.3.3 prettier-linter-helpers: 1.0.0 synckit: 0.9.1 optionalDependencies: '@types/eslint': 9.6.0 - eslint-config-prettier: 9.1.0(eslint@9.9.0) + eslint-config-prettier: 8.10.0(eslint@8.57.0) - eslint-plugin-promise@7.1.0(eslint@9.9.0): + eslint-plugin-promise@7.1.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-scope@5.1.1: dependencies: esrecurse: 4.3.0 estraverse: 4.3.0 - eslint-scope@8.0.2: + eslint-scope@7.2.2: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 @@ -5006,36 +5006,38 @@ snapshots: eslint-visitor-keys@3.4.3: {} - eslint-visitor-keys@4.0.0: {} - - eslint@9.9.0: + eslint@8.57.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/regexpp': 4.11.0 - '@eslint/config-array': 0.17.1 - '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.9.0 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.0 + '@humanwhocodes/config-array': 0.11.14 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.6(supports-color@5.5.0) + doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 8.0.2 - eslint-visitor-keys: 4.0.0 - espree: 10.1.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 8.0.0 + file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 ignore: 5.3.1 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 + js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 @@ -5047,11 +5049,11 @@ snapshots: transitivePeerDependencies: - supports-color - espree@10.1.0: + espree@9.6.1: dependencies: acorn: 8.12.1 acorn-jsx: 5.3.2(acorn@8.12.1) - eslint-visitor-keys: 4.0.0 + eslint-visitor-keys: 3.4.3 esprima@4.0.1: {} @@ -5174,9 +5176,9 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 - file-entry-cache@8.0.0: + file-entry-cache@6.0.1: dependencies: - flat-cache: 4.0.1 + flat-cache: 3.2.0 filelist@1.0.4: dependencies: @@ -5210,10 +5212,11 @@ snapshots: locate-path: 6.0.0 path-exists: 4.0.0 - flat-cache@4.0.1: + flat-cache@3.2.0: dependencies: flatted: 3.3.1 keyv: 4.5.4 + rimraf: 3.0.2 flatted@3.3.1: {} @@ -5343,8 +5346,6 @@ snapshots: dependencies: type-fest: 0.20.2 - globals@14.0.0: {} - globalthis@1.0.4: dependencies: define-properties: 1.2.1 @@ -6500,6 +6501,10 @@ snapshots: rfdc@1.4.1: {} + rimraf@3.0.2: + dependencies: + glob: 7.2.3 + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 diff --git a/example/fastify-mongo/prisma/schema.prisma b/example/fastify-mongo/prisma/schema.prisma index 9d2fb8e..c352ad2 100644 --- a/example/fastify-mongo/prisma/schema.prisma +++ b/example/fastify-mongo/prisma/schema.prisma @@ -9,6 +9,7 @@ datasource db { model User { id String @id @default(auto()) @map("_id") @db.ObjectId + lastName String name String diff --git a/example/fastify-mongo/src/database/mongo/queries/user.ts b/example/fastify-mongo/src/database/mongo/queries/user.ts index fd4f839..3a22025 100644 --- a/example/fastify-mongo/src/database/mongo/queries/user.ts +++ b/example/fastify-mongo/src/database/mongo/queries/user.ts @@ -5,14 +5,14 @@ import { dbConnection } from '../connection' import { Id, User as UserSchema, UserDTO } from 'schemas' import { Logger } from 'utils' -const LOGGER = new Logger(debug('App:Database:Queries:User')) +const logger = new Logger(debug('App:Database:Queries:User')) -const userDBOtoDTO = (userDBO: User): UserDTO => +const userDBOtoDTO = (userDBO: User) => ({ ...userDBO, createdAt: userDBO.createdAt.toISOString(), updatedAt: userDBO.updatedAt.toISOString() - }) as UserDTO + }) satisfies UserDTO const store = async (userData: UserSchema) => { try { @@ -23,7 +23,7 @@ const store = async (userData: UserSchema) => { return userDBOtoDTO(user) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: store.name, value: 'error', @@ -43,7 +43,7 @@ const removeById = async (id: Id) => { return true } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: removeById.name, value: 'error', @@ -65,7 +65,7 @@ const getById = async (id: Id) => { return userDBOtoDTO(user) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: getById.name, value: 'error', @@ -88,7 +88,7 @@ const update = async (id: Id, user: UserSchema) => { return userDBOtoDTO(userUpdated) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: update.name, value: 'error', diff --git a/example/fastify-mongo/src/services/BaseHttp.ts b/example/fastify-mongo/src/services/BaseHttp.ts index 1c4adca..7ab94f0 100644 --- a/example/fastify-mongo/src/services/BaseHttp.ts +++ b/example/fastify-mongo/src/services/BaseHttp.ts @@ -62,15 +62,11 @@ class BaseHttpService implements Log { value: 'error', content: error }) + const errorMessage = message ?? (error as { message: string }).message - if (code) - throw new httpErrors[code]( - message ?? (error as { message: string }).message - ) + if (code) throw new httpErrors[code](errorMessage) - throw new httpErrors.InternalServerError( - message ?? (error as { message: string }).message - ) + throw new httpErrors.InternalServerError(errorMessage) } } diff --git a/example/fastify/package.json b/example/fastify/package.json index 841c6a8..2e3be6f 100644 --- a/example/fastify/package.json +++ b/example/fastify/package.json @@ -47,8 +47,8 @@ "@typescript-eslint/parser": "^8.0.1", "axios": "^1.7.3", "dotenv": "^16.4.5", - "eslint": "^9.9.0", - "eslint-config-prettier": "^9.1.0", + "eslint": "^8", + "eslint-config-prettier": "^8", "eslint-config-standard": "^17.1.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-jest": "^28.8.0", diff --git a/example/fastify/pnpm-lock.yaml b/example/fastify/pnpm-lock.yaml index a6c3a08..14d6833 100644 --- a/example/fastify/pnpm-lock.yaml +++ b/example/fastify/pnpm-lock.yaml @@ -59,10 +59,10 @@ importers: version: 22.2.0 '@typescript-eslint/eslint-plugin': specifier: ^8.0.1 - version: 8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4) + version: 8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/parser': specifier: ^8.0.1 - version: 8.0.1(eslint@9.9.0)(typescript@5.5.4) + version: 8.0.1(eslint@8.57.0)(typescript@5.5.4) axios: specifier: ^1.7.3 version: 1.7.3(debug@4.3.6) @@ -70,29 +70,29 @@ importers: specifier: ^16.4.5 version: 16.4.5 eslint: - specifier: ^9.9.0 - version: 9.9.0 + specifier: ^8 + version: 8.57.0 eslint-config-prettier: - specifier: ^9.1.0 - version: 9.1.0(eslint@9.9.0) + specifier: ^8 + version: 8.10.0(eslint@8.57.0) eslint-config-standard: specifier: ^17.1.0 - version: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0))(eslint-plugin-n@16.6.2(eslint@9.9.0))(eslint-plugin-promise@7.1.0(eslint@9.9.0))(eslint@9.9.0) + version: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@7.1.0(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-import: specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0) + version: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0) eslint-plugin-jest: specifier: ^28.8.0 - version: 28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4) + version: 28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4) eslint-plugin-node: specifier: ^11.1.0 - version: 11.1.0(eslint@9.9.0) + version: 11.1.0(eslint@8.57.0) eslint-plugin-prettier: specifier: ^5.2.1 - version: 5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@9.1.0(eslint@9.9.0))(eslint@9.9.0)(prettier@3.3.3) + version: 5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3) eslint-plugin-promise: specifier: ^7.1.0 - version: 7.1.0(eslint@9.9.0) + version: 7.1.0(eslint@8.57.0) jest: specifier: ^29.7.0 version: 29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)) @@ -298,21 +298,13 @@ packages: resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.17.1': - resolution: {integrity: sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/eslintrc@3.1.0': - resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/js@9.9.0': - resolution: {integrity: sha512-hhetes6ZHP3BlXLxmd8K2SNgkhNSi+UcecbnwWKwpP7kyi/uC75DJ1lOOBO3xrC4jyojtGE3YxKZPHfk4yrgug==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/eslintrc@2.1.4': + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/object-schema@2.1.4': - resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@8.57.0': + resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} '@fastify/accept-negotiator@1.1.0': resolution: {integrity: sha512-OIHZrb2ImZ7XG85HXOONLcJWGosv7sIvM2ifAPQVhg9Lv7qdmMBNVaai4QTdyuaqbKM5eO6sLSQOYI7wEQeCJQ==} @@ -345,13 +337,18 @@ packages: '@fastify/swagger@8.15.0': resolution: {integrity: sha512-zy+HEEKFqPMS2sFUsQU5X0MHplhKJvWeohBwTCkBAJA/GDYGLGUWQaETEhptiqxK7Hs0fQB9B4MDb3pbwIiCwA==} + '@humanwhocodes/config-array@0.11.14': + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead + '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/retry@0.3.0': - resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} - engines: {node: '>=18.18'} + '@humanwhocodes/object-schema@2.0.3': + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead '@hutson/parse-repository-url@3.0.2': resolution: {integrity: sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==} @@ -654,6 +651,9 @@ packages: resolution: {integrity: sha512-W5E+o0UfUcK5EgchLZsyVWqARmsM7v54/qEq6PY3YI5arkgmCzHiuk0zKSJJbm71V0xdRna4BGomkCTXz2/LkQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + '@webassemblyjs/ast@1.12.1': resolution: {integrity: sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==} @@ -1220,6 +1220,10 @@ packages: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dot-prop@5.3.0: resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} engines: {node: '>=8'} @@ -1315,8 +1319,8 @@ packages: peerDependencies: eslint: '>=6.0.0' - eslint-config-prettier@9.1.0: - resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} + eslint-config-prettier@8.10.0: + resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==} hasBin: true peerDependencies: eslint: '>=7.0.0' @@ -1425,9 +1429,9 @@ packages: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} - eslint-scope@8.0.2: - resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} eslint-utils@2.1.0: resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} @@ -1441,23 +1445,14 @@ packages: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-visitor-keys@4.0.0: - resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - eslint@9.9.0: - resolution: {integrity: sha512-JfiKJrbx0506OEerjK2Y1QlldtBxkAlLxT5OEcRF8uaQ86noDe2k31Vw9rnSWv+MXZHj7OOUV/dA0AhdLFcyvA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint@8.57.0: + resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true - peerDependencies: - jiti: '*' - peerDependenciesMeta: - jiti: - optional: true - espree@10.1.0: - resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} @@ -1564,9 +1559,9 @@ packages: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} - file-entry-cache@8.0.0: - resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} - engines: {node: '>=16.0.0'} + file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} filelist@1.0.4: resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} @@ -1595,9 +1590,9 @@ packages: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} - flat-cache@4.0.1: - resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} - engines: {node: '>=16'} + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} @@ -1720,10 +1715,6 @@ packages: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} - globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} - engines: {node: '>=18'} - globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} @@ -2775,6 +2766,11 @@ packages: rfdc@1.4.1: resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} + rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -3537,27 +3533,19 @@ snapshots: dependencies: '@jridgewell/trace-mapping': 0.3.9 - '@eslint-community/eslint-utils@4.4.0(eslint@9.9.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.11.0': {} - '@eslint/config-array@0.17.1': - dependencies: - '@eslint/object-schema': 2.1.4 - debug: 4.3.6(supports-color@5.5.0) - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - - '@eslint/eslintrc@3.1.0': + '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 debug: 4.3.6(supports-color@5.5.0) - espree: 10.1.0 - globals: 14.0.0 + espree: 9.6.1 + globals: 13.24.0 ignore: 5.3.1 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -3566,9 +3554,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.9.0': {} - - '@eslint/object-schema@2.1.4': {} + '@eslint/js@8.57.0': {} '@fastify/accept-negotiator@1.1.0': {} @@ -3628,9 +3614,17 @@ snapshots: transitivePeerDependencies: - supports-color + '@humanwhocodes/config-array@0.11.14': + dependencies: + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.3.6(supports-color@5.5.0) + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/retry@0.3.0': {} + '@humanwhocodes/object-schema@2.0.3': {} '@hutson/parse-repository-url@3.0.2': {} @@ -3984,15 +3978,15 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/scope-manager': 8.0.1 - '@typescript-eslint/type-utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/type-utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/visitor-keys': 8.0.1 - eslint: 9.9.0 + eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 @@ -4002,14 +3996,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/scope-manager': 8.0.1 '@typescript-eslint/types': 8.0.1 '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) '@typescript-eslint/visitor-keys': 8.0.1 debug: 4.3.6(supports-color@5.5.0) - eslint: 9.9.0 + eslint: 8.57.0 optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: @@ -4020,10 +4014,10 @@ snapshots: '@typescript-eslint/types': 8.0.1 '@typescript-eslint/visitor-keys': 8.0.1 - '@typescript-eslint/type-utils@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/type-utils@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) debug: 4.3.6(supports-color@5.5.0) ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: @@ -4049,13 +4043,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.0.1(eslint@9.9.0)(typescript@5.5.4)': + '@typescript-eslint/utils@8.0.1(eslint@8.57.0)(typescript@5.5.4)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@typescript-eslint/scope-manager': 8.0.1 '@typescript-eslint/types': 8.0.1 '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) - eslint: 9.9.0 + eslint: 8.57.0 transitivePeerDependencies: - supports-color - typescript @@ -4065,6 +4059,8 @@ snapshots: '@typescript-eslint/types': 8.0.1 eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} + '@webassemblyjs/ast@1.12.1': dependencies: '@webassemblyjs/helper-numbers': 1.11.6 @@ -4730,6 +4726,10 @@ snapshots: dependencies: esutils: 2.0.3 + doctrine@3.0.0: + dependencies: + esutils: 2.0.3 + dot-prop@5.3.0: dependencies: is-obj: 2.0.0 @@ -4851,21 +4851,21 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-compat-utils@0.5.1(eslint@9.9.0): + eslint-compat-utils@0.5.1(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 semver: 7.6.3 - eslint-config-prettier@9.1.0(eslint@9.9.0): + eslint-config-prettier@8.10.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 - eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0))(eslint-plugin-n@16.6.2(eslint@9.9.0))(eslint-plugin-promise@7.1.0(eslint@9.9.0))(eslint@9.9.0): + eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@7.1.0(eslint@8.57.0))(eslint@8.57.0): dependencies: - eslint: 9.9.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0) - eslint-plugin-n: 16.6.2(eslint@9.9.0) - eslint-plugin-promise: 7.1.0(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0) + eslint-plugin-n: 16.6.2(eslint@8.57.0) + eslint-plugin-promise: 7.1.0(eslint@8.57.0) eslint-import-resolver-node@0.3.9: dependencies: @@ -4875,30 +4875,30 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@9.9.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - eslint: 9.9.0 + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color - eslint-plugin-es-x@7.8.0(eslint@9.9.0): + eslint-plugin-es-x@7.8.0(eslint@8.57.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/regexpp': 4.11.0 - eslint: 9.9.0 - eslint-compat-utils: 0.5.1(eslint@9.9.0) + eslint: 8.57.0 + eslint-compat-utils: 0.5.1(eslint@8.57.0) - eslint-plugin-es@3.0.1(eslint@9.9.0): + eslint-plugin-es@3.0.1(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-utils: 2.1.0 regexpp: 3.2.0 - eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -4906,9 +4906,9 @@ snapshots: array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.9.0 + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@9.9.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.15.0 is-glob: 4.0.3 @@ -4919,29 +4919,29 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.0.1(eslint@8.57.0)(typescript@5.5.4) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4): + eslint-plugin-jest@28.8.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4): dependencies: - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0)(typescript@5.5.4) - eslint: 9.9.0 + '@typescript-eslint/utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + eslint: 8.57.0 optionalDependencies: - '@typescript-eslint/eslint-plugin': 8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/eslint-plugin': 8.0.1(@typescript-eslint/parser@8.0.1(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) jest: 29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)) transitivePeerDependencies: - supports-color - typescript - eslint-plugin-n@16.6.2(eslint@9.9.0): + eslint-plugin-n@16.6.2(eslint@8.57.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) builtins: 5.1.0 - eslint: 9.9.0 - eslint-plugin-es-x: 7.8.0(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-es-x: 7.8.0(eslint@8.57.0) get-tsconfig: 4.7.6 globals: 13.24.0 ignore: 5.3.1 @@ -4951,36 +4951,36 @@ snapshots: resolve: 1.22.8 semver: 7.6.3 - eslint-plugin-node@11.1.0(eslint@9.9.0): + eslint-plugin-node@11.1.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 - eslint-plugin-es: 3.0.1(eslint@9.9.0) + eslint: 8.57.0 + eslint-plugin-es: 3.0.1(eslint@8.57.0) eslint-utils: 2.1.0 ignore: 5.3.1 minimatch: 3.1.2 resolve: 1.22.8 semver: 6.3.1 - eslint-plugin-prettier@5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@9.1.0(eslint@9.9.0))(eslint@9.9.0)(prettier@3.3.3): + eslint-plugin-prettier@5.2.1(@types/eslint@9.6.0)(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 prettier: 3.3.3 prettier-linter-helpers: 1.0.0 synckit: 0.9.1 optionalDependencies: '@types/eslint': 9.6.0 - eslint-config-prettier: 9.1.0(eslint@9.9.0) + eslint-config-prettier: 8.10.0(eslint@8.57.0) - eslint-plugin-promise@7.1.0(eslint@9.9.0): + eslint-plugin-promise@7.1.0(eslint@8.57.0): dependencies: - eslint: 9.9.0 + eslint: 8.57.0 eslint-scope@5.1.1: dependencies: esrecurse: 4.3.0 estraverse: 4.3.0 - eslint-scope@8.0.2: + eslint-scope@7.2.2: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 @@ -4993,36 +4993,38 @@ snapshots: eslint-visitor-keys@3.4.3: {} - eslint-visitor-keys@4.0.0: {} - - eslint@9.9.0: + eslint@8.57.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/regexpp': 4.11.0 - '@eslint/config-array': 0.17.1 - '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.9.0 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.0 + '@humanwhocodes/config-array': 0.11.14 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.6(supports-color@5.5.0) + doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 8.0.2 - eslint-visitor-keys: 4.0.0 - espree: 10.1.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 8.0.0 + file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 ignore: 5.3.1 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 + js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 @@ -5034,11 +5036,11 @@ snapshots: transitivePeerDependencies: - supports-color - espree@10.1.0: + espree@9.6.1: dependencies: acorn: 8.12.1 acorn-jsx: 5.3.2(acorn@8.12.1) - eslint-visitor-keys: 4.0.0 + eslint-visitor-keys: 3.4.3 esprima@4.0.1: {} @@ -5161,9 +5163,9 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 - file-entry-cache@8.0.0: + file-entry-cache@6.0.1: dependencies: - flat-cache: 4.0.1 + flat-cache: 3.2.0 filelist@1.0.4: dependencies: @@ -5197,10 +5199,11 @@ snapshots: locate-path: 6.0.0 path-exists: 4.0.0 - flat-cache@4.0.1: + flat-cache@3.2.0: dependencies: flatted: 3.3.1 keyv: 4.5.4 + rimraf: 3.0.2 flatted@3.3.1: {} @@ -5330,8 +5333,6 @@ snapshots: dependencies: type-fest: 0.20.2 - globals@14.0.0: {} - globalthis@1.0.4: dependencies: define-properties: 1.2.1 @@ -6523,6 +6524,10 @@ snapshots: rfdc@1.4.1: {} + rimraf@3.0.2: + dependencies: + glob: 7.2.3 + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 diff --git a/example/fastify/prisma/schema.prisma b/example/fastify/prisma/schema.prisma index e736f32..090b5d3 100644 --- a/example/fastify/prisma/schema.prisma +++ b/example/fastify/prisma/schema.prisma @@ -9,6 +9,7 @@ datasource db { model User { id Int @id @default(autoincrement()) + lastName String name String diff --git a/example/fastify/src/database/postgres/queries/user.ts b/example/fastify/src/database/postgres/queries/user.ts index fd4f839..3a22025 100644 --- a/example/fastify/src/database/postgres/queries/user.ts +++ b/example/fastify/src/database/postgres/queries/user.ts @@ -5,14 +5,14 @@ import { dbConnection } from '../connection' import { Id, User as UserSchema, UserDTO } from 'schemas' import { Logger } from 'utils' -const LOGGER = new Logger(debug('App:Database:Queries:User')) +const logger = new Logger(debug('App:Database:Queries:User')) -const userDBOtoDTO = (userDBO: User): UserDTO => +const userDBOtoDTO = (userDBO: User) => ({ ...userDBO, createdAt: userDBO.createdAt.toISOString(), updatedAt: userDBO.updatedAt.toISOString() - }) as UserDTO + }) satisfies UserDTO const store = async (userData: UserSchema) => { try { @@ -23,7 +23,7 @@ const store = async (userData: UserSchema) => { return userDBOtoDTO(user) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: store.name, value: 'error', @@ -43,7 +43,7 @@ const removeById = async (id: Id) => { return true } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: removeById.name, value: 'error', @@ -65,7 +65,7 @@ const getById = async (id: Id) => { return userDBOtoDTO(user) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: getById.name, value: 'error', @@ -88,7 +88,7 @@ const update = async (id: Id, user: UserSchema) => { return userDBOtoDTO(userUpdated) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: update.name, value: 'error', diff --git a/example/fastify/src/services/BaseHttp.ts b/example/fastify/src/services/BaseHttp.ts index 1c4adca..7ab94f0 100644 --- a/example/fastify/src/services/BaseHttp.ts +++ b/example/fastify/src/services/BaseHttp.ts @@ -62,15 +62,11 @@ class BaseHttpService implements Log { value: 'error', content: error }) + const errorMessage = message ?? (error as { message: string }).message - if (code) - throw new httpErrors[code]( - message ?? (error as { message: string }).message - ) + if (code) throw new httpErrors[code](errorMessage) - throw new httpErrors.InternalServerError( - message ?? (error as { message: string }).message - ) + throw new httpErrors.InternalServerError(errorMessage) } } diff --git a/lib/src/functions/api/database.js b/lib/src/functions/api/database.js index 5237b05..e7ae614 100644 --- a/lib/src/functions/api/database.js +++ b/lib/src/functions/api/database.js @@ -50,13 +50,11 @@ datasource db { model User { ${ isMongo - ? `id String @id @default(auto()) @map("_id") @db.ObjectId - lastName String - name String` - : `id Int @id @default(autoincrement()) - lastName String - name String` + ? 'id String @id @default(auto()) @map("_id") @db.ObjectId' + : 'id Int @id @default(autoincrement())' } + lastName String + name String createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@ -132,14 +130,14 @@ import { dbConnection } from '../connection' import { Id, User as UserSchema, UserDTO } from 'schemas' import { Logger } from 'utils' -const LOGGER = new Logger(debug('App:Database:Queries:User')) +const logger = new Logger(debug('App:Database:Queries:User')) -const userDBOtoDTO = (userDBO: User): UserDTO => +const userDBOtoDTO = (userDBO: User) => ({ ...userDBO, createdAt: userDBO.createdAt.toISOString(), updatedAt: userDBO.updatedAt.toISOString() - }) as UserDTO + }) satisfies UserDTO const store = async (userData: UserSchema) => { try { @@ -150,7 +148,7 @@ const store = async (userData: UserSchema) => { return userDBOtoDTO(user) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: store.name, value: 'error', @@ -170,7 +168,7 @@ const removeById = async (id: Id) => { return true } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: removeById.name, value: 'error', @@ -192,7 +190,7 @@ const getById = async (id: Id) => { return userDBOtoDTO(user) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: getById.name, value: 'error', @@ -215,7 +213,7 @@ const update = async (id: Id, user: UserSchema) => { return userDBOtoDTO(userUpdated) } catch (error) { - LOGGER.log({ + logger.log({ origin: 'queries/user.ts', method: update.name, value: 'error', diff --git a/lib/src/functions/api/express.js b/lib/src/functions/api/express.js index acd7d77..44b7527 100644 --- a/lib/src/functions/api/express.js +++ b/lib/src/functions/api/express.js @@ -15,10 +15,8 @@ const utils = require('./utils') * @param {Boolean} args.dbIsSQL */ const types = async ({ projectName, graphQL, dbIsSQL }) => { - const createFoldersCommand = `mkdir ${projectName}/src/@types ${projectName}/src/@types/custom \ -${!dbIsSQL ? ` ${projectName}/src/@types/models` : ''} ${ - graphQL ? ` ${projectName}/src/@types/graphQL` : '' - }` + const createFoldersCommand = `mkdir ${projectName}/src/@types \ +${!dbIsSQL ? ` ${projectName}/src/@types/models` : ''}` if (platform() === 'win32') await exec(createFoldersCommand.replaceAll('/', '\\')) @@ -32,36 +30,9 @@ declare global {} export {} `, file: `${projectName}/src/@types/index.d.ts` - }, - custom: { - params: { - content: `type Params = { - [key: string]: string -}\n`, - file: `${projectName}/src/@types/custom/params.d.ts` - } - }, - ...(graphQL && { - graphQL: { - context: { - content: `type Context = { - log: import('express-pino-logger').HttpLogger['logger'] -} -`, - file: `${projectName}/src/@types/graphQL/context.d.ts` - } - } - }) + } } - const processes = [ - writeFile(types.index.file, types.index.content), - writeFile(types.custom.params.file, types.custom.params.content) - ] - - if (graphQL) - processes.push( - writeFile(types.graphQL.context.file, types.graphQL.context.content) - ) + const processes = [writeFile(types.index.file, types.index.content)] await Promise.all(processes) } @@ -406,7 +377,13 @@ const User = Router() User.route('/users').post( validatorCompiler(storeUserDto, 'body'), async ( - req: Request, { args: UserDTO }>, + req: Request< + { + [key: string]: string + }, + Record, + { args: UserDTO } + >, res: Response, next: NextFunction ): Promise => { diff --git a/lib/src/functions/api/services.js b/lib/src/functions/api/services.js index 619a94c..91598f5 100644 --- a/lib/src/functions/api/services.js +++ b/lib/src/functions/api/services.js @@ -87,15 +87,11 @@ class BaseHttpService implements Log { value: 'error', content: error }) + const errorMessage = message ?? (error as { message: string }).message - if (code) - throw new httpErrors[code]( - message ?? (error as { message: string }).message - ) + if (code) throw new httpErrors[code](errorMessage) - throw new httpErrors.InternalServerError( - message ?? (error as { message: string }).message - ) + throw new httpErrors.InternalServerError(errorMessage) } } diff --git a/lib/src/functions/api/utils.js b/lib/src/functions/api/utils.js index d351763..ee6aae0 100644 --- a/lib/src/functions/api/utils.js +++ b/lib/src/functions/api/utils.js @@ -104,8 +104,7 @@ export { Logger }\n`, "name": "user", "description": "Operations related to the user" } - ] - ${ + ]${ !graphQL ? `, "paths": { @@ -424,7 +423,7 @@ export { Logger }\n`, } } }` - : '}' + : '\n}' }`, file: `${projectName}/src/utils/docs.json` } diff --git a/lib/src/index.js b/lib/src/index.js index ea1b571..fffa5b8 100644 --- a/lib/src/index.js +++ b/lib/src/index.js @@ -97,8 +97,8 @@ module.exports = async ({ @typescript-eslint/parser \ axios \ dotenv \ -eslint \ -eslint-config-prettier \ +eslint@^8 \ +eslint-config-prettier@^8 \ eslint-config-standard \ eslint-plugin-import \ eslint-plugin-node \ diff --git a/package.json b/package.json index 06b7d94..6f12ec9 100644 --- a/package.json +++ b/package.json @@ -12,10 +12,10 @@ "db:create": "node ./scripts/db/sql/create.mjs && node ./scripts/db/mongo/create.mjs", "db:create:mongo": "node ./scripts/db/mongo/create.mjs", - "db:create:sql": "node ./scripts/db/sql/restore.mjs", + "db:create:sql": "node ./scripts/db/sql/create.mjs", "db:restore": "node ./scripts/db/sql/restore.mjs && node ./scripts/db/mongo/restore.mjs", "db:restore:mongo": "node ./scripts/db/mongo/restore.mjs", - "db:restore:sql": "node ./scripts/db/sql/drop.mjs", + "db:restore:sql": "node ./scripts/db/sql/restore.mjs", "example": "node -r dotenv/config ./bin -N local-example -D 'This is a test using fastify' -a AnthonyLzq -e sluzquinosa@uni.pe -l mit -H --tests --ghat -F", @@ -35,6 +35,7 @@ "build:and:test:only": "npm run build && npm run test:only", "test": "npm run test:without:restore && git restore .", + "test:local": "npm run test:without:restore", "test:integration": "node --experimental-vm-modules node_modules/jest/bin/jest.js --config jest.integration.config.js --testPathPattern=test/integration", "test:without:restore": "npm run db:create && npm run build && npm run test:express:local && npm run test:express:mongo:local && npm run test:express:graphql:local && npm run test:express:mongo:graphql:local && npm run test:fastify:local && npm run test:fastify:mongo:local && npm run test:fastify:graphql:local && npm run test:fastify:mongo:graphql:local", "test:mongo:ci": "npm run build:mongo && npm run test:express:mongo:ci && npm run test:fastify:mongo:ci && npm run test:express:mongo:graphql:ci && npm run test:fastify:mongo:graphql:ci", @@ -113,28 +114,28 @@ "author": "AnthonyLzq", "license": "MIT", "dependencies": { - "cli-progress": "^3.12.0", - "colors": "^1.4.0", - "prompts": "^2.4.2", - "underscore": "^1.13.6", - "yargs": "^17.7.2" + "cli-progress": "3.12.0", + "colors": "1.4.0", + "prompts": "2.4.2", + "underscore": "1.13.7", + "yargs": "17.7.2" }, "devDependencies": { - "@types/jest": "^29.5.3", - "dotenv": "^16.3.1", - "eslint": "^8.46.0", - "eslint-config-prettier": "^8.10.0", - "eslint-config-standard": "^17.1.0", - "eslint-plugin-import": "^2.28.0", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^5.0.0", - "eslint-plugin-promise": "^6.1.1", - "jest": "^29.6.2", - "knex": "^2.5.1", - "mongodb": "^5.7.0", - "pg": "^8.11.2", - "prettier": "^3.0.1", - "standard-version": "^9.5.0" + "@types/jest": "29.5.12", + "dotenv": "16.4.5", + "eslint": "^8", + "eslint-config-prettier": "^8", + "eslint-config-standard": "17.1.0", + "eslint-plugin-import": "2.29.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-prettier": "5.2.1", + "eslint-plugin-promise": "7.1.0", + "jest": "29.7.0", + "knex": "3.1.0", + "mongodb": "6.8.0", + "pg": "8.12.0", + "prettier": "3.3.3", + "standard-version": "9.5.0" }, "repository": { "type": "git", diff --git a/scripts/db/mongo/create.mjs b/scripts/db/mongo/create.mjs index 3087e56..c709ffc 100644 --- a/scripts/db/mongo/create.mjs +++ b/scripts/db/mongo/create.mjs @@ -4,10 +4,7 @@ dotenv.config() const url = process.env.MONGO_URI -const client = await MongoClient.connect(url, { - useNewUrlParser: true, - useUnifiedTopology: true -}) +const client = await MongoClient.connect(url) await client.connect() const db = client.db('simba')