arkos 0.0.1 → 0.0.3
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/dist/app.d.ts +10 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/app.js +114 -0
- package/dist/app.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +51 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/auth/auth.controller.d.ts +23 -0
- package/dist/modules/auth/auth.controller.d.ts.map +1 -0
- package/dist/modules/auth/auth.controller.js +317 -0
- package/dist/modules/auth/auth.controller.js.map +1 -0
- package/dist/modules/auth/auth.router.d.ts +4 -0
- package/dist/modules/auth/auth.router.d.ts.map +1 -0
- package/dist/modules/auth/auth.router.js +64 -0
- package/dist/modules/auth/auth.router.js.map +1 -0
- package/dist/modules/auth/auth.service.d.ts +16 -0
- package/dist/modules/auth/auth.service.d.ts.map +1 -0
- package/dist/modules/auth/auth.service.js +122 -0
- package/dist/modules/auth/auth.service.js.map +1 -0
- package/dist/modules/base/base.controller.d.ts +17 -0
- package/dist/modules/base/base.controller.d.ts.map +1 -0
- package/dist/modules/base/base.controller.js +296 -0
- package/dist/modules/base/base.controller.js.map +1 -0
- package/dist/modules/base/base.middlewares.d.ts +20 -0
- package/dist/modules/base/base.middlewares.d.ts.map +1 -0
- package/dist/modules/base/base.middlewares.js +86 -0
- package/dist/modules/base/base.middlewares.js.map +1 -0
- package/dist/modules/base/base.router.d.ts +4 -0
- package/dist/modules/base/base.router.d.ts.map +1 -0
- package/dist/modules/base/base.router.js +74 -0
- package/dist/modules/base/base.router.js.map +1 -0
- package/dist/modules/base/base.service.d.ts +32 -0
- package/dist/modules/base/base.service.d.ts.map +1 -0
- package/dist/modules/base/base.service.js +149 -0
- package/dist/modules/base/base.service.js.map +1 -0
- package/dist/modules/base/utils/base.helpers.d.ts +29 -0
- package/dist/modules/base/utils/base.helpers.d.ts.map +1 -0
- package/dist/modules/base/utils/base.helpers.js +106 -0
- package/dist/modules/base/utils/base.helpers.js.map +1 -0
- package/dist/modules/email/email.service.d.ts +22 -0
- package/dist/modules/email/email.service.d.ts.map +1 -0
- package/dist/modules/email/email.service.js +45 -0
- package/dist/modules/email/email.service.js.map +1 -0
- package/dist/modules/email/utils/email.helpers.d.ts +9 -0
- package/dist/modules/email/utils/email.helpers.d.ts.map +1 -0
- package/dist/modules/email/utils/email.helpers.js +25 -0
- package/dist/modules/email/utils/email.helpers.js.map +1 -0
- package/dist/modules/error-handler/error-handler.controller.d.ts +4 -0
- package/dist/modules/error-handler/error-handler.controller.d.ts.map +1 -0
- package/dist/modules/error-handler/error-handler.controller.js +182 -0
- package/dist/modules/error-handler/error-handler.controller.js.map +1 -0
- package/dist/modules/error-handler/utils/app-error.d.ts +11 -0
- package/dist/modules/error-handler/utils/app-error.d.ts.map +1 -0
- package/dist/modules/error-handler/utils/app-error.js +23 -0
- package/dist/modules/error-handler/utils/app-error.js.map +1 -0
- package/dist/modules/error-handler/utils/catch-async.d.ts +4 -0
- package/dist/modules/error-handler/utils/catch-async.d.ts.map +1 -0
- package/dist/modules/error-handler/utils/catch-async.js +9 -0
- package/dist/modules/error-handler/utils/catch-async.js.map +1 -0
- package/dist/modules/error-handler/utils/error-handler.helpers.d.ts +43 -0
- package/dist/modules/error-handler/utils/error-handler.helpers.d.ts.map +1 -0
- package/dist/modules/error-handler/utils/error-handler.helpers.js +209 -0
- package/dist/modules/error-handler/utils/error-handler.helpers.js.map +1 -0
- package/dist/modules/file-uploader/file-uploader.service.d.ts +20 -0
- package/dist/modules/file-uploader/file-uploader.service.d.ts.map +1 -0
- package/dist/modules/file-uploader/file-uploader.service.js +114 -0
- package/dist/modules/file-uploader/file-uploader.service.js.map +1 -0
- package/dist/paths.d.ts +2 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +9 -0
- package/dist/paths.js.map +1 -0
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/utils/features/api.features.d.ts +20 -0
- package/dist/utils/features/api.features.d.ts.map +1 -0
- package/dist/utils/features/api.features.js +177 -0
- package/dist/utils/features/api.features.js.map +1 -0
- package/dist/utils/features/prisma.helpers.d.ts +3 -0
- package/dist/utils/features/prisma.helpers.d.ts.map +1 -0
- package/dist/utils/features/prisma.helpers.js +20 -0
- package/dist/utils/features/prisma.helpers.js.map +1 -0
- package/dist/utils/helpers/api.features.helpers.d.ts +41 -0
- package/dist/utils/helpers/api.features.helpers.d.ts.map +1 -0
- package/dist/utils/helpers/api.features.helpers.js +161 -0
- package/dist/utils/helpers/api.features.helpers.js.map +1 -0
- package/dist/utils/helpers/models.helpers.d.ts +21 -0
- package/dist/utils/helpers/models.helpers.d.ts.map +1 -0
- package/dist/utils/helpers/models.helpers.js +195 -0
- package/dist/utils/helpers/models.helpers.js.map +1 -0
- package/dist/utils/helpers/text.helpers.d.ts +2 -0
- package/dist/utils/helpers/text.helpers.d.ts.map +1 -0
- package/dist/utils/helpers/text.helpers.js +12 -0
- package/dist/utils/helpers/text.helpers.js.map +1 -0
- package/dist/utils/permissions/index.d.ts +3 -0
- package/dist/utils/permissions/index.d.ts.map +1 -0
- package/dist/utils/permissions/index.js +17 -0
- package/dist/utils/permissions/index.js.map +1 -0
- package/dist/utils/scripts/export-prisma-types.d.ts +2 -0
- package/dist/utils/scripts/export-prisma-types.d.ts.map +1 -0
- package/dist/utils/scripts/export-prisma-types.js +152 -0
- package/dist/utils/scripts/export-prisma-types.js.map +1 -0
- package/dist/utils/scripts/generate-zod-schemas.d.ts +2 -0
- package/dist/utils/scripts/generate-zod-schemas.d.ts.map +1 -0
- package/dist/utils/scripts/generate-zod-schemas.js +121 -0
- package/dist/utils/scripts/generate-zod-schemas.js.map +1 -0
- package/dist/utils/scripts/prisma-db-push.d.ts +2 -0
- package/dist/utils/scripts/prisma-db-push.d.ts.map +1 -0
- package/dist/utils/scripts/prisma-db-push.js +24 -0
- package/dist/utils/scripts/prisma-db-push.js.map +1 -0
- package/dist/utils/validate-dto.d.ts +3 -0
- package/dist/utils/validate-dto.d.ts.map +1 -0
- package/dist/utils/validate-dto.js +17 -0
- package/dist/utils/validate-dto.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = validateDto;
|
|
7
|
+
const class_transformer_1 = require("class-transformer");
|
|
8
|
+
const class_validator_1 = require("class-validator");
|
|
9
|
+
const app_error_1 = __importDefault(require("../modules/error-handler/utils/app-error"));
|
|
10
|
+
async function validateDto(DtoClass, data) {
|
|
11
|
+
const dataDto = (0, class_transformer_1.plainToInstance)(DtoClass, data);
|
|
12
|
+
const errors = await (0, class_validator_1.validate)(dataDto);
|
|
13
|
+
if (errors.length > 0)
|
|
14
|
+
throw new app_error_1.default('Invalid Data', 400, errors);
|
|
15
|
+
return dataDto;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=validate-dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-dto.js","sourceRoot":"","sources":["../../src/utils/validate-dto.ts"],"names":[],"mappings":";;;;;AAIA,8BAQC;AAZD,yDAAqE;AACrE,qDAA0C;AAC1C,yFAA+D;AAEhD,KAAK,UAAU,WAAW,CACvC,QAA6B,EAC7B,IAAyB;IAEzB,MAAM,OAAO,GAAG,IAAA,mCAAe,EAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;IAC/C,MAAM,MAAM,GAAG,MAAM,IAAA,0BAAQ,EAAC,OAAO,CAAC,CAAA;IACtC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,MAAM,IAAI,mBAAQ,CAAC,cAAc,EAAE,GAAG,EAAE,MAAM,CAAC,CAAA;IACtE,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arkos",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "A super customizable TypeScript package for auto-generating API routes with built-in authentication, email service, error handling, file upload routes, image upload optimization, and seamless Prisma integration.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|