nestjs-prisma
Advanced tools
Comparing version 0.20.0 to 0.21.0-dev.0
import { ArgumentsHost, HttpServer } from '@nestjs/common'; | ||
import { BaseExceptionFilter } from '@nestjs/core'; | ||
import { BaseExceptionFilter, HttpAdapterHost } from '@nestjs/core'; | ||
import { Prisma } from '@prisma/client'; | ||
@@ -15,1 +15,6 @@ export declare type ErrorCodesStatusMapping = { | ||
} | ||
export declare function providePrismaClientExceptionFilter(errorCodesStatusMapping?: ErrorCodesStatusMapping): { | ||
provide: string; | ||
useFactory: ({ httpAdapter }: HttpAdapterHost) => PrismaClientExceptionFilter; | ||
inject: (typeof HttpAdapterHost)[]; | ||
}; |
@@ -12,3 +12,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PrismaClientExceptionFilter = void 0; | ||
exports.providePrismaClientExceptionFilter = exports.PrismaClientExceptionFilter = void 0; | ||
const common_1 = require("@nestjs/common"); | ||
@@ -62,2 +62,12 @@ const core_1 = require("@nestjs/core"); | ||
exports.PrismaClientExceptionFilter = PrismaClientExceptionFilter; | ||
function providePrismaClientExceptionFilter(errorCodesStatusMapping) { | ||
return { | ||
provide: core_1.APP_FILTER, | ||
useFactory: ({ httpAdapter }) => { | ||
return new PrismaClientExceptionFilter(httpAdapter, errorCodesStatusMapping); | ||
}, | ||
inject: [core_1.HttpAdapterHost], | ||
}; | ||
} | ||
exports.providePrismaClientExceptionFilter = providePrismaClientExceptionFilter; | ||
//# sourceMappingURL=prisma-client-exception.filter.js.map |
{ | ||
"name": "nestjs-prisma", | ||
"version": "0.20.0", | ||
"version": "0.21.0-dev.0", | ||
"description": "Library and schematics to add Prisma integration to a NestJS application", | ||
@@ -13,3 +13,3 @@ "scripts": { | ||
"changelog": "npx conventional-changelog-cli conventional-changelog -p angular -i ./CHANGELOG.md -s", | ||
"rocket": "npm run build && npm publish", | ||
"rocket": "npm run build && npm publish --tag dev", | ||
"format": "prettier --write \"lib/**/*.ts\" \"schematics/**/*.ts\"", | ||
@@ -16,0 +16,0 @@ "lint": "eslint \"{lib,schematics}/**/*.ts\" --fix" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
175871
1309