dfx 0.18.1 → 0.19.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 (51) hide show
  1. package/Cache/index.d.ts +19 -19
  2. package/Cache/index.js +14 -14
  3. package/Cache/index.js.map +1 -1
  4. package/Cache/prelude.d.ts +29 -12
  5. package/Cache/prelude.js +104 -18
  6. package/Cache/prelude.js.map +1 -1
  7. package/DiscordGateway/DiscordWS/index.d.ts +1 -1
  8. package/DiscordGateway/Shard/index.d.ts +1 -1
  9. package/DiscordGateway/Shard/index.js +1 -1
  10. package/DiscordGateway/Shard/index.js.map +1 -1
  11. package/DiscordGateway/Sharder/index.d.ts +14 -6
  12. package/DiscordGateway/Sharder/index.js +48 -47
  13. package/DiscordGateway/Sharder/index.js.map +1 -1
  14. package/DiscordGateway/index.d.ts +3 -11
  15. package/DiscordGateway/index.js +3 -7
  16. package/DiscordGateway/index.js.map +1 -1
  17. package/DiscordREST/index.d.ts +178 -6
  18. package/DiscordREST/index.js +61 -61
  19. package/DiscordREST/index.js.map +1 -1
  20. package/DiscordREST/types.d.ts +4 -5
  21. package/Helpers/permissions.d.ts +6 -0
  22. package/Helpers/permissions.js +5 -0
  23. package/Helpers/permissions.js.map +1 -1
  24. package/Http/index.d.ts +14 -7
  25. package/Http/index.js +17 -10
  26. package/Http/index.js.map +1 -1
  27. package/Interactions/gateway.d.ts +2 -2
  28. package/Interactions/gateway.js +7 -7
  29. package/Interactions/gateway.js.map +1 -1
  30. package/Interactions/index.d.ts +5 -3
  31. package/Interactions/index.js +17 -10
  32. package/Interactions/index.js.map +1 -1
  33. package/RateLimit/index.d.ts +0 -1
  34. package/RateLimit/index.js +0 -1
  35. package/RateLimit/index.js.map +1 -1
  36. package/RateLimit/memory.d.ts +2 -2
  37. package/RateLimit/memory.js.map +1 -1
  38. package/gateway.d.ts +6 -6
  39. package/gateway.js +10 -6
  40. package/gateway.js.map +1 -1
  41. package/global.d.ts +1 -1
  42. package/index.d.ts +3 -3
  43. package/index.js +3 -3
  44. package/index.js.map +1 -1
  45. package/package.json +2 -2
  46. package/webhooks.d.ts +3 -3
  47. package/webhooks.js +4 -3
  48. package/webhooks.js.map +1 -1
  49. package/Cache/gateway.d.ts +0 -22
  50. package/Cache/gateway.js +0 -99
  51. package/Cache/gateway.js.map +0 -1
package/Http/index.js CHANGED
@@ -1,4 +1,21 @@
1
1
  import * as tsplus_module_1 from "@effect/io/Effect";
2
+ import * as tsplus_module_2 from "@fp-ts/data/Context";
3
+ import * as tsplus_module_3 from "@effect/io/Layer";
4
+ const make = () => {
5
+ const request = (url, init = {}) => tsplus_module_1.filterOrElseWith((r) => r.status < 300, (r) => tsplus_module_1.fail(new StatusCodeError(r)))(tsplus_module_1.tryCatchPromiseAbort((signal) => fetch(url, {
6
+ ...init,
7
+ signal,
8
+ }), (e) => new FetchError(e)));
9
+ const requestWithJson = (url, init = {}) => tsplus_module_1.map((response) => ({
10
+ response,
11
+ json: json(response),
12
+ blob: blob(response),
13
+ text: tsplus_module_1.promise(() => response.text()),
14
+ }))(request(url, init));
15
+ return { request, requestWithJson };
16
+ };
17
+ export const Http = tsplus_module_2.Tag();
18
+ export const LiveHttp = tsplus_module_3.sync(Http)(make);
2
19
  export class FetchError {
3
20
  reason;
4
21
  _tag = "FetchError";
@@ -15,10 +32,6 @@ export class StatusCodeError {
15
32
  this.code = response.status;
16
33
  }
17
34
  }
18
- export const request = (url, init = {}) => tsplus_module_1.filterOrElseWith((r) => r.status < 300, (r) => tsplus_module_1.fail(new StatusCodeError(r)))(tsplus_module_1.tryCatchPromiseAbort((signal) => fetch(url, {
19
- ...init,
20
- signal,
21
- }), (e) => new FetchError(e)));
22
35
  export class JsonParseError {
23
36
  reason;
24
37
  _tag = "JsonParseError";
@@ -35,10 +48,4 @@ export class BlobError {
35
48
  }
36
49
  }
37
50
  export const blob = (r) => tsplus_module_1.tryCatchPromise(() => r.blob(), (reason) => new BlobError(reason));
38
- export const requestWithJson = (url, init = {}) => tsplus_module_1.map((response) => ({
39
- response,
40
- json: json(response),
41
- blob: blob(response),
42
- text: tsplus_module_1.promise(() => response.text()),
43
- }))(request(url, init));
44
51
  //# sourceMappingURL=index.js.map
package/Http/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Http/index.ts"],"names":[],"mappings":";AAAA,MAAM,OAAO,UAAU;IAEA;IADZ,IAAI,GAAG,YAAY,CAAA;IAC5B,YAAqB,MAAe;QAAf,WAAM,GAAN,MAAM,CAAS;IAAG,CAAC;CACzC;AAED,MAAM,OAAO,eAAe;IAGL;IAFZ,IAAI,GAAG,iBAAiB,CAAA;IACxB,IAAI,CAAQ;IACrB,YAAqB,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;QACrC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAA;IAC7B,CAAC;CACF;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,GAAiB,EAAE,OAAoB,EAAE,EAAE,EAAE,CACnE,iCAQE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,GAAG,EACrB,CAAC,CAAC,EAAE,EAAE,CAAC,qBAAY,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC,EAT5C,qCACE,CAAC,MAAM,EAAE,EAAE,CACT,KAAK,CAAC,GAAG,EAAE;IACT,GAAG,IAAI;IACP,MAAM;CACP,CAAC,EACJ,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,CACzB,CAGA,CAAA;AAEH,MAAM,OAAO,cAAc;IAEJ;IADZ,IAAI,GAAG,gBAAgB,CAAA;IAChC,YAAqB,MAAe;QAAf,WAAM,GAAN,MAAM,CAAS;IAAG,CAAC;CACzC;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,CAAc,CAAW,EAAE,EAAE,CAC/C,gCACE,GAAe,EAAE,CAAC,CAAC,CAAC,IAAI,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M,EAAE,EAAE,CAAC,IAAI,cAAc,CAAC,MAAM,CAAC,CACvC,CAAA;AAEH,MAAM,OAAO,SAAS;IAEC;IADZ,IAAI,GAAG,WAAW,CAAA;IAC3B,YAAqB,MAAe;QAAf,WAAM,GAAN,MAAM,CAAS;IAAG,CAAC;CACzC;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAW,EAAE,EAAE,CAClC,gCACE,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,CAClC,CAAA"}
@@ -1,8 +1,8 @@
1
1
  import { Effect } from "@effect/io/Effect";
