dfx 0.20.0 → 0.20.2

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 (64) hide show
  1. package/Cache/driver.d.ts +1 -2
  2. package/Cache/index.d.ts +19 -20
  3. package/Cache/memory.d.ts +3 -3
  4. package/Cache/memoryTTL.d.ts +3 -5
  5. package/Cache/prelude.d.ts +1 -1
  6. package/DiscordConfig/index.d.ts +6 -6
  7. package/DiscordConfig/index.js +6 -7
  8. package/DiscordConfig/index.js.map +1 -1
  9. package/DiscordGateway/DiscordWS/index.d.ts +5 -6
  10. package/DiscordGateway/DiscordWS/index.js +1 -1
  11. package/DiscordGateway/Shard/heartbeats.d.ts +2 -4
  12. package/DiscordGateway/Shard/identify.d.ts +2 -3
  13. package/DiscordGateway/Shard/index.d.ts +4 -4
  14. package/DiscordGateway/Shard/invalidSession.d.ts +2 -3
  15. package/DiscordGateway/Shard/utils.d.ts +3 -4
  16. package/DiscordGateway/Shard/utils.js +1 -1
  17. package/DiscordGateway/ShardStore/index.d.ts +3 -4
  18. package/DiscordGateway/ShardStore/index.js +1 -1
  19. package/DiscordGateway/Sharder/index.d.ts +8 -9
  20. package/DiscordGateway/Sharder/index.js +1 -1
  21. package/DiscordGateway/WS/index.d.ts +2 -4
  22. package/DiscordGateway/index.d.ts +5 -6
  23. package/DiscordGateway/index.js +1 -1
  24. package/DiscordREST/index.d.ts +5 -5
  25. package/DiscordREST/index.js +1 -1
  26. package/DiscordREST/types.d.ts +1 -1
  27. package/DiscordREST/utils.d.ts +2 -2
  28. package/Helpers/interactions.d.ts +6 -5
  29. package/Helpers/interactions.js +1 -1
  30. package/Helpers/permissions.d.ts +3 -3
  31. package/Helpers/permissions.js +1 -1
  32. package/Http/index.d.ts +9 -9
  33. package/Http/index.js +1 -1
  34. package/Interactions/context.d.ts +8 -8
  35. package/Interactions/context.js +2 -3
  36. package/Interactions/context.js.map +1 -1
  37. package/Interactions/definitions.d.ts +2 -1
  38. package/Interactions/gateway.d.ts +6 -2
  39. package/Interactions/gateway.js +4 -1
  40. package/Interactions/gateway.js.map +1 -1
  41. package/Interactions/handlers.d.ts +1 -1
  42. package/Interactions/handlers.js +1 -1
  43. package/Interactions/index.d.ts +11 -8
  44. package/Interactions/index.js +3 -0
  45. package/Interactions/index.js.map +1 -1
  46. package/Interactions/webhook.d.ts +13 -6
  47. package/Interactions/webhook.js +13 -8
  48. package/Interactions/webhook.js.map +1 -1
  49. package/Log/index.d.ts +7 -7
  50. package/Log/index.js +1 -1
  51. package/RateLimit/index.d.ts +7 -9
  52. package/RateLimit/index.js +1 -1
  53. package/RateLimit/index.js.map +1 -1
  54. package/RateLimit/utils.d.ts +1 -1
  55. package/gateway.d.ts +6 -6
  56. package/global.d.ts +2 -76
  57. package/global.js +1 -1
  58. package/global.js.map +1 -1
  59. package/package.json +2 -2
  60. package/utils/common.d.ts +18 -0
  61. package/utils/common.js +3 -0
  62. package/utils/common.js.map +1 -0
  63. package/utils/effect.d.ts +1 -2
  64. package/webhooks.d.ts +3 -3
