@maiyunnet/kebab 3.2.35 → 3.2.36
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/index.d.ts +1 -1
- package/index.js +1 -1
- package/lib/core.d.ts +1 -1
- package/lib/core.js +4 -0
- package/package.json +1 -1
- package/sys/master.js +2 -2
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* --- 本文件用来定义每个目录实体地址的常量 ---
|
|
7
7
|
*/
|
|
8
8
|
/** --- 当前系统版本号 --- */
|
|
9
|
-
export const VER = '3.2.
|
|
9
|
+
export const VER = '3.2.36';
|
|
10
10
|
// --- 服务端用的路径 ---
|
|
11
11
|
const imu = decodeURIComponent(import.meta.url).replace('file://', '').replace(/^\/(\w:)/, '$1');
|
|
12
12
|
/** --- /xxx/xxx --- */
|
package/lib/core.d.ts
CHANGED
|
@@ -193,7 +193,7 @@ export declare function log(opt: sCtr.Ctr | ILogOptions, msg: string, fend?: str
|
|
|
193
193
|
* @param opt 参数
|
|
194
194
|
*/
|
|
195
195
|
export declare function getLog(opt: {
|
|
196
|
-
/** ---
|
|
196
|
+
/** --- 要查询的头,如 127.0.0.1、system、www.maiyun.net 等 --- */
|
|
197
197
|
'hostname': string;
|
|
198
198
|
/** --- 如 2024/08/01/22 --- */
|
|
199
199
|
'path': string;
|
package/lib/core.js
CHANGED
|
@@ -681,11 +681,15 @@ export async function getLog(opt) {
|
|
|
681
681
|
});
|
|
682
682
|
const content = await res.getContent();
|
|
683
683
|
if (!content) {
|
|
684
|
+
// --- 连接失败,系统错误 ---
|
|
685
|
+
debug('[CORE][getLog] rpc server error');
|
|
684
686
|
return false;
|
|
685
687
|
}
|
|
686
688
|
const str = content.toString();
|
|
687
689
|
const j = lText.parseJson(str);
|
|
688
690
|
if (!j) {
|
|
691
|
+
// --- 解析失败,系统错误 ---
|
|
692
|
+
debug('[CORE][getLog] rpc server content error');
|
|
689
693
|
return false;
|
|
690
694
|
}
|
|
691
695
|
return j.data;
|
package/package.json
CHANGED
package/sys/master.js
CHANGED
|
@@ -233,7 +233,7 @@ function createRpcListener() {
|
|
|
233
233
|
if (!await lFs.isFile(path)) {
|
|
234
234
|
res.end(lText.stringifyJson({
|
|
235
235
|
'result': 1,
|
|
236
|
-
'data':
|
|
236
|
+
'data': null,
|
|
237
237
|
}));
|
|
238
238
|
return;
|
|
239
239
|
}
|
|
@@ -241,7 +241,7 @@ function createRpcListener() {
|
|
|
241
241
|
let limit = msg.limit ?? 100;
|
|
242
242
|
/** --- 剩余 offset --- */
|
|
243
243
|
let offset = msg.offset ?? 0;
|
|
244
|
-
const rtn = await new Promise(
|
|
244
|
+
const rtn = await new Promise(resolve => {
|
|
245
245
|
const list = [];
|
|
246
246
|
/** --- 当前行号 --- */
|
|
247
247
|
let line = 0;
|