2
- import { DiscordREST, Discord, Http } from "dfx";
2
+ import { DiscordREST, Discord, FetchError, StatusCodeError, JsonParseError } from "dfx";
3
3
  import { DefinitionNotFound } from "./handlers.js";
4
4
  import { InteractionBuilder } from "./index.js";
5
5
  export interface RunOpts {
6
6
  sync?: boolean;
7
7
  }
8
- export declare const run: <R, R2, E, E2>(postHandler: (effect: import("../global.js").Effect<import("../types.js").Interaction | import("../index.js").DiscordREST | R, import("../Http/index.js").FetchError | import("../Http/index.js").StatusCodeError | import("../Http/index.js").JsonParseError | DefinitionNotFound | E, void>) => import("../global.js").Effect<R2, E2, void>, { sync }?: RunOpts) => (ix: InteractionBuilder<R, E>) => import("../global.js").Effect<import("../index.js").DiscordREST | import("../DiscordGateway/index.js").DiscordGateway | Exclude<R2, import("../types.js").Interaction>, import("../Http/index.js").FetchError | import("../Http/index.js").StatusCodeError | import("../Http/index.js").JsonParseError | E2, void>;
8
+ export declare const run: <R, R2, E, E2>(postHandler: (effect: import("../global.js").Effect<import("../index.js").DiscordREST | import("../types.js").Interaction | R, import("../index.js").FetchError | import("../index.js").StatusCodeError | import("../index.js").JsonParseError | DefinitionNotFound | E, void>) => import("../global.js").Effect<R2, E2, void>, { sync }?: RunOpts) => (ix: InteractionBuilder<R, E>) => import("../global.js").Effect<import("../index.js").DiscordREST | import("../DiscordGateway/index.js").DiscordGateway | Exclude<R2, import("../types.js").Interaction>, import("../index.js").FetchError | import("../index.js").StatusCodeError | import("../index.js").JsonParseError | E2, void>;
@@ -1,22 +1,22 @@
1
1
  import * as tsplus_module_1 from "@effect/io/Effect";
2
- import * as tsplus_module_2 from "dfx";
3
- import * as tsplus_module_3 from "@fp-ts/data/Function";
2
+ import * as tsplus_module_2 from "@fp-ts/data/Function";
3
+ import * as tsplus_module_3 from "dfx";
4
4
  import * as tsplus_module_4 from "dfx/gateway";
5
5
  import { handlers } from "./handlers.js";
6
6
  import { InteractionContext } from "./index.js";
7
7
  import { splitDefinitions } from "./utils.js";
