utilitas 2001.1.151 → 2001.1.153

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/bot.mjs CHANGED
@@ -3,13 +3,7 @@ import { isPrimary, on, report } from './callosum.mjs';
3
3
 
4
4
  const _NEED = ['telegraf'];
5
5
  const log = (cnt, opt) => _log(cnt, import.meta.url, { time: 1, ...opt || {} });
6
- const isLaunchStopError = err => err?.name === 'AbortError'
7
- || `${err?.message || err}`.includes('Cannot set property message');
8
- const end = async options => {
9
- if (!bot) { return; }
10
- bot.stop(options?.signal);
11
- await launch;
12
- };
6
+ const end = async options => bot && bot.stop(options?.signal);
13
7
  const lines = (arr, sep = '\n') => arr.join(sep);
14
8
  const sendMd = (cId, cnt, opt) => send(cId, cnt, { parse_mode, ...opt || {} });
15
9
 
@@ -24,7 +18,6 @@ const [ // https://limits.tginfo.me/en
24
18
  const parse_mode = PARSE_MODE_MD;
25
19
 
26
20
  let bot;
27
- let launch;
28
21
 
29
22
  const send = async (chatId, content, options) => {
30
23
  try {
@@ -46,9 +39,7 @@ const init = async (options) => {
46
39
  bot = new Telegraf(options?.botToken, { handlerTimeout: 1000 * 60 * 10 }); // 10 minutes
47
40
  bot.use(useNewReplies());
48
41
  bot.catch(console.error);
49
- launch = bot.launch().catch(err => {
50
- if (!isLaunchStopError(err)) { console.error(err); }
51
- });
42
+ bot.launch();
52
43
  bot.botInfo = await bot.telegram.getMe();
53
44
  log(`Initialized: ${BOT}${bot.botInfo.first_name} @${bot.botInfo.username} #${bot.botInfo.id}`);
54
45
  on(BOT_SEND, data => send(...data || []));
package/lib/manifest.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  const manifest = {
2
2
  "name": "utilitas",
3
3
  "description": "Just another common utility for JavaScript.",
4
- "version": "2001.1.151",
4
+ "version": "2001.1.153",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",
@@ -26,12 +26,12 @@ const manifest = {
26
26
  "devDependencies": {
27
27
  "@ffmpeg-installer/ffmpeg": "^1.1.0",
28
28
  "@ffprobe-installer/ffprobe": "^2.1.2",
29
- "@google-cloud/discoveryengine": "^2.6.0",
29
+ "@google-cloud/discoveryengine": "^2.7.0",
30
30
  "@google-cloud/storage": "^7.19.0",
31
- "@google/genai": "^1.51.0",
31
+ "@google/genai": "^2.3.0",
32
32
  "@mozilla/readability": "github:mozilla/readability",
33
- "@sentry/node": "^10.51.0",
34
- "@sentry/profiling-node": "^10.51.0",
33
+ "@sentry/node": "^10.53.1",
34
+ "@sentry/profiling-node": "^10.53.1",
35
35
  "acme-client": "^5.4.0",
36
36
  "browserify-fs": "^1.0.0",
37
37
  "buffer": "^6.0.3",
@@ -41,32 +41,32 @@ const manifest = {
41
41
  "form-data": "^4.0.5",
42
42
  "google-gax": "^5.0.6",
43
43
  "ioredis": "^5.10.1",
44
- "jsdom": "^29.1.0",
45
- "lorem-ipsum": "^2.0.8",
46
- "mailgun.js": "^13.0.0",
44
+ "jsdom": "^29.1.1",
45
+ "lorem-ipsum": "^3.0.0",
46
+ "mailgun.js": "^13.0.1",
47
47
  "mailparser": "^3.9.8",
48
48
  "mime": "^4.1.0",
49
49
  "mysql2": "^3.22.3",
50
50
  "node-mailjet": "^6.0.11",
51
51
  "node-polyfill-webpack-plugin": "^4.1.0",
52
52
  "office-text-extractor": "^4.0.0",
53
- "openai": "^6.35.0",
53
+ "openai": "^6.37.0",
54
54
  "pdf-lib": "^1.17.1",
55
55
  "pdfjs-dist": "^5.7.284",
56
56
  "pg": "^8.20.0",
57
57
  "pgvector": "^0.2.1",
58
58
  "ping": "^1.0.0",
59
59
  "process": "^0.11.10",
60
- "puppeteer": "^24.42.0",
60
+ "puppeteer": "^25.0.2",
61
61
  "say": "^0.16.0",
62
- "telegraf": "npm:@leask/telegraf@6.0.0",
62
+ "telegraf": "npm:@leask/telegraf@6.0.1",
63
63
  "telesignsdk": "^5.0.0",
64
64
  "tesseract.js": "^7.0.0",
65
- "twilio": "^6.0.0",
65
+ "twilio": "^6.0.2",
66
66
  "url": "github:Leask/node-url",
67
67
  "webpack-cli": "^7.0.2",
68
68
  "whisper-node": "^1.1.1",
69
- "wrangler": "^4.86.0",
69
+ "wrangler": "^4.92.0",
70
70
  "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.1/xlsx-0.20.1.tgz",
71
71
  "youtube-transcript": "^1.3.1"
72
72
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "utilitas",
3
3
  "description": "Just another common utility for JavaScript.",
4
- "version": "2001.1.151",
4
+ "version": "2001.1.153",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",
@@ -37,12 +37,12 @@
37
37
  "devDependencies": {
38
38
  "@ffmpeg-installer/ffmpeg": "^1.1.0",
39
39
  "@ffprobe-installer/ffprobe": "^2.1.2",
40
- "@google-cloud/discoveryengine": "^2.6.0",
40
+ "@google-cloud/discoveryengine": "^2.7.0",
41
41
  "@google-cloud/storage": "^7.19.0",
42
- "@google/genai": "^1.51.0",
42
+ "@google/genai": "^2.3.0",
43
43
  "@mozilla/readability": "github:mozilla/readability",
44
- "@sentry/node": "^10.51.0",
45
- "@sentry/profiling-node": "^10.51.0",
44
+ "@sentry/node": "^10.53.1",
45
+ "@sentry/profiling-node": "^10.53.1",
46
46
  "acme-client": "^5.4.0",
47
47
  "browserify-fs": "^1.0.0",
48
48
  "buffer": "^6.0.3",
@@ -52,32 +52,32 @@
52
52
  "form-data": "^4.0.5",
53
53
  "google-gax": "^5.0.6",
54
54
  "ioredis": "^5.10.1",
55
- "jsdom": "^29.1.0",
56
- "lorem-ipsum": "^2.0.8",
57
- "mailgun.js": "^13.0.0",
55
+ "jsdom": "^29.1.1",
56
+ "lorem-ipsum": "^3.0.0",
57
+ "mailgun.js": "^13.0.1",
58
58
  "mailparser": "^3.9.8",
59
59
  "mime": "^4.1.0",
60
60
  "mysql2": "^3.22.3",
61
61
  "node-mailjet": "^6.0.11",
62
62
  "node-polyfill-webpack-plugin": "^4.1.0",
63
63
  "office-text-extractor": "^4.0.0",
64
- "openai": "^6.35.0",
64
+ "openai": "^6.37.0",
65
65
  "pdf-lib": "^1.17.1",
66
66
  "pdfjs-dist": "^5.7.284",
67
67
  "pg": "^8.20.0",
68
68
  "pgvector": "^0.2.1",
69
69
  "ping": "^1.0.0",
70
70
  "process": "^0.11.10",
71
- "puppeteer": "^24.42.0",
71
+ "puppeteer": "^25.0.2",
72
72
  "say": "^0.16.0",
73
- "telegraf": "npm:@leask/telegraf@6.0.0",
73
+ "telegraf": "npm:@leask/telegraf@6.0.1",
74
74
  "telesignsdk": "^5.0.0",
75
75
  "tesseract.js": "^7.0.0",
76
- "twilio": "^6.0.0",
76
+ "twilio": "^6.0.2",
77
77
  "url": "github:Leask/node-url",
78
78
  "webpack-cli": "^7.0.2",
79
79
  "whisper-node": "^1.1.1",
80
- "wrangler": "^4.86.0",
80
+ "wrangler": "^4.92.0",
81
81
  "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.1/xlsx-0.20.1.tgz",
82
82
  "youtube-transcript": "^1.3.1"
83
83
  }