agent-messenger 1.0.0 → 1.1.0
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/.claude/commands/release.md +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.github/workflows/ci.yml +1 -1
- package/.github/workflows/e2e.yml.disabled +69 -0
- package/README.md +16 -14
- package/biome.json +33 -1
- package/bun.lock +63 -0
- package/dist/package.json +8 -4
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +4 -1
- package/dist/src/cli.js.map +1 -1
- package/dist/src/platforms/discord/cli.js +1 -1
- package/dist/src/platforms/discord/client.d.ts.map +1 -1
- package/dist/src/platforms/discord/client.js +3 -3
- package/dist/src/platforms/discord/client.js.map +1 -1
- package/dist/src/platforms/discord/commands/user.d.ts.map +1 -1
- package/dist/src/platforms/discord/commands/user.js +10 -1
- package/dist/src/platforms/discord/commands/user.js.map +1 -1
- package/dist/src/platforms/discord/credential-manager.d.ts.map +1 -1
- package/dist/src/platforms/discord/credential-manager.js +18 -12
- package/dist/src/platforms/discord/credential-manager.js.map +1 -1
- package/dist/src/platforms/slack/cli.js +1 -1
- package/dist/src/platforms/slack/credential-manager.d.ts.map +1 -1
- package/dist/src/platforms/slack/credential-manager.js +20 -6
- package/dist/src/platforms/slack/credential-manager.js.map +1 -1
- package/dist/src/platforms/slack/token-extractor.d.ts.map +1 -1
- package/dist/src/platforms/slack/token-extractor.js +34 -9
- package/dist/src/platforms/slack/token-extractor.js.map +1 -1
- package/dist/src/platforms/teams/cli.d.ts.map +1 -0
- package/dist/{cli.js → src/platforms/teams/cli.js} +11 -10
- package/dist/src/platforms/teams/cli.js.map +1 -0
- package/dist/src/platforms/teams/client.d.ts +32 -0
- package/dist/src/platforms/teams/client.d.ts.map +1 -0
- package/dist/src/platforms/teams/client.js +202 -0
- package/dist/src/platforms/teams/client.js.map +1 -0
- package/dist/src/platforms/teams/commands/auth.d.ts +14 -0
- package/dist/src/platforms/teams/commands/auth.d.ts.map +1 -0
- package/dist/src/platforms/teams/commands/auth.js +176 -0
- package/dist/src/platforms/teams/commands/auth.js.map +1 -0
- package/dist/src/platforms/teams/commands/channel.d.ts +13 -0
- package/dist/src/platforms/teams/commands/channel.d.ts.map +1 -0
- package/dist/src/platforms/teams/commands/channel.js +97 -0
- package/dist/src/platforms/teams/commands/channel.js.map +1 -0
- package/dist/src/platforms/teams/commands/file.d.ts +12 -0
- package/dist/src/platforms/teams/commands/file.d.ts.map +1 -0
- package/dist/src/platforms/teams/commands/file.js +104 -0
- package/dist/src/platforms/teams/commands/file.js.map +1 -0
- package/dist/{commands → src/platforms/teams/commands}/index.d.ts +5 -2
- package/dist/src/platforms/teams/commands/index.d.ts.map +1 -0
- package/dist/{commands → src/platforms/teams/commands}/index.js +5 -2
- package/dist/src/platforms/teams/commands/index.js.map +1 -0
- package/dist/src/platforms/teams/commands/message.d.ts +17 -0
- package/dist/src/platforms/teams/commands/message.d.ts.map +1 -0
- package/dist/src/platforms/teams/commands/message.js +133 -0
- package/dist/src/platforms/teams/commands/message.js.map +1 -0
- package/dist/src/platforms/teams/commands/reaction.d.ts +9 -0
- package/dist/src/platforms/teams/commands/reaction.d.ts.map +1 -0
- package/dist/src/platforms/teams/commands/reaction.js +68 -0
- package/dist/src/platforms/teams/commands/reaction.js.map +1 -0
- package/dist/src/platforms/teams/commands/snapshot.d.ts +10 -0
- package/dist/src/platforms/teams/commands/snapshot.d.ts.map +1 -0
- package/dist/src/platforms/teams/commands/snapshot.js +85 -0
- package/dist/src/platforms/teams/commands/snapshot.js.map +1 -0
- package/dist/src/platforms/teams/commands/team.d.ts +18 -0
- package/dist/src/platforms/teams/commands/team.d.ts.map +1 -0
- package/dist/src/platforms/teams/commands/team.js +130 -0
- package/dist/src/platforms/teams/commands/team.js.map +1 -0
- package/dist/src/platforms/teams/commands/user.d.ts.map +1 -0
- package/dist/src/platforms/teams/commands/user.js +88 -0
- package/dist/src/platforms/teams/commands/user.js.map +1 -0
- package/dist/src/platforms/teams/credential-manager.d.ts +18 -0
- package/dist/src/platforms/teams/credential-manager.d.ts.map +1 -0
- package/dist/src/platforms/teams/credential-manager.js +81 -0
- package/dist/src/platforms/teams/credential-manager.js.map +1 -0
- package/dist/src/platforms/teams/index.d.ts +4 -0
- package/dist/src/platforms/teams/index.d.ts.map +1 -0
- package/dist/src/platforms/teams/index.js +6 -0
- package/dist/src/platforms/teams/index.js.map +1 -0
- package/dist/src/platforms/teams/token-extractor.d.ts +36 -0
- package/dist/src/platforms/teams/token-extractor.d.ts.map +1 -0
- package/dist/src/platforms/teams/token-extractor.js +335 -0
- package/dist/src/platforms/teams/token-extractor.js.map +1 -0
- package/dist/src/platforms/teams/types.d.ts +209 -0
- package/dist/src/platforms/teams/types.d.ts.map +1 -0
- package/dist/src/platforms/teams/types.js +65 -0
- package/dist/src/platforms/teams/types.js.map +1 -0
- package/docs/teams.md +321 -0
- package/e2e/README.md +256 -0
- package/e2e/config.ts +45 -0
- package/e2e/discord.e2e.test.ts +252 -0
- package/e2e/helpers.ts +107 -0
- package/e2e/slack.e2e.test.ts +309 -0
- package/package.json +8 -4
- package/scripts/postbuild.ts +15 -0
- package/skills/agent-teams/SKILL.md +292 -0
- package/skills/agent-teams/references/authentication.md +375 -0
- package/skills/agent-teams/references/common-patterns.md +596 -0
- package/skills/agent-teams/templates/monitor-channel.sh +239 -0
- package/skills/agent-teams/templates/post-message.sh +224 -0
- package/skills/agent-teams/templates/team-summary.sh +210 -0
- package/src/cli.ts +4 -0
- package/src/platforms/discord/client.ts +3 -3
- package/src/platforms/discord/commands/auth.test.ts +48 -32
- package/src/platforms/discord/commands/channel.test.ts +54 -42
- package/src/platforms/discord/commands/file.test.ts +40 -53
- package/src/platforms/discord/commands/guild.test.ts +47 -27
- package/src/platforms/discord/commands/message.test.ts +54 -51
- package/src/platforms/discord/commands/reaction.test.ts +54 -42
- package/src/platforms/discord/commands/user.ts +12 -1
- package/src/platforms/discord/credential-manager.test.ts +137 -136
- package/src/platforms/discord/credential-manager.ts +20 -13
- package/src/platforms/discord/token-extractor.test.ts +133 -383
- package/{tests → src/platforms/slack}/cli.test.ts +3 -3
- package/{tests/slack-client.test.ts → src/platforms/slack/client.test.ts} +1 -1
- package/{tests → src/platforms/slack}/commands/auth.test.ts +25 -13
- package/{tests → src/platforms/slack}/commands/channel.test.ts +2 -2
- package/{tests → src/platforms/slack}/commands/file.test.ts +2 -2
- package/{tests → src/platforms/slack}/commands/message.test.ts +2 -2
- package/{tests → src/platforms/slack}/commands/reaction.test.ts +1 -1
- package/{tests → src/platforms/slack}/commands/snapshot.test.ts +117 -105
- package/{tests → src/platforms/slack}/commands/user.test.ts +3 -3
- package/{tests → src/platforms/slack}/commands/workspace.test.ts +44 -95
- package/{tests → src/platforms/slack}/credential-manager.test.ts +2 -2
- package/src/platforms/slack/credential-manager.ts +22 -7
- package/src/platforms/slack/token-extractor-node-test.ts +40 -0
- package/src/platforms/slack/token-extractor-node.test.ts +10 -0
- package/src/platforms/slack/token-extractor.ts +36 -10
- package/{tests → src/platforms/slack}/types.test.ts +1 -1
- package/src/platforms/teams/cli.ts +36 -0
- package/src/platforms/teams/client.test.ts +500 -0
- package/src/platforms/teams/client.ts +365 -0
- package/src/platforms/teams/commands/auth.test.ts +99 -0
- package/src/platforms/teams/commands/auth.ts +232 -0
- package/src/platforms/teams/commands/channel.test.ts +147 -0
- package/src/platforms/teams/commands/channel.ts +129 -0
- package/src/platforms/teams/commands/file.test.ts +88 -0
- package/src/platforms/teams/commands/file.ts +144 -0
- package/src/platforms/teams/commands/index.ts +12 -0
- package/src/platforms/teams/commands/message.test.ts +110 -0
- package/src/platforms/teams/commands/message.ts +188 -0
- package/src/platforms/teams/commands/reaction.test.ts +87 -0
- package/src/platforms/teams/commands/reaction.ts +104 -0
- package/src/platforms/teams/commands/snapshot.test.ts +35 -0
- package/src/platforms/teams/commands/snapshot.ts +115 -0
- package/src/platforms/teams/commands/team.test.ts +157 -0
- package/src/platforms/teams/commands/team.ts +164 -0
- package/src/platforms/teams/commands/user.test.ts +83 -0
- package/src/platforms/teams/commands/user.ts +112 -0
- package/src/platforms/teams/credential-manager.test.ts +178 -0
- package/src/platforms/teams/credential-manager.ts +92 -0
- package/src/platforms/teams/index.ts +5 -0
- package/src/platforms/teams/token-extractor.test.ts +429 -0
- package/src/platforms/teams/token-extractor.ts +462 -0
- package/src/platforms/teams/types.test.ts +226 -0
- package/src/platforms/teams/types.ts +140 -0
- package/tsconfig.json +1 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/commands/auth.d.ts +0 -3
- package/dist/commands/auth.d.ts.map +0 -1
- package/dist/commands/auth.js +0 -140
- package/dist/commands/auth.js.map +0 -1
- package/dist/commands/channel.d.ts +0 -3
- package/dist/commands/channel.d.ts.map +0 -1
- package/dist/commands/channel.js +0 -118
- package/dist/commands/channel.js.map +0 -1
- package/dist/commands/file.d.ts +0 -3
- package/dist/commands/file.d.ts.map +0 -1
- package/dist/commands/file.js +0 -113
- package/dist/commands/file.js.map +0 -1
- package/dist/commands/index.d.ts.map +0 -1
- package/dist/commands/index.js.map +0 -1
- package/dist/commands/message.d.ts +0 -3
- package/dist/commands/message.d.ts.map +0 -1
- package/dist/commands/message.js +0 -214
- package/dist/commands/message.js.map +0 -1
- package/dist/commands/reaction.d.ts +0 -3
- package/dist/commands/reaction.d.ts.map +0 -1
- package/dist/commands/reaction.js +0 -100
- package/dist/commands/reaction.js.map +0 -1
- package/dist/commands/snapshot.d.ts +0 -3
- package/dist/commands/snapshot.d.ts.map +0 -1
- package/dist/commands/snapshot.js +0 -88
- package/dist/commands/snapshot.js.map +0 -1
- package/dist/commands/user.d.ts.map +0 -1
- package/dist/commands/user.js +0 -96
- package/dist/commands/user.js.map +0 -1
- package/dist/commands/workspace.d.ts +0 -3
- package/dist/commands/workspace.d.ts.map +0 -1
- package/dist/commands/workspace.js +0 -89
- package/dist/commands/workspace.js.map +0 -1
- package/dist/lib/credential-manager.d.ts +0 -13
- package/dist/lib/credential-manager.d.ts.map +0 -1
- package/dist/lib/credential-manager.js +0 -58
- package/dist/lib/credential-manager.js.map +0 -1
- package/dist/lib/index.d.ts +0 -3
- package/dist/lib/index.d.ts.map +0 -1
- package/dist/lib/index.js +0 -3
- package/dist/lib/index.js.map +0 -1
- package/dist/lib/ref-manager.d.ts +0 -26
- package/dist/lib/ref-manager.d.ts.map +0 -1
- package/dist/lib/ref-manager.js +0 -92
- package/dist/lib/ref-manager.js.map +0 -1
- package/dist/lib/slack-client.d.ts +0 -37
- package/dist/lib/slack-client.d.ts.map +0 -1
- package/dist/lib/slack-client.js +0 -379
- package/dist/lib/slack-client.js.map +0 -1
- package/dist/lib/token-extractor.d.ts +0 -28
- package/dist/lib/token-extractor.d.ts.map +0 -1
- package/dist/lib/token-extractor.js +0 -401
- package/dist/lib/token-extractor.js.map +0 -1
- package/dist/src/platforms/discord/client.test.d.ts +0 -2
- package/dist/src/platforms/discord/client.test.d.ts.map +0 -1
- package/dist/src/platforms/discord/client.test.js +0 -367
- package/dist/src/platforms/discord/client.test.js.map +0 -1
- package/dist/src/platforms/discord/commands/auth.test.d.ts +0 -2
- package/dist/src/platforms/discord/commands/auth.test.d.ts.map +0 -1
- package/dist/src/platforms/discord/commands/auth.test.js +0 -65
- package/dist/src/platforms/discord/commands/auth.test.js.map +0 -1
- package/dist/src/platforms/discord/commands/channel.test.d.ts +0 -2
- package/dist/src/platforms/discord/commands/channel.test.d.ts.map +0 -1
- package/dist/src/platforms/discord/commands/channel.test.js +0 -136
- package/dist/src/platforms/discord/commands/channel.test.js.map +0 -1
- package/dist/src/platforms/discord/commands/file.test.d.ts +0 -2
- package/dist/src/platforms/discord/commands/file.test.d.ts.map +0 -1
- package/dist/src/platforms/discord/commands/file.test.js +0 -83
- package/dist/src/platforms/discord/commands/file.test.js.map +0 -1
- package/dist/src/platforms/discord/commands/guild.test.d.ts +0 -2
- package/dist/src/platforms/discord/commands/guild.test.d.ts.map +0 -1
- package/dist/src/platforms/discord/commands/guild.test.js +0 -100
- package/dist/src/platforms/discord/commands/guild.test.js.map +0 -1
- package/dist/src/platforms/discord/commands/message.test.d.ts +0 -2
- package/dist/src/platforms/discord/commands/message.test.d.ts.map +0 -1
- package/dist/src/platforms/discord/commands/message.test.js +0 -91
- package/dist/src/platforms/discord/commands/message.test.js.map +0 -1
- package/dist/src/platforms/discord/commands/reaction.test.d.ts +0 -2
- package/dist/src/platforms/discord/commands/reaction.test.d.ts.map +0 -1
- package/dist/src/platforms/discord/commands/reaction.test.js +0 -115
- package/dist/src/platforms/discord/commands/reaction.test.js.map +0 -1
- package/dist/src/platforms/discord/commands/snapshot.test.d.ts +0 -2
- package/dist/src/platforms/discord/commands/snapshot.test.d.ts.map +0 -1
- package/dist/src/platforms/discord/commands/snapshot.test.js +0 -25
- package/dist/src/platforms/discord/commands/snapshot.test.js.map +0 -1
- package/dist/src/platforms/discord/commands/user.test.d.ts +0 -2
- package/dist/src/platforms/discord/commands/user.test.d.ts.map +0 -1
- package/dist/src/platforms/discord/commands/user.test.js +0 -103
- package/dist/src/platforms/discord/commands/user.test.js.map +0 -1
- package/dist/src/platforms/discord/credential-manager.test.d.ts +0 -2
- package/dist/src/platforms/discord/credential-manager.test.d.ts.map +0 -1
- package/dist/src/platforms/discord/credential-manager.test.js +0 -136
- package/dist/src/platforms/discord/credential-manager.test.js.map +0 -1
- package/dist/src/platforms/discord/token-extractor.test.d.ts +0 -2
- package/dist/src/platforms/discord/token-extractor.test.d.ts.map +0 -1
- package/dist/src/platforms/discord/token-extractor.test.js +0 -789
- package/dist/src/platforms/discord/token-extractor.test.js.map +0 -1
- package/dist/src/platforms/discord/types.test.d.ts +0 -2
- package/dist/src/platforms/discord/types.test.d.ts.map +0 -1
- package/dist/src/platforms/discord/types.test.js +0 -211
- package/dist/src/platforms/discord/types.test.js.map +0 -1
- package/dist/src/shared/utils/concurrency.test.d.ts +0 -2
- package/dist/src/shared/utils/concurrency.test.d.ts.map +0 -1
- package/dist/src/shared/utils/concurrency.test.js +0 -39
- package/dist/src/shared/utils/concurrency.test.js.map +0 -1
- package/dist/tests/cli.test.d.ts +0 -2
- package/dist/tests/cli.test.d.ts.map +0 -1
- package/dist/tests/cli.test.js +0 -83
- package/dist/tests/cli.test.js.map +0 -1
- package/dist/tests/commands/.test-slack-data/Local Storage/leveldb/CURRENT +0 -1
- package/dist/tests/commands/.test-slack-data/Local Storage/leveldb/LOCK +0 -0
- package/dist/tests/commands/.test-slack-data/Local Storage/leveldb/LOG +0 -3
- package/dist/tests/commands/.test-slack-data/Local Storage/leveldb/LOG.old +0 -1
- package/dist/tests/commands/.test-slack-data/Local Storage/leveldb/MANIFEST-000004 +0 -0
- package/dist/tests/commands/auth.test.d.ts +0 -2
- package/dist/tests/commands/auth.test.d.ts.map +0 -1
- package/dist/tests/commands/auth.test.js +0 -304
- package/dist/tests/commands/auth.test.js.map +0 -1
- package/dist/tests/commands/channel.test.d.ts +0 -2
- package/dist/tests/commands/channel.test.d.ts.map +0 -1
- package/dist/tests/commands/channel.test.js +0 -166
- package/dist/tests/commands/channel.test.js.map +0 -1
- package/dist/tests/commands/file.test.d.ts +0 -2
- package/dist/tests/commands/file.test.d.ts.map +0 -1
- package/dist/tests/commands/file.test.js +0 -175
- package/dist/tests/commands/file.test.js.map +0 -1
- package/dist/tests/commands/message.test.d.ts +0 -2
- package/dist/tests/commands/message.test.d.ts.map +0 -1
- package/dist/tests/commands/message.test.js +0 -293
- package/dist/tests/commands/message.test.js.map +0 -1
- package/dist/tests/commands/reaction.test.d.ts +0 -2
- package/dist/tests/commands/reaction.test.d.ts.map +0 -1
- package/dist/tests/commands/reaction.test.js +0 -84
- package/dist/tests/commands/reaction.test.js.map +0 -1
- package/dist/tests/commands/snapshot.test.d.ts +0 -2
- package/dist/tests/commands/snapshot.test.d.ts.map +0 -1
- package/dist/tests/commands/snapshot.test.js +0 -280
- package/dist/tests/commands/snapshot.test.js.map +0 -1
- package/dist/tests/commands/user.test.d.ts +0 -2
- package/dist/tests/commands/user.test.d.ts.map +0 -1
- package/dist/tests/commands/user.test.js +0 -117
- package/dist/tests/commands/user.test.js.map +0 -1
- package/dist/tests/commands/workspace.test.d.ts +0 -2
- package/dist/tests/commands/workspace.test.d.ts.map +0 -1
- package/dist/tests/commands/workspace.test.js +0 -453
- package/dist/tests/commands/workspace.test.js.map +0 -1
- package/dist/tests/credential-manager.test.d.ts +0 -2
- package/dist/tests/credential-manager.test.d.ts.map +0 -1
- package/dist/tests/credential-manager.test.js +0 -199
- package/dist/tests/credential-manager.test.js.map +0 -1
- package/dist/tests/slack-client.test.d.ts +0 -2
- package/dist/tests/slack-client.test.d.ts.map +0 -1
- package/dist/tests/slack-client.test.js +0 -741
- package/dist/tests/slack-client.test.js.map +0 -1
- package/dist/tests/types.test.d.ts +0 -2
- package/dist/tests/types.test.d.ts.map +0 -1
- package/dist/tests/types.test.js +0 -215
- package/dist/tests/types.test.js.map +0 -1
- package/dist/types/index.d.ts +0 -369
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -92
- package/dist/types/index.js.map +0 -1
- package/dist/utils/error-handler.d.ts +0 -2
- package/dist/utils/error-handler.d.ts.map +0 -1
- package/dist/utils/error-handler.js +0 -5
- package/dist/utils/error-handler.js.map +0 -1
- package/dist/utils/output.d.ts +0 -2
- package/dist/utils/output.d.ts.map +0 -1
- package/dist/utils/output.js +0 -4
- package/dist/utils/output.js.map +0 -1
- /package/dist/{cli.d.ts → src/platforms/teams/cli.d.ts} +0 -0
- /package/dist/{commands → src/platforms/teams/commands}/user.d.ts +0 -0
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { beforeEach, expect, mock, test } from 'bun:test';
|
|
2
|
-
import { infoAction, listAction, uploadAction } from './file';
|
|
3
|
-
mock.module('../client', () => ({
|
|
4
|
-
DiscordClient: mock(() => ({
|
|
5
|
-
uploadFile: mock(async () => ({
|
|
6
|
-
id: 'file_123',
|
|
7
|
-
filename: 'test.pdf',
|
|
8
|
-
size: 1024,
|
|
9
|
-
url: 'https://cdn.discordapp.com/attachments/123/456/test.pdf',
|
|
10
|
-
content_type: 'application/pdf',
|
|
11
|
-
})),
|
|
12
|
-
listFiles: mock(async () => [
|
|
13
|
-
{
|
|
14
|
-
id: 'file_123',
|
|
15
|
-
filename: 'test.pdf',
|
|
16
|
-
size: 1024,
|
|
17
|
-
url: 'https://cdn.discordapp.com/attachments/123/456/test.pdf',
|
|
18
|
-
content_type: 'application/pdf',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
id: 'file_124',
|
|
22
|
-
filename: 'image.png',
|
|
23
|
-
size: 2048,
|
|
24
|
-
url: 'https://cdn.discordapp.com/attachments/123/457/image.png',
|
|
25
|
-
content_type: 'image/png',
|
|
26
|
-
},
|
|
27
|
-
]),
|
|
28
|
-
})),
|
|
29
|
-
}));
|
|
30
|
-
mock.module('../credential-manager', () => ({
|
|
31
|
-
DiscordCredentialManager: mock(() => ({
|
|
32
|
-
load: mock(async () => ({
|
|
33
|
-
token: 'test_token',
|
|
34
|
-
current_guild: 'guild_123',
|
|
35
|
-
guilds: {},
|
|
36
|
-
})),
|
|
37
|
-
})),
|
|
38
|
-
}));
|
|
39
|
-
mock.module('../../../shared/utils/output', () => ({
|
|
40
|
-
formatOutput: (data, pretty) => JSON.stringify(data, null, pretty ? 2 : 0),
|
|
41
|
-
}));
|
|
42
|
-
mock.module('../../../shared/utils/error-handler', () => ({
|
|
43
|
-
handleError: (error) => {
|
|
44
|
-
console.error(error.message);
|
|
45
|
-
},
|
|
46
|
-
}));
|
|
47
|
-
mock.module('node:fs', () => ({
|
|
48
|
-
readFileSync: () => Buffer.from('test file content'),
|
|
49
|
-
}));
|
|
50
|
-
mock.module('node:path', () => ({
|
|
51
|
-
resolve: (path) => path,
|
|
52
|
-
}));
|
|
53
|
-
beforeEach(() => {
|
|
54
|
-
mock.restore();
|
|
55
|
-
});
|
|
56
|
-
test('upload: sends multipart request and returns file info', async () => {
|
|
57
|
-
const consoleSpy = mock((_msg) => { });
|
|
58
|
-
console.log = consoleSpy;
|
|
59
|
-
await uploadAction('ch_456', '/path/to/test.pdf', { pretty: false });
|
|
60
|
-
expect(consoleSpy).toHaveBeenCalled();
|
|
61
|
-
const output = consoleSpy.mock.calls[0][0];
|
|
62
|
-
expect(output).toContain('file_123');
|
|
63
|
-
expect(output).toContain('test.pdf');
|
|
64
|
-
});
|
|
65
|
-
test('list: filters messages with attachments', async () => {
|
|
66
|
-
const consoleSpy = mock((_msg) => { });
|
|
67
|
-
console.log = consoleSpy;
|
|
68
|
-
await listAction('ch_456', { pretty: false });
|
|
69
|
-
expect(consoleSpy).toHaveBeenCalled();
|
|
70
|
-
const output = consoleSpy.mock.calls[0][0];
|
|
71
|
-
expect(output).toContain('file_123');
|
|
72
|
-
expect(output).toContain('file_124');
|
|
73
|
-
});
|
|
74
|
-
test('info: returns single file details', async () => {
|
|
75
|
-
const consoleSpy = mock((_msg) => { });
|
|
76
|
-
console.log = consoleSpy;
|
|
77
|
-
await infoAction('ch_456', 'file_123', { pretty: false });
|
|
78
|
-
expect(consoleSpy).toHaveBeenCalled();
|
|
79
|
-
const output = consoleSpy.mock.calls[0][0];
|
|
80
|
-
expect(output).toContain('file_123');
|
|
81
|
-
expect(output).toContain('test.pdf');
|
|
82
|
-
});
|
|
83
|
-
//# sourceMappingURL=file.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file.test.js","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/file.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAE7D,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC;IAC9B,aAAa,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,C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IAAY,EAAE,EAAE,GAAE,CAAC,CAAC,CAAA;IAC7C,OAAO,CAAC,GAAG,GAAG,UAAU,CAAA;IAExB,MAAM,UAAU,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAA;IAE7C,MAAM,CAAC,UAAU,CAAC,CAAC,gBAAgB,EAAE,CAAA;IACrC,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAC1C,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;IACpC,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;AACtC,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,mCAAmC,EAAE,KAAK,IAAI,EAAE;IACnD,MAAM,UAAU,GAAG,IAAI,CAAC,CAAC,IAAY,EAAE,EAAE,GAAE,CAAC,CAAC,CAAA;IAC7C,OAAO,CAAC,GAAG,GAAG,UAAU,CAAA;IAExB,MAAM,UAAU,CAAC,QAAQ,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAA;IAEzD,MAAM,CAAC,UAAU,CAAC,CAAC,gBAAgB,EAAE,CAAA;IACrC,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAC1C,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;IACpC,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;AACtC,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"guild.test.d.ts","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/guild.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { expect, mock, test } from 'bun:test';
|
|
2
|
-
import { DiscordClient } from '../client';
|
|
3
|
-
import { DiscordCredentialManager } from '../credential-manager';
|
|
4
|
-
// Mock modules
|
|
5
|
-
mock.module('../client', () => ({
|
|
6
|
-
DiscordClient: mock((_token) => ({
|
|
7
|
-
listGuilds: mock(async () => [
|
|
8
|
-
{ id: 'guild-1', name: 'Guild One', icon: 'icon1', owner: true },
|
|
9
|
-
{ id: 'guild-2', name: 'Guild Two', icon: 'icon2', owner: false },
|
|
10
|
-
]),
|
|
11
|
-
getGuild: mock(async (guildId) => {
|
|
12
|
-
if (guildId === 'guild-1') {
|
|
13
|
-
return { id: 'guild-1', name: 'Guild One', icon: 'icon1', owner: true };
|
|
14
|
-
}
|
|
15
|
-
if (guildId === 'guild-2') {
|
|
16
|
-
return { id: 'guild-2', name: 'Guild Two', icon: 'icon2', owner: false };
|
|
17
|
-
}
|
|
18
|
-
throw new Error('Guild not found');
|
|
19
|
-
}),
|
|
20
|
-
})),
|
|
21
|
-
}));
|
|
22
|
-
mock.module('../credential-manager', () => ({
|
|
23
|
-
DiscordCredentialManager: mock(() => ({
|
|
24
|
-
load: mock(async () => ({
|
|
25
|
-
token: 'test-token',
|
|
26
|
-
current_guild: 'guild-1',
|
|
27
|
-
guilds: {
|
|
28
|
-
'guild-1': { guild_id: 'guild-1', guild_name: 'Guild One' },
|
|
29
|
-
'guild-2': { guild_id: 'guild-2', guild_name: 'Guild Two' },
|
|
30
|
-
},
|
|
31
|
-
})),
|
|
32
|
-
setCurrentGuild: mock(async () => { }),
|
|
33
|
-
getCurrentGuild: mock(async () => 'guild-1'),
|
|
34
|
-
})),
|
|
35
|
-
}));
|
|
36
|
-
test('list: returns guilds with current marker', async () => {
|
|
37
|
-
// given: credential manager with guilds
|
|
38
|
-
const credManager = new DiscordCredentialManager();
|
|
39
|
-
const config = await credManager.load();
|
|
40
|
-
// when: list action is called
|
|
41
|
-
expect(config.guilds).toBeDefined();
|
|
42
|
-
expect(Object.keys(config.guilds)).toHaveLength(2);
|
|
43
|
-
// then: guilds are returned
|
|
44
|
-
expect(config.guilds['guild-1']).toBeDefined();
|
|
45
|
-
expect(config.guilds['guild-2']).toBeDefined();
|
|
46
|
-
});
|
|
47
|
-
test('list: marks current guild', async () => {
|
|
48
|
-
// given: credential manager with current guild set
|
|
49
|
-
const credManager = new DiscordCredentialManager();
|
|
50
|
-
const config = await credManager.load();
|
|
51
|
-
const current = await credManager.getCurrentGuild();
|
|
52
|
-
// when: checking current guild
|
|
53
|
-
expect(current).toBe('guild-1');
|
|
54
|
-
// then: current guild is marked
|
|
55
|
-
expect(config.current_guild).toBe('guild-1');
|
|
56
|
-
});
|
|
57
|
-
test('info: returns guild details', async () => {
|
|
58
|
-
// given: discord client with guild data
|
|
59
|
-
const client = new DiscordClient('test-token');
|
|
60
|
-
const guild = await client.getGuild('guild-1');
|
|
61
|
-
// when: getting guild info
|
|
62
|
-
expect(guild).toBeDefined();
|
|
63
|
-
// then: guild details are returned
|
|
64
|
-
expect(guild.id).toBe('guild-1');
|
|
65
|
-
expect(guild.name).toBe('Guild One');
|
|
66
|
-
expect(guild.icon).toBe('icon1');
|
|
67
|
-
expect(guild.owner).toBe(true);
|
|
68
|
-
});
|
|
69
|
-
test('info: throws error for non-existent guild', async () => {
|
|
70
|
-
// given: discord client
|
|
71
|
-
const client = new DiscordClient('test-token');
|
|
72
|
-
// when: getting non-existent guild
|
|
73
|
-
// then: error is thrown
|
|
74
|
-
try {
|
|
75
|
-
await client.getGuild('non-existent');
|
|
76
|
-
expect(true).toBe(false); // should not reach here
|
|
77
|
-
}
|
|
78
|
-
catch (error) {
|
|
79
|
-
expect(error.message).toContain('Guild not found');
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
test('switch: updates current guild', async () => {
|
|
83
|
-
// given: credential manager
|
|
84
|
-
const credManager = new DiscordCredentialManager();
|
|
85
|
-
// when: switching guild
|
|
86
|
-
await credManager.setCurrentGuild('guild-2');
|
|
87
|
-
// then: setCurrentGuild is called
|
|
88
|
-
expect(credManager.setCurrentGuild).toHaveBeenCalledWith('guild-2');
|
|
89
|
-
});
|
|
90
|
-
test('current: returns current guild info', async () => {
|
|
91
|
-
// given: credential manager with current guild
|
|
92
|
-
const credManager = new DiscordCredentialManager();
|
|
93
|
-
const config = await credManager.load();
|
|
94
|
-
// when: getting current guild
|
|
95
|
-
const current = await credManager.getCurrentGuild();
|
|
96
|
-
// then: current guild is returned
|
|
97
|
-
expect(current).toBe('guild-1');
|
|
98
|
-
expect(config.current_guild).toBe('guild-1');
|
|
99
|
-
});
|
|
100
|
-
//# sourceMappingURL=guild.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"guild.test.js","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/guild.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAEhE,eAAe;AACf,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC;IAC9B,aAAa,EAAE,IAAI,CAAC,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;QACvC,UAAU,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;YAC3B,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE;YAChE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE;SAClE,CAAC;QACF,QAAQ,EAAE,IAAI,CAAC,KAAK,EAAE,OAAe,EAAE,EAAE;YACvC,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;gBAC1B,OAAO,EAAE,E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AAC,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IAC/B,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;AAC9C,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message.test.d.ts","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/message.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { beforeEach, expect, mock, test } from 'bun:test';
|
|
2
|
-
import { deleteAction, getAction, listAction, sendAction } from './message';
|
|
3
|
-
mock.module('../client', () => ({
|
|
4
|
-
DiscordClient: mock(() => ({
|
|
5
|
-
sendMessage: mock(async () => ({
|
|
6
|
-
id: 'msg_123',
|
|
7
|
-
channel_id: 'ch_456',
|
|
8
|
-
author: { id: 'user_789', username: 'testuser' },
|
|
9
|
-
content: 'Hello world',
|
|
10
|
-
timestamp: '2025-01-29T10:00:00Z',
|
|
11
|
-
})),
|
|
12
|
-
getMessages: mock(async () => [
|
|
13
|
-
{
|
|
14
|
-
id: 'msg_123',
|
|
15
|
-
channel_id: 'ch_456',
|
|
16
|
-
author: { id: 'user_789', username: 'testuser' },
|
|
17
|
-
content: 'Hello world',
|
|
18
|
-
timestamp: '2025-01-29T10:00:00Z',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
id: 'msg_124',
|
|
22
|
-
channel_id: 'ch_456',
|
|
23
|
-
author: { id: 'user_789', username: 'testuser' },
|
|
24
|
-
content: 'Second message',
|
|
25
|
-
timestamp: '2025-01-29T10:01:00Z',
|
|
26
|
-
},
|
|
27
|
-
]),
|
|
28
|
-
getMessage: mock(async () => ({
|
|
29
|
-
id: 'msg_123',
|
|
30
|
-
channel_id: 'ch_456',
|
|
31
|
-
author: { id: 'user_789', username: 'testuser' },
|
|
32
|
-
content: 'Hello world',
|
|
33
|
-
timestamp: '2025-01-29T10:00:00Z',
|
|
34
|
-
})),
|
|
35
|
-
deleteMessage: mock(async () => undefined),
|
|
36
|
-
})),
|
|
37
|
-
}));
|
|
38
|
-
mock.module('../credential-manager', () => ({
|
|
39
|
-
DiscordCredentialManager: mock(() => ({
|
|
40
|
-
load: mock(async () => ({
|
|
41
|
-
token: 'test_token',
|
|
42
|
-
current_guild: 'guild_123',
|
|
43
|
-
guilds: {},
|
|
44
|
-
})),
|
|
45
|
-
})),
|
|
46
|
-
}));
|
|
47
|
-
mock.module('../../../shared/utils/output', () => ({
|
|
48
|
-
formatOutput: (data, pretty) => JSON.stringify(data, null, pretty ? 2 : 0),
|
|
49
|
-
}));
|
|
50
|
-
mock.module('../../../shared/utils/error-handler', () => ({
|
|
51
|
-
handleError: (error) => {
|
|
52
|
-
console.error(error.message);
|
|
53
|
-
},
|
|
54
|
-
}));
|
|
55
|
-
beforeEach(() => {
|
|
56
|
-
mock.restore();
|
|
57
|
-
});
|
|
58
|
-
test('send: returns message with id', async () => {
|
|
59
|
-
const consoleSpy = mock((_msg) => { });
|
|
60
|
-
console.log = consoleSpy;
|
|
61
|
-
await sendAction('ch_456', 'Hello world', { pretty: false });
|
|
62
|
-
expect(consoleSpy).toHaveBeenCalled();
|
|
63
|
-
const output = consoleSpy.mock.calls[0][0];
|
|
64
|
-
expect(output).toContain('msg_123');
|
|
65
|
-
});
|
|
66
|
-
test('list: returns array of messages', async () => {
|
|
67
|
-
const consoleSpy = mock((_msg) => { });
|
|
68
|
-
console.log = consoleSpy;
|
|
69
|
-
await listAction('ch_456', { limit: 50, pretty: false });
|
|
70
|
-
expect(consoleSpy).toHaveBeenCalled();
|
|
71
|
-
const output = consoleSpy.mock.calls[0][0];
|
|
72
|
-
expect(output).toContain('msg_123');
|
|
73
|
-
expect(output).toContain('msg_124');
|
|
74
|
-
});
|
|
75
|
-
test('get: returns single message', async () => {
|
|
76
|
-
const consoleSpy = mock((_msg) => { });
|
|
77
|
-
console.log = consoleSpy;
|
|
78
|
-
await getAction('ch_456', 'msg_123', { pretty: false });
|
|
79
|
-
expect(consoleSpy).toHaveBeenCalled();
|
|
80
|
-
const output = consoleSpy.mock.calls[0][0];
|
|
81
|
-
expect(output).toContain('msg_123');
|
|
82
|
-
});
|
|
83
|
-
test('delete: returns success', async () => {
|
|
84
|
-
const consoleSpy = mock((_msg) => { });
|
|
85
|
-
console.log = consoleSpy;
|
|
86
|
-
await deleteAction('ch_456', 'msg_123', { force: true, pretty: false });
|
|
87
|
-
expect(consoleSpy).toHaveBeenCalled();
|
|
88
|
-
const output = consoleSpy.mock.calls[0][0];
|
|
89
|
-
expect(output).toContain('deleted');
|
|
90
|
-
});
|
|
91
|
-
//# sourceMappingURL=message.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message.test.js","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/message.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAE3E,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC;IAC9B,aAAa,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QACzB,WAAW,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;YAC7B,EAAE,EAAE,SAAS;YACb,UAAU,EAAE,QAAQ;YACpB,MAAM,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE;YAChD,OAAO,EAAE,aAAa;YACtB,SAAS,EAAE,sBAAsB;SAClC,CAAC,CAAC;QACH,WAAW,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;YAC5B;gBACE,EAAE,EAAE,SAAS;gBACb,UAAU,EAAE,QAAQ;gBACpB,MAAM,EAAE,EAAE,EAAE,EA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CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reaction.test.d.ts","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/reaction.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { expect, mock, test } from 'bun:test';
|
|
2
|
-
import { addAction, listAction, removeAction } from './reaction';
|
|
3
|
-
// Mock modules
|
|
4
|
-
mock.module('../client', () => ({
|
|
5
|
-
DiscordClient: mock(() => ({
|
|
6
|
-
addReaction: mock(async () => { }),
|
|
7
|
-
removeReaction: mock(async () => { }),
|
|
8
|
-
getMessage: mock(async () => ({
|
|
9
|
-
id: 'msg123',
|
|
10
|
-
channel_id: 'ch123',
|
|
11
|
-
author: { id: 'user123', username: 'testuser' },
|
|
12
|
-
content: 'test message',
|
|
13
|
-
timestamp: '2024-01-01T00:00:00Z',
|
|
14
|
-
reactions: [
|
|
15
|
-
{
|
|
16
|
-
emoji: { name: 'thumbsup', id: undefined },
|
|
17
|
-
count: 2,
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
emoji: { name: 'heart', id: undefined },
|
|
21
|
-
count: 1,
|
|
22
|
-
},
|
|
23
|
-
],
|
|
24
|
-
})),
|
|
25
|
-
})),
|
|
26
|
-
}));
|
|
27
|
-
mock.module('../credential-manager', () => ({
|
|
28
|
-
DiscordCredentialManager: mock(() => ({
|
|
29
|
-
load: mock(async () => ({
|
|
30
|
-
token: 'test-token',
|
|
31
|
-
})),
|
|
32
|
-
})),
|
|
33
|
-
}));
|
|
34
|
-
test('add: sends correct PUT request with emoji', async () => {
|
|
35
|
-
const consoleSpy = mock((_msg) => { });
|
|
36
|
-
const originalLog = console.log;
|
|
37
|
-
console.log = consoleSpy;
|
|
38
|
-
try {
|
|
39
|
-
await addAction('ch123', 'msg123', 'thumbsup', { pretty: false });
|
|
40
|
-
expect(consoleSpy).toHaveBeenCalled();
|
|
41
|
-
const output = JSON.parse(consoleSpy.mock.calls[0][0]);
|
|
42
|
-
expect(output.success).toBe(true);
|
|
43
|
-
expect(output.channel_id).toBe('ch123');
|
|
44
|
-
expect(output.message_id).toBe('msg123');
|
|
45
|
-
expect(output.emoji).toBe('thumbsup');
|
|
46
|
-
}
|
|
47
|
-
finally {
|
|
48
|
-
console.log = originalLog;
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
test('remove: sends correct DELETE request with emoji', async () => {
|
|
52
|
-
const consoleSpy = mock((_msg) => { });
|
|
53
|
-
const originalLog = console.log;
|
|
54
|
-
console.log = consoleSpy;
|
|
55
|
-
try {
|
|
56
|
-
await removeAction('ch123', 'msg123', 'thumbsup', { pretty: false });
|
|
57
|
-
expect(consoleSpy).toHaveBeenCalled();
|
|
58
|
-
const output = JSON.parse(consoleSpy.mock.calls[0][0]);
|
|
59
|
-
expect(output.success).toBe(true);
|
|
60
|
-
expect(output.channel_id).toBe('ch123');
|
|
61
|
-
expect(output.message_id).toBe('msg123');
|
|
62
|
-
expect(output.emoji).toBe('thumbsup');
|
|
63
|
-
}
|
|
64
|
-
finally {
|
|
65
|
-
console.log = originalLog;
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
test('list: extracts reactions from message', async () => {
|
|
69
|
-
const consoleSpy = mock((_msg) => { });
|
|
70
|
-
const originalLog = console.log;
|
|
71
|
-
console.log = consoleSpy;
|
|
72
|
-
try {
|
|
73
|
-
await listAction('ch123', 'msg123', { pretty: false });
|
|
74
|
-
expect(consoleSpy).toHaveBeenCalled();
|
|
75
|
-
const output = JSON.parse(consoleSpy.mock.calls[0][0]);
|
|
76
|
-
expect(output.channel_id).toBe('ch123');
|
|
77
|
-
expect(output.message_id).toBe('msg123');
|
|
78
|
-
expect(Array.isArray(output.reactions)).toBe(true);
|
|
79
|
-
expect(output.reactions.length).toBe(2);
|
|
80
|
-
expect(output.reactions[0].emoji.name).toBe('thumbsup');
|
|
81
|
-
expect(output.reactions[0].count).toBe(2);
|
|
82
|
-
}
|
|
83
|
-
finally {
|
|
84
|
-
console.log = originalLog;
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
test('add: handles missing token gracefully', async () => {
|
|
88
|
-
const credManagerMock = mock(() => ({
|
|
89
|
-
load: mock(async () => ({
|
|
90
|
-
token: null,
|
|
91
|
-
})),
|
|
92
|
-
}));
|
|
93
|
-
mock.module('../credential-manager', () => ({
|
|
94
|
-
DiscordCredentialManager: credManagerMock,
|
|
95
|
-
}));
|
|
96
|
-
const consoleSpy = mock((_msg) => { });
|
|
97
|
-
const originalLog = console.log;
|
|
98
|
-
const originalExit = process.exit;
|
|
99
|
-
let _exitCode = 0;
|
|
100
|
-
process.exit = mock((code) => {
|
|
101
|
-
_exitCode = code;
|
|
102
|
-
});
|
|
103
|
-
console.log = consoleSpy;
|
|
104
|
-
try {
|
|
105
|
-
await addAction('ch123', 'msg123', 'thumbsup', { pretty: false });
|
|
106
|
-
expect(consoleSpy).toHaveBeenCalled();
|
|
107
|
-
const output = JSON.parse(consoleSpy.mock.calls[0][0]);
|
|
108
|
-
expect(output.error).toBeDefined();
|
|
109
|
-
}
|
|
110
|
-
finally {
|
|
111
|
-
console.log = originalLog;
|
|
112
|
-
process.exit = originalExit;
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
//# sourceMappingURL=reaction.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reaction.test.js","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/reaction.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAEhE,eAAe;AACf,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC;IAC9B,aAAa,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QACzB,WAAW,EAAE,IAAI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AAA;QACrC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QACtD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAA;IACpC,CAAC;YAAS,CAAC;QACT,OAAO,CAAC,GAAG,GAAG,WAAW,CAAA;QACzB,OAAO,CAAC,IAAI,GAAG,YAAY,CAAA;IAC7B,CAAC;AACH,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snapshot.test.d.ts","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/snapshot.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { expect, test } from 'bun:test';
|
|
2
|
-
import { snapshotCommand } from './snapshot';
|
|
3
|
-
test('snapshot: command is defined', () => {
|
|
4
|
-
expect(snapshotCommand).toBeDefined();
|
|
5
|
-
expect(snapshotCommand.name()).toBe('snapshot');
|
|
6
|
-
});
|
|
7
|
-
test('snapshot: command has correct description', () => {
|
|
8
|
-
expect(snapshotCommand.description()).toContain('guild state');
|
|
9
|
-
});
|
|
10
|
-
test('snapshot: command has --channels-only option', () => {
|
|
11
|
-
const options = snapshotCommand.options;
|
|
12
|
-
const channelsOnlyOption = options.find((opt) => opt.long === '--channels-only');
|
|
13
|
-
expect(channelsOnlyOption).toBeDefined();
|
|
14
|
-
});
|
|
15
|
-
test('snapshot: command has --users-only option', () => {
|
|
16
|
-
const options = snapshotCommand.options;
|
|
17
|
-
const usersOnlyOption = options.find((opt) => opt.long === '--users-only');
|
|
18
|
-
expect(usersOnlyOption).toBeDefined();
|
|
19
|
-
});
|
|
20
|
-
test('snapshot: command has --limit option', () => {
|
|
21
|
-
const options = snapshotCommand.options;
|
|
22
|
-
const limitOption = options.find((opt) => opt.long === '--limit');
|
|
23
|
-
expect(limitOption).toBeDefined();
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=snapshot.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snapshot.test.js","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/snapshot.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAE5C,IAAI,CAAC,8BAA8B,EAAE,GAAG,EAAE;IACxC,MAAM,CAAC,eAAe,CAAC,CAAC,WAAW,EAAE,CAAA;IACrC,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;AACjD,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,2CAA2C,EAAE,GAAG,EAAE;IACrD,MAAM,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAA;AAChE,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,8CAA8C,EAAE,GAAG,EAAE;IACxD,MAAM,OAAO,GAAG,eAAe,CAAC,OAAO,CAAA;IACvC,MAAM,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,iBAAiB,CAAC,CAAA;IAChF,MAAM,CAAC,kBAAkB,CAAC,CAAC,WAAW,EAAE,CAAA;AAC1C,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,2CAA2C,EAAE,GAAG,EAAE;IACrD,MAAM,OAAO,GAAG,eAAe,CAAC,OAAO,CAAA;IACvC,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,cAAc,CAAC,CAAA;IAC1E,MAAM,CAAC,eAAe,CAAC,CAAC,WAAW,EAAE,CAAA;AACvC,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,sCAAsC,EAAE,GAAG,EAAE;IAChD,MAAM,OAAO,GAAG,eAAe,CAAC,OAAO,CAAA;IACvC,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAA;IACjE,MAAM,CAAC,WAAW,CAAC,CAAC,WAAW,EAAE,CAAA;AACnC,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user.test.d.ts","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/user.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { expect, mock, test } from 'bun:test';
|
|
2
|
-
// Mock DiscordClient
|
|
3
|
-
const mockClient = {
|
|
4
|
-
testAuth: mock(async () => ({
|
|
5
|
-
id: 'user123',
|
|
6
|
-
username: 'testuser',
|
|
7
|
-
global_name: 'Test User',
|
|
8
|
-
avatar: 'avatar_hash',
|
|
9
|
-
bot: false,
|
|
10
|
-
})),
|
|
11
|
-
getUser: mock(async (userId) => ({
|
|
12
|
-
id: userId,
|
|
13
|
-
username: 'testuser',
|
|
14
|
-
global_name: 'Test User',
|
|
15
|
-
avatar: 'avatar_hash',
|
|
16
|
-
bot: false,
|
|
17
|
-
})),
|
|
18
|
-
listUsers: mock(async (_guildId) => [
|
|
19
|
-
{
|
|
20
|
-
id: 'user1',
|
|
21
|
-
username: 'alice',
|
|
22
|
-
global_name: 'Alice',
|
|
23
|
-
avatar: 'avatar1',
|
|
24
|
-
bot: false,
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
id: 'user2',
|
|
28
|
-
username: 'bot_user',
|
|
29
|
-
global_name: 'Bot User',
|
|
30
|
-
avatar: 'avatar2',
|
|
31
|
-
bot: true,
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
id: 'user3',
|
|
35
|
-
username: 'bob',
|
|
36
|
-
global_name: 'Bob',
|
|
37
|
-
avatar: 'avatar3',
|
|
38
|
-
bot: false,
|
|
39
|
-
},
|
|
40
|
-
]),
|
|
41
|
-
};
|
|
42
|
-
test('me returns current user info', async () => {
|
|
43
|
-
// given: authenticated user
|
|
44
|
-
const user = await mockClient.testAuth();
|
|
45
|
-
// when: getting current user
|
|
46
|
-
const result = {
|
|
47
|
-
id: user.id,
|
|
48
|
-
username: user.username,
|
|
49
|
-
global_name: user.global_name,
|
|
50
|
-
avatar: user.avatar,
|
|
51
|
-
bot: user.bot,
|
|
52
|
-
};
|
|
53
|
-
// then: returns user object
|
|
54
|
-
expect(result.id).toBe('user123');
|
|
55
|
-
expect(result.username).toBe('testuser');
|
|
56
|
-
expect(result.global_name).toBe('Test User');
|
|
57
|
-
expect(result.bot).toBe(false);
|
|
58
|
-
});
|
|
59
|
-
test('info returns user details by id', async () => {
|
|
60
|
-
// given: user id
|
|
61
|
-
const userId = 'user123';
|
|
62
|
-
// when: getting user info
|
|
63
|
-
const user = await mockClient.getUser(userId);
|
|
64
|
-
const result = {
|
|
65
|
-
id: user.id,
|
|
66
|
-
username: user.username,
|
|
67
|
-
global_name: user.global_name,
|
|
68
|
-
avatar: user.avatar,
|
|
69
|
-
bot: user.bot,
|
|
70
|
-
};
|
|
71
|
-
// then: returns user object
|
|
72
|
-
expect(result.id).toBe('user123');
|
|
73
|
-
expect(result.username).toBe('testuser');
|
|
74
|
-
});
|
|
75
|
-
test('list returns guild members', async () => {
|
|
76
|
-
// given: guild id
|
|
77
|
-
const guildId = 'guild123';
|
|
78
|
-
// when: listing users
|
|
79
|
-
const users = await mockClient.listUsers(guildId);
|
|
80
|
-
const result = users.map((u) => ({
|
|
81
|
-
id: u.id,
|
|
82
|
-
username: u.username,
|
|
83
|
-
global_name: u.global_name,
|
|
84
|
-
avatar: u.avatar,
|
|
85
|
-
bot: u.bot,
|
|
86
|
-
}));
|
|
87
|
-
// then: returns array of users
|
|
88
|
-
expect(result).toHaveLength(3);
|
|
89
|
-
expect(result[0].username).toBe('alice');
|
|
90
|
-
expect(result[1].bot).toBe(true);
|
|
91
|
-
expect(result[2].username).toBe('bob');
|
|
92
|
-
});
|
|
93
|
-
test('list filters out bots when flag not set', async () => {
|
|
94
|
-
// given: guild id and users with bots
|
|
95
|
-
const guildId = 'guild123';
|
|
96
|
-
const users = await mockClient.listUsers(guildId);
|
|
97
|
-
// when: filtering out bots
|
|
98
|
-
const filtered = users.filter((u) => !u.bot);
|
|
99
|
-
// then: returns only non-bot users
|
|
100
|
-
expect(filtered).toHaveLength(2);
|
|
101
|
-
expect(filtered.every((u) => !u.bot)).toBe(true);
|
|
102
|
-
});
|
|
103
|
-
//# sourceMappingURL=user.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user.test.js","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/user.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE7C,qBAAqB;AACrB,MAAM,UAAU,GAAG;IACjB,QAAQ,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;QAC1B,EAAE,EAAE,SAAS;QACb,QAAQ,EAAE,UAAU;QACpB,WAAW,EAAE,WAAW;QACxB,MAAM,EAAE,aAAa;QACrB,GAAG,EAAE,KAAK;KACX,CAAC,CAAC;IACH,OAAO,EAAE,IAAI,CAAC,KAAK,EAAE,MAAc,EAAE,EAAE,CAAC,CAAC;QACvC,EAAE,EAAE,MAAM;QACV,QAAQ,EAAE,UAAU;QACpB,WAAW,EAAE,WAAW;QACxB,MAAM,EAAE,aAAa;QACrB,GAAG,EAAE,KAAK;KACX,CAAC,CAAC;IACH,SAAS,EAAE,IAAI,CAAC,KAAK,EAAE,QAAgB,EAAE,EAAE,CAAC;QAC1C;YACE,EAAE,EAAE,OAAO;YACX,QAAQ,EAAE,OAAO;YACjB,WAAW,EAAE,O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