dfx 0.13.4 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/DiscordConfig/index.d.ts +7 -6
  2. package/DiscordConfig/index.js +10 -9
  3. package/DiscordConfig/index.js.map +1 -1
  4. package/DiscordGateway/DiscordWS/index.d.ts +7 -6
  5. package/DiscordGateway/DiscordWS/index.js +10 -9
  6. package/DiscordGateway/DiscordWS/index.js.map +1 -1
  7. package/DiscordGateway/Shard/heartbeats.d.ts +6 -2
  8. package/DiscordGateway/Shard/heartbeats.js +2 -2
  9. package/DiscordGateway/Shard/heartbeats.js.map +1 -1
  10. package/DiscordGateway/Shard/identify.d.ts +4 -1
  11. package/DiscordGateway/Shard/identify.js +1 -1
  12. package/DiscordGateway/Shard/index.d.ts +4 -4
  13. package/DiscordGateway/Shard/index.js +5 -5
  14. package/DiscordGateway/Shard/index.js.map +1 -1
  15. package/DiscordGateway/Shard/invalidSession.d.ts +5 -2
  16. package/DiscordGateway/Shard/invalidSession.js +2 -2
  17. package/DiscordGateway/Shard/invalidSession.js.map +1 -1
  18. package/DiscordGateway/Shard/sendEvents.d.ts +1 -1
  19. package/DiscordGateway/Shard/sendEvents.js +1 -1
  20. package/DiscordGateway/Shard/utils.d.ts +5 -2
  21. package/DiscordGateway/ShardStore/index.d.ts +4 -3
  22. package/DiscordGateway/ShardStore/index.js +1 -1
  23. package/DiscordGateway/Sharder/index.d.ts +6 -3
  24. package/DiscordGateway/Sharder/index.js +4 -5
  25. package/DiscordGateway/Sharder/index.js.map +1 -1
  26. package/DiscordGateway/WS/index.d.ts +3 -2
  27. package/DiscordGateway/WS/index.js +1 -1
  28. package/DiscordGateway/index.d.ts +9 -7
  29. package/DiscordGateway/index.js +1 -1
  30. package/DiscordREST/index.d.ts +6 -5
  31. package/DiscordREST/index.js +6 -5
  32. package/DiscordREST/index.js.map +1 -1
  33. package/DiscordREST/types.d.ts +2 -1
  34. package/DiscordREST/utils.d.ts +4 -4
  35. package/Helpers/intents.js +1 -1
  36. package/Helpers/interactions.d.ts +15 -10
  37. package/Helpers/interactions.js +7 -3
  38. package/Helpers/interactions.js.map +1 -1
  39. package/Helpers/members.d.ts +1 -1
  40. package/Helpers/permissions.d.ts +1 -1
  41. package/Helpers/permissions.js +1 -1
  42. package/Http/index.d.ts +7 -7
  43. package/Interactions/context.d.ts +14 -13
  44. package/Interactions/context.js +3 -2
  45. package/Interactions/context.js.map +1 -1
  46. package/Interactions/definitions.d.ts +7 -6
  47. package/Interactions/gateway.d.ts +3 -2
  48. package/Interactions/gateway.js +6 -6
  49. package/Interactions/gateway.js.map +1 -1
  50. package/Interactions/handlers.d.ts +2 -1
  51. package/Interactions/handlers.js +1 -1
  52. package/Interactions/index.d.ts +7 -8
  53. package/Interactions/index.js +4 -6
  54. package/Interactions/index.js.map +1 -1
  55. package/Interactions/webhook.d.ts +7 -5
  56. package/Interactions/webhook.js +1 -1
  57. package/Log/index.d.ts +7 -7
  58. package/Log/index.js +1 -1
  59. package/RateLimitStore/index.d.ts +9 -7
  60. package/RateLimitStore/index.js +3 -2
  61. package/RateLimitStore/index.js.map +1 -1
  62. package/RateLimitStore/memory.d.ts +2 -2
  63. package/RateLimitStore/memory.js.map +1 -1
  64. package/RateLimitStore/utils.d.ts +1 -1
  65. package/gateway.d.ts +12 -0
  66. package/gateway.js +20 -0
  67. package/gateway.js.map +1 -0
  68. package/global.d.ts +72 -3
  69. package/global.js +1 -1
  70. package/global.js.map +1 -1
  71. package/index.d.ts +2 -10
  72. package/index.js +2 -17
  73. package/index.js.map +1 -1
  74. package/package.json +2 -2
  75. package/utils/effect.d.ts +1 -1
  76. package/webhooks.d.ts +6 -15
  77. package/webhooks.js +7 -16
  78. package/webhooks.js.map +1 -1
  79. package/common-gateway.d.ts +0 -5
  80. package/common-gateway.js +0 -6
  81. package/common-gateway.js.map +0 -1
  82. package/common.d.ts +0 -28
  83. package/common.js +0 -15
  84. package/common.js.map +0 -1
