alemonjs 1.0.53 → 1.0.55
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/core/dealmsg.js
CHANGED
|
@@ -210,8 +210,28 @@ async function loadPlugins(dir) {
|
|
|
210
210
|
if (existsSync(`${dir}/${appname}${main}.${type}`)) {
|
|
211
211
|
await import(`file://${dir}/${appname}${main}.${type}`).catch(err => {
|
|
212
212
|
console.error(`file://${dir}/${appname}${main}.${type}`);
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
// 属于依赖缺失
|
|
214
|
+
const match = /Cannot find package '(.+)' imported from/.exec(err.message);
|
|
215
|
+
if (match && match[1]) {
|
|
216
|
+
const packageName = match[1];
|
|
217
|
+
console.error(`[APP] [${appname}] 缺失 ${packageName} 包`);
|
|
218
|
+
// 发生消息
|
|
219
|
+
process.send?.({
|
|
220
|
+
type: 'lack-of-package',
|
|
221
|
+
message: {
|
|
222
|
+
packageName
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
// 其他错误
|
|
229
|
+
console.error(`[APP] [${appname}]`, err);
|
|
230
|
+
process.send?.({
|
|
231
|
+
type: 'error',
|
|
232
|
+
message: err
|
|
233
|
+
});
|
|
234
|
+
}
|
|
215
235
|
});
|
|
216
236
|
}
|
|
217
237
|
}
|
|
@@ -112,7 +112,7 @@ export async function stringParsing(msg, villa_id) {
|
|
|
112
112
|
*/
|
|
113
113
|
const User = await getMember(villa_id, String(item.id));
|
|
114
114
|
if (User) {
|
|
115
|
-
setUserName(item.id, User?.data?.
|
|
115
|
+
setUserName(item.id, User?.data?.member?.basic?.nickname);
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
/**
|
package/package.json
CHANGED
package/types/villa/sdk/api.d.ts
CHANGED