package/Cache/driver.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { Effect } from "@effect/io/Effect";
2
- import { Maybe } from "dfx";
1
+ import { Effect, Maybe } from "dfx/utils/common";
3
2
  export interface ParentCacheDriver<E, T> {
4
3
  readonly size: Effect<never, E, number>;
5
4
  sizeForParent: (parentId: string) => Effect<never, E, number>;
package/Cache/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { EffectSource } from "callbag-effect-ts/Source";
2
- import { Effect } from "@effect/io/Effect";
1
+ import { EffectSource, Effect } from "dfx/utils/common";
3
2
  import { CacheDriver, ParentCacheDriver } from "./driver.js";
4
3
  export * from "./driver.js";
5
4
  export { create as memoryDriver, createWithParent as memoryParentDriver, } from "./memory.js";
@@ -37,30 +36,30 @@ export type CacheOp<T> = {
37
36
  export declare const makeWithParent: <EOps, EDriver, EMiss, EPMiss, A>({ driver, ops, onMiss, onParentMiss, }: {
38
37
  driver: ParentCacheDriver<EDriver, A>;
39
38
  ops?: import("callbag-effect-ts/Source").EffectSource<never, EOps, ParentCacheOp<A>> | undefined;
40
- onMiss: (parentId: string, id: string) => import("../global.js").Effect<never, EMiss, A>;
41
- onParentMiss: (parentId: string) => import("../global.js").Effect<never, EPMiss, [id: string, resource: A][]>;
39
+ onMiss: (parentId: string, id: string) => import("../utils/common.js").Effect<never, EMiss, A>;
40
+ onParentMiss: (parentId: string) => import("../utils/common.js").Effect<never, EPMiss, [id: string, resource: A][]>;
42
41
  }) => {
43
- get: (parentId: string, id: string) => import("../global.js").Effect<never, EDriver | EMiss, A>;
44
- getForParent: (parentId: string) => import("../global.js").Effect<never, EDriver | EPMiss, ReadonlyMap<string, A>>;
45
- run: import("../global.js").Effect<never, EOps | EDriver, void>;
46
- size: import("../global.js").Effect<never, EDriver, number>;
47
- sizeForParent: (parentId: string) => import("../global.js").Effect<never, EDriver, number>;
48
- set: (parentId: string, resourceId: string, resource: A) => import("../global.js").Effect<never, EDriver, void>;
49
- delete: (parentId: string, resourceId: string) => import("../global.js").Effect<never, EDriver, void>;
50
- parentDelete: (parentId: string) => import("../global.js").Effect<never, EDriver, void>;
51
- refreshTTL: (parentId: string, resourceId: string) => import("../global.js").Effect<never, EDriver, void>;
42
+ get: (parentId: string, id: string) => import("../utils/common.js").Effect<never, EDriver | EMiss, A>;
43
+ getForParent: (parentId: string) => import("../utils/common.js").Effect<never, EDriver | EPMiss, ReadonlyMap<string, A>>;
44
+ run: import("../utils/common.js").Effect<never, EOps | EDriver, void>;
45
+ size: import("../utils/common.js").Effect<never, EDriver, number>;
46
+ sizeForParent: (parentId: string) => import("../utils/common.js").Effect<never, EDriver, number>;
47
+ set: (parentId: string, resourceId: string, resource: A) => import("../utils/common.js").Effect<never, EDriver, void>;
48
+ delete: (parentId: string, resourceId: string) => import("../utils/common.js").Effect<never, EDriver, void>;
49
+ parentDelete: (parentId: string) => import("../utils/common.js").Effect<never, EDriver, void>;
50
+ refreshTTL: (parentId: string, resourceId: string) => import("../utils/common.js").Effect<never, EDriver, void>;
52
51
  };
53
52
  export declare const make: <EOps, EDriver, EMiss, A>({ driver, ops, onMiss, }: {
54
53
  driver: CacheDriver<EDriver, A>;
55
54
  ops?: import("callbag-effect-ts/Source").EffectSource<never, EOps, CacheOp<A>> | undefined;
56
- onMiss: (id: string) => import("../global.js").Effect<never, EMiss, A>;
55
+ onMiss: (id: string) => import("../utils/common.js").Effect<never, EMiss, A>;
57
56
  }) => {
58
- get: (id: string) => import("../global.js").Effect<never, EDriver | EMiss, A>;
59
- run: import("../global.js").Effect<never, EOps | EDriver, void>;
60
- size: import("../global.js").Effect<never, EDriver, number>;
61
- set: (resourceId: string, resource: A) => import("../global.js").Effect<never, EDriver, void>;
62
- delete: (resourceId: string) => import("../global.js").Effect<never, EDriver, void>;
63
- refreshTTL: (resourceId: string) => import("../global.js").Effect<never, EDriver, void>;
57
+ get: (id: string) => import("../utils/common.js").Effect<never, EDriver | EMiss, A>;
58
+ run: import("../utils/common.js").Effect<never, EOps | EDriver, void>;
59
+ size: import("../utils/common.js").Effect<never, EDriver, number>;
60
+ set: (resourceId: string, resource: A) => import("../utils/common.js").Effect<never, EDriver, void>;
61
+ delete: (resourceId: string) => import("../utils/common.js").Effect<never, EDriver, void>;
62
+ refreshTTL: (resourceId: string) => import("../utils/common.js").Effect<never, EDriver, void>;
64
63
  };
65
64
  export declare class CacheMissError {
66
65
  readonly cacheName: string;
package/Cache/memory.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { Maybe } from "dfx";
2
- export declare const createWithParent: <T>() => import("../global.js").Effect<never, never, import("./driver.js").ParentCacheDriver<never, T>>;
3
- export declare const create: <T>() => import("../global.js").Effect<never, never, import("./driver.js").CacheDriver<never, T>>;
1
+ import { Maybe } from "dfx/utils/common";
2
+ export declare const createWithParent: <T>() => import("../utils/common.js").Effect<never, never, import("./driver.js").ParentCacheDriver<never, T>>;
3
+ export declare const create: <T>() => import("../utils/common.js").Effect<never, never, import("./driver.js").CacheDriver<never, T>>;
@@ -1,6 +1,4 @@
1
- import { Duration } from "@fp-ts/data/Duration";
2
- import { Maybe } from "dfx";
3
- import { Effect } from "@effect/io/Effect";
1
+ import { Duration, Maybe, Effect } from "dfx/utils/common";
4
2
  export interface MemoryTTLOpts {
5
3
  /** The approx. number of milliseconds to keep items */
6
4
  ttl: Duration;
@@ -18,5 +16,5 @@ export interface MemoryTTLOpts {
18
16
  */
19
17
  strategy?: "activity" | "usage" | "expiry";
20
18
  }
21
- export declare const create: <T>(opts: MemoryTTLOpts) => import("../global.js").Effect<never, never, import("./driver.js").CacheDriver<never, T>>;
22
- export declare const createWithParent: <T>(opts: MemoryTTLOpts) => import("../global.js").Effect<never, never, import("./driver.js").ParentCacheDriver<never, T>>;
19
+ export declare const create: <T>(opts: MemoryTTLOpts) => import("../utils/common.js").Effect<never, never, import("./driver.js").CacheDriver<never, T>>;
20
+ export declare const createWithParent: <T>(opts: MemoryTTLOpts) => import("../utils/common.js").Effect<never, never, import("./driver.js").ParentCacheDriver<never, T>>;
@@ -1,4 +1,4 @@
1
- import { EffectSource } from "callbag-effect-ts/Source";
1
+ import { EffectSource } from "dfx/utils/common";
2
2
  import { Discord } from "dfx";
3
3
  import { Effect } from "@effect/io/Effect";
4
4
  import { ParentCacheOp, CacheOp, CacheDriver, ParentCacheDriver, CacheMissError } from "./index.js";
@@ -1,4 +1,4 @@
1
- import { Duration } from "@fp-ts/data/Duration";
1
+ import { Duration } from "dfx/utils/common";
2
2
  import { Discord } from "dfx";
3
3
  export interface DiscordConfig {
4
4
  token: string;
@@ -16,23 +16,23 @@ export interface DiscordConfig {
16
16
  identifyRateLimit: readonly [window: number, limit: number];
17
17
  };
18
18
  }
19
- export declare const DiscordConfig: import("../global.js").Tag<DiscordConfig>;
19
+ export declare const DiscordConfig: import("../utils/common.js").Tag<DiscordConfig>;
20
20
  export interface MakeOpts {
21
21
  token: string;
22
22
  rest?: Partial<DiscordConfig["rest"]>;
23
23
  gateway?: Partial<DiscordConfig["gateway"]>;
24
24
  }
25
25
  export declare const make: ({ token, rest, gateway }: MakeOpts) => DiscordConfig;
26
- export declare const makeLayer: (a_0: MakeOpts) => import("../global.js").Layer<never, never, DiscordConfig>;
27
- export declare const token: import("../global.js").Effect<DiscordConfig, never, string>;
28
- export declare const rest: import("../global.js").Effect<DiscordConfig, never, {
26
+ export declare const makeLayer: (a_0: MakeOpts) => import("../utils/common.js").Layer<never, never, DiscordConfig>;
27
+ export declare const token: import("../utils/common.js").Effect<DiscordConfig, never, string>;
28
+ export declare const rest: import("../utils/common.js").Effect<DiscordConfig, never, {
29
29
  baseUrl: string;
30
30
  globalRateLimit: {
31
31
  limit: number;
32
32
  window: Duration;
33
33
  };
34
34
  }>;
35
- export declare const gateway: import("../global.js").Effect<DiscordConfig, never, {
35
+ export declare const gateway: import("../utils/common.js").Effect<DiscordConfig, never, {
36
36
  intents: number;
37
37
  presence?: import("../types.js").UpdatePresence | undefined;
38
38
  shardCount?: number | undefined;
@@ -1,9 +1,8 @@
1
- import * as tsplus_module_1 from "@fp-ts/data/Context";
1
+ import * as tsplus_module_1 from "dfx/utils/common";
2
2
  import * as tsplus_module_2 from "@fp-ts/data/Duration";
3
3
  import * as tsplus_module_3 from "dfx";
4
4
  import * as tsplus_module_4 from "@effect/io/Layer";
5
- import * as tsplus_module_5 from "@fp-ts/data/Function";
6
- import * as tsplus_module_6 from "@effect/io/Effect";
5
+ import * as tsplus_module_5 from "@effect/io/Effect";
7
6
  const VERSION = 9;
8
7
  export const DiscordConfig = tsplus_module_1.Tag();
9
8
  export const make = ({ token, rest, gateway }) => ({
@@ -23,8 +22,8 @@ export const make = ({ token, rest, gateway }) => ({
23
22
  ...(gateway ?? {}),
24
23
  },
25
24
  });
26
- export const makeLayer = tsplus_module_5.flow(make, tsplus_module_4.succeed(DiscordConfig));
27
- export const token = tsplus_module_6.serviceWith(DiscordConfig)(({ token }) => token);
28
- export const rest = tsplus_module_6.serviceWith(DiscordConfig)(({ rest }) => rest);
29
- export const gateway = tsplus_module_6.serviceWith(DiscordConfig)(({ gateway }) => gateway);
25
+ export const makeLayer = tsplus_module_1.flow(make, tsplus_module_4.succeed(DiscordConfig));
26
+ export const token = tsplus_module_5.serviceWith(DiscordConfig)(({ token }) => token);
27
+ export const rest = tsplus_module_5.serviceWith(DiscordConfig)(({ rest }) => rest);
28
+ export const gateway = tsplus_module_5.serviceWith(DiscordConfig)(({ gateway }) => gateway);
30
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/DiscordConfig/index.ts"],"names":[],"mappings":";;;;;;AAAA,MAAM,OAAO,GAAG,CAAC,CAAA;AAmBjB,MAAM,CAAC,MAAM,aAAa,GAAG,gBAAA,GAAG,EAAiB,CAAA;AAQjD,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAY,EAAiB,EAAE,CAAC,CAAC;IAC1E,KAAK;IACL,IAAI,EAAE;QACJ,OAAO,EAAE,4BAA4B,OAAO,EAAE;QAC9C,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;QACf,eAAe,EAAE;YACf,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,wBAAiB,CAAC,CAAC;YAC3B,GAAG,CAAC,IAAI,EAAE,eAAe,IAAI,EAAE,CAAC;SACjC;KACF;IACD,OAAO,EAAE;QACP,OAAO,EAAE,gBAAA,OAAO,CAAC,cAAc,CAAC,MAAM;QACtC,iBAAiB,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QAC5B,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;KACnB;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,gBAAA,IAAI,CAAC,IAAI,EAAE,wBAAc,aAAa,CAAC,CAAC,CAAA;AAEjE,MAAM,CAAC,MAAM,KAAK,GAAG,4BAAmB,aAAa,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,CAAA;AAC5E,MAAM,CAAC,MAAM,IAAI,GAAG,4BAAmB,aAAa,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAA;AACzE,MAAM,CAAC,MAAM,OAAO,GAAG,4BAAmB,aAAa,CAAC,CACtD,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CACzB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/DiscordConfig/index.ts"],"names":[],"mappings":";;;;;AAAA,MAAM,OAAO,GAAG,CAAC,CAAA;AAmBjB,MAAM,CAAC,MAAM,aAAa,GAAG,gBAAA,GAAG,EAAiB,CAAA;AAQjD,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAY,EAAiB,EAAE,CAAC,CAAC;IAC1E,KAAK;IACL,IAAI,EAAE;QACJ,OAAO,EAAE,4BAA4B,OAAO,EAAE;QAC9C,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;QACf,eAAe,EAAE;YACf,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,wBAAiB,CAAC,CAAC;YAC3B,GAAG,CAAC,IAAI,EAAE,eAAe,IAAI,EAAE,CAAC;SACjC;KACF;IACD,OAAO,EAAE;QACP,OAAO,EAAE,gBAAA,OAAO,CAAC,cAAc,CAAC,MAAM;QACtC,iBAAiB,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QAC5B,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;KACnB;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,gBAAA,IAAI,CAAC,IAAI,EAAE,wBAAc,aAAa,CAAC,CAAC,CAAA;AAEjE,MAAM,CAAC,MAAM,KAAK,GAAG,4BAAmB,aAAa,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,CAAA;AAC5E,MAAM,CAAC,MAAM,IAAI,GAAG,4BAAmB,aAAa,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAA;AACzE,MAAM,CAAC,MAAM,OAAO,GAAG,4BAAmB,aAAa,CAAC,CACtD,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CACzB,CAAA"}
@@ -1,8 +1,7 @@
1
1
  /// <reference types="ws" />
2
2
  import { Discord } from "dfx";
3
3
  import { WS } from "dfx/gateway";
4
- import { Effect } from "@effect/io/Effect";
5
- import { EffectSource } from "callbag-effect-ts/Source";
4
+ import { Effect, EffectSource } from "dfx/utils/common";
6
5
  import WebSocket from "isomorphic-ws";
7
6
  export type Message = Discord.GatewayPayload | WS.Reconnect;
8
7
  export interface OpenOpts {
@@ -16,9 +15,9 @@ export interface DiscordWSCodec {
16
15
  encode: (p: Discord.GatewayPayload) => string;
17
16
  decode: (p: WebSocket.Data) => Discord.GatewayPayload;
18
17
  }
19
- export declare const DiscordWSCodec: import("../../global.js").Tag<DiscordWSCodec>;
20
- export declare const LiveJsonDiscordWSCodec: import("../../global.js").Layer<never, never, DiscordWSCodec>;
21
- export declare const make: ({ url, version, outbound, }: OpenOpts) => import("../../global.js").Effect<DiscordWSCodec | import("../../Log/index.js").Log, never, {
18
+ export declare const DiscordWSCodec: import("../../utils/common.js").Tag<DiscordWSCodec>;
19
+ export declare const LiveJsonDiscordWSCodec: import("../../utils/common.js").Layer<never, never, DiscordWSCodec>;
20
+ export declare const make: ({ url, version, outbound, }: OpenOpts) => import("../../utils/common.js").Effect<DiscordWSCodec | import("../../Log/index.js").Log, never, {
22
21
  source: import("callbag-effect-ts/Source").EffectSource<never, never, import("../../types.js").GatewayPayload<any>>;
23
- setUrl: (url: string) => import("../../global.js").Effect<never, never, void>;
22
+ setUrl: (url: string) => import("../../utils/common.js").Effect<never, never, void>;
24
23
  }>;
@@ -1,4 +1,4 @@
1
- import * as tsplus_module_1 from "@fp-ts/data/Context";
1
+ import * as tsplus_module_1 from "dfx/utils/common";
2
2
  import * as tsplus_module_2 from "@effect/io/Layer";
3
3
  import * as tsplus_module_3 from "@fp-ts/data/Duration";
4
4
  import * as tsplus_module_4 from "@effect/io/Schedule";
@@ -1,6 +1,4 @@
1
- import { Ref } from "@effect/io/Ref";
2
- import { Maybe, Discord } from "dfx";
3
- import { Effect } from "@effect/io/Effect";
1
+ import { Ref, Maybe, Effect, EffectSource } from "dfx/utils/common";
4
2
  import { DiscordWS } from "dfx/gateway";
5
- import { EffectSource } from "callbag-effect-ts/Source";
3
+ import { Discord } from "dfx";
6
4
  export declare const fromRaw: <R, E>(source: import("callbag-effect-ts/Source").EffectSource<R, E, import("../../types.js").GatewayPayload<any>>, seqRef: Ref<Maybe<number>>) => import("callbag-effect-ts/Source").EffectSource<R, E, import("../DiscordWS/index.js").Message>;
@@ -1,6 +1,5 @@
1
- import { Discord, Maybe } from "dfx";
2
- import { Ref } from "@effect/io/Ref";
3
- import { EffectSource } from "callbag-effect-ts/Source";
1
+ import { Discord } from "dfx";
2
+ import { Ref, Maybe, EffectSource } from "dfx/utils/common";
4
3
  export interface Options {
5
4
  token: string;
6
5
  intents: number;
@@ -1,9 +1,9 @@
1
1
  import { DiscordWS } from "dfx/gateway";
2
2
  import { Discord } from "dfx";
3
- export declare const make: (shard: [id: number, count: number]) => import("../../global.js").Effect<import("../DiscordWS/index.js").DiscordWSCodec | import("../../Log/index.js").Log | import("../../DiscordConfig/index.js").DiscordConfig | import("../../index.js").RateLimiter, never, {
4
- run: import("../../global.js").Effect<never, never, void>;
3
+ export declare const make: (shard: [id: number, count: number]) => import("../../utils/common.js").Effect<import("../DiscordWS/index.js").DiscordWSCodec | import("../../Log/index.js").Log | import("../../DiscordConfig/index.js").DiscordConfig | import("../../index.js").RateLimiter, never, {
4
+ run: import("../../utils/common.js").Effect<never, never, void>;
5
5
  raw: import("callbag-effect-ts/Source").EffectSource<never, never, import("../../types.js").GatewayPayload<any>>;
6
6
  dispatch: import("callbag-effect-ts/Source").EffectSource<never, never, import("../../types.js").GatewayPayload<import("../../types.js").ReceiveEvent>>;
7
- send: (p: Discord.GatewayPayload) => import("../../global.js").Effect<never, never, boolean>;
8
- reconnect: import("../../global.js").Effect<never, never, boolean>;
7
+ send: (p: Discord.GatewayPayload) => import("../../utils/common.js").Effect<never, never, boolean>;
8
+ reconnect: import("../../utils/common.js").Effect<never, never, boolean>;
9
9
  }>;
@@ -1,5 +1,4 @@
1
- import { EffectSource } from "callbag-effect-ts/Source";
2
- import { Discord, Maybe } from "dfx";
3
- import { Ref } from "@effect/io/Ref";
1
+ import { EffectSource, Ref, Maybe } from "dfx/utils/common";
2
+ import { Discord } from "dfx";
4
3
  import { DiscordWS } from "dfx/gateway";
5
4
  export declare const fromRaw: <R, E>(raw: import("callbag-effect-ts/Source").EffectSource<R, E, import("../../types.js").GatewayPayload<any>>, latestReady: Ref<Maybe<Discord.ReadyEvent>>) => import("callbag-effect-ts/Source").EffectSource<R, E, import("../DiscordWS/index.js").Message>;
@@ -1,5 +1,4 @@
1
- import { EffectSource } from "callbag-effect-ts/Source";
2
- import { Discord, Maybe } from "dfx";
3
- import { Ref } from "@effect/io/Ref";
1
+ import { EffectSource, Maybe, Ref } from "dfx/utils/common";
2
+ import { Discord } from "dfx";
4
3
  export declare const opCode: <R, E>(source: import("callbag-effect-ts/Source").EffectSource<R, E, import("../../types.js").GatewayPayload<any>>) => <T = any>(code: Discord.GatewayOpcode) => import("callbag-effect-ts/Source").EffectSource<R, E, import("../../types.js").GatewayPayload<T>>;
5
- export declare const latest: <T>(f: (p: Discord.GatewayPayload) => import("../../index.js").Maybe<T>) => import("../../global.js").Effect<never, never, readonly [import("../../global.js").Ref<import("../../index.js").Maybe<T>>, (p: import("../../types.js").GatewayPayload<any>) => import("../../global.js").Effect<never, never, void>]>;
4
+ export declare const latest: <T>(f: (p: Discord.GatewayPayload) => import("../../index.js").Maybe<T>) => import("../../utils/common.js").Effect<never, never, readonly [import("../../utils/common.js").Ref<import("../../index.js").Maybe<T>>, (p: import("../../types.js").GatewayPayload<any>) => import("../../utils/common.js").Effect<never, never, void>]>;
@@ -2,7 +2,7 @@ import * as tsplus_module_1 from "callbag-effect-ts/Source/filter";
2
2
  import * as tsplus_module_2 from "@effect/io/Effect";
3
3
  import * as tsplus_module_3 from "@fp-ts/data/Option";
4
4
  import * as tsplus_module_4 from "@effect/io/Ref";
5
- import * as tsplus_module_5 from "@fp-ts/data/Function";
5
+ import * as tsplus_module_5 from "dfx/utils/common";
6
6
  export const opCode = (source) => (code) => tsplus_module_1.filter((p) => p.op === code)(source);
7
7
  const maybeUpdateRef = (f, ref) => tsplus_module_5.flow(f, (o) => tsplus_module_3.match(tsplus_module_2.unit, (a) => tsplus_module_4.set(tsplus_module_3.some(a))(ref))(o));
8
8
  export const latest = (f) => tsplus_module_2.map((ref) => [ref, maybeUpdateRef(f, ref)])(tsplus_module_4.make(tsplus_module_3.none));
@@ -1,5 +1,4 @@
1
- import { Effect } from "@effect/io/Effect";
2
- import { Maybe } from "dfx";
1
+ import { Effect, Maybe } from "dfx/utils/common";
3
2
  export interface ClaimIdContext {
4
3
  sharderCount: number;
5
4
  totalCount: number;
@@ -9,5 +8,5 @@ export interface ShardStore {
9
8
  allClaimed: (totalCount: number) => Effect<never, never, boolean>;
10
9
  heartbeat?: (shardId: number) => Effect<never, never, void>;
11
10
  }
12
- export declare const ShardStore: import("../../global.js").Tag<ShardStore>;
13
- export declare const LiveMemoryShardStore: import("../../global.js").Layer<never, never, ShardStore>;
11
+ export declare const ShardStore: import("../../utils/common.js").Tag<ShardStore>;
12
+ export declare const LiveMemoryShardStore: import("../../utils/common.js").Layer<never, never, ShardStore>;
@@ -1,4 +1,4 @@
1
- import * as tsplus_module_1 from "@fp-ts/data/Context";
1
+ import * as tsplus_module_1 from "dfx/utils/common";
2
2
  import * as tsplus_module_2 from "@fp-ts/data/Option";
3
3
  import * as tsplus_module_3 from "@effect/io/Effect";
4
4
  import * as tsplus_module_4 from "@effect/io/Layer";
@@ -1,19 +1,18 @@
1
- import { Effect } from "@effect/io/Effect";
2
- import { Maybe, Discord } from "dfx";
3
- import { EffectSource } from "callbag-effect-ts/Source";
1
+ import { Effect, Maybe, EffectSource } from "dfx/utils/common";
2
+ import { Discord } from "dfx";
4
3
  import { Success } from "dfx/utils/effect";
5
4
  import { ShardStore } from "../ShardStore/index.js";
6
- declare const make: import("../../global.js").Effect<import("../DiscordWS/index.js").DiscordWSCodec | import("../../Log/index.js").Log | ShardStore | import("../../DiscordConfig/index.js").DiscordConfig | import("../../index.js").DiscordREST | import("../../index.js").RateLimiter, never, {
5
+ declare const make: import("../../utils/common.js").Effect<import("../../index.js").DiscordREST | import("../DiscordWS/index.js").DiscordWSCodec | import("../../Log/index.js").Log | ShardStore | import("../../DiscordConfig/index.js").DiscordConfig | import("../../index.js").RateLimiter, never, {
7
6
  shards: import("callbag-effect-ts/Source").EffectSource<never, never, {
8
- run: import("../../global.js").Effect<never, never, void>;
7
+ run: import("../../utils/common.js").Effect<never, never, void>;
9
8
  raw: import("callbag-effect-ts/Source").EffectSource<never, never, import("../../types.js").GatewayPayload<any>>;
10
9
  dispatch: import("callbag-effect-ts/Source").EffectSource<never, never, import("../../types.js").GatewayPayload<import("../../types.js").ReceiveEvent>>;
11
- send: (p: import("../../types.js").GatewayPayload<any>) => import("../../global.js").Effect<never, never, boolean>;
12
- reconnect: import("../../global.js").Effect<never, never, boolean>;
10
+ send: (p: import("../../types.js").GatewayPayload<any>) => import("../../utils/common.js").Effect<never, never, boolean>;
11
+ reconnect: import("../../utils/common.js").Effect<never, never, boolean>;
13
12
  }>;
14
13
  }>;
15
14
  export interface Sharder extends Success<typeof make> {
16
15
  }
17
- export declare const Sharder: import("../../global.js").Tag<Sharder>;
18
- export declare const LiveSharder: import("../../global.js").Layer<import("../DiscordWS/index.js").DiscordWSCodec | import("../../Log/index.js").Log | ShardStore | import("../../DiscordConfig/index.js").DiscordConfig | import("../../index.js").DiscordREST | import("../../index.js").RateLimiter, never, Sharder>;
16
+ export declare const Sharder: import("../../utils/common.js").Tag<Sharder>;
17
+ export declare const LiveSharder: import("../../utils/common.js").Layer<import("../../index.js").DiscordREST | import("../DiscordWS/index.js").DiscordWSCodec | import("../../Log/index.js").Log | ShardStore | import("../../DiscordConfig/index.js").DiscordConfig | import("../../index.js").RateLimiter, never, Sharder>;
19
18
  export {};
@@ -15,7 +15,7 @@ import * as tsplus_module_14 from "@fp-ts/data/Option";
15
15
  import * as tsplus_module_15 from "callbag-effect-ts/Source/empty";
16
16
  import * as tsplus_module_16 from "callbag-effect-ts/Source/resource";
17
17
  import * as tsplus_module_17 from "dfx";
18
- import * as tsplus_module_18 from "@fp-ts/data/Context";
18
+ import * as tsplus_module_18 from "dfx/utils/common";
19
19
  import { millis } from "@fp-ts/data/Duration";
20
20
  import { overridePull } from "callbag-effect-ts/Source";
21
21
  import { ShardStore } from "../ShardStore/index.js";
@@ -1,8 +1,6 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
2
  /// <reference types="ws" />
3
- import { Ref } from "@effect/io/Ref";
4
- import { Effect } from "@effect/io/Effect";
5
- import { EffectSource } from "callbag-effect-ts/Source";
3
+ import { Ref, Effect, EffectSource } from "dfx/utils/common";
6
4
  import WebSocket from "isomorphic-ws";
7
5
  export declare const Reconnect: unique symbol;
8
6
  export type Reconnect = typeof Reconnect;
@@ -18,4 +16,4 @@ export declare class WebSocketCloseError {
18
16
  readonly _tag = "WebSocketCloseError";
19
17
  constructor(code: number, reason: string);
20
18
  }
21
- export declare const make: (url: Ref<string>, takeOutbound: Effect<never, never, Message>) => import("../../global.js").Effect<import("../../Log/index.js").Log, never, import("callbag-effect-ts/Source").EffectSource<never, WebSocketError | WebSocketCloseError, WebSocket.Data>>;
19
+ export declare const make: (url: Ref<string>, takeOutbound: Effect<never, never, Message>) => import("../../utils/common.js").Effect<import("../../Log/index.js").Log, never, import("callbag-effect-ts/Source").EffectSource<never, WebSocketError | WebSocketCloseError, WebSocket.Data>>;
@@ -1,15 +1,14 @@
1
- import { EffectSource } from "callbag-effect-ts/Source";
1
+ import { EffectSource, Effect } from "dfx/utils/common";
2
2
  import { Discord } from "dfx";
3
- import { Effect } from "@effect/io/Effect";
4
3
  import { Success } from "dfx/utils/effect";
5
4
  import { Sharder } from "./Sharder/index.js";
6
- export declare const make: import("../global.js").Effect<Sharder, never, {
5
+ export declare const make: import("../utils/common.js").Effect<Sharder, never, {
7
6
  raw: import("callbag-effect-ts/Source").EffectSource<never, never, import("../types.js").GatewayPayload<any>>;
8
7
  dispatch: import("callbag-effect-ts/Source").EffectSource<never, never, import("../types.js").GatewayPayload<import("../types.js").ReceiveEvent>>;
9
8
  fromDispatch: <K extends keyof import("../types.js").ReceiveEvents>(event: K) => import("callbag-effect-ts/Source").EffectSource<never, never, import("../types.js").ReceiveEvents[K]>;
10
- handleDispatch: <K_1 extends keyof import("../types.js").ReceiveEvents, R1, E1, A>(event: K_1, handle: (event: import("../types.js").ReceiveEvents[K_1]) => import("../global.js").Effect<R1, E1, A>) => import("../global.js").Effect<R1, E1, void>;
9
+ handleDispatch: <K_1 extends keyof import("../types.js").ReceiveEvents, R1, E1, A>(event: K_1, handle: (event: import("../types.js").ReceiveEvents[K_1]) => import("../utils/common.js").Effect<R1, E1, A>) => import("../utils/common.js").Effect<R1, E1, void>;
11
10
  }>;
12
11
  export interface DiscordGateway extends Success<typeof make> {
13
12
  }
14
- export declare const DiscordGateway: import("../global.js").Tag<DiscordGateway>;
15
- export declare const LiveDiscordGateway: import("../global.js").Layer<Sharder, never, DiscordGateway>;
13
+ export declare const DiscordGateway: import("../utils/common.js").Tag<DiscordGateway>;
14
+ export declare const LiveDiscordGateway: import("../utils/common.js").Layer<Sharder, never, DiscordGateway>;
@@ -5,7 +5,7 @@ import * as tsplus_module_4 from "callbag-effect-ts/Source/chainPar";
5
5
  import * as tsplus_module_5 from "callbag-effect-ts/Source/run";
6
6
  import * as tsplus_module_6 from "callbag-effect-ts/Source/share";
7
7
  import * as tsplus_module_7 from "@effect/io/Effect";
8
- import * as tsplus_module_8 from "@fp-ts/data/Context";
8
+ import * as tsplus_module_8 from "dfx/utils/common";
9
9
  import * as tsplus_module_9 from "@effect/io/Layer";
10
10
  import { Sharder } from "./Sharder/index.js";
11
11
  const fromDispatchFactory = (source) => (event) => tsplus_module_2.map((p) => p.d)(tsplus_module_1.filter((p) => p.t === event)(source));
@@ -1,8 +1,8 @@
1
1
  import { BucketDetails, FetchError, StatusCodeError, JsonParseError, Discord } from "dfx";
2
- import { Effect } from "@effect/io/Effect";
2
+ import { Effect } from "dfx/utils/common";
3
3
  import { Success } from "dfx/utils/effect";
4
4
  import { ResponseWithData, RestResponse } from "./types.js";
5
- declare const make: import("../global.js").Effect<import("../Log/index.js").Log | import("../DiscordConfig/index.js").DiscordConfig | import("../index.js").Http | import("../index.js").RateLimitStore | import("../index.js").RateLimiter, never, {
5
+ declare const make: import("../utils/common.js").Effect<import("../Log/index.js").Log | import("../DiscordConfig/index.js").DiscordConfig | import("../index.js").Http | import("../index.js").RateLimitStore | import("../index.js").RateLimiter, never, {
6
6
  addGuildMember: (guildId: string, userId: string, params?: Partial<import("../types.js").AddGuildMemberParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildMember>;
7
7
  addGuildMemberRole: (guildId: string, userId: string, roleId: string, options?: RequestInit | undefined) => RestResponse<any>;
8
8
  addThreadMember: (channelId: string, userId: string, options?: RequestInit | undefined) => RestResponse<any>;
@@ -176,10 +176,10 @@ declare const make: import("../global.js").Effect<import("../Log/index.js").Log
176
176
  syncGuildTemplate: (guildId: string, templateCode: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildTemplate>;
177
177
  triggerTypingIndicator: (channelId: string, options?: RequestInit | undefined) => RestResponse<any>;
178
178
  unpinMessage: (channelId: string, messageId: string, options?: RequestInit | undefined) => RestResponse<any>;
179
- request: <A = unknown>(path: string, init?: RequestInit) => import("../global.js").Effect<never, import("../index.js").FetchError | import("../index.js").StatusCodeError | import("../index.js").JsonParseError, ResponseWithData<A>>;
179
+ request: <A = unknown>(path: string, init?: RequestInit) => import("../utils/common.js").Effect<never, import("../index.js").FetchError | import("../index.js").StatusCodeError | import("../index.js").JsonParseError, ResponseWithData<A>>;
180
180
  }>;
181
181
  export interface DiscordREST extends Success<typeof make> {
182
182
  }
183
- export declare const DiscordREST: import("../global.js").Tag<DiscordREST>;
184
- export declare const LiveDiscordREST: import("../global.js").Layer<import("../Log/index.js").Log | import("../DiscordConfig/index.js").DiscordConfig | import("../index.js").Http | import("../index.js").RateLimitStore | import("../index.js").RateLimiter, never, DiscordREST>;
183
+ export declare const DiscordREST: import("../utils/common.js").Tag<DiscordREST>;
184
+ export declare const LiveDiscordREST: import("../utils/common.js").Layer<import("../Log/index.js").Log | import("../DiscordConfig/index.js").DiscordConfig | import("../index.js").Http | import("../index.js").RateLimitStore | import("../index.js").RateLimiter, never, DiscordREST>;
185
185
  export {};
@@ -4,7 +4,7 @@ import * as tsplus_module_3 from "@fp-ts/data/Duration";
4
4
  import * as tsplus_module_4 from "@fp-ts/data/Option";
5
5
  import * as tsplus_module_5 from "@fp-ts/data/HashSet";
6
6
  import * as tsplus_module_6 from "@effect/io/Ref";
7
- import * as tsplus_module_7 from "@fp-ts/data/Context";
7
+ import * as tsplus_module_7 from "dfx/utils/common";
8
8
  import * as tsplus_module_8 from "@effect/io/Layer";
9
9
  import { millis } from "@fp-ts/data/Duration";
10
10
  import { rateLimitFromHeaders, routeFromConfig, retryAfter } from "./utils.js";
@@ -1,4 +1,4 @@
1
- import { Effect } from "@effect/io/Effect";
1
+ import { Effect } from "dfx/utils/common";
2
2
  import { JsonParseError, BlobError, FetchError, StatusCodeError } from "dfx";
3
3
  export interface ResponseWithData<A> {
4
4
  response: Response;
@@ -1,9 +1,9 @@
1
1
  export declare const routeFromConfig: (path: string, init: RequestInit) => string;
2
2
  export declare const numberHeader: (headers: Headers) => (key: string) => import("../index.js").Maybe<number>;
3
- export declare const retryAfter: (headers: Headers) => import("../index.js").Maybe<import("../global.js").Duration>;
3
+ export declare const retryAfter: (headers: Headers) => import("../index.js").Maybe<import("../utils/common.js").Duration>;
4
4
  export declare const rateLimitFromHeaders: (headers: Headers) => import("../index.js").Maybe<{
5
5
  readonly bucket: string;
6
- readonly retryAfter: import("../global.js").Duration;
6
+ readonly retryAfter: import("../utils/common.js").Duration;
7
7
  readonly limit: number;
8
8
  readonly remaining: number;
9
9
  }>;
@@ -1,4 +1,5 @@
1
- import { Discord, Maybe } from "dfx";
1
+ import { Discord } from "dfx";
2
+ import { Maybe } from "dfx/utils/common";
2
3
  /**
3
4
  * Maybe find a sub-command within the interaction options.
4
5
  */
@@ -22,11 +23,11 @@ export declare const optionsWithNested: (data: Pick<Discord.ApplicationCommandDa
22
23
  /**
23
24
  * Return the interaction options as a name / value map.
24
25
  */
25
- export declare const transformOptions: (options: Discord.ApplicationCommandInteractionDataOption[]) => import("../global.js").HashMap<string, string | undefined>;
26
+ export declare const transformOptions: (options: Discord.ApplicationCommandInteractionDataOption[]) => import("../utils/common.js").HashMap<string, string | undefined>;
26
27
  /**
27
28
  * Return the interaction options as a name / value map.
28
29
  */
29
- export declare const optionsMap: (data: Pick<import("../types.js").ApplicationCommandDatum, "options">) => import("../global.js").HashMap<string, string | undefined>;
30
+ export declare const optionsMap: (data: Pick<import("../types.js").ApplicationCommandDatum, "options">) => import("../utils/common.js").HashMap<string, string | undefined>;
30
31
  /**
31
32
  * Try find a matching option from the interaction.
32
33
  */
@@ -62,11 +63,11 @@ export declare const componentsWithValue: (a: import("../types.js").ModalSubmitD
62
63
  /**
63
64
  * Return the interaction components as an id / value map.
64
65
  */
65
- export declare const transformComponents: (options: Discord.Component[]) => import("../global.js").HashMap<string, string | undefined>;
66
+ export declare const transformComponents: (options: Discord.Component[]) => import("../utils/common.js").HashMap<string, string | undefined>;
66
67
  /**
67
68
  * Return the interaction components as an id / value map.
68
69
  */
69
- export declare const componentsMap: (a: import("../types.js").ModalSubmitDatum) => import("../global.js").HashMap<string, string | undefined>;
70
+ export declare const componentsMap: (a: import("../types.js").ModalSubmitDatum) => import("../utils/common.js").HashMap<string, string | undefined>;
70
71
  /**
71
72
  * Try find a matching component from the interaction.
72
73
  */
@@ -1,5 +1,5 @@
1
1
  import * as tsplus_module_1 from "dfx";
2
- import * as tsplus_module_2 from "@fp-ts/data/Function";
2
+ import * as tsplus_module_2 from "dfx/utils/common";
3
3
  import * as tsplus_module_3 from "@fp-ts/data/Option";
4
4
  import * as tsplus_module_4 from "@fp-ts/data/HashMap";
5
5
  import * as Arr from "@fp-ts/data/ReadonlyArray";
@@ -1,5 +1,5 @@
1
1
  import { Discord } from "dfx";
2
- import { Effect } from "@effect/io/Effect";
2
+ import { Effect } from "dfx/utils/common";
3
3
  /**
4
4
  * A constant of all the permissions
5
5
  */
@@ -36,6 +36,6 @@ export declare const applyOverwrites: (permissions: bigint) => (overwrites: Disc
36
36
  interface RolesCache<E> {
37
37
  getForParent: (parentId: string) => Effect<never, E, ReadonlyMap<string, Discord.Role>>;
38
38
  }
39
- export declare const hasInChannel: <E>(rolesCache: RolesCache<E>, permission: bigint) => (channel: Discord.Channel, memberOrRole: Discord.GuildMember | Discord.Role) => import("../global.js").Effect<never, E, boolean>;
40
- export declare const hasInGuild: <E>(rolesCache: RolesCache<E>, permission: bigint) => (guildId: Discord.Snowflake, member: Discord.GuildMember) => import("../global.js").Effect<never, E, boolean>;
39
+ export declare const hasInChannel: <E>(rolesCache: RolesCache<E>, permission: bigint) => (channel: Discord.Channel, memberOrRole: Discord.GuildMember | Discord.Role) => import("../utils/common.js").Effect<never, E, boolean>;
40
+ export declare const hasInGuild: <E>(rolesCache: RolesCache<E>, permission: bigint) => (guildId: Discord.Snowflake, member: Discord.GuildMember) => import("../utils/common.js").Effect<never, E, boolean>;
41
41
  export {};
@@ -1,5 +1,5 @@
1
1
  import * as tsplus_module_1 from "dfx";
2
- import * as tsplus_module_2 from "@fp-ts/data/Function";
2
+ import * as tsplus_module_2 from "dfx/utils/common";
3
3
  import * as tsplus_module_3 from "@effect/io/Effect";
4
4
  /**
5
5
  * A constant of all the permissions
package/Http/index.d.ts CHANGED
@@ -1,16 +1,16 @@
1
1
  declare const make: () => {
2
- request: (url: URL | string, init?: RequestInit) => import("../global.js").Effect<never, FetchError | StatusCodeError, Response>;
3
- requestWithJson: <A = unknown>(url: URL | string, init?: RequestInit) => import("../global.js").Effect<never, FetchError | StatusCodeError, {
2
+ request: (url: URL | string, init?: RequestInit) => import("../utils/common.js").Effect<never, FetchError | StatusCodeError, Response>;
3
+ requestWithJson: <A = unknown>(url: URL | string, init?: RequestInit) => import("../utils/common.js").Effect<never, FetchError | StatusCodeError, {
4
4
  response: Response;
5
- json: import("../global.js").Effect<never, JsonParseError, A>;
6
- blob: import("../global.js").Effect<never, BlobError, Blob>;
7
- text: import("../global.js").Effect<never, never, string>;
5
+ json: import("../utils/common.js").Effect<never, JsonParseError, A>;
6
+ blob: import("../utils/common.js").Effect<never, BlobError, Blob>;
7
+ text: import("../utils/common.js").Effect<never, never, string>;
8
8
  }>;
9
9
  };
10
10
  export interface Http extends ReturnType<typeof make> {
11
11
  }
12
- export declare const Http: import("../global.js").Tag<Http>;
13
- export declare const LiveHttp: import("../global.js").Layer<never, never, Http>;
12
+ export declare const Http: import("../utils/common.js").Tag<Http>;
13
+ export declare const LiveHttp: import("../utils/common.js").Layer<never, never, Http>;
14
14
  export declare class FetchError {
15
15
  readonly reason: unknown;
16
16
  readonly _tag = "FetchError";
@@ -27,11 +27,11 @@ export declare class JsonParseError {
27
27
  readonly _tag = "JsonParseError";
28
28
  constructor(reason: unknown);
29
29
  }
30
- export declare const json: <A = unknown>(r: Response) => import("../global.js").Effect<never, JsonParseError, A>;
30
+ export declare const json: <A = unknown>(r: Response) => import("../utils/common.js").Effect<never, JsonParseError, A>;
31
31
  export declare class BlobError {
32
32
  readonly reason: unknown;
33
33
  readonly _tag = "BlobError";
34
34
  constructor(reason: unknown);
35
35
  }
36
- export declare const blob: (r: Response) => import("../global.js").Effect<never, BlobError, Blob>;
36
+ export declare const blob: (r: Response) => import("../utils/common.js").Effect<never, BlobError, Blob>;
37
37
  export {};
package/Http/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 "@fp-ts/data/Context";
2
+ import * as tsplus_module_2 from "dfx/utils/common";
3
3
  import * as tsplus_module_3 from "@effect/io/Layer";
4
4
  const make = () => {
5
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, {