@aiot-toolkit/shared-utils 2.0.3-beta.7 → 2.0.3-beta.8
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/lib/ColorConsole.js +208 -167
- package/lib/data/MapData.js +11 -7
- package/lib/data/PositionError.js +10 -6
- package/lib/enum/ProjectType.js +30 -39
- package/lib/index.js +134 -25
- package/lib/interface/ILog.js +16 -10
- package/lib/interface/IPosition.js +4 -1
- package/lib/interface/IRouter.js +4 -1
- package/lib/type/Type.js +4 -1
- package/lib/utils/CommonUtil.js +113 -104
- package/lib/utils/FileUtil.js +170 -165
- package/lib/utils/NetworkUtil.js +134 -131
- package/lib/utils/StringUtil.js +98 -99
- package/lib/utils/WrapCallback.js +33 -27
- package/package.json +2 -2
package/lib/ColorConsole.js
CHANGED
|
@@ -1,186 +1,227 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _chalk = _interopRequireDefault(require("chalk"));
|
|
8
|
+
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
9
|
+
var _ILog = require("./interface/ILog");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
11
|
/**
|
|
11
12
|
* Log
|
|
12
13
|
*/
|
|
13
14
|
class ColorConsole {
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
static defaultStyle = {
|
|
16
|
+
color: '#cccccc'
|
|
17
|
+
};
|
|
18
|
+
static styleDic = (() => ({
|
|
19
|
+
[_ILog.Loglevel.SUCCESS]: {
|
|
20
|
+
color: '#008000',
|
|
21
|
+
icon: '✅'
|
|
22
|
+
},
|
|
23
|
+
[_ILog.Loglevel.INFO]: {
|
|
24
|
+
color: '#03A9F4',
|
|
25
|
+
icon: '🔷'
|
|
26
|
+
},
|
|
27
|
+
[_ILog.Loglevel.WARN]: {
|
|
28
|
+
color: '#FF9800',
|
|
29
|
+
icon: '🟠'
|
|
30
|
+
},
|
|
31
|
+
[_ILog.Loglevel.ERROR]: {
|
|
32
|
+
color: '#ff0000',
|
|
33
|
+
icon: '❌'
|
|
34
|
+
},
|
|
35
|
+
[_ILog.Loglevel.THROW]: {
|
|
36
|
+
color: '#ff0000',
|
|
37
|
+
bold: true,
|
|
38
|
+
icon: '❌'
|
|
39
|
+
},
|
|
40
|
+
[_ILog.Loglevel.LOG]: this.defaultStyle
|
|
41
|
+
}))();
|
|
42
|
+
static getStyle(logLevel) {
|
|
43
|
+
return this.styleDic[logLevel] || this.defaultStyle;
|
|
44
|
+
}
|
|
45
|
+
static log() {
|
|
46
|
+
for (var _len = arguments.length, message = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
47
|
+
message[_key] = arguments[_key];
|
|
48
|
+
}
|
|
49
|
+
return this._log(_ILog.Loglevel.LOG, ...message);
|
|
50
|
+
}
|
|
51
|
+
static error() {
|
|
52
|
+
for (var _len2 = arguments.length, message = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
53
|
+
message[_key2] = arguments[_key2];
|
|
16
54
|
}
|
|
17
|
-
|
|
18
|
-
|
|
55
|
+
return this._log(_ILog.Loglevel.ERROR, ...message);
|
|
56
|
+
}
|
|
57
|
+
static info() {
|
|
58
|
+
for (var _len3 = arguments.length, message = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
59
|
+
message[_key3] = arguments[_key3];
|
|
19
60
|
}
|
|
20
|
-
|
|
21
|
-
|
|
61
|
+
return this._log(_ILog.Loglevel.INFO, ...message);
|
|
62
|
+
}
|
|
63
|
+
static success() {
|
|
64
|
+
for (var _len4 = arguments.length, message = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
65
|
+
message[_key4] = arguments[_key4];
|
|
22
66
|
}
|
|
23
|
-
|
|
24
|
-
|
|
67
|
+
return this._log(_ILog.Loglevel.SUCCESS, ...message);
|
|
68
|
+
}
|
|
69
|
+
static throw() {
|
|
70
|
+
for (var _len5 = arguments.length, message = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
71
|
+
message[_key5] = arguments[_key5];
|
|
25
72
|
}
|
|
26
|
-
|
|
27
|
-
|
|
73
|
+
this._log(_ILog.Loglevel.THROW, ...message);
|
|
74
|
+
}
|
|
75
|
+
static warn() {
|
|
76
|
+
for (var _len6 = arguments.length, message = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
|
77
|
+
message[_key6] = arguments[_key6];
|
|
28
78
|
}
|
|
29
|
-
|
|
30
|
-
|
|
79
|
+
return this._log(_ILog.Loglevel.WARN, ...message);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 创建复杂格式的消息,可单独设置词语样式
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```js
|
|
87
|
+
* createMessage("my name is", {message:'****', style:{ color:'red' }})
|
|
88
|
+
* ```
|
|
89
|
+
* @param words
|
|
90
|
+
* @returns
|
|
91
|
+
*/
|
|
92
|
+
static createMessage(words) {
|
|
93
|
+
const list = Array.isArray(words) ? words : [words];
|
|
94
|
+
return list.map(item => {
|
|
95
|
+
if (typeof item === 'object') {
|
|
96
|
+
return this.formatWord(item.word, item.style);
|
|
97
|
+
}
|
|
98
|
+
return this.formatWord(item, this.defaultStyle);
|
|
99
|
+
}).join(' ');
|
|
100
|
+
}
|
|
101
|
+
static _log(logLevel) {
|
|
102
|
+
const style = this.styleDic[logLevel] || this.defaultStyle;
|
|
103
|
+
for (var _len7 = arguments.length, message = new Array(_len7 > 1 ? _len7 - 1 : 0), _key7 = 1; _key7 < _len7; _key7++) {
|
|
104
|
+
message[_key7 - 1] = arguments[_key7];
|
|
31
105
|
}
|
|
32
|
-
|
|
33
|
-
|
|
106
|
+
console.log(...this.createDefaultPrefix({
|
|
107
|
+
level: logLevel,
|
|
108
|
+
message
|
|
109
|
+
}), this.createMessage(message.map(item => {
|
|
110
|
+
if (typeof item === 'object') {
|
|
111
|
+
return {
|
|
112
|
+
...item,
|
|
113
|
+
style: item.style || style
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
return item;
|
|
117
|
+
})));
|
|
118
|
+
}
|
|
119
|
+
static formatWord(word, style) {
|
|
120
|
+
if (word === undefined || word === null) {
|
|
121
|
+
return '';
|
|
34
122
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
*/
|
|
45
|
-
static createMessage(words) {
|
|
46
|
-
const list = Array.isArray(words) ? words : [words];
|
|
47
|
-
return list
|
|
48
|
-
.map((item) => {
|
|
49
|
-
if (typeof item === 'object') {
|
|
50
|
-
return this.formatWord(item.word, item.style);
|
|
51
|
-
}
|
|
52
|
-
return this.formatWord(item, this.defaultStyle);
|
|
53
|
-
})
|
|
54
|
-
.join(' ');
|
|
123
|
+
const {
|
|
124
|
+
color,
|
|
125
|
+
bgColor,
|
|
126
|
+
bold,
|
|
127
|
+
italic
|
|
128
|
+
} = style || this.defaultStyle;
|
|
129
|
+
let result = word;
|
|
130
|
+
if (color) {
|
|
131
|
+
result = _chalk.default.hex(color)(result);
|
|
55
132
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
console.log(...this.createDefaultPrefix({ level: logLevel, message }), this.createMessage(message.map((item) => {
|
|
59
|
-
if (typeof item === 'object') {
|
|
60
|
-
return Object.assign(Object.assign({}, item), { style: item.style || style });
|
|
61
|
-
}
|
|
62
|
-
return item;
|
|
63
|
-
})));
|
|
133
|
+
if (bgColor) {
|
|
134
|
+
result = _chalk.default.bgHex(bgColor)(result);
|
|
64
135
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
return '';
|
|
68
|
-
}
|
|
69
|
-
const { color, bgColor, bold, italic } = style || this.defaultStyle;
|
|
70
|
-
let result = word;
|
|
71
|
-
if (color) {
|
|
72
|
-
result = chalk_1.default.hex(color)(result);
|
|
73
|
-
}
|
|
74
|
-
if (bgColor) {
|
|
75
|
-
result = chalk_1.default.bgHex(bgColor)(result);
|
|
76
|
-
}
|
|
77
|
-
if (bold) {
|
|
78
|
-
result = chalk_1.default.bold(result);
|
|
79
|
-
}
|
|
80
|
-
if (italic) {
|
|
81
|
-
result = chalk_1.default.italic(result);
|
|
82
|
-
}
|
|
83
|
-
return result;
|
|
136
|
+
if (bold) {
|
|
137
|
+
result = _chalk.default.bold(result);
|
|
84
138
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
* @param log 默认日志类型为info
|
|
88
|
-
* @returns 返回打印的日志信息
|
|
89
|
-
*/
|
|
90
|
-
static logger(log) {
|
|
91
|
-
const str = this.logToString(log);
|
|
92
|
-
console.log(str);
|
|
139
|
+
if (italic) {
|
|
140
|
+
result = _chalk.default.italic(result);
|
|
93
141
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
// 对象格式消息的样式依次使用:[消息自身样式, log样式, 默认样式]
|
|
136
|
-
style: item.style || style });
|
|
137
|
-
}
|
|
138
|
-
return item;
|
|
139
|
-
})));
|
|
142
|
+
return result;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* 按照日志类型打印不同颜色的日志
|
|
147
|
+
* @param log 默认日志类型为info
|
|
148
|
+
* @returns 返回打印的日志信息
|
|
149
|
+
*/
|
|
150
|
+
static logger(log) {
|
|
151
|
+
const str = this.logToString(log);
|
|
152
|
+
console.log(str);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* 日志转换为带颜色的字符串
|
|
157
|
+
*
|
|
158
|
+
* @param log 日志对象
|
|
159
|
+
* @param prefix 前缀列表
|
|
160
|
+
* false-不使用前缀
|
|
161
|
+
* string[]-自定义前缀
|
|
162
|
+
* 默认-[图标、时间、toolkit字样]
|
|
163
|
+
*
|
|
164
|
+
* @example logToString(log, ['myPrefix'])
|
|
165
|
+
*/
|
|
166
|
+
static logToString(log, prefix) {
|
|
167
|
+
const {
|
|
168
|
+
message,
|
|
169
|
+
position,
|
|
170
|
+
filePath,
|
|
171
|
+
level = _ILog.Loglevel.INFO
|
|
172
|
+
} = log;
|
|
173
|
+
|
|
174
|
+
// 位置消息
|
|
175
|
+
let positionMessage;
|
|
176
|
+
positionMessage = {
|
|
177
|
+
style: this.getStyle(level),
|
|
178
|
+
word: [filePath, position?.startLine, position?.startColumn].filter(item => Boolean(item)).join(':')
|
|
179
|
+
};
|
|
180
|
+
const logs = Array.isArray(message) ? message : [message];
|
|
181
|
+
if (positionMessage) {
|
|
182
|
+
logs.unshift(positionMessage);
|
|
140
183
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
* 3. toolkit 字样
|
|
147
|
-
*
|
|
148
|
-
* @param log
|
|
149
|
-
*/
|
|
150
|
-
static createDefaultPrefix(log) {
|
|
151
|
-
const { level = ILog_1.Loglevel.INFO } = log;
|
|
152
|
-
const style = this.styleDic[level] || this.defaultStyle;
|
|
153
|
-
const time = this.formatWord(`[${(0, dayjs_1.default)().format('MM-DD HH:mm:ss')}] [toolkit]:`, style);
|
|
154
|
-
const icon = style.icon ? style.icon : '';
|
|
155
|
-
return [icon, time];
|
|
184
|
+
|
|
185
|
+
// 前缀
|
|
186
|
+
let effectPrefix;
|
|
187
|
+
if (prefix === false) {
|
|
188
|
+
prefix = [];
|
|
156
189
|
}
|
|
190
|
+
if (prefix === undefined) {
|
|
191
|
+
effectPrefix = ColorConsole.createDefaultPrefix(log);
|
|
192
|
+
} else {
|
|
193
|
+
effectPrefix = prefix;
|
|
194
|
+
}
|
|
195
|
+
const style = this.styleDic[level] || this.defaultStyle;
|
|
196
|
+
return [...effectPrefix].join(' ') + this.createMessage(logs.map(item => {
|
|
197
|
+
if (typeof item === 'object') {
|
|
198
|
+
return {
|
|
199
|
+
...item,
|
|
200
|
+
// 对象格式消息的样式依次使用:[消息自身样式, log样式, 默认样式]
|
|
201
|
+
style: item.style || style
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
return item;
|
|
205
|
+
}));
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* 创建默认消息前缀列表
|
|
210
|
+
*
|
|
211
|
+
* 1. 图标
|
|
212
|
+
* 2. 时间
|
|
213
|
+
* 3. toolkit 字样
|
|
214
|
+
*
|
|
215
|
+
* @param log
|
|
216
|
+
*/
|
|
217
|
+
static createDefaultPrefix(log) {
|
|
218
|
+
const {
|
|
219
|
+
level = _ILog.Loglevel.INFO
|
|
220
|
+
} = log;
|
|
221
|
+
const style = this.styleDic[level] || this.defaultStyle;
|
|
222
|
+
const time = this.formatWord(`[${(0, _dayjs.default)().format('MM-DD HH:mm:ss')}] [toolkit]:`, style);
|
|
223
|
+
const icon = style.icon ? style.icon : '';
|
|
224
|
+
return [icon, time];
|
|
225
|
+
}
|
|
157
226
|
}
|
|
158
|
-
|
|
159
|
-
ColorConsole.defaultStyle = {
|
|
160
|
-
color: '#cccccc'
|
|
161
|
-
};
|
|
162
|
-
ColorConsole.styleDic = {
|
|
163
|
-
[ILog_1.Loglevel.SUCCESS]: {
|
|
164
|
-
color: '#008000',
|
|
165
|
-
icon: '✅'
|
|
166
|
-
},
|
|
167
|
-
[ILog_1.Loglevel.INFO]: {
|
|
168
|
-
color: '#03A9F4',
|
|
169
|
-
icon: '🔷'
|
|
170
|
-
},
|
|
171
|
-
[ILog_1.Loglevel.WARN]: {
|
|
172
|
-
color: '#FF9800',
|
|
173
|
-
icon: '🟠'
|
|
174
|
-
},
|
|
175
|
-
[ILog_1.Loglevel.ERROR]: {
|
|
176
|
-
color: '#ff0000',
|
|
177
|
-
icon: '❌'
|
|
178
|
-
},
|
|
179
|
-
[ILog_1.Loglevel.THROW]: {
|
|
180
|
-
color: '#ff0000',
|
|
181
|
-
bold: true,
|
|
182
|
-
icon: '❌'
|
|
183
|
-
},
|
|
184
|
-
[ILog_1.Loglevel.LOG]: _a.defaultStyle
|
|
185
|
-
};
|
|
186
|
-
exports.default = ColorConsole;
|
|
227
|
+
var _default = exports.default = ColorConsole;
|
package/lib/data/MapData.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
3
7
|
class MapData {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
constructor(name, source, target) {
|
|
9
|
+
this.name = name;
|
|
10
|
+
this.source = source;
|
|
11
|
+
this.target = target;
|
|
12
|
+
}
|
|
9
13
|
}
|
|
10
|
-
exports.default = MapData;
|
|
14
|
+
var _default = exports.default = MapData;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
3
7
|
/**
|
|
4
8
|
* PositionError
|
|
5
9
|
*/
|
|
6
10
|
class PositionError extends Error {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
constructor(position, message) {
|
|
12
|
+
super(message);
|
|
13
|
+
this.position = position;
|
|
14
|
+
}
|
|
11
15
|
}
|
|
12
|
-
exports.default = PositionError;
|
|
16
|
+
var _default = exports.default = PositionError;
|
package/lib/enum/ProjectType.js
CHANGED
|
@@ -1,45 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _path = _interopRequireDefault(require("path"));
|
|
8
|
+
var _fsExtra = _interopRequireDefault(require("fs-extra"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
10
|
/**
|
|
9
11
|
* 项目类型
|
|
10
12
|
*/
|
|
11
|
-
var ProjectType
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
(function (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
function getProjectType(projectPath, src = 'src') {
|
|
30
|
-
var _a;
|
|
31
|
-
const isXts = fs_extra_1.default.existsSync(path_1.default.resolve(projectPath, 'app/app.xts'));
|
|
32
|
-
if (isXts) {
|
|
33
|
-
return ProjectType.VELA_XTS;
|
|
34
|
-
}
|
|
35
|
-
const isUx = fs_extra_1.default.existsSync(path_1.default.resolve(projectPath, src, 'app.ux'));
|
|
36
|
-
if (isUx) {
|
|
37
|
-
const mainfest = fs_extra_1.default.readJSONSync(path_1.default.join(projectPath, src, 'manifest.json'));
|
|
38
|
-
const isVela = (_a = mainfest.deviceTypeList) === null || _a === void 0 ? void 0 : _a.includes('watch');
|
|
39
|
-
return isVela ? ProjectType.VELA_UX : ProjectType.ANDDROID_UX;
|
|
40
|
-
}
|
|
41
|
-
return ProjectType.VELA_UX;
|
|
13
|
+
var ProjectType = /*#__PURE__*/function (ProjectType) {
|
|
14
|
+
ProjectType["VELA_UX"] = "velaUx";
|
|
15
|
+
ProjectType["ANDDROID_UX"] = "androidUx";
|
|
16
|
+
ProjectType["VELA_XTS"] = "velaXts";
|
|
17
|
+
return ProjectType;
|
|
18
|
+
}(ProjectType || {});
|
|
19
|
+
(function (_ProjectType) {
|
|
20
|
+
function getProjectType(projectPath) {
|
|
21
|
+
let src = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'src';
|
|
22
|
+
const isXts = _fsExtra.default.existsSync(_path.default.resolve(projectPath, 'app/app.xts'));
|
|
23
|
+
if (isXts) {
|
|
24
|
+
return ProjectType.VELA_XTS;
|
|
25
|
+
}
|
|
26
|
+
const isUx = _fsExtra.default.existsSync(_path.default.resolve(projectPath, src, 'app.ux'));
|
|
27
|
+
if (isUx) {
|
|
28
|
+
const mainfest = _fsExtra.default.readJSONSync(_path.default.join(projectPath, src, 'manifest.json'));
|
|
29
|
+
const isVela = mainfest.deviceTypeList?.includes('watch');
|
|
30
|
+
return isVela ? ProjectType.VELA_UX : ProjectType.ANDDROID_UX;
|
|
42
31
|
}
|
|
43
|
-
ProjectType.
|
|
32
|
+
return ProjectType.VELA_UX;
|
|
33
|
+
}
|
|
34
|
+
_ProjectType.getProjectType = getProjectType;
|
|
44
35
|
})(ProjectType || (ProjectType = {}));
|
|
45
|
-
exports.default = ProjectType;
|
|
36
|
+
var _default = exports.default = ProjectType;
|
package/lib/index.js
CHANGED
|
@@ -1,26 +1,135 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
exports
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
exports
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
exports
|
|
25
|
-
|
|
26
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "ColorConsole", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _ColorConsole.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "CommonUtil", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _CommonUtil.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "Dictionary", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _Type.Dictionary;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "FileUtil", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _FileUtil.default;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "ILog", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _ILog.ILog;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "IPosition", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _IPosition.default;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "IRouteItem", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _IRouter.IRouteItem;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "IRouter", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _IRouter.default;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "JSONSchemaType", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _CommonUtil.JSONSchemaType;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "Logger", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _ILog.Logger;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "Loglevel", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _ILog.Loglevel;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "MapData", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _MapData.default;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "MatchType", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return _FileUtil.MatchType;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "NetworkUtil", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () {
|
|
87
|
+
return _NetworkUtil.default;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, "PositionError", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () {
|
|
93
|
+
return _PositionError.default;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(exports, "ProjectType", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function () {
|
|
99
|
+
return _ProjectType.default;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
Object.defineProperty(exports, "StringUtil", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
get: function () {
|
|
105
|
+
return _StringUtil.default;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
Object.defineProperty(exports, "StyleMessage", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function () {
|
|
111
|
+
return _ColorConsole.StyleMessage;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
Object.defineProperty(exports, "WrapCallback", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function () {
|
|
117
|
+
return _WrapCallback.default;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
var _ColorConsole = _interopRequireWildcard(require("./ColorConsole"));
|
|
121
|
+
var _MapData = _interopRequireDefault(require("./data/MapData"));
|
|
122
|
+
var _PositionError = _interopRequireDefault(require("./data/PositionError"));
|
|
123
|
+
var _ProjectType = _interopRequireDefault(require("./enum/ProjectType"));
|
|
124
|
+
var _ILog = require("./interface/ILog");
|
|
125
|
+
var _IPosition = _interopRequireDefault(require("./interface/IPosition"));
|
|
126
|
+
var _IRouter = _interopRequireWildcard(require("./interface/IRouter"));
|
|
127
|
+
var _Type = require("./type/Type");
|
|
128
|
+
var _CommonUtil = _interopRequireWildcard(require("./utils/CommonUtil"));
|
|
129
|
+
var _FileUtil = _interopRequireWildcard(require("./utils/FileUtil"));
|
|
130
|
+
var _NetworkUtil = _interopRequireDefault(require("./utils/NetworkUtil"));
|
|
131
|
+
var _StringUtil = _interopRequireDefault(require("./utils/StringUtil"));
|
|
132
|
+
var _WrapCallback = _interopRequireDefault(require("./utils/WrapCallback"));
|
|
133
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
134
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
135
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|