badmfck-api-server 5.0.17 → 6.0.1

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.
File without changes
@@ -1 +0,0 @@
1
- "use strict";
File without changes
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,9 +0,0 @@
1
- import { BaseService } from "./BaseService";
2
- export interface IWebsocket {
3
- }
4
- export interface IWebSocketServiceOptions {
5
- }
6
- export declare class WebsocketServerService extends BaseService {
7
- constructor();
8
- init(options?: IWebSocketServiceOptions): Promise<void>;
9
- }
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WebsocketServerService = void 0;
4
- const BaseService_1 = require("./BaseService");
5
- const getDefaultWebSocketServiceOptions = () => {
6
- return {
7
- endpoint: "/ws"
8
- };
9
- };
10
- class WebsocketServerService extends BaseService_1.BaseService {
11
- constructor() {
12
- super("WebsocketServerService");
13
- }
14
- async init(options) {
15
- super.init();
16
- }
17
- }
18
- exports.WebsocketServerService = WebsocketServerService;
@@ -1,10 +0,0 @@
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
- }
@@ -1,24 +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
- 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;
@@ -1,5 +0,0 @@
1
- import { IInterceptor } from "../APIService";
2
- import { HTTPRequestVO } from "../structures/Interfaces";
3
- export declare class IntHmacSha256 implements IInterceptor<any> {
4
- intercept(req: HTTPRequestVO): Promise<any>;
5
- }
@@ -1,22 +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
- exports.IntHmacSha256 = void 0;
7
- const DefaultErrors_1 = __importDefault(require("../structures/DefaultErrors"));
8
- const _TAuthParams = {
9
- v: 0,
10
- ts: "",
11
- nonce: "",
12
- kid: "",
13
- alg: "",
14
- $__alg_optional: true,
15
- sig: ""
16
- };
17
- class IntHmacSha256 {
18
- async intercept(req) {
19
- throw { ...DefaultErrors_1.default.UNAUTHORIZED, details: "Key not found" };
20
- }
21
- }
22
- exports.IntHmacSha256 = IntHmacSha256;