mp-front-cli 0.0.38 → 0.0.40
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/dist/core/middleware/index.d.ts +2 -2
- package/dist/core/utils/custom-encoder.d.ts +2 -2
- package/dist/core/utils/custom-encoder.d.ts.map +1 -1
- package/dist/core/utils/custom-encrypter.d.ts +2 -2
- package/dist/core/utils/custom-encrypter.d.ts.map +1 -1
- package/dist/core/utils/custom-header.d.ts +2 -2
- package/dist/custom-encoder-70a77460.js +3734 -0
- package/dist/custom-header-1fcfa265.js +21025 -0
- package/dist/{custom-validator-9ec2d3d0.js → custom-validator-8a042f7f.js} +512 -512
- package/dist/mp-front-cli-all.es.js +15 -14
- package/dist/mp-front-cli-core.es.js +31 -30
- package/dist/mp-front-cli-encoder.es.js +2 -2
- package/dist/mp-front-cli-header.es.js +6 -5
- package/dist/mp-front-cli-logger.es.js +53 -2
- package/dist/mp-front-cli-validator.es.js +3 -3
- package/package.json +2 -3
- package/dist/custom-encoder-50b5eb15.js +0 -43094
- package/dist/custom-header-ef367c86.js +0 -882
- package/dist/custom-logger-a671be8b.js +0 -171
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
var b = Object.defineProperty;
|
|
2
|
-
var v = (e, t, n) => t in e ? b(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
-
var c = (e, t, n) => (v(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
-
function x(e) {
|
|
5
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
6
|
-
}
|
|
7
|
-
var d = { exports: {} }, r = d.exports = {}, o, i;
|
|
8
|
-
function g() {
|
|
9
|
-
throw new Error("setTimeout has not been defined");
|
|
10
|
-
}
|
|
11
|
-
function m() {
|
|
12
|
-
throw new Error("clearTimeout has not been defined");
|
|
13
|
-
}
|
|
14
|
-
(function() {
|
|
15
|
-
try {
|
|
16
|
-
typeof setTimeout == "function" ? o = setTimeout : o = g;
|
|
17
|
-
} catch {
|
|
18
|
-
o = g;
|
|
19
|
-
}
|
|
20
|
-
try {
|
|
21
|
-
typeof clearTimeout == "function" ? i = clearTimeout : i = m;
|
|
22
|
-
} catch {
|
|
23
|
-
i = m;
|
|
24
|
-
}
|
|
25
|
-
})();
|
|
26
|
-
function T(e) {
|
|
27
|
-
if (o === setTimeout)
|
|
28
|
-
return setTimeout(e, 0);
|
|
29
|
-
if ((o === g || !o) && setTimeout)
|
|
30
|
-
return o = setTimeout, setTimeout(e, 0);
|
|
31
|
-
try {
|
|
32
|
-
return o(e, 0);
|
|
33
|
-
} catch {
|
|
34
|
-
try {
|
|
35
|
-
return o.call(null, e, 0);
|
|
36
|
-
} catch {
|
|
37
|
-
return o.call(this, e, 0);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
function E(e) {
|
|
42
|
-
if (i === clearTimeout)
|
|
43
|
-
return clearTimeout(e);
|
|
44
|
-
if ((i === m || !i) && clearTimeout)
|
|
45
|
-
return i = clearTimeout, clearTimeout(e);
|
|
46
|
-
try {
|
|
47
|
-
return i(e);
|
|
48
|
-
} catch {
|
|
49
|
-
try {
|
|
50
|
-
return i.call(null, e);
|
|
51
|
-
} catch {
|
|
52
|
-
return i.call(this, e);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
var s = [], l = !1, a, f = -1;
|
|
57
|
-
function S() {
|
|
58
|
-
!l || !a || (l = !1, a.length ? s = a.concat(s) : f = -1, s.length && w());
|
|
59
|
-
}
|
|
60
|
-
function w() {
|
|
61
|
-
if (!l) {
|
|
62
|
-
var e = T(S);
|
|
63
|
-
l = !0;
|
|
64
|
-
for (var t = s.length; t; ) {
|
|
65
|
-
for (a = s, s = []; ++f < t; )
|
|
66
|
-
a && a[f].run();
|
|
67
|
-
f = -1, t = s.length;
|
|
68
|
-
}
|
|
69
|
-
a = null, l = !1, E(e);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
r.nextTick = function(e) {
|
|
73
|
-
var t = new Array(arguments.length - 1);
|
|
74
|
-
if (arguments.length > 1)
|
|
75
|
-
for (var n = 1; n < arguments.length; n++)
|
|
76
|
-
t[n - 1] = arguments[n];
|
|
77
|
-
s.push(new y(e, t)), s.length === 1 && !l && T(w);
|
|
78
|
-
};
|
|
79
|
-
function y(e, t) {
|
|
80
|
-
this.fun = e, this.array = t;
|
|
81
|
-
}
|
|
82
|
-
y.prototype.run = function() {
|
|
83
|
-
this.fun.apply(null, this.array);
|
|
84
|
-
};
|
|
85
|
-
r.title = "browser";
|
|
86
|
-
r.browser = !0;
|
|
87
|
-
r.env = {};
|
|
88
|
-
r.argv = [];
|
|
89
|
-
r.version = "";
|
|
90
|
-
r.versions = {};
|
|
91
|
-
function u() {
|
|
92
|
-
}
|
|
93
|
-
r.on = u;
|
|
94
|
-
r.addListener = u;
|
|
95
|
-
r.once = u;
|
|
96
|
-
r.off = u;
|
|
97
|
-
r.removeListener = u;
|
|
98
|
-
r.removeAllListeners = u;
|
|
99
|
-
r.emit = u;
|
|
100
|
-
r.prependListener = u;
|
|
101
|
-
r.prependOnceListener = u;
|
|
102
|
-
r.listeners = function(e) {
|
|
103
|
-
return [];
|
|
104
|
-
};
|
|
105
|
-
r.binding = function(e) {
|
|
106
|
-
throw new Error("process.binding is not supported");
|
|
107
|
-
};
|
|
108
|
-
r.cwd = function() {
|
|
109
|
-
return "/";
|
|
110
|
-
};
|
|
111
|
-
r.chdir = function(e) {
|
|
112
|
-
throw new Error("process.chdir is not supported");
|
|
113
|
-
};
|
|
114
|
-
r.umask = function() {
|
|
115
|
-
return 0;
|
|
116
|
-
};
|
|
117
|
-
var B = d.exports;
|
|
118
|
-
const h = /* @__PURE__ */ x(B);
|
|
119
|
-
var p = /* @__PURE__ */ ((e) => (e[e.error = 0] = "error", e[e.warn = 1] = "warn", e[e.info = 2] = "info", e[e.http = 3] = "http", e[e.verbose = 4] = "verbose", e[e.debug = 5] = "debug", e[e.silly = 6] = "silly", e))(p || {});
|
|
120
|
-
const N = {
|
|
121
|
-
error: "\x1B[31m",
|
|
122
|
-
warn: "\x1B[33m",
|
|
123
|
-
info: "\x1B[34m",
|
|
124
|
-
http: "\x1B[35m",
|
|
125
|
-
verbose: "\x1B[32m",
|
|
126
|
-
debug: "\x1B[37m",
|
|
127
|
-
silly: "\x1B[37m"
|
|
128
|
-
};
|
|
129
|
-
class _ {
|
|
130
|
-
constructor() {
|
|
131
|
-
c(this, "appName");
|
|
132
|
-
c(this, "logsLevel");
|
|
133
|
-
c(this, "silentLogs");
|
|
134
|
-
this.appName = h.env.APP_LOGS_NAME || "", this.logsLevel = h.env.NODE_ENV == "development" ? "debug" : h.env.LOGS_LEVEL, this.silentLogs = h.env.SILENT_LOGS === "true";
|
|
135
|
-
}
|
|
136
|
-
consoleFormat(t, n) {
|
|
137
|
-
try {
|
|
138
|
-
return `${N[t]} ${this.appName} [${(/* @__PURE__ */ new Date()).toISOString()}] [${t.toUpperCase()}]: ${n.toString()} \x1B[37m`;
|
|
139
|
-
} catch {
|
|
140
|
-
return n;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
log(t, n) {
|
|
144
|
-
t <= p[this.logsLevel] && !this.silentLogs && console.log(this.consoleFormat(p[t], n));
|
|
145
|
-
}
|
|
146
|
-
logError(...t) {
|
|
147
|
-
this.log(0, t);
|
|
148
|
-
}
|
|
149
|
-
logWarn(...t) {
|
|
150
|
-
this.log(1, t);
|
|
151
|
-
}
|
|
152
|
-
logInfo(...t) {
|
|
153
|
-
this.log(2, t);
|
|
154
|
-
}
|
|
155
|
-
logHttp(...t) {
|
|
156
|
-
this.log(3, t);
|
|
157
|
-
}
|
|
158
|
-
logVerbose(...t) {
|
|
159
|
-
this.log(4, t);
|
|
160
|
-
}
|
|
161
|
-
logDebug(...t) {
|
|
162
|
-
this.log(5, t);
|
|
163
|
-
}
|
|
164
|
-
logSilly(...t) {
|
|
165
|
-
this.log(6, t);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
export {
|
|
169
|
-
_ as C,
|
|
170
|
-
h as p
|
|
171
|
-
};
|