@fluidframework/container-runtime 2.12.0 → 2.20.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 (440) hide show
  1. package/.eslintrc.cjs +36 -0
  2. package/CHANGELOG.md +50 -0
  3. package/api-report/container-runtime.legacy.alpha.api.md +9 -203
  4. package/container-runtime.test-files.tar +0 -0
  5. package/dist/batchTracker.d.ts.map +1 -1
  6. package/dist/batchTracker.js.map +1 -1
  7. package/dist/blobManager/blobManager.d.ts +5 -1
  8. package/dist/blobManager/blobManager.d.ts.map +1 -1
  9. package/dist/blobManager/blobManager.js +16 -2
  10. package/dist/blobManager/blobManager.js.map +1 -1
  11. package/dist/blobManager/blobManagerSnapSum.d.ts.map +1 -1
  12. package/dist/blobManager/blobManagerSnapSum.js.map +1 -1
  13. package/dist/channelCollection.d.ts +23 -12
  14. package/dist/channelCollection.d.ts.map +1 -1
  15. package/dist/channelCollection.js +22 -12
  16. package/dist/channelCollection.js.map +1 -1
  17. package/dist/connectionTelemetry.d.ts.map +1 -1
  18. package/dist/connectionTelemetry.js +6 -2
  19. package/dist/connectionTelemetry.js.map +1 -1
  20. package/dist/containerHandleContext.d.ts +1 -1
  21. package/dist/containerHandleContext.d.ts.map +1 -1
  22. package/dist/containerHandleContext.js.map +1 -1
  23. package/dist/containerRuntime.d.ts +74 -65
  24. package/dist/containerRuntime.d.ts.map +1 -1
  25. package/dist/containerRuntime.js +53 -37
  26. package/dist/containerRuntime.js.map +1 -1
  27. package/dist/dataStore.d.ts +7 -3
  28. package/dist/dataStore.d.ts.map +1 -1
  29. package/dist/dataStore.js +2 -1
  30. package/dist/dataStore.js.map +1 -1
  31. package/dist/dataStoreContext.d.ts +41 -25
  32. package/dist/dataStoreContext.d.ts.map +1 -1
  33. package/dist/dataStoreContext.js +31 -18
  34. package/dist/dataStoreContext.js.map +1 -1
  35. package/dist/dataStoreContexts.d.ts +6 -2
  36. package/dist/dataStoreContexts.d.ts.map +1 -1
  37. package/dist/dataStoreContexts.js +6 -2
  38. package/dist/dataStoreContexts.js.map +1 -1
  39. package/dist/dataStoreRegistry.d.ts +1 -1
  40. package/dist/dataStoreRegistry.d.ts.map +1 -1
  41. package/dist/dataStoreRegistry.js.map +1 -1
  42. package/dist/deltaManagerProxies.d.ts +1 -17
  43. package/dist/deltaManagerProxies.d.ts.map +1 -1
  44. package/dist/deltaManagerProxies.js.map +1 -1
  45. package/dist/deltaScheduler.d.ts +9 -6
  46. package/dist/deltaScheduler.d.ts.map +1 -1
  47. package/dist/deltaScheduler.js +95 -89
  48. package/dist/deltaScheduler.js.map +1 -1
  49. package/dist/gc/garbageCollection.d.ts +21 -7
  50. package/dist/gc/garbageCollection.d.ts.map +1 -1
  51. package/dist/gc/garbageCollection.js +12 -5
  52. package/dist/gc/garbageCollection.js.map +1 -1
  53. package/dist/gc/gcConfigs.d.ts +11 -0
  54. package/dist/gc/gcConfigs.d.ts.map +1 -1
  55. package/dist/gc/gcConfigs.js +2 -1
  56. package/dist/gc/gcConfigs.js.map +1 -1
  57. package/dist/gc/gcDefinitions.d.ts +210 -70
  58. package/dist/gc/gcDefinitions.d.ts.map +1 -1
  59. package/dist/gc/gcDefinitions.js +39 -13
  60. package/dist/gc/gcDefinitions.js.map +1 -1
  61. package/dist/gc/gcHelpers.d.ts +6 -2
  62. package/dist/gc/gcHelpers.d.ts.map +1 -1
  63. package/dist/gc/gcHelpers.js +6 -2
  64. package/dist/gc/gcHelpers.js.map +1 -1
  65. package/dist/gc/gcSummaryDefinitions.d.ts +18 -6
  66. package/dist/gc/gcSummaryDefinitions.d.ts.map +1 -1
  67. package/dist/gc/gcSummaryDefinitions.js.map +1 -1
  68. package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
  69. package/dist/gc/gcSummaryStateTracker.js.map +1 -1
  70. package/dist/gc/gcTelemetry.d.ts +33 -11
  71. package/dist/gc/gcTelemetry.d.ts.map +1 -1
  72. package/dist/gc/gcTelemetry.js +6 -2
  73. package/dist/gc/gcTelemetry.js.map +1 -1
  74. package/dist/gc/gcUnreferencedStateTracker.d.ts +42 -13
  75. package/dist/gc/gcUnreferencedStateTracker.d.ts.map +1 -1
  76. package/dist/gc/gcUnreferencedStateTracker.js +27 -9
  77. package/dist/gc/gcUnreferencedStateTracker.js.map +1 -1
  78. package/dist/gc/index.d.ts +1 -0
  79. package/dist/gc/index.d.ts.map +1 -1
  80. package/dist/gc/index.js +3 -1
  81. package/dist/gc/index.js.map +1 -1
  82. package/dist/inboundBatchAggregator.d.ts +34 -0
  83. package/dist/inboundBatchAggregator.d.ts.map +1 -0
  84. package/dist/inboundBatchAggregator.js +185 -0
  85. package/dist/inboundBatchAggregator.js.map +1 -0
  86. package/dist/index.d.ts +1 -1
  87. package/dist/index.d.ts.map +1 -1
  88. package/dist/index.js.map +1 -1
  89. package/dist/legacy.d.ts +0 -4
  90. package/dist/messageTypes.d.ts +14 -5
  91. package/dist/messageTypes.d.ts.map +1 -1
  92. package/dist/messageTypes.js.map +1 -1
  93. package/dist/metadata.d.ts +12 -4
  94. package/dist/metadata.d.ts.map +1 -1
  95. package/dist/metadata.js +6 -2
  96. package/dist/metadata.js.map +1 -1
  97. package/dist/opLifecycle/batchManager.d.ts +9 -3
  98. package/dist/opLifecycle/batchManager.d.ts.map +1 -1
  99. package/dist/opLifecycle/batchManager.js +3 -1
  100. package/dist/opLifecycle/batchManager.js.map +1 -1
  101. package/dist/opLifecycle/duplicateBatchDetector.d.ts +9 -3
  102. package/dist/opLifecycle/duplicateBatchDetector.d.ts.map +1 -1
  103. package/dist/opLifecycle/duplicateBatchDetector.js +9 -3
  104. package/dist/opLifecycle/duplicateBatchDetector.js.map +1 -1
  105. package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
  106. package/dist/opLifecycle/opCompressor.js.map +1 -1
  107. package/dist/opLifecycle/opDecompressor.d.ts +3 -1
  108. package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
  109. package/dist/opLifecycle/opDecompressor.js +12 -8
  110. package/dist/opLifecycle/opDecompressor.js.map +1 -1
  111. package/dist/opLifecycle/opGroupingManager.d.ts +0 -1
  112. package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
  113. package/dist/opLifecycle/opGroupingManager.js +5 -4
  114. package/dist/opLifecycle/opGroupingManager.js.map +1 -1
  115. package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
  116. package/dist/opLifecycle/opSplitter.js +2 -1
  117. package/dist/opLifecycle/opSplitter.js.map +1 -1
  118. package/dist/opLifecycle/outbox.d.ts +1 -1
  119. package/dist/opLifecycle/outbox.d.ts.map +1 -1
  120. package/dist/opLifecycle/outbox.js +6 -1
  121. package/dist/opLifecycle/outbox.js.map +1 -1
  122. package/dist/opLifecycle/remoteMessageProcessor.d.ts +9 -3
  123. package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
  124. package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
  125. package/dist/package.json +2 -1
  126. package/dist/packageVersion.d.ts +1 -1
  127. package/dist/packageVersion.js +1 -1
  128. package/dist/packageVersion.js.map +1 -1
  129. package/dist/pendingStateManager.d.ts +22 -6
  130. package/dist/pendingStateManager.d.ts.map +1 -1
  131. package/dist/pendingStateManager.js +43 -5
  132. package/dist/pendingStateManager.js.map +1 -1
  133. package/dist/summary/documentSchema.d.ts.map +1 -1
  134. package/dist/summary/documentSchema.js +2 -0
  135. package/dist/summary/documentSchema.js.map +1 -1
  136. package/dist/summary/index.d.ts +1 -1
  137. package/dist/summary/index.d.ts.map +1 -1
  138. package/dist/summary/index.js.map +1 -1
  139. package/dist/summary/orderedClientElection.d.ts +93 -31
  140. package/dist/summary/orderedClientElection.d.ts.map +1 -1
  141. package/dist/summary/orderedClientElection.js +15 -5
  142. package/dist/summary/orderedClientElection.js.map +1 -1
  143. package/dist/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
  144. package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
  145. package/dist/summary/runningSummarizer.d.ts +17 -6
  146. package/dist/summary/runningSummarizer.d.ts.map +1 -1
  147. package/dist/summary/runningSummarizer.js +12 -4
  148. package/dist/summary/runningSummarizer.js.map +1 -1
  149. package/dist/summary/summarizer.d.ts +9 -5
  150. package/dist/summary/summarizer.d.ts.map +1 -1
  151. package/dist/summary/summarizer.js +9 -3
  152. package/dist/summary/summarizer.js.map +1 -1
  153. package/dist/summary/summarizerClientElection.d.ts.map +1 -1
  154. package/dist/summary/summarizerClientElection.js.map +1 -1
  155. package/dist/summary/summarizerHeuristics.d.ts +6 -2
  156. package/dist/summary/summarizerHeuristics.d.ts.map +1 -1
  157. package/dist/summary/summarizerHeuristics.js +12 -4
  158. package/dist/summary/summarizerHeuristics.js.map +1 -1
  159. package/dist/summary/summarizerNode/summarizerNode.d.ts +24 -8
  160. package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
  161. package/dist/summary/summarizerNode/summarizerNode.js +15 -5
  162. package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
  163. package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +48 -16
  164. package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
  165. package/dist/summary/summarizerNode/summarizerNodeUtils.js +3 -1
  166. package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
  167. package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +12 -4
  168. package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
  169. package/dist/summary/summarizerNode/summarizerNodeWithGc.js +12 -4
  170. package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
  171. package/dist/summary/summarizerTypes.d.ts +246 -135
  172. package/dist/summary/summarizerTypes.d.ts.map +1 -1
  173. package/dist/summary/summarizerTypes.js.map +1 -1
  174. package/dist/summary/summaryCollection.d.ts.map +1 -1
  175. package/dist/summary/summaryCollection.js +1 -4
  176. package/dist/summary/summaryCollection.js.map +1 -1
  177. package/dist/summary/summaryFormat.d.ts +24 -8
  178. package/dist/summary/summaryFormat.d.ts.map +1 -1
  179. package/dist/summary/summaryFormat.js.map +1 -1
  180. package/dist/summary/summaryGenerator.d.ts +9 -3
  181. package/dist/summary/summaryGenerator.d.ts.map +1 -1
  182. package/dist/summary/summaryGenerator.js +3 -1
  183. package/dist/summary/summaryGenerator.js.map +1 -1
  184. package/dist/summary/summaryManager.d.ts +8 -4
  185. package/dist/summary/summaryManager.d.ts.map +1 -1
  186. package/dist/summary/summaryManager.js +12 -4
  187. package/dist/summary/summaryManager.js.map +1 -1
  188. package/dist/throttler.d.ts +26 -10
  189. package/dist/throttler.d.ts.map +1 -1
  190. package/dist/throttler.js +12 -4
  191. package/dist/throttler.js.map +1 -1
  192. package/lib/batchTracker.d.ts.map +1 -1
  193. package/lib/batchTracker.js.map +1 -1
  194. package/lib/blobManager/blobManager.d.ts +5 -1
  195. package/lib/blobManager/blobManager.d.ts.map +1 -1
  196. package/lib/blobManager/blobManager.js +16 -2
  197. package/lib/blobManager/blobManager.js.map +1 -1
  198. package/lib/blobManager/blobManagerSnapSum.d.ts.map +1 -1
  199. package/lib/blobManager/blobManagerSnapSum.js.map +1 -1
  200. package/lib/channelCollection.d.ts +23 -12
  201. package/lib/channelCollection.d.ts.map +1 -1
  202. package/lib/channelCollection.js +22 -12
  203. package/lib/channelCollection.js.map +1 -1
  204. package/lib/connectionTelemetry.d.ts.map +1 -1
  205. package/lib/connectionTelemetry.js +6 -2
  206. package/lib/connectionTelemetry.js.map +1 -1
  207. package/lib/containerHandleContext.d.ts +1 -1
  208. package/lib/containerHandleContext.d.ts.map +1 -1
  209. package/lib/containerHandleContext.js.map +1 -1
  210. package/lib/containerRuntime.d.ts +74 -65
  211. package/lib/containerRuntime.d.ts.map +1 -1
  212. package/lib/containerRuntime.js +53 -37
  213. package/lib/containerRuntime.js.map +1 -1
  214. package/lib/dataStore.d.ts +7 -3
  215. package/lib/dataStore.d.ts.map +1 -1
  216. package/lib/dataStore.js +2 -1
  217. package/lib/dataStore.js.map +1 -1
  218. package/lib/dataStoreContext.d.ts +41 -25
  219. package/lib/dataStoreContext.d.ts.map +1 -1
  220. package/lib/dataStoreContext.js +31 -18
  221. package/lib/dataStoreContext.js.map +1 -1
  222. package/lib/dataStoreContexts.d.ts +6 -2
  223. package/lib/dataStoreContexts.d.ts.map +1 -1
  224. package/lib/dataStoreContexts.js +6 -2
  225. package/lib/dataStoreContexts.js.map +1 -1
  226. package/lib/dataStoreRegistry.d.ts +1 -1
  227. package/lib/dataStoreRegistry.d.ts.map +1 -1
  228. package/lib/dataStoreRegistry.js.map +1 -1
  229. package/lib/deltaManagerProxies.d.ts +1 -17
  230. package/lib/deltaManagerProxies.d.ts.map +1 -1
  231. package/lib/deltaManagerProxies.js.map +1 -1
  232. package/lib/deltaScheduler.d.ts +9 -6
  233. package/lib/deltaScheduler.d.ts.map +1 -1
  234. package/lib/deltaScheduler.js +95 -89
  235. package/lib/deltaScheduler.js.map +1 -1
  236. package/lib/gc/garbageCollection.d.ts +21 -7
  237. package/lib/gc/garbageCollection.d.ts.map +1 -1
  238. package/lib/gc/garbageCollection.js +12 -5
  239. package/lib/gc/garbageCollection.js.map +1 -1
  240. package/lib/gc/gcConfigs.d.ts +11 -0
  241. package/lib/gc/gcConfigs.d.ts.map +1 -1
  242. package/lib/gc/gcConfigs.js +1 -1
  243. package/lib/gc/gcConfigs.js.map +1 -1
  244. package/lib/gc/gcDefinitions.d.ts +210 -70
  245. package/lib/gc/gcDefinitions.d.ts.map +1 -1
  246. package/lib/gc/gcDefinitions.js +39 -13
  247. package/lib/gc/gcDefinitions.js.map +1 -1
  248. package/lib/gc/gcHelpers.d.ts +6 -2
  249. package/lib/gc/gcHelpers.d.ts.map +1 -1
  250. package/lib/gc/gcHelpers.js +6 -2
  251. package/lib/gc/gcHelpers.js.map +1 -1
  252. package/lib/gc/gcSummaryDefinitions.d.ts +18 -6
  253. package/lib/gc/gcSummaryDefinitions.d.ts.map +1 -1
  254. package/lib/gc/gcSummaryDefinitions.js.map +1 -1
  255. package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
  256. package/lib/gc/gcSummaryStateTracker.js.map +1 -1
  257. package/lib/gc/gcTelemetry.d.ts +33 -11
  258. package/lib/gc/gcTelemetry.d.ts.map +1 -1
  259. package/lib/gc/gcTelemetry.js +6 -2
  260. package/lib/gc/gcTelemetry.js.map +1 -1
  261. package/lib/gc/gcUnreferencedStateTracker.d.ts +42 -13
  262. package/lib/gc/gcUnreferencedStateTracker.d.ts.map +1 -1
  263. package/lib/gc/gcUnreferencedStateTracker.js +27 -9
  264. package/lib/gc/gcUnreferencedStateTracker.js.map +1 -1
  265. package/lib/gc/index.d.ts +1 -0
  266. package/lib/gc/index.d.ts.map +1 -1
  267. package/lib/gc/index.js +1 -0
  268. package/lib/gc/index.js.map +1 -1
  269. package/lib/inboundBatchAggregator.d.ts +34 -0
  270. package/lib/inboundBatchAggregator.d.ts.map +1 -0
  271. package/lib/inboundBatchAggregator.js +181 -0
  272. package/lib/inboundBatchAggregator.js.map +1 -0
  273. package/lib/index.d.ts +1 -1
  274. package/lib/index.d.ts.map +1 -1
  275. package/lib/index.js.map +1 -1
  276. package/lib/legacy.d.ts +0 -4
  277. package/lib/messageTypes.d.ts +14 -5
  278. package/lib/messageTypes.d.ts.map +1 -1
  279. package/lib/messageTypes.js.map +1 -1
  280. package/lib/metadata.d.ts +12 -4
  281. package/lib/metadata.d.ts.map +1 -1
  282. package/lib/metadata.js +6 -2
  283. package/lib/metadata.js.map +1 -1
  284. package/lib/opLifecycle/batchManager.d.ts +9 -3
  285. package/lib/opLifecycle/batchManager.d.ts.map +1 -1
  286. package/lib/opLifecycle/batchManager.js +3 -1
  287. package/lib/opLifecycle/batchManager.js.map +1 -1
  288. package/lib/opLifecycle/duplicateBatchDetector.d.ts +9 -3
  289. package/lib/opLifecycle/duplicateBatchDetector.d.ts.map +1 -1
  290. package/lib/opLifecycle/duplicateBatchDetector.js +9 -3
  291. package/lib/opLifecycle/duplicateBatchDetector.js.map +1 -1
  292. package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
  293. package/lib/opLifecycle/opCompressor.js +1 -1
  294. package/lib/opLifecycle/opCompressor.js.map +1 -1
  295. package/lib/opLifecycle/opDecompressor.d.ts +3 -1
  296. package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
  297. package/lib/opLifecycle/opDecompressor.js +13 -9
  298. package/lib/opLifecycle/opDecompressor.js.map +1 -1
  299. package/lib/opLifecycle/opGroupingManager.d.ts +0 -1
  300. package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
  301. package/lib/opLifecycle/opGroupingManager.js +6 -5
  302. package/lib/opLifecycle/opGroupingManager.js.map +1 -1
  303. package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
  304. package/lib/opLifecycle/opSplitter.js +2 -1
  305. package/lib/opLifecycle/opSplitter.js.map +1 -1
  306. package/lib/opLifecycle/outbox.d.ts +1 -1
  307. package/lib/opLifecycle/outbox.d.ts.map +1 -1
  308. package/lib/opLifecycle/outbox.js +6 -1
  309. package/lib/opLifecycle/outbox.js.map +1 -1
  310. package/lib/opLifecycle/remoteMessageProcessor.d.ts +9 -3
  311. package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
  312. package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -1
  313. package/lib/packageVersion.d.ts +1 -1
  314. package/lib/packageVersion.js +1 -1
  315. package/lib/packageVersion.js.map +1 -1
  316. package/lib/pendingStateManager.d.ts +22 -6
  317. package/lib/pendingStateManager.d.ts.map +1 -1
  318. package/lib/pendingStateManager.js +41 -4
  319. package/lib/pendingStateManager.js.map +1 -1
  320. package/lib/summary/documentSchema.d.ts.map +1 -1
  321. package/lib/summary/documentSchema.js +2 -0
  322. package/lib/summary/documentSchema.js.map +1 -1
  323. package/lib/summary/index.d.ts +1 -1
  324. package/lib/summary/index.d.ts.map +1 -1
  325. package/lib/summary/index.js.map +1 -1
  326. package/lib/summary/orderedClientElection.d.ts +93 -31
  327. package/lib/summary/orderedClientElection.d.ts.map +1 -1
  328. package/lib/summary/orderedClientElection.js +15 -5
  329. package/lib/summary/orderedClientElection.js.map +1 -1
  330. package/lib/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
  331. package/lib/summary/runWhileConnectedCoordinator.js.map +1 -1
  332. package/lib/summary/runningSummarizer.d.ts +17 -6
  333. package/lib/summary/runningSummarizer.d.ts.map +1 -1
  334. package/lib/summary/runningSummarizer.js +12 -4
  335. package/lib/summary/runningSummarizer.js.map +1 -1
  336. package/lib/summary/summarizer.d.ts +9 -5
  337. package/lib/summary/summarizer.d.ts.map +1 -1
  338. package/lib/summary/summarizer.js +9 -3
  339. package/lib/summary/summarizer.js.map +1 -1
  340. package/lib/summary/summarizerClientElection.d.ts.map +1 -1
  341. package/lib/summary/summarizerClientElection.js.map +1 -1
  342. package/lib/summary/summarizerHeuristics.d.ts +6 -2
  343. package/lib/summary/summarizerHeuristics.d.ts.map +1 -1
  344. package/lib/summary/summarizerHeuristics.js +12 -4
  345. package/lib/summary/summarizerHeuristics.js.map +1 -1
  346. package/lib/summary/summarizerNode/summarizerNode.d.ts +24 -8
  347. package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
  348. package/lib/summary/summarizerNode/summarizerNode.js +15 -5
  349. package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
  350. package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +48 -16
  351. package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
  352. package/lib/summary/summarizerNode/summarizerNodeUtils.js +3 -1
  353. package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
  354. package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +12 -4
  355. package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
  356. package/lib/summary/summarizerNode/summarizerNodeWithGc.js +12 -4
  357. package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
  358. package/lib/summary/summarizerTypes.d.ts +246 -135
  359. package/lib/summary/summarizerTypes.d.ts.map +1 -1
  360. package/lib/summary/summarizerTypes.js.map +1 -1
  361. package/lib/summary/summaryCollection.d.ts.map +1 -1
  362. package/lib/summary/summaryCollection.js +1 -4
  363. package/lib/summary/summaryCollection.js.map +1 -1
  364. package/lib/summary/summaryFormat.d.ts +24 -8
  365. package/lib/summary/summaryFormat.d.ts.map +1 -1
  366. package/lib/summary/summaryFormat.js.map +1 -1
  367. package/lib/summary/summaryGenerator.d.ts +9 -3
  368. package/lib/summary/summaryGenerator.d.ts.map +1 -1
  369. package/lib/summary/summaryGenerator.js +3 -1
  370. package/lib/summary/summaryGenerator.js.map +1 -1
  371. package/lib/summary/summaryManager.d.ts +8 -4
  372. package/lib/summary/summaryManager.d.ts.map +1 -1
  373. package/lib/summary/summaryManager.js +12 -4
  374. package/lib/summary/summaryManager.js.map +1 -1
  375. package/lib/throttler.d.ts +26 -10
  376. package/lib/throttler.d.ts.map +1 -1
  377. package/lib/throttler.js +12 -4
  378. package/lib/throttler.js.map +1 -1
  379. package/package.json +44 -31
  380. package/src/batchTracker.ts +31 -33
  381. package/src/blobManager/blobManager.ts +38 -19
  382. package/src/blobManager/blobManagerSnapSum.ts +1 -1
  383. package/src/channelCollection.ts +44 -37
  384. package/src/connectionTelemetry.ts +31 -13
  385. package/src/containerHandleContext.ts +2 -2
  386. package/src/containerRuntime.ts +198 -140
  387. package/src/dataStore.ts +11 -6
  388. package/src/dataStoreContext.ts +80 -59
  389. package/src/dataStoreContexts.ts +16 -12
  390. package/src/dataStoreRegistry.ts +1 -1
  391. package/src/deltaManagerProxies.ts +5 -5
  392. package/src/deltaScheduler.ts +19 -13
  393. package/src/gc/garbageCollection.ts +41 -18
  394. package/src/gc/gcConfigs.ts +4 -4
  395. package/src/gc/gcDefinitions.ts +212 -70
  396. package/src/gc/gcHelpers.ts +11 -5
  397. package/src/gc/gcSummaryDefinitions.ts +18 -6
  398. package/src/gc/gcSummaryStateTracker.ts +4 -2
  399. package/src/gc/gcTelemetry.ts +47 -19
  400. package/src/gc/gcUnreferencedStateTracker.ts +40 -16
  401. package/src/gc/index.ts +1 -0
  402. package/src/{scheduleManager.ts → inboundBatchAggregator.ts} +54 -121
  403. package/src/index.ts +0 -3
  404. package/src/messageTypes.ts +14 -5
  405. package/src/metadata.ts +12 -4
  406. package/src/opLifecycle/batchManager.ts +12 -6
  407. package/src/opLifecycle/duplicateBatchDetector.ts +10 -4
  408. package/src/opLifecycle/opCompressor.ts +8 -4
  409. package/src/opLifecycle/opDecompressor.ts +20 -11
  410. package/src/opLifecycle/opGroupingManager.ts +12 -8
  411. package/src/opLifecycle/opSplitter.ts +11 -8
  412. package/src/opLifecycle/outbox.ts +22 -13
  413. package/src/opLifecycle/remoteMessageProcessor.ts +10 -4
  414. package/src/packageVersion.ts +1 -1
  415. package/src/pendingStateManager.ts +71 -15
  416. package/src/summary/documentSchema.ts +30 -18
  417. package/src/summary/index.ts +0 -3
  418. package/src/summary/orderedClientElection.ts +100 -38
  419. package/src/summary/runWhileConnectedCoordinator.ts +6 -3
  420. package/src/summary/runningSummarizer.ts +38 -19
  421. package/src/summary/summarizer.ts +29 -16
  422. package/src/summary/summarizerClientElection.ts +2 -2
  423. package/src/summary/summarizerHeuristics.ts +22 -11
  424. package/src/summary/summarizerNode/summarizerNode.ts +22 -12
  425. package/src/summary/summarizerNode/summarizerNodeUtils.ts +48 -16
  426. package/src/summary/summarizerNode/summarizerNodeWithGc.ts +21 -11
  427. package/src/summary/summarizerTypes.ts +246 -139
  428. package/src/summary/summaryCollection.ts +24 -25
  429. package/src/summary/summaryFormat.ts +24 -8
  430. package/src/summary/summaryGenerator.ts +14 -8
  431. package/src/summary/summaryManager.ts +28 -18
  432. package/src/throttler.ts +23 -11
  433. package/dist/scheduleManager.d.ts +0 -28
  434. package/dist/scheduleManager.d.ts.map +0 -1
  435. package/dist/scheduleManager.js +0 -235
  436. package/dist/scheduleManager.js.map +0 -1
  437. package/lib/scheduleManager.d.ts +0 -28
  438. package/lib/scheduleManager.d.ts.map +0 -1
  439. package/lib/scheduleManager.js +0 -231
  440. package/lib/scheduleManager.js.map +0 -1