@@ -1,4 +1,5 @@
1
- import { Duration, Discord } from "dfx/common";
1
+ import { Duration } from "@fp-ts/data/Duration";
2
+ import { Discord } from "dfx";
2
3
  export interface DiscordConfig {
3
4
  token: string;
4
5
  rest: {
@@ -15,23 +16,23 @@ export interface DiscordConfig {
15
16
  identifyRateLimit: readonly [window: number, limit: number];
16
17
  };
17
18
  }
18
- export declare const DiscordConfig: import("../common.js").Tag<DiscordConfig>;
19
+ export declare const DiscordConfig: import("../global.js").Tag<DiscordConfig>;
19
20
  export interface MakeOpts {
20
21
  token: string;
21
22
  rest?: Partial<DiscordConfig["rest"]>;
22
23
  gateway?: Partial<DiscordConfig["gateway"]>;
23
24
  }
24
25
  export declare const make: ({ token, rest, gateway }: MakeOpts) => DiscordConfig;
25
- export declare const makeLayer: (a_0: MakeOpts) => import("../common.js").Layer<never, never, DiscordConfig>;
26
- export declare const token: import("../common.js").Effect<DiscordConfig, never, string>;
27
- export declare const rest: import("../common.js").Effect<DiscordConfig, never, {
26
+ export declare const makeLayer: (a_0: MakeOpts) => import("../global.js").Layer<never, never, DiscordConfig>;
27
+ export declare const token: import("../global.js").Effect<DiscordConfig, never, string>;
28
+ export declare const rest: import("../global.js").Effect<DiscordConfig, never, {
28
29
  baseUrl: string;
29
30
  globalRateLimit: {
30
31
  limit: number;
31
32
  window: Duration;
32
33
  };
33
34
  }>;
34
- export declare const gateway: import("../common.js").Effect<DiscordConfig, never, {
35
+ export declare const gateway: import("../global.js").Effect<DiscordConfig, never, {
35
36
  intents: number;
36
37
  presence?: import("../types.js").UpdatePresence | undefined;
37
38
  shardCount?: number | undefined;
@@ -1,8 +1,9 @@
1
- import * as tsplus_module_1 from "dfx/common";
1
+ import * as tsplus_module_1 from "@fp-ts/data/Context";
2
2
  import * as tsplus_module_2 from "@fp-ts/data/Duration";
3
- import * as tsplus_module_3 from "@effect/io/Layer";
4
- import * as tsplus_module_4 from "@fp-ts/data/Function";
5
- import * as tsplus_module_5 from "@effect/io/Effect";
3
+ import * as tsplus_module_3 from "dfx";
4
+ import * as tsplus_module_4 from "@effect/io/Layer";
5
+ import * as tsplus_module_5 from "@fp-ts/data/Function";
6
+ import * as tsplus_module_6 from "@effect/io/Effect";
6
7
  const VERSION = 9;
7
8
  export const DiscordConfig = tsplus_module_1.Tag();
8
9
  export const make = ({ token, rest, gateway }) => ({
@@ -17,13 +18,13 @@ export const make = ({ token, rest, gateway }) => ({
17
18
  },
18
19
  },
19
20
  gateway: {
20
- intents: tsplus_module_1.Discord.GatewayIntents.GUILDS,
21
+ intents: tsplus_module_3.Discord.GatewayIntents.GUILDS,
21
22
  identifyRateLimit: [5000, 1],
22
23
  ...(gateway ?? {}),
23
24
  },
24
25
  });
25
- export const makeLayer = tsplus_module_4.flow(make, tsplus_module_3.succeed(DiscordConfig));
26
- export const token = tsplus_module_5.serviceWith(DiscordConfig)(({ token }) => token);
27
- export const rest = tsplus_module_5.serviceWith(DiscordConfig)(({ rest }) => rest);
28
- export const gateway = tsplus_module_5.serviceWith(DiscordConfig)(({ gateway }) => gateway);
26
+ export const makeLayer = tsplus_module_5.flow(make, tsplus_module_4.succeed(DiscordConfig));
27
+ export const token = tsplus_module_6.serviceWith(DiscordConfig)(({ token }) => token);
28
+ export const rest = tsplus_module_6.serviceWith(DiscordConfig)(({ rest }) => rest);
29
+ export const gateway = tsplus_module_6.serviceWith(DiscordConfig)(({ gateway }) => gateway);
29
30
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/DiscordConfig/index.ts"],"names":[],"mappings":";;;;;AAAA,MAAM,OAAO,GAAG,CAAC,CAAA;AAmBjB,MAAM,CAAC,MAAM,aAAa,GAAG,gBAAA,GAAG,EAAiB,CAAA;AAQjD,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAY,EAAiB,EAAE,CAAC,CAAC;IAC1E,KAAK;IACL,IAAI,EAAE;QAC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O,EAAE;QAC9C,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;QACf,eAAe,EAAE;YACf,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,wBAAiB,CAAC,CAAC;YAC3B,GAAG,CAAC,IAAI,EAAE,eAAe,IAAI,EAAE,CAAC;SACjC;KACF;IACD,OAAO,EAAE;QACP,OAAO,EAAE,gBAAA,OAAO,CAAC,cAAc,CAAC,MAAM;QACtC,iBAAiB,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QAC5B,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;KACnB;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,gBAAA,IAAI,CAAC,IAAI,EAAE,wBAAc,aAAa,CAAC,CAAC,CAAA;AAEjE,MAAM,CAAC,MAAM,KAAK,GAAG,4BAAmB,aAAa,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,CAAA;AAC5E,MAAM,CAAC,MAAM,IAAI,GAAG,4BAAmB,aAAa,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAA;AACzE,MAAM,CAAC,MAAM,OAAO,GAAG,4BAAmB,aAAa,CAAC,CACtD,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CACzB,CAAA"}
@@ -1,7 +1,8 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
2
  /// <reference types="ws" />
3
- import { Discord, EffectSource } from "dfx/common";
4
- import { WS } from "dfx/common-gateway";
3
+ import { Discord } from "dfx";
4
+ import { WS } from "dfx/gateway";
5
+ import { EffectSource } from "callbag-effect-ts/Source";
5
6
  import WebSocket from "isomorphic-ws";
6
7
  export type Message = Discord.GatewayPayload | WS.Reconnect;
7
8
  export interface OpenOpts {
@@ -14,10 +15,10 @@ export interface DiscordWSCodec {
14
15
  encode: (p: Discord.GatewayPayload) => string | Buffer | ArrayBuffer;
15
16
  decode: (p: WebSocket.RawData) => Discord.GatewayPayload;
16
17
  }
17
- export declare const DiscordWSCodec: import("../../common.js").Tag<DiscordWSCodec>;
18
- export declare const LiveJsonDiscordWSCodec: import("../../common.js").Layer<never, never, DiscordWSCodec>;
19
- export declare const make: ({ url, version, }?: OpenOpts) => import("../../common.js").Effect<import("../../Log/index.js").Log | DiscordWSCodec, never, {
18
+ export declare const DiscordWSCodec: import("../../global.js").Tag<DiscordWSCodec>;
19
+ export declare const LiveJsonDiscordWSCodec: import("../../global.js").Layer<never, never, DiscordWSCodec>;
20
+ export declare const make: ({ url, version, }?: OpenOpts) => import("../../global.js").Effect<import("../../Log/index.js").Log | DiscordWSCodec, never, {
20
21
  source: import("callbag-effect-ts/Source").EffectSource<never, never, import("../../types.js").GatewayPayload<any>>;
21
22
  sink: import("callbag-effect-ts/Sink").EffectSink<never, never, never, Message>;
22
- setUrl: (url: string) => import("../../common.js").Effect<never, never, void>;
23
+ setUrl: (url: string) => import("../../global.js").Effect<never, never, void>;
23
24
  }>;
@@ -1,26 +1,27 @@
1
- import * as tsplus_module_1 from "dfx/common";
1
+ import * as tsplus_module_1 from "@fp-ts/data/Context";
2
2
  import * as tsplus_module_2 from "@effect/io/Layer";
3
- import * as tsplus_module_3 from "dfx/common-gateway";
3
+ import * as tsplus_module_3 from "dfx/gateway";
4
4
  import * as tsplus_module_4 from "callbag-effect-ts/Sink/map";
5
5
  import * as tsplus_module_5 from "@fp-ts/data/Duration";
6
6
  import * as tsplus_module_6 from "@effect/io/Schedule";
7
7
  import * as tsplus_module_7 from "callbag-effect-ts/Source/tapError";
8
8
  import * as tsplus_module_8 from "callbag-effect-ts/Source/retry";
9
9
  import * as tsplus_module_9 from "callbag-effect-ts/Source/map";
10
- import * as tsplus_module_10 from "@effect/io/Effect";
11
- import * as tsplus_module_11 from "@effect/io/Ref";
10
+ import * as tsplus_module_10 from "dfx";
11
+ import * as tsplus_module_11 from "@effect/io/Effect";
12
+ import * as tsplus_module_12 from "@effect/io/Ref";
12
13
  export const DiscordWSCodec = tsplus_module_1.Tag();
13
14
  export const LiveJsonDiscordWSCodec = tsplus_module_2.succeed(DiscordWSCodec)({
14
15
  type: "json",
15
16
  encode: (p) => JSON.stringify(p),
16
17
  decode: (p) => JSON.parse(p.toString("utf8")),
17
18
  });
18
- export const make = ({ url = "wss://gateway.discord.gg/", version = 10, } = {}) => tsplus_module_10.flatMap(encoding => tsplus_module_10.flatMap(urlRef => {
19
- const setUrl = (url) => tsplus_module_11.set(`${url}?v=${version}&encoding=${encoding.type}`)(urlRef);
20
- return tsplus_module_10.flatMap(ws => tsplus_module_10.map(log => {
19
+ export const make = ({ url = "wss://gateway.discord.gg/", version = 10, } = {}) => tsplus_module_11.flatMap(encoding => tsplus_module_11.flatMap(urlRef => {
20
+ const setUrl = (url) => tsplus_module_12.set(`${url}?v=${version}&encoding=${encoding.type}`)(urlRef);
21
+ return tsplus_module_11.flatMap(ws => tsplus_module_11.map(log => {
21
22
  const source = tsplus_module_9.map(encoding.decode)(tsplus_module_8.retry(tsplus_module_6.exponential(tsplus_module_5.seconds(0.5)))(tsplus_module_7.tapError((e) => log.info("DiscordWS", "ERROR", e))(ws.source)));
22
23
  const sink = tsplus_module_4.map((msg) => msg === tsplus_module_3.WS.Reconnect ? msg : encoding.encode(msg))(ws.sink);
23
24
  return { source, sink, setUrl };
24
- })(tsplus_module_10.service(tsplus_module_1.Log.Log)))(tsplus_module_3.WS.make(urlRef, { perMessageDeflate: false }));
25
- })(tsplus_module_11.make(`${url}?v=${version}&encoding=${encoding.type}`)))(tsplus_module_10.service(DiscordWSCodec));
25
+ })(tsplus_module_11.service(tsplus_module_10.Log.Log)))(tsplus_module_3.WS.make(urlRef, { perMessageDeflate: false }));
26
+ })(tsplus_module_12.make(`${url}?v=${version}&encoding=${encoding.type}`)))(tsplus_module_11.service(DiscordWSCodec));
26
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../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EAAE,OAAO,EAAE,CAAC,CAAC,EAD1C,EAAE,CAAC,MAAM,CACkC,CACL,CAKpD,CAAA;QAED,MAAM,IAAI,GAAG,oBAAY,CAAC,GAAY,EAAE,EAAE,CACxC,GAAG,KAAK,gBAAA,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,EADtC,EAAE,CAAC,IAAI,CAEnB,CAAA;QAED,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CAAA;OAdjB,yBAAe,iBAAA,GAAG,CAAC,GAAG,CAAC,GAFxB,gBAAA,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAAC;GAJzC,sBAAS,GAAG,GAAG,MAAM,OAAO,aAAa,QAAQ,CAAC,IAAI,EAAE,CAAC,GADvD,yBAAe,cAAc,CAAC,CAsBjD,CAAA"}
@@ -1,3 +1,7 @@
1
- import { Ref, Maybe, Effect, EffectSource, Discord } from "dfx/common";
2
- import { DWS } from "dfx/common-gateway";
1
+ import { Ref } from "@effect/io/Ref";
2
+ import { Maybe } from "@fp-ts/data/Option";
3
+ import { Effect } from "@effect/io/Effect";
4
+ import { DiscordWS } from "dfx/gateway";
5
+ import { EffectSource } from "callbag-effect-ts/Source";
6
+ import { Discord } from "dfx";
3
7
  export declare const fromRaw: <R, E>(source: import("callbag-effect-ts/Source").EffectSource<R, E, import("../../types.js").GatewayPayload<any>>, seqRef: Ref<Maybe<number>>) => import("callbag-effect-ts/Source").EffectSource<R, E, import("../DiscordWS/index.js").Message>;
@@ -1,10 +1,10 @@
1
1
  import * as tsplus_module_1 from "@effect/io/Ref";
2
2
  import * as tsplus_module_2 from "@fp-ts/data/Option";
3
3
  import * as tsplus_module_3 from "@effect/io/Effect";
4
- import * as tsplus_module_4 from "dfx/common-gateway";
4
+ import * as tsplus_module_4 from "dfx/gateway";
5
5
  import * as tsplus_module_5 from "@effect/io/Schedule";
6
6
  import * as tsplus_module_6 from "callbag-effect-ts/Source/fromSchedule";
7
- import * as tsplus_module_7 from "dfx/common";
7
+ import * as tsplus_module_7 from "dfx";
8
8
  import * as tsplus_module_8 from "callbag-effect-ts/Source/tap";
9
9
  import * as tsplus_module_9 from "callbag-effect-ts/Source/switchMap";
10
10
  import * as tsplus_module_10 from "callbag-effect-ts/Source/mapEffect";
@@ -1 +1 @@
1
- {"version":3,"file":"heartbeats.js","sourceRoot":"","sources":["../../../src/DiscordGateway/Shard/heartbeats.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AAEnC,MAAM,IAAI,GAAG,CAAC,GAAiB,EAAE,MAA0B,EAAE,EAAE,CAC7D,oBAEO,GAAG,EAAE,CAAC,oBAAQ,KAAK,EAAb,GAAG,CAAW,EAF3B,oBACO,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,SAAS,2BAAC,CAAC,EAAW,sBAD/C,MAAM,EAC0C,CACpB,CAAA;AAE9B,MAAM,SAAS,GAAG,CAAC,GAAiB,EAAE,MAA0B,EAAE,EAAE,CAClE,wBACE,CAAC,KAAK,EAAqC,EAAE,CAC3C,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,wBAAe,gBAAA,EAAE,CAAC,SAAS,CAAC,sBAF5D,GAAG,EAGF,CAAA;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,MAAkD,EAClD,MAA0B,EAC1B,EAAE,yBACF,oBAAmB,CAAC,QAAQ,EAAE,EAAE;IAC9B,MAAM,UAAU,GAAG,2BAWN,GAAG,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC,EAX3B,0BAIN,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import { Ref } from "@effect/io/Ref";
3
+ import { Maybe } from "@fp-ts/data/Option";
4
+ import { EffectSource } from "callbag-effect-ts/Source";
2
5
  export interface Options {
3
6
  token: string;
4
7
  intents: number;
@@ -1,7 +1,7 @@
1
1
  import * as tsplus_module_1 from "@fp-ts/data/Option";
2
2
  import * as tsplus_module_2 from "@effect/io/Ref";
3
3
  import * as tsplus_module_3 from "@effect/io/Effect";
4
- import * as tsplus_module_4 from "dfx/common";
4
+ import * as tsplus_module_4 from "dfx";
5
5
  import * as tsplus_module_5 from "callbag-effect-ts/Source/mapEffect";
6
6
  import * as SendEvents from "./sendEvents.js";
7
7
  import * as OS from "os";
@@ -1,7 +1,7 @@
1
- import { DWS } from "dfx/common-gateway";
2
- import { Discord } from "dfx/common";
3
- export declare const make: (shard: [id: number, count: number]) => import("../../common.js").Effect<import("../../DiscordConfig/index.js").DiscordConfig | import("../../Log/index.js").Log | import("../../RateLimitStore/index.js").RateLimiter | import("../DiscordWS/index.js").DiscordWSCodec, never, {
4
- run: import("../../common.js").Effect<never, never, readonly [readonly [readonly [readonly [void, void], void], void], void]>;
1
+ import { DiscordWS } from "dfx/gateway";
2
+ import { Discord } from "dfx";
3
+ export declare const make: (shard: [id: number, count: number]) => import("../../global.js").Effect<import("../../Log/index.js").Log | import("../DiscordWS/index.js").DiscordWSCodec | import("../../DiscordConfig/index.js").DiscordConfig | import("../../RateLimitStore/index.js").RateLimiter, never, {
4
+ run: import("../../global.js").Effect<never, never, void>;
5
5
  raw: import("callbag-effect-ts/Source").EffectSource<never, never, import("../../types.js").GatewayPayload<any>>;
6
6
  dispatch: import("callbag-effect-ts/Source").EffectSource<never, never, import("../../types.js").GatewayPayload<import("../../types.js").ReceiveEvent>>;
7
7
  send: (p: Discord.GatewayPayload) => void;
@@ -1,7 +1,7 @@
1
1
  import * as tsplus_module_1 from "@effect/io/Effect";
2
- import * as tsplus_module_2 from "dfx/common-gateway";
2
+ import * as tsplus_module_2 from "dfx/gateway";
3
3
  import * as tsplus_module_3 from "callbag-effect-ts/Source/forEach";
4
- import * as tsplus_module_4 from "dfx/common";
4
+ import * as tsplus_module_4 from "dfx";
5
5
  import * as tsplus_module_5 from "callbag-effect-ts/Source/filter";
6
6
  import * as tsplus_module_6 from "callbag-effect-ts/Source/tap";
7
7
  import * as tsplus_module_7 from "callbag-effect-ts/Source/run";
@@ -39,7 +39,7 @@ export const make = (shard) => tsplus_module_1.flatMap(({ token, gateway }) => t
39
39
  // invalid session
40
40
  const invalidEffects = tsplus_module_3.forEach(sendMessage)(InvalidSession.fromRaw(raw, latestReady));
41
41
  return {
42
- run: tsplus_module_1.zipPar(sendEffect)(tsplus_module_1.zipPar(invalidEffects)(tsplus_module_1.zipPar(identifyEffects)(tsplus_module_1.zipPar(heartbeatEffects)(updateRefs)))),
42
+ run: tsplus_module_1.asUnit(tsplus_module_1.zipPar(sendEffect)(tsplus_module_1.zipPar(invalidEffects)(tsplus_module_1.zipPar(identifyEffects)(tsplus_module_1.zipPar(heartbeatEffects)(updateRefs))))),
43
43
  raw,
44
44
  dispatch,
45
45
  send: (p) => emit.data(p),
@@ -47,6 +47,6 @@ export const make = (shard) => tsplus_module_1.flatMap(({ token, gateway }) => t
47
47
  };
48
48
  })(Utils.latest((p) => tsplus_module_8.fromNullable(p.s))))(Utils.latest((p) => tsplus_module_8.map((p) => p.d)(tsplus_module_8.filter((p) => p.op === tsplus_module_4.Discord.GatewayOpcode.DISPATCH && p.t === "READY")(tsplus_module_8.some(p)))));
49
49
  })(tsplus_module_9.share(socket.source));
50
- })(tsplus_module_1.service(tsplus_module_4.RateLimitStore.RateLimiter));
51
- })(tsplus_module_2.DWS.make()))(tsplus_module_1.service(tsplus_module_4.Config.DiscordConfig));
50
+ })(tsplus_module_1.service(tsplus_module_4.RateLimit.RateLimiter));
51
+ })(tsplus_module_2.DiscordWS.make()))(tsplus_module_1.service(tsplus_module_4.Config.DiscordConfig));
52
52
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":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AW;iBACZ,CAAC,CAAqB,CAAA;gBAEvB,kBAAkB;gBAClB,MAAM,cAAc,GAAG,wBACrB,WAAW,EADU,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE,WAAW,CAAC,CAE9D,CAAA;gBAED,OAAO;oBACL,GAAG,yBAAE,uBAIK,UAAU,EAJf,uBAGK,cAAc,EAHnB,uBAEK,eAAe,EAFpB,uBACK,gBAAgB,EADrB,UAAU,CACY,CACD,CACD,CACJ,CAAO;oBAC5B,GAAG;oBACH,QAAQ;oBACR,IAAI,EAAE,CAAC,CAAyB,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;oBACjD,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAA,EAAE,CAAC,SAAS,CAAC;iBACzC,CAAA;eAtDC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,6BAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,GAV5C,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CACjB,oBAKO,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAE,EALlB,uBAEI,CAAC,CAAC,EAAmD,EAAE,CACrD,CAAC,CAAC,EAAE,KAAK,gBAAA,OAAO,CAAC,aAAa,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC,KAAK,OAAO,EAHhE,qBAAW,CAAC,CAAC,CAIV,CACgB,CACpB;iCAdW,MAAM,CAAC,MAAM;OALT,wBAAe,gBAAA,SAAS,CAAC,WAAW,CAAC;GANtC,gBAAA,SAAS,CAAC,IAAI,EAAE,GAFJ,wBAAe,gBAAA,MAAM,CAAC,aAAa,CAAC,CAqFjE,CAAA"}
@@ -1,3 +1,6 @@
1
- import { EffectSource, Discord, Ref, Maybe } from "dfx/common";
2
- import { DWS } from "dfx/common-gateway";
1
+ import { EffectSource } from "callbag-effect-ts/Source";
2
+ import { Discord } from "dfx";
3
+ import { Ref } from "@effect/io/Ref";
4
+ import { Maybe } from "@fp-ts/data/Option";
5
+ import { DiscordWS } from "dfx/gateway";
3
6
  export declare const fromRaw: <R, E>(raw: import("callbag-effect-ts/Source").EffectSource<R, E, import("../../types.js").GatewayPayload<any>>, latestReady: Ref<Maybe<Discord.ReadyEvent>>) => import("callbag-effect-ts/Source").EffectSource<R, E, import("../DiscordWS/index.js").Message>;
