@fluidframework/odsp-driver 2.51.0-347100 → 2.52.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 (352) hide show
  1. package/.eslintrc.cjs +12 -0
  2. package/CHANGELOG.md +15 -0
  3. package/api-report/odsp-driver.legacy.alpha.api.md +1 -0
  4. package/dist/checkUrl.d.ts +1 -1
  5. package/dist/checkUrl.d.ts.map +1 -1
  6. package/dist/checkUrl.js.map +1 -1
  7. package/dist/compactSnapshotParser.d.ts +2 -2
  8. package/dist/compactSnapshotParser.d.ts.map +1 -1
  9. package/dist/compactSnapshotParser.js.map +1 -1
  10. package/dist/compactSnapshotWriter.d.ts +1 -1
  11. package/dist/compactSnapshotWriter.d.ts.map +1 -1
  12. package/dist/compactSnapshotWriter.js.map +1 -1
  13. package/dist/contracts.d.ts +3 -3
  14. package/dist/contracts.d.ts.map +1 -1
  15. package/dist/contracts.js.map +1 -1
  16. package/dist/contractsPublic.d.ts +1 -1
  17. package/dist/contractsPublic.d.ts.map +1 -1
  18. package/dist/contractsPublic.js.map +1 -1
  19. package/dist/createFile/createFile.d.ts +6 -6
  20. package/dist/createFile/createFile.d.ts.map +1 -1
  21. package/dist/createFile/createFile.js.map +1 -1
  22. package/dist/createFile/createNewContainerOnExistingFile.d.ts +5 -5
  23. package/dist/createFile/createNewContainerOnExistingFile.d.ts.map +1 -1
  24. package/dist/createFile/createNewContainerOnExistingFile.js.map +1 -1
  25. package/dist/createFile/createNewUtils.d.ts +6 -6
  26. package/dist/createFile/createNewUtils.d.ts.map +1 -1
  27. package/dist/createFile/createNewUtils.js.map +1 -1
  28. package/dist/createFile/index.d.ts +1 -1
  29. package/dist/createFile/index.d.ts.map +1 -1
  30. package/dist/createFile/index.js.map +1 -1
  31. package/dist/createOdspCreateContainerRequest.d.ts +2 -2
  32. package/dist/createOdspCreateContainerRequest.d.ts.map +1 -1
  33. package/dist/createOdspCreateContainerRequest.js.map +1 -1
  34. package/dist/createOdspUrl.d.ts +1 -1
  35. package/dist/createOdspUrl.d.ts.map +1 -1
  36. package/dist/createOdspUrl.js.map +1 -1
  37. package/dist/epochTracker.d.ts +4 -4
  38. package/dist/epochTracker.d.ts.map +1 -1
  39. package/dist/epochTracker.js.map +1 -1
  40. package/dist/fetchSnapshot.d.ts +6 -6
  41. package/dist/fetchSnapshot.d.ts.map +1 -1
  42. package/dist/fetchSnapshot.js.map +1 -1
  43. package/dist/getFileLink.d.ts +2 -2
  44. package/dist/getFileLink.d.ts.map +1 -1
  45. package/dist/getFileLink.js.map +1 -1
  46. package/dist/getQueryString.d.ts +1 -1
  47. package/dist/getQueryString.d.ts.map +1 -1
  48. package/dist/getQueryString.js.map +1 -1
  49. package/dist/index.d.ts +7 -7
  50. package/dist/index.d.ts.map +1 -1
  51. package/dist/index.js.map +1 -1
  52. package/dist/localOdspDriver/localOdspDeltaStorageService.d.ts +2 -2
  53. package/dist/localOdspDriver/localOdspDeltaStorageService.d.ts.map +1 -1
  54. package/dist/localOdspDriver/localOdspDeltaStorageService.js.map +1 -1
  55. package/dist/localOdspDriver/localOdspDocumentService.d.ts +5 -10
  56. package/dist/localOdspDriver/localOdspDocumentService.d.ts.map +1 -1
  57. package/dist/localOdspDriver/localOdspDocumentService.js +0 -8
  58. package/dist/localOdspDriver/localOdspDocumentService.js.map +1 -1
  59. package/dist/localOdspDriver/localOdspDocumentServiceFactory.d.ts +5 -5
  60. package/dist/localOdspDriver/localOdspDocumentServiceFactory.d.ts.map +1 -1
  61. package/dist/localOdspDriver/localOdspDocumentServiceFactory.js.map +1 -1
  62. package/dist/localOdspDriver/localOdspDocumentStorageManager.d.ts +3 -3
  63. package/dist/localOdspDriver/localOdspDocumentStorageManager.d.ts.map +1 -1
  64. package/dist/localOdspDriver/localOdspDocumentStorageManager.js.map +1 -1
  65. package/dist/odspCache.d.ts +2 -2
  66. package/dist/odspCache.d.ts.map +1 -1
  67. package/dist/odspCache.js.map +1 -1
  68. package/dist/odspDelayLoadedDeltaStream.d.ts +6 -6
  69. package/dist/odspDelayLoadedDeltaStream.d.ts.map +1 -1
  70. package/dist/odspDelayLoadedDeltaStream.js.map +1 -1
  71. package/dist/odspDeltaStorageService.d.ts +6 -6
  72. package/dist/odspDeltaStorageService.d.ts.map +1 -1
  73. package/dist/odspDeltaStorageService.js.map +1 -1
  74. package/dist/odspDocumentDeltaConnection.d.ts +5 -5
  75. package/dist/odspDocumentDeltaConnection.d.ts.map +1 -1
  76. package/dist/odspDocumentDeltaConnection.js.map +1 -1
  77. package/dist/odspDocumentService.d.ts +7 -12
  78. package/dist/odspDocumentService.d.ts.map +1 -1
  79. package/dist/odspDocumentService.js +0 -8
  80. package/dist/odspDocumentService.js.map +1 -1
  81. package/dist/odspDocumentServiceFactory.d.ts +2 -2
  82. package/dist/odspDocumentServiceFactory.d.ts.map +1 -1
  83. package/dist/odspDocumentServiceFactory.js.map +1 -1
  84. package/dist/odspDocumentServiceFactoryCore.d.ts +15 -7
  85. package/dist/odspDocumentServiceFactoryCore.d.ts.map +1 -1
  86. package/dist/odspDocumentServiceFactoryCore.js +9 -0
  87. package/dist/odspDocumentServiceFactoryCore.js.map +1 -1
  88. package/dist/odspDocumentStorageManager.d.ts +9 -9
  89. package/dist/odspDocumentStorageManager.d.ts.map +1 -1
  90. package/dist/odspDocumentStorageManager.js.map +1 -1
  91. package/dist/odspDocumentStorageServiceBase.d.ts +3 -3
  92. package/dist/odspDocumentStorageServiceBase.d.ts.map +1 -1
  93. package/dist/odspDocumentStorageServiceBase.js.map +1 -1
  94. package/dist/odspDriverUrlResolver.d.ts +3 -3
  95. package/dist/odspDriverUrlResolver.d.ts.map +1 -1
  96. package/dist/odspDriverUrlResolver.js.map +1 -1
  97. package/dist/odspDriverUrlResolverForShareLink.d.ts +4 -4
  98. package/dist/odspDriverUrlResolverForShareLink.d.ts.map +1 -1
  99. package/dist/odspDriverUrlResolverForShareLink.js.map +1 -1
  100. package/dist/odspError.d.ts +3 -3
  101. package/dist/odspError.d.ts.map +1 -1
  102. package/dist/odspError.js.map +1 -1
  103. package/dist/odspFluidFileLink.d.ts +1 -1
  104. package/dist/odspFluidFileLink.d.ts.map +1 -1
  105. package/dist/odspFluidFileLink.js.map +1 -1
  106. package/dist/odspLayerCompatState.d.ts +1 -1
  107. package/dist/odspLayerCompatState.d.ts.map +1 -1
  108. package/dist/odspLayerCompatState.js.map +1 -1
  109. package/dist/odspLocationRedirection.d.ts +2 -2
  110. package/dist/odspLocationRedirection.d.ts.map +1 -1
  111. package/dist/odspLocationRedirection.js.map +1 -1
  112. package/dist/odspPublicUtils.d.ts +1 -1
  113. package/dist/odspPublicUtils.d.ts.map +1 -1
  114. package/dist/odspPublicUtils.js.map +1 -1
  115. package/dist/odspSnapshotParser.d.ts +2 -2
  116. package/dist/odspSnapshotParser.d.ts.map +1 -1
  117. package/dist/odspSnapshotParser.js.map +1 -1
  118. package/dist/odspSummaryUploadManager.d.ts +5 -5
  119. package/dist/odspSummaryUploadManager.d.ts.map +1 -1
  120. package/dist/odspSummaryUploadManager.js.map +1 -1
  121. package/dist/odspUrlHelper.d.ts +1 -1
  122. package/dist/odspUrlHelper.d.ts.map +1 -1
  123. package/dist/odspUrlHelper.js.map +1 -1
  124. package/dist/odspUtils.d.ts +5 -5
  125. package/dist/odspUtils.d.ts.map +1 -1
  126. package/dist/odspUtils.js.map +1 -1
  127. package/dist/opsCaching.d.ts +1 -1
  128. package/dist/opsCaching.d.ts.map +1 -1
  129. package/dist/opsCaching.js.map +1 -1
  130. package/dist/packageVersion.d.ts +1 -1
  131. package/dist/packageVersion.d.ts.map +1 -1
  132. package/dist/packageVersion.js +1 -1
  133. package/dist/packageVersion.js.map +1 -1
  134. package/dist/prefetchLatestSnapshot.d.ts +5 -5
  135. package/dist/prefetchLatestSnapshot.d.ts.map +1 -1
  136. package/dist/prefetchLatestSnapshot.js.map +1 -1
  137. package/dist/retryErrorsStorageAdapter.d.ts +4 -4
  138. package/dist/retryErrorsStorageAdapter.d.ts.map +1 -1
  139. package/dist/retryErrorsStorageAdapter.js.map +1 -1
  140. package/dist/retryUtils.d.ts +1 -1
  141. package/dist/retryUtils.d.ts.map +1 -1
  142. package/dist/retryUtils.js.map +1 -1
  143. package/dist/vroom.d.ts +4 -4
  144. package/dist/vroom.d.ts.map +1 -1
  145. package/dist/vroom.js.map +1 -1
  146. package/dist/zipItDataRepresentationUtils.d.ts +2 -2
  147. package/dist/zipItDataRepresentationUtils.d.ts.map +1 -1
  148. package/dist/zipItDataRepresentationUtils.js.map +1 -1
  149. package/lib/checkUrl.d.ts +1 -1
  150. package/lib/checkUrl.d.ts.map +1 -1
  151. package/lib/checkUrl.js.map +1 -1
  152. package/lib/compactSnapshotParser.d.ts +2 -2
  153. package/lib/compactSnapshotParser.d.ts.map +1 -1
  154. package/lib/compactSnapshotParser.js.map +1 -1
  155. package/lib/compactSnapshotWriter.d.ts +1 -1
  156. package/lib/compactSnapshotWriter.d.ts.map +1 -1
  157. package/lib/compactSnapshotWriter.js.map +1 -1
  158. package/lib/contracts.d.ts +3 -3
  159. package/lib/contracts.d.ts.map +1 -1
  160. package/lib/contracts.js.map +1 -1
  161. package/lib/contractsPublic.d.ts +1 -1
  162. package/lib/contractsPublic.d.ts.map +1 -1
  163. package/lib/contractsPublic.js.map +1 -1
  164. package/lib/createFile/createFile.d.ts +6 -6
  165. package/lib/createFile/createFile.d.ts.map +1 -1
  166. package/lib/createFile/createFile.js.map +1 -1
  167. package/lib/createFile/createNewContainerOnExistingFile.d.ts +5 -5
  168. package/lib/createFile/createNewContainerOnExistingFile.d.ts.map +1 -1
  169. package/lib/createFile/createNewContainerOnExistingFile.js.map +1 -1
  170. package/lib/createFile/createNewUtils.d.ts +6 -6
  171. package/lib/createFile/createNewUtils.d.ts.map +1 -1
  172. package/lib/createFile/createNewUtils.js.map +1 -1
  173. package/lib/createFile/index.d.ts +1 -1
  174. package/lib/createFile/index.d.ts.map +1 -1
  175. package/lib/createFile/index.js.map +1 -1
  176. package/lib/createOdspCreateContainerRequest.d.ts +2 -2
  177. package/lib/createOdspCreateContainerRequest.d.ts.map +1 -1
  178. package/lib/createOdspCreateContainerRequest.js.map +1 -1
  179. package/lib/createOdspUrl.d.ts +1 -1
  180. package/lib/createOdspUrl.d.ts.map +1 -1
  181. package/lib/createOdspUrl.js.map +1 -1
  182. package/lib/epochTracker.d.ts +4 -4
  183. package/lib/epochTracker.d.ts.map +1 -1
  184. package/lib/epochTracker.js.map +1 -1
  185. package/lib/fetchSnapshot.d.ts +6 -6
  186. package/lib/fetchSnapshot.d.ts.map +1 -1
  187. package/lib/fetchSnapshot.js.map +1 -1
  188. package/lib/getFileLink.d.ts +2 -2
  189. package/lib/getFileLink.d.ts.map +1 -1
  190. package/lib/getFileLink.js.map +1 -1
  191. package/lib/getQueryString.d.ts +1 -1
  192. package/lib/getQueryString.d.ts.map +1 -1
  193. package/lib/getQueryString.js.map +1 -1
  194. package/lib/index.d.ts +7 -7
  195. package/lib/index.d.ts.map +1 -1
  196. package/lib/index.js.map +1 -1
  197. package/lib/localOdspDriver/localOdspDeltaStorageService.d.ts +2 -2
  198. package/lib/localOdspDriver/localOdspDeltaStorageService.d.ts.map +1 -1
  199. package/lib/localOdspDriver/localOdspDeltaStorageService.js.map +1 -1
  200. package/lib/localOdspDriver/localOdspDocumentService.d.ts +5 -10
  201. package/lib/localOdspDriver/localOdspDocumentService.d.ts.map +1 -1
  202. package/lib/localOdspDriver/localOdspDocumentService.js +0 -8
  203. package/lib/localOdspDriver/localOdspDocumentService.js.map +1 -1
  204. package/lib/localOdspDriver/localOdspDocumentServiceFactory.d.ts +5 -5
  205. package/lib/localOdspDriver/localOdspDocumentServiceFactory.d.ts.map +1 -1
  206. package/lib/localOdspDriver/localOdspDocumentServiceFactory.js.map +1 -1
  207. package/lib/localOdspDriver/localOdspDocumentStorageManager.d.ts +3 -3
  208. package/lib/localOdspDriver/localOdspDocumentStorageManager.d.ts.map +1 -1
  209. package/lib/localOdspDriver/localOdspDocumentStorageManager.js.map +1 -1
  210. package/lib/odspCache.d.ts +2 -2
  211. package/lib/odspCache.d.ts.map +1 -1
  212. package/lib/odspCache.js.map +1 -1
  213. package/lib/odspDelayLoadedDeltaStream.d.ts +6 -6
  214. package/lib/odspDelayLoadedDeltaStream.d.ts.map +1 -1
  215. package/lib/odspDelayLoadedDeltaStream.js.map +1 -1
  216. package/lib/odspDeltaStorageService.d.ts +6 -6
  217. package/lib/odspDeltaStorageService.d.ts.map +1 -1
  218. package/lib/odspDeltaStorageService.js.map +1 -1
  219. package/lib/odspDocumentDeltaConnection.d.ts +5 -5
  220. package/lib/odspDocumentDeltaConnection.d.ts.map +1 -1
  221. package/lib/odspDocumentDeltaConnection.js.map +1 -1
  222. package/lib/odspDocumentService.d.ts +7 -12
  223. package/lib/odspDocumentService.d.ts.map +1 -1
  224. package/lib/odspDocumentService.js +0 -8
  225. package/lib/odspDocumentService.js.map +1 -1
  226. package/lib/odspDocumentServiceFactory.d.ts +2 -2
  227. package/lib/odspDocumentServiceFactory.d.ts.map +1 -1
  228. package/lib/odspDocumentServiceFactory.js.map +1 -1
  229. package/lib/odspDocumentServiceFactoryCore.d.ts +15 -7
  230. package/lib/odspDocumentServiceFactoryCore.d.ts.map +1 -1
  231. package/lib/odspDocumentServiceFactoryCore.js +9 -0
  232. package/lib/odspDocumentServiceFactoryCore.js.map +1 -1
  233. package/lib/odspDocumentStorageManager.d.ts +9 -9
  234. package/lib/odspDocumentStorageManager.d.ts.map +1 -1
  235. package/lib/odspDocumentStorageManager.js.map +1 -1
  236. package/lib/odspDocumentStorageServiceBase.d.ts +3 -3
  237. package/lib/odspDocumentStorageServiceBase.d.ts.map +1 -1
  238. package/lib/odspDocumentStorageServiceBase.js.map +1 -1
  239. package/lib/odspDriverUrlResolver.d.ts +3 -3
  240. package/lib/odspDriverUrlResolver.d.ts.map +1 -1
  241. package/lib/odspDriverUrlResolver.js.map +1 -1
  242. package/lib/odspDriverUrlResolverForShareLink.d.ts +4 -4
  243. package/lib/odspDriverUrlResolverForShareLink.d.ts.map +1 -1
  244. package/lib/odspDriverUrlResolverForShareLink.js.map +1 -1
  245. package/lib/odspError.d.ts +3 -3
  246. package/lib/odspError.d.ts.map +1 -1
  247. package/lib/odspError.js +1 -1
  248. package/lib/odspError.js.map +1 -1
  249. package/lib/odspFluidFileLink.d.ts +1 -1
  250. package/lib/odspFluidFileLink.d.ts.map +1 -1
  251. package/lib/odspFluidFileLink.js.map +1 -1
  252. package/lib/odspLayerCompatState.d.ts +1 -1
  253. package/lib/odspLayerCompatState.d.ts.map +1 -1
  254. package/lib/odspLayerCompatState.js.map +1 -1
  255. package/lib/odspLocationRedirection.d.ts +2 -2
  256. package/lib/odspLocationRedirection.d.ts.map +1 -1
  257. package/lib/odspLocationRedirection.js.map +1 -1
  258. package/lib/odspPublicUtils.d.ts +1 -1
  259. package/lib/odspPublicUtils.d.ts.map +1 -1
  260. package/lib/odspPublicUtils.js.map +1 -1
  261. package/lib/odspSnapshotParser.d.ts +2 -2
  262. package/lib/odspSnapshotParser.d.ts.map +1 -1
  263. package/lib/odspSnapshotParser.js.map +1 -1
  264. package/lib/odspSummaryUploadManager.d.ts +5 -5
  265. package/lib/odspSummaryUploadManager.d.ts.map +1 -1
  266. package/lib/odspSummaryUploadManager.js +1 -1
  267. package/lib/odspSummaryUploadManager.js.map +1 -1
  268. package/lib/odspUrlHelper.d.ts +1 -1
  269. package/lib/odspUrlHelper.d.ts.map +1 -1
  270. package/lib/odspUrlHelper.js.map +1 -1
  271. package/lib/odspUtils.d.ts +5 -5
  272. package/lib/odspUtils.d.ts.map +1 -1
  273. package/lib/odspUtils.js.map +1 -1
  274. package/lib/opsCaching.d.ts +1 -1
  275. package/lib/opsCaching.d.ts.map +1 -1
  276. package/lib/opsCaching.js.map +1 -1
  277. package/lib/packageVersion.d.ts +1 -1
  278. package/lib/packageVersion.d.ts.map +1 -1
  279. package/lib/packageVersion.js +1 -1
  280. package/lib/packageVersion.js.map +1 -1
  281. package/lib/prefetchLatestSnapshot.d.ts +5 -5
  282. package/lib/prefetchLatestSnapshot.d.ts.map +1 -1
  283. package/lib/prefetchLatestSnapshot.js.map +1 -1
  284. package/lib/retryErrorsStorageAdapter.d.ts +4 -4
  285. package/lib/retryErrorsStorageAdapter.d.ts.map +1 -1
  286. package/lib/retryErrorsStorageAdapter.js.map +1 -1
  287. package/lib/retryUtils.d.ts +1 -1
  288. package/lib/retryUtils.d.ts.map +1 -1
  289. package/lib/retryUtils.js.map +1 -1
  290. package/lib/vroom.d.ts +4 -4
  291. package/lib/vroom.d.ts.map +1 -1
  292. package/lib/vroom.js.map +1 -1
  293. package/lib/zipItDataRepresentationUtils.d.ts +2 -2
  294. package/lib/zipItDataRepresentationUtils.d.ts.map +1 -1
  295. package/lib/zipItDataRepresentationUtils.js.map +1 -1
  296. package/package.json +14 -14
  297. package/src/checkUrl.ts +1 -1
  298. package/src/compactSnapshotParser.ts +4 -4
  299. package/src/compactSnapshotWriter.ts +2 -2
  300. package/src/contracts.ts +3 -3
  301. package/src/contractsPublic.ts +1 -1
  302. package/src/createFile/createFile.ts +10 -10
  303. package/src/createFile/createNewContainerOnExistingFile.ts +7 -7
  304. package/src/createFile/createNewUtils.ts +7 -7
  305. package/src/createFile/index.ts +2 -1
  306. package/src/createOdspCreateContainerRequest.ts +2 -2
  307. package/src/createOdspUrl.ts +1 -1
  308. package/src/epochTracker.ts +11 -11
  309. package/src/fetchSnapshot.ts +12 -12
  310. package/src/getFileLink.ts +4 -4
  311. package/src/getQueryString.ts +1 -1
  312. package/src/index.ts +10 -10
  313. package/src/localOdspDriver/localOdspDeltaStorageService.ts +2 -2
  314. package/src/localOdspDriver/localOdspDocumentService.ts +5 -14
  315. package/src/localOdspDriver/localOdspDocumentServiceFactory.ts +8 -5
  316. package/src/localOdspDriver/localOdspDocumentStorageManager.ts +4 -4
  317. package/src/odspCache.ts +7 -7
  318. package/src/odspDelayLoadedDeltaStream.ts +14 -14
  319. package/src/odspDeltaStorageService.ts +8 -8
  320. package/src/odspDocumentDeltaConnection.ts +9 -9
  321. package/src/odspDocumentService.ts +9 -18
  322. package/src/odspDocumentServiceFactory.ts +2 -2
  323. package/src/odspDocumentServiceFactoryCore.ts +29 -19
  324. package/src/odspDocumentStorageManager.ts +18 -18
  325. package/src/odspDocumentStorageServiceBase.ts +13 -13
  326. package/src/odspDriverUrlResolver.ts +5 -5
  327. package/src/odspDriverUrlResolverForShareLink.ts +5 -5
  328. package/src/odspError.ts +6 -3
  329. package/src/odspFluidFileLink.ts +1 -1
  330. package/src/odspLayerCompatState.ts +1 -1
  331. package/src/odspLocationRedirection.ts +2 -2
  332. package/src/odspPublicUtils.ts +1 -1
  333. package/src/odspSnapshotParser.ts +2 -2
  334. package/src/odspSummaryUploadManager.ts +11 -7
  335. package/src/odspUrlHelper.ts +1 -1
  336. package/src/odspUtils.ts +13 -13
  337. package/src/opsCaching.ts +1 -1
  338. package/src/packageVersion.ts +1 -1
  339. package/src/prefetchLatestSnapshot.ts +13 -13
  340. package/src/retryErrorsStorageAdapter.ts +4 -4
  341. package/src/retryUtils.ts +1 -1
  342. package/src/vroom.ts +5 -5
  343. package/src/zipItDataRepresentationUtils.ts +2 -2
  344. package/dist/localOdspDriver/localOdspLayerCompatState.d.ts +0 -11
  345. package/dist/localOdspDriver/localOdspLayerCompatState.d.ts.map +0 -1
  346. package/dist/localOdspDriver/localOdspLayerCompatState.js +0 -27
  347. package/dist/localOdspDriver/localOdspLayerCompatState.js.map +0 -1
  348. package/lib/localOdspDriver/localOdspLayerCompatState.d.ts +0 -11
  349. package/lib/localOdspDriver/localOdspLayerCompatState.d.ts.map +0 -1
  350. package/lib/localOdspDriver/localOdspLayerCompatState.js +0 -24
  351. package/lib/localOdspDriver/localOdspLayerCompatState.js.map +0 -1
  352. package/src/localOdspDriver/localOdspLayerCompatState.ts +0 -27
