@fluid-experimental/tree 2.0.0-rc.1.0.3 → 2.0.0-rc.2.0.0

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 (572) hide show
  1. package/{.eslintrc.js → .eslintrc.cjs} +1 -1
  2. package/{.mocharc.js → .mocharc.cjs} +1 -1
  3. package/.vscode/settings.json +1 -1
  4. package/CHANGELOG.md +4 -0
  5. package/api-report/experimental-tree.api.md +4 -15
  6. package/dist/ChangeCompression.d.ts +5 -5
  7. package/dist/ChangeCompression.d.ts.map +1 -1
  8. package/dist/ChangeCompression.js +24 -24
  9. package/dist/ChangeCompression.js.map +1 -1
  10. package/dist/ChangeTypes.d.ts +3 -3
  11. package/dist/ChangeTypes.d.ts.map +1 -1
  12. package/dist/ChangeTypes.js +9 -9
  13. package/dist/ChangeTypes.js.map +1 -1
  14. package/dist/Checkout.d.ts +7 -7
  15. package/dist/Checkout.d.ts.map +1 -1
  16. package/dist/Checkout.js +27 -27
  17. package/dist/Checkout.js.map +1 -1
  18. package/dist/Common.d.ts +2 -2
  19. package/dist/Common.d.ts.map +1 -1
  20. package/dist/Common.js.map +1 -1
  21. package/dist/EagerCheckout.d.ts +3 -3
  22. package/dist/EagerCheckout.d.ts.map +1 -1
  23. package/dist/EagerCheckout.js +2 -2
  24. package/dist/EagerCheckout.js.map +1 -1
  25. package/dist/EditLog.d.ts +4 -6
  26. package/dist/EditLog.d.ts.map +1 -1
  27. package/dist/EditLog.js +9 -9
  28. package/dist/EditLog.js.map +1 -1
  29. package/dist/EditUtilities.d.ts +6 -6
  30. package/dist/EditUtilities.d.ts.map +1 -1
  31. package/dist/EditUtilities.js +28 -28
  32. package/dist/EditUtilities.js.map +1 -1
  33. package/dist/Forest.d.ts +2 -2
  34. package/dist/Forest.d.ts.map +1 -1
  35. package/dist/Forest.js +13 -13
  36. package/dist/Forest.js.map +1 -1
  37. package/dist/HistoryEditFactory.d.ts +3 -3
  38. package/dist/HistoryEditFactory.d.ts.map +1 -1
  39. package/dist/HistoryEditFactory.js +36 -36
  40. package/dist/HistoryEditFactory.js.map +1 -1
  41. package/dist/IdConversion.d.ts +3 -3
  42. package/dist/IdConversion.d.ts.map +1 -1
  43. package/dist/IdConversion.js +23 -23
  44. package/dist/IdConversion.js.map +1 -1
  45. package/dist/InitialTree.d.ts +1 -1
  46. package/dist/InitialTree.d.ts.map +1 -1
  47. package/dist/InitialTree.js +2 -2
  48. package/dist/InitialTree.js.map +1 -1
  49. package/dist/LazyCheckout.d.ts +5 -5
  50. package/dist/LazyCheckout.d.ts.map +1 -1
  51. package/dist/LazyCheckout.js +2 -2
  52. package/dist/LazyCheckout.js.map +1 -1
  53. package/dist/LogViewer.d.ts +7 -7
  54. package/dist/LogViewer.d.ts.map +1 -1
  55. package/dist/LogViewer.js +25 -25
  56. package/dist/LogViewer.js.map +1 -1
  57. package/dist/MergeHealth.d.ts +1 -1
  58. package/dist/MergeHealth.d.ts.map +1 -1
  59. package/dist/MergeHealth.js +32 -32
  60. package/dist/MergeHealth.js.map +1 -1
  61. package/dist/NodeIdUtilities.d.ts +3 -3
  62. package/dist/NodeIdUtilities.d.ts.map +1 -1
  63. package/dist/NodeIdUtilities.js +4 -4
  64. package/dist/NodeIdUtilities.js.map +1 -1
  65. package/dist/PayloadUtilities.d.ts +1 -1
  66. package/dist/PayloadUtilities.d.ts.map +1 -1
  67. package/dist/PayloadUtilities.js.map +1 -1
  68. package/dist/ReconciliationPath.d.ts +3 -3
  69. package/dist/ReconciliationPath.d.ts.map +1 -1
  70. package/dist/ReconciliationPath.js.map +1 -1
  71. package/dist/RevisionValueCache.js +5 -5
  72. package/dist/RevisionValueCache.js.map +1 -1
  73. package/dist/RevisionView.d.ts +5 -5
  74. package/dist/RevisionView.d.ts.map +1 -1
  75. package/dist/RevisionView.js +11 -11
  76. package/dist/RevisionView.js.map +1 -1
  77. package/dist/SerializationUtilities.d.ts +4 -4
  78. package/dist/SerializationUtilities.d.ts.map +1 -1
  79. package/dist/SerializationUtilities.js +5 -5
  80. package/dist/SerializationUtilities.js.map +1 -1
  81. package/dist/SharedTree.d.ts +15 -18
  82. package/dist/SharedTree.d.ts.map +1 -1
  83. package/dist/SharedTree.js +154 -166
  84. package/dist/SharedTree.js.map +1 -1
  85. package/dist/SharedTreeEncoder.d.ts +8 -8
  86. package/dist/SharedTreeEncoder.d.ts.map +1 -1
  87. package/dist/SharedTreeEncoder.js +67 -67
  88. package/dist/SharedTreeEncoder.js.map +1 -1
  89. package/dist/StringInterner.d.ts +1 -1
  90. package/dist/StringInterner.d.ts.map +1 -1
  91. package/dist/StringInterner.js +2 -2
  92. package/dist/StringInterner.js.map +1 -1
  93. package/dist/Summary.d.ts +4 -4
  94. package/dist/Summary.d.ts.map +1 -1
  95. package/dist/Summary.js +2 -2
  96. package/dist/Summary.js.map +1 -1
  97. package/dist/SummaryBackCompatibility.d.ts +3 -3
  98. package/dist/SummaryBackCompatibility.d.ts.map +1 -1
  99. package/dist/SummaryBackCompatibility.js +13 -13
  100. package/dist/SummaryBackCompatibility.js.map +1 -1
  101. package/dist/SummaryTestUtilities.d.ts +2 -2
  102. package/dist/SummaryTestUtilities.d.ts.map +1 -1
  103. package/dist/SummaryTestUtilities.js.map +1 -1
  104. package/dist/Transaction.d.ts +4 -4
  105. package/dist/Transaction.d.ts.map +1 -1
  106. package/dist/Transaction.js +10 -10
  107. package/dist/Transaction.js.map +1 -1
  108. package/dist/TransactionInternal.d.ts +7 -7
  109. package/dist/TransactionInternal.d.ts.map +1 -1
  110. package/dist/TransactionInternal.js +87 -87
  111. package/dist/TransactionInternal.js.map +1 -1
  112. package/dist/TreeCompressor.d.ts +4 -4
  113. package/dist/TreeCompressor.d.ts.map +1 -1
  114. package/dist/TreeCompressor.js +6 -6
  115. package/dist/TreeCompressor.js.map +1 -1
  116. package/dist/TreeNodeHandle.d.ts +3 -3
  117. package/dist/TreeNodeHandle.d.ts.map +1 -1
  118. package/dist/TreeNodeHandle.js +5 -5
  119. package/dist/TreeNodeHandle.js.map +1 -1
  120. package/dist/TreeView.d.ts +3 -3
  121. package/dist/TreeView.d.ts.map +1 -1
  122. package/dist/TreeView.js +10 -10
  123. package/dist/TreeView.js.map +1 -1
  124. package/dist/TreeViewUtilities.d.ts +2 -2
  125. package/dist/TreeViewUtilities.d.ts.map +1 -1
  126. package/dist/TreeViewUtilities.js +3 -3
  127. package/dist/TreeViewUtilities.js.map +1 -1
  128. package/dist/UndoRedoHandler.d.ts +2 -2
  129. package/dist/UndoRedoHandler.d.ts.map +1 -1
  130. package/dist/UndoRedoHandler.js +5 -5
  131. package/dist/UndoRedoHandler.js.map +1 -1
  132. package/dist/UuidUtilities.d.ts +1 -1
  133. package/dist/UuidUtilities.d.ts.map +1 -1
  134. package/dist/UuidUtilities.js +3 -3
  135. package/dist/UuidUtilities.js.map +1 -1
  136. package/dist/id-compressor/AppendOnlySortedMap.js +4 -4
  137. package/dist/id-compressor/AppendOnlySortedMap.js.map +1 -1
  138. package/dist/id-compressor/IdCompressor.d.ts +2 -2
  139. package/dist/id-compressor/IdCompressor.d.ts.map +1 -1
  140. package/dist/id-compressor/IdCompressor.js +78 -78
  141. package/dist/id-compressor/IdCompressor.js.map +1 -1
  142. package/dist/id-compressor/IdRange.d.ts +1 -1
  143. package/dist/id-compressor/IdRange.d.ts.map +1 -1
  144. package/dist/id-compressor/IdRange.js.map +1 -1
  145. package/dist/id-compressor/NumericUuid.d.ts +1 -1
  146. package/dist/id-compressor/NumericUuid.d.ts.map +1 -1
  147. package/dist/id-compressor/NumericUuid.js +6 -6
  148. package/dist/id-compressor/NumericUuid.js.map +1 -1
  149. package/dist/id-compressor/SessionIdNormalizer.d.ts +2 -2
  150. package/dist/id-compressor/SessionIdNormalizer.d.ts.map +1 -1
  151. package/dist/id-compressor/SessionIdNormalizer.js +14 -14
  152. package/dist/id-compressor/SessionIdNormalizer.js.map +1 -1
  153. package/dist/id-compressor/index.d.ts +4 -4
  154. package/dist/id-compressor/index.d.ts.map +1 -1
  155. package/dist/id-compressor/index.js +11 -11
  156. package/dist/id-compressor/index.js.map +1 -1
  157. package/dist/id-compressor/persisted-types/0.0.1.d.ts +1 -1
  158. package/dist/id-compressor/persisted-types/0.0.1.d.ts.map +1 -1
  159. package/dist/id-compressor/persisted-types/0.0.1.js.map +1 -1
  160. package/dist/id-compressor/persisted-types/index.d.ts +1 -1
  161. package/dist/id-compressor/persisted-types/index.d.ts.map +1 -1
  162. package/dist/id-compressor/persisted-types/index.js.map +1 -1
  163. package/dist/index.d.ts +29 -29
  164. package/dist/index.d.ts.map +1 -1
  165. package/dist/index.js +73 -73
  166. package/dist/index.js.map +1 -1
  167. package/dist/migration-shim/migrationDeltaHandler.d.ts +1 -1
  168. package/dist/migration-shim/migrationDeltaHandler.d.ts.map +1 -1
  169. package/dist/migration-shim/migrationDeltaHandler.js +5 -8
  170. package/dist/migration-shim/migrationDeltaHandler.js.map +1 -1
  171. package/dist/migration-shim/migrationShim.d.ts +1 -1
  172. package/dist/migration-shim/migrationShim.d.ts.map +1 -1
  173. package/dist/migration-shim/migrationShim.js +1 -1
  174. package/dist/migration-shim/migrationShim.js.map +1 -1
  175. package/dist/migration-shim/migrationShimFactory.d.ts +1 -1
  176. package/dist/migration-shim/migrationShimFactory.d.ts.map +1 -1
  177. package/dist/migration-shim/migrationShimFactory.js.map +1 -1
  178. package/dist/migration-shim/sharedTreeDeltaHandler.d.ts +1 -1
  179. package/dist/migration-shim/sharedTreeDeltaHandler.d.ts.map +1 -1
  180. package/dist/migration-shim/sharedTreeDeltaHandler.js +2 -5
  181. package/dist/migration-shim/sharedTreeDeltaHandler.js.map +1 -1
  182. package/dist/migration-shim/types.d.ts +1 -1
  183. package/dist/migration-shim/types.d.ts.map +1 -1
  184. package/dist/migration-shim/types.js.map +1 -1
  185. package/dist/package.json +3 -0
  186. package/dist/persisted-types/0.0.2.d.ts +1 -1
  187. package/dist/persisted-types/0.0.2.d.ts.map +1 -1
  188. package/dist/persisted-types/0.0.2.js.map +1 -1
  189. package/dist/persisted-types/0.1.1.d.ts +4 -4
  190. package/dist/persisted-types/0.1.1.d.ts.map +1 -1
  191. package/dist/persisted-types/0.1.1.js +13 -13
  192. package/dist/persisted-types/0.1.1.js.map +1 -1
  193. package/dist/persisted-types/index.d.ts +2 -2
  194. package/dist/persisted-types/index.d.ts.map +1 -1
  195. package/dist/persisted-types/index.js +13 -13
  196. package/dist/persisted-types/index.js.map +1 -1
  197. package/dist/tree-alpha.d.ts +5 -8
  198. package/dist/tree-beta.d.ts +5 -1
  199. package/dist/tree-public.d.ts +5 -1
  200. package/dist/tree-untrimmed.d.ts +5 -8
  201. package/dist/tsdoc-metadata.json +1 -1
  202. package/lib/ChangeCompression.d.ts +5 -5
  203. package/lib/ChangeCompression.d.ts.map +1 -1
  204. package/lib/ChangeCompression.js +3 -3
  205. package/lib/ChangeCompression.js.map +1 -1
  206. package/lib/ChangeTypes.d.ts +3 -3
  207. package/lib/ChangeTypes.d.ts.map +1 -1
  208. package/lib/ChangeTypes.js +3 -3
  209. package/lib/ChangeTypes.js.map +1 -1
  210. package/lib/Checkout.d.ts +7 -7
  211. package/lib/Checkout.d.ts.map +1 -1
  212. package/lib/Checkout.js +6 -6
  213. package/lib/Checkout.js.map +1 -1
  214. package/lib/Common.d.ts +2 -2
  215. package/lib/Common.d.ts.map +1 -1
  216. package/lib/Common.js.map +1 -1
  217. package/lib/EagerCheckout.d.ts +3 -3
  218. package/lib/EagerCheckout.d.ts.map +1 -1
  219. package/lib/EagerCheckout.js +1 -1
  220. package/lib/EagerCheckout.js.map +1 -1
  221. package/lib/EditLog.d.ts +4 -6
  222. package/lib/EditLog.d.ts.map +1 -1
  223. package/lib/EditLog.js +1 -1
  224. package/lib/EditLog.js.map +1 -1
  225. package/lib/EditUtilities.d.ts +6 -6
  226. package/lib/EditUtilities.d.ts.map +1 -1
  227. package/lib/EditUtilities.js +7 -7
  228. package/lib/EditUtilities.js.map +1 -1
  229. package/lib/Forest.d.ts +2 -2
  230. package/lib/Forest.d.ts.map +1 -1
  231. package/lib/Forest.js +2 -2
  232. package/lib/Forest.js.map +1 -1
  233. package/lib/HistoryEditFactory.d.ts +3 -3
  234. package/lib/HistoryEditFactory.d.ts.map +1 -1
  235. package/lib/HistoryEditFactory.js +7 -7
  236. package/lib/HistoryEditFactory.js.map +1 -1
  237. package/lib/IdConversion.d.ts +3 -3
  238. package/lib/IdConversion.d.ts.map +1 -1
  239. package/lib/IdConversion.js +4 -4
  240. package/lib/IdConversion.js.map +1 -1
  241. package/lib/InitialTree.d.ts +1 -1
  242. package/lib/InitialTree.d.ts.map +1 -1
  243. package/lib/InitialTree.js +1 -1
  244. package/lib/InitialTree.js.map +1 -1
  245. package/lib/LazyCheckout.d.ts +5 -5
  246. package/lib/LazyCheckout.d.ts.map +1 -1
  247. package/lib/LazyCheckout.js +1 -1
  248. package/lib/LazyCheckout.js.map +1 -1
  249. package/lib/LogViewer.d.ts +7 -7
  250. package/lib/LogViewer.d.ts.map +1 -1
  251. package/lib/LogViewer.js +4 -4
  252. package/lib/LogViewer.js.map +1 -1
  253. package/lib/MergeHealth.d.ts +1 -1
  254. package/lib/MergeHealth.d.ts.map +1 -1
  255. package/lib/MergeHealth.js +5 -5
  256. package/lib/MergeHealth.js.map +1 -1
  257. package/lib/NodeIdUtilities.d.ts +3 -3
  258. package/lib/NodeIdUtilities.d.ts.map +1 -1
  259. package/lib/NodeIdUtilities.js +2 -2
  260. package/lib/NodeIdUtilities.js.map +1 -1
  261. package/lib/PayloadUtilities.d.ts +1 -1
  262. package/lib/PayloadUtilities.d.ts.map +1 -1
  263. package/lib/PayloadUtilities.js.map +1 -1
  264. package/lib/ReconciliationPath.d.ts +3 -3
  265. package/lib/ReconciliationPath.d.ts.map +1 -1
  266. package/lib/ReconciliationPath.js.map +1 -1
  267. package/lib/RevisionValueCache.js +1 -1
  268. package/lib/RevisionValueCache.js.map +1 -1
  269. package/lib/RevisionView.d.ts +5 -5
  270. package/lib/RevisionView.d.ts.map +1 -1
  271. package/lib/RevisionView.js +3 -3
  272. package/lib/RevisionView.js.map +1 -1
  273. package/lib/SerializationUtilities.d.ts +4 -4
  274. package/lib/SerializationUtilities.d.ts.map +1 -1
  275. package/lib/SerializationUtilities.js +1 -1
  276. package/lib/SerializationUtilities.js.map +1 -1
  277. package/lib/SharedTree.d.ts +15 -18
  278. package/lib/SharedTree.d.ts.map +1 -1
  279. package/lib/SharedTree.js +28 -40
  280. package/lib/SharedTree.js.map +1 -1
  281. package/lib/SharedTreeEncoder.d.ts +8 -8
  282. package/lib/SharedTreeEncoder.d.ts.map +1 -1
  283. package/lib/SharedTreeEncoder.js +12 -12
  284. package/lib/SharedTreeEncoder.js.map +1 -1
  285. package/lib/StringInterner.d.ts +1 -1
  286. package/lib/StringInterner.d.ts.map +1 -1
  287. package/lib/StringInterner.js +1 -1
  288. package/lib/StringInterner.js.map +1 -1
  289. package/lib/Summary.d.ts +4 -4
  290. package/lib/Summary.d.ts.map +1 -1
  291. package/lib/Summary.js +1 -1
  292. package/lib/Summary.js.map +1 -1
  293. package/lib/SummaryBackCompatibility.d.ts +3 -3
  294. package/lib/SummaryBackCompatibility.d.ts.map +1 -1
  295. package/lib/SummaryBackCompatibility.js +3 -3
  296. package/lib/SummaryBackCompatibility.js.map +1 -1
  297. package/lib/SummaryTestUtilities.d.ts +2 -2
  298. package/lib/SummaryTestUtilities.d.ts.map +1 -1
  299. package/lib/SummaryTestUtilities.js.map +1 -1
  300. package/lib/Transaction.d.ts +4 -4
  301. package/lib/Transaction.d.ts.map +1 -1
  302. package/lib/Transaction.js +5 -5
  303. package/lib/Transaction.js.map +1 -1
  304. package/lib/TransactionInternal.d.ts +7 -7
  305. package/lib/TransactionInternal.d.ts.map +1 -1
  306. package/lib/TransactionInternal.js +5 -5
  307. package/lib/TransactionInternal.js.map +1 -1
  308. package/lib/TreeCompressor.d.ts +4 -4
  309. package/lib/TreeCompressor.d.ts.map +1 -1
  310. package/lib/TreeCompressor.js +2 -2
  311. package/lib/TreeCompressor.js.map +1 -1
  312. package/lib/TreeNodeHandle.d.ts +3 -3
  313. package/lib/TreeNodeHandle.d.ts.map +1 -1
  314. package/lib/TreeNodeHandle.js +1 -1
  315. package/lib/TreeNodeHandle.js.map +1 -1
  316. package/lib/TreeView.d.ts +3 -3
  317. package/lib/TreeView.d.ts.map +1 -1
  318. package/lib/TreeView.js +3 -3
  319. package/lib/TreeView.js.map +1 -1
  320. package/lib/TreeViewUtilities.d.ts +2 -2
  321. package/lib/TreeViewUtilities.d.ts.map +1 -1
  322. package/lib/TreeViewUtilities.js +1 -1
  323. package/lib/TreeViewUtilities.js.map +1 -1
  324. package/lib/UndoRedoHandler.d.ts +2 -2
  325. package/lib/UndoRedoHandler.d.ts.map +1 -1
  326. package/lib/UndoRedoHandler.js +2 -2
  327. package/lib/UndoRedoHandler.js.map +1 -1
  328. package/lib/UuidUtilities.d.ts +1 -1
  329. package/lib/UuidUtilities.d.ts.map +1 -1
  330. package/lib/UuidUtilities.js +1 -1
  331. package/lib/UuidUtilities.js.map +1 -1
  332. package/lib/id-compressor/AppendOnlySortedMap.js +1 -1
  333. package/lib/id-compressor/AppendOnlySortedMap.js.map +1 -1
  334. package/lib/id-compressor/IdCompressor.d.ts +2 -2
  335. package/lib/id-compressor/IdCompressor.d.ts.map +1 -1
  336. package/lib/id-compressor/IdCompressor.js +6 -6
  337. package/lib/id-compressor/IdCompressor.js.map +1 -1
  338. package/lib/id-compressor/IdRange.d.ts +1 -1
  339. package/lib/id-compressor/IdRange.d.ts.map +1 -1
  340. package/lib/id-compressor/IdRange.js.map +1 -1
  341. package/lib/id-compressor/NumericUuid.d.ts +1 -1
  342. package/lib/id-compressor/NumericUuid.d.ts.map +1 -1
  343. package/lib/id-compressor/NumericUuid.js +2 -2
  344. package/lib/id-compressor/NumericUuid.js.map +1 -1
  345. package/lib/id-compressor/SessionIdNormalizer.d.ts +2 -2
  346. package/lib/id-compressor/SessionIdNormalizer.d.ts.map +1 -1
  347. package/lib/id-compressor/SessionIdNormalizer.js +2 -2
  348. package/lib/id-compressor/SessionIdNormalizer.js.map +1 -1
  349. package/lib/id-compressor/index.d.ts +4 -4
  350. package/lib/id-compressor/index.d.ts.map +1 -1
  351. package/lib/id-compressor/index.js +3 -3
  352. package/lib/id-compressor/index.js.map +1 -1
  353. package/lib/id-compressor/persisted-types/0.0.1.d.ts +1 -1
  354. package/lib/id-compressor/persisted-types/0.0.1.d.ts.map +1 -1
  355. package/lib/id-compressor/persisted-types/0.0.1.js.map +1 -1
  356. package/lib/id-compressor/persisted-types/index.d.ts +1 -1
  357. package/lib/id-compressor/persisted-types/index.d.ts.map +1 -1
  358. package/lib/id-compressor/persisted-types/index.js.map +1 -1
  359. package/lib/index.d.ts +29 -29
  360. package/lib/index.d.ts.map +1 -1
  361. package/lib/index.js +22 -22
  362. package/lib/index.js.map +1 -1
  363. package/lib/migration-shim/migrationDeltaHandler.d.ts +1 -1
  364. package/lib/migration-shim/migrationDeltaHandler.d.ts.map +1 -1
  365. package/lib/migration-shim/migrationDeltaHandler.js +5 -8
  366. package/lib/migration-shim/migrationDeltaHandler.js.map +1 -1
  367. package/lib/migration-shim/migrationShim.d.ts +1 -1
  368. package/lib/migration-shim/migrationShim.d.ts.map +1 -1
  369. package/lib/migration-shim/migrationShim.js +1 -1
  370. package/lib/migration-shim/migrationShim.js.map +1 -1
  371. package/lib/migration-shim/migrationShimFactory.d.ts +1 -1
  372. package/lib/migration-shim/migrationShimFactory.d.ts.map +1 -1
  373. package/lib/migration-shim/migrationShimFactory.js.map +1 -1
  374. package/lib/migration-shim/sharedTreeDeltaHandler.d.ts +1 -1
  375. package/lib/migration-shim/sharedTreeDeltaHandler.d.ts.map +1 -1
  376. package/lib/migration-shim/sharedTreeDeltaHandler.js +2 -5
  377. package/lib/migration-shim/sharedTreeDeltaHandler.js.map +1 -1
  378. package/lib/migration-shim/types.d.ts +1 -1
  379. package/lib/migration-shim/types.d.ts.map +1 -1
  380. package/lib/migration-shim/types.js.map +1 -1
  381. package/lib/persisted-types/0.0.2.d.ts +1 -1
  382. package/lib/persisted-types/0.0.2.d.ts.map +1 -1
  383. package/lib/persisted-types/0.0.2.js.map +1 -1
  384. package/lib/persisted-types/0.1.1.d.ts +4 -4
  385. package/lib/persisted-types/0.1.1.d.ts.map +1 -1
  386. package/lib/persisted-types/0.1.1.js +2 -2
  387. package/lib/persisted-types/0.1.1.js.map +1 -1
  388. package/lib/persisted-types/index.d.ts +2 -2
  389. package/lib/persisted-types/index.d.ts.map +1 -1
  390. package/lib/persisted-types/index.js +2 -2
  391. package/lib/persisted-types/index.js.map +1 -1
  392. package/lib/test/AppendOnlySortedMap.perf.tests.js +2 -2
  393. package/lib/test/AppendOnlySortedMap.perf.tests.js.map +1 -1
  394. package/lib/test/AppendOnlySortedMap.tests.js +2 -2
  395. package/lib/test/AppendOnlySortedMap.tests.js.map +1 -1
  396. package/lib/test/ChangeCompression.tests.js +9 -9
  397. package/lib/test/ChangeCompression.tests.js.map +1 -1
  398. package/lib/test/Checkout.tests.d.ts +1 -1
  399. package/lib/test/Checkout.tests.d.ts.map +1 -1
  400. package/lib/test/Checkout.tests.js +2 -2
  401. package/lib/test/Checkout.tests.js.map +1 -1
  402. package/lib/test/Common.tests.js +1 -1
  403. package/lib/test/Common.tests.js.map +1 -1
  404. package/lib/test/EagerCheckout.tests.js +4 -4
  405. package/lib/test/EagerCheckout.tests.js.map +1 -1
  406. package/lib/test/Edit.tests.js +2 -2
  407. package/lib/test/Edit.tests.js.map +1 -1
  408. package/lib/test/EditLog.perf.tests.js +4 -4
  409. package/lib/test/EditLog.perf.tests.js.map +1 -1
  410. package/lib/test/EditLog.tests.js +3 -3
  411. package/lib/test/EditLog.tests.js.map +1 -1
  412. package/lib/test/EditUtilities.tests.js +6 -6
  413. package/lib/test/EditUtilities.tests.js.map +1 -1
  414. package/lib/test/Forest.perf.tests.js +4 -4
  415. package/lib/test/Forest.perf.tests.js.map +1 -1
  416. package/lib/test/Forest.tests.js +2 -2
  417. package/lib/test/Forest.tests.js.map +1 -1
  418. package/lib/test/GenericTransaction.tests.js +3 -3
  419. package/lib/test/GenericTransaction.tests.js.map +1 -1
  420. package/lib/test/HistoryEditFactory.tests.js +4 -4
  421. package/lib/test/HistoryEditFactory.tests.js.map +1 -1
  422. package/lib/test/IdCompressor.perf.tests.js +4 -4
  423. package/lib/test/IdCompressor.perf.tests.js.map +1 -1
  424. package/lib/test/IdCompressor.tests.js +7 -7
  425. package/lib/test/IdCompressor.tests.js.map +1 -1
  426. package/lib/test/IdConversion.tests.js +3 -3
  427. package/lib/test/IdConversion.tests.js.map +1 -1
  428. package/lib/test/LazyCheckout.tests.js +4 -4
  429. package/lib/test/LazyCheckout.tests.js.map +1 -1
  430. package/lib/test/LogViewer.tests.js +12 -12
  431. package/lib/test/LogViewer.tests.js.map +1 -1
  432. package/lib/test/MergeHealthTelemetryHeartbeat.tests.js +6 -6
  433. package/lib/test/MergeHealthTelemetryHeartbeat.tests.js.map +1 -1
  434. package/lib/test/NumericUuid.perf.tests.js +3 -3
  435. package/lib/test/NumericUuid.perf.tests.js.map +1 -1
  436. package/lib/test/NumericUuid.tests.js +4 -4
  437. package/lib/test/NumericUuid.tests.js.map +1 -1
  438. package/lib/test/RevisionValueCache.tests.js +2 -2
  439. package/lib/test/RevisionValueCache.tests.js.map +1 -1
  440. package/lib/test/RevisionView.tests.js +6 -6
  441. package/lib/test/RevisionView.tests.js.map +1 -1
  442. package/lib/test/SessionIdNormalizer.tests.js +3 -3
  443. package/lib/test/SessionIdNormalizer.tests.js.map +1 -1
  444. package/lib/test/SharedTree.fuzz.tests.js +1 -1
  445. package/lib/test/SharedTree.fuzz.tests.js.map +1 -1
  446. package/lib/test/SharedTree.perf.tests.js +2 -2
  447. package/lib/test/SharedTree.perf.tests.js.map +1 -1
  448. package/lib/test/SharedTree.tests.js +7 -7
  449. package/lib/test/SharedTree.tests.js.map +1 -1
  450. package/lib/test/StringInterner.tests.js +1 -1
  451. package/lib/test/StringInterner.tests.js.map +1 -1
  452. package/lib/test/Summary.tests.d.ts +2 -2
  453. package/lib/test/Summary.tests.d.ts.map +1 -1
  454. package/lib/test/Summary.tests.js +14 -14
  455. package/lib/test/Summary.tests.js.map +1 -1
  456. package/lib/test/Transaction.tests.js +5 -5
  457. package/lib/test/Transaction.tests.js.map +1 -1
  458. package/lib/test/TransactionInternal.tests.js +7 -7
  459. package/lib/test/TransactionInternal.tests.js.map +1 -1
  460. package/lib/test/TreeCompression.tests.js +8 -8
  461. package/lib/test/TreeCompression.tests.js.map +1 -1
  462. package/lib/test/TreeView.tests.js +3 -3
  463. package/lib/test/TreeView.tests.js.map +1 -1
  464. package/lib/test/UndoRedoHandler.tests.js +2 -2
  465. package/lib/test/UndoRedoHandler.tests.js.map +1 -1
  466. package/lib/test/fuzz/Generators.d.ts +1 -1
  467. package/lib/test/fuzz/Generators.d.ts.map +1 -1
  468. package/lib/test/fuzz/Generators.js +4 -4
  469. package/lib/test/fuzz/Generators.js.map +1 -1
  470. package/lib/test/fuzz/SharedTreeFuzzTests.d.ts +1 -1
  471. package/lib/test/fuzz/SharedTreeFuzzTests.d.ts.map +1 -1
  472. package/lib/test/fuzz/SharedTreeFuzzTests.js +5 -5
  473. package/lib/test/fuzz/SharedTreeFuzzTests.js.map +1 -1
  474. package/lib/test/fuzz/Types.d.ts +6 -6
  475. package/lib/test/fuzz/Types.d.ts.map +1 -1
  476. package/lib/test/fuzz/Types.js.map +1 -1
  477. package/lib/test/utilities/IdCompressorTestUtilities.d.ts +6 -6
  478. package/lib/test/utilities/IdCompressorTestUtilities.d.ts.map +1 -1
  479. package/lib/test/utilities/IdCompressorTestUtilities.js +6 -6
  480. package/lib/test/utilities/IdCompressorTestUtilities.js.map +1 -1
  481. package/lib/test/utilities/MockTransaction.d.ts +4 -4
  482. package/lib/test/utilities/MockTransaction.d.ts.map +1 -1
  483. package/lib/test/utilities/MockTransaction.js +3 -3
  484. package/lib/test/utilities/MockTransaction.js.map +1 -1
  485. package/lib/test/utilities/PendingLocalStateTests.d.ts +1 -1
  486. package/lib/test/utilities/PendingLocalStateTests.d.ts.map +1 -1
  487. package/lib/test/utilities/PendingLocalStateTests.js +5 -5
  488. package/lib/test/utilities/PendingLocalStateTests.js.map +1 -1
  489. package/lib/test/utilities/SharedTreeTests.d.ts +2 -2
  490. package/lib/test/utilities/SharedTreeTests.d.ts.map +1 -1
  491. package/lib/test/utilities/SharedTreeTests.js +22 -22
  492. package/lib/test/utilities/SharedTreeTests.js.map +1 -1
  493. package/lib/test/utilities/SharedTreeVersioningTests.d.ts +1 -1
  494. package/lib/test/utilities/SharedTreeVersioningTests.d.ts.map +1 -1
  495. package/lib/test/utilities/SharedTreeVersioningTests.js +10 -10
  496. package/lib/test/utilities/SharedTreeVersioningTests.js.map +1 -1
  497. package/lib/test/utilities/SummaryLoadPerfTests.js +6 -6
  498. package/lib/test/utilities/SummaryLoadPerfTests.js.map +1 -1
  499. package/lib/test/utilities/SummarySizeTests.d.ts +1 -1
  500. package/lib/test/utilities/SummarySizeTests.d.ts.map +1 -1
  501. package/lib/test/utilities/SummarySizeTests.js +5 -5
  502. package/lib/test/utilities/SummarySizeTests.js.map +1 -1
  503. package/lib/test/utilities/TestNode.d.ts +6 -6
  504. package/lib/test/utilities/TestNode.d.ts.map +1 -1
  505. package/lib/test/utilities/TestNode.js +5 -5
  506. package/lib/test/utilities/TestNode.js.map +1 -1
  507. package/lib/test/utilities/TestUtilities.d.ts +12 -12
  508. package/lib/test/utilities/TestUtilities.d.ts.map +1 -1
  509. package/lib/test/utilities/TestUtilities.js +18 -19
  510. package/lib/test/utilities/TestUtilities.js.map +1 -1
  511. package/lib/test/utilities/UndoRedoTests.d.ts +2 -2
  512. package/lib/test/utilities/UndoRedoTests.d.ts.map +1 -1
  513. package/lib/test/utilities/UndoRedoTests.js +7 -7
  514. package/lib/test/utilities/UndoRedoTests.js.map +1 -1
  515. package/package.json +57 -31
  516. package/src/ChangeCompression.ts +7 -7
  517. package/src/ChangeTypes.ts +5 -5
  518. package/src/Checkout.ts +13 -13
  519. package/src/Common.ts +2 -2
  520. package/src/EagerCheckout.ts +3 -3
  521. package/src/EditLog.ts +6 -7
  522. package/src/EditUtilities.ts +10 -10
  523. package/src/Forest.ts +4 -4
  524. package/src/HistoryEditFactory.ts +11 -11
  525. package/src/IdConversion.ts +4 -4
  526. package/src/InitialTree.ts +3 -3
  527. package/src/LazyCheckout.ts +5 -5
  528. package/src/LogViewer.ts +8 -8
  529. package/src/MergeHealth.ts +6 -6
  530. package/src/NodeIdUtilities.ts +4 -4
  531. package/src/PayloadUtilities.ts +1 -1
  532. package/src/ReconciliationPath.ts +3 -3
  533. package/src/RevisionValueCache.ts +1 -1
  534. package/src/RevisionView.ts +7 -7
  535. package/src/SerializationUtilities.ts +5 -5
  536. package/src/SharedTree.ts +34 -54
  537. package/src/SharedTreeEncoder.ts +15 -15
  538. package/src/StringInterner.ts +2 -2
  539. package/src/Summary.ts +5 -5
  540. package/src/SummaryBackCompatibility.ts +10 -5
  541. package/src/SummaryTestUtilities.ts +3 -3
  542. package/src/Transaction.ts +8 -8
  543. package/src/TransactionInternal.ts +8 -8
  544. package/src/TreeCompressor.ts +6 -6
  545. package/src/TreeNodeHandle.ts +4 -4
  546. package/src/TreeView.ts +4 -4
  547. package/src/TreeViewUtilities.ts +3 -3
  548. package/src/UndoRedoHandler.ts +4 -4
  549. package/src/UuidUtilities.ts +2 -2
  550. package/src/id-compressor/AppendOnlySortedMap.ts +1 -1
  551. package/src/id-compressor/IdCompressor.ts +8 -8
  552. package/src/id-compressor/IdRange.ts +1 -1
  553. package/src/id-compressor/NumericUuid.ts +3 -3
  554. package/src/id-compressor/SessionIdNormalizer.ts +4 -4
  555. package/src/id-compressor/index.ts +4 -4
  556. package/src/id-compressor/persisted-types/0.0.1.ts +1 -1
  557. package/src/id-compressor/persisted-types/index.ts +1 -1
  558. package/src/index.ts +29 -29
  559. package/src/migration-shim/migrationDeltaHandler.ts +9 -10
  560. package/src/migration-shim/migrationShim.ts +7 -5
  561. package/src/migration-shim/migrationShimFactory.ts +4 -1
  562. package/src/migration-shim/sharedTreeDeltaHandler.ts +7 -6
  563. package/src/migration-shim/types.ts +1 -1
  564. package/src/persisted-types/0.0.2.ts +1 -1
  565. package/src/persisted-types/0.1.1.ts +4 -4
  566. package/src/persisted-types/index.ts +2 -2
  567. package/tsconfig.esnext.json +1 -2
  568. package/tsconfig.json +3 -0
  569. package/lib/test/Attach.tests.d.ts +0 -6
  570. package/lib/test/Attach.tests.d.ts.map +0 -1
  571. package/lib/test/Attach.tests.js +0 -52
  572. package/lib/test/Attach.tests.js.map +0 -1
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { type IChannelAttributes, type IFluidDataStoreRuntime, type IChannelServices, type IChannelFactory } from '@fluidframework/datastore-definitions';
6
6
  import { type ITree } from '@fluidframework/tree';
