@goodandready/dsh-cron 0.2.29 → 0.2.31

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/telegram.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { logger } from './logger.js';
1
2
  import fs from 'node:fs';
2
3
  import path from 'node:path';
3
4
  import os from 'node:os';
@@ -63,7 +64,7 @@ export function getDshDefaultTelegramCredentials() {
63
64
  try {
64
65
  raw = fs.readFileSync(p, 'utf-8');
65
66
  } catch (readErr) {
66
- console.warn('[dsh-cron] default Telegram credentials: cannot read DSH settings.yaml:', readErr.message);
67
+ logger.warn('[dsh-cron] default Telegram credentials: cannot read DSH settings.yaml:', readErr.message);
67
68
  return { botToken: undefined, chatId: undefined };
68
69
  }
69
70
  const botToken = extractSettingFromYaml(raw, 'dsh-messenger-gateway', 'botToken');
@@ -71,7 +72,7 @@ export function getDshDefaultTelegramCredentials() {
71
72
  return { botToken, chatId };
72
73
  }
73
74
  } catch (err) {
74
- console.warn('[dsh-cron] default Telegram credentials lookup failed:', err.message);
75
+ logger.warn('[dsh-cron] default Telegram credentials lookup failed:', err.message);
75
76
  }
76
77
  return { botToken: undefined, chatId: undefined };
77
78
  }
@@ -153,7 +154,7 @@ export async function answerTelegramCallbackQuery({ botToken, callbackQueryId, t
153
154
  body: JSON.stringify(body),
154
155
  });
155
156
  } catch (err) {
156
- console.warn('[dsh-cron] answerCallbackQuery failed:', err.message);
157
+ logger.warn('[dsh-cron] answerCallbackQuery failed:', err.message);
157
158
  }
158
159
  }
159
160
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-cron",
3
- "version": "0.2.29",
3
+ "version": "0.2.31",
4
4
  "description": "Background automation runner for DSH: isolated agent runs, script/HTTP/SSH/Docker runtimes, cost guard, notifications, heartbeats.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -90,4 +90,4 @@
90
90
  "registry": "https://registry.npmjs.org",
91
91
  "access": "public"
92
92
  }
93
- }
93
+ }