@@ -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 { ISnapshotOptions } from "@fluidframework/odsp-driver-definitions/internal";
5
+ import type { ISnapshotOptions } from "@fluidframework/odsp-driver-definitions/internal";
6
6
  /**
7
7
  * Generates query string from the given query parameters.
8
8
  * @param queryParams - Query parameters from which to create a query.
@@ -1 +1 @@
1
- {"version":3,"file":"getQueryString.d.ts","sourceRoot":"","sources":["../src/getQueryString.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AAEpF;;;GAGG;AACH,wBAAgB,cAAc,CAC7B,WAAW,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,gBAAgB,GAChE,MAAM,CAYR"}
1
+ {"version":3,"file":"getQueryString.d.ts","sourceRoot":"","sources":["../src/getQueryString.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AAEzF;;;GAGG;AACH,wBAAgB,cAAc,CAC7B,WAAW,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,gBAAgB,GAChE,MAAM,CAYR"}
@@ -1 +1 @@
1
- {"version":3,"file":"getQueryString.js","sourceRoot":"","sources":["../src/getQueryString.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC7B,WAAkE;IAElE,IAAI,WAAW,GAAG,EAAE,CAAC;IACrB,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;QAC5C,IAAI,WAAW,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE,CAAC;YACpC,MAAM,SAAS,GAAG,WAAW,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;YACjD,iBAAiB;YACjB,iEAAiE;YACjE,WAAW,IAAI,GAAG,SAAS,GAAG,GAAG,IAAI,kBAAkB,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QAC7E,CAAC;IACF,CAAC;IAED,OAAO,WAAW,CAAC;AACpB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ISnapshotOptions } from \"@fluidframework/odsp-driver-definitions/internal\";\n\n/**\n * Generates query string from the given query parameters.\n * @param queryParams - Query parameters from which to create a query.\n */\nexport function getQueryString(\n\tqueryParams: { [key: string]: string | number } | ISnapshotOptions,\n): string {\n\tlet queryString = \"\";\n\tfor (const key of Object.keys(queryParams)) {\n\t\tif (queryParams[key] !== undefined) {\n\t\t\tconst startChar = queryString === \"\" ? \"?\" : \"&\";\n\t\t\t// False-positive\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n\t\t\tqueryString += `${startChar}${key}=${encodeURIComponent(queryParams[key])}`;\n\t\t}\n\t}\n\n\treturn queryString;\n}\n"]}
1
+ {"version":3,"file":"getQueryString.js","sourceRoot":"","sources":["../src/getQueryString.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC7B,WAAkE;IAElE,IAAI,WAAW,GAAG,EAAE,CAAC;IACrB,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;QAC5C,IAAI,WAAW,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE,CAAC;YACpC,MAAM,SAAS,GAAG,WAAW,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;YACjD,iBAAiB;YACjB,iEAAiE;YACjE,WAAW,IAAI,GAAG,SAAS,GAAG,GAAG,IAAI,kBAAkB,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QAC7E,CAAC;IACF,CAAC;IAED,OAAO,WAAW,CAAC;AACpB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ISnapshotOptions } from \"@fluidframework/odsp-driver-definitions/internal\";\n\n/**\n * Generates query string from the given query parameters.\n * @param queryParams - Query parameters from which to create a query.\n */\nexport function getQueryString(\n\tqueryParams: { [key: string]: string | number } | ISnapshotOptions,\n): string {\n\tlet queryString = \"\";\n\tfor (const key of Object.keys(queryParams)) {\n\t\tif (queryParams[key] !== undefined) {\n\t\t\tconst startChar = queryString === \"\" ? \"?\" : \"&\";\n\t\t\t// False-positive\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n\t\t\tqueryString += `${startChar}${key}=${encodeURIComponent(queryParams[key])}`;\n\t\t}\n\t}\n\n\treturn queryString;\n}\n"]}
package/lib/index.d.ts CHANGED
@@ -3,22 +3,22 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  export { OdcApiSiteOrigin, OdcFileSiteOrigin } from "./constants.js";
6
- export { ClpCompliantAppHeader, IClpCompliantAppHeader, ISharingLinkHeader, OdspFluidDataStoreLocator, SharingLinkHeader, } from "./contractsPublic.js";
6
+ export { ClpCompliantAppHeader, type IClpCompliantAppHeader, type ISharingLinkHeader, type OdspFluidDataStoreLocator, SharingLinkHeader, } from "./contractsPublic.js";
7
7
  export { checkUrl } from "./checkUrl.js";
