@fluidframework/container-loader 1.4.0-121020 → 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 (333) hide show
  1. package/.eslintrc.js +18 -21
  2. package/.mocharc.js +12 -0
  3. package/CHANGELOG.md +364 -0
  4. package/README.md +152 -56
  5. package/api-extractor-lint.json +4 -0
  6. package/api-extractor.json +2 -2
  7. package/api-report/container-loader.api.md +143 -0
  8. package/dist/{audience.js → audience.cjs} +15 -13
  9. package/dist/audience.cjs.map +1 -0
  10. package/dist/audience.d.ts +4 -6
  11. package/dist/audience.d.ts.map +1 -1
  12. package/dist/catchUpMonitor.cjs +43 -0
  13. package/dist/catchUpMonitor.cjs.map +1 -0
  14. package/dist/catchUpMonitor.d.ts +29 -0
  15. package/dist/catchUpMonitor.d.ts.map +1 -0
  16. package/dist/{connectionManager.js → connectionManager.cjs} +397 -240
  17. package/dist/connectionManager.cjs.map +1 -0
  18. package/dist/connectionManager.d.ts +23 -33
  19. package/dist/connectionManager.d.ts.map +1 -1
  20. package/dist/{connectionState.js → connectionState.cjs} +5 -7
  21. package/dist/connectionState.cjs.map +1 -0
  22. package/dist/connectionState.d.ts +3 -5
  23. package/dist/connectionState.d.ts.map +1 -1
  24. package/dist/connectionStateHandler.cjs +474 -0
  25. package/dist/connectionStateHandler.cjs.map +1 -0
  26. package/dist/connectionStateHandler.d.ts +127 -29
  27. package/dist/connectionStateHandler.d.ts.map +1 -1
  28. package/dist/container-loader-alpha.d.ts +274 -0
  29. package/dist/container-loader-beta.d.ts +75 -0
  30. package/dist/container-loader-public.d.ts +75 -0
  31. package/dist/container-loader-untrimmed.d.ts +331 -0
  32. package/dist/container.cjs +1585 -0
  33. package/dist/container.cjs.map +1 -0
  34. package/dist/container.d.ts +227 -83
  35. package/dist/container.d.ts.map +1 -1
  36. package/dist/containerContext.cjs +74 -0
  37. package/dist/containerContext.cjs.map +1 -0
  38. package/dist/containerContext.d.ts +33 -59
  39. package/dist/containerContext.d.ts.map +1 -1
  40. package/dist/containerStorageAdapter.cjs +234 -0
  41. package/dist/containerStorageAdapter.cjs.map +1 -0
  42. package/dist/containerStorageAdapter.d.ts +48 -23
  43. package/dist/containerStorageAdapter.d.ts.map +1 -1
  44. package/dist/{contracts.js → contracts.cjs} +5 -5
  45. package/dist/contracts.cjs.map +1 -0
  46. package/dist/contracts.d.ts +45 -17
  47. package/dist/contracts.d.ts.map +1 -1
  48. package/dist/debugLogger.cjs +101 -0
  49. package/dist/debugLogger.cjs.map +1 -0
  50. package/dist/debugLogger.d.ts +30 -0
  51. package/dist/debugLogger.d.ts.map +1 -0
  52. package/dist/{deltaManager.js → deltaManager.cjs} +379 -186
  53. package/dist/deltaManager.cjs.map +1 -0
  54. package/dist/deltaManager.d.ts +54 -18
  55. package/dist/deltaManager.d.ts.map +1 -1
  56. package/dist/{deltaQueue.js → deltaQueue.cjs} +29 -28
  57. package/dist/deltaQueue.cjs.map +1 -0
  58. package/dist/deltaQueue.d.ts +3 -4
  59. package/dist/deltaQueue.d.ts.map +1 -1
  60. package/dist/disposal.cjs +25 -0
  61. package/dist/disposal.cjs.map +1 -0
  62. package/dist/disposal.d.ts +13 -0
  63. package/dist/disposal.d.ts.map +1 -0
  64. package/dist/error.cjs +32 -0
  65. package/dist/error.cjs.map +1 -0
  66. package/dist/error.d.ts +23 -0
  67. package/dist/error.d.ts.map +1 -0
  68. package/dist/index.cjs +19 -0
  69. package/dist/index.cjs.map +1 -0
  70. package/dist/index.d.ts +5 -2
  71. package/dist/index.d.ts.map +1 -1
  72. package/dist/loader.cjs +148 -0
  73. package/dist/loader.cjs.map +1 -0
  74. package/dist/loader.d.ts +38 -19
  75. package/dist/loader.d.ts.map +1 -1
  76. package/dist/location-redirection-utilities/index.cjs +11 -0
  77. package/dist/location-redirection-utilities/index.cjs.map +1 -0
  78. package/dist/location-redirection-utilities/index.d.ts +6 -0
  79. package/dist/location-redirection-utilities/index.d.ts.map +1 -0
  80. package/dist/location-redirection-utilities/resolveWithLocationRedirection.cjs +53 -0
  81. package/dist/location-redirection-utilities/resolveWithLocationRedirection.cjs.map +1 -0
  82. package/dist/location-redirection-utilities/resolveWithLocationRedirection.d.ts +24 -0
  83. package/dist/location-redirection-utilities/resolveWithLocationRedirection.d.ts.map +1 -0
  84. package/dist/{collabWindowTracker.js → noopHeuristic.cjs} +37 -39
  85. package/dist/noopHeuristic.cjs.map +1 -0
  86. package/dist/noopHeuristic.d.ts +23 -0
  87. package/dist/noopHeuristic.d.ts.map +1 -0
  88. package/dist/{packageVersion.js → packageVersion.cjs} +2 -2
  89. package/dist/packageVersion.cjs.map +1 -0
  90. package/dist/packageVersion.d.ts +1 -1
  91. package/dist/packageVersion.d.ts.map +1 -1
  92. package/dist/protocol.cjs +99 -0
  93. package/dist/protocol.cjs.map +1 -0
  94. package/dist/protocol.d.ts +38 -0
  95. package/dist/protocol.d.ts.map +1 -0
  96. package/dist/{protocolTreeDocumentStorageService.js → protocolTreeDocumentStorageService.cjs} +8 -5
  97. package/dist/protocolTreeDocumentStorageService.cjs.map +1 -0
  98. package/dist/protocolTreeDocumentStorageService.d.ts +8 -4
  99. package/dist/protocolTreeDocumentStorageService.d.ts.map +1 -1
  100. package/dist/quorum.cjs +16 -0
  101. package/dist/quorum.cjs.map +1 -0
  102. package/dist/quorum.d.ts +1 -14
  103. package/dist/quorum.d.ts.map +1 -1
  104. package/dist/{retriableDocumentStorageService.js → retriableDocumentStorageService.cjs} +36 -21
  105. package/dist/retriableDocumentStorageService.cjs.map +1 -0
  106. package/dist/retriableDocumentStorageService.d.ts +7 -5
  107. package/dist/retriableDocumentStorageService.d.ts.map +1 -1
  108. package/dist/tsdoc-metadata.json +11 -0
  109. package/dist/{utils.js → utils.cjs} +52 -14
  110. package/dist/utils.cjs.map +1 -0
  111. package/dist/utils.d.ts +34 -1
  112. package/dist/utils.d.ts.map +1 -1
  113. package/lib/{audience.d.ts → audience.d.mts} +4 -10
  114. package/lib/audience.d.mts.map +1 -0
  115. package/lib/{audience.js → audience.mjs} +15 -17
  116. package/lib/audience.mjs.map +1 -0
  117. package/lib/catchUpMonitor.d.mts +29 -0
  118. package/lib/catchUpMonitor.d.mts.map +1 -0
  119. package/lib/catchUpMonitor.mjs +39 -0
  120. package/lib/catchUpMonitor.mjs.map +1 -0
  121. package/lib/{connectionManager.d.ts → connectionManager.d.mts} +23 -33
  122. package/lib/connectionManager.d.mts.map +1 -0
  123. package/lib/{connectionManager.js → connectionManager.mjs} +378 -218
  124. package/lib/connectionManager.mjs.map +1 -0
  125. package/lib/{connectionState.d.ts → connectionState.d.mts} +3 -5
  126. package/lib/connectionState.d.mts.map +1 -0
  127. package/lib/{connectionState.js → connectionState.mjs} +4 -6
  128. package/lib/connectionState.mjs.map +1 -0
  129. package/lib/connectionStateHandler.d.mts +179 -0
  130. package/lib/connectionStateHandler.d.mts.map +1 -0
  131. package/lib/connectionStateHandler.mjs +469 -0
  132. package/lib/connectionStateHandler.mjs.map +1 -0
  133. package/lib/container-loader-alpha.d.mts +274 -0
  134. package/lib/container-loader-beta.d.mts +75 -0
  135. package/lib/container-loader-public.d.mts +75 -0
  136. package/lib/container-loader-untrimmed.d.mts +331 -0
  137. package/lib/container.d.mts +382 -0
  138. package/lib/container.d.mts.map +1 -0
  139. package/lib/container.mjs +1579 -0
  140. package/lib/container.mjs.map +1 -0
  141. package/lib/containerContext.d.mts +58 -0
  142. package/lib/containerContext.d.mts.map +1 -0
  143. package/lib/containerContext.mjs +70 -0
  144. package/lib/containerContext.mjs.map +1 -0
  145. package/lib/containerStorageAdapter.d.mts +73 -0
  146. package/lib/containerStorageAdapter.d.mts.map +1 -0
  147. package/lib/containerStorageAdapter.mjs +228 -0
  148. package/lib/containerStorageAdapter.mjs.map +1 -0
  149. package/lib/{contracts.d.ts → contracts.d.mts} +45 -17
  150. package/lib/contracts.d.mts.map +1 -0
  151. package/lib/{contracts.js → contracts.mjs} +4 -4
  152. package/lib/contracts.mjs.map +1 -0
  153. package/lib/debugLogger.d.mts +30 -0
  154. package/lib/debugLogger.d.mts.map +1 -0
  155. package/lib/debugLogger.mjs +93 -0
  156. package/lib/debugLogger.mjs.map +1 -0
  157. package/lib/{deltaManager.d.ts → deltaManager.d.mts} +54 -18
  158. package/lib/deltaManager.d.mts.map +1 -0
  159. package/lib/{deltaManager.js → deltaManager.mjs} +361 -165
  160. package/lib/deltaManager.mjs.map +1 -0
  161. package/lib/{deltaQueue.d.ts → deltaQueue.d.mts} +3 -4
  162. package/lib/deltaQueue.d.mts.map +1 -0
  163. package/lib/{deltaQueue.js → deltaQueue.mjs} +25 -24
  164. package/lib/deltaQueue.mjs.map +1 -0
  165. package/lib/disposal.d.mts +13 -0
  166. package/lib/disposal.d.mts.map +1 -0
  167. package/lib/disposal.mjs +21 -0
  168. package/lib/disposal.mjs.map +1 -0
  169. package/lib/error.d.mts +23 -0
  170. package/lib/error.d.mts.map +1 -0
  171. package/lib/error.mjs +28 -0
  172. package/lib/error.mjs.map +1 -0
  173. package/lib/index.d.mts +11 -0
  174. package/lib/index.d.mts.map +1 -0
  175. package/lib/index.mjs +10 -0
  176. package/lib/index.mjs.map +1 -0
  177. package/lib/{loader.d.ts → loader.d.mts} +39 -20
  178. package/lib/loader.d.mts.map +1 -0
  179. package/lib/loader.mjs +143 -0
  180. package/lib/loader.mjs.map +1 -0
  181. package/lib/location-redirection-utilities/index.d.mts +6 -0
  182. package/lib/location-redirection-utilities/index.d.mts.map +1 -0
  183. package/lib/location-redirection-utilities/index.mjs +6 -0
  184. package/lib/location-redirection-utilities/index.mjs.map +1 -0
  185. package/lib/location-redirection-utilities/resolveWithLocationRedirection.d.mts +24 -0
  186. package/lib/location-redirection-utilities/resolveWithLocationRedirection.d.mts.map +1 -0
  187. package/lib/location-redirection-utilities/resolveWithLocationRedirection.mjs +48 -0
  188. package/lib/location-redirection-utilities/resolveWithLocationRedirection.mjs.map +1 -0
  189. package/lib/noopHeuristic.d.mts +23 -0
  190. package/lib/noopHeuristic.d.mts.map +1 -0
  191. package/lib/{collabWindowTracker.js → noopHeuristic.mjs} +33 -35
  192. package/lib/noopHeuristic.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/protocol.d.mts +38 -0
  198. package/lib/protocol.d.mts.map +1 -0
  199. package/lib/protocol.mjs +94 -0
  200. package/lib/protocol.mjs.map +1 -0
  201. package/lib/{protocolTreeDocumentStorageService.d.ts → protocolTreeDocumentStorageService.d.mts} +8 -4
  202. package/lib/protocolTreeDocumentStorageService.d.mts.map +1 -0
  203. package/lib/{protocolTreeDocumentStorageService.js → protocolTreeDocumentStorageService.mjs} +8 -5
  204. package/lib/protocolTreeDocumentStorageService.mjs.map +1 -0
  205. package/lib/quorum.d.mts +4 -0
  206. package/lib/quorum.d.mts.map +1 -0
  207. package/lib/quorum.mjs +12 -0
  208. package/lib/quorum.mjs.map +1 -0
  209. package/lib/{retriableDocumentStorageService.d.ts → retriableDocumentStorageService.d.mts} +7 -5
  210. package/lib/retriableDocumentStorageService.d.mts.map +1 -0
  211. package/lib/{retriableDocumentStorageService.js → retriableDocumentStorageService.mjs} +35 -20
  212. package/lib/retriableDocumentStorageService.mjs.map +1 -0
  213. package/lib/utils.d.mts +67 -0
  214. package/lib/utils.d.mts.map +1 -0
  215. package/lib/{utils.js → utils.mjs} +47 -11
  216. package/lib/utils.mjs.map +1 -0
  217. package/package.json +163 -70
  218. package/prettier.config.cjs +8 -0
  219. package/src/audience.ts +59 -49
  220. package/src/catchUpMonitor.ts +61 -0
  221. package/src/connectionManager.ts +1154 -910
  222. package/src/connectionState.ts +22 -25
  223. package/src/connectionStateHandler.ts +689 -319
  224. package/src/container.ts +2476 -1792
  225. package/src/containerContext.ts +98 -330
  226. package/src/containerStorageAdapter.ts +301 -105
  227. package/src/contracts.ts +184 -146
  228. package/src/debugLogger.ts +123 -0
  229. package/src/deltaManager.ts +1165 -900
  230. package/src/deltaQueue.ts +156 -152
  231. package/src/disposal.ts +25 -0
  232. package/src/error.ts +44 -0
  233. package/src/index.ts +14 -15
  234. package/src/loader.ts +356 -427
  235. package/src/location-redirection-utilities/index.ts +9 -0
  236. package/src/location-redirection-utilities/resolveWithLocationRedirection.ts +61 -0
  237. package/src/noopHeuristic.ts +107 -0
  238. package/src/packageVersion.ts +1 -1
  239. package/src/protocol.ts +150 -0
  240. package/src/protocolTreeDocumentStorageService.ts +35 -35
  241. package/src/quorum.ts +11 -50
  242. package/src/retriableDocumentStorageService.ts +135 -95
  243. package/src/utils.ts +159 -86
  244. package/tsc-multi.test.json +4 -0
  245. package/tsconfig.json +10 -12
  246. package/dist/audience.js.map +0 -1
  247. package/dist/collabWindowTracker.d.ts +0 -19
  248. package/dist/collabWindowTracker.d.ts.map +0 -1
  249. package/dist/collabWindowTracker.js.map +0 -1
  250. package/dist/connectionManager.js.map +0 -1
  251. package/dist/connectionState.js.map +0 -1
  252. package/dist/connectionStateHandler.js +0 -280
  253. package/dist/connectionStateHandler.js.map +0 -1
  254. package/dist/container.js +0 -1284
  255. package/dist/container.js.map +0 -1
  256. package/dist/containerContext.js +0 -217
  257. package/dist/containerContext.js.map +0 -1
  258. package/dist/containerStorageAdapter.js +0 -104
  259. package/dist/containerStorageAdapter.js.map +0 -1
  260. package/dist/contracts.js.map +0 -1
  261. package/dist/deltaManager.js.map +0 -1
  262. package/dist/deltaManagerProxy.d.ts +0 -54
  263. package/dist/deltaManagerProxy.d.ts.map +0 -1
  264. package/dist/deltaManagerProxy.js +0 -115
  265. package/dist/deltaManagerProxy.js.map +0 -1
  266. package/dist/deltaQueue.js.map +0 -1
  267. package/dist/index.js +0 -16
  268. package/dist/index.js.map +0 -1
  269. package/dist/loader.js +0 -241
  270. package/dist/loader.js.map +0 -1
  271. package/dist/packageVersion.js.map +0 -1
  272. package/dist/protocolTreeDocumentStorageService.js.map +0 -1
  273. package/dist/quorum.js +0 -44
  274. package/dist/quorum.js.map +0 -1
  275. package/dist/retriableDocumentStorageService.js.map +0 -1
  276. package/dist/utils.js.map +0 -1
  277. package/lib/audience.d.ts.map +0 -1
  278. package/lib/audience.js.map +0 -1
  279. package/lib/collabWindowTracker.d.ts +0 -19
  280. package/lib/collabWindowTracker.d.ts.map +0 -1
  281. package/lib/collabWindowTracker.js.map +0 -1
  282. package/lib/connectionManager.d.ts.map +0 -1
  283. package/lib/connectionManager.js.map +0 -1
  284. package/lib/connectionState.d.ts.map +0 -1
  285. package/lib/connectionState.js.map +0 -1
  286. package/lib/connectionStateHandler.d.ts +0 -81
  287. package/lib/connectionStateHandler.d.ts.map +0 -1
  288. package/lib/connectionStateHandler.js +0 -276
  289. package/lib/connectionStateHandler.js.map +0 -1
  290. package/lib/container.d.ts +0 -238
  291. package/lib/container.d.ts.map +0 -1
  292. package/lib/container.js +0 -1276
  293. package/lib/container.js.map +0 -1
  294. package/lib/containerContext.d.ts +0 -84
  295. package/lib/containerContext.d.ts.map +0 -1
  296. package/lib/containerContext.js +0 -213
  297. package/lib/containerContext.js.map +0 -1
  298. package/lib/containerStorageAdapter.d.ts +0 -48
  299. package/lib/containerStorageAdapter.d.ts.map +0 -1
  300. package/lib/containerStorageAdapter.js +0 -99
  301. package/lib/containerStorageAdapter.js.map +0 -1
  302. package/lib/contracts.d.ts.map +0 -1
  303. package/lib/contracts.js.map +0 -1
  304. package/lib/deltaManager.d.ts.map +0 -1
  305. package/lib/deltaManager.js.map +0 -1
  306. package/lib/deltaManagerProxy.d.ts +0 -54
  307. package/lib/deltaManagerProxy.d.ts.map +0 -1
  308. package/lib/deltaManagerProxy.js +0 -110
  309. package/lib/deltaManagerProxy.js.map +0 -1
  310. package/lib/deltaQueue.d.ts.map +0 -1
  311. package/lib/deltaQueue.js.map +0 -1
  312. package/lib/index.d.ts +0 -8
  313. package/lib/index.d.ts.map +0 -1
  314. package/lib/index.js +0 -8
  315. package/lib/index.js.map +0 -1
  316. package/lib/loader.d.ts.map +0 -1
  317. package/lib/loader.js +0 -236
  318. package/lib/loader.js.map +0 -1
  319. package/lib/packageVersion.js.map +0 -1
  320. package/lib/protocolTreeDocumentStorageService.d.ts.map +0 -1
  321. package/lib/protocolTreeDocumentStorageService.js.map +0 -1
  322. package/lib/quorum.d.ts +0 -21
  323. package/lib/quorum.d.ts.map +0 -1
  324. package/lib/quorum.js +0 -38
  325. package/lib/quorum.js.map +0 -1
  326. package/lib/retriableDocumentStorageService.d.ts.map +0 -1
  327. package/lib/retriableDocumentStorageService.js.map +0 -1
  328. package/lib/utils.d.ts +0 -34
  329. package/lib/utils.d.ts.map +0 -1
  330. package/lib/utils.js.map +0 -1
  331. package/src/collabWindowTracker.ts +0 -102
  332. package/src/deltaManagerProxy.ts +0 -158
  333. package/tsconfig.esnext.json +0 -7
