@diory/client-js 0.4.2-rc3 → 0.4.2-rc5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10,6 +10,6 @@ export declare class DioryClient implements IDioryClient {
|
|
|
10
10
|
addDiograph: (address: string, diographObject: IDiographObject) => IDioryClient;
|
|
11
11
|
getDiograph: (address: string) => IDiograph | undefined;
|
|
12
12
|
fetchDiograph: (address: string) => Promise<IDioryClient>;
|
|
13
|
-
generateDiograph: (address: string) => Promise<IDioryClient>;
|
|
13
|
+
generateDiograph: (address: string, saveDiograph?: boolean) => Promise<IDioryClient>;
|
|
14
14
|
saveDiograph: (address: string) => () => any;
|
|
15
15
|
}
|
|
@@ -42,11 +42,11 @@ class DioryClient {
|
|
|
42
42
|
}
|
|
43
43
|
return this;
|
|
44
44
|
};
|
|
45
|
-
this.generateDiograph = async (address) => {
|
|
45
|
+
this.generateDiograph = async (address, saveDiograph) => {
|
|
46
46
|
const { client, path } = resolveConnection(address);
|
|
47
47
|
const dataClient = findDataClient(this.dataClients, client);
|
|
48
48
|
if (dataClient) {
|
|
49
|
-
const diographObject = await (0, folder_generator_1.generateDiograph)(path, '/', dataClient);
|
|
49
|
+
const diographObject = await (0, folder_generator_1.generateDiograph)(path, '/', dataClient, { saveDiograph });
|
|
50
50
|
if (diographObject)
|
|
51
51
|
this.addDiograph(address, diographObject);
|
|
52
52
|
}
|
package/package.json
CHANGED
|
@@ -58,11 +58,11 @@ export class DioryClient implements IDioryClient {
|
|
|
58
58
|
return this
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
generateDiograph = async (address: string): Promise<IDioryClient> => {
|
|
61
|
+
generateDiograph = async (address: string, saveDiograph?: boolean): Promise<IDioryClient> => {
|
|
62
62
|
const { client, path } = resolveConnection(address)
|
|
63
63
|
const dataClient = findDataClient(this.dataClients, client)
|
|
64
64
|
if (dataClient) {
|
|
65
|
-
const diographObject = await generateDiograph(path, '/', dataClient)
|
|
65
|
+
const diographObject = await generateDiograph(path, '/', dataClient, { saveDiograph })
|
|
66
66
|
if (diographObject) this.addDiograph(address, diographObject)
|
|
67
67
|
}
|
|
68
68
|
|