package/src/dataStore.ts CHANGED
@@ -26,9 +26,13 @@ import { ContainerMessageType } from "./messageTypes.js";
26
26
  * alias to a datastore
27
27
  */
28
28
  export interface IDataStoreAliasMessage {
29
- /** The internal id of the datastore */
29
+ /**
30
+ * The internal id of the datastore
31
+ */
30
32
  readonly internalId: string;
31
- /** The alias name to be assigned to the datastore */
33
+ /**
34
+ * The alias name to be assigned to the datastore
35
+ */
32
36
  readonly alias: string;
33
37
  }
34
38
 
@@ -39,11 +43,12 @@ export interface IDataStoreAliasMessage {
39
43
  * @returns True if the {@link IDataStoreAliasMessage} is fully implemented, false otherwise
40
44
  */
41
45
  export const isDataStoreAliasMessage = (
42
- maybeDataStoreAliasMessage: any,
46
+ maybeDataStoreAliasMessage: unknown,
43
47
  ): maybeDataStoreAliasMessage is IDataStoreAliasMessage => {
44
48
  return (
45
- typeof maybeDataStoreAliasMessage?.internalId === "string" &&
46
- typeof maybeDataStoreAliasMessage?.alias === "string"
49
+ typeof (maybeDataStoreAliasMessage as Partial<IDataStoreAliasMessage>)?.internalId ===
50
+ "string" &&
51
+ typeof (maybeDataStoreAliasMessage as Partial<IDataStoreAliasMessage>)?.alias === "string"
47
52
  );
48
53
  };
49
54
 
@@ -187,7 +192,7 @@ class DataStore implements IDataStore {
187
192
  private async ackBasedPromise<T>(
188
193
  executor: (
189
194
  resolve: (value: T | PromiseLike<T>) => void,
190
- reject: (reason?: any) => void,
195
+ reject: (reason?: unknown) => void,
191
196
  ) => void,
192
197
  ): Promise<T> {
193
198
  let rejectBecauseDispose: () => void;
@@ -14,7 +14,11 @@ import {
14
14
  ITelemetryBaseProperties,
15
15
  type IEvent,
16
16
  } from "@fluidframework/core-interfaces";
17
- import { type IFluidHandleInternal } from "@fluidframework/core-interfaces/internal";
17
+ import {
18
+ type IFluidHandleContext,
19
+ type IFluidHandleInternal,
20
+ type ITelemetryBaseLogger,
21
+ } from "@fluidframework/core-interfaces/internal";
18
22
  import { assert, LazyPromise, unreachableCase } from "@fluidframework/core-utils/internal";
19
23
  import { IClientDetails, IQuorumClients } from "@fluidframework/driver-definitions";
20
24
  import {
@@ -104,7 +108,9 @@ export function createAttributesBlob(
104
108
  return new BlobTreeEntry(dataStoreAttributesBlobName, JSON.stringify(attributes));
105
109
  }
106
110
 
107
- /** @internal */
111
+ /**
112
+ * @internal
113
+ */
108
114
  export interface ISnapshotDetails {
109
115
  pkg: readonly string[];
110
116
  isRootDataStore: boolean;
@@ -152,10 +158,6 @@ export interface ILocalFluidDataStoreContextProps extends IFluidDataStoreContext
152
158
  readonly pkg: Readonly<string[]> | undefined;
153
159
  readonly snapshotTree: ISnapshotTree | undefined;
154
160
  readonly makeLocallyVisibleFn: () => void;
155
- /**
156
- * @deprecated 0.16 Issue #1635, #3631
157
- */
158
- readonly createProps?: any;
159
161
  }
160
162
 
161
163
  /**
@@ -177,7 +179,9 @@ export interface IRemoteFluidDataStoreContextProps extends IFluidDataStoreContex
177
179
 
178
180
  // back-compat: To be removed in the future.
179
181
  // Added in "2.0.0-rc.2.0.0" timeframe (to support older builds).
180
- /** @internal */
182
+ /**
183
+ * @internal
184
+ */
181
185
  export interface IFluidDataStoreContextEvents extends IEvent {
182
186
  (event: "attaching" | "attached", listener: () => void);
183
187
  }
@@ -195,7 +199,7 @@ export abstract class FluidDataStoreContext
195
199
  return this.pkg;
196
200
  }
197
201
 
198
- public get options(): Record<string | number, any> {
202
+ public get options(): Record<string | number, unknown> {
199
203
  return this.parentContext.options;
200
204
  }
201
205
 
@@ -207,7 +211,7 @@ export abstract class FluidDataStoreContext
207
211
  return this.parentContext.clientDetails;
208
212
  }
209
213
 
210
- public get baseLogger() {
214
+ public get baseLogger(): ITelemetryBaseLogger {
211
215
  return this.parentContext.baseLogger;
212
216
  }
213
217
 
@@ -219,7 +223,7 @@ export abstract class FluidDataStoreContext
219
223
  return this.parentContext.connected;
220
224
  }
221
225
 
222
- public get IFluidHandleContext() {
226
+ public get IFluidHandleContext(): IFluidHandleContext {
223
227
  return this.parentContext.IFluidHandleContext;
224
228
  }
225
229
 
@@ -239,7 +243,7 @@ export abstract class FluidDataStoreContext
239
243
  }
240
244
 
241
245
  private _disposed = false;
242
- public get disposed() {
246
+ public get disposed(): boolean {
243
247
  return this._disposed;
244
248
  }
245
249
 
@@ -248,7 +252,7 @@ export abstract class FluidDataStoreContext
248
252
  * Tombstoned objects are eventually deleted by GC.
249
253
  */
250
254
  private _tombstoned = false;
251
- public get tombstoned() {
255
+ public get tombstoned(): boolean {
252
256
  return this._tombstoned;
253
257
  }
254
258
  /**
@@ -261,7 +265,9 @@ export abstract class FluidDataStoreContext
261
265
  */
262
266
  public readonly gcTombstoneEnforcementAllowed: boolean = false;
263
267
 
264
- /** If true, this means that this data store context and its children have been removed from the runtime */
268
+ /**
269
+ * If true, this means that this data store context and its children have been removed from the runtime
270
+ */
265
271
  protected deleted: boolean = false;
266
272
 
267
273
  public get attachState(): AttachState {
@@ -289,6 +295,7 @@ export abstract class FluidDataStoreContext
289
295
  // We know that if the base snapshot is omitted, then the isRootDataStore flag is not set.
290
296
  // That means we can skip the expensive call to getInitialSnapshotDetails for virtualized datastores,
291
297
  // and get the information from the alias map directly.
298
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
292
299
  if (aliasedDataStores !== undefined && (this.baseSnapshot as any)?.omitted === true) {
293
300
  return aliasedDataStores.has(this.id);
294
301
  }
@@ -319,7 +326,9 @@ export abstract class FluidDataStoreContext
319
326
  protected detachedRuntimeCreation = false;
320
327
  protected channel: IFluidDataStoreChannel | undefined;
321
328
  private loaded = false;
322
- /** Tracks the messages for this data store that are sent while it's not loaded */
329
+ /**
330
+ * Tracks the messages for this data store that are sent while it's not loaded
331
+ */
323
332
  private pendingMessagesState: IPendingMessagesState | undefined = {
324
333
  messageCollections: [],
325
334
  pendingCount: 0,
@@ -378,7 +387,8 @@ export abstract class FluidDataStoreContext
378
387
  fullTree: boolean,
379
388
  trackState: boolean,
380
389
  telemetryContext?: ITelemetryContext,
381
- ) => this.summarizeInternal(fullTree, trackState, telemetryContext);
390
+ ): Promise<ISummarizeInternalResult> =>
391
+ this.summarizeInternal(fullTree, trackState, telemetryContext);
382
392
 
383
393
  this.summarizerNode = props.createSummarizerNodeFn(
384
394
  thisSummarizeInternal,
@@ -429,11 +439,11 @@ export abstract class FluidDataStoreContext
429
439
  * This function is called to prevent ops from being generated from this data store once it has been deleted. Furthermore, this data store
430
440
  * should not receive any ops/signals.
431
441
  */
432
- public delete() {
442
+ public delete(): void {
433
443
  this.deleted = true;
434
444
  }
435
445
 
436
- public setTombstone(tombstone: boolean) {
446
+ public setTombstone(tombstone: boolean): void {
437
447
  if (this.tombstoned === tombstone) {
438
448
  return;
439
449
  }
@@ -483,7 +493,7 @@ export abstract class FluidDataStoreContext
483
493
  return this.channelP;
484
494
  }
485
495
 
486
- protected async factoryFromPackagePath() {
496
+ protected async factoryFromPackagePath(): Promise<IFluidDataStoreFactory> {
487
497
  const packages = this.pkg;
488
498
  if (packages === undefined) {
489
499
  this.rejectDeferredRealize("packages is undefined");
@@ -555,7 +565,7 @@ export abstract class FluidDataStoreContext
555
565
  return created;
556
566
  }
557
567
 
558
- private async realizeCore(existing: boolean) {
568
+ private async realizeCore(existing: boolean): Promise<IFluidDataStoreChannel> {
559
569
  const details = await this.getInitialSnapshotDetails();
560
570
  // Base snapshot is the baseline where pending ops are applied to.
561
571
  // It is important that this be in sync with the pending ops, and also
@@ -584,7 +594,7 @@ export abstract class FluidDataStoreContext
584
594
  * @param clientId - ID of the client. Its old ID when in disconnected state and
585
595
  * its new client ID when we are connecting or connected.
586
596
  */
587
- public setConnectionState(connected: boolean, clientId?: string) {
597
+ public setConnectionState(connected: boolean, clientId?: string): void {
588
598
  // ConnectionState should not fail in tombstone mode as this is internally run
589
599
  this.verifyNotClosed("setConnectionState", false /* checkTombstone */);
590
600
 
@@ -608,7 +618,7 @@ export abstract class FluidDataStoreContext
608
618
  private processMessagesCompat(
609
619
  channel: IFluidDataStoreChannel,
610
620
  messageCollection: IRuntimeMessageCollection,
611
- ) {
621
+ ): void {
612
622
  if (channel.processMessages !== undefined) {
613
623
  channel.processMessages(messageCollection);
614
624
  } else {
@@ -769,7 +779,7 @@ export abstract class FluidDataStoreContext
769
779
  *
770
780
  * @param usedRoutes - The routes that are used in this data store.
771
781
  */
772
- public updateUsedRoutes(usedRoutes: string[]) {
782
+ public updateUsedRoutes(usedRoutes: string[]): void {
773
783
  // Update the used routes in this data store's summarizer node.
774
784
  this.summarizerNode.updateUsedRoutes(usedRoutes);
775
785
 
@@ -794,10 +804,15 @@ export abstract class FluidDataStoreContext
794
804
  * @param toPath - The absolute path of the outbound node that is referenced.
795
805
  * @param messageTimestampMs - The timestamp of the message that added the reference.
796
806
  */
797
- public addedGCOutboundRoute(fromPath: string, toPath: string, messageTimestampMs?: number) {
807
+ public addedGCOutboundRoute(
808
+ fromPath: string,
809
+ toPath: string,
810
+ messageTimestampMs?: number,
811
+ ): void {
798
812
  this.parentContext.addedGCOutboundRoute(fromPath, toPath, messageTimestampMs);
799
813
  }
800
814
 
815
+ // eslint-disable-next-line jsdoc/require-description
801
816
  /**
802
817
  * @deprecated 0.18.Should call request on the runtime directly
803
818
  */
@@ -806,7 +821,7 @@ export abstract class FluidDataStoreContext
806
821
  return runtime.request(request);
807
822
  }
808
823
 
809
- public submitMessage(type: string, content: any, localOpMetadata: unknown): void {
824
+ public submitMessage(type: string, content: unknown, localOpMetadata: unknown): void {
810
825
  this.verifyNotClosed("submitMessage");
811
826
  assert(!!this.channel, 0x146 /* "Channel must exist when submitting message" */);
812
827
  // Summarizer clients should not submit messages.
@@ -845,7 +860,7 @@ export abstract class FluidDataStoreContext
845
860
  * @param content - Content of the signal. Should be a JSON serializable object or primitive.
846
861
  * @param targetClientId - When specified, the signal is only sent to the provided client id.
847
862
  */
848
- public submitSignal(type: string, content: unknown, targetClientId?: string) {
863
+ public submitSignal(type: string, content: unknown, targetClientId?: string): void {
849
864
  this.verifyNotClosed("submitSignal");
850
865
 
851
866
  assert(!!this.channel, 0x147 /* "Channel must exist on submitting signal" */);
@@ -856,12 +871,12 @@ export abstract class FluidDataStoreContext
856
871
  * This is called by the data store channel when it becomes locally visible indicating that it is ready to become
857
872
  * globally visible now.
858
873
  */
859
- public makeLocallyVisible() {
874
+ public makeLocallyVisible(): void {
860
875
  assert(this.channel !== undefined, 0x2cf /* "undefined channel on datastore context" */);
861
876
  this.makeLocallyVisibleFn();
862
877
  }
863
878
 
864
- protected processPendingOps(channel: IFluidDataStoreChannel) {
879
+ protected processPendingOps(channel: IFluidDataStoreChannel): void {
865
880
  const baseSequenceNumber = this.baseSnapshotSequenceNumber ?? -1;
866
881
 
867
882
  assert(
@@ -879,7 +894,7 @@ export abstract class FluidDataStoreContext
879
894
  this.pendingMessagesState = undefined;
880
895
  }
881
896
 
882
- protected completeBindingRuntime(channel: IFluidDataStoreChannel) {
897
+ protected completeBindingRuntime(channel: IFluidDataStoreChannel): void {
883
898
  // And now mark the runtime active
884
899
  this.loaded = true;
885
900
  this.channel = channel;
@@ -895,7 +910,10 @@ export abstract class FluidDataStoreContext
895
910
  Object.freeze(this.pkg);
896
911
  }
897
912
 
898
- protected async bindRuntime(channel: IFluidDataStoreChannel, existing: boolean) {
913
+ protected async bindRuntime(
914
+ channel: IFluidDataStoreChannel,
915
+ existing: boolean,
916
+ ): Promise<void> {
899
917
  if (this.channel) {
900
918
  throw new Error("Runtime already bound");
901
919
  }
@@ -946,6 +964,7 @@ export abstract class FluidDataStoreContext
946
964
 
947
965
  public abstract getInitialSnapshotDetails(): Promise<ISnapshotDetails>;
948
966
 
967
+ // eslint-disable-next-line jsdoc/require-description
949
968
  /**
950
969
  * @deprecated Sets the datastore as root, for aliasing purposes: #7948
951
970
  * This method should not be used outside of the aliasing context.
@@ -955,6 +974,7 @@ export abstract class FluidDataStoreContext
955
974
  this._isInMemoryRoot = true;
956
975
  }
957
976
 
977
+ // eslint-disable-next-line jsdoc/require-description
958
978
  /**
959
979
  * @deprecated The functionality to get base GC details has been moved to summarizer node.
960
980
  */
@@ -962,12 +982,12 @@ export abstract class FluidDataStoreContext
962
982
  return {};
963
983
  }
964
984
 
965
- public reSubmit(type: string, contents: any, localOpMetadata: unknown) {
985
+ public reSubmit(type: string, contents: unknown, localOpMetadata: unknown): void {
966
986
  assert(!!this.channel, 0x14b /* "Channel must exist when resubmitting ops" */);
967
987
  this.channel.reSubmit(type, contents, localOpMetadata);
968
988
  }
969
989
 
970
- public rollback(type: string, contents: any, localOpMetadata: unknown) {
990
+ public rollback(type: string, contents: unknown, localOpMetadata: unknown): void {
971
991
  if (!this.channel) {
972
992
  throw new Error("Channel must exist when rolling back ops");
973
993
  }
@@ -977,7 +997,7 @@ export abstract class FluidDataStoreContext
977
997
  this.channel.rollback(type, contents, localOpMetadata);
978
998
  }
979
999
 
980
- public async applyStashedOp(contents: any): Promise<unknown> {
1000
+ public async applyStashedOp(contents: unknown): Promise<unknown> {
981
1001
  if (!this.channel) {
982
1002
  await this.realize();
983
1003
  }
@@ -989,7 +1009,7 @@ export abstract class FluidDataStoreContext
989
1009
  callSite: string,
990
1010
  checkTombstone = true,
991
1011
  safeTelemetryProps: ITelemetryBaseProperties = {},
992
- ) {
1012
+ ): void {
993
1013
  if (this.deleted) {
994
1014
  const messageString = `Context is deleted! Call site [${callSite}]`;
995
1015
  const error = DataProcessingError.create(
@@ -1038,7 +1058,7 @@ export abstract class FluidDataStoreContext
1038
1058
  * eventual consistency. For example, the next summary (say at ref seq# 100) may contain these changes whereas
1039
1059
  * other clients that are up-to-date till seq# 100 may not have them yet.
1040
1060
  */
1041
- protected identifyLocalChangeInSummarizer(eventName: string, type?: string) {
1061
+ protected identifyLocalChangeInSummarizer(eventName: string, type?: string): void {
1042
1062
  if (
1043
1063
  this.clientDetails.type !== summarizerClientType ||
1044
1064
  this.localChangesTelemetryCount <= 0
@@ -1065,7 +1085,7 @@ export abstract class FluidDataStoreContext
1065
1085
  return (
1066
1086
  summarizeInternal: SummarizeInternalFn,
1067
1087
  getGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,
1068
- ) =>
1088
+ ): ISummarizerNodeWithGC =>
1069
1089
  this.summarizerNode.createChild(
1070
1090
  summarizeInternal,
1071
1091
  id,
@@ -1075,7 +1095,7 @@ export abstract class FluidDataStoreContext
1075
1095
  );
1076
1096
  }
1077
1097
 
1078
- public deleteChildSummarizerNode(id: string) {
1098
+ public deleteChildSummarizerNode(id: string): void {
1079
1099
  this.summarizerNode.deleteChild(id);
1080
1100
  }
1081
1101
 
@@ -1087,7 +1107,9 @@ export abstract class FluidDataStoreContext
1087
1107
  }
1088
1108
  }
1089
1109
 
1090
- /** @internal */
1110
+ /**
1111
+ * @internal
1112
+ */
1091
1113
  export class RemoteFluidDataStoreContext extends FluidDataStoreContext {
1092
1114
  // Tells whether we need to fetch the snapshot before use. This is to support Data Virtualization.
1093
1115
  private snapshotFetchRequired: boolean | undefined;
@@ -1111,17 +1133,21 @@ export class RemoteFluidDataStoreContext extends FluidDataStoreContext {
1111
1133
  }
1112
1134
  }
1113
1135
 
1114
- /*
1115
- This API should not be called for RemoteFluidDataStoreContext. But here is one scenario where it's not the case:
1116
- The scenario (hit by stashedOps.spec.ts, "resends attach op" UT is the following (as far as I understand):
1117
- 1. data store is being attached in attached container
1118
- 2. container state is serialized (stashed ops feature)
1119
- 3. new container instance is rehydrated (from stashed ops)
1120
- - As result, we create RemoteFluidDataStoreContext for this data store that is actually in "attaching" state (as of # 2).
1121
- But its state is set to attached when loading container from stashed ops
1122
- 4. attach op for this data store is processed - setAttachState() is called.
1123
- */
1124
- public setAttachState(attachState: AttachState.Attaching | AttachState.Attached) {}
1136
+ /**
1137
+ * This API should not be called for RemoteFluidDataStoreContext. But here is one scenario where it's not the case:
1138
+ * The scenario (hit by stashedOps.spec.ts, "resends attach op" UT is the following (as far as I understand):
1139
+ *
1140
+ * 1. data store is being attached in attached container
1141
+ *
1142
+ * 2. container state is serialized (stashed ops feature)
1143
+ *
1144
+ * 3. new container instance is rehydrated (from stashed ops) -
1145
+ * As result, we create RemoteFluidDataStoreContext for this data store that is actually in "attaching" state * (as of # 2).
1146
+ * But its state is set to attached when loading container from stashed ops.
1147
+ *
1148
+ * 4. attach op for this data store is processed - setAttachState() is called.
1149
+ */
1150
+ public setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void {}
1125
1151
 
1126
1152
  private readonly initialSnapshotDetailsP = new LazyPromise<ISnapshotDetails>(async () => {
1127
1153
  // Sequence number of the snapshot.
@@ -1218,14 +1244,14 @@ export class RemoteFluidDataStoreContext extends FluidDataStoreContext {
1218
1244
  }
1219
1245
 
1220
1246
  /**
1221
- * @see FluidDataStoreContext.getAttachSummary
1247
+ * {@inheritDoc FluidDataStoreContext.getAttachSummary}
1222
1248
  */
1223
1249
  public getAttachSummary(): ISummaryTreeWithStats {
1224
1250
  throw new Error("Cannot attach remote store");
1225
1251
  }
1226
1252
 
1227
1253
  /**
1228
- * @see FluidDataStoreContext.getAttachGCData
1254
+ * {@inheritDoc FluidDataStoreContext.getAttachGCData}
1229
1255
  */
1230
1256
  public getAttachGCData(telemetryContext?: ITelemetryContext): IGarbageCollectionData {
1231
1257
  throw new Error("Cannot attach remote store");
@@ -1238,10 +1264,6 @@ export class RemoteFluidDataStoreContext extends FluidDataStoreContext {
1238
1264
  */
1239
1265
  export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
1240
1266
  private readonly snapshotTree: ISnapshotTree | undefined;
1241
- /**
1242
- * @deprecated 0.16 Issue #1635, #3631
1243
- */
1244
- public readonly createProps?: any;
1245
1267
 
1246
1268
  constructor(props: ILocalFluidDataStoreContextProps) {
1247
1269
  super(
@@ -1255,7 +1277,6 @@ export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
1255
1277
  this.identifyLocalChangeInSummarizer("DataStoreCreatedInSummarizer");
1256
1278
 
1257
1279
  this.snapshotTree = props.snapshotTree;
1258
- this.createProps = props.createProps;
1259
1280
  }
1260
1281
 
1261
1282
  public setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void {
@@ -1303,7 +1324,7 @@ export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
1303
1324
  }
1304
1325
 
1305
1326
  /**
1306
- * @see FluidDataStoreContext.getAttachSummary
1327
+ * {@inheritDoc FluidDataStoreContext.getAttachSummary}
1307
1328
  */
1308
1329
  public getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats {
1309
1330
  assert(
@@ -1333,7 +1354,7 @@ export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
1333
1354
  }
1334
1355
 
1335
1356
  /**
1336
- * @see FluidDataStoreContext.getAttachGCData
1357
+ * {@inheritDoc FluidDataStoreContext.getAttachGCData}
1337
1358
  */
1338
1359
  public getAttachGCData(telemetryContext?: ITelemetryContext): IGarbageCollectionData {
1339
1360
  assert(
@@ -1390,7 +1411,7 @@ export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
1390
1411
  * it was unreferenced. Thus the sweeping container should have loaded from a snapshot and thus creating a remote
1391
1412
  * context.
1392
1413
  */
1393
- public delete() {
1414
+ public delete(): void {
1394
1415
  // TODO: GC:Validation - potentially prevent this from happening or asserting. Maybe throw here.
1395
1416
  this.mc.logger.sendErrorEvent({
1396
1417
  eventName: "GC_Deleted_DataStore_Unexpected_Delete",
@@ -1477,7 +1498,7 @@ export class LocalDetachedFluidDataStoreContext
1477
1498
  *
1478
1499
  * If used incorrectly, this function can result in permanent data corruption.
1479
1500
  */
1480
- public unsafe_AttachRuntimeSync(channel: IFluidDataStoreChannel) {
1501
+ public unsafe_AttachRuntimeSync(channel: IFluidDataStoreChannel): IDataStore {
1481
1502
  this.channelP = Promise.resolve(channel);
1482
1503
  this.processPendingOps(channel);
1483
1504
  this.completeBindingRuntime(channel);
@@ -12,13 +12,17 @@ import {
12
12
 
13
13
  import { FluidDataStoreContext, LocalFluidDataStoreContext } from "./dataStoreContext.js";
14
14
 
15
- /** @internal */
15
+ /**
16
+ * @internal
17
+ */
16
18
  export class DataStoreContexts
17
19
  implements Iterable<[string, FluidDataStoreContext]>, IDisposable
18
20
  {
19
21
  private readonly notBoundContexts = new Set<string>();
20
22
 
21
- /** Attached and loaded context proxies */
23
+ /**
24
+ * Attached and loaded context proxies
25
+ */
22
26
  private readonly _contexts = new Map<string, FluidDataStoreContext>();
23
27
 
24
28
  /**
@@ -63,20 +67,20 @@ export class DataStoreContexts
63
67
  return this._contexts.size;
64
68
  }
65
69
 
66
- public get disposed() {
70
+ public get disposed(): boolean {
67
71
  return this.disposeOnce.evaluated;
68
72
  }
69
- public readonly dispose = () => this.disposeOnce.value;
73
+ public readonly dispose = (): void => this.disposeOnce.value;
70
74
 
71
- public notBoundLength() {
75
+ public notBoundLength(): number {
72
76
  return this.notBoundContexts.size;
73
77
  }
74
78
 
75
- public isNotBound(id: string) {
79
+ public isNotBound(id: string): boolean {
76
80
  return this.notBoundContexts.has(id);
77
81
  }
78
82
 
79
- public has(id: string) {
83
+ public has(id: string): boolean {
80
84
  return this._contexts.has(id);
81
85
  }
82
86
 
@@ -98,7 +102,7 @@ export class DataStoreContexts
98
102
  private readonly _recentlyDeletedContexts: Map<string, FluidDataStoreContext | undefined> =
99
103
  new Map();
100
104
 
101
- public getRecentlyDeletedContext(id: string) {
105
+ public getRecentlyDeletedContext(id: string): FluidDataStoreContext | undefined {
102
106
  return this._recentlyDeletedContexts.get(id);
103
107
  }
104
108
 
@@ -118,7 +122,7 @@ export class DataStoreContexts
118
122
  /**
119
123
  * Add the given context, marking it as to-be-bound
120
124
  */
121
- public addUnbound(context: LocalFluidDataStoreContext) {
125
+ public addUnbound(context: LocalFluidDataStoreContext): void {
122
126
  const id = context.id;
123
127
  assert(!this._contexts.has(id), 0x158 /* "Creating store with existing ID" */);
124
128
 
@@ -161,7 +165,7 @@ export class DataStoreContexts
161
165
  /**
162
166
  * Update this context as bound
163
167
  */
164
- public bind(id: string) {
168
+ public bind(id: string): void {
165
169
  const removed: boolean = this.notBoundContexts.delete(id);
166
170
  assert(removed, 0x159 /* "The given id was not found in notBoundContexts to delete" */);
167
171
 
@@ -172,7 +176,7 @@ export class DataStoreContexts
172
176
  * Triggers the deferred to resolve, indicating the context is not local-only
173
177
  * @param id - The id of the context to resolve to
174
178
  */
175
- private resolveDeferred(id: string) {
179
+ private resolveDeferred(id: string): void {
176
180
  const context = this._contexts.get(id);
177
181
  assert(!!context, 0x15a /* "Cannot find context to resolve to" */);
178
182
  assert(
@@ -190,7 +194,7 @@ export class DataStoreContexts
190
194
  * This could be because it's a local context that's been bound, or because it's a remote context.
191
195
  * @param context - The context to add
192
196
  */
193
- public addBoundOrRemoted(context: FluidDataStoreContext) {
197
+ public addBoundOrRemoted(context: FluidDataStoreContext): void {
194
198
  const id = context.id;
195
199
  assert(!this._contexts.has(id), 0x15d /* "Creating store with existing ID" */);
196
200
 
@@ -20,7 +20,7 @@ export class FluidDataStoreRegistry implements IFluidDataStoreRegistry {
20
20
  FluidDataStoreRegistryEntry | Promise<FluidDataStoreRegistryEntry>
21
21
  >;
22
22
 
23
- public get IFluidDataStoreRegistry() {
23
+ public get IFluidDataStoreRegistry(): IFluidDataStoreRegistry {
24
24
  return this;
25
25
  }
26
26
 
@@ -59,11 +59,11 @@ export abstract class BaseDeltaManagerProxy
59
59
  return this.deltaManager.lastSequenceNumber;
60
60
  }
61
61
 
62
- public get lastMessage() {
62
+ public get lastMessage(): ISequencedDocumentMessage | undefined {
63
63
  return this.deltaManager.lastMessage;
64
64
  }
65
65
 
66
- public get lastKnownSeqNumber() {
66
+ public get lastKnownSeqNumber(): number {
67
67
  return this.deltaManager.lastKnownSeqNumber;
68
68
  }
69
69
 
@@ -71,7 +71,7 @@ export abstract class BaseDeltaManagerProxy
71
71
  return this.deltaManager.initialSequenceNumber;
72
72
  }
73
73
 
74
- public get hasCheckpointSequenceNumber() {
74
+ public get hasCheckpointSequenceNumber(): boolean {
75
75
  return this.deltaManager.hasCheckpointSequenceNumber;
76
76
  }
77
77
 
@@ -132,7 +132,7 @@ export abstract class BaseDeltaManagerProxy
132
132
  return this.deltaManager.flush();
133
133
  }
134
134
 
135
- private readonly onPrepareSend = (messageBuffer: any[]): void => {
135
+ private readonly onPrepareSend = (messageBuffer: unknown[]): void => {
136
136
  this.emit("prepareSend", messageBuffer);
137
137
  };
138
138
  private readonly onSubmitOp = (message: IDocumentMessage): void => {
@@ -218,7 +218,7 @@ export class DeltaManagerPendingOpsProxy extends BaseDeltaManagerProxy {
218
218
  return this.deltaManager.minimumSequenceNumber;
219
219
  }
220
220
 
221
- public get lastMessage() {
221
+ public get lastMessage(): ISequencedDocumentMessage | undefined {
222
222
  if (this.deltaManager.lastMessage === undefined) {
223
223
  return this.deltaManager.lastMessage;
224
224
  }