MCPcopy Create free account
hub / github.com/chieapp/chie / deserialize

Method deserialize

src/controller/api-manager.ts:35–46  ·  view source on GitHub ↗
(data: object)

Source from the content-addressed store, hash-verified

33 #credentials: Record<string, APICredential> = {};
34
35 deserialize(data: object) {
36 if (!data) // accepts empty config
37 data = {};
38 if (typeof data != 'object')
39 throw new Error(`Unknown data for "apis": ${data}.`);
40 this.#credentials = {};
41 for (const id in data) {
42 const credential = APICredential.deserialize(data[id]);
43 credential.id = id;
44 this.#credentials[id] = credential;
45 }
46 }
47
48 serialize() {
49 const data = {};

Callers

nothing calls this directly

Calls 1

deserializeMethod · 0.65

Tested by

no test coverage detected