@secrecy/lib 1.61.1 → 1.61.2

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.
@@ -24,18 +24,6 @@ export async function apiNodeToInternal(apiNode, keyPair) {
24
24
  users: apiNode.users,
25
25
  parentId: apiNode.parentId ?? null,
26
26
  currentDataId: apiNode.currentDataId ?? null,
27
- parent: 'parent' in apiNode && apiNode.parent
28
- ? await apiNodeToInternal(apiNode.parent, keyPair)
29
- : null,
30
- children: 'children' in apiNode && apiNode.children
31
- ? await Promise.all(apiNode.children.map((children) => apiNodeToInternal(children, keyPair)))
32
- : [],
33
- current: 'current' in apiNode && apiNode.current
34
- ? apiDataToInternal(apiNode.current, keyPair)
35
- : undefined,
36
- history: 'history' in apiNode && apiNode.history
37
- ? apiNode.history.map((history) => apiDataToInternal(history, keyPair))
38
- : [],
39
27
  };
40
28
  internal.access = { ...apiNode.access };
41
29
  if (apiNode.access.nameKey !== null) {
@@ -56,7 +44,7 @@ export async function apiNodeToInternal(apiNode, keyPair) {
56
44
  }
57
45
  export async function apiNodeFullToInternalFull(apiNodeFull, keyPair) {
58
46
  const f = await apiNodeToInternal(apiNodeFull, keyPair);
59
- return {
47
+ const nodeFull = {
60
48
  ...f,
61
49
  current: apiNodeFull.current !== null
62
50
  ? apiDataToInternal(apiNodeFull.current, keyPair)
@@ -67,6 +55,8 @@ export async function apiNodeFullToInternalFull(apiNodeFull, keyPair) {
67
55
  children: await Promise.all(apiNodeFull.children.map(async (s) => await apiNodeToInternal(s, keyPair))),
68
56
  history: apiNodeFull.history.map((f) => apiDataToInternal(f, keyPair)),
69
57
  };
58
+ nodesCache.set(f.id, nodeFull);
59
+ return nodeFull;
70
60
  }
71
61
  export function internalNodeToNode(internal) {
72
62
  const node = {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@secrecy/lib",
3
3
  "author": "Anonymize <anonymize@gmail.com>",
4
4
  "description": "Anonymize Secrecy Library",
5
- "version": "1.61.1",
5
+ "version": "1.61.2",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/anonymize-org/lib.git"