8
8
  export const run = (postHandler, { sync = true } = {}) => (ix) => (() => {
9
9
  const { GlobalApplicationCommand, GuildApplicationCommand } = splitDefinitions(ix.definitions);
10
- return tsplus_module_1.flatMap(application => {
11
- const globalSync = tsplus_module_2.rest.bulkOverwriteGlobalApplicationCommands(application.id, {
10
+ return tsplus_module_1.flatMap(gateway => tsplus_module_1.flatMap(rest => tsplus_module_1.flatMap(application => {
11
+ const globalSync = rest.bulkOverwriteGlobalApplicationCommands(application.id, {
12
12
  body: JSON.stringify(GlobalApplicationCommand.map((a) => a.command)),
13
13
  });
14
14
  const guildSync = GuildApplicationCommand.length
15
- ? tsplus_module_4.Gateway.handleDispatch("GUILD_CREATE", (a) => tsplus_module_2.rest.bulkOverwriteGuildApplicationCommands(application.id, a.id, GuildApplicationCommand.map((a) => a.command)))
15
+ ? gateway.handleDispatch("GUILD_CREATE", (a) => rest.bulkOverwriteGuildApplicationCommands(application.id, a.id, GuildApplicationCommand.map((a) => a.command)))
16
16
  : tsplus_module_1.unit();
17
17
  const handle = handlers(ix.definitions);
18
- const run = tsplus_module_4.Gateway.handleDispatch("INTERACTION_CREATE", (i) => tsplus_module_3.pipe(tsplus_module_1.tap((r) => tsplus_module_2.rest.createInteractionResponse(i.id, i.token, r))(handle[i.type](i)), postHandler, tsplus_module_1.provideService(InteractionContext)(i)));
18
+ const run = gateway.handleDispatch("INTERACTION_CREATE", (i) => tsplus_module_2.pipe(tsplus_module_1.tap((r) => rest.createInteractionResponse(i.id, i.token, r))(handle[i.type](i)), postHandler, tsplus_module_1.provideService(InteractionContext)(i)));
19
19
  return tsplus_module_1.map(() => void 0)(sync ? tsplus_module_1.zipPar(guildSync)(tsplus_module_1.zipPar(globalSync)(run)) : run);
20
- })(tsplus_module_1.flatMap((a) => a.json)(tsplus_module_2.rest.getCurrentBotApplicationInformation()));
20
+ })(tsplus_module_1.flatMap((a) => a.json)(rest.getCurrentBotApplicationInformation())))(tsplus_module_1.service(tsplus_module_3.DiscordREST)))(tsplus_module_1.service(tsplus_module_4.Gateway.DiscordGateway));
21
21
  })();
22
22
  //# sourceMappingURL=gateway.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"gateway.js","sourceRoot":"","sources":["../../src/Interactions/gateway.ts"],"names":[],"mappings":";;;;AAAA,OAAO,EAAsB,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC5D,OAAO,EAAsB,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAM7C,MAAM,CAAC,MAAM,GAAG,GACd,CACE,WAUyB,EACzB,EAAE,IAAI,GAAG,IAAI,KAAc,EAAE,EAC7B,EAAE,CACJ,CAAC,EAA4B,EAAE,EAAE;IAE7B,MAAM,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,GACzD,gBAAgB,CAAC,EAAE,CAAC,WAAW,CAAC,CAAA;mCAE5B,WAAW;QAIjB,MAAM,UAAU,GAAG,gBAAA,IAAI,CAAC,sCAAsC,CAC5D,WAAW,CAAC,EAAE,EACd;YACE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,wBAAwB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;SACrE,CACF,CAAA;QAED,MAAM,SAAS,GAAG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AW,EACX,+BAAsB,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAC7C,CACF,CAAA;iDAEC,IAAI,CAAC,CAAC,CAAC,uBAA8B,SAAS,EAAvC,uBAAW,UAAU,EAArB,GAAG,CAAmB,CAAkB,CAAC,CAAC,CAAC,GAAG;OAhCrD,wBAAmD,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAhE,IAAI,CAAC,mCAAmC,EAAE,CAAuB,GAHpD,wCAAe,WAAW,CAAC,GADxB,wBAAe,gBAAA,OAAO,CAAC,cAAc,CAAC;IAqCxD,CAAA"}
@@ -1,4 +1,5 @@
1
- import { rest, Discord } from "dfx";
1
+ import { Effect } from "@effect/io/Effect";
2
+ import { DiscordREST, Discord } from "dfx";
2
3
  import * as D from "./definitions.js";
3
4
  export * from "./context.js";
4
5
  export { global, guild, messageComponent, modalSubmit, autocomplete, InteractionDefinition, } from "./definitions.js";
@@ -7,8 +8,9 @@ export declare class InteractionBuilder<R, E> {
7
8
  readonly definitions: D.InteractionDefinition<R, E>[];
8
9
  constructor(definitions: D.InteractionDefinition<R, E>[]);
9
10
  add<R1, E1>(definition: D.InteractionDefinition<R1, E1>): InteractionBuilder<R | R1, E | E1>;
10
- get syncGlobal(): import("../global.js").Effect<import("../index.js").DiscordREST, import("../Http/index.js").FetchError | import("../Http/index.js").StatusCodeError | import("../Http/index.js").JsonParseError, import("../DiscordREST/types.js").ResponseWithData<import("../types.js").ApplicationCommand[]>>;
11
- syncGuild(appId: Discord.Snowflake, guildId: Discord.Snowflake): import("../DiscordREST/types.js").RestResponse<import("../types.js").ApplicationCommand[]>;
11
+ concat<R1, E1>(builder: InteractionBuilder<R1, E1>): InteractionBuilder<R | R1, E | E1>;
12
+ get syncGlobal(): import("../global.js").Effect<import("../index.js").DiscordREST, import("../index.js").FetchError | import("../index.js").StatusCodeError | import("../index.js").JsonParseError, import("../DiscordREST/types.js").ResponseWithData<import("../types.js").ApplicationCommand[]>>;
13
+ syncGuild(appId: Discord.Snowflake, guildId: Discord.Snowflake): import("../global.js").Effect<import("../index.js").DiscordREST, import("../index.js").FetchError | import("../index.js").StatusCodeError | import("../index.js").JsonParseError, import("../DiscordREST/types.js").ResponseWithData<import("../types.js").ApplicationCommand[]>>;
12
14
  }
13
15
  export declare const builder: InteractionBuilder<never, never>;
14
16
  export declare const id: (query: string) => (customId: string) => import("../global.js").Effect<never, never, boolean>;
@@ -1,5 +1,5 @@
1
- import * as tsplus_module_1 from "dfx";
2
- import * as tsplus_module_2 from "@effect/io/Effect";
1
+ import * as tsplus_module_1 from "@effect/io/Effect";
2
+ import * as tsplus_module_2 from "dfx";
3
3
  export * from "./context.js";
4
4
  export { global, guild, messageComponent, modalSubmit, autocomplete, } from "./definitions.js";
5
5
  export { response as r } from "../Helpers/interactions.js";
@@ -14,26 +14,33 @@ export class InteractionBuilder {
14
14
  definition,
15
15
  ]);
16
16
  }
17
+ concat(builder) {
18
+ return new InteractionBuilder([
19
+ ...this.definitions,
20
+ ...builder.definitions,
21
+ ]);
22
+ }
17
23
  get syncGlobal() {
18
24
  const commands = this.definitions
19
25
  .filter((c) => c._tag === "GlobalApplicationCommand")
20
26
  .map((c) => c.command);
21
- return tsplus_module_2.flatMap((app) => tsplus_module_1.rest.bulkOverwriteGlobalApplicationCommands(app.id, {
27
+ return tsplus_module_1.serviceWithEffect(tsplus_module_2.DiscordREST)((rest) => tsplus_module_1.flatMap((app) => rest.bulkOverwriteGlobalApplicationCommands(app.id, {
22
28
  body: JSON.stringify(commands),
23
- }))(tsplus_module_2.flatMap((r) => r.json)(tsplus_module_1.rest.getCurrentBotApplicationInformation()));
29
+ }))(tsplus_module_1.flatMap((r) => r.json)(rest
30
+ .getCurrentBotApplicationInformation())));
24
31
  }
25
32
  syncGuild(appId, guildId) {
26
33
  const commands = this.definitions
27
34
  .filter((c) => c._tag === "GuildApplicationCommand")
28
35
  .map((c) => c.command);
29
- return tsplus_module_1.rest.bulkOverwriteGuildApplicationCommands(appId, guildId, commands);
36
+ return tsplus_module_1.serviceWithEffect(tsplus_module_2.DiscordREST)((rest) => rest.bulkOverwriteGuildApplicationCommands(appId, guildId, commands));
30
37
  }
31
38
  }
32
39
  export const builder = new InteractionBuilder([]);
33
40
  // Filters