@@ -1,8 +1,8 @@
1
- import * as tsplus_module_1 from "dfx/common-gateway";
1
+ import * as tsplus_module_1 from "dfx/gateway";
2
2
  import * as tsplus_module_2 from "@effect/io/Effect";
3
3
  import * as tsplus_module_3 from "@fp-ts/data/Option";
4
4
  import * as tsplus_module_4 from "@effect/io/Ref";
5
- import * as tsplus_module_5 from "dfx/common";
5
+ import * as tsplus_module_5 from "dfx";
6
6
  import * as tsplus_module_6 from "callbag-effect-ts/Source/tap";
7
7
  import * as tsplus_module_7 from "callbag-effect-ts/Source/map";
8
8
  import { opCode } from "./utils.js";
@@ -1 +1 @@
1
- {"version":3,"file":"invalidSession.js","sourceRoot":"","sources":["../../../src/DiscordGateway/Shard/invalidSession.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAEnC,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,GAA+C,EAC/C,WAA2C,EAC3C,EAAE,CACF,oBAIO,GAAgB,EAAE,CAAC,gBAAA,EAAE,CAAC,SAAS,EAJtC,oBAGO,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,sBAAa,CAAC,CAAC,CAAC,0CAAA,WAAW,CAAgB,CAAC,EAHjE,MAAM,CAAC,GAAG,CAAC,CACT,gBAAA,OAAO,CAAC,aAAa,CAAC,eAAe,CACtC,CACiE,CAC3B,CAAA"}
1
+ {"version":3,"file":"invalidSession.js","sourceRoot":"","sources":["../../../src/DiscordGateway/Shard/invalidSession.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAEnC,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,GAA+C,EAC/C,WAA2C,EAC3C,EAAE,CACF,oBAIO,GAAsB,EAAE,CAAC,gBAAA,EAAE,CAAC,SAAS,EAJ5C,oBAGO,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,sBAAa,CAAC,CAAC,CAAC,0CAAA,WAAW,CAAgB,CAAC,EAHjE,MAAM,CAAC,GAAG,CAAC,CACT,gBAAA,OAAO,CAAC,aAAa,CAAC,eAAe,CACtC,CACiE,CACrB,CAAA"}
@@ -1,4 +1,4 @@
1
- import { Discord } from "dfx/common";
1
+ import { Discord } from "dfx";
2
2
  export declare const heartbeat: (d: Discord.Heartbeat) => Discord.GatewayPayload;
3
3
  export declare const identify: (d: Discord.Identify) => Discord.GatewayPayload;
4
4
  export declare const resume: (d: Discord.Resume) => Discord.GatewayPayload;
@@ -1,4 +1,4 @@
1
- import * as tsplus_module_1 from "dfx/common";
1
+ import * as tsplus_module_1 from "dfx";
2
2
  export const heartbeat = (d) => ({
3
3
  op: tsplus_module_1.Discord.GatewayOpcode.HEARTBEAT,
4
4
  d,
@@ -1,3 +1,6 @@
1
- import { EffectSource, Discord, Maybe, Ref } from "dfx/common";
1
+ import { EffectSource } from "callbag-effect-ts/Source";
2
+ import { Discord } from "dfx";
3
+ import { Maybe } from "@fp-ts/data/Option";
4
+ import { Ref } from "@effect/io/Ref";
2
5
  export declare const opCode: <R, E>(source: import("callbag-effect-ts/Source").EffectSource<R, E, import("../../types.js").GatewayPayload<any>>) => <T = any>(code: Discord.GatewayOpcode) => import("callbag-effect-ts/Source").EffectSource<R, E, import("../../types.js").GatewayPayload<T>>;
3
- export declare const latest: <T>(f: (p: Discord.GatewayPayload) => import("../../common.js").Maybe<T>) => import("../../common.js").Effect<never, never, readonly [import("../../common.js").Ref<import("../../common.js").Maybe<T>>, (p: import("../../types.js").GatewayPayload<any>) => import("../../common.js").Effect<never, never, void>]>;
6
+ export declare const latest: <T>(f: (p: Discord.GatewayPayload) => import("../../global.js").Maybe<T>) => import("../../global.js").Effect<never, never, readonly [import("../../global.js").Ref<import("../../global.js").Maybe<T>>, (p: import("../../types.js").GatewayPayload<any>) => import("../../global.js").Effect<never, never, void>]>;
@@ -1,4 +1,5 @@
1
- import { Effect, Maybe } from "dfx/common";
1
+ import { Effect } from "@effect/io/Effect";
2
+ import { Maybe } from "@fp-ts/data/Option";
2
3
  export interface ClaimIdContext {
3
4
  sharderCount: number;
4
5
  totalCount: number;
@@ -8,5 +9,5 @@ export interface ShardStore {
8
9
  allClaimed: (totalCount: number) => Effect<never, never, boolean>;
9
10
  heartbeat?: (shardId: number) => Effect<never, never, void>;
10
11
  }
11
- export declare const ShardStore: import("../../common.js").Tag<ShardStore>;
12
- export declare const LiveMemoryShardStore: import("../../common.js").Layer<never, never, ShardStore>;
12
+ export declare const ShardStore: import("../../global.js").Tag<ShardStore>;
13
+ export declare const LiveMemoryShardStore: import("../../global.js").Layer<never, never, ShardStore>;
@@ -1,4 +1,4 @@
1
- import * as tsplus_module_1 from "dfx/common";
1
+ import * as tsplus_module_1 from "@fp-ts/data/Context";
2
2
  import * as tsplus_module_2 from "@fp-ts/data/Option";
3
3
  import * as tsplus_module_3 from "@effect/io/Effect";
4
4
  import * as tsplus_module_4 from "@effect/io/Layer";
@@ -1,7 +1,10 @@
1
- import { Effect, Maybe, EffectSource, Discord } from "dfx/common";
1
+ import { Effect } from "@effect/io/Effect";
2
+ import { Maybe } from "@fp-ts/data/Option";
3
+ import { EffectSource } from "callbag-effect-ts/Source";
4
+ import { Discord } from "dfx";
2
5
  import { ShardStore } from "../ShardStore/index.js";
3
- export declare const spawn: import("callbag-effect-ts/Source").EffectSource<ShardStore | import("../../index.js").DiscordREST | import("../../DiscordConfig/index.js").DiscordConfig | import("../../Log/index.js").Log | import("../../RateLimitStore/index.js").RateLimiter | import("../DiscordWS/index.js").DiscordWSCodec, never, {
4
- run: import("../../common.js").Effect<never, never, readonly [readonly [readonly [readonly [void, void], void], void], void]>;
6
+ export declare const spawn: import("callbag-effect-ts/Source").EffectSource<import("../../Log/index.js").Log | import("../DiscordWS/index.js").DiscordWSCodec | import("../../DiscordConfig/index.js").DiscordConfig | import("../../RateLimitStore/index.js").RateLimiter | ShardStore | import("../../index.js").DiscordREST, never, {
7
+ run: import("../../global.js").Effect<never, never, void>;
5
8
  raw: import("callbag-effect-ts/Source").EffectSource<never, never, import("../../types.js").GatewayPayload<any>>;
6
9
  dispatch: import("callbag-effect-ts/Source").EffectSource<never, never, import("../../types.js").GatewayPayload<import("../../types.js").ReceiveEvent>>;
7
10
  send: (p: import("../../types.js").GatewayPayload<any>) => void;
@@ -6,12 +6,12 @@ import * as tsplus_module_5 from "@fp-ts/data/Option";
6
6
  import * as tsplus_module_6 from "callbag-effect-ts/Source/empty";
7
7
  import * as tsplus_module_7 from "@effect/io/Effect";
8
8
  import * as tsplus_module_8 from "callbag-effect-ts/Source/of";
9
- import * as tsplus_module_9 from "dfx/common-gateway";
9
+ import * as tsplus_module_9 from "dfx/gateway";
10
10
  import * as tsplus_module_10 from "callbag-effect-ts/Source/tap";
11
11
  import * as tsplus_module_11 from "callbag-effect-ts/Source/mapEffect";
12
12
  import * as tsplus_module_12 from "callbag-effect-ts/Source/groupBy";
13
13
  import * as tsplus_module_13 from "callbag-effect-ts/Source/chainPar";
14
- import * as tsplus_module_14 from "dfx/common";
14
+ import * as tsplus_module_14 from "dfx";
15
15
  import * as tsplus_module_15 from "callbag-effect-ts/Source/drain";
16
16
  import * as tsplus_module_16 from "callbag-effect-ts/Source/merge";
17
17
  import * as tsplus_module_17 from "callbag-effect-ts/Source/unwrap";
@@ -52,10 +52,9 @@ const spawnEffect = tsplus_module_7.map(({ gateway, config, configs, limiter })
52
52
  reset_after: 0,
53
53
  max_concurrency: 1,
54
54
  },
55
- }))(tsplus_module_7.flatMap((r) => r.json)(tsplus_module_14.Rest.rest
56
- .getGatewayBot())),
55
+ }))(tsplus_module_7.flatMap((r) => r.json)(tsplus_module_14.rest.getGatewayBot())),
57
56
  config: tsplus_module_14.Config.gateway,
58
- limiter: tsplus_module_7.service(tsplus_module_14.RateLimitStore.RateLimiter),
57
+ limiter: tsplus_module_7.service(tsplus_module_14.RateLimit.RateLimiter),
59
58
  })));