@@ -0,0 +1,274 @@
1
+ import { FluidObject } from '@fluidframework/core-interfaces';
2
+ import { IAudienceOwner } from '@fluidframework/container-definitions';
3
+ import { IClientDetails } from '@fluidframework/protocol-definitions';
4
+ import { IConfigProviderBase } from '@fluidframework/core-interfaces';
5
+ import { IContainer } from '@fluidframework/container-definitions';
6
+ import { IDocumentAttributes } from '@fluidframework/protocol-definitions';
7
+ import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
8
+ import { IDocumentStorageService } from '@fluidframework/driver-definitions';
9
+ import { IFluidCodeDetails } from '@fluidframework/container-definitions';
10
+ import { IFluidModule } from '@fluidframework/container-definitions';
11
+ import { IHostLoader } from '@fluidframework/container-definitions';
12
+ import { ILoaderOptions as ILoaderOptions_2 } from '@fluidframework/container-definitions';
13
+ import { ILocationRedirectionError } from '@fluidframework/driver-definitions';
14
+ import { IProtocolHandler as IProtocolHandler_2 } from '@fluidframework/protocol-base';
15
+ import { IProvideFluidCodeDetailsComparer } from '@fluidframework/container-definitions';
16
+ import { IQuorumSnapshot } from '@fluidframework/protocol-base';
17
+ import { IRequest } from '@fluidframework/core-interfaces';
18
+ import { ISignalMessage } from '@fluidframework/protocol-definitions';
19
+ import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
20
+ import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
21
+ import { IUrlResolver } from '@fluidframework/driver-definitions';
22
+
23
+ /**
24
+ * @alpha
25
+ */
26
+ export declare enum ConnectionState {
27
+ /**
28
+ * The container is not connected to the ordering service
29
+ * Note - When in this state the container may be about to reconnect,
30
+ * or may remain disconnected until explicitly told to connect.
31
+ */
32
+ Disconnected = 0,
33
+ /**
34
+ * The container is disconnected but actively trying to establish a new connection
35
+ * PLEASE NOTE that this numerical value falls out of the order you may expect for this state
36
+ */
37
+ EstablishingConnection = 3,
38
+ /**
39
+ * The container has an inbound connection only, and is catching up to the latest known state from the service.
40
+ */
41
+ CatchingUp = 1,
42
+ /**
43
+ * The container is fully connected and syncing
44
+ */
45
+ Connected = 2
46
+ }
47
+
48
+ /**
49
+ * @deprecated ICodeDetailsLoader interface is moved to {@link @fluidframework/container-definition#ICodeDetailsLoader}
50
+ * to have code loading modules in one package. #8193
51
+ * Fluid code loader resolves a code module matching the document schema, i.e. code details, such as
52
+ * a package name and package version range.
53
+ * @alpha
54
+ */
55
+ export declare interface ICodeDetailsLoader extends Partial<IProvideFluidCodeDetailsComparer> {
56
+ /**
57
+ * Load the code module (package) that is capable to interact with the document.
58
+ *
59
+ * @param source - Code proposal that articulates the current schema the document is written in.
60
+ * @returns Code module entry point along with the code details associated with it.
61
+ */
62
+ load(source: IFluidCodeDetails): Promise<IFluidModuleWithDetails>;
63
+ }
64
+
65
+ /* Excluded from this release type: IContainerExperimental */
66
+
67
+ /**
68
+ * Subset of IDocumentStorageService which only supports createBlob() and readBlob(). This is used to support
69
+ * blobs in detached containers.
70
+ * @alpha
71
+ */
72
+ export declare type IDetachedBlobStorage = Pick<IDocumentStorageService, "createBlob" | "readBlob"> & {
73
+ size: number;
74
+ /**
75
+ * Return an array of all blob IDs present in storage
76
+ */
77
+ getBlobIds(): string[];
78
+ };
79
+
80
+ /**
81
+ * @deprecated IFluidModuleWithDetails interface is moved to
82
+ * {@link @fluidframework/container-definitions#IFluidModuleWithDetails}
83
+ * to have all the code loading modules in one package. #8193
84
+ * Encapsulates a module entry point with corresponding code details.
85
+ * @alpha
86
+ */
87
+ export declare interface IFluidModuleWithDetails {
88
+ /** Fluid code module that implements the runtime factory needed to instantiate the container runtime. */
89
+ module: IFluidModule;
90
+ /**
91
+ * Code details associated with the module. Represents a document schema this module supports.
92
+ * If the code loader implements the {@link @fluidframework/core-interfaces#IFluidCodeDetailsComparer} interface,
93
+ * it'll be called to determine whether the module code details satisfy the new code proposal in the quorum.
94
+ */
95
+ details: IFluidCodeDetails;
96
+ }
97
+
98
+ /**
99
+ * @alpha
100
+ */
101
+ export declare interface ILoaderOptions extends ILoaderOptions_2 {
102
+ summarizeProtocolTree?: boolean;
103
+ }
104
+
105
+ /**
106
+ * Services and properties necessary for creating a loader
107
+ * @alpha
108
+ */
109
+ export declare interface ILoaderProps {
110
+ /**
111
+ * The url resolver used by the loader for resolving external urls
112
+ * into Fluid urls such that the container specified by the
113
+ * external url can be loaded.
114
+ */
115
+ readonly urlResolver: IUrlResolver;
116
+ /**
117
+ * The document service factory take the Fluid url provided
118
+ * by the resolved url and constructs all the necessary services
119
+ * for communication with the container's server.
120
+ */
121
+ readonly documentServiceFactory: IDocumentServiceFactory;
122
+ /**
123
+ * The code loader handles loading the necessary code
124
+ * for running a container once it is loaded.
125
+ */
126
+ readonly codeLoader: ICodeDetailsLoader;
127
+ /**
128
+ * A property bag of options used by various layers
129
+ * to control features
130
+ */
131
+ readonly options?: ILoaderOptions;
132
+ /**
133
+ * Scope is provided to all container and is a set of shared
134
+ * services for container's to integrate with their host environment.
135
+ */
136
+ readonly scope?: FluidObject;
137
+ /**
138
+ * The logger that all telemetry should be pushed to.
139
+ */
140
+ readonly logger?: ITelemetryBaseLogger;
141
+ /**
142
+ * Blobs storage for detached containers.
143
+ */
144
+ readonly detachedBlobStorage?: IDetachedBlobStorage;
145
+ /**
146
+ * The configuration provider which may be used to control features.
147
+ */
148
+ readonly configProvider?: IConfigProviderBase;
149
+ /**
150
+ * Optional property for allowing the container to use a custom
151
+ * protocol implementation for handling the quorum and/or the audience.
152
+ */
153
+ readonly protocolHandlerBuilder?: ProtocolHandlerBuilder;
154
+ }
155
+
156
+ /**
157
+ * Services and properties used by and exposed by the loader
158
+ * @alpha
159
+ */
160
+ export declare interface ILoaderServices {
161
+ /**
162
+ * The url resolver used by the loader for resolving external urls
163
+ * into Fluid urls such that the container specified by the
164
+ * external url can be loaded.
165
+ */
166
+ readonly urlResolver: IUrlResolver;
167
+ /**
168
+ * The document service factory take the Fluid url provided
169
+ * by the resolved url and constructs all the necessary services
170
+ * for communication with the container's server.
171
+ */
172
+ readonly documentServiceFactory: IDocumentServiceFactory;
173
+ /**
174
+ * The code loader handles loading the necessary code
175
+ * for running a container once it is loaded.
176
+ */
177
+ readonly codeLoader: ICodeDetailsLoader;
178
+ /**
179
+ * A property bag of options used by various layers
180
+ * to control features
181
+ */
182
+ readonly options: ILoaderOptions;
183
+ /**
184
+ * Scope is provided to all container and is a set of shared
185
+ * services for container's to integrate with their host environment.
186
+ */
187
+ readonly scope: FluidObject;
188
+ /**
189
+ * The logger downstream consumers should construct their loggers from
190
+ */
191
+ readonly subLogger: ITelemetryLoggerExt;
192
+ /**
193
+ * Blobs storage for detached containers.
194
+ */
195
+ readonly detachedBlobStorage?: IDetachedBlobStorage;
196
+ /**
197
+ * Optional property for allowing the container to use a custom
198
+ * protocol implementation for handling the quorum and/or the audience.
199
+ */
200
+ readonly protocolHandlerBuilder?: ProtocolHandlerBuilder;
201
+ }
202
+
203
+ /* Excluded from this release type: IParsedUrl */
204
+
205
+ /**
206
+ * @alpha
207
+ */
208
+ export declare interface IProtocolHandler extends IProtocolHandler_2 {
209
+ readonly audience: IAudienceOwner;
210
+ processSignal(message: ISignalMessage): any;
211
+ }
212
+
213
+ /* Excluded from this release type: isLocationRedirectionError */
214
+
215
+ /**
216
+ * Manages Fluid resource loading
217
+ * @alpha
218
+ */
219
+ export declare class Loader implements IHostLoader {
220
+ readonly services: ILoaderServices;
221
+ private readonly mc;
222
+ constructor(loaderProps: ILoaderProps);
223
+ createDetachedContainer(codeDetails: IFluidCodeDetails, createDetachedProps?: {
224
+ canReconnect?: boolean;
225
+ clientDetailsOverride?: IClientDetails;
226
+ }): Promise<IContainer>;
227
+ rehydrateDetachedContainerFromSnapshot(snapshot: string, createDetachedProps?: {
228
+ canReconnect?: boolean;
229
+ clientDetailsOverride?: IClientDetails;
230
+ }): Promise<IContainer>;
231
+ resolve(request: IRequest, pendingLocalState?: string): Promise<IContainer>;
232
+ private resolveCore;
233
+ private loadContainer;
234
+ }
235
+
236
+ /**
237
+ * Function to be used for creating a protocol handler.
238
+ * @alpha
239
+ */
240
+ export declare type ProtocolHandlerBuilder = (attributes: IDocumentAttributes, snapshot: IQuorumSnapshot, sendProposal: (key: string, value: any) => number) => IProtocolHandler;
241
+
242
+ /**
243
+ * Handles location redirection while fulfilling the loader request.
244
+ * @param api - Callback in which user can wrap the loader.resolve or loader.request call.
245
+ * @param request - request to be resolved.
246
+ * @param urlResolver - resolver used to resolve the url.
247
+ * @param logger - logger to send events.
248
+ * @returns Response from the API call.
249
+ * @alpha
250
+ */
251
+ export declare function resolveWithLocationRedirectionHandling<T>(api: (request: IRequest) => Promise<T>, request: IRequest, urlResolver: IUrlResolver, logger?: ITelemetryBaseLogger): Promise<T>;
252
+
253
+ /* Excluded from this release type: tryParseCompatibleResolvedUrl */
254
+
255
+ /**
256
+ * Waits until container connects to delta storage and gets up-to-date.
257
+ *
258
+ * Useful when resolving URIs and hitting 404, due to container being loaded from (stale) snapshot and not being
259
+ * up to date. Host may chose to wait in such case and retry resolving URI.
260
+ *
261
+ * Warning: Will wait infinitely for connection to establish if there is no connection.
262
+ * May result in deadlock if Container.disconnect() is called and never followed by a call to Container.connect().
263
+ *
264
+ * @returns `true`: container is up to date, it processed all the ops that were know at the time of first connection.
265
+ *
266
+ * `false`: storage does not provide indication of how far the client is. Container processed all the ops known to it,
267
+ * but it maybe still behind.
268
+ *
269
+ * @throws an error beginning with `"Container closed"` if the container is closed before it catches up.
270
+ * @alpha
271
+ */
272
+ export declare function waitContainerToCatchUp(container: IContainer): Promise<boolean>;
273
+
274
+ export { }
@@ -0,0 +1,75 @@
1
+ import { FluidObject } from '@fluidframework/core-interfaces';
2
+ import { IAudienceOwner } from '@fluidframework/container-definitions';
3
+ import { IClientDetails } from '@fluidframework/protocol-definitions';
4
+ import { IConfigProviderBase } from '@fluidframework/core-interfaces';
5
+ import { IContainer } from '@fluidframework/container-definitions';
6
+ import { IDocumentAttributes } from '@fluidframework/protocol-definitions';
7
+ import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
8
+ import { IDocumentStorageService } from '@fluidframework/driver-definitions';
9
+ import { IFluidCodeDetails } from '@fluidframework/container-definitions';
10
+ import { IFluidModule } from '@fluidframework/container-definitions';
11
+ import { IHostLoader } from '@fluidframework/container-definitions';
12
+ import { ILoaderOptions as ILoaderOptions_2 } from '@fluidframework/container-definitions';
13
+ import { ILocationRedirectionError } from '@fluidframework/driver-definitions';
14
+ import { IProtocolHandler as IProtocolHandler_2 } from '@fluidframework/protocol-base';
15
+ import { IProvideFluidCodeDetailsComparer } from '@fluidframework/container-definitions';
16
+ import { IQuorumSnapshot } from '@fluidframework/protocol-base';
17
+ import { IRequest } from '@fluidframework/core-interfaces';
18
+ import { ISignalMessage } from '@fluidframework/protocol-definitions';
19
+ import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
20
+ import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
21
+ import { IUrlResolver } from '@fluidframework/driver-definitions';
22
+
23
+ /* Excluded from this release type: ConnectionState */
24
+
25
+ /* Excluded from this release type: IAudienceOwner */
26
+
27
+ /* Excluded from this release type: ICodeDetailsLoader */
28
+
29
+ /* Excluded from this release type: IContainer */
30
+
31
+ /* Excluded from this release type: IContainerExperimental */
32
+
33
+ /* Excluded from this release type: IDetachedBlobStorage */
34
+
35
+ /* Excluded from this release type: IDocumentServiceFactory */
36
+
37
+ /* Excluded from this release type: IDocumentStorageService */
38
+
39
+ /* Excluded from this release type: IFluidCodeDetails */
40
+
41
+ /* Excluded from this release type: IFluidModule */
42
+
43
+ /* Excluded from this release type: IFluidModuleWithDetails */
44
+
45
+ /* Excluded from this release type: IHostLoader */
46
+
47
+ /* Excluded from this release type: ILoaderOptions */
48
+
49
+ /* Excluded from this release type: ILoaderProps */
50
+
51
+ /* Excluded from this release type: ILoaderServices */
52
+
53
+ /* Excluded from this release type: ILocationRedirectionError */
54
+
55
+ /* Excluded from this release type: IParsedUrl */
56
+
57
+ /* Excluded from this release type: IProtocolHandler */
58
+
59
+ /* Excluded from this release type: IProvideFluidCodeDetailsComparer */
60
+
61
+ /* Excluded from this release type: isLocationRedirectionError */
62
+
63
+ /* Excluded from this release type: IUrlResolver */
64
+
65
+ /* Excluded from this release type: Loader */
66
+
67
+ /* Excluded from this release type: ProtocolHandlerBuilder */
68
+
69
+ /* Excluded from this release type: resolveWithLocationRedirectionHandling */
70
+
71
+ /* Excluded from this release type: tryParseCompatibleResolvedUrl */
72
+
73
+ /* Excluded from this release type: waitContainerToCatchUp */
74
+
75
+ export { }
@@ -0,0 +1,75 @@
1
+ import { FluidObject } from '@fluidframework/core-interfaces';
2
+ import { IAudienceOwner } from '@fluidframework/container-definitions';
3
+ import { IClientDetails } from '@fluidframework/protocol-definitions';
4
+ import { IConfigProviderBase } from '@fluidframework/core-interfaces';
5
+ import { IContainer } from '@fluidframework/container-definitions';
6
+ import { IDocumentAttributes } from '@fluidframework/protocol-definitions';
7
+ import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
8
+ import { IDocumentStorageService } from '@fluidframework/driver-definitions';
9
+ import { IFluidCodeDetails } from '@fluidframework/container-definitions';
10
+ import { IFluidModule } from '@fluidframework/container-definitions';
11
+ import { IHostLoader } from '@fluidframework/container-definitions';
12
+ import { ILoaderOptions as ILoaderOptions_2 } from '@fluidframework/container-definitions';
13
+ import { ILocationRedirectionError } from '@fluidframework/driver-definitions';
14
+ import { IProtocolHandler as IProtocolHandler_2 } from '@fluidframework/protocol-base';
15
+ import { IProvideFluidCodeDetailsComparer } from '@fluidframework/container-definitions';
16
+ import { IQuorumSnapshot } from '@fluidframework/protocol-base';
17
+ import { IRequest } from '@fluidframework/core-interfaces';
18
+ import { ISignalMessage } from '@fluidframework/protocol-definitions';
19
+ import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
20
+ import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
21
+ import { IUrlResolver } from '@fluidframework/driver-definitions';
22
+
23
+ /* Excluded from this release type: ConnectionState */
24
+
25
+ /* Excluded from this release type: IAudienceOwner */
26
+
27
+ /* Excluded from this release type: ICodeDetailsLoader */
28
+
29
+ /* Excluded from this release type: IContainer */
30
+
31
+ /* Excluded from this release type: IContainerExperimental */
32
+
33
+ /* Excluded from this release type: IDetachedBlobStorage */
34
+
35
+ /* Excluded from this release type: IDocumentServiceFactory */
36
+
37
+ /* Excluded from this release type: IDocumentStorageService */
38
+
39
+ /* Excluded from this release type: IFluidCodeDetails */
40
+
41
+ /* Excluded from this release type: IFluidModule */
42
+
43
+ /* Excluded from this release type: IFluidModuleWithDetails */
44
+
45
+ /* Excluded from this release type: IHostLoader */
46
+
47
+ /* Excluded from this release type: ILoaderOptions */
48
+
49
+ /* Excluded from this release type: ILoaderProps */
50
+
51
+ /* Excluded from this release type: ILoaderServices */
52
+
53
+ /* Excluded from this release type: ILocationRedirectionError */
54
+
55
+ /* Excluded from this release type: IParsedUrl */
56
+
57
+ /* Excluded from this release type: IProtocolHandler */
58
+
59
+ /* Excluded from this release type: IProvideFluidCodeDetailsComparer */
60
+
61
+ /* Excluded from this release type: isLocationRedirectionError */
62
+
63
+ /* Excluded from this release type: IUrlResolver */
64
+
65
+ /* Excluded from this release type: Loader */
66
+
67
+ /* Excluded from this release type: ProtocolHandlerBuilder */
68
+
69
+ /* Excluded from this release type: resolveWithLocationRedirectionHandling */
70
+
71
+ /* Excluded from this release type: tryParseCompatibleResolvedUrl */
72
+
73
+ /* Excluded from this release type: waitContainerToCatchUp */
74
+
75
+ export { }