botmancers 0.5.0 → 0.6.1
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/CHANGELOG.md +55 -0
- package/README.md +9 -5
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +9 -0
- package/app/.next/build-manifest.json +3 -3
- package/app/.next/node_modules/@slack/socket-mode-77e8cba3b9ba4738/index.js +1 -0
- package/app/.next/node_modules/@slack/socket-mode-77e8cba3b9ba4738/package.json +1 -0
- package/app/.next/node_modules/@slack/web-api-d6dbe405b6902642/index.js +1 -0
- package/app/.next/node_modules/@slack/web-api-d6dbe405b6902642/package.json +1 -0
- package/app/.next/prerender-manifest.json +3 -3
- package/app/.next/required-server-files.json +8 -3
- package/app/.next/routes-manifest.json +67 -0
- package/app/.next/server/app/_global-error/page.js +1 -1
- package/app/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next/server/app/_global-error.html +1 -1
- package/app/.next/server/app/_global-error.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page.js +1 -1
- package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_not-found.html +1 -1
- package/app/.next/server/app/_not-found.rsc +2 -2
- package/app/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/api/agent-deck/decks/route.js +3 -3
- package/app/.next/server/app/api/agent-deck/decks/route.js.nft.json +1 -1
- package/app/.next/server/app/api/agent-deck/settings/route.js +3 -3
- package/app/.next/server/app/api/agent-deck/settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/config/route.js +3 -3
- package/app/.next/server/app/api/bots/[id]/config/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route.js +5 -6
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/route.js +3 -3
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/shares/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/shares/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/shares/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/shares/route.js +11 -0
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/shares/route.js.nft.json +1 -0
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/shares/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/bots/[id]/sessions/route.js +5 -6
- package/app/.next/server/app/api/bots/[id]/sessions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/share-policy/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/bots/[id]/share-policy/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/bots/[id]/share-policy/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/bots/[id]/share-policy/route.js +11 -0
- package/app/.next/server/app/api/bots/[id]/share-policy/route.js.nft.json +1 -0
- package/app/.next/server/app/api/bots/[id]/share-policy/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/bots/[id]/skill/route.js +3 -3
- package/app/.next/server/app/api/bots/[id]/skill/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/availability/route.js +1 -1
- package/app/.next/server/app/api/bots/availability/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/delete-preview/route.js +3 -3
- package/app/.next/server/app/api/bots/delete-preview/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/import/route.js +3 -3
- package/app/.next/server/app/api/bots/import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/manage/route.js +3 -3
- package/app/.next/server/app/api/bots/manage/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/name-migrations/route.js +3 -3
- package/app/.next/server/app/api/bots/name-migrations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/route.js +6 -6
- package/app/.next/server/app/api/bots/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/approve/route.js +4 -4
- package/app/.next/server/app/api/conversations/[id]/approve/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/deny/route.js +4 -4
- package/app/.next/server/app/api/conversations/[id]/deny/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/draft/route.js +4 -4
- package/app/.next/server/app/api/conversations/[id]/draft/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/messages/[messageId]/stop/route.js +3 -3
- package/app/.next/server/app/api/conversations/[id]/messages/[messageId]/stop/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/messages/route.js +5 -5
- package/app/.next/server/app/api/conversations/[id]/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/route.js +3 -3
- package/app/.next/server/app/api/conversations/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/stop/route.js +7 -7
- package/app/.next/server/app/api/conversations/[id]/stop/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/route.js +3 -3
- package/app/.next/server/app/api/conversations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/exchanges/[id]/cancel/route.js +4 -4
- package/app/.next/server/app/api/exchanges/[id]/cancel/route.js.nft.json +1 -1
- package/app/.next/server/app/api/exchanges/[id]/route.js +5 -5
- package/app/.next/server/app/api/exchanges/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/exchanges/route.js +5 -5
- package/app/.next/server/app/api/exchanges/route.js.nft.json +1 -1
- package/app/.next/server/app/api/files/[name]/route.js +1 -1
- package/app/.next/server/app/api/files/[name]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/groups/route.js +3 -3
- package/app/.next/server/app/api/groups/route.js.nft.json +1 -1
- package/app/.next/server/app/api/health/route.js +5 -2
- package/app/.next/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next/server/app/api/import-capabilities/route.js +1 -1
- package/app/.next/server/app/api/import-capabilities/route.js.nft.json +1 -1
- package/app/.next/server/app/api/marketplace-handoff/route.js +1 -1
- package/app/.next/server/app/api/marketplace-handoff/route.js.nft.json +1 -1
- package/app/.next/server/app/api/marketplace-handoff/status/route.js +1 -1
- package/app/.next/server/app/api/marketplace-handoff/status/route.js.nft.json +1 -1
- package/app/.next/server/app/api/mcp/route.js +3 -3
- package/app/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/app/.next/server/app/api/messages/[id]/between/route.js +3 -3
- package/app/.next/server/app/api/messages/[id]/between/route.js.nft.json +1 -1
- package/app/.next/server/app/api/runtime-connections/route.js +3 -3
- package/app/.next/server/app/api/runtime-connections/route.js.nft.json +1 -1
- package/app/.next/server/app/api/service-grants/route.js +3 -3
- package/app/.next/server/app/api/service-grants/route.js.nft.json +1 -1
- package/app/.next/server/app/api/shares/[shareRef]/revoke/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/shares/[shareRef]/revoke/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/shares/[shareRef]/revoke/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/shares/[shareRef]/revoke/route.js +11 -0
- package/app/.next/server/app/api/shares/[shareRef]/revoke/route.js.nft.json +1 -0
- package/app/.next/server/app/api/shares/[shareRef]/revoke/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/shares/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/shares/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/shares/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/shares/route.js +11 -0
- package/app/.next/server/app/api/shares/route.js.nft.json +1 -0
- package/app/.next/server/app/api/shares/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/v0/agents/[agentId]/conversations/[conversationId]/route.js +5 -6
- package/app/.next/server/app/api/v0/agents/[agentId]/conversations/[conversationId]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/conversations/route.js +5 -6
- package/app/.next/server/app/api/v0/agents/[agentId]/conversations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/messages/route.js +4 -4
- package/app/.next/server/app/api/v0/agents/[agentId]/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/pins/route.js +5 -6
- package/app/.next/server/app/api/v0/agents/[agentId]/pins/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/route.js +5 -6
- package/app/.next/server/app/api/v0/agents/[agentId]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/sessions/[ref]/route.js +5 -6
- package/app/.next/server/app/api/v0/agents/[agentId]/sessions/[ref]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/sessions/route.js +5 -6
- package/app/.next/server/app/api/v0/agents/[agentId]/sessions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/route.js +5 -6
- package/app/.next/server/app/api/v0/agents/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/capabilities/route.js +5 -6
- package/app/.next/server/app/api/v0/capabilities/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/conversations/[id]/route.js +4 -4
- package/app/.next/server/app/api/v0/conversations/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/exchanges/[id]/cancel/route.js +5 -6
- package/app/.next/server/app/api/v0/exchanges/[id]/cancel/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/exchanges/[id]/route.js +5 -6
- package/app/.next/server/app/api/v0/exchanges/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/exchanges/route.js +5 -6
- package/app/.next/server/app/api/v0/exchanges/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/mcp/route.js +6 -7
- package/app/.next/server/app/api/v0/mcp/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route.js +5 -6
- package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route.js +5 -6
- package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/pins/[pinRef]/route.js +5 -6
- package/app/.next/server/app/api/v0/pins/[pinRef]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/requests/[id]/route.js +4 -4
- package/app/.next/server/app/api/v0/requests/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/sessions/[ref]/messages/route.js +5 -6
- package/app/.next/server/app/api/v0/sessions/[ref]/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/sessions/[ref]/pins/route.js +5 -6
- package/app/.next/server/app/api/v0/sessions/[ref]/pins/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/sessions/[ref]/shares/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/v0/sessions/[ref]/shares/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/v0/sessions/[ref]/shares/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/v0/sessions/[ref]/shares/route.js +11 -0
- package/app/.next/server/app/api/v0/sessions/[ref]/shares/route.js.nft.json +1 -0
- package/app/.next/server/app/api/v0/sessions/[ref]/shares/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/revoke/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/revoke/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/revoke/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/revoke/route.js +11 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/revoke/route.js.nft.json +1 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/revoke/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/route.js +11 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/route.js.nft.json +1 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/v0/shares/current/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/v0/shares/current/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/v0/shares/current/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/v0/shares/current/route.js +11 -0
- package/app/.next/server/app/api/v0/shares/current/route.js.nft.json +1 -0
- package/app/.next/server/app/api/v0/shares/current/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/v0/shares/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/v0/shares/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/v0/shares/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/v0/shares/route.js +11 -0
- package/app/.next/server/app/api/v0/shares/route.js.nft.json +1 -0
- package/app/.next/server/app/api/v0/shares/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/wake-grants/[id]/revoke/route.js +4 -4
- package/app/.next/server/app/api/wake-grants/[id]/revoke/route.js.nft.json +1 -1
- package/app/.next/server/app/api/wakes/[id]/decision/route.js +4 -4
- package/app/.next/server/app/api/wakes/[id]/decision/route.js.nft.json +1 -1
- package/app/.next/server/app/api/wakes/[id]/retry/route.js +4 -4
- package/app/.next/server/app/api/wakes/[id]/retry/route.js.nft.json +1 -1
- package/app/.next/server/app/bots/[id]/config/page.js +1 -1
- package/app/.next/server/app/bots/[id]/config/page.js.nft.json +1 -1
- package/app/.next/server/app/bots/[id]/config/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/exchanges/page.js +1 -1
- package/app/.next/server/app/exchanges/page.js.nft.json +1 -1
- package/app/.next/server/app/exchanges/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/exchanges.html +1 -1
- package/app/.next/server/app/exchanges.rsc +3 -3
- package/app/.next/server/app/exchanges.segments/_full.segment.rsc +3 -3
- package/app/.next/server/app/exchanges.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/exchanges.segments/exchanges/__PAGE__.segment.rsc +3 -3
- package/app/.next/server/app/index.html +1 -1
- package/app/.next/server/app/index.rsc +3 -3
- package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/app/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/page.js +1 -1
- package/app/.next/server/app/page.js.nft.json +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/settings/page.js +1 -1
- package/app/.next/server/app/settings/page.js.nft.json +1 -1
- package/app/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/settings.html +1 -1
- package/app/.next/server/app/settings.rsc +2 -2
- package/app/.next/server/app/settings.segments/_full.segment.rsc +2 -2
- package/app/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/threads/[id]/page.js +1 -1
- package/app/.next/server/app/threads/[id]/page.js.nft.json +1 -1
- package/app/.next/server/app/threads/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app-paths-manifest.json +9 -0
- package/app/.next/server/chunks/1oeh_server_app_api_bots_[id]_sessions_[ref]_shares_route_actions_1jr6f0v.js +3 -0
- package/app/.next/server/chunks/[externals]_@slack_0owayck._.js +3 -0
- package/app/.next/server/chunks/[externals]__17bolvp._.js +3 -0
- package/app/.next/server/chunks/{[externals]__06lqs5i._.js → [externals]__1eaoma8._.js} +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0-vcyi-._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0-w_t2y._.js +3 -0
- package/app/.next/server/chunks/{[root-of-the-server]__1_01-13._.js → [root-of-the-server]__029-_9t._.js} +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__02vrtib._.js +4 -0
- package/app/.next/server/chunks/[root-of-the-server]__04b3ml2._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__06w5xhe._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__07q5mnr._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0888o0_._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0aincj4._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0e_agq4._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0ey3_2x._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0fku-bw._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0iqh5ta._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0ivjcgs._.js +4 -0
- package/app/.next/server/chunks/[root-of-the-server]__0j4pjyg._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0kgnysc._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0mo_kn3._.js +48 -0
- package/app/.next/server/chunks/[root-of-the-server]__0mp8bap._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0o9ijih._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0qaiqut._.js +44 -0
- package/app/.next/server/chunks/{[root-of-the-server]__1kvvs4u._.js → [root-of-the-server]__0zrx1iz._.js} +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__10b5-i-._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__17xl_55._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1dxr858._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1eps2a4._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1g_n99l._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1ggmit0._.js +4 -0
- package/app/.next/server/chunks/{[root-of-the-server]__1y_j43n._.js → [root-of-the-server]__1hwy3jx._.js} +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__1i8glt4._.js +4 -0
- package/app/.next/server/chunks/{[root-of-the-server]__0j0i8xz._.js → [root-of-the-server]__1igzl05._.js} +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__1kczttr._.js +3 -0
- package/app/.next/server/chunks/{[root-of-the-server]__1c3e2ds._.js → [root-of-the-server]__1kik2zt._.js} +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__1t4ybp2._.js +48 -0
- package/app/.next/server/chunks/[root-of-the-server]__1v3ikuo._.js +3 -0
- package/app/.next/server/chunks/{[root-of-the-server]__0-45blq._.js → [root-of-the-server]__1z5l5cg._.js} +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__200ep0k._.js +3 -0
- package/app/.next/server/chunks/_0061c2q._.js +48 -1
- package/app/.next/server/chunks/_04e2bgj._.js +3 -0
- package/app/.next/server/chunks/_05po7b4._.js +3 -0
- package/app/.next/server/chunks/_06sxx0e._.js +3 -0
- package/app/.next/server/chunks/_0a2do3x._.js +1 -1
- package/app/.next/server/chunks/_0ar2ooe._.js +3 -0
- package/app/.next/server/chunks/_0fmotaz._.js +3 -0
- package/app/.next/server/chunks/_0kpfto_._.js +3 -0
- package/app/.next/server/chunks/_0lm6uis._.js +3 -0
- package/app/.next/server/chunks/_0mpu5tl._.js +3 -0
- package/app/.next/server/chunks/_0qv-4by._.js +3 -0
- package/app/.next/server/chunks/_0u9cfq9._.js +3 -0
- package/app/.next/server/chunks/_0ul8k7g._.js +3 -0
- package/app/.next/server/chunks/_1-5mthb._.js +1 -1
- package/app/.next/server/chunks/_1-60d3o._.js +3 -0
- package/app/.next/server/chunks/_133y3b0._.js +3 -0
- package/app/.next/server/chunks/_167960a._.js +3 -0
- package/app/.next/server/chunks/_17vgjlt._.js +3 -0
- package/app/.next/server/chunks/_1amx9_4._.js +3 -0
- package/app/.next/server/chunks/_1b01v-_._.js +3 -0
- package/app/.next/server/chunks/_1c-g4gq._.js +3 -0
- package/app/.next/server/chunks/_1ey6l4p._.js +3 -0
- package/app/.next/server/chunks/_1nlg4x_._.js +3 -0
- package/app/.next/server/chunks/_1x4dqzv._.js +3 -0
- package/app/.next/server/chunks/_1z0qbzc._.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_bots_[id]_share-policy_route_actions_0x-p250.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_shares_[shareRef]_revoke_route_actions_1cu5kah.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_shares_route_actions_0wk7x1r.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_v0_sessions_[ref]_shares_route_actions_11fh--7.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_v0_shares_[shareRef]_revoke_route_actions_00rzyj9.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_v0_shares_[shareRef]_route_actions_0i1t5qb.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_v0_shares_current_route_actions_1w_bpas.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_v0_shares_route_actions_1b38was.js +3 -0
- package/app/.next/server/chunks/lib_0v4d9w0._.js +339 -0
- package/app/.next/server/chunks/lib_0zzo6zb._.js +339 -0
- package/app/.next/server/chunks/lib_15adnlz._.js +2189 -0
- package/app/.next/server/chunks/lib_1_u7n-u._.js +339 -0
- package/app/.next/server/chunks/lib_1muhwn7._.js +339 -0
- package/app/.next/server/chunks/lib_1xnxg-q._.js +339 -0
- package/app/.next/server/chunks/lib_1zc7-gl._.js +2189 -0
- package/app/.next/server/chunks/lib_agent-api_ts_0iv52-o._.js +3 -0
- package/app/.next/server/chunks/{[root-of-the-server]__0izjfmr._.js → lib_db_ts_1ttuckb._.js} +3 -3
- package/app/.next/server/chunks/lib_service-api-http_ts_0xzqhny._.js +5 -5
- package/app/.next/server/chunks/lib_slack-runtime_ts_0fgsejy._.js +63 -0
- package/app/.next/server/chunks/ssr/{[root-of-the-server]__03186rx._.js → [root-of-the-server]__1smmfpx._.js} +1 -1
- package/app/.next/server/chunks/ssr/_0_fa0na._.js +3 -0
- package/app/.next/server/chunks/ssr/_1cvuhjt._.js +1 -1
- package/app/.next/server/chunks/ssr/_1i02yyi._.js +3 -0
- package/app/.next/server/chunks/ssr/_1n5mvo5._.js +1 -1
- package/app/.next/server/chunks/ssr/_1o94bnv._.js +1 -1
- package/app/.next/server/chunks/ssr/app_bots_[id]_config_page_tsx_1e0uue9._.js +1 -1
- package/app/.next/server/instrumentation.js +4 -0
- package/app/.next/server/middleware-build-manifest.js +3 -3
- package/app/.next/server/middleware.js +1 -1
- package/app/.next/server/pages/404.html +1 -1
- package/app/.next/server/pages/500.html +1 -1
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/chunks/{2a8bomryx66oj.css → 0jon21u-9j2aw.css} +1 -1
- package/app/.next/static/chunks/14k6cvywgknx2.js +3 -0
- package/app/.next/static/chunks/1r5tqd-7h1xjn.js +1 -0
- package/app/.next/static/chunks/22xbkclbkct3s.js +1 -0
- package/app/.next/static/chunks/2c953okoei6ip.js +1 -0
- package/app/.next/static/chunks/2t_2gf3xoxz_m.js +1 -0
- package/app/.next/static/chunks/34vnvo1qssbaj.js +1 -0
- package/app/BUILD_INFO.json +2 -2
- package/app/node_modules/@slack/logger/dist/index.js +94 -0
- package/app/node_modules/@slack/logger/package.json +43 -0
- package/app/node_modules/@slack/socket-mode/dist/package.json +67 -0
- package/app/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.js +242 -0
- package/app/node_modules/@slack/socket-mode/dist/src/SocketModeClient.js +363 -0
- package/app/node_modules/@slack/socket-mode/dist/src/UnrecoverableSocketModeStartError.js +14 -0
- package/app/node_modules/@slack/socket-mode/dist/src/errors.js +68 -0
- package/app/node_modules/@slack/socket-mode/dist/src/index.js +13 -0
- package/app/node_modules/@slack/socket-mode/dist/src/logger.js +26 -0
- package/app/node_modules/@slack/socket-mode/package.json +67 -0
- package/app/node_modules/@slack/types/dist/block-kit/block-elements.js +4 -0
- package/app/node_modules/@slack/types/dist/block-kit/blocks.js +3 -0
- package/app/node_modules/@slack/types/dist/block-kit/composition-objects.js +4 -0
- package/app/node_modules/@slack/types/dist/block-kit/extensions.js +3 -0
- package/app/node_modules/@slack/types/dist/calls.js +6 -0
- package/app/node_modules/@slack/types/dist/chunk.js +3 -0
- package/app/node_modules/@slack/types/dist/dialog.js +3 -0
- package/app/node_modules/@slack/types/dist/events/app.js +3 -0
- package/app/node_modules/@slack/types/dist/events/assistant.js +3 -0
- package/app/node_modules/@slack/types/dist/events/call.js +3 -0
- package/app/node_modules/@slack/types/dist/events/channel.js +3 -0
- package/app/node_modules/@slack/types/dist/events/dnd.js +3 -0
- package/app/node_modules/@slack/types/dist/events/email.js +3 -0
- package/app/node_modules/@slack/types/dist/events/emoji.js +3 -0
- package/app/node_modules/@slack/types/dist/events/file.js +4 -0
- package/app/node_modules/@slack/types/dist/events/function.js +3 -0
- package/app/node_modules/@slack/types/dist/events/grid-migration.js +3 -0
- package/app/node_modules/@slack/types/dist/events/group.js +3 -0
- package/app/node_modules/@slack/types/dist/events/im.js +3 -0
- package/app/node_modules/@slack/types/dist/events/index.js +43 -0
- package/app/node_modules/@slack/types/dist/events/invite.js +3 -0
- package/app/node_modules/@slack/types/dist/events/link-shared.js +3 -0
- package/app/node_modules/@slack/types/dist/events/member.js +3 -0
- package/app/node_modules/@slack/types/dist/events/message-metadata.js +3 -0
- package/app/node_modules/@slack/types/dist/events/message.js +3 -0
- package/app/node_modules/@slack/types/dist/events/pin.js +3 -0
- package/app/node_modules/@slack/types/dist/events/reaction.js +3 -0
- package/app/node_modules/@slack/types/dist/events/shared-channel.js +3 -0
- package/app/node_modules/@slack/types/dist/events/star.js +3 -0
- package/app/node_modules/@slack/types/dist/events/steps-from-apps.js +3 -0
- package/app/node_modules/@slack/types/dist/events/subteam.js +3 -0
- package/app/node_modules/@slack/types/dist/events/team.js +3 -0
- package/app/node_modules/@slack/types/dist/events/token.js +3 -0
- package/app/node_modules/@slack/types/dist/events/user.js +3 -0
- package/app/node_modules/@slack/types/dist/index.js +28 -0
- package/app/node_modules/@slack/types/dist/message-attachments.js +3 -0
- package/app/node_modules/@slack/types/dist/message-metadata.js +27 -0
- package/app/node_modules/@slack/types/dist/views.js +3 -0
- package/app/node_modules/@slack/types/package.json +47 -0
- package/app/node_modules/@slack/web-api/dist/WebClient.js +818 -0
- package/app/node_modules/@slack/web-api/dist/chat-stream.js +178 -0
- package/app/node_modules/@slack/web-api/dist/errors.js +80 -0
- package/app/node_modules/@slack/web-api/dist/file-upload.js +360 -0
- package/app/node_modules/@slack/web-api/dist/helpers.js +14 -0
- package/app/node_modules/@slack/web-api/dist/index.js +39 -0
- package/app/node_modules/@slack/web-api/dist/instrument.js +87 -0
- package/app/node_modules/@slack/web-api/dist/logger.js +29 -0
- package/app/node_modules/@slack/web-api/dist/methods.js +1647 -0
- package/app/node_modules/@slack/web-api/dist/retry-policies.js +34 -0
- package/app/node_modules/@slack/web-api/dist/types/helpers.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/analytics.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/apps.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/auth.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/barriers.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/conversations.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/emoji.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/functions.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/inviteRequests.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/roles.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/teams.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/usergroups.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/users.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/workflows.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/api.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/apps.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/assistant.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/auth.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/bookmarks.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/bots.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/calls.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/canvas.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/chat.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/common.js +4 -0
- package/app/node_modules/@slack/web-api/dist/types/request/conversations.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/dialog.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/dnd.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/emoji.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/entity.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/files.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/functions.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/index.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/manifest.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/migration.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/oauth.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/openid.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/pins.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/reactions.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/reminders.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/rtm.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/search.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/slackLists.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/stars.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/team.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/tooling.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/usergroups.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/users.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/views.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/workflows.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAnalyticsGetFileResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAppsActivitiesListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAppsApproveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAppsApprovedListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAppsClearResolutionResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAppsConfigLookupResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAppsConfigSetResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAppsRequestsCancelResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAppsRequestsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAppsRestrictResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAppsRestrictedListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAppsUninstallResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAuthPolicyAssignEntitiesResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAuthPolicyGetEntitiesResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAuthPolicyRemoveEntitiesResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminBarriersCreateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminBarriersDeleteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminBarriersListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminBarriersUpdateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsArchiveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsBulkArchiveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsBulkDeleteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsBulkMoveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsConvertToPrivateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsConvertToPublicResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsCreateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsDeleteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsDisconnectSharedResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsEkmListOriginalConnectedChannelInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsGetConversationPrefsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsGetCustomRetentionResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsGetTeamsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsInviteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsLookupResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsRemoveCustomRetentionResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsRenameResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsRestrictAccessAddGroupResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsRestrictAccessListGroupsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsRestrictAccessRemoveGroupResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsSearchResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsSetConversationPrefsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsSetCustomRetentionResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsSetTeamsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsUnarchiveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsWhitelistAddResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsWhitelistListGroupsLinkedToChannelResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsWhitelistRemoveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminEmojiAddAliasResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminEmojiAddResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminEmojiListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminEmojiRemoveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminEmojiRenameResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminFunctionsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminFunctionsPermissionsLookupResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminFunctionsPermissionsSetResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminInviteRequestsApproveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminInviteRequestsApprovedListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminInviteRequestsDeniedListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminInviteRequestsDenyResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminInviteRequestsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminRolesAddAssignmentsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminRolesListAssignmentsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminRolesRemoveAssignmentsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminTeamsAdminsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminTeamsCreateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminTeamsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminTeamsOwnersListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminTeamsSettingsInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminTeamsSettingsSetDefaultChannelsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminTeamsSettingsSetDescriptionResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminTeamsSettingsSetDiscoverabilityResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminTeamsSettingsSetIconResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminTeamsSettingsSetNameResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsergroupsAddChannelsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsergroupsAddTeamsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsergroupsListChannelsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsergroupsRemoveChannelsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersAssignResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersInviteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersRemoveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersSessionClearSettingsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersSessionGetSettingsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersSessionInvalidateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersSessionListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersSessionResetBulkResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersSessionResetResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersSessionSetSettingsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersSetAdminResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersSetExpirationResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersSetOwnerResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersSetRegularResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersUnsupportedVersionsExportResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminWorkflowsCollaboratorsAddResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminWorkflowsCollaboratorsRemoveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminWorkflowsPermissionsLookupResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminWorkflowsSearchResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminWorkflowsUnpublishResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ApiTestResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsConnectionsOpenResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsEventAuthorizationsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsManifestCreateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsManifestDeleteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsManifestExportResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsManifestUpdateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsManifestValidateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsPermissionsInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsPermissionsRequestResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsPermissionsResourcesListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsPermissionsScopesListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsPermissionsUsersListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsPermissionsUsersRequestResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsUninstallResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionUpdateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AssistantThreadsSetStatusResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AssistantThreadsSetSuggestedPromptsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AssistantThreadsSetTitleResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AuthRevokeResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AuthTeamsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AuthTestResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/BookmarksAddResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/BookmarksEditResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/BookmarksListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/BookmarksRemoveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/BotsInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CallsAddResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CallsEndResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CallsInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CallsParticipantsAddResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CallsParticipantsRemoveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CallsUpdateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CanvasesAccessDeleteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CanvasesAccessSetResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CanvasesCreateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CanvasesDeleteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CanvasesEditResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CanvasesSectionsLookupResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsArchiveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsCreateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsHistoryResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsInviteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsJoinResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsKickResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsLeaveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsMarkResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsRenameResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsRepliesResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsSetPurposeResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsSetTopicResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsUnarchiveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatAppendStreamResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatDeleteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatDeleteScheduledMessageResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatGetPermalinkResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatMeMessageResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatPostEphemeralResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatPostMessageResponse.js +67 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatScheduleMessageResponse.js +48 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatScheduledMessagesListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatStartStreamResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatStopStreamResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatUnfurlResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatUpdateResponse.js +48 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsAcceptSharedInviteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsApproveSharedInviteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsArchiveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsCanvasesCreateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsCloseResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsCreateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsDeclineSharedInviteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsExternalInvitePermissionsSetResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsHistoryResponse.js +67 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsInviteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsInviteSharedResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsJoinResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsKickResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsLeaveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsListConnectInvitesResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsMarkResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsMembersResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsOpenResponse.js +48 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsRenameResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsRepliesResponse.js +67 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsRequestSharedInviteApproveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsRequestSharedInviteDenyResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsRequestSharedInviteListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsSetPurposeResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsSetTopicResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsUnarchiveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/DialogOpenResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/DndEndDndResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/DndEndSnoozeResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/DndInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/DndSetSnoozeResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/DndTeamInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/EmojiListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/EntityPresentDetailsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesCommentsAddResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesCommentsDeleteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesCommentsEditResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesCompleteUploadExternalResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesDeleteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesGetUploadURLExternalResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesInfoResponse.js +37 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesListResponse.js +37 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesRemoteAddResponse.js +37 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesRemoteInfoResponse.js +37 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesRemoteListResponse.js +37 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesRemoteRemoveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesRemoteShareResponse.js +37 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesRemoteUpdateResponse.js +37 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesRevokePublicURLResponse.js +37 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesSharedPublicURLResponse.js +37 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesUploadResponse.js +37 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FunctionsCompleteErrorResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FunctionsCompleteSuccessResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsArchiveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsCloseResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsCreateChildResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsCreateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsHistoryResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsInviteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsKickResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsLeaveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsMarkResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsOpenResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsRenameResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsRepliesResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsSetPurposeResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsSetTopicResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsUnarchiveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ImCloseResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ImHistoryResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ImListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ImMarkResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ImOpenResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ImRepliesResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/MigrationExchangeResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/MpimCloseResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/MpimHistoryResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/MpimListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/MpimMarkResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/MpimOpenResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/MpimRepliesResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/OauthAccessResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/OauthTokenResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/OauthV2AccessResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/OauthV2ExchangeResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/OpenIDConnectTokenResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/OpenIDConnectUserInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/PinsAddResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/PinsListResponse.js +37 -0
- package/app/node_modules/@slack/web-api/dist/types/response/PinsRemoveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ReactionsAddResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ReactionsGetResponse.js +48 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ReactionsListResponse.js +67 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ReactionsRemoveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/RemindersAddResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/RemindersCompleteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/RemindersDeleteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/RemindersInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/RemindersListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/RtmConnectResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/RtmStartResponse.js +77 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SearchAllResponse.js +82 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SearchFilesResponse.js +63 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SearchMessagesResponse.js +67 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsAccessDeleteResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsAccessSetResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsCreateResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsDownloadGetResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsDownloadStartResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsItemsCreateResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsItemsDeleteMultipleResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsItemsDeleteResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsItemsInfoResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsItemsListResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsItemsUpdateResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsUpdateResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/StarsAddResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/StarsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/StarsRemoveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/TeamAccessLogsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/TeamBillableInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/TeamBillingInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/TeamExternalTeamsDisconnectResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/TeamExternalTeamsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/TeamInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/TeamIntegrationLogsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/TeamPreferencesListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/TeamProfileGetResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ToolingTokensRotateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsergroupsCreateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsergroupsDisableResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsergroupsEnableResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsergroupsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsergroupsUpdateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsergroupsUsersListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsergroupsUsersUpdateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersConversationsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersDeletePhotoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersDiscoverableContactsLookupResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersGetPresenceResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersIdentityResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersLookupByEmailResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersProfileGetResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersProfileSetResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersSetActiveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersSetPhotoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersSetPresenceResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ViewsOpenResponse.js +31 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ViewsPublishResponse.js +31 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ViewsPushResponse.js +31 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ViewsUpdateResponse.js +31 -0
- package/app/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedAddResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedListResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedRemoveResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedSetResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/WorkflowsStepCompletedResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/WorkflowsStepFailedResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/WorkflowsUpdateStepResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/index.js +3 -0
- package/app/node_modules/@slack/web-api/package.json +75 -0
- package/app/node_modules/agent-base/dist/src/index.js +203 -0
- package/app/node_modules/agent-base/dist/src/promisify.js +18 -0
- package/app/node_modules/agent-base/package.json +64 -0
- package/app/node_modules/asynckit/index.js +6 -0
- package/app/node_modules/asynckit/lib/abort.js +29 -0
- package/app/node_modules/asynckit/lib/async.js +34 -0
- package/app/node_modules/asynckit/lib/defer.js +26 -0
- package/app/node_modules/asynckit/lib/iterate.js +75 -0
- package/app/node_modules/asynckit/lib/state.js +37 -0
- package/app/node_modules/asynckit/lib/terminator.js +29 -0
- package/app/node_modules/asynckit/package.json +63 -0
- package/app/node_modules/asynckit/parallel.js +43 -0
- package/app/node_modules/asynckit/serial.js +17 -0
- package/app/node_modules/asynckit/serialOrdered.js +75 -0
- package/app/node_modules/axios/dist/node/axios.cjs +6808 -0
- package/app/node_modules/axios/package.json +203 -0
- package/app/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/app/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/app/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/app/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/app/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/app/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/app/node_modules/combined-stream/lib/combined_stream.js +208 -0
- package/app/node_modules/combined-stream/package.json +25 -0
- package/app/node_modules/debug/package.json +64 -0
- package/app/node_modules/debug/src/browser.js +272 -0
- package/app/node_modules/debug/src/common.js +292 -0
- package/app/node_modules/debug/src/index.js +10 -0
- package/app/node_modules/debug/src/node.js +263 -0
- package/app/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
- package/app/node_modules/delayed-stream/package.json +27 -0
- package/app/node_modules/dunder-proto/get.js +30 -0
- package/app/node_modules/dunder-proto/package.json +76 -0
- package/app/node_modules/es-define-property/index.js +14 -0
- package/app/node_modules/es-define-property/package.json +81 -0
- package/app/node_modules/es-errors/eval.js +4 -0
- package/app/node_modules/es-errors/index.js +4 -0
- package/app/node_modules/es-errors/package.json +80 -0
- package/app/node_modules/es-errors/range.js +4 -0
- package/app/node_modules/es-errors/ref.js +4 -0
- package/app/node_modules/es-errors/syntax.js +4 -0
- package/app/node_modules/es-errors/type.js +4 -0
- package/app/node_modules/es-errors/uri.js +4 -0
- package/app/node_modules/es-object-atoms/index.js +4 -0
- package/app/node_modules/es-object-atoms/package.json +79 -0
- package/app/node_modules/es-set-tostringtag/index.js +35 -0
- package/app/node_modules/es-set-tostringtag/package.json +78 -0
- package/app/node_modules/eventemitter3/index.js +336 -0
- package/app/node_modules/eventemitter3/package.json +62 -0
- package/app/node_modules/follow-redirects/debug.js +15 -0
- package/app/node_modules/follow-redirects/index.js +709 -0
- package/app/node_modules/follow-redirects/package.json +58 -0
- package/app/node_modules/form-data/lib/browser.js +4 -0
- package/app/node_modules/form-data/lib/form_data.js +506 -0
- package/app/node_modules/form-data/lib/populate.js +10 -0
- package/app/node_modules/form-data/package.json +82 -0
- package/app/node_modules/function-bind/implementation.js +84 -0
- package/app/node_modules/function-bind/index.js +5 -0
- package/app/node_modules/function-bind/package.json +87 -0
- package/app/node_modules/get-intrinsic/index.js +378 -0
- package/app/node_modules/get-intrinsic/package.json +97 -0
- package/app/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/app/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/app/node_modules/get-proto/index.js +27 -0
- package/app/node_modules/get-proto/package.json +81 -0
- package/app/node_modules/gopd/gOPD.js +4 -0
- package/app/node_modules/gopd/index.js +15 -0
- package/app/node_modules/gopd/package.json +77 -0
- package/app/node_modules/has-flag/index.js +8 -0
- package/app/node_modules/has-flag/package.json +46 -0
- package/app/node_modules/has-symbols/index.js +14 -0
- package/app/node_modules/has-symbols/package.json +111 -0
- package/app/node_modules/has-symbols/shams.js +45 -0
- package/app/node_modules/has-tostringtag/package.json +108 -0
- package/app/node_modules/has-tostringtag/shams.js +8 -0
- package/app/node_modules/hasown/index.js +8 -0
- package/app/node_modules/hasown/package.json +91 -0
- package/app/node_modules/https-proxy-agent/dist/agent.js +177 -0
- package/app/node_modules/https-proxy-agent/dist/index.js +14 -0
- package/app/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
- package/app/node_modules/https-proxy-agent/package.json +56 -0
- package/app/node_modules/is-electron/index.js +21 -0
- package/app/node_modules/is-electron/package.json +34 -0
- package/app/node_modules/is-stream/index.js +28 -0
- package/app/node_modules/is-stream/package.json +42 -0
- package/app/node_modules/math-intrinsics/abs.js +4 -0
- package/app/node_modules/math-intrinsics/floor.js +4 -0
- package/app/node_modules/math-intrinsics/isNaN.js +6 -0
- package/app/node_modules/math-intrinsics/max.js +4 -0
- package/app/node_modules/math-intrinsics/min.js +4 -0
- package/app/node_modules/math-intrinsics/package.json +86 -0
- package/app/node_modules/math-intrinsics/pow.js +4 -0
- package/app/node_modules/math-intrinsics/round.js +4 -0
- package/app/node_modules/math-intrinsics/sign.js +11 -0
- package/app/node_modules/mime-db/db.json +8519 -0
- package/app/node_modules/mime-db/index.js +12 -0
- package/app/node_modules/mime-db/package.json +60 -0
- package/app/node_modules/mime-types/index.js +188 -0
- package/app/node_modules/mime-types/package.json +44 -0
- package/app/node_modules/ms/index.js +162 -0
- package/app/node_modules/ms/package.json +38 -0
- package/app/node_modules/p-finally/index.js +15 -0
- package/app/node_modules/p-finally/package.json +42 -0
- package/app/node_modules/p-queue/dist/index.js +279 -0
- package/app/node_modules/p-queue/dist/lower-bound.js +21 -0
- package/app/node_modules/p-queue/dist/priority-queue.js +32 -0
- package/app/node_modules/p-queue/node_modules/eventemitter3/index.js +336 -0
- package/app/node_modules/p-queue/node_modules/eventemitter3/package.json +56 -0
- package/app/node_modules/p-queue/package.json +92 -0
- package/app/node_modules/p-retry/index.js +85 -0
- package/app/node_modules/p-retry/package.json +51 -0
- package/app/node_modules/p-timeout/index.js +57 -0
- package/app/node_modules/p-timeout/package.json +45 -0
- package/app/node_modules/retry/index.js +1 -0
- package/app/node_modules/retry/lib/retry.js +100 -0
- package/app/node_modules/retry/lib/retry_operation.js +162 -0
- package/app/node_modules/retry/package.json +36 -0
- package/app/node_modules/supports-color/index.js +135 -0
- package/app/node_modules/supports-color/package.json +53 -0
- package/app/node_modules/ws/index.js +22 -0
- package/app/node_modules/ws/lib/buffer-util.js +131 -0
- package/app/node_modules/ws/lib/constants.js +19 -0
- package/app/node_modules/ws/lib/event-target.js +292 -0
- package/app/node_modules/ws/lib/extension.js +203 -0
- package/app/node_modules/ws/lib/limiter.js +55 -0
- package/app/node_modules/ws/lib/permessage-deflate.js +530 -0
- package/app/node_modules/ws/lib/receiver.js +743 -0
- package/app/node_modules/ws/lib/sender.js +607 -0
- package/app/node_modules/ws/lib/stream.js +161 -0
- package/app/node_modules/ws/lib/subprotocol.js +62 -0
- package/app/node_modules/ws/lib/validation.js +152 -0
- package/app/node_modules/ws/lib/websocket-server.js +562 -0
- package/app/node_modules/ws/lib/websocket.js +1421 -0
- package/app/node_modules/ws/package.json +74 -0
- package/app/package.json +1 -1
- package/app/server.js +1 -1
- package/dist/cli.js +5 -2
- package/dist/product.d.ts +8 -0
- package/dist/product.js +69 -3
- package/package.json +2 -2
- package/schemas/botmancers.mcp.v2.tools.json +767 -2
- package/skills/botmancers-collaboration/SKILL.md +5 -1
- package/skills/botmancers-collaboration/references/workflows.md +21 -0
- package/app/.next/server/chunks/[root-of-the-server]__06qkt0f._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__08qhrch._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__097ptn_._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__09m9-pe._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__0b7w1z3._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__0f5yqjs._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__0g4um3-._.js +0 -44
- package/app/.next/server/chunks/[root-of-the-server]__0hro5ey._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__0hwpgxq._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__0uq7sci._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__13cd2fb._.js +0 -44
- package/app/.next/server/chunks/[root-of-the-server]__1879cge._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1a2dh11._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1co3sok._.js +0 -44
- package/app/.next/server/chunks/[root-of-the-server]__1eh30sp._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1fmsid0._.js +0 -44
- package/app/.next/server/chunks/[root-of-the-server]__1qbgs3m._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1s6h1sj._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1slu7d7._.js +0 -7
- package/app/.next/server/chunks/[root-of-the-server]__1tuqc5v._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1v609eq._.js +0 -44
- package/app/.next/server/chunks/[root-of-the-server]__1zdv-vb._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1zjs2tr._.js +0 -3
- package/app/.next/server/chunks/_023se5j._.js +0 -44
- package/app/.next/server/chunks/_02pb_qv._.js +0 -44
- package/app/.next/server/chunks/_05ro-21._.js +0 -44
- package/app/.next/server/chunks/_07on0dc._.js +0 -44
- package/app/.next/server/chunks/_08208nz._.js +0 -44
- package/app/.next/server/chunks/_0fe5qz5._.js +0 -44
- package/app/.next/server/chunks/_0qoji5a._.js +0 -44
- package/app/.next/server/chunks/_0uv2pi5._.js +0 -44
- package/app/.next/server/chunks/_0wdl90-._.js +0 -44
- package/app/.next/server/chunks/_11ijk9k._.js +0 -44
- package/app/.next/server/chunks/_198sn69._.js +0 -44
- package/app/.next/server/chunks/_1ba_5hd._.js +0 -44
- package/app/.next/server/chunks/_1m89jq5._.js +0 -44
- package/app/.next/server/chunks/_1n39wr_._.js +0 -44
- package/app/.next/server/chunks/_1ryxqo1._.js +0 -44
- package/app/.next/server/chunks/_1vemgly._.js +0 -44
- package/app/.next/server/chunks/lib_0lqoyb4._.js +0 -217
- package/app/.next/server/chunks/lib_0riiofz._.js +0 -44
- package/app/.next/server/chunks/lib_16j2293._.js +0 -217
- package/app/.next/server/chunks/lib_1nb_61e._.js +0 -217
- package/app/.next/server/chunks/lib_session-pins_ts_0lmxnwj._.js +0 -20
- package/app/.next/server/chunks/ssr/app_components_ExchangeCard_tsx_1shfcgn._.js +0 -3
- package/app/.next/server/chunks/ssr/node_modules_next_dist_client_components_server-async-storage_0t1dato.js +0 -3
- package/app/.next/static/chunks/0bhd8eso48g27.js +0 -1
- package/app/.next/static/chunks/3230ywnpii0s6.js +0 -3
- package/app/.next/static/chunks/35l2c95bd-jud.js +0 -1
- package/app/.next/static/chunks/3cijpn6vx3yzv.js +0 -1
- package/app/.next/static/chunks/3ue9194j59kem.js +0 -1
- package/app/.next/static/chunks/44ese2s4gzze_.js +0 -1
- /package/app/.next/static/{gh3shm8hnVqXLr75rmvsL → _yrIZIFsIbXA0Gaxkytjd}/_buildManifest.js +0 -0
- /package/app/.next/static/{gh3shm8hnVqXLr75rmvsL → _yrIZIFsIbXA0Gaxkytjd}/_clientMiddlewareManifest.js +0 -0
- /package/app/.next/static/{gh3shm8hnVqXLr75rmvsL → _yrIZIFsIbXA0Gaxkytjd}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,1421 @@
|
|
|
1
|
+
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex|Readable$", "caughtErrors": "none" }] */
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const EventEmitter = require('events');
|
|
6
|
+
const https = require('https');
|
|
7
|
+
const http = require('http');
|
|
8
|
+
const net = require('net');
|
|
9
|
+
const tls = require('tls');
|
|
10
|
+
const { randomBytes, createHash } = require('crypto');
|
|
11
|
+
const { Duplex, Readable } = require('stream');
|
|
12
|
+
const { URL } = require('url');
|
|
13
|
+
|
|
14
|
+
const PerMessageDeflate = require('./permessage-deflate');
|
|
15
|
+
const Receiver = require('./receiver');
|
|
16
|
+
const Sender = require('./sender');
|
|
17
|
+
const { isBlob } = require('./validation');
|
|
18
|
+
|
|
19
|
+
const {
|
|
20
|
+
BINARY_TYPES,
|
|
21
|
+
CLOSE_TIMEOUT,
|
|
22
|
+
EMPTY_BUFFER,
|
|
23
|
+
GUID,
|
|
24
|
+
kForOnEventAttribute,
|
|
25
|
+
kListener,
|
|
26
|
+
kStatusCode,
|
|
27
|
+
kWebSocket,
|
|
28
|
+
NOOP
|
|
29
|
+
} = require('./constants');
|
|
30
|
+
const {
|
|
31
|
+
EventTarget: { addEventListener, removeEventListener }
|
|
32
|
+
} = require('./event-target');
|
|
33
|
+
const { format, parse } = require('./extension');
|
|
34
|
+
const { toBuffer } = require('./buffer-util');
|
|
35
|
+
|
|
36
|
+
const kAborted = Symbol('kAborted');
|
|
37
|
+
const protocolVersions = [8, 13];
|
|
38
|
+
const readyStates = ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED'];
|
|
39
|
+
const subprotocolRegex = /^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Class representing a WebSocket.
|
|
43
|
+
*
|
|
44
|
+
* @extends EventEmitter
|
|
45
|
+
*/
|
|
46
|
+
class WebSocket extends EventEmitter {
|
|
47
|
+
/**
|
|
48
|
+
* Create a new `WebSocket`.
|
|
49
|
+
*
|
|
50
|
+
* @param {(String|URL)} address The URL to which to connect
|
|
51
|
+
* @param {(String|String[])} [protocols] The subprotocols
|
|
52
|
+
* @param {Object} [options] Connection options
|
|
53
|
+
*/
|
|
54
|
+
constructor(address, protocols, options) {
|
|
55
|
+
super();
|
|
56
|
+
|
|
57
|
+
this._binaryType = BINARY_TYPES[0];
|
|
58
|
+
this._closeCode = 1006;
|
|
59
|
+
this._closeFrameReceived = false;
|
|
60
|
+
this._closeFrameSent = false;
|
|
61
|
+
this._closeMessage = EMPTY_BUFFER;
|
|
62
|
+
this._closeTimer = null;
|
|
63
|
+
this._errorEmitted = false;
|
|
64
|
+
this._extensions = {};
|
|
65
|
+
this._paused = false;
|
|
66
|
+
this._protocol = '';
|
|
67
|
+
this._readyState = WebSocket.CONNECTING;
|
|
68
|
+
this._receiver = null;
|
|
69
|
+
this._sender = null;
|
|
70
|
+
this._socket = null;
|
|
71
|
+
|
|
72
|
+
if (address !== null) {
|
|
73
|
+
this._bufferedAmount = 0;
|
|
74
|
+
this._isServer = false;
|
|
75
|
+
this._redirects = 0;
|
|
76
|
+
|
|
77
|
+
if (protocols === undefined) {
|
|
78
|
+
if (!options || options.protocols === undefined) {
|
|
79
|
+
protocols = [];
|
|
80
|
+
} else if (Array.isArray(options.protocols)) {
|
|
81
|
+
protocols = options.protocols;
|
|
82
|
+
} else {
|
|
83
|
+
protocols = [options.protocols];
|
|
84
|
+
}
|
|
85
|
+
} else if (!Array.isArray(protocols)) {
|
|
86
|
+
if (typeof protocols === 'object' && protocols !== null) {
|
|
87
|
+
options = protocols;
|
|
88
|
+
|
|
89
|
+
if (options.protocols === undefined) {
|
|
90
|
+
protocols = [];
|
|
91
|
+
} else if (Array.isArray(options.protocols)) {
|
|
92
|
+
protocols = options.protocols;
|
|
93
|
+
} else {
|
|
94
|
+
protocols = [options.protocols];
|
|
95
|
+
}
|
|
96
|
+
} else {
|
|
97
|
+
protocols = [protocols];
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
initAsClient(this, address, protocols, options);
|
|
102
|
+
} else {
|
|
103
|
+
this._autoPong = options.autoPong;
|
|
104
|
+
this._closeTimeout = options.closeTimeout;
|
|
105
|
+
this._isServer = true;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* For historical reasons, the custom "nodebuffer" type is used by the default
|
|
111
|
+
* instead of "blob".
|
|
112
|
+
*
|
|
113
|
+
* @type {String}
|
|
114
|
+
*/
|
|
115
|
+
get binaryType() {
|
|
116
|
+
return this._binaryType;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
set binaryType(type) {
|
|
120
|
+
if (!BINARY_TYPES.includes(type)) return;
|
|
121
|
+
|
|
122
|
+
this._binaryType = type;
|
|
123
|
+
|
|
124
|
+
//
|
|
125
|
+
// Allow to change `binaryType` on the fly.
|
|
126
|
+
//
|
|
127
|
+
if (this._receiver) this._receiver._binaryType = type;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @type {Number}
|
|
132
|
+
*/
|
|
133
|
+
get bufferedAmount() {
|
|
134
|
+
if (!this._socket) return this._bufferedAmount;
|
|
135
|
+
|
|
136
|
+
return this._socket._writableState.length + this._sender._bufferedBytes;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* @type {String}
|
|
141
|
+
*/
|
|
142
|
+
get extensions() {
|
|
143
|
+
return Object.keys(this._extensions).join();
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @type {Boolean}
|
|
148
|
+
*/
|
|
149
|
+
get isPaused() {
|
|
150
|
+
return this._paused;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @type {Function}
|
|
155
|
+
*/
|
|
156
|
+
/* istanbul ignore next */
|
|
157
|
+
get onclose() {
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* @type {Function}
|
|
163
|
+
*/
|
|
164
|
+
/* istanbul ignore next */
|
|
165
|
+
get onerror() {
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* @type {Function}
|
|
171
|
+
*/
|
|
172
|
+
/* istanbul ignore next */
|
|
173
|
+
get onopen() {
|
|
174
|
+
return null;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* @type {Function}
|
|
179
|
+
*/
|
|
180
|
+
/* istanbul ignore next */
|
|
181
|
+
get onmessage() {
|
|
182
|
+
return null;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* @type {String}
|
|
187
|
+
*/
|
|
188
|
+
get protocol() {
|
|
189
|
+
return this._protocol;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* @type {Number}
|
|
194
|
+
*/
|
|
195
|
+
get readyState() {
|
|
196
|
+
return this._readyState;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* @type {String}
|
|
201
|
+
*/
|
|
202
|
+
get url() {
|
|
203
|
+
return this._url;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Set up the socket and the internal resources.
|
|
208
|
+
*
|
|
209
|
+
* @param {Duplex} socket The network socket between the server and client
|
|
210
|
+
* @param {Buffer} head The first packet of the upgraded stream
|
|
211
|
+
* @param {Object} options Options object
|
|
212
|
+
* @param {Boolean} [options.allowSynchronousEvents=false] Specifies whether
|
|
213
|
+
* any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
|
|
214
|
+
* multiple times in the same tick
|
|
215
|
+
* @param {Function} [options.generateMask] The function used to generate the
|
|
216
|
+
* masking key
|
|
217
|
+
* @param {Number} [options.maxBufferedChunks=0] The maximum number of
|
|
218
|
+
* buffered data chunks
|
|
219
|
+
* @param {Number} [options.maxFragments=0] The maximum number of message
|
|
220
|
+
* fragments
|
|
221
|
+
* @param {Number} [options.maxPayload=0] The maximum allowed message size
|
|
222
|
+
* @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
|
|
223
|
+
* not to skip UTF-8 validation for text and close messages
|
|
224
|
+
* @private
|
|
225
|
+
*/
|
|
226
|
+
setSocket(socket, head, options) {
|
|
227
|
+
const receiver = new Receiver({
|
|
228
|
+
allowSynchronousEvents: options.allowSynchronousEvents,
|
|
229
|
+
binaryType: this.binaryType,
|
|
230
|
+
extensions: this._extensions,
|
|
231
|
+
isServer: this._isServer,
|
|
232
|
+
maxBufferedChunks: options.maxBufferedChunks,
|
|
233
|
+
maxFragments: options.maxFragments,
|
|
234
|
+
maxPayload: options.maxPayload,
|
|
235
|
+
skipUTF8Validation: options.skipUTF8Validation
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
const sender = new Sender(socket, this._extensions, options.generateMask);
|
|
239
|
+
|
|
240
|
+
this._receiver = receiver;
|
|
241
|
+
this._sender = sender;
|
|
242
|
+
this._socket = socket;
|
|
243
|
+
|
|
244
|
+
receiver[kWebSocket] = this;
|
|
245
|
+
sender[kWebSocket] = this;
|
|
246
|
+
socket[kWebSocket] = this;
|
|
247
|
+
|
|
248
|
+
receiver.on('conclude', receiverOnConclude);
|
|
249
|
+
receiver.on('drain', receiverOnDrain);
|
|
250
|
+
receiver.on('error', receiverOnError);
|
|
251
|
+
receiver.on('message', receiverOnMessage);
|
|
252
|
+
receiver.on('ping', receiverOnPing);
|
|
253
|
+
receiver.on('pong', receiverOnPong);
|
|
254
|
+
|
|
255
|
+
sender.onerror = senderOnError;
|
|
256
|
+
|
|
257
|
+
//
|
|
258
|
+
// These methods may not be available if `socket` is just a `Duplex`.
|
|
259
|
+
//
|
|
260
|
+
if (socket.setTimeout) socket.setTimeout(0);
|
|
261
|
+
if (socket.setNoDelay) socket.setNoDelay();
|
|
262
|
+
|
|
263
|
+
if (head.length > 0) socket.unshift(head);
|
|
264
|
+
|
|
265
|
+
socket.on('close', socketOnClose);
|
|
266
|
+
socket.on('data', socketOnData);
|
|
267
|
+
socket.on('end', socketOnEnd);
|
|
268
|
+
socket.on('error', socketOnError);
|
|
269
|
+
|
|
270
|
+
this._readyState = WebSocket.OPEN;
|
|
271
|
+
this.emit('open');
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Emit the `'close'` event.
|
|
276
|
+
*
|
|
277
|
+
* @private
|
|
278
|
+
*/
|
|
279
|
+
emitClose() {
|
|
280
|
+
if (!this._socket) {
|
|
281
|
+
this._readyState = WebSocket.CLOSED;
|
|
282
|
+
this.emit('close', this._closeCode, this._closeMessage);
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
if (this._extensions[PerMessageDeflate.extensionName]) {
|
|
287
|
+
this._extensions[PerMessageDeflate.extensionName].cleanup();
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
this._receiver.removeAllListeners();
|
|
291
|
+
this._readyState = WebSocket.CLOSED;
|
|
292
|
+
this.emit('close', this._closeCode, this._closeMessage);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Start a closing handshake.
|
|
297
|
+
*
|
|
298
|
+
* +----------+ +-----------+ +----------+
|
|
299
|
+
* - - -|ws.close()|-->|close frame|-->|ws.close()|- - -
|
|
300
|
+
* | +----------+ +-----------+ +----------+ |
|
|
301
|
+
* +----------+ +-----------+ |
|
|
302
|
+
* CLOSING |ws.close()|<--|close frame|<--+-----+ CLOSING
|
|
303
|
+
* +----------+ +-----------+ |
|
|
304
|
+
* | | | +---+ |
|
|
305
|
+
* +------------------------+-->|fin| - - - -
|
|
306
|
+
* | +---+ | +---+
|
|
307
|
+
* - - - - -|fin|<---------------------+
|
|
308
|
+
* +---+
|
|
309
|
+
*
|
|
310
|
+
* @param {Number} [code] Status code explaining why the connection is closing
|
|
311
|
+
* @param {(String|Buffer)} [data] The reason why the connection is
|
|
312
|
+
* closing
|
|
313
|
+
* @public
|
|
314
|
+
*/
|
|
315
|
+
close(code, data) {
|
|
316
|
+
if (this.readyState === WebSocket.CLOSED) return;
|
|
317
|
+
if (this.readyState === WebSocket.CONNECTING) {
|
|
318
|
+
const msg = 'WebSocket was closed before the connection was established';
|
|
319
|
+
abortHandshake(this, this._req, msg);
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
if (this.readyState === WebSocket.CLOSING) {
|
|
324
|
+
if (
|
|
325
|
+
this._closeFrameSent &&
|
|
326
|
+
(this._closeFrameReceived || this._receiver._writableState.errorEmitted)
|
|
327
|
+
) {
|
|
328
|
+
this._socket.end();
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
this._sender.close(code, data, !this._isServer, (err) => {
|
|
335
|
+
//
|
|
336
|
+
// This error is handled by the `'error'` listener on the socket. We only
|
|
337
|
+
// want to know if the close frame has been sent here.
|
|
338
|
+
//
|
|
339
|
+
if (err) return;
|
|
340
|
+
|
|
341
|
+
this._closeFrameSent = true;
|
|
342
|
+
|
|
343
|
+
if (
|
|
344
|
+
this._closeFrameReceived ||
|
|
345
|
+
this._receiver._writableState.errorEmitted
|
|
346
|
+
) {
|
|
347
|
+
this._socket.end();
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
this._readyState = WebSocket.CLOSING;
|
|
352
|
+
setCloseTimer(this);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Pause the socket.
|
|
357
|
+
*
|
|
358
|
+
* @public
|
|
359
|
+
*/
|
|
360
|
+
pause() {
|
|
361
|
+
if (
|
|
362
|
+
this.readyState === WebSocket.CONNECTING ||
|
|
363
|
+
this.readyState === WebSocket.CLOSED
|
|
364
|
+
) {
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
this._paused = true;
|
|
369
|
+
this._socket.pause();
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Send a ping.
|
|
374
|
+
*
|
|
375
|
+
* @param {*} [data] The data to send
|
|
376
|
+
* @param {Boolean} [mask] Indicates whether or not to mask `data`
|
|
377
|
+
* @param {Function} [cb] Callback which is executed when the ping is sent
|
|
378
|
+
* @public
|
|
379
|
+
*/
|
|
380
|
+
ping(data, mask, cb) {
|
|
381
|
+
if (this.readyState === WebSocket.CONNECTING) {
|
|
382
|
+
throw new Error('WebSocket is not open: readyState 0 (CONNECTING)');
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
if (typeof data === 'function') {
|
|
386
|
+
cb = data;
|
|
387
|
+
data = mask = undefined;
|
|
388
|
+
} else if (typeof mask === 'function') {
|
|
389
|
+
cb = mask;
|
|
390
|
+
mask = undefined;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
if (typeof data === 'number') data = data.toString();
|
|
394
|
+
|
|
395
|
+
if (this.readyState !== WebSocket.OPEN) {
|
|
396
|
+
sendAfterClose(this, data, cb);
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
if (mask === undefined) mask = !this._isServer;
|
|
401
|
+
this._sender.ping(data || EMPTY_BUFFER, mask, cb);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Send a pong.
|
|
406
|
+
*
|
|
407
|
+
* @param {*} [data] The data to send
|
|
408
|
+
* @param {Boolean} [mask] Indicates whether or not to mask `data`
|
|
409
|
+
* @param {Function} [cb] Callback which is executed when the pong is sent
|
|
410
|
+
* @public
|
|
411
|
+
*/
|
|
412
|
+
pong(data, mask, cb) {
|
|
413
|
+
if (this.readyState === WebSocket.CONNECTING) {
|
|
414
|
+
throw new Error('WebSocket is not open: readyState 0 (CONNECTING)');
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
if (typeof data === 'function') {
|
|
418
|
+
cb = data;
|
|
419
|
+
data = mask = undefined;
|
|
420
|
+
} else if (typeof mask === 'function') {
|
|
421
|
+
cb = mask;
|
|
422
|
+
mask = undefined;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
if (typeof data === 'number') data = data.toString();
|
|
426
|
+
|
|
427
|
+
if (this.readyState !== WebSocket.OPEN) {
|
|
428
|
+
sendAfterClose(this, data, cb);
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
if (mask === undefined) mask = !this._isServer;
|
|
433
|
+
this._sender.pong(data || EMPTY_BUFFER, mask, cb);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* Resume the socket.
|
|
438
|
+
*
|
|
439
|
+
* @public
|
|
440
|
+
*/
|
|
441
|
+
resume() {
|
|
442
|
+
if (
|
|
443
|
+
this.readyState === WebSocket.CONNECTING ||
|
|
444
|
+
this.readyState === WebSocket.CLOSED
|
|
445
|
+
) {
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
this._paused = false;
|
|
450
|
+
if (!this._receiver._writableState.needDrain) this._socket.resume();
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Send a data message.
|
|
455
|
+
*
|
|
456
|
+
* @param {*} data The message to send
|
|
457
|
+
* @param {Object} [options] Options object
|
|
458
|
+
* @param {Boolean} [options.binary] Specifies whether `data` is binary or
|
|
459
|
+
* text
|
|
460
|
+
* @param {Boolean} [options.compress] Specifies whether or not to compress
|
|
461
|
+
* `data`
|
|
462
|
+
* @param {Boolean} [options.fin=true] Specifies whether the fragment is the
|
|
463
|
+
* last one
|
|
464
|
+
* @param {Boolean} [options.mask] Specifies whether or not to mask `data`
|
|
465
|
+
* @param {Function} [cb] Callback which is executed when data is written out
|
|
466
|
+
* @public
|
|
467
|
+
*/
|
|
468
|
+
send(data, options, cb) {
|
|
469
|
+
if (this.readyState === WebSocket.CONNECTING) {
|
|
470
|
+
throw new Error('WebSocket is not open: readyState 0 (CONNECTING)');
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
if (typeof options === 'function') {
|
|
474
|
+
cb = options;
|
|
475
|
+
options = {};
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
if (typeof data === 'number') data = data.toString();
|
|
479
|
+
|
|
480
|
+
if (this.readyState !== WebSocket.OPEN) {
|
|
481
|
+
sendAfterClose(this, data, cb);
|
|
482
|
+
return;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
const opts = {
|
|
486
|
+
binary: typeof data !== 'string',
|
|
487
|
+
mask: !this._isServer,
|
|
488
|
+
compress: true,
|
|
489
|
+
fin: true,
|
|
490
|
+
...options
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
if (!this._extensions[PerMessageDeflate.extensionName]) {
|
|
494
|
+
opts.compress = false;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
this._sender.send(data || EMPTY_BUFFER, opts, cb);
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Forcibly close the connection.
|
|
502
|
+
*
|
|
503
|
+
* @public
|
|
504
|
+
*/
|
|
505
|
+
terminate() {
|
|
506
|
+
if (this.readyState === WebSocket.CLOSED) return;
|
|
507
|
+
if (this.readyState === WebSocket.CONNECTING) {
|
|
508
|
+
const msg = 'WebSocket was closed before the connection was established';
|
|
509
|
+
abortHandshake(this, this._req, msg);
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
if (this._socket) {
|
|
514
|
+
this._readyState = WebSocket.CLOSING;
|
|
515
|
+
this._socket.destroy();
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* @constant {Number} CONNECTING
|
|
522
|
+
* @memberof WebSocket
|
|
523
|
+
*/
|
|
524
|
+
Object.defineProperty(WebSocket, 'CONNECTING', {
|
|
525
|
+
enumerable: true,
|
|
526
|
+
value: readyStates.indexOf('CONNECTING')
|
|
527
|
+
});
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* @constant {Number} CONNECTING
|
|
531
|
+
* @memberof WebSocket.prototype
|
|
532
|
+
*/
|
|
533
|
+
Object.defineProperty(WebSocket.prototype, 'CONNECTING', {
|
|
534
|
+
enumerable: true,
|
|
535
|
+
value: readyStates.indexOf('CONNECTING')
|
|
536
|
+
});
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* @constant {Number} OPEN
|
|
540
|
+
* @memberof WebSocket
|
|
541
|
+
*/
|
|
542
|
+
Object.defineProperty(WebSocket, 'OPEN', {
|
|
543
|
+
enumerable: true,
|
|
544
|
+
value: readyStates.indexOf('OPEN')
|
|
545
|
+
});
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* @constant {Number} OPEN
|
|
549
|
+
* @memberof WebSocket.prototype
|
|
550
|
+
*/
|
|
551
|
+
Object.defineProperty(WebSocket.prototype, 'OPEN', {
|
|
552
|
+
enumerable: true,
|
|
553
|
+
value: readyStates.indexOf('OPEN')
|
|
554
|
+
});
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* @constant {Number} CLOSING
|
|
558
|
+
* @memberof WebSocket
|
|
559
|
+
*/
|
|
560
|
+
Object.defineProperty(WebSocket, 'CLOSING', {
|
|
561
|
+
enumerable: true,
|
|
562
|
+
value: readyStates.indexOf('CLOSING')
|
|
563
|
+
});
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* @constant {Number} CLOSING
|
|
567
|
+
* @memberof WebSocket.prototype
|
|
568
|
+
*/
|
|
569
|
+
Object.defineProperty(WebSocket.prototype, 'CLOSING', {
|
|
570
|
+
enumerable: true,
|
|
571
|
+
value: readyStates.indexOf('CLOSING')
|
|
572
|
+
});
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* @constant {Number} CLOSED
|
|
576
|
+
* @memberof WebSocket
|
|
577
|
+
*/
|
|
578
|
+
Object.defineProperty(WebSocket, 'CLOSED', {
|
|
579
|
+
enumerable: true,
|
|
580
|
+
value: readyStates.indexOf('CLOSED')
|
|
581
|
+
});
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* @constant {Number} CLOSED
|
|
585
|
+
* @memberof WebSocket.prototype
|
|
586
|
+
*/
|
|
587
|
+
Object.defineProperty(WebSocket.prototype, 'CLOSED', {
|
|
588
|
+
enumerable: true,
|
|
589
|
+
value: readyStates.indexOf('CLOSED')
|
|
590
|
+
});
|
|
591
|
+
|
|
592
|
+
[
|
|
593
|
+
'binaryType',
|
|
594
|
+
'bufferedAmount',
|
|
595
|
+
'extensions',
|
|
596
|
+
'isPaused',
|
|
597
|
+
'protocol',
|
|
598
|
+
'readyState',
|
|
599
|
+
'url'
|
|
600
|
+
].forEach((property) => {
|
|
601
|
+
Object.defineProperty(WebSocket.prototype, property, { enumerable: true });
|
|
602
|
+
});
|
|
603
|
+
|
|
604
|
+
//
|
|
605
|
+
// Add the `onopen`, `onerror`, `onclose`, and `onmessage` attributes.
|
|
606
|
+
// See https://html.spec.whatwg.org/multipage/comms.html#the-websocket-interface
|
|
607
|
+
//
|
|
608
|
+
['open', 'error', 'close', 'message'].forEach((method) => {
|
|
609
|
+
Object.defineProperty(WebSocket.prototype, `on${method}`, {
|
|
610
|
+
enumerable: true,
|
|
611
|
+
get() {
|
|
612
|
+
for (const listener of this.listeners(method)) {
|
|
613
|
+
if (listener[kForOnEventAttribute]) return listener[kListener];
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
return null;
|
|
617
|
+
},
|
|
618
|
+
set(handler) {
|
|
619
|
+
for (const listener of this.listeners(method)) {
|
|
620
|
+
if (listener[kForOnEventAttribute]) {
|
|
621
|
+
this.removeListener(method, listener);
|
|
622
|
+
break;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
if (typeof handler !== 'function') return;
|
|
627
|
+
|
|
628
|
+
this.addEventListener(method, handler, {
|
|
629
|
+
[kForOnEventAttribute]: true
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
});
|
|
633
|
+
});
|
|
634
|
+
|
|
635
|
+
WebSocket.prototype.addEventListener = addEventListener;
|
|
636
|
+
WebSocket.prototype.removeEventListener = removeEventListener;
|
|
637
|
+
|
|
638
|
+
module.exports = WebSocket;
|
|
639
|
+
|
|
640
|
+
/**
|
|
641
|
+
* Initialize a WebSocket client.
|
|
642
|
+
*
|
|
643
|
+
* @param {WebSocket} websocket The client to initialize
|
|
644
|
+
* @param {(String|URL)} address The URL to which to connect
|
|
645
|
+
* @param {Array} protocols The subprotocols
|
|
646
|
+
* @param {Object} [options] Connection options
|
|
647
|
+
* @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether any
|
|
648
|
+
* of the `'message'`, `'ping'`, and `'pong'` events can be emitted multiple
|
|
649
|
+
* times in the same tick
|
|
650
|
+
* @param {Boolean} [options.autoPong=true] Specifies whether or not to
|
|
651
|
+
* automatically send a pong in response to a ping
|
|
652
|
+
* @param {Number} [options.closeTimeout=30000] Duration in milliseconds to wait
|
|
653
|
+
* for the closing handshake to finish after `websocket.close()` is called
|
|
654
|
+
* @param {Function} [options.finishRequest] A function which can be used to
|
|
655
|
+
* customize the headers of each http request before it is sent
|
|
656
|
+
* @param {Boolean} [options.followRedirects=false] Whether or not to follow
|
|
657
|
+
* redirects
|
|
658
|
+
* @param {Function} [options.generateMask] The function used to generate the
|
|
659
|
+
* masking key
|
|
660
|
+
* @param {Number} [options.handshakeTimeout] Timeout in milliseconds for the
|
|
661
|
+
* handshake request
|
|
662
|
+
* @param {Number} [options.maxBufferedChunks=262144] The maximum number of
|
|
663
|
+
* buffered data chunks
|
|
664
|
+
* @param {Number} [options.maxFragments=16384] The maximum number of message
|
|
665
|
+
* fragments
|
|
666
|
+
* @param {Number} [options.maxPayload=104857600] The maximum allowed message
|
|
667
|
+
* size
|
|
668
|
+
* @param {Number} [options.maxRedirects=10] The maximum number of redirects
|
|
669
|
+
* allowed
|
|
670
|
+
* @param {String} [options.origin] Value of the `Origin` or
|
|
671
|
+
* `Sec-WebSocket-Origin` header
|
|
672
|
+
* @param {(Boolean|Object)} [options.perMessageDeflate=true] Enable/disable
|
|
673
|
+
* permessage-deflate
|
|
674
|
+
* @param {Number} [options.protocolVersion=13] Value of the
|
|
675
|
+
* `Sec-WebSocket-Version` header
|
|
676
|
+
* @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
|
|
677
|
+
* not to skip UTF-8 validation for text and close messages
|
|
678
|
+
* @private
|
|
679
|
+
*/
|
|
680
|
+
function initAsClient(websocket, address, protocols, options) {
|
|
681
|
+
const opts = {
|
|
682
|
+
allowSynchronousEvents: true,
|
|
683
|
+
autoPong: true,
|
|
684
|
+
closeTimeout: CLOSE_TIMEOUT,
|
|
685
|
+
protocolVersion: protocolVersions[1],
|
|
686
|
+
maxBufferedChunks: 256 * 1024,
|
|
687
|
+
maxFragments: 16 * 1024,
|
|
688
|
+
maxPayload: 100 * 1024 * 1024,
|
|
689
|
+
skipUTF8Validation: false,
|
|
690
|
+
perMessageDeflate: true,
|
|
691
|
+
followRedirects: false,
|
|
692
|
+
maxRedirects: 10,
|
|
693
|
+
...options,
|
|
694
|
+
socketPath: undefined,
|
|
695
|
+
hostname: undefined,
|
|
696
|
+
protocol: undefined,
|
|
697
|
+
protocols: undefined,
|
|
698
|
+
timeout: undefined,
|
|
699
|
+
method: 'GET',
|
|
700
|
+
host: undefined,
|
|
701
|
+
path: undefined,
|
|
702
|
+
port: undefined
|
|
703
|
+
};
|
|
704
|
+
|
|
705
|
+
websocket._autoPong = opts.autoPong;
|
|
706
|
+
websocket._closeTimeout = opts.closeTimeout;
|
|
707
|
+
|
|
708
|
+
if (!protocolVersions.includes(opts.protocolVersion)) {
|
|
709
|
+
throw new RangeError(
|
|
710
|
+
`Unsupported protocol version: ${opts.protocolVersion} ` +
|
|
711
|
+
`(supported versions: ${protocolVersions.join(', ')})`
|
|
712
|
+
);
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
let parsedUrl;
|
|
716
|
+
|
|
717
|
+
if (address instanceof URL) {
|
|
718
|
+
parsedUrl = address;
|
|
719
|
+
} else {
|
|
720
|
+
try {
|
|
721
|
+
parsedUrl = new URL(address);
|
|
722
|
+
} catch {
|
|
723
|
+
throw new SyntaxError(`Invalid URL: ${address}`);
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
if (parsedUrl.protocol === 'http:') {
|
|
728
|
+
parsedUrl.protocol = 'ws:';
|
|
729
|
+
} else if (parsedUrl.protocol === 'https:') {
|
|
730
|
+
parsedUrl.protocol = 'wss:';
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
websocket._url = parsedUrl.href;
|
|
734
|
+
|
|
735
|
+
const isSecure = parsedUrl.protocol === 'wss:';
|
|
736
|
+
const isIpcUrl = parsedUrl.protocol === 'ws+unix:';
|
|
737
|
+
let invalidUrlMessage;
|
|
738
|
+
|
|
739
|
+
if (parsedUrl.protocol !== 'ws:' && !isSecure && !isIpcUrl) {
|
|
740
|
+
invalidUrlMessage =
|
|
741
|
+
'The URL\'s protocol must be one of "ws:", "wss:", ' +
|
|
742
|
+
'"http:", "https:", or "ws+unix:"';
|
|
743
|
+
} else if (isIpcUrl && !parsedUrl.pathname) {
|
|
744
|
+
invalidUrlMessage = "The URL's pathname is empty";
|
|
745
|
+
} else if (parsedUrl.hash) {
|
|
746
|
+
invalidUrlMessage = 'The URL contains a fragment identifier';
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
if (invalidUrlMessage) {
|
|
750
|
+
const err = new SyntaxError(invalidUrlMessage);
|
|
751
|
+
|
|
752
|
+
if (websocket._redirects === 0) {
|
|
753
|
+
throw err;
|
|
754
|
+
} else {
|
|
755
|
+
emitErrorAndClose(websocket, err);
|
|
756
|
+
return;
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
const defaultPort = isSecure ? 443 : 80;
|
|
761
|
+
const key = randomBytes(16).toString('base64');
|
|
762
|
+
const request = isSecure ? https.request : http.request;
|
|
763
|
+
const protocolSet = new Set();
|
|
764
|
+
let perMessageDeflate;
|
|
765
|
+
|
|
766
|
+
opts.createConnection =
|
|
767
|
+
opts.createConnection || (isSecure ? tlsConnect : netConnect);
|
|
768
|
+
opts.defaultPort = opts.defaultPort || defaultPort;
|
|
769
|
+
opts.port = parsedUrl.port || defaultPort;
|
|
770
|
+
opts.host = parsedUrl.hostname.startsWith('[')
|
|
771
|
+
? parsedUrl.hostname.slice(1, -1)
|
|
772
|
+
: parsedUrl.hostname;
|
|
773
|
+
opts.headers = {
|
|
774
|
+
...opts.headers,
|
|
775
|
+
'Sec-WebSocket-Version': opts.protocolVersion,
|
|
776
|
+
'Sec-WebSocket-Key': key,
|
|
777
|
+
Connection: 'Upgrade',
|
|
778
|
+
Upgrade: 'websocket'
|
|
779
|
+
};
|
|
780
|
+
opts.path = parsedUrl.pathname + parsedUrl.search;
|
|
781
|
+
opts.timeout = opts.handshakeTimeout;
|
|
782
|
+
|
|
783
|
+
if (opts.perMessageDeflate) {
|
|
784
|
+
perMessageDeflate = new PerMessageDeflate({
|
|
785
|
+
...opts.perMessageDeflate,
|
|
786
|
+
isServer: false,
|
|
787
|
+
maxPayload: opts.maxPayload
|
|
788
|
+
});
|
|
789
|
+
opts.headers['Sec-WebSocket-Extensions'] = format({
|
|
790
|
+
[PerMessageDeflate.extensionName]: perMessageDeflate.offer()
|
|
791
|
+
});
|
|
792
|
+
}
|
|
793
|
+
if (protocols.length) {
|
|
794
|
+
for (const protocol of protocols) {
|
|
795
|
+
if (
|
|
796
|
+
typeof protocol !== 'string' ||
|
|
797
|
+
!subprotocolRegex.test(protocol) ||
|
|
798
|
+
protocolSet.has(protocol)
|
|
799
|
+
) {
|
|
800
|
+
throw new SyntaxError(
|
|
801
|
+
'An invalid or duplicated subprotocol was specified'
|
|
802
|
+
);
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
protocolSet.add(protocol);
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
opts.headers['Sec-WebSocket-Protocol'] = protocols.join(',');
|
|
809
|
+
}
|
|
810
|
+
if (opts.origin) {
|
|
811
|
+
if (opts.protocolVersion < 13) {
|
|
812
|
+
opts.headers['Sec-WebSocket-Origin'] = opts.origin;
|
|
813
|
+
} else {
|
|
814
|
+
opts.headers.Origin = opts.origin;
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
if (parsedUrl.username || parsedUrl.password) {
|
|
818
|
+
opts.auth = `${parsedUrl.username}:${parsedUrl.password}`;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
if (isIpcUrl) {
|
|
822
|
+
const parts = opts.path.split(':');
|
|
823
|
+
|
|
824
|
+
opts.socketPath = parts[0];
|
|
825
|
+
opts.path = parts[1];
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
let req;
|
|
829
|
+
|
|
830
|
+
if (opts.followRedirects) {
|
|
831
|
+
if (websocket._redirects === 0) {
|
|
832
|
+
websocket._originalIpc = isIpcUrl;
|
|
833
|
+
websocket._originalSecure = isSecure;
|
|
834
|
+
websocket._originalHostOrSocketPath = isIpcUrl
|
|
835
|
+
? opts.socketPath
|
|
836
|
+
: parsedUrl.host;
|
|
837
|
+
|
|
838
|
+
const headers = options && options.headers;
|
|
839
|
+
|
|
840
|
+
//
|
|
841
|
+
// Shallow copy the user provided options so that headers can be changed
|
|
842
|
+
// without mutating the original object.
|
|
843
|
+
//
|
|
844
|
+
options = { ...options, headers: {} };
|
|
845
|
+
|
|
846
|
+
if (headers) {
|
|
847
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
848
|
+
options.headers[key.toLowerCase()] = value;
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
} else if (websocket.listenerCount('redirect') === 0) {
|
|
852
|
+
const isSameHost = isIpcUrl
|
|
853
|
+
? websocket._originalIpc
|
|
854
|
+
? opts.socketPath === websocket._originalHostOrSocketPath
|
|
855
|
+
: false
|
|
856
|
+
: websocket._originalIpc
|
|
857
|
+
? false
|
|
858
|
+
: parsedUrl.host === websocket._originalHostOrSocketPath;
|
|
859
|
+
|
|
860
|
+
if (!isSameHost || (websocket._originalSecure && !isSecure)) {
|
|
861
|
+
//
|
|
862
|
+
// Match curl 7.77.0 behavior and drop the following headers. These
|
|
863
|
+
// headers are also dropped when following a redirect to a subdomain.
|
|
864
|
+
//
|
|
865
|
+
delete opts.headers.authorization;
|
|
866
|
+
delete opts.headers.cookie;
|
|
867
|
+
|
|
868
|
+
if (!isSameHost) delete opts.headers.host;
|
|
869
|
+
|
|
870
|
+
opts.auth = undefined;
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
//
|
|
875
|
+
// Match curl 7.77.0 behavior and make the first `Authorization` header win.
|
|
876
|
+
// If the `Authorization` header is set, then there is nothing to do as it
|
|
877
|
+
// will take precedence.
|
|
878
|
+
//
|
|
879
|
+
if (opts.auth && !options.headers.authorization) {
|
|
880
|
+
options.headers.authorization =
|
|
881
|
+
'Basic ' + Buffer.from(opts.auth).toString('base64');
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
req = websocket._req = request(opts);
|
|
885
|
+
|
|
886
|
+
if (websocket._redirects) {
|
|
887
|
+
//
|
|
888
|
+
// Unlike what is done for the `'upgrade'` event, no early exit is
|
|
889
|
+
// triggered here if the user calls `websocket.close()` or
|
|
890
|
+
// `websocket.terminate()` from a listener of the `'redirect'` event. This
|
|
891
|
+
// is because the user can also call `request.destroy()` with an error
|
|
892
|
+
// before calling `websocket.close()` or `websocket.terminate()` and this
|
|
893
|
+
// would result in an error being emitted on the `request` object with no
|
|
894
|
+
// `'error'` event listeners attached.
|
|
895
|
+
//
|
|
896
|
+
websocket.emit('redirect', websocket.url, req);
|
|
897
|
+
}
|
|
898
|
+
} else {
|
|
899
|
+
req = websocket._req = request(opts);
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
if (opts.timeout) {
|
|
903
|
+
req.on('timeout', () => {
|
|
904
|
+
abortHandshake(websocket, req, 'Opening handshake has timed out');
|
|
905
|
+
});
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
req.on('error', (err) => {
|
|
909
|
+
if (req === null || req[kAborted]) return;
|
|
910
|
+
|
|
911
|
+
req = websocket._req = null;
|
|
912
|
+
emitErrorAndClose(websocket, err);
|
|
913
|
+
});
|
|
914
|
+
|
|
915
|
+
req.on('response', (res) => {
|
|
916
|
+
const location = res.headers.location;
|
|
917
|
+
const statusCode = res.statusCode;
|
|
918
|
+
|
|
919
|
+
if (
|
|
920
|
+
location &&
|
|
921
|
+
opts.followRedirects &&
|
|
922
|
+
statusCode >= 300 &&
|
|
923
|
+
statusCode < 400
|
|
924
|
+
) {
|
|
925
|
+
if (++websocket._redirects > opts.maxRedirects) {
|
|
926
|
+
abortHandshake(websocket, req, 'Maximum redirects exceeded');
|
|
927
|
+
return;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
req.abort();
|
|
931
|
+
|
|
932
|
+
let addr;
|
|
933
|
+
|
|
934
|
+
try {
|
|
935
|
+
addr = new URL(location, address);
|
|
936
|
+
} catch (e) {
|
|
937
|
+
const err = new SyntaxError(`Invalid URL: ${location}`);
|
|
938
|
+
emitErrorAndClose(websocket, err);
|
|
939
|
+
return;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
initAsClient(websocket, addr, protocols, options);
|
|
943
|
+
} else if (!websocket.emit('unexpected-response', req, res)) {
|
|
944
|
+
abortHandshake(
|
|
945
|
+
websocket,
|
|
946
|
+
req,
|
|
947
|
+
`Unexpected server response: ${res.statusCode}`
|
|
948
|
+
);
|
|
949
|
+
}
|
|
950
|
+
});
|
|
951
|
+
|
|
952
|
+
req.on('upgrade', (res, socket, head) => {
|
|
953
|
+
websocket.emit('upgrade', res);
|
|
954
|
+
|
|
955
|
+
//
|
|
956
|
+
// The user may have closed the connection from a listener of the
|
|
957
|
+
// `'upgrade'` event.
|
|
958
|
+
//
|
|
959
|
+
if (websocket.readyState !== WebSocket.CONNECTING) return;
|
|
960
|
+
|
|
961
|
+
req = websocket._req = null;
|
|
962
|
+
|
|
963
|
+
const upgrade = res.headers.upgrade;
|
|
964
|
+
|
|
965
|
+
if (upgrade === undefined || upgrade.toLowerCase() !== 'websocket') {
|
|
966
|
+
abortHandshake(websocket, socket, 'Invalid Upgrade header');
|
|
967
|
+
return;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
const digest = createHash('sha1')
|
|
971
|
+
.update(key + GUID)
|
|
972
|
+
.digest('base64');
|
|
973
|
+
|
|
974
|
+
if (res.headers['sec-websocket-accept'] !== digest) {
|
|
975
|
+
abortHandshake(websocket, socket, 'Invalid Sec-WebSocket-Accept header');
|
|
976
|
+
return;
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
const serverProt = res.headers['sec-websocket-protocol'];
|
|
980
|
+
let protError;
|
|
981
|
+
|
|
982
|
+
if (serverProt !== undefined) {
|
|
983
|
+
if (!protocolSet.size) {
|
|
984
|
+
protError = 'Server sent a subprotocol but none was requested';
|
|
985
|
+
} else if (!protocolSet.has(serverProt)) {
|
|
986
|
+
protError = 'Server sent an invalid subprotocol';
|
|
987
|
+
}
|
|
988
|
+
} else if (protocolSet.size) {
|
|
989
|
+
protError = 'Server sent no subprotocol';
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
if (protError) {
|
|
993
|
+
abortHandshake(websocket, socket, protError);
|
|
994
|
+
return;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
if (serverProt) websocket._protocol = serverProt;
|
|
998
|
+
|
|
999
|
+
const secWebSocketExtensions = res.headers['sec-websocket-extensions'];
|
|
1000
|
+
|
|
1001
|
+
if (secWebSocketExtensions !== undefined) {
|
|
1002
|
+
if (!perMessageDeflate) {
|
|
1003
|
+
const message =
|
|
1004
|
+
'Server sent a Sec-WebSocket-Extensions header but no extension ' +
|
|
1005
|
+
'was requested';
|
|
1006
|
+
abortHandshake(websocket, socket, message);
|
|
1007
|
+
return;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
let extensions;
|
|
1011
|
+
|
|
1012
|
+
try {
|
|
1013
|
+
extensions = parse(secWebSocketExtensions);
|
|
1014
|
+
} catch (err) {
|
|
1015
|
+
const message = 'Invalid Sec-WebSocket-Extensions header';
|
|
1016
|
+
abortHandshake(websocket, socket, message);
|
|
1017
|
+
return;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
const extensionNames = Object.keys(extensions);
|
|
1021
|
+
|
|
1022
|
+
if (
|
|
1023
|
+
extensionNames.length !== 1 ||
|
|
1024
|
+
extensionNames[0] !== PerMessageDeflate.extensionName
|
|
1025
|
+
) {
|
|
1026
|
+
const message = 'Server indicated an extension that was not requested';
|
|
1027
|
+
abortHandshake(websocket, socket, message);
|
|
1028
|
+
return;
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
try {
|
|
1032
|
+
perMessageDeflate.accept(extensions[PerMessageDeflate.extensionName]);
|
|
1033
|
+
} catch (err) {
|
|
1034
|
+
const message = 'Invalid Sec-WebSocket-Extensions header';
|
|
1035
|
+
abortHandshake(websocket, socket, message);
|
|
1036
|
+
return;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
websocket._extensions[PerMessageDeflate.extensionName] =
|
|
1040
|
+
perMessageDeflate;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
websocket.setSocket(socket, head, {
|
|
1044
|
+
allowSynchronousEvents: opts.allowSynchronousEvents,
|
|
1045
|
+
generateMask: opts.generateMask,
|
|
1046
|
+
maxBufferedChunks: opts.maxBufferedChunks,
|
|
1047
|
+
maxFragments: opts.maxFragments,
|
|
1048
|
+
maxPayload: opts.maxPayload,
|
|
1049
|
+
skipUTF8Validation: opts.skipUTF8Validation
|
|
1050
|
+
});
|
|
1051
|
+
});
|
|
1052
|
+
|
|
1053
|
+
if (opts.finishRequest) {
|
|
1054
|
+
opts.finishRequest(req, websocket);
|
|
1055
|
+
} else {
|
|
1056
|
+
req.end();
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* Emit the `'error'` and `'close'` events.
|
|
1062
|
+
*
|
|
1063
|
+
* @param {WebSocket} websocket The WebSocket instance
|
|
1064
|
+
* @param {Error} The error to emit
|
|
1065
|
+
* @private
|
|
1066
|
+
*/
|
|
1067
|
+
function emitErrorAndClose(websocket, err) {
|
|
1068
|
+
websocket._readyState = WebSocket.CLOSING;
|
|
1069
|
+
//
|
|
1070
|
+
// The following assignment is practically useless and is done only for
|
|
1071
|
+
// consistency.
|
|
1072
|
+
//
|
|
1073
|
+
websocket._errorEmitted = true;
|
|
1074
|
+
websocket.emit('error', err);
|
|
1075
|
+
websocket.emitClose();
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* Create a `net.Socket` and initiate a connection.
|
|
1080
|
+
*
|
|
1081
|
+
* @param {Object} options Connection options
|
|
1082
|
+
* @return {net.Socket} The newly created socket used to start the connection
|
|
1083
|
+
* @private
|
|
1084
|
+
*/
|
|
1085
|
+
function netConnect(options) {
|
|
1086
|
+
options.path = options.socketPath;
|
|
1087
|
+
return net.connect(options);
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
/**
|
|
1091
|
+
* Create a `tls.TLSSocket` and initiate a connection.
|
|
1092
|
+
*
|
|
1093
|
+
* @param {Object} options Connection options
|
|
1094
|
+
* @return {tls.TLSSocket} The newly created socket used to start the connection
|
|
1095
|
+
* @private
|
|
1096
|
+
*/
|
|
1097
|
+
function tlsConnect(options) {
|
|
1098
|
+
options.path = undefined;
|
|
1099
|
+
|
|
1100
|
+
if (!options.servername && options.servername !== '') {
|
|
1101
|
+
options.servername = net.isIP(options.host) ? '' : options.host;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
return tls.connect(options);
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
/**
|
|
1108
|
+
* Abort the handshake and emit an error.
|
|
1109
|
+
*
|
|
1110
|
+
* @param {WebSocket} websocket The WebSocket instance
|
|
1111
|
+
* @param {(http.ClientRequest|net.Socket|tls.Socket)} stream The request to
|
|
1112
|
+
* abort or the socket to destroy
|
|
1113
|
+
* @param {String} message The error message
|
|
1114
|
+
* @private
|
|
1115
|
+
*/
|
|
1116
|
+
function abortHandshake(websocket, stream, message) {
|
|
1117
|
+
websocket._readyState = WebSocket.CLOSING;
|
|
1118
|
+
|
|
1119
|
+
const err = new Error(message);
|
|
1120
|
+
Error.captureStackTrace(err, abortHandshake);
|
|
1121
|
+
|
|
1122
|
+
if (stream.setHeader) {
|
|
1123
|
+
stream[kAborted] = true;
|
|
1124
|
+
stream.abort();
|
|
1125
|
+
|
|
1126
|
+
if (stream.socket && !stream.socket.destroyed) {
|
|
1127
|
+
//
|
|
1128
|
+
// On Node.js >= 14.3.0 `request.abort()` does not destroy the socket if
|
|
1129
|
+
// called after the request completed. See
|
|
1130
|
+
// https://github.com/websockets/ws/issues/1869.
|
|
1131
|
+
//
|
|
1132
|
+
stream.socket.destroy();
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
process.nextTick(emitErrorAndClose, websocket, err);
|
|
1136
|
+
} else {
|
|
1137
|
+
stream.destroy(err);
|
|
1138
|
+
stream.once('error', websocket.emit.bind(websocket, 'error'));
|
|
1139
|
+
stream.once('close', websocket.emitClose.bind(websocket));
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* Handle cases where the `ping()`, `pong()`, or `send()` methods are called
|
|
1145
|
+
* when the `readyState` attribute is `CLOSING` or `CLOSED`.
|
|
1146
|
+
*
|
|
1147
|
+
* @param {WebSocket} websocket The WebSocket instance
|
|
1148
|
+
* @param {*} [data] The data to send
|
|
1149
|
+
* @param {Function} [cb] Callback
|
|
1150
|
+
* @private
|
|
1151
|
+
*/
|
|
1152
|
+
function sendAfterClose(websocket, data, cb) {
|
|
1153
|
+
if (data) {
|
|
1154
|
+
const length = isBlob(data) ? data.size : toBuffer(data).length;
|
|
1155
|
+
|
|
1156
|
+
//
|
|
1157
|
+
// The `_bufferedAmount` property is used only when the peer is a client and
|
|
1158
|
+
// the opening handshake fails. Under these circumstances, in fact, the
|
|
1159
|
+
// `setSocket()` method is not called, so the `_socket` and `_sender`
|
|
1160
|
+
// properties are set to `null`.
|
|
1161
|
+
//
|
|
1162
|
+
if (websocket._socket) websocket._sender._bufferedBytes += length;
|
|
1163
|
+
else websocket._bufferedAmount += length;
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
if (cb) {
|
|
1167
|
+
const err = new Error(
|
|
1168
|
+
`WebSocket is not open: readyState ${websocket.readyState} ` +
|
|
1169
|
+
`(${readyStates[websocket.readyState]})`
|
|
1170
|
+
);
|
|
1171
|
+
process.nextTick(cb, err);
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
/**
|
|
1176
|
+
* The listener of the `Receiver` `'conclude'` event.
|
|
1177
|
+
*
|
|
1178
|
+
* @param {Number} code The status code
|
|
1179
|
+
* @param {Buffer} reason The reason for closing
|
|
1180
|
+
* @private
|
|
1181
|
+
*/
|
|
1182
|
+
function receiverOnConclude(code, reason) {
|
|
1183
|
+
const websocket = this[kWebSocket];
|
|
1184
|
+
|
|
1185
|
+
websocket._closeFrameReceived = true;
|
|
1186
|
+
websocket._closeMessage = reason;
|
|
1187
|
+
websocket._closeCode = code;
|
|
1188
|
+
|
|
1189
|
+
if (websocket._socket[kWebSocket] === undefined) return;
|
|
1190
|
+
|
|
1191
|
+
websocket._socket.removeListener('data', socketOnData);
|
|
1192
|
+
process.nextTick(resume, websocket._socket);
|
|
1193
|
+
|
|
1194
|
+
if (code === 1005) websocket.close();
|
|
1195
|
+
else websocket.close(code, reason);
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
/**
|
|
1199
|
+
* The listener of the `Receiver` `'drain'` event.
|
|
1200
|
+
*
|
|
1201
|
+
* @private
|
|
1202
|
+
*/
|
|
1203
|
+
function receiverOnDrain() {
|
|
1204
|
+
const websocket = this[kWebSocket];
|
|
1205
|
+
|
|
1206
|
+
if (!websocket.isPaused) websocket._socket.resume();
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
/**
|
|
1210
|
+
* The listener of the `Receiver` `'error'` event.
|
|
1211
|
+
*
|
|
1212
|
+
* @param {(RangeError|Error)} err The emitted error
|
|
1213
|
+
* @private
|
|
1214
|
+
*/
|
|
1215
|
+
function receiverOnError(err) {
|
|
1216
|
+
const websocket = this[kWebSocket];
|
|
1217
|
+
|
|
1218
|
+
if (websocket._socket[kWebSocket] !== undefined) {
|
|
1219
|
+
websocket._socket.removeListener('data', socketOnData);
|
|
1220
|
+
|
|
1221
|
+
//
|
|
1222
|
+
// On Node.js < 14.0.0 the `'error'` event is emitted synchronously. See
|
|
1223
|
+
// https://github.com/websockets/ws/issues/1940.
|
|
1224
|
+
//
|
|
1225
|
+
process.nextTick(resume, websocket._socket);
|
|
1226
|
+
|
|
1227
|
+
websocket.close(err[kStatusCode]);
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
if (!websocket._errorEmitted) {
|
|
1231
|
+
websocket._errorEmitted = true;
|
|
1232
|
+
websocket.emit('error', err);
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
/**
|
|
1237
|
+
* The listener of the `Receiver` `'finish'` event.
|
|
1238
|
+
*
|
|
1239
|
+
* @private
|
|
1240
|
+
*/
|
|
1241
|
+
function receiverOnFinish() {
|
|
1242
|
+
this[kWebSocket].emitClose();
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
/**
|
|
1246
|
+
* The listener of the `Receiver` `'message'` event.
|
|
1247
|
+
*
|
|
1248
|
+
* @param {Buffer|ArrayBuffer|Buffer[])} data The message
|
|
1249
|
+
* @param {Boolean} isBinary Specifies whether the message is binary or not
|
|
1250
|
+
* @private
|
|
1251
|
+
*/
|
|
1252
|
+
function receiverOnMessage(data, isBinary) {
|
|
1253
|
+
this[kWebSocket].emit('message', data, isBinary);
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
/**
|
|
1257
|
+
* The listener of the `Receiver` `'ping'` event.
|
|
1258
|
+
*
|
|
1259
|
+
* @param {Buffer} data The data included in the ping frame
|
|
1260
|
+
* @private
|
|
1261
|
+
*/
|
|
1262
|
+
function receiverOnPing(data) {
|
|
1263
|
+
const websocket = this[kWebSocket];
|
|
1264
|
+
|
|
1265
|
+
if (websocket._autoPong) websocket.pong(data, !this._isServer, NOOP);
|
|
1266
|
+
websocket.emit('ping', data);
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
/**
|
|
1270
|
+
* The listener of the `Receiver` `'pong'` event.
|
|
1271
|
+
*
|
|
1272
|
+
* @param {Buffer} data The data included in the pong frame
|
|
1273
|
+
* @private
|
|
1274
|
+
*/
|
|
1275
|
+
function receiverOnPong(data) {
|
|
1276
|
+
this[kWebSocket].emit('pong', data);
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
/**
|
|
1280
|
+
* Resume a readable stream
|
|
1281
|
+
*
|
|
1282
|
+
* @param {Readable} stream The readable stream
|
|
1283
|
+
* @private
|
|
1284
|
+
*/
|
|
1285
|
+
function resume(stream) {
|
|
1286
|
+
stream.resume();
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
/**
|
|
1290
|
+
* The `Sender` error event handler.
|
|
1291
|
+
*
|
|
1292
|
+
* @param {Error} The error
|
|
1293
|
+
* @private
|
|
1294
|
+
*/
|
|
1295
|
+
function senderOnError(err) {
|
|
1296
|
+
const websocket = this[kWebSocket];
|
|
1297
|
+
|
|
1298
|
+
if (websocket.readyState === WebSocket.CLOSED) return;
|
|
1299
|
+
if (websocket.readyState === WebSocket.OPEN) {
|
|
1300
|
+
websocket._readyState = WebSocket.CLOSING;
|
|
1301
|
+
setCloseTimer(websocket);
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
//
|
|
1305
|
+
// `socket.end()` is used instead of `socket.destroy()` to allow the other
|
|
1306
|
+
// peer to finish sending queued data. There is no need to set a timer here
|
|
1307
|
+
// because `CLOSING` means that it is already set or not needed.
|
|
1308
|
+
//
|
|
1309
|
+
this._socket.end();
|
|
1310
|
+
|
|
1311
|
+
if (!websocket._errorEmitted) {
|
|
1312
|
+
websocket._errorEmitted = true;
|
|
1313
|
+
websocket.emit('error', err);
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
/**
|
|
1318
|
+
* Set a timer to destroy the underlying raw socket of a WebSocket.
|
|
1319
|
+
*
|
|
1320
|
+
* @param {WebSocket} websocket The WebSocket instance
|
|
1321
|
+
* @private
|
|
1322
|
+
*/
|
|
1323
|
+
function setCloseTimer(websocket) {
|
|
1324
|
+
websocket._closeTimer = setTimeout(
|
|
1325
|
+
websocket._socket.destroy.bind(websocket._socket),
|
|
1326
|
+
websocket._closeTimeout
|
|
1327
|
+
);
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
/**
|
|
1331
|
+
* The listener of the socket `'close'` event.
|
|
1332
|
+
*
|
|
1333
|
+
* @private
|
|
1334
|
+
*/
|
|
1335
|
+
function socketOnClose() {
|
|
1336
|
+
const websocket = this[kWebSocket];
|
|
1337
|
+
|
|
1338
|
+
this.removeListener('close', socketOnClose);
|
|
1339
|
+
this.removeListener('data', socketOnData);
|
|
1340
|
+
this.removeListener('end', socketOnEnd);
|
|
1341
|
+
|
|
1342
|
+
websocket._readyState = WebSocket.CLOSING;
|
|
1343
|
+
|
|
1344
|
+
//
|
|
1345
|
+
// The close frame might not have been received or the `'end'` event emitted,
|
|
1346
|
+
// for example, if the socket was destroyed due to an error. Ensure that the
|
|
1347
|
+
// `receiver` stream is closed after writing any remaining buffered data to
|
|
1348
|
+
// it. If the readable side of the socket is in flowing mode then there is no
|
|
1349
|
+
// buffered data as everything has been already written. If instead, the
|
|
1350
|
+
// socket is paused, any possible buffered data will be read as a single
|
|
1351
|
+
// chunk.
|
|
1352
|
+
//
|
|
1353
|
+
if (
|
|
1354
|
+
!this._readableState.endEmitted &&
|
|
1355
|
+
!websocket._closeFrameReceived &&
|
|
1356
|
+
!websocket._receiver._writableState.errorEmitted &&
|
|
1357
|
+
this._readableState.length !== 0
|
|
1358
|
+
) {
|
|
1359
|
+
const chunk = this.read(this._readableState.length);
|
|
1360
|
+
|
|
1361
|
+
websocket._receiver.write(chunk);
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
websocket._receiver.end();
|
|
1365
|
+
|
|
1366
|
+
this[kWebSocket] = undefined;
|
|
1367
|
+
|
|
1368
|
+
clearTimeout(websocket._closeTimer);
|
|
1369
|
+
|
|
1370
|
+
if (
|
|
1371
|
+
websocket._receiver._writableState.finished ||
|
|
1372
|
+
websocket._receiver._writableState.errorEmitted
|
|
1373
|
+
) {
|
|
1374
|
+
websocket.emitClose();
|
|
1375
|
+
} else {
|
|
1376
|
+
websocket._receiver.on('error', receiverOnFinish);
|
|
1377
|
+
websocket._receiver.on('finish', receiverOnFinish);
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
/**
|
|
1382
|
+
* The listener of the socket `'data'` event.
|
|
1383
|
+
*
|
|
1384
|
+
* @param {Buffer} chunk A chunk of data
|
|
1385
|
+
* @private
|
|
1386
|
+
*/
|
|
1387
|
+
function socketOnData(chunk) {
|
|
1388
|
+
if (!this[kWebSocket]._receiver.write(chunk)) {
|
|
1389
|
+
this.pause();
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
/**
|
|
1394
|
+
* The listener of the socket `'end'` event.
|
|
1395
|
+
*
|
|
1396
|
+
* @private
|
|
1397
|
+
*/
|
|
1398
|
+
function socketOnEnd() {
|
|
1399
|
+
const websocket = this[kWebSocket];
|
|
1400
|
+
|
|
1401
|
+
websocket._readyState = WebSocket.CLOSING;
|
|
1402
|
+
websocket._receiver.end();
|
|
1403
|
+
this.end();
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
/**
|
|
1407
|
+
* The listener of the socket `'error'` event.
|
|
1408
|
+
*
|
|
1409
|
+
* @private
|
|
1410
|
+
*/
|
|
1411
|
+
function socketOnError() {
|
|
1412
|
+
const websocket = this[kWebSocket];
|
|
1413
|
+
|
|
1414
|
+
this.removeListener('error', socketOnError);
|
|
1415
|
+
this.on('error', NOOP);
|
|
1416
|
+
|
|
1417
|
+
if (websocket) {
|
|
1418
|
+
websocket._readyState = WebSocket.CLOSING;
|
|
1419
|
+
this.destroy();
|
|
1420
|
+
}
|
|
1421
|
+
}
|