Unified · Split
| @@ -208,8 +208,9 @@ it.layer(NodeServices.layer)("ServerSecretStoreLive", (it) => { · 207 unmodified lines | |||
| 208 | const persisted = yield* secretStore.get("session-signing-key"); | 208 | const persisted = yield* secretStore.get("session-signing-key"); |
| 209 | 209 | ||
| 210 | assert.isTrue(Option.isSome(persisted)); | 210 | assert.isTrue(Option.isSome(persisted)); |
| 211 | assert.deepEqual(Array.from(first), Array.from(persisted.value)); | 211 | const persistedBytes = Option.getOrThrow(persisted); |
| 212 | assert.deepEqual(Array.from(second), Array.from(persisted.value)); | 212 | assert.deepEqual(Array.from(first), Array.from(persistedBytes)); |
| 213 | assert.deepEqual(Array.from(second), Array.from(persistedBytes)); | ||
| 213 | }).pipe(Effect.provide(makeConcurrentCreateSecretStoreLayer())), | 214 | }).pipe(Effect.provide(makeConcurrentCreateSecretStoreLayer())), |
| 214 | ); | 215 | ); |
| 215 | 216 | ||
| @@ -31,6 +31,7 @@ import * as Effect from "effect/Effect"; · 30 unmodified lines | |||
| 31 | import * as Exit from "effect/Exit"; | 31 | import * as Exit from "effect/Exit"; |
| 32 | import * as FileSystem from "effect/FileSystem"; | 32 | import * as FileSystem from "effect/FileSystem"; |
| 33 | import * as Layer from "effect/Layer"; | 33 | import * as Layer from "effect/Layer"; |
| 34 | import * as Option from "effect/Option"; | ||
| 34 | import * as Path from "effect/Path"; | 35 | import * as Path from "effect/Path"; |
| 35 | import * as Equal from "effect/Equal"; | 36 | import * as Equal from "effect/Equal"; |
| 36 | import * as PubSub from "effect/PubSub"; | 37 | import * as PubSub from "effect/PubSub"; |
| @@ -349,7 +350,10 @@ const makeServerSettings = Effect.gen(function* () { · 312 unmodified lines | |||
| 349 | ); | 350 | ); |
| 350 | environment.push({ | 351 | environment.push({ |
| 351 | ...variable, | 352 | ...variable, |
| 352 | value: secret ? textDecoder.decode(secret) : "", | 353 | value: Option.match(secret, { |
| 354 | onSome: (bytes) => textDecoder.decode(bytes), | ||
| 355 | onNone: () => "", | ||
| 356 | }), | ||
| 353 | }); | 357 | }); |
| 354 | } | 358 | } |
| 355 | providerInstances[instanceId] = { | 359 | providerInstances[instanceId] = { |