dfx 0.42.6 → 0.42.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,7 @@
1
1
  import * as tsplus_module_1 from "dfx/_common";
2
2
  import * as tsplus_module_2 from "@effect/io/Layer";
3
- import * as tsplus_module_3 from "@effect/data/Duration";
4
- import * as tsplus_module_4 from "@effect/io/Schedule";
5
- import * as tsplus_module_5 from "@effect/io/Effect";
6
- import * as tsplus_module_6 from "@effect/io/Ref";
3
+ import * as tsplus_module_3 from "@effect/io/Effect";
4
+ import * as tsplus_module_4 from "@effect/io/Ref";
7
5
  import { LiveWS, Reconnect, WS, } from "dfx/DiscordGateway/WS";
8
6
  export const DiscordWSCodec = tsplus_module_1.Tag();
9
7
  export const LiveJsonDiscordWSCodec = tsplus_module_2.succeed(DiscordWSCodec, {
@@ -11,14 +9,14 @@ export const LiveJsonDiscordWSCodec = tsplus_module_2.succeed(DiscordWSCodec, {
11
9
  encode: p => JSON.stringify(p),
12
10
  decode: p => JSON.parse(p.toString("utf8")),
13
11
  });
14
- const make = tsplus_module_5.flatMap(WS, ws => tsplus_module_5.map(DiscordWSCodec, encoding => {
15
- const connect = ({ url = "wss://gateway.discord.gg/", version = 10, outbound, onReconnect, }) => tsplus_module_5.flatMap(tsplus_module_6.make(`${url}?v=${version}&encoding=${encoding.type}`), urlRef => {
16
- const setUrl = (url) => tsplus_module_6.set(urlRef, `${url}?v=${version}&encoding=${encoding.type}`);
17
- const takeOutbound = tsplus_module_5.map(outbound, a => a === Reconnect ? a : encoding.encode(a));
18
- return tsplus_module_5.map(ws.connect(urlRef, takeOutbound, onReconnect), socket => {
19
- const take = tsplus_module_5.map(socket.take, encoding.decode);
20
- const run = tsplus_module_5.retry(socket.run, tsplus_module_4.whileInput(tsplus_module_4.fixed(tsplus_module_3.seconds(0.5)), (_) => (_._tag === "WebSocketCloseError" && _.code < 2000) ||
21
- (_._tag === "WebSocketError" && _.reason === "open-timeout")));
12
+ const make = tsplus_module_3.flatMap(WS, ws => tsplus_module_3.map(DiscordWSCodec, encoding => {
13
+ const connect = ({ url = "wss://gateway.discord.gg/", version = 10, outbound, onReconnect, }) => tsplus_module_3.flatMap(tsplus_module_4.make(`${url}?v=${version}&encoding=${encoding.type}`), urlRef => {
14
+ const setUrl = (url) => tsplus_module_4.set(urlRef, `${url}?v=${version}&encoding=${encoding.type}`);
15
+ const takeOutbound = tsplus_module_3.map(outbound, a => a === Reconnect ? a : encoding.encode(a));
16
+ return tsplus_module_3.map(ws.connect(urlRef, takeOutbound, onReconnect), socket => {
17
+ const take = tsplus_module_3.map(socket.take, encoding.decode);
18
+ const run = tsplus_module_3.retryWhile(socket.run, _ => (_._tag === "WebSocketCloseError" && _.code < 2000) ||
19
+ (_._tag === "WebSocketError" && _.reason === "open-timeout"));
22
20
  return {
23
21
  run,
24
22
  take,
@@ -29,5 +27,5 @@ const make = tsplus_module_5.flatMap(WS, ws => tsplus_module_5.map(DiscordWSCode
29
27
  return { connect };
30
28
  }));
31
29
  export const DiscordWS = tsplus_module_1.Tag();
32
- export const LiveDiscordWS = tsplus_module_2.provide(tsplus_module_5.toLayer(make, DiscordWS))(LiveWS);
30
+ export const LiveDiscordWS = tsplus_module_2.provide(tsplus_module_3.toLayer(make, DiscordWS))(LiveWS);
33
31
  //# sourceMappingURL=DiscordWS.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DiscordWS.js","sourceRoot":"","sources":["../src/DiscordGateway/DiscordWS.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,MAAM,EACN,SAAS,EACT,EAAE,GAGH,MAAM,uBAAuB,CAAA;AAkB9B,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAA,GAAG,EAAkB,CAAA;AACnD,MAAM,CAAC,MAAM,sBAAsB,GAAG,wBAAc,cAAc,EAAE;IAClE,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS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YAAY,GAAG,oBAAA,QAAQ,EAAK,CAAC,CAAC,EAAE,CACpC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CACzC,CAAA;mCACgB,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,YAAY,EAAE,WAAW,CAAC,EAAxD,MAAM;YACZ,MAAM,IAAI,GAAG,oBAAA,MAAM,CAAC,IAAI,EAAK,QAAQ,CAAC,MAAM,CAAC,CAAA;YAE7C,MAAM,GAAG,GAAG,2BAAA,MAAM,CAAC,GAAG,EACpB,CAAC,CAAC,EAAE,CACF,CAAC,CAAC,CAAC,IAAI,KAAK,qBAAqB,IAAI,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC;gBACnD,CAAC,CAAC,CAAC,IAAI,KAAK,gBAAgB,IAAI,CAAC,CAAC,MAAM,KAAK,cAAc,CAAC,CAC/D,CAAA;YAED,OAAO;gBACL,GAAG;gBACH,IAAI;gBACJ,MAAM;aACE,CAAA;;MACV,CAAA;IAEJ,OAAO,EAAE,OAAO,EAAW,CAAA;GAC3B,CAAA;AAGF,MAAM,CAAC,MAAM,SAAS,GAAG,gBAAA,GAAG,EAAa,CAAA;AACzC,MAAM,CAAC,MAAM,aAAa,2BAAa,wBAAA,IAAI,EAAS,SAAS,CAAC,EAAjC,MAAM,CAA2B,CAAA"}
package/DiscordREST.d.ts CHANGED
@@ -1,197 +1,16 @@
1
1
  import { Effect, Discord } from "dfx/_common";
2
2
  import * as Http from "@effect-http/client";
3
3
  import { DiscordConfig } from "./DiscordConfig.js";
4
- import { ResponseWithData, RestResponse } from "./DiscordREST/types.js";
4
+ import { ResponseWithData } from "./DiscordREST/types.js";
5
5
  import { Log } from "./Log.js";
6
- import { RateLimitStore, RateLimiter } from "./RateLimit.js";
6
+ import { RateLimitStore } from "./RateLimit.js";
7
7
  export declare class DiscordRESTError {
8
8
  readonly error: Http.HttpClientError;
9
9
  readonly _tag = "DiscordRESTError";
10
10
  constructor(error: Http.HttpClientError);
11
11
  }
12
- declare const make: import("@effect/io/Effect").Effect<DiscordConfig | Log | RateLimitStore | RateLimiter | Http.HttpRequestExecutor, never, {
13
- addGuildMember: (guildId: string, userId: string, params?: Partial<import("./types.js").AddGuildMemberParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildMember>;
14
- addGuildMemberRole: (guildId: string, userId: string, roleId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
15
- addThreadMember: (channelId: string, userId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
16
- batchEditApplicationCommandPermissions: (applicationId: string, guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
17
- beginGuildPrune: (guildId: string, params?: Partial<import("./types.js").BeginGuildPruneParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
18
- bulkDeleteMessages: (channelId: string, params?: Partial<import("./types.js").BulkDeleteMessageParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
19
- bulkOverwriteGlobalApplicationCommands: (applicationId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").ApplicationCommand[]>;
20
- bulkOverwriteGuildApplicationCommands: (applicationId: string, guildId: string, params?: Partial<import("./types.js").BulkOverwriteGuildApplicationCommandParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").ApplicationCommand[]>;
21
- createAutoModerationRule: (guildId: string, params?: Partial<import("./types.js").CreateAutoModerationRuleParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").AutoModerationRule>;
22
- createChannelInvite: (channelId: string, params?: Partial<import("./types.js").CreateChannelInviteParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Invite>;
23
- createDm: (params?: Partial<import("./types.js").CreateDmParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Channel>;
24
- createFollowupMessage: (applicationId: string, interactionToken: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
25
- createGlobalApplicationCommand: (applicationId: string, params?: Partial<import("./types.js").CreateGlobalApplicationCommandParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").ApplicationCommand>;
26
- createGroupDm: (params?: Partial<import("./types.js").CreateGroupDmParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Channel>;
27
- createGuild: (params?: Partial<import("./types.js").CreateGuildParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Guild>;
28
- createGuildApplicationCommand: (applicationId: string, guildId: string, params?: Partial<import("./types.js").CreateGuildApplicationCommandParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").ApplicationCommand>;
29
- createGuildBan: (guildId: string, userId: string, params?: Partial<import("./types.js").CreateGuildBanParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
30
- createGuildChannel: (guildId: string, params?: Partial<import("./types.js").CreateGuildChannelParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Channel>;
31
- createGuildEmoji: (guildId: string, params?: Partial<import("./types.js").CreateGuildEmojiParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Emoji>;
32
- createGuildFromGuildTemplate: (templateCode: string, params?: Partial<import("./types.js").CreateGuildFromGuildTemplateParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Guild>;
33
- createGuildRole: (guildId: string, params?: Partial<import("./types.js").CreateGuildRoleParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Role>;
34
- createGuildScheduledEvent: (guildId: string, params?: Partial<import("./types.js").CreateGuildScheduledEventParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildScheduledEvent>;
35
- createGuildSticker: (guildId: string, params?: Partial<import("./types.js").CreateGuildStickerParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Sticker>;
36
- createGuildTemplate: (guildId: string, params?: Partial<import("./types.js").CreateGuildTemplateParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildTemplate>;
37
- createInteractionResponse: (interactionId: string, interactionToken: string, params?: Partial<import("./types.js").InteractionResponse> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").InteractionResponse>;
38
- createMessage: (channelId: string, params?: Partial<import("./types.js").CreateMessageParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Message>;
39
- createReaction: (channelId: string, messageId: string, emoji: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
40
- createStageInstance: (params?: Partial<import("./types.js").CreateStageInstanceParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").StageInstance>;
41
- createWebhook: (channelId: string, params?: Partial<import("./types.js").CreateWebhookParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Webhook>;
42
- crosspostMessage: (channelId: string, messageId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Message>;
43
- deleteAllReactions: (channelId: string, messageId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
44
- deleteAllReactionsForEmoji: (channelId: string, messageId: string, emoji: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
45
- deleteAutoModerationRule: (guildId: string, autoModerationRuleId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
46
- deleteChannelPermission: (channelId: string, overwriteId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
47
- deletecloseChannel: (channelId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Channel>;
48
- deleteFollowupMessage: (applicationId: string, interactionToken: string, messageId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
49
- deleteGlobalApplicationCommand: (applicationId: string, commandId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
50
- deleteGuild: (guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
51
- deleteGuildApplicationCommand: (applicationId: string, guildId: string, commandId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
52
- deleteGuildEmoji: (guildId: string, emojiId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
53
- deleteGuildIntegration: (guildId: string, integrationId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
54
- deleteGuildRole: (guildId: string, roleId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
55
- deleteGuildScheduledEvent: (guildId: string, guildScheduledEventId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
56
- deleteGuildSticker: (guildId: string, stickerId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
57
- deleteGuildTemplate: (guildId: string, templateCode: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildTemplate>;
58
- deleteInvite: (inviteCode: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Invite>;
59
- deleteMessage: (channelId: string, messageId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
60
- deleteOriginalInteractionResponse: (applicationId: string, interactionToken: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
61
- deleteOwnReaction: (channelId: string, messageId: string, emoji: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
62
- deleteStageInstance: (channelId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
63
- deleteUserReaction: (channelId: string, messageId: string, emoji: string, userId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
64
- deleteWebhook: (webhookId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
65
- deleteWebhookMessage: (webhookId: string, webhookToken: string, messageId: string, params?: Partial<import("./types.js").DeleteWebhookMessageParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
66
- deleteWebhookWithToken: (webhookId: string, webhookToken: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
67
- editApplicationCommandPermissions: (applicationId: string, guildId: string, commandId: string, params?: Partial<import("./types.js").EditApplicationCommandPermissionParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildApplicationCommandPermission>;
68
- editChannelPermissions: (channelId: string, overwriteId: string, params?: Partial<import("./types.js").EditChannelPermissionParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
69
- editFollowupMessage: (applicationId: string, interactionToken: string, messageId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
70
- editGlobalApplicationCommand: (applicationId: string, commandId: string, params?: Partial<import("./types.js").EditGlobalApplicationCommandParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").ApplicationCommand>;
71
- editGuildApplicationCommand: (applicationId: string, guildId: string, commandId: string, params?: Partial<import("./types.js").EditGuildApplicationCommandParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").ApplicationCommand>;
72
- editMessage: (channelId: string, messageId: string, params?: Partial<import("./types.js").EditMessageParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Message>;
73
- editOriginalInteractionResponse: (applicationId: string, interactionToken: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
74
- editWebhookMessage: (webhookId: string, webhookToken: string, messageId: string, params?: Partial<import("./types.js").EditWebhookMessageParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Message>;
75
- executeGitHubCompatibleWebhook: (webhookId: string, webhookToken: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
76
- executeSlackCompatibleWebhook: (webhookId: string, webhookToken: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
77
- executeWebhook: (webhookId: string, webhookToken: string, params?: Partial<import("./types.js").ExecuteWebhookParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
78
- followAnnouncementChannel: (channelId: string, params?: Partial<import("./types.js").FollowAnnouncementChannelParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").FollowedChannel>;
79
- getApplicationCommandPermissions: (applicationId: string, guildId: string, commandId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildApplicationCommandPermission>;
80
- getApplicationRoleConnectionMetadataRecords: (applicationId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").ApplicationRoleConnectionMetadatum[]>;
81
- getAutoModerationRule: (guildId: string, autoModerationRuleId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").AutoModerationRule>;
82
- getChannel: (channelId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Channel>;
83
- getChannelInvites: (channelId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Invite[]>;
84
- getChannelMessage: (channelId: string, messageId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Message>;
85
- getChannelMessages: (channelId: string, params?: Partial<import("./types.js").GetChannelMessageParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Message[]>;
86
- getChannelWebhooks: (channelId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Webhook[]>;
87
- getCurrentAuthorizationInformation: (options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GetCurrentAuthorizationInformationResponse>;
88
- getCurrentBotApplicationInformation: (options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Application>;
89
- getCurrentUser: (options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").User>;
90
- getCurrentUserGuildMember: (guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildMember>;
91
- getCurrentUserGuilds: (params?: Partial<import("./types.js").GetCurrentUserGuildParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Guild[]>;
92
- getFollowupMessage: (applicationId: string, interactionToken: string, messageId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
93
- getGateway: (options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
94
- getGatewayBot: (options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GetGatewayBotResponse>;
95
- getGlobalApplicationCommand: (applicationId: string, commandId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").ApplicationCommand>;
96
- getGlobalApplicationCommands: (applicationId: string, params?: Partial<import("./types.js").GetGlobalApplicationCommandParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").ApplicationCommand[]>;
97
- getGuild: (guildId: string, params?: Partial<import("./types.js").GetGuildParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Guild>;
98
- getGuildApplicationCommand: (applicationId: string, guildId: string, commandId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").ApplicationCommand>;
99
- getGuildApplicationCommandPermissions: (applicationId: string, guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildApplicationCommandPermission[]>;
100
- getGuildApplicationCommands: (applicationId: string, guildId: string, params?: Partial<import("./types.js").GetGuildApplicationCommandParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").ApplicationCommand[]>;
101
- getGuildAuditLog: (guildId: string, params?: Partial<import("./types.js").GetGuildAuditLogParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").AuditLog>;
102
- getGuildBan: (guildId: string, userId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Ban>;
103
- getGuildBans: (guildId: string, params?: Partial<import("./types.js").GetGuildBanParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Ban[]>;
104
- getGuildChannels: (guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Channel[]>;
105
- getGuildEmoji: (guildId: string, emojiId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Emoji>;
106
- getGuildIntegrations: (guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Integration[]>;
107
- getGuildInvites: (guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Invite[]>;
108
- getGuildMember: (guildId: string, userId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildMember>;
109
- getGuildOnboarding: (guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildOnboarding>;
110
- getGuildPreview: (guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildPreview>;
111
- getGuildPruneCount: (guildId: string, params?: Partial<import("./types.js").GetGuildPruneCountParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
112
- getGuildRoles: (guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Role[]>;
113
- getGuildScheduledEvent: (guildId: string, guildScheduledEventId: string, params?: Partial<import("./types.js").GetGuildScheduledEventParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildScheduledEvent>;
114
- getGuildScheduledEventUsers: (guildId: string, guildScheduledEventId: string, params?: Partial<import("./types.js").GetGuildScheduledEventUserParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildScheduledEventUser[]>;
115
- getGuildSticker: (guildId: string, stickerId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Sticker>;
116
- getGuildTemplate: (templateCode: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildTemplate>;
117
- getGuildTemplates: (guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildTemplate[]>;
118
- getGuildVanityUrl: (guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Invite>;
119
- getGuildVoiceRegions: (guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").VoiceRegion[]>;
120
- getGuildWebhooks: (guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Webhook[]>;
121
- getGuildWelcomeScreen: (guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").WelcomeScreen>;
122
- getGuildWidget: (guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildWidget>;
123
- getGuildWidgetImage: (guildId: string, params?: Partial<import("./types.js").GetGuildWidgetImageParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
124
- getGuildWidgetSettings: (guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildWidgetSetting>;
125
- getInvite: (inviteCode: string, params?: Partial<import("./types.js").GetInviteParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Invite>;
126
- getOriginalInteractionResponse: (applicationId: string, interactionToken: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
127
- getPinnedMessages: (channelId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Message[]>;
128
- getReactions: (channelId: string, messageId: string, emoji: string, params?: Partial<import("./types.js").GetReactionParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").User[]>;
129
- getStageInstance: (channelId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
130
- getSticker: (stickerId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Sticker>;
131
- getThreadMember: (channelId: string, userId: string, params?: Partial<import("./types.js").GetThreadMemberParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").ThreadMember>;
132
- getUser: (userId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").User>;
133
- getUserApplicationRoleConnection: (applicationId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").ApplicationRoleConnection>;
134
- getUserConnections: (options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Connection[]>;
135
- getWebhook: (webhookId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Webhook>;
136
- getWebhookMessage: (webhookId: string, webhookToken: string, messageId: string, params?: Partial<import("./types.js").GetWebhookMessageParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Message>;
137
- getWebhookWithToken: (webhookId: string, webhookToken: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
138
- groupDmAddRecipient: (channelId: string, userId: string, params?: Partial<import("./types.js").GroupDmAddRecipientParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
139
- groupDmRemoveRecipient: (channelId: string, userId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
140
- joinThread: (channelId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
141
- leaveGuild: (guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
142
- leaveThread: (channelId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
143
- listActiveGuildThreads: (guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").ListActiveGuildThreadResponse>;
144
- listAutoModerationRulesForGuild: (guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").AutoModerationRule[]>;
145
- listGuildEmojis: (guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Emoji[]>;
146
- listGuildMembers: (guildId: string, params?: Partial<import("./types.js").ListGuildMemberParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildMember[]>;
147
- listGuildStickers: (guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Sticker[]>;
148
- listJoinedPrivateArchivedThreads: (channelId: string, params?: Partial<import("./types.js").ListJoinedPrivateArchivedThreadParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").ListJoinedPrivateArchivedThreadResponse>;
149
- listNitroStickerPacks: (options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
150
- listPrivateArchivedThreads: (channelId: string, params?: Partial<import("./types.js").ListPrivateArchivedThreadParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").ListPrivateArchivedThreadResponse>;
151
- listPublicArchivedThreads: (channelId: string, params?: Partial<import("./types.js").ListPublicArchivedThreadParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").ListPublicArchivedThreadResponse>;
152
- listScheduledEventsForGuild: (guildId: string, params?: Partial<import("./types.js").ListScheduledEventsForGuildParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildScheduledEvent[]>;
153
- listThreadMembers: (channelId: string, params?: Partial<import("./types.js").ListThreadMemberParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").ThreadMember[]>;
154
- listVoiceRegions: (options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").VoiceRegion[]>;
155
- modifyAutoModerationRule: (guildId: string, autoModerationRuleId: string, params?: Partial<import("./types.js").ModifyAutoModerationRuleParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").AutoModerationRule>;
156
- modifyChannel: (channelId: string, params?: Partial<import("./types.js").ModifyChannelParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Channel>;
157
- modifyCurrentMember: (guildId: string, params?: Partial<import("./types.js").ModifyCurrentMemberParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
158
- modifyCurrentUser: (params?: Partial<import("./types.js").ModifyCurrentUserParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").User>;
159
- modifyCurrentUserNick: (guildId: string, params?: Partial<import("./types.js").ModifyCurrentUserNickParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
160
- modifyCurrentUserVoiceState: (guildId: string, params?: Partial<import("./types.js").ModifyCurrentUserVoiceStateParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
161
- modifyGuild: (guildId: string, params?: Partial<import("./types.js").ModifyGuildParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Guild>;
162
- modifyGuildChannelPositions: (guildId: string, params?: Partial<import("./types.js").ModifyGuildChannelPositionParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
163
- modifyGuildEmoji: (guildId: string, emojiId: string, params?: Partial<import("./types.js").ModifyGuildEmojiParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Emoji>;
164
- modifyGuildMember: (guildId: string, userId: string, params?: Partial<import("./types.js").ModifyGuildMemberParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildMember>;
165
- modifyGuildMfaLevel: (guildId: string, params?: Partial<import("./types.js").ModifyGuildMfaLevelParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").MfaLevel>;
166
- modifyGuildRole: (guildId: string, roleId: string, params?: Partial<import("./types.js").ModifyGuildRoleParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Role>;
167
- modifyGuildRolePositions: (guildId: string, params?: Partial<import("./types.js").ModifyGuildRolePositionParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Role[]>;
168
- modifyGuildScheduledEvent: (guildId: string, guildScheduledEventId: string, params?: Partial<import("./types.js").ModifyGuildScheduledEventParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildScheduledEvent>;
169
- modifyGuildSticker: (guildId: string, stickerId: string, params?: Partial<import("./types.js").ModifyGuildStickerParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Sticker>;
170
- modifyGuildTemplate: (guildId: string, templateCode: string, params?: Partial<import("./types.js").ModifyGuildTemplateParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildTemplate>;
171
- modifyGuildWelcomeScreen: (guildId: string, params?: Partial<import("./types.js").ModifyGuildWelcomeScreenParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").WelcomeScreen>;
172
- modifyGuildWidget: (guildId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildWidgetSetting>;
173
- modifyStageInstance: (channelId: string, params?: Partial<import("./types.js").ModifyStageInstanceParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").StageInstance>;
174
- modifyUserVoiceState: (guildId: string, userId: string, params?: Partial<import("./types.js").ModifyUserVoiceStateParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
175
- modifyWebhook: (webhookId: string, params?: Partial<import("./types.js").ModifyWebhookParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Webhook>;
176
- modifyWebhookWithToken: (webhookId: string, webhookToken: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
177
- pinMessage: (channelId: string, messageId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
178
- removeGuildBan: (guildId: string, userId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
179
- removeGuildMember: (guildId: string, userId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
180
- removeGuildMemberRole: (guildId: string, userId: string, roleId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
181
- removeThreadMember: (channelId: string, userId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
182
- searchGuildMembers: (guildId: string, params?: Partial<import("./types.js").SearchGuildMemberParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildMember[]>;
183
- startThreadFromMessage: (channelId: string, messageId: string, params?: Partial<import("./types.js").StartThreadFromMessageParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Channel>;
184
- startThreadInForumChannel: (channelId: string, params?: Partial<import("./types.js").StartThreadInForumChannelParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Channel>;
185
- startThreadWithoutMessage: (channelId: string, params?: Partial<import("./types.js").StartThreadWithoutMessageParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").Channel>;
186
- syncGuildTemplate: (guildId: string, templateCode: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").GuildTemplate>;
187
- triggerTypingIndicator: (channelId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
188
- unpinMessage: (channelId: string, messageId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<any>;
189
- updateApplicationRoleConnectionMetadataRecords: (applicationId: string, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").ApplicationRoleConnectionMetadatum[]>;
190
- updateUserApplicationRoleConnection: (applicationId: string, params?: Partial<import("./types.js").UpdateUserApplicationRoleConnectionParams> | undefined, options?: Partial<Http.MakeOptions> | undefined) => RestResponse<import("./types.js").ApplicationRoleConnection>;
191
- executor: <A = unknown>(request: Http.Request) => import("@effect/io/Effect").Effect<never, DiscordRESTError, ResponseWithData<A>>;
192
- }>;
193
- export interface DiscordREST extends Effect.Success<typeof make> {
12
+ export interface DiscordREST extends Discord.Endpoints<Partial<Http.MakeOptions>> {
13
+ readonly executor: <A = unknown>(request: Http.Request) => Effect<never, DiscordRESTError, ResponseWithData<A>>;
194
14
  }
195
15
  export declare const DiscordREST: import("@effect/data/Context").Tag<DiscordREST, DiscordREST>;
196
16
  export declare const LiveDiscordREST: import("@effect-http/client/_common").Layer<DiscordConfig | Log | RateLimitStore | Http.HttpRequestExecutor, never, DiscordREST>;
197
- export {};
package/DiscordREST.js CHANGED
@@ -112,7 +112,10 @@ const make = tsplus_module_3.flatMap(DiscordConfig, ({ token, rest }) => tsplus_
112
112
  }
113
113
  return executor(request);
114
114
  });
115
- return { executor, ...routes };
115
+ return {
116
+ ...routes,
117
+ executor,
118
+ };
116
119
  });
117
120
  })))));
118
121
  export const DiscordREST = tsplus_module_2.Tag();
@@ -1 +1 @@
1
- {"version":3,"file":"DiscordREST.js","sourceRoot":"","sources":["src/DiscordREST.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,KAAK,IAAI,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,OAAO,EACL,oBAAoB,EACpB,UAAU,EACV,eAAe,GAChB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAEL,eAAe,EACf,cAAc,EACd,WAAW,GACZ,MAAM,gBAAgB,CAAA;AACvB,OAAO,GAAG,MAAM,gBAAgB,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AAExD,MAAM,OAAO,gBAAgB;IAEN;IADZ,IAAI,GAAG,kBAAkB,CAAA;IAClC,YAAqB,KAA2B;QAA3B,UAAK,GAAL,KAAK,CAAsB;IAAG,CAAC;CACrD;AAED,MAAM,IAAI,2BACkB,aAAa,GAAjC,EAAE,KAAK,EAAE,IAAI,EAAE,6BAEN,IAAI,CAAC,mBAAmB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AA;aACxE;iBAAM,IAAI,MAAM,EAAE;gBACjB,OAAO,GAAG,yBAAA,OAAO,EAAU,MAAM,CAAC,CAAA;aACnC;YAED,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAA;QAC1B,CAAC,CACF,CAAA;QAED,OAAO;YACL,GAAG,MAAM;YACT,QAAQ;SACT,CAAA;;MACD,CAAA;AASF,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAA,GAAG,EAAe,CAAA;AAC7C,MAAM,CAAC,MAAM,eAAe,4BACP,wBAAa,WAAW,EAAE,IAAI,CAAC,EAAlD,eAAe,CAAmC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dfx",
3
- "version": "0.42.6",
3
+ "version": "0.42.8",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -48,5 +48,5 @@
48
48
  "ws": "^8.13.0"
49
49
  },
50
50
  "sideEffects": false,
51
- "gitHead": "e2c2735d0cc2e6e0aa38477a22becfd795cd24c3"
51
+ "gitHead": "ef6ca3dc83354e9ac53922de77a582957a94ee61"
52
52
  }
@@ -51,12 +51,10 @@ const make = Do($ => {
51
51
  const socket = $(ws.connect(urlRef, takeOutbound, onReconnect))
52
52
  const take = socket.take.map(encoding.decode)
53
53
 
54
- const run = socket.run.retry(
55
- Schedule.fixed(Duration.seconds(0.5)).whileInput(
56
- (_: WebSocketError | WebSocketCloseError) =>
57
- (_._tag === "WebSocketCloseError" && _.code < 2000) ||
58
- (_._tag === "WebSocketError" && _.reason === "open-timeout"),
59
- ),
54
+ const run = socket.run.retryWhile(
55
+ _ =>
56
+ (_._tag === "WebSocketCloseError" && _.code < 2000) ||
57
+ (_._tag === "WebSocketError" && _.reason === "open-timeout"),
60
58
  )
61
59
 
62
60
  return {
@@ -194,10 +194,19 @@ const make = Do($ => {
194
194
  },
195
195
  )
196
196
 
197
- return { executor, ...routes }
197
+ return {
198
+ ...routes,
199
+ executor,
200
+ }
198
201
  })
199
202
 
200
- export interface DiscordREST extends Effect.Success<typeof make> {}
203
+ export interface DiscordREST
204
+ extends Discord.Endpoints<Partial<Http.MakeOptions>> {
205
+ readonly executor: <A = unknown>(
206
+ request: Http.Request,
207
+ ) => Effect<never, DiscordRESTError, ResponseWithData<A>>
208
+ }
209
+
201
210
  export const DiscordREST = Tag<DiscordREST>()
202
211
  export const LiveDiscordREST =
203
212
  LiveRateLimiter >> Layer.effect(DiscordREST, make)
package/src/package.json DELETED
@@ -1,52 +0,0 @@
1
- {
2
- "name": "dfx",
3
- "version": "0.42.6",
4
- "type": "module",
5
- "publishConfig": {
6
- "access": "public",
7
- "directory": "dist"
8
- },
9
- "description": "Effect-TS discord library",
10
- "author": "Tim Smart <hello@timsmart.co>",
11
- "repository": {
12
- "type": "git",
13
- "url": "https://github.com/tim-smart/dfx.git"
14
- },
15
- "license": "MIT",
16
- "scripts": {
17
- "prepublishOnly": "make build",
18
- "types": "discord-api-codegen ./discord-api-docs -l typescript -o 'imports=RestResponse|dfx/DiscordREST/types' 'endpointReturnType=RestResponse' > src/types.ts && prettier -w src/types.ts"
19
- },
20
- "exports": {
21
- ".": "./index.js",
22
- "./gateway": "./gateway.js",
23
- "./webhooks": "./webhooks.js",
24
- "./*": "./*.js"
25
- },
26
- "devDependencies": {
27
- "@tim-smart/discord-api-docs-parser": "^0.5.2",
28
- "@tsplus-types/effect__data": "0.12.2-3b576ba",
29
- "@tsplus-types/effect__io": "0.25.8-3b576ba",
30
- "@tsplus-types/effect__stream": "0.21.1-3b576ba",
31
- "@types/ws": "^8.5.4",
32
- "dotenv": "^16.0.3",
33
- "lerna": "^6.6.1",
34
- "madge": "^6.0.0",
35
- "typescript": "https://cdn.jsdelivr.net/npm/@tsplus/installer@0.0.171/compiler/typescript.tgz"
36
- },
37
- "dependencies": {
38
- "@effect-http/client": "^0.24.2",
39
- "@effect/data": "^0.12.2",
40
- "@effect/io": "~0.25.8",
41
- "@effect/stream": "~0.21.1",
42
- "tweetnacl": "^1.0.3"
43
- },
44
- "optionalDependencies": {
45
- "bufferutil": "^4.0.7",
46
- "isomorphic-ws": "^5.0.0",
47
- "utf-8-validate": "^6.0.3",
48
- "ws": "^8.13.0"
49
- },
50
- "sideEffects": false,
51
- "gitHead": "e2c2735d0cc2e6e0aa38477a22becfd795cd24c3"
52
- }