@fluidframework/container-definitions 0.49.1000-64278 → 0.49.1000-69950
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.
- package/BREAKING.md +27 -6
- package/api-report/container-definitions.api.md +8 -8
- package/dist/browserPackage.d.ts.map +1 -1
- package/dist/browserPackage.js.map +1 -1
- package/dist/deltas.d.ts.map +1 -1
- package/dist/deltas.js.map +1 -1
- package/dist/fluidPackage.d.ts.map +1 -1
- package/dist/fluidPackage.js.map +1 -1
- package/dist/legacy/index.d.ts.map +1 -1
- package/dist/legacy/index.js.map +1 -1
- package/dist/loader.d.ts +19 -29
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js.map +1 -1
- package/dist/proxyLoader.d.ts +3 -0
- package/dist/proxyLoader.d.ts.map +1 -1
- package/dist/proxyLoader.js.map +1 -1
- package/dist/runtime.d.ts +6 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js.map +1 -1
- package/dist/tokenProvider.d.ts.map +1 -1
- package/dist/tokenProvider.js.map +1 -1
- package/lib/browserPackage.d.ts.map +1 -1
- package/lib/browserPackage.js.map +1 -1
- package/lib/deltas.d.ts.map +1 -1
- package/lib/deltas.js.map +1 -1
- package/lib/fluidPackage.d.ts.map +1 -1
- package/lib/fluidPackage.js.map +1 -1
- package/lib/legacy/index.d.ts.map +1 -1
- package/lib/legacy/index.js.map +1 -1
- package/lib/loader.d.ts +19 -29
- package/lib/loader.d.ts.map +1 -1
- package/lib/loader.js.map +1 -1
- package/lib/proxyLoader.d.ts +3 -0
- package/lib/proxyLoader.d.ts.map +1 -1
- package/lib/proxyLoader.js.map +1 -1
- package/lib/runtime.d.ts +6 -0
- package/lib/runtime.d.ts.map +1 -1
- package/lib/runtime.js.map +1 -1
- package/lib/tokenProvider.d.ts.map +1 -1
- package/lib/tokenProvider.js.map +1 -1
- package/package.json +9 -7
- package/src/browserPackage.ts +1 -1
- package/src/deltas.ts +1 -1
- package/src/fluidPackage.ts +2 -2
- package/src/legacy/index.ts +1 -1
- package/src/loader.ts +35 -41
- package/src/proxyLoader.ts +3 -0
- package/src/runtime.ts +6 -0
- package/src/tokenProvider.ts +1 -1
package/src/loader.ts
CHANGED
|
@@ -128,20 +128,35 @@ export interface IContainerEvents extends IEvent {
|
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
130
|
* Namespace for the different connection states a container can be in
|
|
131
|
+
* PLEASE NOTE: The sequence of the numerical values does no correspond to the typical connection state progression
|
|
131
132
|
*/
|
|
132
133
|
export namespace ConnectionState {
|
|
133
134
|
/**
|
|
134
|
-
* The
|
|
135
|
+
* The container is not connected to the delta server
|
|
136
|
+
* Note - When in this state the container may be about to reconnect,
|
|
137
|
+
* or may remain disconnected until explicitly told to connect.
|
|
135
138
|
*/
|
|
136
139
|
export type Disconnected = 0;
|
|
137
140
|
|
|
138
141
|
/**
|
|
139
|
-
* The
|
|
142
|
+
* The container is disconnected but actively trying to establish a new connection
|
|
143
|
+
* PLEASE NOTE that this numerical value falls out of the order you may expect for this state
|
|
144
|
+
*/
|
|
145
|
+
export type EstablishingConnection = 3;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* The container has an inbound connection only, and is catching up to the latest known state from the service.
|
|
149
|
+
*/
|
|
150
|
+
export type CatchingUp = 1;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* @see ConnectionState.CatchingUp, which is the new name for this state.
|
|
154
|
+
* @deprecated - This state itself is not gone, just being renamed. Please use ConnectionState.CatchingUp.
|
|
140
155
|
*/
|
|
141
156
|
export type Connecting = 1;
|
|
142
157
|
|
|
143
158
|
/**
|
|
144
|
-
* The
|
|
159
|
+
* The container is fully connected and syncing
|
|
145
160
|
*/
|
|
146
161
|
export type Connected = 2;
|
|
147
162
|
}
|
|
@@ -149,7 +164,12 @@ export namespace ConnectionState {
|
|
|
149
164
|
/**
|
|
150
165
|
* Type defining the different states of connectivity a container can be in
|
|
151
166
|
*/
|
|
152
|
-
export type ConnectionState =
|
|
167
|
+
export type ConnectionState =
|
|
168
|
+
| ConnectionState.Disconnected
|
|
169
|
+
| ConnectionState.EstablishingConnection
|
|
170
|
+
| ConnectionState.CatchingUp
|
|
171
|
+
| ConnectionState.Connecting
|
|
172
|
+
| ConnectionState.Connected;
|
|
153
173
|
|
|
154
174
|
/**
|
|
155
175
|
* The Host's view of the Container and its connection to storage
|
|
@@ -219,7 +239,7 @@ export interface IContainer extends IEventProvider<IContainerEvents>, IFluidRout
|
|
|
219
239
|
* be true when the proposal is accepted, and false if
|
|
220
240
|
* the proposal is rejected.
|
|
221
241
|
*/
|
|
222
|
-
proposeCodeDetails(codeDetails: IFluidCodeDetails): Promise<boolean
|
|
242
|
+
proposeCodeDetails(codeDetails: IFluidCodeDetails): Promise<boolean>;
|
|
223
243
|
|
|
224
244
|
/**
|
|
225
245
|
* Attaches the Container to the Container specified by the given Request.
|
|
@@ -249,18 +269,10 @@ export interface IContainer extends IEventProvider<IContainerEvents>, IFluidRout
|
|
|
249
269
|
request(request: IRequest): Promise<IResponse>;
|
|
250
270
|
|
|
251
271
|
/**
|
|
252
|
-
* Provides the current
|
|
272
|
+
* Provides the current state of the container's connection to the ordering service
|
|
253
273
|
*/
|
|
254
274
|
readonly connectionState: ConnectionState;
|
|
255
275
|
|
|
256
|
-
/**
|
|
257
|
-
* Boolean indicating whether the container is currently connected or not
|
|
258
|
-
* @deprecated - 0.58, This API will be removed in 1.0
|
|
259
|
-
* Check `connectionState === ConnectionState.Connected` instead
|
|
260
|
-
* See https://github.com/microsoft/FluidFramework/issues/9167 for context
|
|
261
|
-
*/
|
|
262
|
-
readonly connected: boolean;
|
|
263
|
-
|
|
264
276
|
/**
|
|
265
277
|
* Attempts to connect the container to the delta stream and process ops
|
|
266
278
|
*/
|
|
@@ -271,24 +283,6 @@ export interface IContainer extends IEventProvider<IContainerEvents>, IFluidRout
|
|
|
271
283
|
*/
|
|
272
284
|
disconnect(): void;
|
|
273
285
|
|
|
274
|
-
/**
|
|
275
|
-
* Dictates whether or not the current container will automatically attempt to reconnect to the delta stream
|
|
276
|
-
* after receiving a disconnect event
|
|
277
|
-
* @param reconnect - Boolean indicating if reconnect should automatically occur
|
|
278
|
-
* @deprecated - 0.58, This API will be removed in 1.0
|
|
279
|
-
* Use `connect()` and `disconnect()` instead of `setAutoReconnect(true)` and `setAutoReconnect(false)` respectively
|
|
280
|
-
* See https://github.com/microsoft/FluidFramework/issues/9167 for context
|
|
281
|
-
*/
|
|
282
|
-
setAutoReconnect?(reconnect: boolean): void;
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* Have the container attempt to resume processing ops
|
|
286
|
-
* @deprecated - 0.58, This API will be removed in 1.0
|
|
287
|
-
* Use `connect()` instead
|
|
288
|
-
* See https://github.com/microsoft/FluidFramework/issues/9167 for context
|
|
289
|
-
*/
|
|
290
|
-
resume?(): void;
|
|
291
|
-
|
|
292
286
|
/**
|
|
293
287
|
* The audience information for all clients currently associated with the document in the current session
|
|
294
288
|
*/
|
|
@@ -296,7 +290,7 @@ export interface IContainer extends IEventProvider<IContainerEvents>, IFluidRout
|
|
|
296
290
|
|
|
297
291
|
/**
|
|
298
292
|
* The server provided ID of the client.
|
|
299
|
-
* Set once this.
|
|
293
|
+
* Set once this.connectionState === ConnectionState.Connected is true, otherwise undefined
|
|
300
294
|
* @alpha
|
|
301
295
|
*/
|
|
302
296
|
readonly clientId?: string | undefined;
|
|
@@ -393,7 +387,7 @@ export type ILoaderOptions = {
|
|
|
393
387
|
/**
|
|
394
388
|
* Max time(in ms) container will wait for a leave message of a disconnected client.
|
|
395
389
|
*/
|
|
396
|
-
maxClientLeaveWaitTime?: number
|
|
390
|
+
maxClientLeaveWaitTime?: number;
|
|
397
391
|
};
|
|
398
392
|
|
|
399
393
|
/**
|
|
@@ -443,15 +437,15 @@ export interface IContainerLoadMode {
|
|
|
443
437
|
* Also there might be a lot of trailing ops and applying them might take time, so hosts are
|
|
444
438
|
* recommended to have some progress UX / cancellation built into loading flow when using this option.
|
|
445
439
|
*/
|
|
446
|
-
| "all"
|
|
440
|
+
| "all";
|
|
447
441
|
deltaConnection?:
|
|
448
442
|
/*
|
|
449
|
-
* Connection to delta stream is made only when Container.
|
|
450
|
-
* is paused (when container is returned from Loader.resolve()) until Container.
|
|
443
|
+
* Connection to delta stream is made only when Container.connect() call is made. Op processing
|
|
444
|
+
* is paused (when container is returned from Loader.resolve()) until Container.connect() call is made.
|
|
451
445
|
*/
|
|
452
446
|
| "none"
|
|
453
447
|
/*
|
|
454
|
-
* Connection to delta stream is made only when Container.
|
|
448
|
+
* Connection to delta stream is made only when Container.connect() call is made.
|
|
455
449
|
* Op fetching from storage is performed and ops are applied as they come in.
|
|
456
450
|
* This is useful option if connection to delta stream is expensive and thus it's beneficial to move it
|
|
457
451
|
* out from critical boot sequence, but it's beneficial to allow catch up to happen as fast as possible.
|
|
@@ -462,7 +456,7 @@ export interface IContainerLoadMode {
|
|
|
462
456
|
* Ops processing is enabled and ops are flowing through the system.
|
|
463
457
|
* Default value.
|
|
464
458
|
*/
|
|
465
|
-
| undefined
|
|
459
|
+
| undefined;
|
|
466
460
|
}
|
|
467
461
|
|
|
468
462
|
/**
|
|
@@ -509,6 +503,6 @@ export interface IPendingLocalState {
|
|
|
509
503
|
* when attaching.
|
|
510
504
|
*/
|
|
511
505
|
export interface ISnapshotTreeWithBlobContents extends ISnapshotTree {
|
|
512
|
-
blobsContents: {[path: string]: ArrayBufferLike},
|
|
513
|
-
trees: {[path: string]: ISnapshotTreeWithBlobContents},
|
|
506
|
+
blobsContents: { [path: string]: ArrayBufferLike },
|
|
507
|
+
trees: { [path: string]: ISnapshotTreeWithBlobContents },
|
|
514
508
|
}
|
package/src/proxyLoader.ts
CHANGED
|
@@ -8,15 +8,18 @@ import { ILoader, ILoaderOptions } from "./loader";
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Abstraction layer to support different Loaders in different Node execution contexts
|
|
11
|
+
* @deprecated Not recommended for general use and will be removed in an upcoming release.
|
|
11
12
|
*/
|
|
12
13
|
export interface IProxyLoaderFactory {
|
|
13
14
|
/**
|
|
14
15
|
* Loader environment
|
|
16
|
+
* @deprecated Not recommended for general use and will be removed in an upcoming release.
|
|
15
17
|
*/
|
|
16
18
|
environment: string;
|
|
17
19
|
|
|
18
20
|
/**
|
|
19
21
|
* Returns an instance of ILoader loaded inside an execution context.
|
|
22
|
+
* @deprecated Not recommended for general use and will be removed in an upcoming release.
|
|
20
23
|
*/
|
|
21
24
|
createProxyLoader(
|
|
22
25
|
id: string,
|
package/src/runtime.ts
CHANGED
|
@@ -167,6 +167,12 @@ export interface IContainerContext extends IDisposable {
|
|
|
167
167
|
getLoadedFromVersion(): IVersion | undefined;
|
|
168
168
|
|
|
169
169
|
updateDirtyContainerState(dirty: boolean): void;
|
|
170
|
+
/**
|
|
171
|
+
* WARNING: this id is meant for telemetry usages ONLY, not recommended for other consumption
|
|
172
|
+
* This id is not supposed to be exposed anywhere else. It is dependant on usage or drivers
|
|
173
|
+
* and scenarios which can change in the future.
|
|
174
|
+
*/
|
|
175
|
+
readonly id: string;
|
|
170
176
|
}
|
|
171
177
|
|
|
172
178
|
export const IRuntimeFactory: keyof IProvideRuntimeFactory = "IRuntimeFactory";
|
package/src/tokenProvider.ts
CHANGED