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

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 (111) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/api-extractor-lint.json +13 -0
  3. package/api-extractor.json +3 -3
  4. package/api-report/container-loader.api.md +18 -18
  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 +240 -0
  14. package/dist/container-loader-beta.d.ts +96 -0
  15. package/dist/container-loader-public.d.ts +96 -0
  16. package/dist/container-loader-untrimmed.d.ts +351 -0
  17. package/dist/container.cjs +11 -9
  18. package/dist/container.cjs.map +1 -1
  19. package/dist/container.d.ts +4 -6
  20. package/dist/container.d.ts.map +1 -1
  21. package/dist/deltaManager.cjs +18 -1
  22. package/dist/deltaManager.cjs.map +1 -1
  23. package/dist/deltaManager.d.ts.map +1 -1
  24. package/dist/loader.cjs +2 -0
  25. package/dist/loader.cjs.map +1 -1
  26. package/dist/loader.d.ts +12 -2
  27. package/dist/loader.d.ts.map +1 -1
  28. package/dist/location-redirection-utilities/resolveWithLocationRedirection.cjs +2 -0
  29. package/dist/location-redirection-utilities/resolveWithLocationRedirection.cjs.map +1 -1
  30. package/dist/location-redirection-utilities/resolveWithLocationRedirection.d.ts +2 -0
  31. package/dist/location-redirection-utilities/resolveWithLocationRedirection.d.ts.map +1 -1
  32. package/dist/packageVersion.cjs +1 -1
  33. package/dist/packageVersion.cjs.map +1 -1
  34. package/dist/packageVersion.d.ts +1 -1
  35. package/dist/protocol.cjs.map +1 -1
  36. package/dist/protocol.d.ts +4 -0
  37. package/dist/protocol.d.ts.map +1 -1
  38. package/dist/utils.cjs +1 -0
  39. package/dist/utils.cjs.map +1 -1
  40. package/dist/utils.d.ts +2 -0
  41. package/dist/utils.d.ts.map +1 -1
  42. package/lib/audience.d.ts +0 -4
  43. package/lib/audience.d.ts.map +1 -1
  44. package/lib/catchUpMonitor.d.ts.map +1 -1
  45. package/lib/connectionManager.d.ts +1 -1
  46. package/lib/connectionManager.d.ts.map +1 -1
  47. package/lib/connectionState.d.ts +3 -0
  48. package/lib/connectionState.d.ts.map +1 -1
  49. package/lib/connectionState.mjs +3 -0
  50. package/lib/connectionState.mjs.map +1 -1
  51. package/lib/connectionStateHandler.d.ts +13 -3
  52. package/lib/connectionStateHandler.d.ts.map +1 -1
  53. package/lib/connectionStateHandler.mjs +3 -3
  54. package/lib/connectionStateHandler.mjs.map +1 -1
  55. package/lib/container-loader-alpha.d.ts +240 -0
  56. package/lib/container-loader-beta.d.ts +96 -0
  57. package/lib/container-loader-public.d.ts +96 -0
  58. package/lib/container-loader-untrimmed.d.ts +351 -0
  59. package/lib/container.d.ts +8 -10
  60. package/lib/container.d.ts.map +1 -1
  61. package/lib/container.mjs +11 -9
  62. package/lib/container.mjs.map +1 -1
  63. package/lib/containerContext.d.ts.map +1 -1
  64. package/lib/containerStorageAdapter.d.ts +1 -1
  65. package/lib/containerStorageAdapter.d.ts.map +1 -1
  66. package/lib/contracts.d.ts.map +1 -1
  67. package/lib/debugLogger.d.ts.map +1 -1
  68. package/lib/deltaManager.d.ts +1 -1
  69. package/lib/deltaManager.d.ts.map +1 -1
  70. package/lib/deltaManager.mjs +18 -1
  71. package/lib/deltaManager.mjs.map +1 -1
  72. package/lib/deltaQueue.d.ts.map +1 -1
  73. package/lib/disposal.d.ts.map +1 -1
  74. package/lib/error.d.ts.map +1 -1
  75. package/lib/index.d.ts +6 -6
  76. package/lib/index.d.ts.map +1 -1
  77. package/lib/loader.d.ts +14 -4
  78. package/lib/loader.d.ts.map +1 -1
  79. package/lib/loader.mjs +2 -0
  80. package/lib/loader.mjs.map +1 -1
  81. package/lib/location-redirection-utilities/index.d.ts +1 -1
  82. package/lib/location-redirection-utilities/index.d.ts.map +1 -1
  83. package/lib/location-redirection-utilities/resolveWithLocationRedirection.d.ts +2 -0
  84. package/lib/location-redirection-utilities/resolveWithLocationRedirection.d.ts.map +1 -1
  85. package/lib/location-redirection-utilities/resolveWithLocationRedirection.mjs +2 -0
  86. package/lib/location-redirection-utilities/resolveWithLocationRedirection.mjs.map +1 -1
  87. package/lib/noopHeuristic.d.ts.map +1 -1
  88. package/lib/packageVersion.d.ts +1 -1
  89. package/lib/packageVersion.mjs +1 -1
  90. package/lib/packageVersion.mjs.map +1 -1
  91. package/lib/protocol.d.ts +4 -0
  92. package/lib/protocol.d.ts.map +1 -1
  93. package/lib/protocol.mjs.map +1 -1
  94. package/lib/protocolTreeDocumentStorageService.d.ts.map +1 -1
  95. package/lib/quorum.d.ts +0 -4
  96. package/lib/quorum.d.ts.map +1 -1
  97. package/lib/retriableDocumentStorageService.d.ts.map +1 -1
  98. package/lib/utils.d.ts +2 -0
  99. package/lib/utils.d.ts.map +1 -1
  100. package/lib/utils.mjs +1 -0
  101. package/lib/utils.mjs.map +1 -1
  102. package/package.json +34 -15
  103. package/src/connectionState.ts +3 -0
  104. package/src/connectionStateHandler.ts +16 -3
  105. package/src/container.ts +24 -14
  106. package/src/deltaManager.ts +25 -1
  107. package/src/loader.ts +11 -1
  108. package/src/location-redirection-utilities/resolveWithLocationRedirection.ts +2 -0
  109. package/src/packageVersion.ts +1 -1
  110. package/src/protocol.ts +4 -0
  111. package/src/utils.ts +2 -0
@@ -0,0 +1,96 @@
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 { IFluidRouter } from '@fluidframework/core-interfaces';
12
+ import { IHostLoader } from '@fluidframework/container-definitions';
13
+ import { ILoaderOptions as ILoaderOptions_2 } from '@fluidframework/container-definitions';
14
+ import { ILocationRedirectionError } from '@fluidframework/driver-definitions';
15
+ import { IProtocolHandler as IProtocolHandler_2 } from '@fluidframework/protocol-base';
16
+ import { IProvideFluidCodeDetailsComparer } from '@fluidframework/container-definitions';
17
+ import { IQuorumSnapshot } from '@fluidframework/protocol-base';
18
+ import { IRequest } from '@fluidframework/core-interfaces';
19
+ import { IRequestHeader } from '@fluidframework/core-interfaces';
20
+ import { IResponse } from '@fluidframework/core-interfaces';
21
+ import { ISignalMessage } from '@fluidframework/protocol-definitions';
22
+ import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
23
+ import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
24
+ import { IUrlResolver } from '@fluidframework/driver-definitions';
25
+
26
+ /* Excluded from this release type: ConnectionState */
27
+
28
+ /* Excluded from this release type: FluidObject */
29
+
30
+ /* Excluded from this release type: IAudienceOwner */
31
+
32
+ /* Excluded from this release type: ICodeDetailsLoader */
33
+
34
+ /* Excluded from this release type: IConfigProviderBase */
35
+
36
+ /* Excluded from this release type: IContainer */
37
+
38
+ /* Excluded from this release type: IContainerExperimental */
39
+
40
+ /* Excluded from this release type: IDetachedBlobStorage */
41
+
42
+ /* Excluded from this release type: IDocumentServiceFactory */
43
+
44
+ /* Excluded from this release type: IDocumentStorageService */
45
+
46
+ /* Excluded from this release type: IFluidCodeDetails */
47
+
48
+ /* Excluded from this release type: IFluidModule */
49
+
50
+ /* Excluded from this release type: IFluidModuleWithDetails */
51
+
52
+ /* Excluded from this release type: IFluidRouter */
53
+
54
+ /* Excluded from this release type: IHostLoader */
55
+
56
+ /* Excluded from this release type: ILoaderOptions */
57
+
58
+ /* Excluded from this release type: ILoaderOptions_2 */
59
+
60
+ /* Excluded from this release type: ILoaderProps */
61
+
62
+ /* Excluded from this release type: ILoaderServices */
63
+
64
+ /* Excluded from this release type: ILocationRedirectionError */
65
+
66
+ /* Excluded from this release type: IParsedUrl */
67
+
68
+ /* Excluded from this release type: IProtocolHandler */
69
+
70
+ /* Excluded from this release type: IProvideFluidCodeDetailsComparer */
71
+
72
+ /* Excluded from this release type: IRequest */
73
+
74
+ /* Excluded from this release type: IResponse */
75
+
76
+ /* Excluded from this release type: isLocationRedirectionError */
77
+
78
+ /* Excluded from this release type: ITelemetryBaseLogger */
79
+
80
+ /* Excluded from this release type: ITelemetryLoggerExt */
81
+
82
+ /* Excluded from this release type: IUrlResolver */
83
+
84
+ /* Excluded from this release type: Loader */
85
+
86
+ /* Excluded from this release type: ProtocolHandlerBuilder */
87
+
88
+ /* Excluded from this release type: requestResolvedObjectFromContainer */
89
+
90
+ /* Excluded from this release type: resolveWithLocationRedirectionHandling */
91
+
92
+ /* Excluded from this release type: tryParseCompatibleResolvedUrl */
93
+
94
+ /* Excluded from this release type: waitContainerToCatchUp */
95
+
96
+ export { }
@@ -0,0 +1,351 @@
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 { IFluidRouter } from '@fluidframework/core-interfaces';
12
+ import { IHostLoader } from '@fluidframework/container-definitions';
13
+ import { ILoaderOptions as ILoaderOptions_2 } from '@fluidframework/container-definitions';
14
+ import { ILocationRedirectionError } from '@fluidframework/driver-definitions';
15
+ import { IProtocolHandler as IProtocolHandler_2 } from '@fluidframework/protocol-base';
16
+ import { IProvideFluidCodeDetailsComparer } from '@fluidframework/container-definitions';
17
+ import { IQuorumSnapshot } from '@fluidframework/protocol-base';
18
+ import { IRequest } from '@fluidframework/core-interfaces';
19
+ import { IRequestHeader } from '@fluidframework/core-interfaces';
20
+ import { IResponse } from '@fluidframework/core-interfaces';
21
+ import { ISignalMessage } from '@fluidframework/protocol-definitions';
22
+ import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
23
+ import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
24
+ import { IUrlResolver } from '@fluidframework/driver-definitions';
25
+
26
+ /**
27
+ * @internal
28
+ */
29
+ export declare enum ConnectionState {
30
+ /**
31
+ * The container is not connected to the ordering service
32
+ * Note - When in this state the container may be about to reconnect,
33
+ * or may remain disconnected until explicitly told to connect.
34
+ */
35
+ Disconnected = 0,
36
+ /**
37
+ * The container is disconnected but actively trying to establish a new connection
38
+ * PLEASE NOTE that this numerical value falls out of the order you may expect for this state
39
+ */
40
+ EstablishingConnection = 3,
41
+ /**
42
+ * The container has an inbound connection only, and is catching up to the latest known state from the service.
43
+ */
44
+ CatchingUp = 1,
45
+ /**
46
+ * The container is fully connected and syncing
47
+ */
48
+ Connected = 2
49
+ }
50
+
51
+ /**
52
+ * @deprecated ICodeDetailsLoader interface is moved to {@link @fluidframework/container-definition#ICodeDetailsLoader}
53
+ * to have code loading modules in one package. #8193
54
+ * Fluid code loader resolves a code module matching the document schema, i.e. code details, such as
55
+ * a package name and package version range.
56
+ * @alpha
57
+ */
58
+ export declare interface ICodeDetailsLoader extends Partial<IProvideFluidCodeDetailsComparer> {
59
+ /**
60
+ * Load the code module (package) that is capable to interact with the document.
61
+ *
62
+ * @param source - Code proposal that articulates the current schema the document is written in.
63
+ * @returns Code module entry point along with the code details associated with it.
64
+ */
65
+ load(source: IFluidCodeDetails): Promise<IFluidModuleWithDetails>;
66
+ }
67
+
68
+ /**
69
+ * IContainer interface that includes experimental features still under development.
70
+ * @internal
71
+ */
72
+ export declare interface IContainerExperimental extends IContainer {
73
+ /**
74
+ * Get pending state from container. WARNING: misuse of this API can result in duplicate op
75
+ * submission and potential document corruption. The blob returned MUST be deleted if and when this
76
+ * container emits a "connected" event.
77
+ * @returns serialized blob that can be passed to Loader.resolve()
78
+ */
79
+ getPendingLocalState?(): Promise<string>;
80
+ /**
81
+ * Closes the container and returns serialized local state intended to be
82
+ * given to a newly loaded container.
83
+ */
84
+ closeAndGetPendingLocalState?(stopBlobAttachingSignal?: AbortSignal): Promise<string>;
85
+ }
86
+
87
+ /**
88
+ * Subset of IDocumentStorageService which only supports createBlob() and readBlob(). This is used to support
89
+ * blobs in detached containers.
90
+ * @alpha
91
+ */
92
+ export declare type IDetachedBlobStorage = Pick<IDocumentStorageService, "createBlob" | "readBlob"> & {
93
+ size: number;
94
+ /**
95
+ * Return an array of all blob IDs present in storage
96
+ */
97
+ getBlobIds(): string[];
98
+ };
99
+
100
+ /**
101
+ * @deprecated IFluidModuleWithDetails interface is moved to
102
+ * {@link @fluidframework/container-definitions#IFluidModuleWithDetails}
103
+ * to have all the code loading modules in one package. #8193
104
+ * Encapsulates a module entry point with corresponding code details.
105
+ * @alpha
106
+ */
107
+ export declare interface IFluidModuleWithDetails {
108
+ /** Fluid code module that implements the runtime factory needed to instantiate the container runtime. */
109
+ module: IFluidModule;
110
+ /**
111
+ * Code details associated with the module. Represents a document schema this module supports.
112
+ * If the code loader implements the {@link @fluidframework/core-interfaces#IFluidCodeDetailsComparer} interface,
113
+ * it'll be called to determine whether the module code details satisfy the new code proposal in the quorum.
114
+ */
115
+ details: IFluidCodeDetails;
116
+ }
117
+
118
+ /**
119
+ * @alpha
120
+ */
121
+ export declare interface ILoaderOptions extends ILoaderOptions_2 {
122
+ summarizeProtocolTree?: boolean;
123
+ }
124
+
125
+ /**
126
+ * Services and properties necessary for creating a loader
127
+ * @alpha
128
+ */
129
+ export declare interface ILoaderProps {
130
+ /**
131
+ * The url resolver used by the loader for resolving external urls
132
+ * into Fluid urls such that the container specified by the
133
+ * external url can be loaded.
134
+ */
135
+ readonly urlResolver: IUrlResolver;
136
+ /**
137
+ * The document service factory take the Fluid url provided
138
+ * by the resolved url and constructs all the necessary services
139
+ * for communication with the container's server.
140
+ */
141
+ readonly documentServiceFactory: IDocumentServiceFactory;
142
+ /**
143
+ * The code loader handles loading the necessary code
144
+ * for running a container once it is loaded.
145
+ */
146
+ readonly codeLoader: ICodeDetailsLoader;
147
+ /**
148
+ * A property bag of options used by various layers
149
+ * to control features
150
+ */
151
+ readonly options?: ILoaderOptions;
152
+ /**
153
+ * Scope is provided to all container and is a set of shared
154
+ * services for container's to integrate with their host environment.
155
+ */
156
+ readonly scope?: FluidObject;
157
+ /**
158
+ * The logger that all telemetry should be pushed to.
159
+ */
160
+ readonly logger?: ITelemetryBaseLogger;
161
+ /**
162
+ * Blobs storage for detached containers.
163
+ */
164
+ readonly detachedBlobStorage?: IDetachedBlobStorage;
165
+ /**
166
+ * The configuration provider which may be used to control features.
167
+ */
168
+ readonly configProvider?: IConfigProviderBase;
169
+ /**
170
+ * Optional property for allowing the container to use a custom
171
+ * protocol implementation for handling the quorum and/or the audience.
172
+ */
173
+ readonly protocolHandlerBuilder?: ProtocolHandlerBuilder;
174
+ }
175
+
176
+ /**
177
+ * Services and properties used by and exposed by the loader
178
+ * @alpha
179
+ */
180
+ export declare interface ILoaderServices {
181
+ /**
182
+ * The url resolver used by the loader for resolving external urls
183
+ * into Fluid urls such that the container specified by the
184
+ * external url can be loaded.
185
+ */
186
+ readonly urlResolver: IUrlResolver;
187
+ /**
188
+ * The document service factory take the Fluid url provided
189
+ * by the resolved url and constructs all the necessary services
190
+ * for communication with the container's server.
191
+ */
192
+ readonly documentServiceFactory: IDocumentServiceFactory;
193
+ /**
194
+ * The code loader handles loading the necessary code
195
+ * for running a container once it is loaded.
196
+ */
197
+ readonly codeLoader: ICodeDetailsLoader;
198
+ /**
199
+ * A property bag of options used by various layers
200
+ * to control features
201
+ */
202
+ readonly options: ILoaderOptions;
203
+ /**
204
+ * Scope is provided to all container and is a set of shared
205
+ * services for container's to integrate with their host environment.
206
+ */
207
+ readonly scope: FluidObject;
208
+ /**
209
+ * The logger downstream consumers should construct their loggers from
210
+ */
211
+ readonly subLogger: ITelemetryLoggerExt;
212
+ /**
213
+ * Blobs storage for detached containers.
214
+ */
215
+ readonly detachedBlobStorage?: IDetachedBlobStorage;
216
+ /**
217
+ * Optional property for allowing the container to use a custom
218
+ * protocol implementation for handling the quorum and/or the audience.
219
+ */
220
+ readonly protocolHandlerBuilder?: ProtocolHandlerBuilder;
221
+ }
222
+
223
+ /**
224
+ * Interface to represent the parsed parts of IResolvedUrl.url to help
225
+ * in getting info about different parts of the url.
226
+ * May not be compatible or relevant for any Url Resolver
227
+ * @internal
228
+ */
229
+ export declare interface IParsedUrl {
230
+ /**
231
+ * It is combination of tenantid/docId part of the url.
232
+ */
233
+ id: string;
234
+ /**
235
+ * It is the deep link path in the url.
236
+ */
237
+ path: string;
238
+ /**
239
+ * Query string part of the url.
240
+ */
241
+ query: string;
242
+ /**
243
+ * Null means do not use snapshots, undefined means load latest snapshot
244
+ * otherwise it's version ID passed to IDocumentStorageService.getVersions() to figure out what snapshot to use.
245
+ * If needed, can add undefined which is treated by Container.load() as load latest snapshot.
246
+ */
247
+ version: string | null | undefined;
248
+ }
249
+
250
+ /**
251
+ * @alpha
252
+ */
253
+ export declare interface IProtocolHandler extends IProtocolHandler_2 {
254
+ readonly audience: IAudienceOwner;
255
+ processSignal(message: ISignalMessage): any;
256
+ }
257
+
258
+ /**
259
+ * Checks if the error is location redirection error.
260
+ * @param error - error whose type is to be determined.
261
+ * @returns `true` is the error is location redirection error, otherwise `false`.
262
+ * @internal
263
+ */
264
+ export declare function isLocationRedirectionError(error: any): error is ILocationRedirectionError;
265
+
266
+ /**
267
+ * Manages Fluid resource loading
268
+ * @alpha
269
+ */
270
+ export declare class Loader implements IHostLoader {
271
+ readonly services: ILoaderServices;
272
+ private readonly mc;
273
+ constructor(loaderProps: ILoaderProps);
274
+ /**
275
+ * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the Container's IFluidRouter/request.
276
+ */
277
+ get IFluidRouter(): IFluidRouter;
278
+ createDetachedContainer(codeDetails: IFluidCodeDetails, createDetachedProps?: {
279
+ canReconnect?: boolean;
280
+ clientDetailsOverride?: IClientDetails;
281
+ }): Promise<IContainer>;
282
+ rehydrateDetachedContainerFromSnapshot(snapshot: string, createDetachedProps?: {
283
+ canReconnect?: boolean;
284
+ clientDetailsOverride?: IClientDetails;
285
+ }): Promise<IContainer>;
286
+ resolve(request: IRequest, pendingLocalState?: string): Promise<IContainer>;
287
+ /**
288
+ * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the Container's IFluidRouter/request.
289
+ */
290
+ request(request: IRequest): Promise<IResponse>;
291
+ private resolveCore;
292
+ private loadContainer;
293
+ }
294
+
295
+ /**
296
+ * Function to be used for creating a protocol handler.
297
+ * @alpha
298
+ */
299
+ export declare type ProtocolHandlerBuilder = (attributes: IDocumentAttributes, snapshot: IQuorumSnapshot, sendProposal: (key: string, value: any) => number) => IProtocolHandler;
300
+
301
+ /**
302
+ * With an already-resolved container, we can request a component directly, without loading the container again
303
+ * @param container - a resolved container
304
+ * @returns component on the container
305
+ * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
306
+ * @internal
307
+ */
308
+ export declare function requestResolvedObjectFromContainer(container: IContainer, headers?: IRequestHeader): Promise<IResponse>;
309
+
310
+ /**
311
+ * Handles location redirection while fulfilling the loader request.
312
+ * @param api - Callback in which user can wrap the loader.resolve or loader.request call.
313
+ * @param request - request to be resolved.
314
+ * @param urlResolver - resolver used to resolve the url.
315
+ * @param logger - logger to send events.
316
+ * @returns Response from the API call.
317
+ * @internal
318
+ */
319
+ export declare function resolveWithLocationRedirectionHandling<T>(api: (request: IRequest) => Promise<T>, request: IRequest, urlResolver: IUrlResolver, logger?: ITelemetryBaseLogger): Promise<T>;
320
+
321
+ /**
322
+ * Utility api to parse the IResolvedUrl.url into specific parts like querystring, path to get
323
+ * deep link info etc.
324
+ * Warning - This function may not be compatible with any Url Resolver's resolved url. It works
325
+ * with urls of type: protocol://<string>/.../..?<querystring>
326
+ * @param url - This is the IResolvedUrl.url part of the resolved url.
327
+ * @returns The IParsedUrl representing the input URL, or undefined if the format was not supported
328
+ * @internal
329
+ */
330
+ export declare function tryParseCompatibleResolvedUrl(url: string): IParsedUrl | undefined;
331
+
332
+ /**
333
+ * Waits until container connects to delta storage and gets up-to-date.
334
+ *
335
+ * Useful when resolving URIs and hitting 404, due to container being loaded from (stale) snapshot and not being
336
+ * up to date. Host may chose to wait in such case and retry resolving URI.
337
+ *
338
+ * Warning: Will wait infinitely for connection to establish if there is no connection.
339
+ * May result in deadlock if Container.disconnect() is called and never followed by a call to Container.connect().
340
+ *
341
+ * @returns `true`: container is up to date, it processed all the ops that were know at the time of first connection.
342
+ *
343
+ * `false`: storage does not provide indication of how far the client is. Container processed all the ops known to it,
344
+ * but it maybe still behind.
345
+ *
346
+ * @throws an error beginning with `"Container closed"` if the container is closed before it catches up.
347
+ * @internal
348
+ */
349
+ export declare function waitContainerToCatchUp(container: IContainer): Promise<boolean>;
350
+
351
+ export { }
@@ -7,10 +7,10 @@ import { AttachState, IAudience, ICodeDetailsLoader, IContainer, IContainerEvent
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.
@@ -330,7 +332,7 @@ export declare class Container extends EventEmitterWithErrorHandling<IContainerE
330
332
  private initializeProtocolState;
331
333
  private captureProtocolSummary;
332
334
  private getCodeDetailsFromQuorum;
333
- private get client();
335
+ private static setupClient;
334
336
  /**
335
337
  * Returns true if connection is active, i.e. it's "write" connection and
336
338
  * container runtime was notified about this connection (i.e. we are up-to-date and could send ops).
@@ -369,7 +371,7 @@ export declare class Container extends EventEmitterWithErrorHandling<IContainerE
369
371
  }
370
372
  /**
371
373
  * IContainer interface that includes experimental features still under development.
372
- * @alpha
374
+ * @internal
373
375
  */
374
376
  export interface IContainerExperimental extends IContainer {
375
377
  /**
@@ -377,15 +379,11 @@ export interface IContainerExperimental extends IContainer {
377
379
  * submission and potential document corruption. The blob returned MUST be deleted if and when this
378
380
  * container emits a "connected" event.
379
381
  * @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
382
  */
383
383
  getPendingLocalState?(): Promise<string>;
384
384
  /**
385
385
  * Closes the container and returns serialized local state intended to be
386
386
  * given to a newly loaded container.
387
- * @alpha
388
- * {@link https://github.com/microsoft/FluidFramework/blob/main/packages/loader/container-loader/closeAndGetPendingLocalState.md}
389
387
  */
390
388
  closeAndGetPendingLocalState?(stopBlobAttachingSignal?: AbortSignal): Promise<string>;
391
389
  }
@@ -1 +1 @@
1
- {"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../src/container.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAEN,oBAAoB,EAEpB,QAAQ,EACR,SAAS,EAET,YAAY,EACZ,WAAW,EAEX,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACN,WAAW,EAEX,SAAS,EAET,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,aAAa,EACb,iBAAiB,EAOjB,YAAY,EAGZ,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAEN,uBAAuB,EAEvB,YAAY,EAEZ,YAAY,EACZ,MAAM,oCAAoC,CAAC;AAU5C,OAAO,EAEN,cAAc,EAGd,gBAAgB,EAChB,cAAc,EAGd,yBAAyB,EAGzB,aAAa,EAMb,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAEN,6BAA6B,EAQ7B,mBAAmB,EAInB,MAAM,iCAAiC,CAAC;AAWzC,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAkB,MAAM,UAAU,CAAC;AAEhF,OAAO,EAIN,yBAAyB,EACzB,MAAM,2BAA2B,CAAC;AAUnC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAGN,sBAAsB,EAE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kD5B,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.
@@ -412,11 +413,12 @@ export class Container extends EventEmitterWithErrorHandling {
412
413
  ...createParamOverrides,
413
414
  });
414
415
  };
416
+ this._containerId = uuid();
417
+ this.client = Container.setupClient(this._containerId, this.options, this.clientDetailsOverride);
415
418
  // Create logger for data stores to use
416
419
  const type = this.client.details.type;
417
420
  const interactive = this.client.details.capabilities.interactive;
418
421
  const clientType = `${interactive ? "interactive" : "noninteractive"}${type !== undefined && type !== "" ? `/${type}` : ""}`;
419
- this._containerId = uuid();
420
422
  // Need to use the property getter for docId because for detached flow we don't have the docId initially.
421
423
  // We assign the id later so property getter is used.
422
424
  this.subLogger = createChildLogger({
@@ -641,7 +643,6 @@ export class Container extends EventEmitterWithErrorHandling {
641
643
  // runtime matches pending ops to successful ones by clientId and client seq num, so we need to close the
642
644
  // container at the same time we get pending state, otherwise this container could reconnect and resubmit with
643
645
  // 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
646
  const pendingState = await this.getPendingLocalStateCore({
646
647
  notifyImminentClosure: true,
647
648
  stopBlobAttachingSignal,
@@ -1249,9 +1250,10 @@ export class Container extends EventEmitterWithErrorHandling {
1249
1250
  const pkg = getCodeProposal(quorum);
1250
1251
  return pkg;
1251
1252
  }
1252
- get client() {
1253
- const client = this.options?.client !== undefined
1254
- ? this.options.client
1253
+ static setupClient(containerId, options, clientDetailsOverride) {
1254
+ const loaderOptionsClient = structuredClone(options?.client);
1255
+ const client = loaderOptionsClient !== undefined
1256
+ ? loaderOptionsClient
1255
1257
  : {
1256
1258
  details: {
1257
1259
  capabilities: { interactive: true },
@@ -1261,20 +1263,20 @@ export class Container extends EventEmitterWithErrorHandling {
1261
1263
  scopes: [],
1262
1264
  user: { id: "" },
1263
1265
  };
1264
- if (this.clientDetailsOverride !== undefined) {
1266
+ if (clientDetailsOverride !== undefined) {
1265
1267
  client.details = {
1266
1268
  ...client.details,
1267
- ...this.clientDetailsOverride,
1269
+ ...clientDetailsOverride,
1268
1270
  capabilities: {
1269
1271
  ...client.details.capabilities,
1270
- ...this.clientDetailsOverride.capabilities,
1272
+ ...clientDetailsOverride?.capabilities,
1271
1273
  },
1272
1274
  };
1273
1275
  }
1274
1276
  client.details.environment = [
1275
1277
  client.details.environment,
1276
1278
  ` loaderVersion:${pkgVersion}`,
1277
- ` containerId:${this._containerId}`,
1279
+ ` containerId:${containerId}`,
1278
1280
  ].join(";");
1279
1281
  return client;
1280
1282
  }