dfx 0.107.4 → 0.107.5
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/DiscordGateway/DiscordWS.js +2 -2
- package/DiscordGateway/Sharder.d.ts +1 -1
- package/mjs/DiscordGateway/DiscordWS.mjs +2 -2
- package/mjs/version.mjs +1 -1
- package/package.json +2 -2
- package/src/DiscordGateway/DiscordWS.ts +2 -2
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -46,7 +46,7 @@ const make = /*#__PURE__*/Effect.gen(function* () {
|
|
|
46
46
|
});
|
|
47
47
|
const write = message => {
|
|
48
48
|
if (message === Reconnect) {
|
|
49
|
-
return Effect.catchAllCause(writeRaw(new Socket.CloseEvent(
|
|
49
|
+
return Effect.catchAllCause(writeRaw(new Socket.CloseEvent(3000, "reconnecting")), logWriteError);
|
|
50
50
|
}
|
|
51
51
|
return Effect.catchAllCause(writeRaw(encoding.encode(message)), logWriteError);
|
|
52
52
|
};
|
|
@@ -55,7 +55,7 @@ const make = /*#__PURE__*/Effect.gen(function* () {
|
|
|
55
55
|
messages.unsafeOffer(message);
|
|
56
56
|
fiber.log([message], Cause.empty, logLevelTrace);
|
|
57
57
|
}))), Effect.retry({
|
|
58
|
-
while: e => e.reason === "Close" && e.code ===
|
|
58
|
+
while: e => e.reason === "Close" && e.code === 3000
|
|
59
59
|
}), Effect.catchAllCause(cause => Effect.logDebug("Got socket error, reconnecting", cause)), Effect.repeat(Schedule.exponential(500).pipe(Schedule.union(Schedule.spaced(10000)))), Effect.annotateLogs("channel", "inbound"), Effect.forkScoped, Effect.interruptible);
|
|
60
60
|
return {
|
|
61
61
|
take: messages.take,
|
|
@@ -10,5 +10,5 @@ export interface Sharder {
|
|
|
10
10
|
export declare const Sharder: import("effect/Context").Tag<Sharder, {
|
|
11
11
|
readonly shards: Effect.Effect<HashSet.HashSet<RunningShard>, never, never>;
|
|
12
12
|
}>;
|
|
13
|
-
export declare const SharderLive: Layer.Layer<Sharder, never, DiscordConfig | import("@effect/platform/HttpClient").HttpClient<import("@effect/platform/HttpClientError").HttpClientError, import("effect/Scope").Scope> | import("dfx/RateLimit").RateLimitStore | import("./DiscordWS").DiscordWSCodec | import("
|
|
13
|
+
export declare const SharderLive: Layer.Layer<Sharder, never, DiscordConfig | import("@effect/platform/HttpClient").HttpClient<import("@effect/platform/HttpClientError").HttpClientError, import("effect/Scope").Scope> | import("dfx/RateLimit").RateLimitStore | import("./DiscordWS").DiscordWSCodec | import("@effect/platform/Socket").WebSocketConstructor | import("./Shard/StateStore").ShardStateStore | ShardStore>;
|
|
14
14
|
//# sourceMappingURL=Sharder.d.ts.map
|
|
@@ -38,7 +38,7 @@ const make = /*#__PURE__*/Effect.gen(function* () {
|
|
|
38
38
|
});
|
|
39
39
|
const write = message => {
|
|
40
40
|
if (message === Reconnect) {
|
|
41
|
-
return Effect.catchAllCause(writeRaw(new Socket.CloseEvent(
|
|
41
|
+
return Effect.catchAllCause(writeRaw(new Socket.CloseEvent(3000, "reconnecting")), logWriteError);
|
|
42
42
|
}
|
|
43
43
|
return Effect.catchAllCause(writeRaw(encoding.encode(message)), logWriteError);
|
|
44
44
|
};
|
|
@@ -47,7 +47,7 @@ const make = /*#__PURE__*/Effect.gen(function* () {
|
|
|
47
47
|
messages.unsafeOffer(message);
|
|
48
48
|
fiber.log([message], Cause.empty, logLevelTrace);
|
|
49
49
|
}))), Effect.retry({
|
|
50
|
-
while: e => e.reason === "Close" && e.code ===
|
|
50
|
+
while: e => e.reason === "Close" && e.code === 3000
|
|
51
51
|
}), Effect.catchAllCause(cause => Effect.logDebug("Got socket error, reconnecting", cause)), Effect.repeat(Schedule.exponential(500).pipe(Schedule.union(Schedule.spaced(10000)))), Effect.annotateLogs("channel", "inbound"), Effect.forkScoped, Effect.interruptible);
|
|
52
52
|
return {
|
|
53
53
|
take: messages.take,
|
package/mjs/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const LIB_VERSION = "0.107.
|
|
1
|
+
export const LIB_VERSION = "0.107.5";
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dfx",
|
|
3
|
-
"version": "0.107.
|
|
3
|
+
"version": "0.107.5",
|
|
4
4
|
"description": "Effect-TS discord library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -41,6 +41,6 @@
|
|
|
41
41
|
"optionalDependencies": {
|
|
42
42
|
"discord-verify": "^1.2.0"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "f497628776ebcad53d8c2974bce41f2674b46515",
|
|
45
45
|
"main": "./index.js"
|
|
46
46
|
}
|
|
@@ -73,7 +73,7 @@ const make = Effect.gen(function* () {
|
|
|
73
73
|
): Effect.Effect<void> => {
|
|
74
74
|
if (message === Reconnect) {
|
|
75
75
|
return Effect.catchAllCause(
|
|
76
|
-
writeRaw(new Socket.CloseEvent(
|
|
76
|
+
writeRaw(new Socket.CloseEvent(3000, "reconnecting")),
|
|
77
77
|
logWriteError,
|
|
78
78
|
)
|
|
79
79
|
}
|
|
@@ -93,7 +93,7 @@ const make = Effect.gen(function* () {
|
|
|
93
93
|
),
|
|
94
94
|
),
|
|
95
95
|
Effect.retry({
|
|
96
|
-
while: e => e.reason === "Close" && e.code ===
|
|
96
|
+
while: e => e.reason === "Close" && e.code === 3000,
|
|
97
97
|
}),
|
|
98
98
|
Effect.catchAllCause(cause =>
|
|
99
99
|
Effect.logDebug("Got socket error, reconnecting", cause),
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const LIB_VERSION = "0.107.
|
|
1
|
+
export const LIB_VERSION = "0.107.5";
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "0.107.
|
|
1
|
+
export declare const LIB_VERSION = "0.107.5";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED