@ibgib/vcs-gib 0.0.30 → 0.0.33

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 (216) hide show
  1. package/dist/AUTO-GENERATED-version.d.mts +1 -1
  2. package/dist/AUTO-GENERATED-version.mjs +1 -1
  3. package/dist/bootstrap/node-bootstrap.d.mts.map +1 -1
  4. package/dist/bootstrap/node-bootstrap.mjs +7 -21
  5. package/dist/bootstrap/node-bootstrap.mjs.map +1 -1
  6. package/dist/cli/commands/{add-cmd.d.mts → cli-add-cmd.d.mts} +3 -4
  7. package/dist/cli/commands/cli-add-cmd.d.mts.map +1 -0
  8. package/dist/cli/commands/cli-add-cmd.mjs +45 -0
  9. package/dist/cli/commands/cli-add-cmd.mjs.map +1 -0
  10. package/dist/cli/commands/{branch-cmd.d.mts → cli-branch-cmd.d.mts} +9 -9
  11. package/dist/cli/commands/cli-branch-cmd.d.mts.map +1 -0
  12. package/dist/cli/commands/cli-branch-cmd.mjs +59 -0
  13. package/dist/cli/commands/cli-branch-cmd.mjs.map +1 -0
  14. package/dist/cli/commands/cli-checkout-cmd.d.mts +20 -0
  15. package/dist/cli/commands/cli-checkout-cmd.d.mts.map +1 -0
  16. package/dist/cli/commands/cli-checkout-cmd.mjs +50 -0
  17. package/dist/cli/commands/cli-checkout-cmd.mjs.map +1 -0
  18. package/dist/cli/commands/cli-commit-cmd.d.mts +23 -0
  19. package/dist/cli/commands/cli-commit-cmd.d.mts.map +1 -0
  20. package/dist/cli/commands/cli-commit-cmd.mjs +52 -0
  21. package/dist/cli/commands/cli-commit-cmd.mjs.map +1 -0
  22. package/dist/cli/commands/{generate-comment-cmd.d.mts → cli-generate-comment-cmd.d.mts} +1 -1
  23. package/dist/cli/commands/cli-generate-comment-cmd.d.mts.map +1 -0
  24. package/dist/cli/commands/{generate-comment-cmd.mjs → cli-generate-comment-cmd.mjs} +11 -6
  25. package/dist/cli/commands/cli-generate-comment-cmd.mjs.map +1 -0
  26. package/dist/cli/commands/{init-cmd.d.mts → cli-init-cmd.d.mts} +3 -3
  27. package/dist/cli/commands/cli-init-cmd.d.mts.map +1 -0
  28. package/dist/cli/commands/cli-init-cmd.mjs +47 -0
  29. package/dist/cli/commands/cli-init-cmd.mjs.map +1 -0
  30. package/dist/cli/commands/{log-cmd.d.mts → cli-log-cmd.d.mts} +3 -4
  31. package/dist/cli/commands/cli-log-cmd.d.mts.map +1 -0
  32. package/dist/cli/commands/cli-log-cmd.mjs +90 -0
  33. package/dist/cli/commands/cli-log-cmd.mjs.map +1 -0
  34. package/dist/cli/commands/cli-merge-cmd.d.mts +22 -0
  35. package/dist/cli/commands/cli-merge-cmd.d.mts.map +1 -0
  36. package/dist/cli/commands/cli-merge-cmd.mjs +66 -0
  37. package/dist/cli/commands/cli-merge-cmd.mjs.map +1 -0
  38. package/dist/cli/commands/{reset-cmd.d.mts → cli-reset-cmd.d.mts} +2 -2
  39. package/dist/cli/commands/cli-reset-cmd.d.mts.map +1 -0
  40. package/dist/cli/commands/cli-reset-cmd.mjs +63 -0
  41. package/dist/cli/commands/cli-reset-cmd.mjs.map +1 -0
  42. package/dist/cli/commands/cli-restore-cmd.d.mts +23 -0
  43. package/dist/cli/commands/cli-restore-cmd.d.mts.map +1 -0
  44. package/dist/cli/commands/cli-restore-cmd.mjs +55 -0
  45. package/dist/cli/commands/cli-restore-cmd.mjs.map +1 -0
  46. package/dist/cli/commands/{status-cmd.d.mts → cli-status-cmd.d.mts} +3 -3
  47. package/dist/cli/commands/cli-status-cmd.d.mts.map +1 -0
  48. package/dist/cli/commands/cli-status-cmd.mjs +96 -0
  49. package/dist/cli/commands/cli-status-cmd.mjs.map +1 -0
  50. package/dist/cli/vcs-cli-main.d.mts.map +1 -1
  51. package/dist/cli/vcs-cli-main.mjs +18 -15
  52. package/dist/cli/vcs-cli-main.mjs.map +1 -1
  53. package/dist/cli/vcs-projection-helper.d.mts +23 -0
  54. package/dist/cli/vcs-projection-helper.d.mts.map +1 -0
  55. package/dist/cli/vcs-projection-helper.mjs +91 -0
  56. package/dist/cli/vcs-projection-helper.mjs.map +1 -0
  57. package/dist/cli/vcs-repo-helper.d.mts +19 -0
  58. package/dist/cli/vcs-repo-helper.d.mts.map +1 -0
  59. package/dist/cli/vcs-repo-helper.mjs +74 -0
  60. package/dist/cli/vcs-repo-helper.mjs.map +1 -0
  61. package/dist/test/test-helpers.d.mts +11 -2
  62. package/dist/test/test-helpers.d.mts.map +1 -1
  63. package/dist/test/test-helpers.mjs +35 -0
  64. package/dist/test/test-helpers.mjs.map +1 -1
  65. package/package.json +6 -6
  66. package/src/AUTO-GENERATED-version.mts +1 -1
  67. package/src/bootstrap/node-bootstrap.mts +7 -21
  68. package/src/bootstrap/node-bootstrap.respec.mts +2 -2
  69. package/src/cli/cli-arg-parser.respec.mts +2 -2
  70. package/src/cli/cli-e2e.respec.mts +12 -12
  71. package/src/cli/commands/branch-checkout-cmd.respec.mts +426 -412
  72. package/src/cli/commands/cli-add-cmd.mts +65 -0
  73. package/src/cli/commands/cli-branch-cmd.mts +87 -0
  74. package/src/cli/commands/cli-checkout-cmd.mts +72 -0
  75. package/src/cli/commands/cli-commit-cmd.mts +77 -0
  76. package/src/cli/commands/{generate-comment-cmd.mts → cli-generate-comment-cmd.mts} +12 -6
  77. package/src/cli/commands/cli-init-cmd.mts +78 -0
  78. package/src/cli/commands/cli-log-cmd.mts +126 -0
  79. package/src/cli/commands/cli-merge-cmd.mts +99 -0
  80. package/src/cli/commands/cli-reset-cmd.mts +94 -0
  81. package/src/cli/commands/cli-restore-cmd.mts +87 -0
  82. package/src/cli/commands/cli-status-cmd.mts +131 -0
  83. package/src/cli/commands/commit-log-cmd.respec.mts +85 -28
  84. package/src/cli/commands/init-cmd.respec.mts +3 -3
  85. package/src/cli/commands/reset-restore-cmd.respec.mts +9 -9
  86. package/src/cli/commands/status-add-cmd.respec.mts +21 -17
  87. package/src/cli/vcs-cli-main.mts +18 -15
  88. package/src/cli/vcs-projection-helper.mts +112 -0
  89. package/src/cli/vcs-repo-helper.mts +99 -0
  90. package/src/engine/branch/branch-space.respec.mts +23 -21
  91. package/src/engine/merge/b2tfs-sync-comments.respec.mts +11 -11
  92. package/src/test/test-helpers.mts +50 -2
  93. package/src/vcs-gib.respec.mts +25 -16
  94. package/tsconfig.test.tsbuildinfo +1 -1
  95. package/tsconfig.tsbuildinfo +1 -1
  96. package/vcs-gib_test_output.md +58 -0
  97. package/dist/cli/commands/add-cmd.d.mts.map +0 -1
  98. package/dist/cli/commands/add-cmd.mjs +0 -346
  99. package/dist/cli/commands/add-cmd.mjs.map +0 -1
  100. package/dist/cli/commands/branch-cmd.d.mts.map +0 -1
  101. package/dist/cli/commands/branch-cmd.mjs +0 -238
  102. package/dist/cli/commands/branch-cmd.mjs.map +0 -1
  103. package/dist/cli/commands/checkout-cmd.d.mts +0 -21
  104. package/dist/cli/commands/checkout-cmd.d.mts.map +0 -1
  105. package/dist/cli/commands/checkout-cmd.mjs +0 -174
  106. package/dist/cli/commands/checkout-cmd.mjs.map +0 -1
  107. package/dist/cli/commands/commit-cmd.d.mts +0 -24
  108. package/dist/cli/commands/commit-cmd.d.mts.map +0 -1
  109. package/dist/cli/commands/commit-cmd.mjs +0 -449
  110. package/dist/cli/commands/commit-cmd.mjs.map +0 -1
  111. package/dist/cli/commands/generate-comment-cmd.d.mts.map +0 -1
  112. package/dist/cli/commands/generate-comment-cmd.mjs.map +0 -1
  113. package/dist/cli/commands/init-cmd.d.mts.map +0 -1
  114. package/dist/cli/commands/init-cmd.mjs +0 -119
  115. package/dist/cli/commands/init-cmd.mjs.map +0 -1
  116. package/dist/cli/commands/log-cmd.d.mts.map +0 -1
  117. package/dist/cli/commands/log-cmd.mjs +0 -349
  118. package/dist/cli/commands/log-cmd.mjs.map +0 -1
  119. package/dist/cli/commands/merge-cmd.d.mts +0 -36
  120. package/dist/cli/commands/merge-cmd.d.mts.map +0 -1
  121. package/dist/cli/commands/merge-cmd.mjs +0 -292
  122. package/dist/cli/commands/merge-cmd.mjs.map +0 -1
  123. package/dist/cli/commands/reset-cmd.d.mts.map +0 -1
  124. package/dist/cli/commands/reset-cmd.mjs +0 -93
  125. package/dist/cli/commands/reset-cmd.mjs.map +0 -1
  126. package/dist/cli/commands/restore-cmd.d.mts +0 -22
  127. package/dist/cli/commands/restore-cmd.d.mts.map +0 -1
  128. package/dist/cli/commands/restore-cmd.mjs +0 -115
  129. package/dist/cli/commands/restore-cmd.mjs.map +0 -1
  130. package/dist/cli/commands/status-cmd.d.mts.map +0 -1
  131. package/dist/cli/commands/status-cmd.mjs +0 -132
  132. package/dist/cli/commands/status-cmd.mjs.map +0 -1
  133. package/dist/engine/branch/branch-graph-helper.d.mts +0 -28
  134. package/dist/engine/branch/branch-graph-helper.d.mts.map +0 -1
  135. package/dist/engine/branch/branch-graph-helper.mjs +0 -81
  136. package/dist/engine/branch/branch-graph-helper.mjs.map +0 -1
  137. package/dist/engine/branch/branch-helper.d.mts +0 -40
  138. package/dist/engine/branch/branch-helper.d.mts.map +0 -1
  139. package/dist/engine/branch/branch-helper.mjs +0 -78
  140. package/dist/engine/branch/branch-helper.mjs.map +0 -1
  141. package/dist/engine/branch/branch-space-helper.d.mts +0 -23
  142. package/dist/engine/branch/branch-space-helper.d.mts.map +0 -1
  143. package/dist/engine/branch/branch-space-helper.mjs +0 -78
  144. package/dist/engine/branch/branch-space-helper.mjs.map +0 -1
  145. package/dist/engine/branch/branch-types.d.mts +0 -26
  146. package/dist/engine/branch/branch-types.d.mts.map +0 -1
  147. package/dist/engine/branch/branch-types.mjs +0 -7
  148. package/dist/engine/branch/branch-types.mjs.map +0 -1
  149. package/dist/engine/diff/line-diff-helper.d.mts +0 -76
  150. package/dist/engine/diff/line-diff-helper.d.mts.map +0 -1
  151. package/dist/engine/diff/line-diff-helper.mjs +0 -144
  152. package/dist/engine/diff/line-diff-helper.mjs.map +0 -1
  153. package/dist/engine/filter/glob-helper.d.mts +0 -51
  154. package/dist/engine/filter/glob-helper.d.mts.map +0 -1
  155. package/dist/engine/filter/glob-helper.mjs +0 -132
  156. package/dist/engine/filter/glob-helper.mjs.map +0 -1
  157. package/dist/engine/index/index-helper.d.mts +0 -113
  158. package/dist/engine/index/index-helper.d.mts.map +0 -1
  159. package/dist/engine/index/index-helper.mjs +0 -533
  160. package/dist/engine/index/index-helper.mjs.map +0 -1
  161. package/dist/engine/index/index-types.d.mts +0 -63
  162. package/dist/engine/index/index-types.d.mts.map +0 -1
  163. package/dist/engine/index/index-types.mjs +0 -7
  164. package/dist/engine/index/index-types.mjs.map +0 -1
  165. package/dist/engine/item/item-atom-helper.d.mts +0 -20
  166. package/dist/engine/item/item-atom-helper.d.mts.map +0 -1
  167. package/dist/engine/item/item-atom-helper.mjs +0 -30
  168. package/dist/engine/item/item-atom-helper.mjs.map +0 -1
  169. package/dist/engine/item/item-helper.d.mts +0 -94
  170. package/dist/engine/item/item-helper.d.mts.map +0 -1
  171. package/dist/engine/item/item-helper.mjs +0 -424
  172. package/dist/engine/item/item-helper.mjs.map +0 -1
  173. package/dist/engine/item/item-types.d.mts +0 -128
  174. package/dist/engine/item/item-types.d.mts.map +0 -1
  175. package/dist/engine/item/item-types.mjs +0 -16
  176. package/dist/engine/item/item-types.mjs.map +0 -1
  177. package/dist/engine/merge/b2tfs-3way-graft-strategy.d.mts +0 -74
  178. package/dist/engine/merge/b2tfs-3way-graft-strategy.d.mts.map +0 -1
  179. package/dist/engine/merge/b2tfs-3way-graft-strategy.mjs +0 -570
  180. package/dist/engine/merge/b2tfs-3way-graft-strategy.mjs.map +0 -1
  181. package/dist/engine/merge/b2tfs-3way-graft-types.d.mts +0 -34
  182. package/dist/engine/merge/b2tfs-3way-graft-types.d.mts.map +0 -1
  183. package/dist/engine/merge/b2tfs-3way-graft-types.mjs +0 -2
  184. package/dist/engine/merge/b2tfs-3way-graft-types.mjs.map +0 -1
  185. package/dist/engine/status/status-helper.d.mts +0 -90
  186. package/dist/engine/status/status-helper.d.mts.map +0 -1
  187. package/dist/engine/status/status-helper.mjs +0 -286
  188. package/dist/engine/status/status-helper.mjs.map +0 -1
  189. package/src/cli/commands/add-cmd.mts +0 -435
  190. package/src/cli/commands/branch-cmd.mts +0 -311
  191. package/src/cli/commands/checkout-cmd.mts +0 -227
  192. package/src/cli/commands/commit-cmd.mts +0 -557
  193. package/src/cli/commands/init-cmd.mts +0 -152
  194. package/src/cli/commands/log-cmd.mts +0 -449
  195. package/src/cli/commands/merge-cmd.mts +0 -363
  196. package/src/cli/commands/reset-cmd.mts +0 -128
  197. package/src/cli/commands/restore-cmd.mts +0 -155
  198. package/src/cli/commands/status-cmd.mts +0 -168
  199. package/src/engine/branch/branch-graph-helper.mts +0 -117
  200. package/src/engine/branch/branch-helper.mts +0 -112
  201. package/src/engine/branch/branch-space-helper.mts +0 -110
  202. package/src/engine/branch/branch-types.mts +0 -29
  203. package/src/engine/diff/line-diff-helper.mts +0 -210
  204. package/src/engine/diff/line-diff-helper.respec.mts +0 -84
  205. package/src/engine/filter/glob-helper.mts +0 -165
  206. package/src/engine/filter/glob-helper.respec.mts +0 -94
  207. package/src/engine/index/index-helper.mts +0 -705
  208. package/src/engine/index/index-types.mts +0 -66
  209. package/src/engine/item/item-atom-helper.mts +0 -30
  210. package/src/engine/item/item-helper.mts +0 -544
  211. package/src/engine/item/item-types.mts +0 -137
  212. package/src/engine/item/item.respec.mts +0 -92
  213. package/src/engine/merge/b2tfs-3way-graft-strategy.mts +0 -630
  214. package/src/engine/merge/b2tfs-3way-graft-strategy.respec.mts +0 -346
  215. package/src/engine/merge/b2tfs-3way-graft-types.mts +0 -34
  216. package/src/engine/status/status-helper.mts +0 -383
