@fluidframework/container-loader 2.0.0-internal.7.3.0 → 2.0.0-internal.8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/api-extractor-lint.json +13 -0
  3. package/api-extractor.json +3 -3
  4. package/api-report/container-loader.api.md +17 -27
  5. package/dist/connectionState.cjs +3 -0
  6. package/dist/connectionState.cjs.map +1 -1
  7. package/dist/connectionState.d.ts +3 -0
  8. package/dist/connectionState.d.ts.map +1 -1
  9. package/dist/connectionStateHandler.cjs +3 -3
  10. package/dist/connectionStateHandler.cjs.map +1 -1
  11. package/dist/connectionStateHandler.d.ts +10 -0
  12. package/dist/connectionStateHandler.d.ts.map +1 -1
  13. package/dist/container-loader-alpha.d.ts +227 -0
  14. package/dist/container-loader-beta.d.ts +87 -0
  15. package/dist/container-loader-public.d.ts +87 -0
  16. package/dist/container-loader-untrimmed.d.ts +331 -0
  17. package/dist/container.cjs +11 -22
  18. package/dist/container.cjs.map +1 -1
  19. package/dist/container.d.ts +6 -16
  20. package/dist/container.d.ts.map +1 -1
  21. package/dist/containerStorageAdapter.cjs +4 -2
  22. package/dist/containerStorageAdapter.cjs.map +1 -1
  23. package/dist/containerStorageAdapter.d.ts.map +1 -1
  24. package/dist/deltaManager.cjs +18 -1
  25. package/dist/deltaManager.cjs.map +1 -1
  26. package/dist/deltaManager.d.ts.map +1 -1
  27. package/dist/index.cjs +1 -2
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/loader.cjs +2 -65
  32. package/dist/loader.cjs.map +1 -1
  33. package/dist/loader.d.ts +11 -25
  34. package/dist/loader.d.ts.map +1 -1
  35. package/dist/location-redirection-utilities/resolveWithLocationRedirection.cjs +2 -0
  36. package/dist/location-redirection-utilities/resolveWithLocationRedirection.cjs.map +1 -1
  37. package/dist/location-redirection-utilities/resolveWithLocationRedirection.d.ts +2 -0
  38. package/dist/location-redirection-utilities/resolveWithLocationRedirection.d.ts.map +1 -1
  39. package/dist/packageVersion.cjs +1 -1
  40. package/dist/packageVersion.cjs.map +1 -1
  41. package/dist/packageVersion.d.ts +1 -1
  42. package/dist/protocol.cjs.map +1 -1
  43. package/dist/protocol.d.ts +4 -0
  44. package/dist/protocol.d.ts.map +1 -1
  45. package/dist/utils.cjs +1 -0
  46. package/dist/utils.cjs.map +1 -1
  47. package/dist/utils.d.ts +2 -0
  48. package/dist/utils.d.ts.map +1 -1
  49. package/lib/audience.d.ts +0 -4
  50. package/lib/audience.d.ts.map +1 -1
  51. package/lib/catchUpMonitor.d.ts.map +1 -1
  52. package/lib/connectionManager.d.ts +1 -1
  53. package/lib/connectionManager.d.ts.map +1 -1
  54. package/lib/connectionState.d.ts +3 -0
  55. package/lib/connectionState.d.ts.map +1 -1
  56. package/lib/connectionState.mjs +3 -0
  57. package/lib/connectionState.mjs.map +1 -1
  58. package/lib/connectionStateHandler.d.ts +13 -3
  59. package/lib/connectionStateHandler.d.ts.map +1 -1
  60. package/lib/connectionStateHandler.mjs +3 -3
  61. package/lib/connectionStateHandler.mjs.map +1 -1
  62. package/lib/container-loader-alpha.d.ts +227 -0
  63. package/lib/container-loader-beta.d.ts +87 -0
  64. package/lib/container-loader-public.d.ts +87 -0
  65. package/lib/container-loader-untrimmed.d.ts +331 -0
  66. package/lib/container.d.ts +10 -20
  67. package/lib/container.d.ts.map +1 -1
  68. package/lib/container.mjs +11 -22
  69. package/lib/container.mjs.map +1 -1
  70. package/lib/containerContext.d.ts.map +1 -1
  71. package/lib/containerStorageAdapter.d.ts +1 -1
  72. package/lib/containerStorageAdapter.d.ts.map +1 -1
  73. package/lib/containerStorageAdapter.mjs +4 -2
  74. package/lib/containerStorageAdapter.mjs.map +1 -1
  75. package/lib/contracts.d.ts.map +1 -1
  76. package/lib/debugLogger.d.ts.map +1 -1
  77. package/lib/deltaManager.d.ts +1 -1
  78. package/lib/deltaManager.d.ts.map +1 -1
  79. package/lib/deltaManager.mjs +18 -1
  80. package/lib/deltaManager.mjs.map +1 -1
  81. package/lib/deltaQueue.d.ts.map +1 -1
  82. package/lib/disposal.d.ts.map +1 -1
  83. package/lib/error.d.ts.map +1 -1
  84. package/lib/index.d.ts +6 -6
  85. package/lib/index.d.ts.map +1 -1
  86. package/lib/index.mjs +1 -1
  87. package/lib/index.mjs.map +1 -1
  88. package/lib/loader.d.ts +13 -27
  89. package/lib/loader.d.ts.map +1 -1
  90. package/lib/loader.mjs +1 -63
  91. package/lib/loader.mjs.map +1 -1
  92. package/lib/location-redirection-utilities/index.d.ts +1 -1
  93. package/lib/location-redirection-utilities/index.d.ts.map +1 -1
  94. package/lib/location-redirection-utilities/resolveWithLocationRedirection.d.ts +2 -0
  95. package/lib/location-redirection-utilities/resolveWithLocationRedirection.d.ts.map +1 -1
  96. package/lib/location-redirection-utilities/resolveWithLocationRedirection.mjs +2 -0
  97. package/lib/location-redirection-utilities/resolveWithLocationRedirection.mjs.map +1 -1
  98. package/lib/noopHeuristic.d.ts.map +1 -1
  99. package/lib/packageVersion.d.ts +1 -1
  100. package/lib/packageVersion.mjs +1 -1
  101. package/lib/packageVersion.mjs.map +1 -1
  102. package/lib/protocol.d.ts +4 -0
  103. package/lib/protocol.d.ts.map +1 -1
  104. package/lib/protocol.mjs.map +1 -1
  105. package/lib/protocolTreeDocumentStorageService.d.ts.map +1 -1
  106. package/lib/quorum.d.ts +0 -4
  107. package/lib/quorum.d.ts.map +1 -1
  108. package/lib/retriableDocumentStorageService.d.ts.map +1 -1
  109. package/lib/utils.d.ts +2 -0
  110. package/lib/utils.d.ts.map +1 -1
  111. package/lib/utils.mjs +1 -0
  112. package/lib/utils.mjs.map +1 -1
  113. package/package.json +46 -16
  114. package/src/connectionState.ts +3 -0
  115. package/src/connectionStateHandler.ts +16 -3
  116. package/src/container.ts +26 -39
  117. package/src/containerStorageAdapter.ts +4 -2
  118. package/src/deltaManager.ts +25 -1
  119. package/src/index.ts +0 -1
  120. package/src/loader.ts +10 -84
  121. package/src/location-redirection-utilities/resolveWithLocationRedirection.ts +2 -0
  122. package/src/packageVersion.ts +1 -1
  123. package/src/protocol.ts +4 -0
  124. package/src/utils.ts +2 -0
@@ -0,0 +1,87 @@
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: FluidObject */
26
+
27
+ /* Excluded from this release type: IAudienceOwner */
28
+
29
+ /* Excluded from this release type: ICodeDetailsLoader */
30
+
31
+ /* Excluded from this release type: IConfigProviderBase */
32
+
33
+ /* Excluded from this release type: IContainer */
34
+
35
+ /* Excluded from this release type: IContainerExperimental */
36
+
37
+ /* Excluded from this release type: IDetachedBlobStorage */
38
+
39
+ /* Excluded from this release type: IDocumentServiceFactory */
40
+
41
+ /* Excluded from this release type: IDocumentStorageService */
42
+
43
+ /* Excluded from this release type: IFluidCodeDetails */
44
+
45
+ /* Excluded from this release type: IFluidModule */
46
+
47
+ /* Excluded from this release type: IFluidModuleWithDetails */
48
+
49
+ /* Excluded from this release type: IHostLoader */
50
+
51
+ /* Excluded from this release type: ILoaderOptions */
52
+
53
+ /* Excluded from this release type: ILoaderOptions_2 */
54
+
55
+ /* Excluded from this release type: ILoaderProps */
56
+
57
+ /* Excluded from this release type: ILoaderServices */
58
+
59
+ /* Excluded from this release type: ILocationRedirectionError */
60
+
61
+ /* Excluded from this release type: IParsedUrl */
62
+
63
+ /* Excluded from this release type: IProtocolHandler */
64
+
65
+ /* Excluded from this release type: IProvideFluidCodeDetailsComparer */
66
+
67
+ /* Excluded from this release type: IRequest */
68
+
69
+ /* Excluded from this release type: isLocationRedirectionError */
70
+
71
+ /* Excluded from this release type: ITelemetryBaseLogger */
72
+
73
+ /* Excluded from this release type: ITelemetryLoggerExt */
74
+
75
+ /* Excluded from this release type: IUrlResolver */
76
+
77
+ /* Excluded from this release type: Loader */
78
+
79
+ /* Excluded from this release type: ProtocolHandlerBuilder */
80
+
81
+ /* Excluded from this release type: resolveWithLocationRedirectionHandling */
82
+
83
+ /* Excluded from this release type: tryParseCompatibleResolvedUrl */
84
+
85
+ /* Excluded from this release type: waitContainerToCatchUp */
86
+
87
+ export { }
@@ -0,0 +1,331 @@
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
+ * @internal
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
+ /**
66
+ * IContainer interface that includes experimental features still under development.
67
+ * @internal
68
+ */
69
+ export declare interface IContainerExperimental extends IContainer {
70
+ /**
71
+ * Get pending state from container. WARNING: misuse of this API can result in duplicate op
72
+ * submission and potential document corruption. The blob returned MUST be deleted if and when this
73
+ * container emits a "connected" event.
74
+ * @returns serialized blob that can be passed to Loader.resolve()
75
+ */
76
+ getPendingLocalState?(): Promise<string>;
77
+ /**
78
+ * Closes the container and returns serialized local state intended to be
79
+ * given to a newly loaded container.
80
+ */
81
+ closeAndGetPendingLocalState?(stopBlobAttachingSignal?: AbortSignal): Promise<string>;
82
+ }
83
+
84
+ /**
85
+ * Subset of IDocumentStorageService which only supports createBlob() and readBlob(). This is used to support
86
+ * blobs in detached containers.
87
+ * @alpha
88
+ */
89
+ export declare type IDetachedBlobStorage = Pick<IDocumentStorageService, "createBlob" | "readBlob"> & {
90
+ size: number;
91
+ /**
92
+ * Return an array of all blob IDs present in storage
93
+ */
94
+ getBlobIds(): string[];
95
+ };
96
+
97
+ /**
98
+ * @deprecated IFluidModuleWithDetails interface is moved to
99
+ * {@link @fluidframework/container-definitions#IFluidModuleWithDetails}
100
+ * to have all the code loading modules in one package. #8193
101
+ * Encapsulates a module entry point with corresponding code details.
102
+ * @alpha
103
+ */
104
+ export declare interface IFluidModuleWithDetails {
105
+ /** Fluid code module that implements the runtime factory needed to instantiate the container runtime. */
106
+ module: IFluidModule;
107
+ /**
108
+ * Code details associated with the module. Represents a document schema this module supports.
109
+ * If the code loader implements the {@link @fluidframework/core-interfaces#IFluidCodeDetailsComparer} interface,
110
+ * it'll be called to determine whether the module code details satisfy the new code proposal in the quorum.
111
+ */
112
+ details: IFluidCodeDetails;
113
+ }
114
+
115
+ /**
116
+ * @alpha
117
+ */
118
+ export declare interface ILoaderOptions extends ILoaderOptions_2 {
119
+ summarizeProtocolTree?: boolean;
120
+ }
121
+
122
+ /**
123
+ * Services and properties necessary for creating a loader
124
+ * @alpha
125
+ */
126
+ export declare interface ILoaderProps {
127
+ /**
128
+ * The url resolver used by the loader for resolving external urls
129
+ * into Fluid urls such that the container specified by the
130
+ * external url can be loaded.
131
+ */
132
+ readonly urlResolver: IUrlResolver;
133
+ /**
134
+ * The document service factory take the Fluid url provided
135
+ * by the resolved url and constructs all the necessary services
136
+ * for communication with the container's server.
137
+ */
138
+ readonly documentServiceFactory: IDocumentServiceFactory;
139
+ /**
140
+ * The code loader handles loading the necessary code
141
+ * for running a container once it is loaded.
142
+ */
143
+ readonly codeLoader: ICodeDetailsLoader;
144
+ /**
145
+ * A property bag of options used by various layers
146
+ * to control features
147
+ */
148
+ readonly options?: ILoaderOptions;
149
+ /**
150
+ * Scope is provided to all container and is a set of shared
151
+ * services for container's to integrate with their host environment.
152
+ */
153
+ readonly scope?: FluidObject;
154
+ /**
155
+ * The logger that all telemetry should be pushed to.
156
+ */
157
+ readonly logger?: ITelemetryBaseLogger;
158
+ /**
159
+ * Blobs storage for detached containers.
160
+ */
161
+ readonly detachedBlobStorage?: IDetachedBlobStorage;
162
+ /**
163
+ * The configuration provider which may be used to control features.
164
+ */
165
+ readonly configProvider?: IConfigProviderBase;
166
+ /**
167
+ * Optional property for allowing the container to use a custom
168
+ * protocol implementation for handling the quorum and/or the audience.
169
+ */
170
+ readonly protocolHandlerBuilder?: ProtocolHandlerBuilder;
171
+ }
172
+
173
+ /**
174
+ * Services and properties used by and exposed by the loader
175
+ * @alpha
176
+ */
177
+ export declare interface ILoaderServices {
178
+ /**
179
+ * The url resolver used by the loader for resolving external urls
180
+ * into Fluid urls such that the container specified by the
181
+ * external url can be loaded.
182
+ */
183
+ readonly urlResolver: IUrlResolver;
184
+ /**
185
+ * The document service factory take the Fluid url provided
186
+ * by the resolved url and constructs all the necessary services
187
+ * for communication with the container's server.
188
+ */
189
+ readonly documentServiceFactory: IDocumentServiceFactory;
190
+ /**
191
+ * The code loader handles loading the necessary code
192
+ * for running a container once it is loaded.
193
+ */
194
+ readonly codeLoader: ICodeDetailsLoader;
195
+ /**
196
+ * A property bag of options used by various layers
197
+ * to control features
198
+ */
199
+ readonly options: ILoaderOptions;
200
+ /**
201
+ * Scope is provided to all container and is a set of shared
202
+ * services for container's to integrate with their host environment.
203
+ */
204
+ readonly scope: FluidObject;
205
+ /**
206
+ * The logger downstream consumers should construct their loggers from
207
+ */
208
+ readonly subLogger: ITelemetryLoggerExt;
209
+ /**
210
+ * Blobs storage for detached containers.
211
+ */
212
+ readonly detachedBlobStorage?: IDetachedBlobStorage;
213
+ /**
214
+ * Optional property for allowing the container to use a custom
215
+ * protocol implementation for handling the quorum and/or the audience.
216
+ */
217
+ readonly protocolHandlerBuilder?: ProtocolHandlerBuilder;
218
+ }
219
+
220
+ /**
221
+ * Interface to represent the parsed parts of IResolvedUrl.url to help
222
+ * in getting info about different parts of the url.
223
+ * May not be compatible or relevant for any Url Resolver
224
+ * @internal
225
+ */
226
+ export declare interface IParsedUrl {
227
+ /**
228
+ * It is combination of tenantid/docId part of the url.
229
+ */
230
+ id: string;
231
+ /**
232
+ * It is the deep link path in the url.
233
+ */
234
+ path: string;
235
+ /**
236
+ * Query string part of the url.
237
+ */
238
+ query: string;
239
+ /**
240
+ * Null means do not use snapshots, undefined means load latest snapshot
241
+ * otherwise it's version ID passed to IDocumentStorageService.getVersions() to figure out what snapshot to use.
242
+ * If needed, can add undefined which is treated by Container.load() as load latest snapshot.
243
+ */
244
+ version: string | null | undefined;
245
+ }
246
+
247
+ /**
248
+ * @alpha
249
+ */
250
+ export declare interface IProtocolHandler extends IProtocolHandler_2 {
251
+ readonly audience: IAudienceOwner;
252
+ processSignal(message: ISignalMessage): any;
253
+ }
254
+
255
+ /**
256
+ * Checks if the error is location redirection error.
257
+ * @param error - error whose type is to be determined.
258
+ * @returns `true` is the error is location redirection error, otherwise `false`.
259
+ * @internal
260
+ */
261
+ export declare function isLocationRedirectionError(error: any): error is ILocationRedirectionError;
262
+
263
+ /**
264
+ * Manages Fluid resource loading
265
+ * @alpha
266
+ */
267
+ export declare class Loader implements IHostLoader {
268
+ readonly services: ILoaderServices;
269
+ private readonly mc;
270
+ constructor(loaderProps: ILoaderProps);
271
+ createDetachedContainer(codeDetails: IFluidCodeDetails, createDetachedProps?: {
272
+ canReconnect?: boolean;
273
+ clientDetailsOverride?: IClientDetails;
274
+ }): Promise<IContainer>;
275
+ rehydrateDetachedContainerFromSnapshot(snapshot: string, createDetachedProps?: {
276
+ canReconnect?: boolean;
277
+ clientDetailsOverride?: IClientDetails;
278
+ }): Promise<IContainer>;
279
+ resolve(request: IRequest, pendingLocalState?: string): Promise<IContainer>;
280
+ private resolveCore;
281
+ private loadContainer;
282
+ }
283
+
284
+ /**
285
+ * Function to be used for creating a protocol handler.
286
+ * @alpha
287
+ */
288
+ export declare type ProtocolHandlerBuilder = (attributes: IDocumentAttributes, snapshot: IQuorumSnapshot, sendProposal: (key: string, value: any) => number) => IProtocolHandler;
289
+
290
+ /**
291
+ * Handles location redirection while fulfilling the loader request.
292
+ * @param api - Callback in which user can wrap the loader.resolve or loader.request call.
293
+ * @param request - request to be resolved.
294
+ * @param urlResolver - resolver used to resolve the url.
295
+ * @param logger - logger to send events.
296
+ * @returns Response from the API call.
297
+ * @internal
298
+ */
299
+ export declare function resolveWithLocationRedirectionHandling<T>(api: (request: IRequest) => Promise<T>, request: IRequest, urlResolver: IUrlResolver, logger?: ITelemetryBaseLogger): Promise<T>;
300
+
301
+ /**
302
+ * Utility api to parse the IResolvedUrl.url into specific parts like querystring, path to get
303
+ * deep link info etc.
304
+ * Warning - This function may not be compatible with any Url Resolver's resolved url. It works
305
+ * with urls of type: protocol://<string>/.../..?<querystring>
306
+ * @param url - This is the IResolvedUrl.url part of the resolved url.
307
+ * @returns The IParsedUrl representing the input URL, or undefined if the format was not supported
308
+ * @internal
309
+ */
310
+ export declare function tryParseCompatibleResolvedUrl(url: string): IParsedUrl | undefined;
311
+
312
+ /**
313
+ * Waits until container connects to delta storage and gets up-to-date.
314
+ *
315
+ * Useful when resolving URIs and hitting 404, due to container being loaded from (stale) snapshot and not being
316
+ * up to date. Host may chose to wait in such case and retry resolving URI.
317
+ *
318
+ * Warning: Will wait infinitely for connection to establish if there is no connection.
319
+ * May result in deadlock if Container.disconnect() is called and never followed by a call to Container.connect().
320
+ *
321
+ * @returns `true`: container is up to date, it processed all the ops that were know at the time of first connection.
322
+ *
323
+ * `false`: storage does not provide indication of how far the client is. Container processed all the ops known to it,
324
+ * but it maybe still behind.
325
+ *
326
+ * @throws an error beginning with `"Container closed"` if the container is closed before it catches up.
327
+ * @internal
328
+ */
329
+ export declare function waitContainerToCatchUp(container: IContainer): Promise<boolean>;
330
+
331
+ export { }
@@ -2,15 +2,15 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { ITelemetryProperties, IRequest, IResponse, IFluidRouter, FluidObject } from "@fluidframework/core-interfaces";
5
+ import { ITelemetryProperties, IRequest, FluidObject } from "@fluidframework/core-interfaces";
6
6
  import { AttachState, IAudience, ICodeDetailsLoader, IContainer, IContainerEvents, IContainerLoadMode, ICriticalContainerError, IDeltaManager, IFluidCodeDetails, ReadOnlyInfo } from "@fluidframework/container-definitions";
