mp-front-cli 0.0.28 → 0.0.30

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.
@@ -0,0 +1,5 @@
1
+ import { C as t } from "./custom-encoder-b2078b5c.js";
2
+ import "./mp-front-cli-logger.es.js";
3
+ export {
4
+ t as CustomEncoder
5
+ };
@@ -0,0 +1,9 @@
1
+ import "rxjs";
2
+ import { C as a } from "./custom-header-9a9c64e2.js";
3
+ import "./custom-validator-16ec563a.js";
4
+ import "./mp-front-cli-logger.es.js";
5
+ import "./custom-encoder-b2078b5c.js";
6
+ import "./index-6f6eb615.js";
7
+ export {
8
+ a as CustomHeader
9
+ };
@@ -0,0 +1,55 @@
1
+ var i = Object.defineProperty;
2
+ var n = (r, o, s) => o in r ? i(r, o, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[o] = s;
3
+ var t = (r, o, s) => (n(r, typeof o != "symbol" ? o + "" : o, s), s);
4
+ var g = /* @__PURE__ */ ((r) => (r[r.error = 0] = "error", r[r.warn = 1] = "warn", r[r.info = 2] = "info", r[r.http = 3] = "http", r[r.verbose = 4] = "verbose", r[r.debug = 5] = "debug", r[r.silly = 6] = "silly", r))(g || {});
5
+ const l = {
6
+ error: "\x1B[31m",
7
+ warn: "\x1B[33m",
8
+ info: "\x1B[34m",
9
+ http: "\x1B[35m",
10
+ verbose: "\x1B[32m",
11
+ debug: "\x1B[37m",
12
+ silly: "\x1B[37m"
13
+ };
14
+ class p {
15
+ constructor() {
16
+ t(this, "appName");
17
+ t(this, "logsLevel");
18
+ t(this, "silentLogs");
19
+ this.appName = process.env.APP_LOGS_NAME || "", this.logsLevel = process.env.NODE_ENV == "development" ? "debug" : process.env.LOGS_LEVEL, this.silentLogs = process.env.SILENT_LOGS === "true";
20
+ }
21
+ consoleFormat(o, s) {
22
+ try {
23
+ return `${l[o]} ${this.appName} [${(/* @__PURE__ */ new Date()).toISOString()}] [${o.toUpperCase()}]: ${s.toString()} \x1B[37m`;
24
+ } catch {
25
+ return s;
26
+ }
27
+ }
28
+ log(o, s) {
29
+ o <= g[this.logsLevel] && !this.silentLogs && console.log(this.consoleFormat(g[o], s));
30
+ }
31
+ logError(...o) {
32
+ this.log(0, o);
33
+ }
34
+ logWarn(...o) {
35
+ this.log(1, o);
36
+ }
37
+ logInfo(...o) {
38
+ this.log(2, o);
39
+ }
40
+ logHttp(...o) {
41
+ this.log(3, o);
42
+ }
43
+ logVerbose(...o) {
44
+ this.log(4, o);
45
+ }
46
+ logDebug(...o) {
47
+ this.log(5, o);
48
+ }
49
+ logSilly(...o) {
50
+ this.log(6, o);
51
+ }
52
+ }
53
+ export {
54
+ p as CustomLogger
55
+ };
@@ -0,0 +1,7 @@
1
+ import { C as p } from "./custom-validator-16ec563a.js";
2
+ import "./custom-encoder-b2078b5c.js";
3
+ import "./mp-front-cli-logger.es.js";
4
+ import "./index-6f6eb615.js";
5
+ export {
6
+ p as CustomValidator
7
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mp-front-cli",
3
- "version": "0.0.28",
3
+ "version": "0.0.30",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -26,6 +26,22 @@
26
26
  "types": "./dist/core/utils/rxjs/index.d.ts",
27
27
  "import": "./dist/mp-front-cli-utils-rxjs.es.js"
28
28
  },
29
+ "./core/encoder": {
30
+ "types": "./dist/core/utils/custom-encoder.d.ts",
31
+ "import": "./dist/mp-front-cli-encoder.es.js"
32
+ },
33
+ "./core/header": {
34
+ "types": "./dist/core/utils/custom-header.d.ts",
35
+ "import": "./dist/mp-front-cli-header.es.js"
36
+ },
37
+ "./core/logger": {
38
+ "types": "./dist/core/utils/custom-logger.d.ts",
39
+ "import": "./dist/mp-front-cli-logger.es.js"
40
+ },
41
+ "./core/validator": {
42
+ "types": "./dist/core/utils/custom-validator.d.ts",
43
+ "import": "./dist/mp-front-cli-validator.es.js"
44
+ },
29
45
  "./locale": {
30
46
  "types": "./dist/lang/index.d.ts",
31
47
  "import": "./dist/mp-front-cli-locale.es.js"