34
- export const id = (query) => (customId) => tsplus_module_2.succeed(query === customId);
35
- export const idStartsWith = (query) => (customId) => tsplus_module_2.succeed(customId.startsWith(query));
36
- export const idRegex = (query) => (customId) => tsplus_module_2.succeed(query.test(customId));
37
- export const option = (command, optionName) => (data, focusedOption) => tsplus_module_2.succeed(data.name === command && focusedOption.name === optionName);
38
- export const optionOnly = (optionName) => (_, focusedOption) => tsplus_module_2.succeed(focusedOption.name === optionName);
41
+ export const id = (query) => (customId) => tsplus_module_1.succeed(query === customId);
42
+ export const idStartsWith = (query) => (customId) => tsplus_module_1.succeed(customId.startsWith(query));
43
+ export const idRegex = (query) => (customId) => tsplus_module_1.succeed(query.test(customId));
44
+ export const option = (command, optionName) => (data, focusedOption) => tsplus_module_1.succeed(data.name === command && focusedOption.name === optionName);
45
+ export const optionOnly = (optionName) => (_, focusedOption) => tsplus_module_1.succeed(focusedOption.name === optionName);
39
46
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Interactions/index.ts"],"names":[],"mappings":";;AAEA,cAAc,cAAc,CAAA;AAE5B,OAAO,EACL,MAAM,EACN,KAAK,EACL,gBAAgB,EAChB,WAAW,EACX,YAAY,GAEb,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,QAAQ,IAAI,CAAC,EAAE,MAAM,4BAA4B,CAAA;AAE1D,MAAM,OAAO,kBAAkB;IACR;IAArB,YAAqB,WAA4C;QAA5C,gBAAW,GAAX,WAAW,CAAiC;IAAG,CAAC;IAErE,GAAG,CAAS,UAA2C;QACrD,OAAO,IAAI,kBAAkB,CAAiB;YAC5C,GAAG,IAAI,CAAC,WAAW;YACnB,UAAU;SACX,CAAC,CAAA;IAC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QAAgB,EAAE,EAAE,CAClE,wBAAe,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAA;AAE5C,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,CAAC,QAAgB,EAAE,EAAE,CAC7D,wBAAe,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEtC,MAAM,CAAC,MAAM,MAAM,GACjB,CAAC,OAAe,EAAE,UAAkB,EAAE,EAAE,CACxC,CACE,IAAmD,EACnD,aAGC,EACD,EAAE,CACF,wBAAe,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,aAAa,CAAC,IAAI,KAAK,UAAU,CAAC,CAAA;AAE9E,MAAM,CAAC,MAAM,UAAU,GACrB,CAAC,UAAkB,EAAE,EAAE,CACvB,CACE,CAAU,EACV,aAGC,EACD,EAAE,CACF,wBAAe,aAAa,CAAC,IAAI,KAAK,UAAU,CAAC,CAAA"}
@@ -23,5 +23,4 @@ export interface RateLimiter extends Success<typeof makeLimiter> {
23
23
  }
24
24
  export declare const RateLimiter: import("../global.js").Tag<RateLimiter>;
25
25
  export declare const LiveRateLimiter: import("../global.js").Layer<import("../Log/index.js").Log | RateLimitStore, never, RateLimiter>;
26
- export declare const maybeWait: (key: string, window: Duration, limit: number) => import("../global.js").Effect<RateLimiter, never, void>;
27
26
  export {};
@@ -22,5 +22,4 @@ const makeLimiter = tsplus_module_3.flatMap(store => tsplus_module_3.map(log =>
22
22
  })(tsplus_module_3.service(tsplus_module_4.Log.Log)))(tsplus_module_3.service(RateLimitStore));
23
23
  export const RateLimiter = tsplus_module_1.Tag();
24
24
  export const LiveRateLimiter = tsplus_module_2.fromEffect(RateLimiter)(makeLimiter);
25
- export const maybeWait = (key, window, limit) => tsplus_module_3.serviceWithEffect(RateLimiter)((a) => a.maybeWait(key, window, limit));
26
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":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AG,CAAC,GAAG,CAAC,GADrB,wBAAe,cAAc,CAAC,CA0B9C,CAAA;AAGF,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAA,GAAG,EAAe,CAAA;AAC7C,MAAM,CAAC,MAAM,eAAe,GAAG,2BAAiB,WAAW,CAAC,CAAC,WAAW,CAAC,CAAA"}
@@ -1,2 +1,2 @@
1
- import { RateLimit } from "dfx";
2
- export declare const make: () => RateLimit.RateLimitStore;
1
+ import { RateLimitStore, BucketDetails } from "dfx";
2
+ export declare const make: () => RateLimitStore;
@@ -1 +1 @@
1
- {"version":3,"file":"memory.js","sourceRoot":"","sources":["../../src/RateLimit/memory.ts"],"names":[],"mappings":";;AAKA,MAAM,CAAC,MAAM,IAAI,GAAG,GAA6B,EAAE;IACjD,MAAM,OAAO,GAAG,IAAI,GAAG,EAAmC,CAAA;IAC1D,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAA;IACxC,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAmB,CAAA;IAE3C,MAAM,UAAU,GAAG,CAAC,GAAW,EAAE,EAAE,CACjC,uBAA6C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,EAA1E,6BAAmB,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAsC,CAAA;IAE7E,OAAO;QACL,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,qBAAY,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAEvD,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE,CACpB,qBAAY,GAAG,EAAE;YACf,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;QACjC,CAAC,CAAC;QAEJ,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE,CAC3B,qBAAY,GAAG,EAAE,CAAC,6BAAmB,OAAO,CAAC,GAAG,CAA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C,CAAA;YAC/B,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,GAAG,UAAU,CAAA;YAC5C,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,GAAG,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAA;YAEjD,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,GAAG,CAAC,CAAA;QAC/B,CAAC,CAAC;KACL,CAAA;AACH,CAAC,CAAA"}
package/gateway.d.ts CHANGED
@@ -4,11 +4,11 @@ export * as DiscordWS from "./DiscordGateway/DiscordWS/index.js";
4
4
  export * as Shard from "./DiscordGateway/Shard/index.js";
5
5
  export * as ShardStore from "./DiscordGateway/ShardStore/index.js";
6
6
  export * as Gateway from "./DiscordGateway/index.js";
7
- export * as CacheOps from "./Cache/gateway.js";
8
7
  export * as CachePrelude from "./Cache/prelude.js";
9
8
  export { run as runIx } from "./Interactions/gateway.js";
