dfx 0.23.0 → 0.23.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dfx",
3
- "version": "0.23.0",
3
+ "version": "0.23.1",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -52,5 +52,5 @@
52
52
  "ws": "^8.12.1"
53
53
  },
54
54
  "sideEffects": false,
55
- "gitHead": "816875f37e942879f9919dc77b65ebfb1217d46a"
55
+ "gitHead": "dd848e717d2055b531b0110081c45af819ac4b2d"
56
56
  }
package/webhooks.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { DiscordConfig } from "dfx";
2
1
  import { ConfigWrap } from "dfx/_common";
2
+ import { DiscordConfig } from "dfx";
3
3
  import { MakeConfigOpts } from "./Interactions/webhook.js";
4
4
  export { BadWebhookSignature, makeConfigLayer, makeHandler, makeSimpleHandler, WebhookConfig, WebhookParseError, } from "./Interactions/webhook.js";
5
5
  export declare const MemoryRateLimit: import("@effect-http/client/_common").Layer<import("./Log.js").Log, never, import("./RateLimit.js").RateLimitStore | import("./RateLimit.js").RateLimiter>;
6
6
  export declare const MemoryREST: import("@effect-http/client/_common").Layer<import("./DiscordConfig.js").DiscordConfig | import("@effect-http/client/Request/Executor").HttpRequestExecutor | import("./Log.js").Log, never, import("./DiscordREST.js").DiscordREST>;
7
- export declare const make: (config: DiscordConfig.MakeOpts & MakeConfigOpts, debug?: boolean) => import("@effect-http/client/_common").Layer<import("@effect-http/client/Request/Executor").HttpRequestExecutor, never, import("./DiscordREST.js").DiscordREST | import("./RateLimit.js").RateLimitStore | import("./RateLimit.js").RateLimiter | import("./Interactions/webhook.js").WebhookConfig>;
8
- export declare const makeFromConfig: (options: ConfigWrap.Wrap<DiscordConfig.MakeOpts & MakeConfigOpts>, debug?: boolean) => import("@effect-http/client/_common").Layer<import("@effect-http/client/Request/Executor").HttpRequestExecutor, import("./_common.js").ConfigError, import("./DiscordREST.js").DiscordREST | import("./RateLimit.js").RateLimitStore | import("./RateLimit.js").RateLimiter | import("./Interactions/webhook.js").WebhookConfig>;
7
+ export declare const makeLiveWithoutFetch: (options: ConfigWrap.Wrap<DiscordConfig.MakeOpts & MakeConfigOpts>, debug?: boolean) => import("@effect-http/client/_common").Layer<import("@effect-http/client/Request/Executor").HttpRequestExecutor, import("./_common.js").ConfigError, import("./DiscordREST.js").DiscordREST | import("./RateLimit.js").RateLimitStore | import("./RateLimit.js").RateLimiter | import("./Interactions/webhook.js").WebhookConfig>;
8
+ export declare const makeLive: (config: ConfigWrap.Wrap<DiscordConfig.MakeOpts & MakeConfigOpts>, debug?: boolean) => import("@effect-http/client/_common").Layer<never, import("./_common.js").ConfigError, import("./DiscordREST.js").DiscordREST | import("./RateLimit.js").RateLimitStore | import("./RateLimit.js").RateLimiter | import("./Interactions/webhook.js").WebhookConfig>;
package/webhooks.js CHANGED
@@ -1,25 +1,22 @@
1
1
  import * as tsplus_module_1 from "@effect/io/Layer";
2
- import * as tsplus_module_2 from "dfx";
3
- import * as tsplus_module_3 from "dfx/_common";
2
+ import * as tsplus_module_2 from "dfx/_common";
3
+ import * as tsplus_module_3 from "dfx";
4
+ import { LiveFetchRequestExecutor } from "@effect-http/client";
4
5
  import { LiveDiscordREST } from "./DiscordREST.js";
5
- import { makeConfigLayer, makeFromConfig as makeConfigFromConfig, } from "./Interactions/webhook.js";
6
+ import { makeFromConfig } from "./Interactions/webhook.js";
6
7
  import { LiveMemoryRateLimitStore, LiveRateLimiter } from "./RateLimit.js";
7
8
  export { BadWebhookSignature, makeConfigLayer, makeHandler, makeSimpleHandler, WebhookConfig, WebhookParseError, } from "./Interactions/webhook.js";
8
9
  export const MemoryRateLimit = tsplus_module_1.provideMerge(LiveRateLimiter)(LiveMemoryRateLimitStore);
9
10
  export const MemoryREST = tsplus_module_1.provide(LiveDiscordREST)(MemoryRateLimit);
10
- export const make = (config, debug = false) => {
11
- const LiveWebhook = makeConfigLayer(config);
12
- const LiveLog = debug ? tsplus_module_2.Log.LiveLogDebug : tsplus_module_2.Log.LiveLog;
13
- const LiveConfig = tsplus_module_2.DiscordConfig.makeLayer(config);
11
+ export const makeLiveWithoutFetch = (options, debug = false) => {
12
+ const config = tsplus_module_2.ConfigWrap.unwrap(options);
13
+ const LiveWebhook = makeFromConfig(config);
14
+ const LiveLog = debug ? tsplus_module_3.Log.LiveLogDebug : tsplus_module_3.Log.LiveLog;
15
+ const LiveConfig = tsplus_module_3.DiscordConfig.makeFromConfig(config);
14
16
  const LiveEnv = tsplus_module_1.provide((tsplus_module_1.merge(MemoryRateLimit)(tsplus_module_1.merge(LiveWebhook)(MemoryREST))))((tsplus_module_1.merge(LiveConfig)(LiveLog)));
15
17
  return LiveEnv;
16
18
  };
17
- export const makeFromConfig = (options, debug = false) => {
18
- const config = tsplus_module_3.ConfigWrap.unwrap(options);
19
- const LiveWebhook = makeConfigFromConfig(config);
20
- const LiveLog = debug ? tsplus_module_2.Log.LiveLogDebug : tsplus_module_2.Log.LiveLog;
21
- const LiveConfig = tsplus_module_2.DiscordConfig.makeFromConfig(config);
22
- const LiveEnv = tsplus_module_1.provide((tsplus_module_1.merge(MemoryRateLimit)(tsplus_module_1.merge(LiveWebhook)(MemoryREST))))((tsplus_module_1.merge(LiveConfig)(LiveLog)));
23
- return LiveEnv;
19
+ export const makeLive = (config, debug = false) => {
20
+ return tsplus_module_1.provide(makeLiveWithoutFetch(config, debug))(LiveFetchRequestExecutor);
24
21
  };
25
22
  //# sourceMappingURL=webhooks.js.map
package/webhooks.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../src/webhooks.ts"],"names":[],"mappings":";;;AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAEL,eAAe,EACf,cAAc,IAAI,oBAAoB,GACvC,MAAM,2BAA2B,CAAA;AAClC,OAAO,EA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