MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / loadEntryCtor

Function loadEntryCtor

packages/plugins/keychain/src/keyring.ts:46–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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).
46const 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
56const loadEntry = (): Effect.Effect<EntryConstructor, KeychainError> =>
57 isSupportedPlatform()

Callers 1

loadEntryFunction · 0.85

Calls 1

reqFunction · 0.50

Tested by

no test coverage detected