@fluidframework/routerlicious-driver 1.4.0-115997 → 2.0.0-dev-rc.1.0.0.224419

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 (365) hide show
  1. package/.eslintrc.js +10 -12
  2. package/.mocharc.js +12 -0
  3. package/CHANGELOG.md +156 -0
  4. package/README.md +39 -1
  5. package/api-extractor-lint.json +4 -0
  6. package/api-extractor.json +2 -2
  7. package/api-report/routerlicious-driver.api.md +108 -0
  8. package/dist/cache.cjs +30 -0
  9. package/dist/cache.cjs.map +1 -0
  10. package/dist/cache.d.ts +7 -0
  11. package/dist/cache.d.ts.map +1 -1
  12. package/dist/{definitions.js → contracts.cjs} +1 -1
  13. package/dist/contracts.cjs.map +1 -0
  14. package/dist/contracts.d.ts +42 -0
  15. package/dist/contracts.d.ts.map +1 -0
  16. package/dist/{createNewUtils.js → createNewUtils.cjs} +7 -5
  17. package/dist/createNewUtils.cjs.map +1 -0
  18. package/dist/createNewUtils.d.ts +1 -1
  19. package/dist/createNewUtils.d.ts.map +1 -1
  20. package/dist/{defaultTokenProvider.js → defaultTokenProvider.cjs} +2 -1
  21. package/dist/defaultTokenProvider.cjs.map +1 -0
  22. package/dist/defaultTokenProvider.d.ts +1 -0
  23. package/dist/defaultTokenProvider.d.ts.map +1 -1
  24. package/dist/definitions.cjs +7 -0
  25. package/dist/definitions.cjs.map +1 -0
  26. package/dist/definitions.d.ts.map +1 -1
  27. package/dist/deltaStorageService.cjs +122 -0
  28. package/dist/deltaStorageService.cjs.map +1 -0
  29. package/dist/deltaStorageService.d.ts +7 -6
  30. package/dist/deltaStorageService.d.ts.map +1 -1
  31. package/dist/{documentDeltaConnection.js → documentDeltaConnection.cjs} +8 -13
  32. package/dist/documentDeltaConnection.cjs.map +1 -0
  33. package/dist/documentDeltaConnection.d.ts +3 -4
  34. package/dist/documentDeltaConnection.d.ts.map +1 -1
  35. package/dist/{documentService.js → documentService.cjs} +61 -64
  36. package/dist/documentService.cjs.map +1 -0
  37. package/dist/documentService.d.ts +12 -4
  38. package/dist/documentService.d.ts.map +1 -1
  39. package/dist/{documentServiceFactory.js → documentServiceFactory.cjs} +87 -33
  40. package/dist/documentServiceFactory.cjs.map +1 -0
  41. package/dist/documentServiceFactory.d.ts +5 -3
  42. package/dist/documentServiceFactory.d.ts.map +1 -1
  43. package/dist/{documentStorageService.js → documentStorageService.cjs} +18 -16
  44. package/dist/documentStorageService.cjs.map +1 -0
  45. package/dist/documentStorageService.d.ts +4 -3
  46. package/dist/documentStorageService.d.ts.map +1 -1
  47. package/dist/errorUtils.cjs +87 -0
  48. package/dist/errorUtils.cjs.map +1 -0
  49. package/dist/errorUtils.d.ts +56 -10
  50. package/dist/errorUtils.d.ts.map +1 -1
  51. package/dist/gitManager.cjs +46 -0
  52. package/dist/gitManager.cjs.map +1 -0
  53. package/dist/gitManager.d.ts +27 -0
  54. package/dist/gitManager.d.ts.map +1 -0
  55. package/dist/historian.cjs +72 -0
  56. package/dist/historian.cjs.map +1 -0
  57. package/dist/historian.d.ts +34 -0
  58. package/dist/historian.d.ts.map +1 -0
  59. package/dist/index.cjs +19 -0
  60. package/dist/index.cjs.map +1 -0
  61. package/dist/index.d.ts +5 -8
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/mapWithExpiration.cjs +105 -0
  64. package/dist/mapWithExpiration.cjs.map +1 -0
  65. package/dist/mapWithExpiration.d.ts +34 -0
  66. package/dist/mapWithExpiration.d.ts.map +1 -0
  67. package/dist/{nullBlobStorageService.js → nullBlobStorageService.cjs} +5 -5
  68. package/dist/nullBlobStorageService.cjs.map +1 -0
  69. package/dist/nullBlobStorageService.d.ts.map +1 -1
  70. package/dist/{packageVersion.js → packageVersion.cjs} +2 -2
  71. package/dist/packageVersion.cjs.map +1 -0
  72. package/dist/packageVersion.d.ts +1 -1
  73. package/dist/packageVersion.d.ts.map +1 -1
  74. package/dist/{policies.js → policies.cjs} +1 -1
  75. package/dist/policies.cjs.map +1 -0
  76. package/dist/policies.d.ts +22 -9
  77. package/dist/policies.d.ts.map +1 -1
  78. package/dist/r11sSnapshotParser.cjs +73 -0
  79. package/dist/r11sSnapshotParser.cjs.map +1 -0
  80. package/dist/r11sSnapshotParser.d.ts +14 -0
  81. package/dist/r11sSnapshotParser.d.ts.map +1 -0
  82. package/dist/restWrapper.cjs +249 -0
  83. package/dist/restWrapper.cjs.map +1 -0
  84. package/dist/restWrapper.d.ts +32 -12
  85. package/dist/restWrapper.d.ts.map +1 -1
  86. package/dist/restWrapperBase.cjs +89 -0
  87. package/dist/restWrapperBase.cjs.map +1 -0
  88. package/dist/restWrapperBase.d.ts +26 -0
  89. package/dist/restWrapperBase.d.ts.map +1 -0
  90. package/dist/retriableGitManager.cjs +40 -0
  91. package/dist/retriableGitManager.cjs.map +1 -0
  92. package/dist/retriableGitManager.d.ts +13 -23
  93. package/dist/retriableGitManager.d.ts.map +1 -1
  94. package/dist/routerlicious-driver-alpha.d.ts +92 -0
  95. package/dist/routerlicious-driver-beta.d.ts +98 -0
  96. package/dist/routerlicious-driver-public.d.ts +98 -0
  97. package/dist/routerlicious-driver-untrimmed.d.ts +261 -0
  98. package/dist/{shreddedSummaryDocumentStorageService.js → shreddedSummaryDocumentStorageService.cjs} +41 -34
  99. package/dist/shreddedSummaryDocumentStorageService.cjs.map +1 -0
  100. package/dist/shreddedSummaryDocumentStorageService.d.ts +6 -5
  101. package/dist/shreddedSummaryDocumentStorageService.d.ts.map +1 -1
  102. package/dist/storageContracts.cjs +7 -0
  103. package/dist/storageContracts.cjs.map +1 -0
  104. package/dist/storageContracts.d.ts +45 -0
  105. package/dist/storageContracts.d.ts.map +1 -0
  106. package/dist/summaryTreeUploadManager.cjs +110 -0
  107. package/dist/summaryTreeUploadManager.cjs.map +1 -0
  108. package/dist/summaryTreeUploadManager.d.ts +23 -0
  109. package/dist/summaryTreeUploadManager.d.ts.map +1 -0
  110. package/dist/{tokens.js → tokens.cjs} +1 -1
  111. package/dist/tokens.cjs.map +1 -0
  112. package/dist/tokens.d.ts +34 -5
  113. package/dist/tokens.d.ts.map +1 -1
  114. package/dist/treeUtils.cjs +107 -0
  115. package/dist/treeUtils.cjs.map +1 -0
  116. package/dist/treeUtils.d.ts +58 -0
  117. package/dist/treeUtils.d.ts.map +1 -0
  118. package/dist/tsdoc-metadata.json +11 -0
  119. package/dist/{urlUtils.js → urlUtils.cjs} +21 -25
  120. package/dist/urlUtils.cjs.map +1 -0
  121. package/dist/urlUtils.d.ts +2 -2
  122. package/dist/urlUtils.d.ts.map +1 -1
  123. package/dist/wholeSummaryDocumentStorageService.cjs +253 -0
  124. package/dist/wholeSummaryDocumentStorageService.cjs.map +1 -0
  125. package/dist/wholeSummaryDocumentStorageService.d.ts +10 -8
  126. package/dist/wholeSummaryDocumentStorageService.d.ts.map +1 -1
  127. package/dist/wholeSummaryUploadManager.cjs +37 -0
  128. package/dist/wholeSummaryUploadManager.cjs.map +1 -0
  129. package/dist/wholeSummaryUploadManager.d.ts +16 -0
  130. package/dist/wholeSummaryUploadManager.d.ts.map +1 -0
  131. package/lib/{cache.d.ts → cache.d.mts} +7 -0
  132. package/lib/cache.d.mts.map +1 -0
  133. package/lib/cache.mjs +25 -0
  134. package/lib/cache.mjs.map +1 -0
  135. package/lib/contracts.d.mts +42 -0
  136. package/lib/contracts.d.mts.map +1 -0
  137. package/lib/{definitions.js → contracts.mjs} +1 -1
  138. package/lib/contracts.mjs.map +1 -0
  139. package/lib/{createNewUtils.d.ts → createNewUtils.d.mts} +1 -1
  140. package/lib/{createNewUtils.d.ts.map → createNewUtils.d.mts.map} +1 -1
  141. package/lib/{createNewUtils.js → createNewUtils.mjs} +7 -5
  142. package/lib/createNewUtils.mjs.map +1 -0
  143. package/lib/{defaultTokenProvider.d.ts → defaultTokenProvider.d.mts} +2 -1
  144. package/lib/defaultTokenProvider.d.mts.map +1 -0
  145. package/lib/{defaultTokenProvider.js → defaultTokenProvider.mjs} +2 -1
  146. package/lib/defaultTokenProvider.mjs.map +1 -0
  147. package/lib/definitions.d.mts.map +1 -0
  148. package/lib/definitions.mjs +6 -0
  149. package/{dist/definitions.js.map → lib/definitions.mjs.map} +1 -1
  150. package/lib/{deltaStorageService.d.ts → deltaStorageService.d.mts} +8 -7
  151. package/lib/deltaStorageService.d.mts.map +1 -0
  152. package/lib/deltaStorageService.mjs +117 -0
  153. package/lib/deltaStorageService.mjs.map +1 -0
  154. package/lib/{documentDeltaConnection.d.ts → documentDeltaConnection.d.mts} +3 -4
  155. package/lib/documentDeltaConnection.d.mts.map +1 -0
  156. package/lib/{documentDeltaConnection.js → documentDeltaConnection.mjs} +8 -13
  157. package/lib/documentDeltaConnection.mjs.map +1 -0
  158. package/lib/{documentService.d.ts → documentService.d.mts} +16 -8
  159. package/lib/documentService.d.mts.map +1 -0
  160. package/lib/{documentService.js → documentService.mjs} +60 -44
  161. package/lib/documentService.mjs.map +1 -0
  162. package/lib/{documentServiceFactory.d.ts → documentServiceFactory.d.mts} +7 -5
  163. package/lib/documentServiceFactory.d.mts.map +1 -0
  164. package/lib/{documentServiceFactory.js → documentServiceFactory.mjs} +88 -34
  165. package/lib/documentServiceFactory.mjs.map +1 -0
  166. package/lib/{documentStorageService.d.ts → documentStorageService.d.mts} +7 -6
  167. package/lib/documentStorageService.d.mts.map +1 -0
  168. package/lib/{documentStorageService.js → documentStorageService.mjs} +19 -17
  169. package/lib/documentStorageService.mjs.map +1 -0
  170. package/lib/errorUtils.d.mts +93 -0
  171. package/lib/errorUtils.d.mts.map +1 -0
  172. package/lib/errorUtils.mjs +81 -0
  173. package/lib/errorUtils.mjs.map +1 -0
  174. package/lib/gitManager.d.mts +27 -0
  175. package/lib/gitManager.d.mts.map +1 -0
  176. package/lib/gitManager.mjs +42 -0
  177. package/lib/gitManager.mjs.map +1 -0
  178. package/lib/historian.d.mts +34 -0
  179. package/lib/historian.d.mts.map +1 -0
  180. package/lib/historian.mjs +67 -0
  181. package/lib/historian.mjs.map +1 -0
  182. package/lib/index.d.mts +10 -0
  183. package/lib/index.d.mts.map +1 -0
  184. package/lib/index.mjs +8 -0
  185. package/lib/index.mjs.map +1 -0
  186. package/lib/mapWithExpiration.d.mts +34 -0
  187. package/lib/mapWithExpiration.d.mts.map +1 -0
  188. package/lib/mapWithExpiration.mjs +101 -0
  189. package/lib/mapWithExpiration.mjs.map +1 -0
  190. package/lib/nullBlobStorageService.d.mts.map +1 -0
  191. package/lib/{nullBlobStorageService.js → nullBlobStorageService.mjs} +5 -5
  192. package/lib/nullBlobStorageService.mjs.map +1 -0
  193. package/lib/{packageVersion.d.ts → packageVersion.d.mts} +1 -1
  194. package/lib/{packageVersion.d.ts.map → packageVersion.d.mts.map} +1 -1
  195. package/lib/{packageVersion.js → packageVersion.mjs} +2 -2
  196. package/lib/packageVersion.mjs.map +1 -0
  197. package/lib/{policies.d.ts → policies.d.mts} +22 -9
  198. package/lib/policies.d.mts.map +1 -0
  199. package/lib/{policies.js → policies.mjs} +1 -1
  200. package/lib/policies.mjs.map +1 -0
  201. package/lib/r11sSnapshotParser.d.mts +14 -0
  202. package/lib/r11sSnapshotParser.d.mts.map +1 -0
  203. package/lib/r11sSnapshotParser.mjs +69 -0
  204. package/lib/r11sSnapshotParser.mjs.map +1 -0
  205. package/lib/restWrapper.d.mts +53 -0
  206. package/lib/restWrapper.d.mts.map +1 -0
  207. package/lib/restWrapper.mjs +236 -0
  208. package/lib/restWrapper.mjs.map +1 -0
  209. package/lib/restWrapperBase.d.mts +26 -0
  210. package/lib/restWrapperBase.d.mts.map +1 -0
  211. package/lib/restWrapperBase.mjs +84 -0
  212. package/lib/restWrapperBase.mjs.map +1 -0
  213. package/lib/retriableGitManager.d.mts +24 -0
  214. package/lib/retriableGitManager.d.mts.map +1 -0
  215. package/lib/retriableGitManager.mjs +36 -0
  216. package/lib/retriableGitManager.mjs.map +1 -0
  217. package/lib/routerlicious-driver-alpha.d.mts +92 -0
  218. package/lib/routerlicious-driver-beta.d.mts +98 -0
  219. package/lib/routerlicious-driver-public.d.mts +98 -0
  220. package/lib/routerlicious-driver-untrimmed.d.mts +261 -0
  221. package/lib/{shreddedSummaryDocumentStorageService.d.ts → shreddedSummaryDocumentStorageService.d.mts} +9 -8
  222. package/lib/shreddedSummaryDocumentStorageService.d.mts.map +1 -0
  223. package/lib/{shreddedSummaryDocumentStorageService.js → shreddedSummaryDocumentStorageService.mjs} +41 -34
  224. package/lib/shreddedSummaryDocumentStorageService.mjs.map +1 -0
  225. package/lib/storageContracts.d.mts +45 -0
  226. package/lib/storageContracts.d.mts.map +1 -0
  227. package/lib/storageContracts.mjs +6 -0
  228. package/lib/storageContracts.mjs.map +1 -0
  229. package/lib/summaryTreeUploadManager.d.mts +23 -0
  230. package/lib/summaryTreeUploadManager.d.mts.map +1 -0
  231. package/lib/summaryTreeUploadManager.mjs +106 -0
  232. package/lib/summaryTreeUploadManager.mjs.map +1 -0
  233. package/lib/{tokens.d.ts → tokens.d.mts} +34 -5
  234. package/lib/tokens.d.mts.map +1 -0
  235. package/lib/{tokens.js → tokens.mjs} +1 -1
  236. package/lib/tokens.mjs.map +1 -0
  237. package/lib/treeUtils.d.mts +58 -0
  238. package/lib/treeUtils.d.mts.map +1 -0
  239. package/lib/treeUtils.mjs +100 -0
  240. package/lib/treeUtils.mjs.map +1 -0
  241. package/lib/{urlUtils.d.ts → urlUtils.d.mts} +2 -2
  242. package/lib/urlUtils.d.mts.map +1 -0
  243. package/lib/urlUtils.mjs +38 -0
  244. package/lib/urlUtils.mjs.map +1 -0
  245. package/lib/{wholeSummaryDocumentStorageService.d.ts → wholeSummaryDocumentStorageService.d.mts} +12 -10
  246. package/lib/wholeSummaryDocumentStorageService.d.mts.map +1 -0
  247. package/lib/wholeSummaryDocumentStorageService.mjs +249 -0
  248. package/lib/wholeSummaryDocumentStorageService.mjs.map +1 -0
  249. package/lib/wholeSummaryUploadManager.d.mts +16 -0
  250. package/lib/wholeSummaryUploadManager.d.mts.map +1 -0
  251. package/lib/wholeSummaryUploadManager.mjs +33 -0
  252. package/lib/wholeSummaryUploadManager.mjs.map +1 -0
  253. package/package.json +104 -68
  254. package/prettier.config.cjs +8 -0
  255. package/src/cache.ts +25 -9
  256. package/src/contracts.ts +60 -0
  257. package/src/createNewUtils.ts +26 -24
  258. package/src/defaultTokenProvider.ts +14 -15
  259. package/src/definitions.ts +2 -2
  260. package/src/deltaStorageService.ts +145 -91
  261. package/src/documentDeltaConnection.ts +54 -52
  262. package/src/documentService.ts +272 -242
  263. package/src/documentServiceFactory.ts +338 -237
  264. package/src/documentStorageService.ts +92 -84
  265. package/src/errorUtils.ts +117 -79
  266. package/src/gitManager.ts +67 -0
  267. package/src/historian.ts +121 -0
  268. package/src/index.ts +15 -8
  269. package/src/mapWithExpiration.ts +124 -0
  270. package/src/nullBlobStorageService.ts +24 -21
  271. package/src/packageVersion.ts +1 -1
  272. package/src/policies.ts +51 -38
  273. package/src/r11sSnapshotParser.ts +82 -0
  274. package/src/restWrapper.ts +400 -216
  275. package/src/restWrapperBase.ts +146 -0
  276. package/src/retriableGitManager.ts +76 -153
  277. package/src/shreddedSummaryDocumentStorageService.ts +214 -195
  278. package/src/storageContracts.ts +63 -0
  279. package/src/summaryTreeUploadManager.ts +155 -0
  280. package/src/tokens.ts +74 -39
  281. package/src/treeUtils.ts +138 -0
  282. package/src/urlUtils.ts +27 -28
  283. package/src/wholeSummaryDocumentStorageService.ts +352 -252
  284. package/src/wholeSummaryUploadManager.ts +64 -0
  285. package/tsc-multi.test.json +4 -0
  286. package/tsconfig.json +10 -13
  287. package/dist/cache.js +0 -20
  288. package/dist/cache.js.map +0 -1
  289. package/dist/createNewUtils.js.map +0 -1
  290. package/dist/defaultTokenProvider.js.map +0 -1
  291. package/dist/deltaStorageService.js +0 -82
  292. package/dist/deltaStorageService.js.map +0 -1
  293. package/dist/documentDeltaConnection.js.map +0 -1
  294. package/dist/documentService.js.map +0 -1
  295. package/dist/documentServiceFactory.js.map +0 -1
  296. package/dist/documentStorageService.js.map +0 -1
  297. package/dist/errorUtils.js +0 -56
  298. package/dist/errorUtils.js.map +0 -1
  299. package/dist/index.js +0 -25
  300. package/dist/index.js.map +0 -1
  301. package/dist/nullBlobStorageService.js.map +0 -1
  302. package/dist/packageVersion.js.map +0 -1
  303. package/dist/policies.js.map +0 -1
  304. package/dist/restWrapper.js +0 -153
  305. package/dist/restWrapper.js.map +0 -1
  306. package/dist/retriableGitManager.js +0 -76
  307. package/dist/retriableGitManager.js.map +0 -1
  308. package/dist/shreddedSummaryDocumentStorageService.js.map +0 -1
  309. package/dist/tokens.js.map +0 -1
  310. package/dist/urlUtils.js.map +0 -1
  311. package/dist/wholeSummaryDocumentStorageService.js +0 -191
  312. package/dist/wholeSummaryDocumentStorageService.js.map +0 -1
  313. package/lib/cache.d.ts.map +0 -1
  314. package/lib/cache.js +0 -16
  315. package/lib/cache.js.map +0 -1
  316. package/lib/createNewUtils.js.map +0 -1
  317. package/lib/defaultTokenProvider.d.ts.map +0 -1
  318. package/lib/defaultTokenProvider.js.map +0 -1
  319. package/lib/definitions.d.ts.map +0 -1
  320. package/lib/definitions.js.map +0 -1
  321. package/lib/deltaStorageService.d.ts.map +0 -1
  322. package/lib/deltaStorageService.js +0 -77
  323. package/lib/deltaStorageService.js.map +0 -1
  324. package/lib/documentDeltaConnection.d.ts.map +0 -1
  325. package/lib/documentDeltaConnection.js.map +0 -1
  326. package/lib/documentService.d.ts.map +0 -1
  327. package/lib/documentService.js.map +0 -1
  328. package/lib/documentServiceFactory.d.ts.map +0 -1
  329. package/lib/documentServiceFactory.js.map +0 -1
  330. package/lib/documentStorageService.d.ts.map +0 -1
  331. package/lib/documentStorageService.js.map +0 -1
  332. package/lib/errorUtils.d.ts +0 -47
  333. package/lib/errorUtils.d.ts.map +0 -1
  334. package/lib/errorUtils.js +0 -50
  335. package/lib/errorUtils.js.map +0 -1
  336. package/lib/index.d.ts +0 -13
  337. package/lib/index.d.ts.map +0 -1
  338. package/lib/index.js +0 -13
  339. package/lib/index.js.map +0 -1
  340. package/lib/nullBlobStorageService.d.ts.map +0 -1
  341. package/lib/nullBlobStorageService.js.map +0 -1
  342. package/lib/packageVersion.js.map +0 -1
  343. package/lib/policies.d.ts.map +0 -1
  344. package/lib/policies.js.map +0 -1
  345. package/lib/restWrapper.d.ts +0 -33
  346. package/lib/restWrapper.d.ts.map +0 -1
  347. package/lib/restWrapper.js +0 -144
  348. package/lib/restWrapper.js.map +0 -1
  349. package/lib/retriableGitManager.d.ts +0 -34
  350. package/lib/retriableGitManager.d.ts.map +0 -1
  351. package/lib/retriableGitManager.js +0 -72
  352. package/lib/retriableGitManager.js.map +0 -1
  353. package/lib/shreddedSummaryDocumentStorageService.d.ts.map +0 -1
  354. package/lib/shreddedSummaryDocumentStorageService.js.map +0 -1
  355. package/lib/tokens.d.ts.map +0 -1
  356. package/lib/tokens.js.map +0 -1
  357. package/lib/urlUtils.d.ts.map +0 -1
  358. package/lib/urlUtils.js +0 -42
  359. package/lib/urlUtils.js.map +0 -1
  360. package/lib/wholeSummaryDocumentStorageService.d.ts.map +0 -1
  361. package/lib/wholeSummaryDocumentStorageService.js +0 -187
  362. package/lib/wholeSummaryDocumentStorageService.js.map +0 -1
  363. package/tsconfig.esnext.json +0 -7
  364. /package/lib/{definitions.d.ts → definitions.d.mts} +0 -0
  365. /package/lib/{nullBlobStorageService.d.ts → nullBlobStorageService.d.mts} +0 -0