60
59
  export const spawn = tsplus_module_13.chainPar((shard) => tsplus_module_16.merge(tsplus_module_15.drain(tsplus_module_1.fromEffect(shard.run)))(tsplus_module_8.of(shard)))(tsplus_module_17.unwrap(spawnEffect));
61
60
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/DiscordGateway/Sharder/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD,MAAM,OAAO,GAAG,CAAC,UAAkB,EAAE,EAAE,qBAE7B,KAAK;IACX,MAAM,OAAO,GAAG,CAAC,YAAoB,EAAE,EAAE,CACvC,wBAMI,CACE,CAAC,EAKD,EAAE,CACF,sBACE,GAAG,EAAE,CACH,sBAGkB,wBAAiB,CAAC,CAAC,EAHrC,wBAAe;QACb,qBAAW,YAAY,CAAC;;KAEhB,CAAC,CAA2B,EACxC,CAAC,EAAE,EAAE,EAAE,CACL,wBAAe;QACb,qBAAW,YAAY,GAAG,CAAC,CAAC;QAC5B,mBAAgB,EAAE,CAAC;KACpB,CAAC,EAVN,CAAC,CAWA,EAxBP,KAAK;SACF,OAAO,CAAC;QACP,UAAU;QACV,YAAY;KACb,CAAC,CAqBD,CAAA;IAEL,OAAO,oBAED,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QACb,EAAE;QACF,UAAU;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AC,CAAC,EAAE,GAAG,CAAC,CAAC,WAAW,EAN/B,oBACA,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAChB,GAAG,MAAM;QACT,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,WAAW,EAAE,OAAO,CAAC,mBAAmB,CAAC,eAAe;KACzD,CAAC,EALG,MAAM,CAKR,CACkC,CAWpC,CAC4B,CAAA;AACjC,CAAC,EA/CiB,qBAmBZ,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,CACvC,OAAO,CAAC,MAAM,CAAC,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,EApB5B,0BAAiB;IACnC,OAAO,EAAE,yBAGG,GAAG,EAAE,CACb,wBAA8C;QAC5C,GAAG,EAAE,2BAA2B;QAChC,MAAM,EAAE,CAAC;QACT,mBAAmB,EAAE;YACnB,KAAK,EAAE,CAAC;YACR,SAAS,EAAE,CAAC;YACZ,WAAW,EAAE,CAAC;YACd,eAAe,EAAE,CAAC;SACnB;KACF,CAAC,EAbG,wBAEE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAFf,iBAAA,IAAI,CACV,aAAa,EAAE,CACO,CAYtB;IACH,MAAM,EAAE,iBAAA,MAAM,CAAC,OAAO;IACtB,OAAO,EAAE,wBAAe,iBAAA,SAAS,CAAC,WAAW,CAAC;CAC/C,CAAC,CAGC,CA0BC,CAAA;AAEJ,MAAM,CAAC,MAAM,KAAK,GAAG,0BAA4B,CAAC,KAAK,EAAE,EAAE,CACzD,8CAA6B,2BAAwB,KAAK,CAAC,GAAG,CAAC,GAA/D,mBAAgB,KAAK,CAAC,CAAgD,0BADnD,WAAW,EAE/B,CAAA"}
@@ -1,6 +1,7 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
2
  /// <reference types="ws" />
