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

Function loadEntry

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

Source from the content-addressed store, hash-verified

54};
55
56const loadEntry = (): Effect.Effect<EntryConstructor, KeychainError> =>
57 isSupportedPlatform()
58 ? Effect.tryPromise({
59 try: async () => {
60 entryCtorPromise ??= loadEntryCtor();
61 return await entryCtorPromise;
62 },
63 catch: (cause) =>
64 new KeychainError({
65 message: "Failed loading native keyring",
66 cause,
67 }),
68 })
69 : Effect.fail(
70 new KeychainError({
71 message: `Failed loading native keyring: unsupported platform '${process.platform}'`,
72 }),
73 );
74
75const createEntry = (serviceName: string, account: string) =>
76 Effect.flatMap(loadEntry(), (Entry) =>

Callers 1

createEntryFunction · 0.85

Calls 2

isSupportedPlatformFunction · 0.85
loadEntryCtorFunction · 0.85

Tested by

no test coverage detected