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

Function providerGet

apps/local/src/db/v1-v2-migration.ts:666–679  ·  view source on GitHub ↗
(
  provider: string,
  scopeId: string,
  secretId: string,
)

Source from the content-addressed store, hash-verified

664 process.env.EXECUTOR_KEYCHAIN_SERVICE_NAME?.trim() || "executor";
665
666const providerGet = async (
667 provider: string,
668 scopeId: string,
669 secretId: string,
670): Promise<string | null> => {
671 if (provider === FILE_PROVIDER) {
672 return readScopedFileSecret(readAuthFile(resolveFileAuthPath()), scopeId, secretId);
673 }
674 if (provider === KEYCHAIN_PROVIDER) {
675 const oldProvider = makeKeychainProvider(`${keychainBaseServiceName()}/${scopeId}`);
676 return await Effect.runPromise(oldProvider.get(secretId as never));
677 }
678 return null;
679};
680
681interface CollectedSecretValues {
682 readonly fileValues: Record<string, string>;

Callers 1

collectSecretValuesFunction · 0.85

Calls 6

readScopedFileSecretFunction · 0.85
resolveFileAuthPathFunction · 0.85
makeKeychainProviderFunction · 0.85
keychainBaseServiceNameFunction · 0.85
readAuthFileFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected