agent-messenger 2.20.3 → 2.20.5

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-messenger",
3
- "version": "2.20.3",
3
+ "version": "2.20.5",
4
4
  "description": "Messaging platform interaction skills for AI agents. Interact with Slack, Discord, Microsoft Teams, Webex, Telegram, Telegram Bot, WhatsApp, LINE, Instagram, KakaoTalk, and Channel Talk - send messages, read channels, manage reactions, upload files, and more through simple CLI interfaces.",
5
5
  "author": {
6
6
  "name": "agent-messenger",
package/bun.lock CHANGED
@@ -10,7 +10,7 @@
10
10
  "@whiskeysockets/baileys": "^7.0.0-rc.9",
11
11
  "better-sqlite3": "^12.0.0",
12
12
  "blessed": "^0.1.81",
13
- "bson": "^7.2.0",
13
+ "bson": "^6.10.4",
14
14
  "classic-level": "^3.0.0",
15
15
  "commander": "^11.1.0",
16
16
  "crypto-js": "^4.2.0",
@@ -366,7 +366,7 @@
366
366
 
367
367
  "browser-or-node": ["browser-or-node@1.3.0", "", {}, "sha512-0F2z/VSnLbmEeBcUrSuDH5l0HxTXdQQzLjkmBR4cYfvg1zJrKSlmIZFqyFR8oX0NrwPhy3c3HQ6i3OxMbew4Tg=="],
368
368
 
369
- "bson": ["bson@7.2.0", "", {}, "sha512-YCEo7KjMlbNlyHhz7zAZNDpIpQbd+wOEHJYezv0nMYTn4x31eIUM2yomNNubclAt63dObUzKHWsBLJ9QcZNSnQ=="],
369
+ "bson": ["bson@6.10.4", "", {}, "sha512-WIsKqkSC0ABoBJuT1LEX+2HEvNmNKKgnTAyd0fL8qzK4SH2i9NXg+t08YtdZp/V9IZ33cxe3iV4yM0qg8lMQng=="],
370
370
 
371
371
  "buffer": ["buffer@6.0.3", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" } }, "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA=="],
372
372
 
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-messenger",
3
- "version": "2.20.3",
3
+ "version": "2.20.5",
4
4
  "description": "Multi-platform messaging CLI for AI agents (Slack, Discord, Teams, Webex, Telegram, Telegram Bot, WhatsApp, LINE, Instagram, KakaoTalk, Channel Talk)",
5
5
  "repository": {
6
6
  "type": "git",
@@ -165,7 +165,7 @@
165
165
  "@whiskeysockets/baileys": "^7.0.0-rc.9",
166
166
  "better-sqlite3": "^12.0.0",
167
167
  "blessed": "^0.1.81",
168
- "bson": "^7.2.0",
168
+ "bson": "^6.10.4",
169
169
  "classic-level": "^3.0.0",
170
170
  "commander": "^11.1.0",
171
171
  "crypto-js": "^4.2.0",
@@ -1 +1 @@
1
- {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../../src/platforms/webex/commands/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAkBnC,wBAAsB,UAAU,CAC9B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAChD,OAAO,CAAC,IAAI,CAAC,CAgBf;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB9G;AAED,wBAAsB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB/F;AAED,wBAAsB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,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AED,wBAAsB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAanH;AAED,wBAAsB,UAAU,CAC9B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAChD,OAAO,CAAC,IAAI,CAAC,CAYf;AAED,wBAAsB,QAAQ,CAC5B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAChD,OAAO,CAAC,IAAI,CAAC,CAUf;AAED,eAAO,MAAM,cAAc,SAyDxB,CAAA"}
@@ -2,6 +2,16 @@ import { Command } from 'commander';
2
2
  import { handleError } from '../../../shared/utils/error-handler.js';
3
3
  import { formatOutput } from '../../../shared/utils/output.js';
4
4
  import { WebexClient } from '../client.js';
5
+ function formatMessageOutput(message) {
6
+ return {
7
+ id: message.id,
8
+ roomId: message.roomId,
9
+ text: message.text,
10
+ html: message.html,
11
+ personEmail: message.personEmail,
12
+ created: message.created,
13
+ };
14
+ }
5
15
  async function withWebexClient(run) {
6
16
  const client = new WebexClient();
7
17
  try {
@@ -15,14 +25,7 @@ async function withWebexClient(run) {
15
25
  export async function sendAction(spaceId, text, options) {
16
26
  try {
17
27
  const message = await withWebexClient((client) => client.sendMessage(spaceId, text, { markdown: options.markdown }));
18
- const output = {
19
- id: message.id,
20
- roomId: message.roomId,
21
- text: message.text,
22
- personEmail: message.personEmail,
23
- created: message.created,
24
- };
25
- console.log(formatOutput(output, options.pretty));
28
+ console.log(formatOutput(formatMessageOutput(message), options.pretty));
26
29
  }
27
30
  catch (error) {
28
31
  handleError(error);
@@ -32,13 +35,7 @@ export async function listAction(spaceId, options) {
32
35
  try {
33
36
  const limit = options.limit ?? 50;
34
37
  const messages = await withWebexClient((client) => client.listMessages(spaceId, { max: limit }));
35
- const output = messages.map((msg) => ({
36
- id: msg.id,
37
- roomId: msg.roomId,
38
- text: msg.text,
39
- personEmail: msg.personEmail,
40
- created: msg.created,
41
- }));
38
+ const output = messages.map(formatMessageOutput);
42
39
  console.log(formatOutput(output, options.pretty));
43
40
  }
44
41
  catch (error) {
@@ -48,14 +45,7 @@ export async function listAction(spaceId, options) {
48
45
  export async function getAction(messageId, options) {
49
46
  try {
50
47
  const message = await withWebexClient((client) => client.getMessage(messageId));
51
- const output = {
52
- id: message.id,
53
- roomId: message.roomId,
54
- text: message.text,
55
- personEmail: message.personEmail,
56
- created: message.created,
57
- };
58
- console.log(formatOutput(output, options.pretty));
48
+ console.log(formatOutput(formatMessageOutput(message), options.pretty));
59
49
  }
60
50
  catch (error) {
61
51
  handleError(error);
@@ -79,14 +69,7 @@ export async function editAction(messageId, spaceId, text, options) {
79
69
  const message = await withWebexClient((client) => client.editMessage(messageId, spaceId, text, {
80
70
  markdown: options.markdown,
81
71
  }));
82
- const output = {
83
- id: message.id,
84
- roomId: message.roomId,
85
- text: message.text,
86
- personEmail: message.personEmail,
87
- created: message.created,
88
- };
89
- console.log(formatOutput(output, options.pretty));
72
+ console.log(formatOutput(formatMessageOutput(message), options.pretty));
90
73
  }
91
74
  catch (error) {
92
75
  handleError(error);
@@ -95,14 +78,7 @@ export async function editAction(messageId, spaceId, text, options) {
95
78
  export async function dmAction(email, text, options) {
96
79
  try {
97
80
  const message = await withWebexClient((client) => client.sendDirectMessage(email, text, { markdown: options.markdown }));
98
- const output = {
99
- id: message.id,
100
- roomId: message.roomId,
101
- text: message.text,
102
- personEmail: message.personEmail,
103
- created: message.created,
104
- };
105
- console.log(formatOutput(output, options.pretty));
81
+ console.log(formatOutput(formatMessageOutput(message), options.pretty));
106
82
  }
107
83
  catch (error) {
108
84
  handleError(error);
@@ -1 +1 @@
1
- {"version":3,"file":"message.js","sourceRoot":"","sources":["../../../../../src/platforms/webex/commands/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAGvC,KAAK,UAAU,eAAe,CAAI,GAAwC;IACxE,MAAM,MAAM,GAAG,IAAI,WAAW,EAAE,CAAA;IAChC,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,KAAK,EAAE,CAAA;QACpB,OAAO,MAAM,GAAG,CAAC,MAAM,CAAC,CAAA;IAC1B,CAAC;YAAS,CAAC;QACT,MAAM,MAAM,CAAC,OAAO,EAAE,CAAA;IACxB,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,OAAe,EACf,IAAY,EACZ,OAAiD;IAEjD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,eAAe,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAA;QAEpH,MAAM,MAAM,GAAG;YACb,EAAE,EAAE,OAAO,CAAC,EAAE;YACd,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,OAAO,EAAE,OAAO,CAAC,OAAO;SACzB,CAAA;QAED,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA;IACnD,CAAC;IAAC,OAA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AE,YAAY,CAAC;KACtC,QAAQ,CAAC,YAAY,EAAE,uCAAuC,CAAC;KAC/D,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;KACtC,MAAM,CAAC,YAAY,EAAE,kBAAkB,CAAC;KACxC,MAAM,CAAC,UAAU,EAAE,0BAA0B,CAAC;KAC9C,MAAM,CAAC,UAAU,CAAC,CACtB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-messenger",
3
- "version": "2.20.3",
3
+ "version": "2.20.5",
4
4
  "description": "Multi-platform messaging CLI for AI agents (Slack, Discord, Teams, Webex, Telegram, Telegram Bot, WhatsApp, LINE, Instagram, KakaoTalk, Channel Talk)",
5
5
  "repository": {
6
6
  "type": "git",
@@ -165,7 +165,7 @@
165
165
  "@whiskeysockets/baileys": "^7.0.0-rc.9",
166
166
  "better-sqlite3": "^12.0.0",
167
167
  "blessed": "^0.1.81",
168
- "bson": "^7.2.0",
168
+ "bson": "^6.10.4",
169
169
  "classic-level": "^3.0.0",
170
170
  "commander": "^11.1.0",
171
171
  "crypto-js": "^4.2.0",
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-channeltalk
3
3
  description: Interact with Channel Talk using extracted desktop app or browser credentials - read chats, send messages, search messages, manage groups
4
- version: 2.20.3
4
+ version: 2.20.5
5
5
  allowed-tools: Bash(agent-channeltalk:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-channeltalkbot
3
3
  description: Interact with Channel Talk workspaces using API credentials - send messages, read chats, manage groups and bots
4
- version: 2.20.3
4
+ version: 2.20.5
5
5
  allowed-tools: Bash(agent-channeltalkbot:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-discord
3
3
  description: Interact with Discord servers - send messages, read channels, manage reactions
4
- version: 2.20.3
4
+ version: 2.20.5
5
5
  allowed-tools: Bash(agent-discord:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-discordbot
3
3
  description: Interact with Discord servers using bot tokens - send messages, read channels, manage reactions
4
- version: 2.20.3
4
+ version: 2.20.5
5
5
  allowed-tools: Bash(agent-discordbot:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-instagram
3
3
  description: Interact with Instagram DMs - send messages, read conversations, manage accounts
4
- version: 2.20.3
4
+ version: 2.20.5
5
5
  allowed-tools: Bash(agent-instagram:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-kakaotalk
3
3
  description: Interact with KakaoTalk - send messages, read chats, manage conversations
4
- version: 2.20.3
4
+ version: 2.20.5
5
5
  allowed-tools: Bash(agent-kakaotalk:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-line
3
3
  description: Interact with LINE - send messages, read chats, manage conversations
4
- version: 2.20.3
4
+ version: 2.20.5
5
5
  allowed-tools: Bash(agent-line:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-slack
3
3
  description: Interact with Slack workspaces - send messages, read channels, manage reactions
4
- version: 2.20.3
4
+ version: 2.20.5
5
5
  allowed-tools: Bash(agent-slack:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-slackbot
3
3
  description: Interact with Slack workspaces using bot tokens - send messages, read channels, manage reactions
4
- version: 2.20.3
4
+ version: 2.20.5
5
5
  allowed-tools: Bash(agent-slackbot:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-teams
3
3
  description: Interact with Microsoft Teams - send messages, read channels, manage reactions
4
- version: 2.20.3
4
+ version: 2.20.5
5
5
  allowed-tools: Bash(agent-teams:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-telegram
3
3
  description: Interact with Telegram through TDLib - authenticate, inspect chats, and send messages
4
- version: 2.20.3
4
+ version: 2.20.5
5
5
  allowed-tools: Bash(agent-telegram:*)
6
6
  ---
7
7
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-telegrambot
3
3
  description: Interact with Telegram using bot tokens - send messages, read chats, manage reactions
4
- version: 2.20.3
4
+ version: 2.20.5
5
5
  allowed-tools: Bash(agent-telegrambot:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-webex
3
3
  description: Interact with Cisco Webex - send messages, read spaces, manage memberships
4
- version: 2.20.3
4
+ version: 2.20.5
5
5
  allowed-tools: Bash(agent-webex:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-wechatbot
3
3
  description: Interact with WeChat Official Account using API credentials - send messages, manage templates, list followers
4
- version: 2.20.3
4
+ version: 2.20.5
5
5
  allowed-tools: Bash(agent-wechatbot:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-whatsapp
3
3
  description: Interact with WhatsApp - send messages, read chats, manage conversations
4
- version: 2.20.3
4
+ version: 2.20.5
5
5
  allowed-tools: Bash(agent-whatsapp:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-whatsappbot
3
3
  description: Interact with WhatsApp using Cloud API credentials - send messages, manage templates
4
- version: 2.20.3
4
+ version: 2.20.5
5
5
  allowed-tools: Bash(agent-whatsappbot:*)
6
6
  metadata:
7
7
  openclaw:
@@ -8,6 +8,7 @@ const mockMessage = {
8
8
  roomId: 'space_456',
9
9
  roomType: 'group' as const,
10
10
  text: 'Hello world',
11
+ html: '<p>Hello <a href="https://example.com">world</a></p>',
11
12
  personId: 'person_789',
12
13
  personEmail: 'user@example.com',
13
14
  created: '2025-01-29T10:00:00.000Z',
@@ -18,6 +19,7 @@ const mockMessage2 = {
18
19
  roomId: 'space_456',
19
20
  roomType: 'group' as const,
20
21
  text: 'Second message',
22
+ html: '<p>Second message</p>',
21
23
  personId: 'person_789',
22
24
  personEmail: 'user@example.com',
23
25
  created: '2025-01-29T10:01:00.000Z',
@@ -133,6 +135,7 @@ it('calls listMessages with limit and outputs array', async () => {
133
135
  const output = consoleLogSpy.mock.calls[0][0]
134
136
  expect(output).toContain('msg_123')
135
137
  expect(output).toContain('msg_124')
138
+ expect(output).toContain('https://example.com')
136
139
  })
137
140
 
138
141
  it('calls getMessage with correct id and outputs result', async () => {
@@ -143,6 +146,7 @@ it('calls getMessage with correct id and outputs result', async () => {
143
146
  const output = consoleLogSpy.mock.calls[0][0]
144
147
  expect(output).toContain('msg_123')
145
148
  expect(output).toContain('user@example.com')
149
+ expect(output).toContain('https://example.com')
146
150
  })
147
151
 
148
152
  it('calls deleteMessage and outputs deleted id when --force flag is set', async () => {
@@ -6,6 +6,17 @@ import { formatOutput } from '@/shared/utils/output'
6
6
  import { WebexClient } from '../client'
7
7
  import type { WebexMessage } from '../types'
8
8
 
9
+ function formatMessageOutput(message: WebexMessage) {
10
+ return {
11
+ id: message.id,
12
+ roomId: message.roomId,
13
+ text: message.text,
14
+ html: message.html,
15
+ personEmail: message.personEmail,
16
+ created: message.created,
17
+ }
18
+ }
19
+
9
20
  async function withWebexClient<T>(run: (client: WebexClient) => Promise<T>): Promise<T> {
10
21
  const client = new WebexClient()
11
22
  try {
@@ -24,15 +35,7 @@ export async function sendAction(
24
35
  try {
25
36
  const message = await withWebexClient((client) => client.sendMessage(spaceId, text, { markdown: options.markdown }))
26
37
 
27
- const output = {
28
- id: message.id,
29
- roomId: message.roomId,
30
- text: message.text,
31
- personEmail: message.personEmail,
32
- created: message.created,
33
- }
34
-
35
- console.log(formatOutput(output, options.pretty))
38
+ console.log(formatOutput(formatMessageOutput(message), options.pretty))
36
39
  } catch (error) {
37
40
  handleError(error as Error)
38
41
  }
@@ -43,13 +46,7 @@ export async function listAction(spaceId: string, options: { limit?: number; pre
43
46
  const limit = options.limit ?? 50
44
47
  const messages = await withWebexClient((client) => client.listMessages(spaceId, { max: limit }))
45
48
 
46
- const output = messages.map((msg: WebexMessage) => ({
47
- id: msg.id,
48
- roomId: msg.roomId,
49
- text: msg.text,
50
- personEmail: msg.personEmail,
51
- created: msg.created,
52
- }))
49
+ const output = messages.map(formatMessageOutput)
53
50
 
54
51
  console.log(formatOutput(output, options.pretty))
55
52
  } catch (error) {
@@ -61,15 +58,7 @@ export async function getAction(messageId: string, options: { pretty?: boolean }
61
58
  try {
62
59
  const message = await withWebexClient((client) => client.getMessage(messageId))
63
60
 
64
- const output = {
65
- id: message.id,
66
- roomId: message.roomId,
67
- text: message.text,
68
- personEmail: message.personEmail,
69
- created: message.created,
70
- }
71
-
72
- console.log(formatOutput(output, options.pretty))
61
+ console.log(formatOutput(formatMessageOutput(message), options.pretty))
73
62
  } catch (error) {
74
63
  handleError(error as Error)
75
64
  }
@@ -103,15 +92,7 @@ export async function editAction(
103
92
  }),
104
93
  )
105
94
 
106
- const output = {
107
- id: message.id,
108
- roomId: message.roomId,
109
- text: message.text,
110
- personEmail: message.personEmail,
111
- created: message.created,
112
- }
113
-
114
- console.log(formatOutput(output, options.pretty))
95
+ console.log(formatOutput(formatMessageOutput(message), options.pretty))
115
96
  } catch (error) {
116
97
  handleError(error as Error)
117
98
  }
@@ -127,15 +108,7 @@ export async function dmAction(
127
108
  client.sendDirectMessage(email, text, { markdown: options.markdown }),
128
109
  )
129
110
 
130
- const output = {
131
- id: message.id,
132
- roomId: message.roomId,
133
- text: message.text,
134
- personEmail: message.personEmail,
135
- created: message.created,
136
- }
137
-
138
- console.log(formatOutput(output, options.pretty))
111
+ console.log(formatOutput(formatMessageOutput(message), options.pretty))
139
112
  } catch (error) {
140
113
  handleError(error as Error)
141
114
  }