@flink-app/management-api-plugin 0.11.4-next.0 → 0.11.5
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/.flink/generatedHandlers.ts +1 -1
- package/.flink/generatedJobs.ts +1 -1
- package/.flink/generatedRepos.ts +1 -1
- package/.flink/schemas/schemas.ts +1 -1
- package/.flink/start.ts +1 -1
- package/dist/.flink/generatedHandlers.js +2 -6
- package/dist/.flink/generatedJobs.js +1 -1
- package/dist/.flink/generatedRepos.js +1 -1
- package/dist/.flink/start.js +1 -1
- package/dist/src/handlers/Management/GetManagement.js +13 -11
- package/dist/src/handlers/User/DeleteByUserid.js +22 -20
- package/dist/src/handlers/User/GetByUserid.js +22 -20
- package/dist/src/handlers/User/GetList.d.ts +1 -1
- package/dist/src/handlers/User/GetList.js +23 -21
- package/dist/src/handlers/User/GetMe.js +25 -23
- package/dist/src/handlers/User/Post.d.ts +1 -1
- package/dist/src/handlers/User/Post.js +40 -38
- package/dist/src/handlers/User/PostLogin.d.ts +1 -1
- package/dist/src/handlers/User/PostLogin.js +35 -33
- package/dist/src/handlers/User/PutByUserid.js +46 -44
- package/dist/src/index.js +2 -6
- package/dist/src/models/ManagementApi.js +1 -1
- package/dist/src/utils/bcrypt.js +3 -2
- package/package.json +34 -34
- package/tsconfig.json +21 -21
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated
|
|
1
|
+
// Generated Thu Jan 09 2025 19:43:52 GMT+0100 (Central European Standard Time)
|
|
2
2
|
import { autoRegisteredHandlers, HttpMethod } from "@flink-app/flink";
|
|
3
3
|
import * as GetManagement_0 from "../src/handlers/Management/GetManagement";
|
|
4
4
|
import * as DeleteByUserid_0 from "../src/handlers/User/DeleteByUserid";
|
package/.flink/generatedJobs.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated
|
|
1
|
+
// Generated Thu Jan 09 2025 19:43:52 GMT+0100 (Central European Standard Time)
|
|
2
2
|
import { autoRegisteredJobs } from "@flink-app/flink";
|
|
3
3
|
export const jobs = [];
|
|
4
4
|
autoRegisteredJobs.push(...jobs);
|
package/.flink/generatedRepos.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated
|
|
1
|
+
// Generated Thu Jan 09 2025 19:43:51 GMT+0100 (Central European Standard Time)
|
|
2
2
|
import { autoRegisteredRepos } from "@flink-app/flink";
|
|
3
3
|
import ManagementUserRepo from "../src/repos/ManagementUserRepo";
|
|
4
4
|
|
|
@@ -15,7 +15,7 @@ import { PostUserLoginRes } from "../../src/schemas/User/PostLoginRes";
|
|
|
15
15
|
import { PutUserByUseridReq } from "../../src/schemas/User/PutByUseridReq";
|
|
16
16
|
import { PutUserByUseridRes } from "../../src/schemas/User/PutByUseridRes";
|
|
17
17
|
|
|
18
|
-
// Generated
|
|
18
|
+
// Generated Thu Jan 09 2025 19:43:52 GMT+0100 (Central European Standard Time)
|
|
19
19
|
export interface GetManagement_9_ReqSchema extends GetManagementReq {}
|
|
20
20
|
|
|
21
21
|
export interface GetManagement_9_ResSchema extends GetManagementRes {}
|
package/.flink/start.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
|
|
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);
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
9
5
|
}) : (function(o, m, k, k2) {
|
|
10
6
|
if (k2 === undefined) k2 = k;
|
|
11
7
|
o[k2] = m[k];
|
|
@@ -24,7 +20,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
20
|
};
|
|
25
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
22
|
exports.handlers = void 0;
|
|
27
|
-
// Generated
|
|
23
|
+
// Generated Thu Jan 09 2025 19:43:52 GMT+0100 (Central European Standard Time)
|
|
28
24
|
var flink_1 = require("@flink-app/flink");
|
|
29
25
|
var DeleteByUserid_0 = __importStar(require("../src/handlers/User/DeleteByUserid"));
|
|
30
26
|
var GetByUserid_1 = __importStar(require("../src/handlers/User/GetByUserid"));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.jobs = void 0;
|
|
4
|
-
// Generated
|
|
4
|
+
// Generated Thu Jan 09 2025 19:43:52 GMT+0100 (Central European Standard Time)
|
|
5
5
|
var flink_1 = require("@flink-app/flink");
|
|
6
6
|
exports.jobs = [];
|
|
7
7
|
flink_1.autoRegisteredJobs.push.apply(flink_1.autoRegisteredJobs, exports.jobs);
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.repos = void 0;
|
|
7
|
-
// Generated
|
|
7
|
+
// Generated Thu Jan 09 2025 19:43:51 GMT+0100 (Central European Standard Time)
|
|
8
8
|
var flink_1 = require("@flink-app/flink");
|
|
9
9
|
var ManagementUserRepo_1 = __importDefault(require("../src/repos/ManagementUserRepo"));
|
|
10
10
|
exports.repos = [{ collectionName: "managementuser", repoInstanceName: "managementUserRepo", Repo: ManagementUserRepo_1.default }];
|
package/dist/.flink/start.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
// Generated
|
|
3
|
+
// Generated Thu Jan 09 2025 19:43:52 GMT+0100 (Central European Standard Time)
|
|
4
4
|
require("./generatedHandlers");
|
|
5
5
|
require("./generatedRepos");
|
|
6
6
|
require("./generatedJobs");
|
|
@@ -9,12 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g
|
|
13
|
-
return g
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -37,15 +37,17 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.__schemas = exports.__params = exports.__query = exports.__file = exports.__assumedHttpMethod = void 0;
|
|
40
|
-
var GetManagement = function (_a) {
|
|
41
|
-
var ctx =
|
|
42
|
-
return
|
|
43
|
-
return
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
var GetManagement = function (_a) {
|
|
41
|
+
var ctx = _a.ctx, req = _a.req;
|
|
42
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
43
|
+
return __generator(this, function (_b) {
|
|
44
|
+
return [2 /*return*/, {
|
|
45
|
+
data: ctx.plugins.managementApi.moduleList,
|
|
46
|
+
status: 200,
|
|
47
|
+
}];
|
|
48
|
+
});
|
|
47
49
|
});
|
|
48
|
-
}
|
|
50
|
+
};
|
|
49
51
|
exports.default = GetManagement;
|
|
50
52
|
exports.__assumedHttpMethod = "get", exports.__file = "GetManagement.ts", exports.__query = [], exports.__params = [];
|
|
51
53
|
exports.__schemas = { reqSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": {}, "definitions": {} }, resSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "modules": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "features": { "type": "array", "items": { "type": "string" } }, "title": { "type": "string" }, "ui": { "type": "string" }, "data": { "type": "object" }, "endpoints": { "type": "array", "items": { "type": "object", "properties": { "method": { "type": "string" }, "url": { "type": "string" } }, "required": ["method", "url"], "additionalProperties": false } } }, "required": ["id", "type", "features", "title", "ui", "data", "endpoints"], "additionalProperties": false } } }, "required": ["modules"], "definitions": {} } };
|
|
@@ -9,12 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g
|
|
13
|
-
return g
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -45,24 +45,26 @@ exports.Route = {
|
|
|
45
45
|
// type Params = {
|
|
46
46
|
// userid: string;
|
|
47
47
|
// };
|
|
48
|
-
var DeleteUserByUserid = function (_a) {
|
|
49
|
-
var
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
48
|
+
var DeleteUserByUserid = function (_a) {
|
|
49
|
+
var ctx = _a.ctx, req = _a.req;
|
|
50
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
51
|
+
var count;
|
|
52
|
+
return __generator(this, function (_b) {
|
|
53
|
+
switch (_b.label) {
|
|
54
|
+
case 0: return [4 /*yield*/, ctx.repos.managementuserRepo.deleteById(req.params.userid)];
|
|
55
|
+
case 1:
|
|
56
|
+
count = _b.sent();
|
|
57
|
+
if (count == 0) {
|
|
58
|
+
return [2 /*return*/, flink_1.notFound()];
|
|
59
|
+
}
|
|
60
|
+
return [2 /*return*/, {
|
|
61
|
+
data: {},
|
|
62
|
+
status: 200,
|
|
63
|
+
}];
|
|
64
|
+
}
|
|
65
|
+
});
|
|
64
66
|
});
|
|
65
|
-
}
|
|
67
|
+
};
|
|
66
68
|
exports.default = DeleteUserByUserid;
|
|
67
69
|
exports.__assumedHttpMethod = "delete", exports.__file = "DeleteByUserid.ts", exports.__query = [], exports.__params = [];
|
|
68
70
|
exports.__schemas = { reqSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": {}, "definitions": {} }, resSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": {}, "definitions": {} } };
|
|
@@ -9,12 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g
|
|
13
|
-
return g
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -46,24 +46,26 @@ exports.Route = {
|
|
|
46
46
|
// type Params = {
|
|
47
47
|
// userid: string;
|
|
48
48
|
// };
|
|
49
|
-
var GetUserByUserid = function (_a) {
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
49
|
+
var GetUserByUserid = function (_a) {
|
|
50
|
+
var ctx = _a.ctx, req = _a.req;
|
|
51
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
52
|
+
var user;
|
|
53
|
+
return __generator(this, function (_b) {
|
|
54
|
+
switch (_b.label) {
|
|
55
|
+
case 0: return [4 /*yield*/, ctx.repos.managementuserRepo.getById(req.params.userid)];
|
|
56
|
+
case 1:
|
|
57
|
+
user = _b.sent();
|
|
58
|
+
if (user == null) {
|
|
59
|
+
return [2 /*return*/, flink_1.notFound()];
|
|
60
|
+
}
|
|
61
|
+
return [2 /*return*/, {
|
|
62
|
+
data: ManagementUserViewModel_1.GetManagementUserViewModel(user),
|
|
63
|
+
status: 200,
|
|
64
|
+
}];
|
|
65
|
+
}
|
|
66
|
+
});
|
|
65
67
|
});
|
|
66
|
-
}
|
|
68
|
+
};
|
|
67
69
|
exports.default = GetUserByUserid;
|
|
68
70
|
exports.__assumedHttpMethod = "get", exports.__file = "GetByUserid.ts", exports.__query = [], exports.__params = [];
|
|
69
71
|
exports.__schemas = { reqSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": {}, "definitions": {} }, resSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "_id": { "type": "string" }, "username": { "type": "string" } }, "required": ["_id", "username"], "definitions": {} } };
|
|
@@ -2,7 +2,7 @@ import { Handler } from "@flink-app/flink";
|
|
|
2
2
|
import { GetUserListReq } from "../../schemas/User/GetListReq";
|
|
3
3
|
import { GetUserListRes } from "../../schemas/User/GetListRes";
|
|
4
4
|
import { Ctx } from "../../Ctx";
|
|
5
|
-
type Params = {};
|
|
5
|
+
declare type Params = {};
|
|
6
6
|
declare const GetUserList: Handler<Ctx, GetUserListReq, GetUserListRes, Params>;
|
|
7
7
|
export default GetUserList;
|
|
8
8
|
export declare const __assumedHttpMethod = "get", __file = "GetList.ts", __query: never[], __params: never[];
|
|
@@ -9,12 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g
|
|
13
|
-
return g
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -38,25 +38,27 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.__schemas = exports.__params = exports.__query = exports.__file = exports.__assumedHttpMethod = void 0;
|
|
40
40
|
var ManagementUserViewModel_1 = require("../../schemas/ManagementUserViewModel");
|
|
41
|
-
var GetUserList = function (_a) {
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
41
|
+
var GetUserList = function (_a) {
|
|
42
|
+
var ctx = _a.ctx, req = _a.req;
|
|
43
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
44
|
+
var repo, users;
|
|
45
|
+
return __generator(this, function (_b) {
|
|
46
|
+
switch (_b.label) {
|
|
47
|
+
case 0:
|
|
48
|
+
repo = ctx.repos.managementuserRepo;
|
|
49
|
+
return [4 /*yield*/, repo.findAll()];
|
|
50
|
+
case 1:
|
|
51
|
+
users = _b.sent();
|
|
52
|
+
return [2 /*return*/, {
|
|
53
|
+
data: {
|
|
54
|
+
users: users.map(ManagementUserViewModel_1.GetManagementUserViewModel)
|
|
55
|
+
},
|
|
56
|
+
status: 200
|
|
57
|
+
}];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
58
60
|
});
|
|
59
|
-
}
|
|
61
|
+
};
|
|
60
62
|
exports.default = GetUserList;
|
|
61
63
|
exports.__assumedHttpMethod = "get", exports.__file = "GetList.ts", exports.__query = [], exports.__params = [];
|
|
62
64
|
exports.__schemas = { reqSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": {}, "definitions": {} }, resSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "users": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "_id": { "type": "string" }, "username": { "type": "string" } }, "required": ["_id", "username"] } } }, "required": ["users"], "definitions": {} } };
|
|
@@ -9,12 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g
|
|
13
|
-
return g
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -53,27 +53,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
53
53
|
exports.__schemas = exports.__params = exports.__query = exports.__file = exports.__assumedHttpMethod = void 0;
|
|
54
54
|
var flink_1 = require("@flink-app/flink");
|
|
55
55
|
var jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
|
|
56
|
-
var GetUserMe = function (_a) {
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
56
|
+
var GetUserMe = function (_a) {
|
|
57
|
+
var ctx = _a.ctx, req = _a.req;
|
|
58
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
59
|
+
var user, iat, rest;
|
|
60
|
+
return __generator(this, function (_b) {
|
|
61
|
+
try {
|
|
62
|
+
user = jsonwebtoken_1.default.verify(req.headers["management-token"], ctx.plugins.managementApi.jwtSecret);
|
|
63
|
+
iat = user.iat, rest = __rest(user, ["iat"]);
|
|
64
|
+
return [2 /*return*/, {
|
|
65
|
+
data: {
|
|
66
|
+
token: req.headers["management-token"],
|
|
67
|
+
user: rest
|
|
68
|
+
},
|
|
69
|
+
status: 200
|
|
70
|
+
}];
|
|
71
|
+
}
|
|
72
|
+
catch (ex) {
|
|
73
|
+
return [2 /*return*/, flink_1.unauthorized()];
|
|
74
|
+
}
|
|
75
|
+
return [2 /*return*/];
|
|
76
|
+
});
|
|
75
77
|
});
|
|
76
|
-
}
|
|
78
|
+
};
|
|
77
79
|
exports.default = GetUserMe;
|
|
78
80
|
exports.__assumedHttpMethod = "get", exports.__file = "GetMe.ts", exports.__query = [], exports.__params = [];
|
|
79
81
|
exports.__schemas = { reqSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": {}, "definitions": {} }, resSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "user": { "type": "object", "additionalProperties": false, "properties": { "_id": { "type": "string" }, "username": { "type": "string" } }, "required": ["_id", "username"] }, "token": { "type": "string" } }, "required": ["token", "user"], "definitions": {} } };
|
|
@@ -3,7 +3,7 @@ import { Ctx } from "../../Ctx";
|
|
|
3
3
|
import { PostUserReq } from "../../schemas/User/PostReq";
|
|
4
4
|
import { PostUserRes } from "../../schemas/User/PostRes";
|
|
5
5
|
export declare const Route: RouteProps;
|
|
6
|
-
type Params = {};
|
|
6
|
+
declare type Params = {};
|
|
7
7
|
declare const PostUser: Handler<Ctx, PostUserReq, PostUserRes, Params>;
|
|
8
8
|
export default PostUser;
|
|
9
9
|
export declare const __assumedHttpMethod = "post", __file = "Post.ts", __query: never[], __params: never[];
|
|
@@ -9,12 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g
|
|
13
|
-
return g
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -44,42 +44,44 @@ exports.Route = {
|
|
|
44
44
|
path: "/user",
|
|
45
45
|
method: flink_1.HttpMethod.post,
|
|
46
46
|
};
|
|
47
|
-
var PostUser = function (_a) {
|
|
48
|
-
var
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
47
|
+
var PostUser = function (_a) {
|
|
48
|
+
var ctx = _a.ctx, req = _a.req;
|
|
49
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
50
|
+
var existingUser, salt, hash, obj, user;
|
|
51
|
+
return __generator(this, function (_b) {
|
|
52
|
+
switch (_b.label) {
|
|
53
|
+
case 0:
|
|
54
|
+
if (req.body.username.length == 0 || req.body.password.length == 0) {
|
|
55
|
+
return [2 /*return*/, flink_1.badRequest("Username and password must be specified")];
|
|
56
|
+
}
|
|
57
|
+
return [4 /*yield*/, ctx.repos.managementuserRepo.getOne({ username: req.body.username })];
|
|
58
|
+
case 1:
|
|
59
|
+
existingUser = _b.sent();
|
|
60
|
+
if (existingUser != null) {
|
|
61
|
+
return [2 /*return*/, flink_1.conflict("Username already taken")];
|
|
62
|
+
}
|
|
63
|
+
return [4 /*yield*/, bcrypt_1.genSalt(10)];
|
|
64
|
+
case 2:
|
|
65
|
+
salt = _b.sent();
|
|
66
|
+
return [4 /*yield*/, bcrypt_1.encrypt(req.body.password, salt)];
|
|
67
|
+
case 3:
|
|
68
|
+
hash = _b.sent();
|
|
69
|
+
obj = {
|
|
70
|
+
username: req.body.username,
|
|
71
|
+
password: hash,
|
|
72
|
+
salt: salt
|
|
73
|
+
};
|
|
74
|
+
return [4 /*yield*/, ctx.repos.managementuserRepo.create(obj)];
|
|
75
|
+
case 4:
|
|
76
|
+
user = _b.sent();
|
|
77
|
+
return [2 /*return*/, {
|
|
78
|
+
data: ManagementUserViewModel_1.GetManagementUserViewModel(user),
|
|
79
|
+
status: 200
|
|
80
|
+
}];
|
|
81
|
+
}
|
|
82
|
+
});
|
|
81
83
|
});
|
|
82
|
-
}
|
|
84
|
+
};
|
|
83
85
|
exports.default = PostUser;
|
|
84
86
|
exports.__assumedHttpMethod = "post", exports.__file = "Post.ts", exports.__query = [], exports.__params = [];
|
|
85
87
|
exports.__schemas = { reqSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "username": { "type": "string" }, "password": { "type": "string" } }, "required": ["password", "username"], "definitions": {} }, resSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "_id": { "type": "string" }, "username": { "type": "string" } }, "required": ["_id", "username"], "definitions": {} } };
|
|
@@ -3,7 +3,7 @@ import { Ctx } from "../../Ctx";
|
|
|
3
3
|
import { PostUserLoginReq } from "../../schemas/User/PostLoginReq";
|
|
4
4
|
import { PostUserLoginRes } from "../../schemas/User/PostLoginRes";
|
|
5
5
|
export declare const Route: RouteProps;
|
|
6
|
-
type Params = {};
|
|
6
|
+
declare type Params = {};
|
|
7
7
|
declare const PostUserLogin: Handler<Ctx, PostUserLoginReq, PostUserLoginRes, Params>;
|
|
8
8
|
export default PostUserLogin;
|
|
9
9
|
export declare const __assumedHttpMethod = "post", __file = "PostLogin.ts", __query: never[], __params: never[];
|
|
@@ -9,12 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g
|
|
13
|
-
return g
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -48,37 +48,39 @@ exports.Route = {
|
|
|
48
48
|
path: "/user/login",
|
|
49
49
|
method: flink_1.HttpMethod.post,
|
|
50
50
|
};
|
|
51
|
-
var PostUserLogin = function (_a) {
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
51
|
+
var PostUserLogin = function (_a) {
|
|
52
|
+
var ctx = _a.ctx, req = _a.req;
|
|
53
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
54
|
+
var user, hashCandidate, viewUser, token;
|
|
55
|
+
return __generator(this, function (_b) {
|
|
56
|
+
switch (_b.label) {
|
|
57
|
+
case 0: return [4 /*yield*/, ctx.repos.managementuserRepo.getOne({
|
|
58
|
+
username: req.body.username,
|
|
59
|
+
})];
|
|
60
|
+
case 1:
|
|
61
|
+
user = _b.sent();
|
|
62
|
+
if (user == null) {
|
|
63
|
+
return [2 /*return*/, flink_1.unauthorized("Username or password invalid")];
|
|
64
|
+
}
|
|
65
|
+
return [4 /*yield*/, bcrypt_1.encrypt(req.body.password, user.salt)];
|
|
66
|
+
case 2:
|
|
67
|
+
hashCandidate = _b.sent();
|
|
68
|
+
if (hashCandidate !== user.password) {
|
|
69
|
+
return [2 /*return*/, flink_1.unauthorized("Username or password invalid")];
|
|
70
|
+
}
|
|
71
|
+
viewUser = ManagementUserViewModel_1.GetManagementUserViewModel(user);
|
|
72
|
+
token = jsonwebtoken_1.default.sign(viewUser, ctx.plugins.managementApi.jwtSecret);
|
|
73
|
+
return [2 /*return*/, {
|
|
74
|
+
data: {
|
|
75
|
+
user: viewUser,
|
|
76
|
+
token: token,
|
|
77
|
+
},
|
|
78
|
+
status: 200,
|
|
79
|
+
}];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
80
82
|
});
|
|
81
|
-
}
|
|
83
|
+
};
|
|
82
84
|
exports.default = PostUserLogin;
|
|
83
85
|
exports.__assumedHttpMethod = "post", exports.__file = "PostLogin.ts", exports.__query = [], exports.__params = [];
|
|
84
86
|
exports.__schemas = { reqSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "username": { "type": "string" }, "password": { "type": "string" } }, "required": ["password", "username"], "definitions": {} }, resSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "user": { "type": "object", "additionalProperties": false, "properties": { "_id": { "type": "string" }, "username": { "type": "string" } }, "required": ["_id", "username"] }, "token": { "type": "string" } }, "required": ["token", "user"], "definitions": {} } };
|
|
@@ -9,12 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g
|
|
13
|
-
return g
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -47,49 +47,51 @@ exports.Route = {
|
|
|
47
47
|
// type Params = {
|
|
48
48
|
// userid: string;
|
|
49
49
|
// };
|
|
50
|
-
var PutUserByUserid = function (_a) {
|
|
51
|
-
var
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
if (existingUser
|
|
65
|
-
|
|
50
|
+
var PutUserByUserid = function (_a) {
|
|
51
|
+
var ctx = _a.ctx, req = _a.req;
|
|
52
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
53
|
+
var model, existingUser, salt, hash, updated;
|
|
54
|
+
return __generator(this, function (_b) {
|
|
55
|
+
switch (_b.label) {
|
|
56
|
+
case 0:
|
|
57
|
+
model = req.body;
|
|
58
|
+
if (!(model.username != null)) return [3 /*break*/, 2];
|
|
59
|
+
return [4 /*yield*/, ctx.repos.managementuserRepo.getOne({
|
|
60
|
+
username: model.username,
|
|
61
|
+
})];
|
|
62
|
+
case 1:
|
|
63
|
+
existingUser = _b.sent();
|
|
64
|
+
if (existingUser != null) {
|
|
65
|
+
if (existingUser._id != req.params.userid) {
|
|
66
|
+
return [2 /*return*/, flink_1.conflict("Username already taken")];
|
|
67
|
+
}
|
|
66
68
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
69
|
+
_b.label = 2;
|
|
70
|
+
case 2:
|
|
71
|
+
if (!(model.password != null)) return [3 /*break*/, 5];
|
|
72
|
+
return [4 /*yield*/, bcrypt_1.genSalt(10)];
|
|
73
|
+
case 3:
|
|
74
|
+
salt = _b.sent();
|
|
75
|
+
return [4 /*yield*/, bcrypt_1.encrypt(model.password, salt)];
|
|
76
|
+
case 4:
|
|
77
|
+
hash = _b.sent();
|
|
78
|
+
model.password = hash;
|
|
79
|
+
model.salt = salt;
|
|
80
|
+
_b.label = 5;
|
|
81
|
+
case 5: return [4 /*yield*/, ctx.repos.managementuserRepo.updateOne(req.params.userid, model)];
|
|
82
|
+
case 6:
|
|
83
|
+
updated = _b.sent();
|
|
84
|
+
if (updated == null) {
|
|
85
|
+
return [2 /*return*/, flink_1.notFound()];
|
|
86
|
+
}
|
|
87
|
+
return [2 /*return*/, {
|
|
88
|
+
data: ManagementUserViewModel_1.GetManagementUserViewModel(updated),
|
|
89
|
+
status: 200,
|
|
90
|
+
}];
|
|
91
|
+
}
|
|
92
|
+
});
|
|
91
93
|
});
|
|
92
|
-
}
|
|
94
|
+
};
|
|
93
95
|
exports.default = PutUserByUserid;
|
|
94
96
|
exports.__assumedHttpMethod = "put", exports.__file = "PutByUserid.ts", exports.__query = [], exports.__params = [];
|
|
95
97
|
exports.__schemas = { reqSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "username": { "type": "string" }, "password": { "type": "string" } }, "definitions": {} }, resSchema: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "_id": { "type": "string" }, "username": { "type": "string" } }, "required": ["_id", "username"], "definitions": {} } };
|
package/dist/src/index.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
|
|
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);
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
9
5
|
}) : (function(o, m, k, k2) {
|
|
10
6
|
if (k2 === undefined) k2 = k;
|
|
11
7
|
o[k2] = m[k];
|
|
@@ -170,7 +166,7 @@ function init(app, options) {
|
|
|
170
166
|
next();
|
|
171
167
|
}
|
|
172
168
|
catch (ex) {
|
|
173
|
-
res.status(401).json(
|
|
169
|
+
res.status(401).json(flink_1.unauthorized());
|
|
174
170
|
}
|
|
175
171
|
}
|
|
176
172
|
});
|
|
@@ -8,4 +8,4 @@ var ManagementApiType;
|
|
|
8
8
|
ManagementApiType["action"] = "ACTION";
|
|
9
9
|
ManagementApiType["debug"] = "DEBUG";
|
|
10
10
|
ManagementApiType["notification"] = "NOTIFICATION";
|
|
11
|
-
})(ManagementApiType
|
|
11
|
+
})(ManagementApiType = exports.ManagementApiType || (exports.ManagementApiType = {}));
|
package/dist/src/utils/bcrypt.js
CHANGED
|
@@ -3,8 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.encrypt =
|
|
7
|
-
exports.genSalt = genSalt;
|
|
6
|
+
exports.genSalt = exports.encrypt = void 0;
|
|
8
7
|
var bcrypt_1 = __importDefault(require("bcrypt"));
|
|
9
8
|
function encrypt(password, salt) {
|
|
10
9
|
return new Promise(function (resolve, reject) {
|
|
@@ -15,6 +14,7 @@ function encrypt(password, salt) {
|
|
|
15
14
|
});
|
|
16
15
|
});
|
|
17
16
|
}
|
|
17
|
+
exports.encrypt = encrypt;
|
|
18
18
|
function genSalt(rounds) {
|
|
19
19
|
if (rounds === void 0) { rounds = 10; }
|
|
20
20
|
return new Promise(function (resolve, reject) {
|
|
@@ -25,3 +25,4 @@ function genSalt(rounds) {
|
|
|
25
25
|
});
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
+
exports.genSalt = genSalt;
|
package/package.json
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
2
|
+
"name": "@flink-app/management-api-plugin",
|
|
3
|
+
"version": "0.11.5",
|
|
4
|
+
"description": "Flink plugin that makes it possible to expose management api:s for other plugins",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"test": "echo \"Error: no test specified\"",
|
|
7
|
+
"build": "flink build",
|
|
8
|
+
"prepublish": "npm run build",
|
|
9
|
+
"watch": "nodemon --exec \"flink build\"",
|
|
10
|
+
"postinstall": "flink generate-schemas"
|
|
11
|
+
},
|
|
12
|
+
"author": "johan@frost.se",
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"types": "dist/src/index.d.ts",
|
|
18
|
+
"main": "dist/src/index.js",
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@types/mongodb": "3.6.12",
|
|
21
|
+
"bcrypt": "^5.0.1",
|
|
22
|
+
"express": "^4.17.1",
|
|
23
|
+
"jsonwebtoken": "^8.5.1"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@flink-app/flink": "^0.11.5",
|
|
27
|
+
"@types/bcrypt": "^5.0.0",
|
|
28
|
+
"@types/express": "4.17.11",
|
|
29
|
+
"@types/express-fileupload": "^1.1.7",
|
|
30
|
+
"@types/jsonwebtoken": "^8.5.4",
|
|
31
|
+
"@types/node": "^15.6.2",
|
|
32
|
+
"ts-node": "^9.1.1",
|
|
33
|
+
"typescript": "^4.2.4"
|
|
34
|
+
},
|
|
35
|
+
"gitHead": "3e4488748859fc5f1de798dea4ea2611f9694221"
|
|
36
36
|
}
|
package/tsconfig.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es5",
|
|
4
|
+
"lib": ["esnext", "es2016"],
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"allowSyntheticDefaultImports": true,
|
|
9
|
+
"strict": true,
|
|
10
|
+
"forceConsistentCasingInFileNames": true,
|
|
11
|
+
"module": "commonjs",
|
|
12
|
+
"moduleResolution": "node",
|
|
13
|
+
"resolveJsonModule": true,
|
|
14
|
+
"isolatedModules": true,
|
|
15
|
+
"noEmit": false,
|
|
16
|
+
"declaration": true,
|
|
17
|
+
"experimentalDecorators": true,
|
|
18
|
+
"checkJs": true,
|
|
19
|
+
"outDir": "dist"
|
|
20
|
+
},
|
|
21
|
+
"include": ["./src/*"],
|
|
22
|
+
"exclude": ["./node_modules/*"]
|
|
23
23
|
}
|