@@ -5,35 +5,54 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.DocumentPostCreateError = exports.RouterliciousDocumentServiceFactory = void 0;
8
- const common_utils_1 = require("@fluidframework/common-utils");
8
+ const core_utils_1 = require("@fluidframework/core-utils");
9
+ const driver_base_1 = require("@fluidframework/driver-base");
10
+ const driver_definitions_1 = require("@fluidframework/driver-definitions");
9
11
  const driver_utils_1 = require("@fluidframework/driver-utils");
10
12
  const telemetry_utils_1 = require("@fluidframework/telemetry-utils");
11
- const documentService_1 = require("./documentService");
12
- const restWrapper_1 = require("./restWrapper");
13
- const createNewUtils_1 = require("./createNewUtils");
14
- const urlUtils_1 = require("./urlUtils");
15
- const cache_1 = require("./cache");
16
- const packageVersion_1 = require("./packageVersion");
13
+ const server_services_client_1 = require("@fluidframework/server-services-client");
14
+ const documentService_1 = require("./documentService.cjs");
15
+ const restWrapper_1 = require("./restWrapper.cjs");
16
+ const urlUtils_1 = require("./urlUtils.cjs");
17
+ const cache_1 = require("./cache.cjs");
18
+ const packageVersion_1 = require("./packageVersion.cjs");
19
+ const maximumSnapshotCacheDurationMs = 432000000; // 5 days in ms
17
20
  const defaultRouterliciousDriverPolicies = {
18
21
  enablePrefetch: true,
19
22
  maxConcurrentStorageRequests: 100,
20
23
  maxConcurrentOrdererRequests: 100,
21
- aggregateBlobsSmallerThanBytes: undefined,
22
24
  enableDiscovery: false,
23
25
  enableWholeSummaryUpload: false,
24
26
  enableRestLess: true,
27
+ enableInternalSummaryCaching: true,
28
+ enableLongPollingDowngrade: true,
29
+ isEphemeralContainer: false,
25
30
  };