3
- import { Ref, EffectSource } from "dfx/common";
3
+ import { Ref } from "@effect/io/Ref";
4
+ import { EffectSource } from "callbag-effect-ts/Source";
4
5
  import WebSocket from "isomorphic-ws";
5
6
  export declare const Reconnect: unique symbol;
6
7
  export type Reconnect = typeof Reconnect;
@@ -21,7 +22,7 @@ export declare class WebSocketWriteError {
21
22
  readonly _tag = "WebSocketWriteError";
22
23
  constructor(reason: Error);
23
24
  }
24
- export declare const make: (url: Ref<string>, options?: WebSocket.ClientOptions) => import("../../common.js").Effect<import("../../Log/index.js").Log, never, {
25
+ export declare const make: (url: Ref<string>, options?: WebSocket.ClientOptions) => import("../../global.js").Effect<import("../../Log/index.js").Log, never, {
25
26
  source: import("callbag-effect-ts/Source").EffectSource<never, WebSocketError | WebSocketCloseError | WebSocketWriteError, WebSocket.RawData>;
26
27
  sink: import("callbag-effect-ts/Sink").EffectSink<never, never, never, Message>;
27
28
  }>;
@@ -4,7 +4,7 @@ import * as tsplus_module_3 from "callbag-effect-ts/Source/async";
4
4
  import * as tsplus_module_4 from "callbag-effect-ts/Source/unwrap";
5
5
  import * as tsplus_module_5 from "callbag-effect-ts/Source/tap";
6
6
  import * as tsplus_module_6 from "callbag-effect-ts/Source/drain";
7
- import * as tsplus_module_7 from "dfx/common";
7
+ import * as tsplus_module_7 from "dfx";
8
8
  import * as tsplus_module_8 from "@effect/io/Schedule";
9
9
  import * as tsplus_module_9 from "callbag-effect-ts/Source/merge";
10
10
  import * as tsplus_module_10 from "callbag-effect-ts/Source/unwrapScope";
@@ -1,8 +1,10 @@
1
- import { EffectSource, Discord, Effect } from "dfx/common";
1
+ import { EffectSource } from "callbag-effect-ts/Source";
2
+ import { Discord } from "dfx";
3
+ import { Effect } from "@effect/io/Effect";
2
4
  import { Success } from "dfx/utils/effect";
3
- export declare const make: import("../common.js").Effect<import("./ShardStore/index.js").ShardStore | import("../index.js").DiscordREST | import("../DiscordConfig/index.js").DiscordConfig | import("../Log/index.js").Log | import("../RateLimitStore/index.js").RateLimiter | import("./DiscordWS/index.js").DiscordWSCodec, never, {
5
+ export declare const make: import("../global.js").Effect<import("../Log/index.js").Log | import("./DiscordWS/index.js").DiscordWSCodec | import("../DiscordConfig/index.js").DiscordConfig | import("../RateLimitStore/index.js").RateLimiter | import("./ShardStore/index.js").ShardStore | import("../index.js").DiscordREST, never, {
4
6
  shards: import("callbag-effect-ts/Source").EffectSource<never, never, {
5
- run: import("../common.js").Effect<never, never, readonly [readonly [readonly [readonly [void, void], void], void], void]>;
7
+ run: import("../global.js").Effect<never, never, void>;
6
8
  raw: import("callbag-effect-ts/Source").EffectSource<never, never, import("../types.js").GatewayPayload<any>>;
7
9
  dispatch: import("callbag-effect-ts/Source").EffectSource<never, never, import("../types.js").GatewayPayload<import("../types.js").ReceiveEvent>>;
8
10
  send: (p: import("../types.js").GatewayPayload<any>) => void;
@@ -11,10 +13,10 @@ export declare const make: import("../common.js").Effect<import("./ShardStore/in
11
13
  raw: import("callbag-effect-ts/Source").EffectSource<never, never, import("../types.js").GatewayPayload<any>>;
12
14
  dispatch: import("callbag-effect-ts/Source").EffectSource<never, never, import("../types.js").GatewayPayload<import("../types.js").ReceiveEvent>>;
13
15
  fromDispatch: <K extends keyof import("../types.js").ReceiveEvents>(event: K) => import("callbag-effect-ts/Source").EffectSource<never, never, import("../types.js").ReceiveEvents[K]>;
14
- handleDispatch: <K_1 extends keyof import("../types.js").ReceiveEvents, R1, E1, A>(event: K_1, handle: (event: import("../types.js").ReceiveEvents[K_1]) => import("../common.js").Effect<R1, E1, A>) => import("../common.js").Effect<R1, E1, void>;
16
+ handleDispatch: <K_1 extends keyof import("../types.js").ReceiveEvents, R1, E1, A>(event: K_1, handle: (event: import("../types.js").ReceiveEvents[K_1]) => import("../global.js").Effect<R1, E1, A>) => import("../global.js").Effect<R1, E1, void>;
15
17
  }>;
16
18
  export interface DiscordGateway extends Success<typeof make> {
17
19
  }
18
- export declare const DiscordGateway: import("../common.js").Tag<DiscordGateway>;
19
- export declare const LiveDiscordGateway: import("../common.js").Layer<import("./ShardStore/index.js").ShardStore | import("../index.js").DiscordREST | import("../DiscordConfig/index.js").DiscordConfig | import("../Log/index.js").Log | import("../RateLimitStore/index.js").RateLimiter | import("./DiscordWS/index.js").DiscordWSCodec, never, DiscordGateway>;
20
- export declare const handleDispatch: <K extends keyof import("../types.js").ReceiveEvents, R1, E1, A>(event: K, handle: (event: import("../types.js").ReceiveEvents[K]) => import("../common.js").Effect<R1, E1, A>) => import("../common.js").Effect<DiscordGateway | R1, E1, void>;
20
+ export declare const DiscordGateway: import("../global.js").Tag<DiscordGateway>;
21
+ export declare const LiveDiscordGateway: import("../global.js").Layer<import("../Log/index.js").Log | import("./DiscordWS/index.js").DiscordWSCodec | import("../DiscordConfig/index.js").DiscordConfig | import("../RateLimitStore/index.js").RateLimiter | import("./ShardStore/index.js").ShardStore | import("../index.js").DiscordREST, never, DiscordGateway>;
22
+ export declare const handleDispatch: <K extends keyof import("../types.js").ReceiveEvents, R1, E1, A>(event: K, handle: (event: import("../types.js").ReceiveEvents[K]) => import("../global.js").Effect<R1, E1, A>) => import("../global.js").Effect<DiscordGateway | R1, E1, void>;
@@ -5,7 +5,7 @@ import * as tsplus_module_4 from "callbag-effect-ts/Source/chainPar";
5
5
  import * as tsplus_module_5 from "callbag-effect-ts/Source/run";
6
6
  import * as tsplus_module_6 from "callbag-effect-ts/Source/share";
7
7
  import * as tsplus_module_7 from "@effect/io/Effect";
8
- import * as tsplus_module_8 from "dfx/common";
8
+ import * as tsplus_module_8 from "@fp-ts/data/Context";
9
9
  import * as tsplus_module_9 from "@effect/io/Layer";
10
10
  import { spawn } from "./Sharder/index.js";
11
11
  const fromDispatchFactory = (source) => (event) => tsplus_module_2.map((p) => p.d)(tsplus_module_1.filter((p) => p.t === event)(source));
@@ -1,12 +1,13 @@
1
- import { Effect, Http } from "dfx/common";
1
+ import { Effect } from "@effect/io/Effect";
2
+ import { Http } from "dfx";
2
3
  import { Success } from "dfx/utils/effect";
3
4
  import { ResponseWithData } from "./types.js";
4
- declare const make: import("../common.js").Effect<import("../DiscordConfig/index.js").DiscordConfig | import("../Log/index.js").Log | import("dfx/RateLimitStore/index").RateLimitStore | import("dfx/RateLimitStore/index").RateLimiter, never, {
5
- request: <A = unknown>(path: string, init?: RequestInit) => import("../common.js").Effect<never, import("../Http/index.js").FetchError | import("../Http/index.js").StatusCodeError | import("../Http/index.js").JsonParseError, ResponseWithData<A>>;
5
+ declare const make: import("../global.js").Effect<import("../Log/index.js").Log | import("../DiscordConfig/index.js").DiscordConfig | import("dfx/RateLimitStore/index").RateLimiter | import("dfx/RateLimitStore/index").RateLimitStore, never, {
6
+ request: <A = unknown>(path: string, init?: RequestInit) => import("../global.js").Effect<never, import("../Http/index.js").FetchError | import("../Http/index.js").StatusCodeError | import("../Http/index.js").JsonParseError, ResponseWithData<A>>;
6
7
  }>;
7
8
  export interface DiscordREST extends Success<typeof make> {
8
9
  }
9
- export declare const DiscordREST: import("../common.js").Tag<DiscordREST>;
10
- export declare const LiveDiscordREST: import("../common.js").Layer<import("../DiscordConfig/index.js").DiscordConfig | import("../Log/index.js").Log | import("dfx/RateLimitStore/index").RateLimitStore | import("dfx/RateLimitStore/index").RateLimiter, never, DiscordREST>;
10
+ export declare const DiscordREST: import("../global.js").Tag<DiscordREST>;
11
+ export declare const LiveDiscordREST: import("../global.js").Layer<import("../Log/index.js").Log | import("../DiscordConfig/index.js").DiscordConfig | import("dfx/RateLimitStore/index").RateLimiter | import("dfx/RateLimitStore/index").RateLimitStore, never, DiscordREST>;
11
12
  export declare const rest: import("../types.js").Endpoints<RequestInit>;
12
13
  export {};
@@ -1,10 +1,11 @@
1
1
  import * as tsplus_module_1 from "@effect/io/Effect";
2
2
  import * as tsplus_module_2 from "@fp-ts/data/Duration";
3
3
  import * as tsplus_module_3 from "@fp-ts/data/Option";
4
- import * as tsplus_module_4 from "dfx/common";
4
+ import * as tsplus_module_4 from "dfx";
5
5
  import * as tsplus_module_5 from "@fp-ts/data/HashSet";
6
6
  import * as tsplus_module_6 from "@effect/io/Ref";
7
- import * as tsplus_module_7 from "@effect/io/Layer";
7
+ import * as tsplus_module_7 from "@fp-ts/data/Context";
8
+ import * as tsplus_module_8 from "@effect/io/Layer";
8
9
  import { millis } from "@fp-ts/data/Duration";
9
10
  import { rateLimitFromHeaders, routeFromConfig, retryAfter } from "./utils.js";
10
11
  import Pkg from "../package.json" assert { type: "json" };
@@ -81,9 +82,9 @@ const make = tsplus_module_1.flatMap(({ token, rest }) => tsplus_module_1.flatMa
81
82
  })))(globalRateLimit))(requestRateLimit(path, init)));
