Skip to content

Commit

Permalink
update deps (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart committed Aug 9, 2023
1 parent 6cebf60 commit db62f87
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 47 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
"license": "ISC",
"devDependencies": {
"@octokit/types": "^11.1.0",
"@types/node": "^20.4.7",
"@types/node": "^20.4.9",
"@types/prettier": "^3.0.0",
"tsc-watch": "^6.0.4",
"typescript": "^5.1.6"
},
"dependencies": {
"@effect-http/client": "^0.40.0",
"@effect/platform-node": "^0.11.4",
"@effect/schema": "^0.33.0",
"dfx": "^0.61.0",
"dfx": "^0.61.1",
"dotenv": "^16.3.1",
"effect": "2.0.0-next.24",
"effect-schema-class": "^0.13.0",
Expand Down
86 changes: 52 additions & 34 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 10 additions & 8 deletions src/DocsLookup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,17 @@ const docUrls = [
const make = Effect.gen(function* (_) {
const registry = yield* _(InteractionsRegistry)

const docsClient = pipe(
Http.client.fetchOk(),
Http.client.retry(retryPolicy),
Http.client.mapEffect(_ => _.json),
Http.client.map(_ => Object.values(_ as object)),
Http.client.mapEffect(decodeEntries),
Http.client.map(entries => entries.filter(_ => _.isSignature)),
)

const loadDocs = (baseUrl: string) =>
pipe(
Http.get(`${baseUrl}/assets/js/search-data.json`),
Http.fetchJson(),
Effect.retry(retryPolicy),
Effect.map(_ => Object.values(_ as object)),
Effect.flatMap(decodeEntries),
Effect.map(entries => entries.filter(_ => _.isSignature)),
)
docsClient(Http.request.get(`${baseUrl}/assets/js/search-data.json`))

const allDocs = yield* _(
Effect.forEach(docUrls, loadDocs, { concurrency: "unbounded" }),
Expand Down
3 changes: 2 additions & 1 deletion src/Summarizer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { ChannelsCache, ChannelsCacheLive } from "bot/ChannelsCache"
import { MemberCache, MemberCacheLive } from "bot/MemberCache"
import { Messages, MessagesLive } from "bot/Messages"
import { Discord, DiscordREST, Http, Ix } from "dfx"
import { Http } from "bot/_common"
import { Discord, DiscordREST, Ix } from "dfx"
import { InteractionsRegistry, InteractionsRegistryLive } from "dfx/gateway"
import {
Cause,
Expand Down
2 changes: 1 addition & 1 deletion src/_common.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * as Http from "@effect-http/client"
export * as Http from "@effect/platform-node/HttpClient"
export * as Schema from "@effect/schema/Schema"
export { Discord } from "dfx"
export { SchemaClass, SchemaClassExtends } from "effect-schema-class"

0 comments on commit db62f87

Please sign in to comment.