web_api_base 6.0.3 → 6.1.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/package.json +4 -5
- package/readme.md +36 -12
- package/dist/Application.d.ts +0 -28
- package/dist/Application.js +0 -643
- package/dist/Application.js.map +0 -1
- package/dist/ApplicationConfiguration.d.ts +0 -20
- package/dist/ApplicationConfiguration.js +0 -132
- package/dist/ApplicationConfiguration.js.map +0 -1
- package/dist/bin/CreateApplication.d.ts +0 -1
- package/dist/bin/CreateApplication.js +0 -6
- package/dist/bin/CreateApplication.js.map +0 -1
- package/dist/bin/CreateController.d.ts +0 -1
- package/dist/bin/CreateController.js +0 -5
- package/dist/bin/CreateController.js.map +0 -1
- package/dist/bin/Factory.d.ts +0 -2
- package/dist/bin/Factory.js +0 -81
- package/dist/bin/Factory.js.map +0 -1
- package/dist/controllers/AcceptedResult.d.ts +0 -4
- package/dist/controllers/AcceptedResult.js +0 -13
- package/dist/controllers/AcceptedResult.js.map +0 -1
- package/dist/controllers/ActionResult.d.ts +0 -5
- package/dist/controllers/ActionResult.js +0 -10
- package/dist/controllers/ActionResult.js.map +0 -1
- package/dist/controllers/BadRequestResult.d.ts +0 -4
- package/dist/controllers/BadRequestResult.js +0 -13
- package/dist/controllers/BadRequestResult.js.map +0 -1
- package/dist/controllers/CreatedResult.d.ts +0 -4
- package/dist/controllers/CreatedResult.js +0 -13
- package/dist/controllers/CreatedResult.js.map +0 -1
- package/dist/controllers/DownloadFileResult.d.ts +0 -4
- package/dist/controllers/DownloadFileResult.js +0 -13
- package/dist/controllers/DownloadFileResult.js.map +0 -1
- package/dist/controllers/ErrorResult.d.ts +0 -4
- package/dist/controllers/ErrorResult.js +0 -13
- package/dist/controllers/ErrorResult.js.map +0 -1
- package/dist/controllers/ForbiddenResult.d.ts +0 -4
- package/dist/controllers/ForbiddenResult.js +0 -13
- package/dist/controllers/ForbiddenResult.js.map +0 -1
- package/dist/controllers/GenericResult.d.ts +0 -5
- package/dist/controllers/GenericResult.js +0 -13
- package/dist/controllers/GenericResult.js.map +0 -1
- package/dist/controllers/NoContentResult.d.ts +0 -4
- package/dist/controllers/NoContentResult.js +0 -13
- package/dist/controllers/NoContentResult.js.map +0 -1
- package/dist/controllers/NotFoundResult.d.ts +0 -4
- package/dist/controllers/NotFoundResult.js +0 -13
- package/dist/controllers/NotFoundResult.js.map +0 -1
- package/dist/controllers/OKResult.d.ts +0 -4
- package/dist/controllers/OKResult.js +0 -13
- package/dist/controllers/OKResult.js.map +0 -1
- package/dist/controllers/SendFileResult.d.ts +0 -4
- package/dist/controllers/SendFileResult.js +0 -13
- package/dist/controllers/SendFileResult.js.map +0 -1
- package/dist/controllers/UnauthorizedResult.d.ts +0 -4
- package/dist/controllers/UnauthorizedResult.js +0 -13
- package/dist/controllers/UnauthorizedResult.js.map +0 -1
- package/dist/controllers/base/ControllerBase.d.ts +0 -32
- package/dist/controllers/base/ControllerBase.js +0 -84
- package/dist/controllers/base/ControllerBase.js.map +0 -1
- package/dist/decorators/controllers/ControllerDecorators.d.ts +0 -65
- package/dist/decorators/controllers/ControllerDecorators.js +0 -256
- package/dist/decorators/controllers/ControllerDecorators.js.map +0 -1
- package/dist/decorators/documentation/DocumentationDecorators.d.ts +0 -23
- package/dist/decorators/documentation/DocumentationDecorators.js +0 -69
- package/dist/decorators/documentation/DocumentationDecorators.js.map +0 -1
- package/dist/decorators/validations/ValidationDecorators.d.ts +0 -53
- package/dist/decorators/validations/ValidationDecorators.js +0 -181
- package/dist/decorators/validations/ValidationDecorators.js.map +0 -1
- package/dist/dependencyInjection/DependecyService.d.ts +0 -28
- package/dist/dependencyInjection/DependecyService.js +0 -136
- package/dist/dependencyInjection/DependecyService.js.map +0 -1
- package/dist/dependencyInjection/IDIContext.d.ts +0 -7
- package/dist/dependencyInjection/IDIContext.js +0 -3
- package/dist/dependencyInjection/IDIContext.js.map +0 -1
- package/dist/documentation/CSS.d.ts +0 -6
- package/dist/documentation/CSS.js +0 -302
- package/dist/documentation/CSS.js.map +0 -1
- package/dist/documentation/Documentation.d.ts +0 -7
- package/dist/documentation/Documentation.js +0 -89
- package/dist/documentation/Documentation.js.map +0 -1
- package/dist/documentation/HTML.d.ts +0 -4
- package/dist/documentation/HTML.js +0 -26
- package/dist/documentation/HTML.js.map +0 -1
- package/dist/documentation/JS.d.ts +0 -5
- package/dist/documentation/JS.js +0 -416
- package/dist/documentation/JS.js.map +0 -1
- package/dist/enums/httpVerbs/HttpVerbs.d.ts +0 -6
- package/dist/enums/httpVerbs/HttpVerbs.js +0 -11
- package/dist/enums/httpVerbs/HttpVerbs.js.map +0 -1
- package/dist/exceptions/ArgumentNullException.d.ts +0 -3
- package/dist/exceptions/ArgumentNullException.js +0 -10
- package/dist/exceptions/ArgumentNullException.js.map +0 -1
- package/dist/exceptions/BodyParseException.d.ts +0 -3
- package/dist/exceptions/BodyParseException.js +0 -10
- package/dist/exceptions/BodyParseException.js.map +0 -1
- package/dist/exceptions/ControllerLoadException.d.ts +0 -3
- package/dist/exceptions/ControllerLoadException.js +0 -10
- package/dist/exceptions/ControllerLoadException.js.map +0 -1
- package/dist/exceptions/DecoratorException.d.ts +0 -3
- package/dist/exceptions/DecoratorException.js +0 -10
- package/dist/exceptions/DecoratorException.js.map +0 -1
- package/dist/exceptions/Exception.d.ts +0 -4
- package/dist/exceptions/Exception.js +0 -10
- package/dist/exceptions/Exception.js.map +0 -1
- package/dist/exceptions/FileNotFoundException.d.ts +0 -3
- package/dist/exceptions/FileNotFoundException.js +0 -10
- package/dist/exceptions/FileNotFoundException.js.map +0 -1
- package/dist/exceptions/FindDependencyException.d.ts +0 -3
- package/dist/exceptions/FindDependencyException.js +0 -10
- package/dist/exceptions/FindDependencyException.js.map +0 -1
- package/dist/exceptions/InvalidEntityException.d.ts +0 -3
- package/dist/exceptions/InvalidEntityException.js +0 -10
- package/dist/exceptions/InvalidEntityException.js.map +0 -1
- package/dist/file/AbstractFileService.d.ts +0 -11
- package/dist/file/AbstractFileService.js +0 -6
- package/dist/file/AbstractFileService.js.map +0 -1
- package/dist/file/AbstractMultiPartRequestService.d.ts +0 -16
- package/dist/file/AbstractMultiPartRequestService.js +0 -12
- package/dist/file/AbstractMultiPartRequestService.js.map +0 -1
- package/dist/file/File.d.ts +0 -5
- package/dist/file/File.js +0 -10
- package/dist/file/File.js.map +0 -1
- package/dist/file/FileService.d.ts +0 -12
- package/dist/file/FileService.js +0 -136
- package/dist/file/FileService.js.map +0 -1
- package/dist/file/FormidableMultiPartRequestService.d.ts +0 -4
- package/dist/file/FormidableMultiPartRequestService.js +0 -73
- package/dist/file/FormidableMultiPartRequestService.js.map +0 -1
- package/dist/index.d.ts +0 -76
- package/dist/index.js +0 -225
- package/dist/index.js.map +0 -1
- package/dist/interfaces/IApplication.d.ts +0 -14
- package/dist/interfaces/IApplication.js +0 -3
- package/dist/interfaces/IApplication.js.map +0 -1
- package/dist/interfaces/IApplicationConfiguration.d.ts +0 -14
- package/dist/interfaces/IApplicationConfiguration.js +0 -3
- package/dist/interfaces/IApplicationConfiguration.js.map +0 -1
- package/dist/interfaces/IController.d.ts +0 -5
- package/dist/interfaces/IController.js +0 -3
- package/dist/interfaces/IController.js.map +0 -1
- package/dist/metadata/FunctionAnalizer.d.ts +0 -9
- package/dist/metadata/FunctionAnalizer.js +0 -57
- package/dist/metadata/FunctionAnalizer.js.map +0 -1
- package/dist/metadata/OwnMetaDataContainer.d.ts +0 -12
- package/dist/metadata/OwnMetaDataContainer.js +0 -33
- package/dist/metadata/OwnMetaDataContainer.js.map +0 -1
- package/dist/metadata/Type.d.ts +0 -7
- package/dist/metadata/Type.js +0 -139
- package/dist/metadata/Type.js.map +0 -1
- package/dist/midlewares/IMidleware.d.ts +0 -19
- package/dist/midlewares/IMidleware.js +0 -3
- package/dist/midlewares/IMidleware.js.map +0 -1
- package/dist/utils/Utils.d.ts +0 -3
- package/dist/utils/Utils.js +0 -11
- package/dist/utils/Utils.js.map +0 -1
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export interface IGetPartsOptions {
|
|
2
|
-
MaxFileSize: number;
|
|
3
|
-
}
|
|
4
|
-
export default abstract class AbstractMultiPartRequestService {
|
|
5
|
-
abstract GetPartsFromRequestAsync(request: any, options?: IGetPartsOptions): Promise<IRequestPart[]>;
|
|
6
|
-
}
|
|
7
|
-
export interface IRequestPart {
|
|
8
|
-
Type: PartType;
|
|
9
|
-
Name: string;
|
|
10
|
-
Content: string;
|
|
11
|
-
Filename?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare enum PartType {
|
|
14
|
-
FILE = 0,
|
|
15
|
-
TEXT = 1
|
|
16
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PartType = void 0;
|
|
4
|
-
class AbstractMultiPartRequestService {
|
|
5
|
-
}
|
|
6
|
-
exports.default = AbstractMultiPartRequestService;
|
|
7
|
-
var PartType;
|
|
8
|
-
(function (PartType) {
|
|
9
|
-
PartType[PartType["FILE"] = 0] = "FILE";
|
|
10
|
-
PartType[PartType["TEXT"] = 1] = "TEXT";
|
|
11
|
-
})(PartType || (exports.PartType = PartType = {}));
|
|
12
|
-
//# sourceMappingURL=AbstractMultiPartRequestService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractMultiPartRequestService.js","sourceRoot":"","sources":["../../file/AbstractMultiPartRequestService.ts"],"names":[],"mappings":";;;AAMA,MAA8B,+BAA+B;CAE5D;AAFD,kDAEC;AASD,IAAY,QAGX;AAHD,WAAY,QAAQ;IAChB,uCAAI,CAAA;IACJ,uCAAI,CAAA;AACR,CAAC,EAHW,QAAQ,wBAAR,QAAQ,QAGnB"}
|
package/dist/file/File.d.ts
DELETED
package/dist/file/File.js
DELETED
package/dist/file/File.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"File.js","sourceRoot":"","sources":["../../file/File.ts"],"names":[],"mappings":";;AAAA,MAAqB,IAAI;IAKrB,YAAY,QAAiB,EAAG,IAAa;QAEzC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;CACJ;AAVD,uBAUC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import AbstractFileService from './AbstractFileService';
|
|
2
|
-
export default class FileService extends AbstractFileService {
|
|
3
|
-
WriteAllTextAsync(path: string, text: string, encoding: 'utf-8' | 'win-1252'): Promise<void>;
|
|
4
|
-
ReadAllTextAsync(path: string, encoding: 'utf-8' | 'win-1252'): Promise<string>;
|
|
5
|
-
CreateDirectoryAsync(path: string): Promise<void>;
|
|
6
|
-
FileExistsAsync(file: string): Promise<boolean>;
|
|
7
|
-
DirectoryExistsAsync(path: string): Promise<boolean>;
|
|
8
|
-
GetAllFilesAsync(origin: string): Promise<string[]>;
|
|
9
|
-
GetAllFordersAsync(origin: string): Promise<string[]>;
|
|
10
|
-
CopyAsync(origin: string, dest: string): Promise<void>;
|
|
11
|
-
DeleteAsync(file: string): Promise<void>;
|
|
12
|
-
}
|
package/dist/file/FileService.js
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const fs_1 = __importDefault(require("fs"));
|
|
16
|
-
const promises_1 = __importDefault(require("fs/promises"));
|
|
17
|
-
const path_1 = __importDefault(require("path"));
|
|
18
|
-
const AbstractFileService_1 = __importDefault(require("./AbstractFileService"));
|
|
19
|
-
const FileNotFoundException_1 = __importDefault(require("../exceptions/FileNotFoundException"));
|
|
20
|
-
const Exception_1 = __importDefault(require("../exceptions/Exception"));
|
|
21
|
-
class FileService extends AbstractFileService_1.default {
|
|
22
|
-
WriteAllTextAsync(path, text, encoding) {
|
|
23
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
return new Promise((resolve, reject) => {
|
|
25
|
-
fs_1.default.writeFile(path, text, encoding == "utf-8" ? "utf-8" : "latin1", (err) => {
|
|
26
|
-
if (err)
|
|
27
|
-
return reject(new Exception_1.default(err.message));
|
|
28
|
-
return resolve();
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
ReadAllTextAsync(path, encoding) {
|
|
34
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
if (!(yield this.FileExistsAsync(path)))
|
|
36
|
-
throw new FileNotFoundException_1.default(`File ${path} not exists`);
|
|
37
|
-
return new Promise((resolve, reject) => {
|
|
38
|
-
fs_1.default.readFile(path, encoding == "utf-8" ? "utf-8" : "latin1", (err, text) => {
|
|
39
|
-
if (err)
|
|
40
|
-
return reject(new Exception_1.default(err.message));
|
|
41
|
-
return resolve(text);
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
CreateDirectoryAsync(path) {
|
|
47
|
-
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
try {
|
|
49
|
-
if (!(yield this.DirectoryExistsAsync(path))) {
|
|
50
|
-
fs_1.default.mkdirSync(path, { recursive: true });
|
|
51
|
-
return resolve();
|
|
52
|
-
}
|
|
53
|
-
return resolve();
|
|
54
|
-
}
|
|
55
|
-
catch (err) {
|
|
56
|
-
return reject(err);
|
|
57
|
-
}
|
|
58
|
-
}));
|
|
59
|
-
}
|
|
60
|
-
FileExistsAsync(file) {
|
|
61
|
-
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
62
|
-
try {
|
|
63
|
-
return resolve(fs_1.default.existsSync(file) && fs_1.default.lstatSync(file).isFile());
|
|
64
|
-
}
|
|
65
|
-
catch (err) {
|
|
66
|
-
return reject(err);
|
|
67
|
-
}
|
|
68
|
-
}));
|
|
69
|
-
}
|
|
70
|
-
DirectoryExistsAsync(path) {
|
|
71
|
-
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
72
|
-
try {
|
|
73
|
-
return resolve(fs_1.default.existsSync(path) && fs_1.default.lstatSync(path).isDirectory());
|
|
74
|
-
}
|
|
75
|
-
catch (err) {
|
|
76
|
-
return reject(err);
|
|
77
|
-
}
|
|
78
|
-
}));
|
|
79
|
-
}
|
|
80
|
-
GetAllFilesAsync(origin) {
|
|
81
|
-
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
82
|
-
if (!fs_1.default.existsSync(origin))
|
|
83
|
-
return reject(new Error(`The path ${origin} not exists`));
|
|
84
|
-
try {
|
|
85
|
-
let files = yield promises_1.default.readdir(origin, { withFileTypes: true });
|
|
86
|
-
return resolve(files.filter(u => u.isFile()).map(u => path_1.default.join(origin, u.name)));
|
|
87
|
-
}
|
|
88
|
-
catch (err) {
|
|
89
|
-
return reject(err);
|
|
90
|
-
}
|
|
91
|
-
}));
|
|
92
|
-
}
|
|
93
|
-
GetAllFordersAsync(origin) {
|
|
94
|
-
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
95
|
-
if (!fs_1.default.existsSync(origin))
|
|
96
|
-
return reject(new Error(`The path ${origin} not exists`));
|
|
97
|
-
try {
|
|
98
|
-
let files = yield promises_1.default.readdir(origin, { withFileTypes: true });
|
|
99
|
-
return resolve(files.filter(u => u.isDirectory()).map(u => path_1.default.join(origin, u.name)));
|
|
100
|
-
}
|
|
101
|
-
catch (err) {
|
|
102
|
-
return reject(err);
|
|
103
|
-
}
|
|
104
|
-
}));
|
|
105
|
-
}
|
|
106
|
-
CopyAsync(origin, dest) {
|
|
107
|
-
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
108
|
-
try {
|
|
109
|
-
yield fs_1.default.copyFile(origin, dest, (err) => {
|
|
110
|
-
if (err)
|
|
111
|
-
throw err;
|
|
112
|
-
resolve();
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
catch (err) {
|
|
116
|
-
reject(err);
|
|
117
|
-
}
|
|
118
|
-
}));
|
|
119
|
-
}
|
|
120
|
-
DeleteAsync(file) {
|
|
121
|
-
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
122
|
-
try {
|
|
123
|
-
yield fs_1.default.unlink(file, (err) => {
|
|
124
|
-
if (err)
|
|
125
|
-
throw err;
|
|
126
|
-
resolve();
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
catch (err) {
|
|
130
|
-
reject(err);
|
|
131
|
-
}
|
|
132
|
-
}));
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
exports.default = FileService;
|
|
136
|
-
//# sourceMappingURL=FileService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileService.js","sourceRoot":"","sources":["../../file/FileService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,4CAAsB;AACtB,2DAAoC;AACpC,gDAAwB;AACxB,gFAAwD;AACxD,gGAAwE;AACxE,wEAAgD;AAIhD,MAAqB,WAAY,SAAQ,6BAAmB;IAG3C,iBAAiB,CAAC,IAAY,EAAE,IAAY,EAAE,QAA8B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,CAAC,CAAA,CAAC,CAAC;IACP,CAAC;IAEM,SAAS,CAAC,MAAc,EAAE,IAAY;QAEzC,OAAO,IAAI,OAAO,CAAO,CAAO,OAAO,EAAE,MAAM,EAAC,EAAE;YAE9C,IAAG,CAAC;gBACA,MAAM,YAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE;oBAEtC,IAAG,GAAG;wBACF,MAAM,GAAG,CAAC;oBAEd,OAAO,EAAE,CAAC;gBACd,CAAC,CAAC,CAAA;YAEN,CAAC;YAAA,OAAM,GAAG,EACV,CAAC;gBACG,MAAM,CAAC,GAAG,CAAC,CAAC;YAChB,CAAC;QACL,CAAC,CAAA,CAAC,CAAC;IAEP,CAAC;IAEM,WAAW,CAAC,IAAY;QAE3B,OAAO,IAAI,OAAO,CAAO,CAAO,OAAO,EAAE,MAAM,EAAC,EAAE;YAE9C,IAAG,CAAC;gBACA,MAAM,YAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE;oBAE5B,IAAG,GAAG;wBACF,MAAM,GAAG,CAAC;oBAEd,OAAO,EAAE,CAAC;gBACd,CAAC,CAAC,CAAA;YAEN,CAAC;YAAA,OAAM,GAAG,EACV,CAAC;gBACG,MAAM,CAAC,GAAG,CAAC,CAAC;YAChB,CAAC;QACL,CAAC,CAAA,CAAC,CAAC;IAEP,CAAC;CAIJ;AAzKD,8BAyKC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import AbstractMultiPartRequestService, { IGetPartsOptions, IRequestPart } from './AbstractMultiPartRequestService';
|
|
2
|
-
export default class FormidableMultiPartRequestService extends AbstractMultiPartRequestService {
|
|
3
|
-
GetPartsFromRequestAsync(request: any, options?: IGetPartsOptions): Promise<IRequestPart[]>;
|
|
4
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const formidable_1 = __importDefault(require("formidable"));
|
|
30
|
-
const AbstractMultiPartRequestService_1 = __importStar(require("./AbstractMultiPartRequestService"));
|
|
31
|
-
const Exception_1 = __importDefault(require("../exceptions/Exception"));
|
|
32
|
-
class FormidableMultiPartRequestService extends AbstractMultiPartRequestService_1.default {
|
|
33
|
-
GetPartsFromRequestAsync(request, options) {
|
|
34
|
-
let maxFileSize = 200 * 1024 * 1024;
|
|
35
|
-
if (options && options.MaxFileSize > 0)
|
|
36
|
-
maxFileSize = options.MaxFileSize;
|
|
37
|
-
let form = (0, formidable_1.default)({ maxFileSize: maxFileSize });
|
|
38
|
-
return new Promise((resolve, reject) => {
|
|
39
|
-
form.parse(request, (err, fields, files) => {
|
|
40
|
-
let result = [];
|
|
41
|
-
if (err)
|
|
42
|
-
return reject(new Exception_1.default(err.message));
|
|
43
|
-
for (let c in fields)
|
|
44
|
-
result.push({
|
|
45
|
-
Name: c,
|
|
46
|
-
Type: AbstractMultiPartRequestService_1.PartType.TEXT,
|
|
47
|
-
Content: fields[c] ? fields[c].toString() : ""
|
|
48
|
-
});
|
|
49
|
-
for (let c in files) {
|
|
50
|
-
if (files[c].filepath == undefined) {
|
|
51
|
-
result.push({
|
|
52
|
-
Name: c,
|
|
53
|
-
Type: AbstractMultiPartRequestService_1.PartType.FILE,
|
|
54
|
-
Content: files[c][0].filepath,
|
|
55
|
-
Filename: files[c][0].originalFilename,
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
result.push({
|
|
60
|
-
Name: c,
|
|
61
|
-
Type: AbstractMultiPartRequestService_1.PartType.FILE,
|
|
62
|
-
Content: files[c].filepath,
|
|
63
|
-
Filename: files[c].originalFilename,
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return resolve(result);
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
exports.default = FormidableMultiPartRequestService;
|
|
73
|
-
//# sourceMappingURL=FormidableMultiPartRequestService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormidableMultiPartRequestService.js","sourceRoot":"","sources":["../../file/FormidableMultiPartRequestService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAAoC;AAEpC,qGAA8H;AAC9H,wEAAgD;AAEhD,MAAqB,iCAAkC,SAAQ,yCAA+B;IAGnF,wBAAwB,CAAC,OAAY,EAAE,OAA2B;QAErE,IAAI,WAAW,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AC,IAAI,CACP;4BACI,IAAI,EAAG,CAAC;4BACR,IAAI,EAAG,0CAAQ,CAAC,IAAI;4BACpB,OAAO,EAAG,KAAK,CAAC,CAAC,CAAS,CAAC,QAAQ;4BACnC,QAAQ,EAAG,KAAK,CAAC,CAAC,CAAS,CAAC,gBAAgB;yBAC/C,CAAC,CAAC;oBACX,CAAC;gBAEL,CAAC;gBAID,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;YAC3B,CAAC,CAAC,CAAC;QAEP,CAAC,CAAC,CAAC;IACP,CAAC;CAEJ;AA5DD,oDA4DC"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import 'reflect-metadata';
|
|
2
|
-
export { default as Application } from "./Application";
|
|
3
|
-
export { default as ApplicationConfiguration } from "./ApplicationConfiguration";
|
|
4
|
-
export { default as ControllersDecorators } from "./decorators/controllers/ControllerDecorators";
|
|
5
|
-
export { ControllerBase } from "./controllers/base/ControllerBase";
|
|
6
|
-
export { HTTPVerbs } from './enums/httpVerbs/HttpVerbs';
|
|
7
|
-
export { default as Exception } from './exceptions/Exception';
|
|
8
|
-
import FileService from './file/FileService';
|
|
9
|
-
import AbstractFileService from './file/AbstractFileService';
|
|
10
|
-
export { FileService, AbstractFileService };
|
|
11
|
-
export { default as File } from './file/File';
|
|
12
|
-
export { default as DependecyService } from "./dependencyInjection/DependecyService";
|
|
13
|
-
export { default as IMidleware } from './midlewares/IMidleware';
|
|
14
|
-
export { default as IApplicationConfiguration } from "./interfaces/IApplicationConfiguration";
|
|
15
|
-
export { default as IApplication } from "./interfaces/IApplication";
|
|
16
|
-
export { default as IApplicatiIControllernConfiguration } from "./interfaces/IController";
|
|
17
|
-
export { IHTTPRequestContext, IRequestResult, IRequestResultHandler } from "./midlewares/IMidleware";
|
|
18
|
-
export { default as ActionResult } from './controllers/ActionResult';
|
|
19
|
-
export { default as AcceptedResult } from './controllers/AcceptedResult';
|
|
20
|
-
export { default as BadRequestResult } from './controllers/BadRequestResult';
|
|
21
|
-
export { default as CreatedResult } from './controllers/CreatedResult';
|
|
22
|
-
export { default as ErrorResult } from './controllers/ErrorResult';
|
|
23
|
-
export { default as ForbiddenResult } from './controllers/ForbiddenResult';
|
|
24
|
-
export { default as GenericResult } from './controllers/GenericResult';
|
|
25
|
-
export { default as NoContentResult } from './controllers/NoContentResult';
|
|
26
|
-
export { default as NotFoundResult } from './controllers/NotFoundResult';
|
|
27
|
-
export { default as OKResult } from './controllers/OKResult';
|
|
28
|
-
export { default as UnauthorizedResult } from './controllers/UnauthorizedResult';
|
|
29
|
-
import { DocumentationDecorators } from "./decorators/documentation/DocumentationDecorators";
|
|
30
|
-
import { HTTPVerbs } from "./enums/httpVerbs/HttpVerbs";
|
|
31
|
-
import IMidleware, { IRequestResultHandler } from "./midlewares/IMidleware";
|
|
32
|
-
export { default as BodyParseException } from "./exceptions/BodyParseException";
|
|
33
|
-
export { default as ControllerLoadException } from "./exceptions/ControllerLoadException";
|
|
34
|
-
export { default as ArgumentNullException } from "./exceptions/ArgumentNullException";
|
|
35
|
-
export { default as FindDependencyException } from "./exceptions/FindDependencyException";
|
|
36
|
-
export { default as DecoratorException } from "./exceptions/DecoratorException";
|
|
37
|
-
export { default as InvalidEntityException } from "./exceptions/InvalidEntityException";
|
|
38
|
-
export { default as FileNotFoundException } from "./exceptions/FileNotFoundException";
|
|
39
|
-
export declare function UseBefore(midleware: IMidleware): (target: Function) => void;
|
|
40
|
-
export declare function RunBefore(midleware: IMidleware): (target: Object, methodName: string, propertyDescriptor: PropertyDescriptor) => void;
|
|
41
|
-
export declare function UseAfter(resultHandler: IRequestResultHandler): (target: Function) => void;
|
|
42
|
-
export declare function RunAfter(resultHandler: IRequestResultHandler): (target: Object, methodName: string, propertyDescriptor: PropertyDescriptor) => void;
|
|
43
|
-
export declare function Action(actionName?: String): (target: Object, methodName: string, propertyDescriptor: PropertyDescriptor) => void;
|
|
44
|
-
export declare function Route(route?: string): (target: Function) => void;
|
|
45
|
-
export declare function GET(action?: string): (target: Object, methodName: string, propertyDescriptor: PropertyDescriptor) => void;
|
|
46
|
-
export declare function POST(action?: string): (target: Object, methodName: string, propertyDescriptor: PropertyDescriptor) => void;
|
|
47
|
-
export declare function PUT(action?: string): (target: Object, methodName: string, propertyDescriptor: PropertyDescriptor) => void;
|
|
48
|
-
export declare function DELETE(action?: string): (target: Object, methodName: string, propertyDescriptor: PropertyDescriptor) => void;
|
|
49
|
-
export declare function ControllerHeader(header: string): (target: Object) => void;
|
|
50
|
-
export declare function ActionHeader(header: string): (target: Object, method: string, propertyDescriptor: PropertyDescriptor) => void;
|
|
51
|
-
export declare function Description(description: string): (target: Object, methodName: string, propertyDescriptor: PropertyDescriptor) => void;
|
|
52
|
-
export declare function RequestJson(json: string): (target: Object, methodName: string, propertyDescriptor: PropertyDescriptor) => void;
|
|
53
|
-
export declare function ProducesResponse(response: Parameters<typeof DocumentationDecorators.ProducesResponse>[0]): (target: Object, methodName: string, propertyDescriptor: PropertyDescriptor) => void;
|
|
54
|
-
export declare function Verb(verb: HTTPVerbs): (target: Object, methodName: string, propertyDescriptor: PropertyDescriptor) => void;
|
|
55
|
-
export declare function Inject(): (target: Object, property: string | symbol) => void;
|
|
56
|
-
export declare function InjectAbstract(cTor: Function): (target: Object, property: string | symbol) => void;
|
|
57
|
-
export declare function Validate(): (target: Function) => void;
|
|
58
|
-
export declare function ValidateObject<T>(obj: T): {
|
|
59
|
-
Field: string;
|
|
60
|
-
Message: string;
|
|
61
|
-
}[];
|
|
62
|
-
export declare function Required(message?: string): (target: Object, property: string) => void;
|
|
63
|
-
export declare function MaxLenght(max: number, message?: string): (target: Object, property: string) => void;
|
|
64
|
-
export declare function MinLenght(min: number, message?: string): (target: Object, property: string) => void;
|
|
65
|
-
export declare function Max(max: number, message?: string): (target: Object, property: string) => void;
|
|
66
|
-
export declare function Min(min: number, message?: string): (target: Object, property: string) => void;
|
|
67
|
-
export declare function Regex(regex: RegExp, message?: string): (target: Object, property: string) => void;
|
|
68
|
-
export declare function Rule<T>(action: (a: T) => boolean, message?: string): (target: Object, property: string) => void;
|
|
69
|
-
export declare function RequiredFromBodyArg(paramName?: string): (target: Object, methodName: string, parameterIndex: number) => void;
|
|
70
|
-
export declare function OptionalFromBodyArg(paramName?: string): (target: Object, methodName: string, parameterIndex: number) => void;
|
|
71
|
-
export declare function FromBody(paramName?: string, required?: boolean): (target: Object, methodName: string, parameterIndex: number) => void;
|
|
72
|
-
export declare function FromFiles(fileName?: string, required?: boolean): (target: Object, methodName: string, parameterIndex: number) => void;
|
|
73
|
-
export declare function MaxFilesSize(bytes: number): (target: Function) => void;
|
|
74
|
-
export declare function RequiredFromQueryArg(paramName?: string): (target: Object, methodName: string, parameterIndex: number) => void;
|
|
75
|
-
export declare function OptionalFromQueryArg(paramName?: string): (target: Object, methodName: string, parameterIndex: number) => void;
|
|
76
|
-
export declare function FromQuery(paramName?: string, required?: boolean): (target: Object, methodName: string, parameterIndex: number) => void;
|
package/dist/index.js
DELETED
|
@@ -1,225 +0,0 @@
|
|
|
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.FileNotFoundException = exports.InvalidEntityException = exports.DecoratorException = exports.FindDependencyException = exports.ArgumentNullException = exports.ControllerLoadException = exports.BodyParseException = exports.UnauthorizedResult = exports.OKResult = exports.NotFoundResult = exports.NoContentResult = exports.GenericResult = exports.ForbiddenResult = exports.ErrorResult = exports.CreatedResult = exports.BadRequestResult = exports.AcceptedResult = exports.ActionResult = exports.DependecyService = exports.File = exports.AbstractFileService = exports.FileService = exports.Exception = exports.HTTPVerbs = exports.ControllerBase = exports.ControllersDecorators = exports.ApplicationConfiguration = exports.Application = void 0;
|
|
7
|
-
exports.UseBefore = UseBefore;
|
|
8
|
-
exports.RunBefore = RunBefore;
|
|
9
|
-
exports.UseAfter = UseAfter;
|
|
10
|
-
exports.RunAfter = RunAfter;
|
|
11
|
-
exports.Action = Action;
|
|
12
|
-
exports.Route = Route;
|
|
13
|
-
exports.GET = GET;
|
|
14
|
-
exports.POST = POST;
|
|
15
|
-
exports.PUT = PUT;
|
|
16
|
-
exports.DELETE = DELETE;
|
|
17
|
-
exports.ControllerHeader = ControllerHeader;
|
|
18
|
-
exports.ActionHeader = ActionHeader;
|
|
19
|
-
exports.Description = Description;
|
|
20
|
-
exports.RequestJson = RequestJson;
|
|
21
|
-
exports.ProducesResponse = ProducesResponse;
|
|
22
|
-
exports.Verb = Verb;
|
|
23
|
-
exports.Inject = Inject;
|
|
24
|
-
exports.InjectAbstract = InjectAbstract;
|
|
25
|
-
exports.Validate = Validate;
|
|
26
|
-
exports.ValidateObject = ValidateObject;
|
|
27
|
-
exports.Required = Required;
|
|
28
|
-
exports.MaxLenght = MaxLenght;
|
|
29
|
-
exports.MinLenght = MinLenght;
|
|
30
|
-
exports.Max = Max;
|
|
31
|
-
exports.Min = Min;
|
|
32
|
-
exports.Regex = Regex;
|
|
33
|
-
exports.Rule = Rule;
|
|
34
|
-
exports.RequiredFromBodyArg = RequiredFromBodyArg;
|
|
35
|
-
exports.OptionalFromBodyArg = OptionalFromBodyArg;
|
|
36
|
-
exports.FromBody = FromBody;
|
|
37
|
-
exports.FromFiles = FromFiles;
|
|
38
|
-
exports.MaxFilesSize = MaxFilesSize;
|
|
39
|
-
exports.RequiredFromQueryArg = RequiredFromQueryArg;
|
|
40
|
-
exports.OptionalFromQueryArg = OptionalFromQueryArg;
|
|
41
|
-
exports.FromQuery = FromQuery;
|
|
42
|
-
require("reflect-metadata");
|
|
43
|
-
var Application_1 = require("./Application");
|
|
44
|
-
Object.defineProperty(exports, "Application", { enumerable: true, get: function () { return __importDefault(Application_1).default; } });
|
|
45
|
-
var ApplicationConfiguration_1 = require("./ApplicationConfiguration");
|
|
46
|
-
Object.defineProperty(exports, "ApplicationConfiguration", { enumerable: true, get: function () { return __importDefault(ApplicationConfiguration_1).default; } });
|
|
47
|
-
var ControllerDecorators_1 = require("./decorators/controllers/ControllerDecorators");
|
|
48
|
-
Object.defineProperty(exports, "ControllersDecorators", { enumerable: true, get: function () { return __importDefault(ControllerDecorators_1).default; } });
|
|
49
|
-
var ControllerBase_1 = require("./controllers/base/ControllerBase");
|
|
50
|
-
Object.defineProperty(exports, "ControllerBase", { enumerable: true, get: function () { return ControllerBase_1.ControllerBase; } });
|
|
51
|
-
var HttpVerbs_1 = require("./enums/httpVerbs/HttpVerbs");
|
|
52
|
-
Object.defineProperty(exports, "HTTPVerbs", { enumerable: true, get: function () { return HttpVerbs_1.HTTPVerbs; } });
|
|
53
|
-
var Exception_1 = require("./exceptions/Exception");
|
|
54
|
-
Object.defineProperty(exports, "Exception", { enumerable: true, get: function () { return __importDefault(Exception_1).default; } });
|
|
55
|
-
const FileService_1 = __importDefault(require("./file/FileService"));
|
|
56
|
-
exports.FileService = FileService_1.default;
|
|
57
|
-
const AbstractFileService_1 = __importDefault(require("./file/AbstractFileService"));
|
|
58
|
-
exports.AbstractFileService = AbstractFileService_1.default;
|
|
59
|
-
var File_1 = require("./file/File");
|
|
60
|
-
Object.defineProperty(exports, "File", { enumerable: true, get: function () { return __importDefault(File_1).default; } });
|
|
61
|
-
var DependecyService_1 = require("./dependencyInjection/DependecyService");
|
|
62
|
-
Object.defineProperty(exports, "DependecyService", { enumerable: true, get: function () { return __importDefault(DependecyService_1).default; } });
|
|
63
|
-
var ActionResult_1 = require("./controllers/ActionResult");
|
|
64
|
-
Object.defineProperty(exports, "ActionResult", { enumerable: true, get: function () { return __importDefault(ActionResult_1).default; } });
|
|
65
|
-
var AcceptedResult_1 = require("./controllers/AcceptedResult");
|
|
66
|
-
Object.defineProperty(exports, "AcceptedResult", { enumerable: true, get: function () { return __importDefault(AcceptedResult_1).default; } });
|
|
67
|
-
var BadRequestResult_1 = require("./controllers/BadRequestResult");
|
|
68
|
-
Object.defineProperty(exports, "BadRequestResult", { enumerable: true, get: function () { return __importDefault(BadRequestResult_1).default; } });
|
|
69
|
-
var CreatedResult_1 = require("./controllers/CreatedResult");
|
|
70
|
-
Object.defineProperty(exports, "CreatedResult", { enumerable: true, get: function () { return __importDefault(CreatedResult_1).default; } });
|
|
71
|
-
var ErrorResult_1 = require("./controllers/ErrorResult");
|
|
72
|
-
Object.defineProperty(exports, "ErrorResult", { enumerable: true, get: function () { return __importDefault(ErrorResult_1).default; } });
|
|
73
|
-
var ForbiddenResult_1 = require("./controllers/ForbiddenResult");
|
|
74
|
-
Object.defineProperty(exports, "ForbiddenResult", { enumerable: true, get: function () { return __importDefault(ForbiddenResult_1).default; } });
|
|
75
|
-
var GenericResult_1 = require("./controllers/GenericResult");
|
|
76
|
-
Object.defineProperty(exports, "GenericResult", { enumerable: true, get: function () { return __importDefault(GenericResult_1).default; } });
|
|
77
|
-
var NoContentResult_1 = require("./controllers/NoContentResult");
|
|
78
|
-
Object.defineProperty(exports, "NoContentResult", { enumerable: true, get: function () { return __importDefault(NoContentResult_1).default; } });
|
|
79
|
-
var NotFoundResult_1 = require("./controllers/NotFoundResult");
|
|
80
|
-
Object.defineProperty(exports, "NotFoundResult", { enumerable: true, get: function () { return __importDefault(NotFoundResult_1).default; } });
|
|
81
|
-
var OKResult_1 = require("./controllers/OKResult");
|
|
82
|
-
Object.defineProperty(exports, "OKResult", { enumerable: true, get: function () { return __importDefault(OKResult_1).default; } });
|
|
83
|
-
var UnauthorizedResult_1 = require("./controllers/UnauthorizedResult");
|
|
84
|
-
Object.defineProperty(exports, "UnauthorizedResult", { enumerable: true, get: function () { return __importDefault(UnauthorizedResult_1).default; } });
|
|
85
|
-
const ControllerDecorators_2 = __importDefault(require("./decorators/controllers/ControllerDecorators"));
|
|
86
|
-
const DocumentationDecorators_1 = require("./decorators/documentation/DocumentationDecorators");
|
|
87
|
-
const ValidationDecorators_1 = __importDefault(require("./decorators/validations/ValidationDecorators"));
|
|
88
|
-
const DependecyService_2 = __importDefault(require("./dependencyInjection/DependecyService"));
|
|
89
|
-
const HttpVerbs_2 = require("./enums/httpVerbs/HttpVerbs");
|
|
90
|
-
var BodyParseException_1 = require("./exceptions/BodyParseException");
|
|
91
|
-
Object.defineProperty(exports, "BodyParseException", { enumerable: true, get: function () { return __importDefault(BodyParseException_1).default; } });
|
|
92
|
-
var ControllerLoadException_1 = require("./exceptions/ControllerLoadException");
|
|
93
|
-
Object.defineProperty(exports, "ControllerLoadException", { enumerable: true, get: function () { return __importDefault(ControllerLoadException_1).default; } });
|
|
94
|
-
var ArgumentNullException_1 = require("./exceptions/ArgumentNullException");
|
|
95
|
-
Object.defineProperty(exports, "ArgumentNullException", { enumerable: true, get: function () { return __importDefault(ArgumentNullException_1).default; } });
|
|
96
|
-
var FindDependencyException_1 = require("./exceptions/FindDependencyException");
|
|
97
|
-
Object.defineProperty(exports, "FindDependencyException", { enumerable: true, get: function () { return __importDefault(FindDependencyException_1).default; } });
|
|
98
|
-
var DecoratorException_1 = require("./exceptions/DecoratorException");
|
|
99
|
-
Object.defineProperty(exports, "DecoratorException", { enumerable: true, get: function () { return __importDefault(DecoratorException_1).default; } });
|
|
100
|
-
var InvalidEntityException_1 = require("./exceptions/InvalidEntityException");
|
|
101
|
-
Object.defineProperty(exports, "InvalidEntityException", { enumerable: true, get: function () { return __importDefault(InvalidEntityException_1).default; } });
|
|
102
|
-
var FileNotFoundException_1 = require("./exceptions/FileNotFoundException");
|
|
103
|
-
Object.defineProperty(exports, "FileNotFoundException", { enumerable: true, get: function () { return __importDefault(FileNotFoundException_1).default; } });
|
|
104
|
-
function UseBefore(midleware) {
|
|
105
|
-
return ControllerDecorators_2.default.UseBefore(midleware);
|
|
106
|
-
}
|
|
107
|
-
;
|
|
108
|
-
function RunBefore(midleware) {
|
|
109
|
-
return ControllerDecorators_2.default.RunBefore(midleware);
|
|
110
|
-
}
|
|
111
|
-
;
|
|
112
|
-
function UseAfter(resultHandler) {
|
|
113
|
-
return ControllerDecorators_2.default.UseAfter(resultHandler);
|
|
114
|
-
}
|
|
115
|
-
;
|
|
116
|
-
function RunAfter(resultHandler) {
|
|
117
|
-
return ControllerDecorators_2.default.RunAfter(resultHandler);
|
|
118
|
-
}
|
|
119
|
-
;
|
|
120
|
-
function Action(actionName) {
|
|
121
|
-
return ControllerDecorators_2.default.Action(actionName);
|
|
122
|
-
}
|
|
123
|
-
;
|
|
124
|
-
function Route(route) {
|
|
125
|
-
return ControllerDecorators_2.default.Route(route);
|
|
126
|
-
}
|
|
127
|
-
;
|
|
128
|
-
function GET(action) {
|
|
129
|
-
return ControllerDecorators_2.default.Verb(HttpVerbs_2.HTTPVerbs.GET, action);
|
|
130
|
-
}
|
|
131
|
-
;
|
|
132
|
-
function POST(action) {
|
|
133
|
-
return ControllerDecorators_2.default.Verb(HttpVerbs_2.HTTPVerbs.POST, action);
|
|
134
|
-
}
|
|
135
|
-
;
|
|
136
|
-
function PUT(action) {
|
|
137
|
-
return ControllerDecorators_2.default.Verb(HttpVerbs_2.HTTPVerbs.PUT, action);
|
|
138
|
-
}
|
|
139
|
-
;
|
|
140
|
-
function DELETE(action) {
|
|
141
|
-
return ControllerDecorators_2.default.Verb(HttpVerbs_2.HTTPVerbs.DELETE, action);
|
|
142
|
-
}
|
|
143
|
-
;
|
|
144
|
-
function ControllerHeader(header) {
|
|
145
|
-
return DocumentationDecorators_1.DocumentationDecorators.ControllerHeader(header);
|
|
146
|
-
}
|
|
147
|
-
;
|
|
148
|
-
function ActionHeader(header) {
|
|
149
|
-
return DocumentationDecorators_1.DocumentationDecorators.ActionHeader(header);
|
|
150
|
-
}
|
|
151
|
-
;
|
|
152
|
-
function Description(description) {
|
|
153
|
-
return DocumentationDecorators_1.DocumentationDecorators.Description(description);
|
|
154
|
-
}
|
|
155
|
-
;
|
|
156
|
-
function RequestJson(json) {
|
|
157
|
-
return DocumentationDecorators_1.DocumentationDecorators.RequestJson(json);
|
|
158
|
-
}
|
|
159
|
-
;
|
|
160
|
-
function ProducesResponse(response) {
|
|
161
|
-
return DocumentationDecorators_1.DocumentationDecorators.ProducesResponse(response);
|
|
162
|
-
}
|
|
163
|
-
;
|
|
164
|
-
function Verb(verb) {
|
|
165
|
-
return ControllerDecorators_2.default.Verb(verb);
|
|
166
|
-
}
|
|
167
|
-
;
|
|
168
|
-
function Inject() {
|
|
169
|
-
return DependecyService_2.default.Injectable();
|
|
170
|
-
}
|
|
171
|
-
function InjectAbstract(cTor) {
|
|
172
|
-
return DependecyService_2.default.InjectOne(cTor);
|
|
173
|
-
}
|
|
174
|
-
function Validate() {
|
|
175
|
-
return ControllerDecorators_2.default.Validate();
|
|
176
|
-
}
|
|
177
|
-
function ValidateObject(obj) {
|
|
178
|
-
return ValidationDecorators_1.default.Validate(obj);
|
|
179
|
-
}
|
|
180
|
-
function Required(message) {
|
|
181
|
-
return ValidationDecorators_1.default.Required(message);
|
|
182
|
-
}
|
|
183
|
-
function MaxLenght(max, message) {
|
|
184
|
-
return ValidationDecorators_1.default.MaxLenght(max, message);
|
|
185
|
-
}
|
|
186
|
-
function MinLenght(min, message) {
|
|
187
|
-
return ValidationDecorators_1.default.MinLenght(min, message);
|
|
188
|
-
}
|
|
189
|
-
function Max(max, message) {
|
|
190
|
-
return ValidationDecorators_1.default.MaxValue(max, message);
|
|
191
|
-
}
|
|
192
|
-
function Min(min, message) {
|
|
193
|
-
return ValidationDecorators_1.default.MinValue(min, message);
|
|
194
|
-
}
|
|
195
|
-
function Regex(regex, message) {
|
|
196
|
-
return ValidationDecorators_1.default.Regex(regex, message);
|
|
197
|
-
}
|
|
198
|
-
function Rule(action, message) {
|
|
199
|
-
return ValidationDecorators_1.default.Rule(action, message);
|
|
200
|
-
}
|
|
201
|
-
function RequiredFromBodyArg(paramName) {
|
|
202
|
-
return ControllerDecorators_2.default.RequiredFromBodyArg(paramName);
|
|
203
|
-
}
|
|
204
|
-
function OptionalFromBodyArg(paramName) {
|
|
205
|
-
return ControllerDecorators_2.default.OptionalFromBodyArg(paramName);
|
|
206
|
-
}
|
|
207
|
-
function FromBody(paramName, required) {
|
|
208
|
-
return ControllerDecorators_2.default.FromBody(paramName, required);
|
|
209
|
-
}
|
|
210
|
-
function FromFiles(fileName, required) {
|
|
211
|
-
return ControllerDecorators_2.default.FromFiles(fileName, required);
|
|
212
|
-
}
|
|
213
|
-
function MaxFilesSize(bytes) {
|
|
214
|
-
return ControllerDecorators_2.default.MaxFilesSize(bytes);
|
|
215
|
-
}
|
|
216
|
-
function RequiredFromQueryArg(paramName) {
|
|
217
|
-
return ControllerDecorators_2.default.RequiredFromQueryArg(paramName);
|
|
218
|
-
}
|
|
219
|
-
function OptionalFromQueryArg(paramName) {
|
|
220
|
-
return ControllerDecorators_2.default.OptionalFromQueryArg(paramName);
|
|
221
|
-
}
|
|
222
|
-
function FromQuery(paramName, required) {
|
|
223
|
-
return ControllerDecorators_2.default.FromQuery(paramName, required);
|
|
224
|
-
}
|
|
225
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;AAyDA,8BAGC;AAED,8BAGC;AAED,4BAGC;AAED,4BAGC;AAGD,wBAGC;AAED,sBAGC;AAED,kBAGC;AAED,oBAGC;AAED,kBAGC;AAED,wBAGC;AAGD,4CAGC;AAGD,oCAGC;AAED,kCAGC;AAED,kCAGC;AAGD,4CAGC;AAKD,oBAGC;AAED,wBAGC;AAED,wCAGC;AAED,4BAGC;AAED,wCAGC;AAED,4BAGC;AAED,8BAGC;AAED,8BAGC;AAED,kBAGC;AAED,kBAGC;AAED,sBAGC;AAED,oBAGC;AAED,kDAGC;AAGD,kDAGC;AAED,4BAGC;AAED,8BAGC;AAED,oCAGC;AAED,oDAGC;AAED,oDAGC;AAGD,8BAGC;AA/OD,4BAA0B;AAE1B,6CAAsD;AAA7C,2HAAA,OAAO,OAAe;AAC/B,uEAAiF;AAAx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AED,SAAgB,oBAAoB,CAAC,SAAmB;IAEpD,OAAO,8BAAqB,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;AACjE,CAAC;AAED,SAAgB,oBAAoB,CAAC,SAAmB;IAEpD,OAAO,8BAAqB,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;AACjE,CAAC;AAGD,SAAgB,SAAS,CAAC,SAAmB,EAAE,QAAmB;IAE9D,OAAO,8BAAqB,CAAC,SAAS,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Express, Request, Response } from "express";
|
|
2
|
-
import IApplicationConfiguration from './IApplicationConfiguration';
|
|
3
|
-
import Exception from "../exceptions/Exception";
|
|
4
|
-
export default interface IApplication {
|
|
5
|
-
Express: Express;
|
|
6
|
-
ApplicationThreadExeptionHandler?: ApplicationExceptionHandler;
|
|
7
|
-
StartAsync(): Promise<void>;
|
|
8
|
-
ConfigureAsync(appConfig: IApplicationConfiguration): Promise<void>;
|
|
9
|
-
CreateDocumentation(): void;
|
|
10
|
-
}
|
|
11
|
-
export interface ApplicationExceptionHandler {
|
|
12
|
-
(request: Request, response: Response, exception: Exception): void;
|
|
13
|
-
}
|
|
14
|
-
export { Express as ExpressApp } from 'express';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IApplication.js","sourceRoot":"","sources":["../../interfaces/IApplication.ts"],"names":[],"mappings":""}
|