befly 3.64.0 → 3.65.0

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.
@@ -1,4 +1,5 @@
1
1
  import adminTable from "#befly/tables/admin.json";
2
+ import loginLogTable from "#befly/tables/loginLog.json";
2
3
  import { toSessionTtlSeconds } from "#befly/utils/util.js";
3
4
 
4
5
  export default {
@@ -21,61 +22,15 @@ export default {
21
22
  min: null,
22
23
  max: null
23
24
  },
24
- clientType: {
25
- name: "客户端类型",
26
- input: "enum",
27
- check: "browser|vscode|desktop|miniapp|app",
28
- min: 3,
29
- max: 20
30
- },
31
- productName: {
32
- name: "产品名称",
33
- input: "string",
34
- min: 0,
35
- max: 100
36
- },
37
- productCode: {
38
- name: "产品代号",
39
- input: "string",
40
- min: 0,
41
- max: 100
42
- },
43
- productVersion: {
44
- name: "产品版本",
45
- input: "string",
46
- min: 0,
47
- max: 50
48
- },
49
- clientVersion: {
50
- name: "客户端版本",
51
- input: "string",
52
- min: 0,
53
- max: 100
54
- },
55
- os: {
56
- name: "操作系统",
57
- input: "string",
58
- min: 0,
59
- max: 100
60
- },
61
- system: {
62
- name: "系统",
63
- input: "string",
64
- min: 0,
65
- max: 100
66
- },
67
- brand: {
68
- name: "设备品牌",
69
- input: "string",
70
- min: 0,
71
- max: 100
72
- },
73
- model: {
74
- name: "设备型号",
75
- input: "string",
76
- min: 0,
77
- max: 100
78
- }
25
+ clientType: loginLogTable.clientType,
26
+ productName: loginLogTable.productName,
27
+ productCode: loginLogTable.productCode,
28
+ productVersion: loginLogTable.productVersion,
29
+ clientVersion: loginLogTable.clientVersion,
30
+ os: loginLogTable.os,
31
+ system: loginLogTable.system,
32
+ brand: loginLogTable.brand,
33
+ model: loginLogTable.model
79
34
  },
80
35
  required: ["account", "password", "loginType"],
81
36
  handler: async (befly, ctx) => {
@@ -86,15 +41,15 @@ export default {
86
41
  username: ctx.body.account,
87
42
  nickname: "",
88
43
  ip: ctx.ip || "",
89
- clientType: body.clientType,
90
- productName: body.productName || null,
91
- productCode: body.productCode || null,
92
- productVersion: body.productVersion || null,
93
- clientVersion: body.clientVersion || null,
94
- os: body.os || null,
95
- system: body.system || null,
96
- brand: body.brand || null,
97
- model: body.model || null,
44
+ clientType: body.clientType || "",
45
+ productName: body.productName || "",
46
+ productCode: body.productCode || "",
47
+ productVersion: body.productVersion || "",
48
+ clientVersion: body.clientVersion || "",
49
+ os: body.os || "",
50
+ system: body.system || "",
51
+ brand: body.brand || "",
52
+ model: body.model || "",
98
53
  loginTime: Date.now(),
99
54
  loginResult: 0,
100
55
  failReason: ""
@@ -108,7 +108,7 @@ export default {
108
108
  };
109
109
 
110
110
  try {
111
- await befly.mysql.insData({ table: "errorReport", data: data });
111
+ await befly.mysql.insData({ table: "beflyErrorReport", data: data });
112
112
  stored = true;
113
113
  } catch (error) {
114
114
  Logger.error("errorReport 插入失败", error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "befly",
3
- "version": "3.64.0",
3
+ "version": "3.65.0",
4
4
  "gitHead": "49c39d36695036e85fc64083cc43c1652fff96cb",
5
5
  "private": false,
6
6
  "description": "Befly - 为 Bun 专属打造的 JavaScript API 接口框架核心引擎",