@fluidframework/container-definitions 0.49.1000-63433 → 0.49.1000-69584

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 (53) hide show
  1. package/BREAKING.md +27 -6
  2. package/api-report/container-definitions.api.md +10 -6
  3. package/dist/browserPackage.d.ts.map +1 -1
  4. package/dist/browserPackage.js +1 -1
  5. package/dist/browserPackage.js.map +1 -1
  6. package/dist/deltas.d.ts +0 -2
  7. package/dist/deltas.d.ts.map +1 -1
  8. package/dist/deltas.js.map +1 -1
  9. package/dist/fluidPackage.d.ts.map +1 -1
  10. package/dist/fluidPackage.js +1 -1
  11. package/dist/fluidPackage.js.map +1 -1
  12. package/dist/legacy/index.d.ts.map +1 -1
  13. package/dist/legacy/index.js.map +1 -1
  14. package/dist/loader.d.ts +20 -7
  15. package/dist/loader.d.ts.map +1 -1
  16. package/dist/loader.js.map +1 -1
  17. package/dist/proxyLoader.d.ts +3 -0
  18. package/dist/proxyLoader.d.ts.map +1 -1
  19. package/dist/proxyLoader.js.map +1 -1
  20. package/dist/runtime.d.ts +6 -0
  21. package/dist/runtime.d.ts.map +1 -1
  22. package/dist/runtime.js.map +1 -1
  23. package/dist/tokenProvider.d.ts.map +1 -1
  24. package/dist/tokenProvider.js.map +1 -1
  25. package/lib/browserPackage.d.ts.map +1 -1
  26. package/lib/browserPackage.js.map +1 -1
  27. package/lib/deltas.d.ts +0 -2
  28. package/lib/deltas.d.ts.map +1 -1
  29. package/lib/deltas.js.map +1 -1
  30. package/lib/fluidPackage.d.ts.map +1 -1
  31. package/lib/fluidPackage.js.map +1 -1
  32. package/lib/legacy/index.d.ts.map +1 -1
  33. package/lib/legacy/index.js.map +1 -1
  34. package/lib/loader.d.ts +20 -7
  35. package/lib/loader.d.ts.map +1 -1
  36. package/lib/loader.js.map +1 -1
  37. package/lib/proxyLoader.d.ts +3 -0
  38. package/lib/proxyLoader.d.ts.map +1 -1
  39. package/lib/proxyLoader.js.map +1 -1
  40. package/lib/runtime.d.ts +6 -0
  41. package/lib/runtime.d.ts.map +1 -1
  42. package/lib/runtime.js.map +1 -1
  43. package/lib/tokenProvider.d.ts.map +1 -1
  44. package/lib/tokenProvider.js.map +1 -1
  45. package/package.json +19 -5
  46. package/src/browserPackage.ts +1 -1
  47. package/src/deltas.ts +1 -4
  48. package/src/fluidPackage.ts +2 -2
  49. package/src/legacy/index.ts +1 -1
  50. package/src/loader.ts +33 -13
  51. package/src/proxyLoader.ts +3 -0
  52. package/src/runtime.ts +6 -0
  53. 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 document is no longer connected to the delta server
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 document has an inbound connection but is still pending for outbound deltas
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 document is fully connected
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 = ConnectionState.Disconnected | ConnectionState.Connecting | ConnectionState.Connected;
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,7 +269,7 @@ export interface IContainer extends IEventProvider<IContainerEvents>, IFluidRout
249
269
  request(request: IRequest): Promise<IResponse>;
250
270
 
251
271
  /**
252
- * Provides the current connected state of the container
272
+ * Provides the current state of the container's connection to the ordering service
253
273
  */
254
274
  readonly connectionState: ConnectionState;
255
275
 
@@ -264,12 +284,12 @@ export interface IContainer extends IEventProvider<IContainerEvents>, IFluidRout
264
284
  /**
265
285
  * Attempts to connect the container to the delta stream and process ops
266
286
  */
267
- connect?(): void;
287
+ connect(): void;
268
288
 
269
289
  /**
270
290
  * Disconnects the container from the delta stream and stops processing ops
271
291
  */
272
- disconnect?(): void;
292
+ disconnect(): void;
273
293
 
274
294
  /**
275
295
  * Dictates whether or not the current container will automatically attempt to reconnect to the delta stream
@@ -393,7 +413,7 @@ export type ILoaderOptions = {
393
413
  /**
394
414
  * Max time(in ms) container will wait for a leave message of a disconnected client.
395
415
  */
396
- maxClientLeaveWaitTime?: number,
416
+ maxClientLeaveWaitTime?: number;
397
417
  };
398
418
 
399
419
  /**
@@ -443,7 +463,7 @@ export interface IContainerLoadMode {
443
463
  * Also there might be a lot of trailing ops and applying them might take time, so hosts are
444
464
  * recommended to have some progress UX / cancellation built into loading flow when using this option.
445
465
  */
446
- | "all"
466
+ | "all";
447
467
  deltaConnection?:
448
468
  /*
449
469
  * Connection to delta stream is made only when Container.resume() call is made. Op processing
@@ -462,7 +482,7 @@ export interface IContainerLoadMode {
462
482
  * Ops processing is enabled and ops are flowing through the system.
463
483
  * Default value.
464
484
  */
465
- | undefined
485
+ | undefined;
466
486
  }
467
487
 
468
488
  /**
@@ -509,6 +529,6 @@ export interface IPendingLocalState {
509
529
  * when attaching.
510
530
  */
511
531
  export interface ISnapshotTreeWithBlobContents extends ISnapshotTree {
512
- blobsContents: {[path: string]: ArrayBufferLike},
513
- trees: {[path: string]: ISnapshotTreeWithBlobContents},
532
+ blobsContents: { [path: string]: ArrayBufferLike },
533
+ trees: { [path: string]: ISnapshotTreeWithBlobContents },
514
534
  }
@@ -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";
@@ -10,5 +10,5 @@ export interface IProvideFluidTokenProvider {
10
10
  }
11
11
 
12
12
  export interface IFluidTokenProvider extends IProvideFluidTokenProvider {
13
- intelligence: { [service: string]: any };
13
+ intelligence: { [service: string]: any; };
14
14
  }