web_api_base 2.5.3 → 2.6.0
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/Application.js +3 -0
- package/dist/Application.js.map +1 -1
- package/dist/dependencyInjection/DependecyService.d.ts +9 -0
- package/dist/dependencyInjection/DependecyService.js +55 -2
- package/dist/dependencyInjection/DependecyService.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/{Index.js → index.js} +10 -1
- package/dist/index.js.map +1 -0
- package/dist/jest.config.js +5 -1
- package/dist/jest.config.js.map +1 -1
- package/package.json +37 -41
- package/readme.md +92 -33
- package/dist/App.js +0 -32
- package/dist/App.js.map +0 -1
- package/dist/Configuration.js +0 -69
- package/dist/Configuration.js.map +0 -1
- package/dist/Index.js.map +0 -1
- package/dist/__tests__/classes/Controller.d.ts +0 -8
- package/dist/__tests__/classes/Controller.js +0 -54
- package/dist/__tests__/classes/Controller.js.map +0 -1
- package/dist/__tests__/decorators/controllers/ControllerDecorators.spec.d.ts +0 -1
- package/dist/__tests__/decorators/controllers/ControllerDecorators.spec.js +0 -40
- package/dist/__tests__/decorators/controllers/ControllerDecorators.spec.js.map +0 -1
- package/dist/bin/create-webapi-app.d.ts +0 -1
- package/dist/bin/create-webapi-app.js +0 -4
- package/dist/bin/create-webapi-app.js.map +0 -1
- package/dist/config.json +0 -1
- package/dist/controllers/FileController.js +0 -162
- package/dist/controllers/FileController.js.map +0 -1
- package/dist/controllers/StatusController.js +0 -44
- package/dist/controllers/StatusController.js.map +0 -1
- package/dist/interfaces/entities/IDirectory.d.ts +0 -5
- package/dist/interfaces/entities/IDirectory.js +0 -3
- package/dist/interfaces/entities/IDirectory.js.map +0 -1
- package/dist/services/FileService.js +0 -45
- package/dist/services/FileService.js.map +0 -1
- package/dist/services/IFileService.js +0 -8
- package/dist/services/IFileService.js.map +0 -1
- package/dist/services/fileService/FileService.d.ts +0 -10
- package/dist/services/fileService/FileService.js +0 -96
- package/dist/services/fileService/FileService.js.map +0 -1
- package/dist/services/fileService/FileServiceBase.d.ts +0 -10
- package/dist/services/fileService/FileServiceBase.js +0 -7
- package/dist/services/fileService/FileServiceBase.js.map +0 -1
- package/dist/temp/Application.d.ts +0 -6
- package/dist/temp/Application.js +0 -33
- package/dist/temp/Application.js.map +0 -1
- package/dist/temp/Index.d.ts +0 -1
- package/dist/temp/Index.js +0 -8
- package/dist/temp/Index.js.map +0 -1
- package/dist/temp/controllers/StatusController.d.ts +0 -5
- package/dist/temp/controllers/StatusController.js +0 -33
- package/dist/temp/controllers/StatusController.js.map +0 -1
|
@@ -1,40 +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
|
-
const Controller_1 = require("../../classes/Controller");
|
|
7
|
-
const ControllerDecorators_1 = __importDefault(require("../../../decorators/controllers/ControllerDecorators"));
|
|
8
|
-
const HttpVerbs_1 = require("../../../enums/httpVerbs/HttpVerbs");
|
|
9
|
-
describe('testing controllers decorators', () => {
|
|
10
|
-
test("action name", () => {
|
|
11
|
-
var controller = new Controller_1.ControllerTest();
|
|
12
|
-
let action = ControllerDecorators_1.default.GetAction(controller, "TestAction");
|
|
13
|
-
expect(action).toBe("Test");
|
|
14
|
-
}, 10 ^ 5);
|
|
15
|
-
test("http verb", () => {
|
|
16
|
-
var controller = new Controller_1.ControllerTest();
|
|
17
|
-
let verb = ControllerDecorators_1.default.GetVerb(controller, "TestAction");
|
|
18
|
-
expect(verb).toBe(HttpVerbs_1.HTTPVerbs.GET);
|
|
19
|
-
}, 10 ^ 5);
|
|
20
|
-
test("action with one arg", () => {
|
|
21
|
-
var controller = new Controller_1.ControllerTest();
|
|
22
|
-
var handler = ControllerDecorators_1.default.GetArgumentsHandler(controller, 'TestAction');
|
|
23
|
-
var arr = handler === null || handler === void 0 ? void 0 : handler.CreateArgumentsList({ name: "adriano" });
|
|
24
|
-
Reflect.apply(controller.TestAction, controller, arr !== null && arr !== void 0 ? arr : []);
|
|
25
|
-
expect(arr).not.toBeNull();
|
|
26
|
-
}, 10 ^ 5);
|
|
27
|
-
test("action with two args", () => {
|
|
28
|
-
var controller = new Controller_1.ControllerTest();
|
|
29
|
-
var handler = ControllerDecorators_1.default.GetArgumentsHandler(controller, 'TestActionTwo');
|
|
30
|
-
var arr = handler === null || handler === void 0 ? void 0 : handler.CreateArgumentsList({ name: "adriano", age: 30 });
|
|
31
|
-
Reflect.apply(controller.TestActionTwo, controller, arr !== null && arr !== void 0 ? arr : []);
|
|
32
|
-
expect(arr).not.toBeNull();
|
|
33
|
-
}, 10 ^ 5);
|
|
34
|
-
test("controller route", () => {
|
|
35
|
-
var controller = new Controller_1.ControllerTest();
|
|
36
|
-
var route = ControllerDecorators_1.default.GetRoute(controller);
|
|
37
|
-
expect(route).toBe("/test");
|
|
38
|
-
}, 10 ^ 5);
|
|
39
|
-
});
|
|
40
|
-
//# sourceMappingURL=ControllerDecorators.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ControllerDecorators.spec.js","sourceRoot":"","sources":["../../../../__tests__/decorators/controllers/ControllerDecorators.spec.ts"],"names":[],"mappings":";;;;;AAAA,yDAA0D;AAC1D,gHAAyF;AACzF,kEAA+D;AAE/D,QAAQ,CAAC,gCAAgC,EAAE,GAAE,EAAE;IAG3C,IAAI,CAAC,aAAa,EAAE,GAAE,EAAE;QAEpB,IAAI,UAAU,GAAG,IAAI,2BAAc,EAAE,CAAC;QACtC,IAAI,MAAM,GAAG,8BAAqB,CAAC,SAAS,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;QACvE,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAEhC,CAAC,EAAC,EAAE,GAAC,CAAC,CAAC,CAAA;IAEP,IAAI,CAA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GAAG,GAAI,EAAE,CAAC,CAAC;QAE/D,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IAG/B,CAAC,EAAC,EAAE,GAAC,CAAC,CAAC,CAAA;IAGP,IAAI,CAAC,kBAAkB,EAAE,GAAE,EAAE;QAEzB,IAAI,UAAU,GAAG,IAAI,2BAAc,EAAE,CAAC;QAEtC,IAAI,KAAK,GAAG,8BAAqB,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAEvD,MAAM,CAAC,KAAM,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAGjC,CAAC,EAAC,EAAE,GAAC,CAAC,CAAC,CAAA;AAEX,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-webapi-app.js","sourceRoot":"","sources":["../../bin/create-webapi-app.ts"],"names":[],"mappings":";;AAEA,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC"}
|
package/dist/config.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"Host":"0.0.0.0","Port":5555}
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
21
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
22
|
-
};
|
|
23
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.FileController = void 0;
|
|
25
|
-
const ControllerDecorators_1 = __importDefault(require("../decorators/controllers/ControllerDecorators"));
|
|
26
|
-
const ControllerBase_1 = require("./base/ControllerBase");
|
|
27
|
-
const HttpVerbs_1 = require("../enums/httpVerbs/HttpVerbs");
|
|
28
|
-
const FileServiceBase_1 = __importDefault(require("../services/fileService/FileServiceBase"));
|
|
29
|
-
const path_1 = __importDefault(require("path"));
|
|
30
|
-
const formidable_1 = __importDefault(require("formidable"));
|
|
31
|
-
let FileController = class FileController extends ControllerBase_1.ControllerBase {
|
|
32
|
-
constructor(_fileService) {
|
|
33
|
-
super();
|
|
34
|
-
this._fileService = _fileService;
|
|
35
|
-
}
|
|
36
|
-
GetDefaultDir() {
|
|
37
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
try {
|
|
39
|
-
this.OK(yield this._fileService.GetDefaultDir());
|
|
40
|
-
}
|
|
41
|
-
catch (err) {
|
|
42
|
-
this.Error({ error: err.message });
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
GetAllFiles(folder) {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
try {
|
|
49
|
-
this.OK(yield this._fileService.GetAllFiles(folder));
|
|
50
|
-
}
|
|
51
|
-
catch (err) {
|
|
52
|
-
this.Error({ error: err.message });
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
GetAllFolders(folder) {
|
|
57
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
try {
|
|
59
|
-
this.OK(yield this._fileService.GetAllForders(folder));
|
|
60
|
-
}
|
|
61
|
-
catch (err) {
|
|
62
|
-
this.Error({ error: err.message });
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
DownloadFile(file) {
|
|
67
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
try {
|
|
69
|
-
if (!(yield this._fileService.FileExists(file)))
|
|
70
|
-
return this.BadRequest({ error: `The file ${file} not exists` });
|
|
71
|
-
this.Response.download(file);
|
|
72
|
-
}
|
|
73
|
-
catch (err) {
|
|
74
|
-
this.Error({ error: err.message });
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
UploadFile(folder, filename) {
|
|
79
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
-
if (!filename)
|
|
81
|
-
return this.Error({ error: `The file´s name is required` });
|
|
82
|
-
if (!(yield this._fileService.DirectoryExists(folder)))
|
|
83
|
-
return this.Error({ error: `The folder ${folder} not exists` });
|
|
84
|
-
try {
|
|
85
|
-
(0, formidable_1.default)({ multiples: false }).parse(this.Request, (err, _, incomming) => __awaiter(this, void 0, void 0, function* () {
|
|
86
|
-
if (err)
|
|
87
|
-
return this.Error(err);
|
|
88
|
-
try {
|
|
89
|
-
let temp = incomming.file.filepath;
|
|
90
|
-
let newfile = path_1.default.join(folder, filename);
|
|
91
|
-
yield this._fileService.CopyAsync(temp, newfile);
|
|
92
|
-
this.OK({ created: true, message: `The file ${newfile} was uploaded` });
|
|
93
|
-
}
|
|
94
|
-
catch (err) {
|
|
95
|
-
this.Error({ error: err.message });
|
|
96
|
-
}
|
|
97
|
-
}));
|
|
98
|
-
}
|
|
99
|
-
catch (err) {
|
|
100
|
-
this.Error({ error: err.message });
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
CreateFolder(folder) {
|
|
105
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
-
try {
|
|
107
|
-
yield this._fileService.CreateDirectory(folder);
|
|
108
|
-
this.OK({ created: true, message: `The folder ${folder} was created` });
|
|
109
|
-
}
|
|
110
|
-
catch (err) {
|
|
111
|
-
this.Error({ error: err.message });
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
__decorate([
|
|
117
|
-
ControllerDecorators_1.default.Action("/default-dir"),
|
|
118
|
-
__metadata("design:type", Function),
|
|
119
|
-
__metadata("design:paramtypes", []),
|
|
120
|
-
__metadata("design:returntype", Promise)
|
|
121
|
-
], FileController.prototype, "GetDefaultDir", null);
|
|
122
|
-
__decorate([
|
|
123
|
-
ControllerDecorators_1.default.Action("/files"),
|
|
124
|
-
ControllerDecorators_1.default.Argument("folder"),
|
|
125
|
-
__metadata("design:type", Function),
|
|
126
|
-
__metadata("design:paramtypes", [String]),
|
|
127
|
-
__metadata("design:returntype", Promise)
|
|
128
|
-
], FileController.prototype, "GetAllFiles", null);
|
|
129
|
-
__decorate([
|
|
130
|
-
ControllerDecorators_1.default.Action("/folders"),
|
|
131
|
-
ControllerDecorators_1.default.Argument("folder"),
|
|
132
|
-
__metadata("design:type", Function),
|
|
133
|
-
__metadata("design:paramtypes", [String]),
|
|
134
|
-
__metadata("design:returntype", Promise)
|
|
135
|
-
], FileController.prototype, "GetAllFolders", null);
|
|
136
|
-
__decorate([
|
|
137
|
-
ControllerDecorators_1.default.Action("/download"),
|
|
138
|
-
ControllerDecorators_1.default.Argument("file"),
|
|
139
|
-
__metadata("design:type", Function),
|
|
140
|
-
__metadata("design:paramtypes", [String]),
|
|
141
|
-
__metadata("design:returntype", Promise)
|
|
142
|
-
], FileController.prototype, "DownloadFile", null);
|
|
143
|
-
__decorate([
|
|
144
|
-
ControllerDecorators_1.default.Verb(HttpVerbs_1.HTTPVerbs.POST),
|
|
145
|
-
ControllerDecorators_1.default.Action("/upload"),
|
|
146
|
-
ControllerDecorators_1.default.Argument("folder", "filename"),
|
|
147
|
-
__metadata("design:type", Function),
|
|
148
|
-
__metadata("design:paramtypes", [String, String]),
|
|
149
|
-
__metadata("design:returntype", Promise)
|
|
150
|
-
], FileController.prototype, "UploadFile", null);
|
|
151
|
-
__decorate([
|
|
152
|
-
ControllerDecorators_1.default.Argument("folder"),
|
|
153
|
-
__metadata("design:type", Function),
|
|
154
|
-
__metadata("design:paramtypes", [String]),
|
|
155
|
-
__metadata("design:returntype", Promise)
|
|
156
|
-
], FileController.prototype, "CreateFolder", null);
|
|
157
|
-
FileController = __decorate([
|
|
158
|
-
ControllerDecorators_1.default.Route("/fs"),
|
|
159
|
-
__metadata("design:paramtypes", [FileServiceBase_1.default])
|
|
160
|
-
], FileController);
|
|
161
|
-
exports.FileController = FileController;
|
|
162
|
-
//# sourceMappingURL=FileController.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileController.js","sourceRoot":"","sources":["../../controllers/FileController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,0GAAgE;AAChE,0DAAuD;AACvD,4DAAkE;AAClE,8FAAsE;AACtE,gDAAwB;AAExB,4DAAoC;AAIpC,IAAa,cAAc,GAA3B,MAAa,cAAe,SAAQ,+BAAc;IAG9C,YAAoB,YAA8B;QAE9C,KAAK,EAAE,CAAC;QAFQ,iBAAY,GAAZ,YAAY,CAAkB;IAGlD,CAAC;IAGY,aAAa;;YAEtB,IAAG;gBAEC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e,CAAC,MAAM,CAAC,CAAC;gBAEhD,IAAI,CAAC,EAAE,CAAC,EAAE,OAAO,EAAG,IAAI,EAAE,OAAO,EAAG,cAAc,MAAM,cAAc,EAAC,CAAC,CAAC;aAE5E;YACD,OAAM,GAAG,EACT;gBACI,IAAI,CAAC,KAAK,CAAC,EAAC,KAAK,EAAI,GAAa,CAAC,OAAO,EAAC,CAAC,CAAC;aAEhD;QACL,CAAC;KAAA;CAGJ,CAAA;AAlIG;IADC,8BAAE,CAAC,MAAM,CAAC,cAAc,CAAC;;;;mDAazB;AAID;IAFC,8BAAE,CAAC,MAAM,CAAC,QAAQ,CAAC;IACnB,8BAAE,CAAC,QAAQ,CAAS,QAAQ,CAAC;;;;iDAa7B;AAID;IAFC,8BAAE,CAAC,MAAM,CAAC,UAAU,CAAC;IACrB,8BAAE,CAAC,QAAQ,CAAS,QAAQ,CAAC;;;;mDAa7B;AAKD;IAFC,8BAAE,CAAC,MAAM,CAAC,WAAW,CAAC;IACtB,8BAAE,CAAC,QAAQ,CAAS,MAAM,CAAC;;;;kDAgB3B;AAKD;IAHC,8BAAE,CAAC,IAAI,CAAC,qBAAK,CAAC,IAAI,CAAC;IACnB,8BAAE,CAAC,MAAM,CAAC,SAAS,CAAC;IACpB,8BAAE,CAAC,QAAQ,CAAiB,QAAQ,EAAE,UAAU,CAAC;;;;gDA0CjD;AAGD;IADC,8BAAE,CAAC,QAAQ,CAAS,QAAQ,CAAC;;;;kDAe7B;AAxIQ,cAAc;IAD1B,8BAAE,CAAC,KAAK,CAAC,KAAK,CAAC;qCAIuB,yBAAe;GAHzC,cAAc,CA2I1B;AA3IY,wCAAc"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
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
|
-
exports.StatusController = void 0;
|
|
16
|
-
const ControllerDecorators_1 = __importDefault(require("../decorators/controllers/ControllerDecorators"));
|
|
17
|
-
const ControllerBase_1 = require("./base/ControllerBase");
|
|
18
|
-
const HttpVerbs_1 = require("../enums/httpVerbs/HttpVerbs");
|
|
19
|
-
const FileServiceBase_1 = __importDefault(require("../services/fileService/FileServiceBase"));
|
|
20
|
-
let StatusController = class StatusController extends ControllerBase_1.ControllerBase {
|
|
21
|
-
constructor(FileService) {
|
|
22
|
-
super();
|
|
23
|
-
this.FileService = FileService;
|
|
24
|
-
}
|
|
25
|
-
CheckStatus() {
|
|
26
|
-
this.OK({ status: "OK" });
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
__decorate([
|
|
30
|
-
ControllerDecorators_1.default.Before(s => console.log("midleware executado apenas para essa action")),
|
|
31
|
-
ControllerDecorators_1.default.Verb(HttpVerbs_1.HTTPVerbs.GET),
|
|
32
|
-
ControllerDecorators_1.default.Action("/check"),
|
|
33
|
-
__metadata("design:type", Function),
|
|
34
|
-
__metadata("design:paramtypes", []),
|
|
35
|
-
__metadata("design:returntype", void 0)
|
|
36
|
-
], StatusController.prototype, "CheckStatus", null);
|
|
37
|
-
StatusController = __decorate([
|
|
38
|
-
ControllerDecorators_1.default.Use(s => { console.log("primeiro midleware a ser executado"); }),
|
|
39
|
-
ControllerDecorators_1.default.Use(s => { console.log("segundo midleware a ser executado"); }),
|
|
40
|
-
ControllerDecorators_1.default.Route("/status"),
|
|
41
|
-
__metadata("design:paramtypes", [FileServiceBase_1.default])
|
|
42
|
-
], StatusController);
|
|
43
|
-
exports.StatusController = StatusController;
|
|
44
|
-
//# sourceMappingURL=StatusController.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StatusController.js","sourceRoot":"","sources":["../../controllers/StatusController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0GAAgE;AAChE,0DAAuD;AACvD,4DAAkE;AAClE,8FAAsE;AAMtE,IAAa,gBAAgB,GAA7B,MAAa,gBAAiB,SAAQ,+BAAc;IAGhD,YAAmB,WAA6B;QAE5C,KAAK,EAAE,CAAC;QAFO,gBAAW,GAAX,WAAW,CAAkB;IAGhD,CAAC;IAKM,WAAW;QAEd,IAAI,CAAC,EAAE,CAAC,EAAC,MAAM,EAAG,IAAI,EAAC,CAAC,CAAA;IAC5B,CAAC;CAEJ,CAAA;AALG;IAHC,8BAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,6CAA6C,CAAC,CAAC;IAC1E,8BAAE,CAAC,IAAI,CAAC,qBAAK,CAAC,GAAG,CAAC;IAClB,8BAAE,CAAC,MAAM,CAAC,QAAQ,CAAC;;;;mDAInB;AAdQ,gBAAgB;IAH5B,8BAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAA,CAAA,CAAC,CAAC;IACjE,8BAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAA,CAAA,CAAC,CAAC;IAChE,8BAAE,CAAC,KAAK,CAAC,SAAS,CAAC;qCAIiB,yBAAe;GAHvC,gBAAgB,CAgB5B;AAhBY,4CAAgB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IDirectory.js","sourceRoot":"","sources":["../../../interfaces/entities/IDirectory.ts"],"names":[],"mappings":""}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
10
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
12
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
13
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
14
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
-
};
|
|
20
|
-
var FileService_1;
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
const fs_1 = __importDefault(require("fs"));
|
|
23
|
-
const DependecyService_1 = __importDefault(require("../dependencyInjection/DependecyService"));
|
|
24
|
-
const IFileService_1 = require("./IFileService");
|
|
25
|
-
let FileService = FileService_1 = class FileService extends IFileService_1.FileServiceInjectable {
|
|
26
|
-
CopyAsync(origin, dest) {
|
|
27
|
-
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
try {
|
|
29
|
-
yield fs_1.default.copyFile(origin, dest, (err) => {
|
|
30
|
-
if (err)
|
|
31
|
-
throw err;
|
|
32
|
-
resolve();
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
catch (err) {
|
|
36
|
-
reject(err);
|
|
37
|
-
}
|
|
38
|
-
}));
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
FileService = FileService_1 = __decorate([
|
|
42
|
-
DependecyService_1.default.RegisterForType(IFileService_1.FileServiceInjectable, FileService_1)
|
|
43
|
-
], FileService);
|
|
44
|
-
exports.default = FileService;
|
|
45
|
-
//# sourceMappingURL=FileService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileService.js","sourceRoot":"","sources":["../../services/FileService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,4CAAsB;AACtB,+FAAuE;AACvE,iDAAmE;AAGpD,IAAM,WAAW,mBAAjB,MAAM,WAAY,SAAQ,oCAAqB;IAGnD,SAAS,CAAC,MAAc,EAAE,IAAY;QAEzC,OAAO,IAAI,OAAO,CAAO,CAAO,OAAO,EAAE,MAAM,EAAC,EAAE;YAE9C,IAAG;gBACC,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;aAEL;YAAA,OAAM,GAAG,EACV;gBACI,MAAM,CAAC,GAAG,CAAC,CAAC;aACf;QACL,CAAC,CAAA,CAAC,CAAA;IAEN,CAAC;CACJ,CAAA;AAvBoB,WAAW;IAD/B,0BAAgB,CAAC,eAAe,CAAC,oCAAqB,EAAC,aAAW,CAAC;GAC/C,WAAW,CAuB/B;kBAvBoB,WAAW"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FileServiceInjectable = void 0;
|
|
4
|
-
class FileServiceInjectable {
|
|
5
|
-
constructor() { }
|
|
6
|
-
}
|
|
7
|
-
exports.FileServiceInjectable = FileServiceInjectable;
|
|
8
|
-
//# sourceMappingURL=IFileService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IFileService.js","sourceRoot":"","sources":["../../services/IFileService.ts"],"names":[],"mappings":";;;AAKA,MAAa,qBAAqB;IAE9B,gBAAc,CAAC;CAClB;AAHD,sDAGC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import FileServiceBase from "./FileServiceBase";
|
|
2
|
-
export default class FileService extends FileServiceBase {
|
|
3
|
-
GetDefaultDir(): string;
|
|
4
|
-
CreateDirectory(path: string): Promise<void>;
|
|
5
|
-
FileExists(file: string): Promise<boolean>;
|
|
6
|
-
DirectoryExists(path: string): Promise<boolean>;
|
|
7
|
-
GetAllFiles(origin: string): Promise<string[]>;
|
|
8
|
-
GetAllForders(origin: string): Promise<string[]>;
|
|
9
|
-
CopyAsync(origin: string, dest: string): Promise<void>;
|
|
10
|
-
}
|
|
@@ -1,96 +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 platform_folders_1 = require("platform-folders");
|
|
19
|
-
const FileServiceBase_1 = __importDefault(require("./FileServiceBase"));
|
|
20
|
-
class FileService extends FileServiceBase_1.default {
|
|
21
|
-
GetDefaultDir() {
|
|
22
|
-
return (0, platform_folders_1.getDesktopFolder)();
|
|
23
|
-
}
|
|
24
|
-
CreateDirectory(path) {
|
|
25
|
-
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
try {
|
|
27
|
-
return resolve(fs_1.default.mkdirSync(path));
|
|
28
|
-
}
|
|
29
|
-
catch (err) {
|
|
30
|
-
return reject(err);
|
|
31
|
-
}
|
|
32
|
-
}));
|
|
33
|
-
}
|
|
34
|
-
FileExists(file) {
|
|
35
|
-
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
try {
|
|
37
|
-
return resolve(fs_1.default.existsSync(file) && fs_1.default.lstatSync(file).isFile());
|
|
38
|
-
}
|
|
39
|
-
catch (err) {
|
|
40
|
-
return reject(err);
|
|
41
|
-
}
|
|
42
|
-
}));
|
|
43
|
-
}
|
|
44
|
-
DirectoryExists(path) {
|
|
45
|
-
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
try {
|
|
47
|
-
return resolve(fs_1.default.existsSync(path) && fs_1.default.lstatSync(path).isDirectory());
|
|
48
|
-
}
|
|
49
|
-
catch (err) {
|
|
50
|
-
return reject(err);
|
|
51
|
-
}
|
|
52
|
-
}));
|
|
53
|
-
}
|
|
54
|
-
GetAllFiles(origin) {
|
|
55
|
-
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
if (!fs_1.default.existsSync(origin))
|
|
57
|
-
return reject(new Error(`The path ${origin} not exists`));
|
|
58
|
-
try {
|
|
59
|
-
let files = yield promises_1.default.readdir(origin, { withFileTypes: true });
|
|
60
|
-
return resolve(files.filter(u => u.isFile()).map(u => path_1.default.join(origin, u.name)));
|
|
61
|
-
}
|
|
62
|
-
catch (err) {
|
|
63
|
-
return reject(err);
|
|
64
|
-
}
|
|
65
|
-
}));
|
|
66
|
-
}
|
|
67
|
-
GetAllForders(origin) {
|
|
68
|
-
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
69
|
-
if (!fs_1.default.existsSync(origin))
|
|
70
|
-
return reject(new Error(`The path ${origin} not exists`));
|
|
71
|
-
try {
|
|
72
|
-
let files = yield promises_1.default.readdir(origin, { withFileTypes: true });
|
|
73
|
-
return resolve(files.filter(u => u.isDirectory()).map(u => path_1.default.join(origin, u.name)));
|
|
74
|
-
}
|
|
75
|
-
catch (err) {
|
|
76
|
-
return reject(err);
|
|
77
|
-
}
|
|
78
|
-
}));
|
|
79
|
-
}
|
|
80
|
-
CopyAsync(origin, dest) {
|
|
81
|
-
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
82
|
-
try {
|
|
83
|
-
yield fs_1.default.copyFile(origin, dest, (err) => {
|
|
84
|
-
if (err)
|
|
85
|
-
throw err;
|
|
86
|
-
resolve();
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
catch (err) {
|
|
90
|
-
reject(err);
|
|
91
|
-
}
|
|
92
|
-
}));
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
exports.default = FileService;
|
|
96
|
-
//# sourceMappingURL=FileService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileService.js","sourceRoot":"","sources":["../../../services/fileService/FileService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,4CAAsB;AACtB,2DAAoC;AACpC,gDAAwB;AACxB,uDAAiD;AAEjD,wEAAgD;AAGhD,MAAqB,WAAY,SAAQ,yBAAe;IAIpC,aAAa;QAEzB,OAAO,IAAA,mCAAgB,GAAE,CAAC;IAC9B,CAAC;IAGe,eAAe,CAAC,IAAY;QAExC,OAAO,IAAI,OAAO,CAAO,CAAO,OAAO,EAAE,MAAM,EAAE,EAAE;YAE/C,IAAG;gBAEA,OAAO,OAAO,CAAC,YAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;aAEvC;YAAA,OAAM,GAAG,EACV;gBACG,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;aACrB;QACL,CAAC,CAAA,CAAC,CAAC;IACP,CAAC;IAEe,UAAU,CAAC,IAAY;QACnC,OAAO,IAAI,OAAO,CAAU,CAAO,OAAO,EAAE,MAAM,EAAE,EAAE;YAElD,IAAG;gBAEC,OAAO,OAAO,CAAC,YAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,YAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;aAE1E;YAAA,OAAM,GAAG,EACV;gBACI,OAAQ,MAAM,CAAC,GAAG,CAAC,CAAC;aACvB;QACL,CAAC,CAAA,CAAC,CAAC;IACP,CAAC;IAEe,eAAe,CAAC,IAAY;QACxC,OAAO,IAAI,OAAO,CAAU,CAAO,OAAO,EAAE,MAAM,EAAE,EAAE;YAElD,IAAG;gBAEC,OAAO,OAAO,CAAC,YAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,YAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;aAE/E;YAAA,OAAM,GAAG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AAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,cAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aAEtF;YAAA,OAAM,GAAG,EACV;gBACI,OAAQ,MAAM,CAAC,GAAG,CAAC,CAAC;aACvB;QACL,CAAC,CAAA,CAAC,CAAC;IACP,CAAC;IAEe,SAAS,CAAC,MAAc,EAAE,IAAY;QAElD,OAAO,IAAI,OAAO,CAAO,CAAO,OAAO,EAAE,MAAM,EAAC,EAAE;YAE9C,IAAG;gBACC,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;aAEL;YAAA,OAAM,GAAG,EACV;gBACI,MAAM,CAAC,GAAG,CAAC,CAAC;aACf;QACL,CAAC,CAAA,CAAC,CAAA;IAEN,CAAC;CAEJ;AAlHD,8BAkHC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export default abstract class FileServiceBase {
|
|
2
|
-
constructor();
|
|
3
|
-
abstract CopyAsync(origin: string, dest: string): Promise<void>;
|
|
4
|
-
abstract GetAllFiles(origin: string): Promise<string[]>;
|
|
5
|
-
abstract GetAllForders(origin: string): Promise<string[]>;
|
|
6
|
-
abstract FileExists(file: string): Promise<boolean>;
|
|
7
|
-
abstract DirectoryExists(path: string): Promise<boolean>;
|
|
8
|
-
abstract CreateDirectory(path: string): Promise<void>;
|
|
9
|
-
abstract GetDefaultDir(): string;
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileServiceBase.js","sourceRoot":"","sources":["../../../services/fileService/FileServiceBase.ts"],"names":[],"mappings":";;AAEA,MAA8B,eAAe;IAEzC,gBAAc,CAAC;CAUlB;AAZD,kCAYC"}
|
package/dist/temp/Application.js
DELETED
|
@@ -1,33 +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 StatusController_1 = __importDefault(require("./controllers/StatusController"));
|
|
16
|
-
const index_1 = require("../index");
|
|
17
|
-
class App extends index_1.Application {
|
|
18
|
-
constructor() {
|
|
19
|
-
super();
|
|
20
|
-
}
|
|
21
|
-
ConfigureAsync(appConfig) {
|
|
22
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
this.UseCors();
|
|
24
|
-
this.AddDependencyInjection(appConfig);
|
|
25
|
-
this.AppendController(StatusController_1.default);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
AddDependencyInjection(appConfig) {
|
|
29
|
-
index_1.DependecyService.Register(StatusController_1.default);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.default = App;
|
|
33
|
-
//# sourceMappingURL=Application.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Application.js","sourceRoot":"","sources":["../../temp/Application.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,sFAAgE;AAEhE,oCAAwF;AAMxF,MAAqB,GAAI,SAAQ,mBAAW;IAExC;QAEI,KAAK,EAAE,CAAC;IACZ,CAAC;IAEqB,cAAc,CAAC,SAAoC;;YAGrE,IAAI,CAAC,OAAO,EAAE,CAAC;YAEf,IAAI,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC;YAEvC,IAAI,CAAC,gBAAgB,CAAC,0BAAgB,CAAC,CAAC;QAE5C,CAAC;KAAA;IAGO,sBAAsB,CAAC,SAAoC;QAEhE,wBAAgB,CAAC,QAAQ,CAAC,0BAAgB,CAAC,CAAC;IAC/C,CAAC;CAGJ;AAzBD,sBAyBC"}
|
package/dist/temp/Index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/temp/Index.js
DELETED
|
@@ -1,8 +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
|
-
const Application_1 = __importDefault(require("./Application"));
|
|
7
|
-
new Application_1.default().StartAsync();
|
|
8
|
-
//# sourceMappingURL=Index.js.map
|
package/dist/temp/Index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Index.js","sourceRoot":"","sources":["../../temp/Index.ts"],"names":[],"mappings":";;;;;AAAA,gEAAwC;AAExC,IAAI,qBAAW,EAAE,CAAC,UAAU,EAAE,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const index_1 = require("../../index");
|
|
13
|
-
let StatusController = class StatusController extends index_1.ControllerBase {
|
|
14
|
-
constructor() {
|
|
15
|
-
super();
|
|
16
|
-
}
|
|
17
|
-
CheckStatus() {
|
|
18
|
-
this.OK({ status: "OK" });
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
__decorate([
|
|
22
|
-
index_1.ControllersDecorators.Verb(index_1.HTTPVerbs.GET),
|
|
23
|
-
index_1.ControllersDecorators.Action("/check"),
|
|
24
|
-
__metadata("design:type", Function),
|
|
25
|
-
__metadata("design:paramtypes", []),
|
|
26
|
-
__metadata("design:returntype", void 0)
|
|
27
|
-
], StatusController.prototype, "CheckStatus", null);
|
|
28
|
-
StatusController = __decorate([
|
|
29
|
-
index_1.ControllersDecorators.Route("/status"),
|
|
30
|
-
__metadata("design:paramtypes", [])
|
|
31
|
-
], StatusController);
|
|
32
|
-
exports.default = StatusController;
|
|
33
|
-
//# sourceMappingURL=StatusController.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StatusController.js","sourceRoot":"","sources":["../../../temp/controllers/StatusController.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,uCAAmG;AAInG,IAAqB,gBAAgB,GAArC,MAAqB,gBAAiB,SAAQ,sBAAc;IAGxD;QAEI,KAAK,EAAE,CAAC;IACZ,CAAC;IAIM,WAAW;QAEd,IAAI,CAAC,EAAE,CAAC,EAAC,MAAM,EAAG,IAAI,EAAC,CAAC,CAAA;IAC5B,CAAC;CAEJ,CAAA;AALG;IAFC,6BAAE,CAAC,IAAI,CAAC,iBAAK,CAAC,GAAG,CAAC;IAClB,6BAAE,CAAC,MAAM,CAAC,QAAQ,CAAC;;;;mDAInB;AAbgB,gBAAgB;IADpC,6BAAE,CAAC,KAAK,CAAC,SAAS,CAAC;;GACC,gBAAgB,CAepC;kBAfoB,gBAAgB"}
|