badmfck-api-server 1.6.9 → 1.7.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.
@@ -47,7 +47,7 @@ async function Initializer(services) {
|
|
47
47
|
exports.Initializer = Initializer;
|
48
48
|
class APIService extends BaseService_1.BaseService {
|
49
49
|
static nextLogID = 0;
|
50
|
-
version = "1.6.
|
50
|
+
version = "1.6.9";
|
51
51
|
options;
|
52
52
|
monitor;
|
53
53
|
monitorIndexFile;
|
@@ -248,8 +248,10 @@ class APIService extends BaseService_1.BaseService {
|
|
248
248
|
}
|
249
249
|
sendResponse(res, data, requestTime, endpoint, log) {
|
250
250
|
data.responseTime = (+new Date()) - requestTime;
|
251
|
-
data.
|
251
|
+
data.core = this.version;
|
252
252
|
data.endpoint = endpoint ?? "no_endpoint";
|
253
|
+
if (this.options.appVersion)
|
254
|
+
data.version = this.options.appVersion;
|
253
255
|
if (this.monitor)
|
254
256
|
this.monitor.registrateResponse(data.endpoint, data.responseTime);
|
255
257
|
if (log)
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { BaseEndpoint } from "../BaseEndpoint";
|
2
|
+
import { HTTPRequestVO, TransferPacketVO } from "../structures/Interfaces";
|
3
|
+
export declare class Deployment extends BaseEndpoint {
|
4
|
+
hash: string;
|
5
|
+
constructor({ login, password }: {
|
6
|
+
login: string;
|
7
|
+
password: string;
|
8
|
+
});
|
9
|
+
deploymentHistory(req: HTTPRequestVO): Promise<TransferPacketVO<any>>;
|
10
|
+
}
|
@@ -0,0 +1,24 @@
|
|
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.Deployment = void 0;
|
7
|
+
const BaseEndpoint_1 = require("../BaseEndpoint");
|
8
|
+
const crypto_1 = __importDefault(require("crypto"));
|
9
|
+
const LogService_1 = require("../LogService");
|
10
|
+
class Deployment extends BaseEndpoint_1.BaseEndpoint {
|
11
|
+
hash;
|
12
|
+
constructor({ login, password }) {
|
13
|
+
super("sys-deployment");
|
14
|
+
this.hash = crypto_1.default.createHash("sha256").update(login + password).digest().toString("hex");
|
15
|
+
(0, LogService_1.logWarn)("Deployment initialized at: sys-deployment/" + this.hash);
|
16
|
+
this.registerEndpoints([
|
17
|
+
{ ignoreInterceptor: true, endpoint: this.hash, handler: this.deploymentHistory },
|
18
|
+
]);
|
19
|
+
}
|
20
|
+
async deploymentHistory(req) {
|
21
|
+
return {};
|
22
|
+
}
|
23
|
+
}
|
24
|
+
exports.Deployment = Deployment;
|