@fluidframework/container-definitions 0.43.0 → 0.45.0-49378

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/container-definitions",
3
- "version": "0.43.0",
3
+ "version": "0.45.0-49378",
4
4
  "description": "Fluid container definitions",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": "https://github.com/microsoft/FluidFramework",
@@ -27,7 +27,7 @@
27
27
  "ci:test:coverage": "echo No test for this package",
28
28
  "clean": "rimraf dist lib *.tsbuildinfo *.build.log",
29
29
  "eslint": "eslint --format stylish src",
30
- "eslint:fix": "eslint --format stylish src --fix",
30
+ "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
31
31
  "lint": "npm run eslint",
32
32
  "lint:fix": "npm run eslint:fix",
33
33
  "tsc": "tsc",
@@ -38,37 +38,40 @@
38
38
  "dependencies": {
39
39
  "@fluidframework/common-definitions": "^0.20.0",
40
40
  "@fluidframework/core-interfaces": "^0.41.0",
41
- "@fluidframework/driver-definitions": "^0.43.0",
41
+ "@fluidframework/driver-definitions": "^0.44.0-0",
42
42
  "@fluidframework/protocol-definitions": "^0.1026.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@fluidframework/build-common": "^0.23.0",
46
- "@fluidframework/build-tools": "^0.2.44827",
46
+ "@fluidframework/build-tools": "^0.2.49276",
47
47
  "@fluidframework/container-definitions-0.39.8": "npm:@fluidframework/container-definitions@0.39.8",
48
48
  "@fluidframework/container-definitions-0.40.0": "npm:@fluidframework/container-definitions@0.40.0",
49
49
  "@fluidframework/container-definitions-0.41.0": "npm:@fluidframework/container-definitions@0.41.0",
50
50
  "@fluidframework/container-definitions-0.42.0": "npm:@fluidframework/container-definitions@0.42.0",
51
- "@fluidframework/eslint-config-fluid": "^0.24.0",
51
+ "@fluidframework/container-definitions-0.43.0": "npm:@fluidframework/container-definitions@0.43.0",
52
+ "@fluidframework/container-definitions-0.44.0": "npm:@fluidframework/container-definitions@0.44.0",
53
+ "@fluidframework/eslint-config-fluid": "^0.25.0",
52
54
  "@microsoft/api-extractor": "^7.16.1",
55
+ "@rushstack/eslint-config": "^2.5.1",
53
56
  "@types/mocha": "^8.2.2",
54
- "@types/node": "^12.19.0",
55
- "@typescript-eslint/eslint-plugin": "~4.14.0",
56
- "@typescript-eslint/parser": "~4.14.0",
57
+ "@types/node": "^14.18.0",
58
+ "@typescript-eslint/eslint-plugin": "~5.9.0",
59
+ "@typescript-eslint/parser": "~5.9.0",
57
60
  "concurrently": "^6.2.0",
58
61
  "copyfiles": "^2.1.0",
59
- "eslint": "~7.18.0",
62
+ "eslint": "~8.6.0",
63
+ "eslint-plugin-editorconfig": "~3.2.0",
60
64
  "eslint-plugin-eslint-comments": "~3.2.0",
61
- "eslint-plugin-import": "~2.22.1",
65
+ "eslint-plugin-import": "~2.25.4",
62
66
  "eslint-plugin-no-null": "~1.0.2",
63
- "eslint-plugin-prefer-arrow": "~1.2.2",
64
- "eslint-plugin-react": "~7.22.0",
65
- "eslint-plugin-unicorn": "~26.0.1",
67
+ "eslint-plugin-react": "~7.28.0",
68
+ "eslint-plugin-unicorn": "~40.0.0",
66
69
  "rimraf": "^2.6.2",
67
70
  "typescript": "~4.1.3",
68
71
  "typescript-formatter": "7.1.0"
69
72
  },
