@discordeno/gateway 19.0.0-next.e2d86ea → 19.0.0-next.e30e5a2

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,8 +1,7 @@
1
- import type { AtLeastOne, BigString, Camelize, DiscordGatewayPayload, DiscordMember, RequestGuildMembers } from '@discordeno/types';
2
- import { Collection, LeakyBucket } from '@discordeno/utils';
3
- import WebSocket from 'ws';
4
- import type { RequestMemberRequest } from './manager.js';
5
- import type { BotStatusUpdate, ShardEvents, ShardGatewayConfig, ShardHeart, ShardSocketRequest, StatusUpdate, UpdateVoiceState } from './types.js';
1
+ import type { DiscordGatewayPayload } from '@discordeno/types';
2
+ import { LeakyBucket, logger } from '@discordeno/utils';
3
+ import NodeWebSocket from 'ws';
4
+ import type { BotStatusUpdate, ShardEvents, ShardGatewayConfig, ShardHeart, ShardSocketRequest } from './types.js';
6
5
  import { ShardState } from './types.js';
7
6
  export declare class DiscordenoShard {
8
7
  /** The id of the shard */
@@ -20,7 +19,7 @@ export declare class DiscordenoShard {
20
19
  /** Current session id of the shard if present. */
21
20
  sessionId?: string;
22
21
  /** This contains the WebSocket connection to Discord, if currently connected. */
23
- socket?: WebSocket;
22
+ socket?: NodeWebSocket;
24
23
  /** Current internal state of the this. */
25
24
  state: ShardState;
26
25
  /** The url provided by discord to use when resuming a connection for this this. */
@@ -33,22 +32,12 @@ export declare class DiscordenoShard {
33
32
  resolves: Map<"READY" | "RESUMED" | "INVALID_SESSION", (payload: DiscordGatewayPayload) => void>;
34
33
  /** Shard bucket. Only access this if you know what you are doing. Bucket for handling shard request rate limits. */
35
34
  bucket: LeakyBucket;
36
- /** This managers cache related settings. */
37
- cache: {
38
- requestMembers: {
39
- /**
40
- * Whether or not request member requests should be cached.
41
- * @default false
42
- */
43
- enabled: boolean;
44
- /** The pending requests. */
45
- pending: Collection<string, RequestMemberRequest>;
46
- };
47
- };
35
+ /** Logger for the bucket */
36
+ logger: Pick<typeof logger, 'debug' | 'info' | 'warn' | 'error' | 'fatal'>;
48
37
  constructor(options: ShardCreateOptions);
49
38
  /** The gateway configuration which is used to connect to Discord. */
50
39
  get gatewayConfig(): ShardGatewayConfig;
51
- /** The url to connect to. Intially this is the discord gateway url, and then is switched to resume gateway url once a READY is received. */
40
+ /** The url to connect to. Initially this is the discord gateway url, and then is switched to resume gateway url once a READY is received. */
52
41
  get connectionUrl(): string;
53
42
  /** Calculate the amount of requests which can safely be made per rate limit interval, before the gateway gets disconnected due to an exceeded rate limit. */
54
43
  calculateSafeRequests(): number;
@@ -70,12 +59,12 @@ export declare class DiscordenoShard {
70
59
  /** Shutdown the this. Forcefully disconnect the shard from Discord. The shard may not attempt to reconnect with Discord. */
71
60
  shutdown(): Promise<void>;
72
61
  /** Handle a gateway connection close. */
73
- handleClose(close: WebSocket.CloseEvent): Promise<void>;
62
+ handleClose(close: NodeWebSocket.CloseEvent): Promise<void>;
74
63
  /** Handles a incoming gateway packet. */
75
64
  handleDiscordPacket(packet: DiscordGatewayPayload): Promise<void>;
76
65
  forwardToBot(packet: DiscordGatewayPayload): void;
77
66
  /** Handle an incoming gateway message. */
78
- handleMessage(message: WebSocket.MessageEvent): Promise<void>;
67
+ handleMessage(message: NodeWebSocket.MessageEvent): Promise<void>;
79
68
  /**
80
69
  * Override in order to make the shards presence.
81
70
  * async in case devs create the presence based on eg. database values.
@@ -90,74 +79,6 @@ export declare class DiscordenoShard {
90
79
  startHeartbeating(interval: number): void;
91
80
  /** Stop the heartbeating process with discord. */
92
81
  stopHeartbeating(): void;
93
- /**
94
- * Connects the bot user to a voice or stage channel.
95
- *
96
- * This function sends the _Update Voice State_ gateway command over the gateway behind the scenes.
97
- *
98
- * @param guildId - The ID of the guild the voice channel to leave is in.
99
- * @param channelId - The ID of the channel you want to join.
100
- *
101
- * @remarks
102
- * Requires the `CONNECT` permission.
103
- *
104
- * Fires a _Voice State Update_ gateway event.
105
- *
106
- * @see {@link https://discord.com/developers/docs/topics/gateway#update-voice-state}
107
- */
108
- joinVoiceChannel(guildId: BigString, channelId: BigString, options?: AtLeastOne<Omit<UpdateVoiceState, 'guildId' | 'channelId'>>): Promise<void>;
109
- /**
110
- * Edits the bot status in all shards that this gateway manages.
111
- *
112
- * @param data The status data to set the bots status to.
113
- * @returns Promise<void>
114
- */
115
- editBotStatus(data: StatusUpdate): Promise<void>;
116
- /**
117
- * Edits the bot's status on one shard.
118
- *
119
- * @param shardId The shard id to edit the status for.
120
- * @param data The status data to set the bots status to.
121
- * @returns Promise<void>
122
- */
123
- editShardStatus(data: StatusUpdate): Promise<void>;
124
- /**
125
- * Fetches the list of members for a guild over the gateway.
126
- *
127
- * @param guildId - The ID of the guild to get the list of members for.
128
- * @param options - The parameters for the fetching of the members.
129
- *
130
- * @remarks
131
- * If requesting the entire member list:
132
- * - Requires the `GUILD_MEMBERS` intent.
133
- *
134
- * If requesting presences ({@link RequestGuildMembers.presences | presences} set to `true`):
135
- * - Requires the `GUILD_PRESENCES` intent.
136
- *
137
- * If requesting a prefix ({@link RequestGuildMembers.query | query} non-`undefined`):
138
- * - Returns a maximum of 100 members.
139
- *
140
- * If requesting a users by ID ({@link RequestGuildMembers.userIds | userIds} non-`undefined`):
141
- * - Returns a maximum of 100 members.
142
- *
143
- * Fires a _Guild Members Chunk_ gateway event for every 1000 members fetched.
144
- *
145
- * @see {@link https://discord.com/developers/docs/topics/gateway#request-guild-members}
146
- */
147
- requestMembers(guildId: BigString, options?: Omit<RequestGuildMembers, 'guildId'>): Promise<Camelize<DiscordMember[]>>;
148
- /**
149
- * Leaves the voice channel the bot user is currently in.
150
- *
151
- * This function sends the _Update Voice State_ gateway command over the gateway behind the scenes.
152
- *
153
- * @param guildId - The ID of the guild the voice channel to leave is in.
154
- *
155
- * @remarks
156
- * Fires a _Voice State Update_ gateway event.
157
- *
158
- * @see {@link https://discord.com/developers/docs/topics/gateway#update-voice-state}
159
- */
160
- leaveVoiceChannel(guildId: BigString): Promise<void>;
161
82
  }
162
83
  export interface ShardCreateOptions {
163
84
  /** The shard id */
@@ -166,6 +87,8 @@ export interface ShardCreateOptions {
166
87
  connection: ShardGatewayConfig;
167
88
  /** The event handlers for events on the shard. */
168
89
  events: ShardEvents;
90
+ /** The logger for the shard */
91
+ logger?: Pick<typeof logger, 'debug' | 'info' | 'warn' | 'error' | 'fatal'>;
169
92
  /** The handler to request a space to make an identify request. */
170
93
  requestIdentify?: () => Promise<void>;
171
94
  /** The handler to alert the gateway manager that this shard has received a READY event. */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shard.d.ts","sourceRoot":"","sources":["../../src/Shard.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAA8B,MAAM,mBAAmB,CAAA;AAE1F,OAAO,EAAE,WAAW,EAAmB,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAExE,OAAO,aAAa,MAAM,IAAI,CAAA;AAC9B,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,kBAAkB,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAClH,OAAO,EAAyB,UAAU,EAAE,MAAM,YAAY,CAAA;AAI9D,qBAAa,eAAe;IAC1B,0BAA0B;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,qFAAqF;IACrF,UAAU,EAAE,kBAAkB,CAAA;IAC9B,kDAAkD;IAClD,KAAK,EAAE,UAAU,CAAA;IACjB,4HAA4H;IAC5H,2BAA2B,EAAE,MAAM,CAAM;IACzC,4CAA4C;IAC5C,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAO;IAC5C,8EAA8E;IAC9E,sBAAsB,EAAE,MAAM,CAAQ;IACtC,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iFAAiF;IACjF,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,0CAA0C;IAC1C,KAAK,aAAqB;IAC1B,mFAAmF;IACnF,gBAAgB,EAAE,MAAM,CAAK;IAC7B,wCAAwC;IACx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GAAG,OAAO,CAAC,IAAI,CAAC;IAsIvE,YAAY,CAAC,MAAM,EAAE,qBAAqB,GAAG,IAAI;IAMjD,0CAA0C;IACpC,aAAa,CAAC,OAAO,EAAE,aAAa,CAAC,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAevE;;;;OAIG;IACG,YAAY,IAAI,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IAK1D,uNAAuN;IACjN,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAEtC,+GAA+G;IACzG,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAEnC,4EAA4E;IAC5E,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IA4EzC,kDAAkD;IAClD,gBAAgB,IAAI,IAAI;CAOzB;AAED,MAAM,WAAW,kBAAkB;IACjC,mBAAmB;IACnB,EAAE,EAAE,MAAM,CAAA;IACV,6BAA6B;IAC7B,UAAU,EAAE,kBAAkB,CAAA;IAC9B,kDAAkD;IAClD,MAAM,EAAE,WAAW,CAAA;IACnB,+BAA+B;IAC/B,MAAM,CAAC,EAAE,IAAI,CAAC,OAAO,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC,CAAA;IAC3E,kEAAkE;IAClE,eAAe,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IACrC,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CACnC;AAED,eAAe,eAAe,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA"}
@@ -1,7 +1,7 @@
1
- import type { AtLeastOne, BigString, Camelize, DiscordGetGatewayBot, DiscordMember, RequestGuildMembers } from '@discordeno/types';
2
- import { Collection } from '@discordeno/utils';
1
+ import { type AtLeastOne, type BigString, type Camelize, type DiscordGetGatewayBot, type DiscordMemberWithUser, type RequestGuildMembers } from '@discordeno/types';
2
+ import { Collection, logger } from '@discordeno/utils';
3
3
  import Shard from './Shard.js';
4
- import type { ShardEvents, StatusUpdate, UpdateVoiceState } from './types.js';
4
+ import { type ShardEvents, type ShardSocketRequest, type StatusUpdate, type UpdateVoiceState } from './types.js';
5
5
  export declare function createGatewayManager(options: CreateGatewayManagerOptions): GatewayManager;
6
6
  export interface CreateGatewayManagerOptions {
7
7
  /**
@@ -82,7 +82,7 @@ export interface CreateGatewayManagerOptions {
82
82
  */
83
83
  version?: number;
84
84
  /** The events handlers */
85
- events: ShardEvents;
85
+ events?: ShardEvents;
86
86
  /** This managers cache related settings. */
87
87
  cache?: {
88
88
  requestMembers?: {
@@ -91,10 +91,13 @@ export interface CreateGatewayManagerOptions {
91
91
  * @default false
92
92
  */
93
93
  enabled?: boolean;
94
- /** The pending requests. */
95
- pending: Collection<string, RequestMemberRequest>;
96
94
  };
97
95
  };
96
+ /**
97
+ * The logger that the gateway manager will use
98
+ * @default logger // The logger exported by `@discordeno/utils`
99
+ */
100
+ logger?: Pick<typeof logger, 'debug' | 'info' | 'warn' | 'error' | 'fatal'>;
98
101
  }
99
102
  export interface GatewayManager extends Required<CreateGatewayManagerOptions> {
100
103
  /** The max concurrency buckets. Those will be created when the `spawnShards` (which calls `prepareBuckets` under the hood) function gets called. */
@@ -108,6 +111,52 @@ export interface GatewayManager extends Required<CreateGatewayManagerOptions> {
108
111
  }>;
109
112
  /** The shards that are created. */
110
113
  shards: Map<number, Shard>;
114
+ /** The logger for the gateway manager */
115
+ logger: Pick<typeof logger, 'debug' | 'info' | 'warn' | 'error' | 'fatal'>;
116
+ /** Everything related to resharding. */
117
+ resharding: {
118
+ /**
119
+ * Whether or not automated resharding should be enabled.
120
+ * @default true
121
+ */
122
+ enabled: boolean;
123
+ /**
124
+ * The % of how full a shard is when resharding should be triggered.
125
+ * @default 80 as in 80%
126
+ */
127
+ shardsFullPercentage: number;
128
+ /**
129
+ * The interval in milliseconds, of how often to check whether resharding is needed and reshard automatically. Set to -1 to disable auto resharding.
130
+ * @default 28800000 (8 hours)
131
+ */
132
+ checkInterval: number;
133
+ /**
134
+ * The interval id of the check interval. This is used to clear the interval when the manager is shutdown.
135
+ */
136
+ checkIntervalId?: NodeJS.Timeout | undefined;
137
+ /** Holds the shards that resharding has created. Once resharding is done, this replaces the gateway.shards */
138
+ shards: Collection<number, Shard>;
139
+ /** Holds the pending shards that have been created and are pending all shards finish loading. */
140
+ pendingShards: Collection<number, Shard>;
141
+ /** Handler to get shard count and other session info. */
142
+ getSessionInfo: () => Promise<Camelize<DiscordGetGatewayBot>>;
143
+ /** Handler to edit the shard id on any cached guilds. */
144
+ updateGuildsShardId: (guildIds: string[], shardId: number) => Promise<void>;
145
+ /** Handler to check if resharding is necessary. */
146
+ checkIfReshardingIsNeeded: () => Promise<{
147
+ needed: boolean;
148
+ info?: Camelize<DiscordGetGatewayBot>;
149
+ }>;
150
+ /** Handler to begin resharding. */
151
+ reshard: (info: Camelize<DiscordGetGatewayBot> & {
152
+ firstShardId?: number;
153
+ lastShardId?: number;
154
+ }) => Promise<void>;
155
+ /** Handler to communicate to a worker that a shard needs to be created. */
156
+ tellWorkerToPrepare: (workerId: number, shardId: number, bucketId: number) => Promise<void>;
157
+ /** Handler to alert the gateway that a shard(resharded) is online. It should now wait for all shards to be pending before shutting off old shards. */
158
+ shardIsPending: (shard: Shard) => Promise<void>;
159
+ };
111
160
  /** Determine max number of shards to use based upon the max concurrency. */
112
161
  calculateTotalShards: () => number;
113
162
  /** Determine the id of the worker which is handling a shard. */
@@ -117,7 +166,8 @@ export interface GatewayManager extends Required<CreateGatewayManagerOptions> {
117
166
  /** Start identifying all the shards. */
118
167
  spawnShards: () => Promise<void>;
119
168
  /** Shutdown all shards. */
120
- shutdown: (code: number, reason: string) => Promise<void>;
169
+ shutdown: (code: number, reason: string, clearReshardingInterval?: boolean) => Promise<void>;
170
+ sendPayload: (shardId: number, payload: ShardSocketRequest) => Promise<void>;
121
171
  /** Allows users to hook in and change to communicate to different workers across different servers or anything they like. For example using redis pubsub to talk to other servers. */
122
172
  tellWorkerToIdentify: (workerId: number, shardId: number, bucketId: number) => Promise<void>;
123
173
  /** Tell the manager to identify a Shard. If this Shard is not already managed this will also add the Shard to the manager. */
@@ -148,7 +198,7 @@ export interface GatewayManager extends Required<CreateGatewayManagerOptions> {
148
198
  * Edits the bot status in all shards that this gateway manages.
149
199
  *
150
200
  * @param data The status data to set the bots status to.
151
- * @returns Promise<void>
201
+ * @returns nothing
152
202
  */
153
203
  editBotStatus: (data: StatusUpdate) => Promise<void>;
154
204
  /**
@@ -156,7 +206,7 @@ export interface GatewayManager extends Required<CreateGatewayManagerOptions> {
156
206
  *
157
207
  * @param shardId The shard id to edit the status for.
158
208
  * @param data The status data to set the bots status to.
159
- * @returns Promise<void>
209
+ * @returns nothing
160
210
  */
161
211
  editShardStatus: (shardId: number, data: StatusUpdate) => Promise<void>;
162
212
  /**
@@ -182,7 +232,7 @@ export interface GatewayManager extends Required<CreateGatewayManagerOptions> {
182
232
  *
183
233
  * @see {@link https://discord.com/developers/docs/topics/gateway#request-guild-members}
184
234
  */
185
- requestMembers: (guildId: BigString, options?: Omit<RequestGuildMembers, 'guildId'>) => Promise<Camelize<DiscordMember[]>>;
235
+ requestMembers: (guildId: BigString, options?: Omit<RequestGuildMembers, 'guildId'>) => Promise<Camelize<DiscordMemberWithUser[]>>;
186
236
  /**
187
237
  * Leaves the voice channel the bot user is currently in.
188
238
  *
@@ -196,13 +246,25 @@ export interface GatewayManager extends Required<CreateGatewayManagerOptions> {
196
246
  * @see {@link https://discord.com/developers/docs/topics/gateway#update-voice-state}
197
247
  */
198
248
  leaveVoiceChannel: (guildId: BigString) => Promise<void>;
249
+ /** This managers cache related settings. */
250
+ cache: {
251
+ requestMembers: {
252
+ /**
253
+ * Whether or not request member requests should be cached.
254
+ * @default false
255
+ */
256
+ enabled: boolean;
257
+ /** The pending requests. */
258
+ pending: Collection<string, RequestMemberRequest>;
259
+ };
260
+ };
199
261
  }
200
262
  export interface RequestMemberRequest {
201
263
  /** The unique nonce for this request. */
202
264
  nonce: string;
203
265
  /** The resolver handler to run when all members arrive. */
204
- resolve: (value: Camelize<DiscordMember[]> | PromiseLike<Camelize<DiscordMember[]>>) => void;
266
+ resolve: (value: Camelize<DiscordMemberWithUser[]> | PromiseLike<Camelize<DiscordMemberWithUser[]>>) => void;
205
267
  /** The members that have already arrived for this request. */
206
- members: Camelize<DiscordMember[]>;
268
+ members: DiscordMemberWithUser[];
207
269
  }
208
270
  //# sourceMappingURL=manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/manager.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAE1B,KAAK,mBAAmB,EACzB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,UAAU,EAAS,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC7D,OAAO,KAAK,MAAM,YAAY,CAAA;AAC9B,OAAO,EAAyB,KAAK,WAAW,EAAE,KAAK,kBAAkB,EAAE,KAAK,YAAY,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAEvI,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,GAAG,cAAc,CA0fzF;AAED,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,C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IAAI,CAAA;IAC5G,8DAA8D;IAC9D,OAAO,EAAE,qBAAqB,EAAE,CAAA;CACjC"}
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { ActivityTypes, Camelize, DiscordActivity, DiscordGatewayPayload, GatewayOpcodes, PresenceStatus } from '@discordeno/types';
3
2
  import type Shard from './Shard.js';
4
3
  export declare enum ShardState {
@@ -70,7 +69,7 @@ export interface ShardHeart {
70
69
  /** Interval between heartbeats requested by Discord. */
71
70
  interval: number;
72
71
  /** Id of the interval, which is used for sending the heartbeats. */
73
- intervalId?: NodeJS.Timer;
72
+ intervalId?: NodeJS.Timeout;
74
73
  /** Unix (in milliseconds) timestamp when the last heartbeat ACK was received from Discord. */
75
74
  lastAck?: number;
76
75
  /** Unix timestamp (in milliseconds) when the last heartbeat was sent. */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,eAAe,EAAE,qBAAqB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACxI,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AAEnC,oBAAY,UAAU;IACpB,iFAAiF;IACjF,SAAS,IAAI;IACb,6HAA6H;IAC7H,UAAU,IAAI;IACd,yEAAyE;IACzE,YAAY,IAAI;IAChB,iIAAiI;IACjI,YAAY,IAAI;IAChB,4EAA4E;IAC5E,WAAW,IAAI;IACf,4DAA4D;IAC5D,QAAQ,IAAI;IACZ,oHAAoH;IACpH,OAAO,IAAI;CACZ;AAED,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAA;IACjB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAA;IACf,iCAAiC;IACjC,UAAU,EAAE;QACV;;;WAGG;QACH,EAAE,EAAE,MAAM,CAAA;QACV;;;WAGG;QACH,OAAO,EAAE,MAAM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AAM,CAAA;CACb;AAED,4EAA4E;AAC5E,MAAM,WAAW,gBAAgB;IAC/B,sBAAsB;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,2EAA2E;IAC3E,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,0BAA0B;IAC1B,QAAQ,EAAE,OAAO,CAAA;IACjB,6BAA6B;IAC7B,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED,gFAAgF;AAChF,MAAM,WAAW,YAAY;IAG3B,4BAA4B;IAC5B,UAAU,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;IACjE,4BAA4B;IAC5B,MAAM,EAAE,MAAM,OAAO,cAAc,CAAA;CAGpC"}
package/package.json CHANGED
@@ -1,8 +1,13 @@
1
1
  {
2
2
  "name": "@discordeno/gateway",
3
- "version": "19.0.0-next.e2d86ea",
4
- "main": "./dist/index.js",
5
- "types": "./dist/index.d.ts",
3
+ "version": "19.0.0-next.e30e5a2",
4
+ "main": "./dist/esm/index.js",
5
+ "exports": {
6
+ "import": "./dist/esm/index.js",
7
+ "require": "./dist/cjs/index.cjs",
8
+ "types": "./dist/types/index.d.ts"
9
+ },
10
+ "types": "./dist/types/index.d.ts",
6
11
  "type": "module",
7
12
  "license": "Apache-2.0",
8
13
  "repository": {
@@ -10,41 +15,41 @@
10
15
  "url": "https://github.com/discordeno/discordeno.git"
11
16
  },
12
17
  "scripts": {
13
- "build": "swc --delete-dir-on-start src --out-dir dist",
14
- "build:type": "tsc --declaration --emitDeclarationOnly --declarationDir dist",
18
+ "build": "swc src --strip-leading-paths --delete-dir-on-start src --out-dir dist/esm && swc --strip-leading-paths --delete-dir-on-start src --out-dir dist/cjs -C module.type=commonjs && node ../../scripts/fixCjsExtension.js",
19
+ "build:type": "tsc --declaration --emitDeclarationOnly --declarationDir dist/types",
15
20
  "release-build": "yarn build && yarn build:type",
16
21
  "fmt": "eslint --fix \"src/**/*.ts*\"",
17
22
  "lint": "eslint \"src/**/*.ts*\"",
18
23
  "test:unit-coverage": "c8 mocha --no-warnings 'tests/unit/**/*.spec.ts'",
19
24
  "test:unit": "c8 --r lcov mocha --no-warnings 'tests/unit/**/*.spec.ts' && node ../../scripts/coveragePathFixing.js gateway",
20
- "test:deno-unit": "swc tests --delete-dir-on-start --out-dir denoTestsDist && node ../../scripts/fixDenoTestExtension.js && deno test -A --import-map ../../denoImportMap.json denoTestsDist/unit",
25
+ "test:deno-unit": "swc --strip-leading-paths tests --delete-dir-on-start --out-dir denoTestsDist && node ../../scripts/fixDenoTestExtension.js && deno test -A --import-map ../../denoImportMap.json denoTestsDist/unit",
21
26
  "test:unit:watch": "mocha --no-warnings --watch --parallel 'tests/unit/**/*.spec.ts'",
22
27
  "test:integration": "c8 --r lcov mocha --no-warnings 'tests/integration/**/*.spec.ts' && node ../../scripts/coveragePathFixing.js gateway",
23
28
  "test:type": "tsc --noEmit",
24
- "test:test-type": "tsc --project tsconfig.test.json"
29
+ "test:test-type": "tsc --project tests/tsconfig.json"
25
30
  },
26
31
  "dependencies": {
27
- "@discordeno/types": "19.0.0-next.e2d86ea",
28
- "@discordeno/utils": "19.0.0-next.e2d86ea",
29
- "ws": "^8.13.0"
32
+ "@discordeno/types": "19.0.0-next.e30e5a2",
33
+ "@discordeno/utils": "19.0.0-next.e30e5a2",
34
+ "ws": "^8.18.0"
30
35
  },
31
36
  "devDependencies": {
32
- "@swc/cli": "^0.1.62",
33
- "@swc/core": "^1.3.40",
34
- "@types/chai": "^4.3.4",
35
- "@types/mocha": "^10.0.1",
36
- "@types/node": "^18.15.3",
37
- "@types/sinon": "^10.0.13",
38
- "@types/ws": "^8.5.4",
39
- "c8": "^7.13.0",
40
- "chai": "^4.3.7",
41
- "eslint": "^8.36.0",
37
+ "@swc/cli": "^0.3.9",
38
+ "@swc/core": "^1.4.2",
39
+ "@types/chai": "^4.3.16",
40
+ "@types/mocha": "^10.0.7",
41
+ "@types/node": "^20.14.10",
42
+ "@types/sinon": "^17.0.3",
43
+ "@types/ws": "^8.5.10",
44
+ "c8": "^9.1.0",
45
+ "chai": "^5.1.1",
46
+ "eslint": "^8.57.0",
42
47
  "eslint-config-discordeno": "*",
43
- "mocha": "^10.2.0",
44
- "sinon": "^15.0.2",
45
- "ts-node": "^10.9.1",
48
+ "mocha": "^10.5.1",
49
+ "sinon": "^18.0.0",
50
+ "ts-node": "^10.9.2",
46
51
  "tsconfig": "*",
47
- "typescript": "^4.9.5",
52
+ "typescript": "^5.5.3",
48
53
  "uWebSockets.js": "https://github.com/uNetworking/uWebSockets.js.git#commit=42c9c0d5d31f46ca4115dc75672b0037ec970f28"
49
54
  }
50
55
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"Shard.d.ts","sourceRoot":"","sources":["../src/Shard.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,QAAQ,EACR,qBAAqB,EAErB,aAAa,EAEb,mBAAmB,EACpB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAAE,UAAU,EAAE,WAAW,EAA2B,MAAM,mBAAmB,CAAA;AAEpF,OAAO,SAAS,MAAM,IAAI,CAAA;AAC1B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,kBAAkB,EAAE,UAAU,EAAE,kBAAkB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClJ,OAAO,EAAyB,UAAU,EAAE,MAAM,YAAY,CAAA;AAE9D,qBAAa,eAAe;IAC1B,0BAA0B;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,qFAAqF;IACrF,UAAU,EAAE,kBAAkB,CAAA;IAC9B,kDAAkD;IAClD,KAAK,EAAE,UAAU,CAAA;IACjB,4HAA4H;IAC5H,2BAA2B,EAAE,MAAM,CAAM;IACzC,4CAA4C;IAC5C,sBAAsB,EAAE,MAAM,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