10
- export declare const LiveRateLimit: import("./global.js").Layer<import("./Log/index.js").Log, never, import("./RateLimit/index.js").RateLimiter | import("./RateLimit/index.js").RateLimitStore>;
11
- export declare const LiveREST: import("./global.js").Layer<import("./Log/index.js").Log | import("./DiscordConfig/index.js").DiscordConfig, never, import("./RateLimit/index.js").RateLimiter | import("./RateLimit/index.js").RateLimitStore | import("./index.js").DiscordREST>;
12
- export declare const LiveGateway: import("./global.js").Layer<import("./Log/index.js").Log | import("./RateLimit/index.js").RateLimiter | import("./DiscordConfig/index.js").DiscordConfig | import("./index.js").DiscordREST, never, import("./DiscordGateway/DiscordWS/index.js").DiscordWSCodec | import("./DiscordGateway/ShardStore/index.js").ShardStore | import("./DiscordGateway/index.js").DiscordGateway>;
13
- export declare const LiveBot: import("./global.js").Layer<import("./Log/index.js").Log | import("./DiscordConfig/index.js").DiscordConfig, never, import("./DiscordGateway/DiscordWS/index.js").DiscordWSCodec | import("./RateLimit/index.js").RateLimiter | import("./RateLimit/index.js").RateLimitStore | import("./DiscordGateway/ShardStore/index.js").ShardStore | import("./index.js").DiscordREST | import("./DiscordGateway/index.js").DiscordGateway>;
14
- export declare const make: (config: Config.MakeOpts, debug?: boolean) => import("./global.js").Layer<never, never, import("./Log/index.js").Log | import("./DiscordGateway/DiscordWS/index.js").DiscordWSCodec | import("./RateLimit/index.js").RateLimiter | import("./RateLimit/index.js").RateLimitStore | import("./DiscordConfig/index.js").DiscordConfig | import("./DiscordGateway/ShardStore/index.js").ShardStore | import("./index.js").DiscordREST | import("./DiscordGateway/index.js").DiscordGateway>;
9
+ export declare const MemoryRateLimit: import("./global.js").Layer<import("./Log/index.js").Log, never, import("./index.js").RateLimitStore | import("./index.js").RateLimiter>;
10
+ export declare const MemoryREST: import("./global.js").Layer<import("./Log/index.js").Log | import("./DiscordConfig/index.js").DiscordConfig, never, import("./index.js").DiscordREST>;
11
+ export declare const MemorySharder: import("./global.js").Layer<import("./Log/index.js").Log | import("./DiscordConfig/index.js").DiscordConfig, never, import("./DiscordGateway/Sharder/index.js").Sharder>;
12
+ export declare const MemoryGateway: import("./global.js").Layer<import("./Log/index.js").Log | import("./DiscordConfig/index.js").DiscordConfig, never, import("./DiscordGateway/index.js").DiscordGateway>;
13
+ export declare const MemoryBot: import("./global.js").Layer<import("./Log/index.js").Log | import("./DiscordConfig/index.js").DiscordConfig, never, import("./index.js").DiscordREST | import("./index.js").RateLimitStore | import("./index.js").RateLimiter | import("./DiscordGateway/index.js").DiscordGateway>;
14
+ export declare const make: (config: Config.MakeOpts, debug?: boolean) => import("./global.js").Layer<never, never, import("./Log/index.js").Log | import("./DiscordConfig/index.js").DiscordConfig | import("./index.js").DiscordREST | import("./index.js").RateLimitStore | import("./index.js").RateLimiter | import("./DiscordGateway/index.js").DiscordGateway>;
package/gateway.js CHANGED
@@ -1,22 +1,26 @@
1
1
  import * as tsplus_module_1 from "dfx";
2
2
  import * as tsplus_module_2 from "@effect/io/Layer";
3
3
  import * as tsplus_module_3 from "dfx/gateway";
4
+ import { LiveJsonDiscordWSCodec } from "./DiscordGateway/DiscordWS/index.js";
5
+ import { LiveSharder } from "./DiscordGateway/Sharder/index.js";
6
+ import { LiveMemoryShardStore } from "./DiscordGateway/ShardStore/index.js";
7
+ import { LiveHttp } from "./Http/index.js";
4
8
  export * as WS from "./DiscordGateway/WS/index.js";
5
9
  export * as DiscordWS from "./DiscordGateway/DiscordWS/index.js";
6
10
  export * as Shard from "./DiscordGateway/Shard/index.js";
7
11
  export * as ShardStore from "./DiscordGateway/ShardStore/index.js";
8
12
  export * as Gateway from "./DiscordGateway/index.js";
9
- export * as CacheOps from "./Cache/gateway.js";
10
13
  export * as CachePrelude from "./Cache/prelude.js";
11
14
  export { run as runIx } from "./Interactions/gateway.js";
12
- export const LiveRateLimit = tsplus_module_2.provideToAndMerge(tsplus_module_1.RateLimit.LiveRateLimiter)(tsplus_module_1.RateLimit.LiveMemoryRateLimitStore);
13
- export const LiveREST = tsplus_module_2.provideToAndMerge(tsplus_module_1.LiveDiscordREST)(LiveRateLimit);
14
- export const LiveGateway = tsplus_module_2.provideToAndMerge(tsplus_module_3.Gateway.LiveDiscordGateway)(tsplus_module_2.merge(tsplus_module_3.DiscordWS.LiveJsonDiscordWSCodec)(tsplus_module_3.ShardStore.LiveMemoryShardStore));
15
- export const LiveBot = tsplus_module_2.provideToAndMerge(LiveGateway)(LiveREST);
15
+ export const MemoryRateLimit = tsplus_module_2.provideToAndMerge(tsplus_module_1.LiveRateLimiter)(tsplus_module_1.LiveMemoryRateLimitStore);
16
+ export const MemoryREST = tsplus_module_2.provideTo(tsplus_module_1.LiveDiscordREST)((tsplus_module_2.merge(MemoryRateLimit)(LiveHttp)));
17
+ export const MemorySharder = tsplus_module_2.provideTo(LiveSharder)((tsplus_module_2.merge(LiveJsonDiscordWSCodec)(tsplus_module_2.merge(MemoryRateLimit)(tsplus_module_2.merge(LiveMemoryShardStore)(MemoryREST)))));
18
+ export const MemoryGateway = tsplus_module_2.provideTo(tsplus_module_3.Gateway.LiveDiscordGateway)(MemorySharder);
19
+ export const MemoryBot = tsplus_module_2.provideToAndMerge(tsplus_module_2.merge(MemoryRateLimit)(MemoryGateway))(MemoryREST);
16
20
  export const make = (config, debug = false) => {
17
21
  const LiveLog = debug ? tsplus_module_1.Log.LiveLogDebug : tsplus_module_1.Log.LiveLog;
18
22
  const LiveConfig = tsplus_module_1.Config.makeLayer(config);
19
- const LiveEnv = tsplus_module_2.provideToAndMerge(LiveBot)(tsplus_module_2.merge(LiveConfig)(LiveLog));
23
+ const LiveEnv = tsplus_module_2.provideToAndMerge(MemoryBot)(tsplus_module_2.merge(LiveConfig)(LiveLog));
20
24
  return LiveEnv;
21
25
  };
22
26
  //# sourceMappingURL=gateway.js.map
