@napp/dti-server 4.2.1 → 4.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundler.d.ts +1 -0
- package/bundler.js +3 -5
- package/package.json +3 -4
- package/route.d.ts +1 -0
- package/route.js +2 -5
package/bundler.d.ts
CHANGED
package/bundler.js
CHANGED
|
@@ -8,15 +8,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
12
|
exports.BundlerServer = void 0;
|
|
16
|
-
const
|
|
13
|
+
const dti_core_1 = require("@napp/dti-core");
|
|
17
14
|
class BundlerServer {
|
|
18
15
|
constructor(server) {
|
|
19
16
|
this.server = server;
|
|
17
|
+
this.base62 = new dti_core_1.Base62();
|
|
20
18
|
}
|
|
21
19
|
action(meta, ctx) {
|
|
22
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -52,7 +50,7 @@ class BundlerServer {
|
|
|
52
50
|
try {
|
|
53
51
|
let p = (_a = req.query) === null || _a === void 0 ? void 0 : _a.p;
|
|
54
52
|
if (p) {
|
|
55
|
-
let json =
|
|
53
|
+
let json = this.base62.decode(p);
|
|
56
54
|
let meta = JSON.parse(json);
|
|
57
55
|
let result = yield this.action(meta, { req, res });
|
|
58
56
|
res.json(result);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@napp/dti-server",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.3",
|
|
4
4
|
"description": "data transaction interface server library",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
"author": "Farcek <farcek@gmail.com>",
|
|
17
17
|
"license": "ISC",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@napp/dti-core": "4.2.
|
|
20
|
-
"@napp/exception": "^4.1.2"
|
|
21
|
-
"base64url": "latest"
|
|
19
|
+
"@napp/dti-core": "4.2.3",
|
|
20
|
+
"@napp/exception": "^4.1.2"
|
|
22
21
|
}
|
|
23
22
|
}
|
package/route.d.ts
CHANGED
package/route.js
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.DtiServerRoute = void 0;
|
|
7
4
|
const dti_core_1 = require("@napp/dti-core");
|
|
8
|
-
const base64url_1 = __importDefault(require("base64url"));
|
|
9
5
|
class DtiServerRoute {
|
|
10
6
|
constructor(meta, server) {
|
|
11
7
|
this.meta = meta;
|
|
12
8
|
this.server = server;
|
|
9
|
+
this.base62 = new dti_core_1.Base62();
|
|
13
10
|
}
|
|
14
11
|
param(action, req) {
|
|
15
12
|
var _a;
|
|
@@ -21,7 +18,7 @@ class DtiServerRoute {
|
|
|
21
18
|
try {
|
|
22
19
|
let p = (_a = req.query) === null || _a === void 0 ? void 0 : _a.p;
|
|
23
20
|
if (p) {
|
|
24
|
-
let json =
|
|
21
|
+
let json = this.base62.decode(p);
|
|
25
22
|
return JSON.parse(json);
|
|
26
23
|
}
|
|
27
24
|
}
|