dfx 0.56.0 → 0.56.1

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.
@@ -9,7 +9,7 @@ import * as Layer from "@effect/io/Layer";
9
9
  import { Tag } from "@effect/data/Context";
10
10
  import * as Hub from "@effect/io/Hub";
11
11
  import * as Queue from "@effect/io/Queue";
12
- export declare const make: Effect.Effect<RateLimiter | Log | DiscordConfig | DiscordWS, never, {
12
+ export declare const make: Effect.Effect<DiscordConfig | Log | RateLimiter | DiscordWS, never, {
13
13
  readonly connect: (shard: [id: number, count: number], hub: Hub.Hub<Discord.GatewayPayload<Discord.ReceiveEvent>>, sendQueue: Queue.Dequeue<Discord.GatewayPayload<Discord.SendEvent>>) => Effect.Effect<never, never, {
14
14
  readonly id: [id: number, count: number];
15
15
  readonly send: (p: Message) => Effect.Effect<never, never, boolean>;
@@ -19,7 +19,7 @@ export declare const make: Effect.Effect<RateLimiter | Log | DiscordConfig | Dis
19
19
  export interface Shard extends Effect.Effect.Success<typeof make> {
20
20
  }
21
21
  export declare const Shard: Tag<Shard, Shard>;
22
- export declare const LiveShard: Layer.Layer<import("dfx/RateLimit").RateLimitStore | Log | DiscordConfig | import("dfx/DiscordGateway/DiscordWS").DiscordWSCodec, never, Shard>;
22
+ export declare const LiveShard: Layer.Layer<DiscordConfig | Log | import("dfx/RateLimit").RateLimitStore | import("dfx/DiscordGateway/DiscordWS").DiscordWSCodec, never, Shard>;
23
23
  export interface RunningShard extends Effect.Effect.Success<ReturnType<Shard["connect"]>> {
24
24
  }
25
25
  //# sourceMappingURL=Shard.d.ts.map
@@ -12,13 +12,13 @@ import type { WebSocketCloseError, WebSocketError } from "dfx/DiscordGateway/WS"
12
12
  import { DiscordREST } from "dfx/DiscordREST";
13
13
  import { RateLimiter } from "dfx/RateLimit";
14
14
  import type * as Discord from "dfx/types";
15
- declare const make: Effect.Effect<RateLimiter | DiscordREST | DiscordConfig | ShardStore | Shard, never, {
15
+ declare const make: Effect.Effect<DiscordConfig | RateLimiter | DiscordREST | Shard | ShardStore, never, {
16
16
  readonly shards: Effect.Effect<never, never, HashSet.HashSet<RunningShard>>;
17
17
  readonly run: (hub: Hub.Hub<Discord.GatewayPayload<Discord.ReceiveEvent>>, sendQueue: Queue.Dequeue<Discord.GatewayPayload<Discord.SendEvent>>) => Effect.Effect<never, WebSocketError | WebSocketCloseError, never>;
18
18
  }>;
19
19
  export interface Sharder extends Effect.Effect.Success<typeof make> {
20
20
  }
21
21
  export declare const Sharder: Tag<Sharder, Sharder>;
22
- export declare const LiveSharder: Layer.Layer<import("dfx/RateLimit").RateLimitStore | import("../Log").Log | DiscordREST | DiscordConfig | ShardStore | import("./DiscordWS").DiscordWSCodec, never, Sharder>;
22
+ export declare const LiveSharder: Layer.Layer<DiscordConfig | import("../Log").Log | import("dfx/RateLimit").RateLimitStore | DiscordREST | import("./DiscordWS").DiscordWSCodec | ShardStore, never, Sharder>;
23
23
  export {};
24
24
  //# sourceMappingURL=Sharder.d.ts.map
@@ -17,5 +17,5 @@ export interface DiscordGateway {
17
17
  }
18
18
  export declare const DiscordGateway: Tag<DiscordGateway, DiscordGateway>;
19
19
  export declare const make: Effect.Effect<Sharder, never, DiscordGateway>;
20
- export declare const LiveDiscordGateway: Layer.Layer<import("./RateLimit").RateLimitStore | import("./Log").Log | import("./DiscordREST").DiscordREST | import("./DiscordConfig").DiscordConfig | import("./DiscordGateway/ShardStore").ShardStore | import("./DiscordGateway/DiscordWS").DiscordWSCodec, never, DiscordGateway>;
20
+ export declare const LiveDiscordGateway: Layer.Layer<import("./DiscordConfig").DiscordConfig | import("./Log").Log | import("./RateLimit").RateLimitStore | import("./DiscordREST").DiscordREST | import("./DiscordGateway/DiscordWS").DiscordWSCodec | import("./DiscordGateway/ShardStore").ShardStore, never, DiscordGateway>;
21
21
  //# sourceMappingURL=DiscordGateway.d.ts.map
package/DiscordREST.d.ts CHANGED
@@ -18,5 +18,5 @@ export interface DiscordREST extends Discord.Endpoints<Partial<Http.MakeOptions>
18
18
  readonly executor: <A = unknown>(request: Http.Request) => Effect.Effect<never, DiscordRESTError, ResponseWithData<A>>;
19
19
  }
20
20
  export declare const DiscordREST: Tag<DiscordREST, DiscordREST>;
21
- export declare const LiveDiscordREST: Layer.Layer<RateLimitStore | Log | DiscordConfig | Http.HttpRequestExecutor, never, DiscordREST>;
21
+ export declare const LiveDiscordREST: Layer.Layer<DiscordConfig | Http.HttpRequestExecutor | Log | RateLimitStore, never, DiscordREST>;
22
22
  //# sourceMappingURL=DiscordREST.d.ts.map
@@ -30,7 +30,7 @@ export declare class SubCommandNotFound {
30
30
  readonly _tag = "SubCommandNotFound";
31
31
  constructor(data: Discord.ApplicationCommandDatum);
32
32
  }
33
- export declare const handleSubCommands: <NER extends Record<string, Effect.Effect<any, any, Discord.InteractionResponse>>>(commands: NER) => Effect.Effect<Discord.Interaction | Discord.ApplicationCommandDatum | Exclude<[NER[keyof NER]] extends [{
33
+ export declare const handleSubCommands: <NER extends Record<string, Effect.Effect<any, any, Discord.InteractionResponse>>>(commands: NER) => Effect.Effect<Discord.ApplicationCommandDatum | Discord.Interaction | Exclude<[NER[keyof NER]] extends [{
34
34
  [Effect.EffectTypeId]: {
35
35
  _R: (_: never) => infer R;
36
36
  };
@@ -9,14 +9,14 @@ export declare class GlobalApplicationCommand<R, E> {
9
9
  readonly _tag = "GlobalApplicationCommand";
10
10
  constructor(command: Discord.CreateGlobalApplicationCommandParams, handle: CommandHandler<R, E>);
11
11
  }
12
- export declare const global: <R, E, const A extends DeepReadonlyObject<Discord.CreateGlobalApplicationCommandParams>>(command: A, handle: CommandHandler<R, E, A>) => GlobalApplicationCommand<Exclude<R, Discord.Interaction | Discord.ApplicationCommandDatum>, E>;
12
+ export declare const global: <R, E, const A extends DeepReadonlyObject<Discord.CreateGlobalApplicationCommandParams>>(command: A, handle: CommandHandler<R, E, A>) => GlobalApplicationCommand<Exclude<R, Discord.ApplicationCommandDatum | Discord.Interaction>, E>;
13
13
  export declare class GuildApplicationCommand<R, E> {
14
14
  readonly command: Discord.CreateGuildApplicationCommandParams;
15
15
  readonly handle: CommandHandler<R, E>;
16
16
  readonly _tag = "GuildApplicationCommand";
17
17
  constructor(command: Discord.CreateGuildApplicationCommandParams, handle: CommandHandler<R, E>);
18
18
  }
19
- export declare const guild: <R, E, const A extends DeepReadonlyObject<Discord.CreateGuildApplicationCommandParams>>(command: A, handle: CommandHandler<R, E, A>) => GuildApplicationCommand<Exclude<R, Discord.Interaction | Discord.ApplicationCommandDatum>, E>;
19
+ export declare const guild: <R, E, const A extends DeepReadonlyObject<Discord.CreateGuildApplicationCommandParams>>(command: A, handle: CommandHandler<R, E, A>) => GuildApplicationCommand<Exclude<R, Discord.ApplicationCommandDatum | Discord.Interaction>, E>;
20
20
  export declare class MessageComponent<R, E> {
21
21
  readonly predicate: (customId: string) => Effect.Effect<R, E, boolean>;
22
22
  readonly handle: Effect.Effect<R, E, Discord.InteractionResponse>;
@@ -37,7 +37,7 @@ export declare class Autocomplete<R, E> {
37
37
  readonly _tag = "Autocomplete";
38
38
  constructor(predicate: (data: Discord.ApplicationCommandDatum, focusedOption: Discord.ApplicationCommandInteractionDataOption) => Effect.Effect<R, E, boolean>, handle: Effect.Effect<R, E, Discord.InteractionResponse>);
39
39
  }
40
- export declare const autocomplete: <R1, R2, E1, E2>(pred: (data: Discord.ApplicationCommandDatum, focusedOption: Discord.ApplicationCommandInteractionDataOption) => Effect.Effect<R1, E1, boolean>, handle: Effect.Effect<R2, E2, Discord.InteractionResponse>) => Autocomplete<Exclude<R1, Discord.Interaction | Discord.ApplicationCommandDatum | FocusedOptionContext> | Exclude<R2, Discord.Interaction | Discord.ApplicationCommandDatum | FocusedOptionContext>, E1 | E2>;
40
+ export declare const autocomplete: <R1, R2, E1, E2>(pred: (data: Discord.ApplicationCommandDatum, focusedOption: Discord.ApplicationCommandInteractionDataOption) => Effect.Effect<R1, E1, boolean>, handle: Effect.Effect<R2, E2, Discord.InteractionResponse>) => Autocomplete<Exclude<R1, Discord.ApplicationCommandDatum | Discord.Interaction | FocusedOptionContext> | Exclude<R2, Discord.ApplicationCommandDatum | Discord.Interaction | FocusedOptionContext>, E1 | E2>;
41
41
  type DeepReadonly<T> = T extends (infer R)[] ? ReadonlyArray<DeepReadonly<R>> : T extends Function ? T : T extends object ? DeepReadonlyObject<T> : T;
42
42
  type DeepReadonlyObject<T> = {
43
43
  readonly [P in keyof T]: DeepReadonly<T[P]>;
@@ -16,7 +16,7 @@ export interface RunOpts {
16
16
  /**
17
17
  * @tsplus pipeable dfx/InteractionBuilder runGateway
18
18
  */
19
- export declare const run: <R, R2, E, TE, E2>(postHandler: (effect: Effect.Effect<Discord.Interaction | DiscordREST | R, DefinitionNotFound | DiscordRESTError | TE, void>) => Effect.Effect<R2, E2, void>, { sync }?: RunOpts) => (ix: InteractionBuilder<R, E, TE>) => Effect.Effect<DiscordREST | DiscordGateway | Exclude<R2, Discord.Interaction>, DiscordRESTError | Http.ResponseDecodeError | E2, never>;
19
+ export declare const run: <R, R2, E, TE, E2>(postHandler: (effect: Effect.Effect<DiscordREST | Discord.Interaction | R, DiscordRESTError | DefinitionNotFound | TE, void>) => Effect.Effect<R2, E2, void>, { sync }?: RunOpts) => (ix: InteractionBuilder<R, E, TE>) => Effect.Effect<DiscordREST | DiscordGateway | Exclude<R2, Discord.Interaction>, DiscordRESTError | Http.ResponseDecodeError | E2, never>;
20
20
  export interface InteractionsRegistry {
21
21
  readonly register: <E>(ix: InteractionBuilder<never, E, never>) => Effect.Effect<never, never, void>;
22
22
  readonly run: <R, E>(onError: (_: Cause<DiscordRESTError | DefinitionNotFound>) => Effect.Effect<R, E, void>, opts?: RunOpts) => Effect.Effect<DiscordREST | DiscordGateway | Exclude<R, Discord.Interaction>, DiscordRESTError | Http.ResponseDecodeError | E, never>;
@@ -59,7 +59,7 @@ export interface HandleWebhookOpts<E> {
59
59
  /**
60
60
  * @tsplus getter dfx/InteractionBuilder webhookHandler
61
61
  */
62
- export declare const makeHandler: <R, E, TE>(ix: InteractionBuilder<R, E, TE>) => ({ headers, body, success, error, }: HandleWebhookOpts<BadWebhookSignature | WebhookParseError | E | DefinitionNotFound>) => Effect.Effect<WebhookConfig, never, void>;
62
+ export declare const makeHandler: <R, E, TE>(ix: InteractionBuilder<R, E, TE>) => ({ headers, body, success, error, }: HandleWebhookOpts<DefinitionNotFound | BadWebhookSignature | WebhookParseError | E>) => Effect.Effect<WebhookConfig, never, void>;
63
63
  /**
64
64
  * @tsplus getter dfx/InteractionBuilder simpleWebhookHandler
65
65
  */
package/gateway.d.ts CHANGED
@@ -17,7 +17,7 @@ export { DiscordGateway, LiveDiscordGateway } from "dfx/DiscordGateway";
17
17
  export { InteractionsRegistry, InteractionsRegistryLive, run as runIx, } from "dfx/Interactions/gateway";
18
18
  export { CachePrelude, DiscordWS, SendEvent, Shard, ShardStore, WS };
19
19
  export declare const MemoryRateLimit: Layer.Layer<Log.Log, never, RateLimiter>;
20
- export declare const MemoryBot: Layer.Layer<Log.Log | DiscordConfig.DiscordConfig | HttpRequestExecutor, never, RateLimiter | DiscordREST | InteractionsRegistry | DiscordGateway>;
20
+ export declare const MemoryBot: Layer.Layer<DiscordConfig.DiscordConfig | HttpRequestExecutor | Log.Log, never, RateLimiter | DiscordREST | DiscordGateway | InteractionsRegistry>;
21
21
  export declare const gatewayLayerWithoutHttp: (config: Config.Config.Wrap<DiscordConfig.MakeOpts>) => Layer.Layer<HttpRequestExecutor, ConfigError.ConfigError, RateLimiter | Log.Log | InteractionsRegistry | DiscordREST | DiscordGateway | DiscordConfig.DiscordConfig>;
22
22
  export declare const gatewayLayer: (config: Config.Config.Wrap<DiscordConfig.MakeOpts>) => Layer.Layer<never, ConfigError.ConfigError, RateLimiter | Log.Log | InteractionsRegistry | DiscordREST | DiscordGateway | DiscordConfig.DiscordConfig>;
23
23
  //# sourceMappingURL=gateway.d.ts.map
package/mjs/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const LIB_VERSION = "0.56.0";
1
+ export const LIB_VERSION = "0.56.1";
2
2
  //# sourceMappingURL=version.mjs.map
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "dfx",
3
- "version": "0.56.0",
3
+ "version": "0.56.1",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/tim-smart/dfx.git"
8
8
  },
9
9
  "dependencies": {
10
- "@effect-http/client": "^0.34.0",
10
+ "@effect-http/client": "^0.35.0",
11
11
  "@effect/data": "^0.16.0",
12
- "@effect/io": "~0.35.0",
12
+ "@effect/io": "~0.35.1",
13
13
  "@effect/stream": "~0.29.0",
14
14
  "bufferutil": "^4.0.7",
15
15
  "discord-verify": "^1.2.0",
@@ -17,7 +17,7 @@
17
17
  "utf-8-validate": "^6.0.3",
18
18
  "ws": "^8.13.0"
19
19
  },
20
- "gitHead": "bb05de086da052a87c7bb540b3f7b02f45ae6a80",
20
+ "gitHead": "281b59e3f8b1936f65a01609bdee74d14c8cfc54",
21
21
  "main": "./index.js",
22
22
  "publishConfig": {
23
23
  "access": "public"
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const LIB_VERSION = "0.56.0";
1
+ export const LIB_VERSION = "0.56.1";
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const LIB_VERSION = "0.56.0";
1
+ export declare const LIB_VERSION = "0.56.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -4,6 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.LIB_VERSION = void 0;
7
- const LIB_VERSION = "0.56.0";
7
+ const LIB_VERSION = "0.56.1";
8
8
  exports.LIB_VERSION = LIB_VERSION;
9
9
  //# sourceMappingURL=version.js.map
package/webhooks.d.ts CHANGED
@@ -9,7 +9,7 @@ import * as Log from "dfx/Log";
9
9
  import type { RateLimiter } from "dfx/RateLimit";
10
10
  export { BadWebhookSignature, WebhookConfig, WebhookParseError, makeConfigLayer, makeHandler, makeSimpleHandler, } from "dfx/Interactions/webhook";
11
11
  export declare const MemoryRateLimit: Layer.Layer<Log.Log, never, RateLimiter>;
12
- export declare const MemoryREST: Layer.Layer<Log.Log | DiscordConfig.DiscordConfig | HttpRequestExecutor, never, DiscordREST>;
12
+ export declare const MemoryREST: Layer.Layer<DiscordConfig.DiscordConfig | HttpRequestExecutor | Log.Log, never, DiscordREST>;
13
13
  export declare const webhookLayerWithoutHttp: (options: Config.Config.Wrap<DiscordConfig.MakeOpts & MakeConfigOpts>) => Layer.Layer<HttpRequestExecutor, ConfigError.ConfigError, RateLimiter | DiscordREST | WebhookConfig>;
14
14
  export declare const webhookLayerConfig: (config: Config.Config.Wrap<DiscordConfig.MakeOpts & MakeConfigOpts>) => Layer.Layer<never, ConfigError.ConfigError, RateLimiter | DiscordREST | WebhookConfig>;
15
15
  export declare const webhookLayer: (options: DiscordConfig.MakeOpts & MakeConfigOpts) => Layer.Layer<never, never, RateLimiter | DiscordREST | WebhookConfig>;