@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 CHANGED
@@ -5,7 +5,7 @@
5
5
  * --- 本文件用来定义每个目录实体地址的常量 ---
6
6
  */
7
7
  /** --- 当前系统版本号 --- */
8
- export declare const VER = "3.2.35";
8
+ export declare const VER = "3.2.36";
9
9
  /** --- 框架根目录,以 / 结尾 --- */
10
10
  export declare const ROOT_PATH: string;
11
11
  export declare const LIB_PATH: string;
package/index.js CHANGED
@@ -6,7 +6,7 @@
6
6
  * --- 本文件用来定义每个目录实体地址的常量 ---
7
7
  */
8
8
  /** --- 当前系统版本号 --- */
9
- export const VER = '3.2.35';
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
- /** --- 127.0.0.1 --- */
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maiyunnet/kebab",
3
- "version": "3.2.35",
3
+ "version": "3.2.36",
4
4
  "description": "Simple, easy-to-use, and fully-featured Node.js framework that is ready-to-use out of the box.",
5
5
  "type": "module",
6
6
  "keywords": [
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': false,
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((resolve) => {
244
+ const rtn = await new Promise(resolve => {
245
245
  const list = [];
246
246
  /** --- 当前行号 --- */
247
247
  let line = 0;