82
83
  return { request };
83
84
  })(tsplus_module_6.make(tsplus_module_5.empty()));
84
- })(tsplus_module_1.service(tsplus_module_4.RateLimitStore.RateLimiter)))(tsplus_module_1.service(tsplus_module_4.RateLimitStore.RateLimitStore)))(tsplus_module_1.service(tsplus_module_4.Log.Log)))(tsplus_module_1.service(tsplus_module_4.Config.DiscordConfig));
85
- export const DiscordREST = tsplus_module_4.Tag();
86
- export const LiveDiscordREST = tsplus_module_7.fromEffect(DiscordREST)(make);
85
+ })(tsplus_module_1.service(tsplus_module_4.RateLimit.RateLimiter)))(tsplus_module_1.service(tsplus_module_4.RateLimit.RateLimitStore)))(tsplus_module_1.service(tsplus_module_4.Log.Log)))(tsplus_module_1.service(tsplus_module_4.Config.DiscordConfig));
86
+ export const DiscordREST = tsplus_module_7.Tag();
87
+ export const LiveDiscordREST = tsplus_module_8.fromEffect(DiscordREST)(make);
87
88
  export const rest = tsplus_module_4.Discord.createRoutes(({ method, url, params, options = {} }) => tsplus_module_1.serviceWithEffect(DiscordREST)(({ request }) => {
88
89
  const hasBody = method !== "GET" && method !== "DELETE";
89
90
  let hasFormData = typeof options?.body?.append === "function";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/DiscordREST/index.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAG7C,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC9E,OAAO,GAAG,MAAM,iBAAiB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;KACF;SAAM,IAAI,WAAW,EAAE;QACtB,IAAI,GAAG,OAAO,CAAC,IAAK,CAAA;QACpB,IAAI,MAAM,EAAE;YACV,CAAC;YAAC,IAAiB,CAAC,MAAM,CAAC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAA;SACnE;KACF;SAAM,IAAI,MAAM,EAAE;QACjB,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;KAC9B;SAAM;QACL,IAAI,GAAG,OAAO,CAAC,IAAK,CAAA;KACrB;IAED,OAAO,OAAO,CAAC,GAAG,GAAG,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE,EAAE;QACxC,MAAM;QACN,OAAO;QACP,IAAI;KACL,CAAC,CAAA;AACJ,CAAC,CAAC,CACL,CAAA"}
@@ -1,4 +1,5 @@
1
- import { Effect, Http } from "dfx/common";
1
+ import { Effect } from "@effect/io/Effect";
2
+ import { Http } from "dfx";
2
3
  import { DiscordREST } from "./index.js";
3
4
  export interface ResponseWithData<A> {
4
5
  response: Response;
@@ -1,9 +1,9 @@
1
1
  export declare const routeFromConfig: (path: string, init: RequestInit) => string;
2
- export declare const numberHeader: (headers: Headers) => (key: string) => import("../common.js").Maybe<number>;
3
- export declare const retryAfter: (headers: Headers) => import("../common.js").Maybe<import("../common.js").Duration>;
4
- export declare const rateLimitFromHeaders: (headers: Headers) => import("../common.js").Maybe<{
2
+ export declare const numberHeader: (headers: Headers) => (key: string) => import("../global.js").Maybe<number>;
3
+ export declare const retryAfter: (headers: Headers) => import("../global.js").Maybe<import("../global.js").Duration>;
4
+ export declare const rateLimitFromHeaders: (headers: Headers) => import("../global.js").Maybe<{
5
5
  readonly bucket: string;
6
- readonly retryAfter: import("../common.js").Duration;
6
+ readonly retryAfter: import("../global.js").Duration;
7
7
  readonly limit: number;
8
8
  readonly remaining: number;
9
9
  }>;