@diory/client-js 0.2.0-rc16 → 0.2.0-rc17
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.
|
@@ -102,16 +102,16 @@ class DioryClient {
|
|
|
102
102
|
await Promise.all(this.getDiographClients(connections).map(async (connectionClient) => {
|
|
103
103
|
const diographObject = await connectionClient.generateDiograph();
|
|
104
104
|
console.info(diographObject);
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
Object.entries(diographObject).forEach(([key, dioryObject]) => {
|
|
106
|
+
try {
|
|
107
107
|
key === '/'
|
|
108
108
|
? this.diograph.addDioryLink({ id: '/' }, diographObject['/'])
|
|
109
109
|
: this.diograph.addDiory(dioryObject);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
console.error(error);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
115
|
await connectionClient.saveDiograph(this.diograph.toObject());
|
|
116
116
|
console.info(this.diograph.toObject());
|
|
117
117
|
return;
|
package/package.json
CHANGED
|
@@ -156,15 +156,15 @@ class DioryClient implements IDioryClient {
|
|
|
156
156
|
const diographObject = await connectionClient.generateDiograph()
|
|
157
157
|
console.info(diographObject)
|
|
158
158
|
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
Object.entries(diographObject).forEach(([key, dioryObject]) => {
|
|
160
|
+
try {
|
|
161
161
|
key === '/'
|
|
162
162
|
? this.diograph.addDioryLink({ id: '/' }, diographObject['/'])
|
|
163
163
|
: this.diograph.addDiory(dioryObject)
|
|
164
|
-
})
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
164
|
+
} catch (error) {
|
|
165
|
+
console.error(error)
|
|
166
|
+
}
|
|
167
|
+
})
|
|
168
168
|
|
|
169
169
|
await connectionClient.saveDiograph(this.diograph.toObject())
|
|
170
170
|
console.info(this.diograph.toObject())
|