()
| 59 | return String(v); |
| 60 | } |
| 61 | async sendMsg() { |
| 62 | this.log("==============📣Center 通知📣==============") |
| 63 | let message = this.notifyStr.join(this.logSeparator); |
| 64 | if (this.isNode()) { |
| 65 | try { |
| 66 | const { sendNotify } = require("./sendNotify.js") |
| 67 | await sendNotify(this.name, message); |
| 68 | } catch (e) { |
| 69 | console.error(e.code === "MODULE_NOT_FOUND" ? "发送通知失败: 未找到 sendNotify.js 模块" : `发送通知失败: sendNotify.js 内部错误 (${e.message})`); |
| 70 | } |
| 71 | |
| 72 | } |
| 73 | } |
| 74 | isNode() { |
| 75 | return "undefined" != typeof module && !!module.exports; |
| 76 | } |
no test coverage detected