@infineit-nestjs/core 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +6 -0
- package/dist/cjs/constants/core.constant.d.ts +42 -0
- package/dist/cjs/constants/core.constant.js +2 -0
- package/dist/cjs/constants/index.d.ts +1 -0
- package/dist/cjs/constants/index.js +2 -0
- package/dist/cjs/decorators/currentuser.decorator.d.ts +8 -0
- package/dist/cjs/decorators/currentuser.decorator.js +2 -0
- package/dist/cjs/decorators/index.d.ts +7 -0
- package/dist/cjs/decorators/index.js +2 -0
- package/dist/cjs/decorators/number.string.validator.d.ts +2 -0
- package/dist/cjs/decorators/number.string.validator.js +2 -0
- package/dist/cjs/decorators/permissions.decorator.d.ts +1 -0
- package/dist/cjs/decorators/permissions.decorator.js +2 -0
- package/dist/cjs/decorators/public.request.decorator.d.ts +2 -0
- package/dist/cjs/decorators/public.request.decorator.js +2 -0
- package/dist/cjs/decorators/swagger.schema.d.ts +5 -0
- package/dist/cjs/decorators/swagger.schema.js +2 -0
- package/dist/cjs/decorators/transforms.decorator.d.ts +1 -0
- package/dist/cjs/decorators/transforms.decorator.js +2 -0
- package/dist/cjs/decorators/uuid-param.decorator.d.ts +1 -0
- package/dist/cjs/decorators/uuid-param.decorator.js +2 -0
- package/dist/cjs/errors/errors.d.ts +5 -0
- package/dist/cjs/errors/errors.js +2 -0
- package/dist/cjs/errors/index.d.ts +1 -0
- package/dist/cjs/errors/index.js +2 -0
- package/dist/cjs/exceptions/file-not-image.exception.d.ts +4 -0
- package/dist/cjs/exceptions/file-not-image.exception.js +2 -0
- package/dist/cjs/exceptions/http-error.filter.d.ts +4 -0
- package/dist/cjs/exceptions/http-error.filter.js +2 -0
- package/dist/cjs/exceptions/index.d.ts +4 -0
- package/dist/cjs/exceptions/index.js +2 -0
- package/dist/cjs/exceptions/query.d.ts +3 -0
- package/dist/cjs/exceptions/query.js +2 -0
- package/dist/cjs/exceptions/user-not-found.exception.d.ts +4 -0
- package/dist/cjs/exceptions/user-not-found.exception.js +2 -0
- package/dist/cjs/filters/all-exceptions.filter.d.ts +9 -0
- package/dist/cjs/filters/all-exceptions.filter.js +2 -0
- package/dist/cjs/filters/bad-request.filter.d.ts +8 -0
- package/dist/cjs/filters/bad-request.filter.js +2 -0
- package/dist/cjs/filters/constraint-errors.d.ts +1 -0
- package/dist/cjs/filters/constraint-errors.js +2 -0
- package/dist/cjs/filters/http-exception.filter.d.ts +4 -0
- package/dist/cjs/filters/http-exception.filter.js +2 -0
- package/dist/cjs/filters/index.d.ts +8 -0
- package/dist/cjs/filters/index.js +2 -0
- package/dist/cjs/filters/prisma-exception.filter.d.ts +6 -0
- package/dist/cjs/filters/prisma-exception.filter.js +2 -0
- package/dist/cjs/filters/query-failed.filter.d.ts +7 -0
- package/dist/cjs/filters/query-failed.filter.js +2 -0
- package/dist/cjs/filters/query.d.ts +7 -0
- package/dist/cjs/filters/query.js +2 -0
- package/dist/cjs/filters/unprocessable-entity.filter.d.ts +7 -0
- package/dist/cjs/filters/unprocessable-entity.filter.js +2 -0
- package/dist/cjs/index.d.ts +6 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/validators/field.validator.d.ts +2 -0
- package/dist/cjs/validators/field.validator.js +2 -0
- package/dist/cjs/validators/filter.validator.d.ts +9 -0
- package/dist/cjs/validators/filter.validator.js +2 -0
- package/dist/cjs/validators/index.d.ts +2 -0
- package/dist/cjs/validators/index.js +2 -0
- package/dist/es/constants/core.constant.d.ts +42 -0
- package/dist/es/constants/core.constant.js +2 -0
- package/dist/es/constants/index.d.ts +1 -0
- package/dist/es/constants/index.js +2 -0
- package/dist/es/decorators/currentuser.decorator.d.ts +8 -0
- package/dist/es/decorators/currentuser.decorator.js +2 -0
- package/dist/es/decorators/index.d.ts +7 -0
- package/dist/es/decorators/index.js +2 -0
- package/dist/es/decorators/number.string.validator.d.ts +2 -0
- package/dist/es/decorators/number.string.validator.js +2 -0
- package/dist/es/decorators/permissions.decorator.d.ts +1 -0
- package/dist/es/decorators/permissions.decorator.js +2 -0
- package/dist/es/decorators/public.request.decorator.d.ts +2 -0
- package/dist/es/decorators/public.request.decorator.js +2 -0
- package/dist/es/decorators/swagger.schema.d.ts +5 -0
- package/dist/es/decorators/swagger.schema.js +2 -0
- package/dist/es/decorators/transforms.decorator.d.ts +1 -0
- package/dist/es/decorators/transforms.decorator.js +2 -0
- package/dist/es/decorators/uuid-param.decorator.d.ts +1 -0
- package/dist/es/decorators/uuid-param.decorator.js +2 -0
- package/dist/es/errors/errors.d.ts +5 -0
- package/dist/es/errors/errors.js +2 -0
- package/dist/es/errors/index.d.ts +1 -0
- package/dist/es/errors/index.js +2 -0
- package/dist/es/exceptions/file-not-image.exception.d.ts +4 -0
- package/dist/es/exceptions/file-not-image.exception.js +2 -0
- package/dist/es/exceptions/http-error.filter.d.ts +4 -0
- package/dist/es/exceptions/http-error.filter.js +2 -0
- package/dist/es/exceptions/index.d.ts +4 -0
- package/dist/es/exceptions/index.js +2 -0
- package/dist/es/exceptions/query.d.ts +3 -0
- package/dist/es/exceptions/query.js +2 -0
- package/dist/es/exceptions/user-not-found.exception.d.ts +4 -0
- package/dist/es/exceptions/user-not-found.exception.js +2 -0
- package/dist/es/filters/all-exceptions.filter.d.ts +9 -0
- package/dist/es/filters/all-exceptions.filter.js +2 -0
- package/dist/es/filters/bad-request.filter.d.ts +8 -0
- package/dist/es/filters/bad-request.filter.js +2 -0
- package/dist/es/filters/constraint-errors.d.ts +1 -0
- package/dist/es/filters/constraint-errors.js +2 -0
- package/dist/es/filters/http-exception.filter.d.ts +4 -0
- package/dist/es/filters/http-exception.filter.js +2 -0
- package/dist/es/filters/index.d.ts +8 -0
- package/dist/es/filters/index.js +2 -0
- package/dist/es/filters/prisma-exception.filter.d.ts +6 -0
- package/dist/es/filters/prisma-exception.filter.js +2 -0
- package/dist/es/filters/query-failed.filter.d.ts +7 -0
- package/dist/es/filters/query-failed.filter.js +2 -0
- package/dist/es/filters/query.d.ts +7 -0
- package/dist/es/filters/query.js +2 -0
- package/dist/es/filters/unprocessable-entity.filter.d.ts +7 -0
- package/dist/es/filters/unprocessable-entity.filter.js +2 -0
- package/dist/es/index.d.ts +6 -0
- package/dist/es/index.js +2 -0
- package/dist/es/validators/field.validator.d.ts +2 -0
- package/dist/es/validators/field.validator.js +2 -0
- package/dist/es/validators/filter.validator.d.ts +9 -0
- package/dist/es/validators/filter.validator.js +2 -0
- package/dist/es/validators/index.d.ts +2 -0
- package/dist/es/validators/index.js +2 -0
- package/dist/types/index.d.ts +153 -0
- package/package.json +70 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Dharmesh Patel
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare const HTTP_STATUS_MESSAGES: {
|
|
2
|
+
200: string;
|
|
3
|
+
201: string;
|
|
4
|
+
202: string;
|
|
5
|
+
203: string;
|
|
6
|
+
204: string;
|
|
7
|
+
205: string;
|
|
8
|
+
206: string;
|
|
9
|
+
301: string;
|
|
10
|
+
302: string;
|
|
11
|
+
304: string;
|
|
12
|
+
307: string;
|
|
13
|
+
308: string;
|
|
14
|
+
400: string;
|
|
15
|
+
401: string;
|
|
16
|
+
403: string;
|
|
17
|
+
404: string;
|
|
18
|
+
405: string;
|
|
19
|
+
406: string;
|
|
20
|
+
409: string;
|
|
21
|
+
413: string;
|
|
22
|
+
414: string;
|
|
23
|
+
415: string;
|
|
24
|
+
422: string;
|
|
25
|
+
429: string;
|
|
26
|
+
500: string;
|
|
27
|
+
501: string;
|
|
28
|
+
502: string;
|
|
29
|
+
503: string;
|
|
30
|
+
504: string;
|
|
31
|
+
};
|
|
32
|
+
export declare const RESPONSE_SERIALIZATION_META_KEY = "ResponseSerializationMetaKey";
|
|
33
|
+
export declare const PUBLIC_ROUTE_KEY = "PUBLIC";
|
|
34
|
+
export declare enum ActionType {
|
|
35
|
+
ADD = "add",
|
|
36
|
+
EDIT = "edit",
|
|
37
|
+
DELETE = "delete"
|
|
38
|
+
}
|
|
39
|
+
export declare enum PermissionType {
|
|
40
|
+
include = "include",
|
|
41
|
+
exclude = "exclude"
|
|
42
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e,t;Object.defineProperty(exports,"__esModule",{value:!0}),exports.PermissionType=exports.ActionType=exports.PUBLIC_ROUTE_KEY=exports.RESPONSE_SERIALIZATION_META_KEY=exports.HTTP_STATUS_MESSAGES=void 0,exports.HTTP_STATUS_MESSAGES={200:"OK",201:"Created",202:"Accepted",203:"NonAuthoritativeInfo",204:"NoContent",205:"ResetContent",206:"PartialContent",301:"Move Permanently",302:"Found",304:"Not Modified",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",409:"Conflict",413:"Payload Too Large",414:"URI Too Large",415:"Unsupported Media Type",422:"Unprocessable Entity",429:"Too Many Requests",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"},exports.RESPONSE_SERIALIZATION_META_KEY="ResponseSerializationMetaKey",exports.PUBLIC_ROUTE_KEY="PUBLIC",function(e){e.ADD="add",e.EDIT="edit",e.DELETE="delete"}(e||(exports.ActionType=e={})),function(e){e.include="include",e.exclude="exclude"}(t||(exports.PermissionType=t={}));
|
|
2
|
+
//# sourceMappingURL=core.constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './core.constant';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const currentUser: (...dataOrPipes: ({
|
|
2
|
+
id_user: string;
|
|
3
|
+
first_name: string;
|
|
4
|
+
last_name: string;
|
|
5
|
+
email: string;
|
|
6
|
+
id_device: string;
|
|
7
|
+
serial: string;
|
|
8
|
+
} | import("@nestjs/common").PipeTransform<any, any> | import("@nestjs/common").Type<import("@nestjs/common").PipeTransform<any, any>>)[]) => ParameterDecorator;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.currentUser=void 0;const e=require("@nestjs/common");exports.currentUser=(0,e.createParamDecorator)(((e,r)=>{const t=r.switchToHttp().getRequest();return e?t.user&&t.user.data:t.user}));
|
|
2
|
+
//# sourceMappingURL=currentuser.decorator.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './currentuser.decorator';
|
|
2
|
+
export * from './number.string.validator';
|
|
3
|
+
export * from './permissions.decorator';
|
|
4
|
+
export * from './public.request.decorator';
|
|
5
|
+
export * from './swagger.schema';
|
|
6
|
+
export * from './transforms.decorator';
|
|
7
|
+
export * from './uuid-param.decorator';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const r=require("tslib");r.__exportStar(require("./currentuser.decorator"),exports),r.__exportStar(require("./number.string.validator"),exports),r.__exportStar(require("./permissions.decorator"),exports),r.__exportStar(require("./public.request.decorator"),exports),r.__exportStar(require("./swagger.schema"),exports),r.__exportStar(require("./transforms.decorator"),exports),r.__exportStar(require("./uuid-param.decorator"),exports);
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.IsNumberStringOrNumber=function(r){return function(t,n){(0,e.registerDecorator)({name:"IsOptionalIntMinOne",target:t.constructor,propertyName:n,options:r,validator:{validate(e,r){const t=String(e).replace(/['"]+/g,""),n=Number(t);return"number"==typeof n&&!isNaN(n)&&n>=1},defaultMessage:e=>`${e.property} must be a number or numeric string`}})}};const e=require("class-validator");
|
|
2
|
+
//# sourceMappingURL=number.string.validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Permissions: (...permissions: string[]) => import("@nestjs/common").CustomDecorator<string>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.publicRoute=void 0;const e=require("@nestjs/common"),t=require("../constants/core.constant");exports.publicRoute=()=>(0,e.SetMetadata)(t.PUBLIC_ROUTE_KEY,!0);
|
|
2
|
+
//# sourceMappingURL=public.request.decorator.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.apiMultiFile=exports.apiFile=void 0;const e=require("@nestjs/swagger");exports.apiFile=(r="file",t={})=>(i,p,s)=>{const{isRequired:a=!1,isArray:o=!1}=t;let y={type:"string",format:"binary"};return o&&(y={type:"array",items:y}),(0,e.ApiBody)({required:a,schema:{type:"object",properties:{[r]:y}}})(i,p,s)};exports.apiMultiFile=(r="files")=>(t,i,p)=>{(0,e.ApiBody)({type:"multipart/form-data",required:!0,schema:{type:"object",properties:{[r]:{type:"array",items:{type:"string",format:"binary"}}}}})(t,i,p)};
|
|
2
|
+
//# sourceMappingURL=swagger.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ToNumber(): (target: object, key: string) => void;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ToNumber=function(){return(0,e.Transform)((({value:e})=>{const r=String(e).replace(/['"]+/g,""),t=Number(r);return isNaN(t)?"undefined":t}))};const e=require("class-transformer");
|
|
2
|
+
//# sourceMappingURL=transforms.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const UUIDParam: (name: string, version?: "4" | "7", errorMessage?: string) => ParameterDecorator;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UUIDParam=void 0;const e=require("@nestjs/common");exports.UUIDParam=(t,r="4",a="Invalid identifier format: the provided ID must be a valid UUID.")=>(0,e.createParamDecorator)(((o,s)=>{const i=s.switchToHttp().getRequest().params[t];if(!i)throw new e.BadRequestException(`Missing parameter: ${t}`);return new e.ParseUUIDPipe({version:r,errorHttpStatusCode:400,exceptionFactory:()=>new e.BadRequestException(a)}).transform(i,{metatype:String,type:"param"})}))();
|
|
2
|
+
//# sourceMappingURL=uuid-param.decorator.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MissingDataError=void 0;class e extends Error{constructor(e){super(`No distinct values found for the requested field: ${e}`),this.field=e,this.name="MissingDataError",this.field=e}formatFieldName(){const e=this.field.startsWith("id_")?this.field.slice(3):this.field;return e.charAt(0).toUpperCase()+e.slice(1)}}exports.MissingDataError=e;
|
|
2
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './errors';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FileNotImageException=void 0;const e=require("@nestjs/common");class t extends e.BadRequestException{constructor(e,t){e?super(e,t):super("error.file.not_image")}}exports.FileNotImageException=t;
|
|
2
|
+
//# sourceMappingURL=file-not-image.exception.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpErrorFilter=void 0;const t=require("tslib"),e=require("@nestjs/common");let r=class{catch(t,r){const s=r.switchToHttp(),o=s.getResponse(),R=s.getRequest(),a=t.getStatus?t.getStatus():e.HttpStatus.INTERNAL_SERVER_ERROR,i={code:a,timestamp:(new Date).toLocaleTimeString,path:R.url,method:R.method,message:a!==e.HttpStatus.INTERNAL_SERVER_ERROR?t.message||null:"Internal server error"};a===e.HttpStatus.INTERNAL_SERVER_ERROR?e.Logger.error(`${R.method} ${R.url}`,t.stack,"ExceptionFilter"):e.Logger.error(`${R.method} ${R.url}`,JSON.stringify(i),"ExceptionFilter"),o.status(a).json(i)}};exports.HttpErrorFilter=r,exports.HttpErrorFilter=r=t.__decorate([(0,e.Catch)()],r);
|
|
2
|
+
//# sourceMappingURL=http-error.filter.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.exceptionQuery=void 0;const e=require("tslib");e.__exportStar(require("./file-not-image.exception"),exports),e.__exportStar(require("./http-error.filter"),exports);var r=require("./query");Object.defineProperty(exports,"exceptionQuery",{enumerable:!0,get:function(){return r.Query}}),e.__exportStar(require("./user-not-found.exception"),exports);
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Query=void 0;exports.Query=class{addHttpQueryError(e,r,t,o,s){return{name:"addQueryError",type:"INSERT",syntax:()=>{try{let l=o,u=s;l=l.replace(/'/g,"\\'"),u=u.replace(/'/g,"\\'");return`INSERT INTO Error (Module,Method,Url,Req,Response) VALUES\n ('${e}','${r}','${t}','${l}','${u}');`}catch(l){return console.log(l),`Select ${e} ,${r},${t},${o},${s}`}}}}};
|
|
2
|
+
//# sourceMappingURL=query.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UserNotFoundException=void 0;const e=require("@nestjs/common");class o extends e.NotFoundException{constructor(e){super("error.user_not_found",e)}}exports.UserNotFoundException=o;
|
|
2
|
+
//# sourceMappingURL=user-not-found.exception.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ExceptionFilter, ArgumentsHost } from '@nestjs/common';
|
|
2
|
+
import { Reflector } from '@nestjs/core';
|
|
3
|
+
import { LoggerService } from '@infineit-nestjs/services';
|
|
4
|
+
export declare class AllExceptionsFilter implements ExceptionFilter {
|
|
5
|
+
loggerService: LoggerService;
|
|
6
|
+
reflector: Reflector;
|
|
7
|
+
constructor(loggerService: LoggerService, reflector: Reflector);
|
|
8
|
+
catch(exception: unknown, host: ArgumentsHost): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AllExceptionsFilter=void 0;const e=require("tslib"),t=require("@nestjs/common"),s=require("@nestjs/core"),r=require("@infineit-nestjs/services");let o=class{constructor(e,t){this.loggerService=e,this.reflector=t}catch(e,s){const r=s.switchToHttp(),o=r.getResponse(),i=r.getRequest();let c,n=e instanceof t.HttpException?e.getStatus():t.HttpStatus.INTERNAL_SERVER_ERROR,l="Internal server error";if("object"==typeof e&&null!==e){const s=e.message||"No error message";c=e.stack,s.includes("invalid input syntax for type uuid")?(l=l="The provided UUID format is invalid. Please ensure that it follows the correct UUID format.",n=t.HttpStatus.BAD_REQUEST):l=s}const a=e?.response?.field||null;this.loggerService.error(l,{sourceClass:this.constructor.name,props:{method:i.method,url:i.url,stack:c}});const u={statusCode:n,timestamp:(new Date).toISOString(),path:i.url,...a&&{field:a},message:l};o.status(n).json(u)}};exports.AllExceptionsFilter=o,exports.AllExceptionsFilter=o=e.__decorate([(0,t.Catch)(),e.__metadata("design:paramtypes",[r.LoggerService,s.Reflector])],o);
|
|
2
|
+
//# sourceMappingURL=all-exceptions.filter.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ArgumentsHost, BadRequestException, ExceptionFilter } from '@nestjs/common';
|
|
2
|
+
import { Reflector } from '@nestjs/core';
|
|
3
|
+
export declare class BadRequestExceptionFilter implements ExceptionFilter {
|
|
4
|
+
reflector: Reflector;
|
|
5
|
+
constructor(reflector: Reflector);
|
|
6
|
+
catch(exception: BadRequestException, host: ArgumentsHost): void;
|
|
7
|
+
private formatValidationErrors;
|
|
8
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BadRequestExceptionFilter=void 0;const e=require("tslib"),r=require("@nestjs/common"),t=require("@nestjs/core"),s=require("class-validator"),o=e.__importStar(require("lodash"));let a=class{constructor(e){this.reflector=e}catch(e,r){const t=r.switchToHttp().getResponse(),a=e.getStatus(),i=e.getResponse();if(o.isArray(i.message)&&i.message[0]instanceof s.ValidationError){const e=i.message,r={statusCode:a,message:"Validation failed due to one or more errors in the request.",errors:this.formatValidationErrors(e)};t.status(a).json(r)}else t.status(a).json(i)}formatValidationErrors(e){const r=(e,t="")=>{const s=t?`${t}.${e.property}`:e.property;if(e.children&&e.children.length>0){return e.children.flatMap((t=>{const o=Array.isArray(e.value)?`${s}`:s;return r(t,o)}))}return e.constraints?[{field:s,errors:Object.values(e.constraints)}]:[{field:s,errors:["Unknown validation error"]}]};return e.flatMap((e=>r(e)))}};exports.BadRequestExceptionFilter=a,exports.BadRequestExceptionFilter=a=e.__decorate([(0,r.Catch)(r.BadRequestException),e.__metadata("design:paramtypes",[t.Reflector])],a);
|
|
2
|
+
//# sourceMappingURL=bad-request.filter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const constraintErrors: Record<string, string>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpExceptionFilter=void 0;const t=require("tslib"),e=require("@nestjs/common");let s=class{catch(t,e){const s=e.switchToHttp(),o=s.getResponse(),p=s.getRequest(),r=t.getStatus();o.status(r).json({statusCode:r,timestamp:(new Date).toISOString(),path:p.url})}};exports.HttpExceptionFilter=s,exports.HttpExceptionFilter=s=t.__decorate([(0,e.Catch)(e.HttpException)],s);
|
|
2
|
+
//# sourceMappingURL=http-exception.filter.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './all-exceptions.filter';
|
|
2
|
+
export * from './bad-request.filter';
|
|
3
|
+
export * from './constraint-errors';
|
|
4
|
+
export * from './http-exception.filter';
|
|
5
|
+
export * from './prisma-exception.filter';
|
|
6
|
+
export * from './query-failed.filter';
|
|
7
|
+
export * from './query';
|
|
8
|
+
export * from './unprocessable-entity.filter';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e=require("tslib");e.__exportStar(require("./all-exceptions.filter"),exports),e.__exportStar(require("./bad-request.filter"),exports),e.__exportStar(require("./constraint-errors"),exports),e.__exportStar(require("./http-exception.filter"),exports),e.__exportStar(require("./prisma-exception.filter"),exports),e.__exportStar(require("./query-failed.filter"),exports),e.__exportStar(require("./query"),exports),e.__exportStar(require("./unprocessable-entity.filter"),exports);
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ArgumentsHost } from '@nestjs/common';
|
|
2
|
+
import { BaseExceptionFilter } from '@nestjs/core';
|
|
3
|
+
import { Prisma } from '@prisma/client';
|
|
4
|
+
export declare class PrismaClientExceptionFilter extends BaseExceptionFilter {
|
|
5
|
+
catch(exception: Prisma.PrismaClientKnownRequestError, host: ArgumentsHost): void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PrismaClientExceptionFilter=void 0;const e=require("tslib"),t=require("@nestjs/common"),s=require("@nestjs/core"),r=require("@prisma/client");let a=class extends s.BaseExceptionFilter{catch(e,s){const r=s.switchToHttp().getResponse(),a=e.message.replace(/\n/g,"");let i;switch(e.code){case"P2002":i=t.HttpStatus.CONFLICT;break;case"P2000":case"P2010":i=t.HttpStatus.BAD_REQUEST;break;case"P2025":i=t.HttpStatus.NOT_FOUND;break;default:super.catch(e,s)}r.status(i).json({statusCode:i,message:e.meta&&e.meta.message?e.meta.message:a,error:e.meta?e.meta:{}})}};exports.PrismaClientExceptionFilter=a,exports.PrismaClientExceptionFilter=a=e.__decorate([(0,t.Catch)(r.Prisma.PrismaClientKnownRequestError)],a);
|
|
2
|
+
//# sourceMappingURL=prisma-exception.filter.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ArgumentsHost, ExceptionFilter } from '@nestjs/common';
|
|
2
|
+
import { Reflector } from '@nestjs/core';
|
|
3
|
+
export declare class QueryFailedFilter implements ExceptionFilter {
|
|
4
|
+
reflector: Reflector;
|
|
5
|
+
constructor(reflector: Reflector);
|
|
6
|
+
catch(exception: any, host: ArgumentsHost): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.QueryFailedFilter=void 0;const t=require("http"),e=require("@nestjs/common"),r=require("./constraint-errors");exports.QueryFailedFilter=class{constructor(t){this.reflector=t}catch(s,o){const i=o.switchToHttp(),n=i.getResponse(),c=i.getRequest(),a=r.constraintErrors[s.constraint],u=s.constraint&&s.constraint.startsWith("UQ")?e.HttpStatus.CONFLICT:e.HttpStatus.INTERNAL_SERVER_ERROR,l={message:s.sqlMessage,query:s.query};try{e.Logger.error(`${c.method} ${c.url}`,JSON.stringify(l),"ExceptionFilter")}catch(t){console.log(t),e.Logger.error(`${c.method} ${c.url}`,JSON.stringify(l),"ExceptionFilter")}n.status(u).json({statusCode:u,error:t.STATUS_CODES[u],message:a})}};
|
|
2
|
+
//# sourceMappingURL=query-failed.filter.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Query=void 0;exports.Query=class{addQueryError(e,r,t,o,s){return{name:"addQueryError",type:"INSERT",syntax:()=>{try{let l=o,u=s;l=l.replace(/'/g,"\\'"),u=u.replace(/'/g,"\\'");return`INSERT INTO Error (Module,Method,Url,Req,Response) VALUES\n ('${e}','${r}','${t}','${l}','${u}');`}catch(l){return console.log(l),`Select ${e} ,${r},${t},${o},${s}`}}}}};
|
|
2
|
+
//# sourceMappingURL=query.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ExceptionFilter, ArgumentsHost, UnprocessableEntityException } from '@nestjs/common';
|
|
2
|
+
import { Reflector } from '@nestjs/core';
|
|
3
|
+
export declare class UnprocessableEntityFilter implements ExceptionFilter {
|
|
4
|
+
private readonly reflector;
|
|
5
|
+
constructor(reflector: Reflector);
|
|
6
|
+
catch(exception: UnprocessableEntityException, host: ArgumentsHost): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UnprocessableEntityFilter=void 0;const e=require("tslib"),t=require("@nestjs/common"),s=require("@nestjs/core");let r=class{constructor(e){this.reflector=e}catch(e,t){const s=t.switchToHttp().getResponse(),r=e.getStatus(),o=e.getResponse(),{message:a,error:c}=o||{},i={statusCode:r,message:a||"Validation failed.",error:c||[]};s.status(r).json(i)}};exports.UnprocessableEntityFilter=r,exports.UnprocessableEntityFilter=r=e.__decorate([(0,t.Catch)(t.UnprocessableEntityException),e.__metadata("design:paramtypes",[s.Reflector])],r);
|
|
2
|
+
//# sourceMappingURL=unprocessable-entity.filter.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const r=require("tslib");r.__exportStar(require("./constants"),exports),r.__exportStar(require("./decorators"),exports),r.__exportStar(require("./errors"),exports),r.__exportStar(require("./exceptions"),exports),r.__exportStar(require("./filters"),exports),r.__exportStar(require("./validators"),exports);
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.IsValidField=function(t,r){return function(n,s){(0,e.registerDecorator)({name:"isValidField",target:n.constructor,propertyName:s,constraints:[t],options:r,validator:{validate(e,t){const[r]=t.constraints;return e in new r},defaultMessage(e){const[t]=e.constraints;return`Field '${e.value}' is not a valid key of ${t.name}`}}})}};const e=require("class-validator");
|
|
2
|
+
//# sourceMappingURL=field.validator.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ValidatorConstraintInterface, ValidationArguments } from 'class-validator';
|
|
2
|
+
export declare class CommaSeparated implements ValidatorConstraintInterface {
|
|
3
|
+
validate(propertyValue: string, args: ValidationArguments): boolean;
|
|
4
|
+
defaultMessage(args: ValidationArguments): string;
|
|
5
|
+
}
|
|
6
|
+
export declare class SortBy implements ValidatorConstraintInterface {
|
|
7
|
+
validate(value: string, args: ValidationArguments): boolean;
|
|
8
|
+
defaultMessage(args: ValidationArguments): string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SortBy=exports.CommaSeparated=void 0;const e=require("tslib"),t=require("@nestjs/common"),r=require("class-validator");let a=class{validate(e,t){return!!/^[0-9]+(,[0-9]+)*$/.test(e)}defaultMessage(e){return`Invalid ${e.property}`}};exports.CommaSeparated=a,exports.CommaSeparated=a=e.__decorate([(0,t.Injectable)(),(0,r.ValidatorConstraint)({name:"CommaSeparated",async:!1})],a);let s=class{validate(e,t){const r=e.split(" ");if(r.length%2!=0)return!1;const a=/^[\w]+$/,s=/^(ASC|DESC|asc|desc|Asc|Desc)$/;for(let e=0;e<r.length;e+=2)if(!a.test(r[e])||!s.test(r[e+1]))return!1;return!0}defaultMessage(e){return`${e.property} must be in the format "field direction" where direction is "ASC" or "DESC", separated by spaces.`}};exports.SortBy=s,exports.SortBy=s=e.__decorate([(0,t.Injectable)(),(0,r.ValidatorConstraint)({name:"SortBy",async:!1})],s);
|
|
2
|
+
//# sourceMappingURL=filter.validator.js.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare const HTTP_STATUS_MESSAGES: {
|
|
2
|
+
200: string;
|
|
3
|
+
201: string;
|
|
4
|
+
202: string;
|
|
5
|
+
203: string;
|
|
6
|
+
204: string;
|
|
7
|
+
205: string;
|
|
8
|
+
206: string;
|
|
9
|
+
301: string;
|
|
10
|
+
302: string;
|
|
11
|
+
304: string;
|
|
12
|
+
307: string;
|
|
13
|
+
308: string;
|
|
14
|
+
400: string;
|
|
15
|
+
401: string;
|
|
16
|
+
403: string;
|
|
17
|
+
404: string;
|
|
18
|
+
405: string;
|
|
19
|
+
406: string;
|
|
20
|
+
409: string;
|
|
21
|
+
413: string;
|
|
22
|
+
414: string;
|
|
23
|
+
415: string;
|
|
24
|
+
422: string;
|
|
25
|
+
429: string;
|
|
26
|
+
500: string;
|
|
27
|
+
501: string;
|
|
28
|
+
502: string;
|
|
29
|
+
503: string;
|
|
30
|
+
504: string;
|
|
31
|
+
};
|
|
32
|
+
export declare const RESPONSE_SERIALIZATION_META_KEY = "ResponseSerializationMetaKey";
|
|
33
|
+
export declare const PUBLIC_ROUTE_KEY = "PUBLIC";
|
|
34
|
+
export declare enum ActionType {
|
|
35
|
+
ADD = "add",
|
|
36
|
+
EDIT = "edit",
|
|
37
|
+
DELETE = "delete"
|
|
38
|
+
}
|
|
39
|
+
export declare enum PermissionType {
|
|
40
|
+
include = "include",
|
|
41
|
+
exclude = "exclude"
|
|
42
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e,t;Object.defineProperty(exports,"__esModule",{value:!0}),exports.PermissionType=exports.ActionType=exports.PUBLIC_ROUTE_KEY=exports.RESPONSE_SERIALIZATION_META_KEY=exports.HTTP_STATUS_MESSAGES=void 0,exports.HTTP_STATUS_MESSAGES={200:"OK",201:"Created",202:"Accepted",203:"NonAuthoritativeInfo",204:"NoContent",205:"ResetContent",206:"PartialContent",301:"Move Permanently",302:"Found",304:"Not Modified",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",409:"Conflict",413:"Payload Too Large",414:"URI Too Large",415:"Unsupported Media Type",422:"Unprocessable Entity",429:"Too Many Requests",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"},exports.RESPONSE_SERIALIZATION_META_KEY="ResponseSerializationMetaKey",exports.PUBLIC_ROUTE_KEY="PUBLIC",function(e){e.ADD="add",e.EDIT="edit",e.DELETE="delete"}(e||(exports.ActionType=e={})),function(e){e.include="include",e.exclude="exclude"}(t||(exports.PermissionType=t={}));
|
|
2
|
+
//# sourceMappingURL=core.constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './core.constant';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const currentUser: (...dataOrPipes: ({
|
|
2
|
+
id_user: string;
|
|
3
|
+
first_name: string;
|
|
4
|
+
last_name: string;
|
|
5
|
+
email: string;
|
|
6
|
+
id_device: string;
|
|
7
|
+
serial: string;
|
|
8
|
+
} | import("@nestjs/common").PipeTransform<any, any> | import("@nestjs/common").Type<import("@nestjs/common").PipeTransform<any, any>>)[]) => ParameterDecorator;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.currentUser=void 0;const e=require("@nestjs/common");exports.currentUser=(0,e.createParamDecorator)(((e,r)=>{const t=r.switchToHttp().getRequest();return e?t.user&&t.user.data:t.user}));
|
|
2
|
+
//# sourceMappingURL=currentuser.decorator.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './currentuser.decorator';
|
|
2
|
+
export * from './number.string.validator';
|
|
3
|
+
export * from './permissions.decorator';
|
|
4
|
+
export * from './public.request.decorator';
|
|
5
|
+
export * from './swagger.schema';
|
|
6
|
+
export * from './transforms.decorator';
|
|
7
|
+
export * from './uuid-param.decorator';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0});const r=require("tslib");r.__exportStar(require("./currentuser.decorator"),exports),r.__exportStar(require("./number.string.validator"),exports),r.__exportStar(require("./permissions.decorator"),exports),r.__exportStar(require("./public.request.decorator"),exports),r.__exportStar(require("./swagger.schema"),exports),r.__exportStar(require("./transforms.decorator"),exports),r.__exportStar(require("./uuid-param.decorator"),exports);
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.IsNumberStringOrNumber=function(r){return function(t,n){(0,e.registerDecorator)({name:"IsOptionalIntMinOne",target:t.constructor,propertyName:n,options:r,validator:{validate(e,r){const t=String(e).replace(/['"]+/g,""),n=Number(t);return"number"==typeof n&&!isNaN(n)&&n>=1},defaultMessage:e=>`${e.property} must be a number or numeric string`}})}};const e=require("class-validator");
|
|
2
|
+
//# sourceMappingURL=number.string.validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Permissions: (...permissions: string[]) => import("@nestjs/common").CustomDecorator<string>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.apiMultiFile=exports.apiFile=void 0;const e=require("@nestjs/swagger");exports.apiFile=(r="file",t={})=>(i,p,s)=>{const{isRequired:a=!1,isArray:o=!1}=t;let y={type:"string",format:"binary"};return o&&(y={type:"array",items:y}),(0,e.ApiBody)({required:a,schema:{type:"object",properties:{[r]:y}}})(i,p,s)};exports.apiMultiFile=(r="files")=>(t,i,p)=>{(0,e.ApiBody)({type:"multipart/form-data",required:!0,schema:{type:"object",properties:{[r]:{type:"array",items:{type:"string",format:"binary"}}}}})(t,i,p)};
|
|
2
|
+
//# sourceMappingURL=swagger.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ToNumber(): (target: object, key: string) => void;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.ToNumber=function(){return(0,e.Transform)((({value:e})=>{const r=String(e).replace(/['"]+/g,""),n=Number(r);return isNaN(n)?"undefined":n}))};const e=require("class-transformer");
|
|
2
|
+
//# sourceMappingURL=transforms.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const UUIDParam: (name: string, version?: "4" | "7", errorMessage?: string) => ParameterDecorator;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.UUIDParam=void 0;const e=require("@nestjs/common");exports.UUIDParam=(t,r="4",a="Invalid identifier format: the provided ID must be a valid UUID.")=>(0,e.createParamDecorator)(((o,s)=>{const i=s.switchToHttp().getRequest().params[t];if(!i)throw new e.BadRequestException(`Missing parameter: ${t}`);return new e.ParseUUIDPipe({version:r,errorHttpStatusCode:400,exceptionFactory:()=>new e.BadRequestException(a)}).transform(i,{metatype:String,type:"param"})}))();
|
|
2
|
+
//# sourceMappingURL=uuid-param.decorator.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.MissingDataError=void 0;class e extends Error{constructor(e){super(`No distinct values found for the requested field: ${e}`),this.field=e,this.name="MissingDataError",this.field=e}formatFieldName(){const e=this.field.startsWith("id_")?this.field.slice(3):this.field;return e.charAt(0).toUpperCase()+e.slice(1)}}exports.MissingDataError=e;
|
|
2
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './errors';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.FileNotImageException=void 0;const e=require("@nestjs/common");class o extends e.BadRequestException{constructor(e,o){e?super(e,o):super("error.file.not_image")}}exports.FileNotImageException=o;
|
|
2
|
+
//# sourceMappingURL=file-not-image.exception.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpErrorFilter=void 0;const t=require("tslib"),e=require("@nestjs/common");let r=class{catch(t,r){const o=r.switchToHttp(),s=o.getResponse(),R=o.getRequest(),a=t.getStatus?t.getStatus():e.HttpStatus.INTERNAL_SERVER_ERROR,i={code:a,timestamp:(new Date).toLocaleTimeString,path:R.url,method:R.method,message:a!==e.HttpStatus.INTERNAL_SERVER_ERROR?t.message||null:"Internal server error"};a===e.HttpStatus.INTERNAL_SERVER_ERROR?e.Logger.error(`${R.method} ${R.url}`,t.stack,"ExceptionFilter"):e.Logger.error(`${R.method} ${R.url}`,JSON.stringify(i),"ExceptionFilter"),s.status(a).json(i)}};exports.HttpErrorFilter=r,exports.HttpErrorFilter=r=t.__decorate([(0,e.Catch)()],r);
|
|
2
|
+
//# sourceMappingURL=http-error.filter.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.exceptionQuery=void 0;const e=require("tslib");e.__exportStar(require("./file-not-image.exception"),exports),e.__exportStar(require("./http-error.filter"),exports);var r=require("./query");Object.defineProperty(exports,"exceptionQuery",{enumerable:!0,get:function(){return r.Query}}),e.__exportStar(require("./user-not-found.exception"),exports);
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.Query=void 0;exports.Query=class{addHttpQueryError(e,r,t,o,l){return{name:"addQueryError",type:"INSERT",syntax:()=>{try{let s=o,u=l;s=s.replace(/'/g,"\\'"),u=u.replace(/'/g,"\\'");return`INSERT INTO Error (Module,Method,Url,Req,Response) VALUES\n ('${e}','${r}','${t}','${s}','${u}');`}catch(s){return console.log(s),`Select ${e} ,${r},${t},${o},${l}`}}}}};
|
|
2
|
+
//# sourceMappingURL=query.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.UserNotFoundException=void 0;const e=require("@nestjs/common");class o extends e.NotFoundException{constructor(e){super("error.user_not_found",e)}}exports.UserNotFoundException=o;
|
|
2
|
+
//# sourceMappingURL=user-not-found.exception.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ExceptionFilter, ArgumentsHost } from '@nestjs/common';
|
|
2
|
+
import { Reflector } from '@nestjs/core';
|
|
3
|
+
import { LoggerService } from '@infineit-nestjs/services';
|
|
4
|
+
export declare class AllExceptionsFilter implements ExceptionFilter {
|
|
5
|
+
loggerService: LoggerService;
|
|
6
|
+
reflector: Reflector;
|
|
7
|
+
constructor(loggerService: LoggerService, reflector: Reflector);
|
|
8
|
+
catch(exception: unknown, host: ArgumentsHost): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.AllExceptionsFilter=void 0;const e=require("tslib"),t=require("@nestjs/common"),s=require("@nestjs/core"),r=require("@infineit-nestjs/services");let o=class{constructor(e,t){this.loggerService=e,this.reflector=t}catch(e,s){const r=s.switchToHttp(),o=r.getResponse(),i=r.getRequest();let n,c=e instanceof t.HttpException?e.getStatus():t.HttpStatus.INTERNAL_SERVER_ERROR,l="Internal server error";if("object"==typeof e&&null!==e){const s=e.message||"No error message";n=e.stack,s.includes("invalid input syntax for type uuid")?(l=l="The provided UUID format is invalid. Please ensure that it follows the correct UUID format.",c=t.HttpStatus.BAD_REQUEST):l=s}const a=e?.response?.field||null;this.loggerService.error(l,{sourceClass:this.constructor.name,props:{method:i.method,url:i.url,stack:n}});const p={statusCode:c,timestamp:(new Date).toISOString(),path:i.url,...a&&{field:a},message:l};o.status(c).json(p)}};exports.AllExceptionsFilter=o,exports.AllExceptionsFilter=o=e.__decorate([(0,t.Catch)(),e.__metadata("design:paramtypes",[r.LoggerService,s.Reflector])],o);
|
|
2
|
+
//# sourceMappingURL=all-exceptions.filter.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ArgumentsHost, BadRequestException, ExceptionFilter } from '@nestjs/common';
|
|
2
|
+
import { Reflector } from '@nestjs/core';
|
|
3
|
+
export declare class BadRequestExceptionFilter implements ExceptionFilter {
|
|
4
|
+
reflector: Reflector;
|
|
5
|
+
constructor(reflector: Reflector);
|
|
6
|
+
catch(exception: BadRequestException, host: ArgumentsHost): void;
|
|
7
|
+
private formatValidationErrors;
|
|
8
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.BadRequestExceptionFilter=void 0;const e=require("tslib"),r=require("@nestjs/common"),t=require("@nestjs/core"),s=require("class-validator"),o=e.__importStar(require("lodash"));let a=class{constructor(e){this.reflector=e}catch(e,r){const t=r.switchToHttp().getResponse(),a=e.getStatus(),i=e.getResponse();if(o.isArray(i.message)&&i.message[0]instanceof s.ValidationError){const e=i.message,r={statusCode:a,message:"Validation failed due to one or more errors in the request.",errors:this.formatValidationErrors(e)};t.status(a).json(r)}else t.status(a).json(i)}formatValidationErrors(e){const r=(e,t="")=>{const s=t?`${t}.${e.property}`:e.property;if(e.children&&e.children.length>0){return e.children.flatMap((t=>{const o=Array.isArray(e.value)?`${s}`:s;return r(t,o)}))}return e.constraints?[{field:s,errors:Object.values(e.constraints)}]:[{field:s,errors:["Unknown validation error"]}]};return e.flatMap((e=>r(e)))}};exports.BadRequestExceptionFilter=a,exports.BadRequestExceptionFilter=a=e.__decorate([(0,r.Catch)(r.BadRequestException),e.__metadata("design:paramtypes",[t.Reflector])],a);
|
|
2
|
+
//# sourceMappingURL=bad-request.filter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const constraintErrors: Record<string, string>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpExceptionFilter=void 0;const t=require("tslib"),e=require("@nestjs/common");let s=class{catch(t,e){const s=e.switchToHttp(),o=s.getResponse(),p=s.getRequest(),r=t.getStatus();o.status(r).json({statusCode:r,timestamp:(new Date).toISOString(),path:p.url})}};exports.HttpExceptionFilter=s,exports.HttpExceptionFilter=s=t.__decorate([(0,e.Catch)(e.HttpException)],s);
|
|
2
|
+
//# sourceMappingURL=http-exception.filter.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './all-exceptions.filter';
|
|
2
|
+
export * from './bad-request.filter';
|
|
3
|
+
export * from './constraint-errors';
|
|
4
|
+
export * from './http-exception.filter';
|
|
5
|
+
export * from './prisma-exception.filter';
|
|
6
|
+
export * from './query-failed.filter';
|
|
7
|
+
export * from './query';
|
|
8
|
+
export * from './unprocessable-entity.filter';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0});const e=require("tslib");e.__exportStar(require("./all-exceptions.filter"),exports),e.__exportStar(require("./bad-request.filter"),exports),e.__exportStar(require("./constraint-errors"),exports),e.__exportStar(require("./http-exception.filter"),exports),e.__exportStar(require("./prisma-exception.filter"),exports),e.__exportStar(require("./query-failed.filter"),exports),e.__exportStar(require("./query"),exports),e.__exportStar(require("./unprocessable-entity.filter"),exports);
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ArgumentsHost } from '@nestjs/common';
|
|
2
|
+
import { BaseExceptionFilter } from '@nestjs/core';
|
|
3
|
+
import { Prisma } from '@prisma/client';
|
|
4
|
+
export declare class PrismaClientExceptionFilter extends BaseExceptionFilter {
|
|
5
|
+
catch(exception: Prisma.PrismaClientKnownRequestError, host: ArgumentsHost): void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.PrismaClientExceptionFilter=void 0;const e=require("tslib"),t=require("@nestjs/common"),s=require("@nestjs/core"),r=require("@prisma/client");let a=class extends s.BaseExceptionFilter{catch(e,s){const r=s.switchToHttp().getResponse(),a=e.message.replace(/\n/g,"");let i;switch(e.code){case"P2002":i=t.HttpStatus.CONFLICT;break;case"P2000":case"P2010":i=t.HttpStatus.BAD_REQUEST;break;case"P2025":i=t.HttpStatus.NOT_FOUND;break;default:super.catch(e,s)}r.status(i).json({statusCode:i,message:e.meta&&e.meta.message?e.meta.message:a,error:e.meta?e.meta:{}})}};exports.PrismaClientExceptionFilter=a,exports.PrismaClientExceptionFilter=a=e.__decorate([(0,t.Catch)(r.Prisma.PrismaClientKnownRequestError)],a);
|
|
2
|
+
//# sourceMappingURL=prisma-exception.filter.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ArgumentsHost, ExceptionFilter } from '@nestjs/common';
|
|
2
|
+
import { Reflector } from '@nestjs/core';
|
|
3
|
+
export declare class QueryFailedFilter implements ExceptionFilter {
|
|
4
|
+
reflector: Reflector;
|
|
5
|
+
constructor(reflector: Reflector);
|
|
6
|
+
catch(exception: any, host: ArgumentsHost): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.QueryFailedFilter=void 0;const t=require("http"),e=require("@nestjs/common"),r=require("./constraint-errors");exports.QueryFailedFilter=class{constructor(t){this.reflector=t}catch(s,o){const i=o.switchToHttp(),n=i.getResponse(),c=i.getRequest(),a=r.constraintErrors[s.constraint],u=s.constraint&&s.constraint.startsWith("UQ")?e.HttpStatus.CONFLICT:e.HttpStatus.INTERNAL_SERVER_ERROR,l={message:s.sqlMessage,query:s.query};try{e.Logger.error(`${c.method} ${c.url}`,JSON.stringify(l),"ExceptionFilter")}catch(t){console.log(t),e.Logger.error(`${c.method} ${c.url}`,JSON.stringify(l),"ExceptionFilter")}n.status(u).json({statusCode:u,error:t.STATUS_CODES[u],message:a})}};
|
|
2
|
+
//# sourceMappingURL=query-failed.filter.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.Query=void 0;exports.Query=class{addQueryError(e,r,o,t,l){return{name:"addQueryError",type:"INSERT",syntax:()=>{try{let s=t,u=l;s=s.replace(/'/g,"\\'"),u=u.replace(/'/g,"\\'");return`INSERT INTO Error (Module,Method,Url,Req,Response) VALUES\n ('${e}','${r}','${o}','${s}','${u}');`}catch(s){return console.log(s),`Select ${e} ,${r},${o},${t},${l}`}}}}};
|
|
2
|
+
//# sourceMappingURL=query.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ExceptionFilter, ArgumentsHost, UnprocessableEntityException } from '@nestjs/common';
|
|
2
|
+
import { Reflector } from '@nestjs/core';
|
|
3
|
+
export declare class UnprocessableEntityFilter implements ExceptionFilter {
|
|
4
|
+
private readonly reflector;
|
|
5
|
+
constructor(reflector: Reflector);
|
|
6
|
+
catch(exception: UnprocessableEntityException, host: ArgumentsHost): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.UnprocessableEntityFilter=void 0;const e=require("tslib"),t=require("@nestjs/common"),s=require("@nestjs/core");let r=class{constructor(e){this.reflector=e}catch(e,t){const s=t.switchToHttp().getResponse(),r=e.getStatus(),o=e.getResponse(),{message:a,error:n}=o||{},c={statusCode:r,message:a||"Validation failed.",error:n||[]};s.status(r).json(c)}};exports.UnprocessableEntityFilter=r,exports.UnprocessableEntityFilter=r=e.__decorate([(0,t.Catch)(t.UnprocessableEntityException),e.__metadata("design:paramtypes",[s.Reflector])],r);
|
|
2
|
+
//# sourceMappingURL=unprocessable-entity.filter.js.map
|
package/dist/es/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0});const r=require("tslib");r.__exportStar(require("./constants"),exports),r.__exportStar(require("./decorators"),exports),r.__exportStar(require("./errors"),exports),r.__exportStar(require("./exceptions"),exports),r.__exportStar(require("./filters"),exports),r.__exportStar(require("./validators"),exports);
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.IsValidField=function(t,r){return function(n,a){(0,e.registerDecorator)({name:"isValidField",target:n.constructor,propertyName:a,constraints:[t],options:r,validator:{validate(e,t){const[r]=t.constraints;return e in new r},defaultMessage(e){const[t]=e.constraints;return`Field '${e.value}' is not a valid key of ${t.name}`}}})}};const e=require("class-validator");
|
|
2
|
+
//# sourceMappingURL=field.validator.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ValidatorConstraintInterface, ValidationArguments } from 'class-validator';
|
|
2
|
+
export declare class CommaSeparated implements ValidatorConstraintInterface {
|
|
3
|
+
validate(propertyValue: string, args: ValidationArguments): boolean;
|
|
4
|
+
defaultMessage(args: ValidationArguments): string;
|
|
5
|
+
}
|
|
6
|
+
export declare class SortBy implements ValidatorConstraintInterface {
|
|
7
|
+
validate(value: string, args: ValidationArguments): boolean;
|
|
8
|
+
defaultMessage(args: ValidationArguments): string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.SortBy=exports.CommaSeparated=void 0;const e=require("tslib"),t=require("@nestjs/common"),r=require("class-validator");let a=class{validate(e,t){return!!/^[0-9]+(,[0-9]+)*$/.test(e)}defaultMessage(e){return`Invalid ${e.property}`}};exports.CommaSeparated=a,exports.CommaSeparated=a=e.__decorate([(0,t.Injectable)(),(0,r.ValidatorConstraint)({name:"CommaSeparated",async:!1})],a);let s=class{validate(e,t){const r=e.split(" ");if(r.length%2!=0)return!1;const a=/^[\w]+$/,s=/^(ASC|DESC|asc|desc|Asc|Desc)$/;for(let e=0;e<r.length;e+=2)if(!a.test(r[e])||!s.test(r[e+1]))return!1;return!0}defaultMessage(e){return`${e.property} must be in the format "field direction" where direction is "ASC" or "DESC", separated by spaces.`}};exports.SortBy=s,exports.SortBy=s=e.__decorate([(0,t.Injectable)(),(0,r.ValidatorConstraint)({name:"SortBy",async:!1})],s);
|
|
2
|
+
//# sourceMappingURL=filter.validator.js.map
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import * as _nestjs_common from '@nestjs/common';
|
|
2
|
+
import { CustomDecorator, BadRequestException, ExceptionFilter, HttpException, ArgumentsHost, NotFoundException, UnprocessableEntityException } from '@nestjs/common';
|
|
3
|
+
import { ValidationOptions, ValidatorConstraintInterface, ValidationArguments } from 'class-validator';
|
|
4
|
+
import { Reflector, BaseExceptionFilter } from '@nestjs/core';
|
|
5
|
+
import { LoggerService } from '@infineit-nestjs/services';
|
|
6
|
+
import { Prisma } from '@prisma/client';
|
|
7
|
+
|
|
8
|
+
declare const HTTP_STATUS_MESSAGES: {
|
|
9
|
+
200: string;
|
|
10
|
+
201: string;
|
|
11
|
+
202: string;
|
|
12
|
+
203: string;
|
|
13
|
+
204: string;
|
|
14
|
+
205: string;
|
|
15
|
+
206: string;
|
|
16
|
+
301: string;
|
|
17
|
+
302: string;
|
|
18
|
+
304: string;
|
|
19
|
+
307: string;
|
|
20
|
+
308: string;
|
|
21
|
+
400: string;
|
|
22
|
+
401: string;
|
|
23
|
+
403: string;
|
|
24
|
+
404: string;
|
|
25
|
+
405: string;
|
|
26
|
+
406: string;
|
|
27
|
+
409: string;
|
|
28
|
+
413: string;
|
|
29
|
+
414: string;
|
|
30
|
+
415: string;
|
|
31
|
+
422: string;
|
|
32
|
+
429: string;
|
|
33
|
+
500: string;
|
|
34
|
+
501: string;
|
|
35
|
+
502: string;
|
|
36
|
+
503: string;
|
|
37
|
+
504: string;
|
|
38
|
+
};
|
|
39
|
+
declare const RESPONSE_SERIALIZATION_META_KEY = "ResponseSerializationMetaKey";
|
|
40
|
+
declare const PUBLIC_ROUTE_KEY = "PUBLIC";
|
|
41
|
+
declare enum ActionType {
|
|
42
|
+
ADD = "add",
|
|
43
|
+
EDIT = "edit",
|
|
44
|
+
DELETE = "delete"
|
|
45
|
+
}
|
|
46
|
+
declare enum PermissionType {
|
|
47
|
+
include = "include",
|
|
48
|
+
exclude = "exclude"
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
declare const currentUser: (...dataOrPipes: ({
|
|
52
|
+
id_user: string;
|
|
53
|
+
first_name: string;
|
|
54
|
+
last_name: string;
|
|
55
|
+
email: string;
|
|
56
|
+
id_device: string;
|
|
57
|
+
serial: string;
|
|
58
|
+
} | _nestjs_common.PipeTransform<any, any> | _nestjs_common.Type<_nestjs_common.PipeTransform<any, any>>)[]) => ParameterDecorator;
|
|
59
|
+
|
|
60
|
+
declare function IsNumberStringOrNumber(validationOptions?: ValidationOptions): (object: object, propertyName: string) => void;
|
|
61
|
+
|
|
62
|
+
declare const Permissions: (...permissions: string[]) => _nestjs_common.CustomDecorator<string>;
|
|
63
|
+
|
|
64
|
+
declare const publicRoute: () => CustomDecorator<string>;
|
|
65
|
+
|
|
66
|
+
declare const apiFile: (fileName?: string, options?: Partial<{
|
|
67
|
+
isRequired: boolean;
|
|
68
|
+
isArray: boolean;
|
|
69
|
+
}>) => MethodDecorator;
|
|
70
|
+
declare const apiMultiFile: (fileName?: string) => MethodDecorator;
|
|
71
|
+
|
|
72
|
+
declare function ToNumber(): (target: object, key: string) => void;
|
|
73
|
+
|
|
74
|
+
declare const UUIDParam: (name: string, version?: "4" | "7", errorMessage?: string) => ParameterDecorator;
|
|
75
|
+
|
|
76
|
+
declare class MissingDataError extends Error {
|
|
77
|
+
field: string;
|
|
78
|
+
constructor(field: string);
|
|
79
|
+
formatFieldName(): string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
declare class FileNotImageException extends BadRequestException {
|
|
83
|
+
constructor(message?: string | any, error?: string);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
declare class HttpErrorFilter implements ExceptionFilter {
|
|
87
|
+
catch(exception: HttpException, host: ArgumentsHost): void;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
declare class Query$1 {
|
|
91
|
+
addHttpQueryError(module: string, method: string, url: string, reqdata: string, resdata: string): unknown;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
declare class UserNotFoundException extends NotFoundException {
|
|
95
|
+
constructor(error?: string);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
declare class AllExceptionsFilter implements ExceptionFilter {
|
|
99
|
+
loggerService: LoggerService;
|
|
100
|
+
reflector: Reflector;
|
|
101
|
+
constructor(loggerService: LoggerService, reflector: Reflector);
|
|
102
|
+
catch(exception: unknown, host: ArgumentsHost): void;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
declare class BadRequestExceptionFilter implements ExceptionFilter {
|
|
106
|
+
reflector: Reflector;
|
|
107
|
+
constructor(reflector: Reflector);
|
|
108
|
+
catch(exception: BadRequestException, host: ArgumentsHost): void;
|
|
109
|
+
private formatValidationErrors;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
declare const constraintErrors: Record<string, string>;
|
|
113
|
+
|
|
114
|
+
declare class HttpExceptionFilter implements ExceptionFilter {
|
|
115
|
+
catch(exception: HttpException, host: ArgumentsHost): void;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
declare class PrismaClientExceptionFilter extends BaseExceptionFilter {
|
|
119
|
+
catch(exception: Prisma.PrismaClientKnownRequestError, host: ArgumentsHost): void;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
declare class QueryFailedFilter implements ExceptionFilter {
|
|
123
|
+
reflector: Reflector;
|
|
124
|
+
constructor(reflector: Reflector);
|
|
125
|
+
catch(exception: any, host: ArgumentsHost): void;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
declare class Query {
|
|
129
|
+
addQueryError(module: string, method: string, url: string, reqdata: string, resdata: string): {
|
|
130
|
+
name: string;
|
|
131
|
+
type: string;
|
|
132
|
+
syntax: () => string;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
declare class UnprocessableEntityFilter implements ExceptionFilter {
|
|
137
|
+
private readonly reflector;
|
|
138
|
+
constructor(reflector: Reflector);
|
|
139
|
+
catch(exception: UnprocessableEntityException, host: ArgumentsHost): void;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
declare function IsValidField(entity: any, validationOptions?: ValidationOptions): (object: object, propertyName: string) => void;
|
|
143
|
+
|
|
144
|
+
declare class CommaSeparated implements ValidatorConstraintInterface {
|
|
145
|
+
validate(propertyValue: string, args: ValidationArguments): boolean;
|
|
146
|
+
defaultMessage(args: ValidationArguments): string;
|
|
147
|
+
}
|
|
148
|
+
declare class SortBy implements ValidatorConstraintInterface {
|
|
149
|
+
validate(value: string, args: ValidationArguments): boolean;
|
|
150
|
+
defaultMessage(args: ValidationArguments): string;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export { ActionType, AllExceptionsFilter, BadRequestExceptionFilter, CommaSeparated, FileNotImageException, HTTP_STATUS_MESSAGES, HttpErrorFilter, HttpExceptionFilter, IsNumberStringOrNumber, IsValidField, MissingDataError, PUBLIC_ROUTE_KEY, PermissionType, Permissions, PrismaClientExceptionFilter, Query, QueryFailedFilter, RESPONSE_SERIALIZATION_META_KEY, SortBy, ToNumber, UUIDParam, UnprocessableEntityFilter, UserNotFoundException, apiFile, apiMultiFile, constraintErrors, currentUser, Query$1 as exceptionQuery, publicRoute };
|
package/package.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@infineit-nestjs/core",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"main": "./dist/cjs/index.js",
|
|
5
|
+
"module": "./dist/es/index.mjs",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/types/index.d.ts",
|
|
9
|
+
"import": "./dist/es/index.mjs",
|
|
10
|
+
"require": "./dist/cjs/index.js",
|
|
11
|
+
"default": "./dist/cjs/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./decorators": {
|
|
14
|
+
"types": "./dist/types/decorators/index.d.ts",
|
|
15
|
+
"import": "./dist/es/decorators/index.mjs",
|
|
16
|
+
"require": "./dist/cjsdecorators/index.js",
|
|
17
|
+
"default": "./dist/cjs/decorators/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./constants": {
|
|
20
|
+
"types": "./dist/types/constants/index.d.ts",
|
|
21
|
+
"import": "./dist/es/constants/index.mjs",
|
|
22
|
+
"require": "./dist/cjs/constants/index.js",
|
|
23
|
+
"default": "./dist/cjs/constants/index.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"types": "./dist/types/index.d.ts",
|
|
27
|
+
"files": [
|
|
28
|
+
"dist/",
|
|
29
|
+
"README.md",
|
|
30
|
+
"LICENSE",
|
|
31
|
+
"!dist/**/*.map",
|
|
32
|
+
"!dist/**/*.test.*",
|
|
33
|
+
"!dist/**/*.spec.*"
|
|
34
|
+
],
|
|
35
|
+
"scripts": {
|
|
36
|
+
"clean": "rimraf types dist lib",
|
|
37
|
+
"build": "yarn clean && rollup -c",
|
|
38
|
+
"dev": "concurrently -c blue,red -n tsc,rollup --kill-others \"tsc --watch -p . --preserveWatchOutput\" \"rollup --config --watch --no-watch.clearScreen\""
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@infineit-nestjs/services": "1.0.10",
|
|
42
|
+
"@nestjs/swagger": "^11.0.7"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@rollup/plugin-commonjs": "^28.0.2",
|
|
46
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
47
|
+
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
48
|
+
"@rollup/plugin-replace": "^6.0.2",
|
|
49
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
50
|
+
"@rollup/plugin-typescript": "^12.1.2",
|
|
51
|
+
"@rollup/plugin-url": "^8.0.2",
|
|
52
|
+
"@types/rollup-plugin-peer-deps-external": "^2",
|
|
53
|
+
"@types/terser": "^3.12.0",
|
|
54
|
+
"rollup": "^4.34.8",
|
|
55
|
+
"rollup-plugin-dts": "^6.1.1",
|
|
56
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
57
|
+
"rollup-plugin-preserve-directives": "^0.4.0",
|
|
58
|
+
"typescript": "^5.7.3"
|
|
59
|
+
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"@nestjs/common": "^10.0.0 || ^11.0.0",
|
|
62
|
+
"@nestjs/core": "^10.0.0 || ^11.0.0",
|
|
63
|
+
"typescript": "^5.7.3"
|
|
64
|
+
},
|
|
65
|
+
"sideEffects": false,
|
|
66
|
+
"publishConfig": {
|
|
67
|
+
"access": "public"
|
|
68
|
+
},
|
|
69
|
+
"gitHead": "f6c679a861e4e90f2d4d7f7f0a9c4f847e6a7987"
|
|
70
|
+
}
|