8
8
  export { createOdspUrl } from "./createOdspUrl.js";
9
- export { getHashedDocumentId, ISnapshotContents } from "./odspPublicUtils.js";
9
+ export { getHashedDocumentId, type ISnapshotContents } from "./odspPublicUtils.js";
10
10
  export { getOdspUrlParts, isOdcUrl, isSpoUrl } from "./odspUrlHelper.js";
11
11
  export { prefetchLatestSnapshot } from "./prefetchLatestSnapshot.js";
12
12
  export { createLocalOdspDocumentServiceFactory, OdspDocumentServiceFactory, } from "./odspDocumentServiceFactory.js";
13
13
  export { OdspDocumentServiceFactoryCore } from "./odspDocumentServiceFactoryCore.js";
14
14
  export { createOdspCreateContainerRequest } from "./createOdspCreateContainerRequest.js";
15
15
  export { OdspDriverUrlResolver } from "./odspDriverUrlResolver.js";
16
- export { OdspDriverUrlResolverForShareLink, ShareLinkFetcherProps, } from "./odspDriverUrlResolverForShareLink.js";
16
+ export { OdspDriverUrlResolverForShareLink, type ShareLinkFetcherProps, } from "./odspDriverUrlResolverForShareLink.js";
17
17
  export { encodeOdspFluidDataStoreLocator, getLocatorFromOdspUrl, locatorQueryParamName, storeLocatorInOdspUrl, } from "./odspFluidFileLink.js";
18
- export { IOdspCache, IPersistedFileCache, INonPersistentCache, IPrefetchSnapshotContents, } from "./odspCache.js";
19
- export { ICacheAndTracker, type EpochTracker, FetchType, FetchTypeInternal, } from "./epochTracker.js";
20
- export { IOdspResponse, isOdspResolvedUrl } from "./odspUtils.js";
18
+ export type { IOdspCache, IPersistedFileCache, INonPersistentCache, IPrefetchSnapshotContents, } from "./odspCache.js";
19
+ export type { ICacheAndTracker, EpochTracker, FetchType, FetchTypeInternal, } from "./epochTracker.js";
20
+ export { type IOdspResponse, isOdspResolvedUrl } from "./odspUtils.js";
21
21
  export { SnapshotFormatSupportType } from "./fetchSnapshot.js";
22
- export { ISnapshotContentsWithProps, parseCompactSnapshotResponse, } from "./compactSnapshotParser.js";
22
+ export { type ISnapshotContentsWithProps, parseCompactSnapshotResponse, } from "./compactSnapshotParser.js";
23
23
  export { odspDriverCompatDetailsForLoader } from "./odspLayerCompatState.js";
