@secrecy/lib 1.83.0 → 1.83.1
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.
|
@@ -179,19 +179,24 @@ export class SecrecyCloudClient {
|
|
|
179
179
|
deleted,
|
|
180
180
|
fromIdentityPubKey: this.#client.currentIdentity.identityPubKey,
|
|
181
181
|
});
|
|
182
|
-
const errors = apiNodes.missingIds.map((id) =>
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
182
|
+
const errors = apiNodes.missingIds.map((id) => ({
|
|
183
|
+
message: `Node ${id} not found`,
|
|
184
|
+
nodeId: id,
|
|
185
|
+
}));
|
|
186
|
+
const nodes = [];
|
|
187
|
+
const handleNode = async (node) => {
|
|
188
|
+
try {
|
|
189
|
+
const externalNode = await apiNodeToExternal(node, this.#client.keyPairs);
|
|
190
|
+
nodes.push(externalNode);
|
|
191
|
+
}
|
|
192
|
+
catch (error) {
|
|
193
|
+
errors.push({
|
|
194
|
+
message: error instanceof Error ? error.message : String(error),
|
|
195
|
+
nodeId: node.id,
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
await Promise.all(apiNodes.nodes.map(handleNode));
|
|
195
200
|
return { nodes, errors };
|
|
196
201
|
}
|
|
197
202
|
async nodesFull({ ids, deleted, }) {
|
|
@@ -200,19 +205,24 @@ export class SecrecyCloudClient {
|
|
|
200
205
|
deleted,
|
|
201
206
|
fromIdentityPubKey: this.#client.currentIdentity.identityPubKey,
|
|
202
207
|
});
|
|
203
|
-
const errors = apiNodes.missingIds.map((id) =>
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
208
|
+
const errors = apiNodes.missingIds.map((id) => ({
|
|
209
|
+
message: `Node ${id} not found`,
|
|
210
|
+
nodeId: id,
|
|
211
|
+
}));
|
|
212
|
+
const nodes = [];
|
|
213
|
+
const handleNode = async (node) => {
|
|
214
|
+
try {
|
|
215
|
+
const externalNode = await apiNodeToExternalNodeFull(node, this.#client.keyPairs);
|
|
216
|
+
nodes.push(externalNode);
|
|
217
|
+
}
|
|
218
|
+
catch (error) {
|
|
219
|
+
errors.push({
|
|
220
|
+
message: error instanceof Error ? error.message : String(error),
|
|
221
|
+
nodeId: node.id,
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
await Promise.all(apiNodes.nodes.map(handleNode));
|
|
216
226
|
return { nodes, errors };
|
|
217
227
|
}
|
|
218
228
|
async dataMetadata({ id }) {
|
|
@@ -61,14 +61,20 @@ export declare class SecrecyCloudClient {
|
|
|
61
61
|
deleted?: boolean | null | undefined;
|
|
62
62
|
}): Promise<{
|
|
63
63
|
nodes: Node[];
|
|
64
|
-
errors:
|
|
64
|
+
errors: {
|
|
65
|
+
message: string;
|
|
66
|
+
nodeId: string;
|
|
67
|
+
}[];
|
|
65
68
|
}>;
|
|
66
69
|
nodesFull({ ids, deleted, }: {
|
|
67
70
|
ids: string[];
|
|
68
71
|
deleted?: boolean | null | undefined;
|
|
69
72
|
}): Promise<{
|
|
70
73
|
nodes: NodeFull[];
|
|
71
|
-
errors:
|
|
74
|
+
errors: {
|
|
75
|
+
message: string;
|
|
76
|
+
nodeId: string;
|
|
77
|
+
}[];
|
|
72
78
|
}>;
|
|
73
79
|
dataMetadata({ id }: {
|
|
74
80
|
id: string;
|
package/package.json
CHANGED