7
- import { type SharedTreeFactory as LegacySharedTreeFactory, type SharedTree as LegacySharedTree } from '../SharedTree';
7
+ import { type SharedTreeFactory as LegacySharedTreeFactory, type SharedTree as LegacySharedTree } from '../SharedTree.js';
8
8
  import { MigrationShim } from './migrationShim.js';
9
9
  /**
10
10
  * {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link MigrationShim}.
@@ -1 +1 @@
1
- {"version":3,"file":"migrationShimFactory.d.ts","sourceRoot":"","sources":["../../src/migration-shim/migrationShimFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,KAAK,iBAAiB,IAAI,uBAAuB,EAAE,KAAK,UAAU,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACvH,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD;;;;;;;;;;;GAWG;AACH,qB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O,CAAC,QAAQ,CAAC,oBAAoB;gBAFpB,UAAU,EAAE,uBAAuB,EACnC,UAAU,EAAE,eAAe,EAC3B,oBAAoB,EAAE,CAAC,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,KAAK,KAAK,IAAI;IAGjG;;;;OAIG;IACH,IAAW,IAAI,IAAI,MAAM,CAExB;IAED;;;;OAIG;IACH,IAAW,UAAU,IAAI,kBAAkB,CAE1C;IAED;;;;;OAKG;IACU,IAAI,CAChB,OAAO,EAAE,sBAAsB,EAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,kBAAkB,GAC5B,OAAO,CAAC,aAAa,CAAC;IAczB;;;;;;OAMG;IACI,MAAM,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,aAAa;CAYzE"}
@@ -1 +1 @@
1
- {"version":3,"file":"migrationShimFactory.js","sourceRoot":"","sources":["../../src/migration-shim/migrationShimFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AASpD,yDAAmD;AACnD,yCAA6C;AAE7C;;;;;;;;;;;GAWG;AACH,MAAa,oBAAoB;IAChC,YACkB,UAAmC,EACnC,UAA2B,EAC3B,oBAA+E;QAF/E,eAAU,GAAV,UAAU,CAAyB;QACnC,eAAU,GAAV,UAAU,CAAiB;QAC3B,yBAAoB,GAApB,oBAAoB,CAA2D;IAC9F,CAAC;IAEJ;;;;OAIG;IACH,IAAW,IAAI;QACd,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;IAC7B,CAAC;IAED;;;;OAIG;IACH,IAAW,UAAU;QACpB,OAAO,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAE9B,mKAAmK;QACnK,IAAA,mBAAM,EAAC,IAAA,0BAAe,EAAC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,6BAA6B,CAAC,CAAC;QACrG,MAAM,aAAa,GAAG,IAAI,gCAAa,CACtC,EAAE,EACF,OAAO,EACP,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,oBAAoB,CACzB,CAAC;QACF,MAAM,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACnC,OAAO,aAAa,CAAC;IACtB,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,OAA+B,EAAE,EAAU;QACxD,oCAAoC;QACpC,MAAM,aAAa,GAAG,IAAI,gCAAa,CACtC,EAAE,EACF,OAAO,EACP,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,oBAAoB,CACzB,CAAC;QACF,aAAa,CAAC,MAAM,EAAE,CAAC;QACvB,OAAO,aAAa,CAAC;IACtB,CAAC;CACD;AArED,oDAqEC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from '@fluidframework/core-utils';\nimport {\n\ttype IChannelAttributes,\n\ttype IFluidDataStoreRuntime,\n\ttype IChannelServices,\n\ttype IChannelFactory,\n} from '@fluidframework/datastore-definitions';\nimport { type ITree } from '@fluidframework/tree';\nimport { type SharedTreeFactory as LegacySharedTreeFactory, type SharedTree as LegacySharedTree } from '../SharedTree';\nimport { MigrationShim } from './migrationShim.js';\nimport { attributesMatch } from './utils.js';\n\n/**\n * {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link MigrationShim}.\n *\n * Creates the migration shim that allows a migration from legacy shared tree to shared tree.\n * @remarks\n *\n * It takes over the attributes of the legacy factory, so that it is loaded instead of the normal legacy factory. Once migration finishes, the shim it produces will change its attributes to those of the new factory - meaning that on the next summarization the shim will write a summary that will cause future clients to load a different factory and shim (the SharedTreeShimFactory and SharedTreeShim).\n * 1. pre-migration\n *\n * @sealed\n * @internal\n */\nexport class MigrationShimFactory implements IChannelFactory {\n\tpublic constructor(\n\t\tprivate readonly oldFactory: LegacySharedTreeFactory,\n\t\tprivate readonly newFactory: IChannelFactory,\n\t\tprivate readonly populateNewChannelFn: (oldChannel: LegacySharedTree, newChannel: ITree) => void\n\t) {}\n\n\t/**\n\t * This factory takes over the type of the oldFactory to load in its place. The user must not include the MigrationShimFactory and the oldFactory in the same registry to avoid conflict.\n\t *\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.\"type\"}\n\t */\n\tpublic get type(): string {\n\t\treturn this.oldFactory.type;\n\t}\n\n\t/**\n\t * Should be the LegacySharedTree attributes\n\t *\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.attributes}\n\t */\n\tpublic get attributes(): IChannelAttributes {\n\t\treturn this.oldFactory.attributes;\n\t}\n\n\t/**\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.load}\n\t *\n\t * Should be loading the MigrationShim - it should just load the old tree as this makes the factory's\n\t * responsibility simple. Trying to follow the Single Responsibility Principle here.\n\t */\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tattributes: IChannelAttributes\n\t): Promise<MigrationShim> {\n\t\t// TODO: remove attributes check and move it to an automated test that constructing a MigrationShimFactory and checking its attributes/type matches the oldFactory.\n\t\tassert(attributesMatch(attributes, this.oldFactory.attributes), 0x7ea /* Attributes do not match */);\n\t\tconst migrationShim = new MigrationShim(\n\t\t\tid,\n\t\t\truntime,\n\t\t\tthis.oldFactory,\n\t\t\tthis.newFactory,\n\t\t\tthis.populateNewChannelFn\n\t\t);\n\t\tawait migrationShim.load(services);\n\t\treturn migrationShim;\n\t}\n\n\t/**\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.create}\n\t *\n\t * Create MigrationShim that can hot swap from one DDS to a new DDS. We want the capability of creating an old tree\n\t * as when this code rolls out, there may be clients on the v1 version of the code, and we may want to have a dark\n\t * rollout capability.\n\t */\n\tpublic create(runtime: IFluidDataStoreRuntime, id: string): MigrationShim {\n\t\t// Maybe this should throw an error.\n\t\tconst migrationShim = new MigrationShim(\n\t\t\tid,\n\t\t\truntime,\n\t\t\tthis.oldFactory,\n\t\t\tthis.newFactory,\n\t\t\tthis.populateNewChannelFn\n\t\t);\n\t\tmigrationShim.create();\n\t\treturn migrationShim;\n\t}\n}\n"]}
1
+ {"version":3,"file":"migrationShimFactory.js","sourceRoot":"","sources":["../../src/migration-shim/migrationShimFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AAYpD,yDAAmD;AACnD,yCAA6C;AAE7C;;;;;;;;;;;GAWG;AACH,MAAa,oBAAoB;IAChC,YACkB,UAAmC,EACnC,UAA2B,EAC3B,oBAA+E;QAF/E,eAAU,GAAV,UAAU,CAAyB;QACnC,eAAU,GAAV,UAAU,CAAiB;QAC3B,yBAAoB,GAApB,oBAAoB,CAA2D;IAC9F,CAAC;IAEJ;;;;OAIG;IACH,IAAW,IAAI;QACd,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;IAC7B,CAAC;IAED;;;;OAIG;IACH,IAAW,UAAU;QACpB,OAAO,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAE9B,mKAAmK;QACnK,IAAA,mBAAM,EAAC,IAAA,0BAAe,EAAC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,6BAA6B,CAAC,CAAC;QACrG,MAAM,aAAa,GAAG,IAAI,gCAAa,CACtC,EAAE,EACF,OAAO,EACP,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,oBAAoB,CACzB,CAAC;QACF,MAAM,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACnC,OAAO,aAAa,CAAC;IACtB,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,OAA+B,EAAE,EAAU;QACxD,oCAAoC;QACpC,MAAM,aAAa,GAAG,IAAI,gCAAa,CACtC,EAAE,EACF,OAAO,EACP,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,oBAAoB,CACzB,CAAC;QACF,aAAa,CAAC,MAAM,EAAE,CAAC;QACvB,OAAO,aAAa,CAAC;IACtB,CAAC;CACD;AArED,oDAqEC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from '@fluidframework/core-utils';\nimport {\n\ttype IChannelAttributes,\n\ttype IFluidDataStoreRuntime,\n\ttype IChannelServices,\n\ttype IChannelFactory,\n} from '@fluidframework/datastore-definitions';\nimport { type ITree } from '@fluidframework/tree';\nimport {\n\ttype SharedTreeFactory as LegacySharedTreeFactory,\n\ttype SharedTree as LegacySharedTree,\n} from '../SharedTree.js';\nimport { MigrationShim } from './migrationShim.js';\nimport { attributesMatch } from './utils.js';\n\n/**\n * {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link MigrationShim}.\n *\n * Creates the migration shim that allows a migration from legacy shared tree to shared tree.\n * @remarks\n *\n * It takes over the attributes of the legacy factory, so that it is loaded instead of the normal legacy factory. Once migration finishes, the shim it produces will change its attributes to those of the new factory - meaning that on the next summarization the shim will write a summary that will cause future clients to load a different factory and shim (the SharedTreeShimFactory and SharedTreeShim).\n * 1. pre-migration\n *\n * @sealed\n * @internal\n */\nexport class MigrationShimFactory implements IChannelFactory {\n\tpublic constructor(\n\t\tprivate readonly oldFactory: LegacySharedTreeFactory,\n\t\tprivate readonly newFactory: IChannelFactory,\n\t\tprivate readonly populateNewChannelFn: (oldChannel: LegacySharedTree, newChannel: ITree) => void\n\t) {}\n\n\t/**\n\t * This factory takes over the type of the oldFactory to load in its place. The user must not include the MigrationShimFactory and the oldFactory in the same registry to avoid conflict.\n\t *\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.\"type\"}\n\t */\n\tpublic get type(): string {\n\t\treturn this.oldFactory.type;\n\t}\n\n\t/**\n\t * Should be the LegacySharedTree attributes\n\t *\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.attributes}\n\t */\n\tpublic get attributes(): IChannelAttributes {\n\t\treturn this.oldFactory.attributes;\n\t}\n\n\t/**\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.load}\n\t *\n\t * Should be loading the MigrationShim - it should just load the old tree as this makes the factory's\n\t * responsibility simple. Trying to follow the Single Responsibility Principle here.\n\t */\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tattributes: IChannelAttributes\n\t): Promise<MigrationShim> {\n\t\t// TODO: remove attributes check and move it to an automated test that constructing a MigrationShimFactory and checking its attributes/type matches the oldFactory.\n\t\tassert(attributesMatch(attributes, this.oldFactory.attributes), 0x7ea /* Attributes do not match */);\n\t\tconst migrationShim = new MigrationShim(\n\t\t\tid,\n\t\t\truntime,\n\t\t\tthis.oldFactory,\n\t\t\tthis.newFactory,\n\t\t\tthis.populateNewChannelFn\n\t\t);\n\t\tawait migrationShim.load(services);\n\t\treturn migrationShim;\n\t}\n\n\t/**\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.create}\n\t *\n\t * Create MigrationShim that can hot swap from one DDS to a new DDS. We want the capability of creating an old tree\n\t * as when this code rolls out, there may be clients on the v1 version of the code, and we may want to have a dark\n\t * rollout capability.\n\t */\n\tpublic create(runtime: IFluidDataStoreRuntime, id: string): MigrationShim {\n\t\t// Maybe this should throw an error.\n\t\tconst migrationShim = new MigrationShim(\n\t\t\tid,\n\t\t\truntime,\n\t\t\tthis.oldFactory,\n\t\t\tthis.newFactory,\n\t\t\tthis.populateNewChannelFn\n\t\t);\n\t\tmigrationShim.create();\n\t\treturn migrationShim;\n\t}\n}\n"]}
@@ -27,7 +27,7 @@ export declare class SharedTreeShimDeltaHandler implements IShimDeltaHandler {
27
27
  process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
28
28
  setConnectionState(connected: boolean): void;
29
29
  reSubmit(contents: unknown, localOpMetadata: unknown): void;
30
- applyStashedOp(contents: unknown): unknown;
30
+ applyStashedOp(contents: unknown): void;
31
31
  /**
32
32
  * We cannot rollback v1 ops, we have already migrated and are in v2 state, thus we should not be able to generate.
33
33
  * v1 ops
@@ -1 +1 @@
1
- {"version":3,"file":"sharedTreeDeltaHandler.d.ts","sourceRoot":"","sources":["../../src/migration-shim/sharedTreeDeltaHandler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACpG,OAAO,EAAe,KAAK,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACnG,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGtE;;;;;;;;GAQG;AACH,qBAAa,0BAA2B,YAAW,iBAAiB;IAChD,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,kBAAkB;IAElE,OAAO,CAAC,QAAQ,CAAC,CAAgB;IACjC,OAAO,KAAK,OAAO,GAIlB;IAED,OAAO,CAAC,SAAS,CAAS;IAC1B,IAAW,QAAQ,IAAI,OAAO,CAE7B;IAEM,YAAY,IAAI,IAAI;IAIpB,sBAAsB,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAKpD,mBAAmB,IAAI,OAAO;IAI9B,OAAO,CAAC,OAAO,EAAE,yBAAyB,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,GAAG,IAAI;IAgB3F,kBAAkB,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI;IAK5C,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,GAAG,IA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AO,GAAG,IAAI;IAQnE;;;;OAIG;IACH,OAAO,CAAC,YAAY;CAYpB"}
@@ -44,7 +44,6 @@ class SharedTreeShimDeltaHandler {
44
44
  // This allows us to process the migrate op and prevent the shared object from processing the wrong ops
45
45
  // Drop v1 ops
46
46
  (0, core_utils_1.assert)(this.hasTreeDeltaHandler(), 0x831 /* Can't process ops before attaching tree handler */);
47
- // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
48
47
  if (message.type !== protocol_definitions_1.MessageType.Operation) {
49
48
  return;
50
49
  }
@@ -65,10 +64,8 @@ class SharedTreeShimDeltaHandler {
65
64
  }
66
65
  // We are not capable of applying stashed v1 ops.
67
66
  applyStashedOp(contents) {
68
- if (this.shouldDropOp(contents)) {
69
- return;
70
- }
71
- return this.handler.applyStashedOp(contents);
67
+ (0, core_utils_1.assert)(!this.shouldDropOp(contents), 0x8ab /* SharedTreeShim should not be able to apply v1 ops as they shouldn't have been created locally. */);
68
+ this.handler.applyStashedOp(contents);
72
69
  }
73
70
  /**
74
71
  * We cannot rollback v1 ops, we have already migrated and are in v2 state, thus we should not be able to generate.
@@ -1 +1 @@
1
- {"version":3,"file":"sharedTreeDeltaHandler.js","sourceRoot":"","sources":["../../src/migration-shim/sharedTreeDeltaHandler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AAEpD,+EAAmG;AAEnG,yCAA0D;AAE1D;;;;;;;;GAQG;AACH,MAAa,0BAA0B;IACtC,YAAoC,UAA8B;QAA9B,eAAU,GAAV,UAAU,CAAoB;QAS1D,cAAS,GAAG,KAAK,CAAC;IAT2C,CAAC;IAGtE,IAAY,OAAO;QAClB,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAA,mBAAM,EAAC,OAAO,KAAK,SAAS,EAAE,KAAK,CAAC,8BAA8B,CAAC,CAAC;QACpE,OAAO,OAAO,CAAC;IAChB,CAAC;IAGD,IAAW,QAAQ;QAClB,OAAO,IAAI,CA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Ac,CAAC,QAAiB;QACtC,IAAI,IAAI,CAAC,YAAY,CAAC,QAAuB,CAAC,EAAE;YAC/C,OAAO;SACP;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAC9C,CAAC;IAED;;;OAGG;IACI,QAAQ,CAAE,QAAiB,EAAE,eAAwB;QAC3D,IAAA,mBAAM,EACL,CAAC,IAAI,CAAC,YAAY,CAAC,QAAuB,CAAC,EAC3C,KAAK,CAAC,wFAAwF,CAC9F,CAAC;QACF,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;IAC3D,CAAC;IAED;;;;OAIG;IACK,YAAY,CAAC,QAAqB;QACzC,IAAI,CAAC,IAAA,sBAAW,EAAC,QAAQ,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC;SACZ;QAED,gCAAgC;QAChC,IAAA,mBAAM,EACL,IAAA,0BAAe,EAAC,QAAQ,CAAC,mBAAmB,EAAE,IAAI,CAAC,UAAU,CAAC,EAC9D,KAAK,CAAC,iDAAiD,CACvD,CAAC;QACF,OAAO,KAAK,CAAC;IACd,CAAC;CACD;AA9FD,gEA8FC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from '@fluidframework/core-utils';\nimport { type IChannelAttributes, type IDeltaHandler } from '@fluidframework/datastore-definitions';\nimport { MessageType, type ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';\nimport { type IOpContents, type IShimDeltaHandler } from './types.js';\nimport { attributesMatch, isStampedOp } from './utils.js';\n\n/**\n * Handles incoming and outgoing deltas/ops for the SharedTreeShim distributed data structure.\n * This serves as an adapter to the real DeltaHandler, filter/process migration ops\n *\n * This should just have the ability to drop v1 & migrate ops, and process v2 ops. There may be an opportunity to\n * combine this class with the MigrationShimDeltaHandler, but for now the classes are separated. Once it is clear what\n * exact code can be shared between the two classes is and how it can be merge, we may figure out a way of merging\n * MigrationShimDeltaHandler and SharedTreeShimDeltaHandler.\n */\nexport class SharedTreeShimDeltaHandler implements IShimDeltaHandler {\n\tpublic constructor(private readonly attributes: IChannelAttributes) {}\n\n\tprivate _handler?: IDeltaHandler;\n\tprivate get handler(): IDeltaHandler {\n\t\tconst handler = this._handler;\n\t\tassert(handler !== undefined, 0x7eb /* No handler to process op */);\n\t\treturn handler;\n\t}\n\n\tprivate _attached = false;\n\tpublic get attached(): boolean {\n\t\treturn this._attached;\n\t}\n\n\tpublic markAttached(): void {\n\t\tthis._attached = true;\n\t}\n\n\tpublic attachTreeDeltaHandler(handler: IDeltaHandler): void {\n\t\tassert(this._handler === undefined, 0x7ec /* Should only be able to connect once! */);\n\t\tthis._handler = handler;\n\t}\n\n\tpublic hasTreeDeltaHandler(): boolean {\n\t\treturn this._handler !== undefined;\n\t}\n\n\tpublic process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void {\n\t\t// This allows us to process the migrate op and prevent the shared object from processing the wrong ops\n\t\t// Drop v1 ops\n\t\tassert(this.hasTreeDeltaHandler(), 0x831 /* Can't process ops before attaching tree handler */);\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison\n\t\tif (message.type !== MessageType.Operation) {\n\t\t\treturn;\n\t\t}\n\t\tconst contents = message.contents as IOpContents;\n\t\tif (this.shouldDropOp(contents)) {\n\t\t\treturn;\n\t\t}\n\t\treturn this.handler.process(message, local, localOpMetadata);\n\t}\n\n\t// No idea whether any of the below 4 methods work as expected\n\tpublic setConnectionState(connected: boolean): void {\n\t\treturn this.handler.setConnectionState(connected);\n\t}\n\n\t// Resubmitting v1 ops should fail. We should not be resubmitting v1 ops.\n\tpublic reSubmit(contents: unknown, localOpMetadata: unknown): void {\n\t\tassert(\n\t\t\t!this.shouldDropOp(contents as IOpContents),\n\t\t\t0x832 /* Should not be able to rollback v1 ops as they shouldn't have been created locally. */\n\t\t);\n\t\treturn this.handler.reSubmit(contents, localOpMetadata);\n\t}\n\n\t// We are not capable of applying stashed v1 ops.\n\tpublic applyStashedOp(contents: unknown): unknown {\n\t\tif (this.shouldDropOp(contents as IOpContents)) {\n\t\t\treturn;\n\t\t}\n\t\treturn this.handler.applyStashedOp(contents);\n\t}\n\n\t/**\n\t * We cannot rollback v1 ops, we have already migrated and are in v2 state, thus we should not be able to generate.\n\t * v1 ops\n\t */\n\tpublic rollback?(contents: unknown, localOpMetadata: unknown): void {\n\t\tassert(\n\t\t\t!this.shouldDropOp(contents as IOpContents),\n\t\t\t0x833 /* Should not be able to rollback v1 ops as they shouldn't have been created locally. */\n\t\t);\n\t\treturn this.handler.rollback?.(contents, localOpMetadata);\n\t}\n\n\t/**\n\t * The SharedTreeShimDeltaHandler is already in a v2 state. Thus it should drop all v1 and migrate ops.\n\t * @param contents - the interrogable op contents to figure out if this is a v1 op, a migrate op, or a v2 op.\n\t * @returns whether or not the op is a v1 or migrate op and should be dropped/ignored.\n\t */\n\tprivate shouldDropOp(contents: IOpContents): boolean {\n\t\tif (!isStampedOp(contents)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Don't drop v2 ops in v2 state\n\t\tassert(\n\t\t\tattributesMatch(contents.fluidMigrationStamp, this.attributes),\n\t\t\t0x834 /* Unexpected v2 op with mismatched attributes */\n\t\t);\n\t\treturn false;\n\t}\n}\n"]}
1
+ {"version":3,"file":"sharedTreeDeltaHandler.js","sourceRoot":"","sources":["../../src/migration-shim/sharedTreeDeltaHandler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AAEpD,+EAAmG;AAEnG,yCAA0D;AAE1D;;;;;;;;GAQG;AACH,MAAa,0BAA0B;IACtC,YAAoC,UAA8B;QAA9B,eAAU,GAAV,UAAU,CAAoB;QAS1D,cAAS,GAAG,KAAK,CAAC;IAT2C,CAAC;IAGtE,IAAY,OAAO;QAClB,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAA,mBAA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CAC9F,CAAC;QACF,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;IACzD,CAAC;IAED,iDAAiD;IAC1C,cAAc,CAAC,QAAiB;QACtC,IAAA,mBAAM,EACL,CAAC,IAAI,CAAC,YAAY,CAAC,QAAuB,CAAC,EAC3C,KAAK,CAAC,oGAAoG,CAC1G,CAAC;QACF,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;IAED;;;OAGG;IACI,QAAQ,CAAE,QAAiB,EAAE,eAAwB;QAC3D,IAAA,mBAAM,EACL,CAAC,IAAI,CAAC,YAAY,CAAC,QAAuB,CAAC,EAC3C,KAAK,CAAC,wFAAwF,CAC9F,CAAC;QACF,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;IAC3D,CAAC;IAED;;;;OAIG;IACK,YAAY,CAAC,QAAqB;QACzC,IAAI,CAAC,IAAA,sBAAW,EAAC,QAAQ,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC;SACZ;QAED,gCAAgC;QAChC,IAAA,mBAAM,EACL,IAAA,0BAAe,EAAC,QAAQ,CAAC,mBAAmB,EAAE,IAAI,CAAC,UAAU,CAAC,EAC9D,KAAK,CAAC,iDAAiD,CACvD,CAAC;QACF,OAAO,KAAK,CAAC;IACd,CAAC;CACD;AA/FD,gEA+FC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from '@fluidframework/core-utils';\nimport { type IChannelAttributes, type IDeltaHandler } from '@fluidframework/datastore-definitions';\nimport { MessageType, type ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';\nimport { type IOpContents, type IShimDeltaHandler } from './types.js';\nimport { attributesMatch, isStampedOp } from './utils.js';\n\n/**\n * Handles incoming and outgoing deltas/ops for the SharedTreeShim distributed data structure.\n * This serves as an adapter to the real DeltaHandler, filter/process migration ops\n *\n * This should just have the ability to drop v1 & migrate ops, and process v2 ops. There may be an opportunity to\n * combine this class with the MigrationShimDeltaHandler, but for now the classes are separated. Once it is clear what\n * exact code can be shared between the two classes is and how it can be merge, we may figure out a way of merging\n * MigrationShimDeltaHandler and SharedTreeShimDeltaHandler.\n */\nexport class SharedTreeShimDeltaHandler implements IShimDeltaHandler {\n\tpublic constructor(private readonly attributes: IChannelAttributes) {}\n\n\tprivate _handler?: IDeltaHandler;\n\tprivate get handler(): IDeltaHandler {\n\t\tconst handler = this._handler;\n\t\tassert(handler !== undefined, 0x7eb /* No handler to process op */);\n\t\treturn handler;\n\t}\n\n\tprivate _attached = false;\n\tpublic get attached(): boolean {\n\t\treturn this._attached;\n\t}\n\n\tpublic markAttached(): void {\n\t\tthis._attached = true;\n\t}\n\n\tpublic attachTreeDeltaHandler(handler: IDeltaHandler): void {\n\t\tassert(this._handler === undefined, 0x7ec /* Should only be able to connect once! */);\n\t\tthis._handler = handler;\n\t}\n\n\tpublic hasTreeDeltaHandler(): boolean {\n\t\treturn this._handler !== undefined;\n\t}\n\n\tpublic process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void {\n\t\t// This allows us to process the migrate op and prevent the shared object from processing the wrong ops\n\t\t// Drop v1 ops\n\t\tassert(this.hasTreeDeltaHandler(), 0x831 /* Can't process ops before attaching tree handler */);\n\n\t\tif (message.type !== MessageType.Operation) {\n\t\t\treturn;\n\t\t}\n\t\tconst contents = message.contents as IOpContents;\n\t\tif (this.shouldDropOp(contents)) {\n\t\t\treturn;\n\t\t}\n\t\treturn this.handler.process(message, local, localOpMetadata);\n\t}\n\n\t// No idea whether any of the below 4 methods work as expected\n\tpublic setConnectionState(connected: boolean): void {\n\t\treturn this.handler.setConnectionState(connected);\n\t}\n\n\t// Resubmitting v1 ops should fail. We should not be resubmitting v1 ops.\n\tpublic reSubmit(contents: unknown, localOpMetadata: unknown): void {\n\t\tassert(\n\t\t\t!this.shouldDropOp(contents as IOpContents),\n\t\t\t0x832 /* Should not be able to rollback v1 ops as they shouldn't have been created locally. */\n\t\t);\n\t\treturn this.handler.reSubmit(contents, localOpMetadata);\n\t}\n\n\t// We are not capable of applying stashed v1 ops.\n\tpublic applyStashedOp(contents: unknown): void {\n\t\tassert(\n\t\t\t!this.shouldDropOp(contents as IOpContents),\n\t\t\t0x8ab /* SharedTreeShim should not be able to apply v1 ops as they shouldn't have been created locally. */\n\t\t);\n\t\tthis.handler.applyStashedOp(contents);\n\t}\n\n\t/**\n\t * We cannot rollback v1 ops, we have already migrated and are in v2 state, thus we should not be able to generate.\n\t * v1 ops\n\t */\n\tpublic rollback?(contents: unknown, localOpMetadata: unknown): void {\n\t\tassert(\n\t\t\t!this.shouldDropOp(contents as IOpContents),\n\t\t\t0x833 /* Should not be able to rollback v1 ops as they shouldn't have been created locally. */\n\t\t);\n\t\treturn this.handler.rollback?.(contents, localOpMetadata);\n\t}\n\n\t/**\n\t * The SharedTreeShimDeltaHandler is already in a v2 state. Thus it should drop all v1 and migrate ops.\n\t * @param contents - the interrogable op contents to figure out if this is a v1 op, a migrate op, or a v2 op.\n\t * @returns whether or not the op is a v1 or migrate op and should be dropped/ignored.\n\t */\n\tprivate shouldDropOp(contents: IOpContents): boolean {\n\t\tif (!isStampedOp(contents)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Don't drop v2 ops in v2 state\n\t\tassert(\n\t\t\tattributesMatch(contents.fluidMigrationStamp, this.attributes),\n\t\t\t0x834 /* Unexpected v2 op with mismatched attributes */\n\t\t);\n\t\treturn false;\n\t}\n}\n"]}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { type ITree } from '@fluidframework/tree';
6
6
  import { type IChannel, type IChannelAttributes, type IChannelServices, type IDeltaHandler } from '@fluidframework/datastore-definitions';
7
- import { type SharedTree as LegacySharedTree } from '../SharedTree';
7
+ import { type SharedTree as LegacySharedTree } from '../SharedTree.js';
8
8
  import { type IMigrationOp } from './migrationShim.js';
9
9
  /**
10
10
  * An interface for a shim delta handler intercepts another delta handler.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/migration-shim/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EACN,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,KAAK,UAAU,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACvD;;;OAGG;IACH,sBAAsB,CAAC,gBAAgB,EAAE,aAAa,GAAG,IAAI,CAAC;IAE9D;;;OAGG;IACH,mBAAmB,IAAI,OAAO,CAAC;IAE/B,QAAQ,EAAE,OAAO,CAAC;IAElB,YAAY,IAAI,IAAI,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,mBAAmB,CAAC,EAAE,kBAAkB,CAAC;IACzC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC,mBAAmB,EAAE,kBAAkB,CAAC;IACxC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAChC;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,YAAY,CAAC;AAE/E;;;;GAIG;AACH,MAAM,WAAW,KAAM,SAAQ,QAAQ;IACtC,MAAM,IAAI,IAAI,CAAC;IACf,IAAI,CAAC,eAAe,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC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K,GAAG,gBAAgB,CAAC;CACtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/migration-shim/types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ITree } from '@fluidframework/tree';\nimport {\n\ttype IChannel,\n\ttype IChannelAttributes,\n\ttype IChannelServices,\n\ttype IDeltaHandler,\n} from '@fluidframework/datastore-definitions';\nimport { type SharedTree as LegacySharedTree } from '../SharedTree';\nimport { type IMigrationOp } from './migrationShim.js';\n\n/**\n * An interface for a shim delta handler intercepts another delta handler.\n *\n * @internal\n */\nexport interface IShimDeltaHandler extends IDeltaHandler {\n\t/**\n\t * Provide the real tree delta handler (either legacy or new) to the shim that will be used to process the tree ops.\n\t * @param treeDeltaHandler - The appropriate tree delta handler.\n\t */\n\tattachTreeDeltaHandler(treeDeltaHandler: IDeltaHandler): void;\n\n\t/**\n\t * The delta handler needs to be attached to the IShimDeltaHandler before attaching it to the delta connection.\n\t * Otherwise the IShimDeltaHandler will not be able to process ops.\n\t */\n\thasTreeDeltaHandler(): boolean;\n\n\tattached: boolean;\n\n\tmarkAttached(): void;\n}\n\n/**\n * A v1 op or a v2 unstamped op\n */\nexport interface IUnstampedContents {\n\tfluidMigrationStamp?: IChannelAttributes;\n\t[key: string | number]: unknown;\n}\n\n/**\n * A v2 op will have a `fluidMigrationStamp` property. This is a type guard to check if the op is a v2 op.\n */\nexport interface IStampedContents {\n\tfluidMigrationStamp: IChannelAttributes;\n\t[key: string | number]: unknown;\n}\n\n/**\n * A type for interrogating ops to see if they are v2 stamped ops or migrate ops. Otherwise, we try not to care\n * what the contents of the op are. The contents could be of type `any` or `unknown`.\n *\n * If `type` specifically === \"barrier\", then we know we are dealing with a barrier op\n *\n * If `fluidMigrationStamp` is present, then we know we are dealing with a v2 op\n *\n * @internal\n */\nexport type IOpContents = IStampedContents | IUnstampedContents | IMigrationOp;\n\n/**\n * An interface for a shim channel that intercepts a LegacySharedTree or new SharedTree DDS.\n *\n * @internal\n */\nexport interface IShim extends IChannel {\n\tcreate(): void;\n\tload(channelServices: IChannelServices): Promise<void>;\n\tcurrentTree: ITree | LegacySharedTree;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/migration-shim/types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ITree } from '@fluidframework/tree';\nimport {\n\ttype IChannel,\n\ttype IChannelAttributes,\n\ttype IChannelServices,\n\ttype IDeltaHandler,\n} from '@fluidframework/datastore-definitions';\nimport { type SharedTree as LegacySharedTree } from '../SharedTree.js';\nimport { type IMigrationOp } from './migrationShim.js';\n\n/**\n * An interface for a shim delta handler intercepts another delta handler.\n *\n * @internal\n */\nexport interface IShimDeltaHandler extends IDeltaHandler {\n\t/**\n\t * Provide the real tree delta handler (either legacy or new) to the shim that will be used to process the tree ops.\n\t * @param treeDeltaHandler - The appropriate tree delta handler.\n\t */\n\tattachTreeDeltaHandler(treeDeltaHandler: IDeltaHandler): void;\n\n\t/**\n\t * The delta handler needs to be attached to the IShimDeltaHandler before attaching it to the delta connection.\n\t * Otherwise the IShimDeltaHandler will not be able to process ops.\n\t */\n\thasTreeDeltaHandler(): boolean;\n\n\tattached: boolean;\n\n\tmarkAttached(): void;\n}\n\n/**\n * A v1 op or a v2 unstamped op\n */\nexport interface IUnstampedContents {\n\tfluidMigrationStamp?: IChannelAttributes;\n\t[key: string | number]: unknown;\n}\n\n/**\n * A v2 op will have a `fluidMigrationStamp` property. This is a type guard to check if the op is a v2 op.\n */\nexport interface IStampedContents {\n\tfluidMigrationStamp: IChannelAttributes;\n\t[key: string | number]: unknown;\n}\n\n/**\n * A type for interrogating ops to see if they are v2 stamped ops or migrate ops. Otherwise, we try not to care\n * what the contents of the op are. The contents could be of type `any` or `unknown`.\n *\n * If `type` specifically === \"barrier\", then we know we are dealing with a barrier op\n *\n * If `fluidMigrationStamp` is present, then we know we are dealing with a v2 op\n *\n * @internal\n */\nexport type IOpContents = IStampedContents | IUnstampedContents | IMigrationOp;\n\n/**\n * An interface for a shim channel that intercepts a LegacySharedTree or new SharedTree DDS.\n *\n * @internal\n */\nexport interface IShim extends IChannel {\n\tcreate(): void;\n\tload(channelServices: IChannelServices): Promise<void>;\n\tcurrentTree: ITree | LegacySharedTree;\n}\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import type { EditId, Definition, NodeId, StableNodeId, TraitLabel, DetachedSequenceId, UuidString } from '../Identifiers';
5
+ import type { EditId, Definition, NodeId, StableNodeId, TraitLabel, DetachedSequenceId, UuidString } from '../Identifiers.js';
6
6
  /**
7
7
  * Defines a place relative to sibling.
8
8
  * The "outside" of a trait is the `undefined` sibling,
@@ -1 +1 @@
1
- {"version":3,"file":"0.0.2.d.ts","sourceRoot":"","sources":["../../src/persisted-types/0.0.2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,MAAM,EACN,UAAU,EACV,MAAM,EACN,YAAY,EACZ,UAAU,EACV,kBAAkB,EAClB,UAAU,EACV,MAAM,gBAAgB,CAAC;AAExB;;;;;;;;;;;;;;;;;;GAkBG;AACH,oBAAY,IAAI;IACf,MAAM,IAAI;IACV,KAAK,IAAI;CACT;AAED;;;;GAIG;AACH,MAAM,WAAW,IAAI,CAAC,OAAO,CAAE,SAAQ,QAAQ,CAAC,OAAO,CAAC;IACvD;;;OAGG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa,CAAC,OAAO,CAAE,SAAQ,QAAQ,CAAC,OAAO,C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iFAAiB,CAAA;IAEjB;;;OAGG;IACH,uEAAY,CAAA;IAEZ;;;OAGG;IACH,mEAAU,CAAA;AACX,CAAC,EAjBW,gBAAgB,gCAAhB,gBAAgB,QAiB3B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tEditId,\n\tDefinition,\n\tNodeId,\n\tStableNodeId,\n\tTraitLabel,\n\tDetachedSequenceId,\n\tUuidString,\n} from '../Identifiers';\n\n/**\n * Defines a place relative to sibling.\n * The \"outside\" of a trait is the `undefined` sibling,\n * so After `undefined` is the beginning of the trait, and before `undefined` is the end.\n *\n * For this purpose, traits look like:\n *\n * `{undefined} - {Node 0} - {Node 1} - ... - {Node N} - {undefined}`\n *\n * Each `{value}` in the diagram is a possible sibling, which is either a Node or undefined.\n * Each `-` in the above diagram is a `Place`, and can be describe as being `After` a particular `{sibling}` or `Before` it.\n * This means that `After` `{undefined}` means the same `Place` as before the first node\n * and `Before` `{undefined}` means the `Place` after the last Node.\n *\n * Each place can be specified, (aka 'anchored') in two ways (relative to the sibling before or after):\n * the choice of which way to anchor a place only matters when the kept across an edit, and thus evaluated in multiple contexts where the\n * two place description may no longer evaluate to the same place.\n * @alpha\n */\nexport enum Side {\n\tBefore = 0,\n\tAfter = 1,\n}\n\n/**\n * A collection of changes to the tree that are applied atomically along with a unique identifier for the edit.\n * If any individual change fails to apply, the entire Edit will fail to apply.\n * @alpha\n */\nexport interface Edit<TChange> extends EditBase<TChange> {\n\t/**\n\t * Unique identifier for this edit. Must never be reused.\n\t * Used for referencing and de-duplicating edits.\n\t */\n\treadonly id: EditId;\n}\n\n/**\n * A collection of changes to the tree that are applied atomically. If any individual change fails to apply,\n * the entire Edit will fail to apply.\n * @internal\n */\nexport interface EditWithoutId<TChange> extends EditBase<TChange> {\n\t/**\n\t * Used to explicitly state that EditWithoutId cannot contain an id and prevents type Edit from being assigned to type EditWithoutId.\n\t */\n\treadonly id?: never;\n}\n\n/**\n * The information included in an edit.\n * @alpha\n */\nexport interface EditBase<TChange> {\n\t/**\n\t * Actual changes to apply.\n\t * Applied in order as part of a single transaction.\n\t */\n\treadonly changes: readonly TChange[];\n\n\t/**\n\t * For edits which are being re-issued due to a conflict, the number of times this edit has already been attempted.\n\t * Undefined means 0.\n\t */\n\treadonly pastAttemptCount?: number;\n\n\t// Add more metadata fields as needed in the future.\n\t// Include \"high level\"/\"Domain Specific\"/\"Hierarchal\" edits for application/domain use in implementing domain aware merge heuristics.\n}\n\n/**\n * Json compatible representation of a payload storing arbitrary Serializable data.\n *\n * Keys starting with \"IFluid\" are reserved for special use such as the JavaScript feature detection pattern and should not be used.\n *\n * See {@link comparePayloads} for equality semantics and related details (like what is allowed to be lost when serializing)\n *\n * TODO:#51984: Allow opting into heuristic blobbing in snapshots with a special IFluid key.\n * @alpha\n */\nexport type Payload = any;\n\n/**\n * Json compatible map as object.\n * Keys are TraitLabels,\n * Values are the content of the trait specified by the key.\n * @alpha\n */\nexport interface TraitMap<TChild> {\n\treadonly [key: string]: TreeNodeSequence<TChild>;\n}\n\n/**\n * A sequence of Nodes that make up a trait under a Node\n * @alpha\n */\nexport type TreeNodeSequence<TChild> = readonly TChild[];\n\n/**\n * An object which may have traits with children of the given type underneath it\n * @alpha\n */\nexport interface HasTraits<TChild> {\n\treadonly traits: TraitMap<TChild>;\n}\n\n/**\n * The fields required by a node in a tree\n * @alpha\n */\nexport interface NodeData<TId> {\n\t/**\n\t * A payload of arbitrary serializable data\n\t */\n\treadonly payload?: Payload;\n\n\t/**\n\t * The meaning of this node.\n\t * Provides contexts/semantics for this node and its content.\n\t * Typically use to associate a node with metadata (including a schema) and source code (types, behaviors, etc).\n\t */\n\treadonly definition: Definition;\n\t/**\n\t * Identifier which can be used to refer to this Node.\n\t */\n\treadonly identifier: TId;\n}\n\n/**\n * Satisfies `NodeData` and may contain children under traits (which may or may not be `TreeNodes`)\n * @alpha\n */\nexport interface TreeNode<TChild, TId> extends NodeData<TId>, HasTraits<TChild> {}\n\n/**\n * A tree whose nodes are either TreeNodes or a placeholder\n * @internal\n */\nexport type PlaceholderTree<TPlaceholder = never> = TreeNode<PlaceholderTree<TPlaceholder>, NodeId> | TPlaceholder;\n\n/**\n * Specifies the location of a trait (a labeled sequence of nodes) within the tree.\n * @alpha\n */\nexport interface TraitLocationInternal_0_0_2 {\n\treadonly parent: StableNodeId;\n\treadonly label: TraitLabel;\n}\n\n/**\n * JSON-compatible Node type. Objects of this type will be persisted in internal change objects (under Edits) in the SharedTree history.\n * @alpha\n */\nexport type ChangeNode_0_0_2 = TreeNode<ChangeNode_0_0_2, StableNodeId>;\n\n/**\n * The status code of an attempt to apply the changes in an Edit.\n * @alpha\n */\nexport enum EditStatus {\n\t/**\n\t * The edit contained one or more malformed changes (e.g. was missing required fields such as `id`),\n\t * or contained a sequence of changes that could not possibly be applied sequentially without error\n\t * (e.g. an edit which tries to insert the same detached node twice).\n\t */\n\tMalformed,\n\t/**\n\t * The edit contained a well-formed sequence of changes that couldn't be applied to the current view,\n\t * generally because concurrent changes caused one or more merge conflicts.\n\t */\n\tInvalid,\n\t/**\n\t * The edit was applied to the current view successfully.\n\t */\n\tApplied,\n}\n\n/**\n * Types of ops handled by SharedTree.\n */\nexport enum SharedTreeOpType {\n\t/** An op that includes edit information. */\n\tEdit,\n\t/** Includes a Fluid handle that corresponds to an edit chunk. */\n\tHandle,\n\t/** An op that does not affect the tree's state. */\n\tNoOp,\n\t/** Signals that SharedTree contents should be updated to match a new write format. */\n\tUpdate,\n}\n\n/**\n * SharedTreeOp containing a version stamp marking the write format of the tree which submitted it.\n */\nexport interface VersionedOp<Version extends WriteFormat = WriteFormat> {\n\t/** The supported SharedTree write version, see {@link WriteFormat}. */\n\treadonly version: Version;\n}\n\n/**\n * Requirements for SharedTree ops.\n */\nexport type SharedTreeOp_0_0_2 = SharedTreeEditOp_0_0_2 | SharedTreeNoOp | SharedTreeUpdateOp;\n\n/**\n * Op which has no application semantics. This op can be useful for triggering other\n */\nexport interface SharedTreeNoOp extends VersionedOp {\n\treadonly type: SharedTreeOpType.NoOp;\n}\n\n/**\n * Op indicating this SharedTree should upgrade its write format to the specified version.\n * The `version` field of this op reflects the version which should be upgraded to, not\n * the current version.\n * See docs/Breaking-Change-Migration.md for more details on the semantics of this op.\n */\nexport interface SharedTreeUpdateOp extends VersionedOp {\n\treadonly type: SharedTreeOpType.Update;\n}\n\n/**\n * A SharedTree op that includes edit information, and optionally a list of interned strings.\n */\nexport interface SharedTreeEditOp_0_0_2 extends VersionedOp<WriteFormat.v0_0_2> {\n\treadonly type: SharedTreeOpType.Edit;\n\t/** The collection of changes to apply. */\n\treadonly edit: Edit<ChangeInternal_0_0_2>;\n}\n\n/**\n * Format versions that SharedTree supports writing. Changes to op or summary formats necessitate updates.\n * @alpha\n */\nexport enum WriteFormat {\n\t/** Stores all edits in their raw format. */\n\tv0_0_2 = '0.0.2',\n\t/** Supports history virtualization, tree compression, string interning, and makes currentView optional. */\n\tv0_1_1 = '0.1.1',\n}\n\n/**\n * The minimal information on a SharedTree summary. Contains the summary format version.\n * @alpha\n */\nexport interface SharedTreeSummaryBase {\n\t/**\n\t * Field on summary under which version is stored.\n\t */\n\treadonly version: WriteFormat;\n}\n\n/**\n * Legacy summary format currently still used for writing.\n * TODO:#49901: Remove export when this format is no longer written.\n * @internal\n */\nexport interface SharedTreeSummary_0_0_2 extends SharedTreeSummaryBase {\n\treadonly version: WriteFormat.v0_0_2;\n\n\treadonly currentTree: ChangeNode_0_0_2;\n\t/**\n\t * A list of edits.\n\t */\n\treadonly sequencedEdits: readonly Edit<ChangeInternal_0_0_2>[];\n}\n\n/**\n * {@inheritdoc ChangeType}\n * @alpha\n */\nexport enum ChangeTypeInternal {\n\tInsert,\n\tDetach,\n\tBuild,\n\tSetValue,\n\tConstraint,\n\tCompressedBuild,\n}\n\n/**\n * {@inheritdoc (Change:type)}\n * @public\n */\nexport type ChangeInternal_0_0_2 =\n\t| InsertInternal_0_0_2\n\t| DetachInternal_0_0_2\n\t| BuildInternal_0_0_2\n\t| SetValueInternal_0_0_2\n\t| ConstraintInternal_0_0_2;\n\n/**\n * {@inheritdoc BuildNode}\n * @alpha\n */\nexport type BuildNodeInternal_0_0_2 = TreeNode<BuildNodeInternal_0_0_2, StableNodeId> | DetachedSequenceId;\n\n/**\n * {@inheritdoc Build}\n * @alpha\n */\nexport interface BuildInternal_0_0_2 {\n\t/** {@inheritdoc Build.destination } */\n\treadonly destination: DetachedSequenceId;\n\t/** {@inheritdoc Build.source } */\n\treadonly source: TreeNodeSequence<BuildNodeInternal_0_0_2>;\n\t/** {@inheritdoc Build.\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.Build;\n}\n\n/**\n * {@inheritdoc (Insert:interface)}\n * @alpha\n */\nexport interface InsertInternal_0_0_2 {\n\t/** {@inheritdoc (Insert:interface).destination } */\n\treadonly destination: StablePlaceInternal_0_0_2;\n\t/** {@inheritdoc (Insert:interface).source } */\n\treadonly source: DetachedSequenceId;\n\t/** {@inheritdoc (Insert:interface).\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.Insert;\n}\n\n/**\n * {@inheritdoc Detach}\n * @alpha\n */\nexport interface DetachInternal_0_0_2 {\n\t/** {@inheritdoc Detach.destination } */\n\treadonly destination?: DetachedSequenceId;\n\t/** {@inheritdoc Detach.source } */\n\treadonly source: StableRangeInternal_0_0_2;\n\t/** {@inheritdoc Detach.\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.Detach;\n}\n\n/**\n * {@inheritdoc SetValue}\n * @alpha\n */\nexport interface SetValueInternal_0_0_2 {\n\t/** {@inheritdoc SetValue.nodeToModify } */\n\treadonly nodeToModify: StableNodeId;\n\t/** {@inheritdoc SetValue.payload } */\n\t// eslint-disable-next-line @rushstack/no-new-null\n\treadonly payload: Payload | null;\n\t/** {@inheritdoc SetValue.\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.SetValue;\n}\n\n/**\n * What to do when a Constraint is violated.\n * @alpha\n */\nexport enum ConstraintEffect {\n\t/**\n\t * Discard Edit.\n\t */\n\tInvalidAndDiscard,\n\n\t/**\n\t * Discard Edit, but record metadata that application may want to try and recover this change by recreating it.\n\t * Should this be the default policy for when another (non Constraint) change is invalid?\n\t */\n\tInvalidRetry,\n\n\t/**\n\t * Apply the change, but flag it for possible reconsideration by the app\n\t * (applying it is better than not, but perhaps the high level logic could produce something better).\n\t */\n\tValidRetry,\n}\n\n/**\n * {@inheritdoc Constraint}\n * @alpha\n */\nexport interface ConstraintInternal_0_0_2 {\n\t/** {@inheritdoc Constraint.toConstrain } */\n\treadonly toConstrain: StableRangeInternal_0_0_2;\n\t/** {@inheritdoc Constraint.identityHash } */\n\treadonly identityHash?: UuidString;\n\t/** {@inheritdoc Constraint.length } */\n\treadonly length?: number;\n\t/** {@inheritdoc Constraint.contentHash } */\n\treadonly contentHash?: UuidString;\n\t/** {@inheritdoc Constraint.parentNode } */\n\treadonly parentNode?: StableNodeId;\n\t/** {@inheritdoc Constraint.label } */\n\treadonly label?: TraitLabel;\n\t/** {@inheritdoc Constraint.effect } */\n\treadonly effect: ConstraintEffect;\n\t/** {@inheritdoc Constraint.\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.Constraint;\n}\n\n/**\n * {@inheritdoc (StablePlace:interface) }\n * @alpha\n */\nexport interface StablePlaceInternal_0_0_2 {\n\t/**\n\t * {@inheritdoc (StablePlace:interface).side }\n\t */\n\treadonly side: Side;\n\n\t/**\n\t * {@inheritdoc (StablePlace:interface).referenceSibling }\n\t */\n\treadonly referenceSibling?: StableNodeId;\n\n\t/**\n\t * {@inheritdoc (StablePlace:interface).referenceTrait }\n\t */\n\treadonly referenceTrait?: TraitLocationInternal_0_0_2;\n}\n\n/**\n * {@inheritdoc (StableRange:interface) }\n * @alpha\n */\nexport interface StableRangeInternal_0_0_2 {\n\t/** {@inheritdoc (StableRange:interface).start } */\n\treadonly start: StablePlaceInternal_0_0_2;\n\t/** {@inheritdoc (StableRange:interface).end } */\n\treadonly end: StablePlaceInternal_0_0_2;\n}\n"]}
1
+ {"version":3,"file":"0.0.2.js","sourceRoot":"","sources":["../../src/persisted-types/0.0.2.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAYH;;;;;;;;;;;;;;;;;;GAkBG;AACH,IAAY,IAGX;AAHD,WAAY,IAAI;IACf,mCAAU,CAAA;IACV,iCAAS,CAAA;AACV,CAAC,EAHW,IAAI,oBAAJ,IAAI,QAGf;AAqID;;;GAGG;AACH,IAAY,UAgBX;AAhBD,WAAY,UAAU;IACrB;;;;OAIG;IACH,qDAAS,CAAA;IACT;;;OAGG;IACH,iDAAO,CAAA;IACP;;OAEG;IACH,iDAAO,CAAA;AACR,CAAC,EAhBW,UAAU,0BAAV,UAAU,QAgBrB;AAED;;GAEG;AACH,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC3B,4CAA4C;IAC5C,uDAAI,CAAA;IACJ,iEAAiE;IACjE,2DAAM,CAAA;IACN,mDAAmD;IACnD,uDAAI,CAAA;IACJ,sFAAsF;IACtF,2DAAM,CAAA;AACP,CAAC,EATW,gBAAgB,gCAAhB,gBAAgB,QAS3B;AAyCD;;;GAGG;AACH,IAAY,WAKX;AALD,WAAY,WAAW;IACtB,4CAA4C;IAC5C,+BAAgB,CAAA;IAChB,2GAA2G;IAC3G,+BAAgB,CAAA;AACjB,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AA4BD;;;GAGG;AACH,IAAY,kBAOX;AAPD,WAAY,kBAAkB;IAC7B,+DAAM,CAAA;IACN,+DAAM,CAAA;IACN,6DAAK,CAAA;IACL,mEAAQ,CAAA;IACR,uEAAU,CAAA;IACV,iFAAe,CAAA;AAChB,CAAC,EAPW,kBAAkB,kCAAlB,kBAAkB,QAO7B;AAwED;;;GAGG;AACH,IAAY,gBAiBX;AAjBD,WAAY,gBAAgB;IAC3B;;OAEG;IACH,iFAAiB,CAAA;IAEjB;;;OAGG;IACH,uEAAY,CAAA;IAEZ;;;OAGG;IACH,mEAAU,CAAA;AACX,CAAC,EAjBW,gBAAgB,gCAAhB,gBAAgB,QAiB3B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tEditId,\n\tDefinition,\n\tNodeId,\n\tStableNodeId,\n\tTraitLabel,\n\tDetachedSequenceId,\n\tUuidString,\n} from '../Identifiers.js';\n\n/**\n * Defines a place relative to sibling.\n * The \"outside\" of a trait is the `undefined` sibling,\n * so After `undefined` is the beginning of the trait, and before `undefined` is the end.\n *\n * For this purpose, traits look like:\n *\n * `{undefined} - {Node 0} - {Node 1} - ... - {Node N} - {undefined}`\n *\n * Each `{value}` in the diagram is a possible sibling, which is either a Node or undefined.\n * Each `-` in the above diagram is a `Place`, and can be describe as being `After` a particular `{sibling}` or `Before` it.\n * This means that `After` `{undefined}` means the same `Place` as before the first node\n * and `Before` `{undefined}` means the `Place` after the last Node.\n *\n * Each place can be specified, (aka 'anchored') in two ways (relative to the sibling before or after):\n * the choice of which way to anchor a place only matters when the kept across an edit, and thus evaluated in multiple contexts where the\n * two place description may no longer evaluate to the same place.\n * @alpha\n */\nexport enum Side {\n\tBefore = 0,\n\tAfter = 1,\n}\n\n/**\n * A collection of changes to the tree that are applied atomically along with a unique identifier for the edit.\n * If any individual change fails to apply, the entire Edit will fail to apply.\n * @alpha\n */\nexport interface Edit<TChange> extends EditBase<TChange> {\n\t/**\n\t * Unique identifier for this edit. Must never be reused.\n\t * Used for referencing and de-duplicating edits.\n\t */\n\treadonly id: EditId;\n}\n\n/**\n * A collection of changes to the tree that are applied atomically. If any individual change fails to apply,\n * the entire Edit will fail to apply.\n * @internal\n */\nexport interface EditWithoutId<TChange> extends EditBase<TChange> {\n\t/**\n\t * Used to explicitly state that EditWithoutId cannot contain an id and prevents type Edit from being assigned to type EditWithoutId.\n\t */\n\treadonly id?: never;\n}\n\n/**\n * The information included in an edit.\n * @alpha\n */\nexport interface EditBase<TChange> {\n\t/**\n\t * Actual changes to apply.\n\t * Applied in order as part of a single transaction.\n\t */\n\treadonly changes: readonly TChange[];\n\n\t/**\n\t * For edits which are being re-issued due to a conflict, the number of times this edit has already been attempted.\n\t * Undefined means 0.\n\t */\n\treadonly pastAttemptCount?: number;\n\n\t// Add more metadata fields as needed in the future.\n\t// Include \"high level\"/\"Domain Specific\"/\"Hierarchal\" edits for application/domain use in implementing domain aware merge heuristics.\n}\n\n/**\n * Json compatible representation of a payload storing arbitrary Serializable data.\n *\n * Keys starting with \"IFluid\" are reserved for special use such as the JavaScript feature detection pattern and should not be used.\n *\n * See {@link comparePayloads} for equality semantics and related details (like what is allowed to be lost when serializing)\n *\n * TODO:#51984: Allow opting into heuristic blobbing in snapshots with a special IFluid key.\n * @alpha\n */\nexport type Payload = any;\n\n/**\n * Json compatible map as object.\n * Keys are TraitLabels,\n * Values are the content of the trait specified by the key.\n * @alpha\n */\nexport interface TraitMap<TChild> {\n\treadonly [key: string]: TreeNodeSequence<TChild>;\n}\n\n/**\n * A sequence of Nodes that make up a trait under a Node\n * @alpha\n */\nexport type TreeNodeSequence<TChild> = readonly TChild[];\n\n/**\n * An object which may have traits with children of the given type underneath it\n * @alpha\n */\nexport interface HasTraits<TChild> {\n\treadonly traits: TraitMap<TChild>;\n}\n\n/**\n * The fields required by a node in a tree\n * @alpha\n */\nexport interface NodeData<TId> {\n\t/**\n\t * A payload of arbitrary serializable data\n\t */\n\treadonly payload?: Payload;\n\n\t/**\n\t * The meaning of this node.\n\t * Provides contexts/semantics for this node and its content.\n\t * Typically use to associate a node with metadata (including a schema) and source code (types, behaviors, etc).\n\t */\n\treadonly definition: Definition;\n\t/**\n\t * Identifier which can be used to refer to this Node.\n\t */\n\treadonly identifier: TId;\n}\n\n/**\n * Satisfies `NodeData` and may contain children under traits (which may or may not be `TreeNodes`)\n * @alpha\n */\nexport interface TreeNode<TChild, TId> extends NodeData<TId>, HasTraits<TChild> {}\n\n/**\n * A tree whose nodes are either TreeNodes or a placeholder\n * @internal\n */\nexport type PlaceholderTree<TPlaceholder = never> = TreeNode<PlaceholderTree<TPlaceholder>, NodeId> | TPlaceholder;\n\n/**\n * Specifies the location of a trait (a labeled sequence of nodes) within the tree.\n * @alpha\n */\nexport interface TraitLocationInternal_0_0_2 {\n\treadonly parent: StableNodeId;\n\treadonly label: TraitLabel;\n}\n\n/**\n * JSON-compatible Node type. Objects of this type will be persisted in internal change objects (under Edits) in the SharedTree history.\n * @alpha\n */\nexport type ChangeNode_0_0_2 = TreeNode<ChangeNode_0_0_2, StableNodeId>;\n\n/**\n * The status code of an attempt to apply the changes in an Edit.\n * @alpha\n */\nexport enum EditStatus {\n\t/**\n\t * The edit contained one or more malformed changes (e.g. was missing required fields such as `id`),\n\t * or contained a sequence of changes that could not possibly be applied sequentially without error\n\t * (e.g. an edit which tries to insert the same detached node twice).\n\t */\n\tMalformed,\n\t/**\n\t * The edit contained a well-formed sequence of changes that couldn't be applied to the current view,\n\t * generally because concurrent changes caused one or more merge conflicts.\n\t */\n\tInvalid,\n\t/**\n\t * The edit was applied to the current view successfully.\n\t */\n\tApplied,\n}\n\n/**\n * Types of ops handled by SharedTree.\n */\nexport enum SharedTreeOpType {\n\t/** An op that includes edit information. */\n\tEdit,\n\t/** Includes a Fluid handle that corresponds to an edit chunk. */\n\tHandle,\n\t/** An op that does not affect the tree's state. */\n\tNoOp,\n\t/** Signals that SharedTree contents should be updated to match a new write format. */\n\tUpdate,\n}\n\n/**\n * SharedTreeOp containing a version stamp marking the write format of the tree which submitted it.\n */\nexport interface VersionedOp<Version extends WriteFormat = WriteFormat> {\n\t/** The supported SharedTree write version, see {@link WriteFormat}. */\n\treadonly version: Version;\n}\n\n/**\n * Requirements for SharedTree ops.\n */\nexport type SharedTreeOp_0_0_2 = SharedTreeEditOp_0_0_2 | SharedTreeNoOp | SharedTreeUpdateOp;\n\n/**\n * Op which has no application semantics. This op can be useful for triggering other\n */\nexport interface SharedTreeNoOp extends VersionedOp {\n\treadonly type: SharedTreeOpType.NoOp;\n}\n\n/**\n * Op indicating this SharedTree should upgrade its write format to the specified version.\n * The `version` field of this op reflects the version which should be upgraded to, not\n * the current version.\n * See docs/Breaking-Change-Migration.md for more details on the semantics of this op.\n */\nexport interface SharedTreeUpdateOp extends VersionedOp {\n\treadonly type: SharedTreeOpType.Update;\n}\n\n/**\n * A SharedTree op that includes edit information, and optionally a list of interned strings.\n */\nexport interface SharedTreeEditOp_0_0_2 extends VersionedOp<WriteFormat.v0_0_2> {\n\treadonly type: SharedTreeOpType.Edit;\n\t/** The collection of changes to apply. */\n\treadonly edit: Edit<ChangeInternal_0_0_2>;\n}\n\n/**\n * Format versions that SharedTree supports writing. Changes to op or summary formats necessitate updates.\n * @alpha\n */\nexport enum WriteFormat {\n\t/** Stores all edits in their raw format. */\n\tv0_0_2 = '0.0.2',\n\t/** Supports history virtualization, tree compression, string interning, and makes currentView optional. */\n\tv0_1_1 = '0.1.1',\n}\n\n/**\n * The minimal information on a SharedTree summary. Contains the summary format version.\n * @alpha\n */\nexport interface SharedTreeSummaryBase {\n\t/**\n\t * Field on summary under which version is stored.\n\t */\n\treadonly version: WriteFormat;\n}\n\n/**\n * Legacy summary format currently still used for writing.\n * TODO:#49901: Remove export when this format is no longer written.\n * @internal\n */\nexport interface SharedTreeSummary_0_0_2 extends SharedTreeSummaryBase {\n\treadonly version: WriteFormat.v0_0_2;\n\n\treadonly currentTree: ChangeNode_0_0_2;\n\t/**\n\t * A list of edits.\n\t */\n\treadonly sequencedEdits: readonly Edit<ChangeInternal_0_0_2>[];\n}\n\n/**\n * {@inheritdoc ChangeType}\n * @alpha\n */\nexport enum ChangeTypeInternal {\n\tInsert,\n\tDetach,\n\tBuild,\n\tSetValue,\n\tConstraint,\n\tCompressedBuild,\n}\n\n/**\n * {@inheritdoc (Change:type)}\n * @public\n */\nexport type ChangeInternal_0_0_2 =\n\t| InsertInternal_0_0_2\n\t| DetachInternal_0_0_2\n\t| BuildInternal_0_0_2\n\t| SetValueInternal_0_0_2\n\t| ConstraintInternal_0_0_2;\n\n/**\n * {@inheritdoc BuildNode}\n * @alpha\n */\nexport type BuildNodeInternal_0_0_2 = TreeNode<BuildNodeInternal_0_0_2, StableNodeId> | DetachedSequenceId;\n\n/**\n * {@inheritdoc Build}\n * @alpha\n */\nexport interface BuildInternal_0_0_2 {\n\t/** {@inheritdoc Build.destination } */\n\treadonly destination: DetachedSequenceId;\n\t/** {@inheritdoc Build.source } */\n\treadonly source: TreeNodeSequence<BuildNodeInternal_0_0_2>;\n\t/** {@inheritdoc Build.\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.Build;\n}\n\n/**\n * {@inheritdoc (Insert:interface)}\n * @alpha\n */\nexport interface InsertInternal_0_0_2 {\n\t/** {@inheritdoc (Insert:interface).destination } */\n\treadonly destination: StablePlaceInternal_0_0_2;\n\t/** {@inheritdoc (Insert:interface).source } */\n\treadonly source: DetachedSequenceId;\n\t/** {@inheritdoc (Insert:interface).\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.Insert;\n}\n\n/**\n * {@inheritdoc Detach}\n * @alpha\n */\nexport interface DetachInternal_0_0_2 {\n\t/** {@inheritdoc Detach.destination } */\n\treadonly destination?: DetachedSequenceId;\n\t/** {@inheritdoc Detach.source } */\n\treadonly source: StableRangeInternal_0_0_2;\n\t/** {@inheritdoc Detach.\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.Detach;\n}\n\n/**\n * {@inheritdoc SetValue}\n * @alpha\n */\nexport interface SetValueInternal_0_0_2 {\n\t/** {@inheritdoc SetValue.nodeToModify } */\n\treadonly nodeToModify: StableNodeId;\n\t/** {@inheritdoc SetValue.payload } */\n\t// eslint-disable-next-line @rushstack/no-new-null\n\treadonly payload: Payload | null;\n\t/** {@inheritdoc SetValue.\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.SetValue;\n}\n\n/**\n * What to do when a Constraint is violated.\n * @alpha\n */\nexport enum ConstraintEffect {\n\t/**\n\t * Discard Edit.\n\t */\n\tInvalidAndDiscard,\n\n\t/**\n\t * Discard Edit, but record metadata that application may want to try and recover this change by recreating it.\n\t * Should this be the default policy for when another (non Constraint) change is invalid?\n\t */\n\tInvalidRetry,\n\n\t/**\n\t * Apply the change, but flag it for possible reconsideration by the app\n\t * (applying it is better than not, but perhaps the high level logic could produce something better).\n\t */\n\tValidRetry,\n}\n\n/**\n * {@inheritdoc Constraint}\n * @alpha\n */\nexport interface ConstraintInternal_0_0_2 {\n\t/** {@inheritdoc Constraint.toConstrain } */\n\treadonly toConstrain: StableRangeInternal_0_0_2;\n\t/** {@inheritdoc Constraint.identityHash } */\n\treadonly identityHash?: UuidString;\n\t/** {@inheritdoc Constraint.length } */\n\treadonly length?: number;\n\t/** {@inheritdoc Constraint.contentHash } */\n\treadonly contentHash?: UuidString;\n\t/** {@inheritdoc Constraint.parentNode } */\n\treadonly parentNode?: StableNodeId;\n\t/** {@inheritdoc Constraint.label } */\n\treadonly label?: TraitLabel;\n\t/** {@inheritdoc Constraint.effect } */\n\treadonly effect: ConstraintEffect;\n\t/** {@inheritdoc Constraint.\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.Constraint;\n}\n\n/**\n * {@inheritdoc (StablePlace:interface) }\n * @alpha\n */\nexport interface StablePlaceInternal_0_0_2 {\n\t/**\n\t * {@inheritdoc (StablePlace:interface).side }\n\t */\n\treadonly side: Side;\n\n\t/**\n\t * {@inheritdoc (StablePlace:interface).referenceSibling }\n\t */\n\treadonly referenceSibling?: StableNodeId;\n\n\t/**\n\t * {@inheritdoc (StablePlace:interface).referenceTrait }\n\t */\n\treadonly referenceTrait?: TraitLocationInternal_0_0_2;\n}\n\n/**\n * {@inheritdoc (StableRange:interface) }\n * @alpha\n */\nexport interface StableRangeInternal_0_0_2 {\n\t/** {@inheritdoc (StableRange:interface).start } */\n\treadonly start: StablePlaceInternal_0_0_2;\n\t/** {@inheritdoc (StableRange:interface).end } */\n\treadonly end: StablePlaceInternal_0_0_2;\n}\n"]}
@@ -2,10 +2,10 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { ReplaceRecursive } from '../Common';
6
- import type { IdCreationRange, SerializedIdCompressorWithNoSession, SerializedIdCompressorWithOngoingSession } from '../id-compressor';
7
- import type { Definition, DetachedSequenceId, EditId, FinalNodeId, InternedStringId, NodeId, OpSpaceNodeId, SessionId, TraitLabel, UuidString } from '../Identifiers';
8
- import { BuildInternal_0_0_2, ChangeTypeInternal, ConstraintEffect, ConstraintInternal_0_0_2, DetachInternal_0_0_2, Edit, EditWithoutId, InsertInternal_0_0_2, NodeData, Payload, SetValueInternal_0_0_2, SharedTreeNoOp, SharedTreeOpType, SharedTreeSummaryBase, SharedTreeUpdateOp, StablePlaceInternal_0_0_2, TraitLocationInternal_0_0_2, TreeNode, TreeNodeSequence, VersionedOp, WriteFormat } from './0.0.2';
5
+ import { ReplaceRecursive } from '../Common.js';
6
+ import type { IdCreationRange, SerializedIdCompressorWithNoSession, SerializedIdCompressorWithOngoingSession } from '../id-compressor/index.js';
7
+ import type { Definition, DetachedSequenceId, EditId, FinalNodeId, InternedStringId, NodeId, OpSpaceNodeId, SessionId, TraitLabel, UuidString } from '../Identifiers.js';
8
+ import { BuildInternal_0_0_2, ChangeTypeInternal, ConstraintEffect, ConstraintInternal_0_0_2, DetachInternal_0_0_2, Edit, EditWithoutId, InsertInternal_0_0_2, NodeData, Payload, SetValueInternal_0_0_2, SharedTreeNoOp, SharedTreeOpType, SharedTreeSummaryBase, SharedTreeUpdateOp, StablePlaceInternal_0_0_2, TraitLocationInternal_0_0_2, TreeNode, TreeNodeSequence, VersionedOp, WriteFormat } from './0.0.2.js';
9
9
  /**
10
10
  * Specifies the location of a trait (a labeled sequence of nodes) within the tree.
11
11
  * @alpha
@@ -1 +1 @@
1
- {"version":3,"file":"0.1.1.d.ts","sourceRoot":"","sources":["../../src/persisted-types/0.1.1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAsB,gBAAg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CAAC,WAAW,CAAC,MAAM,CAAC;IAC1E,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC;IACvC,uDAAuD;IACvD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,+EAA+E;IAC/E,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAC/B;AAED,sFAAsF;AAEtF,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,2CAA2C;AAE3C,eAAO,MAAM,cAAc,WAAsD,CAAC"}
@@ -6,8 +6,8 @@
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.ghostSessionId = exports.reservedIdCount = exports.StableRangeInternal = exports.StablePlaceInternal = exports.ChangeInternal = void 0;
8
8
  const core_utils_1 = require("@fluidframework/core-utils");
9
- const Common_1 = require("../Common");
10
- const _0_0_2_1 = require("./0.0.2");
9
+ const Common_js_1 = require("../Common.js");
10
+ const _0_0_2_js_1 = require("./0.0.2.js");
11
11
  // Note: Documentation of this constant is merged with documentation of the `ChangeInternal` interface.
12
12
  /**
13
13
  * @alpha
@@ -16,28 +16,28 @@ exports.ChangeInternal = {
16
16
  build: (source, destination) => ({
17
17
  destination,
18
18
  source,
19
- type: _0_0_2_1.ChangeTypeInternal.Build,
19
+ type: _0_0_2_js_1.ChangeTypeInternal.Build,
20
20
  }),
21
21
  insert: (source, destination) => ({
22
22
  destination,
23
23
  source,
24
- type: _0_0_2_1.ChangeTypeInternal.Insert,
24
+ type: _0_0_2_js_1.ChangeTypeInternal.Insert,
25
25
  }),
26
26
  detach: (source, destination) => ({
27
27
  destination,
28
28
  source,
29
- type: _0_0_2_1.ChangeTypeInternal.Detach,
29
+ type: _0_0_2_js_1.ChangeTypeInternal.Detach,
30
30
  }),
31
31
  setPayload: (nodeToModify, payload) => ({
32
32
  nodeToModify: getNodeId(nodeToModify),
33
33
  payload,
34
- type: _0_0_2_1.ChangeTypeInternal.SetValue,
34
+ type: _0_0_2_js_1.ChangeTypeInternal.SetValue,
35
35
  }),
36
36
  clearPayload: (nodeToModify) => ({
37
37
  nodeToModify: getNodeId(nodeToModify),
38
38
  // Rationale: 'undefined' is reserved for future use (see 'SetValue' interface above.)
39
39
  payload: null,
40
- type: _0_0_2_1.ChangeTypeInternal.SetValue,
40
+ type: _0_0_2_js_1.ChangeTypeInternal.SetValue,
41
41
  }),
42
42
  constraint: (toConstrain, effect, identityHash, length, contentHash, parentNode, label) => ({
43
43
  toConstrain,
@@ -47,7 +47,7 @@ exports.ChangeInternal = {
47
47
  contentHash,
48
48
  parentNode,
49
49
  label,
50
- type: _0_0_2_1.ChangeTypeInternal.Constraint,
50
+ type: _0_0_2_js_1.ChangeTypeInternal.Constraint,
51
51
  }),
52
52
  /** {@inheritdoc (Change:variable).delete } */
53
53
  delete: (stableRange) => exports.ChangeInternal.detach(stableRange),
@@ -59,7 +59,7 @@ exports.ChangeInternal = {
59
59
  /** {@inheritdoc (Change:variable).move } */
60
60
  move: (source, destination) => {
61
61
  const detach = exports.ChangeInternal.detach(source, 0);
62
- return [detach, exports.ChangeInternal.insert((0, Common_1.assertNotUndefined)(detach.destination), destination)];
62
+ return [detach, exports.ChangeInternal.insert((0, Common_js_1.assertNotUndefined)(detach.destination), destination)];
63
63
  },
64
64
  };
65
65
  /**
@@ -74,28 +74,28 @@ exports.StablePlaceInternal = {
74
74
  * @returns The location directly before `node`.
75
75
  */
76
76
  before: (node) => ({
77
- side: _0_0_2_1.Side.Before,
77
+ side: _0_0_2_js_1.Side.Before,
78
78
  referenceSibling: getNodeId(node),
79
79
  }),
80
80
  /**
81
81
  * @returns The location directly after `node`.
82
82
  */
83
83
  after: (node) => ({
84
- side: _0_0_2_1.Side.After,
84
+ side: _0_0_2_js_1.Side.After,
85
85
  referenceSibling: getNodeId(node),
86
86
  }),
87
87
  /**
88
88
  * @returns The location at the start of `trait`.
89
89
  */
90
90
  atStartOf: (trait) => ({
91
- side: _0_0_2_1.Side.After,
91
+ side: _0_0_2_js_1.Side.After,
92
92
  referenceTrait: trait,
93
93
  }),
94
94
  /**
95
95
  * @returns The location at the end of `trait`.
96
96
  */
97
97
  atEndOf: (trait) => ({
98
- side: _0_0_2_1.Side.Before,
98
+ side: _0_0_2_js_1.Side.Before,
99
99
  referenceTrait: trait,
100
100
  }),
101
101
  };
@@ -1 +1 @@
1
- {"version":3,"file":"0.1.1.js","sourceRoot":"","sources":["../../src/persisted-types/0.1.1.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AACpD,sCAAiE;AAmBjE,oCAuBiB;AAgOjB,uGAAuG;AACvG;;GAEG;AACU,QAAA,cAAc,GAAG;IAC7B,KAAK,EAAE,CAAC,MAA2C,EAAE,WAA+B,EAAiB,EAAE,CAAC,CAAC;QACxG,WAAW;QACX,MAAM;QACN,IAAI,EAAE,2BAAkB,CAAC,KAAK;KAC9B,CAAC;IAEF,MAAM,EAAE,CAAC,MAA0B,EAAE,WAAgC,EAAkB,EAAE,CAAC,CAAC;QAC1F,WAAW;QACX,MAAM;QACN,IAAI,EAAE,2BAAkB,CAAC,MAAM;KAC/B,CAAC;IAEF,MAAM,EAAE,CAAC,MAA2B,EAAE,WAAgC,EAAkB,EAAE,CAAC,CAAC;QAC3F,WAAW;QACX,MAAM;QACN,IAAI,EAAE,2BAAkB,CAAC,MAAM;KAC/B,CAAC;IAEF,UAAU,EAAE,CAAC,YAAuC,EAAE,OAAgB,EAAoB,EAAE,CAAC,CAAC;QAC7F,YAAY,EAAE,SAAS,CAAC,YAAY,CAAC;QACrC,OAAO;QACP,IAAI,EAAE,2BAAkB,CAAC,QAAQ;KACjC,CAAC;IAEF,YAAY,EAAE,CAAC,YAAuC,EAAoB,EAAE,CAAC,CAAC;QAC7E,YAAY,EAAE,SAAS,CAAC,YAAY,CAAC;QACrC,sFAAsF;QACtF,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,2BAAkB,CAAC,QAAQ;KACjC,CAAC;IAEF,UAAU,EAAE,CACX,WAAgC,EAChC,MAAwB,E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CAAC,OAAO,CAAC,KAAK,CAAC;KACvC,CAAC;CACF,CAAC;AA2BF,sFAAsF;AACtF,+BAA+B;AAClB,QAAA,eAAe,GAAG,EAAE,CAAC;AAElC,2CAA2C;AAC3C,8BAA8B;AACjB,QAAA,cAAc,GAAG,sCAAmD,CAAC;AAElF,+EAA+E;AAC/E,SAAS,SAAS,CAAM,IAAyB;IAChD,OAAQ,IAAsB,CAAC,UAAU,IAAK,IAAY,CAAC;AAC5D,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from '@fluidframework/core-utils';\nimport { assertNotUndefined, ReplaceRecursive } from '../Common';\n// These are re-exported from a persisted-types file.\nimport type {\n\tIdCreationRange,\n\tSerializedIdCompressorWithNoSession,\n\tSerializedIdCompressorWithOngoingSession,\n} from '../id-compressor';\nimport type {\n\tDefinition,\n\tDetachedSequenceId,\n\tEditId,\n\tFinalNodeId,\n\tInternedStringId,\n\tNodeId,\n\tOpSpaceNodeId,\n\tSessionId,\n\tTraitLabel,\n\tUuidString,\n} from '../Identifiers';\nimport {\n\tBuildInternal_0_0_2,\n\tChangeTypeInternal,\n\tConstraintEffect,\n\tConstraintInternal_0_0_2,\n\tDetachInternal_0_0_2,\n\tEdit,\n\tEditWithoutId,\n\tInsertInternal_0_0_2,\n\tNodeData,\n\tPayload,\n\tSetValueInternal_0_0_2,\n\tSharedTreeNoOp,\n\tSharedTreeOpType,\n\tSharedTreeSummaryBase,\n\tSharedTreeUpdateOp,\n\tSide,\n\tStablePlaceInternal_0_0_2,\n\tTraitLocationInternal_0_0_2,\n\tTreeNode,\n\tTreeNodeSequence,\n\tVersionedOp,\n\tWriteFormat,\n} from './0.0.2';\n\n/**\n * Specifies the location of a trait (a labeled sequence of nodes) within the tree.\n * @alpha\n */\nexport interface TraitLocationInternal extends Omit<TraitLocationInternal_0_0_2, 'parent'> {\n\treadonly parent: NodeId;\n}\n\n/**\n * Alternating list of label then children list under that label.\n * The label may be interned, and children are {@link CompressedPlaceholderTree}.\n */\nexport type CompressedTraits<TId extends OpSpaceNodeId, TPlaceholder extends number | never> = (\n\t| InternedStringId\n\t| TraitLabel\n\t| (CompressedPlaceholderTree<TId, TPlaceholder> | TPlaceholder)[]\n)[];\n\n/**\n * A TreeNode that has been compressed into the following array format:\n * [identifier, definition, traits, payload],\n * where traits is also an array of [label, [trait], label, [trait], ...].\n * Payload is omitted if empty, and traits will be an empty subarray if no traits exist but a payload exists.\n * If both traits and payload does not exist, then both are omitted.\n * All trait labels and node definitions may also be string interned.\n * @internal\n */\nexport type CompressedPlaceholderTree<TId extends OpSpaceNodeId, TPlaceholder extends number | never> =\n\t| TPlaceholder\n\t| [InternedStringId | Definition] // The node Definition's interned string ID\n\t| [InternedStringId | Definition, TId]\n\t| [\n\t\t\tInternedStringId | Definition,\n\t\t\t[Payload, ...CompressedTraits<TId, TPlaceholder>] | CompressedTraits<TId, TPlaceholder>,\n\t ]\n\t| [\n\t\t\tInternedStringId | Definition,\n\t\t\tTId,\n\t\t\t[Payload, ...CompressedTraits<TId, TPlaceholder>] | CompressedTraits<TId, TPlaceholder>,\n\t ];\n\n/**\n * JSON-compatible Node type. Objects of this type will be persisted in internal change objects (under Edits) in the SharedTree history.\n * @internal\n */\nexport type ChangeNode = TreeNode<ChangeNode, NodeId>;\n\n/**\n * A ChangeNode that has been compressed into a {@link CompressedPlaceholderTree}.\n */\nexport type CompressedChangeNode<TId extends OpSpaceNodeId> = CompressedPlaceholderTree<TId, never>;\n\n/**\n * The contents of a SharedTree summary for write format 0.1.1.\n * Contains the current tree in a compressed format,\n * the edits needed to get from `initialTree` to the current tree,\n * and the interned strings that can be used to retrieve the interned summary.\n */\nexport interface SharedTreeSummary extends SharedTreeSummaryBase {\n\treadonly version: WriteFormat.v0_1_1;\n\n\treadonly currentTree?: CompressedChangeNode<FinalNodeId>;\n\n\t/**\n\t * Information that can populate an edit log.\n\t */\n\treadonly editHistory: EditLogSummary<CompressedChangeInternal<FinalNodeId>, FluidEditHandle>;\n\n\t/**\n\t * List of interned strings.\n\t * In 0.1.1, definitions and trait labels are interned deterministically on sequenced ops,\n\t * and each client maintains a string interner whose lifetime is tied to the SharedTree.\n\t */\n\treadonly internedStrings: readonly string[];\n\n\t/**\n\t * Information about all IDs compressed in the summary\n\t */\n\treadonly idCompressor: SerializedIdCompressorWithNoSession | SerializedIdCompressorWithOngoingSession;\n}\n\n/**\n * Information used to populate an edit log.\n * In 0.1.1, this is a persisted type only for `EditLogSummary<CompressedChangeInternal, FluidEditHandle>`,\n * where calling `FluidEditHandle.get` returns an array buffer of compressed `editChunk` contents.\n * The type is parameterized to avoid nearly identical type definitions for uncompressed forms of the edit\n * log, and abstracting away the fact that handle fetching needs to invoke decompression.\n * @internal\n */\nexport interface EditLogSummary<TChange, THandle> {\n\t/**\n\t * A of list of serialized chunks and their corresponding keys.\n\t * Start revision is the index of the first edit in the chunk in relation to the edit log.\n\t */\n\treadonly editChunks: readonly {\n\t\treadonly startRevision: number;\n\t\t/**\n\t\t * Either a chunk of edits or a handle that can be used to load that chunk.\n\t\t */\n\t\treadonly chunk: THandle | readonly EditWithoutId<TChange>[];\n\t}[];\n\n\t/**\n\t * A list of edits IDs for all sequenced edits.\n\t */\n\treadonly editIds: readonly EditId[];\n}\n\n/**\n * FluidEditHandles are used to load edit chunks stored outside of the EditLog.\n * Can be satisfied by IFluidHandle<ArrayBufferLike>.\n * Note that though this is in `PersistedTypes`, it isn't directly serializable (e.g. `get` is a function).\n * Its serialization relies on being encoded via an IFluidSerializer.\n * @internal\n */\nexport interface FluidEditHandle {\n\treadonly get: () => Promise<ArrayBuffer>;\n\treadonly absolutePath: string;\n}\n\n// Future write formats should make this a union type and append to it (e.g. `EditChunkContents_0_1_1 | EditChunkContents_2_0_0`).\nexport type EditChunkContents = EditChunkContents_0_1_1;\n\nexport interface EditChunkContents_0_1_1 {\n\tversion: WriteFormat.v0_1_1;\n\tedits: readonly EditWithoutId<CompressedChangeInternal<FinalNodeId>>[];\n}\n\n/**\n * Compressed change format type.\n * Encodes the same information as a {@link ChangeInternal}, but uses a more compact object format for `build` changes.\n */\nexport type CompressedChangeInternal<TId extends OpSpaceNodeId> =\n\t| ReplaceRecursive<Exclude<ChangeInternal, BuildInternal>, NodeId, TId>\n\t| CompressedBuildInternal<TId>;\n\n/**\n * A compressed version of {@link BuildInternal} where the source is a sequence of compressed nodes.\n */\nexport interface CompressedBuildInternal<TId extends OpSpaceNodeId> {\n\t/** {@inheritdoc Build.destination } */\n\treadonly destination: DetachedSequenceId;\n\t/** A sequence of nodes to build in some compressed format. */\n\treadonly source: TreeNodeSequence<CompressedBuildNode<TId>>;\n\t/** {@inheritdoc Build.\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.CompressedBuild;\n}\n\n/**\n * A BuildNode that has been compressed into a {@link CompressedPlaceholderTree}.\n */\nexport type CompressedBuildNode<TId extends OpSpaceNodeId> = CompressedPlaceholderTree<TId, DetachedSequenceId>;\n\n// TODO: `ChangeInternal`s should be assignable to this type without casting; this will require some test refactoring.\n/**\n * This type should be used as an opaque handle in the public API for `ChangeInternal` objects.\n * This is useful for supporting public APIs which involve working with a tree's edit history,\n * which will involve changes that have already been internalized.\n * @alpha\n */\nexport interface InternalizedChange {\n\tInternalChangeBrand: '2cae1045-61cf-4ef7-a6a3-8ad920cb7ab3';\n}\n\n/**\n * {@inheritdoc (Change:type)}\n * @alpha\n */\nexport type ChangeInternal = InsertInternal | DetachInternal | BuildInternal | SetValueInternal | ConstraintInternal;\n\n/**\n * {@inheritdoc BuildNode}\n * @alpha\n */\nexport type BuildNodeInternal = TreeNode<BuildNodeInternal, NodeId> | DetachedSequenceId;\n\n/**\n * {@inheritdoc Build}\n * @alpha\n */\nexport interface BuildInternal extends Omit<BuildInternal_0_0_2, 'source'> {\n\treadonly source: TreeNodeSequence<BuildNodeInternal>;\n}\n\n/**\n * {@inheritdoc (Insert:interface)}\n * @alpha\n */\nexport interface InsertInternal extends Omit<InsertInternal_0_0_2, 'destination'> {\n\t/** {@inheritdoc (Insert:interface).destination } */\n\treadonly destination: StablePlaceInternal;\n}\n\n/**\n * {@inheritdoc Detach}\n * @alpha\n */\nexport interface DetachInternal extends Omit<DetachInternal_0_0_2, 'source'> {\n\t/** {@inheritdoc Detach.source } */\n\treadonly source: StableRangeInternal;\n}\n\n/**\n * {@inheritdoc SetValue}\n * @alpha\n */\nexport interface SetValueInternal extends Omit<SetValueInternal_0_0_2, 'nodeToModify'> {\n\t/** {@inheritdoc SetValue.nodeToModify } */\n\treadonly nodeToModify: NodeId;\n}\n\n/**\n * {@inheritdoc Constraint}\n * @alpha\n */\nexport interface ConstraintInternal extends Omit<ConstraintInternal_0_0_2, 'toConstrain' | 'parentNode'> {\n\t/** {@inheritdoc Constraint.toConstrain } */\n\treadonly toConstrain: StableRangeInternal;\n\t/** {@inheritdoc Constraint.parentNode } */\n\treadonly parentNode?: NodeId;\n}\n\n// Note: Documentation of this constant is merged with documentation of the `ChangeInternal` interface.\n/**\n * @alpha\n */\nexport const ChangeInternal = {\n\tbuild: (source: TreeNodeSequence<BuildNodeInternal>, destination: DetachedSequenceId): BuildInternal => ({\n\t\tdestination,\n\t\tsource,\n\t\ttype: ChangeTypeInternal.Build,\n\t}),\n\n\tinsert: (source: DetachedSequenceId, destination: StablePlaceInternal): InsertInternal => ({\n\t\tdestination,\n\t\tsource,\n\t\ttype: ChangeTypeInternal.Insert,\n\t}),\n\n\tdetach: (source: StableRangeInternal, destination?: DetachedSequenceId): DetachInternal => ({\n\t\tdestination,\n\t\tsource,\n\t\ttype: ChangeTypeInternal.Detach,\n\t}),\n\n\tsetPayload: (nodeToModify: NodeData<NodeId> | NodeId, payload: Payload): SetValueInternal => ({\n\t\tnodeToModify: getNodeId(nodeToModify),\n\t\tpayload,\n\t\ttype: ChangeTypeInternal.SetValue,\n\t}),\n\n\tclearPayload: (nodeToModify: NodeData<NodeId> | NodeId): SetValueInternal => ({\n\t\tnodeToModify: getNodeId(nodeToModify),\n\t\t// Rationale: 'undefined' is reserved for future use (see 'SetValue' interface above.)\n\t\tpayload: null,\n\t\ttype: ChangeTypeInternal.SetValue,\n\t}),\n\n\tconstraint: (\n\t\ttoConstrain: StableRangeInternal,\n\t\teffect: ConstraintEffect,\n\t\tidentityHash?: UuidString,\n\t\tlength?: number,\n\t\tcontentHash?: UuidString,\n\t\tparentNode?: NodeId,\n\t\tlabel?: TraitLabel\n\t): ConstraintInternal => ({\n\t\ttoConstrain,\n\t\teffect,\n\t\tidentityHash,\n\t\tlength,\n\t\tcontentHash,\n\t\tparentNode,\n\t\tlabel,\n\t\ttype: ChangeTypeInternal.Constraint,\n\t}),\n\n\t/** {@inheritdoc (Change:variable).delete } */\n\tdelete: (stableRange: StableRangeInternal): ChangeInternal => ChangeInternal.detach(stableRange),\n\n\t/** {@inheritdoc (Change:variable).insertTree } */\n\tinsertTree: (nodes: TreeNodeSequence<BuildNodeInternal>, destination: StablePlaceInternal): ChangeInternal[] => {\n\t\tconst build = ChangeInternal.build(nodes, 0 as DetachedSequenceId);\n\t\treturn [build, ChangeInternal.insert(build.destination, destination)];\n\t},\n\n\t/** {@inheritdoc (Change:variable).move } */\n\tmove: (source: StableRangeInternal, destination: StablePlaceInternal): ChangeInternal[] => {\n\t\tconst detach = ChangeInternal.detach(source, 0 as DetachedSequenceId);\n\t\treturn [detach, ChangeInternal.insert(assertNotUndefined(detach.destination), destination)];\n\t},\n};\n\n/**\n * {@inheritdoc (StablePlace:interface) }\n * @alpha\n */\nexport interface StablePlaceInternal extends Omit<StablePlaceInternal_0_0_2, 'referenceSibling' | 'referenceTrait'> {\n\t/**\n\t * {@inheritdoc (StablePlace:interface).referenceSibling }\n\t */\n\treadonly referenceSibling?: NodeId;\n\n\t/**\n\t * {@inheritdoc (StablePlace:interface).referenceTrait }\n\t */\n\treadonly referenceTrait?: TraitLocationInternal;\n}\n\n/**\n * {@inheritdoc (StableRange:interface) }\n * @alpha\n */\nexport interface StableRangeInternal {\n\t/** {@inheritdoc (StableRange:interface).start } */\n\treadonly start: StablePlaceInternal;\n\t/** {@inheritdoc (StableRange:interface).end } */\n\treadonly end: StablePlaceInternal;\n}\n\n/**\n * The remainder of this file consists of factory methods duplicated with those for StableRange/StablePlace and are maintained while\n * the new persisted version of SharedTree ops/summaries is rolled out.\n */\n\n/**\n * @alpha\n */\nexport const StablePlaceInternal = {\n\t/**\n\t * @returns The location directly before `node`.\n\t */\n\tbefore: (node: NodeData<NodeId> | NodeId): StablePlaceInternal => ({\n\t\tside: Side.Before,\n\t\treferenceSibling: getNodeId(node),\n\t}),\n\t/**\n\t * @returns The location directly after `node`.\n\t */\n\tafter: (node: NodeData<NodeId> | NodeId): StablePlaceInternal => ({\n\t\tside: Side.After,\n\t\treferenceSibling: getNodeId(node),\n\t}),\n\t/**\n\t * @returns The location at the start of `trait`.\n\t */\n\tatStartOf: (trait: TraitLocationInternal): StablePlaceInternal => ({\n\t\tside: Side.After,\n\t\treferenceTrait: trait,\n\t}),\n\t/**\n\t * @returns The location at the end of `trait`.\n\t */\n\tatEndOf: (trait: TraitLocationInternal): StablePlaceInternal => ({\n\t\tside: Side.Before,\n\t\treferenceTrait: trait,\n\t}),\n};\n\n/**\n * @alpha\n */\nexport const StableRangeInternal = {\n\t/**\n\t * Factory for producing a `StableRange` from a start `StablePlace` to an end `StablePlace`.\n\t *\n\t * @example\n\t *\n\t * ```typescript\n\t * StableRange.from(StablePlace.before(startNode)).to(StablePlace.after(endNode))\n\t * ```\n\t */\n\tfrom: (start: StablePlaceInternal): { to: (end: StablePlaceInternal) => StableRangeInternal } => ({\n\t\tto: (end: StablePlaceInternal): StableRangeInternal => {\n\t\t\tif (start.referenceTrait && end.referenceTrait) {\n\t\t\t\tassert(\n\t\t\t\t\tstart.referenceTrait.parent === end.referenceTrait.parent,\n\t\t\t\t\t0x65e /* StableRange must be constructed with endpoints from the same trait */\n\t\t\t\t);\n\t\t\t\tassert(\n\t\t\t\t\tstart.referenceTrait.label === end.referenceTrait.label,\n\t\t\t\t\t0x65f /* StableRange must be constructed with endpoints from the same trait */\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn { start, end };\n\t\t},\n\t}),\n\t/**\n\t * @returns a `StableRange` which contains only the provided `node`.\n\t * Both the start and end `StablePlace` objects used to anchor this `StableRange` are in terms of the passed in node.\n\t */\n\tonly: (node: NodeData<NodeId> | NodeId): StableRangeInternal => ({\n\t\tstart: StablePlaceInternal.before(node),\n\t\tend: StablePlaceInternal.after(node),\n\t}),\n\t/**\n\t * @returns a `StableRange` which contains everything in the trait.\n\t * This is anchored using the provided `trait`, and is independent of the actual contents of the trait:\n\t * it does not use sibling anchoring.\n\t */\n\tall: (trait: TraitLocationInternal): StableRangeInternal => ({\n\t\tstart: StablePlaceInternal.atStartOf(trait),\n\t\tend: StablePlaceInternal.atEndOf(trait),\n\t}),\n};\n\n/**\n * Discriminated union of valid 0.0.1 SharedTree op types.\n */\nexport type SharedTreeOp = SharedTreeEditOp | SharedTreeHandleOp | SharedTreeUpdateOp | SharedTreeNoOp;\n\nexport interface SharedTreeEditOp extends VersionedOp<WriteFormat.v0_1_1> {\n\treadonly type: SharedTreeOpType.Edit;\n\t/** The collection of changes to apply. */\n\treadonly edit: Edit<CompressedChangeInternal<OpSpaceNodeId>>;\n\t/** Contains all the IDs generated by the originating client since the last sent op */\n\treadonly idRange: IdCreationRange;\n}\n\n/**\n * A SharedTree op that includes edit handle information.\n * The handle corresponds to an edit chunk in the edit log.\n */\nexport interface SharedTreeHandleOp extends VersionedOp<WriteFormat.v0_1_1> {\n\treadonly type: SharedTreeOpType.Handle;\n\t/** The serialized handle to an uploaded edit chunk. */\n\treadonly editHandle: string;\n\t/** The index of the first edit in the chunk that corresponds to the handle. */\n\treadonly startRevision: number;\n}\n\n/** The number of IDs that a SharedTree reserves for current or future internal use */\n// This value must never change\nexport const reservedIdCount = 10;\n\n/** The SessionID of the Upgrade Session */\n// This UUID must never change\nexport const ghostSessionId = '79590933-1c70-4fda-817a-adab57c20318' as SessionId;\n\n/** Accepts either a node or a node's identifier, and returns the identifier */\nfunction getNodeId<TId>(node: TId | NodeData<TId>): TId {\n\treturn (node as NodeData<TId>).identifier ?? (node as TId);\n}\n"]}
1
+ {"version":3,"file":"0.1.1.js","sourceRoot":"","sources":["../../src/persisted-types/0.1.1.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AACpD,4CAAoE;AAmBpE,0CAuBoB;AAgOpB,uGAAuG;AACvG;;GAEG;AACU,QAAA,cAAc,GAAG;IAC7B,KAAK,EAAE,CAAC,MAA2C,EAAE,WAA+B,EAAiB,EAAE,CAAC,CAAC;QACxG,WAAW;QACX,MAAM;QACN,IAAI,EAAE,8BAAkB,CAAC,KAAK;KAC9B,CAAC;IAEF,MAAM,EAAE,CAAC,MAA0B,EAAE,WAAgC,EAAkB,EAAE,CAAC,CAAC;QAC1F,WAAW;QACX,MAAM;QACN,IAAI,EAAE,8BAAkB,CAAC,MAAM;KAC/B,CAAC;IAEF,MAAM,EAAE,CAAC,MAA2B,EAAE,WAAgC,EAAkB,EAAE,CAAC,CAAC;QAC3F,WAAW;QACX,MAAM;QACN,IAAI,EAAE,8BAAkB,CAAC,MAAM;KAC/B,CAAC;IAEF,UAAU,EAAE,CAAC,YAAuC,EAAE,OAAgB,EAAoB,EAAE,CAAC,CAAC;QAC7F,YAAY,EAAE,SAAS,CAAC,YAAY,CAAC;QACrC,OAAO;QACP,IAAI,EAAE,8BAAkB,CAAC,QAAQ;KACjC,CAAC;IAEF,YAAY,EAAE,CAAC,YAAuC,EAAoB,EAAE,CAAC,CAAC;QAC7E,YAAY,EAAE,SAAS,CAAC,YAAY,CAAC;QACrC,sFAAsF;QACtF,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,8BAAkB,CAAC,QAAQ;KACjC,CAAC;IAEF,UAAU,EAAE,CACX,WAAgC,EAChC,MAAwB,EACxB,YAAyB,EACzB,MAAe,EACf,WAAwB,EACxB,UAAmB,EACnB,KAA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A2BF,sFAAsF;AACtF,+BAA+B;AAClB,QAAA,eAAe,GAAG,EAAE,CAAC;AAElC,2CAA2C;AAC3C,8BAA8B;AACjB,QAAA,cAAc,GAAG,sCAAmD,CAAC;AAElF,+EAA+E;AAC/E,SAAS,SAAS,CAAM,IAAyB;IAChD,OAAQ,IAAsB,CAAC,UAAU,IAAK,IAAY,CAAC;AAC5D,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from '@fluidframework/core-utils';\nimport { assertNotUndefined, ReplaceRecursive } from '../Common.js';\n// These are re-exported from a persisted-types file.\nimport type {\n\tIdCreationRange,\n\tSerializedIdCompressorWithNoSession,\n\tSerializedIdCompressorWithOngoingSession,\n} from '../id-compressor/index.js';\nimport type {\n\tDefinition,\n\tDetachedSequenceId,\n\tEditId,\n\tFinalNodeId,\n\tInternedStringId,\n\tNodeId,\n\tOpSpaceNodeId,\n\tSessionId,\n\tTraitLabel,\n\tUuidString,\n} from '../Identifiers.js';\nimport {\n\tBuildInternal_0_0_2,\n\tChangeTypeInternal,\n\tConstraintEffect,\n\tConstraintInternal_0_0_2,\n\tDetachInternal_0_0_2,\n\tEdit,\n\tEditWithoutId,\n\tInsertInternal_0_0_2,\n\tNodeData,\n\tPayload,\n\tSetValueInternal_0_0_2,\n\tSharedTreeNoOp,\n\tSharedTreeOpType,\n\tSharedTreeSummaryBase,\n\tSharedTreeUpdateOp,\n\tSide,\n\tStablePlaceInternal_0_0_2,\n\tTraitLocationInternal_0_0_2,\n\tTreeNode,\n\tTreeNodeSequence,\n\tVersionedOp,\n\tWriteFormat,\n} from './0.0.2.js';\n\n/**\n * Specifies the location of a trait (a labeled sequence of nodes) within the tree.\n * @alpha\n */\nexport interface TraitLocationInternal extends Omit<TraitLocationInternal_0_0_2, 'parent'> {\n\treadonly parent: NodeId;\n}\n\n/**\n * Alternating list of label then children list under that label.\n * The label may be interned, and children are {@link CompressedPlaceholderTree}.\n */\nexport type CompressedTraits<TId extends OpSpaceNodeId, TPlaceholder extends number | never> = (\n\t| InternedStringId\n\t| TraitLabel\n\t| (CompressedPlaceholderTree<TId, TPlaceholder> | TPlaceholder)[]\n)[];\n\n/**\n * A TreeNode that has been compressed into the following array format:\n * [identifier, definition, traits, payload],\n * where traits is also an array of [label, [trait], label, [trait], ...].\n * Payload is omitted if empty, and traits will be an empty subarray if no traits exist but a payload exists.\n * If both traits and payload does not exist, then both are omitted.\n * All trait labels and node definitions may also be string interned.\n * @internal\n */\nexport type CompressedPlaceholderTree<TId extends OpSpaceNodeId, TPlaceholder extends number | never> =\n\t| TPlaceholder\n\t| [InternedStringId | Definition] // The node Definition's interned string ID\n\t| [InternedStringId | Definition, TId]\n\t| [\n\t\t\tInternedStringId | Definition,\n\t\t\t[Payload, ...CompressedTraits<TId, TPlaceholder>] | CompressedTraits<TId, TPlaceholder>,\n\t ]\n\t| [\n\t\t\tInternedStringId | Definition,\n\t\t\tTId,\n\t\t\t[Payload, ...CompressedTraits<TId, TPlaceholder>] | CompressedTraits<TId, TPlaceholder>,\n\t ];\n\n/**\n * JSON-compatible Node type. Objects of this type will be persisted in internal change objects (under Edits) in the SharedTree history.\n * @internal\n */\nexport type ChangeNode = TreeNode<ChangeNode, NodeId>;\n\n/**\n * A ChangeNode that has been compressed into a {@link CompressedPlaceholderTree}.\n */\nexport type CompressedChangeNode<TId extends OpSpaceNodeId> = CompressedPlaceholderTree<TId, never>;\n\n/**\n * The contents of a SharedTree summary for write format 0.1.1.\n * Contains the current tree in a compressed format,\n * the edits needed to get from `initialTree` to the current tree,\n * and the interned strings that can be used to retrieve the interned summary.\n */\nexport interface SharedTreeSummary extends SharedTreeSummaryBase {\n\treadonly version: WriteFormat.v0_1_1;\n\n\treadonly currentTree?: CompressedChangeNode<FinalNodeId>;\n\n\t/**\n\t * Information that can populate an edit log.\n\t */\n\treadonly editHistory: EditLogSummary<CompressedChangeInternal<FinalNodeId>, FluidEditHandle>;\n\n\t/**\n\t * List of interned strings.\n\t * In 0.1.1, definitions and trait labels are interned deterministically on sequenced ops,\n\t * and each client maintains a string interner whose lifetime is tied to the SharedTree.\n\t */\n\treadonly internedStrings: readonly string[];\n\n\t/**\n\t * Information about all IDs compressed in the summary\n\t */\n\treadonly idCompressor: SerializedIdCompressorWithNoSession | SerializedIdCompressorWithOngoingSession;\n}\n\n/**\n * Information used to populate an edit log.\n * In 0.1.1, this is a persisted type only for `EditLogSummary<CompressedChangeInternal, FluidEditHandle>`,\n * where calling `FluidEditHandle.get` returns an array buffer of compressed `editChunk` contents.\n * The type is parameterized to avoid nearly identical type definitions for uncompressed forms of the edit\n * log, and abstracting away the fact that handle fetching needs to invoke decompression.\n * @internal\n */\nexport interface EditLogSummary<TChange, THandle> {\n\t/**\n\t * A of list of serialized chunks and their corresponding keys.\n\t * Start revision is the index of the first edit in the chunk in relation to the edit log.\n\t */\n\treadonly editChunks: readonly {\n\t\treadonly startRevision: number;\n\t\t/**\n\t\t * Either a chunk of edits or a handle that can be used to load that chunk.\n\t\t */\n\t\treadonly chunk: THandle | readonly EditWithoutId<TChange>[];\n\t}[];\n\n\t/**\n\t * A list of edits IDs for all sequenced edits.\n\t */\n\treadonly editIds: readonly EditId[];\n}\n\n/**\n * FluidEditHandles are used to load edit chunks stored outside of the EditLog.\n * Can be satisfied by IFluidHandle<ArrayBufferLike>.\n * Note that though this is in `PersistedTypes`, it isn't directly serializable (e.g. `get` is a function).\n * Its serialization relies on being encoded via an IFluidSerializer.\n * @internal\n */\nexport interface FluidEditHandle {\n\treadonly get: () => Promise<ArrayBuffer>;\n\treadonly absolutePath: string;\n}\n\n// Future write formats should make this a union type and append to it (e.g. `EditChunkContents_0_1_1 | EditChunkContents_2_0_0`).\nexport type EditChunkContents = EditChunkContents_0_1_1;\n\nexport interface EditChunkContents_0_1_1 {\n\tversion: WriteFormat.v0_1_1;\n\tedits: readonly EditWithoutId<CompressedChangeInternal<FinalNodeId>>[];\n}\n\n/**\n * Compressed change format type.\n * Encodes the same information as a {@link ChangeInternal}, but uses a more compact object format for `build` changes.\n */\nexport type CompressedChangeInternal<TId extends OpSpaceNodeId> =\n\t| ReplaceRecursive<Exclude<ChangeInternal, BuildInternal>, NodeId, TId>\n\t| CompressedBuildInternal<TId>;\n\n/**\n * A compressed version of {@link BuildInternal} where the source is a sequence of compressed nodes.\n */\nexport interface CompressedBuildInternal<TId extends OpSpaceNodeId> {\n\t/** {@inheritdoc Build.destination } */\n\treadonly destination: DetachedSequenceId;\n\t/** A sequence of nodes to build in some compressed format. */\n\treadonly source: TreeNodeSequence<CompressedBuildNode<TId>>;\n\t/** {@inheritdoc Build.\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.CompressedBuild;\n}\n\n/**\n * A BuildNode that has been compressed into a {@link CompressedPlaceholderTree}.\n */\nexport type CompressedBuildNode<TId extends OpSpaceNodeId> = CompressedPlaceholderTree<TId, DetachedSequenceId>;\n\n// TODO: `ChangeInternal`s should be assignable to this type without casting; this will require some test refactoring.\n/**\n * This type should be used as an opaque handle in the public API for `ChangeInternal` objects.\n * This is useful for supporting public APIs which involve working with a tree's edit history,\n * which will involve changes that have already been internalized.\n * @alpha\n */\nexport interface InternalizedChange {\n\tInternalChangeBrand: '2cae1045-61cf-4ef7-a6a3-8ad920cb7ab3';\n}\n\n/**\n * {@inheritdoc (Change:type)}\n * @alpha\n */\nexport type ChangeInternal = InsertInternal | DetachInternal | BuildInternal | SetValueInternal | ConstraintInternal;\n\n/**\n * {@inheritdoc BuildNode}\n * @alpha\n */\nexport type BuildNodeInternal = TreeNode<BuildNodeInternal, NodeId> | DetachedSequenceId;\n\n/**\n * {@inheritdoc Build}\n * @alpha\n */\nexport interface BuildInternal extends Omit<BuildInternal_0_0_2, 'source'> {\n\treadonly source: TreeNodeSequence<BuildNodeInternal>;\n}\n\n/**\n * {@inheritdoc (Insert:interface)}\n * @alpha\n */\nexport interface InsertInternal extends Omit<InsertInternal_0_0_2, 'destination'> {\n\t/** {@inheritdoc (Insert:interface).destination } */\n\treadonly destination: StablePlaceInternal;\n}\n\n/**\n * {@inheritdoc Detach}\n * @alpha\n */\nexport interface DetachInternal extends Omit<DetachInternal_0_0_2, 'source'> {\n\t/** {@inheritdoc Detach.source } */\n\treadonly source: StableRangeInternal;\n}\n\n/**\n * {@inheritdoc SetValue}\n * @alpha\n */\nexport interface SetValueInternal extends Omit<SetValueInternal_0_0_2, 'nodeToModify'> {\n\t/** {@inheritdoc SetValue.nodeToModify } */\n\treadonly nodeToModify: NodeId;\n}\n\n/**\n * {@inheritdoc Constraint}\n * @alpha\n */\nexport interface ConstraintInternal extends Omit<ConstraintInternal_0_0_2, 'toConstrain' | 'parentNode'> {\n\t/** {@inheritdoc Constraint.toConstrain } */\n\treadonly toConstrain: StableRangeInternal;\n\t/** {@inheritdoc Constraint.parentNode } */\n\treadonly parentNode?: NodeId;\n}\n\n// Note: Documentation of this constant is merged with documentation of the `ChangeInternal` interface.\n/**\n * @alpha\n */\nexport const ChangeInternal = {\n\tbuild: (source: TreeNodeSequence<BuildNodeInternal>, destination: DetachedSequenceId): BuildInternal => ({\n\t\tdestination,\n\t\tsource,\n\t\ttype: ChangeTypeInternal.Build,\n\t}),\n\n\tinsert: (source: DetachedSequenceId, destination: StablePlaceInternal): InsertInternal => ({\n\t\tdestination,\n\t\tsource,\n\t\ttype: ChangeTypeInternal.Insert,\n\t}),\n\n\tdetach: (source: StableRangeInternal, destination?: DetachedSequenceId): DetachInternal => ({\n\t\tdestination,\n\t\tsource,\n\t\ttype: ChangeTypeInternal.Detach,\n\t}),\n\n\tsetPayload: (nodeToModify: NodeData<NodeId> | NodeId, payload: Payload): SetValueInternal => ({\n\t\tnodeToModify: getNodeId(nodeToModify),\n\t\tpayload,\n\t\ttype: ChangeTypeInternal.SetValue,\n\t}),\n\n\tclearPayload: (nodeToModify: NodeData<NodeId> | NodeId): SetValueInternal => ({\n\t\tnodeToModify: getNodeId(nodeToModify),\n\t\t// Rationale: 'undefined' is reserved for future use (see 'SetValue' interface above.)\n\t\tpayload: null,\n\t\ttype: ChangeTypeInternal.SetValue,\n\t}),\n\n\tconstraint: (\n\t\ttoConstrain: StableRangeInternal,\n\t\teffect: ConstraintEffect,\n\t\tidentityHash?: UuidString,\n\t\tlength?: number,\n\t\tcontentHash?: UuidString,\n\t\tparentNode?: NodeId,\n\t\tlabel?: TraitLabel\n\t): ConstraintInternal => ({\n\t\ttoConstrain,\n\t\teffect,\n\t\tidentityHash,\n\t\tlength,\n\t\tcontentHash,\n\t\tparentNode,\n\t\tlabel,\n\t\ttype: ChangeTypeInternal.Constraint,\n\t}),\n\n\t/** {@inheritdoc (Change:variable).delete } */\n\tdelete: (stableRange: StableRangeInternal): ChangeInternal => ChangeInternal.detach(stableRange),\n\n\t/** {@inheritdoc (Change:variable).insertTree } */\n\tinsertTree: (nodes: TreeNodeSequence<BuildNodeInternal>, destination: StablePlaceInternal): ChangeInternal[] => {\n\t\tconst build = ChangeInternal.build(nodes, 0 as DetachedSequenceId);\n\t\treturn [build, ChangeInternal.insert(build.destination, destination)];\n\t},\n\n\t/** {@inheritdoc (Change:variable).move } */\n\tmove: (source: StableRangeInternal, destination: StablePlaceInternal): ChangeInternal[] => {\n\t\tconst detach = ChangeInternal.detach(source, 0 as DetachedSequenceId);\n\t\treturn [detach, ChangeInternal.insert(assertNotUndefined(detach.destination), destination)];\n\t},\n};\n\n/**\n * {@inheritdoc (StablePlace:interface) }\n * @alpha\n */\nexport interface StablePlaceInternal extends Omit<StablePlaceInternal_0_0_2, 'referenceSibling' | 'referenceTrait'> {\n\t/**\n\t * {@inheritdoc (StablePlace:interface).referenceSibling }\n\t */\n\treadonly referenceSibling?: NodeId;\n\n\t/**\n\t * {@inheritdoc (StablePlace:interface).referenceTrait }\n\t */\n\treadonly referenceTrait?: TraitLocationInternal;\n}\n\n/**\n * {@inheritdoc (StableRange:interface) }\n * @alpha\n */\nexport interface StableRangeInternal {\n\t/** {@inheritdoc (StableRange:interface).start } */\n\treadonly start: StablePlaceInternal;\n\t/** {@inheritdoc (StableRange:interface).end } */\n\treadonly end: StablePlaceInternal;\n}\n\n/**\n * The remainder of this file consists of factory methods duplicated with those for StableRange/StablePlace and are maintained while\n * the new persisted version of SharedTree ops/summaries is rolled out.\n */\n\n/**\n * @alpha\n */\nexport const StablePlaceInternal = {\n\t/**\n\t * @returns The location directly before `node`.\n\t */\n\tbefore: (node: NodeData<NodeId> | NodeId): StablePlaceInternal => ({\n\t\tside: Side.Before,\n\t\treferenceSibling: getNodeId(node),\n\t}),\n\t/**\n\t * @returns The location directly after `node`.\n\t */\n\tafter: (node: NodeData<NodeId> | NodeId): StablePlaceInternal => ({\n\t\tside: Side.After,\n\t\treferenceSibling: getNodeId(node),\n\t}),\n\t/**\n\t * @returns The location at the start of `trait`.\n\t */\n\tatStartOf: (trait: TraitLocationInternal): StablePlaceInternal => ({\n\t\tside: Side.After,\n\t\treferenceTrait: trait,\n\t}),\n\t/**\n\t * @returns The location at the end of `trait`.\n\t */\n\tatEndOf: (trait: TraitLocationInternal): StablePlaceInternal => ({\n\t\tside: Side.Before,\n\t\treferenceTrait: trait,\n\t}),\n};\n\n/**\n * @alpha\n */\nexport const StableRangeInternal = {\n\t/**\n\t * Factory for producing a `StableRange` from a start `StablePlace` to an end `StablePlace`.\n\t *\n\t * @example\n\t *\n\t * ```typescript\n\t * StableRange.from(StablePlace.before(startNode)).to(StablePlace.after(endNode))\n\t * ```\n\t */\n\tfrom: (start: StablePlaceInternal): { to: (end: StablePlaceInternal) => StableRangeInternal } => ({\n\t\tto: (end: StablePlaceInternal): StableRangeInternal => {\n\t\t\tif (start.referenceTrait && end.referenceTrait) {\n\t\t\t\tassert(\n\t\t\t\t\tstart.referenceTrait.parent === end.referenceTrait.parent,\n\t\t\t\t\t0x65e /* StableRange must be constructed with endpoints from the same trait */\n\t\t\t\t);\n\t\t\t\tassert(\n\t\t\t\t\tstart.referenceTrait.label === end.referenceTrait.label,\n\t\t\t\t\t0x65f /* StableRange must be constructed with endpoints from the same trait */\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn { start, end };\n\t\t},\n\t}),\n\t/**\n\t * @returns a `StableRange` which contains only the provided `node`.\n\t * Both the start and end `StablePlace` objects used to anchor this `StableRange` are in terms of the passed in node.\n\t */\n\tonly: (node: NodeData<NodeId> | NodeId): StableRangeInternal => ({\n\t\tstart: StablePlaceInternal.before(node),\n\t\tend: StablePlaceInternal.after(node),\n\t}),\n\t/**\n\t * @returns a `StableRange` which contains everything in the trait.\n\t * This is anchored using the provided `trait`, and is independent of the actual contents of the trait:\n\t * it does not use sibling anchoring.\n\t */\n\tall: (trait: TraitLocationInternal): StableRangeInternal => ({\n\t\tstart: StablePlaceInternal.atStartOf(trait),\n\t\tend: StablePlaceInternal.atEndOf(trait),\n\t}),\n};\n\n/**\n * Discriminated union of valid 0.0.1 SharedTree op types.\n */\nexport type SharedTreeOp = SharedTreeEditOp | SharedTreeHandleOp | SharedTreeUpdateOp | SharedTreeNoOp;\n\nexport interface SharedTreeEditOp extends VersionedOp<WriteFormat.v0_1_1> {\n\treadonly type: SharedTreeOpType.Edit;\n\t/** The collection of changes to apply. */\n\treadonly edit: Edit<CompressedChangeInternal<OpSpaceNodeId>>;\n\t/** Contains all the IDs generated by the originating client since the last sent op */\n\treadonly idRange: IdCreationRange;\n}\n\n/**\n * A SharedTree op that includes edit handle information.\n * The handle corresponds to an edit chunk in the edit log.\n */\nexport interface SharedTreeHandleOp extends VersionedOp<WriteFormat.v0_1_1> {\n\treadonly type: SharedTreeOpType.Handle;\n\t/** The serialized handle to an uploaded edit chunk. */\n\treadonly editHandle: string;\n\t/** The index of the first edit in the chunk that corresponds to the handle. */\n\treadonly startRevision: number;\n}\n\n/** The number of IDs that a SharedTree reserves for current or future internal use */\n// This value must never change\nexport const reservedIdCount = 10;\n\n/** The SessionID of the Upgrade Session */\n// This UUID must never change\nexport const ghostSessionId = '79590933-1c70-4fda-817a-adab57c20318' as SessionId;\n\n/** Accepts either a node or a node's identifier, and returns the identifier */\nfunction getNodeId<TId>(node: TId | NodeData<TId>): TId {\n\treturn (node as NodeData<TId>).identifier ?? (node as TId);\n}\n"]}
@@ -2,6 +2,6 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { BuildInternal_0_0_2, BuildNodeInternal_0_0_2, ChangeInternal_0_0_2, ChangeNode_0_0_2, ChangeTypeInternal, ConstraintEffect, ConstraintInternal_0_0_2, DetachInternal_0_0_2, Edit, EditBase, EditStatus, EditWithoutId, HasTraits, InsertInternal_0_0_2, NodeData, Payload, PlaceholderTree, SetValueInternal_0_0_2, SharedTreeEditOp_0_0_2, SharedTreeNoOp, SharedTreeOp_0_0_2, SharedTreeOpType, SharedTreeSummary_0_0_2, SharedTreeSummaryBase, SharedTreeUpdateOp, Side, StablePlaceInternal_0_0_2, StableRangeInternal_0_0_2, TraitLocationInternal_0_0_2, TraitMap, TreeNode, TreeNodeSequence, VersionedOp, WriteFormat, } from './0.0.2';
6
- export { BuildInternal, BuildNodeInternal, ChangeInternal, ChangeNode, CompressedBuildInternal, CompressedBuildNode, CompressedChangeInternal, CompressedChangeNode, CompressedPlaceholderTree, CompressedTraits, ConstraintInternal, DetachInternal, EditChunkContents, EditChunkContents_0_1_1, EditLogSummary, FluidEditHandle, ghostSessionId, InsertInternal, InternalizedChange, reservedIdCount, SetValueInternal, SharedTreeEditOp, SharedTreeHandleOp, SharedTreeOp, SharedTreeSummary, StablePlaceInternal, StableRangeInternal, TraitLocationInternal, } from './0.1.1';
5
+ export { BuildInternal_0_0_2, BuildNodeInternal_0_0_2, ChangeInternal_0_0_2, ChangeNode_0_0_2, ChangeTypeInternal, ConstraintEffect, ConstraintInternal_0_0_2, DetachInternal_0_0_2, Edit, EditBase, EditStatus, EditWithoutId, HasTraits, InsertInternal_0_0_2, NodeData, Payload, PlaceholderTree, SetValueInternal_0_0_2, SharedTreeEditOp_0_0_2, SharedTreeNoOp, SharedTreeOp_0_0_2, SharedTreeOpType, SharedTreeSummary_0_0_2, SharedTreeSummaryBase, SharedTreeUpdateOp, Side, StablePlaceInternal_0_0_2, StableRangeInternal_0_0_2, TraitLocationInternal_0_0_2, TraitMap, TreeNode, TreeNodeSequence, VersionedOp, WriteFormat, } from './0.0.2.js';
6
+ export { BuildInternal, BuildNodeInternal, ChangeInternal, ChangeNode, CompressedBuildInternal, CompressedBuildNode, CompressedChangeInternal, CompressedChangeNode, CompressedPlaceholderTree, CompressedTraits, ConstraintInternal, DetachInternal, EditChunkContents, EditChunkContents_0_1_1, EditLogSummary, FluidEditHandle, ghostSessionId, InsertInternal, InternalizedChange, reservedIdCount, SetValueInternal, SharedTreeEditOp, SharedTreeHandleOp, SharedTreeOp, SharedTreeSummary, StablePlaceInternal, StableRangeInternal, TraitLocationInternal, } from './0.1.1.js';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/persisted-types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,aAAa,EACb,SAAS,EACT,oBAAoB,EACpB,QAAQ,EACR,OAAO,EACP,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,IAAI,EACJ,yBAAyB,EACzB,yBAAyB,EACzB,2BAA2B,EAC3B,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,WAAW,EACX,WAAW,GACX,MAAM,SAAS,CAAC;AACjB,OAAO,EACN,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,UAAU,EACV,uBAAuB,EACvB,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,yBAAyB,EACzB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,GACrB,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/persisted-types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,aAAa,EACb,SAAS,EACT,oBAAoB,EACpB,QAAQ,EACR,OAAO,EACP,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,IAAI,EACJ,yBAAyB,EACzB,yBAAyB,EACzB,2BAA2B,EAC3B,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,WAAW,EACX,WAAW,GACX,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,UAAU,EACV,uBAAuB,EACvB,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,yBAAyB,EACzB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,GACrB,MAAM,YAAY,CAAC"}
@@ -6,17 +6,17 @@
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.StableRangeInternal = exports.StablePlaceInternal = exports.reservedIdCount = exports.ghostSessionId = exports.ChangeInternal = exports.WriteFormat = exports.Side = exports.SharedTreeOpType = exports.EditStatus = exports.ConstraintEffect = exports.ChangeTypeInternal = void 0;
8
8
  // API Exports
9
- var _0_0_2_1 = require("./0.0.2");
10
- Object.defineProperty(exports, "ChangeTypeInternal", { enumerable: true, get: function () { return _0_0_2_1.ChangeTypeInternal; } });
11
- Object.defineProperty(exports, "ConstraintEffect", { enumerable: true, get: function () { return _0_0_2_1.ConstraintEffect; } });
12
- Object.defineProperty(exports, "EditStatus", { enumerable: true, get: function () { return _0_0_2_1.EditStatus; } });
13
- Object.defineProperty(exports, "SharedTreeOpType", { enumerable: true, get: function () { return _0_0_2_1.SharedTreeOpType; } });
14
- Object.defineProperty(exports, "Side", { enumerable: true, get: function () { return _0_0_2_1.Side; } });
15
- Object.defineProperty(exports, "WriteFormat", { enumerable: true, get: function () { return _0_0_2_1.WriteFormat; } });
16
- var _0_1_1_1 = require("./0.1.1");
17
- Object.defineProperty(exports, "ChangeInternal", { enumerable: true, get: function () { return _0_1_1_1.ChangeInternal; } });
18
- Object.defineProperty(exports, "ghostSessionId", { enumerable: true, get: function () { return _0_1_1_1.ghostSessionId; } });
19
- Object.defineProperty(exports, "reservedIdCount", { enumerable: true, get: function () { return _0_1_1_1.reservedIdCount; } });
20
- Object.defineProperty(exports, "StablePlaceInternal", { enumerable: true, get: function () { return _0_1_1_1.StablePlaceInternal; } });
21
- Object.defineProperty(exports, "StableRangeInternal", { enumerable: true, get: function () { return _0_1_1_1.StableRangeInternal; } });
9
+ var _0_0_2_js_1 = require("./0.0.2.js");
10
+ Object.defineProperty(exports, "ChangeTypeInternal", { enumerable: true, get: function () { return _0_0_2_js_1.ChangeTypeInternal; } });
11
+ Object.defineProperty(exports, "ConstraintEffect", { enumerable: true, get: function () { return _0_0_2_js_1.ConstraintEffect; } });
12
+ Object.defineProperty(exports, "EditStatus", { enumerable: true, get: function () { return _0_0_2_js_1.EditStatus; } });
13
+ Object.defineProperty(exports, "SharedTreeOpType", { enumerable: true, get: function () { return _0_0_2_js_1.SharedTreeOpType; } });
14
+ Object.defineProperty(exports, "Side", { enumerable: true, get: function () { return _0_0_2_js_1.Side; } });
15
+ Object.defineProperty(exports, "WriteFormat", { enumerable: true, get: function () { return _0_0_2_js_1.WriteFormat; } });
16
+ var _0_1_1_js_1 = require("./0.1.1.js");
17
+ Object.defineProperty(exports, "ChangeInternal", { enumerable: true, get: function () { return _0_1_1_js_1.ChangeInternal; } });
18
+ Object.defineProperty(exports, "ghostSessionId", { enumerable: true, get: function () { return _0_1_1_js_1.ghostSessionId; } });
19
+ Object.defineProperty(exports, "reservedIdCount", { enumerable: true, get: function () { return _0_1_1_js_1.reservedIdCount; } });
20
+ Object.defineProperty(exports, "StablePlaceInternal", { enumerable: true, get: function () { return _0_1_1_js_1.StablePlaceInternal; } });
21
+ Object.defineProperty(exports, "StableRangeInternal", { enumerable: true, get: function () { return _0_1_1_js_1.StableRangeInternal; } });
22
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/persisted-types/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,cAAc;AAEd,kCAmCiB;AA9BhB,4GAAA,kBAAkB,OAAA;AAClB,0GAAA,gBAAgB,OAAA;AAKhB,oGAAA,UAAU,OAAA;AAWV,0GAAA,gBAAgB,OAAA;AAIhB,8FAAA,IAAI,OAAA;AAQJ,qGAAA,WAAW,OAAA;AAEZ,kCA6BiB;AA1BhB,wGAAA,cAAc,OAAA;AAcd,wGAAA,cAAc,OAAA;AAGd,yGAAA,eAAe,OAAA;AAMf,6GAAA,mBAAmB,OAAA;AACnB,6GAAA,mBAAmB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// API Exports\n\nexport {\n\tBuildInternal_0_0_2,\n\tBuildNodeInternal_0_0_2,\n\tChangeInternal_0_0_2,\n\tChangeNode_0_0_2,\n\tChangeTypeInternal,\n\tConstraintEffect,\n\tConstraintInternal_0_0_2,\n\tDetachInternal_0_0_2,\n\tEdit,\n\tEditBase,\n\tEditStatus,\n\tEditWithoutId,\n\tHasTraits,\n\tInsertInternal_0_0_2,\n\tNodeData,\n\tPayload,\n\tPlaceholderTree,\n\tSetValueInternal_0_0_2,\n\tSharedTreeEditOp_0_0_2,\n\tSharedTreeNoOp,\n\tSharedTreeOp_0_0_2,\n\tSharedTreeOpType,\n\tSharedTreeSummary_0_0_2,\n\tSharedTreeSummaryBase,\n\tSharedTreeUpdateOp,\n\tSide,\n\tStablePlaceInternal_0_0_2,\n\tStableRangeInternal_0_0_2,\n\tTraitLocationInternal_0_0_2,\n\tTraitMap,\n\tTreeNode,\n\tTreeNodeSequence,\n\tVersionedOp,\n\tWriteFormat,\n} from './0.0.2';\nexport {\n\tBuildInternal,\n\tBuildNodeInternal,\n\tChangeInternal,\n\tChangeNode,\n\tCompressedBuildInternal,\n\tCompressedBuildNode,\n\tCompressedChangeInternal,\n\tCompressedChangeNode,\n\tCompressedPlaceholderTree,\n\tCompressedTraits,\n\tConstraintInternal,\n\tDetachInternal,\n\tEditChunkContents,\n\tEditChunkContents_0_1_1,\n\tEditLogSummary,\n\tFluidEditHandle,\n\tghostSessionId,\n\tInsertInternal,\n\tInternalizedChange,\n\treservedIdCount,\n\tSetValueInternal,\n\tSharedTreeEditOp,\n\tSharedTreeHandleOp,\n\tSharedTreeOp,\n\tSharedTreeSummary,\n\tStablePlaceInternal,\n\tStableRangeInternal,\n\tTraitLocationInternal,\n} from './0.1.1';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/persisted-types/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,cAAc;AAEd,wCAmCoB;AA9BnB,+GAAA,kBAAkB,OAAA;AAClB,6GAAA,gBAAgB,OAAA;AAKhB,uGAAA,UAAU,OAAA;AAWV,6GAAA,gBAAgB,OAAA;AAIhB,iGAAA,IAAI,OAAA;AAQJ,wGAAA,WAAW,OAAA;AAEZ,wCA6BoB;AA1BnB,2GAAA,cAAc,OAAA;AAcd,2GAAA,cAAc,OAAA;AAGd,4GAAA,eAAe,OAAA;AAMf,gHAAA,mBAAmB,OAAA;AACnB,gHAAA,mBAAmB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// API Exports\n\nexport {\n\tBuildInternal_0_0_2,\n\tBuildNodeInternal_0_0_2,\n\tChangeInternal_0_0_2,\n\tChangeNode_0_0_2,\n\tChangeTypeInternal,\n\tConstraintEffect,\n\tConstraintInternal_0_0_2,\n\tDetachInternal_0_0_2,\n\tEdit,\n\tEditBase,\n\tEditStatus,\n\tEditWithoutId,\n\tHasTraits,\n\tInsertInternal_0_0_2,\n\tNodeData,\n\tPayload,\n\tPlaceholderTree,\n\tSetValueInternal_0_0_2,\n\tSharedTreeEditOp_0_0_2,\n\tSharedTreeNoOp,\n\tSharedTreeOp_0_0_2,\n\tSharedTreeOpType,\n\tSharedTreeSummary_0_0_2,\n\tSharedTreeSummaryBase,\n\tSharedTreeUpdateOp,\n\tSide,\n\tStablePlaceInternal_0_0_2,\n\tStableRangeInternal_0_0_2,\n\tTraitLocationInternal_0_0_2,\n\tTraitMap,\n\tTreeNode,\n\tTreeNodeSequence,\n\tVersionedOp,\n\tWriteFormat,\n} from './0.0.2.js';\nexport {\n\tBuildInternal,\n\tBuildNodeInternal,\n\tChangeInternal,\n\tChangeNode,\n\tCompressedBuildInternal,\n\tCompressedBuildNode,\n\tCompressedChangeInternal,\n\tCompressedChangeNode,\n\tCompressedPlaceholderTree,\n\tCompressedTraits,\n\tConstraintInternal,\n\tDetachInternal,\n\tEditChunkContents,\n\tEditChunkContents_0_1_1,\n\tEditLogSummary,\n\tFluidEditHandle,\n\tghostSessionId,\n\tInsertInternal,\n\tInternalizedChange,\n\treservedIdCount,\n\tSetValueInternal,\n\tSharedTreeEditOp,\n\tSharedTreeHandleOp,\n\tSharedTreeOp,\n\tSharedTreeSummary,\n\tStablePlaceInternal,\n\tStableRangeInternal,\n\tTraitLocationInternal,\n} from './0.1.1.js';\n"]}