package/gateway.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"gateway.js","sourceRoot":"","sources":["../src/gateway.ts"],"names":[],"mappings":";;;AAAA,OAAO,KAAK,EAAE,MAAM,8BAA8B,CAAA;AAClD,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAA;AAChE,OAAO,KAAK,KAAK,MAAM,iCAAiC,CAAA;AACxD,OAAO,KAAK,UAAU,MAAM,sCAAsC,CAAA;AAClE,OAAO,KAAK,OAAO,MAAM,2BAA2B,CAAA;AACpD,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAA;AAC9C,OAAO,KAAK,YAAY,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,GAAG,IAAI,KAAK,EAAE,MAAM,2BAA2B,CAAA;AAExD,MAAM,CAAC,MAAM,aAAa,qCACa,gBAAA,SAAS,CAAC,eAAe,EAA9D,gBAAA,SAAS,CAAC,wBAAwB,CAA4B,CAAA;AAEhE,MAAM,CAAC,MAAM,QAAQ,qDAAmB,eAAe,EAA/B,aAAa,CAAkB,CAAA;AAEvD,MAAM,CAAC,MAAM,WAAW,qCAEtB,gBAAA,OAAO,CAAC,kBAAkB,wBADQ,gBAAA,SAAS,CAAC,sBAAsB,EAAlE,gBAAA,UAAU,CAAC,oBAAoB,EACL,CAAA;AAE5B,MAAM,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,CAAmB,CAAA;AAEzE,MAAM,CAAC,MAAM,aAAa,6BAKxB,WAAW,EAJX,uBAGE,sBAAsB,wBADtB,eAAe,wBADf,oBAAoB,EADrB,UAAU,IAGc,CACd,CAAA;AAEb,MAAM,CAAC,MAAM,aAAa,6BAAoB,gBAAA,OAAO,CAAC,kBAAkB,EAA3C,aAAa,CAA8B,CAAA;AAExE,MAAM,CAAC,MAAM,SAAS,2DAAgC,eAAe,EAA/B,aAAa,GAA1B,UAAU,CAAkC,CAAA;AAErE,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,MAAuB,EAAE,KAAK,GAAG,KAAK,EAAE,EAAE;IAC7D,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,gBAAA,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,gBAAA,GAAG,CAAC,OAAO,CAAA;IACtD,MAAM,UAAU,GAAG,gBAAA,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;IAC3C,MAAM,OAAO,qCAA0B,SAAS,wBAAtB,UAAU,EAApB,OAAO,EAAyB,CAAA;IAEhD,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"}
package/global.d.ts CHANGED
@@ -69,7 +69,7 @@ import type { HashSet } from "@fp-ts/data/HashSet";
69
69
  /**
70
70
  * @tsplus global
71
71
  */
72
- import { RateLimit, rest, Discord, Http, DiscordREST, LiveDiscordREST, Ix, Config, Log, IxHelpers, Flags, Members, Cache, } from "dfx";
72
+ import { BucketDetails, RateLimitStore, LiveMemoryRateLimitStore, RateLimiter, LiveRateLimiter, Discord, Http, LiveHttp, FetchError, StatusCodeError, JsonParseError, BlobError, DiscordREST, LiveDiscordREST, Ix, Config, Log, IxHelpers, Flags, Members, Cache, } from "dfx";
73
73
  /**
74
74
  * @tsplus global
75
75
  */
package/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  export * as Discord from "./types.js";
2
2
  export * as Config from "./DiscordConfig/index.js";
3
- export * as Http from "./Http/index.js";
4
- export { DiscordREST, LiveDiscordREST, rest } from "./DiscordREST/index.js";
3
+ export { Http, LiveHttp, FetchError, StatusCodeError, JsonParseError, BlobError, } from "./Http/index.js";
4
+ export { DiscordREST, LiveDiscordREST } from "./DiscordREST/index.js";
5
5
  export * as Ix from "./Interactions/index.js";
6
6
  export * as Log from "./Log/index.js";
7
- export * as RateLimit from "./RateLimit/index.js";
7
+ export { BucketDetails, RateLimitStore, LiveMemoryRateLimitStore, RateLimiter, LiveRateLimiter, } from "./RateLimit/index.js";
8
8
  export * as Cache from "./Cache/index.js";
9
9
  export * as Flags from "./Helpers/flags.js";
10
10
  export * as Intents from "./Helpers/intents.js";
package/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  export * as Discord from "./types.js";
2
2
  export * as Config from "./DiscordConfig/index.js";
3
- export * as Http from "./Http/index.js";
4
- export { DiscordREST, LiveDiscordREST, rest } from "./DiscordREST/index.js";
3
+ export { Http, LiveHttp, FetchError, StatusCodeError, JsonParseError, BlobError, } from "./Http/index.js";
4
+ export { DiscordREST, LiveDiscordREST } from "./DiscordREST/index.js";
5
5
  export * as Ix from "./Interactions/index.js";
6
6
  export * as Log from "./Log/index.js";
7
- export * as RateLimit from "./RateLimit/index.js";
7
+ export { RateLimitStore, LiveMemoryRateLimitStore, RateLimiter, LiveRateLimiter, } from "./RateLimit/index.js";
8
8
  export * as Cache from "./Cache/index.js";
9
9
  export * as Flags from "./Helpers/flags.js";
10
10
  export * as Intents from "./Helpers/intents.js";
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,YAAY,CAAA;AAErC,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAA;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAC3E,OAAO,KAA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,iBAAiB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dfx",
3
- "version": "0.18.1",
3
+ "version": "0.19.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -49,5 +49,5 @@
49
49
  "@fp-ts/data": "^0.0.25"
50
50
  }
51
51
  },
52
- "gitHead": "acfecfbba7d2ad87bc95c80158f9930d270aeb5f"
52
+ "gitHead": "ca45ad5ac6014868ede9ad685ace97d539b43776"
53
53
  }
package/webhooks.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Config } from "dfx";
2
2
  import { MakeConfigOpts } from "./Interactions/webhook.js";
3
3
  export { makeConfigLayer, makeHandler, makeSimpleHandler, WebhookConfig, WebhookParseError, BadWebhookSignature, } from "./Interactions/webhook.js";
