agent-messenger 1.0.0 → 1.2.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/CONTRIBUTING.md +2 -2
- package/README.md +18 -15
- package/biome.json +34 -2
- 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 +4 -4
- package/dist/src/platforms/discord/cli.js.map +1 -1
- package/dist/src/platforms/discord/client.d.ts +26 -5
- package/dist/src/platforms/discord/client.d.ts.map +1 -1
- package/dist/src/platforms/discord/client.js +115 -17
- package/dist/src/platforms/discord/client.js.map +1 -1
- package/dist/src/platforms/discord/commands/auth.js +16 -16
- package/dist/src/platforms/discord/commands/auth.js.map +1 -1
- package/dist/src/platforms/discord/commands/channel.js +4 -4
- package/dist/src/platforms/discord/commands/channel.js.map +1 -1
- package/dist/src/platforms/discord/commands/dm.d.ts +9 -0
- package/dist/src/platforms/discord/commands/dm.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/dm.js +68 -0
- package/dist/src/platforms/discord/commands/dm.js.map +1 -0
- package/dist/src/platforms/discord/commands/friend.d.ts +3 -0
- package/dist/src/platforms/discord/commands/friend.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/friend.js +39 -0
- package/dist/src/platforms/discord/commands/friend.js.map +1 -0
- package/dist/src/platforms/discord/commands/index.d.ts +1 -1
- package/dist/src/platforms/discord/commands/index.d.ts.map +1 -1
- package/dist/src/platforms/discord/commands/index.js +1 -1
- package/dist/src/platforms/discord/commands/index.js.map +1 -1
- package/dist/src/platforms/discord/commands/member.d.ts +3 -0
- package/dist/src/platforms/discord/commands/member.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/member.js +47 -0
- package/dist/src/platforms/discord/commands/member.js.map +1 -0
- package/dist/src/platforms/discord/commands/mention.d.ts +8 -0
- package/dist/src/platforms/discord/commands/mention.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/mention.js +47 -0
- package/dist/src/platforms/discord/commands/mention.js.map +1 -0
- package/dist/src/platforms/discord/commands/message.d.ts +13 -0
- package/dist/src/platforms/discord/commands/message.d.ts.map +1 -1
- package/dist/src/platforms/discord/commands/message.js +95 -1
- package/dist/src/platforms/discord/commands/message.js.map +1 -1
- package/dist/src/platforms/discord/commands/note.d.ts +3 -0
- package/dist/src/platforms/discord/commands/note.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/note.js +56 -0
- package/dist/src/platforms/discord/commands/note.js.map +1 -0
- package/dist/src/platforms/discord/commands/profile.d.ts +3 -0
- package/dist/src/platforms/discord/commands/profile.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/profile.js +47 -0
- package/dist/src/platforms/discord/commands/profile.js.map +1 -0
- package/dist/src/platforms/discord/commands/server.d.ts +15 -0
- package/dist/src/platforms/discord/commands/server.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/server.js +102 -0
- package/dist/src/platforms/discord/commands/server.js.map +1 -0
- package/dist/src/platforms/discord/commands/snapshot.js +10 -10
- package/dist/src/platforms/discord/commands/snapshot.js.map +1 -1
- package/dist/src/platforms/discord/commands/thread.d.ts +10 -0
- package/dist/src/platforms/discord/commands/thread.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/thread.js +67 -0
- package/dist/src/platforms/discord/commands/thread.js.map +1 -0
- package/dist/src/platforms/discord/commands/user.d.ts.map +1 -1
- package/dist/src/platforms/discord/commands/user.js +14 -5
- package/dist/src/platforms/discord/commands/user.js.map +1 -1
- package/dist/src/platforms/discord/credential-manager.d.ts +13 -13
- package/dist/src/platforms/discord/credential-manager.d.ts.map +1 -1
- package/dist/src/platforms/discord/credential-manager.js +28 -22
- package/dist/src/platforms/discord/credential-manager.js.map +1 -1
- package/dist/src/platforms/discord/super-properties.d.ts +4 -0
- package/dist/src/platforms/discord/super-properties.d.ts.map +1 -0
- package/dist/src/platforms/discord/super-properties.js +50 -0
- package/dist/src/platforms/discord/super-properties.js.map +1 -0
- package/dist/src/platforms/discord/token-extractor.d.ts +6 -1
- package/dist/src/platforms/discord/token-extractor.d.ts.map +1 -1
- package/dist/src/platforms/discord/token-extractor.js +27 -2
- package/dist/src/platforms/discord/token-extractor.js.map +1 -1
- package/dist/src/platforms/discord/types.d.ts +389 -22
- package/dist/src/platforms/discord/types.d.ts.map +1 -1
- package/dist/src/platforms/discord/types.js +46 -4
- package/dist/src/platforms/discord/types.js.map +1 -1
- package/dist/src/platforms/slack/cli.d.ts.map +1 -1
- package/dist/src/platforms/slack/cli.js +7 -2
- package/dist/src/platforms/slack/cli.js.map +1 -1
- package/dist/src/platforms/slack/client.d.ts +19 -1
- package/dist/src/platforms/slack/client.d.ts.map +1 -1
- package/dist/src/platforms/slack/client.js +134 -0
- package/dist/src/platforms/slack/client.js.map +1 -1
- package/dist/src/platforms/slack/commands/activity.d.ts +3 -0
- package/dist/src/platforms/slack/commands/activity.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/activity.js +40 -0
- package/dist/src/platforms/slack/commands/activity.js.map +1 -0
- package/dist/src/platforms/slack/commands/drafts.d.ts +3 -0
- package/dist/src/platforms/slack/commands/drafts.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/drafts.js +45 -0
- package/dist/src/platforms/slack/commands/drafts.js.map +1 -0
- package/dist/src/platforms/slack/commands/index.d.ts +5 -0
- package/dist/src/platforms/slack/commands/index.d.ts.map +1 -1
- package/dist/src/platforms/slack/commands/index.js +5 -0
- package/dist/src/platforms/slack/commands/index.js.map +1 -1
- package/dist/src/platforms/slack/commands/saved.d.ts +3 -0
- package/dist/src/platforms/slack/commands/saved.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/saved.js +54 -0
- package/dist/src/platforms/slack/commands/saved.js.map +1 -0
- package/dist/src/platforms/slack/commands/sections.d.ts +3 -0
- package/dist/src/platforms/slack/commands/sections.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/sections.js +37 -0
- package/dist/src/platforms/slack/commands/sections.js.map +1 -0
- package/dist/src/platforms/slack/commands/unread.d.ts +12 -0
- package/dist/src/platforms/slack/commands/unread.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/unread.js +89 -0
- package/dist/src/platforms/slack/commands/unread.js.map +1 -0
- 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 +8 -1
- package/dist/src/platforms/slack/token-extractor.d.ts.map +1 -1
- package/dist/src/platforms/slack/token-extractor.js +83 -11
- package/dist/src/platforms/slack/token-extractor.js.map +1 -1
- package/dist/src/platforms/slack/types.d.ts +52 -0
- package/dist/src/platforms/slack/types.d.ts.map +1 -1
- package/dist/src/platforms/slack/types.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 +41 -0
- package/dist/src/platforms/teams/token-extractor.d.ts.map +1 -0
- package/dist/src/platforms/teams/token-extractor.js +360 -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/dist/src/shared/utils/derived-key-cache.d.ts +20 -0
- package/dist/src/shared/utils/derived-key-cache.d.ts.map +1 -0
- package/dist/src/shared/utils/derived-key-cache.js +52 -0
- package/dist/src/shared/utils/derived-key-cache.js.map +1 -0
- package/docs/README.md +113 -0
- package/docs/biome.json +8 -0
- package/docs/bun.lock +1426 -0
- package/docs/content/docs/agent-skills.mdx +98 -0
- package/docs/content/docs/index.mdx +124 -0
- package/docs/{discord.md → content/docs/integrations/discord.mdx} +46 -21
- package/docs/content/docs/integrations/meta.json +5 -0
- package/docs/{slack.md → content/docs/integrations/slack.mdx} +5 -4
- package/docs/content/docs/integrations/teams.mdx +322 -0
- package/docs/content/docs/meta.json +8 -0
- package/docs/content/docs/quick-start.mdx +103 -0
- package/docs/eslint.config.mjs +30 -0
- package/docs/next.config.ts +10 -0
- package/docs/package.json +42 -0
- package/docs/postcss.config.mjs +7 -0
- package/docs/public/file.svg +1 -0
- package/docs/public/globe.svg +1 -0
- package/docs/public/next.svg +1 -0
- package/docs/public/vercel.svg +1 -0
- package/docs/public/window.svg +1 -0
- package/docs/source.config.ts +11 -0
- package/docs/src/app/api/search/route.ts +4 -0
- package/docs/src/app/docs/[[...slug]]/page.tsx +53 -0
- package/docs/src/app/docs/layout.tsx +21 -0
- package/docs/src/app/globals.css +10 -0
- package/docs/src/app/icon.png +0 -0
- package/docs/src/app/layout.config.tsx +7 -0
- package/docs/src/app/layout.tsx +35 -0
- package/docs/src/app/page.tsx +489 -0
- package/docs/src/lib/source.ts +15 -0
- package/docs/src/mdx-components.tsx +18 -0
- package/docs/tsconfig.json +36 -0
- package/e2e/README.md +256 -0
- package/e2e/config.ts +51 -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-discord/SKILL.md +96 -30
- package/skills/agent-discord/references/authentication.md +27 -27
- package/skills/agent-discord/references/common-patterns.md +15 -15
- package/skills/agent-discord/templates/post-message.sh +6 -6
- package/skills/agent-discord/templates/{guild-summary.sh → server-summary.sh} +20 -20
- package/skills/agent-slack/SKILL.md +53 -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/cli.ts +3 -3
- package/src/platforms/discord/client.test.ts +15 -15
- package/src/platforms/discord/client.ts +163 -17
- package/src/platforms/discord/commands/auth.test.ts +53 -37
- package/src/platforms/discord/commands/auth.ts +16 -16
- package/src/platforms/discord/commands/channel.test.ts +58 -46
- package/src/platforms/discord/commands/channel.ts +4 -4
- package/src/platforms/discord/commands/dm.test.ts +146 -0
- package/src/platforms/discord/commands/dm.ts +85 -0
- package/src/platforms/discord/commands/file.test.ts +40 -53
- package/src/platforms/discord/commands/friend.test.ts +134 -0
- package/src/platforms/discord/commands/friend.ts +45 -0
- package/src/platforms/discord/commands/index.ts +1 -1
- package/src/platforms/discord/commands/member.test.ts +98 -0
- package/src/platforms/discord/commands/member.ts +59 -0
- package/src/platforms/discord/commands/mention.test.ts +129 -0
- package/src/platforms/discord/commands/mention.ts +59 -0
- package/src/platforms/discord/commands/message.test.ts +139 -44
- package/src/platforms/discord/commands/message.ts +134 -1
- package/src/platforms/discord/commands/note.test.ts +84 -0
- package/src/platforms/discord/commands/note.ts +73 -0
- package/src/platforms/discord/commands/profile.test.ts +107 -0
- package/src/platforms/discord/commands/profile.ts +55 -0
- package/src/platforms/discord/commands/reaction.test.ts +54 -42
- package/src/platforms/discord/commands/server.test.ts +137 -0
- package/src/platforms/discord/commands/{guild.ts → server.ts} +31 -31
- package/src/platforms/discord/commands/snapshot.test.ts +1 -1
- package/src/platforms/discord/commands/snapshot.ts +10 -10
- package/src/platforms/discord/commands/thread.test.ts +121 -0
- package/src/platforms/discord/commands/thread.ts +92 -0
- package/src/platforms/discord/commands/user.test.ts +8 -8
- package/src/platforms/discord/commands/user.ts +16 -5
- package/src/platforms/discord/credential-manager.test.ts +137 -136
- package/src/platforms/discord/credential-manager.ts +35 -26
- package/src/platforms/discord/super-properties.ts +55 -0
- package/src/platforms/discord/token-extractor.test.ts +133 -383
- package/src/platforms/discord/token-extractor.ts +37 -3
- package/src/platforms/discord/types.test.ts +8 -8
- package/src/platforms/discord/types.ts +144 -8
- package/{tests → src/platforms/slack}/cli.test.ts +3 -3
- package/src/platforms/slack/cli.ts +10 -0
- package/{tests/slack-client.test.ts → src/platforms/slack/client.test.ts} +1 -1
- package/src/platforms/slack/client.ts +172 -1
- package/src/platforms/slack/commands/activity.test.ts +147 -0
- package/src/platforms/slack/commands/activity.ts +65 -0
- package/{tests → src/platforms/slack}/commands/auth.test.ts +25 -13
- package/{tests → src/platforms/slack}/commands/channel.test.ts +2 -2
- package/src/platforms/slack/commands/drafts.test.ts +136 -0
- package/src/platforms/slack/commands/drafts.ts +62 -0
- package/{tests → src/platforms/slack}/commands/file.test.ts +2 -2
- package/src/platforms/slack/commands/index.ts +5 -0
- package/{tests → src/platforms/slack}/commands/message.test.ts +2 -2
- package/{tests → src/platforms/slack}/commands/reaction.test.ts +1 -1
- package/src/platforms/slack/commands/saved.test.ts +140 -0
- package/src/platforms/slack/commands/saved.ts +71 -0
- package/src/platforms/slack/commands/sections.test.ts +80 -0
- package/src/platforms/slack/commands/sections.ts +50 -0
- package/{tests → src/platforms/slack}/commands/snapshot.test.ts +117 -105
- package/src/platforms/slack/commands/unread.test.ts +139 -0
- package/src/platforms/slack/commands/unread.ts +129 -0
- 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 +93 -12
- package/{tests → src/platforms/slack}/types.test.ts +1 -1
- package/src/platforms/slack/types.ts +58 -0
- 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 +490 -0
- package/src/platforms/teams/types.test.ts +226 -0
- package/src/platforms/teams/types.ts +140 -0
- package/src/shared/utils/derived-key-cache.test.ts +136 -0
- package/src/shared/utils/derived-key-cache.ts +63 -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/src/platforms/discord/commands/guild.test.ts +0 -117
- /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,453 +0,0 @@
|
|
|
1
|
-
import { afterAll, beforeEach, describe, expect, test } from 'bun:test';
|
|
2
|
-
import { rmSync } from 'node:fs';
|
|
3
|
-
import { join } from 'node:path';
|
|
4
|
-
import { CredentialManager } from '../../src/platforms/slack/credential-manager';
|
|
5
|
-
const testConfigDir = join(import.meta.dir, '.test-workspace-config');
|
|
6
|
-
describe('Workspace Commands', () => {
|
|
7
|
-
let credManager;
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
rmSync(testConfigDir, { recursive: true, force: true });
|
|
10
|
-
credManager = new CredentialManager(testConfigDir);
|
|
11
|
-
});
|
|
12
|
-
afterAll(() => {
|
|
13
|
-
rmSync(testConfigDir, { recursive: true, force: true });
|
|
14
|
-
});
|
|
15
|
-
describe('workspace list', () => {
|
|
16
|
-
test('returns empty list when no workspaces exist', async () => {
|
|
17
|
-
// Given: No workspaces configured
|
|
18
|
-
// When: Loading config
|
|
19
|
-
const config = await credManager.load();
|
|
20
|
-
// Then: Should have empty workspaces
|
|
21
|
-
expect(Object.keys(config.workspaces)).toHaveLength(0);
|
|
22
|
-
});
|
|
23
|
-
test('lists all workspaces with current marker', async () => {
|
|
24
|
-
// Given: Multiple workspaces with one as current
|
|
25
|
-
const ws1 = {
|
|
26
|
-
workspace_id: 'T123',
|
|
27
|
-
workspace_name: 'acme-corp',
|
|
28
|
-
token: 'xoxc-123',
|
|
29
|
-
cookie: 'xoxd-123',
|
|
30
|
-
};
|
|
31
|
-
const ws2 = {
|
|
32
|
-
workspace_id: 'T456',
|
|
33
|
-
workspace_name: 'side-project',
|
|
34
|
-
token: 'xoxc-456',
|
|
35
|
-
cookie: 'xoxd-456',
|
|
36
|
-
};
|
|
37
|
-
await credManager.setWorkspace(ws1);
|
|
38
|
-
await credManager.setWorkspace(ws2);
|
|
39
|
-
await credManager.setCurrentWorkspace('T123');
|
|
40
|
-
// When: Loading config
|
|
41
|
-
const config = await credManager.load();
|
|
42
|
-
const workspaces = Object.values(config.workspaces);
|
|
43
|
-
// Then: Should list all workspaces
|
|
44
|
-
expect(workspaces).toHaveLength(2);
|
|
45
|
-
expect(workspaces.map((w) => w.workspace_id)).toContain('T123');
|
|
46
|
-
expect(workspaces.map((w) => w.workspace_id)).toContain('T456');
|
|
47
|
-
expect(config.current_workspace).toBe('T123');
|
|
48
|
-
});
|
|
49
|
-
test('shows current marker for active workspace', async () => {
|
|
50
|
-
// Given: Workspace set as current
|
|
51
|
-
const ws = {
|
|
52
|
-
workspace_id: 'T789',
|
|
53
|
-
workspace_name: 'current-ws',
|
|
54
|
-
token: 'xoxc-789',
|
|
55
|
-
cookie: 'xoxd-789',
|
|
56
|
-
};
|
|
57
|
-
await credManager.setWorkspace(ws);
|
|
58
|
-
await credManager.setCurrentWorkspace('T789');
|
|
59
|
-
// When: Loading config
|
|
60
|
-
const config = await credManager.load();
|
|
61
|
-
// Then: Current workspace should match
|
|
62
|
-
expect(config.current_workspace).toBe('T789');
|
|
63
|
-
expect(config.workspaces.T789).toBeDefined();
|
|
64
|
-
});
|
|
65
|
-
test('handles list with no current workspace', async () => {
|
|
66
|
-
// Given: Workspaces exist but none is current
|
|
67
|
-
const ws = {
|
|
68
|
-
workspace_id: 'T999',
|
|
69
|
-
workspace_name: 'no-current',
|
|
70
|
-
token: 'xoxc-999',
|
|
71
|
-
cookie: 'xoxd-999',
|
|
72
|
-
};
|
|
73
|
-
await credManager.setWorkspace(ws);
|
|
74
|
-
// When: Loading config
|
|
75
|
-
const config = await credManager.load();
|
|
76
|
-
// Then: current_workspace should be null
|
|
77
|
-
expect(config.current_workspace).toBeNull();
|
|
78
|
-
expect(config.workspaces.T999).toBeDefined();
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
describe('workspace switch', () => {
|
|
82
|
-
test('switches to existing workspace', async () => {
|
|
83
|
-
// Given: Multiple workspaces exist
|
|
84
|
-
const ws1 = {
|
|
85
|
-
workspace_id: 'T111',
|
|
86
|
-
workspace_name: 'first',
|
|
87
|
-
token: 'xoxc-111',
|
|
88
|
-
cookie: 'xoxd-111',
|
|
89
|
-
};
|
|
90
|
-
const ws2 = {
|
|
91
|
-
workspace_id: 'T222',
|
|
92
|
-
workspace_name: 'second',
|
|
93
|
-
token: 'xoxc-222',
|
|
94
|
-
cookie: 'xoxd-222',
|
|
95
|
-
};
|
|
96
|
-
await credManager.setWorkspace(ws1);
|
|
97
|
-
await credManager.setWorkspace(ws2);
|
|
98
|
-
await credManager.setCurrentWorkspace('T111');
|
|
99
|
-
// When: Switching to second workspace
|
|
100
|
-
await credManager.setCurrentWorkspace('T222');
|
|
101
|
-
// Then: Current should be updated
|
|
102
|
-
const config = await credManager.load();
|
|
103
|
-
expect(config.current_workspace).toBe('T222');
|
|
104
|
-
});
|
|
105
|
-
test('fails when workspace does not exist', async () => {
|
|
106
|
-
// Given: Workspace does not exist
|
|
107
|
-
// When: Trying to get non-existent workspace
|
|
108
|
-
const ws = await credManager.getWorkspace('nonexistent');
|
|
109
|
-
// Then: Should return null
|
|
110
|
-
expect(ws).toBeNull();
|
|
111
|
-
});
|
|
112
|
-
test('validates workspace exists before switching', async () => {
|
|
113
|
-
// Given: Only one workspace exists
|
|
114
|
-
const ws = {
|
|
115
|
-
workspace_id: 'T333',
|
|
116
|
-
workspace_name: 'only-one',
|
|
117
|
-
token: 'xoxc-333',
|
|
118
|
-
cookie: 'xoxd-333',
|
|
119
|
-
};
|
|
120
|
-
await credManager.setWorkspace(ws);
|
|
121
|
-
await credManager.setCurrentWorkspace('T333');
|
|
122
|
-
// When: Trying to switch to non-existent workspace
|
|
123
|
-
const config = await credManager.load();
|
|
124
|
-
const targetExists = 'T999' in config.workspaces;
|
|
125
|
-
// Then: Should not exist
|
|
126
|
-
expect(targetExists).toBe(false);
|
|
127
|
-
});
|
|
128
|
-
test('preserves workspace credentials when switching', async () => {
|
|
129
|
-
// Given: Multiple workspaces with different credentials
|
|
130
|
-
const ws1 = {
|
|
131
|
-
workspace_id: 'T444',
|
|
132
|
-
workspace_name: 'first',
|
|
133
|
-
token: 'token-444',
|
|
134
|
-
cookie: 'cookie-444',
|
|
135
|
-
};
|
|
136
|
-
const ws2 = {
|
|
137
|
-
workspace_id: 'T555',
|
|
138
|
-
workspace_name: 'second',
|
|
139
|
-
token: 'token-555',
|
|
140
|
-
cookie: 'cookie-555',
|
|
141
|
-
};
|
|
142
|
-
await credManager.setWorkspace(ws1);
|
|
143
|
-
await credManager.setWorkspace(ws2);
|
|
144
|
-
// When: Switching between workspaces
|
|
145
|
-
await credManager.setCurrentWorkspace('T444');
|
|
146
|
-
let config = await credManager.load();
|
|
147
|
-
expect(config.current_workspace).toBe('T444');
|
|
148
|
-
await credManager.setCurrentWorkspace('T555');
|
|
149
|
-
config = await credManager.load();
|
|
150
|
-
// Then: Both workspaces should still have their credentials
|
|
151
|
-
expect(config.workspaces.T444.token).toBe('token-444');
|
|
152
|
-
expect(config.workspaces.T555.token).toBe('token-555');
|
|
153
|
-
expect(config.current_workspace).toBe('T555');
|
|
154
|
-
});
|
|
155
|
-
});
|
|
156
|
-
describe('workspace current', () => {
|
|
157
|
-
test('returns current workspace details', async () => {
|
|
158
|
-
// Given: A current workspace is set
|
|
159
|
-
const ws = {
|
|
160
|
-
workspace_id: 'T666',
|
|
161
|
-
workspace_name: 'current-workspace',
|
|
162
|
-
token: 'xoxc-666',
|
|
163
|
-
cookie: 'xoxd-666',
|
|
164
|
-
};
|
|
165
|
-
await credManager.setWorkspace(ws);
|
|
166
|
-
await credManager.setCurrentWorkspace('T666');
|
|
167
|
-
// When: Getting current workspace
|
|
168
|
-
const current = await credManager.getWorkspace();
|
|
169
|
-
// Then: Should return workspace details
|
|
170
|
-
expect(current).not.toBeNull();
|
|
171
|
-
expect(current?.workspace_id).toBe('T666');
|
|
172
|
-
expect(current?.workspace_name).toBe('current-workspace');
|
|
173
|
-
expect(current?.token).toBe('xoxc-666');
|
|
174
|
-
expect(current?.cookie).toBe('xoxd-666');
|
|
175
|
-
});
|
|
176
|
-
test('returns null when no current workspace set', async () => {
|
|
177
|
-
// Given: No current workspace
|
|
178
|
-
// When: Getting current workspace
|
|
179
|
-
const current = await credManager.getWorkspace();
|
|
180
|
-
// Then: Should return null
|
|
181
|
-
expect(current).toBeNull();
|
|
182
|
-
});
|
|
183
|
-
test('returns null when current workspace is deleted', async () => {
|
|
184
|
-
// Given: Current workspace is set
|
|
185
|
-
const ws = {
|
|
186
|
-
workspace_id: 'T777',
|
|
187
|
-
workspace_name: 'to-delete',
|
|
188
|
-
token: 'xoxc-777',
|
|
189
|
-
cookie: 'xoxd-777',
|
|
190
|
-
};
|
|
191
|
-
await credManager.setWorkspace(ws);
|
|
192
|
-
await credManager.setCurrentWorkspace('T777');
|
|
193
|
-
// When: Workspace is removed
|
|
194
|
-
await credManager.removeWorkspace('T777');
|
|
195
|
-
// Then: Current should be null
|
|
196
|
-
const current = await credManager.getWorkspace();
|
|
197
|
-
expect(current).toBeNull();
|
|
198
|
-
});
|
|
199
|
-
test('shows correct workspace after switching', async () => {
|
|
200
|
-
// Given: Multiple workspaces with one as current
|
|
201
|
-
const ws1 = {
|
|
202
|
-
workspace_id: 'T888',
|
|
203
|
-
workspace_name: 'first',
|
|
204
|
-
token: 'token-888',
|
|
205
|
-
cookie: 'cookie-888',
|
|
206
|
-
};
|
|
207
|
-
const ws2 = {
|
|
208
|
-
workspace_id: 'T999',
|
|
209
|
-
workspace_name: 'second',
|
|
210
|
-
token: 'token-999',
|
|
211
|
-
cookie: 'cookie-999',
|
|
212
|
-
};
|
|
213
|
-
await credManager.setWorkspace(ws1);
|
|
214
|
-
await credManager.setWorkspace(ws2);
|
|
215
|
-
await credManager.setCurrentWorkspace('T888');
|
|
216
|
-
// When: Switching to second workspace
|
|
217
|
-
await credManager.setCurrentWorkspace('T999');
|
|
218
|
-
const current = await credManager.getWorkspace();
|
|
219
|
-
// Then: Should return second workspace
|
|
220
|
-
expect(current?.workspace_id).toBe('T999');
|
|
221
|
-
expect(current?.workspace_name).toBe('second');
|
|
222
|
-
});
|
|
223
|
-
});
|
|
224
|
-
describe('workspace remove', () => {
|
|
225
|
-
test('removes workspace by id', async () => {
|
|
226
|
-
// Given: A workspace exists
|
|
227
|
-
const ws = {
|
|
228
|
-
workspace_id: 'T-remove',
|
|
229
|
-
workspace_name: 'to-remove',
|
|
230
|
-
token: 'xoxc-remove',
|
|
231
|
-
cookie: 'xoxd-remove',
|
|
232
|
-
};
|
|
233
|
-
await credManager.setWorkspace(ws);
|
|
234
|
-
// When: Workspace is removed
|
|
235
|
-
await credManager.removeWorkspace('T-remove');
|
|
236
|
-
// Then: Workspace should not exist
|
|
237
|
-
const retrieved = await credManager.getWorkspace('T-remove');
|
|
238
|
-
expect(retrieved).toBeNull();
|
|
239
|
-
});
|
|
240
|
-
test('removes current workspace and clears current', async () => {
|
|
241
|
-
// Given: Current workspace is set
|
|
242
|
-
const ws = {
|
|
243
|
-
workspace_id: 'T-current-remove',
|
|
244
|
-
workspace_name: 'current-to-remove',
|
|
245
|
-
token: 'xoxc-current-remove',
|
|
246
|
-
cookie: 'xoxd-current-remove',
|
|
247
|
-
};
|
|
248
|
-
await credManager.setWorkspace(ws);
|
|
249
|
-
await credManager.setCurrentWorkspace('T-current-remove');
|
|
250
|
-
// When: Current workspace is removed
|
|
251
|
-
await credManager.removeWorkspace('T-current-remove');
|
|
252
|
-
// Then: Current should be null
|
|
253
|
-
const config = await credManager.load();
|
|
254
|
-
expect(config.current_workspace).toBeNull();
|
|
255
|
-
});
|
|
256
|
-
test('removes workspace without affecting others', async () => {
|
|
257
|
-
// Given: Multiple workspaces exist
|
|
258
|
-
const ws1 = {
|
|
259
|
-
workspace_id: 'T-keep',
|
|
260
|
-
workspace_name: 'keep',
|
|
261
|
-
token: 'token-keep',
|
|
262
|
-
cookie: 'cookie-keep',
|
|
263
|
-
};
|
|
264
|
-
const ws2 = {
|
|
265
|
-
workspace_id: 'T-remove-one',
|
|
266
|
-
workspace_name: 'remove-one',
|
|
267
|
-
token: 'token-remove',
|
|
268
|
-
cookie: 'cookie-remove',
|
|
269
|
-
};
|
|
270
|
-
await credManager.setWorkspace(ws1);
|
|
271
|
-
await credManager.setWorkspace(ws2);
|
|
272
|
-
await credManager.setCurrentWorkspace('T-keep');
|
|
273
|
-
// When: One workspace is removed
|
|
274
|
-
await credManager.removeWorkspace('T-remove-one');
|
|
275
|
-
// Then: Other workspace should remain
|
|
276
|
-
const config = await credManager.load();
|
|
277
|
-
expect(config.workspaces['T-keep']).toBeDefined();
|
|
278
|
-
expect(config.workspaces['T-remove-one']).toBeUndefined();
|
|
279
|
-
expect(config.current_workspace).toBe('T-keep');
|
|
280
|
-
});
|
|
281
|
-
test('handles removing non-existent workspace gracefully', async () => {
|
|
282
|
-
// Given: Workspace does not exist
|
|
283
|
-
// When: Trying to remove non-existent workspace
|
|
284
|
-
await credManager.removeWorkspace('nonexistent');
|
|
285
|
-
// Then: Should not throw error
|
|
286
|
-
const config = await credManager.load();
|
|
287
|
-
expect(config.workspaces).toEqual({});
|
|
288
|
-
});
|
|
289
|
-
test('clears current only if removed workspace was current', async () => {
|
|
290
|
-
// Given: Multiple workspaces with one as current
|
|
291
|
-
const ws1 = {
|
|
292
|
-
workspace_id: 'T-current-1',
|
|
293
|
-
workspace_name: 'current-1',
|
|
294
|
-
token: 'token-1',
|
|
295
|
-
cookie: 'cookie-1',
|
|
296
|
-
};
|
|
297
|
-
const ws2 = {
|
|
298
|
-
workspace_id: 'T-other',
|
|
299
|
-
workspace_name: 'other',
|
|
300
|
-
token: 'token-other',
|
|
301
|
-
cookie: 'cookie-other',
|
|
302
|
-
};
|
|
303
|
-
await credManager.setWorkspace(ws1);
|
|
304
|
-
await credManager.setWorkspace(ws2);
|
|
305
|
-
await credManager.setCurrentWorkspace('T-current-1');
|
|
306
|
-
// When: Non-current workspace is removed
|
|
307
|
-
await credManager.removeWorkspace('T-other');
|
|
308
|
-
// Then: Current should remain unchanged
|
|
309
|
-
const config = await credManager.load();
|
|
310
|
-
expect(config.current_workspace).toBe('T-current-1');
|
|
311
|
-
});
|
|
312
|
-
});
|
|
313
|
-
describe('Output Formatting', () => {
|
|
314
|
-
test('formats list output correctly', async () => {
|
|
315
|
-
// Given: Multiple workspaces
|
|
316
|
-
const ws1 = {
|
|
317
|
-
workspace_id: 'T-format-1',
|
|
318
|
-
workspace_name: 'format-1',
|
|
319
|
-
token: 'token-1',
|
|
320
|
-
cookie: 'cookie-1',
|
|
321
|
-
};
|
|
322
|
-
const ws2 = {
|
|
323
|
-
workspace_id: 'T-format-2',
|
|
324
|
-
workspace_name: 'format-2',
|
|
325
|
-
token: 'token-2',
|
|
326
|
-
cookie: 'cookie-2',
|
|
327
|
-
};
|
|
328
|
-
await credManager.setWorkspace(ws1);
|
|
329
|
-
await credManager.setWorkspace(ws2);
|
|
330
|
-
await credManager.setCurrentWorkspace('T-format-1');
|
|
331
|
-
// When: Creating list output
|
|
332
|
-
const config = await credManager.load();
|
|
333
|
-
const output = Object.values(config.workspaces).map((ws) => ({
|
|
334
|
-
id: ws.workspace_id,
|
|
335
|
-
name: ws.workspace_name,
|
|
336
|
-
current: ws.workspace_id === config.current_workspace,
|
|
337
|
-
}));
|
|
338
|
-
// Then: Should be valid JSON
|
|
339
|
-
const json = JSON.stringify(output);
|
|
340
|
-
const parsed = JSON.parse(json);
|
|
341
|
-
expect(parsed).toHaveLength(2);
|
|
342
|
-
expect(parsed[0].current).toBe(true);
|
|
343
|
-
expect(parsed[1].current).toBe(false);
|
|
344
|
-
});
|
|
345
|
-
test('formats switch output correctly', async () => {
|
|
346
|
-
// Given: Workspace to switch to
|
|
347
|
-
const ws = {
|
|
348
|
-
workspace_id: 'T-switch-format',
|
|
349
|
-
workspace_name: 'switch-format',
|
|
350
|
-
token: 'token-switch',
|
|
351
|
-
cookie: 'cookie-switch',
|
|
352
|
-
};
|
|
353
|
-
await credManager.setWorkspace(ws);
|
|
354
|
-
await credManager.setCurrentWorkspace('T-switch-format');
|
|
355
|
-
// When: Creating switch output
|
|
356
|
-
const output = { current: 'T-switch-format' };
|
|
357
|
-
// Then: Should be valid JSON
|
|
358
|
-
const json = JSON.stringify(output);
|
|
359
|
-
const parsed = JSON.parse(json);
|
|
360
|
-
expect(parsed.current).toBe('T-switch-format');
|
|
361
|
-
});
|
|
362
|
-
test('formats current output correctly', async () => {
|
|
363
|
-
// Given: Current workspace
|
|
364
|
-
const ws = {
|
|
365
|
-
workspace_id: 'T-current-format',
|
|
366
|
-
workspace_name: 'current-format',
|
|
367
|
-
token: 'token-current',
|
|
368
|
-
cookie: 'cookie-current',
|
|
369
|
-
};
|
|
370
|
-
await credManager.setWorkspace(ws);
|
|
371
|
-
await credManager.setCurrentWorkspace('T-current-format');
|
|
372
|
-
// When: Creating current output
|
|
373
|
-
const current = await credManager.getWorkspace();
|
|
374
|
-
const output = {
|
|
375
|
-
workspace_id: current?.workspace_id,
|
|
376
|
-
workspace_name: current?.workspace_name,
|
|
377
|
-
};
|
|
378
|
-
// Then: Should be valid JSON
|
|
379
|
-
const json = JSON.stringify(output);
|
|
380
|
-
const parsed = JSON.parse(json);
|
|
381
|
-
expect(parsed.workspace_id).toBe('T-current-format');
|
|
382
|
-
expect(parsed.workspace_name).toBe('current-format');
|
|
383
|
-
});
|
|
384
|
-
test('formats remove output correctly', async () => {
|
|
385
|
-
// Given: Workspace to remove
|
|
386
|
-
const ws = {
|
|
387
|
-
workspace_id: 'T-remove-format',
|
|
388
|
-
workspace_name: 'remove-format',
|
|
389
|
-
token: 'token-remove',
|
|
390
|
-
cookie: 'cookie-remove',
|
|
391
|
-
};
|
|
392
|
-
await credManager.setWorkspace(ws);
|
|
393
|
-
// When: Creating remove output
|
|
394
|
-
const output = { removed: 'T-remove-format' };
|
|
395
|
-
// Then: Should be valid JSON
|
|
396
|
-
const json = JSON.stringify(output);
|
|
397
|
-
const parsed = JSON.parse(json);
|
|
398
|
-
expect(parsed.removed).toBe('T-remove-format');
|
|
399
|
-
});
|
|
400
|
-
test('pretty prints JSON correctly', async () => {
|
|
401
|
-
// Given: Output data
|
|
402
|
-
const output = {
|
|
403
|
-
id: 'T123',
|
|
404
|
-
name: 'test',
|
|
405
|
-
current: true,
|
|
406
|
-
};
|
|
407
|
-
// When: Pretty printing
|
|
408
|
-
const pretty = JSON.stringify(output, null, 2);
|
|
409
|
-
// Then: Should contain newlines and indentation
|
|
410
|
-
expect(pretty).toContain('\n');
|
|
411
|
-
expect(pretty).toContain(' ');
|
|
412
|
-
});
|
|
413
|
-
});
|
|
414
|
-
describe('Error Handling', () => {
|
|
415
|
-
test('handles missing workspace gracefully', async () => {
|
|
416
|
-
// Given: Workspace does not exist
|
|
417
|
-
// When: Trying to get workspace
|
|
418
|
-
const ws = await credManager.getWorkspace('missing');
|
|
419
|
-
// Then: Should return null
|
|
420
|
-
expect(ws).toBeNull();
|
|
421
|
-
});
|
|
422
|
-
test('handles corrupted config gracefully', async () => {
|
|
423
|
-
// Given: Config directory exists
|
|
424
|
-
// When: Loading from empty directory
|
|
425
|
-
const config = await credManager.load();
|
|
426
|
-
// Then: Should return default config
|
|
427
|
-
expect(config.current_workspace).toBeNull();
|
|
428
|
-
expect(config.workspaces).toEqual({});
|
|
429
|
-
});
|
|
430
|
-
test('handles concurrent operations', async () => {
|
|
431
|
-
// Given: Multiple workspaces
|
|
432
|
-
const ws1 = {
|
|
433
|
-
workspace_id: 'T-concurrent-1',
|
|
434
|
-
workspace_name: 'concurrent-1',
|
|
435
|
-
token: 'token-1',
|
|
436
|
-
cookie: 'cookie-1',
|
|
437
|
-
};
|
|
438
|
-
const ws2 = {
|
|
439
|
-
workspace_id: 'T-concurrent-2',
|
|
440
|
-
workspace_name: 'concurrent-2',
|
|
441
|
-
token: 'token-2',
|
|
442
|
-
cookie: 'cookie-2',
|
|
443
|
-
};
|
|
444
|
-
// When: Setting workspaces sequentially
|
|
445
|
-
await credManager.setWorkspace(ws1);
|
|
446
|
-
await credManager.setWorkspace(ws2);
|
|
447
|
-
// Then: Both should be saved
|
|
448
|
-
const config = await credManager.load();
|
|
449
|
-
expect(Object.keys(config.workspaces)).toHaveLength(2);
|
|
450
|
-
});
|
|
451
|
-
});
|
|
452
|
-
});
|
|
453
|
-
//# sourceMappingURL=workspace.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.test.js","sourceRoot":"","sources":["../../../tests/commands/workspace.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAA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