diff --git a/examples/example-with-default-settings/src/main.ts b/examples/example-with-default-settings/src/main.ts index 1658e49..589779c 100644 --- a/examples/example-with-default-settings/src/main.ts +++ b/examples/example-with-default-settings/src/main.ts @@ -5,7 +5,7 @@ import { Logger } from '@nestjs/common'; import { NestFactory } from '@nestjs/core'; -import { HttpExceptionFilter } from '@nest-http-problem-details/rfc7807-filter'; +import { HttpExceptionFilter } from '@nest-http-problem-details/nest-problem-details-filter'; import { AppModule } from './app/app.module'; async function bootstrap() { diff --git a/jest.config.js b/jest.config.js index 24e436e..3545be5 100644 --- a/jest.config.js +++ b/jest.config.js @@ -2,6 +2,6 @@ module.exports = { projects: [ , '/examples/examples/with-default-settings', - '/libs/rfc7807-filter', + '/libs/nest-problem-details-filter', ], }; diff --git a/libs/rfc7807-filter/.babelrc b/libs/nest-problem-details-filter/.babelrc similarity index 100% rename from libs/rfc7807-filter/.babelrc rename to libs/nest-problem-details-filter/.babelrc diff --git a/libs/rfc7807-filter/.eslintrc.json b/libs/nest-problem-details-filter/.eslintrc.json similarity index 100% rename from libs/rfc7807-filter/.eslintrc.json rename to libs/nest-problem-details-filter/.eslintrc.json diff --git a/libs/rfc7807-filter/LICENSE b/libs/nest-problem-details-filter/LICENSE similarity index 100% rename from libs/rfc7807-filter/LICENSE rename to libs/nest-problem-details-filter/LICENSE diff --git a/libs/rfc7807-filter/README.md b/libs/nest-problem-details-filter/README.md similarity index 99% rename from libs/rfc7807-filter/README.md rename to libs/nest-problem-details-filter/README.md index dd4f971..60992da 100644 --- a/libs/rfc7807-filter/README.md +++ b/libs/nest-problem-details-filter/README.md @@ -65,13 +65,12 @@ Problem: - [IETF RFC-7807: Problem Details for HTTP APIs](https://datatracker.ietf.org/doc/html/rfc7807) - [Zalando RESTful API:](https://opensource.zalando.com/restful-api-guidelines/#176) - And of course, Nest's awesome community: + - [Exception filters](https://docs.nestjs.com/exception-filters#exception-filters-1) - [@kamilmysliwiec's comment](https://github.com/nestjs/nest/issues/2953#issuecomment-531678153) - - This library was generated using [Nx](https://nx.dev). - ## License This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details diff --git a/libs/rfc7807-filter/jest.config.js b/libs/nest-problem-details-filter/jest.config.js similarity index 70% rename from libs/rfc7807-filter/jest.config.js rename to libs/nest-problem-details-filter/jest.config.js index ec4280b..5315beb 100644 --- a/libs/rfc7807-filter/jest.config.js +++ b/libs/nest-problem-details-filter/jest.config.js @@ -1,5 +1,5 @@ module.exports = { - displayName: 'rfc7807-filter', + displayName: 'nest-problem-details-filter', preset: '../../jest.preset.js', globals: { 'ts-jest': { @@ -11,5 +11,5 @@ module.exports = { '^.+\\.[tj]sx?$': 'ts-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], - coverageDirectory: '../../coverage/libs/rfc7807-filter', + coverageDirectory: '../../coverage/libs/nest-problem-details-filter', }; diff --git a/libs/rfc7807-filter/package.json b/libs/nest-problem-details-filter/package.json similarity index 91% rename from libs/rfc7807-filter/package.json rename to libs/nest-problem-details-filter/package.json index f825ae1..9a429e8 100644 --- a/libs/rfc7807-filter/package.json +++ b/libs/nest-problem-details-filter/package.json @@ -1,5 +1,5 @@ { - "name": "nest-http-problem-details", + "name": "nest-problem-details-filter", "version": "0.0.1", "description": "RFC-7807 conform HTTP problem details Nest.js filter", "license": "MIT", diff --git a/libs/rfc7807-filter/src/index.ts b/libs/nest-problem-details-filter/src/index.ts similarity index 100% rename from libs/rfc7807-filter/src/index.ts rename to libs/nest-problem-details-filter/src/index.ts diff --git a/libs/rfc7807-filter/src/lib/filters/constants.ts b/libs/nest-problem-details-filter/src/lib/filters/constants.ts similarity index 100% rename from libs/rfc7807-filter/src/lib/filters/constants.ts rename to libs/nest-problem-details-filter/src/lib/filters/constants.ts diff --git a/libs/rfc7807-filter/src/lib/filters/http-exception.filter.spec.ts b/libs/nest-problem-details-filter/src/lib/filters/http-exception.filter.spec.ts similarity index 100% rename from libs/rfc7807-filter/src/lib/filters/http-exception.filter.spec.ts rename to libs/nest-problem-details-filter/src/lib/filters/http-exception.filter.spec.ts diff --git a/libs/rfc7807-filter/src/lib/filters/http-exception.filter.ts b/libs/nest-problem-details-filter/src/lib/filters/http-exception.filter.ts similarity index 100% rename from libs/rfc7807-filter/src/lib/filters/http-exception.filter.ts rename to libs/nest-problem-details-filter/src/lib/filters/http-exception.filter.ts diff --git a/libs/rfc7807-filter/src/lib/filters/http-exception.interface.ts b/libs/nest-problem-details-filter/src/lib/filters/http-exception.interface.ts similarity index 100% rename from libs/rfc7807-filter/src/lib/filters/http-exception.interface.ts rename to libs/nest-problem-details-filter/src/lib/filters/http-exception.interface.ts diff --git a/libs/rfc7807-filter/src/lib/filters/http-exception.providers.ts b/libs/nest-problem-details-filter/src/lib/filters/http-exception.providers.ts similarity index 100% rename from libs/rfc7807-filter/src/lib/filters/http-exception.providers.ts rename to libs/nest-problem-details-filter/src/lib/filters/http-exception.providers.ts diff --git a/libs/rfc7807-filter/src/lib/nest-problem-details.module.ts b/libs/nest-problem-details-filter/src/lib/nest-problem-details.module.ts similarity index 100% rename from libs/rfc7807-filter/src/lib/nest-problem-details.module.ts rename to libs/nest-problem-details-filter/src/lib/nest-problem-details.module.ts diff --git a/libs/rfc7807-filter/tsconfig.json b/libs/nest-problem-details-filter/tsconfig.json similarity index 100% rename from libs/rfc7807-filter/tsconfig.json rename to libs/nest-problem-details-filter/tsconfig.json diff --git a/libs/rfc7807-filter/tsconfig.lib.json b/libs/nest-problem-details-filter/tsconfig.lib.json similarity index 100% rename from libs/rfc7807-filter/tsconfig.lib.json rename to libs/nest-problem-details-filter/tsconfig.lib.json diff --git a/libs/rfc7807-filter/tsconfig.spec.json b/libs/nest-problem-details-filter/tsconfig.spec.json similarity index 100% rename from libs/rfc7807-filter/tsconfig.spec.json rename to libs/nest-problem-details-filter/tsconfig.spec.json diff --git a/nx.json b/nx.json index abf22a8..0a1e02d 100644 --- a/nx.json +++ b/nx.json @@ -28,7 +28,7 @@ "example-with-default-settings": { "tags": [] }, - "rfc7807-filter": { + "nest-problem-details-filter": { "tags": [] } } diff --git a/tsconfig.base.json b/tsconfig.base.json index f73042e..3f3bf7b 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -18,8 +18,8 @@ "@nest-http-problem-details/nest-problem-details": [ "libs/nest-problem-details/src/index.ts" ], - "@nest-http-problem-details/rfc7807-filter": [ - "libs/rfc7807-filter/src/index.ts" + "@nest-http-problem-details/nest-problem-details-filter": [ + "libs/nest-problem-details-filter/src/index.ts" ] } }, diff --git a/workspace.json b/workspace.json index bb6c8b3..b8251df 100644 --- a/workspace.json +++ b/workspace.json @@ -56,33 +56,33 @@ } } }, - "rfc7807-filter": { - "root": "libs/rfc7807-filter", - "sourceRoot": "libs/rfc7807-filter/src", + "nest-problem-details-filter": { + "root": "libs/nest-problem-details-filter", + "sourceRoot": "libs/nest-problem-details-filter/src", "projectType": "library", "targets": { "build": { "executor": "@nrwl/node:package", "outputs": ["{options.outputPath}"], "options": { - "outputPath": "dist/libs/rfc7807-filter", - "tsConfig": "libs/rfc7807-filter/tsconfig.lib.json", - "packageJson": "libs/rfc7807-filter/package.json", - "main": "libs/rfc7807-filter/src/index.ts", - "assets": ["libs/rfc7807-filter/*.md"] + "outputPath": "dist/libs/nest-problem-details-filter", + "tsConfig": "libs/nest-problem-details-filter/tsconfig.lib.json", + "packageJson": "libs/nest-problem-details-filter/package.json", + "main": "libs/nest-problem-details-filter/src/index.ts", + "assets": ["libs/nest-problem-details-filter/*.md"] } }, "lint": { "executor": "@nrwl/linter:eslint", "options": { - "lintFilePatterns": ["libs/rfc7807-filter/**/*.ts"] + "lintFilePatterns": ["libs/nest-problem-details-filter/**/*.ts"] } }, "test": { "executor": "@nrwl/jest:jest", - "outputs": ["coverage/libs/rfc7807-filter"], + "outputs": ["coverage/libs/nest-problem-details-filter"], "options": { - "jestConfig": "libs/rfc7807-filter/jest.config.js", + "jestConfig": "libs/nest-problem-details-filter/jest.config.js", "passWithNoTests": true } }