7
7
  import { IDocumentServiceFactory, IResolvedUrl, IUrlResolver } from "@fluidframework/driver-definitions";
8
8
  import { IClientDetails, IDocumentMessage, IQuorumClients, ISequencedDocumentMessage, ISnapshotTree } from "@fluidframework/protocol-definitions";
9
9
  import { EventEmitterWithErrorHandling, ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
10
- import { IDetachedBlobStorage, ILoaderOptions } from "./loader";
11
- import { ISerializableBlobContents } from "./containerStorageAdapter";
12
- import { ConnectionState } from "./connectionState";
13
- import { ProtocolHandlerBuilder } from "./protocol";
10
+ import { IDetachedBlobStorage, ILoaderOptions } from "./loader.mjs";
11
+ import { ISerializableBlobContents } from "./containerStorageAdapter.mjs";
12
+ import { ConnectionState } from "./connectionState.mjs";
13
+ import { ProtocolHandlerBuilder } from "./protocol.mjs";
14
14
  /**
15
15
  * @internal
16
16
  */
@@ -104,6 +104,7 @@ export interface IContainerCreateProps {
104
104
  * but it maybe still behind.
105
105
  *
106
106
  * @throws an error beginning with `"Container closed"` if the container is closed before it catches up.
107
+ * @internal
107
108
  */
108
109
  export declare function waitContainerToCatchUp(container: IContainer): Promise<boolean>;
109
110
  /**
@@ -163,6 +164,7 @@ export declare class Container extends EventEmitterWithErrorHandling<IContainerE
163
164
  private readonly subLogger;
164
165
  private readonly detachedBlobStorage;
165
166
  private readonly protocolHandlerBuilder;
167
+ private readonly client;
166
168
  private readonly mc;
167
169
  /**
168
170
  * Used by the RelativeLoader to spawn a new Container for the same document. Used to create the summarizing client.
@@ -214,10 +216,6 @@ export declare class Container extends EventEmitterWithErrorHandling<IContainerE
214
216
  private setAutoReconnectTime;
215
217
  private noopHeuristic;
216
218
  private get connectionMode();
217
- /**
218
- * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
219
- */
220
- get IFluidRouter(): IFluidRouter;
221
219
  get resolvedUrl(): IResolvedUrl | undefined;
222
220
  get readOnlyInfo(): ReadOnlyInfo;
223
221
  /**
@@ -274,7 +272,7 @@ export declare class Container extends EventEmitterWithErrorHandling<IContainerE
274
272
  /**
275
273
  * {@inheritDoc @fluidframework/container-definitions#IContainer.entryPoint}
276
274
  */
277
- getEntryPoint(): Promise<FluidObject | undefined>;
275
+ getEntryPoint(): Promise<FluidObject>;
278
276
  private readonly _lifecycleEvents;
279
277
  /**
280
278
  * @internal
@@ -298,10 +296,6 @@ export declare class Container extends EventEmitterWithErrorHandling<IContainerE
298
296
  attach(request: IRequest, attachProps?: {
299
297
  deltaConnection?: "none" | "delayed";
300
298
  }): Promise<void>;
301
- /**
302
- * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
303
- */
304
- request(path: IRequest): Promise<IResponse>;
305
299
  private setAutoReconnectInternal;
306
300
  connect(): void;
307
301
  private connectInternal;
@@ -330,7 +324,7 @@ export declare class Container extends EventEmitterWithErrorHandling<IContainerE
330
324
  private initializeProtocolState;
331
325
  private captureProtocolSummary;
332
326
  private getCodeDetailsFromQuorum;
333
- private get client();
327
+ private static setupClient;
334
328
  /**
335
329
  * Returns true if connection is active, i.e. it's "write" connection and
336
330
  * container runtime was notified about this connection (i.e. we are up-to-date and could send ops).
@@ -369,7 +363,7 @@ export declare class Container extends EventEmitterWithErrorHandling<IContainerE
369
363
  }
370
364
  /**
371
365
  * IContainer interface that includes experimental features still under development.
372
- * @alpha
366
+ * @internal
373
367
  */
374
368
  export interface IContainerExperimental extends IContainer {
375
369
  /**
@@ -377,15 +371,11 @@ export interface IContainerExperimental extends IContainer {
377
371
  * submission and potential document corruption. The blob returned MUST be deleted if and when this
378
372
  * container emits a "connected" event.
379
373
  * @returns serialized blob that can be passed to Loader.resolve()
380
- * @alpha misuse of this API can result in duplicate op submission and potential document corruption
381
- * {@link https://github.com/microsoft/FluidFramework/blob/main/packages/loader/container-loader/closeAndGetPendingLocalState.md}
382
374
  */
383
375
  getPendingLocalState?(): Promise<string>;
384
376
  /**
385
377
  * Closes the container and returns serialized local state intended to be
386
378
  * given to a newly loaded container.
387
- * @alpha
388
- * {@link https://github.com/microsoft/FluidFramework/blob/main/packages/loader/container-loader/closeAndGetPendingLocalState.md}
389
379
  */
390
380
  closeAndGetPendingLocalState?(stopBlobAttachingSignal?: AbortSignal): Promise<string>;
391
381
  }
@@ -1 +1 @@
1
- {"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../src/container.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAEN,oBAA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,OAAO,CAAC,oBAAoB;IAS5B;;;;OAIG;YACW,IAAI;YAoPJ,cAAc;YAwBd,6BAA6B;YAqC7B,qBAAqB;YAsBrB,mCAAmC;IAiCjD,OAAO,CAAC,uBAAuB;IA+C/B,OAAO,CAAC,sBAAsB;IA2B9B,OAAO,CAAC,wBAAwB;IAQhC,OAAO,CAAC,MAAM,CAAC,WAAW;IAsC1B;;;;;OAKG;IACH,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,kBAAkB;YAwEZ,2BAA2B;IAiBzC,OAAO,CAAC,iCAAiC;IAkEzC,OAAO,CAAC,wBAAwB;IAwBhC,OAAO,CAAC,sBAAsB;IAuB9B,+DAA+D;IAC/D,OAAO,CAAC,WAAW;IAgBnB,OAAO,CAAC,oBAAoB;IAmB5B,OAAO,CAAC,aAAa;IAwBrB,OAAO,CAAC,oBAAoB;IAkD5B,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,aAAa;IAUrB;;;;OAIG;YACW,iBAAiB;YAqBjB,kBAAkB;IAiFhC,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAMxC;IAEF;;;;;OAKG;IACH,OAAO,CAAC,wBAAwB;IAYhC,OAAO,CAAC,wBAAwB;CA2BhC;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAuB,SAAQ,UAAU;IACzD;;;;;OAKG;IACH,oBAAoB,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAEzC;;;OAGG;IACH,4BAA4B,CAAC,CAAC,uBAAuB,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACtF"}
package/lib/container.mjs CHANGED
@@ -44,6 +44,7 @@ const hasBlobsSummaryTree = ".hasAttachmentBlobs";
44
44
  * but it maybe still behind.
45
45
  *
46
46
  * @throws an error beginning with `"Container closed"` if the container is closed before it catches up.
47
+ * @internal
47
48
  */
48
49
  export async function waitContainerToCatchUp(container) {
49
50
  // Make sure we stop waiting if container is closed.
@@ -217,13 +218,6 @@ export class Container extends EventEmitterWithErrorHandling {
217
218
  get connectionMode() {
218
219
  return this._deltaManager.connectionManager.connectionMode;
219
220
  }
220
- /**
221
- * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
222
- */
223
- // eslint-disable-next-line import/no-deprecated
224
- get IFluidRouter() {
225
- return this;
226
- }
227
221
  get resolvedUrl() {
228
222
  /**
229
223
  * All attached containers will have a document service,
@@ -412,11 +406,12 @@ export class Container extends EventEmitterWithErrorHandling {
412
406
  ...createParamOverrides,
413
407
  });
414
408
  };
409
+ this._containerId = uuid();
410
+ this.client = Container.setupClient(this._containerId, this.options, this.clientDetailsOverride);
415
411
  // Create logger for data stores to use
416
412
  const type = this.client.details.type;
417
413
  const interactive = this.client.details.capabilities.interactive;
418
414
  const clientType = `${interactive ? "interactive" : "noninteractive"}${type !== undefined && type !== "" ? `/${type}` : ""}`;
419
- this._containerId = uuid();
420
415
  // Need to use the property getter for docId because for detached flow we don't have the docId initially.
421
416
  // We assign the id later so property getter is used.
422
417
  this.subLogger = createChildLogger({
@@ -641,7 +636,6 @@ export class Container extends EventEmitterWithErrorHandling {
641
636
  // runtime matches pending ops to successful ones by clientId and client seq num, so we need to close the
642
637
  // container at the same time we get pending state, otherwise this container could reconnect and resubmit with
643
638
  // a new clientId and a future container using stale pending state without the new clientId would resubmit them
644
- this.disconnectInternal({ text: "closeAndGetPendingLocalState" }); // TODO https://dev.azure.com/fluidframework/internal/_workitems/edit/5127
645
639
  const pendingState = await this.getPendingLocalStateCore({
646
640
  notifyImminentClosure: true,
647
641
  stopBlobAttachingSignal,
@@ -797,12 +791,6 @@ export class Container extends EventEmitterWithErrorHandling {
797
791
  }
798
792
  }, { start: true, end: true, cancel: "generic" });
799
793
  }
800
- /**
801
- * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
802
- */
803
- async request(path) {
804
- return PerformanceEvent.timedExecAsync(this.mc.logger, { eventName: "Request" }, async () => this.runtime.request(path), { end: true, cancel: "error" });
805
- }
806
794
  setAutoReconnectInternal(mode, reason) {
807
795
  const currentMode = this._deltaManager.connectionManager.reconnectMode;
808
796
  if (currentMode === mode) {
@@ -1249,9 +1237,10 @@ export class Container extends EventEmitterWithErrorHandling {
1249
1237
  const pkg = getCodeProposal(quorum);
1250
1238
  return pkg;
1251
1239
  }
1252
- get client() {
1253
- const client = this.options?.client !== undefined
1254
- ? this.options.client
1240
+ static setupClient(containerId, options, clientDetailsOverride) {
1241
+ const loaderOptionsClient = structuredClone(options?.client);
1242
+ const client = loaderOptionsClient !== undefined
1243
+ ? loaderOptionsClient
1255
1244
  : {
1256
1245
  details: {
1257
1246
  capabilities: { interactive: true },
@@ -1261,20 +1250,20 @@ export class Container extends EventEmitterWithErrorHandling {
1261
1250
  scopes: [],
1262
1251
  user: { id: "" },
1263
1252
  };
1264
- if (this.clientDetailsOverride !== undefined) {
1253
+ if (clientDetailsOverride !== undefined) {
1265
1254
  client.details = {
1266
1255
  ...client.details,
1267
- ...this.clientDetailsOverride,
1256
+ ...clientDetailsOverride,
1268
1257
  capabilities: {
1269
1258
  ...client.details.capabilities,
1270
- ...this.clientDetailsOverride.capabilities,
1259
+ ...clientDetailsOverride?.capabilities,
1271
1260
  },
1272
1261
  };
1273
1262
  }
1274
1263
  client.details.environment = [
1275
1264
  client.details.environment,
1276
1265
  ` loaderVersion:${pkgVersion}`,
1277
- ` containerId:${this._containerId}`,
1266
+ ` containerId:${containerId}`,
1278
1267
  ].join(";");
1279
1268
  return client;
1280
1269
  }