4
- export declare const LiveRateLimit: import("./global.js").Layer<import("./Log/index.js").Log, never, import("./RateLimit/index.js").RateLimiter | import("./RateLimit/index.js").RateLimitStore>;
5
- export declare const LiveREST: import("./global.js").Layer<import("./Log/index.js").Log | import("./DiscordConfig/index.js").DiscordConfig, never, import("./RateLimit/index.js").RateLimiter | import("./RateLimit/index.js").RateLimitStore | import("./index.js").DiscordREST>;
6
- export declare const make: (config: Config.MakeOpts & MakeConfigOpts, debug?: boolean) => import("./global.js").Layer<never, never, import("./Log/index.js").Log | import("./RateLimit/index.js").RateLimiter | import("./RateLimit/index.js").RateLimitStore | import("./DiscordConfig/index.js").DiscordConfig | import("./index.js").DiscordREST | import("./Interactions/webhook.js").WebhookConfig>;
4
+ export declare const MemoryRateLimit: import("./global.js").Layer<import("./Log/index.js").Log, never, import("./index.js").RateLimitStore | import("./index.js").RateLimiter>;
5
+ export declare const MemoryREST: import("./global.js").Layer<import("./Log/index.js").Log | import("./DiscordConfig/index.js").DiscordConfig, never, import("./index.js").DiscordREST>;
6
+ export declare const make: (config: Config.MakeOpts & MakeConfigOpts, debug?: boolean) => import("./global.js").Layer<never, never, import("./index.js").DiscordREST | import("./index.js").RateLimitStore | import("./index.js").RateLimiter | import("./Interactions/webhook.js").WebhookConfig>;
package/webhooks.js CHANGED
@@ -1,14 +1,15 @@
1
1
  import * as tsplus_module_1 from "dfx";
2
2
  import * as tsplus_module_2 from "@effect/io/Layer";
3
+ import { LiveHttp } from "./Http/index.js";
3
4
  import { makeConfigLayer } from "./Interactions/webhook.js";
4
5
  export { makeConfigLayer, makeHandler, makeSimpleHandler, WebhookConfig, WebhookParseError, BadWebhookSignature, } from "./Interactions/webhook.js";
5
- export const LiveRateLimit = tsplus_module_2.provideToAndMerge(tsplus_module_1.RateLimit.LiveRateLimiter)(tsplus_module_1.RateLimit.LiveMemoryRateLimitStore);
6
- export const LiveREST = tsplus_module_2.provideToAndMerge(tsplus_module_1.LiveDiscordREST)(LiveRateLimit);
6
+ export const MemoryRateLimit = tsplus_module_2.provideToAndMerge(tsplus_module_1.LiveRateLimiter)(tsplus_module_1.LiveMemoryRateLimitStore);
7
+ export const MemoryREST = tsplus_module_2.provideTo(tsplus_module_1.LiveDiscordREST)((tsplus_module_2.merge(LiveHttp)(MemoryRateLimit)));
7
8
  export const make = (config, debug = false) => {
8
9
  const LiveWebhook = makeConfigLayer(config);
9
10
  const LiveLog = debug ? tsplus_module_1.Log.LiveLogDebug : tsplus_module_1.Log.LiveLog;
10
11
  const LiveConfig = tsplus_module_1.Config.makeLayer(config);
11
- const LiveEnv = tsplus_module_2.provideToAndMerge(LiveREST)(tsplus_module_2.merge(LiveWebhook)(tsplus_module_2.merge(LiveConfig)(LiveLog)));
12
+ const LiveEnv = tsplus_module_2.provideTo((tsplus_module_2.merge(MemoryRateLimit)(tsplus_module_2.merge(LiveWebhook)(MemoryREST))))((tsplus_module_2.merge(LiveConfig)(LiveLog)));
12
13
  return LiveEnv;
13
14
  };
14
15
  //# sourceMappingURL=webhooks.js.map