24
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAErE,OAAO,EACN,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,GACjB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,QAAQ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BAAuB;AACvB,OAAO,EAAE,gCAAgC,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// Constants\nexport { OdcApiSiteOrigin, OdcFileSiteOrigin } from \"./constants.js\";\n\nexport {\n\tClpCompliantAppHeader,\n\tIClpCompliantAppHeader,\n\tISharingLinkHeader,\n\tOdspFluidDataStoreLocator,\n\tSharingLinkHeader,\n} from \"./contractsPublic.js\";\n\n// public utils\nexport { checkUrl } from \"./checkUrl.js\";\nexport { createOdspUrl } from \"./createOdspUrl.js\";\nexport { getHashedDocumentId, ISnapshotContents } from \"./odspPublicUtils.js\";\nexport { getOdspUrlParts, isOdcUrl, isSpoUrl } from \"./odspUrlHelper.js\";\n\n// prefetch latest snapshot before container load\nexport { prefetchLatestSnapshot } from \"./prefetchLatestSnapshot.js\";\n\n// Factory\nexport {\n\tcreateLocalOdspDocumentServiceFactory,\n\tOdspDocumentServiceFactory,\n} from \"./odspDocumentServiceFactory.js\";\nexport { OdspDocumentServiceFactoryCore } from \"./odspDocumentServiceFactoryCore.js\";\n\n// File creation\nexport { createOdspCreateContainerRequest } from \"./createOdspCreateContainerRequest.js\";\n\n// URI Resolver functionality, URI management\nexport { OdspDriverUrlResolver } from \"./odspDriverUrlResolver.js\";\nexport {\n\tOdspDriverUrlResolverForShareLink,\n\tShareLinkFetcherProps,\n} from \"./odspDriverUrlResolverForShareLink.js\";\n\n// It's used by URL resolve code, but also has some public functions\nexport {\n\tencodeOdspFluidDataStoreLocator,\n\tgetLocatorFromOdspUrl,\n\tlocatorQueryParamName,\n\tstoreLocatorInOdspUrl,\n} from \"./odspFluidFileLink.js\";\n\nexport {\n\tIOdspCache,\n\tIPersistedFileCache,\n\tINonPersistentCache,\n\tIPrefetchSnapshotContents,\n} from \"./odspCache.js\";\nexport {\n\tICacheAndTracker,\n\ttype EpochTracker,\n\tFetchType,\n\tFetchTypeInternal,\n} from \"./epochTracker.js\";\nexport { IOdspResponse, isOdspResolvedUrl } from \"./odspUtils.js\";\nexport { SnapshotFormatSupportType } from \"./fetchSnapshot.js\";\nexport {\n\tISnapshotContentsWithProps,\n\tparseCompactSnapshotResponse,\n} from \"./compactSnapshotParser.js\";\n\n// Layer Compat details\nexport { odspDriverCompatDetailsForLoader } from \"./odspLayerCompatState.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY;AACZ,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAErE,OAAO,EACN,qBAAqB,EAIrB,iBAAiB,GACjB,MAAM,sBAAsB,CAAC;AAE9B,eAAe;AACf,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAA0B,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEzE,iDAAiD;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,UAAU;AACV,OAAO,EACN,qCAAqC,EACrC,0BAA0B,GAC1B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAErF,gBAAgB;AAChB,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAEzF,6CAA6C;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EACN,iCAAiC,GAEjC,MAAM,wCAAwC,CAAC;AAEhD,oEAAoE;AACpE,OAAO,EACN,+BAA+B,EAC/B,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,GACrB,MAAM,wBAAwB,CAAC;AAchC,OAAO,EAAsB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAEN,4BAA4B,GAC5B,MAAM,4BAA4B,CAAC;AAEpC,uBAAuB;AACvB,OAAO,EAAE,gCAAgC,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// Constants\nexport { OdcApiSiteOrigin, OdcFileSiteOrigin } from \"./constants.js\";\n\nexport {\n\tClpCompliantAppHeader,\n\ttype IClpCompliantAppHeader,\n\ttype ISharingLinkHeader,\n\ttype OdspFluidDataStoreLocator,\n\tSharingLinkHeader,\n} from \"./contractsPublic.js\";\n\n// public utils\nexport { checkUrl } from \"./checkUrl.js\";\nexport { createOdspUrl } from \"./createOdspUrl.js\";\nexport { getHashedDocumentId, type ISnapshotContents } from \"./odspPublicUtils.js\";\nexport { getOdspUrlParts, isOdcUrl, isSpoUrl } from \"./odspUrlHelper.js\";\n\n// prefetch latest snapshot before container load\nexport { prefetchLatestSnapshot } from \"./prefetchLatestSnapshot.js\";\n\n// Factory\nexport {\n\tcreateLocalOdspDocumentServiceFactory,\n\tOdspDocumentServiceFactory,\n} from \"./odspDocumentServiceFactory.js\";\nexport { OdspDocumentServiceFactoryCore } from \"./odspDocumentServiceFactoryCore.js\";\n\n// File creation\nexport { createOdspCreateContainerRequest } from \"./createOdspCreateContainerRequest.js\";\n\n// URI Resolver functionality, URI management\nexport { OdspDriverUrlResolver } from \"./odspDriverUrlResolver.js\";\nexport {\n\tOdspDriverUrlResolverForShareLink,\n\ttype ShareLinkFetcherProps,\n} from \"./odspDriverUrlResolverForShareLink.js\";\n\n// It's used by URL resolve code, but also has some public functions\nexport {\n\tencodeOdspFluidDataStoreLocator,\n\tgetLocatorFromOdspUrl,\n\tlocatorQueryParamName,\n\tstoreLocatorInOdspUrl,\n} from \"./odspFluidFileLink.js\";\n\nexport type {\n\tIOdspCache,\n\tIPersistedFileCache,\n\tINonPersistentCache,\n\tIPrefetchSnapshotContents,\n} from \"./odspCache.js\";\nexport type {\n\tICacheAndTracker,\n\tEpochTracker,\n\tFetchType,\n\tFetchTypeInternal,\n} from \"./epochTracker.js\";\nexport { type IOdspResponse, isOdspResolvedUrl } from \"./odspUtils.js\";\nexport { SnapshotFormatSupportType } from \"./fetchSnapshot.js\";\nexport {\n\ttype ISnapshotContentsWithProps,\n\tparseCompactSnapshotResponse,\n} from \"./compactSnapshotParser.js\";\n\n// Layer Compat details\nexport { odspDriverCompatDetailsForLoader } from \"./odspLayerCompatState.js\";\n"]}
@@ -2,8 +2,8 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { IDocumentDeltaStorageService, IStream, ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
6
- import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
5
+ import type { IDocumentDeltaStorageService, IStream, ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
6
+ import type { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
7
7
  /**
8
8
  * Implementation of IDocumentDeltaStorageService that will return snapshot ops when fetching messages
9
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"localOdspDeltaStorageService.d.ts","sourceRoot":"","sources":["../../src/localOdspDriver/localOdspDeltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,4BAA4B,EAC5B,OAAO,EACP,yBAAyB,EACzB,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAE/E;;GAEG;AACH,qBAAa,4BAA6B,YAAW,4BAA4B;IAE/E,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,WAAW;gBADF,MAAM,EAAE,mBAAmB,EACpC,WAAW,EAAE,yBAAyB,EAAE;IAG1C,aAAa,CACnB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,YAAY,CAAC,EAAE,WAAW,EAC1B,WAAW,CAAC,EAAE,OAAO,EACrB,YAAY,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,yBAAyB,EAAE,CAAC;CAsBvC"}
1
+ {"version":3,"file":"localOdspDeltaStorageService.d.ts","sourceRoot":"","sources":["../../src/localOdspDriver/localOdspDeltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EACX,4BAA4B,EAC5B,OAAO,EACP,yBAAyB,EACzB,MAAM,6CAA6C,CAAC;AAErD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAEpF;;GAEG;AACH,qBAAa,4BAA6B,YAAW,4BAA4B;IAE/E,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,WAAW;gBADF,MAAM,EAAE,mBAAmB,EACpC,WAAW,EAAE,yBAAyB,EAAE;IAG1C,aAAa,CACnB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,YAAY,CAAC,EAAE,WAAW,EAC1B,WAAW,CAAC,EAAE,OAAO,EACrB,YAAY,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,yBAAyB,EAAE,CAAC;CAsBvC"}
@@ -1 +1 @@
1
- {"version":3,"file":"localOdspDeltaStorageService.js","sourceRoot":"","sources":["../../src/localOdspDriver/localOdspDeltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAMxE,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAGlF;;GAEG;AACH,MAAM,OAAO,4BAA4B;IACxC,YACkB,MAA2B,EACpC,WAAwC;QAD/B,WAAM,GAAN,MAAM,CAAqB;QACpC,gBAAW,GAAX,WAAW,CAA6B;IAC9C,CAAC;IAEG,aAAa,CACnB,IAAY,EACZ,EAAsB,EACtB,YAA0B,EAC1B,WAAqB,EACrB,YAAqB;QAErB,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACnC,OAAO,kBAAkB,CAAC;QAC3B,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,KAAK,EAA+B,CAAC;QACvD,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CACvC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,cAAc,IAAI,IAAI,IAAI,CAAC,EAAE,KAAK,SAAS,IAAI,EAAE,CAAC,cAAc,GAAG,EAAE,CAAC,CACjF,CAAC;QACF,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAExD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,cAAc,KAAK,IAAI,EAAE,CAAC;YAClE,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACvB,CAAC;QACD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CACzC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,SAAS,IAAI,EAAE,CAAC,cAAc,IAAI,EAAE,CACnD,CAAC;QAEF,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QAC1B,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,OAAO,KAAK,CAAC;IACd,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { validateMessages } from \"@fluidframework/driver-base/internal\";\nimport {\n\tIDocumentDeltaStorageService,\n\tIStream,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport { Queue, emptyMessageStream } from \"@fluidframework/driver-utils/internal\";\nimport { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils/internal\";\n\n/**\n * Implementation of IDocumentDeltaStorageService that will return snapshot ops when fetching messages\n */\nexport class LocalOdspDeltaStorageService implements IDocumentDeltaStorageService {\n\tconstructor(\n\t\tprivate readonly logger: ITelemetryLoggerExt,\n\t\tprivate snapshotOps: ISequencedDocumentMessage[],\n\t) {}\n\n\tpublic fetchMessages(\n\t\tfrom: number,\n\t\tto: number | undefined,\n\t\t_abortSignal?: AbortSignal,\n\t\t_cachedOnly?: boolean,\n\t\t_fetchReason?: string,\n\t): IStream<ISequencedDocumentMessage[]> {\n\t\tif (this.snapshotOps.length === 0) {\n\t\t\treturn emptyMessageStream;\n\t\t}\n\n\t\tconst queue = new Queue<ISequencedDocumentMessage[]>();\n\t\tconst messages = this.snapshotOps.filter(\n\t\t\t(op) => op.sequenceNumber >= from && (to === undefined || op.sequenceNumber < to),\n\t\t);\n\t\tvalidateMessages(\"cached\", messages, from, this.logger);\n\n\t\tif (messages.length === 0 || messages[0].sequenceNumber !== from) {\n\t\t\tthis.snapshotOps = [];\n\t\t}\n\t\tthis.snapshotOps = this.snapshotOps.filter(\n\t\t\t(op) => to !== undefined && op.sequenceNumber >= to,\n\t\t);\n\n\t\tqueue.pushValue(messages);\n\t\tqueue.pushDone();\n\t\treturn queue;\n\t}\n}\n"]}
1
+ {"version":3,"file":"localOdspDeltaStorageService.js","sourceRoot":"","sources":["../../src/localOdspDriver/localOdspDeltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAMxE,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAGlF;;GAEG;AACH,MAAM,OAAO,4BAA4B;IACxC,YACkB,MAA2B,EACpC,WAAwC;QAD/B,WAAM,GAAN,MAAM,CAAqB;QACpC,gBAAW,GAAX,WAAW,CAA6B;IAC9C,CAAC;IAEG,aAAa,CACnB,IAAY,EACZ,EAAsB,EACtB,YAA0B,EAC1B,WAAqB,EACrB,YAAqB;QAErB,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACnC,OAAO,kBAAkB,CAAC;QAC3B,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,KAAK,EAA+B,CAAC;QACvD,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CACvC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,cAAc,IAAI,IAAI,IAAI,CAAC,EAAE,KAAK,SAAS,IAAI,EAAE,CAAC,cAAc,GAAG,EAAE,CAAC,CACjF,CAAC;QACF,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAExD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,cAAc,KAAK,IAAI,EAAE,CAAC;YAClE,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACvB,CAAC;QACD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CACzC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,SAAS,IAAI,EAAE,CAAC,cAAc,IAAI,EAAE,CACnD,CAAC;QAEF,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QAC1B,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,OAAO,KAAK,CAAC;IACd,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { validateMessages } from \"@fluidframework/driver-base/internal\";\nimport type {\n\tIDocumentDeltaStorageService,\n\tIStream,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport { Queue, emptyMessageStream } from \"@fluidframework/driver-utils/internal\";\nimport type { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils/internal\";\n\n/**\n * Implementation of IDocumentDeltaStorageService that will return snapshot ops when fetching messages\n */\nexport class LocalOdspDeltaStorageService implements IDocumentDeltaStorageService {\n\tconstructor(\n\t\tprivate readonly logger: ITelemetryLoggerExt,\n\t\tprivate snapshotOps: ISequencedDocumentMessage[],\n\t) {}\n\n\tpublic fetchMessages(\n\t\tfrom: number,\n\t\tto: number | undefined,\n\t\t_abortSignal?: AbortSignal,\n\t\t_cachedOnly?: boolean,\n\t\t_fetchReason?: string,\n\t): IStream<ISequencedDocumentMessage[]> {\n\t\tif (this.snapshotOps.length === 0) {\n\t\t\treturn emptyMessageStream;\n\t\t}\n\n\t\tconst queue = new Queue<ISequencedDocumentMessage[]>();\n\t\tconst messages = this.snapshotOps.filter(\n\t\t\t(op) => op.sequenceNumber >= from && (to === undefined || op.sequenceNumber < to),\n\t\t);\n\t\tvalidateMessages(\"cached\", messages, from, this.logger);\n\n\t\tif (messages.length === 0 || messages[0].sequenceNumber !== from) {\n\t\t\tthis.snapshotOps = [];\n\t\t}\n\t\tthis.snapshotOps = this.snapshotOps.filter(\n\t\t\t(op) => to !== undefined && op.sequenceNumber >= to,\n\t\t);\n\n\t\tqueue.pushValue(messages);\n\t\tqueue.pushDone();\n\t\treturn queue;\n\t}\n}\n"]}
@@ -2,11 +2,11 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { TypedEventEmitter, type ILayerCompatDetails } from "@fluid-internal/client-utils";
6
- import { IClient } from "@fluidframework/driver-definitions";
7
- import { IDocumentDeltaStorageService, IDocumentService, IDocumentServiceEvents, IDocumentStorageService, IResolvedUrl } from "@fluidframework/driver-definitions/internal";
8
- import { IOdspResolvedUrl } from "@fluidframework/odsp-driver-definitions/internal";
9
- import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
5
+ import { TypedEventEmitter } from "@fluid-internal/client-utils";
6
+ import type { IClient } from "@fluidframework/driver-definitions";
7
+ import type { IDocumentDeltaStorageService, IDocumentService, IDocumentServiceEvents, IDocumentStorageService, IResolvedUrl } from "@fluidframework/driver-definitions/internal";
8
+ import type { IOdspResolvedUrl } from "@fluidframework/odsp-driver-definitions/internal";
9
+ import type { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
10
10
  /**
11
11
  * IDocumentService implementation that provides explicit snapshot to the document storage service.
12
12
  */
@@ -19,11 +19,6 @@ export declare class LocalOdspDocumentService extends TypedEventEmitter<IDocumen
19
19
  };
20
20
  private storageManager?;
21
21
  constructor(odspResolvedUrl: IOdspResolvedUrl, logger: ITelemetryLoggerExt, localSnapshot: Uint8Array | string);
22
- /**
23
- * The compatibility details of the Local ODSP Driver layer that is exposed to the Loader layer
24
- * for validating Loader-Driver compatibility.
25
- */
26
- get ILayerCompatDetails(): ILayerCompatDetails;
27
22
  get resolvedUrl(): IResolvedUrl;
28
23
  connectToStorage(): Promise<IDocumentStorageService>;
29
24
  connectToDeltaStorage(): Promise<IDocumentDeltaStorageService>;
@@ -1 +1 @@
1
- {"version":3,"file":"localOdspDocumentService.d.ts","sourceRoot":"","sources":["../../src/localOdspDriver/localOdspDocumentService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,KAAK,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAC3F,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EACN,4BAA4B,EAC5B,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,YAAY,EACZ,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAM/E;;GAEG;AACH,qBAAa,wBACZ,SAAQ,iBAAiB,CAAC,sBAAsB,CAChD,YAAW,gBAAgB;IAM1B,OAAO,CAAC,QAAQ,CAAC,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AAC,CAAkC;gBAGvC,eAAe,EAAE,gBAAgB,EACjC,MAAM,EAAE,mBAAmB,EAC3B,aAAa,EAAE,UAAU,GAAG,MAAM;IAKpD,IAAW,WAAW,IAAI,YAAY,CAErC;IAEY,gBAAgB,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAKpD,qBAAqB,IAAI,OAAO,CAAC,4BAA4B,CAAC;IAIpE,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,KAAK;IAQ7C,OAAO,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI;CAGrC"}
@@ -6,7 +6,6 @@ import { TypedEventEmitter } from "@fluid-internal/client-utils";
6
6
  import { UsageError } from "@fluidframework/driver-utils/internal";
7
7
  import { LocalOdspDeltaStorageService } from "./localOdspDeltaStorageService.js";
8
8
  import { LocalOdspDocumentStorageService } from "./localOdspDocumentStorageManager.js";
9
- import { localOdspDriverCompatDetailsForLoader } from "./localOdspLayerCompatState.js";
10
9
  /**
11
10
  * IDocumentService implementation that provides explicit snapshot to the document storage service.
12
11
  */
@@ -18,13 +17,6 @@ export class LocalOdspDocumentService extends TypedEventEmitter {
18
17
  this.localSnapshot = localSnapshot;
19
18
  this.policies = { storageOnly: true };
20
19
  }
21
- /**
22
- * The compatibility details of the Local ODSP Driver layer that is exposed to the Loader layer
23
- * for validating Loader-Driver compatibility.
24
- */
25
- get ILayerCompatDetails() {
26
- return localOdspDriverCompatDetailsForLoader;
27
- }
28
20
  get resolvedUrl() {
29
21
  return this.odspResolvedUrl;
30
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"localOdspDocumentService.js","sourceRoot":"","sources":["../../src/localOdspDriver/localOdspDocumentService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAA4B,MAAM,8BAA8B,CAAC;AAS3F,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAInE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AACvF,OAAO,EAAE,qCAAqC,EAAE,MAAM,gCAAgC,CAAC;AAEvF;;GAEG;AACH,MAAM,OAAO,wBACZ,SAAQ,iBAAyC;IAMjD,YACkB,eAAiC,EACjC,MAA2B,EAC3B,aAAkC;QAEnD,KAAK,EAAE,CAAC;QAJS,oBAAe,GAAf,eAAe,CAAkB;QACjC,WAAM,GAAN,MAAM,CAAqB;QAC3B,kBAAa,GAAb,aAAa,CAAqB;QAN7C,aAAQ,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;IASxC,CAAC;IAED;;;OAGG;IACH,IAAW,mBAAmB;QAC7B,OAAO,qCAAqC,CAAC;IAC9C,CAAC;IAED,IAAW,WAAW;QACrB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC7B,CAAC;IAEM,KAAK,CAAC,gBAAgB;QAC5B,IAAI,CAAC,cAAc,GAAG,IAAI,+BAA+B,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3F,OAAO,IAAI,CAAC,cAAc,CAAC;IAC5B,CAAC;IAEM,KAAK,CAAC,qBAAqB;QACjC,OAAO,IAAI,4BAA4B,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IACtF,CAAC;IAEM,oBAAoB,CAAC,OAAgB;QAC3C,MAAM,OAAO,GAAG,IAAI,UAAU,CAC7B,qEAAqE,CACrE,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,EAAE,OAAO,CAAC,CAAC;QACvE,MAAM,OAAO,CAAC;IACf,CAAC;IAEM,OAAO,CAAC,KAAe;QAC7B,aAAa;IACd,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TypedEventEmitter, type ILayerCompatDetails } from \"@fluid-internal/client-utils\";\nimport { IClient } from \"@fluidframework/driver-definitions\";\nimport {\n\tIDocumentDeltaStorageService,\n\tIDocumentService,\n\tIDocumentServiceEvents,\n\tIDocumentStorageService,\n\tIResolvedUrl,\n} from \"@fluidframework/driver-definitions/internal\";\nimport { UsageError } from \"@fluidframework/driver-utils/internal\";\nimport { IOdspResolvedUrl } from \"@fluidframework/odsp-driver-definitions/internal\";\nimport { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { LocalOdspDeltaStorageService } from \"./localOdspDeltaStorageService.js\";\nimport { LocalOdspDocumentStorageService } from \"./localOdspDocumentStorageManager.js\";\nimport { localOdspDriverCompatDetailsForLoader } from \"./localOdspLayerCompatState.js\";\n\n/**\n * IDocumentService implementation that provides explicit snapshot to the document storage service.\n */\nexport class LocalOdspDocumentService\n\textends TypedEventEmitter<IDocumentServiceEvents>\n\timplements IDocumentService\n{\n\tpublic policies = { storageOnly: true };\n\tprivate storageManager?: LocalOdspDocumentStorageService;\n\n\tconstructor(\n\t\tprivate readonly odspResolvedUrl: IOdspResolvedUrl,\n\t\tprivate readonly logger: ITelemetryLoggerExt,\n\t\tprivate readonly localSnapshot: Uint8Array | string,\n\t) {\n\t\tsuper();\n\t}\n\n\t/**\n\t * The compatibility details of the Local ODSP Driver layer that is exposed to the Loader layer\n\t * for validating Loader-Driver compatibility.\n\t */\n\tpublic get ILayerCompatDetails(): ILayerCompatDetails {\n\t\treturn localOdspDriverCompatDetailsForLoader;\n\t}\n\n\tpublic get resolvedUrl(): IResolvedUrl {\n\t\treturn this.odspResolvedUrl;\n\t}\n\n\tpublic async connectToStorage(): Promise<IDocumentStorageService> {\n\t\tthis.storageManager = new LocalOdspDocumentStorageService(this.logger, this.localSnapshot);\n\t\treturn this.storageManager;\n\t}\n\n\tpublic async connectToDeltaStorage(): Promise<IDocumentDeltaStorageService> {\n\t\treturn new LocalOdspDeltaStorageService(this.logger, this.storageManager?.ops ?? []);\n\t}\n\n\tpublic connectToDeltaStream(_client: IClient): never {\n\t\tconst toThrow = new UsageError(\n\t\t\t'\"connectToDeltaStream\" is not supported by LocalOdspDocumentService',\n\t\t);\n\t\tthis.logger.sendErrorEvent({ eventName: \"UnsupportedUsage\" }, toThrow);\n\t\tthrow toThrow;\n\t}\n\n\tpublic dispose(error?: unknown): void {\n\t\t// Do nothing\n\t}\n}\n"]}
1
+ {"version":3,"file":"localOdspDocumentService.js","sourceRoot":"","sources":["../../src/localOdspDriver/localOdspDocumentService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AASjE,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAInE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAEvF;;GAEG;AACH,MAAM,OAAO,wBACZ,SAAQ,iBAAyC;IAMjD,YACkB,eAAiC,EACjC,MAA2B,EAC3B,aAAkC;QAEnD,KAAK,EAAE,CAAC;QAJS,oBAAe,GAAf,eAAe,CAAkB;QACjC,WAAM,GAAN,MAAM,CAAqB;QAC3B,kBAAa,GAAb,aAAa,CAAqB;QAN7C,aAAQ,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;IASxC,CAAC;IAED,IAAW,WAAW;QACrB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC7B,CAAC;IAEM,KAAK,CAAC,gBAAgB;QAC5B,IAAI,CAAC,cAAc,GAAG,IAAI,+BAA+B,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3F,OAAO,IAAI,CAAC,cAAc,CAAC;IAC5B,CAAC;IAEM,KAAK,CAAC,qBAAqB;QACjC,OAAO,IAAI,4BAA4B,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IACtF,CAAC;IAEM,oBAAoB,CAAC,OAAgB;QAC3C,MAAM,OAAO,GAAG,IAAI,UAAU,CAC7B,qEAAqE,CACrE,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,EAAE,OAAO,CAAC,CAAC;QACvE,MAAM,OAAO,CAAC;IACf,CAAC;IAEM,OAAO,CAAC,KAAe;QAC7B,aAAa;IACd,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TypedEventEmitter } from \"@fluid-internal/client-utils\";\nimport type { IClient } from \"@fluidframework/driver-definitions\";\nimport type {\n\tIDocumentDeltaStorageService,\n\tIDocumentService,\n\tIDocumentServiceEvents,\n\tIDocumentStorageService,\n\tIResolvedUrl,\n} from \"@fluidframework/driver-definitions/internal\";\nimport { UsageError } from \"@fluidframework/driver-utils/internal\";\nimport type { IOdspResolvedUrl } from \"@fluidframework/odsp-driver-definitions/internal\";\nimport type { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { LocalOdspDeltaStorageService } from \"./localOdspDeltaStorageService.js\";\nimport { LocalOdspDocumentStorageService } from \"./localOdspDocumentStorageManager.js\";\n\n/**\n * IDocumentService implementation that provides explicit snapshot to the document storage service.\n */\nexport class LocalOdspDocumentService\n\textends TypedEventEmitter<IDocumentServiceEvents>\n\timplements IDocumentService\n{\n\tpublic policies = { storageOnly: true };\n\tprivate storageManager?: LocalOdspDocumentStorageService;\n\n\tconstructor(\n\t\tprivate readonly odspResolvedUrl: IOdspResolvedUrl,\n\t\tprivate readonly logger: ITelemetryLoggerExt,\n\t\tprivate readonly localSnapshot: Uint8Array | string,\n\t) {\n\t\tsuper();\n\t}\n\n\tpublic get resolvedUrl(): IResolvedUrl {\n\t\treturn this.odspResolvedUrl;\n\t}\n\n\tpublic async connectToStorage(): Promise<IDocumentStorageService> {\n\t\tthis.storageManager = new LocalOdspDocumentStorageService(this.logger, this.localSnapshot);\n\t\treturn this.storageManager;\n\t}\n\n\tpublic async connectToDeltaStorage(): Promise<IDocumentDeltaStorageService> {\n\t\treturn new LocalOdspDeltaStorageService(this.logger, this.storageManager?.ops ?? []);\n\t}\n\n\tpublic connectToDeltaStream(_client: IClient): never {\n\t\tconst toThrow = new UsageError(\n\t\t\t'\"connectToDeltaStream\" is not supported by LocalOdspDocumentService',\n\t\t);\n\t\tthis.logger.sendErrorEvent({ eventName: \"UnsupportedUsage\" }, toThrow);\n\t\tthrow toThrow;\n\t}\n\n\tpublic dispose(error?: unknown): void {\n\t\t// Do nothing\n\t}\n}\n"]}
@@ -2,11 +2,11 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
6
- import { ISummaryTree } from "@fluidframework/driver-definitions";
7
- import { IDocumentService, IResolvedUrl } from "@fluidframework/driver-definitions/internal";
8
- import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
9
- import { ICacheAndTracker } from "../epochTracker.js";
5
+ import type { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
6
+ import type { ISummaryTree } from "@fluidframework/driver-definitions";
7
+ import type { IDocumentService, IResolvedUrl } from "@fluidframework/driver-definitions/internal";
8
+ import type { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
9
+ import type { ICacheAndTracker } from "../epochTracker.js";
10
10
  import { OdspDocumentServiceFactoryCore } from "../odspDocumentServiceFactoryCore.js";
11
11
  /**
12
12
  * Factory for creating sharepoint document service with a provided snapshot.
@@ -1 +1 @@
1
- {"version":3,"file":"localOdspDocumentServiceFactory.d.ts","sourceRoot":"","sources":["../../src/localOdspDriver/localOdspDocumentServiceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM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ACxE,CAAC;QAJ0B,kBAAa,GAAb,aAAa,CAAqB;QAF9C,WAAM,GAAwB,gBAAgB,EAAE,CAAC;IAOlE,CAAC;IAEO,0BAA0B,CAAC,mBAA2B;QAC7D,MAAM,OAAO,GAAG,IAAI,UAAU,CAC7B,GAAG,mBAAmB,sDAAsD,CAC5E,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,EAAE,OAAO,CAAC,CAAC;QACvE,MAAM,OAAO,CAAC;IACf,CAAC;IAEM,eAAe,CACrB,iBAA2C,EAC3C,qBAAmC,EACnC,MAA6B,EAC7B,mBAA6B;QAE7B,MAAM,OAAO,GAAG,IAAI,UAAU,CAC7B,uEAAuE,CACvE,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,EAAE,OAAO,CAAC,CAAC;QACvE,MAAM,OAAO,CAAC;IACf,CAAC;IAES,KAAK,CAAC,yBAAyB,CACxC,WAAyB,EACzB,UAA+B,EAC/B,mBAAsC,EACtC,mBAA6B;QAE7B,IAAI,mBAAmB,KAAK,SAAS,EAAE,CAAC;YACvC,MAAM,IAAI,UAAU,CAAC,6DAA6D,CAAC,CAAC;QACrF,CAAC;QACD,IAAI,mBAAmB,EAAE,CAAC;YACzB,MAAM,IAAI,UAAU,CAAC,6DAA6D,CAAC,CAAC;QACrF,CAAC;QACD,OAAO,IAAI,wBAAwB,CAClC,kBAAkB,CAAC,WAAW,CAAC,EAC/B,UAAU,EACV,IAAI,CAAC,aAAa,CAClB,CAAC;IACH,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger } from \"@fluidframework/core-interfaces\";\nimport { ISummaryTree } from \"@fluidframework/driver-definitions\";\nimport { IDocumentService, IResolvedUrl } from \"@fluidframework/driver-definitions/internal\";\nimport { UsageError } from \"@fluidframework/driver-utils/internal\";\nimport { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { ICacheAndTracker } from \"../epochTracker.js\";\nimport { OdspDocumentServiceFactoryCore } from \"../odspDocumentServiceFactoryCore.js\";\nimport { createOdspLogger, getOdspResolvedUrl } from \"../odspUtils.js\";\n\nimport { LocalOdspDocumentService } from \"./localOdspDocumentService.js\";\n\n/**\n * Factory for creating sharepoint document service with a provided snapshot.\n *\n * @remarks Use if you don't want to connect to any kind of external/internal storages and want to provide\n * content directly.\n */\nexport class LocalOdspDocumentServiceFactory extends OdspDocumentServiceFactoryCore {\n\tprivate readonly logger: ITelemetryLoggerExt = createOdspLogger();\n\n\tconstructor(private readonly localSnapshot: Uint8Array | string) {\n\t\tsuper(\n\t\t\t(_options) => this.throwUnsupportedUsageError(\"Getting storage token\"),\n\t\t\t(_options) => this.throwUnsupportedUsageError(\"Getting websocket token\"),\n\t\t);\n\t}\n\n\tprivate throwUnsupportedUsageError(unsupportedFuncName: string): never {\n\t\tconst toThrow = new UsageError(\n\t\t\t`${unsupportedFuncName} is not supported by LocalOdspDocumentServiceFactory`,\n\t\t);\n\t\tthis.logger.sendErrorEvent({ eventName: \"UnsupportedUsage\" }, toThrow);\n\t\tthrow toThrow;\n\t}\n\n\tpublic createContainer(\n\t\t_createNewSummary: ISummaryTree | undefined,\n\t\t_createNewResolvedUrl: IResolvedUrl,\n\t\tlogger?: ITelemetryBaseLogger,\n\t\t_clientIsSummarizer?: boolean,\n\t): never {\n\t\tconst toThrow = new UsageError(\n\t\t\t'\"createContainer\" is not supported by LocalOdspDocumentServiceFactory',\n\t\t);\n\t\tthis.logger.sendErrorEvent({ eventName: \"UnsupportedUsage\" }, toThrow);\n\t\tthrow toThrow;\n\t}\n\n\tprotected async createDocumentServiceCore(\n\t\tresolvedUrl: IResolvedUrl,\n\t\todspLogger: ITelemetryLoggerExt,\n\t\t_cacheAndTrackerArg?: ICacheAndTracker,\n\t\t_clientIsSummarizer?: boolean,\n\t): Promise<IDocumentService> {\n\t\tif (_cacheAndTrackerArg !== undefined) {\n\t\t\tthrow new UsageError('Invalid usage. \"_cacheAndTrackerArg\" should not be provided');\n\t\t}\n\t\tif (_clientIsSummarizer) {\n\t\t\tthrow new UsageError('Invalid usage. \"_clientIsSummarizer\" should not be provided');\n\t\t}\n\t\treturn new LocalOdspDocumentService(\n\t\t\tgetOdspResolvedUrl(resolvedUrl),\n\t\t\todspLogger,\n\t\t\tthis.localSnapshot,\n\t\t);\n\t}\n}\n"]}
1
+ {"version":3,"file":"localOdspDocumentServiceFactory.js","sourceRoot":"","sources":["../../src/localOdspDriver/localOdspDocumentServiceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAInE,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE;;;;;GAKG;AACH,MAAM,OAAO,+BAAgC,SAAQ,8BAA8B;IAGlF,YAA6B,aAAkC;QAC9D,KAAK,CACJ,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,0BAA0B,CAAC,uBAAuB,CAAC,EACtE,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,0BAA0B,CAAC,yBAAyB,CAAC,CACxE,CAAC;QAJ0B,kBAAa,GAAb,aAAa,CAAqB;QAF9C,WAAM,GAAwB,gBAAgB,EAAE,CAAC;IAOlE,CAAC;IAEO,0BAA0B,CAAC,mBAA2B;QAC7D,MAAM,OAAO,GAAG,IAAI,UAAU,CAC7B,GAAG,mBAAmB,sDAAsD,CAC5E,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,EAAE,OAAO,CAAC,CAAC;QACvE,MAAM,OAAO,CAAC;IACf,CAAC;IAEM,eAAe,CACrB,iBAA2C,EAC3C,qBAAmC,EACnC,MAA6B,EAC7B,mBAA6B;QAE7B,MAAM,OAAO,GAAG,IAAI,UAAU,CAC7B,uEAAuE,CACvE,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,EAAE,OAAO,CAAC,CAAC;QACvE,MAAM,OAAO,CAAC;IACf,CAAC;IAES,KAAK,CAAC,yBAAyB,CACxC,WAAyB,EACzB,UAA+B,EAC/B,mBAAsC,EACtC,mBAA6B;QAE7B,IAAI,mBAAmB,KAAK,SAAS,EAAE,CAAC;YACvC,MAAM,IAAI,UAAU,CAAC,6DAA6D,CAAC,CAAC;QACrF,CAAC;QACD,IAAI,mBAAmB,EAAE,CAAC;YACzB,MAAM,IAAI,UAAU,CAAC,6DAA6D,CAAC,CAAC;QACrF,CAAC;QACD,OAAO,IAAI,wBAAwB,CAClC,kBAAkB,CAAC,WAAW,CAAC,EAC/B,UAAU,EACV,IAAI,CAAC,aAAa,CAClB,CAAC;IACH,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ITelemetryBaseLogger } from \"@fluidframework/core-interfaces\";\nimport type { ISummaryTree } from \"@fluidframework/driver-definitions\";\nimport type {\n\tIDocumentService,\n\tIResolvedUrl,\n} from \"@fluidframework/driver-definitions/internal\";\nimport { UsageError } from \"@fluidframework/driver-utils/internal\";\nimport type { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type { ICacheAndTracker } from \"../epochTracker.js\";\nimport { OdspDocumentServiceFactoryCore } from \"../odspDocumentServiceFactoryCore.js\";\nimport { createOdspLogger, getOdspResolvedUrl } from \"../odspUtils.js\";\n\nimport { LocalOdspDocumentService } from \"./localOdspDocumentService.js\";\n\n/**\n * Factory for creating sharepoint document service with a provided snapshot.\n *\n * @remarks Use if you don't want to connect to any kind of external/internal storages and want to provide\n * content directly.\n */\nexport class LocalOdspDocumentServiceFactory extends OdspDocumentServiceFactoryCore {\n\tprivate readonly logger: ITelemetryLoggerExt = createOdspLogger();\n\n\tconstructor(private readonly localSnapshot: Uint8Array | string) {\n\t\tsuper(\n\t\t\t(_options) => this.throwUnsupportedUsageError(\"Getting storage token\"),\n\t\t\t(_options) => this.throwUnsupportedUsageError(\"Getting websocket token\"),\n\t\t);\n\t}\n\n\tprivate throwUnsupportedUsageError(unsupportedFuncName: string): never {\n\t\tconst toThrow = new UsageError(\n\t\t\t`${unsupportedFuncName} is not supported by LocalOdspDocumentServiceFactory`,\n\t\t);\n\t\tthis.logger.sendErrorEvent({ eventName: \"UnsupportedUsage\" }, toThrow);\n\t\tthrow toThrow;\n\t}\n\n\tpublic createContainer(\n\t\t_createNewSummary: ISummaryTree | undefined,\n\t\t_createNewResolvedUrl: IResolvedUrl,\n\t\tlogger?: ITelemetryBaseLogger,\n\t\t_clientIsSummarizer?: boolean,\n\t): never {\n\t\tconst toThrow = new UsageError(\n\t\t\t'\"createContainer\" is not supported by LocalOdspDocumentServiceFactory',\n\t\t);\n\t\tthis.logger.sendErrorEvent({ eventName: \"UnsupportedUsage\" }, toThrow);\n\t\tthrow toThrow;\n\t}\n\n\tprotected async createDocumentServiceCore(\n\t\tresolvedUrl: IResolvedUrl,\n\t\todspLogger: ITelemetryLoggerExt,\n\t\t_cacheAndTrackerArg?: ICacheAndTracker,\n\t\t_clientIsSummarizer?: boolean,\n\t): Promise<IDocumentService> {\n\t\tif (_cacheAndTrackerArg !== undefined) {\n\t\t\tthrow new UsageError('Invalid usage. \"_cacheAndTrackerArg\" should not be provided');\n\t\t}\n\t\tif (_clientIsSummarizer) {\n\t\t\tthrow new UsageError('Invalid usage. \"_clientIsSummarizer\" should not be provided');\n\t\t}\n\t\treturn new LocalOdspDocumentService(\n\t\t\tgetOdspResolvedUrl(resolvedUrl),\n\t\t\todspLogger,\n\t\t\tthis.localSnapshot,\n\t\t);\n\t}\n}\n"]}
@@ -2,9 +2,9 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { ISummaryTree } from "@fluidframework/driver-definitions";
6
- import { ISnapshot, ISnapshotFetchOptions, ISummaryContext, IVersion } from "@fluidframework/driver-definitions/internal";
7
- import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
5
+ import type { ISummaryTree } from "@fluidframework/driver-definitions";
6
+ import type { ISnapshot, ISnapshotFetchOptions, ISummaryContext, IVersion } from "@fluidframework/driver-definitions/internal";
7
+ import { type ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
8
8
  import { OdspDocumentStorageServiceBase } from "../odspDocumentStorageServiceBase.js";
9
9
  /**
10
10
  * ODSP document storage service that works on a provided snapshot for all its processing.
@@ -1 +1 @@
1
- {"version":3,"file":"localOdspDocumentStorageManager.d.ts","sourceRoot":"","sources":["../../src/localOdspDriver/localOdspDocumentStorageManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EACN,SAAS,EACT,qBAAqB,EACrB,eAAe,EACf,QAAQ,EACR,MAAM,6CAA6C,CAAC;AAErD,OAAO,EACN,mBAAmB,EAEnB,MAAM,0CAA0C,CAAC;AAIlD,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAGtF;;;GAGG;AACH,qBAAa,+BAAgC,SAAQ,8BAA8B;IAIjF,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAJ/B,OAAO,CAAC,cAAc,CAAqB;gBAGzB,MAAM,EAAE,mBAAmB,EAC3B,aAAa,EAAE,UAAU,GAAG,MAAM;IAKpD,OAAO,CAAC,iBAAiB,CAAS;IAErB,WAAW,CAEvB,MAAM,EAAE,MAAM,G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E,IAAI,CAAC,eAAe,CAAC,uBAAuB,CAAC,CAAC;IAC/C,CAAC;IAES,oBAAoB,CAAC,OAAe,EAAE,QAAiB;QAChE,IAAI,CAAC,eAAe,CAAC,sBAAsB,CAAC,CAAC;IAC9C,CAAC;IAEM,wBAAwB,CAAC,QAAsB,EAAE,QAAyB;QAChF,IAAI,CAAC,eAAe,CAAC,0BAA0B,CAAC,CAAC;IAClD,CAAC;IAEM,UAAU,CAAC,KAAsB;QACvC,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;IACpC,CAAC;IAEO,eAAe,CAAC,UAAkB;QACzC,MAAM,OAAO,GAAG,IAAI,UAAU,CAC7B,IAAI,UAAU,uDAAuD,CACrE,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,EAAE,OAAO,CAAC,CAAC;QACvE,MAAM,OAAO,CAAC;IACf,CAAC;CACD","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/internal\";\nimport { ISummaryTree } from \"@fluidframework/driver-definitions\";\nimport {\n\tISnapshot,\n\tISnapshotFetchOptions,\n\tISummaryContext,\n\tIVersion,\n} from \"@fluidframework/driver-definitions/internal\";\nimport { UsageError } from \"@fluidframework/driver-utils/internal\";\nimport {\n\tITelemetryLoggerExt,\n\tloggerToMonitoringContext,\n} from \"@fluidframework/telemetry-utils/internal\";\n\nimport { parseCompactSnapshotResponse } from \"../compactSnapshotParser.js\";\nimport { IOdspSnapshot } from \"../contracts.js\";\nimport { OdspDocumentStorageServiceBase } from \"../odspDocumentStorageServiceBase.js\";\nimport { convertOdspSnapshotToSnapshotTreeAndBlobs } from \"../odspSnapshotParser.js\";\n\n/**\n * ODSP document storage service that works on a provided snapshot for all its processing.\n * Attempting to use unsupported actions/methods will result in errors being thrown.\n */\nexport class LocalOdspDocumentStorageService extends OdspDocumentStorageServiceBase {\n\tprivate snapshotTreeId: string | undefined;\n\n\tconstructor(\n\t\tprivate readonly logger: ITelemetryLoggerExt,\n\t\tprivate readonly localSnapshot: Uint8Array | string,\n\t) {\n\t\tsuper(loggerToMonitoringContext(logger).config);\n\t}\n\n\tprivate calledGetVersions = false;\n\n\tpublic async getVersions(\n\t\t// eslint-disable-next-line @rushstack/no-new-null\n\t\tblobid: string | null,\n\t\tcount: number,\n\t\t_scenarioName?: string,\n\t): Promise<IVersion[]> {\n\t\tassert(blobid === null, 0x342 /* Invalid usage. \"blobid\" should always be null */);\n\t\tassert(count === 1, 0x343 /* Invalid usage. \"count\" should always be 1 */);\n\n\t\t// No reason to re-parse the data since it will never change\n\t\tif (this.calledGetVersions) {\n\t\t\treturn this.getSnapshotVersion();\n\t\t}\n\t\tthis.calledGetVersions = true;\n\n\t\tlet snapshotContents: ISnapshot;\n\n\t\tif (typeof this.localSnapshot === \"string\") {\n\t\t\tconst content: IOdspSnapshot = JSON.parse(this.localSnapshot) as IOdspSnapshot;\n\t\t\tsnapshotContents = convertOdspSnapshotToSnapshotTreeAndBlobs(content);\n\t\t} else {\n\t\t\tsnapshotContents = parseCompactSnapshotResponse(this.localSnapshot, this.logger);\n\t\t}\n\n\t\tthis.snapshotTreeId = this.initializeFromSnapshot(snapshotContents);\n\t\treturn this.getSnapshotVersion();\n\t}\n\n\tpublic async getSnapshot(snapshotFetchOptions?: ISnapshotFetchOptions): Promise<ISnapshot> {\n\t\tthis.throwUsageError(\"getSnapshot\");\n\t}\n\n\tprivate getSnapshotVersion(): IVersion[] {\n\t\treturn this.snapshotTreeId ? [{ id: this.snapshotTreeId, treeId: undefined! }] : [];\n\t}\n\n\tprotected fetchTreeFromSnapshot(_id: string, _scenarioName?: string): never {\n\t\tthis.throwUsageError(\"fetchTreeFromSnapshot\");\n\t}\n\n\tprotected fetchBlobFromStorage(_blobId: string, _evicted: boolean): never {\n\t\tthis.throwUsageError(\"fetchBlobFromStorage\");\n\t}\n\n\tpublic uploadSummaryWithContext(_summary: ISummaryTree, _context: ISummaryContext): never {\n\t\tthis.throwUsageError(\"uploadSummaryWithContext\");\n\t}\n\n\tpublic createBlob(_file: ArrayBufferLike): never {\n\t\tthis.throwUsageError(\"createBlob\");\n\t}\n\n\tprivate throwUsageError(methodName: string): never {\n\t\tconst toThrow = new UsageError(\n\t\t\t`\"${methodName}\" is not supported by LocalOdspDocumentStorageService`,\n\t\t);\n\t\tthis.logger.sendErrorEvent({ eventName: \"UnsupportedUsage\" }, toThrow);\n\t\tthrow toThrow;\n\t}\n}\n"]}
1
+ {"version":3,"file":"localOdspDocumentStorageManager.js","sourceRoot":"","sources":["../../src/localOdspDriver/localOdspDocumentStorageManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAQ7D,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAEN,yBAAyB,GACzB,MAAM,0CAA0C,CAAC;AAElD,OAAO,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AAE3E,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,yCAAyC,EAAE,MAAM,0BAA0B,CAAC;AAErF;;;GAGG;AACH,MAAM,OAAO,+BAAgC,SAAQ,8BAA8B;IAGlF,YACkB,MAA2B,EAC3B,aAAkC;QAEnD,KAAK,CAAC,yBAAyB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QAH/B,WAAM,GAAN,MAAM,CAAqB;QAC3B,kBAAa,GAAb,aAAa,CAAqB;QAK5C,sBAAiB,GAAG,KAAK,CAAC;IAFlC,CAAC;IAIM,KAAK,CAAC,WAAW;IACvB,kDAAkD;IAClD,MAAqB,EACrB,KAAa,EACb,aAAsB;QAEtB,MAAM,CAAC,MAAM,KAAK,IAAI,EAAE,KAAK,CAAC,mDAAmD,CAAC,CAAC;QACnF,MAAM,CAAC,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F,IAAI,CAAC,eAAe,CAAC,0BAA0B,CAAC,CAAC;IAClD,CAAC;IAEM,UAAU,CAAC,KAAsB;QACvC,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;IACpC,CAAC;IAEO,eAAe,CAAC,UAAkB;QACzC,MAAM,OAAO,GAAG,IAAI,UAAU,CAC7B,IAAI,UAAU,uDAAuD,CACrE,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,EAAE,OAAO,CAAC,CAAC;QACvE,MAAM,OAAO,CAAC;IACf,CAAC;CACD","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/internal\";\nimport type { ISummaryTree } from \"@fluidframework/driver-definitions\";\nimport type {\n\tISnapshot,\n\tISnapshotFetchOptions,\n\tISummaryContext,\n\tIVersion,\n} from \"@fluidframework/driver-definitions/internal\";\nimport { UsageError } from \"@fluidframework/driver-utils/internal\";\nimport {\n\ttype ITelemetryLoggerExt,\n\tloggerToMonitoringContext,\n} from \"@fluidframework/telemetry-utils/internal\";\n\nimport { parseCompactSnapshotResponse } from \"../compactSnapshotParser.js\";\nimport type { IOdspSnapshot } from \"../contracts.js\";\nimport { OdspDocumentStorageServiceBase } from \"../odspDocumentStorageServiceBase.js\";\nimport { convertOdspSnapshotToSnapshotTreeAndBlobs } from \"../odspSnapshotParser.js\";\n\n/**\n * ODSP document storage service that works on a provided snapshot for all its processing.\n * Attempting to use unsupported actions/methods will result in errors being thrown.\n */\nexport class LocalOdspDocumentStorageService extends OdspDocumentStorageServiceBase {\n\tprivate snapshotTreeId: string | undefined;\n\n\tconstructor(\n\t\tprivate readonly logger: ITelemetryLoggerExt,\n\t\tprivate readonly localSnapshot: Uint8Array | string,\n\t) {\n\t\tsuper(loggerToMonitoringContext(logger).config);\n\t}\n\n\tprivate calledGetVersions = false;\n\n\tpublic async getVersions(\n\t\t// eslint-disable-next-line @rushstack/no-new-null\n\t\tblobid: string | null,\n\t\tcount: number,\n\t\t_scenarioName?: string,\n\t): Promise<IVersion[]> {\n\t\tassert(blobid === null, 0x342 /* Invalid usage. \"blobid\" should always be null */);\n\t\tassert(count === 1, 0x343 /* Invalid usage. \"count\" should always be 1 */);\n\n\t\t// No reason to re-parse the data since it will never change\n\t\tif (this.calledGetVersions) {\n\t\t\treturn this.getSnapshotVersion();\n\t\t}\n\t\tthis.calledGetVersions = true;\n\n\t\tlet snapshotContents: ISnapshot;\n\n\t\tif (typeof this.localSnapshot === \"string\") {\n\t\t\tconst content: IOdspSnapshot = JSON.parse(this.localSnapshot) as IOdspSnapshot;\n\t\t\tsnapshotContents = convertOdspSnapshotToSnapshotTreeAndBlobs(content);\n\t\t} else {\n\t\t\tsnapshotContents = parseCompactSnapshotResponse(this.localSnapshot, this.logger);\n\t\t}\n\n\t\tthis.snapshotTreeId = this.initializeFromSnapshot(snapshotContents);\n\t\treturn this.getSnapshotVersion();\n\t}\n\n\tpublic async getSnapshot(snapshotFetchOptions?: ISnapshotFetchOptions): Promise<ISnapshot> {\n\t\tthis.throwUsageError(\"getSnapshot\");\n\t}\n\n\tprivate getSnapshotVersion(): IVersion[] {\n\t\treturn this.snapshotTreeId ? [{ id: this.snapshotTreeId, treeId: undefined! }] : [];\n\t}\n\n\tprotected fetchTreeFromSnapshot(_id: string, _scenarioName?: string): never {\n\t\tthis.throwUsageError(\"fetchTreeFromSnapshot\");\n\t}\n\n\tprotected fetchBlobFromStorage(_blobId: string, _evicted: boolean): never {\n\t\tthis.throwUsageError(\"fetchBlobFromStorage\");\n\t}\n\n\tpublic uploadSummaryWithContext(_summary: ISummaryTree, _context: ISummaryContext): never {\n\t\tthis.throwUsageError(\"uploadSummaryWithContext\");\n\t}\n\n\tpublic createBlob(_file: ArrayBufferLike): never {\n\t\tthis.throwUsageError(\"createBlob\");\n\t}\n\n\tprivate throwUsageError(methodName: string): never {\n\t\tconst toThrow = new UsageError(\n\t\t\t`\"${methodName}\" is not supported by LocalOdspDocumentStorageService`,\n\t\t);\n\t\tthis.logger.sendErrorEvent({ eventName: \"UnsupportedUsage\" }, toThrow);\n\t\tthrow toThrow;\n\t}\n}\n"]}
@@ -3,8 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { PromiseCache } from "@fluidframework/core-utils/internal";
6
- import { ISnapshot } from "@fluidframework/driver-definitions/internal";
7
- import { ICacheEntry, IEntry, IFileEntry, IOdspResolvedUrl, IPersistedCache, ISocketStorageDiscovery } from "@fluidframework/odsp-driver-definitions/internal";
6
+ import type { ISnapshot } from "@fluidframework/driver-definitions/internal";
7
+ import { type ICacheEntry, type IEntry, type IFileEntry, type IOdspResolvedUrl, type IPersistedCache, type ISocketStorageDiscovery } from "@fluidframework/odsp-driver-definitions/internal";
8
8
  /**
9
9
  * Similar to IPersistedCache, but exposes cache interface for single file
10
10
  * @legacy
@@ -1 +1 @@
1
- {"version":3,"file":"odspCache.d.ts","sourceRoot":"","sources":["../src/odspCache.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAC;AACxE,OAAO,EACN,WAAW,EACX,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,uBAAuB,EAEvB,MAAM,kDAAkD,CAAC;AAE1D;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAGnC,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAGjC,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED;;;GAGG;AACH,qBAAa,oBAAqB,YAAW,eAAe;IAKxC,OAAO,CA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AC7B,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,qBAAqB,CAAC,KAAa;QAC1C,MAAM,OAAO,GAAG,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACnD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC3B,YAAY,CAAC,OAAO,CAAC,CAAC;YACtB,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC;IACF,CAAC;IAEO,qBAAqB,CAAC,KAAa;QAC1C,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAC1B,KAAK,EACL,UAAU,CAAC,GAAG,EAAE;YACf,IAAI,CAAC,2BAA2B,CAAC,KAAK,CAAC,CAAC;QACzC,CAAC,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAC7B,CAAC;IACH,CAAC;CACD;AACD,MAAM,OAAO,oCAAwC,SAAQ,YAAuB;IACnF,YAAY,aAA2C;QACtD,KAAK,CAAC,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,CAAC,CAAC;IAC9E,CAAC;CACD;AAwCD,MAAM,OAAO,kBAAkB;IAA/B;QACiB,qBAAgB,GAAG,IAAI,YAAY,EAGhD,CAAC;QAEY,iBAAY,GAAG,IAAI,YAAY,EAA4B,CAAC;QAE5D,gCAA2B,GAAG,IAAI,YAAY,EAG3D,CAAC;IACL,CAAC;CAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { PromiseCache } from \"@fluidframework/core-utils/internal\";\nimport { ISnapshot } from \"@fluidframework/driver-definitions/internal\";\nimport {\n\tICacheEntry,\n\tIEntry,\n\tIFileEntry,\n\tIOdspResolvedUrl,\n\tIPersistedCache,\n\tISocketStorageDiscovery,\n\tgetKeyForCacheEntry,\n} from \"@fluidframework/odsp-driver-definitions/internal\";\n\n/**\n * Similar to IPersistedCache, but exposes cache interface for single file\n * @legacy\n * @alpha\n */\nexport interface IPersistedFileCache {\n\t// TODO: use a stronger type\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tget(entry: IEntry): Promise<any>;\n\t// TODO: use a stronger type\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tput(entry: IEntry, value: any): Promise<void>;\n\tremoveEntries(): Promise<void>;\n}\n\n/**\n * Default local-only implementation of IPersistedCache,\n * used if no persisted cache is provided by the host\n */\nexport class LocalPersistentCache implements IPersistedCache {\n\tprivate readonly cache = new Map<string, unknown>();\n\t// For every document id there will be a single expiration entry inspite of the number of cache entries.\n\tprivate readonly docIdExpirationMap = new Map<string, ReturnType<typeof setTimeout>>();\n\n\tpublic constructor(private readonly snapshotExpiryPolicy = 3600 * 1000) {}\n\n\tasync get(entry: ICacheEntry): Promise<unknown> {\n\t\tconst key = getKeyForCacheEntry(entry);\n\t\treturn this.cache.get(key);\n\t}\n\n\tasync put(entry: ICacheEntry, value: unknown): Promise<void> {\n\t\tconst key = getKeyForCacheEntry(entry);\n\t\tthis.cache.set(key, value);\n\t\tthis.updateExpirationEntry(entry.file.docId);\n\t}\n\n\tasync removeEntries(file: IFileEntry): Promise<void> {\n\t\tthis.removeDocIdEntriesFromCache(file.docId);\n\t}\n\n\tprivate removeDocIdEntriesFromCache(docId: string): void[] {\n\t\tthis.removeExpirationEntry(docId);\n\t\treturn [...this.cache]\n\t\t\t.filter(([cachekey]) => {\n\t\t\t\tconst docIdFromKey = cachekey.split(\"_\");\n\t\t\t\tif (docIdFromKey[0] === docId) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t})\n\t\t\t.map(([cachekey]) => {\n\t\t\t\tthis.cache.delete(cachekey);\n\t\t\t});\n\t}\n\n\tprivate removeExpirationEntry(docId: string): void {\n\t\tconst timeout = this.docIdExpirationMap.get(docId);\n\t\tif (timeout !== undefined) {\n\t\t\tclearTimeout(timeout);\n\t\t\tthis.docIdExpirationMap.delete(docId);\n\t\t}\n\t}\n\n\tprivate updateExpirationEntry(docId: string): void {\n\t\tthis.removeExpirationEntry(docId);\n\t\tthis.docIdExpirationMap.set(\n\t\t\tdocId,\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.removeDocIdEntriesFromCache(docId);\n\t\t\t}, this.snapshotExpiryPolicy),\n\t\t);\n\t}\n}\nexport class PromiseCacheWithOneHourSlidingExpiry<T> extends PromiseCache<string, T> {\n\tconstructor(removeOnError?: (error: unknown) => boolean) {\n\t\tsuper({ expiry: { policy: \"sliding\", durationMs: 3600000 }, removeOnError });\n\t}\n}\n\n/**\n * Internal cache interface used within driver only\n * @legacy\n * @alpha\n */\nexport interface INonPersistentCache {\n\t/**\n\t * Cache of joined/joining session info\n\t */\n\treadonly sessionJoinCache: PromiseCache<\n\t\tstring,\n\t\t{ entryTime: number; joinSessionResponse: ISocketStorageDiscovery }\n\t>;\n\n\t/**\n\t * Cache of resolved/resolving file URLs\n\t */\n\treadonly fileUrlCache: PromiseCache<string, IOdspResolvedUrl>;\n\n\t/**\n\t * Used to store the snapshot fetch promise if the prefetch has been made using the prefetchLatestSnapshot api.\n\t * This is then used later to look for the promise during the container load.\n\t */\n\treadonly snapshotPrefetchResultCache: PromiseCache<string, IPrefetchSnapshotContents>;\n}\n\n/**\n * Internal cache interface used within driver only\n * @legacy\n * @alpha\n */\nexport interface IOdspCache extends INonPersistentCache {\n\t/**\n\t * Persisted cache - only serializable content is allowed\n\t */\n\treadonly persistedCache: IPersistedFileCache;\n}\n\nexport class NonPersistentCache implements INonPersistentCache {\n\tpublic readonly sessionJoinCache = new PromiseCache<\n\t\tstring,\n\t\t{ entryTime: number; joinSessionResponse: ISocketStorageDiscovery }\n\t>();\n\n\tpublic readonly fileUrlCache = new PromiseCache<string, IOdspResolvedUrl>();\n\n\tpublic readonly snapshotPrefetchResultCache = new PromiseCache<\n\t\tstring,\n\t\tIPrefetchSnapshotContents\n\t>();\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IPrefetchSnapshotContents extends ISnapshot {\n\tfluidEpoch: string;\n\tprefetchStartTime: number;\n}\n"]}
1
+ {"version":3,"file":"odspCache.js","sourceRoot":"","sources":["../src/odspCache.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAEnE,OAAO,EAON,mBAAmB,GACnB,MAAM,kDAAkD,CAAC;AAiB1D;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IAKhC,YAAoC,uBAAuB,IAAI,GAAG,IAAI;QAAlC,yBAAoB,GAApB,oBAAoB,CAAc;QAJrD,UAAK,GAAG,IAAI,GAAG,EAAmB,CAAC;QACpD,wGAAwG;QACvF,uBAAkB,GAAG,IAAI,GAAG,EAAyC,CAAC;IAEd,CAAC;IAE1E,KAAK,CAAC,GAAG,CAAC,KAAkB;QAC3B,MAAM,GAAG,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,KAAkB,EAAE,KAAc;QAC3C,MAAM,GAAG,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;QACvC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC3B,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9C,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,IAAgB;QACnC,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9C,CAAC;IAEO,2BAA2B,CAAC,KAAa;QAChD,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC;QAClC,OAAO,CAAC,GAAG,IAAI,CAA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AC;QAEY,iBAAY,GAAG,IAAI,YAAY,EAA4B,CAAC;QAE5D,gCAA2B,GAAG,IAAI,YAAY,EAG3D,CAAC;IACL,CAAC;CAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { PromiseCache } from \"@fluidframework/core-utils/internal\";\nimport type { ISnapshot } from \"@fluidframework/driver-definitions/internal\";\nimport {\n\ttype ICacheEntry,\n\ttype IEntry,\n\ttype IFileEntry,\n\ttype IOdspResolvedUrl,\n\ttype IPersistedCache,\n\ttype ISocketStorageDiscovery,\n\tgetKeyForCacheEntry,\n} from \"@fluidframework/odsp-driver-definitions/internal\";\n\n/**\n * Similar to IPersistedCache, but exposes cache interface for single file\n * @legacy\n * @alpha\n */\nexport interface IPersistedFileCache {\n\t// TODO: use a stronger type\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tget(entry: IEntry): Promise<any>;\n\t// TODO: use a stronger type\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tput(entry: IEntry, value: any): Promise<void>;\n\tremoveEntries(): Promise<void>;\n}\n\n/**\n * Default local-only implementation of IPersistedCache,\n * used if no persisted cache is provided by the host\n */\nexport class LocalPersistentCache implements IPersistedCache {\n\tprivate readonly cache = new Map<string, unknown>();\n\t// For every document id there will be a single expiration entry inspite of the number of cache entries.\n\tprivate readonly docIdExpirationMap = new Map<string, ReturnType<typeof setTimeout>>();\n\n\tpublic constructor(private readonly snapshotExpiryPolicy = 3600 * 1000) {}\n\n\tasync get(entry: ICacheEntry): Promise<unknown> {\n\t\tconst key = getKeyForCacheEntry(entry);\n\t\treturn this.cache.get(key);\n\t}\n\n\tasync put(entry: ICacheEntry, value: unknown): Promise<void> {\n\t\tconst key = getKeyForCacheEntry(entry);\n\t\tthis.cache.set(key, value);\n\t\tthis.updateExpirationEntry(entry.file.docId);\n\t}\n\n\tasync removeEntries(file: IFileEntry): Promise<void> {\n\t\tthis.removeDocIdEntriesFromCache(file.docId);\n\t}\n\n\tprivate removeDocIdEntriesFromCache(docId: string): void[] {\n\t\tthis.removeExpirationEntry(docId);\n\t\treturn [...this.cache]\n\t\t\t.filter(([cachekey]) => {\n\t\t\t\tconst docIdFromKey = cachekey.split(\"_\");\n\t\t\t\tif (docIdFromKey[0] === docId) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t})\n\t\t\t.map(([cachekey]) => {\n\t\t\t\tthis.cache.delete(cachekey);\n\t\t\t});\n\t}\n\n\tprivate removeExpirationEntry(docId: string): void {\n\t\tconst timeout = this.docIdExpirationMap.get(docId);\n\t\tif (timeout !== undefined) {\n\t\t\tclearTimeout(timeout);\n\t\t\tthis.docIdExpirationMap.delete(docId);\n\t\t}\n\t}\n\n\tprivate updateExpirationEntry(docId: string): void {\n\t\tthis.removeExpirationEntry(docId);\n\t\tthis.docIdExpirationMap.set(\n\t\t\tdocId,\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.removeDocIdEntriesFromCache(docId);\n\t\t\t}, this.snapshotExpiryPolicy),\n\t\t);\n\t}\n}\nexport class PromiseCacheWithOneHourSlidingExpiry<T> extends PromiseCache<string, T> {\n\tconstructor(removeOnError?: (error: unknown) => boolean) {\n\t\tsuper({ expiry: { policy: \"sliding\", durationMs: 3600000 }, removeOnError });\n\t}\n}\n\n/**\n * Internal cache interface used within driver only\n * @legacy\n * @alpha\n */\nexport interface INonPersistentCache {\n\t/**\n\t * Cache of joined/joining session info\n\t */\n\treadonly sessionJoinCache: PromiseCache<\n\t\tstring,\n\t\t{ entryTime: number; joinSessionResponse: ISocketStorageDiscovery }\n\t>;\n\n\t/**\n\t * Cache of resolved/resolving file URLs\n\t */\n\treadonly fileUrlCache: PromiseCache<string, IOdspResolvedUrl>;\n\n\t/**\n\t * Used to store the snapshot fetch promise if the prefetch has been made using the prefetchLatestSnapshot api.\n\t * This is then used later to look for the promise during the container load.\n\t */\n\treadonly snapshotPrefetchResultCache: PromiseCache<string, IPrefetchSnapshotContents>;\n}\n\n/**\n * Internal cache interface used within driver only\n * @legacy\n * @alpha\n */\nexport interface IOdspCache extends INonPersistentCache {\n\t/**\n\t * Persisted cache - only serializable content is allowed\n\t */\n\treadonly persistedCache: IPersistedFileCache;\n}\n\nexport class NonPersistentCache implements INonPersistentCache {\n\tpublic readonly sessionJoinCache = new PromiseCache<\n\t\tstring,\n\t\t{ entryTime: number; joinSessionResponse: ISocketStorageDiscovery }\n\t>();\n\n\tpublic readonly fileUrlCache = new PromiseCache<string, IOdspResolvedUrl>();\n\n\tpublic readonly snapshotPrefetchResultCache = new PromiseCache<\n\t\tstring,\n\t\tIPrefetchSnapshotContents\n\t>();\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IPrefetchSnapshotContents extends ISnapshot {\n\tfluidEpoch: string;\n\tprefetchStartTime: number;\n}\n"]}
@@ -2,12 +2,12 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { IClient } from "@fluidframework/driver-definitions";
6
- import { IDocumentDeltaConnection, IDocumentServicePolicies, IResolvedUrl, ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
7
- import { HostStoragePolicy, IOdspResolvedUrl, InstrumentedStorageTokenFetcher, TokenFetchOptions } from "@fluidframework/odsp-driver-definitions/internal";
8
- import { MonitoringContext } from "@fluidframework/telemetry-utils/internal";
9
- import { EpochTracker } from "./epochTracker.js";
10
- import { IOdspCache } from "./odspCache.js";
5
+ import type { IClient } from "@fluidframework/driver-definitions";
6
+ import type { IDocumentDeltaConnection, IDocumentServicePolicies, IResolvedUrl, ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
7
+ import { type HostStoragePolicy, type IOdspResolvedUrl, type InstrumentedStorageTokenFetcher, type TokenFetchOptions } from "@fluidframework/odsp-driver-definitions/internal";
8
+ import { type MonitoringContext } from "@fluidframework/telemetry-utils/internal";
9
+ import type { EpochTracker } from "./epochTracker.js";
10
+ import type { IOdspCache } from "./odspCache.js";
11
11
  import { OdspDocumentDeltaConnection } from "./odspDocumentDeltaConnection.js";
12
12
  /**
13
13
  * This OdspDelayLoadedDeltaStream is used by OdspDocumentService.ts to delay load the delta connection
@@ -1 +1 @@
1
- {"version":3,"file":"odspDelayLoadedDeltaStream.d.ts","sourceRoot":"","sources":["../src/odspDelayLoadedDeltaStream.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EACN,wBAAwB,EACxB,wBAAwB,EACxB,YAAY,EAEZ,yBAAyB,EAEzB,MAAM,6CAA6C,CAAC;AAMrD,OAAO,EACN,iBAAiB,EAEjB,gBAAgB,EAEhB,+BAA+B,EAE/B,iBAAiB,EACjB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAEN,iBAAiB,EAEjB,MAAM,0CAA0C,CAAC;AAIlD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAS/E;;;GAGG;AACH,qBAAa,0BAA0B;aAkCrB,eAAe,EAAE,gBAAgB;IAC1C,QAAQ,EAAE,wBAAwB;IACzC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAGlC,OAAO,CAAC,QAAQ,CAAC,EAAE;IACnB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,qBAAqB;IACtC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAC;IA5C3C,OAAO,CAAC,uBAAuB,CAA4C;IAE3E,OAAO,CAAC,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