| 44 | // directly because @napi-rs/keyring@1.2.0's NAPI_RS_NATIVE_LIBRARY_PATH |
| 45 | // branch is buggy (assigns to a local that gets overwritten before return). |
| 46 | const loadEntryCtor = async (): Promise<EntryConstructor> => { |
| 47 | const directPath = process.env.EXECUTOR_KEYRING_NATIVE_PATH; |
| 48 | if (directPath) { |
| 49 | const req = createRequire(import.meta.url); |
| 50 | return (req(directPath) as { Entry: EntryConstructor }).Entry; |
| 51 | } |
| 52 | const { Entry } = await import("@napi-rs/keyring"); |
| 53 | return Entry; |
| 54 | }; |
| 55 | |
| 56 | const loadEntry = (): Effect.Effect<EntryConstructor, KeychainError> => |
| 57 | isSupportedPlatform() |