dfx 0.13.3 → 0.14.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.
- package/DiscordConfig/index.d.ts +7 -6
- package/DiscordConfig/index.js +10 -9
- package/DiscordConfig/index.js.map +1 -1
- package/DiscordGateway/DiscordWS/index.d.ts +7 -6
- package/DiscordGateway/DiscordWS/index.js +10 -9
- package/DiscordGateway/DiscordWS/index.js.map +1 -1
- package/DiscordGateway/Shard/heartbeats.d.ts +6 -2
- package/DiscordGateway/Shard/heartbeats.js +2 -2
- package/DiscordGateway/Shard/heartbeats.js.map +1 -1
- package/DiscordGateway/Shard/identify.d.ts +4 -1
- package/DiscordGateway/Shard/identify.js +1 -1
- package/DiscordGateway/Shard/index.d.ts +4 -4
- package/DiscordGateway/Shard/index.js +5 -5
- package/DiscordGateway/Shard/index.js.map +1 -1
- package/DiscordGateway/Shard/invalidSession.d.ts +5 -2
- package/DiscordGateway/Shard/invalidSession.js +2 -2
- package/DiscordGateway/Shard/invalidSession.js.map +1 -1
- package/DiscordGateway/Shard/sendEvents.d.ts +1 -1
- package/DiscordGateway/Shard/sendEvents.js +1 -1
- package/DiscordGateway/Shard/utils.d.ts +5 -2
- package/DiscordGateway/ShardStore/index.d.ts +4 -3
- package/DiscordGateway/ShardStore/index.js +1 -1
- package/DiscordGateway/Sharder/index.d.ts +5 -2
- package/DiscordGateway/Sharder/index.js +4 -5
- package/DiscordGateway/Sharder/index.js.map +1 -1
- package/DiscordGateway/WS/index.d.ts +3 -2
- package/DiscordGateway/WS/index.js +1 -1
- package/DiscordGateway/index.d.ts +9 -7
- package/DiscordGateway/index.js +1 -1
- package/DiscordREST/index.d.ts +6 -5
- package/DiscordREST/index.js +84 -48
- package/DiscordREST/index.js.map +1 -1
- package/DiscordREST/types.d.ts +2 -1
- package/DiscordREST/utils.d.ts +4 -4
- package/Helpers/intents.js +1 -1
- package/Helpers/interactions.d.ts +11 -10
- package/Helpers/interactions.js +1 -1
- package/Helpers/members.d.ts +1 -1
- package/Helpers/permissions.d.ts +1 -1
- package/Helpers/permissions.js +1 -1
- package/Http/index.d.ts +7 -7
- package/Interactions/context.d.ts +9 -9
- package/Interactions/context.js +1 -1
- package/Interactions/definitions.d.ts +7 -6
- package/Interactions/gateway.d.ts +3 -2
- package/Interactions/gateway.js +6 -6
- package/Interactions/gateway.js.map +1 -1
- package/Interactions/handlers.d.ts +2 -1
- package/Interactions/handlers.js +1 -1
- package/Interactions/index.d.ts +7 -8
- package/Interactions/index.js +4 -6
- package/Interactions/index.js.map +1 -1
- package/Interactions/webhook.d.ts +7 -5
- package/Interactions/webhook.js +1 -1
- package/Log/index.d.ts +7 -7
- package/Log/index.js +1 -1
- package/RateLimitStore/index.d.ts +9 -7
- package/RateLimitStore/index.js +3 -2
- package/RateLimitStore/index.js.map +1 -1
- package/RateLimitStore/memory.d.ts +2 -2
- package/RateLimitStore/memory.js.map +1 -1
- package/RateLimitStore/utils.d.ts +1 -1
- package/common.d.ts +1 -28
- package/common.js +1 -14
- package/common.js.map +1 -1
- package/gateway.d.ts +12 -0
- package/gateway.js +20 -0
- package/gateway.js.map +1 -0
- package/global.d.ts +76 -3
- package/global.js +1 -1
- package/global.js.map +1 -1
- package/index.d.ts +2 -10
- package/index.js +2 -17
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/utils/effect.d.ts +1 -1
- package/webhooks.d.ts +6 -15
- package/webhooks.js +7 -16
- package/webhooks.js.map +1 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Discord
|
|
1
|
+
import { Discord } from "dfx";
|
|
2
|
+
import { Effect } from "@effect/io/Effect";
|
|
3
|
+
import { Cause } from "@effect/io/Cause";
|
|
2
4
|
import { DefinitionNotFound } from "./handlers.js";
|
|
3
5
|
import { InteractionBuilder } from "./index.js";
|
|
4
6
|
export declare class BadWebhookSignature {
|
|
@@ -15,8 +17,8 @@ declare const makeConfig: ({ applicationId, publicKey }: MakeConfigOpts) => {
|
|
|
15
17
|
};
|
|
16
18
|
export interface WebhookConfig extends ReturnType<typeof makeConfig> {
|
|
17
19
|
}
|
|
18
|
-
export declare const WebhookConfig: import("../
|
|
19
|
-
export declare const makeConfigLayer: (a_0: MakeConfigOpts) => import("../
|
|
20
|
+
export declare const WebhookConfig: import("../global.js").Tag<WebhookConfig>;
|
|
21
|
+
export declare const makeConfigLayer: (a_0: MakeConfigOpts) => import("../global.js").Layer<never, never, WebhookConfig>;
|
|
20
22
|
export declare class WebhookParseError {
|
|
21
23
|
readonly reason: unknown;
|
|
22
24
|
readonly _tag = "WebhookParseError";
|
|
@@ -28,9 +30,9 @@ export interface HandleWebhookOpts<E> {
|
|
|
28
30
|
success: (a: Discord.InteractionResponse) => Effect<never, never, void>;
|
|
29
31
|
error: (e: Cause<E>) => Effect<never, never, void>;
|
|
30
32
|
}
|
|
31
|
-
export declare const makeHandler: <R, E>(ix: InteractionBuilder<R, E>) => ({ headers, body, success, error, }: HandleWebhookOpts<DefinitionNotFound | BadWebhookSignature | WebhookParseError | E>) => import("../
|
|
33
|
+
export declare const makeHandler: <R, E>(ix: InteractionBuilder<R, E>) => ({ headers, body, success, error, }: HandleWebhookOpts<DefinitionNotFound | BadWebhookSignature | WebhookParseError | E>) => import("../global.js").Effect<WebhookConfig | Exclude<R, import("../types.js").Interaction>, never, void>;
|
|
32
34
|
export declare const makeSimpleHandler: <R, E>(ix: InteractionBuilder<R, E>) => ({ headers, body }: {
|
|
33
35
|
headers: Headers;
|
|
34
36
|
body: string;
|
|
35
|
-
}) => import("../
|
|
37
|
+
}) => import("../global.js").Effect<WebhookConfig | Exclude<R, import("../types.js").Interaction>, DefinitionNotFound | BadWebhookSignature | WebhookParseError | E, import("../types.js").InteractionResponse>;
|
|
36
38
|
export {};
|
package/Interactions/webhook.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as tsplus_module_1 from "@fp-ts/data/Option";
|
|
2
2
|
import * as tsplus_module_2 from "@fp-ts/data/Either";
|
|
3
|
-
import * as tsplus_module_3 from "
|
|
3
|
+
import * as tsplus_module_3 from "@fp-ts/data/Context";
|
|
4
4
|
import * as tsplus_module_4 from "@effect/io/Layer";
|
|
5
5
|
import * as tsplus_module_5 from "@fp-ts/data/Function";
|
|
6
6
|
import * as tsplus_module_6 from "@effect/io/Effect";
|
package/Log/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
declare const make: (debug?: boolean) => {
|
|
2
|
-
info: (...args: any[]) => import("../
|
|
3
|
-
debug: (...args: any[]) => import("../
|
|
2
|
+
info: (...args: any[]) => import("../global.js").Effect<never, never, void>;
|
|
3
|
+
debug: (...args: any[]) => import("../global.js").Effect<never, never, void>;
|
|
4
4
|
};
|
|
5
5
|
export interface Log extends ReturnType<typeof make> {
|
|
6
6
|
}
|
|
7
|
-
export declare const Log: import("../
|
|
8
|
-
export declare const LiveLog: import("../
|
|
9
|
-
export declare const LiveLogDebug: import("../
|
|
10
|
-
export declare const info: (...args: any[]) => import("../
|
|
11
|
-
export declare const debug: (...args: any[]) => import("../
|
|
7
|
+
export declare const Log: import("../global.js").Tag<Log>;
|
|
8
|
+
export declare const LiveLog: import("../global.js").Layer<never, never, Log>;
|
|
9
|
+
export declare const LiveLogDebug: import("../global.js").Layer<never, never, Log>;
|
|
10
|
+
export declare const info: (...args: any[]) => import("../global.js").Effect<Log, never, void>;
|
|
11
|
+
export declare const debug: (...args: any[]) => import("../global.js").Effect<Log, never, void>;
|
|
12
12
|
export {};
|
package/Log/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as tsplus_module_1 from "@effect/io/Effect";
|
|
2
|
-
import * as tsplus_module_2 from "
|
|
2
|
+
import * as tsplus_module_2 from "@fp-ts/data/Context";
|
|
3
3
|
import * as tsplus_module_3 from "@effect/io/Layer";
|
|
4
4
|
const make = (debug = false) => ({
|
|
5
5
|
info: (...args) => tsplus_module_1.sync(() => {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Effect
|
|
1
|
+
import { Effect } from "@effect/io/Effect";
|
|
2
|
+
import { Maybe } from "@fp-ts/data/Option";
|
|
3
|
+
import { Duration } from "@fp-ts/data/Duration";
|
|
2
4
|
import { Success } from "dfx/utils/effect";
|
|
3
5
|
export type BucketDetails = {
|
|
4
6
|
key: "global" | string;
|
|
@@ -12,13 +14,13 @@ export interface RateLimitStore {
|
|
|
12
14
|
putBucketRoute: (route: string, bucketKey: string) => Effect<never, never, void>;
|
|
13
15
|
incrementCounter: (key: string, window: number, limit: number) => Effect<never, never, readonly [count: number, ttl: number]>;
|
|
14
16
|
}
|
|
15
|
-
export declare const RateLimitStore: import("../
|
|
16
|
-
export declare const LiveMemoryRateLimitStore: import("../
|
|
17
|
-
declare const makeLimiter: import("../
|
|
18
|
-
maybeWait: (key: string, window: Duration, limit: number, multiplier?: number) => import("../
|
|
17
|
+
export declare const RateLimitStore: import("../global.js").Tag<RateLimitStore>;
|
|
18
|
+
export declare const LiveMemoryRateLimitStore: import("../global.js").Layer<never, never, RateLimitStore>;
|
|
19
|
+
declare const makeLimiter: import("../global.js").Effect<import("../Log/index.js").Log | RateLimitStore, never, {
|
|
20
|
+
maybeWait: (key: string, window: Duration, limit: number, multiplier?: number) => import("../global.js").Effect<never, never, void>;
|
|
19
21
|
}>;
|
|
20
22
|
export interface RateLimiter extends Success<typeof makeLimiter> {
|
|
21
23
|
}
|
|
22
|
-
export declare const RateLimiter: import("../
|
|
23
|
-
export declare const LiveRateLimiter: import("../
|
|
24
|
+
export declare const RateLimiter: import("../global.js").Tag<RateLimiter>;
|
|
25
|
+
export declare const LiveRateLimiter: import("../global.js").Layer<import("../Log/index.js").Log | RateLimitStore, never, RateLimiter>;
|
|
24
26
|
export {};
|
package/RateLimitStore/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import * as tsplus_module_1 from "
|
|
1
|
+
import * as tsplus_module_1 from "@fp-ts/data/Context";
|
|
2
2
|
import * as tsplus_module_2 from "@effect/io/Layer";
|
|
3
3
|
import * as tsplus_module_3 from "@effect/io/Effect";
|
|
4
|
+
import * as tsplus_module_4 from "dfx";
|
|
4
5
|
import { delayFrom } from "./utils.js";
|
|
5
6
|
import * as Memory from "./memory.js";
|
|
6
7
|
export const RateLimitStore = tsplus_module_1.Tag();
|
|
@@ -18,7 +19,7 @@ const makeLimiter = tsplus_module_3.flatMap(store => tsplus_module_3.map(log =>
|
|
|
18
19
|
.incrementCounter(key, windowMs, limit)))));
|
|
19
20
|
};
|
|
20
21
|
return { maybeWait };
|
|
21
|
-
})(tsplus_module_3.service(
|
|
22
|
+
})(tsplus_module_3.service(tsplus_module_4.Log.Log)))(tsplus_module_3.service(RateLimitStore));
|
|
22
23
|
export const RateLimiter = tsplus_module_1.Tag();
|
|
23
24
|
export const LiveRateLimiter = tsplus_module_2.fromEffect(RateLimiter)(makeLimiter);
|
|
24
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/RateLimitStore/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/RateLimitStore/index.ts"],"names":[],"mappings":";;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AA6BrC,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAA,GAAG,EAAkB,CAAA;AACnD,MAAM,CAAC,MAAM,wBAAwB,GAAG,qBAAW,cAAc,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;AAE/E,MAAM,WAAW,2BACT,KAAK,wBACL,GAAG;IAET,MAAM,SAAS,GAAG,CAChB,GAAW,EACX,MAAgB,EAChB,KAAa,EACb,UAAU,GAAG,IAAI,EACjB,EAAE;QACF,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,GAAG,UAAU,CAAA;QAC3C,8BAAO,2CAAA,oBAGA,CAAC,CAAC,EAAE,EAAE,CACT,GAAG,CAAC,KAAK,CAAC,0BAA0B,EAAE;YACpC,GAAG;YACH,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,QAAQ;YACR,KAAK;YACL,KAAK,EAAE,CAAC,CAAC,MAAM;SAChB,CAAC,EAVC,oBAEA,CAAC,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,EAFxD,KAAK;aACT,gBAAgB,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,CAAC,CACuB,CAS7D,CACiB,EAAO;IAC7B,CAAC,CAAA;IAED,OAAO,EAAE,SAAS,EAAE,CAAA;GAxBN,wBAAe,gBAAA,GAAG,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 {
|
|
2
|
-
export declare const make: () =>
|
|
1
|
+
import { RateLimit } from "dfx";
|
|
2
|
+
export declare const make: () => RateLimit.RateLimitStore;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../src/RateLimitStore/memory.ts"],"names":[],"mappings":";;AAKA,MAAM,CAAC,MAAM,IAAI,GAAG,
|
|
1
|
+
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../src/RateLimitStore/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,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAE,CAAC,CAAC,CAAC;QAExE,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAChC,qBAAY,GAAG,EAAE;YACf,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;QAC3B,CAAC,CAAC;QAEJ,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CACvC,qBAAY,GAAG,EAAE;YACf,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;YACtB,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,CAAA;YAC5C,MAAM,OAAO,GAAG,0BACd,GAAY,EAAE,CAAC,CAAC;gBACd,OAAO,EAAE,GAAG;gBACZ,KAAK,EAAE,CAAC;aACT,CAAC,EAJY,UAAU,CAAC,GAAG,CAAC,CAK9B,CAAA;YAED,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,GAAG,CAAC,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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Duration } from "
|
|
1
|
+
import { Duration } from "@fp-ts/data/Duration";
|
|
2
2
|
export declare const delayFrom: (window: number, limit: number, count: number, ttl: number) => Duration;
|
package/common.d.ts
CHANGED
|
@@ -1,28 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export type { Layer } from "@effect/io/Layer";
|
|
3
|
-
export type { Schedule } from "@effect/io/Schedule";
|
|
4
|
-
export type { Cause } from "@effect/io/Cause";
|
|
5
|
-
export type { Chunk } from "@fp-ts/data/Chunk";
|
|
6
|
-
export { Context, Tag } from "@fp-ts/data/Context";
|
|
7
|
-
export type { Duration } from "@fp-ts/data/Duration";
|
|
8
|
-
export type { Equal } from "@fp-ts/data/Equal";
|
|
9
|
-
export type { Option as Maybe } from "@fp-ts/data/Option";
|
|
10
|
-
export type { Either } from "@fp-ts/data/Either";
|
|
11
|
-
export type { Exit } from "@effect/io/Exit";
|
|
12
|
-
export type { EffectSource } from "callbag-effect-ts/Source";
|
|
13
|
-
export type { EffectSink } from "callbag-effect-ts/Sink";
|
|
14
|
-
export type { HashMap } from "@fp-ts/data/HashMap";
|
|
15
|
-
export type { Ref } from "@effect/io/Ref";
|
|
16
|
-
export * as Config from "dfx/DiscordConfig/index";
|
|
17
|
-
export * as Discord from "dfx/types";
|
|
18
|
-
export * as Http from "dfx/Http/index";
|
|
19
|
-
export * as Log from "dfx/Log/index";
|
|
20
|
-
export * as RateLimitStore from "dfx/RateLimitStore/index";
|
|
21
|
-
export * as Rest from "dfx/DiscordREST/index";
|
|
22
|
-
export * as Ix from "dfx/Interactions/index";
|
|
23
|
-
export * as Flags from "./Helpers/flags.js";
|
|
24
|
-
export * as IxHelpers from "./Helpers/interactions.js";
|
|
25
|
-
export * as Intents from "./Helpers/intents.js";
|
|
26
|
-
export * as Members from "./Helpers/members.js";
|
|
27
|
-
export * as Perms from "./Helpers/permissions.js";
|
|
28
|
-
export * as UI from "./Helpers/ui.js";
|
|
1
|
+
export {};
|
package/common.js
CHANGED
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export * as Config from "dfx/DiscordConfig/index";
|
|
3
|
-
export * as Discord from "dfx/types";
|
|
4
|
-
export * as Http from "dfx/Http/index";
|
|
5
|
-
export * as Log from "dfx/Log/index";
|
|
6
|
-
export * as RateLimitStore from "dfx/RateLimitStore/index";
|
|
7
|
-
export * as Rest from "dfx/DiscordREST/index";
|
|
8
|
-
export * as Ix from "dfx/Interactions/index";
|
|
9
|
-
export * as Flags from "./Helpers/flags.js";
|
|
10
|
-
export * as IxHelpers from "./Helpers/interactions.js";
|
|
11
|
-
export * as Intents from "./Helpers/intents.js";
|
|
12
|
-
export * as Members from "./Helpers/members.js";
|
|
13
|
-
export * as Perms from "./Helpers/permissions.js";
|
|
14
|
-
export * as UI from "./Helpers/ui.js";
|
|
1
|
+
export {};
|
|
15
2
|
//# sourceMappingURL=common.js.map
|
package/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":""}
|
package/gateway.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Config } from "dfx";
|
|
2
|
+
export * as WS from "./DiscordGateway/WS/index.js";
|
|
3
|
+
export * as DiscordWS from "./DiscordGateway/DiscordWS/index.js";
|
|
4
|
+
export * as Shard from "./DiscordGateway/Shard/index.js";
|
|
5
|
+
export * as ShardStore from "./DiscordGateway/ShardStore/index.js";
|
|
6
|
+
export * as Gateway from "./DiscordGateway/index.js";
|
|
7
|
+
export { run as runIx } from "./Interactions/gateway.js";
|
|
8
|
+
export declare const LiveRateLimit: import("./global.js").Layer<import("./Log/index.js").Log, never, import("./RateLimitStore/index.js").RateLimitStore | import("./RateLimitStore/index.js").RateLimiter>;
|
|
9
|
+
export declare const LiveREST: import("./global.js").Layer<import("./DiscordConfig/index.js").DiscordConfig | import("./Log/index.js").Log, never, import("./index.js").DiscordREST | import("./RateLimitStore/index.js").RateLimitStore | import("./RateLimitStore/index.js").RateLimiter>;
|
|
10
|
+
export declare const LiveGateway: import("./global.js").Layer<import("./index.js").DiscordREST | import("./DiscordConfig/index.js").DiscordConfig | import("./Log/index.js").Log | import("./RateLimitStore/index.js").RateLimiter, never, import("./DiscordGateway/ShardStore/index.js").ShardStore | import("./DiscordGateway/DiscordWS/index.js").DiscordWSCodec | import("./DiscordGateway/index.js").DiscordGateway>;
|
|
11
|
+
export declare const LiveBot: import("./global.js").Layer<import("./DiscordConfig/index.js").DiscordConfig | import("./Log/index.js").Log, never, import("./DiscordGateway/ShardStore/index.js").ShardStore | import("./index.js").DiscordREST | import("./RateLimitStore/index.js").RateLimitStore | import("./RateLimitStore/index.js").RateLimiter | import("./DiscordGateway/DiscordWS/index.js").DiscordWSCodec | import("./DiscordGateway/index.js").DiscordGateway>;
|
|
12
|
+
export declare const make: (config: Config.MakeOpts, debug?: boolean) => import("./global.js").Layer<never, never, import("./DiscordGateway/ShardStore/index.js").ShardStore | import("./index.js").DiscordREST | import("./DiscordConfig/index.js").DiscordConfig | import("./Log/index.js").Log | import("./RateLimitStore/index.js").RateLimitStore | import("./RateLimitStore/index.js").RateLimiter | import("./DiscordGateway/DiscordWS/index.js").DiscordWSCodec | import("./DiscordGateway/index.js").DiscordGateway>;
|
package/gateway.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as tsplus_module_1 from "dfx";
|
|
2
|
+
import * as tsplus_module_2 from "@effect/io/Layer";
|
|
3
|
+
import * as tsplus_module_3 from "dfx/gateway";
|
|
4
|
+
export * as WS from "./DiscordGateway/WS/index.js";
|
|
5
|
+
export * as DiscordWS from "./DiscordGateway/DiscordWS/index.js";
|
|
6
|
+
export * as Shard from "./DiscordGateway/Shard/index.js";
|
|
7
|
+
export * as ShardStore from "./DiscordGateway/ShardStore/index.js";
|
|
8
|
+
export * as Gateway from "./DiscordGateway/index.js";
|
|
9
|
+
export { run as runIx } from "./Interactions/gateway.js";
|
|
10
|
+
export const LiveRateLimit = tsplus_module_2.provideToAndMerge(tsplus_module_1.RateLimit.LiveRateLimiter)(tsplus_module_1.RateLimit.LiveMemoryRateLimitStore);
|
|
11
|
+
export const LiveREST = tsplus_module_2.provideToAndMerge(tsplus_module_1.LiveDiscordREST)(LiveRateLimit);
|
|
12
|
+
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));
|
|
13
|
+
export const LiveBot = tsplus_module_2.provideToAndMerge(LiveGateway)(LiveREST);
|
|
14
|
+
export const make = (config, debug = false) => {
|
|
15
|
+
const LiveLog = debug ? tsplus_module_1.Log.LiveLogDebug : tsplus_module_1.Log.LiveLog;
|
|
16
|
+
const LiveConfig = tsplus_module_1.Config.makeLayer(config);
|
|
17
|
+
const LiveEnv = tsplus_module_2.provideToAndMerge(LiveBot)(tsplus_module_2.merge(LiveConfig)(LiveLog));
|
|
18
|
+
return LiveEnv;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=gateway.js.map
|
package/gateway.js.map
ADDED
|
@@ -0,0 +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,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,CAAC,MAAM,OAAO,qCAAc,WAAW,EAAtB,QAAQ,CAAc,CAAA;AAE7C,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,OAAO,wBAApB,UAAU,EAApB,OAAO,EAAuB,CAAA;IAE9C,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"}
|
package/global.d.ts
CHANGED
|
@@ -1,11 +1,79 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @tsplus global
|
|
3
3
|
*/
|
|
4
|
-
import type { Effect
|
|
4
|
+
import type { Effect } from "@effect/io/Effect";
|
|
5
5
|
/**
|
|
6
6
|
* @tsplus global
|
|
7
7
|
*/
|
|
8
|
-
import type {
|
|
8
|
+
import type { Layer } from "@effect/io/Layer";
|
|
9
|
+
/**
|
|
10
|
+
* @tsplus global
|
|
11
|
+
*/
|
|
12
|
+
import type { Schedule } from "@effect/io/Schedule";
|
|
13
|
+
/**
|
|
14
|
+
* @tsplus global
|
|
15
|
+
*/
|
|
16
|
+
import type { Cause } from "@effect/io/Cause";
|
|
17
|
+
/**
|
|
18
|
+
* @tsplus global
|
|
19
|
+
*/
|
|
20
|
+
import type { Chunk } from "@fp-ts/data/Chunk";
|
|
21
|
+
/**
|
|
22
|
+
* @tsplus global
|
|
23
|
+
*/
|
|
24
|
+
import { Context, Tag } from "@fp-ts/data/Context";
|
|
25
|
+
/**
|
|
26
|
+
* @tsplus global
|
|
27
|
+
*/
|
|
28
|
+
import type { Duration } from "@fp-ts/data/Duration";
|
|
29
|
+
/**
|
|
30
|
+
* @tsplus global
|
|
31
|
+
*/
|
|
32
|
+
import type { Equal } from "@fp-ts/data/Equal";
|
|
33
|
+
/**
|
|
34
|
+
* @tsplus global
|
|
35
|
+
*/
|
|
36
|
+
import type { Option as Maybe } from "@fp-ts/data/Option";
|
|
37
|
+
/**
|
|
38
|
+
* @tsplus global
|
|
39
|
+
*/
|
|
40
|
+
import type { Either } from "@fp-ts/data/Either";
|
|
41
|
+
/**
|
|
42
|
+
* @tsplus global
|
|
43
|
+
*/
|
|
44
|
+
import type { Exit } from "@effect/io/Exit";
|
|
45
|
+
/**
|
|
46
|
+
* @tsplus global
|
|
47
|
+
*/
|
|
48
|
+
import type { EffectSource } from "callbag-effect-ts/Source";
|
|
49
|
+
/**
|
|
50
|
+
* @tsplus global
|
|
51
|
+
*/
|
|
52
|
+
import type { EffectSink } from "callbag-effect-ts/Sink";
|
|
53
|
+
/**
|
|
54
|
+
* @tsplus global
|
|
55
|
+
*/
|
|
56
|
+
import type { HashMap } from "@fp-ts/data/HashMap";
|
|
57
|
+
/**
|
|
58
|
+
* @tsplus global
|
|
59
|
+
*/
|
|
60
|
+
import type { Ref } from "@effect/io/Ref";
|
|
61
|
+
/**
|
|
62
|
+
* @tsplus global
|
|
63
|
+
*/
|
|
64
|
+
import type { HashSet } from "@fp-ts/data/HashSet";
|
|
65
|
+
/**
|
|
66
|
+
* @tsplus global
|
|
67
|
+
*/
|
|
68
|
+
import { RateLimit, rest, Discord, Http, DiscordREST, LiveDiscordREST, Ix, Config, Log, IxHelpers, Flags, Members, } from "dfx";
|
|
69
|
+
/**
|
|
70
|
+
* @tsplus global
|
|
71
|
+
*/
|
|
72
|
+
import { Gateway, WS, DiscordWS, Shard, ShardStore } from "dfx/gateway";
|
|
73
|
+
/**
|
|
74
|
+
* @tsplus global
|
|
75
|
+
*/
|
|
76
|
+
import {} from "dfx/webhooks";
|
|
9
77
|
/**
|
|
10
78
|
* @tsplus global
|
|
11
79
|
*/
|
|
@@ -14,4 +82,9 @@ import type { Success } from "dfx/utils/effect";
|
|
|
14
82
|
* @tsplus global
|
|
15
83
|
*/
|
|
16
84
|
import { pipe, flow, identity } from "@fp-ts/data/Function";
|
|
17
|
-
export {};
|
|
85
|
+
export type { Effect } from "@effect/io/Effect";
|
|
86
|
+
export type { Layer } from "@effect/io/Layer";
|
|
87
|
+
export { Context, Tag } from "@fp-ts/data/Context";
|
|
88
|
+
export type { Duration } from "@fp-ts/data/Duration";
|
|
89
|
+
export type { Option as Maybe } from "@fp-ts/data/Option";
|
|
90
|
+
export type { Ref } from "@effect/io/Ref";
|
package/global.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export { Tag } from "@fp-ts/data/Context";
|
|
2
2
|
//# sourceMappingURL=global.js.map
|
package/global.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global.js","sourceRoot":"","sources":["../src/global.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"global.js","sourceRoot":"","sources":["../src/global.ts"],"names":[],"mappings":"AA+BA,OAAO,EAAW,GAAG,EAAE,MAAM,qBAAqB,CAAA"}
|
package/index.d.ts
CHANGED
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
import { Config } from "dfx/common";
|
|
2
1
|
export * as Discord from "./types.js";
|
|
3
2
|
export * as Config from "./DiscordConfig/index.js";
|
|
4
|
-
export * as
|
|
5
|
-
export * as Gateway from "./DiscordGateway/index.js";
|
|
3
|
+
export * as Http from "./Http/index.js";
|
|
6
4
|
export { DiscordREST, LiveDiscordREST, rest } from "./DiscordREST/index.js";
|
|
7
5
|
export * as Ix from "./Interactions/index.js";
|
|
8
|
-
export { run as runIxGateway } from "./Interactions/gateway.js";
|
|
9
6
|
export * as Log from "./Log/index.js";
|
|
10
|
-
export * as
|
|
7
|
+
export * as RateLimit from "./RateLimitStore/index.js";
|
|
11
8
|
export * as Flags from "./Helpers/flags.js";
|
|
12
9
|
export * as Intents from "./Helpers/intents.js";
|
|
13
10
|
export * as IxHelpers from "./Helpers/interactions.js";
|
|
14
11
|
export * as Members from "./Helpers/members.js";
|
|
15
12
|
export * as Perms from "./Helpers/permissions.js";
|
|
16
13
|
export * as UI from "./Helpers/ui.js";
|
|
17
|
-
export declare const LiveRateLimit: import("./common.js").Layer<import("./Log/index.js").Log, never, import("./RateLimitStore/index.js").RateLimitStore | import("./RateLimitStore/index.js").RateLimiter>;
|
|
18
|
-
export declare const LiveREST: import("./common.js").Layer<import("./DiscordConfig/index.js").DiscordConfig | import("./Log/index.js").Log, never, import("./DiscordREST/index.js").DiscordREST | import("./RateLimitStore/index.js").RateLimitStore | import("./RateLimitStore/index.js").RateLimiter>;
|
|
19
|
-
export declare const LiveGateway: import("./common.js").Layer<import("./DiscordREST/index.js").DiscordREST | import("./DiscordConfig/index.js").DiscordConfig | import("./Log/index.js").Log | import("./RateLimitStore/index.js").RateLimiter, never, import("./DiscordGateway/ShardStore/index.js").ShardStore | import("./DiscordGateway/DiscordWS/index.js").DiscordWSCodec | import("./DiscordGateway/index.js").DiscordGateway>;
|
|
20
|
-
export declare const LiveBot: import("./common.js").Layer<import("./DiscordConfig/index.js").DiscordConfig | import("./Log/index.js").Log, never, import("./DiscordGateway/ShardStore/index.js").ShardStore | import("./DiscordREST/index.js").DiscordREST | import("./RateLimitStore/index.js").RateLimitStore | import("./RateLimitStore/index.js").RateLimiter | import("./DiscordGateway/DiscordWS/index.js").DiscordWSCodec | import("./DiscordGateway/index.js").DiscordGateway>;
|
|
21
|
-
export declare const makeLayer: (config: Config.MakeOpts, debug?: boolean) => import("./common.js").Layer<never, never, import("./DiscordGateway/ShardStore/index.js").ShardStore | import("./DiscordREST/index.js").DiscordREST | import("./DiscordConfig/index.js").DiscordConfig | import("./Log/index.js").Log | import("./RateLimitStore/index.js").RateLimitStore | import("./RateLimitStore/index.js").RateLimiter | import("./DiscordGateway/DiscordWS/index.js").DiscordWSCodec | import("./DiscordGateway/index.js").DiscordGateway>;
|
package/index.js
CHANGED
|
@@ -1,29 +1,14 @@
|
|
|
1
|
-
import * as tsplus_module_1 from "dfx/common";
|
|
2
|
-
import * as tsplus_module_2 from "@effect/io/Layer";
|
|
3
|
-
import * as tsplus_module_3 from "dfx/common-gateway";
|
|
4
1
|
export * as Discord from "./types.js";
|
|
5
2
|
export * as Config from "./DiscordConfig/index.js";
|
|
6
|
-
export * as
|
|
7
|
-
export * as Gateway from "./DiscordGateway/index.js";
|
|
3
|
+
export * as Http from "./Http/index.js";
|
|
8
4
|
export { DiscordREST, LiveDiscordREST, rest } from "./DiscordREST/index.js";
|
|
9
5
|
export * as Ix from "./Interactions/index.js";
|
|
10
|
-
export { run as runIxGateway } from "./Interactions/gateway.js";
|
|
11
6
|
export * as Log from "./Log/index.js";
|
|
12
|
-
export * as
|
|
7
|
+
export * as RateLimit from "./RateLimitStore/index.js";
|
|
13
8
|
export * as Flags from "./Helpers/flags.js";
|
|
14
9
|
export * as Intents from "./Helpers/intents.js";
|
|
15
10
|
export * as IxHelpers from "./Helpers/interactions.js";
|
|
16
11
|
export * as Members from "./Helpers/members.js";
|
|
17
12
|
export * as Perms from "./Helpers/permissions.js";
|
|
18
13
|
export * as UI from "./Helpers/ui.js";
|
|
19
|
-
export const LiveRateLimit = tsplus_module_2.provideToAndMerge(tsplus_module_1.RateLimitStore.LiveRateLimiter)(tsplus_module_1.RateLimitStore.LiveMemoryRateLimitStore);
|
|
20
|
-
export const LiveREST = tsplus_module_2.provideToAndMerge(tsplus_module_1.Rest.LiveDiscordREST)(LiveRateLimit);
|
|
21
|
-
export const LiveGateway = tsplus_module_2.provideToAndMerge(tsplus_module_3.Gateway.LiveDiscordGateway)(tsplus_module_2.merge(tsplus_module_3.DWS.LiveJsonDiscordWSCodec)(tsplus_module_3.ShardStore.LiveMemoryShardStore));
|
|
22
|
-
export const LiveBot = tsplus_module_2.provideToAndMerge(LiveGateway)(LiveREST);
|
|
23
|
-
export const makeLayer = (config, debug = false) => {
|
|
24
|
-
const LiveLog = debug ? tsplus_module_1.Log.LiveLogDebug : tsplus_module_1.Log.LiveLog;
|
|
25
|
-
const LiveConfig = tsplus_module_1.Config.makeLayer(config);
|
|
26
|
-
const LiveEnv = tsplus_module_2.provideToAndMerge(LiveBot)(tsplus_module_2.merge(LiveConfig)(LiveLog));
|
|
27
|
-
return LiveEnv;
|
|
28
|
-
};
|
|
29
14
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
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,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAC7C,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAA;AACrC,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAA;AAEtD,OAAO,KAAK,KAAK,MAAM,oBAAoB,CAAA;AAC3C,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAA;AAC/C,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAA;AACtD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAA;AAC/C,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAA;AACjD,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dfx",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"@fp-ts/data": "^0.0.20"
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "8c8f87c2362d1f3c25b37ee71c55c4272fb7a1cb"
|
|
51
51
|
}
|
package/utils/effect.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Effect } from "
|
|
1
|
+
import { Effect } from "@effect/io/Effect";
|
|
2
2
|
export type Success<A extends Effect<any, any, any>> = A extends Effect<any, any, infer R> ? R : never;
|
package/webhooks.d.ts
CHANGED
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import { Config
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export * as RateLimitStore from "./RateLimitStore/index.js";
|
|
8
|
-
export * as Flags from "./Helpers/flags.js";
|
|
9
|
-
export * as IxHelpers from "./Helpers/interactions.js";
|
|
10
|
-
export * as Members from "./Helpers/members.js";
|
|
11
|
-
export * as Perms from "./Helpers/permissions.js";
|
|
12
|
-
export * as UI from "./Helpers/ui.js";
|
|
13
|
-
export declare const LiveRateLimit: import("./common.js").Layer<import("./Log/index.js").Log, never, import("./RateLimitStore/index.js").RateLimitStore | import("./RateLimitStore/index.js").RateLimiter>;
|
|
14
|
-
export declare const LiveREST: import("./common.js").Layer<import("./DiscordConfig/index.js").DiscordConfig | import("./Log/index.js").Log, never, import("./DiscordREST/index.js").DiscordREST | import("./RateLimitStore/index.js").RateLimitStore | import("./RateLimitStore/index.js").RateLimiter>;
|
|
15
|
-
export declare const makeLayer: (config: Config.MakeOpts & Ix.MakeWebhookConfigOpts, debug?: boolean) => import("./common.js").Layer<never, never, import("./DiscordREST/index.js").DiscordREST | import("./DiscordConfig/index.js").DiscordConfig | import("./Log/index.js").Log | import("./RateLimitStore/index.js").RateLimitStore | import("./RateLimitStore/index.js").RateLimiter | import("./Interactions/webhook.js").WebhookConfig>;
|
|
1
|
+
import { Config } from "dfx";
|
|
2
|
+
import { MakeConfigOpts } from "./Interactions/webhook.js";
|
|
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("./RateLimitStore/index.js").RateLimitStore | import("./RateLimitStore/index.js").RateLimiter>;
|
|
5
|
+
export declare const LiveREST: import("./global.js").Layer<import("./DiscordConfig/index.js").DiscordConfig | import("./Log/index.js").Log, never, import("./index.js").DiscordREST | import("./RateLimitStore/index.js").RateLimitStore | import("./RateLimitStore/index.js").RateLimiter>;
|
|
6
|
+
export declare const make: (config: Config.MakeOpts & MakeConfigOpts, debug?: boolean) => import("./global.js").Layer<never, never, import("./index.js").DiscordREST | import("./DiscordConfig/index.js").DiscordConfig | import("./Log/index.js").Log | import("./RateLimitStore/index.js").RateLimitStore | import("./RateLimitStore/index.js").RateLimiter | import("./Interactions/webhook.js").WebhookConfig>;
|
package/webhooks.js
CHANGED
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
import * as tsplus_module_1 from "dfx
|
|
1
|
+
import * as tsplus_module_1 from "dfx";
|
|
2
2
|
import * as tsplus_module_2 from "@effect/io/Layer";
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
export * as Flags from "./Helpers/flags.js";
|
|
10
|
-
export * as IxHelpers from "./Helpers/interactions.js";
|
|
11
|
-
export * as Members from "./Helpers/members.js";
|
|
12
|
-
export * as Perms from "./Helpers/permissions.js";
|
|
13
|
-
export * as UI from "./Helpers/ui.js";
|
|
14
|
-
export const LiveRateLimit = tsplus_module_2.provideToAndMerge(tsplus_module_1.RateLimitStore.LiveRateLimiter)(tsplus_module_1.RateLimitStore.LiveMemoryRateLimitStore);
|
|
15
|
-
export const LiveREST = tsplus_module_2.provideToAndMerge(tsplus_module_1.Rest.LiveDiscordREST)(LiveRateLimit);
|
|
16
|
-
export const makeLayer = (config, debug = false) => {
|
|
17
|
-
const LiveWebhook = tsplus_module_1.Ix.makeWebhookConfig(config);
|
|
3
|
+
import { makeConfigLayer } from "./Interactions/webhook.js";
|
|
4
|
+
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);
|
|
7
|
+
export const make = (config, debug = false) => {
|
|
8
|
+
const LiveWebhook = makeConfigLayer(config);
|
|
18
9
|
const LiveLog = debug ? tsplus_module_1.Log.LiveLogDebug : tsplus_module_1.Log.LiveLog;
|
|
19
10
|
const LiveConfig = tsplus_module_1.Config.makeLayer(config);
|
|
20
11
|
const LiveEnv = tsplus_module_2.provideToAndMerge(LiveREST)(tsplus_module_2.merge(LiveWebhook)(tsplus_module_2.merge(LiveConfig)(LiveLog)));
|
package/webhooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../src/webhooks.ts"],"names":[],"mappings":";;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../src/webhooks.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,eAAe,EAAkB,MAAM,2BAA2B,CAAA;AAE3E,OAAO,EACL,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,2BAA2B,CAAA;AAElC,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,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,qCAAwC,QAAQ,wBAAtB,WAAW,wBAAxB,UAAU,EAApB,OAAO,GAAsC,CAAA;IAE7D,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"}
|