eservices-back-core 1.6.93 → 2.0.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/router/index.ts"],"names":[],"mappings":"AA0BA,MAAM,CAAC,OAAO,UAAU,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/router/index.ts"],"names":[],"mappings":"AA0BA,MAAM,CAAC,OAAO,UAAU,SAAS,iDA2ChC"}
|
package/dist/router/index.js
CHANGED
|
@@ -1,20 +1,10 @@
|
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
14
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
6
|
const body_parser_1 = __importDefault(require("body-parser"));
|
|
16
7
|
const express_1 = __importDefault(require("express"));
|
|
17
|
-
const path_1 = __importDefault(require("path"));
|
|
18
8
|
const close_1 = __importDefault(require("./close"));
|
|
19
9
|
const test_close_router_1 = __importDefault(require("./close/test-close-router"));
|
|
20
10
|
const auth_middleware_1 = require("../middleware/auth-middleware");
|
|
@@ -25,9 +15,6 @@ const cookie_parser_1 = __importDefault(require("cookie-parser"));
|
|
|
25
15
|
const Server_1 = __importDefault(require("../Server"));
|
|
26
16
|
const open_api_router_1 = __importDefault(require("./open/open-api-router"));
|
|
27
17
|
const session_middleware_1 = require("../middleware/session-middleware");
|
|
28
|
-
const get_auth_url_1 = __importDefault(require("../auth/get-auth-url"));
|
|
29
|
-
const fs_1 = __importDefault(require("fs"));
|
|
30
|
-
const use_logger_1 = require("../logger/use-logger");
|
|
31
18
|
const constants_1 = require("../constants");
|
|
32
19
|
function useRouter() {
|
|
33
20
|
const server = Server_1.default.getServer();
|
|
@@ -46,15 +33,6 @@ function useRouter() {
|
|
|
46
33
|
if (server.staticDir)
|
|
47
34
|
app.use('/' + constants_1.STATIC_SERVER_RESOURCE_FOLDER, express_1.default.static(server.staticDir));
|
|
48
35
|
app.use(routerForOpenArea);
|
|
49
|
-
app.get((0, get_auth_url_1.default)().login + '*', (req, res) => __awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
const filePath = path_1.default.join(server.params.frontendDir, `${server.type}-auth.html`);
|
|
51
|
-
fs_1.default.promises.access(filePath, fs_1.default.constants.F_OK)
|
|
52
|
-
.then(() => res.sendFile(filePath))
|
|
53
|
-
.catch(e => {
|
|
54
|
-
use_logger_1.Logger.error(e);
|
|
55
|
-
res.send("Page isn't available right now.");
|
|
56
|
-
});
|
|
57
|
-
}));
|
|
58
36
|
// test
|
|
59
37
|
app.use("/test-api", (0, test_close_router_1.default)());
|
|
60
38
|
app.use("/open-api", open_api_router_1.default);
|
|
@@ -62,13 +40,15 @@ function useRouter() {
|
|
|
62
40
|
app.use(user_middleware_1.default);
|
|
63
41
|
app.use(routerForCloseArea);
|
|
64
42
|
app.use("/close-api", (0, close_1.default)());
|
|
65
|
-
|
|
66
|
-
|
|
43
|
+
/*
|
|
44
|
+
app.get("/main*",async (req, res) => {
|
|
45
|
+
const filePath = path.join(server.params.frontendDir, `${server.type}-main.html`)
|
|
67
46
|
res.sendFile(filePath);
|
|
68
|
-
})
|
|
69
|
-
app.get("/", (req, res) =>
|
|
70
|
-
res.redirect('/main')
|
|
71
|
-
})
|
|
47
|
+
})
|
|
48
|
+
app.get("/",async (req, res) => {
|
|
49
|
+
res.redirect('/main')
|
|
50
|
+
})
|
|
51
|
+
*/
|
|
72
52
|
app.use(error_middleware_1.default);
|
|
73
53
|
return [
|
|
74
54
|
routerForOpenArea, routerForCloseArea
|
package/dist/router/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/router/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/router/index.ts"],"names":[],"mappings":";;;;;AAAA,8DAAsC;AACtC,sDAA8B;AAG9B,oDAAkC;AAClC,kFAAwD;AAExD,mEAA0D;AAE1D,oFAA2D;AAC3D,sFAA6D;AAC7D,gDAAwB;AACxB,kEAAyC;AAGzC,uDAA+B;AAE/B,6EAAmD;AAEnD,yEAA+D;AAI/D,4CAA2D;AAG3D,SAAwB,SAAS;IAChC,MAAM,MAAM,GAAG,gBAAM,CAAC,SAAS,EAAE,CAAC;IAClC,MAAM,iBAAiB,GAAG,iBAAO,CAAC,MAAM,EAAE,CAAC;IAC3C,MAAM,kBAAkB,GAAG,iBAAO,CAAC,MAAM,EAAE,CAAC;IAC5C,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;IACvB,OAAO;IACP,GAAG,CAAC,GAAG,CAAC,IAAA,cAAI,EAAC;QACZ,WAAW,EAAE,IAAI;QACjB,MAAM,EAAE,CAAC,kBAAkB,EAAE,uBAAuB,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,uBAAuB,CAAC;KACtJ,CAAC,CAAC,CAAA;IACH,GAAG,CAAC,GAAG,CAAC,IAAA,kCAAa,GAAE,CAAC,CAAC;IACzB,GAAG,CAAC,GAAG,CAAC,qBA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