26
31
  /**
27
32
  * Factory for creating the routerlicious document service. Use this if you want to
28
33
  * use the routerlicious implementation.
34
+ * @internal
29
35
  */
30
36
  class RouterliciousDocumentServiceFactory {
31
37
  constructor(tokenProvider, driverPolicies = {}) {
32
38
  this.tokenProvider = tokenProvider;
33
- this.protocolName = "fluid:";
39
+ this.wholeSnapshotTreeCache = new cache_1.NullCache();
40
+ this.shreddedSummaryTreeCache = new cache_1.NullCache();
41
+ // Use the maximum allowed by the policy (IDocumentStorageServicePolicies.maximumCacheDurationMs set below)
42
+ const snapshotCacheExpiryMs = maximumSnapshotCacheDurationMs;
43
+ this.driverPolicies = {
44
+ ...defaultRouterliciousDriverPolicies,
45
+ ...driverPolicies,
46
+ };
34
47
  this.blobCache = new cache_1.InMemoryCache();
35
- this.snapshotTreeCache = new cache_1.InMemoryCache();
36
- this.driverPolicies = Object.assign(Object.assign({}, defaultRouterliciousDriverPolicies), driverPolicies);
48
+ if (this.driverPolicies.enableInternalSummaryCaching) {
49
+ if (this.driverPolicies.enableWholeSummaryUpload) {
50
+ this.wholeSnapshotTreeCache = new cache_1.InMemoryCache(snapshotCacheExpiryMs);
51
+ }
52
+ else {
53
+ this.shreddedSummaryTreeCache = new cache_1.InMemoryCache(snapshotCacheExpiryMs);
54
+ }
55
+ }
37
56
  }
38
57
  /**
39
58
  * {@inheritDoc @fluidframework/driver-definitions#IDocumentServiceFactory.createContainer}
@@ -42,42 +61,44 @@ class RouterliciousDocumentServiceFactory {
42
61
  * If an exception is thrown while invoking the provided {@link ITokenProvider.documentPostCreateCallback}.
43
62
  */
44
63
  async createContainer(createNewSummary, resolvedUrl, logger, clientIsSummarizer) {
45
- (0, driver_utils_1.ensureFluidResolvedUrl)(resolvedUrl);
46
64
  if (createNewSummary === undefined) {
47
65
  throw new Error("Empty file summary creation isn't supported in this driver.");
48
66
  }
49
- (0, common_utils_1.assert)(!!resolvedUrl.endpoints.ordererUrl, 0x0b2 /* "Missing orderer URL!" */);
67
+ (0, core_utils_1.assert)(!!resolvedUrl.endpoints.ordererUrl, 0x0b2 /* "Missing orderer URL!" */);
50
68
  let parsedUrl = (0, urlUtils_1.parseFluidUrl)(resolvedUrl.url);
51
69
  if (!parsedUrl.pathname) {
52
70
  throw new Error("Parsed url should contain tenant and doc Id!!");
53
71
  }
54
72
  const [, tenantId] = parsedUrl.pathname.split("/");
55
- const protocolSummary = createNewSummary.tree[".protocol"];
56
- const appSummary = createNewSummary.tree[".app"];
57
- if (!(protocolSummary && appSummary)) {
73
+ if (!(0, driver_utils_1.isCombinedAppAndProtocolSummary)(createNewSummary)) {
58
74
  throw new Error("Protocol and App Summary required in the full summary");
59
75
  }
76
+ const protocolSummary = createNewSummary.tree[".protocol"];
77
+ const appSummary = createNewSummary.tree[".app"];
60
78
  const documentAttributes = (0, driver_utils_1.getDocAttributesFromProtocolSummary)(protocolSummary);
61
79
  const quorumValues = (0, driver_utils_1.getQuorumValuesFromProtocolSummary)(protocolSummary);
62
- const logger2 = telemetry_utils_1.ChildLogger.create(logger, "RouterliciousDriver");
80
+ const logger2 = (0, telemetry_utils_1.createChildLogger)({ logger, namespace: "RouterliciousDriver" });
81
+ const ordererTokenFetcher = (0, restWrapper_1.toInstrumentedR11sOrdererTokenFetcher)(tenantId, undefined /* documentId */, this.tokenProvider, logger2);
63
82
  const rateLimiter = new driver_utils_1.RateLimiter(this.driverPolicies.maxConcurrentOrdererRequests);
64
- const ordererRestWrapper = await restWrapper_1.RouterliciousOrdererRestWrapper.load(tenantId, undefined, this.tokenProvider, logger2, rateLimiter, this.driverPolicies.enableRestLess, resolvedUrl.endpoints.ordererUrl);
83
+ const ordererRestWrapper = await restWrapper_1.RouterliciousOrdererRestWrapper.load(ordererTokenFetcher, logger2, rateLimiter, this.driverPolicies.enableRestLess, resolvedUrl.endpoints.ordererUrl);
65
84
  const res = await telemetry_utils_1.PerformanceEvent.timedExecAsync(logger2, {
66
85
  eventName: "CreateNew",
67
86
  details: JSON.stringify({
68
87
  enableDiscovery: this.driverPolicies.enableDiscovery,
69
88
  sequenceNumber: documentAttributes.sequenceNumber,
89
+ isEphemeralContainer: this.driverPolicies.isEphemeralContainer,
70
90
  }),
71
91
  }, async (event) => {
72
92
  // @TODO: Remove returned "string" type when removing back-compat code
73
- const postRes = await ordererRestWrapper.post(`/documents/${tenantId}`, {
74
- summary: (0, createNewUtils_1.convertSummaryToCreateNewSummary)(appSummary),
93
+ const postRes = (await ordererRestWrapper.post(`/documents/${tenantId}`, {
94
+ summary: (0, server_services_client_1.convertSummaryTreeToWholeSummaryTree)(undefined, appSummary),
75
95
  sequenceNumber: documentAttributes.sequenceNumber,
76
96
  values: quorumValues,
77
97
  enableDiscovery: this.driverPolicies.enableDiscovery,
78
- generateToken: this.tokenProvider.documentPostCreateCallback !==
79
- undefined,
80
- });
98
+ generateToken: this.tokenProvider.documentPostCreateCallback !== undefined,
99
+ isEphemeralContainer: this.driverPolicies.isEphemeralContainer,
100
+ enableAnyBinaryBlobOnFirstSummary: true,
101
+ })).content;
81
102
  event.end({
82
103
  docId: typeof postRes === "string" ? postRes : postRes.id,
83
104
  });
@@ -120,7 +141,15 @@ class RouterliciousDocumentServiceFactory {
120
141
  }
121
142
  const parsedDeltaStorageUrl = new URL(deltaStorageUrl);
122
143
  parsedDeltaStorageUrl.pathname = (0, urlUtils_1.replaceDocumentIdInPath)(parsedDeltaStorageUrl.pathname, documentId);
123
- return this.createDocumentService(Object.assign(Object.assign({}, resolvedUrl), { url: parsedUrl.toString(), id: documentId, endpoints: Object.assign(Object.assign({}, resolvedUrl.endpoints), { deltaStorageUrl: parsedDeltaStorageUrl.toString() }) }), logger, clientIsSummarizer, session);
144
+ return this.createDocumentService({
145
+ ...resolvedUrl,
146
+ url: parsedUrl.toString(),
147
+ id: documentId,
148
+ endpoints: {
149
+ ...resolvedUrl.endpoints,
150
+ deltaStorageUrl: parsedDeltaStorageUrl.toString(),
151
+ },
152
+ }, logger, clientIsSummarizer, session);
124
153
  }
125
154
  /**
126
155
  * {@inheritDoc @fluidframework/driver-definitions#IDocumentServiceFactory.createDocumentService}
@@ -128,25 +157,39 @@ class RouterliciousDocumentServiceFactory {
128
157
  * @returns Routerlicious document service.
129
158
  */
130
159
  async createDocumentService(resolvedUrl, logger, clientIsSummarizer, session) {
131
- (0, driver_utils_1.ensureFluidResolvedUrl)(resolvedUrl);
132
160
  const parsedUrl = (0, urlUtils_1.parseFluidUrl)(resolvedUrl.url);
133
161
  const [, tenantId, documentId] = parsedUrl.pathname.split("/");
134
162
  if (!documentId || !tenantId) {
135
163
  throw new Error(`Couldn't parse documentId and/or tenantId. [documentId:${documentId}][tenantId:${tenantId}]`);
136
164
  }
137
- const logger2 = telemetry_utils_1.ChildLogger.create(logger, "RouterliciousDriver", { all: { driverVersion: packageVersion_1.pkgVersion } });
165
+ const logger2 = (0, telemetry_utils_1.createChildLogger)({
166
+ logger,
167
+ namespace: "RouterliciousDriver",
168
+ properties: {
169
+ all: { driverVersion: packageVersion_1.pkgVersion },
170
+ },
171
+ });
172
+ const ordererTokenFetcher = (0, restWrapper_1.toInstrumentedR11sOrdererTokenFetcher)(tenantId, documentId, this.tokenProvider, logger2);
173
+ const storageTokenFetcher = (0, restWrapper_1.toInstrumentedR11sStorageTokenFetcher)(tenantId, documentId, this.tokenProvider, logger2);
174
+ const ordererTokenP = ordererTokenFetcher();
175
+ const storageTokenP = storageTokenFetcher();
176
+ const rateLimiter = new driver_utils_1.RateLimiter(this.driverPolicies.maxConcurrentOrdererRequests);
177
+ const ordererRestWrapper = await restWrapper_1.RouterliciousOrdererRestWrapper.load(ordererTokenFetcher, logger2, rateLimiter, this.driverPolicies.enableRestLess, undefined /* baseUrl */, ordererTokenP);
138
178
  const discoverFluidResolvedUrl = async () => {
139
179
  if (!this.driverPolicies.enableDiscovery) {
140
180
  return resolvedUrl;
141
181
  }
142
- const rateLimiter = new driver_utils_1.RateLimiter(this.driverPolicies.maxConcurrentOrdererRequests);
143
- const ordererRestWrapper = await restWrapper_1.RouterliciousOrdererRestWrapper.load(tenantId, documentId, this.tokenProvider, logger2, rateLimiter, this.driverPolicies.enableRestLess, resolvedUrl.endpoints.ordererUrl);
144
182
  const discoveredSession = await telemetry_utils_1.PerformanceEvent.timedExecAsync(logger2, {
145
183
  eventName: "DiscoverSession",
146
184
  docId: documentId,
147
- }, async () => {
185
+ }, async (event) => {
148
186
  // The service responds with the current document session associated with the container.
149
- return ordererRestWrapper.get(`/documents/${tenantId}/session/${documentId}`);
187
+ const response = await ordererRestWrapper.get(`${resolvedUrl.endpoints.ordererUrl}/documents/${tenantId}/session/${documentId}`);
188
+ event.end({
189
+ ...response.propsToLog,
190
+ ...(0, driver_base_1.getW3CData)(response.requestUrl, "xmlhttprequest"),
191
+ });
192
+ return response.content;
150
193
  });
151
194
  return (0, urlUtils_1.getDiscoveredFluidResolvedUrl)(resolvedUrl, discoveredSession);
152
195
  };
@@ -156,10 +199,18 @@ class RouterliciousDocumentServiceFactory {
156
199
  const storageUrl = fluidResolvedUrl.endpoints.storageUrl;
157
200
  const ordererUrl = fluidResolvedUrl.endpoints.ordererUrl;
158
201
  const deltaStorageUrl = fluidResolvedUrl.endpoints.deltaStorageUrl;
202
+ const deltaStreamUrl = fluidResolvedUrl.endpoints.deltaStreamUrl || ordererUrl; // backward compatibility
159
203
  if (!ordererUrl || !deltaStorageUrl) {
160
204
  throw new Error(`All endpoints urls must be provided. [ordererUrl:${ordererUrl}][deltaStorageUrl:${deltaStorageUrl}]`);
161
205
  }
162
- return new documentService_1.DocumentService(fluidResolvedUrl, ordererUrl, deltaStorageUrl, storageUrl, logger2, this.tokenProvider, tenantId, documentId, this.driverPolicies, this.blobCache, this.snapshotTreeCache, discoverFluidResolvedUrl);
206
+ const storageRestWrapper = await restWrapper_1.RouterliciousStorageRestWrapper.load(tenantId, storageTokenFetcher, logger2, new driver_utils_1.RateLimiter(this.driverPolicies.maxConcurrentStorageRequests), this.driverPolicies.enableRestLess, storageUrl, storageTokenP);
207
+ const documentStorageServicePolicies = {
208
+ caching: this.driverPolicies.enablePrefetch
209
+ ? driver_definitions_1.LoaderCachingPolicy.Prefetch
210
+ : driver_definitions_1.LoaderCachingPolicy.NoCaching,
211
+ maximumCacheDurationMs: maximumSnapshotCacheDurationMs,
212
+ };
213
+ return new documentService_1.DocumentService(fluidResolvedUrl, ordererUrl, deltaStorageUrl, deltaStreamUrl, storageUrl, logger2, this.tokenProvider, tenantId, documentId, ordererRestWrapper, documentStorageServicePolicies, this.driverPolicies, this.blobCache, this.wholeSnapshotTreeCache, this.shreddedSummaryTreeCache, discoverFluidResolvedUrl, storageRestWrapper, storageTokenFetcher, ordererTokenFetcher);
163
214
  }
164
215
  }
165
216
  exports.RouterliciousDocumentServiceFactory = RouterliciousDocumentServiceFactory;
@@ -173,6 +224,7 @@ exports.RouterliciousDocumentServiceFactory = RouterliciousDocumentServiceFactor
173
224
  * @remarks TODO: examples of suggested actions for recovery.
174
225
  * - How would a user delete the created document?
175
226
  * - What would a retry pattern look like here?
227
+ * @internal
176
228
  */
177
229
  class DocumentPostCreateError extends Error {
178
230
  constructor(
@@ -184,7 +236,9 @@ class DocumentPostCreateError extends Error {
184
236
  this.innerError = innerError;
185
237
  this.name = "DocumentPostCreateError";
186
238
  }
187
- get stack() { return this.innerError.stack; }
239
+ get stack() {
240
+ return this.innerError.stack;
241
+ }
188
242
  }
189
243
  exports.DocumentPostCreateError = DocumentPostCreateError;
190
- //# sourceMappingURL=documentServiceFactory.js.map
244
+ //# sourceMappingURL=documentServiceFactory.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentServiceFactory.cjs","sourceRoot":"","sources":["../src/documentServiceFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AACpD,6DAAyD;AACzD,2EAO4C;AAG5C,+DAKsC;AACtC,qEAAsF;AACtF,mFAGgD;AAChD,2DAAoD;AAGpD,mDAKuB;AACvB,6CAAmG;AACnG,uCAA2D;AAC3D,yDAA+D;AAI/D,MAAM,8BAA8B,GAAe,SAAW,CAAC,CAAC,eAAe;AAE/E,MAAM,kCAAkC,GAAiC;IACxE,cAAc,EAAE,IAAI;IACpB,4BAA4B,EAAE,GAAG;IACjC,4BAA4B,EAAE,GAAG;IACjC,eAAe,EAAE,KAAK;IACtB,wBAAwB,EAAE,KAAK;IAC/B,cAAc,EAAE,IAAI;IACpB,4BAA4B,EAAE,IAAI;IAClC,0BAA0B,EAAE,IAAI;IAChC,oBAAoB,EAAE,KAAK;CAC3B,CAAC;AAEF;;;;GAIG;AACH,MAAa,mCAAmC;IAM/C,YACkB,aAA6B,EAC9C,iBAAwD,EAAE;QADzC,kBAAa,GAAb,aAAa,CAAgB;QAJ9B,2BAAsB,GAAqC,IAAI,iBAAS,EAAE,CAAC;QAC3E,6BAAwB,GAAiC,IAAI,iBAAS,EAAE,CAAC;QAMzF,2GAA2G;QAC3G,MAAM,qBAAqB,GAAe,8BAA8B,CAAC;QAEzE,IAAI,CAAC,cAAc,GAAG;YACrB,GAAG,kCAAkC;YACrC,GAAG,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,EACP,IAAI,CAAC,aAAa,EAClB,QAAQ,EACR,UAAU,EACV,kBAAkB,EAClB,8BAA8B,EAC9B,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,sBAAsB,EAC3B,IAAI,CAAC,wBAAwB,EAC7B,wBAAwB,EACxB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,CACnB,CAAC;IACH,CAAC;CACD;AAjTD,kFAiTC;AAED;;;;;;;;;;;GAWG;AACH,MAAa,uBAAwB,SAAQ,KAAK;IACjD;IACC;;OAEG;IACc,UAAiB;QAElC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAFT,eAAU,GAAV,UAAU,CAAO;QAKnB,SAAI,GAAG,yBAAyB,CAAC;IAFjD,CAAC;IAID,IAAW,KAAK;QACf,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;IAC9B,CAAC;CACD;AAfD,0DAeC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { getW3CData } from \"@fluidframework/driver-base\";\nimport {\n\tFiveDaysMs,\n\tIDocumentService,\n\tIDocumentServiceFactory,\n\tIDocumentStorageServicePolicies,\n\tIResolvedUrl,\n\tLoaderCachingPolicy,\n} from \"@fluidframework/driver-definitions\";\nimport { ITelemetryBaseLogger } from \"@fluidframework/core-interfaces\";\nimport { ISummaryTree } from \"@fluidframework/protocol-definitions\";\nimport {\n\tgetDocAttributesFromProtocolSummary,\n\tgetQuorumValuesFromProtocolSummary,\n\tisCombinedAppAndProtocolSummary,\n\tRateLimiter,\n} from \"@fluidframework/driver-utils\";\nimport { createChildLogger, PerformanceEvent } from \"@fluidframework/telemetry-utils\";\nimport {\n\tISession,\n\tconvertSummaryTreeToWholeSummaryTree,\n} from \"@fluidframework/server-services-client\";\nimport { DocumentService } from \"./documentService\";\nimport { IRouterliciousDriverPolicies } from \"./policies\";\nimport { ITokenProvider } from \"./tokens\";\nimport {\n\tRouterliciousOrdererRestWrapper,\n\tRouterliciousStorageRestWrapper,\n\ttoInstrumentedR11sOrdererTokenFetcher,\n\ttoInstrumentedR11sStorageTokenFetcher,\n} from \"./restWrapper\";\nimport { parseFluidUrl, replaceDocumentIdInPath, getDiscoveredFluidResolvedUrl } from \"./urlUtils\";\nimport { ICache, InMemoryCache, NullCache } from \"./cache\";\nimport { pkgVersion as driverVersion } from \"./packageVersion\";\nimport { ISnapshotTreeVersion } from \"./definitions\";\nimport { INormalizedWholeSnapshot } from \"./contracts\";\n\nconst maximumSnapshotCacheDurationMs: FiveDaysMs = 432_000_000; // 5 days in ms\n\nconst defaultRouterliciousDriverPolicies: IRouterliciousDriverPolicies = {\n\tenablePrefetch: true,\n\tmaxConcurrentStorageRequests: 100,\n\tmaxConcurrentOrdererRequests: 100,\n\tenableDiscovery: false,\n\tenableWholeSummaryUpload: false,\n\tenableRestLess: true,\n\tenableInternalSummaryCaching: true,\n\tenableLongPollingDowngrade: true,\n\tisEphemeralContainer: false,\n};\n\n/**\n * Factory for creating the routerlicious document service. Use this if you want to\n * use the routerlicious implementation.\n * @internal\n */\nexport class RouterliciousDocumentServiceFactory implements IDocumentServiceFactory {\n\tprivate readonly driverPolicies: IRouterliciousDriverPolicies;\n\tprivate readonly blobCache: ICache<ArrayBufferLike>;\n\tprivate readonly wholeSnapshotTreeCache: ICache<INormalizedWholeSnapshot> = new NullCache();\n\tprivate readonly shreddedSummaryTreeCache: ICache<ISnapshotTreeVersion> = new NullCache();\n\n\tconstructor(\n\t\tprivate readonly tokenProvider: ITokenProvider,\n\t\tdriverPolicies: Partial<IRouterliciousDriverPolicies> = {},\n\t) {\n\t\t// Use the maximum allowed by the policy (IDocumentStorageServicePolicies.maximumCacheDurationMs set below)\n\t\tconst snapshotCacheExpiryMs: FiveDaysMs = maximumSnapshotCacheDurationMs;\n\n\t\tthis.driverPolicies = {\n\t\t\t...defaultRouterliciousDriverPolicies,\n\t\t\t...driverPolicies,\n\t\t};\n\t\tthis.blobCache = new InMemoryCache<ArrayBufferLike>();\n\t\tif (this.driverPolicies.enableInternalSummaryCaching) {\n\t\t\tif (this.driverPolicies.enableWholeSummaryUpload) {\n\t\t\t\tthis.wholeSnapshotTreeCache = new InMemoryCache<INormalizedWholeSnapshot>(\n\t\t\t\t\tsnapshotCacheExpiryMs,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tthis.shreddedSummaryTreeCache = new InMemoryCache<ISnapshotTreeVersion>(\n\t\t\t\t\tsnapshotCacheExpiryMs,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/driver-definitions#IDocumentServiceFactory.createContainer}\n\t *\n\t * @throws {@link DocumentPostCreateError}\n\t * If an exception is thrown while invoking the provided {@link ITokenProvider.documentPostCreateCallback}.\n\t */\n\tpublic async createContainer(\n\t\tcreateNewSummary: ISummaryTree | undefined,\n\t\tresolvedUrl: IResolvedUrl,\n\t\tlogger?: ITelemetryBaseLogger,\n\t\tclientIsSummarizer?: boolean,\n\t): Promise<IDocumentService> {\n\t\tif (createNewSummary === undefined) {\n\t\t\tthrow new Error(\"Empty file summary creation isn't supported in this driver.\");\n\t\t}\n\t\tassert(!!resolvedUrl.endpoints.ordererUrl, 0x0b2 /* \"Missing orderer URL!\" */);\n\t\tlet parsedUrl = parseFluidUrl(resolvedUrl.url);\n\t\tif (!parsedUrl.pathname) {\n\t\t\tthrow new Error(\"Parsed url should contain tenant and doc Id!!\");\n\t\t}\n\t\tconst [, tenantId] = parsedUrl.pathname.split(\"/\");\n\n\t\tif (!isCombinedAppAndProtocolSummary(createNewSummary)) {\n\t\t\tthrow new Error(\"Protocol and App Summary required in the full summary\");\n\t\t}\n\t\tconst protocolSummary = createNewSummary.tree[\".protocol\"];\n\t\tconst appSummary = createNewSummary.tree[\".app\"];\n\n\t\tconst documentAttributes = getDocAttributesFromProtocolSummary(protocolSummary);\n\t\tconst quorumValues = getQuorumValuesFromProtocolSummary(protocolSummary);\n\n\t\tconst logger2 = createChildLogger({ logger, namespace: \"RouterliciousDriver\" });\n\t\tconst ordererTokenFetcher = toInstrumentedR11sOrdererTokenFetcher(\n\t\t\ttenantId,\n\t\t\tundefined /* documentId */,\n\t\t\tthis.tokenProvider,\n\t\t\tlogger2,\n\t\t);\n\t\tconst rateLimiter = new RateLimiter(this.driverPolicies.maxConcurrentOrdererRequests);\n\t\tconst ordererRestWrapper = await RouterliciousOrdererRestWrapper.load(\n\t\t\tordererTokenFetcher,\n\t\t\tlogger2,\n\t\t\trateLimiter,\n\t\t\tthis.driverPolicies.enableRestLess,\n\t\t\tresolvedUrl.endpoints.ordererUrl,\n\t\t);\n\n\t\tconst res = await PerformanceEvent.timedExecAsync(\n\t\t\tlogger2,\n\t\t\t{\n\t\t\t\teventName: \"CreateNew\",\n\t\t\t\tdetails: JSON.stringify({\n\t\t\t\t\tenableDiscovery: this.driverPolicies.enableDiscovery,\n\t\t\t\t\tsequenceNumber: documentAttributes.sequenceNumber,\n\t\t\t\t\tisEphemeralContainer: this.driverPolicies.isEphemeralContainer,\n\t\t\t\t}),\n\t\t\t},\n\t\t\tasync (event) => {\n\t\t\t\t// @TODO: Remove returned \"string\" type when removing back-compat code\n\t\t\t\tconst postRes = (\n\t\t\t\t\tawait ordererRestWrapper.post<\n\t\t\t\t\t\t{ id: string; token?: string; session?: ISession } | string\n\t\t\t\t\t>(`/documents/${tenantId}`, {\n\t\t\t\t\t\tsummary: convertSummaryTreeToWholeSummaryTree(undefined, appSummary),\n\t\t\t\t\t\tsequenceNumber: documentAttributes.sequenceNumber,\n\t\t\t\t\t\tvalues: quorumValues,\n\t\t\t\t\t\tenableDiscovery: this.driverPolicies.enableDiscovery,\n\t\t\t\t\t\tgenerateToken: this.tokenProvider.documentPostCreateCallback !== undefined,\n\t\t\t\t\t\tisEphemeralContainer: this.driverPolicies.isEphemeralContainer,\n\t\t\t\t\t\tenableAnyBinaryBlobOnFirstSummary: true,\n\t\t\t\t\t})\n\t\t\t\t).content;\n\n\t\t\t\tevent.end({\n\t\t\t\t\tdocId: typeof postRes === \"string\" ? postRes : postRes.id,\n\t\t\t\t});\n\t\t\t\treturn postRes;\n\t\t\t},\n\t\t);\n\n\t\t// For supporting backward compatibility, when the request has generateToken === true, it will return\n\t\t// an object instead of string\n\t\t// @TODO: Remove the logic when no need to support back-compat\n\n\t\tlet documentId: string;\n\t\tlet token: string | undefined;\n\t\tlet session: ISession | undefined;\n\t\tif (typeof res === \"string\") {\n\t\t\tdocumentId = res;\n\t\t} else {\n\t\t\tdocumentId = res.id;\n\t\t\ttoken = res.token;\n\t\t\tsession = this.driverPolicies.enableDiscovery ? res.session : undefined;\n\t\t}\n\t\tparsedUrl = parseFluidUrl(resolvedUrl.url);\n\n\t\t// @TODO: Remove token from the condition, checking the documentPostCreateCallback !== undefined\n\t\t// is sufficient to determine if the token will be undefined or not.\n\t\ttry {\n\t\t\tawait PerformanceEvent.timedExecAsync(\n\t\t\t\tlogger2,\n\t\t\t\t{\n\t\t\t\t\teventName: \"DocPostCreateCallback\",\n\t\t\t\t\tdocId: documentId,\n\t\t\t\t},\n\t\t\t\tasync () => {\n\t\t\t\t\tif (token && this.tokenProvider.documentPostCreateCallback !== undefined) {\n\t\t\t\t\t\treturn this.tokenProvider.documentPostCreateCallback(documentId, token);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t);\n\t\t} catch (error: any) {\n\t\t\tthrow new DocumentPostCreateError(error);\n\t\t}\n\n\t\tparsedUrl.set(\"pathname\", replaceDocumentIdInPath(parsedUrl.pathname, documentId));\n\t\tconst deltaStorageUrl = resolvedUrl.endpoints.deltaStorageUrl;\n\t\tif (!deltaStorageUrl) {\n\t\t\tthrow new Error(\n\t\t\t\t`All endpoints urls must be provided. [deltaStorageUrl:${deltaStorageUrl}]`,\n\t\t\t);\n\t\t}\n\t\tconst parsedDeltaStorageUrl = new URL(deltaStorageUrl);\n\t\tparsedDeltaStorageUrl.pathname = replaceDocumentIdInPath(\n\t\t\tparsedDeltaStorageUrl.pathname,\n\t\t\tdocumentId,\n\t\t);\n\n\t\treturn this.createDocumentService(\n\t\t\t{\n\t\t\t\t...resolvedUrl,\n\t\t\t\turl: parsedUrl.toString(),\n\t\t\t\tid: documentId,\n\t\t\t\tendpoints: {\n\t\t\t\t\t...resolvedUrl.endpoints,\n\t\t\t\t\tdeltaStorageUrl: parsedDeltaStorageUrl.toString(),\n\t\t\t\t},\n\t\t\t},\n\t\t\tlogger,\n\t\t\tclientIsSummarizer,\n\t\t\tsession,\n\t\t);\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/driver-definitions#IDocumentServiceFactory.createDocumentService}\n\t *\n\t * @returns Routerlicious document service.\n\t */\n\tpublic async createDocumentService(\n\t\tresolvedUrl: IResolvedUrl,\n\t\tlogger?: ITelemetryBaseLogger,\n\t\tclientIsSummarizer?: boolean,\n\t\tsession?: ISession,\n\t): Promise<IDocumentService> {\n\t\tconst parsedUrl = parseFluidUrl(resolvedUrl.url);\n\t\tconst [, tenantId, documentId] = parsedUrl.pathname.split(\"/\");\n\t\tif (!documentId || !tenantId) {\n\t\t\tthrow new Error(\n\t\t\t\t`Couldn't parse documentId and/or tenantId. [documentId:${documentId}][tenantId:${tenantId}]`,\n\t\t\t);\n\t\t}\n\t\tconst logger2 = createChildLogger({\n\t\t\tlogger,\n\t\t\tnamespace: \"RouterliciousDriver\",\n\t\t\tproperties: {\n\t\t\t\tall: { driverVersion },\n\t\t\t},\n\t\t});\n\n\t\tconst ordererTokenFetcher = toInstrumentedR11sOrdererTokenFetcher(\n\t\t\ttenantId,\n\t\t\tdocumentId,\n\t\t\tthis.tokenProvider,\n\t\t\tlogger2,\n\t\t);\n\t\tconst storageTokenFetcher = toInstrumentedR11sStorageTokenFetcher(\n\t\t\ttenantId,\n\t\t\tdocumentId,\n\t\t\tthis.tokenProvider,\n\t\t\tlogger2,\n\t\t);\n\t\tconst ordererTokenP = ordererTokenFetcher();\n\t\tconst storageTokenP = storageTokenFetcher();\n\n\t\tconst rateLimiter = new RateLimiter(this.driverPolicies.maxConcurrentOrdererRequests);\n\t\tconst ordererRestWrapper = await RouterliciousOrdererRestWrapper.load(\n\t\t\tordererTokenFetcher,\n\t\t\tlogger2,\n\t\t\trateLimiter,\n\t\t\tthis.driverPolicies.enableRestLess,\n\t\t\tundefined /* baseUrl */,\n\t\t\tordererTokenP,\n\t\t);\n\n\t\tconst discoverFluidResolvedUrl = async (): Promise<IResolvedUrl> => {\n\t\t\tif (!this.driverPolicies.enableDiscovery) {\n\t\t\t\treturn resolvedUrl;\n\t\t\t}\n\n\t\t\tconst discoveredSession = await PerformanceEvent.timedExecAsync(\n\t\t\t\tlogger2,\n\t\t\t\t{\n\t\t\t\t\teventName: \"DiscoverSession\",\n\t\t\t\t\tdocId: documentId,\n\t\t\t\t},\n\t\t\t\tasync (event) => {\n\t\t\t\t\t// The service responds with the current document session associated with the container.\n\t\t\t\t\tconst response = await ordererRestWrapper.get<ISession>(\n\t\t\t\t\t\t`${resolvedUrl.endpoints.ordererUrl}/documents/${tenantId}/session/${documentId}`,\n\t\t\t\t\t);\n\t\t\t\t\tevent.end({\n\t\t\t\t\t\t...response.propsToLog,\n\t\t\t\t\t\t...getW3CData(response.requestUrl, \"xmlhttprequest\"),\n\t\t\t\t\t});\n\t\t\t\t\treturn response.content;\n\t\t\t\t},\n\t\t\t);\n\t\t\treturn getDiscoveredFluidResolvedUrl(resolvedUrl, discoveredSession);\n\t\t};\n\t\tconst fluidResolvedUrl: IResolvedUrl =\n\t\t\tsession !== undefined\n\t\t\t\t? getDiscoveredFluidResolvedUrl(resolvedUrl, session)\n\t\t\t\t: await discoverFluidResolvedUrl();\n\n\t\tconst storageUrl = fluidResolvedUrl.endpoints.storageUrl;\n\t\tconst ordererUrl = fluidResolvedUrl.endpoints.ordererUrl;\n\t\tconst deltaStorageUrl = fluidResolvedUrl.endpoints.deltaStorageUrl;\n\t\tconst deltaStreamUrl = fluidResolvedUrl.endpoints.deltaStreamUrl || ordererUrl; // backward compatibility\n\t\tif (!ordererUrl || !deltaStorageUrl) {\n\t\t\tthrow new Error(\n\t\t\t\t`All endpoints urls must be provided. [ordererUrl:${ordererUrl}][deltaStorageUrl:${deltaStorageUrl}]`,\n\t\t\t);\n\t\t}\n\n\t\tconst storageRestWrapper = await RouterliciousStorageRestWrapper.load(\n\t\t\ttenantId,\n\t\t\tstorageTokenFetcher,\n\t\t\tlogger2,\n\t\t\tnew RateLimiter(this.driverPolicies.maxConcurrentStorageRequests),\n\t\t\tthis.driverPolicies.enableRestLess,\n\t\t\tstorageUrl,\n\t\t\tstorageTokenP,\n\t\t);\n\n\t\tconst documentStorageServicePolicies: IDocumentStorageServicePolicies = {\n\t\t\tcaching: this.driverPolicies.enablePrefetch\n\t\t\t\t? LoaderCachingPolicy.Prefetch\n\t\t\t\t: LoaderCachingPolicy.NoCaching,\n\t\t\tmaximumCacheDurationMs: maximumSnapshotCacheDurationMs,\n\t\t};\n\n\t\treturn new DocumentService(\n\t\t\tfluidResolvedUrl,\n\t\t\tordererUrl,\n\t\t\tdeltaStorageUrl,\n\t\t\tdeltaStreamUrl,\n\t\t\tstorageUrl,\n\t\t\tlogger2,\n\t\t\tthis.tokenProvider,\n\t\t\ttenantId,\n\t\t\tdocumentId,\n\t\t\tordererRestWrapper,\n\t\t\tdocumentStorageServicePolicies,\n\t\t\tthis.driverPolicies,\n\t\t\tthis.blobCache,\n\t\t\tthis.wholeSnapshotTreeCache,\n\t\t\tthis.shreddedSummaryTreeCache,\n\t\t\tdiscoverFluidResolvedUrl,\n\t\t\tstorageRestWrapper,\n\t\t\tstorageTokenFetcher,\n\t\t\tordererTokenFetcher,\n\t\t);\n\t}\n}\n\n/**\n * Error returned by {@link RouterliciousDocumentServiceFactory.createContainer} when an error is thrown\n * in {@link ITokenProvider.documentPostCreateCallback}.\n * It is the consumer's responsibility to ensure that any state related to container creation is appropriately\n * cleaned up in the event of failure.\n * This includes the document itself, which will have been created by the time this error was thrown.\n *\n * @remarks TODO: examples of suggested actions for recovery.\n * - How would a user delete the created document?\n * - What would a retry pattern look like here?\n * @internal\n */\nexport class DocumentPostCreateError extends Error {\n\tpublic constructor(\n\t\t/**\n\t\t * Inner error being wrapped.\n\t\t */\n\t\tprivate readonly innerError: Error,\n\t) {\n\t\tsuper(innerError.message);\n\t}\n\n\tpublic readonly name = \"DocumentPostCreateError\";\n\n\tpublic get stack() {\n\t\treturn this.innerError.stack;\n\t}\n}\n"]}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { IDocumentService, IDocumentServiceFactory, IResolvedUrl } from "@fluidframework/driver-definitions";
6
- import { ITelemetryBaseLogger } from "@fluidframework/common-definitions";
6
+ import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
7
7
  import { ISummaryTree } from "@fluidframework/protocol-definitions";
8
8
  import { ISession } from "@fluidframework/server-services-client";
9
9
  import { IRouterliciousDriverPolicies } from "./policies";
@@ -11,13 +11,14 @@ import { ITokenProvider } from "./tokens";
11
11
  /**
12
12
  * Factory for creating the routerlicious document service. Use this if you want to
13
13
  * use the routerlicious implementation.
14
+ * @internal
14
15
  */
15
16
  export declare class RouterliciousDocumentServiceFactory implements IDocumentServiceFactory {
16
17
  private readonly tokenProvider;
17
- readonly protocolName = "fluid:";
18
18
  private readonly driverPolicies;
19
19
  private readonly blobCache;
20
- private readonly snapshotTreeCache;
20
+ private readonly wholeSnapshotTreeCache;
21
+ private readonly shreddedSummaryTreeCache;
21
22
  constructor(tokenProvider: ITokenProvider, driverPolicies?: Partial<IRouterliciousDriverPolicies>);
22
23
  /**
23
24
  * {@inheritDoc @fluidframework/driver-definitions#IDocumentServiceFactory.createContainer}
@@ -43,6 +44,7 @@ export declare class RouterliciousDocumentServiceFactory implements IDocumentSer
43
44
  * @remarks TODO: examples of suggested actions for recovery.
44
45
  * - How would a user delete the created document?
45
46
  * - What would a retry pattern look like here?
47
+ * @internal
46
48
  */
47
49
  export declare class DocumentPostCreateError extends Error {
48
50
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"documentServiceFactory.d.ts","sourceRoot":"","sources":["../src/documentServiceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACH,gBAAgB,EAChB,uBAAuB,EAEvB,YAAY,EACf,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAQpE,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAElE,OAAO,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAkB1C;;;GAGG;AACH,qBAAa,mCAAoC,YAAW,uBAAuB;IAO3E,OAAO,CAAC,QAAQ,CAAC,aAAa;IANlC,SAAgB,YAAY,YAAY;IACxC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA+B;IAC9D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAwC;IAClE,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA6C;gBAG1D,aAAa,EAAE,cAAc,EAC9C,cAAc,GAAE,OAAO,CAAC,4BAA4B,CAAM;IAQ9D;;;;;OAKG;IACU,eAAe,CACxB,gBAAgB,EAAE,YAAY,GAAG,SAAS,EAC1C,WAAW,EAAE,YAAY,EACzB,MAAM,CAAC,EAAE,oBAAoB,EAC7B,kBAAkB,CAAC,EAAE,OAAO,GAC7B,OAAO,CAAC,gBAAgB,CAAC;IAyH5B;;;;OAIG;IACU,qBAAqB,CAC9B,WAAW,EAAE,YAAY,EACzB,MAAM,CAAC,EAAE,oBAAoB,EAC7B,kBAAkB,CAAC,EAAE,OAAO,EAC5B,OAAO,CAAC,EAAE,QAAQ,GACnB,OAAO,CAAC,gBAAgB,CAAC;CAiE/B;AAED;;;;;;;;;;GAUG;A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,CAAC,EAAE,oBAAoB,EAC7B,kBAAkB,CAAC,EAAE,OAAO,EAC5B,OAAO,CAAC,EAAE,QAAQ,GAChB,OAAO,CAAC,gBAAgB,CAAC;CAwH5B;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;IAEhD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,UAAU;;IAH3B;;OAEG;IACc,UAAU,EAAE,KAAK;IAKnC,SAAgB,IAAI,6BAA6B;IAEjD,IAAW,KAAK,uBAEf;CACD"}
@@ -7,36 +7,38 @@ Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.DocumentStorageService = void 0;
8
8
  const driver_definitions_1 = require("@fluidframework/driver-definitions");
9
9
  const driver_utils_1 = require("@fluidframework/driver-utils");
10
- const wholeSummaryDocumentStorageService_1 = require("./wholeSummaryDocumentStorageService");
11
- const shreddedSummaryDocumentStorageService_1 = require("./shreddedSummaryDocumentStorageService");
10
+ const wholeSummaryDocumentStorageService_1 = require("./wholeSummaryDocumentStorageService.cjs");
11
+ const shreddedSummaryDocumentStorageService_1 = require("./shreddedSummaryDocumentStorageService.cjs");
12
12
  class DocumentStorageService extends driver_utils_1.DocumentStorageServiceProxy {
13
- constructor(id, manager, logger, policies = {}, driverPolicies, blobCache, snapshotTreeCache, noCacheGitManager, getStorageManager) {
14
- super(DocumentStorageService.loadInternalDocumentStorageService(id, manager, logger, policies, driverPolicies, blobCache, snapshotTreeCache, noCacheGitManager, getStorageManager));
15
- this.id = id;
16
- this.manager = manager;
17
- this.noCacheGitManager = noCacheGitManager;
18
- this._logTailSha = undefined;
19
- }
20
13
  get logTailSha() {
21
14
  return this._logTailSha;
22
15
  }
23
- static loadInternalDocumentStorageService(id, manager, logger, policies, driverPolicies, blobCache, snapshotTreeCache, noCacheGitManager, getStorageManager) {
24
- const storageService = (driverPolicies === null || driverPolicies === void 0 ? void 0 : driverPolicies.enableWholeSummaryUpload) ?
25
- new wholeSummaryDocumentStorageService_1.WholeSummaryDocumentStorageService(id, manager, logger, policies, driverPolicies, blobCache, snapshotTreeCache, noCacheGitManager, getStorageManager) :
26
- new shreddedSummaryDocumentStorageService_1.ShreddedSummaryDocumentStorageService(id, manager, logger, policies, driverPolicies, blobCache, snapshotTreeCache, getStorageManager);
16
+ static loadInternalDocumentStorageService(id, manager, logger, policies, driverPolicies, blobCache, snapshotTreeCache, shreddedSummaryTreeCache, noCacheGitManager, getStorageManager) {
17
+ const storageService = driverPolicies?.enableWholeSummaryUpload
18
+ ? new wholeSummaryDocumentStorageService_1.WholeSummaryDocumentStorageService(id, manager, logger, policies, driverPolicies, blobCache, snapshotTreeCache, noCacheGitManager, getStorageManager)
19
+ : new shreddedSummaryDocumentStorageService_1.ShreddedSummaryDocumentStorageService(id, manager, logger, policies, driverPolicies, blobCache, shreddedSummaryTreeCache, getStorageManager);
27
20
  // TODO: worth prefetching latest summary making version + snapshot call with WholeSummary storage?
28
- if (!(driverPolicies === null || driverPolicies === void 0 ? void 0 : driverPolicies.enableWholeSummaryUpload) && policies.caching === driver_definitions_1.LoaderCachingPolicy.Prefetch) {
21
+ if (!driverPolicies?.enableWholeSummaryUpload &&
22
+ policies.caching === driver_definitions_1.LoaderCachingPolicy.Prefetch) {
29
23
  return new driver_utils_1.PrefetchDocumentStorageService(storageService);
30
24
  }
31
25
  return storageService;
32
26
  }
27
+ constructor(id, manager, logger, policies, driverPolicies, blobCache, snapshotTreeCache, shreddedSummaryTreeCache, noCacheGitManager, getStorageManager) {
28
+ super(DocumentStorageService.loadInternalDocumentStorageService(id, manager, logger, policies, driverPolicies, blobCache, snapshotTreeCache, shreddedSummaryTreeCache, noCacheGitManager, getStorageManager));
29
+ this.id = id;
30
+ this.manager = manager;
31
+ this.noCacheGitManager = noCacheGitManager;
32
+ this._logTailSha = undefined;
33
+ }
33
34
  async getSnapshotTree(version) {
34
35
  const tree = await this.internalStorageService.getSnapshotTree(version);
35
36
  if (tree !== null) {
36
- this._logTailSha = ".logTail" in tree.trees ? tree.trees[".logTail"].blobs.logTail : undefined;
37
+ this._logTailSha =
38
+ ".logTail" in tree.trees ? tree.trees[".logTail"].blobs.logTail : undefined;
37
39
  }
38
40
  return tree;
39
41
  }
40
42
  }
41
43
  exports.DocumentStorageService = DocumentStorageService;
42
- //# sourceMappingURL=documentStorageService.js.map
44
+ //# sourceMappingURL=documentStorageService.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentStorageService.cjs","sourceRoot":"","sources":["../src/documentStorageService.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,2EAI4C;AAE5C,+DAGsC;AAGtC,iGAA0F;AAC1F,uGAAgG;AAKhG,MAAa,sBAAuB,SAAQ,0CAA2B;IAGtE,IAAW,UAAU;QACpB,OAAO,IAAI,CAAC,WAAW,CAAC;IACzB,CAAC;IAEO,MAAM,CAAC,kCAAkC,CAChD,EAAU,EACV,OAAmB,EACnB,MAA2B,EAC3B,QAAyC,EACzC,cAA6C,EAC7C,SAAmC,EACnC,iBAAoD,EACpD,wBAAuD,EACvD,iBAA8B,EAC9B,iBAAmE;QAEnE,MAAM,cAAc,GAAG,cAAc,EAAE,wBAAwB;YAC9D,CAAC,CAAC,IAAI,uEAAkC,CACtC,EAAE,EACF,OAAO,EACP,MAAM,EACN,QAAQ,EACR,cAAc,EACd,SAAS,EACT,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,CAChB;YACH,CAAC,CAAC,IAAI,6EAAqC,CACzC,EAAE,EACF,OAAO,EACP,MAAM,EACN,QAAQ,EACR,cAAc,EACd,SAAS,EACT,wBAAwB,EACxB,iBAAiB,CAChB,CAAC;QACL,mGAAmG;QACnG,IACC,CAAC,cAAc,EAAE,wBAAwB;YACzC,QAAQ,CAAC,OAAO,KAAK,wCAAmB,CAAC,QAAQ,EAChD;YACD,OAAO,IAAI,6CAA8B,CAAC,cAAc,CAAC,CAAC;SAC1D;QACD,OAAO,cAAc,CAAC;IACvB,CAAC;IAED,YACiB,EAAU,EACnB,OAAmB,EAC1B,MAA2B,EAC3B,QAAyC,EACzC,cAA6C,EAC7C,SAAmC,EACnC,iBAAoD,EACpD,wBAAuD,EAChD,iBAA8B,EACrC,iBAAmE;QAEnE,KAAK,CACJ,sBAAsB,CAAC,kCAAkC,CACxD,EAAE,EACF,OAAO,EACP,MAAM,EACN,QAAQ,EACR,cAAc,EACd,SAAS,EACT,iBAAiB,EACjB,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,CACjB,CACD,CAAC;QAxBc,OAAE,GAAF,EAAE,CAAQ;QACnB,YAAO,GAAP,OAAO,CAAY;QAOnB,sBAAiB,GAAjB,iBAAiB,CAAa;QA3D9B,gBAAW,GAAuB,SAAS,CAAC;IA4EpD,CAAC;IAEM,KAAK,CAAC,eAAe,CAAC,OAAkB;QAC9C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QACxE,IAAI,IAAI,KAAK,IAAI,EAAE;YAClB,IAAI,CAAC,WAAW;gBACf,UAAU,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;SAC7E;QACD,OAAO,IAAI,CAAC;IACb,CAAC;CACD;AAvFD,wDAuFC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils\";\nimport {\n\tIDocumentStorageService,\n\tIDocumentStorageServicePolicies,\n\tLoaderCachingPolicy,\n} from \"@fluidframework/driver-definitions\";\nimport { ISnapshotTree, IVersion } from \"@fluidframework/protocol-definitions\";\nimport {\n\tDocumentStorageServiceProxy,\n\tPrefetchDocumentStorageService,\n} from \"@fluidframework/driver-utils\";\nimport { IRouterliciousDriverPolicies } from \"./policies\";\nimport { ICache } from \"./cache\";\nimport { WholeSummaryDocumentStorageService } from \"./wholeSummaryDocumentStorageService\";\nimport { ShreddedSummaryDocumentStorageService } from \"./shreddedSummaryDocumentStorageService\";\nimport { GitManager } from \"./gitManager\";\nimport { ISnapshotTreeVersion } from \"./definitions\";\nimport { INormalizedWholeSnapshot } from \"./contracts\";\n\nexport class DocumentStorageService extends DocumentStorageServiceProxy {\n\tprivate _logTailSha: string | undefined = undefined;\n\n\tpublic get logTailSha(): string | undefined {\n\t\treturn this._logTailSha;\n\t}\n\n\tprivate static loadInternalDocumentStorageService(\n\t\tid: string,\n\t\tmanager: GitManager,\n\t\tlogger: ITelemetryLoggerExt,\n\t\tpolicies: IDocumentStorageServicePolicies,\n\t\tdriverPolicies?: IRouterliciousDriverPolicies,\n\t\tblobCache?: ICache<ArrayBufferLike>,\n\t\tsnapshotTreeCache?: ICache<INormalizedWholeSnapshot>,\n\t\tshreddedSummaryTreeCache?: ICache<ISnapshotTreeVersion>,\n\t\tnoCacheGitManager?: GitManager,\n\t\tgetStorageManager?: (disableCache?: boolean) => Promise<GitManager>,\n\t): IDocumentStorageService {\n\t\tconst storageService = driverPolicies?.enableWholeSummaryUpload\n\t\t\t? new WholeSummaryDocumentStorageService(\n\t\t\t\t\tid,\n\t\t\t\t\tmanager,\n\t\t\t\t\tlogger,\n\t\t\t\t\tpolicies,\n\t\t\t\t\tdriverPolicies,\n\t\t\t\t\tblobCache,\n\t\t\t\t\tsnapshotTreeCache,\n\t\t\t\t\tnoCacheGitManager,\n\t\t\t\t\tgetStorageManager,\n\t\t\t )\n\t\t\t: new ShreddedSummaryDocumentStorageService(\n\t\t\t\t\tid,\n\t\t\t\t\tmanager,\n\t\t\t\t\tlogger,\n\t\t\t\t\tpolicies,\n\t\t\t\t\tdriverPolicies,\n\t\t\t\t\tblobCache,\n\t\t\t\t\tshreddedSummaryTreeCache,\n\t\t\t\t\tgetStorageManager,\n\t\t\t );\n\t\t// TODO: worth prefetching latest summary making version + snapshot call with WholeSummary storage?\n\t\tif (\n\t\t\t!driverPolicies?.enableWholeSummaryUpload &&\n\t\t\tpolicies.caching === LoaderCachingPolicy.Prefetch\n\t\t) {\n\t\t\treturn new PrefetchDocumentStorageService(storageService);\n\t\t}\n\t\treturn storageService;\n\t}\n\n\tconstructor(\n\t\tpublic readonly id: string,\n\t\tpublic manager: GitManager,\n\t\tlogger: ITelemetryLoggerExt,\n\t\tpolicies: IDocumentStorageServicePolicies,\n\t\tdriverPolicies?: IRouterliciousDriverPolicies,\n\t\tblobCache?: ICache<ArrayBufferLike>,\n\t\tsnapshotTreeCache?: ICache<INormalizedWholeSnapshot>,\n\t\tshreddedSummaryTreeCache?: ICache<ISnapshotTreeVersion>,\n\t\tpublic noCacheGitManager?: GitManager,\n\t\tgetStorageManager?: (disableCache?: boolean) => Promise<GitManager>,\n\t) {\n\t\tsuper(\n\t\t\tDocumentStorageService.loadInternalDocumentStorageService(\n\t\t\t\tid,\n\t\t\t\tmanager,\n\t\t\t\tlogger,\n\t\t\t\tpolicies,\n\t\t\t\tdriverPolicies,\n\t\t\t\tblobCache,\n\t\t\t\tsnapshotTreeCache,\n\t\t\t\tshreddedSummaryTreeCache,\n\t\t\t\tnoCacheGitManager,\n\t\t\t\tgetStorageManager,\n\t\t\t),\n\t\t);\n\t}\n\n\tpublic async getSnapshotTree(version?: IVersion): Promise<ISnapshotTree | null> {\n\t\tconst tree = await this.internalStorageService.getSnapshotTree(version);\n\t\tif (tree !== null) {\n\t\t\tthis._logTailSha =\n\t\t\t\t\".logTail\" in tree.trees ? tree.trees[\".logTail\"].blobs.logTail : undefined;\n\t\t}\n\t\treturn tree;\n\t}\n}\n"]}
@@ -2,14 +2,15 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import type { ITelemetryLogger } from "@fluidframework/common-definitions";
5
+ import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
6
6
  import { IDocumentStorageServicePolicies } from "@fluidframework/driver-definitions";
7
7
  import { ISnapshotTree, IVersion } from "@fluidframework/protocol-definitions";
8
- import { GitManager } from "@fluidframework/server-services-client";
9
8
  import { DocumentStorageServiceProxy } from "@fluidframework/driver-utils";
10
9
  import { IRouterliciousDriverPolicies } from "./policies";
11
10
  import { ICache } from "./cache";
11
+ import { GitManager } from "./gitManager";
12
12
  import { ISnapshotTreeVersion } from "./definitions";
13
+ import { INormalizedWholeSnapshot } from "./contracts";
13
14
  export declare class DocumentStorageService extends DocumentStorageServiceProxy {
14
15
  readonly id: string;
15
16
  manager: GitManager;
@@ -17,7 +18,7 @@ export declare class DocumentStorageService extends DocumentStorageServiceProxy
17
18
  private _logTailSha;
18
19
  get logTailSha(): string | undefined;
19
20
  private static loadInternalDocumentStorageService;
20
- constructor(id: string, manager: GitManager, logger: ITelemetryLogger, policies?: IDocumentStorageServicePolicies, driverPolicies?: IRouterliciousDriverPolicies, blobCache?: ICache<ArrayBufferLike>, snapshotTreeCache?: ICache<ISnapshotTreeVersion>, noCacheGitManager?: GitManager | undefined, getStorageManager?: (disableCache?: boolean) => Promise<GitManager>);
21
+ constructor(id: string, manager: GitManager, logger: ITelemetryLoggerExt, policies: IDocumentStorageServicePolicies, driverPolicies?: IRouterliciousDriverPolicies, blobCache?: ICache<ArrayBufferLike>, snapshotTreeCache?: ICache<INormalizedWholeSnapshot>, shreddedSummaryTreeCache?: ICache<ISnapshotTreeVersion>, noCacheGitManager?: GitManager | undefined, getStorageManager?: (disableCache?: boolean) => Promise<GitManager>);
21
22
  getSnapshotTree(version?: IVersion): Promise<ISnapshotTree | null>;
22
23
  }
23
24
  //# sourceMappingURL=documentStorageService.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"documentStorageService.d.ts","sourceRoot":"","sources":["../src/documentStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAEH,+BAA+B,EAElC,MAAM,oCAAoC,CA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AE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EACN,2BAA2B,EAE3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAGjC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,qBAAa,sBAAuB,SAAQ,2BAA2B;aAoDrD,EAAE,EAAE,MAAM;IACnB,OAAO,EAAE,UAAU;IAOnB,iBAAiB,CAAC;IA3D1B,OAAO,CAAC,WAAW,CAAiC;IAEpD,IAAW,UAAU,IAAI,MAAM,GAAG,SAAS,CAE1C;IAED,OAAO,CAAC,MAAM,CAAC,kCAAkC;gBA6ChC,EAAE,EAAE,MAAM,EACnB,OAAO,EAAE,UAAU,EAC1B,MAAM,EAAE,mBAAmB,EAC3B,QAAQ,EAAE,+BAA+B,EACzC,cAAc,CAAC,EAAE,4BAA4B,EAC7C,SAAS,CAAC,EAAE,MAAM,CAAC,eAAe,CAAC,EACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC,wBAAwB,CAAC,EACpD,wBAAwB,CAAC,EAAE,MAAM,CAAC,oBAAoB,CAAC,EAChD,iBAAiB,CAAC,wBAAY,EACrC,iBAAiB,CAAC,EAAE,CAAC,YAAY,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,UAAU,CAAC;IAkBvD,eAAe,CAAC,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;CAQ/E"}
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ /*!
3
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
+ * Licensed under the MIT License.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.errorObjectFromSocketError = exports.throwR11sNetworkError = exports.createR11sNetworkError = exports.RouterliciousErrorType = exports.RouterliciousErrorTypes = void 0;
8
+ const driver_definitions_1 = require("@fluidframework/driver-definitions");
9
+ const driver_utils_1 = require("@fluidframework/driver-utils");
10
+ const packageVersion_1 = require("./packageVersion.cjs");
11
+ /**
12
+ * Routerlicious Error types
13
+ * Different error types that may be thrown by the routerlicious driver
14
+ * @internal
15
+ */
16
+ exports.RouterliciousErrorTypes = {
17
+ // Inherit base driver error types
18
+ ...driver_definitions_1.DriverErrorTypes,
19
+ /**
20
+ * SSL Certificate Error.
21
+ */
22
+ sslCertError: "sslCertError",
23
+ };
24
+ /**
25
+ * Routerlicious Error types
26
+ * Different error types that may be thrown by the routerlicious driver
27
+ *
28
+ * @deprecated Use {@link (RouterliciousErrorTypes:variable)} instead.
29
+ * @internal
30
+ */
31
+ var RouterliciousErrorType;
32
+ (function (RouterliciousErrorType) {
33
+ /**
34
+ * File not found, or file deleted during session
35
+ */
36
+ RouterliciousErrorType["fileNotFoundOrAccessDeniedError"] = "fileNotFoundOrAccessDeniedError";
37
+ /**
38
+ * SSL Certificate Error.
39
+ */
40
+ RouterliciousErrorType["sslCertError"] = "sslCertError";
41
+ })(RouterliciousErrorType || (exports.RouterliciousErrorType = RouterliciousErrorType = {}));
42
+ function createR11sNetworkError(errorMessage, statusCode, retryAfterMs) {
43
+ let error;
44
+ const props = { statusCode, driverVersion: packageVersion_1.pkgVersion };
45
+ switch (statusCode) {
46
+ case 401:
47
+ // The first 401 is manually retried in RouterliciousRestWrapper with a refreshed token,
48
+ // so we treat repeat 401s the same as 403.
49
+ case 403:
50
+ error = new driver_utils_1.AuthorizationError(errorMessage, undefined, undefined, props);
51
+ break;
52
+ case 404:
53
+ const errorType = RouterliciousErrorType.fileNotFoundOrAccessDeniedError;
54
+ error = new driver_utils_1.NonRetryableError(errorMessage, errorType, props);
55
+ break;
56
+ case 429:
57
+ error = (0, driver_utils_1.createGenericNetworkError)(errorMessage, { canRetry: true, retryAfterMs }, props);
58
+ break;
59
+ case 500:
60
+ case 502:
61
+ error = new driver_utils_1.GenericNetworkError(errorMessage, true, props);
62
+ break;
63
+ default:
64
+ const retryInfo = { canRetry: retryAfterMs !== undefined, retryAfterMs };
65
+ error = (0, driver_utils_1.createGenericNetworkError)(errorMessage, retryInfo, props);
66
+ break;
67
+ }
68
+ error.addTelemetryProperties({ endpointReached: true });
69
+ return error;
70
+ }
71
+ exports.createR11sNetworkError = createR11sNetworkError;
72
+ function throwR11sNetworkError(errorMessage, statusCode, retryAfterMs) {
73
+ const networkError = createR11sNetworkError(errorMessage, statusCode, retryAfterMs);
74
+ // eslint-disable-next-line @typescript-eslint/no-throw-literal
75
+ throw networkError;
76
+ }
77
+ exports.throwR11sNetworkError = throwR11sNetworkError;
78
+ /**
79
+ * Returns network error based on error object from R11s socket (IR11sSocketError)
80
+ */
81
+ function errorObjectFromSocketError(socketError, handler) {
82
+ // pre-0.58 error message prefix: R11sSocketError
83
+ const message = `R11s socket error (${handler}): ${socketError.message}`;
84
+ return createR11sNetworkError(message, socketError.code, socketError.retryAfterMs);
85
+ }
86
+ exports.errorObjectFromSocketError = errorObjectFromSocketError;
87
+ //# sourceMappingURL=errorUtils.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorUtils.cjs","sourceRoot":"","sources":["../src/errorUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2EAI4C;AAC5C,+DAKsC;AAEtC,yDAA+D;AAE/D;;;;GAIG;AACU,QAAA,uBAAuB,GAAG;IACtC,kCAAkC;IAClC,GAAG,qCAAgB;IAEnB;;OAEG;IACH,YAAY,EAAE,cAAc;CACnB,CAAC;AAOX;;;;;;GAMG;AACH,IAAY,sBAUX;AAVD,WAAY,sBAAsB;IACjC;;OAEG;IACH,6FAAmE,CAAA;IAEnE;;OAEG;IACH,uDAA6B,CAAA;AAC9B,CAAC,EAVW,sBAAsB,sCAAtB,sBAAsB,QAUjC;A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YAAY,CAAC,CAAC;IAEpF,+DAA+D;IAC/D,MAAM,YAAY,CAAC;AACpB,CAAC;AATD,sDASC;AAED;;GAEG;AACH,SAAgB,0BAA0B,CACzC,WAA6B,EAC7B,OAAe;IAEf,iDAAiD;IACjD,MAAM,OAAO,GAAG,sBAAsB,OAAO,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC;IACzE,OAAO,sBAAsB,CAAC,OAAO,EAAE,WAAW,CAAC,IAAI,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;AACpF,CAAC;AAPD,gEAOC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tDriverError,\n\tIDriverErrorBase,\n\tDriverErrorTypes,\n} from \"@fluidframework/driver-definitions\";\nimport {\n\tNonRetryableError,\n\tGenericNetworkError,\n\tcreateGenericNetworkError,\n\tAuthorizationError,\n} from \"@fluidframework/driver-utils\";\nimport { IFluidErrorBase } from \"@fluidframework/telemetry-utils\";\nimport { pkgVersion as driverVersion } from \"./packageVersion\";\n\n/**\n * Routerlicious Error types\n * Different error types that may be thrown by the routerlicious driver\n * @internal\n */\nexport const RouterliciousErrorTypes = {\n\t// Inherit base driver error types\n\t...DriverErrorTypes,\n\n\t/**\n\t * SSL Certificate Error.\n\t */\n\tsslCertError: \"sslCertError\",\n} as const;\n/**\n * @internal\n */\nexport type RouterliciousErrorTypes =\n\t(typeof RouterliciousErrorTypes)[keyof typeof RouterliciousErrorTypes];\n\n/**\n * Routerlicious Error types\n * Different error types that may be thrown by the routerlicious driver\n *\n * @deprecated Use {@link (RouterliciousErrorTypes:variable)} instead.\n * @internal\n */\nexport enum RouterliciousErrorType {\n\t/**\n\t * File not found, or file deleted during session\n\t */\n\tfileNotFoundOrAccessDeniedError = \"fileNotFoundOrAccessDeniedError\",\n\n\t/**\n\t * SSL Certificate Error.\n\t */\n\tsslCertError = \"sslCertError\",\n}\n\n/**\n * Interface for error responses for the WebSocket connection\n * Intended to be compatible with output from {@link NetworkError.toJSON}\n */\nexport interface IR11sSocketError {\n\t/**\n\t * An error code number for the error that occurred.\n\t * It will be a valid HTTP status code.\n\t */\n\tcode: number;\n\n\t/**\n\t * A message about the error that occurred for debugging / logging purposes.\n\t * This should not be displayed to the user directly.\n\t */\n\tmessage: string;\n\n\t/**\n\t * Optional Retry-After time in seconds.\n\t * The client should wait this many seconds before retrying its request.\n\t */\n\tretryAfter?: number;\n\n\t/**\n\t * Optional Retry-After time in milliseconds.\n\t * The client should wait this many milliseconds before retrying its request.\n\t */\n\tretryAfterMs?: number;\n}\n\nexport interface IR11sError extends Omit<IDriverErrorBase, \"errorType\"> {\n\treadonly errorType: RouterliciousErrorType;\n}\n\nexport type R11sError = DriverError | IR11sError;\n\nexport function createR11sNetworkError(\n\terrorMessage: string,\n\tstatusCode: number,\n\tretryAfterMs?: number,\n): IFluidErrorBase & R11sError {\n\tlet error: IFluidErrorBase & R11sError;\n\tconst props = { statusCode, driverVersion };\n\tswitch (statusCode) {\n\t\tcase 401:\n\t\t// The first 401 is manually retried in RouterliciousRestWrapper with a refreshed token,\n\t\t// so we treat repeat 401s the same as 403.\n\t\tcase 403:\n\t\t\terror = new AuthorizationError(errorMessage, undefined, undefined, props);\n\t\t\tbreak;\n\t\tcase 404:\n\t\t\tconst errorType = RouterliciousErrorType.fileNotFoundOrAccessDeniedError;\n\t\t\terror = new NonRetryableError(errorMessage, errorType, props);\n\t\t\tbreak;\n\t\tcase 429:\n\t\t\terror = createGenericNetworkError(\n\t\t\t\terrorMessage,\n\t\t\t\t{ canRetry: true, retryAfterMs },\n\t\t\t\tprops,\n\t\t\t);\n\t\t\tbreak;\n\t\tcase 500:\n\t\tcase 502:\n\t\t\terror = new GenericNetworkError(errorMessage, true, props);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tconst retryInfo = { canRetry: retryAfterMs !== undefined, retryAfterMs };\n\t\t\terror = createGenericNetworkError(errorMessage, retryInfo, props);\n\t\t\tbreak;\n\t}\n\terror.addTelemetryProperties({ endpointReached: true });\n\treturn error;\n}\n\nexport function throwR11sNetworkError(\n\terrorMessage: string,\n\tstatusCode: number,\n\tretryAfterMs?: number,\n): never {\n\tconst networkError = createR11sNetworkError(errorMessage, statusCode, retryAfterMs);\n\n\t// eslint-disable-next-line @typescript-eslint/no-throw-literal\n\tthrow networkError;\n}\n\n/**\n * Returns network error based on error object from R11s socket (IR11sSocketError)\n */\nexport function errorObjectFromSocketError(\n\tsocketError: IR11sSocketError,\n\thandler: string,\n): R11sError {\n\t// pre-0.58 error message prefix: R11sSocketError\n\tconst message = `R11s socket error (${handler}): ${socketError.message}`;\n\treturn createR11sNetworkError(message, socketError.code, socketError.retryAfterMs);\n}\n"]}
@@ -2,9 +2,57 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { DriverError } from "@fluidframework/driver-definitions";
6
- export declare enum R11sErrorType {
7
- fileNotFoundOrAccessDeniedError = "fileNotFoundOrAccessDeniedError"
5
+ import { DriverError, IDriverErrorBase } from "@fluidframework/driver-definitions";
6
+ import { IFluidErrorBase } from "@fluidframework/telemetry-utils";
7
+ /**
8
+ * Routerlicious Error types
9
+ * Different error types that may be thrown by the routerlicious driver
10
+ * @internal
11
+ */
12
+ export declare const RouterliciousErrorTypes: {
13
+ /**
14
+ * SSL Certificate Error.
15
+ */
16
+ readonly sslCertError: "sslCertError";
17
+ readonly genericNetworkError: "genericNetworkError";
18
+ readonly authorizationError: "authorizationError";
19
+ readonly fileNotFoundOrAccessDeniedError: "fileNotFoundOrAccessDeniedError";
20
+ readonly offlineError: "offlineError";
21
+ readonly unsupportedClientProtocolVersion: "unsupportedClientProtocolVersion";
22
+ readonly writeError: "writeError";
23
+ readonly fetchFailure: "fetchFailure";
24
+ readonly fetchTokenError: "fetchTokenError";
25
+ readonly incorrectServerResponse: "incorrectServerResponse";
26
+ readonly fileOverwrittenInStorage: "fileOverwrittenInStorage";
27
+ readonly deltaStreamConnectionForbidden: "deltaStreamConnectionForbidden";
28
+ readonly locationRedirection: "locationRedirection";
29
+ readonly fluidInvalidSchema: "fluidInvalidSchema";
30
+ readonly fileIsLocked: "fileIsLocked";
31
+ readonly outOfStorageError: "outOfStorageError";
32
+ readonly genericError: "genericError";
33
+ readonly throttlingError: "throttlingError";
34
+ readonly usageError: "usageError";
35
+ };
36
+ /**
37
+ * @internal
38
+ */
39
+ export type RouterliciousErrorTypes = (typeof RouterliciousErrorTypes)[keyof typeof RouterliciousErrorTypes];
40
+ /**
41
+ * Routerlicious Error types
42
+ * Different error types that may be thrown by the routerlicious driver
43
+ *
44
+ * @deprecated Use {@link (RouterliciousErrorTypes:variable)} instead.
45
+ * @internal
46
+ */
47
+ export declare enum RouterliciousErrorType {
48
+ /**
49
+ * File not found, or file deleted during session
50
+ */
51
+ fileNotFoundOrAccessDeniedError = "fileNotFoundOrAccessDeniedError",
52
+ /**
53
+ * SSL Certificate Error.
54
+ */
55
+ sslCertError = "sslCertError"
8
56
  }
9
57
  /**
10
58
  * Interface for error responses for the WebSocket connection
@@ -32,14 +80,12 @@ export interface IR11sSocketError {
32
80
  */
33
81
  retryAfterMs?: number;
34
82
  }
35
- export interface IR11sError {
36
- readonly errorType: R11sErrorType;
37
- readonly message: string;
38
- canRetry: boolean;
83
+ export interface IR11sError extends Omit<IDriverErrorBase, "errorType"> {
84
+ readonly errorType: RouterliciousErrorType;
39
85
  }
40
- export declare type R11sError = DriverError | IR11sError;
41
- export declare function createR11sNetworkError(errorMessage: string, statusCode?: number, retryAfterMs?: number): R11sError;
42
- export declare function throwR11sNetworkError(errorMessage: string, statusCode?: number, retryAfterMs?: number): never;
86
+ export type R11sError = DriverError | IR11sError;
87
+ export declare function createR11sNetworkError(errorMessage: string, statusCode: number, retryAfterMs?: number): IFluidErrorBase & R11sError;
88
+ export declare function throwR11sNetworkError(errorMessage: string, statusCode: number, retryAfterMs?: number): never;
43
89
  /**
44
90
  * Returns network error based on error object from R11s socket (IR11sSocketError)
45
91
  */
@@ -1 +1 @@
1
- {"version":3,"file":"errorUtils.d.ts","sourceRoot":"","sources":["../src/errorUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AASjE,oBAAY,aAAa;IACrB,+BAA+B,oCAAoC;CACtE;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,UAAU;IACvB,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,oBAAY,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;AAEjD,wBAAgB,sBAAsB,CAClC,YAAY,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM,EACnB,YAAY,CAAC,EAAE,MAAM,GACtB,SAAS,CA4BX;AAED,wBAAgB,qBAAqB,CACjC,YAAY,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM,EACnB,YAAY,CAAC,EAAE,MAAM,GACtB,KAAK,CAQP;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,CAQpG"}
1
+ {"version":3,"file":"errorUtils.d.ts","sourceRoot":"","sources":["../src/errorUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,WAAW,EACX,gBAAgB,EAEhB,MAAM,oCAAoC,CAAC;AAO5C,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGlE;;;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