@@ -1,137 +0,0 @@
1
- /**
2
- * @module item-types
3
- *
4
- * Baseline type definitions for B2tFS filesystem item IbGibs.
5
- */
6
-
7
- import { IbGibAddr, TransformResult } from '@ibgib/ts-gib/dist/types.mjs';
8
- import { IbGibData_V1, IbGibRel8ns_V1, IbGib_V1 } from '@ibgib/ts-gib/dist/V1/types.mjs';
9
- import { CommentIbGib_V1 } from '@ibgib/core-gib/dist/common/comment/comment-types.mjs';
10
-
11
- import { SpaceQualifiedIbGibAddr } from '../index/index-types.mjs';
12
- import { LineDiffChunk } from '../diff/line-diff-helper.mjs';
13
-
14
- /**
15
- * Filesystem projection type: file or folder.
16
- */
17
- export type B2tFSType = 'file' | 'folder';
18
-
19
- export const B2tFSType = {
20
- file: 'file' as 'file',
21
- folder: 'folder' as 'folder',
22
- } satisfies { [key: string]: B2tFSType };
23
-
24
- export const B2TFS_TYPE_VALUES: B2tFSType[] = Object.values(B2tFSType);
25
-
26
- /**
27
- * Rel8n names used by B2tFS items.
28
- */
29
- export const B2TFS_CHILD_ITEM_REL8N_NAME = 'b2tfs_child';
30
- export const BINARY_REL8N_NAME = 'bin';
31
-
32
- /**
33
- * Intrinsic data payload for B2tFS item IbGibs.
34
- */
35
- export interface B2tFSItemData_V1 extends IbGibData_V1 {
36
- /**
37
- * Raw filesystem name of file or folder (e.g. 'index.mts')
38
- */
39
- name: string;
40
- /**
41
- * SHA-256 hash of raw name
42
- */
43
- nameHash: string;
44
- /**
45
- * Filesystem item type ('file' | 'folder')
46
- */
47
- fsType: B2tFSType;
48
- /**
49
- * Filter patterns for folders (e.g. from .ibgibignore)
50
- */
51
- filterPatterns?: string[];
52
- /**
53
- * File name sans extension
54
- */
55
- fileNameSansExt?: string;
56
- /**
57
- * File extension (e.g. 'mts')
58
- */
59
- fileExt?: string;
60
- /**
61
- * SHA-256 hash of file contents
62
- */
63
- fileHash?: string;
64
- /**
65
- * File encoding (defaults to 'utf8')
66
- */
67
- fileEncoding?: string;
68
- /**
69
- * Grouping UUID for atomic diff transactions
70
- */
71
- diffTransactionId: string;
72
- }
73
-
74
- /**
75
- * Extrinsic relationships (DAG links) for B2tFS item IbGibs.
76
- */
77
- export interface B2tFSItemRel8ns_V1 extends IbGibRel8ns_V1 {
78
- /**
79
- * Links to child B2tFS item addresses (for folders)
80
- */
81
- [B2TFS_CHILD_ITEM_REL8N_NAME]?: IbGibAddr[];
82
- /**
83
- * Links to binary content payload IbGibs (for files)
84
- */
85
- [BINARY_REL8N_NAME]?: IbGibAddr[];
86
- /**
87
- * Links to commit message comment IbGibs
88
- */
89
- comment?: IbGibAddr[];
90
- }
91
-
92
- /**
93
- * B2tFS Item IbGib object structure.
94
- */
95
- export interface B2tFSItemIbGib_V1 extends IbGib_V1<B2tFSItemData_V1, B2tFSItemRel8ns_V1> {
96
- data: B2tFSItemData_V1;
97
- }
98
-
99
- /**
100
- * Diff information tree structure.
101
- */
102
- export interface B2tFSItemDiffInfo {
103
- fsType?: B2tFSType;
104
- fsName?: string;
105
- timestampInTicks: string;
106
- diffTransactionId: string;
107
- existingItemSQAddr?: SpaceQualifiedIbGibAddr;
108
- newItemSQAddr?: SpaceQualifiedIbGibAddr;
109
- existingItem?: B2tFSItemIbGib_V1;
110
- newItem?: B2tFSItemIbGib_V1;
111
- transformResults?: TransformResult<IbGib_V1>[];
112
- applyCommentText?: string;
113
- applyCommentIbGib?: CommentIbGib_V1;
114
- childDiffs?: B2tFSItemDiffInfo[];
115
- errorMsg?: string;
116
- ignored?: boolean;
117
- inputPath?: string;
118
- }
119
-
120
- export interface B2tFSItemDiffInfo_Folder extends B2tFSItemDiffInfo {
121
- fsType: 'folder';
122
- childNamesAdded: string[];
123
- childAddrsAdded: string[];
124
- childNamesRemoved: string[];
125
- childAddrsRemoved: string[];
126
- childNamesModified: string[];
127
- childAddrsModified: { [prevAddr: string]: string };
128
- filterPatterns: string[];
129
- }
130
-
131
- export interface B2tFSItemDiffInfo_File extends B2tFSItemDiffInfo {
132
- fsType: 'file';
133
- fileEncoding?: string;
134
- oldData?: Uint8Array;
135
- newData: Uint8Array;
136
- lineChunks?: LineDiffChunk[];
137
- }
@@ -1,92 +0,0 @@
1
- /**
2
- * @module item.respec.node
3
- *
4
- * Unit tests for createB2tFSItemIbGib and evolveB2tFSItemIbGib timeline transforms.
5
- */
6
-
7
- import {
8
- respecfully, ifWe, iReckon
9
- } from '@ibgib/helper-gib/dist/respec-gib/respec-gib.mjs';
10
- import { getIbGibAddr } from '@ibgib/ts-gib/dist/helper.mjs';
11
- import { getGibInfo } from '@ibgib/ts-gib/dist/V1/transforms/transform-helper.mjs';
12
-
13
- import { createB2tFSItemIbGib, evolveB2tFSItemIbGib } from './item-helper.mjs';
14
- import { B2tFSItemIbGib_V1 } from './item-types.mjs';
15
-
16
- const lc = `[apps/vcs-gib/src/engine/item/item.respec.node.mts]`;
17
-
18
- await respecfully(lc, `B2tFS Item Timeline Transforms`, async () => {
19
-
20
- await respecfully(lc, `createB2tFSItemIbGib`, async () => {
21
- await ifWe(lc, `creates brand-new file item with TJP and DNA`, async () => {
22
- const res = await createB2tFSItemIbGib({
23
- fsType: 'file',
24
- name: 'test.txt',
25
- data: {
26
- fileHash: 'hash_abc_123',
27
- },
28
- });
29
-
30
- const item = res.newIbGib as B2tFSItemIbGib_V1;
31
- iReckon(lc, item).isGonnaBeTruthy();
32
- iReckon(lc, item.data?.name).willEqual('test.txt');
33
- iReckon(lc, item.data?.fileHash).willEqual('hash_abc_123');
34
- iReckon(lc, item.rel8ns?.ancestor).isGonnaBeTruthy();
35
- iReckon(lc, item.rel8ns?.tjp).isGonnaBeTruthy();
36
-
37
- const gibInfo = getGibInfo({ gib: item.gib });
38
- iReckon(lc, gibInfo.tjpGib).isGonnaBeTruthy();
39
- iReckon(lc, gibInfo.punctiliarHash).isGonnaBeTruthy();
40
- });
41
-
42
- await ifWe(lc, `creates brand-new folder item`, async () => {
43
- const res = await createB2tFSItemIbGib({
44
- fsType: 'folder',
45
- name: 'src',
46
- });
47
-
48
- const item = res.newIbGib as B2tFSItemIbGib_V1;
49
- iReckon(lc, item).isGonnaBeTruthy();
50
- iReckon(lc, item.data?.fsType).willEqual('folder');
51
- iReckon(lc, item.data?.name).willEqual('src');
52
- });
53
- });
54
-
55
- await respecfully(lc, `evolveB2tFSItemIbGib`, async () => {
56
- await ifWe(lc, `evolves existing item via mut8/rel8, generating two-part timeline gib and rel8ns.past`, async () => {
57
- const createRes = await createB2tFSItemIbGib({
58
- fsType: 'file',
59
- name: 'config.json',
60
- data: {
61
- fileHash: 'hash_v1',
62
- },
63
- });
64
-
65
- const initialItem = createRes.newIbGib as B2tFSItemIbGib_V1;
66
- const initialAddr = getIbGibAddr({ ibGib: initialItem });
67
- const initialGibInfo = getGibInfo({ gib: initialItem.gib });
68
-
69
- // Evolve item with updated fileHash
70
- const evolveRes = await evolveB2tFSItemIbGib({
71
- existingItem: initialItem,
72
- dataToUpdate: {
73
- fileHash: 'hash_v2',
74
- },
75
- });
76
-
77
- const evolvedItem = evolveRes.newIbGib as B2tFSItemIbGib_V1;
78
- const evolvedAddr = getIbGibAddr({ ibGib: evolvedItem });
79
- const evolvedGibInfo = getGibInfo({ gib: evolvedItem.gib });
80
-
81
- iReckon(lc, evolvedItem.data?.fileHash).willEqual('hash_v2');
82
- iReckon(lc, evolvedItem.rel8ns?.past).includes(initialAddr);
83
- iReckon(lc, evolvedItem.rel8ns?.ancestor).isGonnaBeTruthy();
84
- iReckon(lc, evolvedItem.rel8ns?.tjp).willEqual(initialItem.rel8ns?.tjp);
85
-
86
- // Verify two-part composite timeline gib address
87
- iReckon(lc, evolvedGibInfo.tjpGib).willEqual(initialGibInfo.tjpGib);
88
- iReckon(lc, evolvedGibInfo.punctiliarHash).isGonnaBeTruthy();
89
- iReckon(lc, evolvedGibInfo.punctiliarHash !== initialGibInfo.punctiliarHash).isGonnaBeTrue();
90
- });
91
- });
92
- });