@ibgib/core-gib 0.1.38 → 0.1.40

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.
Files changed (37) hide show
  1. package/dist/common/other/graph-helper.d.mts.map +1 -1
  2. package/dist/common/other/graph-helper.mjs +18 -3
  3. package/dist/common/other/graph-helper.mjs.map +1 -1
  4. package/dist/sync/graft-info/graft-info-helpers.mjs +1 -1
  5. package/dist/sync/graft-info/graft-info-helpers.mjs.map +1 -1
  6. package/dist/sync/sync-conflict-adv-multitimelines.respec.mjs +321 -235
  7. package/dist/sync/sync-conflict-adv-multitimelines.respec.mjs.map +1 -1
  8. package/dist/sync/sync-conflict-basic-multitimelines.respec.mjs +6 -6
  9. package/dist/sync/sync-conflict-basic-multitimelines.respec.mjs.map +1 -1
  10. package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-v1.mjs +1 -1
  11. package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-v1.mjs.map +1 -1
  12. package/dist/sync/sync-saga-coordinator.d.mts.map +1 -1
  13. package/dist/sync/sync-saga-coordinator.mjs +49 -12
  14. package/dist/sync/sync-saga-coordinator.mjs.map +1 -1
  15. package/dist/sync/sync-saga-message/sync-saga-message-types.d.mts +4 -0
  16. package/dist/sync/sync-saga-message/sync-saga-message-types.d.mts.map +1 -1
  17. package/dist/test-helpers.d.mts +104 -47
  18. package/dist/test-helpers.d.mts.map +1 -1
  19. package/dist/test-helpers.mjs +335 -131
  20. package/dist/test-helpers.mjs.map +1 -1
  21. package/dist/test-types.d.mts +25 -7
  22. package/dist/test-types.d.mts.map +1 -1
  23. package/dist/witness/space/reconciliation-space/reconciliation-space-helper.mjs +2 -2
  24. package/dist/witness/space/reconciliation-space/reconciliation-space-helper.mjs.map +1 -1
  25. package/package.json +1 -1
  26. package/src/common/other/graph-helper.mts +14 -2
  27. package/src/sync/SYNC_TESTING.md +135 -70
  28. package/src/sync/graft-info/graft-info-helpers.mts +1 -1
  29. package/src/sync/sync-conflict-adv-multitimelines.respec.mts +332 -245
  30. package/src/sync/sync-conflict-basic-multitimelines.respec.mts +5 -5
  31. package/src/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-v1.mts +1 -1
  32. package/src/sync/sync-saga-coordinator.mts +58 -14
  33. package/src/sync/sync-saga-message/sync-saga-message-types.mts +4 -0
  34. package/src/test-helpers.mts +429 -152
  35. package/src/test-types.mts +30 -7
  36. package/src/witness/space/reconciliation-space/reconciliation-space-helper.mts +2 -2
  37. package/tmp.md +205 -1160
@@ -8,23 +8,32 @@
8
8
  import { IbGib_V1 } from '@ibgib/ts-gib/dist/V1/types.mjs';
9
9
  import { IbGibSpaceAny } from './witness/space/space-base-v1.mjs';
10
10
  import { MetaspaceService } from './witness/space/metaspace/metaspace-types.mjs';
11
+ import { IbGibAddr } from '@ibgib/ts-gib';
11
12
 
12
13
  /**
13
14
  * Information returned from a mut8 operation.
14
15
  * Captures what was mutated for later verification.
15
16
  */
16
17
  export interface TestMut8Info {
18
+ type: 'mut8';
19
+
20
+ /**
21
+ * The resulting ib after mutation
22
+ */
23
+ ib: string;
24
+
17
25
  /**
18
26
  * The data field key that was added/modified
19
27
  * e.g., "testField_1", "testField_2"
28
+ * Optional - may be undefined for ib-only mutations
20
29
  */
21
- key: string;
30
+ key?: string;
22
31
 
23
32
  /**
24
33
  * The value that was set to the field
25
- * Also appended to the ib as `{ib} x_{value}`
34
+ * Optional - may be undefined for ib-only mutations
26
35
  */
27
- value: string;
36
+ value?: string;
28
37
  }
29
38
 
30
39
  /**
@@ -32,6 +41,15 @@ export interface TestMut8Info {
32
41
  * Captures what relation was added for later verification.
33
42
  */
34
43
  export interface TestRel8Info {
44
+ type: 'rel8';
45
+
46
+ /**
47
+ * The resulting ib after relation...THIS DOES NOT EXIST ATOW.
48
+ * I need to implement the ability to mut8 the ib when doing a rel8
49
+ * transform. This property is questionable right now.
50
+ */
51
+ ib: string;
52
+
35
53
  /**
36
54
  * The rel8n name that was used
37
55
  * e.g., "testrel8n_1", "testrel8n_2"
@@ -39,9 +57,9 @@ export interface TestRel8Info {
39
57
  rel8nName: string;
40
58
 
41
59
  /**
42
- * The ibgibs that were related
60
+ * The addresses of ibgibs that were related
43
61
  */
44
- targetIbGibs: IbGib_V1[];
62
+ targetAddrs: string[];
45
63
  }
46
64
 
47
65
  /**
@@ -66,15 +84,20 @@ export interface TestStepInfo {
66
84
  */
67
85
  ibGib: IbGib_V1;
68
86
 
87
+ /**
88
+ * addr of {@link ibGib}
89
+ */
90
+ addr: IbGibAddr;
91
+
69
92
  /**
70
93
  * The space this test operates in
71
94
  */
72
95
  space: IbGibSpaceAny;
73
96
 
74
97
  /**
75
- * Optional metaspace for timeline operations
98
+ * Metaspace for timeline operations
76
99
  */
77
- metaspace?: MetaspaceService;
100
+ metaspace: MetaspaceService;
78
101
 
79
102
  /**
80
103
  * Array of operation infos in order executed
@@ -1,4 +1,4 @@
1
- import { extractErrorMsg } from "@ibgib/helper-gib/dist/helpers/utils-helper.mjs";
1
+ import { clone, extractErrorMsg } from "@ibgib/helper-gib/dist/helpers/utils-helper.mjs";
2
2
  import { getIbGibAddr } from "@ibgib/ts-gib/dist/helper.mjs";
3
3
  import {
4
4
  IbGibAddr, TransformOpts, TransformOpts_Mut8, TransformOpts_Rel8,
@@ -146,7 +146,7 @@ export async function applyTransforms({
146
146
 
147
147
  // we have our dna to apply, so do so against the incoming src
148
148
  // any transform options is actually the dna.data plus src info.
149
- let argTransform = dnaIbGib.data as TransformOpts<IbGib_V1>;
149
+ let argTransform = clone(dnaIbGib.data) as TransformOpts<IbGib_V1>;
150
150
  argTransform.src = src;
151
151
  argTransform.srcAddr = getIbGibAddr({ ibGib: src });
152
152
  let resTransform: TransformResult<IbGib_V1>;