Skip to content

Commit

Permalink
Redact a secret
Browse files Browse the repository at this point in the history
Refs #1834
  • Loading branch information
thewilkybarkid committed Dec 20, 2024
1 parent d379a0e commit 6761918
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Redis.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Config, Context, Effect, flow, Inspectable, Layer, pipe, Runtime } from 'effect'
import { Config, Context, Effect, flow, Inspectable, Layer, pipe, Redacted, Runtime } from 'effect'
import { Redis as IoRedis } from 'ioredis'

const makeRedis = (url: URL) =>
const makeRedis = (url: Redacted.Redacted<URL>) =>
Effect.gen(function* () {
const runtime = yield* Effect.runtime()
const redis = new IoRedis(url.href, { commandTimeout: 2 * 1000, enableAutoPipelining: true })
const redis = new IoRedis(Redacted.value(url).href, { commandTimeout: 2 * 1000, enableAutoPipelining: true })

const runSync = Runtime.runSync(runtime)

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pipe(
),
Effect.provideServiceEffect(GhostApi, Config.all({ key: Config.string('GHOST_API_KEY') })),
Effect.provide(Nodemailer.layerConfig(Config.url('SMTP_URI'))),
Effect.provide(Redis.layerConfig(Config.url('REDIS_URI'))),
Effect.provide(Redis.layerConfig(Config.redacted(Config.url('REDIS_URI')))),
Effect.provideServiceEffect(
FetchHttpClient.Fetch,
Effect.gen(function* () {
Expand Down

0 comments on commit 6761918

Please sign in to comment.