MCPcopy Create free account
hub / github.com/ProtonDriveApps/sdk / fromJsonFile

Method fromJsonFile

cli/src/init.ts:105–116  ·  view source on GitHub ↗
(jsonFile: string)

Source from the content-addressed store, hash-verified

103 CryptoProxy.setEndpoint(new CryptoApi(), (endpoint) => endpoint.clearKeyStore());
104 return new OpenPGPCryptoWithCryptoProxy(CryptoProxy);
105}
106
107class FeatureFlagProvider {
108 constructor(private flags: Record<FeatureFlags, boolean>) {
109 this.flags = flags;
110 }
111
112 static async fromJsonFile(jsonFile: string) {
113 const file = Bun.file(jsonFile);
114
115 if (!(await file.exists())) {
116 return new FeatureFlagProvider({} as Record<FeatureFlags, boolean>);
117 }
118
119 const bytes = await file.bytes();

Callers 1

initFunction · 0.80

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected