@delt/claude-alarm 0.6.19 → 0.6.21
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/dist/cli.js +16 -1
- package/dist/cli.js.map +1 -1
- package/dist/dashboard/index.html +1 -0
- package/dist/hub/server.js +16 -1
- package/dist/hub/server.js.map +1 -1
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/dashboard/index.html +1 -0
package/dist/cli.js
CHANGED
|
@@ -663,7 +663,19 @@ ${label}`);
|
|
|
663
663
|
}
|
|
664
664
|
/** Convert markdown to Telegram HTML (escape first, then apply formatting) */
|
|
665
665
|
mdToHtml(s) {
|
|
666
|
-
let
|
|
666
|
+
let text = s.replace(
|
|
667
|
+
/^(\|.+\|)\n\|[-| :]+\|\n((?:\|.+\|\n?)*)/gm,
|
|
668
|
+
(_match, header, body) => {
|
|
669
|
+
const headerCells = header.split("|").filter((c) => c.trim()).map((c) => c.trim());
|
|
670
|
+
const headerLine = headerCells.join(" | ");
|
|
671
|
+
const bodyLines = body.trim().split("\n").map((row) => {
|
|
672
|
+
return row.split("|").filter((c) => c.trim()).map((c) => c.trim()).join(" | ");
|
|
673
|
+
});
|
|
674
|
+
return `**${headerLine}**
|
|
675
|
+
${bodyLines.join("\n")}`;
|
|
676
|
+
}
|
|
677
|
+
);
|
|
678
|
+
let html = this.escHtml(text);
|
|
667
679
|
html = html.replace(/```(?:\w*)\n?([\s\S]*?)```/g, "<pre>$1</pre>");
|
|
668
680
|
html = html.replace(/`([^`]+)`/g, "<code>$1</code>");
|
|
669
681
|
html = html.replace(/^#{1,3}\s+(.+)$/gm, "<b>$1</b>");
|
|
@@ -1162,6 +1174,9 @@ var init_server = __esm({
|
|
|
1162
1174
|
return;
|
|
1163
1175
|
}
|
|
1164
1176
|
const config2 = loadConfig();
|
|
1177
|
+
if (telegram.botToken.includes("...") && config2.telegram?.botToken) {
|
|
1178
|
+
telegram.botToken = config2.telegram.botToken;
|
|
1179
|
+
}
|
|
1165
1180
|
config2.telegram = telegram;
|
|
1166
1181
|
saveConfig(config2);
|
|
1167
1182
|
if (this.telegramBot) {
|