package/webhooks.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../src/webhooks.ts"],"names":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,eAAe,EAA/C,uBAAmB,QAAQ,EAA1B,eAAe,EAAY,CAAmB,CAAA;AAEzE,MAAM,CAAC,MAAM,IAAI,GAAG,CAClB,MAAwC,EACxC,KAAK,GAAG,KAAK,EACb,EAAE;IACF,MAAM,WAAW,GAAG,eAAe,CAAC,MAAM,CAAC,CAAA;IAC3C,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,gBAAA,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,gBAAA,GAAG,CAAC,OAAO,CAAA;IACtD,MAAM,UAAU,GAAG,gBAAA,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;IAC3C,MAAM,OAAO,6BACe,uBAA4B,eAAe,wBAA7B,WAAW,EAAxB,UAAU,GAAiC,EAAtE,uBAAW,UAAU,EAApB,OAAO,EAAc,CAAgD,CAAA;IAExE,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"}
@@ -1,22 +0,0 @@
1
- import { EffectSource } from "callbag-effect-ts/Source";
2
- import { Discord } from "dfx";
3
- import { ParentCacheOp, CacheOp } from "./index.js";
4
- export interface OpsSourceOpts<R, E, A> {
5
- id: (a: A) => string;
6
- fromParent: EffectSource<R, E, [parentId: string, resources: A[]]>;
7
- create: EffectSource<R, E, [parentId: string, resource: A]>;
8
- update: EffectSource<R, E, [parentId: string, resource: A]>;
9
- remove: EffectSource<R, E, [parentId: string, id: string]>;
10
- parentRemove: EffectSource<R, E, string>;
11
- }
12
- export declare const source: <R, E, T>({ id, fromParent, create, update, remove, parentRemove, }: OpsSourceOpts<R, E, T>) => import("callbag-effect-ts/Source").EffectSource<R, E, ParentCacheOp<T>>;
13
- export interface NonParentOpsSourceOpts<R, E, A> {
14
- id: (a: A) => string;
15
- create: EffectSource<R, E, A>;
16
- update: EffectSource<R, E, A>;
17
- remove: EffectSource<R, E, string>;
18
- }
19
- export declare const nonParentSource: <R, E, T>({ id, create, update, remove, }: NonParentOpsSourceOpts<R, E, T>) => import("callbag-effect-ts/Source").EffectSource<R, E, CacheOp<T>>;
20
- export declare const guilds: import("callbag-effect-ts/Source").EffectSource<import("../DiscordGateway/index.js").DiscordGateway, never, CacheOp<import("../types.js").Guild>>;
21
- export declare const channels: import("callbag-effect-ts/Source").EffectSource<import("../DiscordGateway/index.js").DiscordGateway, never, ParentCacheOp<import("../types.js").Channel>>;
22
- export declare const roles: import("callbag-effect-ts/Source").EffectSource<import("../DiscordGateway/index.js").DiscordGateway, never, ParentCacheOp<import("../types.js").Role>>;
package/Cache/gateway.js DELETED
@@ -1,99 +0,0 @@
1
- import * as tsplus_module_1 from "callbag-effect-ts/Source/fromIterable";
2
- import * as tsplus_module_2 from "callbag-effect-ts/Source/chain";
3
- import * as tsplus_module_3 from "callbag-effect-ts/Source/map";
4
- import * as tsplus_module_4 from "callbag-effect-ts/Source/merge";
5
- import * as tsplus_module_5 from "dfx/gateway";
6
- export const source = ({ id, fromParent, create, update, remove, parentRemove, }) => {
7
- const fromParentOps = tsplus_module_2.chain(([parentId, a]) => tsplus_module_1.fromIterable(a.map((resource) => ({
8
- op: "create",
9
- parentId,
10
- resourceId: id(resource),
11
- resource,
12
- }))))(fromParent);
13
- const createOps = tsplus_module_3.map(([parentId, resource]) => ({
14
- op: "create",
15
- parentId,
16
- resourceId: id(resource),
17
- resource,
18
- }))(create);
19
- const updateOps = tsplus_module_3.map(([parentId, resource]) => ({
20
- op: "update",
21
- parentId,
22
- resourceId: id(resource),
23
- resource,
24
- }))(update);
25
- const removeOps = tsplus_module_3.map(([parentId, resourceId]) => ({
26
- op: "delete",
27
- parentId,
28
- resourceId,
29
- }))(remove);
30
- const parentRemoveOps = tsplus_module_3.map((parentId) => ({
31
- op: "parentDelete",
32
- parentId,
33
- }))(parentRemove);
34
- return tsplus_module_4.merge(parentRemoveOps)(tsplus_module_4.merge(removeOps)(tsplus_module_4.merge(updateOps)(tsplus_module_4.merge(createOps)(fromParentOps))));
35
- };
36
- export const nonParentSource = ({ id, create, update, remove, }) => {
37
- const createOps = tsplus_module_3.map((resource) => ({
38
- op: "create",
39
- resourceId: id(resource),
40
- resource,
41
- }))(create);
42
- const updateOps = tsplus_module_3.map((resource) => ({
43
- op: "update",
44
- resourceId: id(resource),
45
- resource,
46
- }))(update);
47
- const removeOps = tsplus_module_3.map((resourceId) => ({
48
- op: "delete",
49
- resourceId,
50
- }))(remove);
51
- return tsplus_module_4.merge(removeOps)(tsplus_module_4.merge(updateOps)(createOps));
52
- };
53
- // Guilds
54
- export const guilds = nonParentSource({
55
- id: (g) => g.id,
56
- create: tsplus_module_3.map((g) => ({
57
- ...g,
58
- channels: [],
59
- roles: [],
60
- emojis: [],
61
- members: [],
62
- }))(tsplus_module_5.Gateway.fromDispatch("GUILD_CREATE")),
63
- update: tsplus_module_5.Gateway.fromDispatch("GUILD_UPDATE"),
64
- remove: tsplus_module_3.map((a) => a.id)(tsplus_module_5.Gateway.fromDispatch("GUILD_DELETE")),
65
- });
66
- // Channels
67
- export const channels = source({
68
- id: (a) => a.id,
69
- fromParent: tsplus_module_3.map((g) => [
70
- g.id,
71
- g.channels,
72
- ])(tsplus_module_5.Gateway.fromDispatch("GUILD_CREATE")),
73
- create: tsplus_module_3.map((c) => [c.guild_id, c])(tsplus_module_5.Gateway.fromDispatch("CHANNEL_CREATE")),
74
- update: tsplus_module_3.map((c) => [c.guild_id, c])(tsplus_module_5.Gateway.fromDispatch("CHANNEL_UPDATE")),
75
- remove: tsplus_module_3.map((a) => [
76
- a.guild_id,
77
- a.id,
78
- ])(tsplus_module_5.Gateway.fromDispatch("CHANNEL_DELETE")),
79
- parentRemove: tsplus_module_3.map((g) => g.id)(tsplus_module_5.Gateway.fromDispatch("GUILD_DELETE")),
80
- });
81
- // Roles
82
- export const roles = source({
83
- id: (a) => a.id,
84
- fromParent: tsplus_module_3.map((g) => [g.id, g.roles])(tsplus_module_5.Gateway.fromDispatch("GUILD_CREATE")),
85
- create: tsplus_module_3.map((r) => [
86
- r.guild_id,
87
- r.role,
88
- ])(tsplus_module_5.Gateway.fromDispatch("GUILD_ROLE_CREATE")),
89
- update: tsplus_module_3.map((r) => [
90
- r.guild_id,
91
- r.role,
92
- ])(tsplus_module_5.Gateway.fromDispatch("GUILD_ROLE_UPDATE")),
93
- remove: tsplus_module_3.map((a) => [
94
- a.guild_id,
95
- a.role_id,
96
- ])(tsplus_module_5.Gateway.fromDispatch("GUILD_ROLE_DELETE")),
97
- parentRemove: tsplus_module_3.map((g) => g.id)(tsplus_module_5.Gateway.fromDispatch("GUILD_DELETE")),
98
- });
99
- //# sourceMappingURL=gateway.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gateway.js","sourceRoot":"","sources":["../../src/Cache/gateway.ts"],"names":[],"mappings":";;;;;AAWA,MAAM,CAAC,MAAM,MAAM,GAAG,CAAU,EAC9B,EAAE,EACF,UAAU,EACV,MAAM,EACN,MAAM,EACN,MAAM,EACN,YAAY,GACW,EAAE,EAAE;IAC3B,MAAM,aAAa,GAAG,sBAAiB,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CACvD,6BACE,CAAC,CAAC,GAAG,CACH,CAAC,QAAQ,EAAoB,EAAE,CAAC,CAAC;QAC/B,EAAE,EAAE,QAAQ;QACZ,QAAQ;QACR,UAAU,EAAE,EAAE,CAAC,QAAQ,CAAC;QACxB,QAAQ;KACT,CAAC,CACH,CACF,EAVmB,UAAU,CAW/B,CAAA;IAED,MAAM,SAAS,GAAG,oBAChB,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAoB,EAAE,CAAC,CAAC;QAC3C,EAAE,EAAE,QAAQ;QACZ,QAAQ;QACR,UAAU,EAAE,EAAE,CAAC,QAAQ,CAAC;QACxB,QAAQ;KACT,CAAC,EANc,MAAM,CAOvB,CAAA;IAED,MAAM,SAAS,GAAG,oBAChB,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAoB,EAAE,CAAC,CAAC;QAC3C,EAAE,EAAE,QAAQ;QACZ,QAAQ;QACR,UAAU,E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