70
73
  "typeValidation": {
71
- "version": "0.43.0",
74
+ "version": "0.45.0",
72
75
  "broken": {
73
76
  "0.39.8": {
74
77
  "EnumDeclaration_ContainerErrorType": {
@@ -131,6 +134,18 @@
131
134
  }
132
135
  },
133
136
  "0.40.0": {
137
+ "InterfaceDeclaration_IUsageError": {
138
+ "backCompat": false
139
+ },
140
+ "InterfaceDeclaration_IThrottlingWarning": {
141
+ "backCompat": false
142
+ },
143
+ "InterfaceDeclaration_IGenericError": {
144
+ "backCompat": false
145
+ },
146
+ "EnumDeclaration_ContainerErrorType": {
147
+ "backCompat": false
148
+ },
134
149
  "InterfaceDeclaration_ICodeLoader": {
135
150
  "forwardCompat": false,
136
151
  "backCompat": false
@@ -152,16 +167,20 @@
152
167
  "backCompat": false
153
168
  },
154
169
  "InterfaceDeclaration_ILoader": {
155
- "backCompat": false
170
+ "backCompat": false,
171
+ "forwardCompat": false
156
172
  },
157
173
  "InterfaceDeclaration_IProxyLoaderFactory": {
158
- "backCompat": false
174
+ "backCompat": false,
175
+ "forwardCompat": false
159
176
  },
160
177
  "InterfaceDeclaration_IHostLoader": {
161
- "backCompat": false
178
+ "backCompat": false,
179
+ "forwardCompat": false
162
180
  },
163
181
  "InterfaceDeclaration_IContainer": {
164
- "backCompat": false
182
+ "backCompat": false,
183
+ "forwardCompat": false
165
184
  },
166
185
  "InterfaceDeclaration_IDeltaManager": {
167
186
  "backCompat": false
@@ -171,57 +190,232 @@
171
190
  }
172
191
  },
173
192
  "0.41.0": {
174
- "InterfaceDeclaration_ILoader": {
193
+ "InterfaceDeclaration_IUsageError": {
175
194
  "backCompat": false
176
195
  },
177
- "InterfaceDeclaration_IProxyLoaderFactory": {
196
+ "InterfaceDeclaration_IThrottlingWarning": {
178
197
  "backCompat": false
179
198
  },
180
- "InterfaceDeclaration_IHostLoader": {
199
+ "InterfaceDeclaration_IGenericError": {
181
200
  "backCompat": false
182
201
  },
183
- "InterfaceDeclaration_IFluidModule": {
202
+ "EnumDeclaration_ContainerErrorType": {
184
203
  "backCompat": false
185
204
  },
205
+ "InterfaceDeclaration_ILoader": {
206
+ "backCompat": false,
207
+ "forwardCompat": false
208
+ },
209
+ "InterfaceDeclaration_IProxyLoaderFactory": {
210
+ "backCompat": false,
211
+ "forwardCompat": false
212
+ },
213
+ "InterfaceDeclaration_IHostLoader": {
214
+ "backCompat": false,
215
+ "forwardCompat": false
216
+ },
217
+ "InterfaceDeclaration_IFluidModule": {
218
+ "backCompat": false,
219
+ "forwardCompat": false
220
+ },
186
221
  "InterfaceDeclaration_IContainerContext": {
187
- "backCompat": false
222
+ "backCompat": false,
223
+ "forwardCompat": false
188
224
  },
189
225
  "InterfaceDeclaration_IContainer": {
190
- "backCompat": false
226
+ "backCompat": false,
227
+ "forwardCompat": false
191
228
  },
192
229
  "InterfaceDeclaration_ICodeLoader": {
193
- "backCompat": false
230
+ "backCompat": false,
231
+ "forwardCompat": false
194
232
  },
195
233
  "InterfaceDeclaration_IDeltaManager": {
196
234
  "backCompat": false
197
235
  },
198
236
  "InterfaceDeclaration_IConnectionDetails": {
199
237
  "backCompat": false
238
+ },
239
+ "InterfaceDeclaration_IProvideRuntimeFactory": {
240
+ "backCompat": false,
241
+ "forwardCompat": false
242
+ },
243
+ "InterfaceDeclaration_IRuntimeFactory": {
244
+ "backCompat": false,
245
+ "forwardCompat": false
200
246
  }
201
247
  },
202
248
  "0.42.0": {
203
- "InterfaceDeclaration_ILoader": {
249
+ "InterfaceDeclaration_IUsageError": {
204
250
  "backCompat": false
205
251
  },
206
- "InterfaceDeclaration_IProxyLoaderFactory": {
252
+ "InterfaceDeclaration_IThrottlingWarning": {
253
+ "backCompat": false
254
+ },
255
+ "InterfaceDeclaration_IGenericError": {
256
+ "backCompat": false
257
+ },
258
+ "EnumDeclaration_ContainerErrorType": {
207
259
  "backCompat": false
208
260
  },
261
+ "InterfaceDeclaration_ILoader": {
262
+ "backCompat": false,
263
+ "forwardCompat": false
264
+ },
265
+ "InterfaceDeclaration_IProxyLoaderFactory": {
266
+ "backCompat": false,
267
+ "forwardCompat": false
268
+ },
209
269
  "InterfaceDeclaration_IHostLoader": {
270
+ "backCompat": false,
271
+ "forwardCompat": false
272
+ },
273
+ "InterfaceDeclaration_IContainerContext": {
274
+ "backCompat": false,
275
+ "forwardCompat": false
276
+ },
277
+ "InterfaceDeclaration_IContainer": {
278
+ "backCompat": false,
279
+ "forwardCompat": false
280
+ },
281
+ "InterfaceDeclaration_IProvideLoader": {
282
+ "backCompat": false,
283
+ "forwardCompat": false
284
+ },
285
+ "InterfaceDeclaration_IProvideRuntimeFactory": {
286
+ "backCompat": false,
287
+ "forwardCompat": false
288
+ },
289
+ "InterfaceDeclaration_IRuntimeFactory": {
290
+ "backCompat": false,
291
+ "forwardCompat": false
292
+ },
293
+ "InterfaceDeclaration_IDeltaManager": {
210
294
  "backCompat": false
211
295
  },
296
+ "InterfaceDeclaration_IConnectionDetails": {
297
+ "backCompat": false
298
+ },
299
+ "InterfaceDeclaration_ICodeLoader": {
300
+ "backCompat": false
301
+ },
302
+ "InterfaceDeclaration_IFluidModule": {
303
+ "backCompat": false
304
+ }
305
+ },
306
+ "0.43.0": {
307
+ "InterfaceDeclaration_IUsageError": {
308
+ "backCompat": false
309
+ },
310
+ "InterfaceDeclaration_IThrottlingWarning": {
311
+ "backCompat": false
312
+ },
313
+ "InterfaceDeclaration_IGenericError": {
314
+ "backCompat": false
315
+ },
316
+ "EnumDeclaration_ContainerErrorType": {
317
+ "backCompat": false
318
+ },
319
+ "InterfaceDeclaration_ILoader": {
320
+ "backCompat": false,
321
+ "forwardCompat": false
322
+ },
323
+ "InterfaceDeclaration_IHostLoader": {
324
+ "backCompat": false,
325
+ "forwardCompat": false
326
+ },
212
327
  "InterfaceDeclaration_IContainerContext": {
328
+ "backCompat": false,
329
+ "forwardCompat": false
330
+ },
331
+ "InterfaceDeclaration_IContainer": {
332
+ "backCompat": false,
333
+ "forwardCompat": false
334
+ },
335
+ "InterfaceDeclaration_IProvideLoader": {
336
+ "backCompat": false,
337
+ "forwardCompat": false
338
+ },
339
+ "InterfaceDeclaration_IProxyLoaderFactory": {
340
+ "backCompat": false,
341
+ "forwardCompat": false
342
+ },
343
+ "InterfaceDeclaration_ICodeDetailsLoader": {
344
+ "backCompat": false
345
+ },
346
+ "InterfaceDeclaration_ICodeLoader": {
347
+ "backCompat": false
348
+ },
349
+ "InterfaceDeclaration_IFluidModule": {
350
+ "backCompat": false
351
+ },
352
+ "InterfaceDeclaration_IFluidModuleWithDetails": {
353
+ "backCompat": false
354
+ },
355
+ "InterfaceDeclaration_IProvideRuntimeFactory": {
356
+ "backCompat": false,
357
+ "forwardCompat": false
358
+ },
359
+ "InterfaceDeclaration_IRuntimeFactory": {
360
+ "backCompat": false,
361
+ "forwardCompat": false
362
+ }
363
+ },
364
+ "0.44.0": {
365
+ "EnumDeclaration_ContainerErrorType": {
366
+ "backCompat": false
367
+ },
368
+ "InterfaceDeclaration_ICodeDetailsLoader": {
369
+ "backCompat": false
370
+ },
371
+ "InterfaceDeclaration_ICodeLoader": {
213
372
  "backCompat": false
214
373
  },
215
374
  "InterfaceDeclaration_IContainer": {
375
+ "backCompat": false,
376
+ "forwardCompat": false
377
+ },
378
+ "InterfaceDeclaration_IContainerContext": {
379
+ "backCompat": false,
380
+ "forwardCompat": false
381
+ },
382
+ "InterfaceDeclaration_IFluidModule": {
216
383
  "backCompat": false
217
384
  },
218
- "InterfaceDeclaration_IProvideLoader": {
385
+ "InterfaceDeclaration_IFluidModuleWithDetails": {
219
386
  "backCompat": false
220
387
  },
221
- "InterfaceDeclaration_IDeltaManager": {
388
+ "InterfaceDeclaration_IGenericError": {
222
389
  "backCompat": false
223
390
  },
224
- "InterfaceDeclaration_IConnectionDetails": {
391
+ "InterfaceDeclaration_IHostLoader": {
392
+ "backCompat": false,
393
+ "forwardCompat": false
394
+ },
395
+ "InterfaceDeclaration_ILoader": {
396
+ "backCompat": false,
397
+ "forwardCompat": false
398
+ },
399
+ "InterfaceDeclaration_IProvideLoader": {
400
+ "backCompat": false,
401
+ "forwardCompat": false
402
+ },
403
+ "InterfaceDeclaration_IProvideRuntimeFactory": {
404
+ "backCompat": false,
405
+ "forwardCompat": false
406
+ },
407
+ "InterfaceDeclaration_IProxyLoaderFactory": {
408
+ "backCompat": false,
409
+ "forwardCompat": false
410
+ },
411
+ "InterfaceDeclaration_IRuntimeFactory": {
412
+ "backCompat": false,
413
+ "forwardCompat": false
414
+ },
415
+ "InterfaceDeclaration_IThrottlingWarning": {
416
+ "backCompat": false
417
+ },
418
+ "InterfaceDeclaration_IUsageError": {
225
419
  "backCompat": false
226
420
  }
227
421
  }
package/src/deltas.ts CHANGED
@@ -148,24 +148,9 @@ export interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>
148
148
  /** Flag to indicate whether the client can write or not. */
149
149
  readonly active: boolean;
150
150
 
151
- /**
152
- * Tells if container is in read-only mode.
153
- * Data stores should listen for "readonly" notifications and disallow user making changes to data stores.
154
- * Readonly state can be because of no storage write permission,
155
- * or due to host forcing readonly mode for container.
156
- *
157
- * We do not differentiate here between no write access to storage vs. host disallowing changes to container -
158
- * in all cases container runtime and data stores should respect readonly state and not allow local changes.
159
- *
160
- * It is undefined if we have not yet established websocket connection
161
- * and do not know if user has write access to a file.
162
- * @deprecated - use readOnlyInfo
163
- */
164
- readonly readonly?: boolean;
165
-
166
151
  readonly readOnlyInfo: ReadOnlyInfo;
167
152
 
168
- /** Terminate the connection to storage */
153
+ /** @deprecated - Use Container.close() or IContainerContext.closeFn() */
169
154
  close(): void;
170
155
 
171
156
  /** Submit a signal to the service to be broadcast to other connected clients, but not persisted */
package/src/error.ts CHANGED
@@ -33,7 +33,12 @@ export enum ContainerErrorType {
33
33
  * Error indicating an API is being used improperly resulting in an invalid operation.
34
34
  */
35
35
  usageError = "usageError",
36
- }
36
+
37
+ /**
38
+ * Error indicating an client session has expired.
39
+ */
40
+ clientSessionExpiredError = "clientSessionExpiredError",
41
+ }
37
42
 
38
43
  /**
39
44
  * Base interface for all errors and warnings at container level
package/src/loader.ts CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  IClientDetails,
16
16
  IDocumentMessage,
17
17
  IPendingProposal,
18
- IQuorum,
18
+ IQuorumClients,
19
19
  ISequencedDocumentMessage,
20
20
  } from "@fluidframework/protocol-definitions";
21
21
  import { IResolvedUrl } from "@fluidframework/driver-definitions";
@@ -162,7 +162,7 @@ export interface IContainer extends IEventProvider<IContainerEvents>, IFluidRout
162
162
  * The collection of write clients which were connected as of the current sequence number.
163
163
  * Also contains a map of key-value pairs that must be agreed upon by all clients before being accepted.
164
164
  */
165
- getQuorum(): IQuorum;
165
+ getQuorum(): IQuorumClients;
166
166
 
167
167
  /**
168
168
  * Represents the resolved url to the Container
@@ -174,27 +174,18 @@ export interface IContainer extends IEventProvider<IContainerEvents>, IFluidRout
174
174
  */
175
175
  readonly attachState: AttachState;
176
176
 
177
- /**
178
- * The current code details for the container's runtime
179
- * @deprecated use getSpecifiedCodeDetails for the code details currently specified for this container, or
180
- * getLoadedCodeDetails for the code details that the container's context was loaded with.
181
- * To be removed after getSpecifiedCodeDetails and getLoadedCodeDetails become ubiquitous.
182
- * This is now marked as optional and due to be removed in next release.
183
- */
184
- readonly codeDetails?: IFluidCodeDetails | undefined;
185
-
186
177
  /**
187
178
  * Get the code details that are currently specified for the container.
188
179
  * @returns The current code details if any are specified, undefined if none are specified.
189
180
  */
190
- getSpecifiedCodeDetails?(): IFluidCodeDetails | undefined;
181
+ getSpecifiedCodeDetails(): IFluidCodeDetails | undefined;
191
182
 
192
183
  /**
193
184
  * Get the code details that were used to load the container.
194
185
  * @returns The code details that were used to load the container if it is loaded, undefined if it is not yet
195
186
  * loaded.
196
187
  */
197
- getLoadedCodeDetails?(): IFluidCodeDetails | undefined;
188
+ getLoadedCodeDetails(): IFluidCodeDetails | undefined;
198
189
 
199
190
  /**
200
191
  * Returns true if the container has been closed, otherwise false
@@ -257,12 +248,12 @@ export interface IContainer extends IEventProvider<IContainerEvents>, IFluidRout
257
248
  /**
258
249
  * Provides the current connected state of the container
259
250
  */
260
- readonly connectionState?: ConnectionState;
251
+ readonly connectionState: ConnectionState;
261
252
 
262
253
  /**
263
254
  * Boolean indicating whether the container is currently connected or not
264
255
  */
265
- readonly connected?: boolean;
256
+ readonly connected: boolean;
266
257
 
267
258
  /**
268
259
  * Dictates whether or not the current container will automatically attempt to reconnect to the delta stream
@@ -281,7 +272,7 @@ export interface IContainer extends IEventProvider<IContainerEvents>, IFluidRout
281
272
  /**
282
273
  * The audience information for all clients currently associated with the document in the current session
283
274
  */
284
- readonly audience?: IAudience;
275
+ readonly audience: IAudience;
285
276
 
286
277
  /**
287
278
  * The server provided ID of the client.
@@ -302,7 +293,7 @@ export interface IContainer extends IEventProvider<IContainerEvents>, IFluidRout
302
293
  * It is undefined if we have not yet established websocket connection
303
294
  * and do not know if user has write access to a file.
304
295
  */
305
- readonly readOnlyInfo?: ReadOnlyInfo;
296
+ readonly readOnlyInfo: ReadOnlyInfo;
306
297
 
307
298
  /**
308
299
  * Allows the host to have the container force to be in read-only mode
package/src/runtime.ts CHANGED
@@ -16,7 +16,6 @@ import { IDocumentStorageService } from "@fluidframework/driver-definitions";
16
16
  import {
17
17
  IClientConfiguration,
18
18
  IClientDetails,
19
- IQuorum,
20
19
  ISequencedDocumentMessage,
21
20
  ISnapshotTree,
22
21
  ITree,
@@ -24,6 +23,7 @@ import {
24
23
  ISummaryTree,
25
24
  IVersion,
26
25
  IDocumentMessage,
26
+ IQuorumClients,
27
27
  } from "@fluidframework/protocol-definitions";
28
28
  import { IAudience } from "./audience";
29
29
  import { IDeltaManager } from "./deltas";
@@ -121,10 +121,12 @@ export interface IRuntime extends IDisposable {
121
121
  * and the Container has created a new ContainerContext.
122
122
  */
123
123
  export interface IContainerContext extends IDisposable {
124
- readonly id: string;
125
124
  readonly existing: boolean | undefined;
126
125
  readonly options: ILoaderOptions;
127
- readonly configuration: IFluidConfiguration;
126
+ /**
127
+ * @deprecated 0.45 - Configuration is not recommended to be used and will be removed in an upcoming release.
128
+ */
129
+ readonly configuration?: IFluidConfiguration;
128
130
  readonly clientId: string | undefined;
129
131
  readonly clientDetails: IClientDetails;
130
132
  readonly storage: IDocumentStorageService;
@@ -134,7 +136,7 @@ export interface IContainerContext extends IDisposable {
134
136
  readonly submitSignalFn: (contents: any) => void;
135
137
  readonly closeFn: (error?: ICriticalContainerError) => void;
136
138
  readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
137
- readonly quorum: IQuorum;
139
+ readonly quorum: IQuorumClients;
138
140
  /**
139
141
  * @deprecated This method is provided as a migration tool for customers currently reading the code details
140
142
  * from within the Container by directly accessing the Quorum proposals. The code details should not be accessed