vortez 5.0.2 → 6.0.0-dev.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.
- package/build/Template/Template.d.ts +0 -5
- package/build/Template/Template.js +5 -5
- package/build/Template/Template.js.map +1 -1
- package/build/Vortez.d.ts +2 -2
- package/build/Vortez.js +2 -2
- package/build/Vortez.js.map +1 -1
- package/build/beta/Mail.d.ts +2 -8
- package/build/beta/Mail.js +7 -2
- package/build/beta/Mail.js.map +1 -1
- package/build/server/Cookie.d.ts +9 -5
- package/build/server/Cookie.js +28 -24
- package/build/server/Cookie.js.map +1 -1
- package/build/server/LoggerManager.d.ts +1 -1
- package/build/server/LoggerManager.js +5 -5
- package/build/server/LoggerManager.js.map +1 -1
- package/build/server/Response.js +11 -11
- package/build/server/Response.js.map +1 -1
- package/build/server/Server.js +4 -4
- package/build/server/Server.js.map +1 -1
- package/build/server/ServerDebug.d.ts +1 -1
- package/build/server/ServerDebug.js +1 -1
- package/build/server/ServerDebug.js.map +1 -1
- package/build/server/config/Config.d.ts +7 -7
- package/build/server/config/Config.js +4 -3
- package/build/server/config/Config.js.map +1 -1
- package/build/server/config/Loader.js +5 -5
- package/build/server/config/Loader.js.map +1 -1
- package/build/server/router/HttpRule.d.ts +2 -2
- package/build/server/router/HttpRule.js +1 -1
- package/build/server/router/HttpRule.js.map +1 -1
- package/build/server/router/Router.d.ts +1 -1
- package/build/server/router/Router.js +5 -5
- package/build/server/router/Router.js.map +1 -1
- package/build/server/router/Rule.d.ts +1 -1
- package/build/server/router/WsRule.d.ts +2 -2
- package/build/server/router/WsRule.js +2 -2
- package/build/server/router/WsRule.js.map +1 -1
- package/build/server/router/algorithm/Algorithm.d.ts +1 -1
- package/build/server/router/algorithm/Algorithm.js +2 -2
- package/build/server/router/algorithm/Algorithm.js.map +1 -1
- package/build/server/router/algorithm/FIFO.d.ts +1 -1
- package/build/server/router/algorithm/FIFO.js +2 -2
- package/build/server/router/algorithm/FIFO.js.map +1 -1
- package/build/server/router/algorithm/Tree.d.ts +1 -1
- package/build/server/router/algorithm/Tree.js.map +1 -1
- package/build/server/router/middleware/Middleware.d.ts +5 -5
- package/build/server/router/middleware/WsMiddleware.d.ts +4 -4
- package/build/server/router/middleware/WsMiddleware.js +24 -23
- package/build/server/router/middleware/WsMiddleware.js.map +1 -1
- package/build/server/security/PathSecurity.js +5 -5
- package/build/server/security/PathSecurity.js.map +1 -1
- package/build/server/websocket/Codec.d.ts +128 -0
- package/build/server/websocket/Codec.js +192 -0
- package/build/server/websocket/Codec.js.map +1 -0
- package/build/server/websocket/Websocket.d.ts +38 -84
- package/build/server/websocket/Websocket.js +41 -221
- package/build/server/websocket/Websocket.js.map +1 -1
- package/build/server/websocket/WebsocketBase.d.ts +130 -0
- package/build/server/websocket/WebsocketBase.js +272 -0
- package/build/server/websocket/WebsocketBase.js.map +1 -0
- package/build/server/websocket/WebsocketCSInit.d.ts +57 -0
- package/build/server/websocket/WebsocketCSInit.js +95 -0
- package/build/server/websocket/WebsocketCSInit.js.map +1 -0
- package/build/server/websocket/WebsocketSSInit.d.ts +24 -0
- package/build/server/websocket/WebsocketSSInit.js +46 -0
- package/build/server/websocket/WebsocketSSInit.js.map +1 -0
- package/build/server/websocket/frame/Frame.d.ts +31 -0
- package/build/server/websocket/frame/Frame.js +45 -0
- package/build/server/websocket/frame/Frame.js.map +1 -0
- package/build/server/websocket/frame/Header.d.ts +31 -0
- package/build/server/websocket/frame/Header.js +31 -0
- package/build/server/websocket/frame/Header.js.map +1 -0
- package/build/server/websocket/frame/HeaderParser.d.ts +58 -0
- package/build/server/websocket/frame/HeaderParser.js +109 -0
- package/build/server/websocket/frame/HeaderParser.js.map +1 -0
- package/build/server/websocket/handshake/CSHandshaker.d.ts +46 -0
- package/build/server/websocket/handshake/CSHandshaker.js +122 -0
- package/build/server/websocket/handshake/CSHandshaker.js.map +1 -0
- package/build/server/websocket/handshake/SSHandshaker.d.ts +57 -0
- package/build/server/websocket/handshake/SSHandshaker.js +113 -0
- package/build/server/websocket/handshake/SSHandshaker.js.map +1 -0
- package/build/server/websocket/messageAssembler/Message.d.ts +21 -0
- package/build/server/websocket/messageAssembler/Message.js +20 -0
- package/build/server/websocket/messageAssembler/Message.js.map +1 -0
- package/build/server/websocket/messageAssembler/MessageAssembler.d.ts +25 -0
- package/build/server/websocket/messageAssembler/MessageAssembler.js +47 -0
- package/build/server/websocket/messageAssembler/MessageAssembler.js.map +1 -0
- package/changes.md +28 -0
- package/package.json +6 -1
- package/build/logger/Debug.d.ts +0 -174
- package/build/logger/Debug.js +0 -295
- package/build/logger/Debug.js.map +0 -1
- package/build/logger/Logger.d.ts +0 -38
- package/build/logger/Logger.js +0 -48
- package/build/logger/Logger.js.map +0 -1
- package/build/server/websocket/Chunk.d.ts +0 -36
- package/build/server/websocket/Chunk.js +0 -81
- package/build/server/websocket/Chunk.js.map +0 -1
- package/build/utilities/ConsoleUI.d.ts +0 -89
- package/build/utilities/ConsoleUI.js +0 -142
- package/build/utilities/ConsoleUI.js.map +0 -1
- package/build/utilities/DebugUI.d.ts +0 -66
- package/build/utilities/DebugUI.js +0 -98
- package/build/utilities/DebugUI.js.map +0 -1
- package/build/utilities/Encoding.d.ts +0 -22
- package/build/utilities/Encoding.js +0 -26
- package/build/utilities/Encoding.js.map +0 -1
- package/build/utilities/Env.d.ts +0 -81
- package/build/utilities/Env.js +0 -140
- package/build/utilities/Env.js.map +0 -1
- package/build/utilities/File.d.ts +0 -10
- package/build/utilities/File.js +0 -19
- package/build/utilities/File.js.map +0 -1
- package/build/utilities/Flatten.d.ts +0 -73
- package/build/utilities/Flatten.js +0 -76
- package/build/utilities/Flatten.js.map +0 -1
- package/build/utilities/Object.d.ts +0 -16
- package/build/utilities/Object.js +0 -48
- package/build/utilities/Object.js.map +0 -1
- package/build/utilities/Path.d.ts +0 -44
- package/build/utilities/Path.js +0 -69
- package/build/utilities/Path.js.map +0 -1
- package/build/utilities/Time.d.ts +0 -21
- package/build/utilities/Time.js +0 -25
- package/build/utilities/Time.js.map +0 -1
- package/build/utilities/Utilities.d.ts +0 -118
- package/build/utilities/Utilities.js +0 -112
- package/build/utilities/Utilities.js.map +0 -1
- package/build/utilities/schema/Introspection.d.ts +0 -24
- package/build/utilities/schema/Introspection.js +0 -87
- package/build/utilities/schema/Introspection.js.map +0 -1
- package/build/utilities/schema/JSONSchema.d.ts +0 -68
- package/build/utilities/schema/JSONSchema.js +0 -13
- package/build/utilities/schema/JSONSchema.js.map +0 -1
- package/build/utilities/schema/Schema.d.ts +0 -253
- package/build/utilities/schema/Schema.js +0 -241
- package/build/utilities/schema/Schema.js.map +0 -1
- package/build/utilities/schema/SchemaError.d.ts +0 -10
- package/build/utilities/schema/SchemaError.js +0 -13
- package/build/utilities/schema/SchemaError.js.map +0 -1
- package/build/utilities/schema/Validator.d.ts +0 -94
- package/build/utilities/schema/Validator.js +0 -246
- package/build/utilities/schema/Validator.js.map +0 -1
package/build/logger/Logger.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author NetFeez <netfeez.dev@gmail.com>
|
|
3
|
-
* @description Adds a logger class to have organized logs.
|
|
4
|
-
* @license Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import _Debug from "./Debug.js";
|
|
7
|
-
export { Debug } from "./Debug.js";
|
|
8
|
-
export class Logger {
|
|
9
|
-
static LEVEL_MAP = {
|
|
10
|
-
log: `&C2[LOG]`,
|
|
11
|
-
warn: `&C3[WRN]`,
|
|
12
|
-
info: `&C6[INF]`,
|
|
13
|
-
error: `&C1[ERR]`,
|
|
14
|
-
};
|
|
15
|
-
prefix;
|
|
16
|
-
format;
|
|
17
|
-
debug;
|
|
18
|
-
show = true;
|
|
19
|
-
save = true;
|
|
20
|
-
constructor(options = {}) {
|
|
21
|
-
const { prefix = 'Logger', format = '&R&C7', debug = Logger.Debug.default } = options;
|
|
22
|
-
this.prefix = prefix;
|
|
23
|
-
this.format = format;
|
|
24
|
-
if (debug instanceof Logger.Debug)
|
|
25
|
-
this.debug = debug;
|
|
26
|
-
else if (typeof debug === 'string')
|
|
27
|
-
this.debug = Logger.Debug.getInstance(debug);
|
|
28
|
-
else if (typeof debug === 'object')
|
|
29
|
-
this.debug = Logger.Debug.getInstance(debug.id, debug);
|
|
30
|
-
else {
|
|
31
|
-
this.debug = Logger.Debug.default;
|
|
32
|
-
this.warn('The provided option.debug is not valid, the default debug instance will be used.');
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
log(...data) { this.debug.customLog(data, this.getLogOptions('log')); }
|
|
36
|
-
warn(...data) { this.debug.customLog(data, this.getLogOptions('warn')); }
|
|
37
|
-
info(...data) { this.debug.customLog(data, this.getLogOptions('info')); }
|
|
38
|
-
error(...data) { this.debug.customLog(data, this.getLogOptions('error')); }
|
|
39
|
-
getLogOptions(level) {
|
|
40
|
-
const prefix = `${Logger.LEVEL_MAP[level]} [${this.prefix}]${this.format}`;
|
|
41
|
-
return { prefix, save: this.save, show: this.show, };
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
(function (Logger) {
|
|
45
|
-
Logger.Debug = _Debug;
|
|
46
|
-
})(Logger || (Logger = {}));
|
|
47
|
-
export default Logger;
|
|
48
|
-
//# sourceMappingURL=Logger.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Logger.js","sourceRoot":"","sources":["../../src/logger/Logger.ts"],"names":[],"mappings":"AAAA;;;;EAIE;AAEF,OAAO,MAAM,MAAM,YAAY,CAAC;AAEhC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,MAAM,OAAO,MAAM;IACP,MAAM,CAAU,SAAS,GAAoB;QACjD,GAAG,EAAE,UAAU;QACf,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,UAAU;KACpB,CAAA;IACO,MAAM,CAAS;IACf,MAAM,CAAS;IACf,KAAK,CAAe;IACrB,IAAI,GAAY,IA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CAAE,GAAG,IAAW,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAClF,aAAa,CAAC,KAAmB;QACrC,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,EAAE,CAAA;QAC1E,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG,CAAA;IACxD,CAAC;;AAEL,WAAiB,MAAM;IACL,YAAK,GAAG,MAAM,CAAC;AAcjC,CAAC,EAfgB,MAAM,KAAN,MAAM,QAetB;AACD,eAAe,MAAM,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author NetFeez <netfeez.dev@gmail.com>
|
|
3
|
-
* @description Añade la forma de WebSockets a `Vortez`.
|
|
4
|
-
* @license Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
export declare class Chunk implements Chunk.Info {
|
|
7
|
-
fin: Boolean;
|
|
8
|
-
rsv: number;
|
|
9
|
-
opCode: number;
|
|
10
|
-
mask: Boolean;
|
|
11
|
-
size: number | bigint;
|
|
12
|
-
maskKeys: Buffer | null;
|
|
13
|
-
infoSize: number;
|
|
14
|
-
chunkSize: number;
|
|
15
|
-
chunk: Buffer;
|
|
16
|
-
surplus: Buffer;
|
|
17
|
-
constructor(chunk: Buffer);
|
|
18
|
-
pushData(data: Buffer): void;
|
|
19
|
-
getChunk(): Buffer;
|
|
20
|
-
isWaiting(): boolean;
|
|
21
|
-
decode(): Buffer;
|
|
22
|
-
static getInfo(chunk: Buffer): Chunk.Info;
|
|
23
|
-
static decode(chunk: Buffer, bytesInfo: number, maskKeys: Buffer | undefined): Buffer<ArrayBuffer>;
|
|
24
|
-
}
|
|
25
|
-
export declare namespace Chunk {
|
|
26
|
-
interface Info {
|
|
27
|
-
fin: Boolean;
|
|
28
|
-
rsv: number;
|
|
29
|
-
opCode: number;
|
|
30
|
-
mask: Boolean;
|
|
31
|
-
size: number | bigint;
|
|
32
|
-
maskKeys: Buffer | null;
|
|
33
|
-
infoSize: number;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
export default Chunk;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author NetFeez <netfeez.dev@gmail.com>
|
|
3
|
-
* @description Añade la forma de WebSockets a `Vortez`.
|
|
4
|
-
* @license Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
export class Chunk {
|
|
7
|
-
fin;
|
|
8
|
-
rsv;
|
|
9
|
-
opCode;
|
|
10
|
-
mask;
|
|
11
|
-
size;
|
|
12
|
-
maskKeys;
|
|
13
|
-
infoSize;
|
|
14
|
-
chunkSize;
|
|
15
|
-
chunk;
|
|
16
|
-
surplus;
|
|
17
|
-
constructor(chunk) {
|
|
18
|
-
const { fin, rsv, opCode, mask, size, maskKeys, infoSize: infoSize } = Chunk.getInfo(chunk);
|
|
19
|
-
this.fin = fin;
|
|
20
|
-
this.rsv = rsv;
|
|
21
|
-
this.opCode = opCode;
|
|
22
|
-
this.mask = mask;
|
|
23
|
-
this.size = size;
|
|
24
|
-
this.maskKeys = maskKeys;
|
|
25
|
-
this.infoSize = infoSize;
|
|
26
|
-
this.chunkSize = Number(size) + infoSize;
|
|
27
|
-
if (chunk.length > (BigInt(size) + BigInt(infoSize))) {
|
|
28
|
-
this.surplus = chunk.subarray(this.chunkSize);
|
|
29
|
-
this.chunk = chunk.subarray(0, this.chunkSize);
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
this.surplus = Buffer.alloc(0);
|
|
33
|
-
this.chunk = chunk;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
pushData(data) {
|
|
37
|
-
this.chunk = Buffer.concat([this.chunk, data]);
|
|
38
|
-
if (this.chunk.length > this.chunkSize) {
|
|
39
|
-
this.surplus = this.chunk.subarray(this.chunkSize);
|
|
40
|
-
this.chunk = this.chunk.subarray(0, this.chunkSize);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
getChunk() { return this.chunk; }
|
|
44
|
-
isWaiting() { return this.chunk.length < this.chunkSize; }
|
|
45
|
-
decode() {
|
|
46
|
-
return Chunk.decode(this.chunk, this.infoSize, this.maskKeys ?? undefined);
|
|
47
|
-
}
|
|
48
|
-
static getInfo(chunk) {
|
|
49
|
-
const fin = Boolean(((chunk[0] >>> 0x7) & 0x01));
|
|
50
|
-
const rsv = ((chunk[0] >>> 0x4) & 0x07);
|
|
51
|
-
const opCode = (chunk[0] & 0x0f);
|
|
52
|
-
const mask = Boolean(((chunk[1] >>> 0x7) & 0x01));
|
|
53
|
-
let size = (chunk[1] & 0x7f);
|
|
54
|
-
let maskKeys = null;
|
|
55
|
-
let bytesInfo = null;
|
|
56
|
-
if (size == 0x7f) {
|
|
57
|
-
size = chunk.readBigUint64BE(2);
|
|
58
|
-
maskKeys = mask ? chunk.subarray(10, 14) : null;
|
|
59
|
-
bytesInfo = mask ? 14 : 10;
|
|
60
|
-
}
|
|
61
|
-
else if (size == 0x7e) {
|
|
62
|
-
size = chunk.readUint16BE(2);
|
|
63
|
-
maskKeys = mask ? chunk.subarray(4, 8) : null;
|
|
64
|
-
bytesInfo = mask ? 8 : 4;
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
maskKeys = mask ? chunk.subarray(2, 6) : null;
|
|
68
|
-
bytesInfo = mask ? 6 : 2;
|
|
69
|
-
}
|
|
70
|
-
return { fin, rsv, opCode, mask, size, maskKeys, infoSize: bytesInfo };
|
|
71
|
-
}
|
|
72
|
-
static decode(chunk, bytesInfo, maskKeys) {
|
|
73
|
-
const decoded = [];
|
|
74
|
-
for (let index = bytesInfo, indexMask = 0; index < chunk.length; index++, indexMask++) {
|
|
75
|
-
decoded.push(chunk[index] ^ (maskKeys ? maskKeys[indexMask % 4] : 0));
|
|
76
|
-
}
|
|
77
|
-
return Buffer.from(decoded);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
export default Chunk;
|
|
81
|
-
//# sourceMappingURL=Chunk.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Chunk.js","sourceRoot":"","sources":["../../../src/server/websocket/Chunk.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,OAAO,KAAK;IACP,GAAG,CAAU;IACb,GAAG,CAAS;IACZ,MAAM,CAAS;IACf,IAAI,CAAU;IACd,IAAI,CAAkB;IACtB,QAAQ,CAAgB;IACxB,QAAQ,CAAS;IACjB,SAAS,CAAS;IAClB,KAAK,CAAS;IACd,OAAO,CAAS;IACvB,YAAmB,KAAa;QAC5B,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC5F,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;QACzC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;YACnD,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI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C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC3E,CAAC;IACM,MAAM,CAAC,MAAM,CAAC,KAAa,EAAE,SAAiB,EAAE,QAA4B;QAC/E,MAAM,OAAO,GAAG,EAAE,CAAC;QACnB,KAAI,IAAI,KAAK,GAAG,SAAS,EAAE,SAAS,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC;YACnF,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,GAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxE,CAAC;QACD,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;CACJ;AAcD,eAAe,KAAK,CAAC"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author NetFeez <netfeez.dev@gmail.com>
|
|
3
|
-
* @description Provides a console-based user interface for formatting text with colors and styles, as well as sending messages to the console.
|
|
4
|
-
* This is useful for enhancing the readability of console output and providing a more engaging user experience when interacting with the command line.
|
|
5
|
-
* @license Apache-2.0
|
|
6
|
-
*/
|
|
7
|
-
export declare class ConsoleUI {
|
|
8
|
-
private static formatString;
|
|
9
|
-
private static rgbString;
|
|
10
|
-
private static readonly formats;
|
|
11
|
-
/**
|
|
12
|
-
* Delete text formats and colors.
|
|
13
|
-
* Removes all custom formatting and color codes from a string,
|
|
14
|
-
* returning a plain text string.
|
|
15
|
-
* @param text - The input string potentially containing formatting codes.
|
|
16
|
-
* @param prefix - The custom prefix used for formatting codes (default: '&').
|
|
17
|
-
*/
|
|
18
|
-
static cleanFormat(text: string, prefix?: string): string;
|
|
19
|
-
/**
|
|
20
|
-
* Applies formatting and colors to text for console output using specific codes.
|
|
21
|
-
* This method processes a string, replacing custom formatting and color codes with
|
|
22
|
-
* ANSI escape codes to enable rich text output in terminals that support them.
|
|
23
|
-
*
|
|
24
|
-
* @param text - The input string containing formatting codes.
|
|
25
|
-
* @param prefix - The character used to denote a formatting or color code.
|
|
26
|
-
* Defaults to `&`.
|
|
27
|
-
*
|
|
28
|
-
* @returns The formatted string with ANSI escape codes.
|
|
29
|
-
*
|
|
30
|
-
* ---
|
|
31
|
-
*
|
|
32
|
-
* The formatting and coloring system works by identifying sequences starting with the
|
|
33
|
-
* defined `prefix` followed by a specific code. These codes are then replaced with
|
|
34
|
-
* the corresponding ANSI escape codes.
|
|
35
|
-
*
|
|
36
|
-
* **Available Codes:**
|
|
37
|
-
*
|
|
38
|
-
* | Code | Description | Example |
|
|
39
|
-
* | ---------------- | ----------------------------------------------- | -------------- |
|
|
40
|
-
* | `%prefix%N` | **Bold** | `&NBold Text&R`|
|
|
41
|
-
* | `%prefix%S` | Underline | `&SUnderlined&R`|
|
|
42
|
-
* | `%prefix%P` | Blink (Support varies) | `&PBlinking&R` |
|
|
43
|
-
* | `%prefix%I` | Invert (Swap foreground/background) | `&IInverted&R` |
|
|
44
|
-
* | `%prefix%R` | Reset (All formatting) | `&RNormal&R` |
|
|
45
|
-
*
|
|
46
|
-
* | Standard Colors | Description | Foreground Code | Background Code | Example |
|
|
47
|
-
* | --------------- | ----------------- | --------------- | --------------- | ------------- |
|
|
48
|
-
* | `0` | Black | `%prefix%C0` | `%prefix%B0` | `&C0Black&R` |
|
|
49
|
-
* | `1` | Red | `%prefix%C1` | `%prefix%B1` | `&B1Red BG&R` |
|
|
50
|
-
* | `2` | Green | `%prefix%C2` | `%prefix%B2` | `&C2Green&R`|
|
|
51
|
-
* | `3` | Yellow | `%prefix%C3` | `%prefix%B3` | `&B3Yellow BG&R`|
|
|
52
|
-
* | `4` | Blue | `%prefix%C4` | `%prefix%B4` | `&C4Blue&R` |
|
|
53
|
-
* | `5` | Magenta | `%prefix%C5` | `%prefix%B5` | `&B5Magenta BG&R`|
|
|
54
|
-
* | `6` | Cyan | `%prefix%C6` | `%prefix%B6` | `&C6Cyan&R` |
|
|
55
|
-
* | `7` | White | `%prefix%C7` | `%prefix%B7` | `&B7White BG&R`|
|
|
56
|
-
*
|
|
57
|
-
* | RGB Colors | Description | Example (Text) | Example (BG) |
|
|
58
|
-
* | ------------------- | --------------------------------------------- | -------------- | ------------ |
|
|
59
|
-
* | `%prefix%C(R,G,B)` | Foreground color using RGB (0-255 for R,G,B) | `&C(255,0,0)Red` | N/A |
|
|
60
|
-
* | `%prefix%B(R,G,B)` | Background color using RGB (0-255 for R,G,B) | N/A | `&B(0,0,255)Blue BG` |
|
|
61
|
-
*
|
|
62
|
-
* **Notes:**
|
|
63
|
-
*
|
|
64
|
-
* - Do not include spaces after the commas within the parentheses for RGB codes.
|
|
65
|
-
* - Multiple codes can be combined, e.g., `&N&C1Bold Red Text&R`.
|
|
66
|
-
* - The `%prefix%R` code is automatically appended to the end of the output string
|
|
67
|
-
* to ensure subsequent console output is not affected by the formatting.
|
|
68
|
-
* - Terminal support for colors and formatting may vary.
|
|
69
|
-
* ---
|
|
70
|
-
*
|
|
71
|
-
* **Examples:**
|
|
72
|
-
* - `&N&C4Bold Blue Text&R`: Displays "Bold Blue Text" in bold and blue, then resets formatting.
|
|
73
|
-
* - `&B2Green Background&R`: Displays "Green Background" with a green background and default text color, then resets.
|
|
74
|
-
* - `&C(255,165,0)&SOrange Underlined Text&R`: Displays "Orange Underlined Text" in orange and underlined, then resets.
|
|
75
|
-
* - `&IInverted Colors&R`: Displays "Inverted Colors" with foreground and background colors swapped, then resets.
|
|
76
|
-
* - `&N&C1Error: &R&C7File not found.` : Displays "Error:" in bold red and "File not found." in white, then resets.
|
|
77
|
-
*/
|
|
78
|
-
static formatText(text: string, prefix?: string): string;
|
|
79
|
-
/**
|
|
80
|
-
* Sends a message to the user through the console.
|
|
81
|
-
* @param message - The message(s) you want to send to the user.
|
|
82
|
-
* @param newLine - Whether there is a line break or not.
|
|
83
|
-
*/
|
|
84
|
-
static send(message: string | string[], newLine?: boolean): void;
|
|
85
|
-
}
|
|
86
|
-
export declare namespace ConsoleUI {
|
|
87
|
-
type formatKey = ('N' | 'S' | 'P' | 'I' | 'R' | 'C0' | 'C1' | 'C2' | 'C3' | 'C4' | 'C5' | 'C6' | 'C7' | 'C' | 'B0' | 'B1' | 'B2' | 'B3' | 'B4' | 'B5' | 'B6' | 'B7' | 'B');
|
|
88
|
-
}
|
|
89
|
-
export default ConsoleUI;
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author NetFeez <netfeez.dev@gmail.com>
|
|
3
|
-
* @description Provides a console-based user interface for formatting text with colors and styles, as well as sending messages to the console.
|
|
4
|
-
* This is useful for enhancing the readability of console output and providing a more engaging user experience when interacting with the command line.
|
|
5
|
-
* @license Apache-2.0
|
|
6
|
-
*/
|
|
7
|
-
export class ConsoleUI {
|
|
8
|
-
static formatString = '%prefix%((?:(?:[BC])[0-7])|[NSPIR])';
|
|
9
|
-
static rgbString = '%prefix%(?:([BC])\\((?:([0-2]?[0-9]{1,2}), ?([0-2]?[0-9]{1,2}), ?([0-2]?[0-9]{1,2}))\\))';
|
|
10
|
-
static formats = {
|
|
11
|
-
// Var: Code // Text color
|
|
12
|
-
C0: '\x1B[30m', // Black
|
|
13
|
-
C1: '\x1B[31m', // Red
|
|
14
|
-
C2: '\x1B[32m', // Green
|
|
15
|
-
C3: '\x1B[33m', // Yellow
|
|
16
|
-
C4: '\x1B[34m', // Blue
|
|
17
|
-
C5: '\x1B[35m', // Magenta
|
|
18
|
-
C6: '\x1B[36m', // Cyan
|
|
19
|
-
C7: '\x1B[37m', // White
|
|
20
|
-
C: '\x1B[38;2;R;G;Bm', // (R,G,B)
|
|
21
|
-
// Var: Code // Background color
|
|
22
|
-
B0: '\x1B[40m', // Black background
|
|
23
|
-
B1: '\x1B[41m', // Red background
|
|
24
|
-
B2: '\x1B[42m', // Green background
|
|
25
|
-
B3: '\x1B[43m', // Yellow background
|
|
26
|
-
B4: '\x1B[44m', // Blue background
|
|
27
|
-
B5: '\x1B[45m', // Magenta background
|
|
28
|
-
B6: '\x1B[46m', // Cyan background
|
|
29
|
-
B7: '\x1B[47m', // White background
|
|
30
|
-
B: '\x1B[48;2;R;G;Bm', // (R,G,B)
|
|
31
|
-
// Var: Code // Text format
|
|
32
|
-
N: '\x1B[1m', // Bold
|
|
33
|
-
S: '\x1B[4m', // Underline
|
|
34
|
-
P: '\x1B[5m', // Blink
|
|
35
|
-
I: '\x1B[7m', // Invert
|
|
36
|
-
R: '\x1B[0m', // Reset
|
|
37
|
-
none: ''
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Delete text formats and colors.
|
|
41
|
-
* Removes all custom formatting and color codes from a string,
|
|
42
|
-
* returning a plain text string.
|
|
43
|
-
* @param text - The input string potentially containing formatting codes.
|
|
44
|
-
* @param prefix - The custom prefix used for formatting codes (default: '&').
|
|
45
|
-
*/
|
|
46
|
-
static cleanFormat(text, prefix = '&') {
|
|
47
|
-
const formatExp = new RegExp(this.formatString.replace('%prefix%', prefix), 'g');
|
|
48
|
-
const rgbExp = new RegExp(this.rgbString.replace('%prefix%', prefix), 'g');
|
|
49
|
-
return text.replace(formatExp, '').replace(rgbExp, '');
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Applies formatting and colors to text for console output using specific codes.
|
|
53
|
-
* This method processes a string, replacing custom formatting and color codes with
|
|
54
|
-
* ANSI escape codes to enable rich text output in terminals that support them.
|
|
55
|
-
*
|
|
56
|
-
* @param text - The input string containing formatting codes.
|
|
57
|
-
* @param prefix - The character used to denote a formatting or color code.
|
|
58
|
-
* Defaults to `&`.
|
|
59
|
-
*
|
|
60
|
-
* @returns The formatted string with ANSI escape codes.
|
|
61
|
-
*
|
|
62
|
-
* ---
|
|
63
|
-
*
|
|
64
|
-
* The formatting and coloring system works by identifying sequences starting with the
|
|
65
|
-
* defined `prefix` followed by a specific code. These codes are then replaced with
|
|
66
|
-
* the corresponding ANSI escape codes.
|
|
67
|
-
*
|
|
68
|
-
* **Available Codes:**
|
|
69
|
-
*
|
|
70
|
-
* | Code | Description | Example |
|
|
71
|
-
* | ---------------- | ----------------------------------------------- | -------------- |
|
|
72
|
-
* | `%prefix%N` | **Bold** | `&NBold Text&R`|
|
|
73
|
-
* | `%prefix%S` | Underline | `&SUnderlined&R`|
|
|
74
|
-
* | `%prefix%P` | Blink (Support varies) | `&PBlinking&R` |
|
|
75
|
-
* | `%prefix%I` | Invert (Swap foreground/background) | `&IInverted&R` |
|
|
76
|
-
* | `%prefix%R` | Reset (All formatting) | `&RNormal&R` |
|
|
77
|
-
*
|
|
78
|
-
* | Standard Colors | Description | Foreground Code | Background Code | Example |
|
|
79
|
-
* | --------------- | ----------------- | --------------- | --------------- | ------------- |
|
|
80
|
-
* | `0` | Black | `%prefix%C0` | `%prefix%B0` | `&C0Black&R` |
|
|
81
|
-
* | `1` | Red | `%prefix%C1` | `%prefix%B1` | `&B1Red BG&R` |
|
|
82
|
-
* | `2` | Green | `%prefix%C2` | `%prefix%B2` | `&C2Green&R`|
|
|
83
|
-
* | `3` | Yellow | `%prefix%C3` | `%prefix%B3` | `&B3Yellow BG&R`|
|
|
84
|
-
* | `4` | Blue | `%prefix%C4` | `%prefix%B4` | `&C4Blue&R` |
|
|
85
|
-
* | `5` | Magenta | `%prefix%C5` | `%prefix%B5` | `&B5Magenta BG&R`|
|
|
86
|
-
* | `6` | Cyan | `%prefix%C6` | `%prefix%B6` | `&C6Cyan&R` |
|
|
87
|
-
* | `7` | White | `%prefix%C7` | `%prefix%B7` | `&B7White BG&R`|
|
|
88
|
-
*
|
|
89
|
-
* | RGB Colors | Description | Example (Text) | Example (BG) |
|
|
90
|
-
* | ------------------- | --------------------------------------------- | -------------- | ------------ |
|
|
91
|
-
* | `%prefix%C(R,G,B)` | Foreground color using RGB (0-255 for R,G,B) | `&C(255,0,0)Red` | N/A |
|
|
92
|
-
* | `%prefix%B(R,G,B)` | Background color using RGB (0-255 for R,G,B) | N/A | `&B(0,0,255)Blue BG` |
|
|
93
|
-
*
|
|
94
|
-
* **Notes:**
|
|
95
|
-
*
|
|
96
|
-
* - Do not include spaces after the commas within the parentheses for RGB codes.
|
|
97
|
-
* - Multiple codes can be combined, e.g., `&N&C1Bold Red Text&R`.
|
|
98
|
-
* - The `%prefix%R` code is automatically appended to the end of the output string
|
|
99
|
-
* to ensure subsequent console output is not affected by the formatting.
|
|
100
|
-
* - Terminal support for colors and formatting may vary.
|
|
101
|
-
* ---
|
|
102
|
-
*
|
|
103
|
-
* **Examples:**
|
|
104
|
-
* - `&N&C4Bold Blue Text&R`: Displays "Bold Blue Text" in bold and blue, then resets formatting.
|
|
105
|
-
* - `&B2Green Background&R`: Displays "Green Background" with a green background and default text color, then resets.
|
|
106
|
-
* - `&C(255,165,0)&SOrange Underlined Text&R`: Displays "Orange Underlined Text" in orange and underlined, then resets.
|
|
107
|
-
* - `&IInverted Colors&R`: Displays "Inverted Colors" with foreground and background colors swapped, then resets.
|
|
108
|
-
* - `&N&C1Error: &R&C7File not found.` : Displays "Error:" in bold red and "File not found." in white, then resets.
|
|
109
|
-
*/
|
|
110
|
-
static formatText(text, prefix = '&') {
|
|
111
|
-
const formatExp = new RegExp(this.formatString.replace('%prefix%', prefix), 'g');
|
|
112
|
-
const rgbExp = new RegExp(this.rgbString.replace('%prefix%', prefix), 'g');
|
|
113
|
-
return `${text
|
|
114
|
-
.replace(formatExp, (result, format) => this.formats[format])
|
|
115
|
-
.replace(rgbExp, (result, type, R, G, B) => (this.formats[type]
|
|
116
|
-
.replace('R', R)
|
|
117
|
-
.replace('G', G)
|
|
118
|
-
.replace('B', B)))}${this.formats.R}`;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Sends a message to the user through the console.
|
|
122
|
-
* @param message - The message(s) you want to send to the user.
|
|
123
|
-
* @param newLine - Whether there is a line break or not.
|
|
124
|
-
*/
|
|
125
|
-
static send(message, newLine) {
|
|
126
|
-
if (typeof message === 'string') {
|
|
127
|
-
process.stdout.write(`${message}${newLine ? '\n' : ''}`, 'utf8');
|
|
128
|
-
}
|
|
129
|
-
else if (Array.isArray(message)) {
|
|
130
|
-
message.forEach((value) => {
|
|
131
|
-
this.send(value);
|
|
132
|
-
});
|
|
133
|
-
if (newLine)
|
|
134
|
-
process.stdout.write(`\n`, 'utf8');
|
|
135
|
-
}
|
|
136
|
-
else {
|
|
137
|
-
process.stdout.write('[consoleUI] You tried to send a failed type \n');
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
export default ConsoleUI;
|
|
142
|
-
//# sourceMappingURL=ConsoleUI.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConsoleUI.js","sourceRoot":"","sources":["../../src/utilities/ConsoleUI.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,OAAO,SAAS;IACV,MAAM,CAAC,YAAY,GAAG,qCAAqC,CAAC;IAC5D,MAAM,CAAC,SAAS,GAAG,0FAA0F,CAAC;IAC9G,MAAM,CAAU,OAAO,GAAG;QAC9B,6BAA6B;QAC7B,EAAE,EAAE,UAAU,EAAE,QAAQ;QACxB,EAAE,EAAE,UAAU,EAAE,MAAM;QACtB,EAAE,EAAE,UAAU,EAAE,QAAQ;QACxB,EAAE,EAAE,UAAU,EAAE,SAAS;QACzB,EAAE,EAAE,UAAU,EAAE,OAAO;QACvB,EAAE,EAAE,UAAU,EAAE,UAAU;QAC1B,EAAE,EAAE,UAAU,EAAE,OAAO;QACvB,EAAE,EAAE,UAAU,EAAE,QAAQ;QACxB,CAAC,EAAE,kBAAkB,EAAE,UAAU;QACjC,mCAAmC;QACnC,EAAE,EAAE,UAAU,EAAE,mBAAmB;QAC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C,KAAK,CAAC,gDAAgD,CAAC,CAAC;QAC3E,CAAC;IACL,CAAC;;AAWL,eAAe,SAAS,CAAC"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author NetFeez <netfeez.dev@gmail.com>
|
|
3
|
-
* @description Provides a console-based debugging interface for the Vortez project, allowing developers to execute commands and receive feedback in real-time. This is useful for testing and debugging purposes, providing a simple way to interact with the application through a command-line interface.
|
|
4
|
-
* @license Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import Logger from '../logger/Logger.js';
|
|
7
|
-
export declare class DebugUI {
|
|
8
|
-
protected dataHandleInstance: DebugUI.dataHandler;
|
|
9
|
-
prompt: string;
|
|
10
|
-
in: NodeJS.ReadStream;
|
|
11
|
-
out: Logger;
|
|
12
|
-
commandMap: DebugUI.CommandMap;
|
|
13
|
-
constructor(prefix?: string);
|
|
14
|
-
/** Starts the console UI. */
|
|
15
|
-
protected startReadIn(): void;
|
|
16
|
-
/** Stops the console UI. */
|
|
17
|
-
protected stopReadIn(): void;
|
|
18
|
-
/** Starts the console UI. */
|
|
19
|
-
start(): void;
|
|
20
|
-
/** Stops the console UI. */
|
|
21
|
-
stop(): void;
|
|
22
|
-
/**
|
|
23
|
-
* Handles incoming data from the client.
|
|
24
|
-
* @param data - The incoming data buffer.
|
|
25
|
-
*/
|
|
26
|
-
protected dataHandler(data: Buffer): Promise<void>;
|
|
27
|
-
/**
|
|
28
|
-
* Gets a command by name.
|
|
29
|
-
* @param command - The name of the command.
|
|
30
|
-
* @returns The command or undefined if not found.
|
|
31
|
-
*/
|
|
32
|
-
getCommand(command: string): DebugUI.Command | undefined;
|
|
33
|
-
/**
|
|
34
|
-
* Adds a command to the command map.
|
|
35
|
-
* @param command - The name of the command.
|
|
36
|
-
* @param exec - The command execution function.
|
|
37
|
-
* @param info - Additional information about the command.
|
|
38
|
-
* @returns The DebugUI instance for chaining.
|
|
39
|
-
*/
|
|
40
|
-
addCommand(command: string, exec: DebugUI.commandExec, info?: DebugUI.CommandInfo): this;
|
|
41
|
-
/**
|
|
42
|
-
* Removes a command from the command map.
|
|
43
|
-
* @param command - The name of the command.
|
|
44
|
-
* @returns The DebugUI instance for chaining.
|
|
45
|
-
*/
|
|
46
|
-
removeCommand(command: string): this;
|
|
47
|
-
/** Prints the command map to the console.*/
|
|
48
|
-
protected addDefaultCommands(): void;
|
|
49
|
-
protected showHelp(): void;
|
|
50
|
-
}
|
|
51
|
-
export declare namespace DebugUI {
|
|
52
|
-
type dataHandler = (data: Buffer) => void;
|
|
53
|
-
type commandExec = (this: DebugUI, command: string, args: string[]) => Promise<void> | void;
|
|
54
|
-
interface CommandInfo {
|
|
55
|
-
description?: string;
|
|
56
|
-
usage?: string;
|
|
57
|
-
}
|
|
58
|
-
interface Command extends CommandInfo {
|
|
59
|
-
name: string;
|
|
60
|
-
exec: commandExec;
|
|
61
|
-
}
|
|
62
|
-
interface CommandMap {
|
|
63
|
-
[command: string]: Command;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
export default DebugUI;
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author NetFeez <netfeez.dev@gmail.com>
|
|
3
|
-
* @description Provides a console-based debugging interface for the Vortez project, allowing developers to execute commands and receive feedback in real-time. This is useful for testing and debugging purposes, providing a simple way to interact with the application through a command-line interface.
|
|
4
|
-
* @license Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import ConsoleUI from './ConsoleUI.js';
|
|
7
|
-
import Logger from '../logger/Logger.js';
|
|
8
|
-
export class DebugUI {
|
|
9
|
-
dataHandleInstance;
|
|
10
|
-
prompt;
|
|
11
|
-
in;
|
|
12
|
-
out;
|
|
13
|
-
commandMap;
|
|
14
|
-
constructor(prefix = 'C-UI') {
|
|
15
|
-
this.dataHandleInstance = this.dataHandler.bind(this);
|
|
16
|
-
this.prompt = ConsoleUI.formatText("&C(255,180,220)[Vortez] << &C6&S");
|
|
17
|
-
this.in = process.stdin;
|
|
18
|
-
this.out = new Logger({ prefix, debug: 'console-ui' });
|
|
19
|
-
this.commandMap = {};
|
|
20
|
-
this.addDefaultCommands();
|
|
21
|
-
}
|
|
22
|
-
/** Starts the console UI. */
|
|
23
|
-
startReadIn() {
|
|
24
|
-
this.in.on('data', this.dataHandleInstance);
|
|
25
|
-
ConsoleUI.send(this.prompt);
|
|
26
|
-
}
|
|
27
|
-
/** Stops the console UI. */
|
|
28
|
-
stopReadIn() { this.in.off('data', this.dataHandleInstance); }
|
|
29
|
-
/** Starts the console UI. */
|
|
30
|
-
start() { this.startReadIn(); }
|
|
31
|
-
/** Stops the console UI. */
|
|
32
|
-
stop() { this.stopReadIn(); }
|
|
33
|
-
/**
|
|
34
|
-
* Handles incoming data from the client.
|
|
35
|
-
* @param data - The incoming data buffer.
|
|
36
|
-
*/
|
|
37
|
-
async dataHandler(data) {
|
|
38
|
-
const [cmd, ...args] = data.toString('utf-8').trim().split(' ');
|
|
39
|
-
this.out.log(`&C(80,0,80)command received: &C3${cmd}`, args);
|
|
40
|
-
try {
|
|
41
|
-
const command = this.commandMap[cmd];
|
|
42
|
-
if (command)
|
|
43
|
-
await command.exec.bind(this)(cmd, args);
|
|
44
|
-
else
|
|
45
|
-
this.out.error(`&C1Unknown command: &C3${cmd}`);
|
|
46
|
-
}
|
|
47
|
-
catch (error) {
|
|
48
|
-
this.out.error(`&C1Error executing command: &C3${cmd}`, error);
|
|
49
|
-
}
|
|
50
|
-
if (cmd !== 'exit-debug')
|
|
51
|
-
ConsoleUI.send(this.prompt);
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Gets a command by name.
|
|
55
|
-
* @param command - The name of the command.
|
|
56
|
-
* @returns The command or undefined if not found.
|
|
57
|
-
*/
|
|
58
|
-
getCommand(command) { return this.commandMap[command]; }
|
|
59
|
-
/**
|
|
60
|
-
* Adds a command to the command map.
|
|
61
|
-
* @param command - The name of the command.
|
|
62
|
-
* @param exec - The command execution function.
|
|
63
|
-
* @param info - Additional information about the command.
|
|
64
|
-
* @returns The DebugUI instance for chaining.
|
|
65
|
-
*/
|
|
66
|
-
addCommand(command, exec, info) {
|
|
67
|
-
this.commandMap[command] = { name: command, exec, ...info };
|
|
68
|
-
return this;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Removes a command from the command map.
|
|
72
|
-
* @param command - The name of the command.
|
|
73
|
-
* @returns The DebugUI instance for chaining.
|
|
74
|
-
*/
|
|
75
|
-
removeCommand(command) {
|
|
76
|
-
delete this.commandMap[command];
|
|
77
|
-
return this;
|
|
78
|
-
}
|
|
79
|
-
/** Prints the command map to the console.*/
|
|
80
|
-
addDefaultCommands() {
|
|
81
|
-
this.addCommand('help', this.showHelp.bind(this), { description: '&C6Shows this help', usage: 'help' });
|
|
82
|
-
this.addCommand('exit', () => process.exit(), { description: '&C6Exits the process', usage: 'exit' });
|
|
83
|
-
}
|
|
84
|
-
showHelp() {
|
|
85
|
-
this.out.info('&C(255,180,220)╭─────────────────────────────────────────────');
|
|
86
|
-
this.out.info('&C(255,180,220)│ &C1Vortez &C3Debugger &C1by NetFeez');
|
|
87
|
-
this.out.info('&C(255,180,220)│ &C1Commands:');
|
|
88
|
-
for (const index in this.commandMap) {
|
|
89
|
-
const command = this.commandMap[index];
|
|
90
|
-
this.out.info(`&C(255,180,220)│ > &C3${command.name}`);
|
|
91
|
-
this.out.info(`&C(255,180,220)│ - &C(255,255,255)Usage: &C6${command.usage ?? ''}`);
|
|
92
|
-
this.out.info(`&C(255,180,220)│ - &C(255,255,255)${command.description ?? ''}`);
|
|
93
|
-
}
|
|
94
|
-
this.out.info('&C(255,180,220)╰─────────────────────────────────────────────');
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
export default DebugUI;
|
|
98
|
-
//# sourceMappingURL=DebugUI.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DebugUI.js","sourceRoot":"","sources":["../../src/utilities/DebugUI.ts"],"names":[],"mapp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I,CAAC,IAAI,CAAC,EAAE,EAAE,WAAW,EAAE,oBAAoB,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;QACxG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAE,sBAAsB,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IAC1G,CAAC;IACS,QAAQ;QACpB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,+DAA+D,CAAC,CAAC;QACzE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAC;QACtE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;QAC/C,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YAClC,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YACvC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,2BAA2B,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;YACzD,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,mDAAmD,OAAO,CAAC,KAAK,IAAI,EAAE,EAAE,CAAC,CAAC;YACxF,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,yCAAyC,OAAO,CAAC,WAAW,IAAI,EAAE,EAAE,CAAC,CAAC;QACxF,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,+DAA+D,CAAC,CAAC;IACnF,CAAC;CACJ;AAgBD,eAAe,OAAO,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author NetFeez <netfeez.dev@gmail.com>
|
|
3
|
-
* @description Provides utilities for encoding and decoding data, such as base64url encoding.
|
|
4
|
-
* This is useful for handling data transformations that are commonly needed in web applications, such as encoding data for transmission or storage.
|
|
5
|
-
* @license Apache-2.0
|
|
6
|
-
*/
|
|
7
|
-
export declare class Encoding {
|
|
8
|
-
/**
|
|
9
|
-
* Encodes a string to base64url format.
|
|
10
|
-
* @param data - The string to encode.
|
|
11
|
-
* @returns The base64url-encoded string.
|
|
12
|
-
*/
|
|
13
|
-
static base64UrlEncode(data: string): string;
|
|
14
|
-
/**
|
|
15
|
-
* Decodes a base64url-encoded string.
|
|
16
|
-
* @param data - The base64url-encoded string to decode.
|
|
17
|
-
* @returns The decoded UTF-8 string.
|
|
18
|
-
*/
|
|
19
|
-
static base64UrlDecode(data: string): string;
|
|
20
|
-
}
|
|
21
|
-
export declare namespace Encoding { }
|
|
22
|
-
export default Encoding;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author NetFeez <netfeez.dev@gmail.com>
|
|
3
|
-
* @description Provides utilities for encoding and decoding data, such as base64url encoding.
|
|
4
|
-
* This is useful for handling data transformations that are commonly needed in web applications, such as encoding data for transmission or storage.
|
|
5
|
-
* @license Apache-2.0
|
|
6
|
-
*/
|
|
7
|
-
export class Encoding {
|
|
8
|
-
/**
|
|
9
|
-
* Encodes a string to base64url format.
|
|
10
|
-
* @param data - The string to encode.
|
|
11
|
-
* @returns The base64url-encoded string.
|
|
12
|
-
*/
|
|
13
|
-
static base64UrlEncode(data) {
|
|
14
|
-
return Buffer.from(data).toString('base64url');
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Decodes a base64url-encoded string.
|
|
18
|
-
* @param data - The base64url-encoded string to decode.
|
|
19
|
-
* @returns The decoded UTF-8 string.
|
|
20
|
-
*/
|
|
21
|
-
static base64UrlDecode(data) {
|
|
22
|
-
return Buffer.from(data, 'base64url').toString('utf8');
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
export default Encoding;
|
|
26
|
-
//# sourceMappingURL=Encoding.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Encoding.js","sourceRoot":"","sources":["../../src/utilities/Encoding.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,OAAO,QAAQ;IACjB;;;;OAIG;IACI,MAAM,CAAC,eAAe,CAAC,IAAY;QACtC,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACnD,CAAC;IACD;;;;OAIG;IACI,MAAM,CAAC,eAAe,CAAC,IAAY;QACtC,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3D,CAAC;CACJ;AAGD,eAAe,QAAQ,CAAC"}
|